diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..ad85d93 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,76 @@ +image: + - Ubuntu + - Ubuntu1604 + - Ubuntu2004 + - macos-monterey + - Visual Studio 2022 + +environment: + CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ + matrix: + - BUILD: MSVCDYNAMIC64 + - BUILD: MSVCSTATIC64 + - BUILD: INSTALLER + - BUILD: MinGW32 + - BUILD: MSYS2 + - BUILD: MinGW64 + +matrix: + exclude: + - image: Ubuntu + BUILD: MSVCSTATIC64 + - image: Ubuntu + BUILD: INSTALLER + - image: Ubuntu + BUILD: MinGW32 + - image: Ubuntu + BUILD: MSYS2 + - image: Ubuntu + BUILD: MinGW64 + - image: Ubuntu1604 + BUILD: MSVCSTATIC64 + - image: Ubuntu1604 + BUILD: INSTALLER + - image: Ubuntu1604 + BUILD: MinGW32 + - image: Ubuntu1604 + BUILD: MSYS2 + - image: Ubuntu1604 + BUILD: MinGW64 + - image: Ubuntu2004 + BUILD: MSVCSTATIC64 + - image: Ubuntu2004 + BUILD: INSTALLER + - image: Ubuntu2004 + BUILD: MinGW32 + - image: Ubuntu2004 + BUILD: MSYS2 + - image: Ubuntu2004 + BUILD: MinGW64 + - image: macos-monterey + BUILD: MSVCSTATIC64 + - image: macos-monterey + BUILD: INSTALLER + - image: macos-monterey + BUILD: MinGW32 + - image: macos-monterey + BUILD: MSYS2 + - image: macos-monterey + BUILD: MinGW64 + +artifacts: + - path: installer + +clone_depth: 5 + +install: + - cmd: 'ci\openssl.bat' + - sh: 'sudo ci/install.sh' + +build_script: + - cmd: 'ci\build.bat' + - sh: 'ci/build.sh' + +test_script: + - cmd: 'ci\test.bat' + - sh: 'if [ $(uname) != Darwin ]; then ci/test.sh; fi' diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..2169e6f --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,11 @@ +env: + CIRRUS_CLONE_DEPTH: 5 + +freebsd_instance: + image_family: freebsd-14-0-snap + image_family: freebsd-13-1 + image_family: freebsd-13-0 + +task: + install_script: sudo ci/install.sh + script: ci/build.sh diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml new file mode 100644 index 0000000..3997790 --- /dev/null +++ b/.github/workflows/buildtest.yml @@ -0,0 +1,29 @@ +# See also https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions + +name: Build and test + +on: [push, pull_request] + +jobs: + build_and_test: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + mode: [regular, disable-set, mini, read-only, wolfssl] + + env: + MODE: ${{ matrix.mode }} + + steps: + - uses: actions/checkout@main + + - name: install required packages + run: sudo bash -c "MODE=$MODE ci/install.sh" + + - name: build + run: ci/build.sh + + - name: test + run: ci/test.sh diff --git a/.github/workflows/codechecker.yml b/.github/workflows/codechecker.yml new file mode 100644 index 0000000..ab54c0c --- /dev/null +++ b/.github/workflows/codechecker.yml @@ -0,0 +1,77 @@ +name: CodeChecker + +on: [workflow_dispatch] +#on: +# push: +# branches: [ master ] + +jobs: + codechecker: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: install required packages + run: sudo apt-get install libatm-dev libperl-dev libpopt-dev libsensors4-dev libssh2-1-dev libxml2-dev uuid-dev libkrb5-dev python3-setuptools + + - name: install clang v12 + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 12 + sudo apt-get install clang clang-tidy + + - name: install packages required by CodeChecker + run: | + sudo apt-get install doxygen gcc-multilib python-virtualenv + + - name: install nodejs version 12.x + run: | + curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - + sudo apt-get install nodejs + + - name: install CodeChecker v6.14 + run: | + git clone https://github.com/Ericsson/CodeChecker.git /opt/codechecker + git -C /opt/codechecker/ checkout -b b6.14.0 v6.14.0 + make -C /opt/codechecker venv + . /opt/codechecker/venv/bin/activate + make -C /opt/codechecker package + + - name: CodeChecker version + run: | + source /opt/codechecker/venv/bin/activate + export PATH=/opt/codechecker/build/CodeChecker/bin:$PATH; + CodeChecker version + + - name: configure + run: MODE=regular; ci/net-snmp-configure ${GITHUB_REF##*/} + + - name: Codechecker log + run: | + source /opt/codechecker/venv/bin/activate + export PATH=/opt/codechecker/build/CodeChecker/bin:$PATH + CodeChecker log -o codechecker-log.json -b "make" + + - name: Codechecker analyze + run: | + source /opt/codechecker/venv/bin/activate + export PATH=/opt/codechecker/build/CodeChecker/bin:$PATH + echo "-*/conftest.c" > codechecker.skipfile + echo "-*/conftest.cpp" >> codechecker.skipfile + echo "-*/tmp.*.c" >> codechecker.skipfile + CodeChecker analyze -j $(nproc) --clean --skip codechecker.skipfile -o ./results --report-hash context-free-v2 codechecker-log.json + #CodeChecker analyze -j $(nproc) --clean --skip codechecker.skipfile --ctu -e sensitive -o ./results --report-hash context-free-v2 codechecker-log.json + + - name: CodeChecker parse + run: | + source /opt/codechecker/venv/bin/activate; + export PATH=/opt/codechecker/build/CodeChecker/bin:$PATH + CodeChecker parse -e html ./results -o ./reports_html + + - name: Archive CodeChecker results + uses: actions/upload-artifact@v2 + with: + name: CodeChecker reports + path: reports_html diff --git a/.gitignore b/.gitignore index df174ed..bfc8990 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -*~ *.bak *.bs *.ft @@ -13,7 +12,10 @@ *.out *.pdb *.rej +*.swp +*~ .libs/ +__pycache__ agent/*.exe agent/mibgroup/agent_module_dot_conf.h agent/mibgroup/agent_module_includes.h @@ -35,6 +37,9 @@ apps/snmpget apps/snmpgetnext apps/snmpnetstat/*.exe apps/snmpnetstat/snmpnetstat +apps/snmppcap +apps/snmpping +apps/snmpps apps/snmpset apps/snmpstatus apps/snmptable @@ -71,7 +76,6 @@ Makefile man/*.[1358] man/default_store.3.h man/manaliases -mibs/.index mk/ module_tmp_header.h net-snmp-5* @@ -79,10 +83,15 @@ net-snmp-6* net-snmp-config net-snmp-config-x net-snmp-create-v3-user +netsnmp-agent.pc +netsnmp.pc NEWS.new* +perl/*.json perl/*.yml perl/*/*.def +perl/*/*.json perl/*/*.yml +perl/*/*/*.json perl/*/*/*.yml perl/agent/agent.c perl/agent/default_store/default_store.c @@ -92,7 +101,9 @@ perl/blib/ perl/default_store/default_store.c perl/NetSNMP.c perl/OID/OID.c +perl/OID/snmp.conf perl/SNMP/SNMP.c +perl/SNMP/snmp.conf perl/SNMP/t/*.log perl/SNMP/t/*.pid perl/SNMP/t/*.stderr @@ -102,6 +113,8 @@ perl/TrapReceiver/const-xs.inc perl/TrapReceiver/TrapReceiver.c pm_to_blib python/build +python/netsnmp_python.egg-info/ +python/netsnmp/client_intf.*.so sedscript snmplib/snmpsm_init.h snmplib/snmpsm_shutdown.h @@ -110,6 +123,7 @@ stamp-h TAGS testing/failed_tests testing/testing/ +testing/fuzzing/ win32/*/debug win32/*/release win32/bin diff --git a/CHANGES b/CHANGES index 8922f39..15fdbbe 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,331 @@ that have been applied in released versions. Please see the NEWS file for a summary of the major changes, and the ChangeLog file for a comprehensive listing of all changes made to the code. +*5.9.4*: + + IMPORTANT: SNMP over TLS and/or DTLS are not functioning properly + in this release with various versions of OpenSSL and will be fixed + in a future release. + + libsnmp: + - Remove the SNMP_SWIPE_MEM() macro Remove this macro since it is not + used in the Net-SNMP code base. + - DISPLAY-HINT fixes + - Miscellanious improvements to the transports + - Handle multiple oldEngineID configuration lines + - fixes for DNS names longer than 63 characters + + agent: + - Added a ignoremount configuration option for the HOST-MIB + - disallow SETs with a NULL varbind + - fix the --enable-minimalist build + + apps: + - snmpset: allow SET with NULL varbind for testing + - snmptrapd: improved MySQL logging code + + general: + - configure: Remove -Wno-deprecated as it is no longer needed + - miscellanious ther bug fixes, build fixes and cleanups + +*5.9.3*: + security: + - These two CVEs can be exploited by a user with read-only credentials: + - CVE-2022-24805 A buffer overflow in the handling of the INDEX of + NET-SNMP-VACM-MIB can cause an out-of-bounds memory access. + - CVE-2022-24809 A malformed OID in a GET-NEXT to the nsVacmAccessTable + can cause a NULL pointer dereference. + - These CVEs can be exploited by a user with read-write credentials: + - CVE-2022-24806 Improper Input Validation when SETing malformed + OIDs in master agent and subagent simultaneously + - CVE-2022-24807 A malformed OID in a SET request to + SNMP-VIEW-BASED-ACM-MIB::vacmAccessTable can cause an + out-of-bounds memory access. + - CVE-2022-24808 A malformed OID in a SET request to + NET-SNMP-AGENT-MIB::nsLogTable can cause a NULL pointer dereference + - CVE-2022-24810 A malformed OID in a SET to the nsVacmAccessTable + can cause a NULL pointer dereference. + - To avoid these flaws, use strong SNMPv3 credentials and do not share them. + If you must use SNMPv1 or SNMPv2c, use a complex community string + and enhance the protection by restricting access to a given IP address range. + - Thanks are due to Yu Zhang of VARAS@IIE and Nanyu Zhong of VARAS@IIE for + reporting the following CVEs that have been fixed in this release, and + to Arista Networks for providing fixes. + + Windows: + - WinExtDLL: Fix multiple compiler warnings + - WinExtDLL: Make long strings occupy a single line Make it easier to + look up error messages in the source code by making long strings + occupy a single source code line. + - WinExtDLL: Restore MIB-II support Make winExtDLL work on 64-bit + Windows systems") caused snmpd to skip MIB-II on 64-bit systems. + + IF-MIB: Update ifTable entries even if the interface name has changed + At least on Linux a network interface index may be reused for a + network interface with a different name. Hence this patch that + enables replacing network interface information even if the network + interface name has changed. + + unspecified: + - Moved transport code into a separate subdirectory in snmplib + - Snmplib: remove inline versions of container funcs". + + misc: + - snmp-create-v3-user: Fix the snmpd.conf path @datadir@ is + expanded in ${datarootdir} so datarootdir must be set before + @datadir@ is used. + +*5.9.2*: + security: + - These two CVEs can be exploited by a user with read-only credentials: + - CVE-2022-24805 A buffer overflow in the handling of the INDEX of + NET-SNMP-VACM-MIB can cause an out-of-bounds memory access. + - CVE-2022-24809 A malformed OID in a GET-NEXT to the nsVacmAccessTable + can cause a NULL pointer dereference. + - These CVEs can be exploited by a user with read-write credentials: + - CVE-2022-24806 Improper Input Validation when SETing malformed + OIDs in master agent and subagent simultaneously + - CVE-2022-24807 A malformed OID in a SET request to + SNMP-VIEW-BASED-ACM-MIB::vacmAccessTable can cause an + out-of-bounds memory access. + - CVE-2022-24808 A malformed OID in a SET request to + NET-SNMP-AGENT-MIB::nsLogTable can cause a NULL pointer dereference + - CVE-2022-24810 A malformed OID in a SET to the nsVacmAccessTable + can cause a NULL pointer dereference. + - To avoid these flaws, use strong SNMPv3 credentials and do not share them. + If you must use SNMPv1 or SNMPv2c, use a complex community string + and enhance the protection by restricting access to a given IP address range. + - Thanks are due to Yu Zhang of VARAS@IIE and Nanyu Zhong of VARAS@IIE for + reporting the following CVEs that have been fixed in this release, and + to Arista Networks for providing fixes. + + Windows: + - WinExtDLL: Fix multiple compiler warnings + - WinExtDLL: Make long strings occupy a single line Make it easier to + look up error messages in the source code by making long strings + occupy a single source code line. + - WinExtDLL: Restore MIB-II support Make winExtDLL work on 64-bit + Windows systems") caused snmpd to skip MIB-II on 64-bit systems. + + IF-MIB: Update ifTable entries even if the interface name has changed + At least on Linux a network interface index may be reused for a + network interface with a different name. Hence this patch that + enables replacing network interface information even if the network + interface name has changed. + + unspecified: + - Moved transport code into a separate subdirectory in snmplib + - Snmplib: remove inline versions of container funcs". + + misc: + - snmp-create-v3-user: Fix the snmpd.conf path @datadir@ is + expanded in ${datarootdir} so datarootdir must be set before + @datadir@ is used. + +*5.9.1*: + General: Many bug fixes + +*5.9* + snmplib: + - Add IPv6 support to DTLSUDP transport + - use new netsnmp_sockaddr_storage in netsnmp_addr_pair + - add base_transport ptr for tunneled transports + - Add support for OpenSSL 1.1.1 + - Dtls: overhaul of debug + - Remove inline versions of container funcs + + snmpd: + - Use ETHTOOL_GLINKSETTINGS when available Newer Linux kernels + support ETHTOOL_GLINKSETTINGS. Use it when available instead of the + older and deprecated ETHTOOL_GSET. This patch avoids that the Linux + kernel reports the following kernel warning: warning: 'snmpd' uses + legacy ethtool link settings API, link modes are only partially + reported See also https://sourceforge.net/p/net-snmp/patches/1387/. + [bvanassche: reworked this patch significantly] + - Reduce the time needed to execute "pass" scripts on BSD systems See + also https://github.com/net-snmp/net-snmp/issues/8. + - [BUG 2926]: Make it possible to set agentXPingInterval for a + subagent - register agentXPingInterval for the subagent list + handler, before it was registered for snmp - added agentxTimeout to + the subagent list handler. It's now possible to set for snmpd and + the subagent. See 'man snmpd.conf' - added agentxRetries to the + subagent list handler. See 'man snmpd.conf'. It's never used in the + subagent, but it's now following the documentation Signed-off-by: + Anders Wallin + + snmptrap: + - BUG: 2899: Patch from Drew Roedersheimer to set library + engineboots/time values before sending + + snmptrapd: + - Add support for the latest libmysqlclient version + + libsnmp: + - Scan MIB directories in alphabetical order This guarantees that + e.g. mibs/RFC1213-MIB.txt is read before mibs/SNMPv2-MIB.txt. The + order in which these MIBs is read matters because both define + sysLocation but with different attributes. + + unspecified: + - [BUG 2930]: Fix a Solaris hrSWInst crash Avoid that snmpd crashes + on Solaris when querying software packages with an empty CATEGORY + field. See also https://sourceforge.net/p/net-snmp/bugs/2930/. See + also https://sourceforge.net/p/net-snmp/patches/1390/. + + FreeBSD: + - Fix first byte of IF-MIB::ifPhysAddress Don't write past the + interface name, and use temporary copy instead. This fixes the + first byte of ifPhysAddress always being 0 on FreeBSD. See also + https://sourceforge.net/p/net-snmp/code/merge-requests/20/. [ + bvanassche: edited patch title / added test for malloc() result / + reduced number of free(if_name) calls ] + + Win32: + - BUG: 2779541 Fixed handle leak in pass_persist. + +*5.8* + snmplib: + - [BUG 3444939]: BUG: 1796886: snmplib: Avoid that + sprint_realloc_octet_string() triggers a segmentation fault + strlcpy() implementations typically scan for the end of the source + argument passed to strlcpy(). Hence avoid passing an unterminated + string to strlcpy(). + - Flush persistent config to persistent storage + - Asn1: BUG: 2828: from "Google Autofuzz project": fix off-by-one + heap access for opaque types (and an adjacent bug that was not in + 5.4, noticed by code inspection) + - Asn1: from "Google Autofuzz project": propagate error from + asn_parse_length + - TLS/DTLS fixes + - Add more openssl error cases where we check for local cert + - fix usm keychanges for new algorithms and longer keylengths + - fix some memory leaks in usm processing + - IP address formatting fixes + - Make the source code C89 compliant + - Fixed reporting 'error writing to /var/xxx/snmpapp.conf'. When a + client utility, such as snmptrap, tries to write to its persistent + configuration file (/var/net-snmp/snmpapp.conf in Fedora), do not + report any error when open() fails. The tool is typically run by + non-root, who cannot write to /var and the error just confuses + users. And when doing it, make sure that "snmpapp" string is + defined only on one place, just in case. + - BUG: 2622: Fix excessive indents in log file + + snmpd: + - SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress + - [BUG 2815]: Display UTF-8 characters again + - [BUG 3444939]: BUG: 1796886: snmplib: Avoid that + sprint_realloc_octet_string() embeds unprintable control characters + or binary zeroes in its output. This behavior could cause truncated + output in snmptrapd.") + - BUG: 2864: use clientaddr properly + - Add the ability to set the source address with "-s" for trapsess + - BUG: 1366: Pass proper buffer length to netsnmp_tls_fingerprint_build() + - Fix/enforce ipDefaultRouterLifetime value range + - BUG: 2810: from "Minzhuan Gong": fix compile with + --enable-read-only + - BUG: 2845: fix compilation error with NETSNMP_NO_WRITE_SUPPORT + - BUG: 2846: fix agent compile when both --enable-read-only and + --disable-set-support are given. + - Com2sec and com2sec6 SOURCE values may deny sources as well as + permit. + - TLSTM MIB: Fix support for sha256, 384 and 512 fingerprints + - BUG: 2830: Make the agentxperms keyword work again + - Add new snmpd.conf option 'diskio' to monitor only selected disks. + On machines with thousands of block devices, parsing + /proc/diskstats is really slow. The new option enables monitoring + of selected devices, saving lot of CPU time. + + agentx: + - From "Google AutoFuzz project": account for the nul character we + will add to the string. + - From "Google Autofuzz project": additional agentx protocol parser + bounds checking + + install: + - Install missing system header files + + building: + - Add Travis and Appveyor CI support + - Fix recently introduced autoreconf warnings + - Unbreak AIX support + - RHEL 5 build fix + + docs: + - Bug 2826: from Tomasz: fix utf-8 encoding + + python: + - BUG 2824: from: Tomasz: Fix python module make install + + snmptranslate: + - Introduce bulk translation mode The special argument "-" causes + snmptranslate to enter bulk translation mode, in which it expects + one OID per line. Whitespace is treated as the end of the OID, and + only that portion of the line is replaced, meaning that this can be + used to translate, e.g., "snmpwalk" output without the proper MIBs + loaded: snmptranslate -m all -OX < numeric.txt > symbolic.txt + + snmptrapd: + - Add support for the latest libmysqlclient version + - Correctly forward traps with Request-ID '0'. Request-ID of + forwarded traps is taken from the incoming trap and it can be zero. + We should not report error in this case. + + mib2c: + - PATCH: 1281, BUG: 2534 fixed mfd writability + + python: + - Patch from David Hankins to fix python binding error codes + + unspecified: + - A new 'checkbandwidth' script to check host min/max bandwidth + - Many fixes found by Coverity scans + - Fixed crash when receiving non-standard compliant responses. Some + HW sends ifOperStatus as NULL instead of INTEGER type. We should + not try to dereference this NULL. + - IPv6 support is now compiled by default. If you need an IPv4-only + agent, use --disable-ipv6. + - [BUG 2616]: Fix certain spelling errors in source code comments and + printed messages + - [BUG 2624]: stop trying to use the deprecated perl uninstall + - [BUG 2712]: Fix Perl module compilation + - [BUG ]: #2615: Don't return incompletely parsed varbinds + + DISMAN EXPRESSION MIB: + - Avoid that enabling this MIB causes snmpd to crash during startup + + DISMAN MIB: + - Avoid reading past the end of a buffer Terminate the expExpression + string with a NUL character. + + HP: + - UX on ia64: Fix large fd set implementation Reported-by: Dixon + Xavier + + NetBSD: + - Fix for NetBSD 8 + + MIB: + - Speed up reading /proc/net/tcp and /proc/net/tcp6 The time needed + to read Linux procfs files is proportional to the square of the + quotient of the file size and the read buffer size. Increase the + read buffer size to decrease the time needed to read large procfs + files. + + Windows: + - BUG: 2550: Suppress netsnmp_assert s != (-1) messages + - Feature-request: 181: Export snmp_api and ASN functions See also + http://sourceforge.net/p/net-snmp/feature-requests/181/. + + Cygwin64: + - Fix build with OpenSSL + - Fix winExtDLL build + + Win32: + - Add support for the DTLS-UDP and TLS-TCP transports + - Win32/MSVC general cleanup + + *5.7.3* snmplib: - Fixed crash when MD5 hash is not supported by OpenSSL. @@ -2448,7 +2773,6 @@ listing of all changes made to the code. - [PATCH 1600453]: OS X compile-time endian determination - [PATCH 1600522]: CPU HAL implementation for mach/darwin - Improve memory reporting (patch from Apple) - - Patch: 3514049 from twobits-github: fix compilation on darwin11 Solaris: - [BUG 1626153]: No hrSWRun informations on Solaris zones diff --git a/COPYING b/COPYING index 3eef440..2be7407 100644 --- a/COPYING +++ b/COPYING @@ -96,7 +96,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 4: Sun Microsystems, Inc. copyright notice (BSD) ----- -Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +Copyright (c) 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Use is subject to license terms below. @@ -109,17 +109,17 @@ trademarks of Sun Microsystems, Inc. in the U.S. and other countries. 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 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. +* 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. -* Neither the name of the Sun Microsystems, Inc. nor the - names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. +* Neither the name of the Sun Microsystems, Inc. nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, @@ -293,7 +293,31 @@ 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. ----- Part 10: IETF copyright notice (BSD) ----- +---- Part 10: Lennart Poettering copyright notice (BSD-like) ----- + + Copyright 2010 Lennart Poettering + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +---- Part 11: IETF copyright notice (BSD) ----- Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. @@ -302,20 +326,20 @@ 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, +* 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 +* 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. -· Neither the name of Internet Society, IETF or IETF Trust, nor the +* Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS -IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``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 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, @@ -325,3 +349,98 @@ 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. + +---- Part 12: Arista Networks copyright notice (BSD) ---- + +Copyright (c) 2013, Arista Networks, Inc. +All rights reserved. + +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. + +* Neither the name of Arista Networks, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``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 +HOLDERS OR CONTRIBUTORS 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. + +---- Part 13: VMware, Inc. copyright notice (BSD) ----- + +Copyright (c) 2016, VMware, Inc. +All rights reserved. + +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. + +* Neither the name of VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``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 HOLDERS OR +CONTRIBUTORS 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. + +---- Part 14: USC/Information Sciences Institute copyright notice (BSD) ----- + +Copyright (c) 2017-2018, Information Sciences Institute +All rights reserved. + +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. + +* Neither the name of Information Sciences Institue nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``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 HOLDERS OR +CONTRIBUTORS 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. diff --git a/ChangeLog b/ChangeLog index 04219c0..6a8578c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20124 @@ # -*- text -*- +---------------------------------------------------------------------- + +Changes: V5.9.4.rc1 -> V5.9.4 + +commit 5289dca2699acb24e4ba92bc20fd1079484eb0fb +Author: Wes Hardaker +Date: Tue Aug 15 13:28:30 2023 -0700 + + added a note about TLS + +commit 54f9a73ebdcc7e038f1f9a2612115b3f909ec871 +Author: Wes Hardaker +Date: Tue Aug 15 13:18:19 2023 -0700 + + remove 5-9 patches + +commit 7e527d309934c8c28e55de4c1d856a9cae137a7e +Author: Wes Hardaker +Date: Tue Aug 15 13:17:47 2023 -0700 + + Version number update: 5.9.4 + +commit 04b98f6b3c939382e697a85a10569299eb74b46e +Author: Wes Hardaker +Date: Tue Aug 15 13:16:36 2023 -0700 + + better debug message + +commit 100c0d989079cd36954e3000591fd1ef9e6859a1 +Author: Wes Hardaker +Date: Tue Aug 15 13:16:09 2023 -0700 + + changes and news + +---------------------------------------------------------------------- + +Changes: V5.9.4.pre3 -> V5.9.4.rc1 + +commit bb7eb41a74cb11a212cc7b69bde09d10290f7824 +Author: Wes Hardaker +Date: Thu Jun 22 08:00:33 2023 -0700 + + Release Candidate for V5-9-patches + +commit ab9840507a39b68fa7bf3ebc1b03b4725ceaea1a +Author: Wes Hardaker +Date: Thu Jun 22 08:00:31 2023 -0700 + + Version number update: 5.9.4.rc1 + +commit d4db247d68c868452d4fe876796e2cd1e8326239 +Author: Bart Van Assche +Date: Tue Jun 20 06:59:15 2023 -0700 + + configure: Remove -Wno-deprecated + + Remove this compiler option now that a better solution is available for + suppressing warnings from the OpenSSL library about using deprecated functions. + +commit d9be7344eeec10d139789f2cbac9ab0a7791f24d +Author: Niels Baggesen +Date: Mon Jun 19 10:05:50 2023 +0200 + + libsnmp: Declare OpenSSL API version + + Add the include/net-snmp/library/openssl_config.h header file. This suppresses + warnings from the OpenSSL 3.0+ library about using deprecated API functions. + + Fixes: https://github.com/net-snmp/net-snmp/pull/591 + + [ bvanassche: edited patch description ] + +commit d78add0cdb953775786e040f2a6e92b578e84699 +Author: Bart Van Assche +Date: Wed Jun 7 08:04:06 2023 -0700 + + ci: Upgrade Github checkout action + + This patch addresses the following warning: + + Node.js 12 actions are deprecated. Please update the following actions to use + Node.js 16: actions/checkout@v2. For more information see: + https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. + +commit 83a42cbb2fafcb228795be561d4cda2b1357a18e +Author: Bart Van Assche +Date: Sat Jan 21 15:55:55 2023 -0800 + + ci: Drop support for Travis CI + + CI support for open source projects ceased on travis-ci.org in June 2021. + Hence remove support for Travis CI. + +commit 45cca4ef4babd5ee32961f92d69027774fe0aa02 +Author: Bart Van Assche +Date: Wed Dec 21 17:08:52 2022 -0800 + + ci/perl.bat: Fix a syntax error + +commit 50b7683008534ed4201e2e7796bd6f584c746852 +Author: Bart Van Assche +Date: Tue Sep 13 13:43:02 2022 -0700 + + .cirrus.yml: Update to the current Cirrus CI syntax + + Additionally, do not install pkgconf since it breaks the Net-SNMP build. + +commit b6569d5af51d2d6d158621b8c8b4c04cbf1666a8 +Author: Bart Van Assche +Date: Sun Aug 7 15:34:32 2022 -0700 + + Make the shell scripts again compatible with the POSIX shell + + Although /bin/sh is a soft link to /bin/bash on many Linux systems, this is + not always the case. Use the POSIX shell syntax in shell scripts instead of + bash extensions. + +commit a7dbdfb70cd82a8bc5563aa5a97c579c0f42a714 +Author: Bart Van Assche +Date: Fri Aug 5 17:10:46 2022 -0700 + + ci/net-snmp-configure: Only apply Travis workarounds for Travis CI + +commit f120aa7d59c2b3554ab0c9f20da5424491c429d4 +Author: Bart Van Assche +Date: Sat Jul 30 20:06:29 2022 -0700 + + ci: Build with OpenSSL and wolfSSL + +commit f3b8e895ea273a08fd013c7a430844df8988c829 +Author: Bart Van Assche +Date: Sat Jul 30 20:49:34 2022 -0700 + + ci/net-snmp-configure: Remove the OpenSSL version querying code + +commit 6c7ec60055a2e35e34c69bd24ec5ac68bd16d68b +Author: Bart Van Assche +Date: Tue Jun 6 11:39:28 2023 -0700 + + ci: Improve .appveyor.yml + + Reduce the build time by excluding configurations that are skipped. Add the + Ubuntu2004 image. Switch from Visual Studio 2019 to Visual Studio 2022. Switch + from macos-mojave to macos-monterey. + +commit e1fdcba82e5d8dff9c22de4f8307cc262d537977 +Author: Bart Van Assche +Date: Tue Sep 13 13:39:42 2022 -0700 + + ci: Use /bin/sh instead of /bin/bash + + Use /bin/sh since /bin/bash is not installed by default in the Cirrus CI + FreeBSD VMs. + +commit 79204e14f69ffb8b2f5204a3c9df8b5e79136366 +Author: Bart Van Assche +Date: Thu Aug 4 14:01:19 2022 -0700 + + ci/install.sh: Install packages quietly + +commit a0d72fb33567dcd9faaa44479a6501f1843efd9e +Author: Florian Koehler +Date: Mon Mar 6 15:45:30 2023 +0100 + + Added fix for TSM segfault. + +commit a99eee78c38b62567ab0ff55b8c04b2d8656bc54 +Author: Bart Van Assche +Date: Sun Jun 4 13:49:51 2023 -0700 + + testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c: Add this test + + Add a reproducer for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59491. + +commit a9fba9a2f23a06a4d01482ccdb96b8ba70c1b0de +Author: Bart Van Assche +Date: Sun Jun 4 14:33:14 2023 -0700 + + libsnmp: Reject invalid DISPLAY-HINT format characters + + Prevent that format characters like 'F' cause a buffer overflow. + +commit b5229a4ef4c6a3ab6d23482211c7607c54044f12 +Author: Bart Van Assche +Date: Thu Aug 11 19:53:30 2022 -0700 + + libsnmp: Fix a recently introduced potential integer overflow + + Fixes: d65925a9f8f6 ("libsnmp: Ignore invalid DISPLAY-HINT clauses") + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50063 + +commit 09c00e9ff2311f1a69a97a4e7b394ac91e6aa0fb +Author: Bart Van Assche +Date: Sun Aug 7 20:26:29 2022 -0700 + + libsnmp: Ignore invalid DISPLAY-HINT clauses + + This patch should + fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48802. + +commit ed31ab4c83eb3c745e61222be0f4d06689a821a5 +Author: Bart Van Assche +Date: Thu Jun 1 14:36:12 2023 -0700 + + libsnmp: Fix a buffer overflow in sprint_realloc_hinted_integer() + + See also https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59491. + +commit fb63c4cbf9abbe4b3b3e8b9475bb6b9aca596c1d +Author: Bart Van Assche +Date: Wed May 31 17:02:59 2023 -0700 + + agent/snmp_perl: Disable -Wcast-qual + + The Perl headers trigger many -Wcast-qual warnings. Hence disable -Wcast-qual + around the Perl extension headers. + +commit 3cec57d8c042619b83e97a45fff34475d314e4b1 +Author: Niels Baggesen +Date: Thu Jun 1 11:13:19 2023 +0200 + + read_config.c: add missing newlines to DEBUGMSGTL calls + +commit 20879e824851a7a188eac50fd34aac04113d7432 +Author: Niels Baggesen +Date: Thu Jun 1 11:12:34 2023 +0200 + + snmplib: Handle two oldEngineID lines in snmpd.conf. Fixes #578 + +commit 055d3801e0b93c552d77645288b2422b2595e2f4 +Author: Bart Van Assche +Date: Wed May 31 15:49:05 2023 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit b208ebecc9381718b801c9d9ddfc5cc7546633f5 +Author: Bart Van Assche +Date: Wed May 31 07:18:26 2023 -0700 + + snmpd: Move a comment block + + The preprocessor constant MIB_CLIENTS_ARE_EVIL is used in source file + old_api.c but not in snmp_vars.c. Hence move the comment block that + explains the role of that preprocessor constant. + +commit 2f95d30e632d2c2ab3add875f2eee1e186d8209f +Author: Bart Van Assche +Date: Wed May 31 07:07:30 2023 -0700 + + libsnmp: Clean up netsnmp_old_api_helper() + + Combine the initialization and declaration of variable 'vp' such that it + can be declared const. Remove 'vp &&' because it causes some static checkers + to report a "dereference before checked" warning. + + Fixes: https://github.com/net-snmp/net-snmp/pull/487 + +commit dc103aa62a6bee2b5cef6085af69d96b65c7a5f9 +Author: Bart Van Assche +Date: Fri May 26 19:21:55 2023 -0700 + + agent/mibgroup/util_funcs: Align netsnmp_get_link_settings() with master branch + +commit 7594e24375c26641c36a6272970579042c350de4 +Author: Bart Van Assche +Date: Fri May 26 14:43:04 2023 -0700 + + agent/mibgroup/util_funcs: Fix a compiler warning + + Fix the following clang compiler warning: + + mibgroup/util_funcs.c:1249:42: warning: field 'elinkset' with variable sized type 'struct ethtool_link_settings' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] + struct ethtool_link_settings elinkset; + + Additionally, increase mask_nwords from 4 to 8. + +commit 7a1220567ec68805713eb2dd782424537f1f0de4 +Author: Bart Van Assche +Date: Fri May 26 14:42:55 2023 -0700 + + libsnmp: Fix a compiler warning + +commit 5192261e49957438d6f18b4f3104cdac49fbd28f +Author: Bart Van Assche +Date: Tue Aug 30 20:39:32 2022 -0700 + + apps/snmptrap: Initialize the variable 'ss' + + Fixes: 21b16eba6024 ("apps: Use netsnmp_cleanup_session()") + +commit 7d5ad2312d849adbed63f23a781049024df8675b +Author: Phil O +Date: Wed May 25 10:58:23 2022 -0700 + + HOST-MIB: Add ignoremount config option + + Fixes: https://github.com/net-snmp/net-snmp/pull/424 + + [bvanassche: edited patch description; moved a declaration of a global + variable from a .c into a .h file and renamed match_mount_config() into + ignore_mount_point().] + +commit 8e02f6c2df8dc929a2f89b71be4de31003a79986 +Author: Phil O +Date: Wed May 25 11:21:40 2022 -0700 + + HOST-MIB: Add virtiofs to other_fs + +commit 298c8103db80b292791616af4fd497342a71867f +Author: Josef Řídký +Date: Wed May 24 10:49:41 2023 +0200 + + libsnmp, UDP transport: Fix sendmsg() error code handling + + This change has been made because of Linux kernel commit "ipv4: Return + -ENETUNREACH if we can't create route but saddr is valid" + (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=595e0651d029) + + Fixes: https://github.com/net-snmp/net-snmp/issues/564 + Fixes: https://github.com/net-snmp/net-snmp/pull/576 + + [ bvanassche: edited commit message ] + +commit 9df89dc4cf04d27c230736da7d66e3b43911864c +Author: Niels Baggesen +Date: Mon May 22 21:33:28 2023 +0200 + + interface_linux.c: defined dummy PCI_NONRET if needed (CentOS7) + +commit 8c930d7242b8121cf9f8646d4519aefd8956b30e +Author: Niels Baggesen +Date: Mon May 22 21:31:46 2023 +0200 + + apps/Makefile.in: snmpps compiles without libcurses (always have) + +commit 76fae1a91eb70ce8231e16e8323a9bf7d8ac62d3 +Author: Niels Baggesen +Date: Mon May 22 21:30:21 2023 +0200 + + etherStatsTable_interface.c: fix a compare of unsigned < 0 + +commit 47ea381e97ff551fd530b6a3eee59451905a864e +Author: Niels Baggesen +Date: Mon May 22 21:24:35 2023 +0200 + + mibII/ipv6.c: remove unused variables + +commit cee200127b43b2858454851390b69551c144bbd3 +Author: Niels Baggesen +Date: Mon May 22 21:23:26 2023 +0200 + + RUNFULLTESTS: correct a reference to srcdir to builddir + +commit 97df191ff8b16bdc53ba95d2a1c064d2a4666ae6 +Author: Bart Van Assche +Date: Sat Oct 8 19:26:01 2022 -0700 + + OS/X: Fix the build + + Apparently the __fd_mask type has been removed on OS/X. Hence this patch. + +commit 0d7022df5cffe44227ab228dcf1fbbc725348138 +Author: Bart Van Assche +Date: Fri Sep 16 15:06:14 2022 -0700 + + libsnmp: Fix undefined behavior in large_fd_set.c + +commit 08d6f301ba025caad18f2ce60f9bb2700b61c087 +Author: Bart Van Assche +Date: Fri May 12 09:59:57 2023 -0700 + + testing/fulltests/support/simple_TESTCONF.sh: Support disabling limits + + If NET-SNMP is built with address sanitizer support, the tests fail as follows + if memory is limited: + ==225838==ERROR: AddressSanitizer failed to allocate 0xdfff0001000 (15392894357504) bytes at address 2008fff7000 (errno: 12) + ==225838==ReserveShadowMemoryRange failed while trying to map 0xdfff0001000 bytes. Perhaps you're using ulimit -v + + Hence add support for disabling runtime limits. + +commit 6fcef3ba7f9cfc9358553cee4e8121841e06278f +Author: Niels Baggesen +Date: Fri May 12 12:55:32 2023 +0200 + + snmpIPv4BaseDomain: fix a leak (shows up with agentx) + +commit a3caa31fc076edae80e6b78667baac92db3493a7 +Author: Niels Baggesen +Date: Fri May 12 09:41:51 2023 +0200 + + config_net_snmp_config_h: add missing defines for DragonFlyBSD + +commit 042deb1731edc311ef5dbc7f01a8ec045285fbe6 +Author: Niels Baggesen +Date: Fri May 12 09:40:38 2023 +0200 + + mibsY/rfclist: correct rfcs for DS1/DS3-mibs + +commit b23b7fc60ad668c4265a694ebd001504bc206829 +Author: Niels Baggesen +Date: Fri May 12 09:39:40 2023 +0200 + + traceRouteCtlTable: fix a possible simple return in a non-void function + +commit b14b5749892b48081c481dab1bb8ce998be0acdd +Author: Niels Baggesen +Date: Fri May 12 09:38:05 2023 +0200 + + Rmon/alarmTable: implement shutdown handler + +commit 2d710d2e3de9c81f60740eb7a965d7c8991474b5 +Author: Niels Baggesen +Date: Fri May 12 09:36:17 2023 +0200 + + agent/extend: fix cleanup at shutdown + +commit d6a1af15777981a20778260c25245f36bf7c25a6 +Author: Niels Baggesen +Date: Fri May 12 09:34:57 2023 +0200 + + apps/snmpusm: fix a memory leak + +commit 9e9da9d092eca13ef23570d3e78fc6bdfb456ae0 +Author: Niels Baggesen +Date: Wed May 10 10:06:31 2023 +0200 + + Yet another #if HAVE_xxx example + +commit 2c7bdeda7a54516f6bcb9b26a0bd5058bdb742ef +Author: Niels Baggesen +Date: Wed May 10 10:02:41 2023 +0200 + + Use configured [ef]grep to avoid warnings about deprecation + +commit ca2334a0cc4e684edcbf1094b19b376c147ee94a +Author: Niels Baggesen +Date: Wed May 10 09:58:08 2023 +0200 + + snmpps: add calls to netsnmp_cleanup_session + +commit c4f0619e9d1e26aaf1d8332386c296b109fc514f +Author: Niels Baggesen +Date: Wed May 10 09:57:12 2023 +0200 + + Fix leak in snmpTargetAddrTable + +commit 0a244ec94ea46a789bb3b867e632417f8781370b +Author: Bart Van Assche +Date: Sat Apr 22 18:20:54 2023 -0700 + + testhandler: Fix memory leaks at exit time + +commit e42be3a74eb83c270b91feac1e28e9f68f7e5c76 +Author: Bart Van Assche +Date: Thu Sep 15 14:18:17 2022 -0700 + + testhandler: Fix memory leaks + +commit d84ccab2377aaaa402be1e58f92d2543b577d9c5 +Author: Bart Van Assche +Date: Fri Sep 16 14:48:33 2022 -0700 + + testhandler: Declare a local variable static + +commit 0dc31dd059913f5d32c1fee3fb8f8a0987307eb2 +Author: Bart Van Assche +Date: Sat Apr 22 18:20:59 2023 -0700 + + SNMP-TLS-TM-MIB: Fix leaks at exit time + +commit 918a733bb8c4e03b042a5724cb194662d3924e7b +Author: Bart Van Assche +Date: Sun Apr 23 14:03:32 2023 -0700 + + SNMP-TLS-TM-MIB: Reorder function definitions + +commit 537c7a6f6fc80b42240781ce45a06febe0567bba +Author: Bart Van Assche +Date: Sat Apr 22 17:32:15 2023 -0700 + + LM-SENSORS-MIB: Fix memory leaks at exit time + +commit 18ed7614451b40db393da4e57dfbcb8b96fe5a01 +Author: Bart Van Assche +Date: Fri Apr 21 16:49:56 2023 -0700 + + LM-SENSORS-MIB: Reorder function definitions + +commit 57d8dcb825c30f6f20941760863a1c8d671a7e8d +Author: Bart Van Assche +Date: Fri Apr 21 16:17:01 2023 -0700 + + DISMAN-EXPRESSION-MIB: Fix memory leaks at exit time + +commit dbb52d271d6bee9f162b9c6abe16ddbd064107f3 +Author: Niels Baggesen +Date: Mon May 1 21:40:57 2023 +0200 + + Fix issue #554 "All commands crash when using -Op" + +commit 4d3cd42e6acf55e640abef68daf567ddad3107ae +Author: Niels Baggesen +Date: Mon May 1 21:38:18 2023 +0200 + + Another few #if HAVE_xxx and similar fixes + +commit 536a09f70b859676b420781f5c73448f7fe7e2b9 +Author: Niels Baggesen +Date: Mon May 1 21:36:53 2023 +0200 + + Fixes for DragonflyBSD TCP and UDP tables + +commit 575dc2129d5707e1f57fefd145dc0a3085018387 +Author: Niels Baggesen +Date: Mon May 1 21:35:15 2023 +0200 + + Additional fix for build outside source directgory + +commit 3eb9ba9f053ea9c8f23c468c77568e125641b745 +Author: Niels Baggesen +Date: Mon May 1 21:34:19 2023 +0200 + + Remove or hide unused variables + +commit 99763268d8e937360ecc618b771c236a8493ec15 +Author: Wes Hardaker +Date: Sat Apr 29 01:33:06 2023 -0700 + + version update for 5.9.4.pre3 + +commit de0217a7698bf9e9fbeaa927f3b0761cbb3a269d +Author: Wes Hardaker +Date: Sat Apr 29 01:26:11 2023 -0700 + + Version number update: 5.9.4.pre3 + + +---------------------------------------------------------------------- + +Changes: V5.9.4.pre2 -> V5.9.4.pre3 + +commit de0217a7698bf9e9fbeaa927f3b0761cbb3a269d +Author: Wes Hardaker +Date: Sat Apr 29 01:26:11 2023 -0700 + + Version number update: 5.9.4.pre3 + +commit 265127456b431b5547a873b8cf6e564938550a6b +Author: Wes Hardaker +Date: Sat Apr 29 01:23:09 2023 -0700 + + Revert "Set flags in MakefileSubs.pm at configure time" + + This reverts commit 7e7ce5a6567c47822410a4683be26d2c0fb8b6cc. + +commit b29c63d12f7298c0e2c31d8e35fc5c2d87d05b7b +Author: Chris Adams +Date: Mon Mar 13 17:34:17 2023 -0500 + + Set flags in MakefileSubs.pm at configure time + + Setting the flags at configure time instead of runtime allows use of the + perl module without pulling in net-snmp-config (which in the Fedora/RHEL + RPM setup also pulls in gcc and *-devel packages, not otherwise needed + when just using the perl SNMP module). The in-tree module is updated + with the rest of the net-snmp code anyway, so setting this at configure + time should stay consistent. + + Signed-off-by: Chris Adams + +commit 50c53277b500c0ee18edb7994e73033ff8020f80 +Author: Bart Van Assche +Date: Tue May 5 10:30:32 2020 -0700 + + libsnmp: Fix handling of the -a and -x app command line options + + Since snmp_free_session() frees securityAuthProto and securityPrivProto, + allocate these two session members dynamically. + + Fixes: 670d4234b519 ("First pass at an SNMPv3 "combined-option" command-line flag (-3x)"). + +commit 21b16eba60245bc84149d338a9700e5915bda292 +Author: Bart Van Assche +Date: Sun Aug 28 18:11:49 2022 -0700 + + apps: Use netsnmp_cleanup_session() + + Backport from master. + + Free the memory allocated by netsnmp_parse_args() before exiting. This reduces + the number of memory leaks reported by tools like LeakSanitizer. + + Ensure that netsnmp_parse_args() only stores pointers to dynamically allocated + memory in the session object. + +commit 72ec58d82b7ddf64b84da2c072f34800c4350fef +Author: Bart Van Assche +Date: Sun Aug 28 18:11:31 2022 -0700 + + libsnmp: Introduce netsnmp_cleanup_session() + + Free all memory owned by a session instead of only a subset of the memory owned + by a session. + + Conflicts: + include/net-snmp/library/snmp_api.h + +commit e8ea0cb1bcc9b96e37895951eb46f04719a10f96 +Author: Niels Baggesen +Date: Thu Apr 20 12:06:14 2023 +0200 + + Fix for OpenBSD 7.3 + +commit 461afde75ac0eb8cafbb523c00762ed96a8e15ea +Author: Niels Baggesen +Date: Thu Apr 20 12:02:58 2023 +0200 + + Not all make's honor VPATH srcdir. FreeBSD is the culprit here. + +commit add75e011eaebee9eca30dd1aac4b9ab282d1626 +Author: Niels Baggesen +Date: Thu Apr 20 11:54:59 2023 +0200 + + Fix missing free detected by -fsanitize=address + +commit cb88cd0809d6be22e7bfb41333c48a171ba91a8f +Author: Andy Fiddaman +Date: Fri Jul 29 15:39:13 2022 +0000 + + testing/fulltests/support/simple_eval_tools.sh: support non-GNU getopt + + Not all implementations of getopt() handle options appearing after + operands. POSIX doesn't require that, it's a GNU extension. + Running the testsuite from version 5.9.2+ on such a system results in + even simple tests failing as the agent attempts to find to port "-f" + +commit 0ab769060f6cc12b3e3bcd4ad914b784bfb5cfb0 +Author: Bart Van Assche +Date: Sun Apr 16 15:05:47 2023 -0700 + + perl: Check the size of output buffers + + Use snprintf() instead of sprintf() for converting an OID into an ASCII + string. + +commit d3f1271a7e5c7b1087c69b0e9fa3a6b16b0dc8b5 +Author: Bart Van Assche +Date: Sun Apr 16 14:12:47 2023 -0700 + + configure: Change AC_TRY_COMPILE() into AC_COMPILE_IFELSE() + + Make this change because the former macro is obsolete. This patch does + not change the configure script. + +commit a2cb167514ac0c7e1b04e8f151e0b015501362e0 +Author: Bart Van Assche +Date: Sun Apr 16 14:09:24 2023 -0700 + + configure: Require that config_() macros are terminated with a semicolon + +commit 85cedab5a26f00b8e4a2f42d2e8e37cde546e22d +Author: Bart Van Assche +Date: Sat Apr 15 15:35:42 2023 -0700 + + Terminate all config_*() macro invocations with a semicolon + + This patch has been generated by running the following commands: + + replace-in-files '^\([[:blank:]]*config_[^,*]*)\)[[:blank:]]*$' '\1;' $(git grep -l '^config_') + replace-in-files '^\([[:blank:]]*config_version_require.*)\)[[:blank:]]*$' '\1;' $(git grep -l '^config_') + +commit 4e593010ef224f3b91fb7c5966788530d9393547 +Author: Bart Van Assche +Date: Sun Apr 16 07:28:35 2023 -0700 + + libsnmp, agent, MIBs: Fix multiple buffer overflows + +commit 1d738930b09fa9ae651881ed38d94c61c3c88060 +Author: Bart Van Assche +Date: Sun Apr 16 07:28:35 2023 -0700 + + libsnmp: Fix a buffer overflow in the MIB parsing code + + Fix the following address sanitizer complaint: + + ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f4e612001a0 at pc 0x7f4e63c0a654 bp 0x7ffc98f7bb80 sp 0x7ffc98f7bb78 + WRITE of size 1 at 0x7f4e612001a0 thread T0 + #0 0x7f4e63c0a653 in get_token snmplib/parse.c:4835:13 + #1 0x7f4e63c0a4a2 in get_token snmplib/parse.c:4813:20 + #2 0x7f4e63c0a4a2 in get_token snmplib/parse.c:4813:20 + #3 0x7f4e63c0a4a2 in get_token snmplib/parse.c:4813:20 + #4 0x7f4e63c0a4a2 in get_token snmplib/parse.c:4813:20 + #5 0x7f4e63c0a4a2 in get_token snmplib/parse.c:4813:20 + #6 0x7f4e63c0a4a2 in get_token snmplib/parse.c:4813:20 + #7 0x7f4e63c2dbd2 in parse_ranges snmplib/parse.c:2282:20 + #8 0x7f4e63c29ffa in parse_asntype snmplib/parse.c:2462:27 + #9 0x7f4e63c1789f in parse snmplib/parse.c:4598:19 + #10 0x7f4e63c0497b in read_module_internal snmplib/parse.c:3942:18 + #11 0x7f4e63c0407b in netsnmp_read_module snmplib/parse.c:4041:14 + #12 0x7f4e63c0d5e1 in read_mib snmplib/parse.c:5044:12 + #13 0x55ec21ab37b1 in main testing/fulltests/unit-tests/T027read_mib_clib.c:35:1 + + Fixes: 34058af3990b ("*/*: replace horrible (char *)"string" with const specifiers in relevant functions.") + +commit f065858b75b7eb10a596a9e5ab0f638cf119209f +Author: Bart Van Assche +Date: Sun Apr 16 07:24:14 2023 -0700 + + libsnmp: Declare the get_token() input arguments const + +commit f503e1722960a3b75a86b96c9eb999c8cf5b7b19 +Author: Bart Van Assche +Date: Sun Apr 16 07:45:02 2023 -0700 + + libsnmp: Do not pass NULL pointers to memcmp() + +commit 3644e682f1ae4e0dc7ab0b33600ef0aead48a86a +Author: Bart Van Assche +Date: Sat Apr 15 16:26:09 2023 -0700 + + libsnmp: Make sure that the memcmp() arguments are not NULL + +commit 14150d3e4dbaccaeb347ca56200929735c6d7f51 +Author: Bart Van Assche +Date: Sat Apr 15 16:11:20 2023 -0700 + + testing/fulltests/unit-tests/T018read_config_capp.c: Fix a function declaration + + This patch fixes a clang compiler warning. + +commit fcb439310eb765c90f4a149116690a1e063a04ca +Author: Niels Baggesen +Date: Wed Apr 12 12:40:09 2023 +0200 + + Yet another round of #if HAVE_XXX fixes + + Some lines that did not follow my simplistic patterns for automatic patching. + +commit 2df051f3176c77eab6633fca87e0869e545d9945 +Author: Bart Van Assche +Date: Sat Apr 8 14:43:29 2023 -0700 + + Run autoreconf -ivf + + Autoconf version: 2.71 + Automake version: 1.16 + Libtool version: 2.4.6 + +commit e7a268a2ee453d2fa3a364a4bf605b0e6b2d3ae9 +Author: Niels Baggesen +Date: Thu Apr 6 13:39:58 2023 +0200 + + Update rfclist/Makefile.mib for new IP-TRAFFIC-FLOW-SECURITY-MIB and forgotten SNMP-SSH-TM-MIB + + +---------------------------------------------------------------------- + +Changes: V5.9.3 -> V5.9.4.pre2 + +commit cc275e9a0eaf639dbee2af934419cdcc3fd2881e +Author: Wes Hardaker +Date: Mon Apr 3 15:06:49 2023 -0700 + + autoconf update + +commit 428605d00fea8df9a7b8ca14d15ffbdc8b1d4c64 +Author: Wes Hardaker +Date: Mon Apr 3 14:54:04 2023 -0700 + + version bump and autoconf bump + +commit a739ce6740445d2d2991e2effa1f97c995f5ff0d +Author: Wes Hardaker +Date: Mon Apr 3 14:53:31 2023 -0700 + + version update for 5.9.4.pre2 + +commit fcd3b9c7e04398f2f3bfa686f8ff1141cbc1eaf9 +Author: Wes Hardaker +Date: Mon Apr 3 14:52:02 2023 -0700 + + new-key + +commit 9d1c6c02ef7db23e7e894436fcc5b25b758d88b9 +Author: Wes Hardaker +Date: Mon Apr 3 14:41:55 2023 -0700 + + changes + +commit 6c5bf52dac1ea53b302d523093572fea54cd5d16 +Author: Wes Hardaker +Date: Mon Apr 3 14:41:02 2023 -0700 + + autoconf update + +commit b4b5fa2f20d8d41f24e778aac0034678508ea71b +Author: Wes Hardaker +Date: Mon Apr 3 14:40:30 2023 -0700 + + changelog update + +commit 763e50c1ee89181b1337c2fbdae229884d9facc3 +Author: Wes Hardaker +Date: Mon Apr 3 13:53:02 2023 -0700 + + Version number update: 5.9.4.pre1 + +commit 5846d75426d79a4866411a8768e1effcc4aa808e +Author: Wes Hardaker +Date: Mon Apr 3 13:49:52 2023 -0700 + + revision bump + +commit 5840d13ad70607bce15b4ed5cf744a66fd8147c0 +Author: Wes Hardaker +Date: Mon Apr 3 13:46:24 2023 -0700 + + autoconf-update + +commit 3e918def0de65d5a70239df76588ef2d540c9fb0 +Author: Wes Hardaker +Date: Mon Apr 3 13:45:46 2023 -0700 + + bump autoconf version + +commit 1efe6dfbd1169550e0c4b625324b6de3702676b6 +Author: Wes Hardaker +Date: Mon Apr 3 13:40:49 2023 -0700 + + fix name from snmpbulkget -> snmpbulkwalk + +commit c4ed481ffcc64883f135578291c0c34f08415865 +Author: Niels Baggesen +Date: Thu Mar 30 12:25:21 2023 +0200 + + More "#if HAVE_xxx fixes. + My original script did not consider blanks between # and if/elif + +commit 36c2d1dbbb3503614ed5e339ad365411535c6d24 +Author: Niels Baggesen +Date: Thu Mar 9 15:15:14 2023 +0100 + + Change "#if HAVE_XXX" into "#ifdef HAVE_XXX" + + This fixes a bunch of -Wundef warnings. + + [ bvanassche: changed patch subject / restored consistency of the MSVC config + header files ] + +commit 28d127bc71b77220acd94d3cd8ae65f0580263f2 +Author: Bart Van Assche +Date: Wed Mar 8 16:28:04 2023 -0800 + + libsnmp: Remove the ERR_GET_FUNC() macro + + ERR_GET_FUNC() has been removed from the OpenSSL 3.0 headers. See also + https://github.com/net-snmp/net-snmp/issues/539. + + See also https://github.com/net-snmp/net-snmp/issues/539. + +commit baaf82808833ea6eaf254590f9e5cfcc02ef1b39 +Author: Niels Baggesen +Date: Mon Feb 27 21:59:16 2023 +0100 + + Fixes for OpenBSD 7 + +commit 906a1e8b92029564341f0768390a02203459561f +Author: Bart Van Assche +Date: Sat Feb 25 16:47:19 2023 -0800 + + configure: Add support for FreeBSD jails + + See also https://github.com/net-snmp/net-snmp/issues/280. + +commit b0f82764f4ab0b8c6d93378a9b5c2927f2b09509 +Author: Bart Van Assche +Date: Sat Feb 25 16:34:39 2023 -0800 + + Spelling: Change 'demon' into 'daemon' + + From https://en.wikipedia.org/wiki/Daemon_(computing): + + Many people equate the word "daemon" with the word "demon", implying some + kind of satanic connection between UNIX and the underworld. This is an + egregious misunderstanding. "Daemon" is actually a much older form of + "demon"; daemons have no particular bias towards good or evil, but rather + serve to help define a person's character or personality. The ancient + Greeks' concept of a "personal daemon" was similar to the modern concept of + a "guardian angel"-eudaemonia is the state of being helped or protected by a + kindly spirit. As a rule, UNIX systems seem to be infested with both daemons + and demons. + +commit 24b587b2481acfb878ede6c08bfbd581a21ad1d3 +Author: Bart Van Assche +Date: Thu Feb 23 13:25:52 2023 -0800 + + ci, Windows: Bump the OpenSSL version number + +commit 91673b10bac84230d8e4964abfab39d31a4e736f +Author: David Rothenberger +Date: Sat Mar 10 21:37:06 2018 +0000 + + Cygwin: Use ':' for the path separator + + [ bvanassche: edited subject and regenerated the configure script ] + +commit 2d1ab96c6b46843c593b54a15ff286fcfe9711a5 +Author: Niels Baggesen +Date: Thu Feb 23 11:37:55 2023 +0100 + + Updates for NetBSD 10 (now in Beta) + + Some of these inspired by (taken from) gthe NetBSD pkgsrc patches. + +commit f3c859515e916cdee899255df372a9045b63a82a +Author: Niels Baggesen +Date: Tue Jan 31 12:47:09 2023 +0100 + + mibs: Add missing REVISION clause to UCS-DNMP-mib + +commit a97098802ae027eb798ab33c6e56b709a870a473 +Author: Niels Baggesen +Date: Tue Jan 31 12:09:16 2023 +0100 + + mibs: IANAifType-MIB, IANA-ADDRESS-FAMILY-NUMBERS-MIB + + Update IANAifType-MIB, IANA-ADDRESS-FAMILY-NUMBERS-MIB to current + IANA versions. + +commit 7e9ec86c929033fc65dd531802ae987cdde04a2a +Author: Bart Van Assche +Date: Wed Dec 21 16:42:02 2022 -0800 + + win32/dist/build-binary.pl: Improve this script + + Use the MSYS gzip executable if gzip is not in the path. Change the OpenSSL + path from the OpenSSL 1 path into the OpenSSL 3 path. + +commit 65709b0b201b6890446e50485a77f27696d285c4 +Author: Bart Van Assche +Date: Wed Dec 21 17:08:52 2022 -0800 + + ci/perl.bat: Fix a syntax error + +commit 49816b48332567d54e1e4d8ce4ac4c42e6c71582 +Author: Peter Korsgaard +Date: Tue Dec 13 15:03:37 2022 +0100 + + ipaddress_ioctl.c: unbreak builds with IPv6 but no rtnetlink + + netsnmp_access_other_info_get() is only available on setups with rtnetlink, + so protect the caller with HAVE_LINUX_RTNETLINK_H as well to fix a linking + issue: + + ipaddress_ioctl.c:(.text+0x3be): undefined reference to `netsnmp_access_other_info_get' + + Signed-off-by: Peter Korsgaard + +commit 1d4d3c7045a1ba6eab28a0aee47b604d62481b68 +Author: Peter Korsgaard +Date: Tue Dec 13 12:41:04 2022 +0100 + + ipaddress_linux.c: unbreak builds without HAVE_LINUX_RTNETLINK_H + + Commit 89a7860829fdc618ef (IP-MIB: Fix the --disable-ipv6 build) moved + defines around to fix builds without IPv6 support, but accidently caused + netsnmp_access_other_info_get() to be visible even if HAVE_LINUX_RTNETLINK_H + isn't defined, leading to build issues: + + mibgroup/ip-mib/data_access/ipaddress_linux.c: In function ‘netsnmp_access_other_info_get’: + mibgroup/ip-mib/data_access/ipaddress_linux.c:439:28: error: field ‘n’ has incomplete type + struct nlmsghdr n; + ^ + mibgroup/ip-mib/data_access/ipaddress_linux.c:440:29: error: field ‘r’ has incomplete type + struct ifaddrmsg r; + ^ + mibgroup/ip-mib/data_access/ipaddress_linux.c:454:40: error: ‘NETLINK_ROUTE’ undeclared (first use in this function) + sd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + ^~~~~~~~~~~~~ + mibgroup/ip-mib/data_access/ipaddress_linux.c:454:40: note: each undeclared identifier is reported only once for each function it appears in + mibgroup/ip-mib/data_access/ipaddress_linux.c:461:22: warning: implicit declaration of function ‘NLMSG_LENGTH’; did you mean ‘CMSG_LEN’? [-Wimplicit-function-declaration] + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); + ^~~~~~~~~~~~ + CMSG_LEN + mibgroup/ip-mib/data_access/ipaddress_linux.c:461:42: error: invalid application of ‘sizeof’ to incomplete type ‘struct ifaddrmsg’ + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); + ^~~~~~ + + Fix it by also enclosing it within the RTNETLINK and IPV6 guards, similar to + netsnmp_access_ipaddress_extra_prefix_info(). Given that are already inside + an IPV6 conditional just above and below, simply reuse that for simplicity. + + Signed-off-by: Peter Korsgaard + +commit 15f9d7f7e5b90c9b419832ed8e6413feb6570d83 +Author: Bill Fenner +Date: Fri Nov 25 10:23:32 2022 -0800 + + Add test for NULL varbind set + +commit 7f4ac4051cc7fec6a5944661923acb95cec359c7 +Author: Bill Fenner +Date: Fri Nov 25 08:41:46 2022 -0800 + + apps: snmpset: allow SET with NULL varbind for testing + +commit 4589352dac3ae111c7621298cf231742209efd9b +Author: Bill Fenner +Date: Fri Nov 25 08:41:24 2022 -0800 + + snmp_agent: disallow SET with NULL varbind + +commit fd898757b47ba0eb0af204ae6f4283be82ab59b8 +Author: Bart Van Assche +Date: Wed Nov 16 19:54:38 2022 -0800 + + ci, Windows: Bump the OpenSSL version number + +commit f362b354ce993d7394bf77db41bb27cfe8d1e307 +Author: Sam James +Date: Thu Nov 17 00:20:04 2022 +0000 + + agent: fix -Wincompatible-function-pointer-types + + Clang 16 makes -Wincompatible-function-pointer-types an error by default. + + Fixes the following error: + ``` + mibgroup/if-mib/data_access/interface_linux.c:159:23: error: incompatible function pointer types assigning to 'void (*)(char *, ...) __attribute__((noreturn))' from 'void (char *, ...)' [-Wincompatible-function-pointer-types] + pci_access->error = netsnmp_pci_error; + ^ ~~~~~~~~~~~~~~~~~ + 1 error generated. + ``` + + Signed-off-by: Sam James + +commit fec0f9ee59d5d89c28d70bb35fad29a0013d048c +Author: Sam James +Date: Thu Nov 17 00:13:55 2022 +0000 + + agent/mibgroup: fix -Wstrict-prototypes + + Clang 16 warns on this. Fix it in preparation for C23. + + Signed-off-by: Sam James + [ bvanassche: minor formatting changes ] + +commit ddec5fa0ed1c76fde5eea9b974442faeec008526 +Author: Sam James +Date: Thu Nov 17 00:10:09 2022 +0000 + + configure.d: fix compatibility with Clang 16 + + Clang 16 makes -Wimplicit-function-declaration and -Wimplicit-int an error by + default. Unfortunately, this can lead to misconfiguration or miscompilation of + software as configure tests may then return the wrong result. + + We also fix -Wstrict-prototypes while here as it's easy to do and it prepares + us for C23. + + For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki + [2], or the (new) c-std-porting mailing list [3]. + + [0] https://lwn.net/Articles/913505/ + [1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 + [2] https://wiki.gentoo.org/wiki/Modern_C_porting + [3] hosted at lists.linux.dev. + + Bug: https://bugs.gentoo.org/879715 + Signed-off-by: Sam James + [ bvanassche: removed two header file guards ] + +commit d420ff6cd3a3bd8ae469fc2d6a0bafd523280794 +Author: Bart Van Assche +Date: Fri Nov 4 06:32:46 2022 -0700 + + CHANGES: libsnmp: Restore support for DNS names longer than 63 characters + + Fixes: 0b637fea62c7 ("libsnmp/transports: Introduce netsnmp_parse_ep_str()") + Fixes: https://github.com/net-snmp/net-snmp/issues/476 + +commit 923cb442bbef360de227fbca565710518b5ee8e5 +Author: Bart Van Assche +Date: Fri Nov 4 06:38:06 2022 -0700 + + CHANGES: libsnmp: Make the snmpIPBaseDomain.h header file private + + Before making backwards-incompatible changes in snmpIPBaseDomain.h, make this + header file private. This patch removes several symbols from the ABI. + +commit dffe26c0bd9a4f62dc9cd7b267fa7dded867ceee +Author: Bart Van Assche +Date: Thu Oct 6 11:14:01 2022 -0700 + + agent/mibgroup/ucd-snmp/pass_persist: Fix a regression in pass_persist SET handling + + Fixes: 9b9c0e287b4d ("MIBs: Use asprintf() instead of snprintf() to prevent truncation") + Fixes: https://github.com/net-snmp/net-snmp/issues/461 + +commit f494348b8e352845db787ea4eef256c012caf99c +Author: Bart Van Assche +Date: Tue Sep 13 15:41:29 2022 -0700 + + FreeBSD: Introduce a function for querying the reassembly timeout + +commit 0b243e508c38c9d989e4df51adc526c390939087 +Author: Gleb Smirnoff +Date: Sat Aug 20 12:26:08 2022 -0700 + + configure: Fix the TCPTV_NEEDS_HZ test + + In configure search for existing defines, and actually those defines + that we are later going to use in code - TCPTV_MIN, TCPTV_REXMTMAX. + TCPTV_SRTTDFLT is not existing in FreeBSD for a long time, hence this + check always failed, while it should not, and we were compiling wrong + code in mibII/tcp.c. Update comment removing old FreeBSD version, + leaving FreeBSD. + + Fixes #445 + + [ bvanassche: regenerated the configure script / edited the patch description ] + +commit f4e5175efbb95d2267cad7c15ab2edc58d73be66 +Author: Gleb Smirnoff +Date: Sat Aug 20 13:43:48 2022 -0700 + + agent: fix ipReasmTimeout on FreeBSD 14 + + FreeBSD 14 retired definition of PR_SLOWTIMO and to facilitate + SNMP daemons provides a value to retrieve IP fragment TTL at + runtime via sysctl. + +commit e2507e6bce249fe98f659b3d4ed43022757961ca +Author: Bart Van Assche +Date: Tue Jul 26 06:51:57 2022 -0700 + + Remove superfluous casts from free() calls + + This patch does not change any functionality. + +commit f4d4e4ec19e3eaf03bf47c62561461cb16249207 +Author: Bart Van Assche +Date: Tue Jul 26 06:55:28 2022 -0700 + + CHANGES: libsnmp: Remove the SNMP_SWIPE_MEM() macro + + Remove this macro since it is not used in the Net-SNMP code base. + +commit bc3ebfe12665d38b9b1496302a25089070fcf0e0 +Author: Bart Van Assche +Date: Sun Jul 24 18:14:51 2022 -0700 + + ci: Also build the disable-set, mini and read-only modes + + Leave out the minimalist mode for now since the minimalist build is broken. + +commit 51f315046a0bec13934930edde9c145b31bf7d53 +Author: Bart Van Assche +Date: Sun Jul 24 16:45:05 2022 -0700 + + agent/Makefile.in: Unbreak the --enable-minimalist build + + Build the features rules in the mibgroup directory before building the + features rules in the helpers directory. + + Fixes: 51128ad09507 ("agent/Makefile.in: Build the MIB module code once") + Fixes: https://github.com/net-snmp/net-snmp/issues/438 + +commit 53ea215ce2f02e392a188aee2ad1e34c05348fa2 +Author: Bart Van Assche +Date: Sun Jul 24 15:56:19 2022 -0700 + + Makefile.rules: Simplify the ftsubdirs code + + Other than adding two echo statements, this patch does not change any + functionality. + +commit 9714a9bdb717dac827920891569d894e3f3797c0 +Author: Bart Van Assche +Date: Sun Jul 24 15:36:52 2022 -0700 + + Makefile.in: Shorten the include path + + Leave out the Net-SNMP top directory and also the agent/mibgroup directory + from the include file path. + +commit fe52cb48caa0a1b7cb1ac92cddd232b4fb2c5120 +Author: Bart Van Assche +Date: Fri Jul 22 06:51:28 2022 -0700 + + NET-SNMP-EXTEND-MIB: Fix a buffer overflow + + Fixes: https://github.com/net-snmp/net-snmp/issues/437 + +commit 2e8e6086440269337cd37fbd8ac3efbd32b052c9 +Author: Bart Van Assche +Date: Tue Jul 5 09:21:26 2022 -0700 + + snmptrapd: Rework support for old MySQL versions + + Older versions of MySQL had to be initialized by calling MY_INIT() while + newer versions have to be initialized by calling mysql_init(). Only include + the old header files if mysql_init() is not supported. + + Fixes: https://github.com/net-snmp/net-snmp/issues/433 + +commit 11f4cf41fb84db5fc4873851faaca34cb93b9680 +Author: Bart Van Assche +Date: Wed Jul 6 19:03:44 2022 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit 20564b54eba953403ca83f36ce07a76e3ddeb393 +Author: Bart Van Assche +Date: Wed Jul 6 16:00:54 2022 -0700 + + ci: Ignore package installation failures + +commit 448bcbf0ccd1216b70ba7101cf24fa17fe3de25c +Author: Wes Hardaker +Date: Tue Jul 5 08:27:17 2022 -0700 + + increment 'libcurrent' + +commit 1048dd76799e2b7890844013e0fd55f5fdb80aa6 +Author: Bart Van Assche +Date: Mon Jul 4 17:45:27 2022 -0700 + + testing/fulltests/snmpv3/T050etimetest_capp: Suppress a set-but-not-used variable warning + +commit 0fb09cf24425e2f35a33cee744424d8e625feb66 +Author: Bart Van Assche +Date: Mon Jul 4 17:34:05 2022 -0700 + + .gitignore: Update + +commit 964d028dce7125391548d4790dac92e2d6767bdc +Author: Bart Van Assche +Date: Mon Jul 4 17:30:03 2022 -0700 + + ci: Move the code for rewriting /etc/hosts + + This patch fixes the following oss-fuzz warning: + + net-snmp/ci/install.sh: line 6: sudo: command not found + +commit e87d0066e36c89bd80e419be298cd8f414d4980c +Author: Bart Van Assche +Date: Mon Jul 4 17:05:40 2022 -0700 + + Python: Stop using the ... package + + This patch fixes the following warning: + + python/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives + from distutils.core import setup, Extension + +commit f1fa5c8b5404d449a7241def319c3b4ac325926b +Author: Bart Van Assche +Date: Mon Jul 4 16:57:22 2022 -0700 + + snmpps: Use #ifdef instead of #if to test HAVE_* macros + + This patch suppresses the following compiler warning: + + snmpps.c:70:5: warning: 'HAVE_NCURSES_CURSES_H' is not defined, evaluates to 0 [-Wundef] + +commit b883086e82d984d411f029e8fef777614867a1ff +Author: Bart Van Assche +Date: Sat Jul 2 16:25:22 2022 -0700 + + ci, Windows: Bump the OpenSSL version number + +---------------------------------------------------------------------- + +Changes: V5.9.3.rc1 -> V5.9.3 + +commit d6644ac380a3563b3bce8400d62c789604695447 +Author: Wes Hardaker +Date: Wed Jul 13 10:43:01 2022 -0700 + + drop rc + +commit 47d4972916e4cbbc5c8df65f1546c5e1b8632928 +Author: Wes Hardaker +Date: Wed Jul 13 10:42:39 2022 -0700 + + Version number update: 5.9.3 + +---------------------------------------------------------------------- + +Changes: V5.9.2 -> V5.9.3.rc1 + +commit ca067c485f06e330a0db13c88ad7321124a0b22a +Author: Wes Hardaker +Date: Wed Jul 6 07:39:29 2022 -0700 + + Release Candidate for V5-9-3-branch + +commit e672baf238ebb7e80b03d0191345f14afaf5a311 +Author: Wes Hardaker +Date: Wed Jul 6 07:39:27 2022 -0700 + + Version number update: 5.9.3.rc1 + +commit 035216c0fae83dd8e37b0e5b504d4f8b7076b56f +Author: Wes Hardaker +Date: Tue Jul 5 08:27:17 2022 -0700 + + increment 'libcurrent' + +---------------------------------------------------------------------- + +Changes: V5.9.2.rc2 -> V5.9.2 + +commit 1154e3cd9b280f39cc956d21327ff1abcefae4fd +Author: Wes Hardaker +Date: Thu Jun 30 16:38:13 2022 -0700 + + reopen 5.9 patches + +commit 9705b5f1414b3092934eb3879483dc3e831f7b7b +Author: Wes Hardaker +Date: Thu Jun 30 16:37:21 2022 -0700 + + Version number update: 5.9.2 + +---------------------------------------------------------------------- + +Changes: V5.9.2.rc1 -> V5.9.2.rc2 + +commit 1b7564a375c4e8b2ca2282a2a2ec5c9b19d6a4dc +Author: Wes Hardaker +Date: Wed Jun 22 15:01:30 2022 -0700 + + Version number update: 5.9.2.rc2 + +commit ce66eb97c17aa9a48bc079be7b65895266fa6775 +Author: Wes Hardaker +Date: Wed Jun 22 15:00:17 2022 -0700 + + updates to CHANGES/NEWS + +commit a8ea1e4aadc542aebda46a09258aec76f71b19e9 +Author: Bart Van Assche +Date: Sun Jun 12 20:00:34 2022 -0700 + + ci/perl.bat: Bump the Perl version + +commit 4022d51d5036bd4b0fb80c92d58e375bc51b0b96 +Author: Bart Van Assche +Date: Sun Jun 12 09:32:29 2022 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit ab410b3628b4aa8e8d51d72a03bcdba6fdfdcc7e +Author: Bart Van Assche +Date: Thu May 5 21:11:12 2022 -0700 + + configure: Regenerate with the correct version of autotools + + Fixes: 9e188ca935f3 ("Version number update: 5.9.2.rc1") + +---------------------------------------------------------------------- + +Changes: V5.9.2.rc2 -> V5.9.2 + +commit 1154e3cd9b280f39cc956d21327ff1abcefae4fd +Author: Wes Hardaker +Date: Thu Jun 30 16:38:13 2022 -0700 + + reopen 5.9 patches + +commit 9705b5f1414b3092934eb3879483dc3e831f7b7b +Author: Wes Hardaker +Date: Thu Jun 30 16:37:21 2022 -0700 + + Version number update: 5.9.2 + +---------------------------------------------------------------------- + +Changes: V5.9.2.rc1 -> V5.9.2.rc2 + +commit 1b7564a375c4e8b2ca2282a2a2ec5c9b19d6a4dc +Author: Wes Hardaker +Date: Wed Jun 22 15:01:30 2022 -0700 + + Version number update: 5.9.2.rc2 + +commit ce66eb97c17aa9a48bc079be7b65895266fa6775 +Author: Wes Hardaker +Date: Wed Jun 22 15:00:17 2022 -0700 + + updates to CHANGES/NEWS + +commit a8ea1e4aadc542aebda46a09258aec76f71b19e9 +Author: Bart Van Assche +Date: Sun Jun 12 20:00:34 2022 -0700 + + ci/perl.bat: Bump the Perl version + +commit 4022d51d5036bd4b0fb80c92d58e375bc51b0b96 +Author: Bart Van Assche +Date: Sun Jun 12 09:32:29 2022 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit ab410b3628b4aa8e8d51d72a03bcdba6fdfdcc7e +Author: Bart Van Assche +Date: Thu May 5 21:11:12 2022 -0700 + + configure: Regenerate with the correct version of autotools + + Fixes: 9e188ca935f3 ("Version number update: 5.9.2.rc1") + +---------------------------------------------------------------------- + +Changes: V5.9.2.pre1 -> V5.9.2.rc1 + +commit 88766d759bdf998d645fb09f050d4701dd39b2b2 +Author: Wes Hardaker +Date: Thu Apr 21 15:35:47 2022 -0700 + + Release Candidate for V5-9-patches + +commit 9e188ca935f3cc84110973decb7efb5be42989b9 +Author: Wes Hardaker +Date: Thu Apr 21 15:35:45 2022 -0700 + + Version number update: 5.9.2.rc1 + +commit 37dd47517ece80209f1eb0bd82235a7bd50a00c3 +Author: Stuart Henderson +Date: Tue Apr 12 09:59:55 2022 +0100 + + libsnmp: Don't try to install factory.h + + 87d45755edd made factory.h a private header, but snmplib/Makefile.in + continues to try to install it from include/net-snmp/library, resulting + in an error from "make install". + + Fixes: https://github.com/net-snmp/net-snmp/pull/417 + +commit 9adb432e1a23d3114e1074a0d0b088024a402108 +Author: Bart Van Assche +Date: Wed Apr 6 13:57:51 2022 -0700 + + ci, Windows: Bump the OpenSSL version number + +commit b33d6bbe72b26a5b2a8cced96178c6de1105181f +Author: Bart Van Assche +Date: Tue Apr 5 12:57:32 2022 -0700 + + python: Return 'None' instead of an object for GET requests of non-existing OIDs + + Fixes: https://github.com/net-snmp/net-snmp/issues/414 + +commit d3d939f27286bab91e7316c4fa6b9e224621ec0c +Author: Bart Van Assche +Date: Tue Apr 5 12:49:42 2022 -0700 + + python: Add a unit test for a non-existing OID + +---------------------------------------------------------------------- + +Changes: V5.9.1 -> V5.9.2.pre1 + +commit 8c55dc5fd5165017965abef158a343719eefde60 +Author: Wes Hardaker +Date: Tue Apr 5 08:46:11 2022 -0700 + + Version number update: 5.9.2.pre1 + +commit d9611b05980423f0cf0c72408681af8d3d44e969 +Author: Wes Hardaker +Date: Tue Apr 5 08:46:03 2022 -0700 + + version update for 5.9.2.pre1 + +commit 7d4289129d4bd6e6fae5dc4470d2a5953fa3281f +Author: lijog +Date: Fri Feb 25 20:58:52 2022 -0800 + + Solaris: Fix ifHighSpeed + + The ifHighSpeed value is not being fetched correctly for Solaris systems as + seen in the following example. For a 10Gbps interface, we see + + > snmpwalk -v 2c -c public localhost ifdescr + IF-MIB::ifDescr.2 = STRING: net0 + > snmpwalk -v 2c -c public localhost ifspeed + IF-MIB::ifSpeed.2 = Gauge32: 1410065408 + > snmpwalk -v 2c -c public localhost ifHighSpeed + IF-MIB::ifHighSpeed.1 = Gauge32: 127 + IF-MIB::ifHighSpeed.2 = Gauge32: 1410 + > dladm show-phys -Z + LINK ZONE MEDIA STATE SPEED DUPLEX DEVICE + net0 global Ethernet up 10000 full ixgbe0 + > kstat -p|grep speed + .... + ixgbe:0:phys:ifspeed 10000000000 //10Gbps + .. + + The expected output is 10000000000 expressed in Mbps, i.e 10000 + IF-MIB::ifSpeed.2 = Gauge32: 10000 + + The issue occurs as we are using an integer(Gauge) type to fetch the ifspeed + value and simply convert it into Mbps for the ifHighSpeed value, which will + fail for speeds > INT_MAX-1. + + From the net-snmp documentation at + http://www.net-snmp.org/docs/mibs/interfaces.html: "An estimate of the + interface's current bandwidth in bits per second. For interfaces which do + not vary in bandwidth or for those where no accurate estimation can be made, + this object should contain the nominal bandwidth. If the bandwidth of the + interface is greater than the maximum value reportable by this object then + this object should report its maximum value (4,294,967,295) and ifHighSpeed + must be used to report the interace's speed. For a sub-layer which has no + concept of bandwidth, this object should be zero." + + The fix will use a uint64 type for storing the ifspeed value, and will + display the ifspeed value as per the docs. + + Here's the output after applying the fix + > snmpwalk -c public -v 2c localhost ifSpeed + IF-MIB::ifSpeed.2 = Gauge32: 4294967295 + > snmpwalk -c public -v 2c localhost ifHighSpeed + IF-MIB::ifHighSpeed.2 = Gauge32: 10000 + + Fixes: https://github.com/net-snmp/net-snmp/pull/409 + [ bvanassche: reformatted commit message / combined four patches into one ] + +commit d45fe61a133449b6bc47f2d2b51f7636b7b343e0 +Author: Bart Van Assche +Date: Mon Jan 3 17:18:30 2022 -0800 + + snmptrap: Improve documentation of the 'AGENT' argument + + Fixes: https://github.com/net-snmp/net-snmp/issues/395 + +commit 28e3bb4f9ff78f32ee968d6d76c8a3c04b761abe +Author: Bart Van Assche +Date: Tue Dec 28 14:11:57 2021 -0800 + + libsnmp: snmpSTDDomain: Remove an exit() call + + Apparently calling exit() from a child process confuses oss-fuzz. Hence + remove the exit() call from the child process. This patch does not change + any functionality. + +commit 0ccf55e7e9c19c8e23bd94b19901ed8692423293 +Author: Bart Van Assche +Date: Tue Dec 28 14:03:18 2021 -0800 + + libsnmp: Fix a memory leak in an error path of parse_objectid() + + Link newly allocated nodes earlier such that these are freed from the + error path. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39320 + Fixes: 5201c852e0f6 ("Initial revision") + +commit 8c3a094fbe9ebe38ed762488082d52c6d4e04ddb +Author: Bart Van Assche +Date: Sat Dec 25 13:02:06 2021 -0800 + + configure: Use pkg-config to detect the OpenSSL dependencies + + Which libraries must be linked in addition to the ssl library depends on the + configuration of OpenSSL and on the platform. Hence use pkg-config to detect + these libraries if pkg-config is available. Provide a fallback if pkg-config + is not available. See also "compile fails with net-snmp-5.8 and openssl-1.1.1d" + (https://github.com/net-snmp/net-snmp/issues/25). + +commit 672e23a3f7a0f54961f9aa1e927f5064a0c1969e +Author: Giulio Benetti +Date: Wed Sep 12 20:16:39 2018 +0200 + + configure, static linking: Fix SSL checks + + During checking of DTLS_method, the stub program is linked only with -ssl + libssl.a lacks some function from -lcrypto: + RAND_*() + ERR_*() + BUF_MEM_*() + etc. + and -lz: + - inflate() + - deflate() + + Append -lcrypto and -lz to LIBS variable when checking DTLS_method. + + See also https://sourceforge.net/p/net-snmp/patches/1374/ . + + Signed-off-by: Giulio Benetti + [bvanassche: Edited subject / rewrote this patch] + +commit 72dee028836d233979e4563ce3c3d5e303e0e042 +Author: Bart Van Assche +Date: Mon Dec 20 09:23:48 2021 -0800 + + CHANGES: net-snmp-create-v3-user: Fix the snmpd.conf path + + @datadir@ is expanded in ${datarootdir} so datarootdir must be set before + @datadir@ is used. See also + https://github.com/net-snmp/net-snmp/pull/394 . + + Fixes: d784eb53f38a ("NEWS: misc: separate user management from net-snmp-config into new net-snmp-create-v3-user script") + +commit f5cc42798c996796ec04e38d67f5589153353bd8 +Author: Bart Van Assche +Date: Fri Dec 17 09:12:37 2021 -0800 + + ci/openssl.bat: Bump the OpenSSL version + +commit bd7394d5d266916d655b804e5b40bc0673030ccd +Author: Bart Van Assche +Date: Sun Dec 12 13:08:25 2021 -0800 + + CHANGES: Win32: winExtDLL: Load evntagnt.dll and lmmib2.dll by default + + Load those two DLLs except if these are excluded by e.g. -I-lmmib2.dll. + Work around generic errors for all OIDs with prefix .1.3.6.1.4.1.77. + +commit fc4591ff585f62b28af2d118b72d21a928381295 +Author: Bart Van Assche +Date: Sun Dec 12 13:42:45 2021 -0800 + + Improve Doxygen documentation + + Remove $(srcdir) since apparently it is no longer supported. Fix most + warnings about function headers reported by Doxygen 1.9.2. + +commit 7f1b973e90ab6736400f72c23f71e4b5ef7726ae +Author: Bart Van Assche +Date: Sun Dec 12 13:25:35 2021 -0800 + + libsnmp: Leave out superfluous parentheses from OID comparison functions + + Additionally, improve the Doxygen documentation. This patch does not change + any functionality. + +commit 07dc7379a0ca6e8a8ded03430cc423ae44022920 +Author: Bart Van Assche +Date: Sat Dec 11 14:35:45 2021 -0800 + + CHANGES: Win32: winExtDLL: Windows 10 improvements + + Load evntagnt.dll and lmmib2.dll on Windows 10. Skip OIDs for which it + is known that GETNEXT fails with "generic error". + +commit af3b5237962cb9b535c2ac8058d7817950776dad +Author: Bart Van Assche +Date: Sat Dec 11 14:35:21 2021 -0800 + + CHANGES: Win32: winExtDLL: Make long strings occupy a single line + + Make it easier to look up error messages in the source code by making long + strings occupy a single source code line. + +commit aaafd8c236033c06d3b59354a3236553f976771e +Author: Bart Van Assche +Date: Sat Dec 11 15:59:52 2021 -0800 + + CHANGES: Win32: winExtDLL: Fix multiple compiler warnings + +commit 51818e49b244fc9eed0edb6afcdae27f3e476d6a +Author: Bart Van Assche +Date: Sat Dec 11 14:26:03 2021 -0800 + + README.win32: Remove references to Cygwin + + Since Net-SNMP users use MinGW instead of Cygwin, remove the instructions + about how to build Net-SNMP for Cygwin. Additionally, mention that + Net-SNMP must be built in 32-bit mode to use winExtDLL and also that + snmp_mib must be excluded. + +commit 8e433146c79bb09a3daff012e609094ad5a83712 +Author: Bart Van Assche +Date: Fri Dec 10 20:37:36 2021 -0800 + + CHANGES: Win32: winExtDLL: Restore MIB-II support + + Commit 59b4d40f3970 ("CHANGES: Windows: Make winExtDLL work on 64-bit + Windows systems") caused snmpd to skip MIB-II on 64-bit systems. Revert + that change such that the Windows MIB-II implementation can be used on + Windows 10. See also: + * https://github.com/net-snmp/net-snmp/issues/383 + * https://github.com/net-snmp/net-snmp/issues/388 + + With this patch applied, I see the following output in a Windows VM: + $ /c/usr/bin/snmpwalk -v2c -cpublic localhost .1.3.6.1.2.1.2 + IF-MIB::ifNumber.0 = INTEGER: 9 + IF-MIB::ifIndex.1 = INTEGER: 1 + IF-MIB::ifIndex.2 = INTEGER: 2 + IF-MIB::ifIndex.3 = INTEGER: 3 + IF-MIB::ifIndex.4 = INTEGER: 4 + IF-MIB::ifIndex.5 = INTEGER: 5 + IF-MIB::ifIndex.6 = INTEGER: 6 + IF-MIB::ifIndex.7 = INTEGER: 7 + IF-MIB::ifIndex.8 = INTEGER: 8 + IF-MIB::ifIndex.9 = INTEGER: 9 + IF-MIB::ifDescr.1 = STRING: Software Loopback Interface 1 + IF-MIB::ifDescr.2 = STRING: Microsoft 6to4 Adapter + IF-MIB::ifDescr.3 = STRING: Microsoft Kernel Debug Network Adapter + IF-MIB::ifDescr.4 = STRING: Microsoft IP-HTTPS Platform Adapter + IF-MIB::ifDescr.5 = STRING: Intel(R) 82574L Gigabit Network Connection + IF-MIB::ifDescr.6 = STRING: Microsoft Teredo Tunneling Adapter + IF-MIB::ifDescr.7 = STRING: Intel(R) 82574L Gigabit Network Connection-WFP Native MAC Layer LightWeight Filter-0000 + IF-MIB::ifDescr.8 = STRING: Intel(R) 82574L Gigabit Network Connection-QoS Packet Scheduler-0000 + IF-MIB::ifDescr.9 = STRING: Intel(R) 82574L Gigabit Network Connection-WFP 802.3 MAC Layer LightWeight Filter-0000 + IF-MIB::ifType.1 = INTEGER: softwareLoopback(24) + IF-MIB::ifType.2 = INTEGER: tunnel(131) + IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6) + IF-MIB::ifType.4 = INTEGER: tunnel(131) + IF-MIB::ifType.5 = INTEGER: ethernetCsmacd(6) + IF-MIB::ifType.6 = INTEGER: tunnel(131) + IF-MIB::ifType.7 = INTEGER: ethernetCsmacd(6) + IF-MIB::ifType.8 = INTEGER: ethernetCsmacd(6) + IF-MIB::ifType.9 = INTEGER: ethernetCsmacd(6) + IF-MIB::ifMtu.1 = INTEGER: 1500 + IF-MIB::ifMtu.2 = INTEGER: 0 + IF-MIB::ifMtu.3 = INTEGER: 0 + IF-MIB::ifMtu.4 = INTEGER: 0 + IF-MIB::ifMtu.5 = INTEGER: 1500 + IF-MIB::ifMtu.6 = INTEGER: 0 + IF-MIB::ifMtu.7 = INTEGER: 1500 + IF-MIB::ifMtu.8 = INTEGER: 1500 + IF-MIB::ifMtu.9 = INTEGER: 1500 + IF-MIB::ifSpeed.1 = Gauge32: 1073741824 + IF-MIB::ifSpeed.2 = Gauge32: 0 + IF-MIB::ifSpeed.3 = Gauge32: 0 + IF-MIB::ifSpeed.4 = Gauge32: 0 + IF-MIB::ifSpeed.5 = Gauge32: 1000000000 + IF-MIB::ifSpeed.6 = Gauge32: 0 + IF-MIB::ifSpeed.7 = Gauge32: 1000000000 + IF-MIB::ifSpeed.8 = Gauge32: 1000000000 + IF-MIB::ifSpeed.9 = Gauge32: 1000000000 + IF-MIB::ifPhysAddress.1 = STRING: + IF-MIB::ifPhysAddress.2 = STRING: + IF-MIB::ifPhysAddress.3 = STRING: + IF-MIB::ifPhysAddress.4 = STRING: + IF-MIB::ifPhysAddress.5 = STRING: 52:54:0:bb:6f:2f + IF-MIB::ifPhysAddress.6 = STRING: + IF-MIB::ifPhysAddress.7 = STRING: 52:54:0:bb:6f:2f + IF-MIB::ifPhysAddress.8 = STRING: 52:54:0:bb:6f:2f + IF-MIB::ifPhysAddress.9 = STRING: 52:54:0:bb:6f:2f + IF-MIB::ifAdminStatus.1 = INTEGER: up(1) + IF-MIB::ifAdminStatus.2 = INTEGER: down(2) + IF-MIB::ifAdminStatus.3 = INTEGER: down(2) + IF-MIB::ifAdminStatus.4 = INTEGER: down(2) + IF-MIB::ifAdminStatus.5 = INTEGER: up(1) + IF-MIB::ifAdminStatus.6 = INTEGER: down(2) + IF-MIB::ifAdminStatus.7 = INTEGER: up(1) + IF-MIB::ifAdminStatus.8 = INTEGER: up(1) + IF-MIB::ifAdminStatus.9 = INTEGER: up(1) + IF-MIB::ifOperStatus.1 = INTEGER: up(1) + IF-MIB::ifOperStatus.2 = INTEGER: down(2) + IF-MIB::ifOperStatus.3 = INTEGER: down(2) + IF-MIB::ifOperStatus.4 = INTEGER: down(2) + IF-MIB::ifOperStatus.5 = INTEGER: up(1) + IF-MIB::ifOperStatus.6 = INTEGER: down(2) + IF-MIB::ifOperStatus.7 = INTEGER: up(1) + IF-MIB::ifOperStatus.8 = INTEGER: up(1) + IF-MIB::ifOperStatus.9 = INTEGER: up(1) + IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.2 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.3 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.4 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.5 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.6 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.7 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.8 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifLastChange.9 = Timeticks: (0) 0:00:00.00 + IF-MIB::ifInOctets.1 = Counter32: 0 + IF-MIB::ifInOctets.2 = Counter32: 0 + IF-MIB::ifInOctets.3 = Counter32: 0 + IF-MIB::ifInOctets.4 = Counter32: 0 + IF-MIB::ifInOctets.5 = Counter32: 3902284436 + IF-MIB::ifInOctets.6 = Counter32: 0 + IF-MIB::ifInOctets.7 = Counter32: 3902284436 + IF-MIB::ifInOctets.8 = Counter32: 3902284436 + IF-MIB::ifInOctets.9 = Counter32: 3902284436 + IF-MIB::ifInUcastPkts.1 = Counter32: 0 + IF-MIB::ifInUcastPkts.2 = Counter32: 0 + IF-MIB::ifInUcastPkts.3 = Counter32: 0 + IF-MIB::ifInUcastPkts.4 = Counter32: 0 + IF-MIB::ifInUcastPkts.5 = Counter32: 265150678 + IF-MIB::ifInUcastPkts.6 = Counter32: 0 + IF-MIB::ifInUcastPkts.7 = Counter32: 265150678 + IF-MIB::ifInUcastPkts.8 = Counter32: 265150678 + IF-MIB::ifInUcastPkts.9 = Counter32: 265150678 + IF-MIB::ifInNUcastPkts.1 = Counter32: 0 + IF-MIB::ifInNUcastPkts.2 = Counter32: 0 + IF-MIB::ifInNUcastPkts.3 = Counter32: 0 + IF-MIB::ifInNUcastPkts.4 = Counter32: 0 + IF-MIB::ifInNUcastPkts.5 = Counter32: 28 + IF-MIB::ifInNUcastPkts.6 = Counter32: 0 + IF-MIB::ifInNUcastPkts.7 = Counter32: 28 + IF-MIB::ifInNUcastPkts.8 = Counter32: 28 + IF-MIB::ifInNUcastPkts.9 = Counter32: 28 + IF-MIB::ifInDiscards.1 = Counter32: 0 + IF-MIB::ifInDiscards.2 = Counter32: 0 + IF-MIB::ifInDiscards.3 = Counter32: 0 + IF-MIB::ifInDiscards.4 = Counter32: 0 + IF-MIB::ifInDiscards.5 = Counter32: 0 + IF-MIB::ifInDiscards.6 = Counter32: 0 + IF-MIB::ifInDiscards.7 = Counter32: 0 + IF-MIB::ifInDiscards.8 = Counter32: 0 + IF-MIB::ifInDiscards.9 = Counter32: 0 + IF-MIB::ifInErrors.1 = Counter32: 0 + IF-MIB::ifInErrors.2 = Counter32: 0 + IF-MIB::ifInErrors.3 = Counter32: 0 + IF-MIB::ifInErrors.4 = Counter32: 0 + IF-MIB::ifInErrors.5 = Counter32: 0 + IF-MIB::ifInErrors.6 = Counter32: 0 + IF-MIB::ifInErrors.7 = Counter32: 0 + IF-MIB::ifInErrors.8 = Counter32: 0 + IF-MIB::ifInErrors.9 = Counter32: 0 + IF-MIB::ifInUnknownProtos.1 = Counter32: 0 + IF-MIB::ifInUnknownProtos.2 = Counter32: 0 + IF-MIB::ifInUnknownProtos.3 = Counter32: 0 + IF-MIB::ifInUnknownProtos.4 = Counter32: 0 + IF-MIB::ifInUnknownProtos.5 = Counter32: 0 + IF-MIB::ifInUnknownProtos.6 = Counter32: 0 + IF-MIB::ifInUnknownProtos.7 = Counter32: 0 + IF-MIB::ifInUnknownProtos.8 = Counter32: 0 + IF-MIB::ifInUnknownProtos.9 = Counter32: 0 + IF-MIB::ifOutOctets.1 = Counter32: 0 + IF-MIB::ifOutOctets.2 = Counter32: 0 + IF-MIB::ifOutOctets.3 = Counter32: 0 + IF-MIB::ifOutOctets.4 = Counter32: 0 + IF-MIB::ifOutOctets.5 = Counter32: 1952733666 + IF-MIB::ifOutOctets.6 = Counter32: 0 + IF-MIB::ifOutOctets.7 = Counter32: 1952733666 + IF-MIB::ifOutOctets.8 = Counter32: 1952733666 + IF-MIB::ifOutOctets.9 = Counter32: 1952733666 + IF-MIB::ifOutUcastPkts.1 = Counter32: 0 + IF-MIB::ifOutUcastPkts.2 = Counter32: 0 + IF-MIB::ifOutUcastPkts.3 = Counter32: 0 + IF-MIB::ifOutUcastPkts.4 = Counter32: 0 + IF-MIB::ifOutUcastPkts.5 = Counter32: 137686780 + IF-MIB::ifOutUcastPkts.6 = Counter32: 0 + IF-MIB::ifOutUcastPkts.7 = Counter32: 137686780 + IF-MIB::ifOutUcastPkts.8 = Counter32: 137686780 + IF-MIB::ifOutUcastPkts.9 = Counter32: 137686780 + IF-MIB::ifOutNUcastPkts.1 = Counter32: 0 + IF-MIB::ifOutNUcastPkts.2 = Counter32: 0 + IF-MIB::ifOutNUcastPkts.3 = Counter32: 0 + IF-MIB::ifOutNUcastPkts.4 = Counter32: 0 + IF-MIB::ifOutNUcastPkts.5 = Counter32: 115 + IF-MIB::ifOutNUcastPkts.6 = Counter32: 0 + IF-MIB::ifOutNUcastPkts.7 = Counter32: 115 + IF-MIB::ifOutNUcastPkts.8 = Counter32: 115 + IF-MIB::ifOutNUcastPkts.9 = Counter32: 115 + IF-MIB::ifOutDiscards.1 = Counter32: 0 + IF-MIB::ifOutDiscards.2 = Counter32: 0 + IF-MIB::ifOutDiscards.3 = Counter32: 0 + IF-MIB::ifOutDiscards.4 = Counter32: 0 + IF-MIB::ifOutDiscards.5 = Counter32: 0 + IF-MIB::ifOutDiscards.6 = Counter32: 0 + IF-MIB::ifOutDiscards.7 = Counter32: 0 + IF-MIB::ifOutDiscards.8 = Counter32: 0 + IF-MIB::ifOutDiscards.9 = Counter32: 0 + IF-MIB::ifOutErrors.1 = Counter32: 0 + IF-MIB::ifOutErrors.2 = Counter32: 0 + IF-MIB::ifOutErrors.3 = Counter32: 0 + IF-MIB::ifOutErrors.4 = Counter32: 0 + IF-MIB::ifOutErrors.5 = Counter32: 0 + IF-MIB::ifOutErrors.6 = Counter32: 0 + IF-MIB::ifOutErrors.7 = Counter32: 0 + IF-MIB::ifOutErrors.8 = Counter32: 0 + IF-MIB::ifOutErrors.9 = Counter32: 0 + IF-MIB::ifOutQLen.1 = Gauge32: 0 + IF-MIB::ifOutQLen.2 = Gauge32: 0 + IF-MIB::ifOutQLen.3 = Gauge32: 0 + IF-MIB::ifOutQLen.4 = Gauge32: 0 + IF-MIB::ifOutQLen.5 = Gauge32: 0 + IF-MIB::ifOutQLen.6 = Gauge32: 0 + IF-MIB::ifOutQLen.7 = Gauge32: 0 + IF-MIB::ifOutQLen.8 = Gauge32: 0 + IF-MIB::ifOutQLen.9 = Gauge32: 0 + IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.2 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.3 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.4 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.5 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.6 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.7 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.8 = OID: SNMPv2-SMI::zeroDotZero + IF-MIB::ifSpecific.9 = OID: SNMPv2-SMI::zeroDotZero + +commit 4abad4b6eed22c8bc54be9f6ad77d5abe14bac75 +Author: Bart Van Assche +Date: Fri Dec 10 20:58:56 2021 -0800 + + README.win32: Document how to install the SNMP service on Windows 10 + +commit 83c0a8f38dc8789f8cc0cef76af344a2c2f6b50b +Author: Bart Van Assche +Date: Fri Dec 3 20:37:42 2021 -0800 + + libsnmp: Prepare for using the recommended OpenSSL functions + + This patch does not change any functionality. + +commit 447e80b7f1c8ad9899f30afb8c7c31b232c79fb2 +Author: Bart Van Assche +Date: Fri Dec 3 20:36:58 2021 -0800 + + configure: Check for more OpenSSL functions + +commit fad66f9957fb2a19b711cf660b7f23d7410e47e6 +Author: Bart Van Assche +Date: Thu Dec 2 15:03:13 2021 -0800 + + Revert "libsnmp: Use the recommended OpenSSL functions" + + This reverts commit 0bb1243671fe9a1389d3c735100747982a1b3c3c. + Revert this commit because it breaks the regression tests. + +commit e87892b94ed90d17730730c2ead69b4e17a47ec2 +Author: Bart Van Assche +Date: Tue Nov 30 22:13:42 2021 -0800 + + configure: Restore support for compilers that do not support -Werror + + See also https://github.com/net-snmp/net-snmp/issues/376 . + +commit 0bb1243671fe9a1389d3c735100747982a1b3c3c +Author: Bart Van Assche +Date: Sun Nov 28 16:09:21 2021 -0800 + + libsnmp: Use the recommended OpenSSL functions + + See also https://github.com/net-snmp/net-snmp/issues/294 . + +commit 86231d18704a5560f217089a5c83a2bd9cfe2340 +Author: Bart Van Assche +Date: Sun Nov 28 21:09:08 2021 -0800 + + configure: Fix --disable-perl-cc-checks + + Instead of only skipping the PERLCC assignment, also skip the compiler + compatibility check. + + See also https://sourceforge.net/p/net-snmp/bugs/2885/ . + +commit 5b9515d0c7281f52a327e0e8d1144725a706e794 +Author: minfrin +Date: Tue Jan 5 23:17:14 2021 +0000 + + Add support for digests detected from ECC certificates + + Previously, the digest could be detected on RSA certificates only. This + patch adds detection for ECC certificates. + + [ bvanassche: changed _htmap2 into a two-dimensional array and renamed _htmap2 + back to _htmap ] + +commit f720ee7aed1ec26501db384d32bc8a29bb0f43d9 +Author: Bart Van Assche +Date: Tue Nov 9 21:15:37 2021 -0800 + + configure: #include before testing select() + + This should improve the detection of the type of the fifth argument of + select() on Solaris. + +commit 1a560274d0f440d5c604c36b2c32b36e2a3d9a28 +Author: David Korczynski +Date: Sat Nov 6 00:18:56 2021 +0000 + + libsnmp: Fix stack-based buffer underflow + + Ensure `strlen(defbuf)` is above zero before the code + `defbuf[strlen(defbuf) - 1] = 0;` + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40699 + + Signed-off-by: David Korczynski + +commit d26d9e4570e3c2a441c1fd700df5e8134c3ecd17 +Author: Wes Hardaker +Date: Tue Nov 9 07:52:32 2021 -0800 + + patch from Charles Polisher to fix the if syntax + +commit 17a1691b66b96ed7b5b863621966871bc66047e3 +Author: Bart Van Assche +Date: Wed Oct 27 21:04:21 2021 -0700 + + libsnmp: Unbreak the build if OpenSSL support is disabled + + Fixes: 9d7b9669a577 ("snmpd: Fix memory leaks in USM and DH algorithms") + +commit a4932f7987efc213ccb152d5d307111c49b63f17 +Author: Bart Van Assche +Date: Wed Oct 27 19:51:06 2021 -0700 + + ci: Also run the build-and-test action on pull requests + +commit 4fcb0b77c12936d63f462c936e31b02fed8efa59 +Author: Bart Van Assche +Date: Sun Oct 17 13:14:32 2021 -0700 + + RMON-MIB: Fix two compiler warnings + +commit fb361fd42247802c738885e026ceb22992cdf9cb +Author: Bart Van Assche +Date: Sun Oct 17 13:12:43 2021 -0700 + + libsnmp: Use tolower() directly + + From the ANSI C standard (1998): "If the argument is a character for which + isupper is true and there are one or more corresponding characters, as + specified by the current locale, for which islower is true, the tolower + function returns one of the corresponding characters (always the same one + for any giv en locale); otherwise, the argument is returned unchanged." + + Hence use tolower() directly. + +commit d0891c58f94520d302246534fcd97e41ec3f950f +Author: David Korczynski +Date: Thu Oct 14 11:37:13 2021 +0100 + + snmpd: Fix memory allocation + + Ensure memory allocation of more than 1 byte in case asp->vbcount is 0 + Further clarification of this is found here: + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39901#c1 + + This also fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39930 + + Signed-off-by: David Korczynski + +commit e49f81d24299f5196ac06b74ff54595f4fb7ed55 +Author: Bart Van Assche +Date: Wed Oct 13 20:05:48 2021 -0700 + + libsnmp: Fix a compiler warning + + Fix the following compiler warning: + + transports/snmpTLSBaseDomain.c: In function ‘_openssl_log_error’: + transports/snmpTLSBaseDomain.c:1194:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=] + 1194 | snmp_log(LOG_ERR, "%s (file %s, func %s, line %d)\n", + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1195 | ERR_error_string(numerical_reason, NULL), file, func, line); + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Fixes: b4ec52560170 ("libsnmp: Port to OpenSSL 1.1.1e") + +commit e8c5d07a501d1473db5c9ef90d695e2782f88708 +Author: Bart Van Assche +Date: Wed Oct 13 19:57:08 2021 -0700 + + libsnmp: Only include if it is available + + See also commit 9d7b9669a577 ("snmpd: Fix memory leaks in USM and DH + algorithms"). + +commit 9d7b9669a57757ba1b01d67cc0658b04002698be +Author: EZenderink +Date: Mon Sep 27 14:14:55 2021 +0200 + + snmpd: Fix memory leaks in USM and DH algorithms + + [ bvanassche: made small additional changes and edited the patch description ] + +commit 16be05e0cad51bd5b0e905066ea2092e574377fd +Author: lukas-wimmer <66684408+lukas-wimmer@users.noreply.github.com> +Date: Mon Oct 4 13:14:23 2021 +0200 + + libsnmp: Fix an openssl error ring segmentation fault + + Fixes: e498db9f886c ("CHANGES: moved transport code into a separate subdirectory in snmplib") + + [ bvanassche: combined two patches into one / edited patch description ] + +commit 167f3116cd552e71c4a746f3c63ddb710ec05332 +Author: Bart Van Assche +Date: Sun Oct 3 17:35:03 2021 -0700 + + SNMP-NOTIFICATION-MIB: Fix a crash during shutdown + + This patch fixes the following Valgrind complaint: + + Invalid read of size 8 + at 0x4CBE442: CONTAINER_CLEAR (container.c:505) + by 0x49FCE63: _container_free (snmpNotifyFilterTable_interface.c:1882) + by 0x49FCE63: _snmpNotifyFilterTable_container_shutdown (snmpNotifyFilterTable_interface.c:1939) + by 0x49FCE63: _snmpNotifyFilterTable_shutdown_interface (snmpNotifyFilterTable_interface.c:410) + by 0x49D2E4D: shutdown_table_snmpNotifyFilterTable (snmpNotifyFilterTable.c:125) + by 0x49D2E87: shutdown_snmpNotifyFilterTable (snmpNotifyFilterTable.c:72) + by 0x4A33291: _shutdown_mib_modules (mib_module_shutdown.h:52) + by 0x4C8931F: snmp_call_callbacks (callback.c:360) + by 0x4C58CA5: snmp_shutdown (snmp_api.c:977) + by 0x405203: main (snmpd.c:1087) + Address 0x64c6730 is 208 bytes inside a block of size 224 free'd + at 0x484317B: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) + by 0x4CBFC80: netsnmp_binary_array_release (container_binary_array.c:205) + by 0x4CBFD87: _ba_free (container_binary_array.c:690) + by 0x4CBE316: CONTAINER_FREE (container.c:484) + by 0x49D2125: shutdown_snmpNotifyFilterTable_data_storage (snmpNotifyFilterTable_data_storage.c:89) + by 0x4A33287: _shutdown_mib_modules (mib_module_shutdown.h:51) + by 0x4C8931F: snmp_call_callbacks (callback.c:360) + by 0x4C58CA5: snmp_shutdown (snmp_api.c:977) + by 0x405203: main (snmpd.c:1087) + Block was alloc'd at + at 0x48455EF: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) + by 0x4CBEACD: netsnmp_container_get_binary_array (container_binary_array.c:797) + by 0x4CBDC12: netsnmp_container_find (container.c:302) + by 0x49D2071: snmpNotifyFilter_storage_container_create (snmpNotifyFilterTable_data_storage.c:58) + by 0x49D20F3: init_snmpNotifyFilterTable_data_storage (snmpNotifyFilterTable_data_storage.c:75) + by 0x4A3457B: init_mib_modules (mib_module_inits.h:141) + by 0x404F89: main (snmpd.c:904) + +commit 1035c405bfd69dac7d09533d3d43608af732c655 +Author: Bart Van Assche +Date: Sun Oct 3 12:15:52 2021 -0700 + + mibs: Declare netsnmp_fsys_info pointers that are not modified const + + This patch does not change any functionality. + +commit 6db7d2ca701c54d08e7c959011af254e5f193883 +Author: Bart Van Assche +Date: Sun Oct 3 12:15:47 2021 -0700 + + fsys: Remove two superfluous assignments + + Null-terminating of the output argument of strlcpy() is not necessary since + strlcpy() guarantees null-termination. + +commit 2740eaee234104d6abae132f933ef381976862fe +Author: Bart Van Assche +Date: Sun Sep 19 15:46:33 2021 -0700 + + perl: Leave out -Wimplicit-fallthrough + + Leave out this compiler flag since it is not supported by older versions of + gcc. + +commit 19e75743173cb8d49d49fd685b8e0249e83cc820 +Author: Bart Van Assche +Date: Wed Sep 8 20:39:42 2021 -0700 + + libsnmp: Fix the build against OpenSSL 3.0 + + Fixes: https://github.com/net-snmp/net-snmp/issues/343 + +commit 1672d705202e0f758133707b3a291319bebfdc66 +Author: Bart Van Assche +Date: Tue Sep 7 20:07:42 2021 -0700 + + SNMP-NOTIFICATION-MIB: Fix filter lookup + + The notification filter information is stored in one container but during + filtering, a different container is being used to look for matching filters. + Change agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h + and agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c + to expose the data_storage method that creates the container (used when + actual filtering) so that this method can be used when creating the + container used to store the notification filters. + + Fixes: https://github.com/net-snmp/net-snmp/issues/342 + +commit 64a88cc2fdd3e6f4cb7a66d4c2846da97112494e +Author: Bart Van Assche +Date: Tue Sep 7 20:29:51 2021 -0700 + + libsnmp: Provide a default value for netsnmp_container.ncompare + + Fixes: https://github.com/net-snmp/net-snmp/issues/342 + +commit 94ca941e06bef157bf0e13251f8ca1471daa9393 +Author: Kaarle Ritvanen +Date: Fri Aug 27 14:21:45 2021 +0300 + + snmpd: always exit after displaying usage + + Currently, viewing the help text with -h results in snmpd being started + in the background, whereas this does not happen with --help. Similarly, + when an error is detected in command line syntax, the help text is + displayed but sometimes snmpd gets started anyway, depending on the + execution path. + + This patch makes snmpd consistently terminate whenever the usage + function gets called. It also removes the goto statements no longer + needed. + +commit 7330e3e3e08d9baff23332e764f9a53561939fff +Author: Bart Van Assche +Date: Thu Sep 2 21:06:54 2021 -0700 + + libsnmp: Log "Truncating integer value >32 bits" once + + Log this message once instead of every time sysUpTime and/or + hrSystemUptime are accessed after snmpd is running for more than 497 days. + + Fixes: https://github.com/net-snmp/net-snmp/issues/144 + +commit d7be3dd3329182c178975b3f005c17bb363baca2 +Author: Bart Van Assche +Date: Tue Aug 31 17:05:19 2021 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 3d9111050a9b5f72797700d84dc0c1cfb4bd3388 +Author: Bart Van Assche +Date: Tue Aug 31 16:08:36 2021 -0700 + + ci/net-snmp-configure: Make this script again compatible with Darwin + +commit a64fbaaa0e08d29e140014f6f51f338558d503c8 +Author: Bart Van Assche +Date: Tue Aug 31 15:46:24 2021 -0700 + + libsnmp: Use asprintf() instead of open-coding it + +commit 6090fbed3feea13c635348d67d6be6583b209bc6 +Author: Bart Van Assche +Date: Tue Aug 31 15:45:25 2021 -0700 + + libsnmp: Clear freed pointers + +commit 6506da8d78e9f53be7fda393deeb4eb0e321e4e1 +Author: Bart Van Assche +Date: Mon Aug 30 15:56:26 2021 -0700 + + libsnmp: Return early from alloc_node() if memory allocation fails + +commit ae0cea08e45427ce4e607538e1abf79a304bbca9 +Author: Bart Van Assche +Date: Mon Aug 30 15:49:58 2021 -0700 + + libsnmp: Simplify free_node() + + Remove the if-tests since free() accepts a NULL pointer. Remove a (char *) + cast since free() accepts an argument of type void *. + +commit 19ac11e17903aeb8afb64a15ca1a3584c97c54c3 +Author: Niels Baggesen +Date: Mon Aug 30 22:18:06 2021 +0200 + + Fix a spurious warning when running tests + +commit fdd0ab46b1fb84e4bcc188eca8e2cc5c6075e858 +Author: Niels Baggesen +Date: Mon Aug 30 22:07:54 2021 +0200 + + Fix build for NetBSD by adding kernel_netbsd + +commit 36168dc6a338c6fce2c02e76947b748fb74cc5ef +Author: Niels Baggesen +Date: Mon Aug 30 22:06:38 2021 +0200 + + apps/Makefile.in: add mysql libs to snmåptrapd link + +commit b7bd3636123497b908bf78d64aba229831ccfab2 +Author: Niels Baggesen +Date: Mon Aug 30 22:01:41 2021 +0200 + + mibs: updated IANAifType-MIB, IANA-ADDRESS-FAMILY-NUMBERS-MIB + +commit c3ac5ac59bd8f40aec6d383208a7cd0d52a868f6 +Author: Bart Van Assche +Date: Sun Aug 29 17:33:44 2021 -0700 + + apps/snmppcap: Do not cast away constness + +commit 00901cf770855826f187db76f27258e646c6fd2d +Author: Bart Van Assche +Date: Sun Aug 29 12:23:11 2021 -0700 + + ci/net-snmp-configure: Refine when to enable embedded Perl + + Only enable embedded Perl if Net-SNMP and the Perl interpreter are built with + the same compiler type. If different compilers are used and if embedded Perl + is enabled, the configure script reports the following: + + configure: error: This build is using a GNU C compiler (clang) while Perl + has been compiled with a non-GNU (or non-working) compiler + (x86_64-linux-gnu-gcc). This likely won't work for building with Perl + support. Either specify a different compiler (--with-cc=PATH), disable this + check (--disable-perl-cc-checks) or build without Perl + (--without-perl-modules). + +commit b9308221b1d0c1f77c8b2511e196376dc2870211 +Author: Bart Van Assche +Date: Sun Aug 29 09:25:06 2021 -0700 + + libsnmp: Fix more undefined behavior in asn_build_int() + + According to the C standard, triggering an overflow by shifting a signed + integer left results in undefined behavior. Fix this by inserting a cast. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37808 + +commit 416705ce8abf2d33f693d057d77aa5bc1b0fb364 +Author: Bart Van Assche +Date: Sat Aug 28 17:17:35 2021 -0700 + + ci: Disable the Python tests because these fail sporadically + +commit c21ad2b5b3b48d68b6973c1d768042e5417e92e0 +Author: Bart Van Assche +Date: Sat Aug 28 16:14:29 2021 -0700 + + ci/net-snmp-configure: Improve this script + + Introduce functions for retrieving the version of a software package. + Reenable the DISMAN expression MIB. Use the recommended approach to pass + $CFLAGS, $CPPFLAGS and $LDFLAGS to the configure script. + +commit 9fca293b2de46d3a734cd3d6e68611de6ac207a5 +Author: Bart Van Assche +Date: Fri Aug 27 10:33:46 2021 -0700 + + snmpd, IP-MIB, UCD-MIB: Remove superfluous string termination code + + Since snprintf(buf, sizeof(buf), ...) guarantees that the string written + into `buf` is '\0' terminated if sizeof(buf) >= 1, remove the following + statement if it occurs just past such a snprintf() statement: + + buf[sizeof(buf) - 1] = '\0'; + + See also + https://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html. + +commit 277d75633d8008cde468d026694289ca32f2cb6d +Author: Bart Van Assche +Date: Thu Aug 26 10:17:11 2021 -0700 + + libsnmp: Fix undefined behavior in asn_build_int() + + According to the C standard, triggering an overflow by shifting a signed + integer results in undefined behavior. Fix this by inserting a cast. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37579 + +commit d700c957f991912a63b9637720b716f6cf8696fd +Author: Bart Van Assche +Date: Thu Aug 26 10:14:31 2021 -0700 + + libsnmp: Fix a comment in asn_build_int() + +commit 85bff70932178ccd08b55112cadcb0e1bedb909d +Author: EZenderink <55834436+EZenderink@users.noreply.github.com> +Date: Wed Aug 18 17:27:01 2021 +0200 + + IF-MIB: Fix deprecated retrans_time syscall warning (and base_reachable_time) + + Remove the check which retrans_time and base_reachable_time interface is + available from `netsnmp_arch_interface_init`, which uses the "default" + network interface to determine which is available, but this network + interface is not always available (e.g. network namespaces). + + Determine at runtime which procfs file to read. + + [ bvanassche: Reformatted commit message and edited patch ] + +commit 9a0cd7c00947d5e1c6ceb54558d454f87c3b8341 +Author: Bill Fenner +Date: Tue Aug 24 07:55:00 2021 -0700 + + CHANGES: snmpd: recover SET status from delegated request + + Reported by: Yu Zhang of VARAS@IIE, Nanyu Zhong of VARAS@IIE + Fixes by: Arista Networks + + When a SET request includes a mix of delegated and + non-delegated requests (e.g., objects handled by master + agent and agentx sub-agent), the status can get lost while + waiting for the reply from the sub-agent. Recover the status + into the session from the requests even if it has already + been processed. + +commit 67ebb43e9038b2dae6e74ae8838b36fcc10fc937 +Author: Bill Fenner +Date: Wed Jun 30 14:00:28 2021 -0700 + + CHANGES: snmpd: fix bounds checking in NET-SNMP-AGENT-MIB, NET-SNMP-VACM-MIB, SNMP-VIEW-BASED-ACM-MIB, SNMP-USER-BASED-SM-MIB + + Reported by: Yu Zhang of VARAS@IIE, Nanyu Zhong of VARAS@IIE + Fixes by: Arista Networks + +commit 557fdffef0a9a8e1085bb84e613d7176180fff0b +Author: Bill Fenner +Date: Wed Jun 30 13:57:55 2021 -0700 + + snmppcap: add the ability to process packets like the agent + +commit 57ce1fb360db21e43b6ade25540a4080d68d5469 +Author: Bart Van Assche +Date: Sun Aug 22 20:23:13 2021 -0700 + + HOST-MIB: Remove four global variables + + Global variables make code harder to maintain than necessary. Hence remove + four global variables from the HOST-MIB implementation. + +commit d48428f47834c01e611b45df912941ad70d4f086 +Author: Bart Van Assche +Date: Sun Aug 22 20:22:51 2021 -0700 + + HOST-MIB: Reindent two functions + + Reindent two functions before modifying these. + +commit 6889d8af5830c1b4b017b9d43bbaf88e3b4cbf46 +Author: Bart Van Assche +Date: Sun Aug 22 14:36:26 2021 -0700 + + include/net-snmp/agent/hardware/fsys.h: Remove nonexistant functions + + Since neither netsnmp_fsys_get_byIdx() nor netsnmp_fsys_get_next_byIdx() are + defined inside the Net-SNMP codebase, remove their declarations. + +commit 24c519bf899b92049e19d84293929d0253cfb9e8 +Author: Bart Van Assche +Date: Fri Aug 20 15:36:45 2021 -0700 + + HOST-MIB: Do not store NULL pointers in _fsys_container + + If malloc() fails, return immediately instead of storing a NULL pointer in + _fsys_container. + +commit 5dd3b37a9d2fa02851cb989b51cf76272ab0bc1d +Author: Bart Van Assche +Date: Tue Aug 17 17:23:21 2021 -0700 + + net-snmp-configure: Respect the $CFLAGS environment variable + +commit 89a7860829fdc618efa223f9fc0549a9a122fcb3 +Author: Bart Van Assche +Date: Thu Aug 19 16:30:26 2021 -0700 + + IP-MIB: Fix the --disable-ipv6 build + + Fixes: https://github.com/net-snmp/net-snmp/issues/202 + +commit 50e36447179140fefddb957bbf9fc6aca7a81d39 +Author: Bart Van Assche +Date: Thu Aug 19 20:04:00 2021 -0700 + + IF-MIB: Add more comments + +commit d2822f221afbec9101b7926b88a95b235490f9d7 +Author: Bart Van Assche +Date: Tue Aug 17 09:05:46 2021 -0700 + + ci/build.sh: Show the $CC compiler path if $CC has been set + +commit 44db9e673687aa9455b969aea218f218ba4e688b +Author: Bart Van Assche +Date: Mon Aug 16 21:55:21 2021 -0700 + + ci/net-snmp-run-tests: Do not rerun configure + +commit faf345430c4fa23b7aa937b8848eaae9339914f2 +Author: Bart Van Assche +Date: Mon Aug 16 20:19:34 2021 -0700 + + ci/install.sh: Install pkg-config + +commit abbb0db992dd6a7278d93e144fcd599e9b706396 +Author: Bart Van Assche +Date: Mon Aug 16 19:25:11 2021 -0700 + + configure: Add LIBNLROUTE3_CFLAGS to the compiler flags + +commit 34fe22233a99774673fd0c1738ad8f0ca48fd349 +Author: Bart Van Assche +Date: Mon Aug 16 18:42:50 2021 -0700 + + ci/install.sh: Also install 'make' + +commit b7fd1d6fd872ca8379e8f63c51682043708b47fc +Author: Bart Van Assche +Date: Mon Aug 16 18:40:30 2021 -0700 + + ci: Move 'sudo' out of ci/install.sh + + This makes it possible to use the install script inside Docker containers + that do not support 'sudo'. + +commit f0b896767ac2b2452162d4c4e03824fa6fd2d597 +Author: Bart Van Assche +Date: Mon Aug 16 09:11:09 2021 -0700 + + ci: Rename before.sh into setup.sh + + The new name better reflects the purpose of this script. + +commit 5bf51b1798c9c707c18db25d9e95c30b2852835b +Author: Bart Van Assche +Date: Mon Aug 16 09:15:34 2021 -0700 + + ci: Add v5.9 branch to github workflow triggers + +commit 01d10ab33b39988dbe659fe7903eaf132d39f1ef +Author: Bart Van Assche +Date: Mon Aug 16 09:13:34 2021 -0700 + + ci: Copy github workflow from master branch + +commit 3a6a246260243f320a53ab57bba31086467e39e9 +Author: Bart Van Assche +Date: Mon Aug 16 08:57:33 2021 -0700 + + ci/before.sh: Add libnl-route-3-dev + +commit d80419d7f9bcc9c982b166fa2a9ed53daaaf48b6 +Author: Bart Van Assche +Date: Sun Aug 1 21:28:45 2021 -0700 + + IF-MIB: Split netsnmp_access_interface_ioctl_flags_get() + + This patch does not change any functionality. + +commit a688adf2d8ef6622e1d57011566b06431b90152e +Author: Bart Van Assche +Date: Sun Aug 1 20:23:58 2021 -0700 + + IF-MIB: Introduce netsnmp_convert_arphrd_type() + + This patch does not change any functionality. + +commit be78525370b26218a385d220f17e66ca3d8724b2 +Author: Bart Van Assche +Date: Sun Aug 1 13:38:24 2021 -0700 + + IF-MIB: Introduce netsnmp_derive_interface_id() + + This patch does not change any functionality. + +commit 8609bd42cdcbdea0bc52f8619f1338a7ed8537a5 +Author: Bart Van Assche +Date: Sun Aug 1 13:32:09 2021 -0700 + + IF-MIB: Introduce the function netsnmp_guess_interface_type() + + This patch does not change any functionality. + +commit 7aff0c50f6cdeeee626b8cc80f619ab53ee4cdd0 +Author: Bart Van Assche +Date: Sun Aug 1 13:34:38 2021 -0700 + + IF-MIB: Remove dead code + + The preprocessor macro APPLIED_PATCH_836390 is not defined. Hence remove + the code guarded by that macro. + +commit 971cae99db5ba9bf926f70c98dd139fbf7ec9dbd +Author: Bart Van Assche +Date: Sun Aug 15 12:19:48 2021 -0700 + + ci: Also install the libkrb5-dev and libncurses-dev packages + +commit 8872b39470509896a05c38bf35cf4ffafbaeacb0 +Author: Bart Van Assche +Date: Sat Aug 14 20:26:45 2021 -0700 + + ci/before.sh: Improve this script + + Add option -qq to apt-get to make it less noisy. Install libpcre3-dev. + Do not yet install libkrb5-dev because support for libkrb5 in the configure + script is broken. + +commit 3a2d729f6c6b36794379621a9e1f6964489444ce +Author: Bart Van Assche +Date: Sat Aug 14 20:11:05 2021 -0700 + + configure: Run autoconf + +commit 08d6868cc9d0785e861bc0670af3f9ec90fd64f4 +Author: Bart Van Assche +Date: Sat Aug 14 11:14:13 2021 -0700 + + testing: Add a read_mib() unit test + +commit c26ee3631ad964c3bfaf232efeb6f10bb89eead6 +Author: Bart Van Assche +Date: Sat Aug 14 11:37:32 2021 -0700 + + testing: Improve unit test T026read_config_clib.c + + Improve the messages that are reported while running this unit test. Remove + the file created by this test. + +commit b3353512d8e4c7dc26a0e37bb08c7089df2ee40f +Author: Bart Van Assche +Date: Mon Aug 9 16:28:58 2021 -0700 + + testing: Add a read_config() unit test + +commit 7e6b198840404294014fb0553dae25a5705bab1e +Author: Bart Van Assche +Date: Mon Aug 9 17:08:09 2021 -0700 + + libsnmp: Add more netsnmp_assert() statements + +commit 413b17eecd6af8e8247501805b5a366b709828bf +Author: Bart Van Assche +Date: Mon Aug 9 14:07:20 2021 -0700 + + libsnmp: Fix the getoid() error path + + Fixes: d0277ca1ccd6 ("libsnmp: Fix a memory leak in a MIB parser error path") + +commit 2cd0e7d72a76ba27a18315b9ae67e6ed6d2c464a +Author: Bart Van Assche +Date: Mon Aug 9 13:38:36 2021 -0700 + + IF-MIB: Add a trailing newline to an error message + + Fixes: 8bb544fbd2d6 ("Linux: IF-MIB: Fix a memory leak") + +commit 5ecd04c215f0cbe416434cb5ee0e36ec81a3a63f +Author: Bart Van Assche +Date: Sat Aug 7 11:23:30 2021 -0700 + + libsnmp: Fix a read-past-end-of-buffer + + Prevent that the code 'cp2 = cp + 1; *cp2' reads past the end of the input + buffer if the input buffer consists of one double quote. This patch should + fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36874. + +commit 359729bf94950df6e8a541570151683b0d5475ab +Author: Bart Van Assche +Date: Sat Aug 7 10:58:15 2021 -0700 + + libsnmp, cert_util: Fix a memory leak in an error path + + This leak was detected by Coverity. See also CID 372223. + +commit 42fe5ee281beba9793017018aa200a5183a8671e +Author: Bart Van Assche +Date: Sat Aug 7 10:55:40 2021 -0700 + + IP-MIB: Fix a use-after-free in an error path + + See also Coverity report 372225. + +commit d0277ca1ccd6ec8d786355a433717a9dbf41112e +Author: Bart Van Assche +Date: Sat Aug 7 08:32:03 2021 -0700 + + libsnmp: Fix a memory leak in a MIB parser error path + + This patch should fix + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36879. + +commit 20683e974b0cbacb4c2dbdc5d84d2b831f61b5db +Author: Bart Van Assche +Date: Sat Aug 7 08:25:51 2021 -0700 + + libsnmp: Remove a superfluous declaration + +commit 776ca4f9c9f599172dc83e488f5b603692319957 +Author: Bart Van Assche +Date: Fri Aug 6 20:16:32 2021 -0700 + + libsnmp: Include from + + This patch fixes a build issue on Alpine Linux. + +commit cf3a6c18b8fb0d558ce57bf19d13634ab7b31ea8 +Author: Bart Van Assche +Date: Fri Aug 6 19:38:23 2021 -0700 + + libsnmp/sd-daemon.c: Fix the Alpine Linux build + +commit 6fd24f2c42fbde05960759db03f2bca99071dcb2 +Author: Bart Van Assche +Date: Fri Aug 6 19:38:18 2021 -0700 + + DISMAN-MIB: Fix a compiler warning + +commit 2e9779aff0d18d891ffe5d77d8335798f80e29ca +Author: Bart Van Assche +Date: Thu Aug 5 21:09:04 2021 -0700 + + DISMAN-MIB: Fix the build on Alpine Linux + +commit 92ded667923c1efdb1c529d2cbed7f2a26485e8f +Author: Bart Van Assche +Date: Thu Aug 5 21:10:53 2021 -0700 + + DISMAN-MIB: Fix the build on Alpine Linux + + Include for the definition of HZ. + +commit f561a1f7149c677309beea720019f3e4e20a5ecf +Author: Bart Van Assche +Date: Thu Aug 5 21:09:33 2021 -0700 + + DISMAN-MIB: Include instead of + +commit ddc807b3407d1f2f86b6796f8698be4ea2a4c8e2 +Author: Bart Van Assche +Date: Thu Aug 5 21:07:47 2021 -0700 + + DISMAN-MIB: Include instead of + + According to POSIX should be included. + +commit 32f7cff5e30da41eed709544eab6deeb020e3540 +Author: Bart Van Assche +Date: Thu Aug 5 19:20:24 2021 -0700 + + libsnmp: Remove two casts from node_to_oid() + + This patch does not change any functionality. + +commit b3e032934ffd748b9d51716590c25aa6dcf90b33 +Author: Bart Van Assche +Date: Thu Aug 5 18:47:16 2021 -0700 + + HOST-RESOURCES-MIB: Add a trailing newline in a log message + +commit eadccb50810a1898288d29c768544fbd93b68c66 +Author: Bart Van Assche +Date: Thu Aug 5 19:11:46 2021 -0700 + + IF-MIB: Fix memory leaks in error paths + + Do not leak 'addr_container' if returning early. + +commit d4b58c60367a262d829eb33e7888d28cd4337481 +Author: Bart Van Assche +Date: Thu Aug 5 18:56:50 2021 -0700 + + IF-MIB: Fix a recently introduced use-after-free + + Do not free the netsnmp_interface_entry corresponding to the previous line + from /proc/dev/net if an interface disappeared. Additionally, reduce the + scope of the 'entry' variable. + + Fixes: 600c54135b10 ("IF-MIB, IP-FORWARD-MIB: Improve robustness") + +commit 74a51bc9e36cbfe96ffbf00ba20bbeea33a76cac +Author: Bart Van Assche +Date: Thu Aug 5 18:58:44 2021 -0700 + + IF-MIB: Fix source code indentation + +commit ba1d664f1712f5f90a6c74c1f62604787e5c0ea4 +Author: Bart Van Assche +Date: Thu Aug 5 18:44:02 2021 -0700 + + libsnmp: Disable the binary array consistency checks + + Disable the consistency checks added by the previous commit since the test + these were intended for has completed. See also + https://github.com/net-snmp/net-snmp/issues/107 . + +commit 1660027cf1d2b3068f05d3575fc5604766e1ade0 +Author: Bart Van Assche +Date: Wed Aug 4 20:03:43 2021 -0700 + + libsnmp: Verify container properties at runtime + +commit 1e2fd7a932503a43905df973630f013a6e5977e6 +Author: Bart Van Assche +Date: Wed Aug 4 19:50:15 2021 -0700 + + libsnmp: Improve the code for inserting in a binary array + + Only search for duplicates if duplicates are allowed. Fix a bug in the + code for detecting duplicates: also skip duplicates if the first element + matches (i == 0). + +commit 359bde7a04b84054029e21cbc9e6d84d42635659 +Author: Bart Van Assche +Date: Tue Aug 3 21:40:22 2021 -0700 + + testing: Improve the T012binary_array_oid unit test + +commit f85e82772565c76a71b683508d0cf49937d93fad +Author: Bart Van Assche +Date: Tue Aug 3 20:17:23 2021 -0700 + + IF-MIB: Remove a superfluous cast + +commit c125de54d1de991560bbbc19b0834c78f6390201 +Author: Bart Van Assche +Date: Tue Aug 3 20:12:46 2021 -0700 + + IF-MIB: Add an assert() statement + +commit 5fce79b8cafb5b9c56ce6ac9dd8b788a25c9b608 +Author: Bart Van Assche +Date: Tue Aug 3 21:22:11 2021 -0700 + + libsnmp: Fix the duplicate check in netsnmp_binary_array_insert() + +commit f1a8f8545a9d9a370487c196db230d5bc8f1adae +Author: Bart Van Assche +Date: Tue Aug 3 21:20:33 2021 -0700 + + libsnmp: Fix a bounds check in netsnmp_binary_array_insert_before() + +commit f205b3b285841328e81bb2cc62128b013b118162 +Author: Bart Van Assche +Date: Tue Aug 3 20:50:47 2021 -0700 + + libsnmp: Simplify the binary array linear search code + +commit e289bbe323543a912fafcb6d77cee761a4df88a8 +Author: Bart Van Assche +Date: Tue Aug 3 20:41:32 2021 -0700 + + libsnmp: Use qsort() instead of open-coding it + +commit 09975fff4c73ef288e772f883b4cb592287169ea +Author: Bart Van Assche +Date: Tue Aug 3 20:31:29 2021 -0700 + + libsnmp: Document and simplify netsnmp_binary_array_options_set() + +commit e46b9a126be956cdf372546fa0477694c1ae538a +Author: Bart Van Assche +Date: Tue Aug 3 19:39:44 2021 -0700 + + libsnmp: Fix the linked list _get() function + + If looking for an exact match in a sorted list, return NULL instead of the + next element if there is no exact match. Additionally, inverse the polarity + of the third argument of this function. + + Note: I'm not aware of any code inside the Net-SNMP project that is affected + by this change. + +commit 5067b47e6cf0e9f041774bca2cbd3218d9bbd47d +Author: Bart Van Assche +Date: Mon Aug 2 20:28:58 2021 -0700 + + ci: Enable the MacOS build + + Leave the tests disabled since these do not yet pass. + +commit a137fe6bd3eba4ecf477e1ee25cd5b78c2330a63 +Author: Bart Van Assche +Date: Mon Aug 2 20:06:52 2021 -0700 + + ci: Disable Ubuntu2004 + +commit 600c54135b1015d56070f702d878772dd9f0d51e +Author: Bart Van Assche +Date: Mon Aug 2 19:04:31 2021 -0700 + + IF-MIB, IP-FORWARD-MIB: Improve robustness + + It can happen that a network interface disappears after scanning has started + and before netsnmp_arch_interface_index_find() or another query function is + called. If that happens, ignore the network interface silently. + +commit 52d4e67b4162dbd5d5d18ab5f3e550074d3e67b8 +Author: Bart Van Assche +Date: Mon Aug 2 19:14:20 2021 -0700 + + IF-MIB: Do not log ioctl() failures + + The most common cause for the "ioctl %d returned -1" error message is that + the network interface disappeared. Since this is quite common on systems + that run e.g. Docker, do not log an error message in case an ioctl() failed + for a network interface. + +commit a9a140d2a550c3090845069955d45b75b4ad2a15 +Author: Bart Van Assche +Date: Mon Aug 2 19:35:51 2021 -0700 + + IF-MIB: Fix spelling in a debug message + +commit 8970ada022dbbcd2724cda315048eb15b0dda4aa +Author: Bart Van Assche +Date: Sun Aug 1 20:35:55 2021 -0700 + + configure: Run autoreconf + + Fixes: 6da5defc5369 ("configure: Only add -lpcre if --with_pcre != no") + +commit 585ac1c81e3ea4816c7bd7e8ed52060fcb3b4e90 +Author: Bart Van Assche +Date: Sat Jul 31 20:43:02 2021 -0700 + + IF-MIB: Make _add_new_interface() easier to read + + This patch does not change any functionality. + +commit cc234ac171cbd5e926c460e5e7c3d1f5ccb1d94d +Author: Bart Van Assche +Date: Sat Jul 31 19:18:46 2021 -0700 + + IF-MIB: Simplify ifTable_index_to_oid() + + Instead of storing the interface index in an SNMP variable and converting + that variable into an OID, convert the interface index directly into an + OID. This patch does not change any functionality. + +commit 31a59fd008220ddd417ba18a5653a1b11ffbddcf +Author: Bart Van Assche +Date: Sat Jul 31 19:08:42 2021 -0700 + + IF-MIB: Inline ifTable_indexes_set_tbl_idx() + + Inline this function since it is short and since it only has one caller. + +commit 8bb544fbd2d6986a9b73d3fab49235a4baa96c23 +Author: Bart Van Assche +Date: Sat Jul 31 16:21:16 2021 -0700 + + Linux: IF-MIB: Fix a memory leak + + The Linux kernel regenerates proc files in their entirety every time a 4 KiB + boundary is crossed. This can result in reading the same network interface + twice if network information changes while it is being read. Fix a memory + leak that can be triggered if /proc/net/dev changes while being read. + +commit 8da919e4ad66dec376f54a6d2f7dd7a7fe68b8f0 +Author: Bart Van Assche +Date: Sat Jul 31 16:01:11 2021 -0700 + + Linux: IF-MIB: Pass the network interface index to netsnmp_access_interface_entry_create() + + Instead of letting netsnmp_access_interface_entry_create() call + netsnmp_arch_interface_index_find() a second time, pass the network interface + index to that function. + +commit 55c68cacb7e84403f3c46c7ff4bd399ab9e87149 +Author: Bart Van Assche +Date: Sat Jul 31 10:25:47 2021 -0700 + + CHANGES: IF-MIB: Update ifTable entries even if the interface name has changed + + At least on Linux a network interface index may be reused for a network + interface with a different name. Hence this patch that enables replacing + network interface information even if the network interface name has changed. + +commit 2c963cd43b7ddb86dd6d1407e60fdbaf984d22f4 +Author: Bart Van Assche +Date: Sat Jul 31 14:29:31 2021 -0700 + + IF-MIB: Inline two functions + + Since the ifTable_rowreq_ctx_init() and ifTable_rowreq_ctx_cleanup() + implementations are short and since both functions only have one caller, + inline these functions. + +commit eecec3182ff3ded6603ca3c08685badde5675fdd +Author: Bart Van Assche +Date: Sat Jul 31 13:59:12 2021 -0700 + + IF-MIB: Add an assert statement + +commit 07819e00660b3382c5464db49a85d5fbd188da23 +Author: Bart Van Assche +Date: Sat Jul 31 12:09:06 2021 -0700 + + IF-MIB: Improve type safety + +commit 8ce7e6adad5a51294d139f5b8fb4a8aabe0329f8 +Author: Bart Van Assche +Date: Sat Jul 31 13:59:21 2021 -0700 + + IF-MIB: Make the ifTable_row_find_by_mib_index() code shorter + + This patch does not change any functionality. + +commit 2ad4be5703e73e53e715de26e96bea1cb9a259ae +Author: Bart Van Assche +Date: Sat Jul 31 10:31:06 2021 -0700 + + IF-MIB: Simplify netsnmp_access_interface_entry_free() + + Passing NULL to free() is allowed. Hence change if (x) free (x) into free(x). + +commit f1781a422aedf8a94af120d6a1262e2637192f1e +Author: Bart Van Assche +Date: Sat Jul 31 10:27:57 2021 -0700 + + IF-MIB: Simplify the netsnmp_access_interface_entry_copy() implementation + + This patch does not change any functionality. + +commit 0a0a9bd3c3abd991a6e980c97e2a984f4af0b025 +Author: Bart Van Assche +Date: Sat Jul 31 10:24:19 2021 -0700 + + IF-MIB: Remove a superfluous cast + +commit 7d33deab54da5ff54585f7d870fa0bd82606babb +Author: Bart Van Assche +Date: Sat Jul 31 13:12:33 2021 -0700 + + libsnmp: Declare more counter64 input arguments 'const' + +commit 9cf1f56fbda6410c290a932a0757e172598c6aa9 +Author: Bart Van Assche +Date: Sat Jul 24 19:40:54 2021 -0700 + + IF-MIB: Remove four function pointer casts + + This patch does not change any functionality. + +commit 280bf2b6eb870a1076105525e3a74f931431506f +Author: Bart Van Assche +Date: Sat Jul 24 19:59:52 2021 -0700 + + IF-MIB: Make _ifTable_initialize_interface() easier to read + + This patch does not change any functionality. + +commit 402bf358b8d8b8090525045960a0dd814a3b9c03 +Author: Bart Van Assche +Date: Sun Jul 25 17:20:37 2021 -0700 + + IF-MIB: Improve _check_interface_entry_for_updates() documentation + + Additionally, improve coding style conformance of + _check_interface_entry_for_updates(). + +commit a34a5f277bbcc6b994583df383ffc573ae5188f7 +Author: Bart Van Assche +Date: Sun Jul 25 13:35:18 2021 -0700 + + IF-MIB: Improve ifTable_container_load() documentation + +commit 9d8bc4790f231a0a172de41299c9d142a8aeadbb +Author: Bart Van Assche +Date: Sat Jul 24 20:24:44 2021 -0700 + + IF-MIB: Remove the cd_container typedef + + Make it explicit that cd_container is a struct by removing the typedef for + that data structure. + +commit 95264228088eeda47e0ede41945854404f11d78a +Author: Bart Van Assche +Date: Sat Jul 24 21:14:50 2021 -0700 + + IF-MIB: Insert a blank line in the source code + +commit fa240e457deddfb966e7df278b8a6e0789be0fef +Author: Bart Van Assche +Date: Sun Jul 25 19:32:31 2021 -0700 + + libsnmp, container_list_ssll: Simplify netsnmp_container_ssll_init() + + This patch does not change any functionality. + +commit 94f5ba19434b9ed05786b4e8f2e485dbdfc220b1 +Author: Bart Van Assche +Date: Sun Jul 25 19:35:12 2021 -0700 + + libsnmp: Change the type of the factory 'produce' function + + This patch does not change any functionality. + +commit 87d45755edd101bb8943ce1f6f28ca1436caa425 +Author: Bart Van Assche +Date: Sat Jul 24 21:31:55 2021 -0700 + + libsnmp: Make factory.h a private header file + + This makes it possible to remove unused declarations from the factory.h + header file. + +commit c6f144370f82d0f3e4f4360a30538b4ea97e1719 +Author: Bart Van Assche +Date: Sun Jul 25 13:12:54 2021 -0700 + + libsnmp: Document the purpose of netsnmp_container_find() + +commit 18bfcecc7cc79096c0a7e931bfbb51644c9e4aed +Author: Bart Van Assche +Date: Sun Jul 25 13:03:56 2021 -0700 + + libsnmp: Remove a cast + + This patch does not change any functionality. + +commit a6e88f17f30a283479bf2ff6db9cc5aac5d7bd34 +Author: Bart Van Assche +Date: Sun Jul 25 13:35:45 2021 -0700 + + treewide: Change 'invovles' into 'involves' + +commit 500d7638be37f3dfe3fbd525cd0ab12e6bf68208 +Author: Bart Van Assche +Date: Sat Jul 24 21:37:07 2021 -0700 + + treewide: Change 'allcoated' into 'allocated' + +commit 9f8d1b3bea2aa11ba4d0b53b18f6f42d8d978b96 +Author: Bart Van Assche +Date: Thu Apr 15 11:59:10 2021 -0700 + + UCD-SNMP-MIB: Remove the old disk implementation + + The old disk implementation has been superseded since 2011. Hence remove it. + +commit 6da5defc53697d4c342cf6193c92a55ee43d8abf +Author: Bart Van Assche +Date: Wed Jul 14 14:29:01 2021 -0700 + + configure: Only add -lpcre if --with_pcre != no + + Fixes: bbd53ed4a429 ("network pcre detection") + +commit e5ca544df5c98e92ca88b20ea59b2aff5d72b696 +Author: Natanael Copa +Date: Mon Jul 12 20:56:01 2021 +0200 + + MIBs: Use #ifdef instead of #if to test HAVE_* macros + + [ bvanassche: edited patch description ] + +commit f7acd99f64d08db935a81a605383655dade07966 +Author: Natanael Copa +Date: Mon Jul 12 20:49:03 2021 +0200 + + NET-SNMP-EXTEND-MIB: Fix set but not used compiler warning + + Fix the following error with -Werror: + + mibgroup/agent/extend.c:1590:25: error: variable 'exten' set but not used [-Werror=unused-but-set-variable] + 1590 | netsnmp_old_extend *exten = NULL; + | ^~~~~ + + [ bvanassche: modified patch description and modified patch ] + +commit 4b3711a9a058b1ed355e4469029dd022fd7d0681 +Author: Natanael Copa +Date: Mon Jul 12 20:29:45 2021 +0200 + + snmpd: Include for PATH_MAX + + Additionally, use #ifdef instead of #if to test whether a macro has been + defined. + + [ bvanassche: edited patch description ] + +commit 51128ad095074488992982fa23ae641f7c7be4ae +Author: Bart Van Assche +Date: Sun Jul 11 14:40:56 2021 -0700 + + agent/Makefile.in: Build the MIB module code once + + Fixes: 91033077790c ("remake make's Makefile's to make better making") + Signed-off-by: Srivalli231@github.com + [bvanassche: added patch description] + +commit 9620e5926aba5ff4fc1d3c2e150778c772b7d3da +Author: Sean Wei +Date: Fri Jul 9 17:03:05 2021 +0800 + + mib2c-update: Fix some shellcheck warnings + +commit 35586b9fcabf3349cbff945e7f999a1f3cda4fce +Author: Sean Wei +Date: Fri Jul 9 16:44:29 2021 +0800 + + mib2c-update: Fix misbehavior when the path includes space + +commit 1e3f5bde3e13d1378579f26e14671ac6e8bcc87f +Author: Bart Van Assche +Date: Mon Jul 5 11:44:18 2021 -0700 + + IP-MIB: Improve ipAddressTable SIGHUP support + + _init_ipAddressTable() is called after the configuration has been read. + Upon SIGHUP the configuration is reread and hence _init_ipAddressTable() + is called again. Prevent that the following message is reported upon SIGHUP: + + duplicate registration: MIB modules ipAddressTable and ipAddressTable + + See also https://github.com/net-snmp/net-snmp/issues/312 . + +commit 829445d1478bc86f627d019e4debf6df00dc9786 +Author: Bart Van Assche +Date: Mon Jul 5 20:11:43 2021 -0700 + + IF-MIB: Fix a source code comment + + Fixes: e772b8017d7e ("fix issue #99: read stored ifXTable config at startup") + +commit b54879bc0853cff90a8ab90bbe4ddbcd32dc3ef1 +Author: Bart Van Assche +Date: Mon Jul 5 17:28:30 2021 -0700 + + testing: Capture core dump messages and the snmpd/snmptrapd exit code + +commit e9f415db8e64787b316ec7527abf6e7a69ef2710 +Author: Bart Van Assche +Date: Mon Jul 5 11:28:08 2021 -0700 + + snmpd: Introduce snmpd_reconfig() + + This patch does not change any functionality. + +commit b80d4d7d4c78d39db500f84dff3e811aa9974031 +Author: Bart Van Assche +Date: Mon Jul 5 14:15:47 2021 -0700 + + SNMPv2-MIB: Shorten the agent/mibgroup/mibII/setSerialNo.c code + + This patch does not change any functionality. + +commit 080695397b7c9c9c0d016d30d476e9cc889ab439 +Author: Bart Van Assche +Date: Mon Jul 5 14:22:43 2021 -0700 + + libsnmp: Make the container comparison functions easier to read + + This patch does not change any functionality. + +commit 26e9971ed8b5003d512b6700561290ac64f2d579 +Author: Bart Van Assche +Date: Mon Jun 28 21:08:45 2021 -0700 + + ci: Install more Ubuntu packages and temporarily disable OS/X builds + +commit bdd5531bc4c349b8fcd1dffd4ea76e86378dccc2 +Author: Bart Van Assche +Date: Sun Jun 27 20:57:11 2021 -0700 + + libsnmp: Make the endianness detection code compatible with Solaris' cc + +commit 6bd559626e22d563ff7db80b0ec4d2e70a76c89c +Author: Bart Van Assche +Date: Sun Jun 27 09:55:37 2021 -0700 + + ci: Switch from Travis to AppVeyor + + Since June 15th, 2021, the building on travis-ci.org is ceased. Hence switch + to AppVeyor. + +commit afc185457f958f94e9076ea7ea39eaf2075f3850 +Author: Bart Van Assche +Date: Sun Jun 27 15:02:58 2021 -0700 + + snmpd: Do not leak the trap destination community string + + This patch fixes the following Valgrind complaint: + + 14 bytes in 2 blocks are definitely lost in loss record 20 of 322 + at 0x402F5ED: malloc (vg_replace_malloc.c:299) + by 0x4548965: strdup (in /lib/libc-2.27.so) + by 0x424D370: netsnmp_parse_args (in /lib/libnetsnmp.so.35.0.1) + by 0x4064519: snmpd_parse_config_trapsess (in /lib/libnetsnmpagent.so.35.0.1) + by 0x425287E: run_config_handler (in /lib/libnetsnmp.so.35.0.1) + by 0x42539DB: read_config (in /lib/libnetsnmp.so.35.0.1) + by 0x4253A5F: read_config_with_type_when (in /lib/libnetsnmp.so.35.0.1) + by 0x4253D67: read_configs_optional (in /lib/libnetsnmp.so.35.0.1) + by 0x4254642: read_configs (in /lib/libnetsnmp.so.35.0.1) + by 0x4245849: init_snmp (in /lib/libnetsnmp.so.35.0.1) + by 0x804A887: ??? (in /bin/snmpd) + by 0x44E6E50: (below main) (in /lib/libc-2.27.so) + + See also https://github.com/net-snmp/net-snmp/issues/300 . + + Fixes: 09f2cbaed980 ("libsnmp, netsnmp_parse_args(): Fix memory leaks in error paths") + +commit 0d58651b47337a910d4e1567a8ac2729a2b012fe +Author: Bart Van Assche +Date: Sun Jun 27 19:12:38 2021 -0700 + + UCD-SNMP proxy: Fix a memory leak + +commit 1ead68076cebf1aa438b575faf6ca06cbc6cbd58 +Author: Bart Van Assche +Date: Sun Jun 27 19:08:53 2021 -0700 + + UCD-SNMP proxy: Consolidate error paths in proxy_parse_config() + +commit f84d62d3b38251fa5e01c2cc95e12e139474e3c4 +Author: Bart Van Assche +Date: Sun Jun 27 09:44:53 2021 -0700 + + Darwin: MIB-II: Include mibII/kernel_sysctl for kernel versions >= 10 + + This patch breaks support for Darwin kernel versions < 10. If it ever would + be necessary to restore support for Darwin kernel versions < 10 that can be + done by modifying the agent/mibgroup/mibII/kernel_sysctl.c source file. + + Fixes: f01c45c53cdc ("Darwin: Unify system header files") + Fixes: https://github.com/net-snmp/net-snmp/issues/226 + +commit dbb49acfa2afb2539741d68403b8f9a49df93042 +Author: Ryan Schmidt +Date: Sat Sep 15 00:58:05 2018 -0500 + + Allow perl compiler name to contain periods + + Fixes: https://sourceforge.net/p/net-snmp/patches/1375/ + +commit a7aa206599fff95078b4e51e5b6d052d6e3e12db +Author: Bart Van Assche +Date: Tue Jun 22 19:58:27 2021 -0700 + + libsnmp: Remove a cast + + This cast was introduced by commit df863a5348aa ("Fix Bug #2427: Cannot + resolve IPv6 only hostnames, by accepting a list of transport domains.") + +commit 39390a0233e7ce5fdf94f67e832df3183b96a511 +Author: Bart Van Assche +Date: Tue Jun 22 13:48:52 2021 -0700 + + TCP-MIB: Fix several memory leaks + + See also https://github.com/net-snmp/net-snmp/issues/300 . + +commit 685d31a2baf564d992aedf9b210962e04c9ed78a +Author: Bart Van Assche +Date: Fri Jun 18 14:52:03 2021 -0700 + + Use #ifdef instead of #if to test HAVE_* macros + +commit f3f78e208fdf37be6f47595d5f99e592cc393390 +Author: Bart Van Assche +Date: Fri Jun 18 10:51:46 2021 -0700 + + libsnmp: Improve the netsnmp_getaddrinfo() debug output + + Display the hints passed to netsnmp_getaddrinfo() and show both IPv4 and + IPv6 addresses in the debug output. + +commit 5eea934e4a3fc77fbaf49566a8ef39d91a45f30e +Author: Bart Van Assche +Date: Fri Jun 18 10:10:13 2021 -0700 + + win32/build.pl: Improve the menu script further + + Change the default OpenSSL directory into the new default directory of the + OpenSSL installer. Remove the remaining references to the platform SDK. + +commit 2c6bf7556d78e7ed9c499bf2e9aed1223a93cb44 +Author: Bart Van Assche +Date: Thu Jun 17 09:42:53 2021 -0700 + + Windows, MSVC: Use getaddrinfo() + + This patch changes the minimum requirement for snmpd.exe built with MSVC + to Windows XP / Windows Server 2003. See also + https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo . + + See also https://github.com/net-snmp/net-snmp/issues/304 . + +commit 321ff9d75d3fe2c73665466f04d3c3b22fc517ed +Author: Bart Van Assche +Date: Thu Jun 17 09:41:56 2021 -0700 + + Revert "Windows, MSVC: Use getaddrinfo() if it is available" + + Reverts commit 6024a9e8613f because it is not sufficient to add IPv6 support + on Windows. + +commit 1942fe5b0f404335c7987702436d6a5d4a481acd +Author: Bart Van Assche +Date: Wed Jun 16 11:22:59 2021 -0700 + + Python: Use % NETSNMP_PRIo u instead of %lu + +commit 239d715336dbbc5640652895ee4e02882361e7ca +Author: Bart Van Assche +Date: Wed Jun 16 11:12:48 2021 -0700 + + Use #ifdef instead of #if to test HAVE_* macros + +commit 3fb026f068c3010b29c0be44998fae3d93feccbc +Author: Bart Van Assche +Date: Thu Jun 17 09:24:13 2021 -0700 + + win32/build.pl: Fix menu system + + Fixes: bbbf866c1c26 ("Windows: Always use the 'Platform SDK'") + +commit 428b834b34736d3182ad310eb1fb558de402ce66 +Author: Bart Van Assche +Date: Wed Jun 16 12:12:33 2021 -0700 + + ci: Remove Cygwin from continuous integration testing + + No Cygwin bug reports have been received in the past two years. Hence stop + supporting Cygwin. Windows users can use MinGW or MSVC instead. + +commit bbbf866c1c261615e71e52ad4cdfcac2504c92fb +Author: Bart Van Assche +Date: Tue Jun 15 20:06:47 2021 -0700 + + Windows: Always use the 'Platform SDK' + + The 'Platform SDK' is an optional download for Visual Studio 6, released in + 1998. Since that version of Visual Studio is no longer supported, remove the + corresponding menu option. + +commit 6024a9e8613facc0c8b62fc1abe2477910ff38dc +Author: Bart Van Assche +Date: Tue Jun 15 16:31:52 2021 -0700 + + Windows, MSVC: Use getaddrinfo() if it is available + +commit dbc89942439259d8990cdcccf227b97779ce5eb4 +Author: Bart Van Assche +Date: Mon Jun 14 14:54:58 2021 -0700 + + Windows: Support running build.bat from inside a Cygwin shell + +commit b31f31e248f065edc83f23768f081fb152318233 +Author: Bart Van Assche +Date: Sat Jun 12 14:15:11 2021 -0700 + + IP-FORWARD-MIB: Initialize mask.sin_port + + This was detected by Coverity. + +commit 8118c519b94c61865239a3f657f46ae622d943bc +Author: Bart Van Assche +Date: Sat Jun 12 14:05:58 2021 -0700 + + libsnmp: Fix a typo in the read_objid() documentation + + Additionally, remove a duplicate comment. + +commit b9d1d1345a799b4b08a313b18456e68330199888 +Author: Bart Van Assche +Date: Tue Jun 15 16:44:06 2021 -0700 + + Use #ifdef instead of #if to test HAVE_* macros + +commit e4d86779da4a6b8b2c7529297cb2e7a968ba19be +Author: Bart Van Assche +Date: Tue Jun 15 17:25:31 2021 -0700 + + Windows, MinGW: Fix the build of agent/mibgroup/hardware/fsys/hw_fsys.c + +commit f5116764b3db20599cef68dfa7a2841221e6f253 +Author: Bart Van Assche +Date: Tue Jun 15 17:18:47 2021 -0700 + + MIB-II: Do not test whether an unsigned variable is positive + +commit 8aa8b94a9871c698815c4e38986b0dfbfebdef0c +Author: Bart Van Assche +Date: Tue Jun 15 17:14:53 2021 -0700 + + snmpd: Reduce the scope of the variable 'ret' + + This patch suppresses the following compiler warning on Windows: + + snmpd.c:1172:38: warning: unused variable 'ret' [-Wunused-variable] + 1172 | int count, block, i, ret; + | ^~~ + +commit f1a32a5606e1c0794fbe770424e3f2859b608d91 +Author: Bart Van Assche +Date: Sat Jun 12 13:13:05 2021 -0700 + + Use #ifdef instead of #if to test HAVE_* macros + +commit ce75820dbca71487dbaa4038aac42443622be52b +Author: Bart Van Assche +Date: Sat Jun 12 13:23:42 2021 -0700 + + snmpd: Do not use HAVE_STDDEF_H + + The stddef.h header file is an ANSI C header file and HAVE_STDDEF_H is not + define. Hence, remove #if HAVE_STDDEF_H / #endif. + +commit 3feb2a75d20aac77712246d93b8afc6c21a46cd2 +Author: Bart Van Assche +Date: Sat Jun 12 13:41:54 2021 -0700 + + configure: Run autoreconf + + Fixes: fe43b05dac6f ("configure: Add -Wundef to the developer compiler flags") + +commit 5570ef925080551b665889d00325b1398983df7e +Author: Bart Van Assche +Date: Sat Jun 12 07:49:15 2021 -0700 + + libsnmp: Remove an obsolete comment + + Remove a comment that is obsolete since commit e2f9573849bd ("CHANGES: + snmplib: remove inline versions of container funcs"). + +commit 8b980841780102b1f925308d0b4f7f8b847c0666 +Author: Bart Van Assche +Date: Fri Jun 11 14:45:11 2021 -0700 + + snmptrapd: Reduce the scope of the 'uid' and 'gid' variables + +commit 9cb51252312ee0d3fcf65f8458fd1a2cb95f1e81 +Author: Christopher Wong +Date: Mon Jun 7 23:17:53 2021 +0200 + + Make snmptrapd accept a group name in addition to a numerical group ID + + snmptrapd only supports numerical gids. This behavior is different than + snmpd which accepts group names and numerical gits. Make snmptrapd + behavior consistent with that of snmpd. + + [ bvanassche: edited patch description ] + +commit 2c217277b6bec8a1b0c5172aaddd31e7c024e8aa +Author: Thomas Viehweger +Date: Fri Jun 11 21:46:29 2021 +0200 + + Fix inconsistent use of #if vs. #ifdef HAVE_PCRE_H + + HAVE_PCRE_H is undefined if could or should not be used. + Fix compiler warnings / errors if compiled with the compiler flags + -Wundef or -Werror=undef. + +commit c99b1a1c527085cefd6a7fa7a6c99fb7f43fcfb2 +Author: Bart Van Assche +Date: Wed Jun 9 14:58:01 2021 -0700 + + Python: Improve the unit tests + +commit 8c1dad23301692799749d75a3c039b8ae7c07f8e +Author: Bart Van Assche +Date: Wed Jun 9 14:19:46 2021 -0700 + + Python: Fix snmpwalk with UseNumeric=1 + + Fixes: c744be5ffed6 ("Python: Introduce build_python_varbind()") + Fixes: https://github.com/net-snmp/net-snmp/issues/303 + +commit 0ad796b13e5b4f09940cc125f041fac2364917c0 +Author: Bart Van Assche +Date: Wed Jun 9 14:27:42 2021 -0700 + + testing/RUNFULLTESTS: Fix an undefined value complaint + + Fixes: b6a9aa8938d9 ("testing/RUNFULLTESTS: Respect $LD_LIBRARY_PATH") + +commit aa7a51ce94ef3f4cf1d9e26c2c81b89bf4a59d02 +Author: Bart Van Assche +Date: Sat Jun 5 19:55:03 2021 -0700 + + Makefiles: Move @LD_NO_UNDEFINED@ + + Move @LD_NO_UNDEFINED@ from $(LIB_LD_CMD) invocations into the $(LIB_LD_CMD) + definition. This patch adds @LD_NO_UNDEFINED@ when linking libnetsnmptrapd. + +commit b6a9aa8938d999b70df9fd895702483eea9ee4f4 +Author: Bart Van Assche +Date: Thu Jun 3 21:00:56 2021 -0700 + + testing/RUNFULLTESTS: Respect $LD_LIBRARY_PATH + +commit 5522ccce502c2e30be952ea539c2fe4757ccf1ae +Author: Bart Van Assche +Date: Mon May 31 15:56:31 2021 -0700 + + UCD-SNMP-MIB: Reorder functions + +commit 19a6e90f0239903f1eba18056018523d89864802 +Author: Bart Van Assche +Date: Mon May 31 15:39:16 2021 -0700 + + UCD-SNMP-MIB: Simplify _expand_disk_array() + +commit 7aa03757ddf46c52290d385d2128e7cfa471af68 +Author: Bart Van Assche +Date: Mon May 31 15:34:50 2021 -0700 + + UCD-SNMP-MIB: Declare local variables 'static' + +commit ee51abd5523eafd773103714df9db735f46cde49 +Author: Bart Van Assche +Date: Mon May 31 15:30:23 2021 -0700 + + UCD-SNMP-MIB: Reindent agent/mibgroup/ucd-snmp/disk_hw.c + +commit fe43b05dac6fc94ec7e54ce027330e3ecea803f5 +Author: Bart Van Assche +Date: Mon May 31 14:51:27 2021 -0700 + + configure: Add -Wundef to the developer compiler flags + +commit 91afcd8a557e1dea57a44ce7f01dfec932994cca +Author: Thomas Viehweger +Date: Thu May 27 23:08:26 2021 +0200 + + Fix inconsistent use of #if vs. #ifdef NETSNMP_CAN_USE_SYSCTL + + NETSNMP_CAN_USE_SYSCTL could be undefined. Fix compiler warnings / errors + if compiled with the compiler flags -Wundef or -Werror=undef. + + [ bvanassche: edited commit message ] + +---------------------------------------------------------------------- + +Changes: V5.9.1.rc1 -> V5.9.1 + +commit 2eed7fe490bb6735a6c94b0cf03d9ff5d7884087 +Author: Wes Hardaker +Date: Tue May 25 14:49:51 2021 -0700 + + remove the RC flag + +commit d9d7b9b63b7b5c7be1b6de675b94f3f0ef7596ae +Author: Wes Hardaker +Date: Tue May 25 14:49:10 2021 -0700 + + Version number update: 5.9.1 + +---------------------------------------------------------------------- + +Changes: V5.9.1.pre1 -> V5.9.1.rc1 + +commit 05617ca6fd1d8355663de48280ade58d49050d33 +Author: Wes Hardaker +Date: Wed Apr 28 14:15:15 2021 -0700 + + Release Candidate for V5-9-patches + +commit c371b1d7aa174871367b2a5de23431cf7348f1a4 +Author: Wes Hardaker +Date: Wed Apr 28 14:15:13 2021 -0700 + + Version number update: 5.9.1.rc1 + +commit 5ceb3ebc2fe138d35a498f402254335baffecee5 +Author: Bart Van Assche +Date: Thu Apr 15 10:30:04 2021 -0700 + + ci/build.sh: Disable parallel compilation for minimalist mode + +commit f69daae8a958daa8b50e8767da216ef9570b2e6c +Author: Bart Van Assche +Date: Thu Apr 15 10:45:39 2021 -0700 + + Run 'make distdepend' + +commit 9f1d8188bae2990b42f8aef1c4f65dd18c1c1924 +Author: Bart Van Assche +Date: Thu Apr 15 09:29:30 2021 -0700 + + Makefile.rules: Retain only -D and -I options when regenerating dependencies + + The 'makedepend' command accepts the cc -D and -I options but not the other + options that may occur in $(CPPFLAGS) (-f, -g, -O, -pipe, ...). + +commit 9ea3d8b93c9bb7da7fea13ee6c92356a6b82a5fb +Author: Bart Van Assche +Date: Wed Apr 14 20:03:15 2021 -0700 + + Makefile.in: Make sure that 'sedscript' is built before subdirectories + + This is a follow-up for commit 855e1c28dad5 ("Makefile.in, agent/Makefile.in: + Fix parallel compilation"). + +commit 4fba346d04c26154098b917ad8769515e3766061 +Author: Bart Van Assche +Date: Wed Apr 14 17:50:59 2021 -0700 + + Windows: Unbreak the build + + Fixes: d6fac610cdea ("Fix the crash of snmpd when snmptrapd terminates the TCP connection.") + +commit 93ea661906fb25657a63cfd757ef7a04c4dd0b33 +Author: Bart Van Assche +Date: Wed Apr 14 16:12:43 2021 -0700 + + snmpd, FreeBSD 13: Make sure that filesystem statistics are up to date + + Make snmpd report the current statistics instead of statistics cached at + mount time by the operating system. + + Fixes: https://github.com/net-snmp/net-snmp/issues/282 + +commit bd5bc2df5d39a5c730a86f1c452b69f35841fdba +Author: Bart Van Assche +Date: Wed Apr 14 09:51:18 2021 -0700 + + ci/build.sh: Enable parallel compilation + +commit 855e1c28dad53d6263c6c0c302438d2dc3128cc5 +Author: Bart Van Assche +Date: Wed Apr 14 09:35:24 2021 -0700 + + Makefile.in, agent/Makefile.in: Fix parallel compilation + + See also https://github.com/net-snmp/net-snmp/issues/283 . + +commit ec9068cd270677860e5832bee791a40ec33e08b2 +Author: Bart Van Assche +Date: Tue Apr 13 08:59:13 2021 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 021d10edbf0c4b7754b994ad0e0ffb090f6dac32 +Author: Bart Van Assche +Date: Tue Apr 13 08:59:13 2021 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 6a77db5c7dc4e31afb6bca93c5394f224c55a179 +Author: Bart Van Assche +Date: Mon Apr 12 21:41:15 2021 -0700 + + UCD-SNMP-MIB: Let configure detect whether or not getmntinfo() is available + + +---------------------------------------------------------------------- + +Changes: V5.9 -> V5.9.1.pre1 + +commit f9312b44b71ddd247a98c6aff3e986d027e7eaa4 +Author: Wes Hardaker +Date: Mon Apr 5 16:31:47 2021 -0700 + + version update for 5.9.1.pre1 + +commit 3080795082e347504a3cd290f840b6b024d729df +Author: Wes Hardaker +Date: Mon Apr 5 16:30:09 2021 -0700 + + fix comment to C + +commit 0b886fc4d842f0f434606c4d35e610341cb650f7 +Author: Wes Hardaker +Date: Mon Apr 5 15:38:35 2021 -0700 + + Version number update: 5.9.1.pre1 + +commit b5429f6d8556f05100eadec681680df215a2d9e8 +Author: Wes Hardaker +Date: Mon Apr 5 15:38:24 2021 -0700 + + version update for 5.9.1.pre1 + +commit f36a9c4a747863d0c258a7a816381c9f15781f3c +Author: Tobias Deiminger +Date: Wed Oct 7 08:36:40 2020 +0200 + + Fix regex for "-l" discovery in setup.py + + This prevents setup.py from discovering wrong library link options (-l, -L) + in the middle of a word, like "inux-gnu" from "-L/usr/lib/x86_64-linux-gnu". + + For net-snmp-config output as follows (real world example from Ubuntu 18.04): + "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm" + the former regex "-l(\S+)" would match to + ['inux-gnu', 'netsnmp', 'crypto', 'm'] + which obviously results in a ld error "cannot find -linux-gnu". + + Now we capture a string only, if "-l" is at the beginning of a string, + or if "-l" is preceeded by any number of whitespace characters. + +commit c2db3407dd4dd1a288042b06967a35712004e093 +Author: Ferenc Wágner +Date: Mon Mar 15 18:00:48 2021 +0100 + + Enable systemd socket activation for UDP sockets + + Like it was possible for UNIX and TCP sockets beforehand. + +commit a9cf25db7e3e969dbcd9bda9a16457db6fc7210f +Author: Josef Řídký +Date: Mon Mar 15 09:23:41 2021 +0100 + + net-snmp-cert: Use sha512 as default option for generating certificates. + + Fixes: https://github.com/net-snmp/net-snmp/issues/231 + + [ bvanassche: edited commit message ] + +commit eb1b11bb7f3ac3281dc6e92d94e8fa749cac44e0 +Author: Josef Řídký +Date: Fri Mar 12 10:15:30 2021 +0100 + + Prevent parsing IP address twice (#199) + + This fixes issue, that is caused by parsing IP address twice. + First as IPv4 and as IPv6 at second, even thow the address was + properly parsed as a valid IPv4 address. + +commit dce7b17e7ce7b12954a8c799265d3001922bb0a1 +Author: Bart Van Assche +Date: Wed Mar 3 20:24:05 2021 -0800 + + ci/build.bat: Fix the Cygwin build + +commit dc58ed9990a1736b9b500a5e16e7517f93d194f4 +Author: Bart Van Assche +Date: Wed Mar 3 19:10:25 2021 -0800 + + net-snmp-create-v3-user: Print the version number once + + Print the version number once instead of keeping to print the version number + forever in an endless loop. + + Fixes: https://sourceforge.net/p/net-snmp/bugs/2778/ + +commit afa2034ca57b7986e91272b56274cebff5d8d69f +Author: Bart Van Assche +Date: Sat Feb 27 21:25:44 2021 -0800 + + ci/openssl.bat: Bump the OpenSSL version + +commit 8c301c1e06004aa4095f956bff5f399104e71127 +Author: Bart Van Assche +Date: Sat Feb 27 19:46:13 2021 -0800 + + IF-MIB: Do not scan for PCI devices if no PCI bus is available + + Fixes: https://github.com/net-snmp/net-snmp/issues/271 + +commit 385d555606ee31a23d5ed711a7ffba45f4197d50 +Author: Bart Van Assche +Date: Mon Feb 15 08:44:13 2021 -0800 + + Perl: Only use $prefix on Unix systems + + This patch reworks commit f64e0111ad10 ("Perl: Set the $prefix variable on + Windows"). + +commit f64e0111ad10b948aeadd386063a69ba5fc7fc7b +Author: Bart Van Assche +Date: Sat Feb 13 20:04:29 2021 -0800 + + Perl: Set the $prefix variable on Windows + + Fixes: https://github.com/net-snmp/net-snmp/issues/261 + +commit 428a486d92ca631d83f5bfc42c319f630b152bea +Author: Bart Van Assche +Date: Sat Feb 13 19:19:19 2021 -0800 + + Python: Use netsnmp_memdup() instead of open-coding it + +commit 6ad61e6628ecf1bde987c78de37674c4886a16b9 +Author: Bart Van Assche +Date: Sat Feb 13 19:35:57 2021 -0800 + + Python: Do not report "error: set: adding variable/value to PDU" when clearing an OCTETSTR + + Fixes: https://github.com/net-snmp/net-snmp/issues/265 + +commit ddd338fab038bf0ea25426d43518f4f24ac20853 +Author: Bart Van Assche +Date: Sat Feb 13 19:19:01 2021 -0800 + + python/netsnmp/tests/test.py: Add a test for setting an OCTETSTR + +commit f03582450d1eabae6df66b1fde5699a8e2a97b81 +Author: Bart Van Assche +Date: Sat Feb 13 11:02:37 2021 -0800 + + snmplib: Add more comments in netsnmp_random() + +commit b754da08461bd062632924fb773cb6f7c8c348d7 +Author: Bart Van Assche +Date: Sat Feb 13 09:24:12 2021 -0800 + + Enable the compiler flag -Wtype-limits + +commit b71b52f03398f2c42f100dd960009b824e6c306b +Author: Bart Van Assche +Date: Sat Feb 13 09:22:54 2021 -0800 + + Fix the -Wtype-limits compiler warnings + +commit a29685e5a35ff4a88b396e7952e59b53b9c24ebd +Author: Bart Van Assche +Date: Sat Feb 13 08:29:48 2021 -0800 + + configure: Only display the message "Checking for developer gcc flags" in developer mode + +commit 0dcebaf3d4b142638cd86de725ef23372495005f +Author: Bart Van Assche +Date: Fri Feb 12 20:55:42 2021 -0800 + + python/netsnmp/tests/test.py: Also perform a full MIB walk + +commit 8d8d8439d5d211ec1782d609e0ad67180c975d7b +Author: Bart Van Assche +Date: Fri Feb 12 19:49:18 2021 -0800 + + HOST-RESOURCES-MIB: Add JFFS2 support + + Fixes: https://github.com/net-snmp/net-snmp/issues/268 + +commit d468c8ad86c86ceb1807ccd51408594526940137 +Author: Bart Van Assche +Date: Fri Feb 12 19:35:44 2021 -0800 + + HOST-RESOURCES-MIB: Simplify the code for recognizing "other" filesystems + +commit 02bc1baf0d4f6031085e107a9cddc05dfbd74db2 +Author: Bart Van Assche +Date: Sun Jan 10 16:58:09 2021 -0800 + + snmpd: Exclude the /dev/kmem code if configured with --without-kmem-usage + + This is a follow-up for 9e933893751f ("snmpd: Exclude the /dev/kmem code if + configured with --without-kmem-usage"). + + Fixes: https://github.com/net-snmp/net-snmp/issues/251 + +commit 4d92f40112dd768d89a9f0a20cf743b18d951e45 +Author: Filip Jensen +Date: Tue Jan 5 16:57:43 2021 +0100 + + Fix compilation when feature NETSNMP_FEATURE_REMOVE_LOGGING_STDIO is used + +commit e3601420c8fce713924038901f824e57e6855e72 +Author: Bart Van Assche +Date: Mon Jan 4 13:01:47 2021 -0800 + + Revert "Read intermediate certificates from PEM files" + + This reverts commit 916110b15f28f8ae04598ad637ac26e4585ff385 and thereby + removes support for intermediate certificates from the v5.9 branch. + +commit 2b93ee55d1b9b32c86c3f725c59b8fd17912ae18 +Author: Bart Van Assche +Date: Mon Jan 4 13:01:42 2021 -0800 + + Revert "libsnmp: Fix a NULL pointer dereference in an error path" + + This reverts commit 99a72177c7c69c5ca1a5ecb68f5f2db7d971e97a. + +commit baef04f9c6fe0eb3ac74dd4d26a19264eeaf7fa1 +Author: Bart Van Assche +Date: Mon Jan 4 10:00:33 2021 -0800 + + testing/fulltests/unit-tests/T105trap_parse_clib: Add this test + + Add a reproducer for the bug fixed by the previous patch. + +commit 92f0fe9e0dc3cf7ab6e8cc94d7962df83d0ddbec +Author: Bart Van Assche +Date: Mon Jan 4 12:21:59 2021 -0800 + + libsnmp: Fix asn_parse_nlength() + + Handle length zero correctly. + + Fixes: https://github.com/net-snmp/net-snmp/issues/253 + Fixes: a9850f4445cf ("asn parse: add NULL checks, check length lengths") + +commit 1bf7c9c81d988e7945a34bea666ca3428c1ac127 +Author: Bart Van Assche +Date: Mon Jan 4 12:17:58 2021 -0800 + + libsnmp: Simplify _asn_short_err() + + Since snprintf() always '\0'-terminates the string it produces explicit + '\0'-termination is not necessary. + +commit 34c3b4ee104a1239c7bff7f6c80ca8b05b3bf17a +Author: Bart Van Assche +Date: Mon Jan 4 12:13:26 2021 -0800 + + libsnmp: Add SNMPv1 trap support in snmp_pdu_type() + + This change only affects error messages and debug messages. + + Fixes: 00ef569e00d1 ("Fix 5.5.x branch structure (part 2)") + +commit 9e933893751fb5b1b68c6efb844ef5d4b3a905e0 +Author: Bart Van Assche +Date: Sun Jan 3 13:42:59 2021 -0800 + + snmpd: Exclude the /dev/kmem code if configured with --without-kmem-usage + + See also https://github.com/net-snmp/net-snmp/issues/251 . + +commit 99a72177c7c69c5ca1a5ecb68f5f2db7d971e97a +Author: Bart Van Assche +Date: Wed Dec 30 13:03:30 2020 -0800 + + libsnmp: Fix a NULL pointer dereference in an error path + + This issue was detected by Coverity. + + Fixes: 916110b15f28 ("Read intermediate certificates from PEM files") + +commit 916110b15f28f8ae04598ad637ac26e4585ff385 +Author: minfrin +Date: Wed Dec 30 17:48:39 2020 +0000 + + Read intermediate certificates from PEM files + + This patch lifts the restriction that a PEM file can only contain + one certificate. This brings net-snmp in line with the behaviour + of other applications that use PEM files. + + Multiple certificates are read from each file, and the offset of + each certificate is added to the index for efficient retrieval. + + The first certificate in the chain is eligible to be either an + identity certificate or a remote certificate. Intermediate + certificates are ignored for this purpose, maintaining existing + behaviour with respect to peerCert and remoteCert. + + Trusted CA certificates are still required to be listed one per + file, this restriction will be lifted in a separate patch. + + [ bvanassche: modified this patch such that the size of struct + netsnmp_cert_common_s does not change ] + +commit e96087f1aa70583fe3142a2919fc3a69e62c53bb +Author: Bart Van Assche +Date: Wed Dec 30 10:52:30 2020 -0800 + + TLSTM-MIB: Remove an unused member variable + +commit 951fd2d9b07e29455ff0251b0f44ed76d935ff00 +Author: Bart Van Assche +Date: Tue Dec 29 15:22:42 2020 -0800 + + snmpd: Restore SNMPD_CALLBACK_SEND_TRAP[12] behavior + + Instead of only invoking the SNMPD_CALLBACK_SEND_TRAP[12] callbacks if one + or more sessions with the corresponding SNMP version exist, invoke these + callbacks unconditionally. + + Fixes: f770e0f74932 ("skip send_trap callbacks if no sessions for version") + Fixes: https://github.com/net-snmp/net-snmp/issues/247 + +commit 22f0630371231787f59522f4a3c4d1bb04594c66 +Author: Bart Van Assche +Date: Sat Dec 26 16:19:37 2020 -0800 + + ci: Overwrite /etc/hosts + + Overwrite /etc/hosts instead of using the /etc/hosts file provided by the + CI service. This should fix sporadic OS/X test failures. + +commit b3dd620161703a6ade14b5afe0e8f6fd63685a81 +Author: Bart Van Assche +Date: Sat Dec 26 16:07:34 2020 -0800 + + libsnmp, UDP: Only display VRF debug messages if relevant + + Only display a VRF debug message if a VRF interface has been specified. + + Fixes: 02de400544de ("libsnmp: Set Linux VRF iface on Trap sink IP addresses") + +commit ac06c5844105473e211decdf825af75dc7cd8b7c +Author: Bart Van Assche +Date: Fri Dec 25 17:19:35 2020 -0800 + + Perl: Rework the authentication / privacy algorithm lookup code + + Use the tables defined in snmplib/scapi.c instead of duplicating these tables. + +commit 6ea6935621a05c845e6829b18c833cdb9c7baa55 +Author: Bart Van Assche +Date: Fri Dec 25 17:19:45 2020 -0800 + + libsnmp: Constify the authentication and privacy data structures + + Prevent that scapi users modify data structures that should not be modified. + This patch modifies the Net-SNMP API but not the ABI. + +commit 92012951687cb18c8e58fede015e4bc0a9222e73 +Author: Bart Van Assche +Date: Sat Dec 26 09:25:33 2020 -0800 + + libsnmp: Export sc_find_auth_alg_byoid() and sc_find_auth_alg_bytype() + + Fix two typos in include/net-snmp/library/scapi.h. + + Fixes: 329a9d3c9d63 ("revamp auth/priv protocol constants handling") + +commit 4da46332f324eb5f18513d0e7e1368e529b29aef +Author: minfrin +Date: Tue Dec 22 12:03:22 2020 +0000 + + Add support for intermediate certificates + + After constructing a certificate chain, pass the chain to openssl so the chain + is taken into account while negoiating SSL. Required to support certificates + generated by a PKI, or by a CA like Let's Encrypt. + + Fixes: https://github.com/net-snmp/net-snmp/issues/241 + Fixes: https://github.com/net-snmp/net-snmp/issues/242 + + [ bvanassche: slightly edited commit message ] + +commit 969226ea501b92e1a2ed427bc1a46f18ef2890b7 +Author: Bart Van Assche +Date: Fri Dec 18 10:25:20 2020 -0800 + + libsnmp, _cert_get_extension(): Consolidate error paths + + This patch does not change any functionality. + +commit bb30f8ee0075750fd3648a6bf3fab543f46152ed +Author: minfrin +Date: Thu Dec 17 12:25:24 2020 +0000 + + libsnmp, SSL: Increase extension buffer size to prevent a crash + + Make sure enough space is allocated for extensions longer than 512 bytes. Fix + the error message when the extension is too long to clearly differentiate the + error from the out of memory case. Fix a crash when the extension is too long. + + [ bvanassche: edited patch description / fixed an off-by-one error / undid a + code formatting change ] + +commit 4c5d2ceae4d4a8b77db48fc8fff77e14943ff4d3 +Author: Bart Van Assche +Date: Wed Dec 16 19:36:55 2020 -0800 + + libsnmp: Handle certificate loading errors gracefully + + Instead of crashing (SIGSEGV), skip certificates if loading fails. + + Reported-by: https://github.com/minfrin + Fixes: https://github.com/net-snmp/net-snmp/issues/233 + +commit 9d001c34196df47526260441af35a509a325e41f +Author: Bart Van Assche +Date: Wed Dec 16 19:32:58 2020 -0800 + + libsnmp: Fix spelling in an error message + + Reported-by: https://github.com/minfrin + +commit bcc654e704f4794a9b10b8abf6e01f509402a6d3 +Author: Bart Van Assche +Date: Sun Dec 13 12:06:45 2020 -0800 + + Darwin, ARM: Fix the 64-bit build + + See also the following two commits: + * 632b143b0005 ("memory_darwin: Suppress a compiler warning") + * 8ae78da391d5 ("Use vm_region_64 on 64-bit arch; cache memory for longer") + +commit f82634a1ca4a24601cd966abe4062c35e376c9ab +Author: Bart Van Assche +Date: Sun Dec 13 09:58:28 2020 -0800 + + perl: Rework the authentication and privacy code + + Switch to a table-based approach. This patch does not change any functionality. + +commit cf125fee113ef9e361af51b916166990b5abeda2 +Author: garnier-quentin +Date: Tue Dec 8 16:10:46 2020 +0100 + + perl: Add support for strong SHA authentication + + [ bvanassche: edited commit message, combined three patches into one and left + out whitespace-only changes ] + +commit a7c8c26c48c954a19bca5fdc6ba285396610d7aa +Author: Mitchell Blank Jr +Date: Sun Dec 13 03:23:02 2020 +0000 + + Fix compiler warnings generated by configure scripts + + Specifically, this is meant to reduce risk of issues with Xcode 12 + which has made -Werror,-Wimplicit-function-declaration a default. + + Normally this doesn't bite "real" code since such a warning would be + visible for a long time with most compilers. However, inside of + configure scripts these sorts of warnings just end up in config.log + and usually get ignored. Now that they produce errors it means that + configure tests that *should* pass suddenly fail, causing very + strange failures later on. + + This can be as simple as calling "exit(0);" inside of a test C + program without doing "#include " first! + + I also fixed an implicit-int-return warning since that is another + C behavior that was deprecated long ago and future compilers might + consider that an error. + + [ bvanassche: reran autoconf ] + +commit cc3e0505f58d2c5d03be7a0b4c70afd01f7deb3c +Author: Bart Van Assche +Date: Sat Dec 12 18:41:45 2020 -0800 + + Windows: Yet another Visual Studio 2005 build fix + + Microsoft Visual Studio 2013 and before do not support __func__. Hence + use __FUNCTION__ instead of __func__ when building with Visual Studio. + + Reported-by: Christophe Cassignol + Fixes: 6066c6e21991 ("libsnmp, snmpv3_packet_build(): Avoid triggering a buffer overflow") + Fixes: 20725d58ca76 ("DTLSUDP transport: Check length of from address") + +commit 7137ee0b94ff5eab0682e5a63d5e9d6eb2b6fea9 +Author: Bart Van Assche +Date: Sat Dec 12 18:20:46 2020 -0800 + + ci/openssl.bat: Bump the OpenSSL version + +commit 3617459d1d204f3e595c794a2642bd9536c86245 +Author: Bart Van Assche +Date: Sat Dec 12 14:38:28 2020 -0800 + + Windows: Fix Visual Studio 2005 build + + Reported-by: Christophe Cassignol + Fixes: 193062739789 ("Net-SNMP headers: Move in_addr_t definition into ") + +commit 64bbd86fc13517c5021096acfbb23577bbd0f8a8 +Author: Bart Van Assche +Date: Mon Nov 30 19:41:27 2020 -0800 + + Python: Handle hex strings correctly + + See also https://github.com/net-snmp/net-snmp/issues/216 . + +commit c744be5ffed64f992a843e858a3cd2c1fe80f12f +Author: Bart Van Assche +Date: Tue Dec 1 20:19:17 2020 -0800 + + Python: Introduce build_python_varbind() + + This patch does not change any functionality. + +commit d519f4cf41c6b94661259409942fcdea46cf384d +Author: Bart Van Assche +Date: Tue Dec 1 19:27:55 2020 -0800 + + Python: Merge netsnmp_get() and netsnmp_getnext() into a single function + + This patch does not change any functionality. + +commit 281e6fc9454a785d9a4487d35146724dadcfbf62 +Author: Johnnyxy +Date: Thu Nov 19 17:43:13 2020 -0800 + + Win32, MSVC: Use if it is available + + See also https://github.com/net-snmp/net-snmp/issues/213 . + +commit a54c03aa0564e3aeb53712228522c2ba9b0f971f +Author: Bart Van Assche +Date: Wed Nov 18 21:05:13 2020 -0800 + + net-snmp-create-v3-user: Fix multiple shellcheck warnings + +commit 09a0c9005fb72102bf4f4499b28282f823e3e526 +Author: Josef Ridky +Date: Wed Nov 18 20:54:34 2020 -0800 + + net-snmp-create-v3-user: Handle empty passphrases correctly + + See also https://github.com/net-snmp/net-snmp/issues/86. + + Fixes: e5ad10de8e17 ("Quote provided encryption key in createUser line") + Reported-by: Chris Cheney + +commit ebe677ea1be61df6589a28a5b6306fe55f5784b2 +Author: Bart Van Assche +Date: Wed Nov 18 19:36:17 2020 -0800 + + CHANGES: snmpd: Fix OID handling in header_simple_table() + + Process GETNEXT for OIDs like 1.3.6.1.4.1.2021.9.1.1.4294967295 correctly. + Additionally, handle *length == 0 correctly. + + See also https://github.com/net-snmp/net-snmp/issues/210 . + +commit a8cb3591a924aeda1fd777f555da31ad8a627722 +Author: Josef Ridky +Date: Mon Nov 9 19:42:32 2020 -0800 + + IP-MIB: Improve handling of IPv6 support having been disabled intentionally + + See also https://github.com/net-snmp/net-snmp/issues/190 + [ bvanassche: modified variable names and source code comment ] + +commit 325b0df837197fd8f9af23eee838daae3ff80753 +Author: Bart Van Assche +Date: Fri Nov 6 20:45:07 2020 -0800 + + snmpd: Use sigprocmask() instead of sighold() and sigrelse() + + The latter two functions are obsolete, hence use sigprocmask() instead. + +commit 5a18e300bd085c6ba5967d7b00cc3f57fe83f665 +Author: Bart Van Assche +Date: Thu Oct 8 20:12:44 2020 -0700 + + HOST-RESOURCES-MIB: Add support for f2fs + + See also https://github.com/net-snmp/net-snmp/issues/111 . + +commit b1569c31514bf76fceb93f80c8b844101ee55e3a +Author: Pavel Trushkin +Date: Wed Sep 2 12:58:03 2020 +0300 + + fix the similar leak in SNMP::NODE::FETCH + +commit 581698a162b47b08f8571c7e1b8991df0764e5d3 +Author: Pavel Trushkin +Date: Wed Sep 2 12:47:07 2020 +0300 + + fix resource leaks in the SNMP::Session destructor and SNMP::NODE::FETCH + +commit 5adc5bbcec46eacf654ed92ed2431d0965076fa9 +Author: Guillem Jover +Date: Fri Apr 22 15:45:07 2016 +0200 + + Perl, agent: Make the perl agent code more tolerant of perl types + + The code is currently very strict, and does not accept several internal + perl representations for integer scalars. + + First we should use SvPOK instead of SvPOKp to accept anything that + looks like a string. And then we should also accept floating point + numbers because they might store integer or unsigned values. + +commit d59ae433af8b6d9051d149ca2a745fc845e7c82d +Author: Guillem Jover +Date: Fri Apr 22 15:45:07 2016 +0200 + + Perl, agent: Print the perl scalar flags on type mismatch in setValue + + This makes it easier to debug why a type mismatch happened, as we can + see how the type is represented internally by perl. + +commit 4d686f50d165f6b2b8fc79c9ae8f0a5702644fd8 +Author: Bart Van Assche +Date: Sun Sep 27 19:24:19 2020 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit b65fc0f848142543314329ca286fb90fc5f87773 +Author: Bart Van Assche +Date: Sun Sep 27 14:06:46 2020 -0700 + + configure: Update config.guess to the latest version + + Update config.guess to commit 4aa554d72b2a ("config.guess: Don't use + 'ldd --version' to determine the presence of musl libc") from + https://git.savannah.gnu.org/gitweb/?p=config.git to fix compatibility + with the aarch64 architecture. See also + https://github.com/net-snmp/net-snmp/issues/188. + +commit 62f024175a73c9b669f9bd8c7e75a65017622f3a +Author: urs-k <71150165+urs-k@users.noreply.github.com> +Date: Wed Sep 16 08:54:57 2020 +0200 + + snmpd: Fix a memory leak in ipAddressPrefixTable_data_access.c + + See also https://github.com/net-snmp/net-snmp/pull/183. + + [ bvanassche: adjusted commit message and reindented code ] + +commit b30e5b6c682e7095d61401461d9305dbfe99e914 +Author: Magnus Fromreide +Date: Fri Aug 14 00:39:34 2020 +0200 + + Do not require privacy in T0222 + +commit d1578077f41f232831b9b68fea2cc75f39569fe2 +Author: Magnus Fromreide +Date: Mon Sep 7 08:25:42 2020 +0200 + + Correct the name of the V5-9-patches branch + +commit 8fabe044e316f9ecda53148d9afeaf5e5854bb1a +Author: Bart Van Assche +Date: Sun Sep 6 14:21:52 2020 -0700 + + agent/mibgroup/util_funcs: Use posix_spawn() if fork() is not available + + This patch restores pass_persist support for operating systems that do + not support fork(), e.g. uClinux. The pass_persist support added by this + patch is much more useful than the implementation removed by commit + e55d56212b72 ("snmpd: Remove the uClinux code from get_exec_pipes()"). + The new implementation uses anonymous pipes while the old implementation + used named pipes with hardcoded paths (/flash/cp_%d and /flash/pc_%d). + +commit 537ae2f0b64f067d354db34a742a28260aa21aa1 +Author: Bart Van Assche +Date: Sun Sep 6 14:29:53 2020 -0700 + + agent/mibgroup/util_funcs: Use dup2() instead of dup() + + This patch makes the code easier to read but does not change any + functionality. + +commit e34f0793b641998eb4f9bedb4f7929bb0e3051b8 +Author: Bart Van Assche +Date: Sun Sep 6 15:13:58 2020 -0700 + + libsnmp: Allocate the module import list on the heap + + Since that list occupies 8 KiB, allocate it on the heap instead of on the + stack. + +commit ed4c8e85cb44e84ada5b8d2ff58e903de7ede737 +Author: Bart Van Assche +Date: Sun Sep 6 15:12:48 2020 -0700 + + libsnmp: Rework parse_imports() + + Do not cast pointers passed to free(). Reduce the number of return + statements in this function to one. Surround multiline statements with + braces. + +commit 52d4a465dcd92db004c34c1ad6a86fe36726e61b +Author: Bart Van Assche +Date: Fri Sep 4 13:44:51 2020 -0700 + + Darwin: Fix 'make install' + + Only attempt to install header files that exist under + include/net-snmp/system/ + + See also https://github.com/net-snmp/net-snmp/issues/181 . + + Fixes: f01c45c53cdc ("Darwin: Unify system header files") + +commit 687b8c894f0de93b12f16ab9d5d9635adea39a6f +Author: Bart Van Assche +Date: Fri Sep 4 15:11:22 2020 -0600 + + OpenBSD: Fix a build error and a compiler warning + +commit ee7c66cf856dcda14f6d1d1503b80c0535509bc3 +Author: Bart Van Assche +Date: Fri Sep 4 13:32:54 2020 -0700 + + OpenBSD: Do not use the linker flag -no-undefined + + This patch fixes a linker error on OpenBSD. + + See also https://github.com/net-snmp/net-snmp/issues/178 . + +commit 893b9baa6ae81a877e76842c29a637eeb2cbd0e2 +Author: Guido Jäkel +Date: Thu Sep 3 17:03:33 2020 +0200 + + libsnmp: Increase MAX_IMPORTS + + Today, I stepped into an well-known old issue + (https://sourceforge.net/p/net-snmp/mailman/message/16927159/) using MIBs + for a CISCO device. + + [bvanassche: edited commit message] + +commit 6093d4aee5cc81b8121458864d7e25fa7f46a7ba +Author: Bart Van Assche +Date: Mon Aug 31 20:46:21 2020 -0700 + + libsnmp: Handle malloc() failure correctly in snmp_parse_oid() + + See also https://github.com/net-snmp/net-snmp/issues/177 . + +commit 205c69a652d742d4914a4332ecc8915b52217719 +Author: mark123499 <32741576+mark123499@users.noreply.github.com> +Date: Thu Aug 27 15:19:11 2020 +0900 + + snmpd: avoid container double free in error cases + + Fixes: ad653fb4618d ("new data access files") + [ bvanassche: Added "Fixes" tag ] + +commit 5b8bf5d4130761c3374f9ad618e8a76bb75eb634 +Author: Yuwei Ba +Date: Fri Aug 21 15:06:10 2020 +0800 + + snmpd: support MemAvailable on Linux + + See also https://github.com/net-snmp/net-snmp/pull/167 . + + [bvanassche: modified the behavior of this patch] + +commit 410ddeff0b65937afd4bca6c7bfccc078fb5467d +Author: Bart Van Assche +Date: Fri Aug 28 20:28:04 2020 -0700 + + snmpd: Reindent agent/mibgroup/hardware/memory/hw_mem.c + + Source code formatting in this file is weird. Reformat this source + file with the help of the command mentioned in the CodingStyle file. + +commit f73dbd3998755fe141ba724445b0cb74df1939f4 +Author: Bart Van Assche +Date: Wed Aug 26 13:00:27 2020 -0700 + + libsnmp: Use snprintf() instead of sprintf() in print_tree_node() + + This patch suppresses certain static analyzer complaints. See also + https://github.com/net-snmp/net-snmp/issues/173 . + +commit b14ff16eee753b29ef7659b34a67af89acee22f7 +Author: Bart Van Assche +Date: Tue Aug 14 09:30:06 2018 -0700 + + snmplib, IPv6: Fix MSVC build + + Fixes: 4916ce007362 ("Fix Solaris compiler warnings") + Reported-by: Gisle Vanem + +commit c13b4349fad05caaa97e69924c020cb02139a367 +Author: Bart Van Assche +Date: Wed Aug 26 07:58:03 2020 -0700 + + Solaris: Fix a compiler warning + +commit 7f5b50d5c51572f59d4b8c799cc6a676b0f1340f +Author: Bart Van Assche +Date: Sun Jun 24 10:46:44 2018 -0700 + + Fix Solaris compiler warnings + + This patch does not change any functionality. + +commit adf7fda1f6b7123494875e8cd19b7445427b28ad +Author: Bart Van Assche +Date: Mon Aug 24 19:40:48 2020 -0700 + + snmpd, snmptrapd: Fix a bug in an error path of parse_cmd() + + Fixes: 11e119c802e5 ("snmpd, util_funcs: Introduce the parse_cmd() function") + +commit ec28fff5c0dede00767b50cebe8959369e6d7035 +Author: Bart Van Assche +Date: Mon Aug 24 15:07:02 2020 -0700 + + libsnmp: Fix handling of the minus character in mib configuration directives + + Change one occurrence of 'confmibdir' into 'confmibs'. It seems like the + original code is the result of a copy/paste error. See also + https://github.com/net-snmp/net-snmp/issues/170. + + Fixes: 4253c5431631 ("make mibs, mibdirs and mibfiles handling consistent") + +commit f43a7213badf0b4014bb744021199fb2a127efff +Author: Bart Van Assche +Date: Mon Aug 24 06:58:04 2020 -0700 + + snmpd, snmptrapd: Let configure check whether getdtablesize() is available + + This patch fixes the Net-SNMP build for termux. + + See also https://github.com/net-snmp/net-snmp/issues/155. + +commit 6bf543981b59f0048c640203b620c49db4c97d09 +Merge: 29a707be5 7266ff58d +Author: Bart Van Assche +Date: Sat Aug 22 15:15:53 2020 -0700 + + Merge branch 'V5-8-patches' into V5-9-patches + + * V5-8-patches: + Windows: Unbreak the MSVC build of agent/mibgroup/agent/extend.c + +commit 29a707be54d1df5b90ac1a5bc72ae919b015e63d +Author: Bart Van Assche +Date: Sat Aug 22 15:09:55 2020 -0700 + + dist/svnup: Remove this script because is no longer needed + +commit b04033209dc4ab9bdb4dffaf09b553438ac41797 +Author: Bart Van Assche +Date: Sat Aug 22 10:46:01 2020 -0700 + + dist/net-snmp.spec: Improve the Net-SNMP RPM spec file + + Use the local Net-SNMP source code archive instead of downloading it from + SourceForge. Only prefix the version number with %{epoch}: on RHEL / Fedora + systems. Package the pkg-config files (.pc). Fix multiple rpmbuild warnings. + +commit 582b77e038ec63592a0a3e8b6bed069481e5776f +Author: Bart Van Assche +Date: Sat Aug 22 10:34:41 2020 -0700 + + Makefile.in: Add 'rpm' make target + +commit efd048bc43bd99b756a984a16e735395cac22e4a +Author: Bart Van Assche +Date: Sat Aug 22 10:16:06 2020 -0700 + + agent/mibgroup/versiontag: Switch from CVS to git + + Instead of instructing the user to copy the Net-SNMP source files into a + subdirectory, create the tar archive from the source files administered + by git. + +commit d5f6910373df6a8d501c402d29e038574d1e0975 +Author: Craig Small +Date: Sat Aug 22 08:57:28 2020 -0700 + + Makefile.rules: Install the pkgconfig files as data files + + See also https://github.com/net-snmp/net-snmp/issues/168 . + + Fixes: 6e1329bde834 ("NEWS: Add pkg-config support for building applications and sub-agents") + + [bvanassche: Added patch description] + +commit 7266ff58d0a289ecff74492c39d60ed42da2e437 +Author: Bart Van Assche +Date: Sat Aug 15 19:22:01 2020 -0700 + + Windows: Unbreak the MSVC build of agent/mibgroup/agent/extend.c + + Fixes: 2703c379582f ("EXTEND MIB: Fix two recently introduced compiler warnings") + +commit 5561bd1a35396fc36697a246bbb0ad391d5fc3e5 +Merge: 8827eaf2b dc09b72c3 +Author: Bart Van Assche +Date: Fri Aug 21 07:37:33 2020 -0700 + + Merge branch 'V5-8-patches' into V5-9-patches + + * V5-8-patches: + UCD-SNMP proxy: Fix OID substitution + UCD-SNMP proxy: Document struct simple_proxy members + UCD-SNMP proxy: Remove an unused member from struct simple_proxy + +commit dc09b72c32129e68c85d540e3dee64d4e9450910 +Merge: 5287a8e10 b6f37de20 +Author: Bart Van Assche +Date: Fri Aug 21 07:32:59 2020 -0700 + + Merge branch 'V5-7-patches' into V5-8-patches + + * V5-7-patches: + UCD-SNMP proxy: Fix OID substitution + UCD-SNMP proxy: Document struct simple_proxy members + UCD-SNMP proxy: Remove an unused member from struct simple_proxy + +commit b6f37de20c46258aa081137cae2e670adce98254 +Author: Josef Ridky +Date: Fri Aug 21 07:27:16 2020 -0700 + + UCD-SNMP proxy: Fix OID substitution + + See also https://github.com/net-snmp/net-snmp/issues/165. + + This patch reverts commit 4eb12f0efedd ("we actually want to use the base + OID as the starting point, not the reg OID"). + + [bvanassche: Added commit message] + +commit 11ee42c1f03fc0c779dacd2e852e44ba457f9457 +Author: Bart Van Assche +Date: Fri Aug 21 07:18:40 2020 -0700 + + UCD-SNMP proxy: Document struct simple_proxy members + +commit e11dc1d9d3566cb1acbeb6bed9481ac3434b7b33 +Author: Bart Van Assche +Date: Fri Aug 21 07:19:22 2020 -0700 + + UCD-SNMP proxy: Remove an unused member from struct simple_proxy + + This change does not affect the Net-SNMP ABI since the proxy.h header + file is a private header file. + +commit 8827eaf2b93901987cb846b3255a99634833ab91 +Author: Bart Van Assche +Date: Sun Aug 16 17:04:25 2020 -0700 + + agent/mibgroup/ucd-snmp/pass_persist: Let configure check for waitpid() + +commit f0b4b2c73059e3f9357d9a76472c45a80ed037a9 +Author: Bart Van Assche +Date: Sun Aug 16 16:58:16 2020 -0700 + + agent/mibgroup/ucd-snmp/pass_persist: Simplify write_persist_pipe() + + Do not ignore SIGPIPE since snmpd and snmptrapd already do this. + +commit 9b33b399633e1fcea7e88d8b1a3aa774f03220c8 +Author: Bart Van Assche +Date: Sun Aug 16 16:46:59 2020 -0700 + + agent/mibgroup/ucd-snmp/pass_persist: Simplify init_persist_pipes() + + No functionality is changed. + +commit c8eb12eaad9f5d18702545a0eb51a9e64266efb3 +Author: Magnus Fromreide +Date: Sun Aug 16 16:44:37 2020 -0700 + + agent/mibgroup/ucd-snmp/pass_persist: Reduce the size of struct persist_pipe_type + + Remove the fOut and fdIn members because these are not used. + + [bvanassche: Added a patch description] + +commit ffb91a5d41719cad5b687f70fed0b80cde5c535f +Author: Bart Van Assche +Date: Sun Aug 16 20:27:32 2020 -0700 + + agent/mibgroup/util_funcs: Split get_exec_pipes() in multiple functions + + No functionality has been changed. + +commit 80fed0e33eb2130d962d81375aee3f1bea2ec51c +Author: Bart Van Assche +Date: Sun Aug 16 20:09:13 2020 -0700 + + agent/mibgroup/util_funcs: Add a debug statement + +commit 08864f1d3d0ba33a77e004285154223a8fd7a915 +Author: Bart Van Assche +Date: Sun Aug 16 20:18:12 2020 -0700 + + agent/mibgroup/util_funcs: Fix two recently introduced compiler warnings + + Fixes: 11e119c802e5 ("snmpd, util_funcs: Introduce the parse_cmd() function") + Fixes: 9b1288216457 ("snmpd, util_funcs: Declare the first argument of get_exec_pipes() const") + +commit 1b37bd3b9577d123ca1f7c60cc83a0836d7bd669 +Author: Bart Van Assche +Date: Sun Aug 16 08:33:19 2020 -0700 + + apps/snmpnetstat: Reindent source files + + Indentation of the source files in the apps/snmpnetstat directory + does not follow the Net-SNMP coding style. Hence reindent these files + using the command mentioned in the CodingStyle file. + +commit 1ee70571e0cae37f155f59d4382bc7109138cf09 +Author: Bart Van Assche +Date: Sat Aug 15 17:29:25 2020 -0700 + + apps/snmpnetstat: Stop using obsolete signal functions + + This was reported by Rosen Penev. See also + https://github.com/net-snmp/net-snmp/pull/162. + +commit 9bee0e4bba190e9af3acf3f054f5a222bee3d7c3 +Author: Bill Fenner +Date: Tue Nov 6 08:28:02 2018 -0800 + + routex.c now uses the sockaddr_size feature + +commit d7fa60b251059d3954c745477917fcefe7c7453c +Author: Bart Van Assche +Date: Sun Sep 23 14:34:49 2018 -0700 + + MinGW32, apps/snmpnetstat: Fix compiler warnings about format specifier mismatches + +commit 99fedfe1238a7cc1bae4d44f49314a58a3649f73 +Author: Bart Van Assche +Date: Sat Jun 23 18:19:41 2018 -0700 + + apps: Use getnameinfo() instead of netsnmp_gethostbyaddr() where appropriate + +commit ef99ca519c780508f4c358200dc05c2227023215 +Author: Bart Van Assche +Date: Sat Jun 23 19:23:25 2018 -0700 + + apps/snmpnetstat: Modify the argument types of inet6print() and inet6name() + + This patch does not change any functionality. + +commit dc08763e4616c31fd91bd7b2e38dceb716ab7fa0 +Author: Bart Van Assche +Date: Sat Jun 23 19:05:33 2018 -0700 + + apps/snmpnetstat: Optimize the 127.0.0.1 comparison in inetname() + + This patch does not change any functionality. + +commit 475f0db2f2ff5dd66f02438ba9dd7b279738c1b1 +Author: Bart Van Assche +Date: Sat Jun 23 18:50:44 2018 -0700 + + apps/snmpnetstat: Constify several function arguments + +commit 8f9acef689867b5a25d6cf0d15e02d863f53759c +Author: Bart Van Assche +Date: Sat Jun 23 18:51:25 2018 -0700 + + apps/snmpnetstat: Use inet_ntoa() instead of open-coding it + +commit 152de25d75f5419be296dcf5f98b1ae3ffaf9608 +Author: Bart Van Assche +Date: Sat Aug 15 19:22:01 2020 -0700 + + Windows: Unbreak the MSVC build of agent/mibgroup/agent/extend.c + + Fixes: 2703c379582f ("EXTEND MIB: Fix two recently introduced compiler warnings") + +commit 11e119c802e54b108b6783e0834849c3926aaf6c +Author: Bart Van Assche +Date: Sun Aug 9 18:24:20 2020 -0700 + + snmpd, util_funcs: Introduce the parse_cmd() function + + This patch does not change any functionality. + +commit 9b1288216457083eaa58b258d2c4726de31abd25 +Author: Bart Van Assche +Date: Sun Aug 9 18:12:12 2020 -0700 + + snmpd, util_funcs: Declare the first argument of get_exec_pipes() const + + This patch does not change any functionality. + +commit e55d56212b7260bf2b6f71d3ddd86ab7b27363ff +Author: Bart Van Assche +Date: Fri Aug 14 16:04:38 2020 -0700 + + snmpd: Remove the uClinux code from get_exec_pipes() + + get_exec_pipes() is only used to open persistent pipes. So it is essential + to use fork(). Using vfork() in the implementation of get_exec_pipes() is + wrong because vfork() blocks the caller until the child process has + finished. Since the uClinux implementation of get_exec_pipes() uses + vfork(), remove the uClinux code from get_exec_pipes(). + +commit 26c1d4f2e58ce967c12a085784c86f9dd6ced862 +Author: Bart Van Assche +Date: Sat Aug 8 10:54:57 2020 -0700 + + snmpd: Call fclose() after fdopen() but not close() + + From https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html: + "The fclose() function shall perform the equivalent of a close() on the file + descriptor that is associated with the stream pointed to by stream." + + Hence call fclose() but not close() if fdopen() succeeded. + + See also https://github.com/net-snmp/net-snmp/issues/157 . + + Fixes: fd9a42d142d8 ("- (pass-persist.c pass-persist.h): moved to pass_persist.[ch].") + Fixes: a36188e50dcc ("Patch #760417 from Bob Rowlands/Sun for fixing Bug #751920") + +commit 51c40b7ad54dd77f0313e09c56a4b1ef761e6ab5 +Author: Bart Van Assche +Date: Sun Aug 2 17:32:25 2020 -0700 + + TLSTM-MIB: Fix a Coverity use-after-free complaint + +commit 99e31c39e5cfe649617fcc8f6bb9dec31b7de82f +Author: Bart Van Assche +Date: Sun Aug 2 16:55:19 2020 -0700 + + Handle MIB registration failures instead of ignoring these + + This patch suppresses multiple Coverity 'use after free' complaints. + +commit 02aee733f8d094749bd1fa4cf23fd53e6eff3f14 +Author: Bart Van Assche +Date: Sat Aug 1 17:18:38 2020 -0700 + + libsnmp: Pass 0xff as second argument to memset() instead of '\xff' + + This patch suppresses the following Coverity warning: + + Memset fill truncated (NO_EFFECT) + bad_memset: Argument 4294967295 in memset loses precision in + memset(mask.__in6_u.__u6_addr8, 4294967295, j). + +commit cd95f3065030e291122e4325f5ea69d3b2e9c619 +Author: Bart Van Assche +Date: Sat Aug 1 17:15:37 2020 -0700 + + IF-MIB: Fix source code indentation + + This was detected by Coverity. + +commit 19d75e01fc72b6e03992207d68bd6649950c70b8 +Author: Wes Hardaker +Date: Fri Aug 14 15:13:51 2020 -0700 + + change active branches to 5.9 and master + +commit 0e6790c62ed89cc00bd0203a1bcd2b837fe3526e +Author: Wes Hardaker +Date: Fri Aug 14 15:12:03 2020 -0700 + + added a file to force-push a branch + + +---------------------------------------------------------------------- + +Changes: V5.9.rc2 -> V5.9 + +commit f68a967f6f3aa999f906cd986ffb83f36d37e98b +Author: Wes Hardaker +Date: Fri Aug 14 14:31:32 2020 -0700 + + v5-4 is no longer in release either + +commit a93761876be67802598338bc92473d7df529b00e +Author: Wes Hardaker +Date: Fri Aug 14 14:31:16 2020 -0700 + + remove release from dist/release + +commit b7f01b1134c7a8ed578f8ab9ebecafc85ab2a757 +Author: Wes Hardaker +Date: Fri Aug 14 14:30:46 2020 -0700 + + Version number update: 5.9 + +commit b65b426f1a056b39286b57f8ad855c77e6dffe2e +Author: Wes Hardaker +Date: Thu Aug 6 14:07:23 2020 -0700 + + changelog + +---------------------------------------------------------------------- + +Changes: V5.8.1.rc1 -> V5.9.rc2 + +commit d8dc063e6c41b870b84430e92ab0f5183f014e22 +Author: Wes Hardaker +Date: Tue Aug 4 17:21:16 2020 -0700 + + autoconf + +commit 7ba8a81fe24a60744ef7570f06c40de6cd4e4729 +Author: Wes Hardaker +Date: Tue Aug 4 17:20:53 2020 -0700 + + Fix variable check to include an x prefix for safety + +commit bbd53ed4a42929d0c93645e069b466daa4f0fbce +Author: Wes Hardaker +Date: Tue Aug 4 17:20:43 2020 -0700 + + network pcre detection + +commit 8f371058e274f8a3cf1b293648b8eebc1086a2c9 +Author: Wes Hardaker +Date: Tue Aug 4 17:20:07 2020 -0700 + + fix libwrap reference not including previous value + +commit bbd6adc7794d450910aded191c94836a12614da1 +Author: Wes Hardaker +Date: Fri Jul 31 07:47:40 2020 -0700 + + Version number update: 5.9.rc2 + +commit 2703c379582f17076e625606e9fbd63feb6533f4 +Author: Bart Van Assche +Date: Fri Jul 24 08:35:44 2020 -0700 + + EXTEND MIB: Fix two recently introduced compiler warnings + + See also commit 77f6c60f57db ("make the extend mib read-only by default"). + +---------------------------------------------------------------------- + +Changes: V5.8.1.pre2 -> V5.8.1.rc1 + +commit 0ee30b8ad6646c6bdd96ee67c82641ed50ce6519 +Author: Wes Hardaker +Date: Thu Jul 23 17:05:50 2020 -0700 + + Release Candidate for V5-8-patches + +commit f2ce116c5ff3e6dddb4186905bb277c38025b047 +Author: Wes Hardaker +Date: Thu Jul 23 17:05:47 2020 -0700 + + Version number update: 5.8.1.rc1 + +commit 77f6c60f57dba0aaea5d8ef1dd94bcd0c8e6d205 +Author: Wes Hardaker +Date: Thu Jul 23 16:17:27 2020 -0700 + + make the extend mib read-only by default + +commit 4097a311e952d3b5c12610102bb4cc2fe72b56e5 +Author: Wes Hardaker +Date: Thu Jul 23 15:46:12 2020 -0700 + + Revert "snmpd: Disable NET-SNMP-EXTEND-MIB support by default" + + This reverts commit c2b96ee744392243782094432f657ded4e985a07. + +commit b13410f5b35fd281b9e93113aaa47f9f5c418974 +Author: Bart Van Assche +Date: Wed Jul 22 09:26:29 2020 -0700 + + snmpd, snmptrapd: Disallow to change the user / group after it has been set + + This patch causes the -u and -g arguments to take precedence over the + agentuser and agentgroup keywords. + +commit 53922d2d8873c460d526b8bba9a285c5b98c9e1f +Author: Bart Van Assche +Date: Wed Jul 22 09:22:30 2020 -0700 + + snmpd, snmptrapd: Introduce the netsnmp_set_agent_{user,group}_id() functions + + This patch does not change any functionality. + +commit ba7740a2188184ce2beb36dd1e81b88ced390294 +Author: Bart Van Assche +Date: Tue Jul 21 07:36:43 2020 -0700 + + snmpd, snmptrapd: Reduce code duplication + + Consolidate and rename the two copies of the functions that parse user + and group IDs. + +commit 42e97a741dbc71ce4ab2671fc057b8488638d3b8 +Author: Wes Hardaker +Date: Thu Jul 16 08:01:44 2020 -0700 + + Use more appropriate accept/block terminology + +commit e772b8017d7e235437a45622bf8aa05f3ef3d084 +Author: Robert Story +Date: Mon Jul 13 12:45:22 2020 -0400 + + fix issue #99: read stored ifXTable config at startup + +commit c2b96ee744392243782094432f657ded4e985a07 +Author: Bart Van Assche +Date: Sat Jul 11 09:42:55 2020 -0700 + + snmpd: Disable NET-SNMP-EXTEND-MIB support by default + + Since it is possible to abuse this MIB for privilege escalation attacks, + disable it by default. Notes: + - It is still possible to enable this MIB via the --with-mib-modules + configure option. + - Another MIB that provides similar functionality, namely + ucd-snmp/extensible, is disabled by default. + - The security risk of ucd-snmp/pass and ucd-snmp/pass_persist is lower + since these modules only introduce a security risk if the invoked + scripts are exploitable. + +commit 6fd7499ccaafdf244a74306972562b2091cb91b1 +Author: fisabelle +Date: Thu Jul 9 15:49:35 2020 -0400 + + Issue#147: Net-SNMP not responding when proxy requests times out + +commit 5a464044f95339f979f6b2fdfa756a08d519b78e +Author: Bart Van Assche +Date: Sun Jul 5 14:09:56 2020 -0700 + + Stop using config_arch_require() + + Stop using config_arch_require() since the effect of this macro is confusing. + As an example, #define freebsd4 freebsd4 occurs in a header file that is + included indirectly when building on FreeBSD 12. However, the following test + in config_modules_agent does not recognize the expansion of freebsd4 into + freebsd4: + + # target_os may have been changed to a #define of 1... + if test "x$archtest" = "x1" -o "x$target_os" = "x$archtest" -o "x$PARTIALTARGETOS" = "x$archtest"; then + +commit dec4eaa0626ef2447d41ea1af125809bfb86fbe8 +Author: Bart Van Assche +Date: Sun Jul 5 12:53:25 2020 -0700 + + FreeBSD: Fix the sysctl() configure test + + This patch fixes the following compiler warnings: + + conftest.c:406:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] + main() { + ^ + conftest.c:415:41: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion] + sysctl(mib, 2, &boottime, &len, NULL, NULL); + ^~~~ + /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' + ^~~~~~~~~~~ + /usr/include/sys/sysctl.h:1062:70: note: passing argument to parameter here + int sysctl(const int *, u_int, void *, size_t *, const void *, size_t); + ^ + conftest.c:417:5: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] + exit(0); + ^ + conftest.c:417:5: note: include the header or explicitly provide a declaration for 'exit' + 3 warnings generated. + +commit 72afad88ad58653687383b81b73299b5fdd6e8c4 +Author: Bart Van Assche +Date: Sat Jul 4 14:30:58 2020 -0700 + + ci/net-snmp-configure: Improve FreeBSD support + + Make freebsd_pkg_version() accept multiple package names. Rename + the opensshver variable into libssh2ver. + +commit 18edbbfa20689f5b4d38390b9be7006d98f67195 +Author: Bart Van Assche +Date: Fri Jul 3 18:44:44 2020 -0700 + + ci: .travis.yml: Comment out Xcode 10.x + +commit ec9667c508cec45fc1e8e87fbd3f3687161926a1 +Author: Bart Van Assche +Date: Fri Jul 3 14:49:17 2020 -0700 + + ci/net-snmp-configure: Disable Python modules for Darwin 10 or older + + Building Python modules fails with older versions of Xcode, hence do not + build Python modules for older versions of Xcode. + +commit b3532cd6111eed67eaf83c540b05a175bc8f1fc1 +Author: Bart Van Assche +Date: Fri Jul 3 14:17:40 2020 -0700 + + ci/net-snmp-configure: Only include snmp-usm-dh-objects-mib if openssl/dh.h is available + +commit 9945a3c8928d9358c7d8c5b4e8ec7b6250835f13 +Author: Wes Hardaker +Date: Fri Jul 3 15:46:48 2020 -0700 + + minor wording fixes + +commit c76c17abc03e5519ab75f2b7e951df40ae7a1ddd +Author: Wes Hardaker +Date: Fri Jul 3 15:45:51 2020 -0700 + + removed the way out of date thank you list, and referred to the git log + +commit 1b54c6b895ba8311644427a958e43229853a853d +Author: Bart Van Assche +Date: Fri Jul 3 10:05:44 2020 -0700 + + ci: Reduce the number of combinations built by Travis + +commit f01c45c53cdc931faf68fb33389928a29f1297f9 +Author: Bart Van Assche +Date: Tue Jun 30 16:53:05 2020 -0700 + + Darwin: Unify system header files + + See also https://sourceforge.net/p/net-snmp/bugs/2504/ . + +commit 9e892736ff0b04c5af5775d09155e392c76f7aae +Author: Niels Baggesen +Date: Thu Jul 2 22:18:50 2020 +0200 + + parse: remove a forgotten debug message + +commit 51113450e8e653cf8261a8d09dc204a45c10b61a +Author: Niels Baggesen +Date: Thu Jul 2 22:16:21 2020 +0200 + + snmpwalk/snmpbulkwalk: flush stdout buffers before bailing out on stderr + +commit 2e927ad46cce5eeaeb346d638e46d409e8220a79 +Author: Niels Baggesen +Date: Thu Jul 2 22:08:22 2020 +0200 + + IANA updates for IANAifTypeMIB and IANA-ADDRESS-FAMILY-NUMBERS-MIB + +commit 30238618812171bed934fe8fac629ad6ae22c75e +Author: Bart Van Assche +Date: Thu Jul 2 11:18:00 2020 -0700 + + testing: Skip tests T055 and T056 on OS/X + + These tests fail when building with Xcode 12, so skip these tests. + +commit 043b61801987d70cb5aa01280950afde1d5b061e +Author: Bart Van Assche +Date: Wed Jul 1 11:05:41 2020 -0700 + + Darwin: Only include mibII/{ipAddr,var_route} if struct in_ifaddr is available + + This patch fixes the following build error for Xcode 12 and later: + + libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -I/usr/local/opt/openssl@1.1/include -D_GNU_SOURCE -D_ALL_SOURCE -D_THREAD_SAFE -D__EXTENSIONS__ -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -Udarwin19 -Ddarwin19=darwin19 -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -Wno-deprecated-declarations -c mibII/ipAddr.c -fno-common -DPIC -o mibII/.libs/ipAddr.o + 1480mibII/ipAddr.c:206:29: error: variable has incomplete type 'struct in_ifaddr' + 1481 static struct in_ifaddr in_ifaddr, lowin_ifaddr; + 1482 ^ + +commit af3e76ce47f84bc37f8a20718d4e63aa8491d0f4 +Author: Bart Van Assche +Date: Wed Jul 1 19:31:41 2020 -0700 + + ucd-snmp/extensible.h: Add config_require(ucd-snmp/pass) + + Since this module calls pass_compare(), add a dependency on ucd-snmp/pass. + This patch fixes the following runtime error on Darwin: + + dyld: Symbol not found: _pass_compare + Referenced from: /Users/travis/build/bvanassche/net-snmp/agent/.libs/libnetsnmpmibs.40.dylib + Expected in: flat namespace + in /Users/travis/build/bvanassche/net-snmp/agent/.libs/libnetsnmpmibs.40.dylib + +commit ebf93f489b42bbeeebd7b3e3bb8726cb8175fa2e +Author: Bart Van Assche +Date: Wed Jul 1 19:29:38 2020 -0700 + + UCD-SNMP: Remove two superfluous casts + +commit 9d123ce7407d8f46136bdbcab31205f95f997422 +Author: Bart Van Assche +Date: Wed Jul 1 10:24:22 2020 -0700 + + ci/net-snmp-configure: Only build Python modules if Python3 is available + +commit c06e6ce53f85746a414cd79b1a9c4e66cdc31bf8 +Author: Bart Van Assche +Date: Tue Jun 30 19:15:49 2020 -0700 + + Darwin: Detect , _NSGetArgv() and _NSGetExecutablePath() + +commit 300ae4c59c4e60eaf679af69f3e17150c8cbf5ce +Author: Bart Van Assche +Date: Tue Jun 30 16:58:52 2020 -0700 + + ci: Test more Darwin versions + +commit 31a2c8065db102c876937ff64ee90c60b516d945 +Author: Bart Van Assche +Date: Mon Jun 29 12:35:02 2020 -0700 + + libsnmp: Change several constants from unsigned char into unsigned int + + The C language requires that the operands of a bitwise or expression + are promoted before the bitwise OR happens. From the C standard: + "The following may be used in an expression wherever an int or unsigned int + may be used: + - An object or expression with an integer type (other than int or unsigned + int) whose integer conversion rank is less than or equal to the rank of + int and unsigned int. + - A bit-field of type _Bool , int, signed int, or unsigned int. + + If an int can represent all values of the original type (as restricted by + the width, for a bit-field), the value is converted to an int; otherwise, + it is converted to an unsigned int. These are called the integer promotions. + All other types are unchanged by the integer promotions." + + In other words, the result of a bitwise OR of two unsigned char operands + has type 'int' instead of unsigned int. Hence change the type of constants + in header files from unsigned char into unsigned int. + + See also https://github.com/net-snmp/net-snmp/issues/142. + +commit 3df7a6ac1e0c652839446ebb53ff6f8cc14f7084 +Author: Bart Van Assche +Date: Mon Jun 29 12:41:31 2020 -0700 + + agent/mibgroup/agentx/master_admin.c: Fix indentation + + This patch fixes the following clang compiler warning: + + mibgroup/agentx/master_admin.c:449:2: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] + if (pdu->contextName != NULL) + ^ + mibgroup/agentx/master_admin.c:434:5: note: previous statement is here + if (!var || snmp_oid_compare(var->name, var->name_length, + ^ + +commit 9963ec1be6c595205773b4177b5931ca550b1f79 +Author: Bart Van Assche +Date: Sun Jun 28 19:44:39 2020 -0700 + + Introduce usm_build_user() + + This patch does not change any functionality. + +commit 2abda404ae805b1c369b0e68a2e489b3996f0ba0 +Author: Bart Van Assche +Date: Sun Jun 28 15:23:52 2020 -0700 + + testing/fulltests/default/T0222snmpv3bulkget_simple: Remove the IF-MIB::ifEntry test + +commit 24a8b092cce342d62a477394c60f572e49a90197 +Author: Bart Van Assche +Date: Sun Jun 28 14:36:10 2020 -0700 + + Add test T0222snmpv3bulkget_simple + + See also https://github.com/net-snmp/net-snmp/issues/141. + +commit a0932b73ea0851308ca3e797caa600192cc3508a +Author: Bart Van Assche +Date: Sat Jun 27 19:49:03 2020 -0700 + + CHANGES: Bump libsnmp version from 35.0.1 to 40.0.0 + + Several functions and one data structure have been removed from header + file include/net-snmp/library/snmpusm.h. Hence bump the libsnmp version + number. For the previous libsnmp version bump, see also 1b3ef39cb7a3 + ("version update for 5.8.1.pre1"). + +commit 576788a0a9400da517ddb8ceb33a742f552a1408 +Author: Bart Van Assche +Date: Thu Jun 25 20:57:05 2020 -0700 + + libsnmp: Remove usm_clone_usmStateReference() from the public interface + + Since this function is only used inside the USM implementation, remove + its declaration from the public interface. + +commit 46f755fe4e6c2a919eebae0c55495f5f1207d06c +Author: Ramin Moussavi +Date: Tue Jun 9 13:42:50 2020 +0200 + + pingCtlTable: Move two more global variable definitions from .h to .c + +commit 611149a879ef581454ffdd8637633197607750ff +Author: Jonas Bülow +Date: Mon Jun 1 10:09:53 2020 +0200 + + libsnmp: Remove an obsolete keyword from a header file + + This allows compilation using C++17 where the register keyword is obsoleted. + + Also, the register keyword is in general never necessary. + + [ bvanassche: edited commit message ] + +commit 327079a4ae20e2d4766fe549a6e4e57fbe947bcd +Author: Bart Van Assche +Date: Tue May 26 06:38:53 2020 -0700 + + HOST-MIB, hr_filesys: Also monitor tmpfs + + See also https://sourceforge.net/p/net-snmp/feature-requests/165/, + https://bugs.debian.org/685877 and + https://gitlab.alpinelinux.org/alpine/aports/issues/932. + + Fixes: 2dfdd7cb73ec ("Better file system types") # v5.7 + Reported-by: Craig Small + +commit 22e1371bb1fd4a502fc1065fb5aa6b6df8a6d0d2 +Author: Bart Van Assche +Date: Tue May 26 07:19:07 2020 -0700 + + HOST-MIB, hr_filesys: Convert recursion into iteration + +commit 9238c0df6044f399f33e51c3bea89ee321b2882d +Author: Bart Van Assche +Date: Tue May 26 07:34:51 2020 -0700 + + HOST-MIB, fsys: Remove definitions that have been commented out + +commit a3ef7905e83320f834ef335d121948d6e7d58ff8 +Author: Bart Van Assche +Date: Fri May 15 07:13:37 2020 -0700 + + MIB-II: Declare local symbols static + +commit 93a9f7f32612aa041e150b0d897ba3cdfda6e1db +Author: Bart Van Assche +Date: Fri May 15 07:10:20 2020 -0700 + + MinGW64, MIB-II: Fix a linker error + + Fix the following linker error: + + ld.exe: ./.libs/libnetsnmpmibs.a(var_route.o):var_route.c:(.bss+0x8): multiple definition of `create_flag'; ./.libs/libnetsnmpmibs.a(at_iphlpapi.o):at_iphlpapi.c:(.bss+0x8): first defined here + +commit 68a8dcd937ca9d69764f20e495b1723d818d12b7 +Author: Bart Van Assche +Date: Thu May 14 20:28:53 2020 -0700 + + ci/net-snmp-run-python-tests: Use Python3 interpreter + +commit c01c5544bf02a139a3d103eead3c92378e75f737 +Author: Bart Van Assche +Date: Thu May 14 20:26:28 2020 -0700 + + python: Define PY_SSIZE_T_CLEAN + + See also https://docs.python.org/3/c-api/arg.html . + +commit e4a4f0abca261bb62ea97c275223cf604b23288d +Author: Bart Van Assche +Date: Thu May 14 19:28:43 2020 -0700 + + python: Improve Python3 port + + See also https://github.com/net-snmp/net-snmp/issues/80. + + [ bvanassche: Removed commented out code and fixed compiler warnings ] + +commit 6a8ede044a269f2c10a6463e96d03709bb974151 +Author: Bart Van Assche +Date: Fri May 8 19:32:52 2020 -0700 + + Python: Fix compiler warnings + +commit 5de21610ff249d456c42530d0b8179bf1420a0e0 +Author: Bart Van Assche +Date: Fri May 8 19:10:48 2020 -0700 + + perl/SNMP/t/bulkwalk.t: Improve the reliability of this test + + Use ok($a, $b) instead of ok($a eq $b) to make error reporting more + informative. Unbless $list[3] before iterating over it to make this + test passs on DragonFly BSD. In the loop that looks for the loop + network adapter, check whether the index of that adapter is numeric + instead of comparing it with one. + +commit 8bdae3bf48b3e80e148c2b20dc0f284119dc4548 +Author: Bart Van Assche +Date: Fri May 8 21:41:52 2020 +0000 + + perl/SNMP/t/bulkwalk.t: Make this test easier to debug + +commit 57936ba304d18e6c23f31b242ff6d0a95e846c4f +Author: Bart Van Assche +Date: Fri May 8 19:33:10 2020 -0700 + + libsnmp: Declare the arguments of netsnmp_transport_create_config() const + +commit 78beea8ef011702c026fdb3b32f118edcd2d6de4 +Author: Bart Van Assche +Date: Tue May 5 08:25:55 2020 -0700 + + configure: Do not use -Wl,-no-undefined if -fsanitize= has been specified + + Apparently these two compiler flags are incompatible. This patch should + fix the following build failure: + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22010 + +commit 2d6ccd92f16a0ea2cf03ff26bdbdc46f0c93e4f8 +Author: Bart Van Assche +Date: Tue May 5 07:49:58 2020 -0700 + + configure: Ignore the krb5_config -flto=auto flag + + -flto=auto is incompatible with clang, hence ignore that compiler flag. + +commit fd2f267370435996eca54be70525f592fec3f0d8 +Author: Bart Van Assche +Date: Mon May 4 17:32:30 2020 -0700 + + libsnmp: Declare decode_keychange() input arguments const + +commit 998a1686cbc202d2a5f3b4bc3933719cb13aaebd +Author: Bart Van Assche +Date: Mon May 4 15:11:59 2020 -0700 + + snmpd: Fix a buffer overflow triggered by processing "getnext" + + This patch fixes the following Valgrind complaint: + + Invalid write of size 8 + at 0x4864DD4: netsnmp_scalar_helper_handler (scalar.c:225) + by 0x4872008: netsnmp_call_handler (agent_handler.c:546) + by 0x4872369: netsnmp_call_next_handler (agent_handler.c:660) + by 0x48655B6: netsnmp_serialize_helper_handler (serialize.c:86) + by 0x4872008: netsnmp_call_handler (agent_handler.c:546) + by 0x487219C: netsnmp_call_handlers (agent_handler.c:631) + by 0x4881D52: handle_var_requests (snmp_agent.c:3012) + by 0x488245A: handle_getnext_loop (snmp_agent.c:3502) + by 0x4882D97: handle_pdu (snmp_agent.c:3849) + by 0x4882F03: netsnmp_handle_request (snmp_agent.c:3685) + by 0x48835AB: handle_snmp_packet (snmp_agent.c:2294) + by 0x4C53CA7: _sess_process_packet_handle_pdu (snmp_api.c:5809) + by 0x4C5409F: _sess_process_packet (snmp_api.c:5858) + by 0x4C5443C: _sess_read (snmp_api.c:6115) + by 0x4C55009: snmp_sess_read2 (snmp_api.c:6387) + by 0x4C55046: snmp_read2 (snmp_api.c:5907) + by 0x403E43: receive (snmpd.c:1311) + by 0x405765: main (snmpd.c:1089) + Address 0x63a0908 is 0 bytes after a block of size 72 alloc'd + at 0x483877F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) + by 0x4C5002E: snmp_duplicate_objid (snmp_api.c:7844) + by 0x4872992: netsnmp_handler_registration_dup (agent_handler.c:844) + by 0x487575C: netsnmp_subtree_deepcopy (agent_registry.c:524) + by 0x4875B61: netsnmp_subtree_split (agent_registry.c:660) + by 0x487666F: netsnmp_subtree_load (agent_registry.c:940) + by 0x48766A4: netsnmp_subtree_load (agent_registry.c:947) + by 0x48766A4: netsnmp_subtree_load (agent_registry.c:947) + by 0x48766A4: netsnmp_subtree_load (agent_registry.c:947) + by 0x48770A4: netsnmp_register_mib (agent_registry.c:1214) + by 0x4872655: netsnmp_register_handler (agent_handler.c:318) + by 0x48656AB: netsnmp_register_serialize (serialize.c:56) + by 0x4864F07: netsnmp_register_scalar (scalar.c:98) + by 0x48712FC: netsnmp_register_watched_scalar2 (watcher.c:211) + by 0x49822AC: _register_extend (extend.c:221) + by 0x4982870: extend_parse_config (extend.c:576) + by 0x4C65EAD: run_config_handler (read_config.c:541) + by 0x4C66D19: read_config (read_config.c:960) + by 0x4C67422: read_config_with_type_when (read_config.c:481) + by 0x4C6770A: read_configs_optional (read_config.c:1018) + by 0x4C6809D: read_configs (read_config.c:1049) + by 0x4C55418: init_snmp (snmp_api.c:907) + by 0x405013: main (snmpd.c:911) + +commit 836cd352bb43f3e1483a0e4937c5f05f6eab1eb9 +Author: Bart Van Assche +Date: Mon May 4 08:35:45 2020 -0700 + + libsnmp, snmpd: Handle PDU cloning failures + +commit 644a9aa6f4816f5739161c674b793a28d99f69c3 +Author: Bart Van Assche +Date: Mon May 4 10:53:54 2020 -0700 + + libsnmp: Declare USM input parameters const + +commit a9219e3ecee5ce0cafdcbfaee50ac70ef290fc5b +Author: Bart Van Assche +Date: Mon May 4 09:13:00 2020 -0700 + + libsnmp: Declare the usm_get_user() arguments const + +commit 7d27dd105f2633f4dfa3e3ee0a7689e5a5752b13 +Author: Bart Van Assche +Date: Mon May 4 07:49:33 2020 -0700 + + libsnmp, snmpd: Fix two potential buffer overflows + + Both bugs were introduced before 2001. + + See also https://github.com/net-snmp/net-snmp/issues/110 . + +commit 6c4fe0e446d3da50ed5ca8bd79f8949f0b803ddd +Author: Bart Van Assche +Date: Mon May 4 07:45:56 2020 -0700 + + libsnmp: Declare a build_oid_noalloc() input argument const + +commit a5495798fa1e18f819a5e54f06deefe5fb798942 +Author: Bart Van Assche +Date: Sun May 3 20:14:59 2020 -0700 + + snmpd: Remove a dead assignment + + Additionally, remove an explicit \0-termination because snprintf() is + required to do \0-termination (see also + https://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html). + + This patch fixes the following Coverity complaint: + CID 144418 (#1 of 1): Unused value (UNUSED_VALUE) + assigned_pointer: Assigning value from cur + snprintf(cur, ep - cur, " %i %i \"%s\" %s %i %i", curr_struct->timeout, curr_struct->retryCount, curr_struct->tagListData, curr_struct->paramsData, curr_struct->storageType, curr_struct->rowStatus) to cur here, but that stored value is overwritten before it can be used. + +commit 5ab2436f775bcd1de1ed86fd5a39d55b4f30ea4f +Author: Bart Van Assche +Date: Sun May 3 19:52:23 2020 -0700 + + agent/mibgroup/agent/extend.c: Remove dead code + + This patch fixes the following Coverity complaint: + + arith_non_null: The result of pointer arithmetic compatability_entries + idx is never null. + dead_error_condition: The condition exten must be true. + + Fixes: 436bfa49439f ("Backwards-compatability implementation of the UCD-SNMP-MIB::extTable (if the ucd-snmp/extensible module isn't configured in).") + +commit 559b8f5f9fdc66cf7612a31ff1a52825546f4f60 +Author: Bart Van Assche +Date: Sun May 3 16:02:24 2020 -0700 + + AIX: Also define aix4 on AIX5 and AIX6 + + This patch allows to simplify the test defined(aix4) || defined(aix5) || + defined(aix6) into defined(aix4). + +commit aebf5909df24692e1a03327ba2e49581a8574aa8 +Author: Bart Van Assche +Date: Sun May 3 16:23:44 2020 -0700 + + configure: Improve the MIT crypto API check + +commit fc7002ecced1329b62238f6278576b11846da173 +Author: Bart Van Assche +Date: Sun May 3 14:26:17 2020 -0700 + + AIX: Fix one build error and also a compiler warning + + n_name is a #define on AIX and hence using 'n_name' as a variable name + triggers a compiler error. + +commit ee7eed065f652ccfc58cade8aef5848073cce7bf +Author: Bart Van Assche +Date: Sat May 2 17:21:41 2020 -0700 + + kFreeBSD: Fix the build + + See also https://github.com/net-snmp/net-snmp/issues/103. + +commit f44565fc195698e8b79fdd905c17217f0e493196 +Author: Bart Van Assche +Date: Sun May 3 11:21:10 2020 -0700 + + Suppress recently introduced compiler warnings about close() not being declared + +commit cb9b87d9b6e2b925065bf9cf700f9c44e5462d93 +Author: Bart Van Assche +Date: Sat May 2 08:44:10 2020 -0700 + + Always use -Wl,-no-undefined when linking a shared library + + Undefined symbols in a Net-SNMP shared library indicate a bug. Make sure + that this is detected at link time instead of at run time. + +commit 1fe4c024aa8e7d1e493039c3e1ca91dd06ffc5be +Author: Bart Van Assche +Date: Sat May 2 09:26:37 2020 -0700 + + configure: Add -lkrb5 to LNETSNMPLIBS instead of LIBS + + Only the Net-SNMP library needs to be linked with the Kerberos libraries. + Link with libk5crypto if necessary. + +commit dfa82c4810b68181cb70fef07a7e8000beb98262 +Author: Bart Van Assche +Date: Sat May 2 07:13:29 2020 -0700 + + FreeBSD: Use the freebsd3 macro instead of __FreeBSD__ + + Use the 'freebsd3' macro to guard code that is FreeBSD-specific. This will + make it easier to fix the build for kFreeBSD. Note: the freebsd3 macro is + defined if the FreeBSD version is >= 3. + +commit 7c562f9b61397d8174b41c13244d2c69d729e13b +Author: Bart Van Assche +Date: Sat May 2 08:24:40 2020 -0700 + + perl/SNMP/t/notify.t: Make this test more robust + +commit 15737583d5271f398a38b2f11f900fbd73a7025b +Author: Bart Van Assche +Date: Sat May 2 08:17:40 2020 -0700 + + UCD-SNMP-MIB: Move an include directive and a few constants into proc.c + +commit 05c6c29c2c458261605fee8d3a8d59c97bba2878 +Author: Bart Van Assche +Date: Sat May 2 08:10:29 2020 -0700 + + ci/net-snmp-configure: Build without MySQL support + +commit ca585bbbae9e4831a6e622bfb9356689187bea70 +Author: Bart Van Assche +Date: Thu Apr 30 07:38:35 2020 -0700 + + ci/net-snmp-run-tests: Fix the test that verifies whether Perl modules have been enabled + +commit b323fe9f83ff070244f00363d5493b9528e4300d +Author: Bart Van Assche +Date: Thu Apr 30 10:09:07 2020 -0700 + + perl/SNMP/t/bulkwalk.t: Improve the robustness of this test + + Instead of only examining the network interface that occurs first in the + interfaces table, examine all network interfaces. + +commit d589ab4eab9aa5f21290ae9e20fb4f8d0c75f105 +Author: Bart Van Assche +Date: Thu Apr 30 17:01:20 2020 -0700 + + perl/TrapReceiver/t/1.t: Use ok() instead of print() + +commit 93c22da673e88a72d59e1d6e66a8d4836f9c6828 +Author: Bart Van Assche +Date: Thu Apr 30 11:52:16 2020 -0700 + + perl/ASN/test.pl: Convert to the Perl Test framework + +commit 6c9f36b09b8a6486eb09f7496e5a73df18905a2f +Author: Bart Van Assche +Date: Mon Apr 27 17:14:58 2020 -0700 + + perl/MakefileSubs.pm: Define the MinGW compiler flags correctly + +commit e227abee97c3d43c53e5082c94892fc904780ffd +Author: Bart Van Assche +Date: Thu Apr 30 07:17:30 2020 -0700 + + perl/MakefileSubs.pm: Remove -Iinclude/net-snmp from the Windows flags + + Remove include/net-snmp from the include path because it is not used. + +commit 9f176cbee62338b2fb19de6165c4ae4f8799c822 +Author: Bart Van Assche +Date: Thu Apr 30 07:20:10 2020 -0700 + + agent/snmp_perl.c: Remove an obsolete definition + + _WIN32_WINNT is either defined by the configure script (MinGW, Cygwin) or + by win32/Configure (MSVC). + +commit bbd745acaf022524b9ae686953ea010d98c68ec5 +Author: Bart Van Assche +Date: Thu Apr 30 08:02:39 2020 -0700 + + configure: Simplify the size_t format specifier check + + Assume that Unix compilers are ANSI C compliant and use the 'z' format + specifier on Unix. Only check for the underlying type of size_t on + MinGW. Remove the unused NETSNMP_PRI32 format specifier. + +commit 108cce420ee10857d0d9407f0f5b45b6e7c0fc48 +Author: Bart Van Assche +Date: Wed Apr 29 18:36:45 2020 -0700 + + ci/build.bat: Check whether make perl_test succeeded for the MSVC build + +commit 93fe38cf5f7cdf339df48d94caff140c91e50ac7 +Author: Bart Van Assche +Date: Wed Apr 29 14:35:34 2020 -0700 + + perl/SNMP/Makefile.PL: Simplify GetTestInfo() + +commit 50eeb76544810cf8fbcde94a2696519ba3e8acf3 +Author: Bart Van Assche +Date: Wed Apr 29 12:01:36 2020 -0700 + + perl/SNMP/t/dump-session.t: Call snmptest_cleanup() after the test has finished + +commit e69984355cfd0d4bedd4077367f3a3c89de72109 +Author: Bart Van Assche +Date: Wed Apr 29 11:04:22 2020 -0700 + + perl/SNMP/t/startagent.pl: Improve kill_by_pid_file robustness + +commit 905ab798cf6a419bafa68d29f6b262a21d3a382f +Author: Bart Van Assche +Date: Wed Apr 29 12:13:10 2020 -0700 + + perl/SNMP/t/startagent.pl: Make starting processes faster + +commit e2349372287809b518dc76e16b4e0602dffeca21 +Author: Bart Van Assche +Date: Wed Apr 29 09:51:04 2020 -0700 + + perl/default_store/test.pl: Convert to the Perl Test framework + +commit 498b243e35d105d72ee205e42d17fd4505f99b25 +Author: Bart Van Assche +Date: Wed Apr 29 10:51:20 2020 -0700 + + Perl tests: Use $mibdir instead of ../../mibs + +commit b16a0e0d917bf2cbd32e5dc95b73d7e5407533a9 +Author: Bart Van Assche +Date: Wed Apr 29 15:18:44 2020 -0700 + + perl/SNMP/t/startagent.pl: Split this Perl script + +commit f253df86c4560d762cc22f8234cd879d9b143b1e +Author: Bart Van Assche +Date: Wed Apr 29 08:20:38 2020 -0700 + + Perl tests: Enable 'use strict' and 'use warnings' + +commit 917b0f281c31ab152528e6dc4e5c2ab5027d5353 +Author: Bart Van Assche +Date: Wed Apr 29 09:53:24 2020 -0700 + + Perl tests: do not modify @INC + +commit dc43e75282c7b5de51463964571e5f6b633c582f +Author: Bart Van Assche +Date: Wed Apr 29 12:50:30 2020 -0700 + + ci/perl.bat: Suppress two uninteresting Visual Studio compiler warnings + +commit bc2a9a7fedf8a99073a4e5cb4872124101abd3d8 +Author: Bart Van Assche +Date: Wed Apr 29 10:24:41 2020 -0700 + + win32/Makefile.in: Tell the Perl DynaLoader where to find netsnmp.dll + +commit 5bacc9af2baa5a5a02b0e3ffc6abf963adff6a71 +Author: Bart Van Assche +Date: Wed Apr 29 13:30:38 2020 -0700 + + snmpd: Do not open /dev/kmem on Linux even if libelf-devel has been installed + + See also f1647e3db242 ("snmpd: Do not open /dev/kmem on Linux") + +commit 59e8b5b28db8bed05d68c4d508a89932437e9cb6 +Author: Bart Van Assche +Date: Wed Apr 29 11:46:50 2020 -0700 + + snmpd: Make init_kmem() report "success" if /dev/kmem is not opened + + Fixes: f1647e3db242 ("snmpd: Do not open /dev/kmem on Linux") + +commit 595751cdf7b74083631b2ffd335be45f0b691a88 +Author: Bart Van Assche +Date: Wed Apr 29 07:38:50 2020 -0700 + + ci/build.bat: Unbreak the MSVCSTATIC64 build + + This patch fixes the following error that is triggered by the win32/Configure script: + + Can't locate ExtUtils/Embed.pm in @INC (you may need to install the ExtUtils::Embed module) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at Configure line 9. + +commit d84f0c6e160951318a35e72fe76ef2e0ffd91044 +Author: Bart Van Assche +Date: Tue Apr 28 20:42:46 2020 -0700 + + Windows, MSVC: Fix Perl module compilation + + This patch fixes the following error message: + + default_store.c: loadable library and perl binaries are mismatched (got handshake key 0000000010500080, needed 0000000010A00080) + + See also https://github.com/net-snmp/net-snmp/issues/104. + +commit 42aa220a7d3d686eb91bfd354c9b5094afbe6d97 +Author: Bart Van Assche +Date: Tue Apr 28 15:55:59 2020 -0700 + + ci/build.bat, MSVC: Run Perl tests + +commit a4a8a70dbef581a30c3ba814de39b514f76072f8 +Author: Bart Van Assche +Date: Tue Apr 28 15:40:59 2020 -0700 + + Perl: Use $Config{path_sep} instead of ';' for Windows + +commit 4990ca1af1d16a3e3144d455cb1e41108f00b691 +Author: Bart Van Assche +Date: Tue Apr 28 14:50:44 2020 -0700 + + win32/Makefile.in: Set PERL5LIB before running tests + + This is necessary to let the Perl interpreter find the Net-SNMP Perl modules. + +commit 0e33f5025a483e4d724b6e417e8ef6b0788819e9 +Author: Bart Van Assche +Date: Tue Apr 28 18:14:17 2020 -0700 + + testing/RUNFULLTESTS: Fix the --with-perl-modules test + +commit e621ae3038c82f92666c37da9c0e2ceb09df93f0 +Author: Bart Van Assche +Date: Tue Apr 28 13:58:30 2020 -0700 + + testing/RUNFULLTESTS: Fix PERL5LIB + + Fixes 5a86cfb005db ("testing: Unbreak RUNFULLTESTS"). + +commit 61822884421eae193ca9fd1f55da488000480789 +Author: Bart Van Assche +Date: Tue Apr 28 13:53:12 2020 -0700 + + ci/build.bat: Fix a comment + +commit 467c5ee95ba804275e719a4848d2d46f18a9eee1 +Author: Bart Van Assche +Date: Sat Apr 25 15:54:06 2020 -0700 + + ci, .appveyor.yml: Switch to Visual Studio 2019 image + +commit f7ae854c12c35c2561979873e53d217da688e809 +Author: Bart Van Assche +Date: Tue Apr 28 13:09:14 2020 -0700 + + win32/dist/build-binary.pl: Remove the dependency on File::Which + + File::Which is a CPAN module and hence is not present in the core Perl + distribution. + + Fixes: ed630cf540f6 ("win32/dist/build-binary.pl: Search %PATH% for tar.exe and gzip.exe") + +commit 4f61570bca1d765bfdb11c6010c887cbe3176f29 +Author: Bart Van Assche +Date: Tue Apr 28 13:33:44 2020 -0700 + + ci/build.sh: Install MSYS Perl MakeMaker and Test-Harness + +commit 62fb93df0641b4beed3db28d594ca1f87ec63b0c +Author: Bart Van Assche +Date: Mon Apr 27 21:50:53 2020 -0700 + + ci/AppVeyor: Reduce build time + + Only download and build Perl when building with the Visual Studio + compiler and for dynamic builds. Otherwise use the Perl interpreter that + is included with the development environment (MinGW or Cygwin). + +commit 8df783a81996f03e2927fe0f56182ab0250e317e +Author: Bart Van Assche +Date: Mon Apr 27 13:06:09 2020 -0700 + + ci/build.bat: Fail if win32/Configure fails + +commit aea52476b536d85f42a31d05a2bb5bcefe484823 +Author: Bart Van Assche +Date: Mon Apr 27 12:45:17 2020 -0700 + + win32/Makefile.in: Set NET-SNMP-PATH + +commit bb8923f55329276debe86f787e3a0edd537c308f +Author: Bart Van Assche +Date: Mon Apr 27 15:17:40 2020 -0700 + + perl/SNMP/Makefile.PL: Use NET-SNMP-PATH if it has been set + + Additionally, ignore the unused NETSNMP_PREFIX environment variable. + +commit 4d614474f9157809d8a5ab8c265246e5b2e56374 +Author: Bart Van Assche +Date: Mon Apr 27 13:22:39 2020 -0700 + + perl/MakefileSubs.pm: Restore support for the -NET-SNMP-PATH option + + Fixes: 273cd3379613 ("perl Makefiles: MinGW / MSYS fixes") + +commit 93299804393dd777ec1a188807bb4f664475eac0 +Author: Bart Van Assche +Date: Mon Apr 27 17:29:35 2020 -0700 + + perl/Makefile.PL: Simplify this file + +commit 5135d509ed8bb1ac69b50f5980d97b237efb4f29 +Author: Bart Van Assche +Date: Mon Apr 27 11:27:54 2020 -0700 + + ci/perl.bat: Make this batch file compatible with Windows tar + +commit 04adea6a0f33286e9b884f498989d26fbf28e896 +Author: Bart Van Assche +Date: Mon Apr 27 11:18:04 2020 -0700 + + ci/perl.bat: Bump Perl version + +commit 0be093688013b90896f2db3204bb20e790d70149 +Author: Bart Van Assche +Date: Mon Apr 27 08:23:16 2020 -0700 + + configure: Report supported authentication and encryption modes correctly + + Commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP + Research / CISCO") removed SHA-128 and SHA-192 support and added support for + SHA-224, SHA-256, SHA-384 and SHA-512. Commit 329a9d3c9d63 ("revamp auth/priv + protocol constants handling") added support for several AES encryption modes. + Make the configure script report which modes are supported. + +commit 05739bdb63ef192bf9e9130fbc9b560baa8852ec +Author: Bart Van Assche +Date: Fri Apr 24 10:16:07 2020 -0700 + + CHANGES: Windows, MSVC: snmpd: Switch from mibII/interfaces to if-mib/ifTable + + Provide IF-MIB::ifTable and IF-MIB::ifXTable through the agent instead of + MIB-II::ifTable. This matches the default behavior of the Linux SNMP agent. + + From the IF-MIB: "This MIB is an updated version of MIB-II's ifTable". + +commit 0c880d6f7a2bcb4a4a6f93c4dc577f9bc22c6e6a +Author: Bart Van Assche +Date: Sun Apr 26 12:04:20 2020 -0700 + + Windows, include/net-snmp/types.h: Fix socklen_t type definition + +commit f1647e3db24241f0c42449506aee4b406a37b1b5 +Author: Bart Van Assche +Date: Sun Apr 26 11:10:46 2020 -0700 + + snmpd: Do not open /dev/kmem on Linux + + The Net-SNMP agent only uses /dev/kmem to access kernel data structures on + BSD systems. Hence do not open /dev/kmem on Linux. A side effect of this + patch is that it enables cross-compilation from Linux to MinGW. /dev/kmem + exists on Linux but the code in agent/kernel.c that is surrounded with + #ifdef HAVE_KMEM / #endif does not build with the MinGW compiler. + +commit 9ee2a5ccf50098f8e7371051e878b169b1e58cc3 +Author: Bart Van Assche +Date: Sun Apr 26 11:36:40 2020 -0700 + + agent/mibgroup/host/hr_disk.c: #include + + Fixes: e91559e38d23 ("Net-SNMP include files: Minimize #include directives") + +commit b7f44bbdbe484bd03b438595e7c6b58eda005897 +Author: Bart Van Assche +Date: Sun Apr 26 09:33:51 2020 -0700 + + Cygwin, MIB-II: Fix a few compiler warnings + +commit 8e9dfcc27b6cdb538ec4a4d5596641a88dd8a2d9 +Author: Bart Van Assche +Date: Sun Apr 26 08:04:46 2020 -0700 + + Cygwin, IF-MIB: Temporarily disable the iphlpapi implementation + + Making the iphlpapi implementation compatible with Cygwin requires more + work. Hence temporarily disable the iphlpapi implementation for Cygwin. + +commit dcec69ba971388d1da74acd1ca514e1c14ed8fa2 +Author: Bart Van Assche +Date: Sat Apr 25 19:39:21 2020 -0700 + + Windows, IF-MIB: Minimize #include directives + + This prevents a conflict on Cygwin between the Cygwin socket header files + and the Winsock header files. + +commit e91559e38d230934c9b10fe0f0a51394e008dda9 +Author: Bart Van Assche +Date: Sat Apr 25 19:30:45 2020 -0700 + + Net-SNMP include files: Minimize #include directives + + Move several #include directives from Net-SNMP include files into .c files. + +commit 6945b208a74aabe9acebdae7e4642038ab8e1c96 +Author: Bart Van Assche +Date: Sat Apr 25 11:58:48 2020 -0700 + + include/net-snmp/system/cygwin.h: Simplify this file + +commit 8c686545d71894d1ba5b7eef846d559dae9fe06e +Author: Bart Van Assche +Date: Sat Apr 25 15:53:06 2020 -0700 + + ci, .travis.yml: Use OS/X 10.14 + +commit 193062739789a63affe09d2eb80affd57157b233 +Author: Bart Van Assche +Date: Sat Apr 25 10:18:39 2020 -0700 + + Net-SNMP headers: Move in_addr_t definition into + + This allows to remove #include from . + That change allows to include from source + files that include Winsock header files. Cygwin BSD socket header files + conflict with Winsock header files. + + See also commit a7f53c44a53d ("move include for in_addr_t to net-snmp/ + types.h, where in_addr_t is defined for systems w/out netinet/in.h"). + +commit b3d2d0896a67be6f8fbbd2f025e077ba293a52a5 +Author: Bart Van Assche +Date: Sat Apr 25 10:14:18 2020 -0700 + + Net-SNMP headers: Only include if necessary + + Minimizing #include directives reduces the build time. + +commit e981bcbab5034ccd9cf8445d4ba60d1420b23b3d +Author: Bart Van Assche +Date: Sat Apr 25 07:59:04 2020 -0700 + + IF-MIB: Unbreak the MinGW32 build + + Fixes: c33140b0110c ("Win32, IF-MIB: Implement interface table support") + +commit 72405d2efb5874f48b6871ac0197d86d0e4f109c +Author: Bart Van Assche +Date: Sat Apr 25 08:51:21 2020 -0700 + + apps/Makefile.in: Make this Makefile again compatible with non-GNU make implementations + + 'ifneq' is a GNU extension. Instead of using 'ifneq', use a mechanism that is + compatible with GNU make. + + Fixes: 71f46f7126b4 ("apps: Only build snmpps and snmptop if a curses library is available") + +commit 5c209f9a6fe444b13d7c39eac12f5390e5e5fcb4 +Author: Bart Van Assche +Date: Fri Apr 24 21:46:40 2020 -0700 + + Darwin: Add support for Darwin versions 18..21 + + See also https://github.com/net-snmp/net-snmp/issues/101. + +commit c33140b0110cead76039da6d985878ea9d05b2fd +Author: Bart Van Assche +Date: Thu Apr 23 18:10:39 2020 -0700 + + Win32, IF-MIB: Implement interface table support + + On Windows Vista, Windows 2008 and later the ifOperStatus information is + more accurate than on older Windows versions. + +commit 026348ef082d3bda5f2b394002b1d770d71ccec3 +Author: Bart Van Assche +Date: Fri Apr 24 16:42:34 2020 -0700 + + Windows: Increase _WIN32_WINNT to 0xffff + + Instead of restricting the Windows features to a certain version of the + Windows API, enable all Windows API functionality. + +commit d560f542c0853fdfef2bf9cdf0365ac75dfdf40b +Author: Bart Van Assche +Date: Wed Apr 22 19:27:26 2020 -0700 + + MIBs: Remove the NETSNMP_INCLUDE_IFTABLE_REWRITES and NETSNMP_ACCESS_INTERFACE_NOARCH macros + + Switch all platforms to the rewritten ifTable implementation. Instead of defining + NETSNMP_ACCESS_INTERFACE_NOARCH if no data access implementation is available, use + the "unsup" dummy implementation. + +commit e86230436ea0d3126a4525a98ff7dde60cd448b1 +Author: Bart Van Assche +Date: Tue Apr 21 09:48:31 2020 -0700 + + Windows, IF-MIB: Switch to the rewritten ifTable implementation + + Since the IF-MIB is not yet implemented on Windows, all switching to the rewritten + ifTable implementation involves is to provide a dummy implementation of the data + access functions. + +commit d15cae3cb7e2eb5a1cfea8832d530fb81c317858 +Author: Bart Van Assche +Date: Tue Apr 21 10:13:27 2020 -0700 + + IF-MIB: Fix the build for the case !defined(HAVE_PCRE_H) && !defined(HAVE_REGEX_H) + +commit 4803af75945291ee7ad270d93425781e9e79f3f1 +Author: Bart Van Assche +Date: Tue Apr 21 15:04:39 2020 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 71f46f7126b4f5cf1858d16be633a0d7a2002e6d +Author: Bart Van Assche +Date: Tue Apr 21 08:34:44 2020 -0700 + + apps: Only build snmpps and snmptop if a curses library is available + + Additionally, only search for curses header files if a curses library is available. + +commit 435ddb821bdae5950829d225d1c087784214d41c +Author: Bart Van Assche +Date: Tue Apr 21 07:53:15 2020 -0700 + + configure: Skip pcre.h check if --without-pcre has been specified + + Fixes: 213941dfbee6 ("CHANGES: agent: PATCH 3525595: from dhubler: Add support for finding processes via regex") + +commit 2f1c4d06bc49da5fc4a0fb7be373a8c6f9d3d4a6 +Author: Bart Van Assche +Date: Mon Apr 20 14:40:13 2020 -0700 + + ci, FreeBSD: Improve the code that detects the OpenSSL version + +commit b59e896245d001ebc13c415c86fb8c203b639f07 +Author: Bart Van Assche +Date: Mon Apr 20 13:44:31 2020 -0700 + + ci, MinGW: Build HOST-MIB + +commit 90ea93b038ea0f70a78f315d89f68d34615c1902 +Author: Bart Van Assche +Date: Sat Jun 23 09:18:12 2018 -0700 + + tests: Rename SUCCESS() and FAILED() + + This is necessary to avoid conflicts with constants with the same + name in the Windows header files. + +commit c083ccbe9b365a06b7192be1d1b6a31695c677d1 +Author: Bart Van Assche +Date: Mon Apr 20 21:18:33 2020 -0700 + + MinGW, T008asn1_clib.c: Fix compiler warnings + +commit f78d56a80e89aaa36a6da2b7318c9e012badfef9 +Author: Bart Van Assche +Date: Mon Apr 20 21:13:13 2020 -0700 + + MinGW: Fix multiple compiler warnings + +commit c55a1421da1bed9acdbc08381744238aeca897c6 +Author: Bart Van Assche +Date: Mon Apr 20 13:20:18 2020 -0700 + + agent/mibgroup/utilities/execute.c: Only define tokenize_exec_command() if necessary + +commit 1ff5be497f7ef551c26bf320aab995ece596cca9 +Author: Bart Van Assche +Date: Mon Apr 20 20:00:31 2020 -0700 + + MinGW, MIB-II: Fix a linker error + +commit fbb0e883abf2e3b2b021aabdc4e9ae56bba35ced +Author: Bart Van Assche +Date: Mon Apr 20 12:58:03 2020 -0700 + + MinGW: Fix agent/mibgroup/host/hr_system.c build + +commit 3074aa18898b0461bc06b61041382d9622e83cf7 +Author: Bart Van Assche +Date: Mon Apr 20 12:52:30 2020 -0700 + + agent/mibgroup/host/data_access/swrun_null: Fix a compiler warning + +commit 3c9e5f2608eebacd31c4e08eabe11dbb183ee685 +Author: Bart Van Assche +Date: Mon Apr 20 10:32:43 2020 -0700 + + MinGW: Fix cross-compilation + + Fix building for MinGW on a non-MinGW system (--host=x86_64-w64-mingw32). Add + LT_LANG([Windows Resource]). Use @RC@ instead of windres such that the proper + cross-compilation prefix is used in front of the windres executable. + +commit fda7c07b0ec3ab1384646548edd79e62138b71eb +Author: Bart Van Assche +Date: Mon Apr 20 11:19:08 2020 -0700 + + testing/fulltests/unit-tests/T008asn1_clib: Fix MinGW build + +commit 44fd72624285fd52337c97577d92b94333b8dadb +Author: Bart Van Assche +Date: Mon Apr 20 11:18:41 2020 -0700 + + apps/snmpping: Fix MinGW build + +commit 319f4d717fb9ab2ef0f7696d4afb348ed34054ae +Author: Bart Van Assche +Date: Sat Apr 18 20:16:52 2020 -0700 + + HOST-MIB: Reorder function definitions + + Reorder the function definitions in hw_fsys.c such that the forward function + declarations can be removed. + +commit 5732d8b3debdb149ea5f12d85b2804b41b98d22e +Author: Bart Van Assche +Date: Sat Apr 18 19:54:49 2020 -0700 + + HOST-MIB: Declare _fsys_cache and _fsys_container static + + Neither _fsys_cache nor _fsys_container is used outside the source file these + variables are declared in. Hence declare these variables static. + +commit 3300c1f03e5899dc4301c39c104ff3cfbd840a79 +Author: Bart Van Assche +Date: Sat Apr 18 18:46:09 2020 -0700 + + testing: Make the tests pass for --enable-minimalist and --enable-mini-agent + +commit 228cba5710b2213cf4bb5c2d60d56608f2497831 +Author: Bart Van Assche +Date: Sat Apr 18 11:10:29 2020 -0700 + + testing: Add a test for "extend OID" + + See also https://github.com/net-snmp/net-snmp/issues/97 . + +commit 633b8214eeb6558519efdb18a5fea1e53b7f2ba3 +Author: Bart Van Assche +Date: Sun Apr 12 19:28:13 2020 -0700 + + libsnmp: Only define strcasecmp() and strncasecmp() if necessary + +commit ea4e62bf9242a2c4792bc60eb3fff0b97fa76060 +Author: Bart Van Assche +Date: Sun Apr 12 04:12:43 2020 +0000 + + testing/fulltests/support/myip: Suppress Perl error messages + + Suppress the following error message: + + Constant subroutine main::AF_INET6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. + at (eval 1) line 2. + Prototype mismatch: sub main::AF_INET6 () vs none at /System/Library/Perl/5.18/Exporter.pm line 66. + at (eval 1) line 2. + usage: sin_sv = sockaddr_in6(port,iaddr)) at ../support/myip line 39. + +commit cc2eece940c5e8508d635a1620eb1cddf25fd136 +Author: Bart Van Assche +Date: Sat Apr 11 20:32:03 2020 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 5f1986c79e8b9d3d8574fc73001d6e193bed7c79 +Author: Bart Van Assche +Date: Sat Apr 11 20:11:35 2020 -0700 + + HOST-MIB: Log statfs() failures once + + See also https://github.com/net-snmp/net-snmp/issues/94. + +commit c94fdd4084fdefafaebcd3421f1c0fa644cda928 +Author: Bart Van Assche +Date: Sat Apr 11 20:10:58 2020 -0700 + + HOST-MIB: Do not assume that statfs() returns meaningful values if it fails + +commit e1b57bd02670818a44966ba4aad2a6d7ce9839b5 +Author: Bart Van Assche +Date: Sat Apr 11 19:56:31 2020 -0700 + + libsnmp: Suppress a clang warning about debug_indent() + + Suppress the following clang warning: + + snmp_debug.c:91:19: warning: adding 'unsigned long' to a string does not append\ + to the string [-Wstring-plus-int] + return SPACES + sizeof(SPACES) - 1 - debugindent; + ~~~~~~~^~~~~~~~~~~~~~~~ + snmp_debug.c:91:19: note: use array indexing to silence this warning + return SPACES + sizeof(SPACES) - 1 - debugindent; + ^ + & [ ] + +commit 23fe19d9b63df63446c4f39ae1c9a60cd9c198d0 +Author: Bart Van Assche +Date: Sat Apr 11 17:15:55 2020 -0700 + + testing/fulltests/support/myip: Make this work with older Perl versions + + Older Perl versions have Socket6 and Socket modules. Newer Perl versions + support the Socket module but not Socket6. Make the myip script work with + all Perl versions. + +commit bf4964241391b197e1ce2afca225b684f94f7451 +Author: Bart Van Assche +Date: Sun Apr 12 01:54:58 2020 +0000 + + IF-MIB: Fix regexec() argument types + + Fixes: e6795b2d67b4 ("IF-MIB: Add regex support for include_ifmib_iface_prefix") + +commit 9180ccb8772f7cd3317afcb6db676c8bdeedbcb9 +Author: Bart Van Assche +Date: Sat Apr 11 18:31:27 2020 -0700 + + NetBSD: Fix compilation of snmplib/snmpksm.c + +commit 6d722dcf108055c24e783cb367cb6985f11bd850 +Author: Bart Van Assche +Date: Sat Apr 11 11:33:21 2020 -0700 + + Regenerate the configure script + + Fixes: e65031b76367 ("CHANGES: building: Remove extra argument to NETSNMP_SEARCH_LIBS to make libnl-3 end up in the right group of libraries") + +commit e65031b76367696234f7f0e7ecb2d0379e094457 +Author: Magnus Fromreide +Date: Tue Apr 7 05:41:14 2020 +0200 + + CHANGES: building: Remove extra argument to NETSNMP_SEARCH_LIBS to make libnl-3 end up in the right group of libraries + +commit b04dd9585aee57615edc2f973ac3b43a3c758812 +Author: Magnus Fromreide +Date: Mon Apr 6 02:46:12 2020 +0200 + + CHANGES: net-snmp-config: Allow nine or more files in --compile-subagent + +commit b078c7eac1d98c340d3682341ae7d0ceb3504f12 +Author: Bart Van Assche +Date: Sat Apr 4 19:40:02 2020 -0700 + + Revert "swinst_apt: Use dpkg for modified date" + + The reasons for the revert are: + - The modified_date_t change that I made is wrong. + - Apparently not all Debian systems support ${db-fsys:Last-Modified}. From + the dpkg man page: "It contains the timestamp in seconds of the last time + the package filesystem entries were modified (since dpkg 1.19.3)." + +commit 001cbbc32a8be87041ddb7a80a3642550691ecfb +Author: Craig Small +Date: Sat Apr 4 12:00:43 2020 +1100 + + swinst_apt: Use dpkg for modified date + + Instead of trawling through dpkg's files, let dpkg-query tell us + when the package was last modified. It means if the directory + changes or any other internal changes happen, this will still + keep working. + + db-sys:Last-Modified field has been in since dpkg-query 1.19.3 + which means it works for Debian stable (Buster) onwards. + + References: https://bugs.debian.org/905668 + + [ bvanassche: reworked an unsafe cast ] + +commit d6551405ddcbdc003302d991cc550270c701d9db +Author: Bart Van Assche +Date: Tue Mar 31 20:51:48 2020 -0700 + + ci: Move the mariadb installation code from .travis.yml into ci/before.sh + + Additionally, display /etc/hosts on all operating systems. + +commit 49485cd90f9e978d2e68678f9efdff0a645a34d2 +Author: Bart Van Assche +Date: Fri Mar 27 21:54:02 2020 -0700 + + testing/fulltests/support/clib_build: Fix a recently introduced bug + + Prevent that linking the regression tests fails as follows on Ubuntu: + /usr/bin/ld: cannot find -lnetsnmpmibs + /usr/bin/ld: cannot find -lnetsnmpagent + collect2: error: ld returned 1 exit status + + Fixes: 9db9d55f9511 ("testing: Add a unit test for run_exec_command()") + +commit e6795b2d67b45dddcb4deb99e9af51f7659d5a0c +Author: lbw +Date: Sat Mar 21 17:03:21 2020 +1100 + + IF-MIB: Add regex support for include_ifmib_iface_prefix + + [ bvanassche: consolidated error paths ] + +commit b49ff2207661c48bad46bb312f6f0627ffbbb825 +Author: Bart Van Assche +Date: Sun Mar 22 21:33:00 2020 -0700 + + testing/fulltests/unit-tests/T024run_exec_command_clib.c, Darwin: Fix executable paths + +commit 418dd7012dd45612b6506d6519e128ec823918d5 +Author: Bart Van Assche +Date: Sun Mar 22 21:29:04 2020 -0700 + + agent/netsnmp_close_fds.c, Darwin: Suppress two compiler warnings + +commit 5459b69c4bc0f228f2e329b5913320a8d5acccc9 +Author: Bart Van Assche +Date: Sun Mar 22 20:51:32 2020 -0700 + + ci: .travis.yml: Add Python 3 packages + +commit f0bca593510e3776c6aca1c44556ae04e7a1109b +Author: Bart Van Assche +Date: Sun Mar 22 15:34:04 2020 -0700 + + agent/mibgroup/utilities/execute.c: Handle errors instead of ignoring these + +commit 166a236be4f76796db0a49917415b790eec9ef89 +Author: Bart Van Assche +Date: Sun Mar 22 15:30:33 2020 -0700 + + agent/mibgroup/utilities/execute.c: Fix tokenize_exec_command() + + Do not discard the 100th argument. Fix a buffer overflow. + +commit 85a536c06f4de67fbb4f0382d4137be4b97b7ff3 +Author: Bart Van Assche +Date: Sun Mar 22 15:41:55 2020 -0700 + + agent/mibgroup/utilities/execute.c: Remove the setPerrorstatus() macro + +commit 6a666952e58c69225a2c681cc2059de7a782c4ee +Author: Bart Van Assche +Date: Sun Mar 22 15:28:16 2020 -0700 + + agent/mibgroup/utilities/execute.c: Declare input arguments const + +commit f8f6cb8e7513f38c782bf96a285e2f81cfeb98f1 +Author: Bart Van Assche +Date: Sun Mar 22 15:26:12 2020 -0700 + + agent/mibgroup/utilities/execute.c: Convert tabs into spaces + +commit 9db9d55f95116300c282aa48dd329764773af59b +Author: Bart Van Assche +Date: Sun Mar 22 16:22:36 2020 -0700 + + testing: Add a unit test for run_exec_command() + +commit a524e99cb6524353883c72721f6df5b470740408 +Author: Igor Ryzhov +Date: Fri Mar 20 16:45:41 2020 +0300 + + mib2c: fix size_t format specifier in mfd generated code + + Signed-off-by: Igor Ryzhov + +commit 6141634d652cbd5a9e20982c88b95984d093099b +Author: Bart Van Assche +Date: Sat Mar 21 20:52:37 2020 -0700 + + libsnmp: Fix a potential buffer overflow in netsnmp_tlstmAddr_restore_common() + + This patch fixes the following Coverity complaint: + + CID 344591 (#1 of 1): Out-of-bounds access (OVERRUN) + 5. overrun-buffer-arg: Overrunning array fingerprint of 256 bytes by passing + it to a function which accesses it at byte offset 256 using argument fp_len + (which evaluates to 256). + +commit 3d5eab844a70367d2ea00a93ad37206ec7b91793 +Author: Bart Van Assche +Date: Sat Mar 21 20:48:08 2020 -0700 + + libsnmp: Document the is_labelchar() argument range + + This patch suppresses the following Coverity complaint: + + CID 344592 (#1 of 1): Improper use of negative value (NEGATIVE_RETURNS) + 32. negative_returns: ch_next = netsnmp_getc(fp) is passed to a parameter + that cannot be negative. + +commit 3f9aa163160e96b877f975519415ce3277d5da0a +Author: Bart Van Assche +Date: Sat Mar 21 20:44:16 2020 -0700 + + snmplib/sd-daemon.c: Check LISTEN_FDS before using it + + This patch fixes the following Coverity complaint: + + CID 344596 (#1 of 1): Untrusted loop bound (TAINTED_SCALAR) + 15. tainted_data: Using tainted variable 3 + (int)l as a loop boundary. + +commit b67afb81eb0f7ad89496cd3e672654bfd8c55d0e +Author: Bart Van Assche +Date: Sat Mar 21 20:03:13 2020 -0700 + + snmpd: UCD-SNMP proxy: Fix a crash triggered by a wrong passphrase + + See also https://github.com/net-snmp/net-snmp/issues/82 . + +commit b83b0ddcf8fa27108b198bbb0fe247e18d2dae4f +Author: Bart Van Assche +Date: Sat Mar 21 20:01:18 2020 -0700 + + libsnmp: Improve snmp_async_send() and snmp_sess_async_send() documentation + +commit 2e517c5d60fcf9f96d2ad8045e7aec9b60dec041 +Author: Bart Van Assche +Date: Sat Mar 21 13:59:27 2020 -0700 + + Python: Port to Python 3 + + Make the configure script look for the 'python3' interpreter instead of + 'python'. Make all Python source code compatible with Python 2.7 and + Python 3. Make python/netsnmp/client_intf.c compatibly with Python 2.7 + and Python 3. + +commit 7fd595cbdf0fe855aafaf54fcc39e8b3b2f96c08 +Author: Bart Van Assche +Date: Sat Mar 21 14:24:16 2020 -0700 + + python/netsnmp/client_intf.c: Improve coding style conformance + + Limit source code to 80 columns, move the body of if-statements to a + separate line and leave a blank line after declarations. + +commit 9619aa41d5cf353ec1d9b94d3ed4b4a61a51bc34 +Author: Bart Van Assche +Date: Sat Mar 21 14:54:46 2020 -0700 + + python/netsnmp/client_intf.c: Add more comments + +commit dfd0b638dd5ce9cabcc65afbd589a3177749fac3 +Author: Bart Van Assche +Date: Sat Mar 21 15:10:14 2020 -0700 + + python/netsnmp/client_intf.c: Change the return type of py_netsnmp_attr_long() from long long into long + + The type 'long' is big enough to fit all possible return values. + +commit 3fb925a5a93ab2326b588899d81e0e412e0f321b +Author: Bart Van Assche +Date: Sat Mar 21 15:08:16 2020 -0700 + + python/netsnmp/client_intf.c: Fix the netsnmp_create_session_tunneled() return value + +commit d9577374329fa4516ba0220bc8ff68c3f316b430 +Author: Bart Van Assche +Date: Sat Mar 21 13:35:10 2020 -0700 + + Python: Reorder function definitions + + Reorder function definitions such that the forward declarations can be + removed. + +commit df1c17d2a0d1ba2a3130c9fdd2bd4c03dba4a947 +Author: Bart Van Assche +Date: Fri Mar 20 20:36:21 2020 -0700 + + Perl: Complain about attempts to send a TRAP with an unsupported SNMP version + +commit 883b354d4be90c13166bc11eb8ac65880f51e57d +Author: Peter Valdemar Mørch +Date: Wed Sep 25 18:13:36 2019 +0200 + + Perl: Allow informs to be sent with SNMP v2(c). + + Before informs required SNMP v3. But informs actually work just fine + with v2c too too. + +commit dfe3c8bdff9bceb796fc9425ef21676a99138d33 +Author: Bart Van Assche +Date: Wed Mar 18 21:54:28 2020 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 62eea843bf46162db557e7f39f87958de2fee26a +Author: Igor Ryzhov +Date: Wed Mar 18 22:24:27 2020 +0300 + + mib2c: use struct counter64 instead of U64 in generated code + + The U64 typedef was replaced with struct counter64 in net-snmp + code because of the conflicts with Perl headers. But mib2c still + generates the code with U64. + + Signed-off-by: Igor Ryzhov + [ bvanassche: Adjusted indentation of source code comments ] + +commit 1a8b31c175e69e0e0a8ef6b7068aff6c45980eea +Author: Bart Van Assche +Date: Sun Mar 15 21:55:36 2020 -0700 + + CHANGES: configure: Assume that memcmp() works + + From the autoconf documentation: "Macro: AC_FUNC_MEMCMP. If the memcmp + function is not available, or does not work on 8-bit data (like the one + on SunOS 4.1.3), or fails when comparing 16 bytes or more and with at + least one buffer not starting on a 4-byte boundary (such as the one on + NeXT x86 OpenStep), require an AC_LIBOBJ replacement for `memcmp`. + + This macro is obsolescent, as current systems have a working memcmp. + New programs need not use this macro." + + Hence remove the AC_FUNC_MEMCMP invocation. + + See also https://github.com/net-snmp/net-snmp/issues/81. + +commit 8c02e747d35d1df12c3482895879caf38e448c44 +Author: Niels Baggesen +Date: Wed Mar 11 20:38:50 2020 +0100 + + fsys_mrtent: add glusterfs as a recognized filesystem type. + Thanks to Josef Ricky. + +commit 3bc8e2de4e54b7c5f72f0c4d1b753d0c32ae9805 +Author: Niels Baggesen +Date: Wed Mar 11 20:26:27 2020 +0100 + + snmplib/parse: change the tclist (TEXTUAL-CONVENTION) data structure + to be dynamically allocated. + +commit ddb3a0b1f8b8cf2734f9c2cc4e434c79370b2cb5 +Author: Mukesh Jain +Date: Tue Mar 3 03:47:49 2020 +0530 + + snmpd: Fix a memory leak in handle_agentx_packet() + + Fix a memory leak when contextName is used in the PDU. The memory for + contextName is assigned to community and is hence lost. This patch + fixes the following Valgrind complaint: + + at 0x4C29EA3: malloc (vg_replace_malloc.c:309) + by 0x653F294: snmp_clone_mem (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x653F3E7: ??? (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x653F90D: snmp_clone_pdu (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x60E3837: handle_agentx_packet (in /usr/lib64/libnetsnmpagent.so.31.0.2) + by 0x6567ED0: ??? (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x6568F40: _sess_read (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x65698A8: snmp_sess_read2 (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x65698FA: snmp_read2 (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x656993B: snmp_read (in /usr/lib64/libnetsnmp.so.31.0.2) + by 0x60DF30A: agent_check_and_process (in /usr/lib64/libnetsnmpagent.so.31.0.2) + + See also https://github.com/net-snmp/net-snmp/pull/78. + See also https://github.com/net-snmp/net-snmp/issues/58. + + [ bvanassche: modified commit message and patch ] + +commit 67fde288efa0d07df2dbd5dcc3d39b937b69b176 +Author: Niels Baggesen +Date: Mon Mar 2 21:18:52 2020 +0100 + + Support for NetBSD 9.0 + +commit a49aa9c132cd38a9170de19b454dc27a67c2683c +Author: Bart Van Assche +Date: Fri Feb 28 20:26:34 2020 -0800 + + ci: Skip the DTLS and TLS tests + + Since the DTLS and TLS code is broken, skip the corresponding tests. + +commit b900b83258aa8b92895b9f988b02a1b086420322 +Author: Bart Van Assche +Date: Fri Feb 28 20:14:54 2020 -0800 + + libsnmp: Fix cert:map:secname fingerprint selection + + See also https://github.com/net-snmp/net-snmp/issues/75. + + Fixes: f51321751caf ("lots of new cert functionality") + +commit a7c4831997a1deaf8a6a285babea28877bae15a8 +Author: Bart Van Assche +Date: Tue Feb 25 21:15:19 2020 -0800 + + libsnmp: Surround MAKE_ENTRY() definition with do { } while (0) + +commit eecd4d23b166a49ba4840264a4763ae5f9caad0e +Author: Gisle Vanem +Date: Tue Feb 25 20:50:55 2020 +0100 + + libsnmp: Surround multiple macros with do { } while (0) + + This patch suppresses the following clang warning: + + empty expression statement has no effect; remove unnecessary ';' to silence this warning + + See also https://github.com/net-snmp/net-snmp/pull/76. + + [ bvanassche : combined three patches into one ] + +commit e1d9a6181dd46dc14101665c38a3c875d8b6f303 +Author: Bart Van Assche +Date: Sat Feb 22 14:44:18 2020 -0800 + + configure: Upgrade libtool and automake + + The parts of the configure script generated by libtool and aclocal come from + libtool v2.4 (released on 2010-09-21) and automake v1.11 (released on + 2009-05-16). Upgrade libtool to v2.4.6 and automake to v1.11.6. + +commit db50cd646a49cf18c91c63a0737eb7a704e69099 +Author: Bart Van Assche +Date: Sat Feb 22 08:13:06 2020 -0800 + + CHANGES: Remove dmalloc and efence support + + Tools like dmalloc and efence were important to root cause memory corruption + issues until about 2005, when Valgrind became available. Remove support for + dmalloc and efence since tools like Valgrind and compiler sanitizers are + superior compared to dmalloc and efence. For more information about Valgrind + and the compiler sanitizers, see also: + * http://valgrind.org/ + * https://en.wikipedia.org/wiki/AddressSanitizer + * https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html + +commit f4ae8cf7d808ba54761d6ba8bd593c7a6669b9c3 +Author: Bart Van Assche +Date: Mon Jan 14 18:39:45 2019 -0800 + + configure: Re-enable shared library support for FreeBSD 10 and later + + See also + https://lists.freebsd.org/pipermail/freebsd-current/2013-March/040460.html . + See also commit 7d66a35cd6bf ("configure: Enable shared library support for + FreeBSD 10 and later") # v5.8.1.pre1. + Fixes: 84355f7122da ("configure: Regenerate with autoconf v2.69"). + +commit 10823f0194e167b2e7860acd4f96d14380ae36b3 +Author: Bart Van Assche +Date: Sat Feb 22 07:55:55 2020 -0800 + + configure: Add exp() library to LMIBLIBS instead of LIBS + + This change allows the ceil() test to add -lm to LNETSNMPLIBS. + + This patch is a follow-up for commit d63e35a3a384 ("configure: Add -lm to + LNETSNMPLIBS if ceil() exists in libm"). + + See also https://github.com/net-snmp/net-snmp/issues/72. + +commit 21e318b418f206cd3acc22f3ff7a58b864f287f0 +Author: Bart Van Assche +Date: Fri Feb 21 20:33:07 2020 -0800 + + dist/autoconf-version: Bump to v2.69 + + Fixes: 9a2753282c6a ("new autoconf") + +commit d63e35a3a384c9f917bc4ab117d9239af2f01fc4 +Author: Bart Van Assche +Date: Fri Feb 21 19:42:11 2020 -0800 + + configure: Add -lm to LNETSNMPLIBS if ceil() exists in libm + + See also https://github.com/net-snmp/net-snmp/issues/72. + + Reported-by: Stuart Henderson + Fixes: 7497e2eade8a ("check if libm is needed for ceil function") # v5.8.pre2 + +commit f0f9279ad18ff03542e6dae156b6633628d36762 +Author: Stuart Henderson +Date: Fri Feb 21 14:59:21 2020 +0000 + + TCP-MIB, UDP-MIB: Fix these tables for OpenBSD >= 5.6 + + OpenBSD changed from CIRCLEQ to TAILQ for inpt_queue in OpenBSD 5.6 + (November 2014), the version of Net-SNMP in ports has been carrying this + patch since then. + + [ bvanassche: modified patch title ] + +commit bd276c697ae51cb7744b6731477f67203430cdbf +Author: Stuart Henderson +Date: Fri Feb 21 14:56:05 2020 +0000 + + snmpps: Avoid null pointer dereference for SNMP_NOSUCHOBJECT + + Handle SNMP_NOSUCHOBJECT as well as SNMP_NOSUCHINSTANCE. If snmpps/snmptop + are pointed at an agent which doesn't provide the required objects, before + this change it tries to dereference a null pointer when setting the + variables (noticed against OpenBSD snmpd which only implements part of + hrSWRunPerf and misses CPU/Mem). + + [ bvanassche: modified patch description ] + +commit 9a2753282c6a8dc09ed5dc4bc01683e8ba1f4850 +Author: Wes Hardaker +Date: Thu Feb 20 14:23:41 2020 -0800 + + new autoconf + +---------------------------------------------------------------------- + +Changes: V5.8.1.pre1 -> V5.8.1.pre2 + +commit 8436b3bbf944b87873e31c3c81694f03635082bf +Author: Wes Hardaker +Date: Tue Feb 18 15:41:04 2020 -0800 + + Version number update: 5.8.1.pre2 + +commit 473734ac3302210b4bf4175e20657029d55439e5 +Author: Bart Van Assche +Date: Sat Feb 8 09:36:58 2020 -0800 + + perl: Use netsnmp_memdup() where appropriate + +commit dac831d3220e2ff9013955a314aada6c1c88fef5 +Author: Bart Van Assche +Date: Fri Feb 7 20:13:06 2020 -0800 + + perl: Allow empty strings in notifications + + Adding a string of length zero is not necessarily an error. In fact, treating + it as such, prevents us from sending the empty string as an otherwise valid + OCTET STRING in traps/notifications. + + This is a modified version of a patch provided by Peter Valdemar Mørch + . + +commit 6725c4f7219fca50b7e455bcf2efc5bdfe7e9469 +Author: Bart Van Assche +Date: Fri Feb 7 20:06:52 2020 -0800 + + perl: Only call netsnmp_malloc() if necessary + + Change the netsnmp_malloc() call into a netsnmp_memdup() call and only call + that function if len > 0. + + This is a modified version of a patch provided by Peter Valdemar Mørch + . + +commit db95f59860c0d06e3aa591e71a278630dc3f48ee +Author: Alexander Dahl +Date: Wed Feb 5 01:49:37 2020 +0100 + + Add unit test for int8_t input to snmp_set_var_value() + + This new test fails on 32bit arm, e.g. on Raspberry Pi, but not on x86 + or x86_64. See output of a failing test: + + Testing snmp_set_var_value() ................................ 1/? + not ok 3 - 128 =?= -128 + not ok 5 - 233 =?= -23 + not ok 7 - 255 =?= -1 + Testing snmp_set_var_value() ................................ Failed 3/13 subtests + + Reason is type "char" can be signed or unsigned, but + snmp_set_var_value() implicitly assumes "char" is always signed. + + [ bvanassche: reformatted unit test source code ] + +commit a3a4e65b5d4fdd37520d75e74d5f0f57501326a4 +Author: Alexander Dahl +Date: Tue Feb 4 15:34:29 2020 +0100 + + libsnmp: Cast signed char to signed int when setting value + + We have an INT8 in a MIB, an Integer32(-128..127) to be more specific. + In a custom software we call 'snmp_pdu_add_variable()' with + type == ASN_INTEGER and len == 1. Deeper down the code path, we come to + 'snmp_set_var_value()' and this part: + + else if (vars->val_len == sizeof(char)) { + if (ASN_INTEGER == vars->type) { + const char *val_char + = (const char *) value; + *(vars->val.integer) = (long) *val_char; + } else { + const u_char *val_uchar + = (const u_char *) value; + *(vars->val.integer) = (unsigned long) *val_uchar; + } + + Obviously the intent is to cast depending on whether the integer is + supposed to be signed or not, but although he jumps to the right code + path here, the result in vars->val.integer is wrong then. It does not + work with type 'char' like above. + + We got values looking unsigned added to our pdu which we set to our + net-snmp server then and got them back unsigned on SNMP get requests + later, for example we fed an int8_t with value -32 we read back 224. + + So this patch explicitly uses type 'signed char' which works for us. + + Compiler is gcc 4.7 and we're cross-compiling for + arm-v5te-linux-gnueabi on Linux. + + Fixes: 8e7458661b0eeb72d787a69cb915c16b151beee1 + Signed-off-by: Alexander Dahl + +commit dd6cb372db7c1d7ca606c0d13c48f20148da8038 +Author: Bart Van Assche +Date: Sat Feb 1 11:21:47 2020 -0800 + + FreeBSD, HOST-RESOURCES-MIB: Fix two compiler warnings + + Fix the following compiler warnings: + + hardware/cpu/cpu_sysctl.c:204:20: warning: unused variable 'mem_mib' [-Wunused-variable] + int mem_mib[] = { CTL_VM, NETSNMP_VM_STATS }; + ^ + hardware/cpu/cpu_sysctl.c:205:20: warning: unused variable 'mem_size' [-Wunused-variable] + size_t mem_size = sizeof(NETSNMP_VM_STATS_TYPE); + ^ + + Fixes: 2bbad43c53ff ("Patch for cpu_sysctl for FreeBSD 12") + +commit d4d09af41f6e794271e62a986f2216357f8f11ef +Author: Bart Van Assche +Date: Sat Feb 1 11:33:47 2020 -0800 + + FreeBSD, HOST-RESOURCES-MIB: Move a misplaced comment + +commit 5846564f5be46e0e362be894d4cb57be383c5b3d +Author: Bart Van Assche +Date: Sat Feb 1 10:28:48 2020 -0800 + + FreeBSD, HOST-MIB: Fix a memory leak in swrun_kinfo.c + + See also: + * https://sourceforge.net/p/net-snmp/bugs/2717/. + * https://sourceforge.net/p/net-snmp/patches/1341/. + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219072. + +commit 7229e320abd63512ba7e9d69adaa5f44553c6566 +Author: Bart Van Assche +Date: Sat Feb 1 10:11:34 2020 -0800 + + HOST-MIB: Remove a superfluous include directive + + The only source file from which _ftime() is called is snmplib/gettimeofday.c. + Hence do not include from the host MIB implementation. + +commit 0ded321a1588b7e1281f505c2f6266aa979168c6 +Author: Thomas Abraham +Date: Tue Jan 7 11:20:39 2020 -0500 + + Recognize NSS pools and NSS volumes (Open Enterprise Server) + +commit bd92f4d6fec0dd278c8092c95437d09903c16bb2 +Author: Bart Van Assche +Date: Fri Jan 3 18:33:28 2020 -0800 + + configure, include/net-snmp/net-snmp-config.h.in: Fix a description + + Fixes: 5da4fc8c8e08 ("MinGW64: Fix select() and ioctlsocket() calls") + +commit d3e17f70f26898dfe870cff03c56be628b9c0fd2 +Author: Bart Van Assche +Date: Sat Dec 7 15:34:31 2019 -0800 + + Fix -D_FORTIFY_SOURCE=1 compiler warnings + + See also https://github.com/net-snmp/net-snmp/issues/51 + + Reported-by: coding@rms95.nl + +commit 2c837e1811b49278d8ec34185f14c2651adeda79 +Author: Bart Van Assche +Date: Sun Nov 24 16:51:44 2019 -0800 + + ci/perl.bat: Bump the Perl version from 5.31.2 to 5.31.6 + +commit d418c635e68a95711b617c4d348fb806746329df +Author: Bart Van Assche +Date: Fri Nov 29 20:21:52 2019 -0800 + + ci/net-snmp-run-tests: Do not run the DTLS tests + + Do not run the DTLS tests since these tests fail systematically against + OpenSSL version 1.1.1 and later. + +commit f67a451c509a0482c37ea53989bdde3b68ac4f43 +Author: Bart Van Assche +Date: Fri Nov 29 19:26:59 2019 -0800 + + testing/RUNFULLTESTS: Add command line option -e for excluding tests + +commit 9fe45caf87ae6faf405d938ce0dfb6e3456bed4e +Author: Bart Van Assche +Date: Thu Nov 28 20:56:09 2019 -0800 + + libsnmp: Fix spelling of 'implementation' in a source code comment + +commit 964700dc4382e7b39cc58438a4c48d50ea2a266f +Author: Bart Van Assche +Date: Tue Nov 26 18:38:08 2019 -0800 + + .gitignore: Add netsnmp.pc and netsnmp-agent.pc + + See also https://github.com/net-snmp/net-snmp/issues/42. + +commit 6624b240e034e8f8a85acd09d19519150df2c0a3 +Author: Sam Tannous +Date: Wed Nov 13 11:20:46 2019 -0800 + + Add new config option to limit max number of interfaces for IF-MIB + + This patch introduces a new config option "ifmib_max_num_ifaces NUM" + This patch sets the maximum number of interfaces included in IF-MIB + data collection. For servers with a large number of interfaces + (ppp, dummy, bridge, etc) the IF-MIB processing will take a large + chunk of CPU for ioctl calls (on Linux). Setting a reasonable + maximum number of ifaces for the CPU used will reduce the CPU + load for IF-MIB processing. For example, configuring + "ifmib_max_num_ifaces 500" will include only the first 500 + interfaces based on ifindex and ignore all others for IF-MIB + processing. + + Signed-off-by: Sam Tannous + [ bvanassche: combined two patches into one and removed one unused variable ] + +commit 0a6e8c3311594e6449fc2b4df52ca03556b890bc +Author: Bart Van Assche +Date: Mon Oct 28 18:54:48 2019 -0700 + + libsnmp: Re-export two USM functions + + See also commit ee65591fba88 ("libsnmp, USM: Unexport more functions"). + + Reported-by: Joe Clark + +commit b4ec525601709d4004d5c0746f0d6f62111b5006 +Author: Bart Van Assche +Date: Wed Oct 23 14:18:13 2019 -0700 + + libsnmp: Port to OpenSSL 1.1.1e + + See also OpenSSL commit b13342e933c5 ("Modernise the ERR functionality + further (new functions and deprecations)"). + +commit b0f60ff42e0126a71f97b9733f2df211b37342d0 +Author: Sam Tannous +Date: Wed Oct 9 12:58:14 2019 -0700 + + Reduce CPU load for IF-MIB on Linux servers with large number of interfaces + + This patch introduces a new configution option to limit the number + of interfaces that the IF-MIB will process. On Linux servers with a + large number of interfaces (ppp, dummy, bridge, etc.), the IF-MIB + timer based stats collector can take a large amount of CPU processing. + + The new config option "include_ifmib_iface_prefix" takes a space + separated string of ifname prefixes ("eth lo bridg") and will only + include interfaces with these prefixes in the IF-MIB tables. + + If this config option is not present (the default), all interfaces + will continue to be processed in the IF-MIB. + + Signed-off-by: Sam Tannous + [ bvanassche: Moved the netsnmp_access_interface_init() call from + init_mib_modules() into the MIB implementations that depend on that call. ] + +commit 0917aead00854aa7458fa5f7341f01261aa88bb6 +Author: Bart Van Assche +Date: Tue Oct 22 07:51:14 2019 -0700 + + libsnmp: Restore the second argument of snmp_parse() + + Since converting a netsnmp_session pointer into a struct session_list + pointer is not possible if a session has not been registered, restore + the second argument of snmp_parse(). This patch reverts f11583ee7bef + ("libsnmp: Remove one argument from snmp_parse()"). + +commit 34991ccfc3494ab4ea987adbbe6d6deb207153f7 +Author: Bart Van Assche +Date: Sat Oct 19 09:30:30 2019 -0700 + + libsnmp: Document snmp_build() and snmp_parse() + +commit 46a49c9f692073e7bf5742578e9668b3e366a402 +Author: Sławomir Nizio +Date: Fri Oct 18 12:53:11 2019 +0200 + + libsnmp: Expose snmp_build and snmp_parse + + [ bvanassche: Ported this patch to the v5.8 branch ] + +commit f11583ee7bef26c56408d6416054a904fa8521ca +Author: Bart Van Assche +Date: Sat Oct 19 10:17:50 2019 -0700 + + libsnmp: Remove one argument from snmp_parse() + + Since all snmp_parse() callers pass slp->session as the second argument + to this function, this patch does not change any functionality. + +commit 8b957a68307fa0da7f6f4c4ad04142d9189b601f +Author: Bart Van Assche +Date: Wed Oct 16 18:55:26 2019 -0700 + + Makefiles: Remove the LIB_LD_LIBS variable + + This variable is never set, hence remove all occurrences. + +commit 361b93b76c87cd422f4ff670358351363241f15c +Author: Bart Van Assche +Date: Wed Oct 16 18:44:27 2019 -0700 + + agent: Fix libnetsnmptrapd linker flags + + See also https://github.com/net-snmp/net-snmp/issues/29. + + Fixes: e09bf1a5f2bf ("Use libtool for building"). + Signed-off-by: Craig Small + [ bvanassche: Removed use of $(CPPFLAGS) while generating 'sedscript' ] + +commit 9201c9479ffa78033aaff6ccf5f4f1a34a33791e +Author: Bart Van Assche +Date: Tue Oct 15 20:27:57 2019 -0700 + + agent: Improve robustness of handle_subagent_set_response() + + Several users have reported that 'retsess' can be NULL. Avoid that the + agent crashes if retsess == NULL. See also: + * https://sourceforge.net/p/net-snmp/mailman/message/29293701/ + * https://sourceforge.net/p/net-snmp/bugs/2468/ + * https://github.com/net-snmp/net-snmp/issues/28 + +commit 5a0ac74b93efab05ee7fca3b13adc304c848dc28 +Author: Bart Van Assche +Date: Sat Oct 12 21:25:09 2019 -0700 + + apps: Fix potential buffer overflows + + This patch fixes the following Coverity complaint: + CID 85476: Out-of-bounds access (OVERRUN) + overrun-buffer-arg: Overrunning buffer pointed to by &base[base_length] of 1024 bytes by passing it to a function which accesses it at byte offset 1031 using argument indexlen * 8UL (which evaluates to 8). + +commit 9b65cf7edc31f6fb053c78bfaa2120e65dcb4719 +Author: Bart Van Assche +Date: Sat Oct 12 21:16:21 2019 -0700 + + apps/snmptop: Fix a memory leak complaint reported by Coverity + + Fix the following Coverity complaint: + CID 85620: Resource leak (RESOURCE_LEAK) + leaked_storage: Variable oproc going out of scope leaks the storage it points to. + +commit d0787a2c86a80e31756965c436fac67b7d1c0f9b +Author: Bart Van Assche +Date: Fri Oct 11 20:09:08 2019 -0700 + + HOST-RESOURCES-MIB, UCD-SNMP-MIB: Report empty strings correctly + + See also https://github.com/net-snmp/net-snmp/issues/26. + + Fixes: 9b9c0e287b4d ("MIBs: Use asprintf() instead of snprintf() to prevent truncation") + +commit 76c4ea51a48d36458ee7cb31918535a2f421408a +Author: Bart Van Assche +Date: Fri Oct 11 18:11:26 2019 -0700 + + LM-SENSORS-MIB: Log an error message if initialization fails + +commit a8651678216d48c91c58e4aba6a6bd269383a122 +Author: Bart Van Assche +Date: Sun Oct 6 19:55:00 2019 -0700 + + libsnmp, netsnmp_tlstmAddr_restore_common(): Fix potential buffer overflows + + Make sure that netsnmp_tlstmAddr_restore_common() does not write past the + end of the buffers passed as arguments. This patch fixes e.g. the following + Coverity complaint: + + CID 344598: Out-of-bounds access (OVERRUN) + overrun-buffer-arg: Overrunning array name of 256 bytes by passing it to a function which accesses it at byte offset 256 using argument name_len (which evaluates to 256). + +commit 48d06b9b46840e3933288dc1d09cdd58f21f55c9 +Author: Bart Van Assche +Date: Sun Oct 6 11:49:21 2019 -0700 + + libsnmp: Remove a check from encode_keychange() + + All callers pass a valid kcstring_len pointer. Remove a test of that + pointer. This patch fixes the following Coverity complaint: + + CID 266316: Dereference after null check (FORWARD_NULL) + var_deref_op: Dereferencing null pointer kcstring_len. + +commit ac09ffc5487ce3cae6f3f08e2dee5e01a89ef063 +Author: Bart Van Assche +Date: Sun Oct 6 09:51:30 2019 -0700 + + libsnmp, DTLSUDP transport: Remove a superfluous pointer check + + All f_fmtaddr() callers dereference the transport pointer. This patch + fixes the following Coverity complaint: + + CID 341230: Dereference after null check (FORWARD_NULL) + var_deref_op: Dereferencing null pointer t. + +commit 8e6a1d6d6088bd85436c0184fbe30eec32a47e7f +Author: Bart Van Assche +Date: Sun Oct 6 09:47:45 2019 -0700 + + libsnmp: Fix a NULL pointer dereference in the asn_build_string() debug code + + This patch fixes + CID 344578: Dereference after null check (FORWARD_NULL) + var_deref_model: Passing null pointer str to sprint_realloc_asciistring, which dereferences it. + +commit 776308793cd4683dac7ef7605487c66ac908560f +Author: Bart Van Assche +Date: Sun Oct 6 07:28:33 2019 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 05c544a48e45371d4450338c356c68503a7a45e6 +Author: Bart Van Assche +Date: Sat Oct 5 20:47:12 2019 -0700 + + IP-MIB: Fix a memory leak in an error path + + This patch fixes the following Coverity complaint: + + CID 344587 (#2 of 2): Resource leak (RESOURCE_LEAK) + leaked_storage: Variable bcastentry going out of scope leaks the storage it points to. + +commit da8c970d534c41455267ad5352ef06cc757c4c47 +Author: Bart Van Assche +Date: Sat Oct 5 20:44:38 2019 -0700 + + libsnmp, DTLSUDP transport: Fix memory leaks in error paths + +commit 7efdf32d3281e113cc6bff6aca4f5a4354345de5 +Author: Bart Van Assche +Date: Sat Oct 5 20:43:08 2019 -0700 + + libsnmp, DTLSUDP transport: Use free() to free buffers allocated with malloc() + + This patch addresses the following Coverity complaint: + + CID 344589 (#1 of 1): Incorrect deallocator used (ALLOC_FREE_MISMATCH) + free: Calling CRYPTO_free frees buffer using CRYPTO_free but it should have been freed using free. + +commit 2f114d1d253fdb91de839ec874d46cd55e174d62 +Author: Bart Van Assche +Date: Sat Oct 5 20:32:00 2019 -0700 + + Linux: Stop including the header file + + According to the glibc authors is considered deprecated on + Linux and including that header file triggers a compiler warning. See also + https://savannah.gnu.org/forum/forum.php?forum_id=9515. + +commit 56e1909436c525753e42f82e608b6b47dbb83884 +Author: Bart Van Assche +Date: Sat Oct 5 18:00:43 2019 -0700 + + libsnmp, UDP shared transport: Handle memory allocation failures properly + + This patch fixes the following Coverity complaint: + + CID 344602: Write to pointer after free (USE_AFTER_FREE) + double_free: Calling netsnmp_transport_free frees pointer t which has already been freed. + +commit 5eb25dac673782219ebc24621294960fbff5415e +Author: Bart Van Assche +Date: Sat Oct 5 17:44:56 2019 -0700 + + libsnmp: Fix an out-of-bounds read + + This patch fixes the following Coverity complaint about the + snmp_set_var_value() call in get_first_logging_entry() in nsLogging.c: + + CID 344604 (#1 of 1): Out-of-bounds access (OVERRUN) + overrun-buffer-val: Overrunning buffer pointed to by (u_char *)&temp of 8 bytes by passing it to a function which accesses it at byte offset 15. + +commit 2ea95d6e4f5bd2426f39e08c7276a8582b02043b +Author: Bart Van Assche +Date: Sat Oct 5 17:37:03 2019 -0700 + + LM-SENSORS-MIB: Fix a use-after-free in case registration fails + + This patch fixes CID 344606: Use after free (USE_AFTER_FREE) + pass_freed_arg: Passing freed pointer reg as an argument to netsnmp_inject_handler_before. + +commit 5d61e93672004cea961f1b9129ee3b84e7e1701c +Author: Bart Van Assche +Date: Sat Oct 5 17:31:27 2019 -0700 + + snmplib, UDP transport: Do not compare array pointers against NULL + + Comparing an array pointer against NULL is not useful. This was detected by + Coverity. See also commit 02de400544de ("libsnmp: Set Linux VRF iface on + Trap sink IP addresses"). + +commit f7d52958c71345900492abe29d05e6efe5ff7428 +Author: Benjamin Hesmans +Date: Tue Oct 1 16:12:05 2019 +0200 + + HOST-MIB: Fix hrSWRunPath reported string length + + ``` + snprintf (...) return value is the number of characters (excluding the + terminating null byte) which would have been written to the final string + if enough space had been available. + ``` + + The length of the string reported was not correct because of this. + + snmpget would then misinterpret the value like : + + iso.3.6.1.2.1.25.4.2.1.4.19031 = Hex-STRING: 2F 74 6D 70 2F 6C 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6E 67 2F 6C 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F + 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 00 + 00 2D 70 6F 20 2D 72 61 6F 65 6B 72 6B 20 65 72 + 61 7A 00 00 00 00 + + after the patch : + + iso.3.6.1.2.1.25.4.2.1.4.19031 = STRING: + "/tmp/loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong/loooooooooooooooooooooooooooooooooooooooooooooooooooo" + + Signed-off-by: Benjamin Hesmans + [ bvanassche: changed patch title ] + +commit e5b55323c00544b10e4780a752e1daad504e9d9e +Author: Bart Van Assche +Date: Tue Oct 1 21:29:51 2019 -0700 + + snmpd, ip-forward-mib: Fix a NULL pointer dereference + + Dereference route_container after having checked whether or not that + pointer is NULL instead of before. See also + https://github.com/net-snmp/net-snmp/issues/15. + + This patch has been provided by Amit Sharma. + +commit 02de400544dea6804c348c457a5ea5ea5531b12d +Author: Sam Tannous +Date: Thu Sep 26 09:40:58 2019 -0700 + + libsnmp: Set Linux VRF iface on Trap sink IP addresses + + For Linux VRF support in Traps, this patch fixes an issue (#12) where + configuring and iface on the sink IP address was not being bound (via + SO_BINDTODEVICE) to the socket. This was broken for versions 1, 2c, and 3. + + While a clientaddr setting in snmp.conf could fix this, a user would have to + find and set a source IP address in the VRF to be used. This patch does not + require setting a clientaddr but simply binds the iface provided in the sink + IP address (target) to the session socket that will be used. + + Signed-off-by: Sam Tannous + [ bvanassche: made minor edits to patch description and removed one space from + the patch itself ] + +commit 160fcda849ed111f457f74310148be90670ea417 +Author: Yuri Pankov +Date: Sat Oct 6 13:48:35 2018 +0300 + + CHANGES: FreeBSD: Fix first byte of IF-MIB::ifPhysAddress + + Don't write past the interface name, and use temporary copy instead. + This fixes the first byte of ifPhysAddress always being 0 on FreeBSD. + + See also https://sourceforge.net/p/net-snmp/code/merge-requests/20/. + + [ bvanassche: edited patch title / added test for malloc() result / reduced + number of free(if_name) calls ] + +commit f059d6e66d4a0aed7b176182b9191615b7cf85ac +Author: Peter Valdemar Mørch +Date: Wed Sep 25 18:23:15 2019 +0200 + + perl: Document format of SecEngineId + +commit cff90fa9fe3afe88a498fb21a07bc7cb7cec46e8 +Author: Bart Van Assche +Date: Sun Sep 22 22:23:43 2019 -0700 + + libsnmp, TLS-TCP transport: Fix spelling in log messages + +commit feda56b6265d16f254fe70407920b2573ce78214 +Author: Bart Van Assche +Date: Sun Sep 22 21:57:36 2019 -0700 + + libsnmp: Split netsnmp_tlstcp_open() + + The length of this function hurts readability. Hence split this function. + +commit 525a063e7e7915e64fc202c656c65da45289d5cb +Author: Bart Van Assche +Date: Sun Sep 22 21:29:44 2019 -0700 + + snmplib/cert_util.c: Remove a superfluous cast + +commit d443bbd6fdbd6388387925e2457dfac54941f0d8 +Author: Bart Van Assche +Date: Fri Sep 20 07:12:57 2019 -0700 + + UCD-SNMP-MIB: Fix parsing of 'proc' directives for process names with spaces + + See also https://github.com/net-snmp/net-snmp/issues/10. + +commit 90837dcec21cc2faa55711c6f823e97c87085dd3 +Author: Bart Van Assche +Date: Sun Sep 15 16:17:14 2019 -0700 + + snmpd: Make the output of a trap debug message more detailed + + An example of the new output: + + trap: sending trap type=166, version=3 to UDP: [127.0.0.1]:162->[0.0.0.0]:37458 + + This should help with root-causing https://sourceforge.net/p/net-snmp/bugs/2978. + +commit 7d2c65836b59fa6e1cd81bf9c4d7fa21f0947056 +Author: Bart Van Assche +Date: Sun Sep 15 12:58:46 2019 -0700 + + CHANGES: snmpd: Suppress OpenVZ related error messages + + When snmpd is run inside an OpenVZ container neither /proc/bus/pci nor + /proc/diskstat are available and /proc/partitions is empty. + + See also https://sourceforge.net/p/net-snmp/bugs/2975/. + + Signed-off-by: Sergey Chernomorets + [ bvanassche: introduced init_libpci() and simplified this patch ] + +commit 2633eedde135c2e69c92b82f702da783608c6009 +Author: Bart Van Assche +Date: Sat Sep 14 10:13:40 2019 -0700 + + CHANGES: snmpd: Reduce the time needed to execute "pass" scripts on BSD systems + + See also https://github.com/net-snmp/net-snmp/issues/8. + +commit a346dbcf7f1181510a2a39f14a45eb594db26e90 +Author: Bart Van Assche +Date: Wed Sep 11 08:41:09 2019 +0100 + + agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h: Remove superfluous whitespace + +commit 90fd668641c9c113d67f959677aae7f03b6f67fe +Author: Bart Van Assche +Date: Wed Sep 11 08:27:23 2019 +0100 + + IF-MIB, MIB-II: Remove #ifdef SCNuMAX + + SCNuMAX is available on Linux since a long time. Hence remove #ifdef SCNuMAX. + +commit 9c00aaebe4316910b34f3ddc01b866db060680fc +Author: Sam Tannous +Date: Mon Sep 9 19:22:38 2019 -0700 + + linux: IF-MIB Counters (HwIfInOctets, HwIfOutOctets, etc.) became 32-bit counters + + Recently, patch 64f4ead (libsnmp: Only include when necessary) + effectively removed inttypes.h from types.h and added it back for most files + except for + + if-mib/data_access/interface_linux.c + + This turned what were 64 bit counters (SCNuMAX is no longer defined) into + 32 bit counters. + + This patch simply adds inttypes.h back to interface_linux.c + correcting the counters. + + Signed-off-by: Sam Tannous + [ bvanassche: Moved inttypes.h include directive up ] + +commit 635ccb36d32f94097021191bc77c1b211c4f4209 +Author: Anders Wallin +Date: Fri Feb 22 17:14:30 2019 +0100 + + CHANGES: BUG: 2926: Make it possible to set agentXPingInterval for a subagent + + - register agentXPingInterval for the subagent list handler, + before it was registered for snmp + - added agentxTimeout to the subagent list handler. + It's now possible to set for snmpd and the subagent. + See 'man snmpd.conf' + - added agentxRetries to the subagent list handler. + It's now possible to set for snmpd and the subagent. + See 'man snmpd.conf'. It's never used in the subagent, + but it's now following the documentation + + Signed-off-by: Anders Wallin + +commit bcb1a6b8afc444bbcd099a195e08f0b01cbc8f6b +Author: Bart Van Assche +Date: Fri Sep 6 14:51:35 2019 -0700 + + HOST-MIB, hr_filesys: Fix Check_HR_FileSys_AutoFs() + + On Linux getmntent() is available but getfsstat() not. Hence remove #if + HAVE_GETFSSTAT from around the HRFS_type check. + + See also https://sourceforge.net/p/net-snmp/patches/1350/. + + Fixes: cf41e6e91015 ("HOST-MIB: Skip autofs entries"). + +commit a2334651b84878222b6a758154b283bcf8b233ef +Author: Bart Van Assche +Date: Fri Sep 6 14:49:32 2019 -0700 + + HOST-MIB, hr_filesys: Clean up HRFS_ignores[] + + Declare the HRFS_ignores array static. Make sure that "autofs" occurs once. + Define MNTTYPE_AUTOFS if necessary. + +commit 5e416538cf035a4a0856022327f6b5494b0506e3 +Author: Wes Hardaker +Date: Wed Sep 4 14:50:22 2019 -0700 + + openssl 1.1.0 -> 1.1.1 per David Hauck + +---------------------------------------------------------------------- + +Changes: V5.8 -> V5.8.1.pre1 + +commit f69459109f64555321421501344c6965dc6355fd +Author: Wes Hardaker +Date: Tue Sep 3 08:10:21 2019 -0700 + + Version number update: 5.8.1.pre1 + +commit 1b3ef39cb7a3a7142be5b250f36770fa9a011e61 +Author: Wes Hardaker +Date: Tue Sep 3 08:04:19 2019 -0700 + + version update for 5.8.1.pre1 + +commit 5e3643e627568661daf65c4e0a9ab2be633952ef +Author: Wes Hardaker +Date: Tue Sep 3 07:59:35 2019 -0700 + + NEWS: snmpd: security vulnerabilty in the ping MIB reported by Christopher Ertl from Microsoft fixed + +commit 2b0fc439d1507a267558b26e20edda13e0ad0d09 +Author: Bill Fenner +Date: Wed Aug 28 08:21:35 2019 -0700 + + snmpd.conf: document the "-s" argument to trap* + +commit 7c073e3a1b736689135fd2ed44ede5b83790bd37 +Author: Bart Van Assche +Date: Mon Aug 26 18:32:08 2019 -0700 + + IP-MIB, Linux: Fix a memory leak in an error path + + When a Linux system is booted with "ipv6.disable=1" in the kernel command + line, the file "/proc/net/snmp6" is not created. Fix the memory leak in + _systemstats_v6_load_systemstats() that is triggered with IPv6 disabled. + + See also https://sourceforge.net/p/net-snmp/bugs/2976/. + + Reported-by: Mark E Rusk + +commit 37e498fdcde98ee93875a750dbcd5a8a9ba336b1 +Author: Bill Fenner +Date: Mon Aug 26 18:17:40 2019 -0700 + + SNMP-TARGET-MIB: express features used (broken by 58ae9e6b11) + +commit 904aefa5a241473f2075e60147a307b2250a4853 +Author: Bill Fenner +Date: Mon Aug 26 18:07:05 2019 -0700 + + ci: skip mibs that do not support read-only + +commit f8168d8f56744d1b96e776e863eae138253c18b9 +Author: Bill Fenner +Date: Mon Aug 26 14:33:30 2019 -0700 + + minimalist: adapt to semicolon-terminated feature macros + +commit a0aa55d4541906bdc7b92c9db3f4282d9aa6fb48 +Author: Bill Fenner +Date: Mon Aug 26 14:44:12 2019 -0700 + + ci: display configure command in Travis log + +commit f024ffeaef028d5db44dc40b97e53c352b573d4f +Author: Bill Fenner +Date: Mon Aug 26 14:58:08 2019 -0700 + + ci: fix env configuration + +commit 22ce0a3e6d43ca0fd7451d13328bce7b719d549f +Author: Bart Van Assche +Date: Sun Aug 25 07:44:11 2019 -0700 + + Win32: Remove most references to ActiveState Perl + + Several years ago the ActiveState Perl binaries were built with Microsoft + Visual Studio. Today the ActiveState Perl binaries are built with gcc. This + makes ActiveState Perl inappropriate for building Net-SNMP Perl modules with + Microsoft Visual Studio. Hence remove most references to ActiveState Perl. + +commit c887c216fc6a0cc9cd840e31742fba7f7bf5c8eb +Author: Bart Van Assche +Date: Wed Jan 23 20:40:00 2019 -0800 + + testing: Make it possible to run the Perl tests without installing Net-SNMP + +commit 3eadd6e2e4b2d4d118f7d4fe7ed329880c667e39 +Author: Bart Van Assche +Date: Sat Jan 12 15:28:11 2019 -0800 + + perl: Fix "use of uninitialized value $ENV{"OSTYPE"}" warnings + + The bash shell sets the OSTYPE environment variable but FreeBSD sh not. + Hence check whether $OSTYPE has been set before using its value. + + [ bvanassche: backported this patch from the master branch ] + +commit d1a3c063b58b063feec4e58d7d1245ae0644cb47 +Author: Bart Van Assche +Date: Mon Nov 19 18:59:03 2018 -0800 + + snmpd, MIB-II: Fix a compiler warning in TCP_Count_Connections() + + Avoid that the compiler reports the following on Linux: + + mibII/tcpTable.c:341:1: warning: control reaches end of non-void function [-Wreturn-type] + } + ^ + + Fixes: 7f3abe7515d5 ("Patch for tcpTable for FreeBSD 12") + + [ bvanassche: backported this patch from the master branch ] + +commit 54c71b0376b1597e01bf88187a9b807502526ec2 +Author: Bart Van Assche +Date: Wed Jun 6 11:20:42 2018 +0200 + + snmplib, MIBs, Python: Fix gcc 8 warnings + + Avoid that gcc 8 complains about incompatible function casts. This + patch does not change any functionality. + + [ bvanassche: backported this patch from the master branch ] + +commit f12c3f87e0c05c69e851ae1c152fa3c29d02f0df +Author: Robert Story +Date: Wed Nov 16 23:12:03 2016 -0500 + + Perl: Initialize session objects correctly + + [ bvanassche: backported this patch from the master branch ] + +commit 10a689b732c02ec8990400fbced0d0134b78c799 +Author: Robert Story +Date: Thu Oct 13 13:43:42 2016 -0400 + + add range check; init vars to keep compiler happy + + [ bvanassche: backported this patch from the master branch ] + +commit 87bd90d04f20dd3f73e3e7e631a442ccd419b9d3 +Author: Bart Van Assche +Date: Tue Aug 13 20:54:23 2019 -0700 + + libsnmp: Move the free_securityStateRef() call into snmp_free_pdu() + + This patch fixes a memory leak that was introduced in commit 5f881d3bf245 + ("libsnmp, USM: Introduce a reference count in struct usmStateReference"). + + This patch partially reverts commit adc9b71aba91 ("snmpd: Avoid that snmpv3 + bulkget errors result in a double free"). + + See also https://sourceforge.net/p/net-snmp/bugs/2938/. + +commit f124907b2a814dc2db2b3fd806a7cf9e83af5fc5 +Author: Bart Van Assche +Date: Sun Aug 11 12:25:22 2019 -0700 + + include/net-snmp/types.h: Remove a superfluous forward declaration + +commit 171ca693cf7b3d089e69042b5d187c45e1cf2303 +Author: Bart Van Assche +Date: Sun Aug 11 12:00:00 2019 -0700 + + doxygen.conf: Fix INCLUDE_PATH + +commit deaf0a7d29ad0a6b4e8ee84fedcc30a0edd61921 +Author: Bart Van Assche +Date: Sun Aug 11 12:11:53 2019 -0700 + + libsnmp, feature checking: Trigger a syntax error if the terminating semicolon is missing + +commit 59a6f52f1e64391d1fc08cb391651c60ff7ed047 +Author: Bart Van Assche +Date: Tue Aug 13 19:58:05 2019 -0700 + + treewide: Terminate netsnmp_feature_*() uses with a semicolon + + This patch has been generated by the following shell command: + + git grep -l netsnmp_feature_ | + while read f; do sed -i 's/^netsnmp_feature.*[^;]$/&;/' "$f"; done + +commit f3e80746fde826cf4665fb959bda78cce061c883 +Author: Bart Van Assche +Date: Mon Aug 5 20:15:37 2019 -0700 + + AgentX: Fix a use-after-free + + When calling snmp_async_send(), the callback function is called whether or + not sending succeeds. Since the agentx_got_response() callback function + frees the cache unconditionally, calling netsnmp_free_delegated_cache() + explicitly after snmp_async_send() is wrong. + + See also https://sourceforge.net/p/net-snmp/bugs/2943/. + + Fixes: f9304c83f762 ("CHANGES: PATCH 1633670: fixed snmpd crashing when an AgentX subagent disconnect in the middle of processing of a request.") # v5.8. + +commit f7972681c8d35506b75ec5fd652633b47e437869 +Author: Bart Van Assche +Date: Mon Aug 5 20:02:09 2019 -0700 + + libsnmp: Document _sess_async_send() + +commit 1300ebd66ac124139522542aef41ddc251d9f64e +Author: Bart Van Assche +Date: Mon Aug 5 20:05:17 2019 -0700 + + libsnmp: Fix Doxygen headers + +commit 9d150386ca35d0adffc7de1618ec69501f2d3bb1 +Author: Bart Van Assche +Date: Sat Aug 3 18:38:46 2019 -0700 + + winExtDLL: Call pfSnmpExtensionInitEx() even if pfSnmpExtensionInit() returns FALSE + + Fixes: https://sourceforge.net/p/net-snmp/bugs/2969/ + +commit 73f2db7f669504789626d1a4644b0a9c24311147 +Author: Bart Van Assche +Date: Sat Aug 3 17:46:29 2019 -0700 + + Win32, MSVC: Use the /MANIFEST:EMBED linker option instead of mt.exe + + This patch simplifies the Win32 Makefiles. + +commit b439755400da5954c45d055e48668f5f92d1cd55 +Author: Bart Van Assche +Date: Sat Aug 3 17:22:18 2019 -0700 + + Win32, MSVC: Remove _BIND_TO_CURRENT_VCLIBS_VERSION + + Building with _BIND_TO_CURRENT_VCLIBS_VERSION defined is considered + questionable. Hence remove _BIND_TO_CURRENT_VCLIBS_VERSION. This + patch reverts commit b0a62eb19763 ("Define _BIND_TO_CURRENT_VCLIBS_VERSION + token (as per Alex' build instructions)") # v5.7.1. + +commit ed685ee20a1bc48b1c52bf1e77a693693499971b +Author: Bart Van Assche +Date: Wed Jul 31 12:53:02 2019 -0700 + + Win32, MSVC: Enable Blumenthal AES if OpenSSL is enabled + + See also https://sourceforge.net/p/net-snmp/bugs/2966/. + +commit 620c8438f8cbf0c62deddb27b13aa25004b2dfe1 +Author: Bart Van Assche +Date: Thu Jul 25 15:19:35 2019 -0700 + + ci/perl.bat, Win32: Upgrade the Perl version from 5.30.0 to 5.31.2 + +commit bf391f4e98d4568a828d2c55f367cdddef7fa36f +Author: Bart Van Assche +Date: Sun Jul 28 20:43:48 2019 -0700 + + apps/snmptable: Remove dead code + + This patch fixes CID 345250 (#1 of 1): Logically dead code (DEADCODE) + dead_error_line: Execution cannot reach the expression (char *)buf inside this statement: printf("End of table: %s\n".... + +commit 48550f0887528fe6e74315736f398ca53aa16171 +Author: Bart Van Assche +Date: Sun Jul 28 20:45:17 2019 -0700 + + Perl modules: Fix a memory leak in an error path + + This patch fixes CID 345251 (#1 of 1): Unchecked return value (CHECKED_RETURN) + 5. check_return: Calling snmp_send without checking return value (as is done elsewhere 14 out of 15 times). + +commit 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 +Author: Bart Van Assche +Date: Sat Jul 27 19:34:09 2019 -0700 + + libsnmp, USM: Introduce a reference count in struct usmStateReference + + This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. + +commit cae2cb04e05bbf74f8bfca0a7e6836c3c8144a6c +Author: Bart Van Assche +Date: Sun Jul 28 21:07:38 2019 -0700 + + libsnmp, USM: Remove superfluous secStateRef tests + + secStateRef is never NULL. Hence remove the tests that check whether that + pointer is NULL. This was detected by Coverity. + +commit 42e21ea0279185d28219868612dbf83adac8b647 +Author: Bart Van Assche +Date: Sat Jul 27 17:48:33 2019 -0700 + + libsnmp, USM: Unexport usm_create_user_from_session_hook() + +commit 2b32a0d80576caf0cc77a101179ceebba124020e +Author: Bart Van Assche +Date: Sun Jul 21 20:44:18 2019 -0700 + + libsnmp: Fix memory leaks in usm_process_in_msg() error paths + +commit ee65591fba88648091ee3b72b1579a7b73581186 +Author: Bart Van Assche +Date: Sat Jul 27 16:42:21 2019 -0700 + + libsnmp, USM: Unexport more functions + + Additionally, remove usm_remove_usmUser() since that function has no + callers. + +commit 8a97e3b4509ad07b155febb6a7bd8d70ad5d8033 +Author: Bart Van Assche +Date: Sat Jul 27 07:29:40 2019 -0700 + + ci, Travis: Unbreak the Darwin build + + Fixes: 102dafdd1b2e ("ci: Fix ubuntu xenial build") + +commit 102dafdd1b2e2fa172008b5e84a8cf65b6bf3e40 +Author: Bart Van Assche +Date: Fri Jul 26 22:00:42 2019 -0700 + + ci: Fix ubuntu xenial build + + Apparently Travis CI switched to trusty to xenial a few days ago. Make + the Travis build work on xenial. + +commit a0df31c18c513a0d79f4d526b1af7fad48748e57 +Author: Bart Van Assche +Date: Fri Jul 26 21:40:12 2019 -0700 + + HOST-MIB: Fix a recently introduced bug + + Fixes: cf41e6e91015 ("HOST-MIB: Skip autofs entries") + + Note: this bug was not introduced by Josef but by me. + +commit aba456530704d671a74c77ed8d1e60158b1e7261 +Author: Bart Van Assche +Date: Fri Jul 26 20:58:33 2019 -0700 + + libsnmp, USM: Enable type checking for session pointers + +commit e2c452c794705cd8b036e3fc4a04c1dc4e436cff +Author: Bart Van Assche +Date: Fri Jul 26 20:27:42 2019 -0700 + + libsnmp, USM: Declare two functions 'static' + +commit b78cb2621a6dee3d7cbf5bc382a3a9a481de20ea +Author: Bart Van Assche +Date: Fri Jul 26 20:07:21 2019 -0700 + + libsnmp, USM: Unexport four user manipulating functions + +commit d20c294762fba2fd33657fc571682921de1f5458 +Author: Bart Van Assche +Date: Fri Jul 26 19:45:35 2019 -0700 + + libsnmp, USM: Unexport init_usm_post_config(), deinit_usm_post_config() and clear_user_list() + +commit 9ae17fd957dc0ca18993edc56c68f2e34133a7d9 +Author: Bart Van Assche +Date: Fri Jul 26 10:54:19 2019 -0700 + + Perl modules, Win32: Suppress C compiler warnings about integer assignments + +commit 944284745ef9d4ddc877202e258722f16e3afacb +Author: Bart Van Assche +Date: Fri Jul 26 08:18:20 2019 -0700 + + Perl modules: Split NET-SNMP-CFLAGS into NET-SNMP-INC and NET-SNMP-DEFINE + +commit 665cf2f66b9fc5a3f6afe4e75b7a1809e4a99515 +Author: Bart Van Assche +Date: Thu Jul 25 15:04:01 2019 -0700 + + ci, MSVC: Build Perl modules + +commit bca38bcc7284a9a69f4d55768a8d2eb21fe40ad4 +Author: Bart Van Assche +Date: Tue Jul 23 16:50:44 2019 -0700 + + ci, MSVC: Build and install Perl + +commit 07ed2514cc6ea863ec403eab6e2bb8bda2e6dd3e +Author: Bart Van Assche +Date: Thu Jul 25 12:40:00 2019 -0700 + + Perl modules, MSVC: Pass the OpenSSL include path to Perl MakeMaker + +commit 2a20a2a6169da21bca90ea23645ffdca6e09768c +Author: Bart Van Assche +Date: Tue Jul 23 21:36:35 2019 -0700 + + perl, Win32: Set PERL5LIB + + This is required for Perl 5.30.0. See also + https://sourceforge.net/p/net-snmp/bugs/2963/. See also + https://perldoc.perl.org/perl5260delta.html#Removal-of-the-current-directory-(%22.%22)-from-%40INC. + +commit ac6963606664099da58aa32a8c6ecac4ad7990b9 +Author: Bart Van Assche +Date: Wed Jul 24 16:38:04 2019 -0700 + + perl modules: Remove the now superfluous #define _WIN32_WINNT 0x501 + +commit 9e8c1a413b2deca943d89414c0aeab6c15f97303 +Author: Bart Van Assche +Date: Wed Jul 24 15:17:27 2019 -0700 + + Perl, MakeMaker, Win32: Define Net-SNMP C macros while building Perl modules + + This patch fixes https://sourceforge.net/p/net-snmp/bugs/2965/. + +commit f0292ee2edb038d52927f1b4330e315eadc42027 +Author: Bart Van Assche +Date: Wed Jul 24 15:23:26 2019 -0700 + + Perl, MakeMaker: Remove NetSNMPGetOpts() argument + +commit df5ac81d2a662b2085d4272a7c6fb3902e5f697d +Author: Bart Van Assche +Date: Wed Jul 24 13:09:05 2019 -0700 + + Perl, MakeMaker: Introduce AddCommonParams() + + This patch reduces code duplication. + +commit fe7558b32d52a50034332d353cb306e6a2b926db +Author: Bart Van Assche +Date: Wed Jul 24 14:40:10 2019 -0700 + + Perl, MakeMaker: Check all net-snmp-config invocations + + Fail if invoking net-snmp-config fails. + +commit 895a4c1ad8271be85bd35542f92ce80b2a3d9411 +Author: Bart Van Assche +Date: Wed Jul 24 14:21:42 2019 -0700 + + Perl, MakeMaker: Always set $MakefileSubs::basedir + + This change will allow to use $MakefileSubs::basedir on the Windows platform + in a later patch. + +commit 3d175504fd9c6aa97210e31bc610afdd6f16623d +Author: Bart Van Assche +Date: Wed Jul 24 20:39:21 2019 -0700 + + perl/MakefileSubs.pm: Set $opts->{'debug'} + + Avoid that using $opts->{'debug'} causes Perl to complain about using an + undefined value. + +commit 631bb2f2343ad4b5643f514d0e3b737b24bf00eb +Author: Bart Van Assche +Date: Wed Jul 24 14:48:19 2019 -0700 + + Perl modules: Convert to C89 function declaration syntax + +commit 2fbf8dec41710ab5d46110b07e3d1753c6ae2330 +Author: Bart Van Assche +Date: Wed Jul 24 16:01:53 2019 -0700 + + ci, Appveyor: Download and install OpenSSL once + +commit cf41e6e910158fb4c4cb546c49acd587c5f58232 +Author: Josef Ridky +Date: Wed Jul 24 07:23:47 2019 -0700 + + HOST-MIB: Skip autofs entries + + Do not call statfs() for autofs entries. + + See also https://sourceforge.net/p/net-snmp/patches/1350/. + See also https://sourceforge.net/p/net-snmp/bugs/2968/. + + [ bvanassche: Made several small edits ] + +commit 39381c4d20dd8042870c28ae3b0c16291e50b705 +Author: Bart Van Assche +Date: Tue Jul 23 10:52:28 2019 -0700 + + libsnmp: Unexport struct usmStateReference + + Certain snmpd crashes can only be fixed by introducing a reference + count in struct usmStateReference. Unexport that structure such that + changing it does not affect the ABI. + +commit bfcd20d9478bb5541fbf0bbf3bc7f857e82a3357 +Author: Bart Van Assche +Date: Tue Jul 23 08:28:38 2019 -0700 + + win32/Configure: Define NETSNMP_REMOVE_U64 + + See also https://sourceforge.net/p/net-snmp/bugs/2965/. + + Reported-by: Harmdhast + +commit 5293fe9902755b9c4ce9cb0a5fc64ed3ace0ff29 +Author: Bart Van Assche +Date: Mon Jul 22 08:55:41 2019 -0700 + + libsnmp: Fix several Valgrind complaints + + Avoid that Valgrind complains about reading uninitialized memory on + random numbers generated by the OpenSSL library. Avoid that Valgrind + complains about received SSL data not having been initialized. + +commit 51ea70063882110e69be15d338ba3b86f1d98c38 +Author: Bart Van Assche +Date: Sun Jul 21 20:55:29 2019 -0700 + + libsnmp: Optimize snmp_free_pdu() + + Remove commented-out code that would trigger a use-after-free if enabled. + Remove the memset() call that occurs just before the last free() call + since today there are better tools for detecting use-after-free issues, + e.g. Valgrind and AddressSanitizer. + +commit e59ccc374c463236416e036c8dd0702eb1da8f6f +Author: Bart Van Assche +Date: Mon Jul 22 19:12:06 2019 -0700 + + testing/fulltests/unit-tests/T104agentx_parse_cagentlib: Add to repository + + This test is a reproducer for + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14502. + +commit 8b429a54b495fb69aa2efa4f15a815aaedd69f0c +Author: Bart Van Assche +Date: Mon Jul 22 19:48:16 2019 -0700 + + AgentX: Fix an integer overflow + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14502 + +commit 341eef1b98e5406575aa4ec4708d3ab4615069ca +Author: Bart Van Assche +Date: Sun Jul 21 12:15:52 2019 -0700 + + libsnmp: Add ref argument to the MAKE_ENTRY() macro + + Make it explicit that 'ref' is an argument of the MAKE_ENTRY() macro. + +commit b8a882812ac08da4add3f5df53300a656fecdb17 +Author: Bart Van Assche +Date: Sun Jul 21 20:47:58 2019 -0700 + + RMON-MIB: Fix a compiler warning + + Fix the following compiler warning: + + Rmon/alarm.c: In function 'var_alarmEntry': + Rmon/alarm.c:648:20: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] + 648 | return (unsigned char *) ""; + | + +commit 5ff6745c103abbac55d20892bddee66351ec554f +Author: Bart Van Assche +Date: Sun Jul 21 20:46:01 2019 -0700 + + RMON-MIB: Fix a NULL pointer dereference in an error path + + This was detected by gcc. + +commit 273cd33796133a1642dcfbcae33935fce776911e +Author: Bart Van Assche +Date: Tue Jul 2 21:18:58 2019 -0700 + + perl Makefiles: MinGW / MSYS fixes + + This patch improves but does not fix the MinGW / MSYS Perl module build + entirely. + +commit 9ba4d351b42f2c46ea53d09546b7dd20b6200cde +Author: Niels Baggesen +Date: Fri Jul 19 07:41:01 2019 +0200 + + Reorder ifdefs to unbreak DragonflyBSD compilation. + +commit c82bc0f099b03c31f69daaf5106884c7cb008cb1 +Author: Niels Baggesen +Date: Fri Jul 19 07:40:10 2019 +0200 + + snmptable: fix crash when agent has more columns than MIB. + +commit 2014ae27a44e6121acefd37db8091e075947b27a +Author: Niels Baggesen +Date: Tue Jul 16 22:10:21 2019 +0200 + + nmptable: detect and fail on non-increaing OIDs. + +commit 51df0da6f65be33ffc9723688318338fc4cce5c9 +Author: Niels Baggesen +Date: Tue Jul 16 22:01:15 2019 +0200 + + testing: Debian 10 (buster) moved ss to /usr/bin/ss + +commit ef6db67f708f6590fb9d2797022ca1d957c89073 +Author: Bart Van Assche +Date: Wed Jul 10 18:15:15 2019 -0700 + + Revert "NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space" + + Since there is a risk that this patch breaks existing monitoring + software, revert it. + +commit a88d81f1144ecf33f0ca02ada042b77368855a94 +Author: Josef Ridky +Date: Thu Jul 4 08:45:19 2019 +0200 + + NET-SNMP-SYSTEM-MIB, Linux: Update calculation of free space + + Update calculation of free space for Physical and Virtual memory on linux. + Based on https://gitlab.com/procps-ng/procps/blob/master/proc/sysinfo.c#L789 + + [ bvanassche: edited patch subject ] + +commit 18b7ab7ae81293e48fc6f24c085a536ac2dbf6da +Author: Bart Van Assche +Date: Wed Jul 3 20:58:41 2019 -0700 + + NET-SNMP-SYSTEM-MIB, Linux: Read /proc/meminfo once + + With recent Linux kernels the size of /proc/meminfo exceeds 1279 bytes. + Hence increase MEMINFO_INIT_SIZE and MEMINFO_STEP_SIZE. + +commit 4e3ace87b566c80585001bb55efe5886d0a9474f +Author: Michael Rodrigues +Date: Wed Jul 3 20:49:16 2019 -0700 + + NET-SNMP-SYSTEM-MIB: Account reclaimable space + + See also: + * https://gitlab.com/procps-ng/procps/commit/05d751c4f076a2f0118b914c5e51cfbb4762ad8e + * https://sourceforge.net/p/net-snmp/patches/1338/ + * Linux kernel commit 972d1a7b1405 ("[PATCH] ZVC: Support NR_SLAB_RECLAIMABLE / NR_SLAB_UNRECLAIMABLE") # v2.6.19. + + [ bvanassche: rewrote patch description / removed error message if SReclaimable is not found ] + +commit 4fd9a450444a434a993bc72f7c3486ccce41f602 +Author: Bart Van Assche +Date: Wed May 22 09:56:21 2019 +0200 + + CHANGES: snmpd: Stop reading and writing the mib_indexes/* files + + Caching directory contents is something the operating system should do + and is not something Net-SNMP should do. Instead of storing a copy of + the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a + MIB directory. + +commit 5ed1bc566a02c800f18e8439aa00e758158594ca +Author: Bart Van Assche +Date: Sat Jun 29 14:49:25 2019 -0700 + + SNMP-TARGET-MIB: Improve error messages + + Make it clear why adding a trap destination fails if the security name + is missing. + + See also https://sourceforge.net/p/net-snmp/bugs/2948/. + +commit 928f0726ff69a131006d904552ea482a31c6bd69 +Author: Bart Van Assche +Date: Fri Jun 28 19:49:57 2019 -0700 + + ci/net-snmp-configure, MSYS2: Use OpenSSL again + + Apparently the previous two patches are sufficient to fix the MSYS2 + OpenSSL + build. Hence re-enable OpenSSL. + + This reverts commit e57b0f4f97f0 ("ci/net-snmp-configure, MSYS2: Use the internal OpenSSL implementation") + +commit a35c49fa673544e7128efcd0fcbd0ece5cfef979 +Author: Bart Van Assche +Date: Sat Jun 23 08:19:48 2018 -0700 + + configure: Reduce MinGW build time + +commit 1d72b9f39dbaa7ad20b41c55ba5d03172503adb5 +Author: Bart Van Assche +Date: Sat May 12 07:51:29 2018 -0700 + + MSVC: Reduce build time + + Define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN. Add additional #include + directives where necessary. + +commit e57b0f4f97f0bf5b63f94bd0850bbbbf51c9bebb +Author: Bart Van Assche +Date: Wed Jun 26 08:44:22 2019 -0700 + + ci/net-snmp-configure, MSYS2: Use the internal OpenSSL implementation + + To do: figure out why building with OpenSSL on MSYS2 succeeds locally + but not on AppVeyor. + +commit 886c864bba262c3993ea9485ac3d262ef526cf38 +Author: Bart Van Assche +Date: Wed Jun 26 14:47:40 2019 -0700 + + ci/build.sh: Fix the branch name + +commit 2e08bbaa915fc5cdcd06a672b778104afb40b132 +Author: Bart Van Assche +Date: Sat May 19 20:52:10 2018 -0700 + + snmplib/asprintf.c: Fix header file inclusion order + + Include first. + +commit b51032fd7361775ff851067b0e0ce6d74daf1a41 +Author: Bart Van Assche +Date: Sat Jun 23 08:09:34 2018 -0700 + + MinGW-w64: Suppress more compiler warnings + +commit 122245d0c78fecc12bf059b2ae01542dc365f9a1 +Author: Bart Van Assche +Date: Sun May 20 07:47:18 2018 -0700 + + Win32: Avoid that restart_doit() crashes snmpd + +commit f7540763f79dd9d738ed2a388de5004597114632 +Author: Bart Van Assche +Date: Sat May 19 21:53:41 2018 -0700 + + MinGW: Rely on the configure script + +commit 56d8662c867a47d012920537198de6300017fc02 +Author: Bart Van Assche +Date: Sat Jun 23 08:17:21 2018 -0700 + + snmplib: Define LOG_DAEMON etc. once + +commit 71292606c6b7c62a0cb3bdfe63c1bf41fbdb0877 +Author: Bart Van Assche +Date: Mon Jun 3 21:00:34 2019 -0700 + + MSYS2: Fix IPv6 stack type detection + + Make sure that the IPv6 stack is detected as "generic" instead of "cygwin". + +commit 1d36ff4bc472a7e47de498c65de886b6c5e41fd6 +Author: Bart Van Assche +Date: Mon Jun 3 20:55:44 2019 -0700 + + configure.d/config_project_ipv6_types: Remove dead code + + Fixes: 3efbbe9a7fa3 ("configure: Simplify IPv6 stack detection") + +commit 2689dfdff5d11169b743ccecc5a4bab9a7d153d7 +Author: Bart Van Assche +Date: Sun Jan 20 21:12:44 2019 -0800 + + configure: Add a test for getlogin() + + This patch avoids that the build fails as follows on MinGW64: + + snmpping.c:567:13: error: conflicting types for 'getlogin' + const char *getlogin(void) + ^~~~~~~~ + In file included from /usr/include/unistd.h:4:0, + from ../include/net-snmp/net-snmp-includes.h:34, + from snmpping.c:59: + /usr/include/sys/unistd.h:118:9: note: previous declaration of 'getlogin' was here + char * getlogin (void); + ^~~~~~~~ + +commit cc4a3894e3abdc8e6a4ff6c2c1c1aa67d3449573 +Author: Bart Van Assche +Date: Sun Sep 16 06:17:36 2018 -0700 + + configure: Remove two commented out tests + +commit 011342d8e453b9e0585bf77f659d80c648df8c9f +Author: Bart Van Assche +Date: Sat Aug 18 09:28:14 2018 -0700 + + snmptrapd: Let configure check for mysql_options() + + Let configure check for mysql_options() instead of using mysql_options() + depending on the MySQL version. Only call load_defaults() or + my_load_defaults() if mysql_options() is not available. Parse not_argv[] + only if mysql_options() is not available. This last change fixes + Coverity ID 266336 ("logically dead code"). + +commit 6972080b8a75aa444a5dc8851dd5d2bc529e3fa3 +Author: Bart Van Assche +Date: Sat Aug 18 14:14:14 2018 -0700 + + configure: Fix detection of the MySQL header files + + Fixes: 8e1f21659275 ("CHANGES: snmptrapd: Add support for the latest libmysqlclient version") + +commit b5ade7d766e740f7c01ea4ed519b19d85f68773d +Author: Bart Van Assche +Date: Fri Jun 22 18:31:05 2018 -0700 + + configure: Simplify IPv6 stack detection + + Combine all v6lib=dummy; v6libdir=none; v6trylibc=yes; + CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" cases into a single case. + This patch makes IPv6 detection work on AIX. + +commit 15081d4e8f5c6e98f3e46996e9cbae50b7a895fc +Author: Bart Van Assche +Date: Tue May 8 14:48:37 2018 -0700 + + MinGW64: Fix the build + + When using Windows sockets, only detect header files that are compatible + with Windows sockets. Exclude any header files that are related to fork(). + Do not try to detect socket functions that are defined in non-Winsock + header files. + +commit 3abe2c86dd1296a5a3b4563fd930cdc0223abd04 +Author: Bart Van Assche +Date: Sat May 19 21:12:26 2018 -0700 + + MinGW: Include the Winsock header files before all other header files + +commit 0097fd24427e980a9045f2fed1e7b3aa03e1657c +Author: Bart Van Assche +Date: Tue May 8 17:34:50 2018 -0700 + + MinGW: Only use the , and header files if not using + + Since most , and conflict with the + Winsock header files, only include the former if not using Winsock. + +commit 748718eddc9e773d28495bdb93c06fc575a680fd +Author: Bart Van Assche +Date: Wed May 9 05:48:12 2018 -0700 + + configure.d/config_os_functions: Avoid testing the target OS name directly + +commit b7e9a5064a839ed997d5b22ddd2a2a6ca889e0e5 +Author: Bart Van Assche +Date: Sat May 19 21:24:51 2018 -0700 + + configure.d/config_os_functions: Fix a typo + +commit b12c749cc7bea0859e1738da03806c69ff6016c8 +Author: Bart Van Assche +Date: Sun Jun 23 16:37:36 2019 -0700 + + ci: Add --with-systemd to the configure options + +commit 43c50b997fa39e599bf6c9b04a33f67e8311ced0 +Author: Bart Van Assche +Date: Sun Jun 23 16:36:27 2019 -0700 + + libsnmp: Fix a compiler warning + +commit c84d3843bda3a3d85907c0f00291d43c6e9d8d40 +Author: Bart Van Assche +Date: Sun Jun 23 15:47:18 2019 -0700 + + libsnmp: Fix --with-systemd build + + See also https://sourceforge.net/p/net-snmp/bugs/2948/. + + Reported-by: Jean-christophe Manciot + Fixes: 76336fb63bb7 ("libsnmp/transports: Change multiple sockaddr_in* arguments into netsnmp_ep"). + +commit ede5c393704dc1d7e0613b97daacce13865683b6 +Author: Bart Van Assche +Date: Thu Jun 20 21:42:35 2019 -0700 + + AgentX: Limit input size again to 64 KB + + This patch avoids that the oss-fuzzer times out. See also + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7280. + + See also 46a42549dbae ("AgentX: Reduce stack usage"). + +commit 2e83dc51f3d91df109eab8d586b14da07009c641 +Author: Yahu Gao +Date: Mon Jun 10 09:35:03 2019 +0800 + + snmpd: Remove a duplicate assignment + + See also https://sourceforge.net/p/net-snmp/patches/1395/. + + Signed-off-by: Yahu Gao + [ bvanassche: edited patch description ] + +commit 3aebfbab87eb8b385abd5de93cbc45fc9780ad2d +Author: Bart Van Assche +Date: Fri Jun 7 21:22:08 2019 -0700 + + Perl: Fix the session pointer data types + + Use void * for session pointers that can have either type struct + session_list * or netsnmp_session *. This patch does not change any + functionality. + +commit b590f1bde34b9331cc5270a7f39c839a31d44223 +Author: Bart Van Assche +Date: Fri Jun 7 21:39:53 2019 -0700 + + Perl: Fix single-session support in __snmp_xs_cb() + + No matter which API (traditional or single-session) is being used, the + second argument (ss) has the type netsnmp_session *. Hence use snmp_send() + and do not use snmp_sess_send(). + +commit de19ec6bd12f81e935a986583a9fd9ab0cf7fd62 +Author: Bart Van Assche +Date: Fri Jun 7 21:34:57 2019 -0700 + + Perl: Make _catch work for the single-session API + + The type of the session pointer depends on the value of the api_mode + variable. Make the interpretation of the session pointer dependent on + the API mode. + +commit 0ef2d7209be7f75a147765e5748ac1dd8f2bb36b +Author: Bart Van Assche +Date: Sat Jun 8 18:57:35 2019 -0700 + + python: Make __send_sync_pdu() set the 'err_num' argument correctly + + Fix the type of the session pointer passed to __send_sync_pdu() and also + fix the *err_num assignment. + +commit 0da34dc47eb2214e8e137a9cf2757fae1ceee709 +Author: Bart Van Assche +Date: Fri Jun 7 06:52:11 2019 -0700 + + configure: Check for Winsock2 before checking for Cygwin + + This patch avoids that the MSYS2 IPv6 stack is recognized as 'cygwin' + instead of 'winsock2'. + +commit fd4bb10c3ae046857c5131545ac7c87b4fb8de32 +Author: Jon DeVree +Date: Thu Jun 6 19:56:51 2019 -0400 + + agent, MIBs: Use snmp_close() instead of snmp_sess_close() where required + + This patch avoids that closing a session triggers a crash. + + See also https://sourceforge.net/p/net-snmp/bugs/2944/ and + https://sourceforge.net/p/net-snmp/patches/1393/. + + Fixes: 4641464b4ec2 ("netsnmp_create_v3user_notification_session") # v5.8. + Fixes: 61ac63fa6ee6 ("add missing error handling in notifyTable") # v5.8. + Fixes: de8bc3c2d4ac ("separate notification storage from MIB implementation") # v5.8.pre1~285. + + [ bvanassche: edited commit message ] + +commit a6ba68ff77ca60260d5f5b007f409d08ce75c3b1 +Author: Ming Chen +Date: Wed Jun 5 22:48:35 2019 -0700 + + agent/snmp_agent.c: Fix source code indentation + +commit 7384a8b550d4ed4a00e41b72229cfcc124926b06 +Author: Ming Chen +Date: Wed Jun 5 19:58:44 2019 -0700 + + libsnmp: Fix usm_free_usmStateReference() + + See also https://sourceforge.net/p/net-snmp/bugs/2923/. + + Fixes: adc9b71aba91 ("snmpd: Avoid that snmpv3 bulkget errors result in a double free") + +commit 270c4018e6ee4f5150aecb3b52039e6eeab2c942 +Author: Bart Van Assche +Date: Wed Jun 5 19:32:04 2019 -0700 + + MIBs: Fix netsnmp_get_link_settings() + + This patch is based on a patch from Sam Tannous. See also + https://sourceforge.net/p/net-snmp/patches/1387/. + +commit 7c2ca346abc13eb0c33d134761b199bcffe753fe +Author: Bart Van Assche +Date: Wed Jun 5 18:56:42 2019 -0700 + + MIBs: Introduce netsnmp_get_link_settings() + + This patch does not change any functionality. + +commit 2968b455e6f182f329746e2bca1043f368618c73 +Author: Bill Fenner +Date: Mon Jun 3 10:01:08 2019 -0700 + + libsnmp: free filenames from directory listing + + Free each filename as we use it, as well as freeing the + list of filenames. + + Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order") + +commit 5280e837dd475fb29d62e0ee4350c3f996467218 +Author: Bart Van Assche +Date: Mon Jun 3 21:31:43 2019 -0700 + + MSYS2: Fix IPv6 stack type detection + + Make sure that the IPv6 stack is detected as "generic" instead of "cygwin". + +commit 5e1b4a5655dc0041b4e9ce6489f8223e33593201 +Author: Bart Van Assche +Date: Sun Jun 2 10:57:09 2019 -0700 + + ci: Build Windows 64-bit installer and store it as an artefact + +commit ed630cf540f662f8a7b6d52787e7ce4482254d75 +Author: Bart Van Assche +Date: Sun Jun 2 17:09:48 2019 -0700 + + win32/dist/build-binary.pl: Search %PATH% for tar.exe and gzip.exe + + Additionally, obtain the OpenSSL path from %OPENSSLDIR% and only show + the makensis output if that command fails. + +commit 5a865399bebcc34814860e9fa5539cc7f6de04c3 +Author: Bart Van Assche +Date: Sun Jun 2 10:43:39 2019 -0700 + + apps/snmpping.c: Include for getlogin() + +commit 5018d4ffcf0168e4d3162cacb44507b2a6bc6362 +Author: Bart Van Assche +Date: Sun Jun 2 08:52:03 2019 -0700 + + apps/snmpusm.c: Avoid that the MSYS2 or MinGW64 build fails + +commit a0abab5af9e83ae92bac20f9f8b5118b1d42a5e5 +Author: Bart Van Assche +Date: Sat May 25 17:28:25 2019 +0200 + + snmplib/snmp_client.c: Document that pdu->securityModel == SNMP_DEFAULT_SECMODEL + +commit 20524c9fde900a426536b52983a88a0cc3eb4972 +Author: Bart Van Assche +Date: Thu May 23 11:08:27 2019 +0200 + + _snmp_parse(): Call free_securityStateRef() instead of open-coding it + + This patch does not change any functionality. + +commit 92ccd5a82a019fbfa835cc8ab2294cf0ca48c8f2 +Author: Bart Van Assche +Date: Sat May 25 16:33:31 2019 +0200 + + libsnmp: Move the securityStateRef check into free_securityStateRef() + + Instead of making each free_securityStateRef() caller check the + securityStateRef pointer, move that check into free_securityStateRef(). + +commit c268ba41bd42ab78184fc91dd0e705259f644802 +Author: Bart Van Assche +Date: Sat Jun 1 21:51:32 2019 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 77b1f7c15ea74e430ca304e61033fdb6fe047ed1 +Author: Bart Van Assche +Date: Sun Jun 24 19:14:26 2018 -0700 + + Fix clang compiler warnings + + This patch does not change any functionality. + +commit 526617cf1ee629fdda48d1702aa90311b9e7a828 +Author: Bart Van Assche +Date: Sat Jun 1 09:39:59 2019 -0700 + + MIBs, apps: Avoid passing NULL to the %s format specifier + + This was detected by gcc 9. + +commit 6327b217d67a8eb9e5d90f18cc9bbc0c499fe495 +Author: Bart Van Assche +Date: Thu May 23 22:44:14 2019 +0200 + + include/net-snmp/types.h: Unbreak the MinGW build + + Revert the two most recent changes to this header file to avoid that the MSYS2 + build fails as follows: + + util_funcs.c:406:1: error: conflicting types for 'get_exec_pipes' + get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) + ^~~~~~~~~~~~~~ + In file included from util_funcs.c:91:0: + util_funcs.h:40:17: note: previous declaration of 'get_exec_pipes' was here + int get_exec_pipes(char *cmd, int *fdIn, int *fdOut, HANDLE *pid); + ^~~~~~~~~~~~~~ + +commit e9ce939e41986955ac21bc37dac5c4ed02332c14 +Author: Bart Van Assche +Date: Thu May 23 10:48:02 2019 +0200 + + ci/build.sh: Stop dumping config.log + + Now that the configure script works reliably for MinGW, stop dumping config.log + upon build failures. + +commit f100abcd4dfd386f8c5be2169beed199756404a9 +Author: Bart Van Assche +Date: Thu May 23 10:50:59 2019 +0200 + + Cygwin: Unbreak the build + + Fixes: 48593bb6abd2 ("include/net-snmp/types.h: Include explicitly") + +commit 48593bb6abd20f4817504206ac672ee396c02e47 +Author: Bart Van Assche +Date: Wed May 22 17:03:51 2019 +0200 + + include/net-snmp/types.h: Include explicitly + +commit 328b1161cac13cecb65a87e3355d1ac483a7f89c +Author: Bart Van Assche +Date: Wed May 22 17:22:37 2019 +0200 + + libsnmp: Simplify snmp_free_pdu() + + This patch does not change any functionality. + +commit deef46f3d24a038fb383f23f638fed4e05985888 +Author: Bart Van Assche +Date: Wed May 22 15:06:11 2019 +0200 + + libsnmp, MinGW: Fix format specifiers in debug statements + + Fixes: 2706f0024dc7 ("libsnmp: Make it easier to verify how the maximum message size is determined"). + +commit 67c2b92015e5f1c82d9877e4008a7df7f3fdd250 +Author: Bart Van Assche +Date: Wed May 22 10:30:10 2019 +0200 + + configure, MinGW: Make the winsock header file detection more reliable + + Avoid that winsock header file detection fails due to being + included before a winsock header file. This patch prevents that detecting + a winsock header file fails as follows: + + In file included from /usr/include/w32api/winsock.h:36:0, + from conftest.c:163: + /usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] + #warning "fd_set and associated macros have been defined in sys/types. \ + ^~~~~~~ + + Fixes: f0d400c28b54 ("MinGW64: Fix winsock2.h header detection") + +commit c77172ae94bde978c18cf02437e0f2d3875ff75a +Author: Bart Van Assche +Date: Wed May 22 10:12:09 2019 +0200 + + ci/build.sh: Fail the build if "make" fails + + Fixes: b3f3cb8b4948 ("ci/build.sh: Dump config.log if 'make' fails") + +commit 114e4c2cec2601ca56e8afb1f441520f75a9a312 +Author: Bart Van Assche +Date: Wed May 22 10:08:53 2019 +0200 + + libsnmp: Fix a compiler warning + + Avoid that the compiler complains on Windows systems that tmpstr[] is not used. + + Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order") + +commit f142b40a3b885d871959e3f94ccc010043158008 +Author: Ming Chen +Date: Tue May 21 19:36:17 2019 +0200 + + snmpd: Avoid that CPU usage goes up to 100% while processing a getbulk request + + See also https://sourceforge.net/p/net-snmp/bugs/2941/. + + [ bvanassche: left out comment and "continue" statements ] + +commit 0b32cca60331af47714d3bd369ecdc13e36aa22a +Author: Bart Van Assche +Date: Tue May 21 19:34:43 2019 +0200 + + agent/helpers/table_iterator.c: Adjust source code indentation + +commit 66d32cef5ec3b97d59668ff27fb3c1799bb39966 +Author: Bart Van Assche +Date: Tue May 21 17:39:49 2019 +0200 + + libsnmp, DTLSUDP: Fix address formatting code + + Make sure that a meaningful address is shown with debugging enabled when sending + DTLSUDP data. + +commit 4c7c819f7157ca0593fb8b0a87cf094e088e8736 +Author: Bart Van Assche +Date: Tue May 21 14:44:06 2019 +0200 + + libsnmp, DTLSUDP: Fix transport constructors + + Make sure that the transport constructors return a DTLSUDP transport object + instead of an UDP transport object. + + Fixes: d60c3cb2e6af ("NEWS: snmplib: add IPv6 support to DTLSUDP transport CHANGES: snmplib: use new netsnmp_sockaddr_storage in netsnmp_addr_pair CHANGES: snmplib: add base_transport ptr for tunneled transports") # v5.7.rc2~604. + +commit 1af6a41824bc4364d5edc3c15b942328300029cc +Author: Bart Van Assche +Date: Tue May 21 14:23:39 2019 +0200 + + snmpd: Fix three memory leaks + + Avoid leaking memory if -profile, -name and/or -tag are specified multiple times + in a trapsink, trap2sink or trapsess specification. This was detected by Coverity. + +commit 09f2cbaed98012e7e063361d02768161005aaa0f +Author: Bart Van Assche +Date: Thu May 16 14:32:26 2019 +0200 + + libsnmp, netsnmp_parse_args(): Fix memory leaks in error paths + +commit 42535c3a47066bd8d68aff49e4559fd949dd90bb +Author: Bart Van Assche +Date: Thu May 16 14:57:20 2019 +0200 + + libsnmp, netsnmp_parse_args(): Rework error paths + + This patch does not change any functionality. + +commit 7576fcde27301d079f37dacb08aba9d0d2b29560 +Author: Bart Van Assche +Date: Thu May 16 14:40:00 2019 +0200 + + snmpd: Suppress a false positive Coverity complaint + + Avoid that Coverity complains that the third argument passed to memset() exceeds + the size of a single array element. + +commit 9d55a7067f21f805aca7c8b58bd68bfeb2c8aef0 +Author: Bart Van Assche +Date: Thu May 16 14:21:31 2019 +0200 + + ucd-snmp proxy: Avoid that proxy_fill_in_session() crashes if out of memory + +commit 2e4091f4cbe171213a5674246898181f6706941e +Author: Bart Van Assche +Date: Thu May 16 14:15:25 2019 +0200 + + libsnmp: Suppress a false positive Coverity complaint + + Although it is not required that community strings are '\0' terminated, + Coverity complains about the community string duplication code in _sess_copy(). + Make Coverity happy by using strdup() instead of netsnmp_memdup(). + +commit 9cfb38b0aa95363da1466ca81dd929989ba27c1f +Author: Bart Van Assche +Date: Thu May 16 13:49:05 2019 +0200 + + libsnmp: Fix two recently introduced issues in the MIB parsing code + + Ensure that the first argument passed to qsort() is not NULL. Free the memory + that holds the directory contents. + + Fixes: 2b3e300ade4a ("CHANGES: libsnmp: Scan MIB directories in alphabetical order") + +commit d73ebccfe45be49f70ab0a3f5dd298db78c99f6d +Author: Bart Van Assche +Date: Thu May 16 13:48:03 2019 +0200 + + AgentX: Fix two use-after-free issues + + snmp_add_full() frees the transport if it fails. This was detected by Coverity. + +commit 78bf0069ddd24ea0cc716421c53e1daf46da7002 +Author: Bart Van Assche +Date: Wed May 15 21:25:46 2019 +0200 + + CHANGES: libsnmp: Increase the maximum SNMPv3 session receive size from 1472 to 2**31-1 bytes + + For the UDP transport this patch increases the maximum message size from 1472 + to about 64 KB. + + This patch adjusts a limit that was introduced by commit 6e83b3cd891d + ("respect msgMaxSize in received v3 PDUs (in the weak sense that if the + serialized response PDU is more than it, we don't send it)") # v5.7. + +commit d1f6c87d83f0cef32696f4c4d70b61149e305390 +Author: Bart Van Assche +Date: Wed May 15 18:23:59 2019 +0000 + + testing/fulltests/default/T0221snmpbulkget_large_simple: Make this test more robust + + Since sysUpTime may appear in the MIB walk that starts at .1, check whether + sysUpTime occurs at least once in the output instead of checking whether it + occurs exactly five times. Enable several debug options. + +commit 2706f0024dc7edbe29ab3f842468bf50a4d069d3 +Author: Bart Van Assche +Date: Wed May 15 20:24:07 2019 +0200 + + libsnmp: Make it easier to verify how the maximum message size is determined + + This patch only modifies debug log statements. + +commit 6066c6e21991ee31ae4fd5eaf791911a31c3432f +Author: Bart Van Assche +Date: Fri May 17 08:44:08 2019 +0200 + + libsnmp, snmpv3_packet_build(): Avoid triggering a buffer overflow + +commit fac879e83e529bf10b7c91227faa18cafe622d22 +Author: Bart Van Assche +Date: Fri May 17 08:38:25 2019 +0200 + + libsnmp, snmpv3_packet_build(): Use sizeof() where appropriate + + This patch does not change any functionality. + +commit a00eb0515be695786bdc7d839a066e4870064a5a +Author: Bart Van Assche +Date: Tue May 14 18:09:25 2019 +0200 + + perl/SNMP/t/mib.t: Make it easier to enable the debugging code in this test + +commit e8f2295bc02e0fc73514efc7c660ed69d689fa68 +Author: Bart Van Assche +Date: Tue May 14 18:45:33 2019 +0200 + + perl/SNMP/t/mib.t: Verify the result of all tests + + This patch reverts commit 3c0a609e0c24 ("comment out broken tests for now (XXX marked)") # v5.7. + +commit 2b3e300ade4add03b889e61d610b0db77d300fc3 +Author: Bart Van Assche +Date: Wed May 15 14:09:25 2019 +0200 + + CHANGES: libsnmp: Scan MIB directories in alphabetical order + + This guarantees that e.g. mibs/RFC1213-MIB.txt is read before mibs/SNMPv2-MIB.txt. + The order in which these MIBs is read matters because both define sysLocation but + with different attributes. + +commit e6a1bbc2304fc0391f479e28946872bf324fb597 +Author: Bart Van Assche +Date: Tue Aug 21 04:52:44 2018 +0000 + + MIB-II, IPv6: Port to FreeBSD + + Compile-tested only. + +commit b6f77702dfaf98addf8d3502e86cb30de0fccd13 +Author: Bart Van Assche +Date: Wed May 15 09:32:10 2019 +0200 + + agent/mibgroup/mibII/ipv6.c: Reduce the scope in which 'udb6' and 'tcb6' are visible + + This patch does not change any functionality. + +commit ee11caa817c5b12c290d01299d2554da87b0ddf7 +Author: Bart Van Assche +Date: Wed May 15 10:12:44 2019 +0200 + + testing/fulltests/tls/STsmPrefix: Specify the snmpd transport endpoint once + + Additionally, remove an snmpget invocation of which the output is not used. + + Fixes: d75c5a1c4f03 ("useprefix scalar testing and support") # v5.7. + +commit 89aecee38ea9afcd1ae0cad98da02832919730ac +Author: Bart Van Assche +Date: Tue May 14 21:09:05 2019 +0200 + + testing/fulltests/default/T0221snmpbulkget_large_simple: Only run this test on Linux systems + +commit 785c25da91286b929bcdf196db4a26f10e228bf3 +Author: Bart Van Assche +Date: Tue May 14 17:35:42 2019 +0200 + + testing/fulltests/default/T0221snmpbulkget_large_simple: Add this test + + Add a test for an snmpbulkget with a reply that exceeds the size of a single + Ethernet UDP datagram. + +commit b3f3cb8b4948a14663b5071348b95e43a16a4360 +Author: Bart Van Assche +Date: Mon May 13 18:36:55 2019 +0200 + + ci/build.sh: Dump config.log if 'make' fails + +commit 9f0e0e6266b3316cda548d2870302ca4cd405aec +Author: Bart Van Assche +Date: Tue May 14 07:52:38 2019 +0200 + + testing/fulltests/default/T053trapforwardloop_simple: Improve test robustness + + Match both text strings that report trap forwarding. + +commit 07270f0a1940734eea992949ea9d751e866896d7 +Author: Bart Van Assche +Date: Mon May 13 17:54:37 2019 +0200 + + libsnmp: Remove obsolete comments from the container code + + See also commit e2f9573849bd ("CHANGES: snmplib: remove inline versions of container funcs") # v5.7. + +commit d21d33cf5693a4ac5a6c88182ec59560019694fe +Author: Bart Van Assche +Date: Sun May 12 15:09:21 2019 +0200 + + win32/Configure: Add the --enable-blumenthal-aes option + + See also https://sourceforge.net/p/net-snmp/bugs/2937/. + +commit 9cb80e309be7da1b498b4295d8ec81f21b6d209b +Author: Bart Van Assche +Date: Sat May 11 16:07:30 2019 -0700 + + testing: Add a test that verifies whether forwarding loops are detected correctly + +commit b45782d5632266e86613d9bd5696f0b7fab3ef19 +Author: Bart Van Assche +Date: Thu May 9 20:14:50 2019 -0700 + + snmptrapd: Add original sender and forwarder IP addresses to forwarded traps + + See also https://sourceforge.net/p/net-snmp/patches/1320/. + + [ bvanassche: modified the implementation of this patch significantly; added + a man page description and removed the --add-forwarder-info snmptrapd + command line option ] + +commit 3673f3263e4b0d5f0805c557871b3d342289f74f +Author: Bart Van Assche +Date: Wed May 8 20:33:48 2019 -0700 + + ci/before.sh, ci/net-snmp-configure: Extend FreeBSD test coverage + +commit 50bccea7cb515dddb1883dfcee6e9100ab9264ce +Author: Ming Chen +Date: Wed May 8 10:50:08 2019 -0700 + + MIB-II: Avoid that snmpd uses 100% CPU for querying network interfaces + + snmpd updates its network interface cache data every 3 seconds. If there + is a huge number of virtual interfaces updating the cache takes longer + than 3 seconds. Optimize the code that queries network interfaces by + moving netsnmp_access_ipaddress_ioctl_get_interface_count() out of the + while loop and by calling netsnmp_arch_interface_index_find() only for + IPv6. + + Fixes: https://sourceforge.net/p/net-snmp/bugs/2137/ + + [ bvanassche: fixed coding style issues, rewrote the commit message and + fixed a compiler warning ] + +commit 0b88ff97e30db34bacd8375b4d15b0b101c0d57c +Author: Bart Van Assche +Date: Wed May 8 17:33:35 2019 -0700 + + agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.h: Avoid using typedefs + + Use struct netsnmp_ipaddress_entry_s instead of the corresponding typedef + such that it becomes easier to include this file. + +commit 8f92cadfecedc4bc6bc56c24d8282d11f82b06c3 +Author: Bart Van Assche +Date: Mon May 6 21:20:13 2019 -0700 + + ci: Improve the code that supports various Windows builds + + Install openssl-devel again on MSYS2. Fix the MSYS2 and MinGW32 code for + detecting the OpenSSL version. Disable Python support again for MSYS2. + +commit c890caa47876a0da05e69cae1428b65d9ec70478 +Author: Bill Fenner +Date: Tue May 7 13:10:51 2019 -0700 + + Avoid off-by-one error when logging "" to a file + +commit f9dfc64746c69e4f9cb34837863baa94156f5082 +Author: Bart Van Assche +Date: Mon May 6 20:15:51 2019 -0700 + + ci/net-snmp-configure: Detect which software has been installed + + Detect which software has been installed instead of hard-coding per + CI environment which options to enable. Fix the OpenSSL and openssh + version checks. Simplify the Python check. Fix the SSL include path + checks on MinGW32 and MinGW64. Fix the test that decides whether or + not to enable Blumenthal AES. + +commit 7510e972655f86818eac2944b554396f11a41d1d +Author: Bart Van Assche +Date: Mon May 6 20:25:34 2019 -0700 + + .travis.yml: Also install the MariaDB client library + +commit 33f8e2e1d63ad5932ade885ffbff379cab1e50bd +Author: Shogo Matsumoto +Date: Tue May 7 09:41:13 2019 +0900 + + agent/mibgroup/agentx: Fix double free of delegated cache in agentx_got_response() + + If snmpd receives a response from subagent immediately after the agentx + session closed, agentx_got_response() frees delegated cache twice. + + This patch changes return value of "response too late on session" + in agentx_got_response function to make the caller of this function + remove the request in order to prevent double free. + + See also https://sourceforge.net/p/net-snmp/patches/1392/. + + Signed-off-by: Shogo Matsumoto + [ bvanassche: added patch tracker URL ] + +commit be80fdbeb0f21c1ed819f8b80736dab2d093601d +Author: Bart Van Assche +Date: Sun May 5 20:17:00 2019 -0700 + + ci/build.sh: Fix Mingw64 package list + +commit 068b4686739cc8add671639597bada19d91845a0 +Author: Bart Van Assche +Date: Sun May 5 19:08:16 2019 -0700 + + libsnmp: Rework the MDblock() implementation + + Avoid that MDblock() modifies its input data buffer on big-endian systems. + +commit fc071d97669ccac61d07e28c2b7fd0aacc840ff4 +Author: Bart Van Assche +Date: Mon Apr 29 18:47:07 2019 -0700 + + ci/build.bat: Add an URL to the Appveyor documentation + +commit 2954c4e3c92026b3a6d4c0a0f44e9919b61d20be +Author: Bart Van Assche +Date: Mon Apr 29 12:25:59 2019 -0700 + + ci/build.sh: Make the MinGW-w64 build more reliable + + Uninstall packages on which the installed packages depend before installing + any packages. + +commit bfdccd426c484ec70d80c36c774b2b12b20afec3 +Author: Bart Van Assche +Date: Mon Apr 29 10:26:51 2019 -0700 + + AgentX: Restore another size check + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14502. + Fixes: 46a42549dbae ("AgentX: Reduce stack usage"). + +commit a083613bf8da6863ed252fbe0177cadee779ce07 +Author: Bart Van Assche +Date: Mon Apr 29 06:54:33 2019 -0700 + + libsnmp: Really fix the FreeBSD build + + Apparently on FreeBSD 'timezone' is a function instead of a global variable. + Detect the type of 'timezone' and only use its value if it is a scalar. + +commit d575c3e77aa951135eca7eabe442d9e90a5b6dad +Author: Bart Van Assche +Date: Sun Apr 28 21:37:28 2019 -0700 + + libsnmp: Unbreak the FreeBSD build + + Avoid that the FreeBSD build fails as follows: + + snmp-tc.c:258:21: error: use of undeclared identifier 'daylight' + tm.tm_isdst = !!daylight; + ^ + snmp-tc.c:259:15: error: invalid operands to binary expression ('int' and 'char *(*)(int, int)') + tm.tm_sec -= timezone; + ~~~~~~~~~ ^ ~~~~~~~~ + +commit 314ac9a648aa5901dc4daaa3ac04dcc94b0eef5e +Author: Bart Van Assche +Date: Sun Apr 28 21:27:48 2019 -0700 + + AgentX: Avoid passing a long to abs() + + The function abs() namely expects an 'int' as argument. + +commit f39d5486bd66adde244fb0c6fbaf8d55e22918cd +Author: Bart Van Assche +Date: Sun Apr 28 19:49:42 2019 -0700 + + MSVC: Define the NETSNMP_BIGENDIAN macro + + Fixes: 484524cda948 ("configure: Determine endianness at compile time instead of at configure time") + +commit d57f431170190c2fd18dea965e8bfc50cd205e02 +Author: Bart Van Assche +Date: Sun Apr 28 18:30:27 2019 -0700 + + libsnmp, asn_parse_objid(): Avoid reading uninitialized memory + + This patch fixes Coverity ID 85590. + +commit 88e001fe799e868753f86330a532d94de47f9fe4 +Author: Bart Van Assche +Date: Fri Apr 26 10:31:13 2019 -0700 + + testing/fulltests/support/simple_run: Reduce the number of 'cd' commands + + Make the code easier to read by using explicit paths instead of 'cd' + where appropriate. Remove the SNMP_ORIGDIR variable since it is no + longer necessary. + +commit 39121a995d09484766ee5e86137ade1123bea7ab +Author: Bart Van Assche +Date: Sun Apr 28 17:15:14 2019 -0700 + + snmplib: Fix tm.tm_isdst check in ctime_to_timet() + + This patch fixes Coverity issue 144417. + + Fixes: af3fc499f600 ("snmplib: Initialize tm_isdst if available") # v5.8. + +commit 484524cda94838dfec8eb1ae92b069ea8ce448f6 +Author: Bart Van Assche +Date: Sun Apr 28 13:40:24 2019 -0700 + + configure: Determine endianness at compile time instead of at configure time + + The new test supports cross-compilation. In other words, --with-endianness + no longer has to be specified during cross-compilation. + +commit 4a0886b848855942699758b5cee3e47783bdc4db +Author: Bart Van Assche +Date: Sun Apr 28 15:41:31 2019 -0700 + + win32/config.h.borland: Remove this header file because it is obsolete + + The most recent version of the Borland compiler was released in 2000 so + it is unlikely that anyone is still using that compiler. Hence remove the + Borland config.h file. + +commit 8071426579ca4b00d51fb0c11360ab701e0f9faa +Author: Bart Van Assche +Date: Sun Apr 28 15:05:05 2019 -0700 + + testing/fulltests/unit-tests/T008asn1_clib.c: Make the integer encoding test more strict + +commit 79857f794c1d2b17d058b949fc8b30632d8c4e40 +Author: Bart Van Assche +Date: Sat Apr 27 21:12:55 2019 -0700 + + libsnmp, ASN parsing: Avoid triggering undefined shift-left behavior + + A quote from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7199: + + So this is a fun corner case of asn.1 integer parsing: the C standard says + that shifting a negative number left has undefined behavior. The other + obvious way to do this is to use the same code on an unsigned long, and + then cast to long. The result of a cast to a signed value is + implementation-defined. Linus Torvalds' argument on this is that there + is no sensible way for the implementation to define it other than "copy + the 2's complement bits". + + Avoid triggering all these corner cases by using byte-copying instead of + using shift operations. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7199 + +commit 7de049193ab78d9fcdc3baa2c0673bd1e300ed5b +Author: Bart Van Assche +Date: Sat Apr 27 20:53:15 2019 -0700 + + AgentX: Avoid reading uninitialized data + + Fixes: 46a42549dbae ("AgentX: Reduce stack usage") + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14481 + +commit 9af3c50c84d24de06c0fa48c9fef721e2490ce49 +Author: Bart Van Assche +Date: Sat Apr 27 16:54:32 2019 -0700 + + ci/net-snmp-configure: Only set --build=... for MSYS2 + +commit c43115d39ffc9dfbc55d7c18bb33b17a8847c0d7 +Author: Bart Van Assche +Date: Sat Apr 27 16:31:26 2019 -0700 + + agent/mibgroup/winExtDLL.c: Fix Mingw64 compiler warnings + + Avoid that the Mingw64 compiler complains about incompatible function + casts. + +commit 21b0ea844db3e45ec170ddec0bab1cea083e3709 +Author: Bart Van Assche +Date: Sat Apr 27 16:31:16 2019 -0700 + + agent/mibgroup/util_funcs.c: Fix Windows debug statements + + Fixes: 9f4f13c6cb42 ("CHANGES: Win32: BUG: 2779541 Fixed handle leak in pass_persist.") # v5.7.rc2. + +commit e6e45da5229fb14768bd4077ca0cd290c1d7e87f +Author: Bart Van Assche +Date: Sat Apr 27 16:38:24 2019 -0700 + + apps/snmptrapd_handlers.h: Remove an obsolete declaration + + Fixes: d10be3eb4be7 ("Remove redundant code.") # v5.7.rc2. + +commit 870e553b9a8051ae93f98e8faf977e151773b08b +Author: Bart Van Assche +Date: Sat Apr 27 11:09:47 2019 -0700 + + apps/encode_keychange: Fix an MSVC compiler warning + + Avoid that the compiler reports that _isatty() has not been declared. + +commit 0f25cd33500fd104aa4e977b982bdbba2be7d266 +Author: Bart Van Assche +Date: Sat Apr 27 11:01:43 2019 -0700 + + AgentX, MSVC: Fix a recently introduced build error + + Avoid that the following error and warnings are reported: + + ..\..\agent\mibgroup\agentx\protocol.c(1249): error C2036: 'void *': unknown size + ..\..\agent\mibgroup\agentx\protocol.c(1560): warning C4146: unary minus operator applied to unsigned type, result still unsigned + ..\..\agent\mibgroup\agentx\protocol.c(1565): warning C4146: unary minus operator applied to unsigned type, result still unsigned + ..\..\agent\mibgroup\agentx\protocol.c(1570): warning C4146: unary minus operator applied to unsigned type, result still unsigned + +commit 46a42549dbae76e1c2fc284b81c6e6f83ce46831 +Author: Bart Van Assche +Date: Thu Apr 25 16:31:56 2019 -0700 + + AgentX: Reduce stack usage + + Instead of allocating a buffer with the largest supported size on the + stack, allocate a 64 byte buffer on the stack and dynamically allocate + a larger buffer if necessary. + +commit 4cdf8314a1ff3ecca3483c0b1a4b7cd92ae03f5c +Author: Bart Van Assche +Date: Fri Apr 26 09:24:41 2019 -0700 + + AgentX: Fix a debug statement in agentx_realloc_build_string() + + Avoid that a debug statement reads past the end of the buffer passed + to this function. This was detected by Valgrind. + +commit 004d7d473d9e7a6929ae0f7a9d2f9b96b6c94f4e +Author: Bart Van Assche +Date: Fri Apr 26 07:00:24 2019 -0700 + + AgentX: Micro-optimize agentx_parse_string() + +commit 07c4226435a42c260cd7a17e6c89e9c89a036e6c +Author: Bart Van Assche +Date: Fri Apr 26 08:50:48 2019 -0700 + + AgentX: Make indentation consistent in _agentx_realloc_build() + +commit ecaeda0fff7b2c50661ff170cb1d747641e1f58b +Author: Bart Van Assche +Date: Thu Apr 25 16:31:32 2019 -0700 + + AgentX: Make agentx_parse_oid() easier to read + + Use 64-bit assignments instead of two 32-bit assignments to assign a + 64-bit number to a 64-bit variable. + +commit d20ace88ceb71c208f2b638b822c6b4359ead0d3 +Author: Bart Van Assche +Date: Thu Apr 25 13:11:11 2019 -0700 + + AgentX: Reduce the number of return statements + + This patch does not change any functionality. + +commit a0fcb8912153e79170afd34044d0d400e1169164 +Author: Bart Van Assche +Date: Thu Apr 25 09:13:59 2019 -0700 + + AgentX: Declare pointers that are not modified const + + Additionally, declare local functions 'static'. + +commit 1710f9f8f8bc2ea3ee1a89bdef11bd311dc86ff8 +Author: Bart Van Assche +Date: Thu Apr 25 08:55:48 2019 -0700 + + AgentX: Remove two superfluous casts + + This patch does not change any functionality. + +commit 8830aafcab6375e7774004c3049b3d9538a0a641 +Author: Bart Van Assche +Date: Thu Apr 25 10:01:15 2019 -0700 + + AgentX: Make indentation consistent + + This patch only changes the indentation level of the code. + +commit e28e19b204e3610b9a04d88034163ee43a97e076 +Author: Bart Van Assche +Date: Wed Apr 24 21:47:51 2019 -0700 + + Mingw64: Define NETSNMP_PRIz correctly + + Older versions of Mingw64 identify as *-w64-* while newer identify as + x86_64-pc-mingw32. Make sure that both are recognized. + +commit a18f036972ccecff51059517b29a231e529efa14 +Author: Bart Van Assche +Date: Wed Apr 24 21:39:19 2019 -0700 + + Remove SCCS and RCS IDs + + Since git is used to manage the Net-SNMP source code these IDs are not relevant. + +commit 513aff4c5d05f65030e705e39eb7376c224b862b +Author: Niels Baggesen +Date: Wed Apr 24 22:00:25 2019 +0200 + + swrun_kinfo: DragonflyBSD does not have KERN_PROC_PROC + +commit 09da7e285a2ae8a75905ac49e7ebfb0cffaf5139 +Author: Niels Baggesen +Date: Wed Apr 24 21:57:47 2019 +0200 + + Fix CentOS6 compile witch does not define ETHTOOL_GLINKSETTINGS + +commit 17387a9fc331fba46055894dd8f5eb3e327f310f +Author: Niels Baggesen +Date: Wed Apr 24 21:55:10 2019 +0200 + + Not all compilers groks mixed declaration and statements. + +commit 54be00a40b3a31917c8825886dc45d0de14b714b +Author: Niels Baggesen +Date: Wed Apr 24 21:53:48 2019 +0200 + + Remove a superfluous semicolon. + +commit 5ca7193ae1978626d1abf491f777e68bbb88c164 +Author: Niels Baggesen +Date: Wed Apr 24 21:48:05 2019 +0200 + + Add openbsd6.h to headers to install. + +commit 678422d7b8495310fa03e2a1c827b8f0b97fb8b0 +Author: Niels Baggesen +Date: Wed Apr 24 21:29:30 2019 +0200 + + Proactively add FreeBSD 13, 14 + +commit 353287249340c40f1ab1f378d3fc746d8579b822 +Author: Niels Baggesen +Date: Wed Apr 24 21:13:57 2019 +0200 + + mibs/rfclist: Add RFCs 8389, 8502, 8502. + +commit 48495424cb8d452ebe87bb1df5f2ae1b1f47f08d +Author: Niels Baggesen +Date: Wed Apr 24 21:12:46 2019 +0200 + + Update IANAifType-MIB to current version. + +commit 40c319c7bda8cad3d12a8e33297226363e80e879 +Author: Bart Van Assche +Date: Wed Apr 24 06:56:14 2019 -0700 + + libsnmp: Use a symbolic name for the TLS version + +commit a07d20c370736887cbd9b160ce9dade5de539655 +Author: Bart Van Assche +Date: Mon Apr 22 21:02:37 2019 -0700 + + ci/openssl.bat: Bump the OpenSSL version + +commit 814abb9392bf84993b81f0a1b481197c166a297a +Author: Bart Van Assche +Date: Mon Apr 22 20:45:22 2019 -0700 + + snmplib: Suppress the "'TLSv1_method' is deprecated" compiler warning + +commit f632342cd62ca3a064bd1ebde8858fbba76b9626 +Author: Bart Van Assche +Date: Wed Apr 17 19:21:25 2019 -0700 + + snmpd: Fix the code for changing DES private keys + + See also https://sourceforge.net/p/net-snmp/bugs/2935/. + +commit 7f31df7069e0b1dfed7955d5c7f78aa51052e019 +Author: Bart Van Assche +Date: Wed Apr 17 19:33:41 2019 -0700 + + agent/mibgroup/snmpv3/usmUser.c: Remove the 'alen' variable + +commit 456ef19a12678b0f73f74fd947bd13a2df329d92 +Author: Bart Van Assche +Date: Sun Apr 14 21:12:20 2019 -0700 + + snmplib, Windows: Fix the NETSNMP_IMPORT and NETSNMP_EXPORT definitions + + Make sure that global variables are exported. See also + https://sourceforge.net/p/net-snmp/bugs/2934/. + +commit 0cf5a779b6e335c48b6d12665c7748d38449bd20 +Author: Bart Van Assche +Date: Sun Apr 14 20:30:50 2019 -0700 + + snmplib: Fix the build for older versions of Visual Studio + + See also https://sourceforge.net/p/net-snmp/bugs/2932/. + +commit 21260fdd60c172839f997fb6f888a6e21c6825eb +Author: Changqing Li +Date: Tue Feb 26 14:26:07 2019 +0800 + + net-snmp: fix compile error with --disable-des + + | scapi.c: In function 'sc_encrypt': + | scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'? + | pad_size = pai->pad_size; + | ^~~~~~~~ + | dysize + + pad_size is defined only without --disable-des + [snip] + #ifndef NETSNMP_DISABLE_DES + int pad, plast, pad_size = 0; + + but used when disable-des, + [snip] + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } + pad_size = pai->pad_size; + + memset(my_iv, 0, sizeof(my_iv)); + + #ifndef NETSNMP_DISABLE_DES + if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) { + + /* + + fix by move it into #ifndef NETSNMP_DISABLE_DES + + Signed-off-by: Changqing Li + +commit abdcb6af8df352a257a7092c1649471af1e4e97b +Author: Douglas Royds +Date: Sun Apr 14 19:56:24 2019 -0700 + + CHANGES: snmpd: Accept null NETSNMP_CONFIGURE_OPTIONS from the environment + + Make it possible to avoid that build host paths end up in Net-SNMP binaries + by accepting a null NETSNMP_CONFIGURE_OPTIONS environment variable. + +commit 5ccd784e0f7bb16b3f2daa77814087e90af3c321 +Author: Roger Bertilsson +Date: Sun Apr 14 19:47:48 2019 -0700 + + snmpd: Fix a typo in the snmpusm.1.def man page + + See also https://sourceforge.net/p/net-snmp/patches/1386/. + +commit ec9f61461e82d203e24b8e5b431190a40b27ea6d +Author: Vasile-Laurentiu Stanimir +Date: Sun Apr 14 19:21:32 2019 -0700 + + CHANGES: snmpd: Use ETHTOOL_GLINKSETTINGS when available + + Newer Linux kernels support ETHTOOL_GLINKSETTINGS. Use it when available + instead of the older and deprecated ETHTOOL_GSET. This patch avoids that + the Linux kernel reports the following kernel warning: + + warning: 'snmpd' uses legacy ethtool link settings API, link modes are only partially reported + + See also https://sourceforge.net/p/net-snmp/patches/1387/. + + [bvanassche: reworked this patch significantly] + +commit d6689d6a938e29e02f1964bc7d7a15103817c0fa +Author: Masayoshi Mizuma +Date: Mon Apr 8 19:56:04 2019 -0400 + + snmplib/snmp_api: Remove the request on the session when the sending is failed + + snmpd is terminated abnormally due to an invalid memory access after + the sending of a request is failed. + + The time out callback for the failed request is executed when the + session is closing because the request remains in the internal session. + The cleanup for the request is executed on the + callback(NETSNMP_CALLBACK_OP_SEND_FAILED,) and also on the time out + callback(NETSNMP_CALLBACK_OP_TIMED_OUT,), so the wrong memory access + happens. + + Remove the failed request from the internal session after the callback + for the failed request is done. + + Signed-off-by: Masayoshi Mizuma + Reported-by: Shogo Matsumoto + +commit 408c8919e36feb4e9c1024e74d3b8c77454d89a0 +Author: Bart Van Assche +Date: Sun Apr 14 18:57:17 2019 -0700 + + snmplib: Introduce the function remove_request() + + This patch does not change any functionality. + +commit d9b2acc48efc3b5098cde5a7b89cf81a3e1988fa +Author: Anders Wallin +Date: Sun Apr 14 18:30:48 2019 -0700 + + test: Skip TLS-TCP IPv6 test for OpenSSL versions before 1.1.0 + + See also https://sourceforge.net/p/net-snmp/patches/1382/. + + Signed-off-by: Anders Wallin + [ bvanassche: edited patch description; combined two version checks into one ] + +commit 69253ba63cfaaaacc10942aad360449b2a081681 +Author: Bart Van Assche +Date: Sun Apr 14 17:30:50 2019 -0700 + + snmpd: Fix --disable-snmpv1 build + + See also https://sourceforge.net/p/net-snmp/bugs/2924/. + + Fixes: e422fbfb09cd ("more checks for disabling protocol versions at runtime"). + +commit 7f88b06bf0f4140bc03cabacd35eaeffdf21d722 +Author: Anders Wallin +Date: Sun Apr 7 18:31:16 2019 -0400 + + agentx/master: Return when NETSNMP_CALLBACK_OP_RESEND is set to the callback + + snmpd is terminated abnormally due to the double free for the + request cache after the request is resend. + + That is because the callback for NETSNMP_CALLBACK_OP_RESEND isn't + cared and the cache is freed wrongly. + + Let's just return if NETSNMP_CALLBACK_OP_RESEND is set on the + callback. + + Fixes: b7b50bbac ("snmp_send callback updates") + + Signed-off-by: Anders Wallin + +commit 6e1329bde834e0edcfadb88d3c05e6015e945638 +Author: Hugh McMaster +Date: Wed Apr 3 21:36:03 2019 +1100 + + NEWS: Add pkg-config support for building applications and sub-agents + + Use the netsnmp package when building Net-SNMP applications. + Use the netsnmp-agent package when building Net-SNMP subagents. + + Signed-off-by: Hugh McMaster + [ bvanassche: edited makefile code and .pc files; added ./configure changes ] + +commit adc9b71aba9168ec64149345ea37a1acc11875c6 +Author: Sam Tannous +Date: Wed Apr 10 06:57:21 2019 -0700 + + snmpd: Avoid that snmpv3 bulkget errors result in a double free + + See also https://sourceforge.net/p/net-snmp/bugs/2923/. + See also https://sourceforge.net/p/net-snmp/patches/1388/. + +commit 30fb24e6cd9ac495fb7cfa0e32e5eea39c2b29ab +Author: Narendra Kumar S S +Date: Mon Apr 8 09:17:52 2019 -0700 + + CHANGES: BUG: 2930: Fix a Solaris hrSWInst crash + + Avoid that snmpd crashes on Solaris when querying software packages + with an empty CATEGORY field. + + See also https://sourceforge.net/p/net-snmp/bugs/2930/. + See also https://sourceforge.net/p/net-snmp/patches/1390/. + +commit 9f4af8c42d515e6b214738cc97212dfbe7f749cf +Author: Andreas Hasenack +Date: Tue Feb 5 18:21:40 2019 -0800 + + apps/snmptrapd_sql: Fix build against MySQL 8 + + See also https://sourceforge.net/p/net-snmp/bugs/2922/. + + [bvanassche: changed 'int' into 'char'] + +commit b9a778df08315500958fd83d11b4a123aaeec753 +Author: Bart Van Assche +Date: Sat Aug 4 21:43:59 2018 -0700 + + testing/fulltests/snmpv3/T010scapitest_capp.c: Port this test to FreeBSD + +commit 36fda7476cc26e44af84a679b8448b8629886dc2 +Author: Bart Van Assche +Date: Tue Jan 29 20:58:38 2019 -0800 + + ci: Skip tests that do not pass + + Instead of not building transports that do not pass, skip the tests + that are known to fail. + +commit f727d51b0fa485f93ffd57112442271716042cd7 +Author: Anders Wallin +Date: Mon Jan 28 18:59:08 2019 -0800 + + testing/fulltests/tls/STlsAgentTrap: Test both TRAP and INFORM + + Additionally, use localCert / peerCert instead of the deprecated + our_hostname / their_hostname. Remove incorrect comments and superfluous + configuration directives. + +commit e926b1cec44ee769618440719dbcc92bb68f7aa7 +Author: Anders Wallin +Date: Mon Jan 28 18:57:40 2019 -0800 + + libsnmp, TLS: Change default TLS version from v1.3 into v1.1 + + See also https://sourceforge.net/p/net-snmp/bugs/2920/. + + Fixes: d686bc3502f1 ("CHANGES: snmplib: Add support for OpenSSL 1.1.0") + +commit d1300ee69c6ff91779229fd4fba4b5141106ff9e +Author: Bart Van Assche +Date: Sun Jan 27 18:27:27 2019 -0800 + + ci: Fix and enable MinGW64 build + +commit a9fa5dcf2fa238db0538df2213878fa6e6b559dc +Author: Bart Van Assche +Date: Sun Jan 27 21:05:28 2019 -0800 + + ci/net-snmp-run-perl-tests: Make the Perl tests pass again + + Fixes: 41b5927a8b53 ("testing: Unbreak RUNFULLTESTS") + +commit 927040dd4ff9601f12ba7d082279b5d35c3d6031 +Author: Bart Van Assche +Date: Wed Jan 23 18:47:56 2019 -0800 + + ci, Appveyor: Rename MinGW64 build into MSYS2 + + Since that build uses the MSYS2 compiler, rename it into MSYS2. The + MinGW64 build has been commented out because it does not yet pass. + +commit 1d714a0d9f2f712afdcb9b7ba75222fcc46292af +Author: Bart Van Assche +Date: Wed Jan 23 20:59:55 2019 -0800 + + README.win32: Fix a MinGW64 package name + +commit 5a86cfb005dbc3dc495c7eb216ac1faaac00a069 +Author: Bart Van Assche +Date: Wed Jan 23 20:40:00 2019 -0800 + + testing: Unbreak RUNFULLTESTS + + Make it again possible to run RUNFULLTESTS from outside ci/net-snmp-run-tests. + Fixes: 9b1535bfb140 ("testing, perl: Remove push @INC statements") + +commit 2d3bb48b00fca7fff0f63dd065742f01ecd8f79f +Author: Bart Van Assche +Date: Sun Jan 20 19:40:34 2019 -0800 + + .appveyor.yml: Verify whether or not the MinGW64 build succeeded + + Now that building against MinGW64 works for Appveyor, check the build + exit status. Disable the regression tests because these do not yet pass. + +commit 58649949f37aa5f37a4a624a715043f7b48215f7 +Author: Bart Van Assche +Date: Tue Jan 15 20:52:59 2019 -0800 + + testing/check_for_pskill, MinGW64: Skip pskill test + + MinGW64 namely provides a proper kill command. + +commit e0cfa7c84b1db81b0ad07066bab0d87b4f131991 +Author: Bart Van Assche +Date: Thu Jan 17 20:12:04 2019 -0800 + + ci/net-snmp-configure, MinGW64: Enable openssl at configure time + +commit 7cdbaad9295467392a8264febaf42583991817f6 +Author: Bart Van Assche +Date: Sat Jan 19 12:47:34 2019 -0800 + + ci/build.bat, MinGW32: Make downloading succeed + + Avoid that downloading fails every now and then as follows: + + curl: (16) Error in the HTTP2 framing layer + +commit d2e2624156cb3195efa9a69bdb03d48f5d6782ab +Author: Bart Van Assche +Date: Sun Jan 20 21:36:27 2019 -0800 + + ltmain.sh, MinGW64: Fix a linker error + + Avoid that linking fails as follows with certain MinGW64 versions: + + ./.libs/lt-snmpps.c: In function 'main': + ./.libs/lt-snmpps.c:315:10: warning: implicit declaration of function '_spawnv' [-Wimplicit-function-declaration] + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + ^~~~~~~ + ./.libs/lt-snmpps.c:315:19: error: '_P_WAIT' undeclared (first use in this function); did you mean '__VALIST'? + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + ^~~~~~~ + __VALIST + +commit 2ff6a360f79dd63a7569fda8e4714dd9139ea136 +Author: Bart Van Assche +Date: Sun Jan 20 16:41:06 2019 -0800 + + snmplib/winservice.c: Move local data types and function declarations from .h into .c + +commit 14b5618f31cdeedd0ff4e4a8d6ff2aeefe9f235d +Author: Bart Van Assche +Date: Sun Jan 20 14:21:44 2019 -0800 + + snmplib/winservice.c: Use ANSI C datatypes and functions + + Use int, void and char instead of INT, VOID and TCHAR. Use snprintf() + instead of _sntprintf(). Note: using Microsoft's "Unicode" (UCS-2) mode + is considered obsolete. See also https://utf8everywhere.org/. + +commit abecab9327fd496d79332256990ade53745e49e0 +Author: Bart Van Assche +Date: Sun Jan 20 14:13:35 2019 -0800 + + snmplib/winservice.c: Reindent + + Reindent this source file with the help of the indent command mentioned in + the CodingStyle file. + +commit 1882e55c2f9e2c42eb7a75176710173774c34d3c +Author: Bart Van Assche +Date: Sun Jan 20 21:12:44 2019 -0800 + + configure: Add a test for getlogin() + + This patch avoids that the build fails as follows on MinGW64: + + snmpping.c:567:13: error: conflicting types for 'getlogin' + const char *getlogin(void) + ^~~~~~~~ + In file included from /usr/include/unistd.h:4:0, + from ../include/net-snmp/net-snmp-includes.h:34, + from snmpping.c:59: + /usr/include/sys/unistd.h:118:9: note: previous declaration of 'getlogin' was here + char * getlogin (void); + ^~~~~~~~ + +commit 03c98e3d4e7e459ed4e925c22f9cc4b181ded3eb +Author: Bart Van Assche +Date: Sun Jan 20 08:48:43 2019 -0800 + + libsnmp, agent, apps, MinGW64: Only use those MSVC functions that are available + + _get_osfhandle() is available in the MSVC and MinGW32 C libraries but not + in the MinGW64 C library. Hence add a configure test for _get_osfhandle() + and only use it if it is available. + +commit 98eb60dcaf13d5bc8513a785df21bd164ff04c35 +Author: Bart Van Assche +Date: Sun Jan 20 18:41:52 2019 -0800 + + agent/mibgroup/util_funcs: Reindent uClinux code + + Make the uClinux code indentation conform to the Net-SNMP coding style. + Change exit(0) statements in the parent into return 0 to make the behavior + of get_exec_pipes() more uniform across platforms. + +commit 90d91fa1943bbc4e9c18ba19e30ccf49b2be78ff +Author: Bart Van Assche +Date: Mon Jan 21 08:53:58 2019 -0800 + + apps/snmptrapd: Fix a MinGW64 compiler warning + + Avoid that the compiler complains about passing a struct timeval pointer to + a function that expects a struct __ms_timeval pointer. + +commit 5da4fc8c8e0849ba0997b16657430675283904e8 +Author: Bart Van Assche +Date: Fri May 11 21:55:56 2018 -0700 + + MinGW64: Fix select() and ioctlsocket() calls + + See also https://github.com/mirror/mingw-w64/blob/master/mingw-w64-headers/include/psdk_inc/_ip_types.h. + +commit 5250c5f62c573308ab8ecd62366eceaa488a85f6 +Author: Bart Van Assche +Date: Fri May 11 22:08:14 2018 -0700 + + configure.d/config_os_libs2: Remove redundant checks + + Instead of using both AC_CHECK_DECL() and AC_CHECK_FUNCS() to check for + EVP_sha224() and EVP_sha384(), only use AC_CHECK_FUNCS(). + +commit c7a330e6adefedbd7393401f55243b2b8313afb2 +Author: Bart Van Assche +Date: Mon Jan 21 12:54:57 2019 -0800 + + apps/agentxtrap.c: Fix a MinGW64 compiler warning + + Avoid that the following compiler warning is reported: + + agentxtrap.c: In function 'main': + agentxtrap.c:576:52: warning: passing argument 5 of 'select' from incompatible pointer type [-Wincompatible-pointer-types] + count = select(numfds, &fdset, NULL, NULL, !block ? &timeout : NULL); + ^ + In file included from ../include/net-snmp/system/mingw32.h:29:0, + from ../include/net-snmp/net-snmp-config.h:2194, + from agentxtrap.c:1: + /usr/include/w32api/winsock2.h:995:34: note: expected 'PTIMEVAL {aka struct __ms_timeval * const}' but argument is of type 'struct timeval *' + WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout); + ^~~~~~ + +commit b8cb73951f9204417c43105a27a5335ecbcddda1 +Author: Bart Van Assche +Date: Mon Jan 21 12:52:47 2019 -0800 + + apps/agentxtrap.c: Declare local variables static + +commit 9f3d055ff8523618ae57373e28dacbe33a0c25d6 +Author: Bart Van Assche +Date: Mon Jan 21 12:40:32 2019 -0800 + + apps/agentxtrap.c: Reindent to make the code conform to the coding style + +commit 53a971debbe6c04a41fbe8ce792a778c739174c8 +Author: Bart Van Assche +Date: Mon Jan 21 13:26:10 2019 -0800 + + agent/mibgroup/util_funcs.c: Fix MinGW32 compiler warnings + + Avoid that the compiler complains about passing a DWORD (unsigned long int) + to the %d format specifier. + +commit 45d848dbbf06797f4ff2eca9a576f3c5cad6bb1e +Author: Bart Van Assche +Date: Mon Jan 21 20:19:13 2019 -0800 + + README.win32: Improve MinGW64 instructions + +commit 2baa87b2bfd772b62fa1864903afe101fc2e4946 +Author: Bart Van Assche +Date: Tue Jan 1 19:31:40 2019 -0800 + + ci: Add support for Cirrus CI and FreeBSD + +commit 241304ef7132a2c04f135ea8a3463e29e6e46496 +Author: Bart Van Assche +Date: Sat Jan 12 08:53:14 2019 -0800 + + ci: Port three scripts from bash to sh + +commit 744ae09fd0a38f4634195197ab201442516559c5 +Author: Bart Van Assche +Date: Sat Jan 12 19:46:05 2019 -0800 + + testing, Perl: enable use strict and use warnings + +commit 9b1535bfb140697dff985ce8feaaa939069b7ac1 +Author: Bart Van Assche +Date: Sat Jan 12 19:31:28 2019 -0800 + + testing, perl: Remove push @INC statements + + These statements are not necessary if $PERL5LIB is set before these + tests are run. + +commit ba0505329f18424899c96589bd20c4f5c739aa17 +Author: Bart Van Assche +Date: Sat Jan 12 19:21:59 2019 -0800 + + testing: Skip DTLS-UDP tests if DTLS-UDP transport is not available + + Fixes: 0b8b11504729 ("testing for checking client side verification of server certificates") + +commit e566d5d792c003f4f67f83a0deb6b482ae694ab5 +Author: Bart Van Assche +Date: Sat Jan 12 17:01:22 2019 -0800 + + testing/RUNFULLTESTS: Only run Perl and Python tests if support for these languages has been enabled + +commit 3be8ca102a3c13237b499ef5c7f80dde9f2f5fa3 +Author: Bart Van Assche +Date: Sat Jan 12 20:42:04 2019 -0800 + + testing/RUNFULLTESTS: Enable 'use warnings' + + Additionally, fix two bugs: assign the exit code of the $cfp_path + script to $rc instead of its output and make decide_exec() return + early if there is no app extension. + +commit 04e59874c135b7bc8fcad73057c8b75bc0ec2f9b +Author: Bart Van Assche +Date: Sat Jan 12 08:51:38 2019 -0800 + + testing/fulltests/support/simple_eval_tools.sh: Improve tmp file dumping + + Avoid showing the contents of temporary files twice that are shorter + than 512 lines if a test fails. + +commit 969e9a7391067b3829bad7b88918f60c4944a22e +Author: Bart Van Assche +Date: Wed Jan 2 06:50:55 2019 -0800 + + testing/fulltests/support/simple_TESTCONF.sh: Increase MAX_RETRIES + + This patch avoids that regression tests sporadically fail due to not + finding an UDP port that is not in use. + +commit baf47f3e1e3f0c2397ba074a0245d4b3b442a9b6 +Author: Bart Van Assche +Date: Sat Jan 12 15:28:11 2019 -0800 + + perl: Avoid "use of uninitialized value $ENV{"OSTYPE"}" warnings + + The bash shell sets the OSTYPE environment variable but FreeBSD sh not. + Hence check whether $OSTYPE has been set before using its value. + +commit e1c6ec5a73bc67b3b6139479fa7a0b7e985b47ca +Author: Bart Van Assche +Date: Thu Jan 3 21:14:57 2019 -0800 + + snmplib/snmpksm: Fix OLD_HEIMDAL compiler warnings + + Avoid that the following compiler warnings are reported for OLD_HEIMDAL: + + snmpksm.c:486:21: warning: unused variable 'blocksize' [-Wunused-variable] + size_t blocksize, encrypted_length; + ^ + snmpksm.c:1769:21: warning: assigning to 'u_char *' (aka 'unsigned char *') from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] + *parms->scopedPdu = (char *) output.data; + ^ ~~~~~~~~~~~~~~~~~~~~ + snmpksm.c:1249:34: warning: unused variable 'blocksize' [-Wunused-variable] + size_t cksumlength, blocksize; + ^ + +commit 611b485ea14541c1e04afb812c88a1bcdf203396 +Author: Bart Van Assche +Date: Sat Jan 12 08:30:36 2019 -0800 + + agent/auto_nlist: Fix a FreeBSD compiler warning + + Avoid that the following compiler warning is reported on FreeBSD 10 systems: + + auto_nlist.c:56:22: warning: unused variable 'n_name' [-Wunused-variable] + static char *n_name = NULL; + ^ + +commit 944c75959517c66dc12fe5c713b5904abb05343d +Author: Bart Van Assche +Date: Sat Jan 12 08:30:32 2019 -0800 + + agent/auto_nlist: Enclose a code block in curly braces + + Other than leaving out a superfluous if-test this patch does not change + any functionality. The purpose of this patch is to make the next patch + easier to read. + +commit 7d66a35cd6bf86ca9e8070751cfba9ce97eddd6b +Author: Bart Van Assche +Date: Mon Jan 14 18:39:45 2019 -0800 + + configure: Enable shared library support for FreeBSD 10 and later + + See also https://lists.freebsd.org/pipermail/freebsd-current/2013-March/040460.html. + +commit e4e1d25dae34f5a9aeff13c83008d89794211ab0 +Author: Bart Van Assche +Date: Sun Dec 16 12:29:11 2018 -0800 + + README.win32: Update this document + + Change "Microsoft Visual C++" into "Microsoft Visual Studio". + Remove all references to the Microsoft Platform SDK since that SDK + has been integrated in the Windows SDK. Remove all references to .dsp + files since these files are no longer maintained. Update all outdated + instructions. Add build instructions for Mingw-w64. + +commit fccd5f13ce825c813944a555dfbdb36c3eddc21f +Author: Bart Van Assche +Date: Sun Dec 16 12:29:09 2018 -0800 + + README.win32: Strip trailing whitespace + +commit a79439a2fe185864183252b7c59d008b1f031b70 +Author: Bart Van Assche +Date: Fri Jan 11 19:16:15 2019 -0800 + + man/snmpd.conf.5.def: Document that monitor names must be unique + + Reported-by: Masanari Iida + +commit 79f014464ba761e2430cc767b021993ab9379822 +Author: Wes Hardaker +Date: Tue Jan 8 08:52:29 2019 -0800 + + NEWS: snmptrap: BUG: 2899: Patch from Drew Roedersheimer to set library engineboots/time values before sending + +commit dc3194eaecb4545a0364fe4a565f1c0d001835a7 +Author: Bart Van Assche +Date: Fri Dec 28 18:58:45 2018 -0800 + + libsnmp/transports/UDP: Remove MSG_NOSIGNAL + + Remove MSG_NOSIGNAL from the UDP code because it does not affect SOCK_DGRAM + sockets. From the sendto() specification + (http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendto.html): + "[EPIPE] The socket is shut down for writing, or the socket is + connection-mode and is no longer connected. In the latter case, and if + the socket is of type SOCK_STREAM or SOCK_SEQPACKET and the MSG_NOSIGNAL + flag is not set, the SIGPIPE signal is generated to the calling thread." + +commit 3ca90c2c1260e036a5abd73a40f83d4ded545580 +Author: Bart Van Assche +Date: Fri Dec 28 11:57:11 2018 -0800 + + libsnmp/transports/UDP: Add support for VRF + + This patch is based on a patch provided by Sam Tannous. See also + https://sourceforge.net/p/net-snmp/patches/1354/. + +commit 3dce73c8833a74aab30046155ab50a1c95edd893 +Author: Bart Van Assche +Date: Fri Dec 28 11:56:40 2018 -0800 + + libsnmp/transports/UDP: Reduce indentation level + + This patch does not change any functionality. + +commit a74d7087e536cfa3b74a77647fa73a49c742f1c4 +Author: Bart Van Assche +Date: Fri Dec 28 11:34:25 2018 -0800 + + libsnmp: Split netsnmp_udpbase_sendto() + + This patch does not change any functionality but makes the implementation + of this function easier to read. + +commit 9e29c8da35041520a58614281eb504bb91990177 +Author: Bart Van Assche +Date: Fri Dec 28 11:05:52 2018 -0800 + + testing/fulltests/support/simple_eval_tools.sh: Show file name above file contents if a test fails + + See also commit 0d828eed1fb5 ("testing/fulltests/support/simple_eval_tools.sh: Dump log files in case of test failure"). + +commit 0b52f2ed1de081c1b8682d55c9c6cde973af7630 +Author: Bart Van Assche +Date: Wed May 9 08:12:41 2018 -0700 + + testing/fulltests/support/simple_eval_tools.sh: Dump log files in case of test failure + + This makes it easier to determine the root cause of tests that fail + on Travis or Appveyor. + +commit 35fcadf5ba23a14a994ac5a963a02b3558a998ec +Author: Bart Van Assche +Date: Fri Dec 28 09:41:20 2018 -0800 + + testing/fulltests/support/myip: Avoid using IO::Socket::IP + + Since IO::Socket::IP is not available on Travis Darwin instances, rewrite + 'myip' such that it doesn't use IO::Socket::IP. + +commit 472a30e1a49dd2cbfaf63f5571249124064e4671 +Author: Bart Van Assche +Date: Thu Dec 27 21:53:25 2018 -0800 + + ci: Move Travis before_script shell code into ci/before.sh + + This makes it easier to maintain this code. + +commit 8d1894314ad1dff67124d50c9f9fa071ac3abb99 +Author: Bart Van Assche +Date: Thu Dec 27 21:28:07 2018 -0800 + + libsnmp/asn1.c: Minimize diffs with the master branch + + See also commit 7aceb7a49264 ("libsnmp, FreeBSD: Fix the build") on the + v5.8 branch and commit b97a0417a235 ("MSVC: Reduce build time") on the + master branch. + +commit ac65c73a90369f725959c820af8579627ec6f965 +Author: Bart Van Assche +Date: Thu Dec 27 16:57:11 2018 -0800 + + ci/net-snmp-configure: Make the code for querying the OpenSSL and libssh2 versions more robust + +commit 7aceb7a4926430576d2253a5b2e00d9809389fdd +Author: Bart Van Assche +Date: Fri Dec 28 00:12:13 2018 +0000 + + libsnmp, FreeBSD: Fix the build + +commit 77972cc90d1ef18f93c81284f5a1623947f55a94 +Author: Bart Van Assche +Date: Thu Dec 27 23:55:30 2018 +0000 + + NetBSD: Fix two compiler warnings in MIB implementations + +commit 024c6316eb1f37a7c3645e0a15032173d04e2c11 +Author: Bart Van Assche +Date: Thu Dec 27 15:05:47 2018 -0800 + + SNMP-TARGET-MIB, FreeBSD: Hide kernel threads + + See also https://sourceforge.net/p/net-snmp/bugs/2890/. + See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231732. + + Signed-off-by: Ben Rubson + +commit 178e3240cb880ddb5489ce3eb5c7a4371cebf288 +Author: Bart Van Assche +Date: Fri Jun 8 10:46:22 2018 +0200 + + SNMP-TARGET-MIB: Fix the debug code that shows tAddress + + Since tAddress contains binary data, show it in hex instead of as an + ASCII string. + +commit 67dbffc04db36be6bd654b8472262e4c1850319e +Author: Bart Van Assche +Date: Mon Dec 17 19:35:00 2018 -0800 + + snmplib, transports, Darwin: Fix compiler warnings + + Avoid that the compiler complains about implicit declarations of + strdup(), strchr() and strlcpy(). + +commit 29f03b11f527c874cc01afa5293eb9bb790b9798 +Author: Bart Van Assche +Date: Mon Dec 17 18:49:18 2018 -0800 + + libsnmp, Windows: Fix a recently introduced compiler warning + + Since sin6_scope_id has been declared as unsigned long on Windows, + cast it to int before passing it to the %d format specifier. + + Fixes: f3d96c8c45f9 ("libsnmp: Add two additional debug statements in the code for parsing IPv6 addresses") + +commit bb4631cfbaefbea8b29c4716e858d1467d588541 +Author: Bart Van Assche +Date: Sun Dec 16 19:30:19 2018 -0800 + + testing/fulltests/support/myip: Also return IPv6 scope ID + + This is necessary to let the tests based on S180trapaddrinfra pass. + +commit f3d96c8c45f91a193883c7b669b78eec6d2b3242 +Author: Bart Van Assche +Date: Sun Dec 16 19:54:51 2018 -0800 + + libsnmp: Add two additional debug statements in the code for parsing IPv6 addresses + +commit c602f9527ea63aaafa40f400e1e14dcd4113ae66 +Author: Bart Van Assche +Date: Sun Dec 16 19:53:48 2018 -0800 + + libsnmp: Fix the code for parsing the IPv6 scope ID + + Fixes: 0b637fea62c7 ("libsnmp/transports: Introduce netsnmp_parse_ep_str()") + +commit 64f4ead817c4c018f9f811442565feac656fc0e9 +Author: Bart Van Assche +Date: Sun Dec 16 14:51:44 2018 -0800 + + libsnmp: Only include when necessary + + This helps to reduce the Net-SNMP compilation time. + +commit 7d6ab1439d5d8cb09801c184ef17882cb62ba28d +Author: Bart Van Assche +Date: Sun Dec 16 16:44:52 2018 -0800 + + ci/openssl.bat: Update OpenSSL version + +commit de7f76855c53e9a184f3ec6015c680fd13b03fae +Author: Bart Van Assche +Date: Sun Dec 16 14:51:25 2018 -0800 + + ci/build.sh: Remove CFLAGS / CPPFLAGS / LDFLAGS definitions + + These definitions are not necessary when building with MinGW and break + the build when building with Mingw-w64. + +commit cd09fd82522861830aaf9d237b26eef5f9ba50d2 +Author: Bart Van Assche +Date: Wed Nov 21 20:47:42 2018 -0800 + + MIB-II: Only log once that opening /proc/net/if_inet6 failed + + If IPv6 has been disabled (ipv6.disable=1) then opening /proc/net/if_inet6 + fails. Only log this once instead of thousand of times a day. + + Reported-by: Fif + +commit 4eab854c9759be79ad56497445210f60bbc6b50d +Author: Anders Wallin +Date: Mon Nov 19 16:27:59 2018 +0100 + + snmpd: Fix handling of trapsess option -tag + + The trapsess argument '-tag' is not recognized due to an incorrect string + length. Fix that length. + + See also https://sourceforge.net/p/net-snmp/patches/1383/. + + Fixes: 6b7350749490 ("allow trap sinks to set name, tag, profile") + Signed-off-by: Anders Wallin + [ bvanassche: edited commit message ] + +commit de590a1a47f610ed0701c19f62c2e92c0d4a535f +Author: Anders Wallin +Date: Thu Aug 30 11:22:31 2018 +0200 + + libsnmp/transports/DTLSUDP: Fix a typo in a debug token + + See also https://sourceforge.net/p/net-snmp/patches/1381/. + + Fixes: a9a619e0d173 ("CHANGES: snmplib: dtls: overhaul of debug") + Signed-off-by: Anders Wallin + [ bvanassche: edited commit message ] + +commit f651cfa36569ab95d1bc817b3bd1289cdb15a5ea +Author: Anders Wallin +Date: Mon Oct 22 09:05:45 2018 +0200 + + tests: Add a delay in STlsVars + + Avoid that the STlsVars tests fail due to checking whether a trap has been + received before it has been sent. + + See also https://sourceforge.net/p/net-snmp/patches/1380/. + + Signed-off-by: Anders Wallin + [ bvanassche: edited commit message ] + +commit 8fd3780f99ae50f33dd1216597bb8b6be271507d +Author: lijo +Date: Mon Nov 19 18:33:26 2018 -0800 + + snmpd: Avoid that parsing "trapsess ... -e ..." triggers a memory leak + + See also https://sourceforge.net/p/net-snmp/patches/1379/. + See also https://sourceforge.net/p/net-snmp/bugs/2887/. + + [ bvanassche: reduced the number of changes in this patch from four to one ] + +commit a5282f41db0cb339666fb0db8590085e69464be6 +Author: Anders Wallin +Date: Mon Jun 25 10:48:51 2018 +0200 + + libsnmp: Include disabled debug tokens in NET-SNMP-AGENT-MIB::nsDebugTokenStatus + + See also https://sourceforge.net/p/net-snmp/patches/1371/. + + Signed-off-by: Anders Wallin + +commit b0f497b84aa28a754ad7ce260c63092dd85a584d +Author: Bart Van Assche +Date: Mon Nov 19 18:59:03 2018 -0800 + + snmpd, MIB-II: Fix a recently introduced compiler warning + + Avoid that the compiler reports the following on Linux: + + mibII/tcpTable.c:341:1: warning: control reaches end of non-void function [-Wreturn-type] + } + ^ + + Fixes: 61c373a9a357 ("Forward port FreeBSD 12 patches") + +commit f42a4af67a00deb1b11748b944e45de9e2415c50 +Author: Niels Baggesen +Date: Mon Nov 19 21:39:58 2018 +0100 + + hr_disk: include sys/disk.h is not cosher for DragonFly + +commit 2bbad43c53ffe040f02bc6269e32368edd7c6ca7 +Author: Niels Baggesen +Date: Wed Nov 14 22:01:52 2018 +0100 + + Patch for cpu_sysctl for FreeBSD 12. + + Patch taken from FreeBSD ports collection. + +commit 61c373a9a3571ea3f63a2762e43ddb0c9273ce64 +Author: Niels Baggesen +Date: Wed Nov 14 21:45:26 2018 +0100 + + Forward port FreeBSD 12 patches + +commit bdfdc84b67124f530cdae9f295fa3906021ebf8e +Author: Niels Baggesen +Date: Tue Nov 13 23:06:17 2018 +0100 + + Update IANAifType-MIB to current IANA version + +commit 5e9bf8c69f8b3fe5f49c3402f8d5865a4aa0ed24 +Author: Niels Baggesen +Date: Tue Nov 13 22:57:32 2018 +0100 + + Minor hr_disk fixes for FreeBSD/NetBSD. + +commit 38dfa1db7b3f60862bdf01d95aac807f222146ab +Author: Niels Baggesen +Date: Tue Nov 13 22:43:21 2018 +0100 + + Fix hr_disk for newer FreeBSD and NetBSD. + +commit e48ead2dff1820b8fb7aadf2293b24303659ac26 +Author: Niels Baggesen +Date: Tue Nov 13 22:00:46 2018 +0100 + + Update IANAifType-MIB to current IANA version. + +commit fcecebf8f0fc894c351c82fda87693d76eebf994 +Author: Niels Baggesen +Date: Tue Nov 13 21:55:34 2018 +0100 + + Patch for udpEndpointTable for FreeBSD 12. + + Patch take from FreeBSD ports collection. + +commit 64074f086957ec6dc45f73e67f5007e4eea0734d +Author: Niels Baggesen +Date: Tue Nov 13 21:54:52 2018 +0100 + + Patch for udpTable for FreeBSD 12. + + Patch take from FreeBSD ports collection. + +commit 27e21bee375723ba6b88cbd2d52b9c40206a1e9a +Author: Niels Baggesen +Date: Tue Nov 13 21:53:04 2018 +0100 + + Patch for tcpConnTable for FreeBSD 12 + + Patch taken from FreeBSD ports collection. + +commit 7f3abe7515d585e089ddddf9a30762451b95aa44 +Author: Niels Baggesen +Date: Tue Nov 13 21:51:24 2018 +0100 + + Patch for tcpTable for FreeBSD 12 + + Patch taken from Freebsd ports collection. + +commit 1f7a794ece5f8e0754c2d584bdee89ed002921c6 +Author: Bart Van Assche +Date: Fri Nov 9 07:07:51 2018 -0800 + + libsnmp, transports: Log an error message if parsing "clientaddr" fails + +commit 70488e36d3a686d2956464b68043bac62ae2be64 +Author: Bart Van Assche +Date: Thu Nov 8 14:40:11 2018 -0800 + + snmplib, transports: Make the IPv6 address parsing code closer to the IPv4 equivalent + +commit ebac62b66e35197ee036ea5967c4d4ff91bf1b4a +Author: Bart Van Assche +Date: Thu Nov 8 11:24:51 2018 -0800 + + snmplib, transports: Move the code for recognizing bare IPv6 addresses into netsnmp_parse_ep_str() + + This patch makes Net-SNMP recognize endpoint specifications like ::1@lo next + to the already supported [::1]@lo. + +commit 0d4d74bcc3e35ed55a6653db71ad2b187a64f3b0 +Author: Bart Van Assche +Date: Thu Nov 8 12:03:01 2018 -0800 + + libsnmp, transports: Only recognize non-empty strings as a number + +commit 5abe5322404b72c2df2344948be28def710eccca +Author: Bart Van Assche +Date: Wed Nov 7 16:45:52 2018 -0800 + + libsnmp, transports, UDP/IPv6: Simplify netsnmp_udp6_transport() + + This patch does not change any functionality. + +commit a21587438825a6658bca214425240aae473df9ff +Author: Bart Van Assche +Date: Thu Nov 8 13:26:36 2018 -0800 + + libsnmp, transports: Simplify netsnmp_udpipv4base_transport() + + This patch does not change any functionality. + +commit b25536962f81dc4b4e03f3a12b2e847c23fb36a9 +Author: Bart Van Assche +Date: Thu Nov 8 14:09:00 2018 -0800 + + man/snmp.conf.5.def: Improve clientaddrUsesPort documentation + +commit 8cbb36da6ef4e82f0521ff0cf3f4b1424e49d21b +Author: Bart Van Assche +Date: Thu Nov 8 10:30:59 2018 -0800 + + snmplib, transports: Remove NETSNMP_TSPEC_NO_DFTL_CLIENT_ADDR + + Since this flag is never set, remove it. Also remove the code that depends + on this flag being set. + + Fixes: 5d8372341594 ("shared transport + udp shared domain") + +commit a240e46cdaf189f2c74b6b465ffbc09d6c697088 +Author: Bart Van Assche +Date: Thu Nov 8 10:33:07 2018 -0800 + + snmplib, transports: Remove NETSNMP_TSPEC_SHARED + + Since this flag is not used anywhere in the Net-SNMP code base, remove it. + + Fixes: 5d8372341594 ("shared transport + udp shared domain") + +commit d566ac2930f66c42dec1a20503b25a3b12902911 +Author: Bill Fenner +Date: Thu Nov 8 10:45:15 2018 -0800 + + Go back to testing ::1, without brackets, for IPv6. + +commit 48a1163640a651ad035523a9673ab6e20adf7dfc +Author: Bill Fenner +Date: Thu Nov 8 10:43:33 2018 -0800 + + Parse a bare IPv6 address, which netsnmp_parse_ep_str() won't. + +commit 06a02b7c708c1ea2bf67e59c333001e8ce128dff +Author: Bill Fenner +Date: Thu Nov 8 10:42:58 2018 -0800 + + Specify the default port of ":0" when parsing source addresses. + +commit 280d6c16e847f0204663ccfe81063c5f7da215e9 +Author: Bart Van Assche +Date: Wed Nov 7 06:58:22 2018 -0800 + + testing, T18[0123]: Synchronize with master branch + +commit bb1e817b3b83c3e22951a815689964dc235f5d54 +Author: Bart Van Assche +Date: Wed Nov 7 06:47:50 2018 -0800 + + testing/fulltests/default/S180trapaddrinfra: Use again the default port + + Since the purpose of the T18* tests is to use the default port, remove + the PROBE_FOR_PORT calls again. + +commit 5d94f6baff0f05dd4976cbbf0fef64ecf70cf881 +Author: Bart Van Assche +Date: Tue Nov 6 19:59:20 2018 -0800 + + testing, T18[012345]: Make it possible to run these tests as a regular user + +commit 8169acab64012fe0026e8a47a054e16a4c20621e +Author: Bart Van Assche +Date: Tue Nov 6 19:37:35 2018 -0800 + + libsnmp/transports: Change the meaning of ":0" back to "any port" + +commit 1809c8c0aa33ab48f2e5217d9dafcca87b032a6c +Author: Bill Fenner +Date: Tue Nov 6 13:06:33 2018 -0800 + + Fix clientaddr for v6 traps by zeroing the port number + + This is the same thing that snmpUDPIPv4BaseDomain.c does + in the same place: zeroes out the port number when parsing + the clientaddr. + +commit 29d3a54c189e63cab1d15987e07ec8fe8fb76e84 +Author: Bill Fenner +Date: Tue Nov 6 13:05:52 2018 -0800 + + Fix typo: test IPv6, not IPv4. + +commit 4833c4ff7d479fd3554eeafa1cd4b23f52dfc7f5 +Author: Bill Fenner +Date: Tue Nov 6 13:05:28 2018 -0800 + + Fix UDP/IPv6 address parsing. Add default tracing. + +commit 7be7d70719dea95a55b29b4fa3a7c29a7e7c946b +Author: Bill Fenner +Date: Tue Nov 6 12:17:24 2018 -0800 + + Add some default tracing for trap source tests + +commit b7d00beeed42137aa5b2b3c93014059e8d67db2b +Author: Bill Fenner +Date: Tue Nov 6 12:09:23 2018 -0800 + + Fix typo: test v6 + +commit 9de0984a4c2502f2d548c9e9332cc04267b4c026 +Author: Bill Fenner +Date: Tue Nov 6 11:58:14 2018 -0800 + + Add trap source tests for "trapsess -s" + +commit 223de5eb19c95866e7c50c6d022f25cbdb22f816 +Author: Bill Fenner +Date: Tue Nov 6 11:54:22 2018 -0800 + + Bind to the address that we chose above, not just to the session address + +commit 6f6d85d27b2c1d42d05173633cea95916ab11cda +Author: Bill Fenner +Date: Tue Nov 6 11:12:21 2018 -0800 + + Tests for setting the source address of trap messages + +commit 379cfa157e51fe51a802a3554fc7f268efeb74dc +Author: Bill Fenner +Date: Tue Nov 6 08:16:16 2018 -0800 + + Avoid logging "unknown snmp version" for agentx + +commit 313949522c4d0ddfeac72195fa63512955d9eb28 +Author: Bart Van Assche +Date: Fri Nov 2 21:12:24 2018 -0700 + + libnsmp/transports: Fix the Darwin build + + Avoid that the Darwin build fails as follows: + + transports/snmpIPBaseDomain.c:9:12: error: static declaration of 'isnumber' follows non-static declaration + static int isnumber(const char *cp) + ^ + /usr/include/ctype.h:323:1: note: previous definition is here + isnumber(int _c) + ^ + +commit 62f6babcc7cfc54c79b442b8a7f45662b4ddc807 +Author: Bart Van Assche +Date: Sun Oct 28 12:43:33 2018 -0700 + + testing/fulltests/unit-tests: Add netsnmp_parse_ep_str() unit test + +commit 0831ed64a39a34dc040eabe39d0229b07fa2a8a5 +Author: Bart Van Assche +Date: Fri Oct 26 19:25:47 2018 -0700 + + libsnmp/transports: Add support for interface binding + +commit c7398de4122102b3250e6dac7c09dbc5d09f1840 +Author: Bart Van Assche +Date: Sat Oct 27 20:42:47 2018 -0700 + + configure: Add a test for SO_BINDTODEVICE + +commit 76336fb63bb74b4dede5dda5c14fb8cf2d60be8e +Author: Bart Van Assche +Date: Thu Oct 25 21:13:13 2018 -0700 + + libsnmp/transports: Change multiple sockaddr_in* arguments into netsnmp_ep + + Make this change for all internal transport functions that will need + the network interface information. This patch does not change any + functionality. + +commit 19ba7b0a6b56d201a8563fe6505cd82e313c1c9c +Author: Bart Van Assche +Date: Thu Oct 25 19:53:04 2018 -0700 + + libsnmp/transports: Introduce netsnmp_sockaddr_in3() and netsnmp_sockaddr_in6_3() + + Introduce functions for converting Net-SNMP endpoint definitions into + struct netsnmp_ep. Calls to these functions will be added in a later + patch. + +commit 0b637fea62c7b6dc467b94206d0bd2dec6f912ca +Author: Bart Van Assche +Date: Mon Oct 22 21:07:14 2018 -0700 + + libsnmp/transports: Introduce netsnmp_parse_ep_str() + + The only functional change in this patch is that it is now allowed + to surround IPv4 addresses and hostnames with square brackets in + transport endpoint definitions. + +commit b5c62f2dc1df5e97d635eab55286190d2acceae4 +Author: Bart Van Assche +Date: Sun Oct 28 14:27:21 2018 -0700 + + ci: Disable brew upgrade openssl in travis.yml because it fails often + +commit 9b637efe809c490fdcaf30d1af20b4cbaef76e3e +Author: Bart Van Assche +Date: Sat Oct 27 20:34:21 2018 -0700 + + libsnmp/transports: Fix netsnmp_udp6_transport() + + Only create a transport object if parsing the client address succeeded + instead of creating a transport object when parsing the client address + failed. + + Fixes: 5d8372341594 ("shared transport + udp shared domain") + +commit 22884099f55d0bf33ba5953b5e3dbc24fac8214a +Author: Bart Van Assche +Date: Fri Oct 26 21:45:32 2018 -0700 + + libsnmp/transports: Unexport functions that are only used inside libsnmp + + This only affects the non-Cygwin Windows builds. + +commit 1e0856b3cc0336aea3a75076c491e98113c38990 +Author: Bart Van Assche +Date: Fri Jun 22 22:06:41 2018 -0700 + + MinGW64: Fix the NETSNMP_PRIz detection code + +commit e03dd5b6b906eb8cee8a08a52c69598e07875d1e +Author: Bart Van Assche +Date: Mon May 7 07:02:51 2018 -0700 + + snmplib/read_config: Fix a compiler warning + +commit d20012cb9158153c66ddd5ce024e129b3e15e349 +Author: Bart Van Assche +Date: Sun May 20 20:06:30 2018 -0700 + + configure: Fix the netsnmp_cv_size_t_type check + + Avoid that the following error message appears if size_t == long long: + + configure: line 26619: [: too many arguments + +commit f0b8f2c17707a3526132cfcdfa2056ffd1eea5b7 +Author: Bart Van Assche +Date: Mon Oct 22 21:06:24 2018 -0700 + + libsnmp/transports: Introduce netsnmp_resolve_v6_hostname() + + Other than changing the debug label from netsnmp_sockaddr_in6_2 into + netsnmp_sockaddr_in6, this patch does not change any functionality. + +commit fc286dc029054d292edc303146b2a07df40cf1fa +Author: Bart Van Assche +Date: Fri Oct 26 19:47:40 2018 -0700 + + libsnmp/transports: Make TCP transport error handling more systematic + + This patch does not change any functionality. + +commit d0c22996629dabee9b416ffdaafaa740075dae8b +Author: Bart Van Assche +Date: Sun Oct 21 20:19:06 2018 -0700 + + libsnmp/transports: Remove several superfluous assignments + + Since the C language guarantees that static objects are zero-initialized, + assigning NULL to a member of such an object is superfluous. Leave out + several such superfluous NULL assignments. + +commit 06b7af9798a521e2ed1f88bcf62e550202d4095b +Author: Bart Van Assche +Date: Sun Oct 21 20:54:23 2018 -0700 + + libsnmp/transports/snmpIPv6BaseDomain.c: Remove some trailing whitespace + +commit d1ea7513559b66f17593f52b16a90977ca0da999 +Author: Bart Van Assche +Date: Fri Oct 26 18:43:03 2018 -0700 + + libsnmp/snmp_transport.c: Document the origin of the format of ostring variables + +commit 159b13e99fcdd32f273e0c3018d092b91f45c8e9 +Author: Bart Van Assche +Date: Sat Oct 27 07:46:50 2018 -0700 + + MinGW64: Fix UDP transport build + + Avoid that the MinGW64 build fails as follows: + + transports/snmpUDPBaseDomain.c: In function 'netsnmp_udpbase_sendto': + transports/snmpUDPBaseDomain.c:290:16: error: 'struct in_pktinfo' has no member named 'ipi_spec_dst' + ipi.ipi_spec_dst.s_addr = srcip->s_addr; + ^ + + Additionally, remove some incorrect Cygwin code. + +commit 6f1db6a1fecb0c8b39d9d92f412641c729099a9f +Author: Havard Eidnes +Date: Fri Oct 26 06:55:57 2018 -0700 + + configure: Fix a shell script compatibility issue + + See also https://sourceforge.net/p/net-snmp/bugs/2896/ + +commit 7e6aa914d066559ce223a6fa065e70e3eafd5949 +Author: Bart Van Assche +Date: Sat Oct 6 15:46:42 2018 -0700 + + ucd-snmp, HOST-MIB: Rework pcre abstraction + + In previous versions of the pcre library the pcre typedef was an alias + for struct pcre. In the latest version of that library that typedef is + an alias for struct real_pcre8_or_16. This patch avoids that the + compiler complains about incompatible pointer assignments between these + two structure types. + +commit 014a1a0ff052721c66c47b861129d8346ffb85ae +Author: Bart Van Assche +Date: Wed Jun 6 11:20:42 2018 +0200 + + snmplib, MIBs, Python: Fix gcc 8 warnings + + Avoid that gcc 8 complains about incompatible function casts. This + patch does not change any functionality. + +commit c6facf2f080c9e1ea803e4884dc92889ec83d990 +Author: Drew A Roedersheimer +Date: Wed Oct 10 21:42:35 2018 -0700 + + snmplib/keytools: Fix a memory leak + + Avoid that Valgrind reports the following memory leak: + + 17,328 bytes in 361 blocks are definitely lost in loss record 696 of 704 + at 0x4C29BE3: malloc (vg_replace_malloc.c:299) + by 0x52223B7: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.2k) + by 0x52DDB06: EVP_MD_CTX_create (in /usr/lib64/libcrypto.so.1.0.2k) + by 0x4E9885D: generate_Ku (keytools.c:186) + by 0x40171F: asynchronous (leaktest.c:276) + by 0x400FE7: main (leaktest.c:356) + +commit 67726f2a74007b5b4117fe49ca1e02c86110b624 +Author: Drew A Roedersheimer +Date: Tue Oct 9 23:28:25 2018 +0000 + + snmplib: Fix a memory leak in scapi.c + + This patch avoids that Valgrind reports the following leak: + + ==1069== 3,456 bytes in 72 blocks are definitely lost in loss record 1,568 of 1,616 + ==1069== at 0x4C29BE3: malloc (vg_replace_malloc.c:299) + ==1069== by 0x70A63B7: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.2k) + ==1069== by 0x7161B06: EVP_MD_CTX_create (in /usr/lib64/libcrypto.so.1.0.2k) + ==1069== by 0x4EA3017: sc_hash (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4EA1CD8: hash_engineID (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4EA1DEC: search_enginetime_list (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4EA2256: set_enginetime (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4EC495E: usm_process_in_msg (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4EC58CA: usm_secmod_process_in_msg (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4E7B91D: snmpv3_parse (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4E7C1F6: ??? (in /usr/lib64/libnetsnmp.so.31.0.2) + ==1069== by 0x4E7CE94: ??? (in /usr/lib64/libnetsnmp.so.31.0.2) + + [ bvanassche: minimized diffs / edited commit message ] + +commit 0cd9154ec55413c60686ff6d82e3a59592e2b333 +Author: Bart Van Assche +Date: Fri Sep 28 20:55:39 2018 -0700 + + IP-MIB: Fix resource leaks in error paths + + This is a modified version of a subset of a patch supplied by Josef Ridky. + See also https://sourceforge.net/p/net-snmp/bugs/2889/. + +commit 516c110892cb351ca4f01e864c564703705ed257 +Author: Bart Van Assche +Date: Fri Sep 28 20:49:01 2018 -0700 + + NET-SNMP-SYSTEM-MIB: Fix a resource leak in an error path + + This is a subset of a patch supplied by Josef Ridky. See also + https://sourceforge.net/p/net-snmp/bugs/2889/. + +commit 484a6904a6926947d3db0185d650eb1e539c391b +Author: Bart Van Assche +Date: Fri Sep 28 20:46:49 2018 -0700 + + net-snmp-create-v3-user.in: Remove dead code + + This was reported by Josef Ridky. See also + https://sourceforge.net/p/net-snmp/bugs/2889/. + +commit ddca8b3bd26519ef3ed51b4b80491e27ca306e5a +Author: Bart Van Assche +Date: Fri Sep 28 20:44:27 2018 -0700 + + net-snmp-config.in: Do not execute the gcc output + + This was reported by Josef Ridky. See also + https://sourceforge.net/p/net-snmp/bugs/2889/. + +commit 14707eca724bea442e6f54e770410a6a653ec541 +Author: Bart Van Assche +Date: Fri Sep 28 20:41:20 2018 -0700 + + net-snmp-config.in, net-snmp-create-v3-user.in: Remove an unused variable + + This was reported by Josef Ridky. See also + https://sourceforge.net/p/net-snmp/bugs/2889/. + +commit 28bcf2da9ab935f2db9c33478f8fc32d412ef9ba +Author: Bart Van Assche +Date: Mon Sep 24 20:34:46 2018 -0700 + + ci, MinGW32: Use the MSYS OpenSSL library + +commit 6ce87144820964c7dd66a570d46fd4f53786abb4 +Author: Bart Van Assche +Date: Mon Sep 24 20:44:13 2018 -0700 + + MinGW32: Fix OpenSSL build + +commit c3437f18b88d1476e574d722cb8ae4f15320f8cb +Author: Bart Van Assche +Date: Sun Sep 23 13:18:46 2018 -0700 + + ci/Appveyor: Also build against MinGW32 + +commit 139da7ac1df864bfd1b03cd9c575242c8196d54d +Author: Bart Van Assche +Date: Sat Aug 18 08:13:29 2018 -0700 + + ci/net-snmp-run-tests: Remove NETSNMP_DNS_WORKAROUND definition + + Since the code that checks NETSNMP_DNS_WORKAROUND has been removed, + stop defining this environment variable. + +commit 2eed6491de0e04f82269a91855bad33523d04816 +Author: Bart Van Assche +Date: Sat Aug 18 08:10:38 2018 -0700 + + Revert "Avoid that test T070com2sec_simple fails due to DNS filtering" + + Now that the tests that depend on the (one|two)*.net-snmp.org DNS + workaround have been disabled, remove the workaround itself. + + This reverts commit 3492c22bb6b730dec0941522199eeca7524ce6ed. + +commit 836a3ae5b56a74ef156cba703083ef041c30f430 +Author: Bart Van Assche +Date: Thu Aug 30 08:39:35 2018 -0700 + + ci/openssl.bat: Fix the code for installing OpenSSL + +commit 61189459e5d2551be29df5c0f2fdb7511e9f8304 +Author: Bart Van Assche +Date: Tue Aug 14 19:02:45 2018 -0700 + + ci/openssl.bat: Update OpenSSL version + +commit b61b5ce210c6865575f657a7daecd14a8f73fd5c +Author: Bart Van Assche +Date: Tue Aug 14 09:22:04 2018 -0700 + + ci/build.bat: Exit with an error code if nmake fails + +commit c9a3607e73ffd16dc6072b6d0b4c735344909f69 +Author: Bart Van Assche +Date: Sun Aug 5 08:50:31 2018 -0700 + + ci/net-snmp-run-tests: Generalize the paths to locally built artifacts + +commit 0f575722859696b1405533e04d5b957598096c3c +Author: Bart Van Assche +Date: Sun May 20 16:27:13 2018 -0700 + + ci/net-snmp-configure, Cygwin: Use OpenSSL + +commit 3eb21af05946417b20673ad7a0d0bd1413c19b71 +Author: Bart Van Assche +Date: Sun May 20 11:58:51 2018 -0700 + + ci, Appveyor: Move the code for running tests from ci/build.bat into ci/test.bat + +commit 9452a8e7cfb11beceb529b7850bbe2c6405f2616 +Author: Bart Van Assche +Date: Mon Jun 18 21:36:35 2018 -0700 + + ci: Build and test the SSH transport on Debian systems + +commit 6b58f32b100cb9a6948c879c864ae2a7af9d26c2 +Author: Bart Van Assche +Date: Sun Aug 5 18:32:57 2018 -0700 + + testing/fulltests/default: Disable tests that depend on (one|two)*.net-snmp.org + + The (one|two)*.net-snmp.org domain names resolve into a local IP address + (127.0.0.x). Such DNS replies are filtered out by many security devices + to avoid DNS rebinding attacks. Hence disable these tests. See also + https://en.wikipedia.org/wiki/DNS_rebinding. + +commit 7fa458f6b8c0d141d2d416f42b8fb2fab3bbc0fc +Author: Bart Van Assche +Date: Tue May 8 19:27:10 2018 -0700 + + MinGW: configure: Fix the socklen_t, in_addr_t and ssize_t checks + + Include the Winsock header files before the header files + to avoid that compilation fails. + +commit c6e392d515e39a150fb2f699725c6f7beb19c0b1 +Author: Bill Fenner +Date: Mon Aug 27 11:26:56 2018 -0700 + + Remove code that accidentally crept in during conflict resolution. + +commit 154626c7d002b57056fa0b0f8aff884e42c74285 +Author: Bill Fenner +Date: Sat Aug 25 07:33:55 2018 -0700 + + Fix a typo in feature ifdef for netsnmp_strdup + +commit 198de178587841d1f85bdade1dcd892c7e172e4c +Author: Bart Van Assche +Date: Sat May 19 07:49:58 2018 -0700 + + snmplib: Avoid that sprint_realloc_octet_string() triggers a segmentation fault + + strlcpy() implementations typically scan for the end of the source argument + passed to strlcpy(). Hence avoid passing an unterminated string to strlcpy(). + + Reported-by: Stuart Henderson + Fixes: 7f05daa8e0e0 ("CHANGES: BUG: 3444939: BUG: 1796886: snmplib: Avoid that sprint_realloc_octet_string() embeds unprintable control characters or binary zeroes in its output. This behavior could cause truncated output in snmptrapd.") + +commit 3defab66a7aee60ba582a8254412abd2e630c321 +Author: Bill Fenner +Date: Mon May 14 14:51:16 2018 +0000 + + snmplib: fix clientaddr + + cea974008da30de8d39a1f8ede7189265d93d598 ("clear stack variable before + use") zeroed out the addr_pair, which was cleared at the beginning + of the function and then the remote address was stored in it. + Clearing it here results in clearing the remote address, meaning + that if you create a session with a clientaddr, the remote address + gets changed to 0.0.0.0. Deleting this line restores the correct + behavior of sending to the desired remote address, and since the + memset() at the beginning of the function already cleared the stack + variable, it added no benefit. + +commit f1f44571138fb2dfecda7da6e0160d5ec890d0a2 +Author: Bart Van Assche +Date: Mon May 7 07:47:24 2018 -0700 + + CHANGES: BUG: 2815: Display UTF-8 characters again + + Before commit 7f05daa8e0e0 sprint_realloc_octet_string() used memcpy() + for ASCII strings. That caused the output to be truncated if a '\0' was + embedded in an octet string. Commit 7f05daa8e0e0 fixed that issue but + broke UTF-8 support. Restore UTF-8 support by only using + sprint_realloc_asciistring() if the octet string contains a '\0'. + + Fixes: 7f05daa8e0e0 ("CHANGES: BUG: 3444939: BUG: 1796886: snmplib: Avoid that sprint_realloc_octet_string() embeds unprintable control characters or binary zeroes in its output. This behavior could cause truncated output in snmptrapd.") + +commit bd965b879fdae6c2bb86e71754156a1d1624e20e +Author: Bart Van Assche +Date: Wed May 9 09:56:10 2018 -0700 + + Remove trailing carriage returns from source code files + + This patch does not change any of the Net-SNMP code. + +commit fc14e89dd2a2ec90914521b0faeb09cb0960a40b +Author: Stuart Henderson +Date: Fri May 4 13:32:27 2018 +0100 + + ifm_media changed from u_int to uint64_t in OpenBSD 5.9 + + Signed-off-by: Stuart Henderson + +---------------------------------------------------------------------- + +Changes: V5.8.rc4 -> V5.8 + +commit caff5ff65cd72664dedea827356f966317aa7a6d +Author: Robert Story +Date: Mon Jul 16 09:40:09 2018 -0400 + + make depend for 5.8 + +commit faac86366307666c02ce813f45180a068fc92dba +Author: Robert Story +Date: Mon Jul 16 00:23:22 2018 -0400 + + master out of Release Candidate + +commit 3aa9e011267435fc62efda4cbfc97d53a0acf0ab +Author: Robert Story +Date: Sun Jul 15 23:50:23 2018 -0400 + + Version number update: 5.8 + +commit dfd0604c19f6cc0d8cffce7d50e1c513266544c9 +Author: Bart Van Assche +Date: Thu Jun 21 19:22:37 2018 -0700 + + snmplib/transports: Unbreak the MSVC build + + Adding an integer to a void pointer works fine with gcc but not with MSVC. + Hence convert the expressions that add an integer to a void pointer into + a construct that is standard C. + +---------------------------------------------------------------------- + +Changes: V5.8.rc3 -> V5.8.rc4 + +commit 7a6dfaaeeffd4c6fdecbaf26371e7da8e778a67a +Author: Robert Story +Date: Thu Jun 28 18:33:54 2018 -0400 + + make depend for 5.8.rc4 + +commit 826a0a326fc15cfc4bbefb6a316dc0376a6f4c0a +Author: Robert Story +Date: Thu Jun 28 18:25:56 2018 -0400 + + Version number update: 5.8.rc4 + +commit 2b1d51aba50992549de03f76b77f045c63bd1296 +Author: Bart Van Assche +Date: Fri Jun 8 07:39:27 2018 +0200 + + SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress + + See also https://sourceforge.net/p/net-snmp/bugs/2871/. + + Reported-by: Anders Wallin + Fixes: 3bd8dc8b2d90 ("snmplib/transports: Avoid that the create_from_ostring methods truncate IPv6 addresses") + +---------------------------------------------------------------------- + +Changes: V5.8.rc2 -> V5.8.rc3 + +commit 780f24a0189591c37b240cdb8ab99af631f8aeb8 +Author: Robert Story +Date: Fri May 25 15:53:41 2018 -0400 + + make depend for 5.8.rc3 + +commit f25d035172fb18a730c0e70ee8f23cc419a36d88 +Author: Robert Story +Date: Fri May 25 15:18:34 2018 -0400 + + Version number update: 5.8.rc3 + +commit c60e23b0c0979dbb2a034ff23f29fb10062213ef +Author: Robert Story +Date: Fri May 25 15:09:13 2018 -0400 + + don't auto merge dist/release + + this might pull in undesired changes during release + +commit fe5c40acf61f4c08cad72724a24208167d4fc378 +Author: Robert Story +Date: Fri May 25 15:01:24 2018 -0400 + + dist script to run right version of autoheader + +commit f83f865d8a0843b369695b8e23cb794c723e6fa8 +Author: Bart Van Assche +Date: Sun May 20 14:35:24 2018 -0700 + + Cygwin: Make it again possible to build with OpenSSL + + Remove #define OPENSSL_SYS_WIN32 since that tells OpenSSL to include + the Winsock header file. Define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN + to avoid that header files are included from that conflict + with the OpenSSL header files. This patch avoids that building without + --with-openssl=internal fails. + + This patch reverts 0657b90b7181 ("Cygwin, scapi.h: Fix build") + +commit c56db2a5880fd0e9bde8eed98c2722a353d39eaa +Author: Bart Van Assche +Date: Sat May 19 07:49:58 2018 -0700 + + snmplib: Avoid that sprint_realloc_octet_string() triggers a segmentation fault + + strlcpy() implementations typically scan for the end of the source argument + passed to strlcpy(). Hence avoid passing an unterminated string to strlcpy(). + + Reported-by: Stuart Henderson + Fixes: 7f05daa8e0e0 ("CHANGES: BUG: 3444939: BUG: 1796886: snmplib: Avoid that sprint_realloc_octet_string() embeds unprintable control characters or binary zeroes in its output. This behavior could cause truncated output in snmptrapd.") + +---------------------------------------------------------------------- + +Changes: V5.8.rc1 -> V5.8.rc2 + +commit c906e444167cd0c83182da336f274361770f94a6 (HEAD -> master) +Author: Robert Story +Date: Fri May 18 17:22:09 2018 -0400 + + make depend for 5.8.rc2 + +commit 7677ab7fa419f0d77c438b116c38feb622bf8dd4 +Author: Robert Story +Date: Fri May 18 17:02:25 2018 -0400 + + Version number update: 5.8.rc2 + +commit 0b5f73255ad120cd5b6233e0cc64dd0f425494b4 (origin/master, origin/HEAD) +Author: Robert Story +Date: Fri May 18 13:00:01 2018 -0400 + + Revert "fix for setting engineBoots and engineTime (e.g. -Z cli arg)" + + This reverts commit 988562514b05a2bc01be4462b99874d081600252. + + Further testing needed. + +commit 737105284bf2d31347cdf2a4510919cb78ec6e8c +Author: Bart Van Assche +Date: Sat Apr 14 11:32:24 2018 -0700 + + Add Travis and Appveyor CI support + + This patch makes it possible to enable Travis and Appveyor continuous + integration support. On Travis Net-SNMP is built with all MIBs, with + --disable-set-support, with --enable-mini-agent, with --enable-minimalist + and with --enable-read-only. All these configurations are built on Linux + and on OS/X. On Appveyor Net-SNMP is built with MSVC and dynamic + libraries, with MSVC and statically linked libraryes, with MinGW64, with + Cygwin32 and with Cygwin64. As one can see in the scripts in the "ci" + directory the to-do items are as follows: + + - Fix the TLSTCP test on Travis. + - Fix the MinGW64 build. That build fails with a linker error. + - Ensure that walking the entire MIB works on Darwin. + - Make the regression tests pass for the Cygwin builds. + - Make the regression tests pass for --disable-set-support,s + --enable-mini-agent, --enable-minimalist and --enable-read-only. + - Make the non-default MIBs compatible with --disable-set-support, + --enable-mini-agent, --enable-minimalist and --enable-read-only. + +commit 03257e5201b9657b87915791585e4068533b1fa1 +Author: Niels Baggesen +Date: Thu May 17 15:53:54 2018 +0200 + + Additional patch for NetBSD 8 support. + +commit e14027bce1615c57770a1eba18423b5a4b97eada (origin/crypto.ch) +Author: Niels Baggesen +Date: Wed May 16 18:56:08 2018 -0700 + + MIB-II, at: Fix Solaris build + + Fixes: 5103db3c189d ("mibII/at: Split into multiple source files") + +commit 131afbbde6e202f93237fd9769969556a6a3aef5 +Author: Bill Fenner +Date: Tue May 15 15:05:17 2018 +0000 + + Don't try to build snmpping when set support is disabled. + +commit be40ee3f799d66516d00185de86d9472fb153760 +Author: Stuart Henderson +Date: Fri May 11 21:48:22 2018 +0100 + + Install missing system header files + +commit 882e28a5f828c07c5fda835564e60ecc5e38ec92 +Author: Bart Van Assche +Date: Mon May 7 05:20:46 2018 -0700 + + Cygwin64: Fix winExtDLL build + + The winExtDLL code assumes that sizeof(oid) == 4. Hence define the + 'oid' type as unsigned int when building with MSVC, MinGW or Cygwin. + This patch avoids that building winExtDLL with Cygwin64 fails on the + following statement: + + netsnmp_static_assert(sizeof(oid) == sizeof(UINT)); + +commit 0d99e0176803c6390405c4ae8e028dfd329ed54a +Author: Robert Story +Date: Sun May 13 20:31:05 2018 -0400 + + restore auth/priv defines for protocol OID lengths (for backwards compatability) + +commit 4b518ed4971126dd874f64e0058347e9d622471b +Author: Bart Van Assche +Date: Mon May 7 07:47:24 2018 -0700 + + CHANGES: BUG: 2815: Display UTF-8 characters again + + Before commit 7f05daa8e0e0 sprint_realloc_octet_string() used memcpy() + for ASCII strings. That caused the output to be truncated if a '\0' was + embedded in an octet string. Commit 7f05daa8e0e0 fixed that issue but + broke UTF-8 support. Restore UTF-8 support by only using + sprint_realloc_asciistring() if the octet string contains a '\0'. + + Fixes: 7f05daa8e0e0 ("CHANGES: BUG: 3444939: BUG: 1796886: snmplib: Avoid that sprint_realloc_octet_string() embeds unprintable control characters or binary zeroes in its output. This behavior could cause truncated output in snmptrapd.") + +commit f35ebb57b9c3f937db99b2b57728cc1e07ff381a +Author: Bart Van Assche +Date: Sun May 6 21:13:14 2018 -0700 + + configure.ac: Fix recently introduced autoreconf warnings + + A recent patch introduced an invocation of AC_CHECK_HEADER before AC_AIX. + However, AC_AIX must be invoked before AC_CHECK_HEADER. Hence move AC_AIX + from configure.d/config_os_progs into configure.ac. Additionally, since + AC_AIX is obsolete, use AC_USE_SYSTEM_EXTENSIONS instead. This patch fixes + all instances of the following autoreconf warnings: + + configure.d/config_os_progs:98: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS + ../../lib/autoconf/specific.m4:432: AC_AIX is expanded from... + configure.d/config_os_progs:98: the top level + configure.d/config_os_progs:98: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS + ../../lib/autoconf/specific.m4:432: AC_AIX is expanded from... + configure.d/config_os_progs:98: the top level + + Fixes: eef22ea5f92b ("Verify AES support when --with-openssl is provided") + +---------------------------------------------------------------------- + +Changes: V5.8.pre3 -> V5.8.rc1 + +commit 0a2738ace2a52e4086c067e5f49df9389e90d353 +Author: Robert Story +Date: Sun May 6 17:45:17 2018 -0400 + + Release Candidate for master + +commit b0fa7f242ab0bc2f7eca72c88f2f2acc325d98af +Author: Robert Story +Date: Sun May 6 17:45:12 2018 -0400 + + Version number update: 5.8.rc1 + +commit 5bfc977c6da865c0265de064964368a760602e75 +Author: Robert Story +Date: Sun May 6 17:43:00 2018 -0400 + + regenerate configure + +commit cc45578c2fa0b94f7762057ee3b8a0b795c497ff +Author: Bill Fenner +Date: Sun May 6 13:05:55 2018 +0000 + + snmpd: BUG: 2864: use clientaddr properly + + The code parsed out the address from the clientaddr spec, + then used the return value wrong and only respected it + if it existed but didn't parse properly. + +commit 7eb6eba5677c4e5a3d607df97e4342f122875c94 +Author: Robert Story +Date: Sun May 6 16:21:02 2018 -0400 + + dup save string from default store; restore before possible branches + +commit e56699f5e2ef6b38132a0f497e40c122b6cb5ec4 +Author: Bill Fenner +Date: Sun May 6 13:05:25 2018 +0000 + + Add the ability to set the source address with "-s" for trapsess + +commit a7feed9082dd700068166e0d5b7bdf138760da5f +Author: Robert Story +Date: Sun May 6 15:55:45 2018 -0400 + + move declarations to top of function + +commit 0e24df65b2b095453b46f5101a24e3feed2b6bfb +Author: Robert Story +Date: Sun May 6 15:52:19 2018 -0400 + + fix compiler warning + +commit fdc16201c52f607fea24dc742248373407eca825 +Author: Anders Wallin +Date: Sun May 6 02:56:51 2018 -0700 + + CHANGES: BUG: 1366: Pass proper buffer length to netsnmp_tls_fingerprint_build() + +commit 3da9c1c74e1f1284f981d0a4d5a24406ccb98f87 +Author: Bart Van Assche +Date: Sat May 5 15:59:17 2018 -0700 + + libsnmp: Flush persistent config to persistent storage + + From the fsync() man page: "returns EBADF if fd is not a valid open file + descriptor". Hence call fsync() before closing 'fout' instead of after + closing it. Ensure that fsync() gets called when building with MSVC on + Windows. See also Smith, Stewart, and A. B. MySQL. "Eat My Data: How + everybody gets file I/O wrong." OSCON, Portland, Oregon (2008) + (http://mirror.linux.org.au/pub/linux.conf.au/2007/video/wednesday/278.pdf). + + Fixes: 4ae6ed444687 ("call fsync after writing persistent config") + +commit 82bd09e3d9b94b2e3cc69a4f458c7dcd0bae0845 +Author: Bart Van Assche +Date: Sat May 5 16:39:04 2018 -0700 + + SNMP-USM-DH-OBJECTS-MIB: Fix a compiler warning + + Avoid that the following warning is reported when building against an + older openssl library: + + snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c: In function 'init_usmDHParameters': + snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c:44:9: warning: implicit declaration of function 'DH_set0_pqg' [-Wimplicit-function-declaration] + DH_set0_pqg(dh_params, p, NULL, g); + ^ + + See also commit 3317a7c66362 ("Remove duplicated function in usmDHParameters.c that breaks compilation with LibreSSL 2.7.2 (OpenBSD 6.3)") + +commit 71f4d0a8b369b2dfe0e85bd2e3664be0d8bfe7a8 +Author: Robert Story +Date: Sat May 5 00:48:16 2018 -0400 + + add fallthrough comment to quell compiler warning + +commit 4ae6ed444687f32b69c04d5b7d1bc868fd67d195 +Author: Robert Story +Date: Sat May 5 00:46:39 2018 -0400 + + call fsync after writing persistent config + +commit b42547643a235501a60d993c0789f2d420e2394d +Author: Robert Story +Date: Sat May 5 00:32:43 2018 -0400 + + remove unused variables + +commit ec684fd45895f015cce790671322293b8cdf6d0d +Author: Robert Story +Date: Thu May 3 12:21:19 2018 -0400 + + Add more names to README + +commit f42aeb52e63147b5789cccde1ef997370191849e +Author: Bart Van Assche +Date: Fri May 4 04:39:53 2018 -0700 + + CHANGES: BUG: 2831: Move libnetsnmpagent global variable declarations into a separate header file + + Because commit 81b65f4d23a9 added declarations for several global variables + to public header files, applications that declare global variables with the + same names no longer build. Hence move the global variables that were added + by that commit to public header files into a new header file. + + Fixes: 81b65f4d23a9 ("Move declarations of global functions and variables from .c to .h") + +commit 6a42ba096b7efc1690ed83d5951289bd64e1b091 +Author: Niels Baggesen +Date: Fri May 4 15:07:18 2018 +0200 + + NetBSD 8 only exports krb5_auth_con_getsendsubkey, so separate configure + detection for krb5_auth_con_getrecvsubkey and krb5_auth_con_getsendsubkey. + +commit 54f87b6b6b80b440d4db7c4c676703f57fccd19a +Author: Niels Baggesen +Date: Fri May 4 15:05:01 2018 +0200 + + Support for NetBSD 8 + +commit 3317a7c66362b01b4fd3c0f32a38b10ea53cb4cb +Author: Niels Baggesen +Date: Fri May 4 15:02:56 2018 +0200 + + Remove duplicated function in usmDHParameters.c that breaks compilation with + LibreSSL 2.7.2 (OpenBSD 6.3) + +commit e8ed8e5eab1813f15964823741f04163c1c1b326 +Author: Niels Baggesen +Date: Fri May 4 14:59:35 2018 +0200 + + mibs: Add SNMP-USM-HMAC-SHA2-MIB.txt + +commit eb340300964cf1563e2f9472cfa20ff410cc24e6 +Author: Keith Mendoza +Date: Tue May 1 09:36:52 2018 -0700 + + Check if disman/ping was enabled at top of test + + Checking that the functionality is enabled should occur before checking if a raw socket can be created + +commit eef22ea5f92bf79dac39b8d26c644f10cd975f68 +Author: Keith Mendoza +Date: Mon Apr 23 12:23:33 2018 -0700 + + Verify AES support when --with-openssl is provided + + --enable-bluementhal-aes needs the OpenSSL AES library + +commit 5c9c9f92383112e9c263dfd3da7ab27245504025 +Author: Bart Van Assche +Date: Fri Apr 27 20:18:21 2018 -0700 + + Win32: Export set_enginetime() to unbreak the DLL build + + Fixes: 988562514b05 ("fix for setting engineBoots and engineTime (e.g. -Z cli arg)") + +commit 8625748d09081563887051651957d119d7387f15 +Author: Robert Story +Date: Fri Apr 27 17:05:09 2018 -0400 + + fix path in rsync command + +commit 2b4941946deb6eb0294f8a6794d20f92801e4a67 +Author: Eugene M. Kim +Date: Tue Oct 17 18:17:23 2017 -0700 + + Fix/enforce ipDefaultRouterLifetime value range + + IP-MIB defines ipDefaultRouterLifetime to be in 0..65535 range, but the + current code 1) erroneously uses 0xFFFFFFFFUL (4294967296) as the max + value, and 2) does not clip the computed value that exceeds the maximum + (this was unnecessary probably because the max value was also the max + value permitted for the underlying type uint32_t). + + Fix IPDEFAULTROUTERLIFETIME_MAX to be 65535 (0xFFFF) and clip + out-of-range values to the max value. + +---------------------------------------------------------------------- + +Changes: V5.8.pre2 -> V5.8.pre3 + +commit c3d1c9ea1632343641b09c960b0594e8d85778b6 +Author: Robert Story +Date: Fri Apr 27 15:58:14 2018 -0400 + + tweak comments to remove embedded C++ style comments + +commit 6f68d4c77d00a6aebdb0ddbfe9e1fa3c0da3fba8 +Author: Robert Story +Date: Fri Apr 27 14:53:57 2018 -0400 + + ignore swap files + +commit 1302012b5faebf0cd511f98d7ef94c13f9593036 +Author: Robert Story +Date: Fri Apr 27 14:52:37 2018 -0400 + + Version number update: 5.8.pre3 + +commit 27edef51c4c45b2dd31177dcdb60c825927e6d95 +Author: Robert Story +Date: Fri Apr 27 14:51:02 2018 -0400 + + update makerelease repository; change SVN references to git + +commit 988562514b05a2bc01be4462b99874d081600252 +Author: Robert Story +Date: Fri Apr 27 14:44:00 2018 -0400 + + fix for setting engineBoots and engineTime (e.g. -Z cli arg) + +commit bcc4ac1490fc1fda25b0449daef8a89393857bf5 +Author: Robert Story +Date: Fri Apr 27 14:29:43 2018 -0400 + + always dup Apsz and Xpsz since they are unconditionally freed + +commit 6c1b10eae8433da9ed0a1801e4842b2bd2bcca13 +Author: Robert Story +Date: Fri Apr 27 12:46:28 2018 -0400 + + remove C++ style comments + +commit 66a47d6914e426778c1975db48a74104244485a3 +Author: Robert Story +Date: Fri Apr 27 12:45:07 2018 -0400 + + add copyrights to files split from at.c + +commit 6219d6574cfa120748ba7f271afcd7f1e52d4fcf +Author: Robert Story +Date: Fri Apr 27 12:46:06 2018 -0400 + + fix build by removing premature headers + + these caused the convenience typedefs such as u_long and u_char to + not be defined + +commit 8c4cff6b749c396b920925255853a54408c6bbd1 +Author: Anders Wallin +Date: Wed Apr 11 09:27:28 2018 +0200 + + TLSTM MIB: Fix support for sha256, 384 and 512 fingerprints + + Increase the fingerprint buffers such that these can fit sha256, 384 + and 512 fingerprints. + + Signed-off-by: Anders Wallin + [ bvanassche: edited commit message ] + +commit c514d7f1394e44ea21fb01929b1dffc1a03c858f +Author: Anders Wallin +Date: Thu Apr 26 17:21:21 2018 +0200 + + TLSTM MIB: Fix cache handler for snmpTlstmCertToTSNCount + + Signed-off-by: Anders Wallin + +commit 2014d49a94ce0ea66f967ed5fda7b4685cbabda1 +Author: Bart Van Assche +Date: Wed Apr 25 16:44:25 2018 -0600 + + Win32: Clean up libsnmp Makefiles + +commit 1449f8ac2d4d7c8df639bb242a4f004ed24ef70c +Author: Bart Van Assche +Date: Wed Apr 25 19:06:25 2018 -0600 + + Win32, MSVC, OpenSSL: Link with the correct libraries + +commit 46bd69b6f598978b7a1fc61da13c7dbc0ecda0bc +Author: Bart Van Assche +Date: Wed Apr 25 17:27:07 2018 -0600 + + Win32, TLS transport: Avoid that the compiler complains about symbol redefinitions + +commit 65d73540715fd90964a0c6737411dfe6501d1551 +Author: Bart Van Assche +Date: Wed Apr 25 17:25:46 2018 -0600 + + MSVC: Add defines to net-snmp-config.h for the latest OpenSSL library + +commit 93453d25593135ded56c24492d17892ba47d93d8 +Author: Bart Van Assche +Date: Wed Apr 25 16:44:25 2018 -0600 + + Win32: Clean up libsnmp Makefiles + +commit 47e6ff61f5aa27dd87bfc4e301dfc39501b75f87 +Author: Andrew Stormont +Date: Wed Apr 25 14:56:12 2018 -0600 + + Solaris, libsnmp: Avoid that linking fails due to an undefined reference to in6addr_any + +commit cf139ad64cc85c3dd155336fec8e3e261fb548eb +Author: Andrew Stormont +Date: Wed Apr 25 06:57:24 2018 -0600 + + Solaris, Host Resources MIB: Fix process argument parsing + + See also https://sourceforge.net/p/net-snmp/patches/1361/. + +commit 2d96aada9c3c61d204125188a55cc3f10c14af03 +Author: Andrew Stormont +Date: Wed Apr 25 06:46:54 2018 -0600 + + Solaris, hardware: Display full CPU description + + See also https://sourceforge.net/p/net-snmp/patches/1360/. + +commit 55575b4027633c86e5f7633eea24549476466187 +Author: Bart Van Assche +Date: Tue Apr 24 17:28:59 2018 -0600 + + agent/kernel.c: Fix MSVC build + +commit f640af307e36115dca631922e0762438b74c4b12 +Author: Bart Van Assche +Date: Tue Apr 24 17:32:35 2018 -0600 + + Fix configure.d/config_net_snmp_config_h + + Fixes: e835935dbae5 ("Patches: 1358: Uncouple kmem support from NETSNMP_CAN_USE_NLIST") + +commit d6eb690cbee7854a26a213017c4ae24258c1cf21 +Author: Bart Van Assche +Date: Tue Apr 24 10:02:58 2018 -0600 + + snmplib, IPv4 transport: Avoid that -Dnetsnmp_tcp triggers an assertion failure + + Fixes: e3fd8c38503f ("snmplib/transports/snmpIPv4BaseDomain.c: Make netsnmp_ipv4_fmtaddr() more robust") + + Note: before the aforementioned commit -Dnetsnmp_tcp triggered an + out-of-bounds read. + +commit 9a1e91009dc149de135107d75b6dce7404d2982e +Author: Bart Van Assche +Date: Tue Apr 24 10:19:45 2018 -0600 + + Avoid that the compiler complains about missing declarations for init_kmem() and free_kmem() + + Fixes: 06c2d80d0aa5 ("Merge branch 'V5-7-patches'") + +commit 25bfa920013983e96e433e93e5fc2331730a46f2 +Author: Andrew Stormont +Date: Tue Apr 24 09:06:52 2018 -0600 + + MIB-II, host resources, BSD: Remove redundant code from sh_count_procs() + +commit ddc6c6fa08747beb74663d3efbf73843e45637db +Author: Andrew Stormont +Date: Tue Apr 24 09:08:24 2018 -0600 + + MIB-II, host resources, BSD: Fix a memory leak in netsnmp_arch_swrun_container_load() + +commit e835935dbae5ee2dbd9fa13a24e34b2862c7a4bf +Author: Andrew Stormont +Date: Tue Apr 24 07:56:44 2018 -0600 + + Patches: 1358: Uncouple kmem support from NETSNMP_CAN_USE_NLIST + +commit acd4ee40cbb5d6c713e7471f1b7da4bdd0064574 +Author: Bart Van Assche +Date: Mon Apr 23 10:18:27 2018 -0600 + + configure: Avoid that probing of SSL transport modules fails + + Avoid that probing of the DTLSUDP and TLSTCP transport modules fails + as follows if --with-openssl= has been specified: + + checking for and configuring transport modules to use... In file included from module_tmp_header.h:177: + ./include/net-snmp/library/snmpTLSBaseDomain.h:13:10: fatal error: 'openssl/bio.h' file not found + #include "openssl/bio.h" + ^ + 1 error generated. + In file included from module_tmp_header.h:177: + ./include/net-snmp/library/snmpTLSBaseDomain.h:13:10: fatal error: 'openssl/bio.h' file not found + #include "openssl/bio.h" + ^ + +commit 3c104af5de3d19ef913a4480960a5012cb8501ec +Author: Bart Van Assche +Date: Mon Apr 23 06:57:03 2018 -0600 + + Darwin: Let the configure script determine whether or not SHA256 and SHA512 are available + +commit 9ddf75dfb643ccf23982f5054b6efb47d5214bb3 +Author: Bill Fenner +Date: Wed Apr 11 11:32:05 2018 -0700 + + Fix minimal agent with tls: move X509_get_signature_nid outside NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES + +commit ae88f1a5cea848b6ed561687b79d7b42b574a268 +Author: Bart Van Assche +Date: Sat Apr 21 22:35:53 2018 -0700 + + Win32: Fix MIB-II build + +commit 5103db3c189d87af1bd7e39c1d9e7bacc89cbf5e +Author: Bart Van Assche +Date: Thu Apr 12 11:22:29 2018 -0600 + + mibII/at: Split into multiple source files + + Split the implementations of ARP_Scan_Init(), ARP_Scan_Next() + and var_atEntry() into one function per platform and move these + implementations to separate source files. Additionally, move the + ARPTAB_SYMBOL and ARPTAB_SIZE_SYMBOL definitions from the + include/net-snmp/system/*.h include files into the mibII/at + implementation. This change reduces the number of #ifdefs in the + mibII/at code drastically. + +commit a16d7742e412c9eee684118ea899b7165f4510b6 +Author: Bart Van Assche +Date: Thu Apr 12 11:20:11 2018 -0600 + + mibII/at: Make ARP_Scan_Next() accept four arguments on all platforms + + Instead of using #ifdefs to discriminate between platforms on which + it is possible to query the interface index and platforms on which + this is not possible, make ARP_Scan_Next() set ifIndex to zero if + the interface index cannot be queried and make var_atEntry translate + that value into 1. + +commit b2ff05cb4cc7b382019de5194108f89ca5979a39 +Author: Bart Van Assche +Date: Sat Apr 21 19:16:07 2018 -0700 + + c tests: Ensure that linking succeeds if the openssl path has been specified explicitly + +commit e49295383003b1522b83df760c5384f1b8803a28 +Author: Bart Van Assche +Date: Fri Apr 20 20:56:21 2018 -0700 + + testing/fulltests/default/T023snmpv3getMD5AES_simple: Skip if the openssl aes.h header file is not available + +commit 3054ac2102eb29f3b5956abe98f3abd17bfa6f84 +Author: Bart Van Assche +Date: Thu Apr 19 19:03:08 2018 -0700 + + testing/fulltests/transports/T361tlstcp_simple: Skip if TLS-TCP is disabled + + Fixes: 5d8a5efc1d59 ("tests for minimally testing all the transports") + +commit 7babf86b438725c6c9fae7089a90cd94799c49cf +Author: Bart Van Assche +Date: Sat Apr 21 18:43:31 2018 -0700 + + python: Ensure that linking succeeds if the openssl path has been specified explicitly + +commit ed29326f1b56c8554e0fec79cb743622c9453426 +Author: Bart Van Assche +Date: Fri Apr 20 09:55:48 2018 -0700 + + Darwin >= 15: Avoid ___CFConstantStringClassReference symbol not found failures + + See also https://sourceforge.net/p/net-snmp/bugs/2850/. + +commit 945c7cd57cbbca6061cb632705de441ae7b98fd9 +Author: Bart Van Assche +Date: Thu Apr 19 22:16:54 2018 -0700 + + win32/Configure: Improve robustness + +commit 3492c22bb6b730dec0941522199eeca7524ce6ed +Author: Bart Van Assche +Date: Sat Mar 31 19:20:41 2018 -0700 + + Avoid that test T070com2sec_simple fails due to DNS filtering + +commit 52795c2e0801913a0b91c250e65ca6cd41e16c77 +Author: Bart Van Assche +Date: Sat Apr 14 15:46:14 2018 -0700 + + perl/OID/OID.xs: Fix a compiler warning + + Avoid that clang reports the following compiler warning: + + OID.xs:366:38: warning: passing 'u_char *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] + __snprint_value (buf, buf_len, &vbdata, indexnode, + ^~~ + +commit bd176f4785cd7a47154502ecea2555bdbb91c877 +Author: Bart Van Assche +Date: Sat Apr 14 15:14:21 2018 -0700 + + configure: Document that --with-perl-modules=verbose is helpful while debugging Makefile.PL files + +commit e93f0c54f025d2a31ff100259fce5f484eee46ac +Author: Bart Van Assche +Date: Sat Apr 14 13:07:30 2018 -0700 + + testing/fulltests/unit-tests/T003copy_nword_clib: Fix Darwin compiler warnings + +commit 2eff423b8b4269498ce2525a1b180890934413be +Author: Bart Van Assche +Date: Sat Apr 14 12:53:11 2018 -0700 + + Add support for Darwin 15, 16 and 17 + +commit 13fe7de92a7551817dfbf474e845e88a59a3c884 +Author: Bart Van Assche +Date: Sat Apr 14 12:49:48 2018 -0700 + + MIB-II: Restore the declaration of TCP_Count_Connections() + + Fixes: 81b65f4d23a9 ("Move declarations of global functions and variables from .c to .h") + +commit 36f5813fb5bd9d12cdd015d35ec80defed42838e +Author: Bart Van Assche +Date: Sat Apr 14 09:41:31 2018 -0700 + + Windows, MIB-II, system: Read Windows version from registry + +commit 6d86c72614936a0fb3b56619965c96a5b120d89c +Author: Bart Van Assche +Date: Sat Apr 14 08:43:26 2018 -0700 + + Cygwin, swrun: Avoid using GetVersionEx() + +commit 8c8d5638413a90e423083c793b5d6be49a591281 +Author: Bart Van Assche +Date: Sat Apr 14 11:17:43 2018 -0700 + + Win32, MSVC batch build: Embed OpenSSL library path in Makefiles instead of appending it to %LIB% + + This makes it possible to rebuild Net-SNMP by running 'nmake' after + having edited one or more source files without having to modify %LIB%. + +commit d8be6fc26e1006a7e03d922a04611d4e2cb69c44 +Author: Bart Van Assche +Date: Sat Apr 14 04:35:19 2018 -0700 + + Win32: Enable cross-compilation in build.pl + + Allow e.g. 64-bit binaries to be built on a 32-bit system if Perl + modules are not enabled. + +commit 5bd95fe6f916d043ac7c5411510dfb8a669c9ab6 +Author: Bart Van Assche +Date: Fri Apr 13 21:24:31 2018 -0700 + + Windows: Avoid casting a pointer to an integer type with a different size + + This patch fixes bug https://sourceforge.net/p/net-snmp/bugs/2848/. + +commit 38fb9890a1e27bec336a09e20e725534d8939168 +Author: Bill Fenner +Date: Wed Apr 11 07:50:48 2018 -0700 + + make python client build with --enable-read-only + +commit 37b948c3d6451c6f31e066d52ef9a528985ea7c7 +Author: Bill Fenner +Date: Wed Apr 11 13:56:36 2018 +0000 + + CHANGES: snmpd: BUG: 2846: fix agent compile when both --enable-read-only and --disable-set-support are given. + +commit d8939faf1e724ff042dd4af83cac360a15883825 +Author: Bill Fenner +Date: Wed Apr 11 13:53:29 2018 +0000 + + CHANGES: snmpd: BUG: 2845: fix compilation error with NETSNMP_NO_WRITE_SUPPORT + +commit 4d1d375df29aa52b8c01893d687dfdd55204eb04 +Author: Bill Fenner +Date: Tue Apr 10 20:31:38 2018 +0000 + + CHANGES: snmpd: BUG: 2810: from "Minzhuan Gong": fix compile with --enable-read-only + +commit eca6ad6d8ff488839187f05a62dc2ec053c53b2b +Author: Bill Fenner +Date: Sun Apr 8 13:53:25 2018 +0000 + + Don't check the sign of a 0-length int64 + + When there are no data bytes, don't try to check + a nonexistent byte for the sign. Also, include + all of the data bytes for unsigned-64 and + signed-64 in the dumpx_recv tracing. + +commit e59591c5111c17b2561816b04ac3632661df19cd +Author: Bill Fenner +Date: Tue Apr 3 14:20:12 2018 -0700 + + snmplib: asn1: audit length checks + + 1. propagate error from asn_parse_length in asn_check_packet + 2. Audit calls to _asn_short_err, make sure that the second arg + is the length being checked against, and the third arg is the + length needed. + 3. Make sure that we have the two bytes needed for opaque + types before testing them. + 4. For opaque types, update the length to reflect the inner opaque + type before checking that we have enough data. + +commit e5ad10de8e175e443351be3e14e87067ff9bded8 +Author: Keith Mendoza +Date: Wed Mar 21 21:33:27 2018 -0700 + + Quote provided encryption key in createUser line + + Fixes bug #2812 + +commit 20c63da4317d0c6f41be1e8826a91e3e8e7aa72f +Author: Bill Fenner +Date: Tue Apr 3 14:20:12 2018 -0700 + + snmplib: asn1: audit length checks + + 1. propagate error from asn_parse_length in asn_check_packet + 2. Audit calls to _asn_short_err, make sure that the second arg + is the length being checked against, and the third arg is the + length needed. + 3. Make sure that we have the two bytes needed for opaque + types before testing them. + 4. For opaque types, update the length to reflect the inner opaque + type before checking that we have enough data. + +commit 37c11615de3cfb2c934ccb334a8ccb8bbde85d89 +Author: Bill Fenner +Date: Sun Apr 1 16:58:51 2018 +0000 + + CHANGES: agentx: from "Google AutoFuzz project": account for the nul character we will add to the string. + +commit 95e59ff91b20fb82b22c373ef4bff2cb94271385 +Author: Bill Fenner +Date: Thu Mar 29 17:03:36 2018 -0700 + + CHANGES: agentx: from "Google Autofuzz project": additional agentx protocol parser bounds checking + +commit 883934016bd47181f32f031fe3c7d409d4c5fa82 +Author: Magnus Fromreide +Date: Sun Mar 25 23:50:17 2018 +0200 + + Coverity 266329: Free allocated resources in case of error + +commit c0d0bc4c37e60d93ca47e0ee0c29a431c59de712 +Author: Bart Van Assche +Date: Sat Mar 24 11:46:28 2018 -0700 + + snmplib/keytools: Ensure that keylen is initialized for all error paths + +commit d08ffd7d0c61f114e717eadaa1cf696735dcca6b +Author: Bart Van Assche +Date: Sat Mar 24 12:36:54 2018 -0700 + + snmplib, vacm: Remove dead code + + Since it is guaranteed that accessEntry == NULL after "goto bail" has + been executed, remove the code that depends on accessEntry != NULL. + This patch fixes Coverity ID 144350. + +commit d3920fcedf5c1bcaee30d5308943e78b4a429eb0 +Author: Bart Van Assche +Date: Sat Mar 24 12:34:11 2018 -0700 + + snmplib, snmpusm: Remove a superfluous check + + Checking whether or not a pointer is not NULL after it has been dereferenced + is not useful. Hence remove the check. This patch fixes Coverity ID 144385. + +commit f138736bedc82008566063119d301bad07e3e5f8 +Author: Bart Van Assche +Date: Sat Mar 24 12:32:35 2018 -0700 + + snmplib, snmp_api: Remove a superfluous check + + Checking whether a pointer is not NULL after it has been dereferenced + is not useful. Hence remove the != NULL check. This patch fixes Coverity + ID 144387. + +commit fb763ef6f390ac8dec4d7c0c0160f648464d587d +Author: Bart Van Assche +Date: Sun Mar 25 08:22:18 2018 -0700 + + Revert "perl: Unbreak Perl module linking" + + The Perl module build problems were caused by a concurrent build + (make -j) and not by a problem in any of the Makefile.PL files. + Hence revert commit 347d4cf207b8. + +commit 0545bc80654a081aed5969f425dc2f2b45f3cccf +Author: Bill Fenner +Date: Sun Mar 25 15:08:27 2018 +0000 + + CHANGES: snmplib: asn1: from "Google Autofuzz project": propagate error from asn_parse_length + +commit 52ccd5b24fbaed5a75156b3da07b83fa4b80e2e2 +Author: Bart Van Assche +Date: Sat Mar 24 09:54:33 2018 -0700 + + apps/sshtosnmp: Initialize read_set + + This patch fixes Coverity ID 266307. + +commit 6407a3ec77c959e789ccee2eaf58d117dd27cdb6 +Author: Bart Van Assche +Date: Sat Mar 24 09:52:50 2018 -0700 + + apps/sshtosnmp: Avoid overflowing an output buffer + + This patch fixes Coverity ID 266309. + +commit 1744c0279d8ebab010192af07bf7a4c6cecc42dc +Author: Bart Van Assche +Date: Sat Mar 24 15:30:28 2018 -0700 + + snmpd, DISMAN MIB: Avoid dereferencing a NULL pointer + + This patch fixes Coverity ID 85560. + +commit 844c37e7207b902af1097c6baac0a22bf6d7c039 +Author: Bart Van Assche +Date: Sat Mar 24 15:28:18 2018 -0700 + + snmpd, dlmod: Avoid dereferencing a NULL pointer + + This patch fixes Coverity ID 144354. + +commit bb2fe7fea965610449a939c6cd1f4788181d1ac8 +Author: Bart Van Assche +Date: Sat Mar 24 15:25:18 2018 -0700 + + snmpd, pass_persist: Avoid dereferencing a NULL pointer + + This patch fixes Coverity ID 266321. + +commit 0c7ea894ff832d928c1427ae6e9ec1fb9b7abc0b +Author: Bart Van Assche +Date: Sat Mar 24 15:19:26 2018 -0700 + + snmpd, mib-II: Initialize dst.sin_port and gateway.sin_port + + This patch fixes Coverity IDs 85686 and 85660. + +commit fb882c7c514bffb7870381a7f0343a447dfdf66d +Author: Bart Van Assche +Date: Sat Mar 24 15:16:53 2018 -0700 + + snmpd, ip-forward-mib: Initialize dst.sin_port and gateway.sin_port + + This patch fixes Coverity IDs 85700 and 85690. + +commit 07416f5e22807867e035bee0bfb2b5c96e78a13e +Author: Bart Van Assche +Date: Sat Mar 24 15:14:42 2018 -0700 + + snmpd, MIB-II: Initialize pcb.inp_next + + This patch fixes Coverity ID 85702. + +commit 731e4f0dfcb0cb9e3f750c109b1cb6efe2169604 +Author: Bart Van Assche +Date: Sat Mar 24 11:50:31 2018 -0700 + + snmpd, tsltm-mib: Only release an iterator if it has been initialized first + +commit 1457675095363781668241653424b92c5aba28d8 +Author: Bart Van Assche +Date: Sat Mar 24 10:43:24 2018 -0700 + + snmpd, MIB-II: Check strchr() return value + + This patch fixes Coverity ID 266305. + +commit bf690d7732724a452dd9eb1f6dd60e92ba2fdc1d +Author: Bart Van Assche +Date: Sat Mar 24 10:36:18 2018 -0700 + + snmpd, agent/mibgroup/hardware/cpu/cpu_linux: Check strchr() return value + + This patch fixes Coverity ID 266326. + +commit 7a148f07a6e3b3ec8cc55880eb82ff206b5c1d37 +Author: Bart Van Assche +Date: Sat Mar 24 10:33:25 2018 -0700 + + snmpd, ucd-snmp/pass_persist: Avoid passing NULL as the second argument to write_persist_pipe() + + This patch fixes Coverity ID 266334. + +commit 29e4e4fe2468834d2148881a97185982a636674c +Author: Bart Van Assche +Date: Sat Mar 24 10:30:51 2018 -0700 + + snmpd, disman/ping/pingCtlTable: Initialize mhdr.msg_flags + + This patch fixes Coverity ID 85579. + +commit c276d4d8238248558c71ca975b2399db72c3cb1c +Author: Bart Van Assche +Date: Sat Mar 24 10:28:38 2018 -0700 + + snmpd, ip-forward-mib: Initialize dst.sin_port and mask.sin_port + + This patch fixes Coverity IDs 85592 and 85580. + +commit c1693ed45af0d0855b2025c30c042fa6ace55689 +Author: Bart Van Assche +Date: Sat Mar 24 12:21:39 2018 -0700 + + snmplib/keytools: Avoid dereferencing a NULL pointer + + This patch fixes Coverity ID 266324. + +commit ef889d0a284b00c5a1c6e6c9175e2b765e586bc2 +Author: Bart Van Assche +Date: Sat Mar 24 12:18:19 2018 -0700 + + snmplib, SSH transport: Avoid dereferencing a NULL pointer + + This patch fixes Coverity ID 266333. + +commit bfd9081e7a49e5d873a9be9da6a5c54ae5da5401 +Author: Bart Van Assche +Date: Sat Mar 24 10:39:43 2018 -0700 + + snmplib, SSH transport: Avoid calling close(-1) + + This patch fixes Coverity ID 266314. + +commit 307b8fa96bab9609c8e697e5f52abdd57fb6b167 +Author: Bart Van Assche +Date: Sat Mar 24 09:47:45 2018 -0700 + + snmplib, SSH transport: Pass a valid socket descriptor to setsockopt() + + Check the accept() return value before calling setsockopt() instead of + after having called setsockopt(). This patch fixes Coverity ID 266325. + +commit 732df276f0905bdb67aafcd812de1c2b51a0cc41 +Author: Bart Van Assche +Date: Sat Mar 24 12:40:30 2018 -0700 + + snmplib, SSH transport: Avoid overflowing the output buffer + + This patch fixes Coverity ID 266310. + +commit f57c787584ff21f59e0beec0918c8a23aeb3031a +Author: Bart Van Assche +Date: Sat Mar 24 10:50:58 2018 -0700 + + snmplib, _daemon_prep(): Suppress a Coverity complaint + + Avoid that Coverity complaint about not closing fd being a resource + leak. This patch does not change any functionality but fixes Coverity + ID 86657. + +commit af3fc499f6007f56623f3b1b046512e985505a1e +Author: Bart Van Assche +Date: Sat Mar 24 10:21:05 2018 -0700 + + snmplib: Initialize tm_isdst if available + + This patch fixes Coverity ID 144417. + +commit 878fe301a9a5e548dab22c2d08e52039c6838216 +Author: Bart Van Assche +Date: Sat Mar 24 15:12:28 2018 -0700 + + snmplib, ASN parsing: Avoid reading uninitialized data if the output buffer is small + + This patch fixes Coverity ID 85714. + +commit 70c52531fc2926bd9d1a9d4e00544c2c392d3d65 +Author: Bill Fenner +Date: Sat Mar 24 15:31:27 2018 +0000 + + CHANGES: snmplib: asn1: BUG: 2828: from "Google Autofuzz project": fix off-by-one heap access for opaque types + + (and an adjacent bug that was not in 5.4, noticed by code inspection) + +commit aee85c048928bb67f5b1e84b603a5428b5f7f9e3 +Author: Bill Fenner +Date: Sat Mar 24 15:27:57 2018 +0000 + + CHANGES: snmplib: asn1: BUG: 2828: from "Google Autofuzz project": fix off-by-one heap access for opaque types + +commit 347d4cf207b834744fc9215f7e4423530c67653f +Author: Bart Van Assche +Date: Fri Mar 23 21:45:55 2018 -0700 + + perl: Unbreak Perl module linking + + For one or another reason ExtUtils::MakeMaker leaves out -L${prefix}/lib + -lnetsnmp from $Params{LIBS}. Add -lnetsnmp back such that Perl module + linking works again. + +commit 0adc62ebbbd5192bbb97b43e49a6604b9ff7c217 +Author: Bart Van Assche +Date: Thu Mar 22 21:53:23 2018 -0700 + + perl/default_store/test.pl: Enable 'strict' and 'warnings' + +commit a7dfe31ea120ea68f4304170cadae3a2adcde99a +Author: Bart Van Assche +Date: Fri Mar 23 20:20:12 2018 -0700 + + perl/SNMP/Makefile.PL: Suppress a complaint about a concatenation + + Avoid that Perl complains about $ENV{'NET-SNMP-PATH'} not being defined + on Unix systems by only evaluating it on Windows systems. + +commit e0027a2c681369d99434f09bc380dfbd1c3358ec +Author: Bart Van Assche +Date: Fri Mar 23 20:17:30 2018 -0700 + + perl/agent/Support/Makefile.PL: Fix library paths + +commit b7149cda92c545ab1974d678ab6d7efe0628276e +Author: Bart Van Assche +Date: Fri Mar 23 20:08:28 2018 -0700 + + perl Makefiles: Make library paths absolute + +commit ba6e19f8ed23052939f90d93222e855778c850d1 +Author: Bart Van Assche +Date: Fri Mar 23 20:43:52 2018 -0700 + + perl: Convert Makefile.subs.pl into a Perl package + + This patch does not change the generated makefiles. + +commit bde2b845786e07d825cc4629e872f1e6d05f985b +Author: Bart Van Assche +Date: Fri Mar 23 18:56:59 2018 -0700 + + Makefile.in: Make it easy to enable Carp::Always for generating Perl makefiles + + Adding -MCarp::Always to the perl command line produces more detailed + diagnostics during generation of Perl Makefiles. + +commit 532c8c2b2d34645a2fc730815521b451a178f08b +Author: Bart Van Assche +Date: Thu Mar 22 22:42:31 2018 -0700 + + perl/.../Makefile.PL: Enable 'use strict' and 'use warnings' + +commit eacdabd16ad2fad1569a6ee982053feb94514869 +Author: Bill Fenner +Date: Fri Mar 23 17:03:36 2018 +0000 + + snmplib: report the underlying error if set by asn1 library + +commit c5d9cecda251ea1f4638f88d5506b1f1743d87c3 +Author: Bart Van Assche +Date: Tue Mar 20 21:08:15 2018 -0700 + + snmplib: Avoid that freeing the snmpv3_parse_arg() result can trigger a crash + + Fixes: 673f81051d58 ("snmplib, SNMPv3: Fix two memory leaks in netsnmp_parse_args()") + +commit e1b6ce470a6cef6c7fd70607c077ebed18cc1dc0 +Author: Bart Van Assche +Date: Thu Mar 22 00:20:52 2018 +0100 + + snmplib, agent: Suppress warnings about not using the return value of asprintf() + + This patch does not change any functionality. + +commit c0a4b11b9b7ab10d195ea79c641eda57628870d8 +Author: Bill Fenner +Date: Wed Mar 21 15:38:33 2018 +0000 + + NEWS: snmpd: com2sec and com2sec6 SOURCE values may deny sources as well as permit. + +commit f4ece692aa0372f30ca6dc2f8d39c8b49617b576 +Author: Bart Van Assche +Date: Sun Mar 18 21:14:25 2018 -0700 + + Win32, MSVC: Unbreak the non-SSL build + +commit 370e84aac13cab309ffaebc5ffb7a06ea5943165 +Author: Bart Van Assche +Date: Sun Mar 11 16:55:06 2018 -0700 + + win32/dist/build-binary: Pass build options as arguments + +commit f148b5f46541e3ec3c33c977d7705f14e736e7e1 +Author: Bart Van Assche +Date: Sun Mar 11 16:58:51 2018 -0700 + + win32/dist/build-binary: Build Net-SNMP without Perl modules + + Building Net-SNMP with Perl modules was possible when ActivePerl + distributed Perl binaries with Visual Studio. Since they switched + to gcc it's no longer possible to link the Net-SNMP code (built + with MSVC) with the ActivePerl Perl libraries (built with gcc). + +commit 46d8156b7edee134d3c8b000b99791b4147ef4b5 +Author: Bart Van Assche +Date: Sun Mar 11 16:56:46 2018 -0700 + + win32/dist/build-binary: Enable 'use warnings' + +commit 82b4276a7c6a67e79657e4b78b35d7e31ddfeafb +Author: Bart Van Assche +Date: Sun Mar 18 09:42:48 2018 -0700 + + Win32: Add support for the DTLS-UDP and TLS-TCP transports + +commit 3792bc46a04cfd7163129355c450caef63dfd4fd +Author: Bart Van Assche +Date: Sun Mar 18 17:08:37 2018 -0700 + + Win32, MSVC: Pass OpenSSL include path as a compiler option + +commit 2ef90da390ff2546e8b9b8a8de94af678d1b12de +Author: Bart Van Assche +Date: Sun Mar 18 08:39:23 2018 -0700 + + Win32, MSVC: Reduce redundancy in the build system + +commit f9b3fed793a9b336161236c6c2a5bbcc32018445 +Author: Bart Van Assche +Date: Sun Mar 18 08:56:48 2018 -0700 + + win32/Configure: Avoid that perl warns about masked declarations + +commit 33e7c68621b399e406679cd74db2fbf563d1c701 +Author: Bart Van Assche +Date: Sun Mar 18 10:55:17 2018 -0700 + + snmplib: Various MSVC build fixes + +commit 376f589e7513d84e6e46439aa3ae7f21bca42c8f +Author: Bart Van Assche +Date: Sun Mar 18 17:49:37 2018 -0700 + + snmplib/transports/snmpDTLSUDPDomain, MSVC: Fix two recently introduced compiler warnings + +commit 7ad11d55e62ecee98b7ae362880a4b583288071d +Author: Bart Van Assche +Date: Sun Mar 18 09:30:55 2018 -0700 + + snmplib/transports/snmpUDPBaseDomain, MSVC: Fix two recently introduced compiler warnings + +commit a8e11b3204c8e37745a4a5139b1dcbf3aeef5aa7 +Author: Bart Van Assche +Date: Sat Mar 17 14:42:53 2018 -0700 + + win32/dist/installer/net-snmp.nsi: Use WinVer.nsh to determine Windows version + + Obtaining the Windows version from the registry doesn't work on Windows 10. + Although I have no idea why, use WinVer.nsh to determine the Windows version. + +commit ac72c513d321f13284a02f1a9c337909ad0af3ef +Author: Bart Van Assche +Date: Sat Mar 17 14:59:45 2018 -0700 + + win32/dist/installer/net-snmp.nsi: Disable installation of Perl modules + +commit 96047c5e23f3aef95663710b16b6ac8a50a1f518 +Author: Bart Van Assche +Date: Sat Mar 17 20:08:53 2018 -0700 + + win32/dist/installer/net-snmp.nsi: Comment out an obsolete include + + None of the macros defined in SetEnVar.nsi are used. Hence do no longer + include that file. See also commit 8a572b4e08ff ("Add netsnmp_getenv() + which is a wrapper for getenv() to add basic Windows registry support.") + +commit 0c66f45714629331cf3a9b72a6eabb8315de9e72 +Author: Bart Van Assche +Date: Sat Mar 17 20:46:41 2018 -0700 + + win32/Configure: Enable 'use warnings' + +commit b841dc9c53d7e96daaf962194ce35e61ef241afc +Author: Bart Van Assche +Date: Sat Mar 17 20:47:01 2018 -0700 + + win32/build.pl: Suppress a Perl warning + +commit ff46360780f835d7bf0dcb076ebf47c4ac0f1605 +Author: Bart Van Assche +Date: Sun Mar 11 16:55:06 2018 -0700 + + win32/dist/build-binary: Pass build options as arguments + +commit 0dcbe946bbdfc1c048ca448595334ae1a4cb67b8 +Author: Bart Van Assche +Date: Sun Mar 11 16:58:51 2018 -0700 + + win32/dist/build-binary: Build Net-SNMP without Perl modules + + Building Net-SNMP with Perl modules was possible when ActivePerl + distributed Perl binaries with Visual Studio. Since they switched + to gcc it's no longer possible to link the Net-SNMP code (built + with MSVC) with the ActivePerl Perl libraries (built with gcc). + +commit 28180252de086242ae8e70203960cc5f1f0e4a7f +Author: Bart Van Assche +Date: Sun Mar 11 16:56:46 2018 -0700 + + win32/dist/build-binary: Enable 'use warnings' + +commit f0b5ab271d0561caf8eb0c2baeff313341a75eb7 +Author: Bart Van Assche +Date: Sun Mar 11 15:13:13 2018 -0700 + + README.win32: Document how to build the installer + +commit 4a3d9af910dd3aef09776d0c75b0a04f0851c054 +Author: Bart Van Assche +Date: Sat Mar 10 21:25:24 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Make it possible to send traps over DTLS-UDP + +commit 0eb5f25501e3426e588a4705f480ed21be042736 +Author: Bart Van Assche +Date: Sat Mar 10 21:07:59 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Add more debug tracing code + +commit 9040c95258fb9f9c3534df65d519b6c7133c5d30 +Author: Bart Van Assche +Date: Sat Mar 10 20:25:37 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Reduce stack usage + + Allocate the buffer for data that will be sent over the network + dynamically instead of on the stack. + +commit cdf1bf431d894149ddbb38ddb9849d21a7de3e28 +Author: Bart Van Assche +Date: Sat Mar 10 19:57:53 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Remove superfluous checks + + Change if (e) return; if (!e && f) ... into if (e) return; if (f) ... + +commit 6861c1b9f69d66dee91d2e5d4eb8de204c8e0b7b +Author: Bart Van Assche +Date: Sat Mar 10 19:35:25 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Coding style fixes + + Make the coding style consistent with the rest of the code base. + +commit eac9744563669871c960348a1cf6a77e2b7c9772 +Author: Bart Van Assche +Date: Sat Mar 10 19:18:32 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Fix spelling in source code comments + +commit 2495e4bdb33ce5d1432b5d66d11a692cbd58a10a +Author: Bart Van Assche +Date: Sat Mar 10 19:13:56 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Pass static pointers to SSL_get_ex_new_index() + + The pointer that is passed as the second argument to SSL_get_ex_new_index() + is stored by that function in a global data structure. Make sure that the + pointers that are passed to SSL_get_ex_new_index() remain valid after + netsnmp_dtlsudp_ctor() has finished. + +commit 637931131baac12d6bdd78df811fec4864b7b716 +Author: Bart Van Assche +Date: Sat Mar 10 10:35:05 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Remove the _peer_union data structure + + Since _peer_union and netsnmp_sockaddr_storage are exactly the same + unions, remove the former. This patch does not change any functionality. + +commit df4b85289ee3f9de0d1edb3603d64096ed6b7eda +Author: Bart Van Assche +Date: Sat Mar 10 10:10:04 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Remove superfluous casts + + This patch does not change any functionality. + +commit f3c1d67b714eedbae4141feb9d6984fab70581bc +Author: Bart Van Assche +Date: Fri Mar 9 21:33:39 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain: Remove two (void **) casts + + Change the data type of two local variables named 'sa' into void * such + that two (void **) casts can be removed. This patch does not change any + functionality. + +commit ed5bbbcd315f4425ac7c85a7fe32bb3a5afd2241 +Author: Bart Van Assche +Date: Sat Mar 10 09:52:09 2018 -0800 + + snmplib/transports/snmpCallbackDomain: Make netsnmp_callback_send() easier to read + + This patch does not change any functionality. + +commit 56889633204839e4b0d57b5b4bb973d590684ed4 +Author: Bart Van Assche +Date: Sat Mar 10 09:49:09 2018 -0800 + + snmplib/transports/snmpCallbackDomain: Make find_transport_from_callback_num() easier to read + + This patch does not change any functionality. + +commit 9a088c7951a462ca85ae5f5d3d6f389436580522 +Author: Bart Van Assche +Date: Sat Mar 10 09:48:28 2018 -0800 + + snmplib/transports/snmpCallbackDomain: Make find_transport_from_callback_num() reentrant + +commit 506f60d6b61c30a8a0dfc8cc207365f71e326c7f +Author: Bart Van Assche +Date: Sat Mar 10 09:45:05 2018 -0800 + + snmplib/transports/snmpCallbackDomain: Simplify netsnmp_callback_fmtaddr() + + This patch does not change any functionality. + +commit 0907750de83418364f40d94424e32b6292fa2a2c +Author: Bart Van Assche +Date: Sat Mar 10 09:43:23 2018 -0800 + + snmplib/transports/snmpCallbackDomain: Remove superfluous casts + + This patch does not change any functionality. + +commit a058952120a69504b4be84d3518161c4700cbc5b +Author: Bart Van Assche +Date: Sat Mar 10 09:41:43 2018 -0800 + + snmplib/transports/snmpCallbackDomain: Remove a local variable + + This patch does not change any functionality. + +commit ac12184da7590af7cd6ae93e59801888080497ea +Author: Wes Hardaker +Date: Fri Mar 9 15:47:34 2018 -0800 + + CHANGES: fix bug #2832 for building new checkbandwidth script + +commit 114b600432980529087b25c6e9aeb068e17f2837 +Author: Bart Van Assche +Date: Tue Mar 6 19:20:26 2018 -0800 + + snmplib: Suppress recently introduced Cygwin build warnings + +commit c9e11fd8e063dca694cf3f5c7a715a726f27bdc7 +Author: Bart Van Assche +Date: Tue Mar 6 19:20:04 2018 -0800 + + testing/fulltests: Suppress Cygwin warnings + + Avoid that warnings appear with Cygwin about redeclaring optind etc. + +commit 2e5222c4d7512c58b35be301e2b8ff8df6c562c3 +Author: Bart Van Assche +Date: Mon Mar 5 21:59:42 2018 -0800 + + snmplib, MIBs: Use NETSNMP_PRIz where required + +commit 7b1c542f0c7699fe242937a633c79063845a98c1 +Author: Bart Van Assche +Date: Mon Mar 5 19:53:18 2018 -0800 + + Win32, MSVC: Fix recently introduced DLL build failures + +commit 91037042136de9ec07bd337e41aeb00a60ed82ee +Author: Bart Van Assche +Date: Mon Mar 5 21:41:34 2018 -0800 + + Win32, MinGW: Fix the build against the latest MinGW Windows headers + +commit 6533b51a77a18b1e81cee71d7ee5a5b8596aadee +Author: Bart Van Assche +Date: Mon Mar 5 19:20:05 2018 -0800 + + snmplib, TLS: Avoid that names without dot trigger a segmentation fault + +commit 8e1a168025edc4f035f3c35f8022b1df697380fe +Author: Bart Van Assche +Date: Mon Mar 5 16:51:02 2018 -0800 + + snmpd: Make the agentxperms keyword work again + + Since there is code in agent/mibgroup/agentx/master.c that assumes + that t->local points to the path of the Unix socket, make t->local + again point at the Unix socket path for the Unix transport. + + This was reported by Sam Tannous . + + See also https://sourceforge.net/p/net-snmp/bugs/2830/. + + This partially reverts commit 3bd8dc8b2d90bba775ff1a1fa2f4197fb20b180b. + +commit ae0caf620e06e13f85079642aea2c2368ae24d95 +Author: Bill Fenner +Date: Mon Mar 5 14:10:46 2018 -0800 + + Unbreak minimal agent by declaring our feature dependency on sc_get_proper_priv_length() + +---------------------------------------------------------------------- + +Changes: V5.8.pre1 -> V5.8.pre2 + +commit 20ae34cc421fdd61ce973e4fd3c4ac9b0a144514 +Author: Robert Story +Date: Mon Mar 5 11:57:19 2018 -0500 + + Version number update: 5.8.pre2 + +commit 4ecad5c95cccca9012ea8d337836835022c202b4 +Author: Robert Story +Date: Mon Mar 5 11:56:09 2018 -0500 + + regenerate configure + +commit 59877eafa2ef9365a73f45ddef1551c88ddc55b4 +Author: Robert Story +Date: Mon Mar 5 11:42:28 2018 -0500 + + Revert "Make snmptrap work for DTLS-UDP" + + SNMPv3 traps use local engineID so no probe is needed. More investigation + needed into why DTLS-UDP traps tests are failing. + + This reverts commit ace478cebbe620c8fa43161858f3db8f79fdafba. + +commit 95c2a160231c6806401fcf0059661dc667406aa0 +Author: Robert Story +Date: Fri Feb 16 11:45:54 2018 -0500 + + fix ceiling count for extend_kul + +commit 8bd649d115b7a237da3edd84be95a1af19d41b34 +Author: Robert Story +Date: Fri Feb 16 11:45:17 2018 -0500 + + BUG: fix usm keychanges for new algorithms and longer keylengths + +commit 8051b8372dfd7143dd571aeccaebc648d53a5afc +Author: Robert Story +Date: Fri Feb 16 11:34:04 2018 -0500 + + add a bunch of debug during usm/key processing + +commit 9bee3387ed28e33e558072ecdbce5c5712c6fe3a +Author: Robert Story +Date: Fri Feb 16 10:51:33 2018 -0500 + + fix some memory leaks in usm processing + +commit c89aabfee0fe6a0dca691c588f8ecd6d803965d7 +Author: Robert Story +Date: Fri Feb 16 10:49:10 2018 -0500 + + match exact string length in usm_lookup_alg_type + +commit 1620dea72ae008c741920c329bd84032016d9237 +Author: Robert Story +Date: Fri Feb 16 10:48:09 2018 -0500 + + make usm_extend_user_kul avaialable to other files + +commit 720a47eeaade1052605a644fcbb8f6a4b90faaab +Author: Robert Story +Date: Fri Feb 16 10:44:54 2018 -0500 + + remove redundant cisco2 AES types + +commit 7497e2eade8aafcf53c48e1b29800b3d26dcb1b5 +Author: Robert Story +Date: Fri Feb 16 10:42:01 2018 -0500 + + check if libm is needed for ceil function + +commit 13183a8054f3dd9617023065b26b4c487d4799c2 +Author: Bart Van Assche +Date: Sun Mar 4 21:23:57 2018 -0800 + + snmplib: Fix MinGW build + + Fix recently introduced MinGW build failures and warnings. + +commit 35b1a5b8869a83666fb7481564e91b2229bccb05 +Author: Bart Van Assche +Date: Sun Mar 4 20:10:14 2018 -0800 + + testing/fulltests/tls/STlsUsers: Fix this test + +commit f04ecd20fce2e6b9023e8f1f455fe576c102d038 +Author: Bart Van Assche +Date: Sun Mar 4 19:32:14 2018 -0800 + + testing/fulltests/tls/STlsServer: Fix a comment + +commit 2c682f6cbce8cc857acdef4dc145ae3ad5f98304 +Author: Bart Van Assche +Date: Sun Mar 4 19:58:08 2018 -0800 + + snmplib: Refuse certificates for which a trusted chain was not found the trust store + + This patch fixes the noTrustCACert STlsServer test. + + Fixes: 0598b77e1c3a ("CHANGES: snmplib: add more openssl error cases where we check for local cert") + +commit d9471b0227d484ac69804e58d4b955270267bb9c +Author: Bart Van Assche +Date: Sun Mar 4 18:01:38 2018 -0800 + + snmplib, cert_util: Fix spelling in a soure code comment + +commit b1bf5c9d1883b2fe3365cc21844174f308cc90e7 +Author: Bart Van Assche +Date: Sun Mar 4 18:53:41 2018 -0800 + + snmplib, UDP transport: Remove a cast + +commit 8915e14d1674d0675d56341fcb21c407e0945e50 +Author: Bart Van Assche +Date: Sun Mar 4 18:52:27 2018 -0800 + + snmplib, UDP transport: Fix spelling in soure code comments + +commit 1af94a8e76d5aee9a54713054e67fb2d82271f0a +Author: Bart Van Assche +Date: Sun Mar 4 18:42:54 2018 -0800 + + snmplib, TLS-TCP transport: Fix spelling in a log message + +commit e2f78d27f2217a2aab4d042eb7ce26f52566fb74 +Author: Bart Van Assche +Date: Sun Mar 4 19:48:21 2018 -0800 + + snmplib, TLS transport: Fix spelling in a source code comment + +commit ce92b97d2e0e237844df5dc454cc5315aff7f1a7 +Author: Bart Van Assche +Date: Sun Mar 4 18:17:00 2018 -0800 + + snmplib, TCP transport: Set 'farendlen' correctly + +commit 78af047973afc8d8102e9f92fd5686005941751c +Author: Bart Van Assche +Date: Mon Feb 26 22:28:03 2018 -0800 + + testing/fulltests/snmpv3/T010scapitest_capp.c: Initialize loop variable 'index' + + Initialize 'index' before starting the loop. Additionally, fix the + indentation of the code in test_docrypt(). + +commit ace478cebbe620c8fa43161858f3db8f79fdafba +Author: Bart Van Assche +Date: Sun Feb 25 19:31:10 2018 -0800 + + Make snmptrap work for DTLS-UDP + + Enable engineID probing for SNMP traps sent over the DTLS-UDP transport. + This is necessary to make snmptrap work over DTLS-UDP and also to make + the unit tests pass that send traps over DTLS-UDP. + +commit 528b98358c0774edbbbae529edf89cbc7358bcf2 +Author: Bart Van Assche +Date: Sun Feb 25 09:48:13 2018 -0800 + + snmplib/transports/snmpIPv6BaseDomain.c: Fix netsnmp_ipv6_fmtaddr() + + Add support for decoding t->data if that pointer points at a + netsnmp_indexed_addr_pair structure. + +commit e3fd8c38503f1ce12886ed0c69de7b3e6dbf42b4 +Author: Bart Van Assche +Date: Sun Feb 25 09:48:11 2018 -0800 + + snmplib/transports/snmpIPv4BaseDomain.c: Make netsnmp_ipv4_fmtaddr() more robust + +commit 8690931673c6643802d7167b12cc52b53e958a32 +Author: Bart Van Assche +Date: Sun Feb 25 09:34:47 2018 -0800 + + snmplib/transports/snmpIPv4BaseDomain.c: Remove dead code + + Since &(ptr->member) is never NULL, remove the code that depends on + such an expression evaluating to NULL. + +commit 17d6eafd09d7a206b280d4ff7fed3da427b4ce68 +Author: Bart Van Assche +Date: Sat Feb 24 16:04:07 2018 -0800 + + testing/fulltests/tls/STlsAgentTrap: Fix this test by adding -v3 to the snmpset command line + +commit 6e8fb30e9c44377c98e04db990c80e42e4b4c1d8 +Author: Bart Van Assche +Date: Sat Feb 24 15:34:03 2018 -0800 + + testing/fulltests/tls/STlsUsers: Fix this test + +commit 948340a2d0ba8a2855b4e8db91a9eb04d9418118 +Author: Bart Van Assche +Date: Sat Feb 24 15:53:05 2018 -0800 + + agent/mibgroup/examples/example.c: Fix spelling in a source code comment + +commit c49ebd86ac12f99b5b2e960746a7e9dbfc7bb0a4 +Author: Bart Van Assche +Date: Sat Feb 24 21:49:30 2018 -0800 + + snmplib/transports/snmp*TLS*Domain.c: Fix address formatting + + Next to data of type netsnmp_indexed_addr_pair, also decode + netsnmp_tmStateReference and _netsnmpTLSBaseData. + +commit 0f72fa6cfdfcb09bbead02517a8af5f77c010561 +Author: Bart Van Assche +Date: Sat Feb 24 21:44:00 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain.c: Make _extract_addr_pair() easier to read + + Additionally, complain if the length of the opaque data is passed to + _extract_addr_pair() is not supported. + +commit 4d6609d977734fe95aa4ebc2de270f521330a988 +Author: Bart Van Assche +Date: Sat Feb 24 21:12:52 2018 -0800 + + snmplib/transports/snmpDTLSUDPDomain.c: Fix spelling in a source code comment + + Change "packtes" into "packets". + +commit d33ad0bb66af037869c25391315e32578fee138b +Author: Bart Van Assche +Date: Wed Feb 14 20:32:22 2018 -0800 + + Fix the T200TlsIpv6_simple test + + Since the symbol NETSNMP_TRANSPORT_TLSIPV6_DOMAIN does not exist, remove + it. And since having to edit /etc/hosts to be able to run a test is very + annoying, switch from "localhost6" to "[::1]". + +commit 087f040b09a712664955980dd95853157dd618c8 +Author: Bart Van Assche +Date: Wed Feb 14 20:32:29 2018 -0800 + + testing/fulltests/tls: Reduce the time needed to run these tests + + Make the tests run faster by reducing the number of retries from 5 + to 1. Reducing the number of retries is fine since no packets are + lost when communicating at a low packet rate over the localhost + interface. + +commit 7dbf67d1f693eee560f34a9beb41efc2acd220f2 +Author: Bart Van Assche +Date: Sat Feb 10 18:28:07 2018 -0800 + + testing/fulltests: Convert clientCert/serverCert keywords into localCert/peerCert + + Additionally, add -v3 to the app flags to avoid that snmpget and + snmpset fail due to no community string having been specified. + +commit 3bd8dc8b2d90bba775ff1a1fa2f4197fb20b180b +Author: Bart Van Assche +Date: Sun Feb 11 10:43:41 2018 -0800 + + snmplib/transports: Avoid that the create_from_ostring methods truncate IPv6 addresses + + This patch not only simplifies the code but also fixes a bug in the + DTLS-UDP and UDP-shared transports for IPv6, namely that IPv6 address + truncation no longer occurs. The truncation was caused by the following + code in the create_ostring implementations of these transports: + + memcpy(&addr6.sin6_addr.s6_addr, o, 4); + +commit 54a924bc9648fa665efc78aaede9d6c8e7092f9a +Author: Bart Van Assche +Date: Sun Feb 11 15:34:35 2018 -0800 + + snmplib/transports: Use asprintf() for formatting addresses + + This change simplifies the code. + +commit 651cbf9a4098c898192f855da80dc5f719d1fc2f +Author: Bart Van Assche +Date: Sun Feb 11 10:39:44 2018 -0800 + + snmplib/snmp_transport: Use netsnmp_memdup() instead of open-coding it + +commit 7e094ed17ef1eaf84b55fe18786b31b89fa69f36 +Author: Bart Van Assche +Date: Sat Feb 3 22:18:38 2018 -0800 + + snmplib/transports: Declare arguments that are not modified 'const' + +commit 20725d58ca76fe648c3ed3bf44d496a9a938ffde +Author: Bart Van Assche +Date: Sun Feb 11 09:53:44 2018 -0800 + + DTLSUDP transport: Check length of from address + + Avoid that copying 'opaque' into 'from' triggers a buffer overflow. + +commit 0ef2ffb2686f3cce65d702c87de9d158ef94ad67 +Author: Bart Van Assche +Date: Sun Feb 11 20:00:10 2018 -0800 + + testing/fulltests/snmpv3: Fix compiler warning and build issues + +commit 398f90a3e931e8cb7953a6fec6a309dd9bf5ba4d +Author: Wes Hardaker +Date: Fri Feb 2 13:50:48 2018 -0800 + + CHANGES: docs: Bug 2826: from Tomasz: fix utf-8 encoding + +commit 2a9f8d7793b54ba6fce804b05e4d37a4a237b1d2 +Author: Wes Hardaker +Date: Fri Feb 2 13:45:30 2018 -0800 + + CHANGES: python: BUG 2824: from: Tomasz: Fix python module make install + +commit 0ec7af6591adf600094c5ed98fa97a699dee4e8c +Author: Wes Hardaker +Date: Fri Feb 2 13:50:48 2018 -0800 + + CHANGES: docs: Bug 2826: from Tomasz: fix utf-8 encoding + +commit 4f481aa21a20a6c5ab463f9404e44ad9f247325e +Author: Wes Hardaker +Date: Fri Feb 2 13:45:30 2018 -0800 + + CHANGES: python: BUG 2824: from: Tomasz: Fix python module make install + +commit ba3e921f940494f42797456e60b594e6d5a0343c +Author: Wes Hardaker +Date: Mon Jan 29 10:50:49 2018 -0800 + + NEWS: apps: A new 'checkbandwidth' script to host min/max bandwidth + +commit 310afaf139fa95b3968e78c05609d90c36cd5ada +Author: Bill Fenner +Date: Thu Jan 25 14:23:04 2018 +0000 + + Update the NETSNMP_DISABLE_MD5 case for the removal of USM_LENGTH_OID_TRANSFORM + +commit f350c0ca404081060458b866da3cae48961013e1 +Author: Bill Fenner +Date: Tue Jan 23 20:00:50 2018 -0800 + + Allow access to new auth/priv algorithms from python bindings + +commit 19a25baefd16ecb67dea3710c2c5aacfb0e61610 +Author: Bill Fenner +Date: Tue Jan 23 19:57:17 2018 -0800 + + Initialize newKulLen in _kul_extend_blumenthal() + +commit 8ea9f6fccf1c11e72fbf6548b7eddab2167a220c +Author: Bart Van Assche +Date: Tue Jan 23 07:21:17 2018 -0800 + + configure: Add -Wlogical-op to the developer compiler flags + +commit 8611d5f1983be2cab28a6869eebbb7b1d512e310 +Author: Bart Van Assche +Date: Tue Jan 23 07:27:40 2018 -0800 + + snmplib/cert_util: Fix world read/writable test + +commit 418fbe78a0ca3ebb563695fbf58d51b8916a48d9 +Author: Bart Van Assche +Date: Sat Jan 13 10:44:34 2018 -0800 + + HOST-RESOURCES-MIB: Fix a compiler warning + + There are still systems that use int for time_t instead of long. + +commit de0ee141ce0eb4c062f739ea1ab5a1dd66cdef84 +Author: Bart Van Assche +Date: Sat Jan 13 09:57:34 2018 -0800 + + HOST-RESOURCES-MIB: Only call stime() if it is available + + stime() is an SVr4 function and is not available on e.g. AIX. + +commit a086aa45dcc328e4fe66cbb75f37cd6509b4637c +Author: Bart Van Assche +Date: Sat Jan 13 10:43:09 2018 -0800 + + snmplib: Unbreak the NetBSD build + +commit 708dd93377cd8219f18304436868588f50a42401 +Author: Bart Van Assche +Date: Sat Jan 13 09:54:38 2018 -0800 + + configure: Improve compiler flag detection support + + Avoid that numerous "warning: unsupported compiler flag ..." messages + appear in the build output. + +commit d11d20de2889e95ad203d5950db3d4fa924ccc88 +Author: Bart Van Assche +Date: Sat Jan 13 10:07:56 2018 -0800 + + configure: Remove -std=c89 from the developer options + + The -std=c89 compiler option causes build failures for system header + files that are not C89 compliant on at least Linux and NetBSD. Hence + remove it again. + +commit ac70ceb04876cbadcb9d9c71636fcdf41133909a +Author: Bart Van Assche +Date: Sat Jan 13 09:36:59 2018 -0800 + + configure: Unbreak AIX support + + Avoid that the configure script fails as follows on AIX: + + ./configure[19598]: syntax error at line 19871 : `;' unexpected + +commit 09778607761a2c28d5d1ba171e95830956ad3bdd +Author: Bart Van Assche +Date: Mon Jan 8 18:41:16 2018 -0800 + + configure, MIBs: Detect whether __u64 etc need to be declared explicitly before including + +commit 28f3ef5e70964d84b94e865fdacd7f62825895f6 +Author: Bart Van Assche +Date: Sun Jan 7 19:45:41 2018 -0800 + + TUNNEL-MIB: RHEL 5 build fix + +commit 9e1f73baa40ecde93941855ddf3a8137a8ef87c7 +Author: Bart Van Assche +Date: Sun Jan 7 19:45:30 2018 -0800 + + RMON-MIB: Don't mix code and declarations + +commit f7b9d5a8529337e73532b33f875873b9a669d162 +Author: Bart Van Assche +Date: Sun Jan 7 19:50:51 2018 -0800 + + Document -std=c89 workarounds + +commit 26bc66b794a373970ed16d6b22940a2d6e0d5553 +Author: Magnus Fromreide +Date: Sun Jan 7 11:40:28 2018 +0100 + + Adapt to -std=c89 - the asm keyword ain't part of C89 but since this is code protected by __GNUC__ and it is using gnu extended assembler syntax I am assuming that a GNU-compatible compiler is in use and thus I can use the __asm__ keyword in place of asm + +commit 5d3a1c1ab173a1db23c301f4d1975e73ea8ccb69 +Author: Robert Story +Date: Fri Jan 5 11:13:11 2018 -0500 + + update COPYING + + - add VMware and ISI + - remove/replace non-ascii characters + +commit 1dc44d4a8db1054a52185db0ad96d454ceb619d0 +Author: Robert Story +Date: Fri Jan 5 11:06:53 2018 -0500 + + update COPYING + + - add VMware and ISI + - remove/replace non-ascii characters + +commit 654b1227d86407c2cd1ca6409be74c1d4fd58d77 +Author: Bart Van Assche +Date: Thu Jan 4 07:25:39 2018 -0800 + + Make the source code C89 compliant + + Change all occurrences of inline that are visible to Unix compilers + into __inline__. Add -std=c89 to the developer compiler flags. Surround + non-compliant header files with #define inline __inline__ / #undef inline. +---------------------------------------------------------------------- + +Changes: V5.7.3 -> V5.8.pre1 + +NOTE: changelog semi-arbitrarily cut based on date of 5.7.3 release + +commit 6dae3b81771801759fe76a9b9b8e9d1ca858496e +Author: Robert Story +Date: Wed Jan 3 23:15:06 2018 -0500 + + fix compiler warning for implicit fallthrough + +commit fcba8ae346a8b89df225942137892f1bbefdad6a +Author: Robert Story +Date: Wed Jan 3 23:14:38 2018 -0500 + + remove C++ comment + +commit 5238dcc6882bf65cb5c9b03a37653e0cd76a4894 +Author: Robert Story +Date: Wed Jan 3 18:49:39 2018 -0500 + + Version number update: 5.8.pre1 + +commit 39a746b6e6336aaa4dce04102d274fb916dbf351 +Author: Bart Van Assche +Date: Mon Jan 1 21:03:24 2018 -0800 + + MSVC, Makefiles: Move common compiler flags into win32/Configure + + Additionally, minimize the compiler include path. + +commit d4ef21d1f4fa14dec77dcf219d7906a971fe88b0 +Author: Bart Van Assche +Date: Tue Jan 2 20:59:11 2018 -0800 + + MSVC, Makefiles: Avoid using local input files + + This patch does not change the behavior of the makefiles but makes + build failures easier to debug. + +commit 556c45bc66dd8529d8bc9ce9a31b08c453b3be2c +Author: Bart Van Assche +Date: Mon Jan 1 21:04:30 2018 -0800 + + Win32: Remove NMAKE_NETSNMP_USE_DLL + + Since the preprocessor macro NMAKE_NETSNMP_USE_DLL is not used anywhere, + do not define it. + +commit 7b0faf1484f51d662365888f7fb20cbe0d15e1ed +Author: Bart Van Assche +Date: Wed Jan 3 16:56:14 2018 -0800 + + agent/mibgroup/mibII/kernel_linux.c: Convert from gnu89 back to c89 + + See also commit 142c4239771c ("MIB-II: Fix /proc/net/snmp parser"). + +commit 6c57dd6038de971abcdde98a5518c5e9980891b6 +Author: Robert Story +Date: Wed Jan 3 18:53:41 2018 -0500 + + remove references to 5.4 and it's branches from makerelease + +commit 500dfac5108c9f0b8c4071d3152794d3c269a4dd +Author: Robert Story +Date: Wed Jan 3 18:16:33 2018 -0500 + + re-fix run-autoconf + + - original commit 418132f43cc43231966a8b9672c626f60b991039 + - ok in 5.7 + - no history of how it broke in master + - weird. bad merge? + +commit 0eee9d4345081bf6e367a271c1e460067a61f917 +Author: Robert Story +Date: Wed Jan 3 18:06:46 2018 -0500 + + remote --disable-U64 from makerelease config + +commit e76f067d0b264c3005ea86bcef0c755baeb44d36 +Author: Robert Story +Date: Wed Jan 3 14:04:19 2018 -0500 + + keep compiler happy + + - type agreement + - rework case statement to eliminate implicit fallthrough + +commit 4c52f5eeea14bb1371741e738b6a79f4184f0a36 +Author: Robert Story +Date: Wed Jan 3 13:39:56 2018 -0500 + + keep compiler happy + +commit e6e3142d79fa45b84d28aab79373a5f7501ea9bf +Author: Bart Van Assche +Date: Mon Jan 1 21:03:24 2018 -0800 + + MSVC, Makefiles: Move common compiler flags into win32/Configure + + Additionally, minimize the compiler include path. + +commit dc9b48c92a52871bd96af23b8ce4932aaca8efac +Author: Bart Van Assche +Date: Tue Jan 2 20:59:11 2018 -0800 + + MSVC, Makefiles: Avoid using local input files + + This patch does not change the behavior of the makefiles but makes + build failures easier to debug. + +commit ec1f412c923bb5dd3794ea6c7e9fae66c25df8bb +Author: Bart Van Assche +Date: Mon Jan 1 21:04:30 2018 -0800 + + Win32: Remove NMAKE_NETSNMP_USE_DLL + + Since the preprocessor macro NMAKE_NETSNMP_USE_DLL is not used anywhere, + do not define it. + +commit c67c0aa92e6ec38a2952bf1a3db06a9351e6c062 +Author: Bart Van Assche +Date: Mon Jan 1 12:25:38 2018 -0800 + + MSVC: Suppress "possible loss of data" warnings + + Avoid that MSVC warns about assigning a large integer type (e.g. int) to + a smaller integer type (e.g. u_char). Additionally, move the definitions + of _CRT_NONSTDC_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS and + _WINSOCK_DEPRECATED_NO_WARNINGS from various Makefile.in files into + win32/Configure. + +commit 116b432b7103d7056a8c71a65bae0e121ec79352 +Author: Bart Van Assche +Date: Mon Jan 1 12:07:28 2018 -0800 + + MSVC: Fix a compiler warning + + Avoid that the following compiler warning is reported when building + with MSVC: + + include/net-snmp/library/scapi.h: warning C4005: 'OPENSSL_SYS_WIN32': macro redefinition + C:\OpenSSL-Win32\include\openssl\opensslconf.h(26): note: see previous definition of 'OPENSSL_SYS_WIN32' + +commit c9ddbd2f9b464d3274b95950abb9bb357996acaa +Author: Bart Van Assche +Date: Mon Jan 1 11:37:11 2018 -0800 + + MSVC build fix for netsnmp_srandom() + + Ensure that HAVE_SRAND is defined when building with MSVC. + +commit 3f240be697a06950a1cf62ce8a6e17aa0289dedd +Author: Bart Van Assche +Date: Mon Jan 1 10:57:10 2018 -0800 + + snmplib: Fix netsnmp_random() + +commit 940888df4fa073a5db706fbffa6ec26a0de26de9 +Author: Bart Van Assche +Date: Mon Jan 1 08:35:10 2018 -0800 + + snmplib: Fix format specifiers and remove unused local variables + + Fixes: commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO") + +commit 1cfb9326cda38afd557a785c5cc08bcdfd8c248d +Author: Bart Van Assche +Date: Mon Jan 1 08:34:40 2018 -0800 + + apps/snmppcap: Fix three format specifiers + + Fixes: commit db2f552f427b ("WIP: snmppcap"). + +commit c57c1d25b3ab5742ada0430a15dcccb2bf250e74 +Author: Bart Van Assche +Date: Mon Jan 1 08:38:57 2018 -0800 + + configure: Add -Wextra to the developer compiler flags + + Additionally, since -Wextra implies -Wimplicit-fallthrough=3, + -Wmissing-field-initializers, -Wsign-compare and -Wtype-limits, add + -Wimplicit-fallthrough=2, -Wno-missing-field-initializers, -Wno-sign-compare + and -Wno-type-limits. + +commit 0546b2c19b8a3d87399b74c389d6f6a10b44e076 +Author: Niels Baggesen +Date: Wed Apr 12 14:27:21 2017 +0200 + + Fix up FALL THRU annotations for gcc7 + +commit c8b555c9d9df959d215467e271425c9f1ef3ba43 +Author: Bart Van Assche +Date: Mon Jan 1 09:12:52 2018 -0800 + + DISMAN-TRACEROUTE-MIB: Suppress a warning about a set-but-not-used variable + +commit d621296fc78eec4f2b93933754260dfa1a10d020 +Author: Bart Van Assche +Date: Mon Jan 1 09:12:04 2018 -0800 + + MIB-II: Change one occurrence of 'const static' into 'static const' + +commit 3acca4b9b70839c6c9a8bb3c418f819308072cb1 +Author: Bart Van Assche +Date: Mon Jan 1 08:04:11 2018 -0800 + + Remove NETSNMP_ATTRIBUTE_UNUSED from function arguments + + Instead, add -Wno-unused-parameter to the developer flags. + + Note: Specifying -Wno-unused-parameter is only needed for older gcc + versions. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57622. + +commit c2163c1758c5106e75ab01455e185adcd8c8ca13 +Author: Bart Van Assche +Date: Sat Dec 30 19:38:24 2017 -0800 + + Internal SSL implementation: Avoid that the compiler warns about unused values + + This patch does not change any functionality. + +commit c4f16a899dacd2230128694604733c6124463f44 +Author: Bart Van Assche +Date: Sat Dec 30 19:06:36 2017 -0800 + + configure: Detect whether or not the compiler supports __attribute__((unused)) + + Detect whether or not the compiler supports __attribute__((unused)) + instead of having multiple (inconsistent) explicit tests in multiple + places of the compiler version. + +commit 945ee1b6846c8d38197d714fd78f67b192d1a85f +Author: Bart Van Assche +Date: Thu Dec 28 15:47:55 2017 -0800 + + snmplib/scapi.c: Suppress three compiler warnings + + Suppress the following three compiler warnings: + + scapi.c: In function 'sc_encrypt': + scapi.c:722:9: warning: unused variable 'new_ivlen' [-Wunused-variable] + int new_ivlen = 0; + ^~~~~~~~~ + scapi.c: In function 'sc_decrypt': + scapi.c:994:13: warning: unused variable 'aes_key' [-Wunused-variable] + AES_KEY aes_key; + ^~~~~~~ + scapi.c:993:9: warning: unused variable 'new_ivlen' [-Wunused-variable] + int new_ivlen = 0; + ^~~~~~~~~ + + This is a follow-up for commit b964eebe0064 ("Unbreak the build on + systems without OpenSSL, e.g. MinGW"). + +commit 599886c4f200ec1302a62d4856dd0bf2115f8899 +Author: Bart Van Assche +Date: Thu Dec 28 15:35:08 2017 -0800 + + DISMAN TRACEROUTE MIB: Remove a superfluous field width specifier + +commit 6a71aa93ee36c370ab20cba6a1192d3d3e780232 +Author: Bart Van Assche +Date: Thu Dec 28 15:31:25 2017 -0800 + + Add -Wno-format-truncation to the developer compiler flags + +commit 0f32973d1f011010ebb358b0b39601515019058c +Author: Bart Van Assche +Date: Thu Dec 28 15:22:54 2017 -0800 + + testing/fulltests/default/T035snmpv3trapdusermgmt_simple: Skip this test when using the internal SSL implementation + +commit 8c1625cf030a26ffaef7f826f8be5b0a9d344752 +Author: Bart Van Assche +Date: Thu Dec 28 14:43:21 2017 -0800 + + snmplib/openssl/openssl_des_local.h: Annotate switch statement fall-through + +commit e707a67c7265dc96043d09c6939bbc5d5fba20d0 +Author: Bart Van Assche +Date: Thu Dec 28 14:57:47 2017 -0800 + + snmplib/snmp_openssl: Fix X509_get_signature_nid() prototype + + See also . See also commit d686bc3502f1 ("CHANGES: + snmplib: Add support for OpenSSL 1.1.0"). + +commit 215695f2307dc02399fa2bb789c2b1e790d8551e +Author: Bart Van Assche +Date: Thu Dec 28 14:05:14 2017 -0800 + + Change autoconf version back to 2.68 + + This change avoids that test 1 fails as follows: + + Checking the Net-SNMP configure script validity ......................... + not ok 1 - found 0 copies of '^# Generated by GNU Autoconf 2.69 for Net-SNMP' in output (configure); expected 1 + + See also commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO"). + + See also http://net-snmp.sourceforge.net/wiki/index.php/Build_System. + +commit 723c7131f4f10558f7b9ddc9b48c81366ffd9c8d +Author: Magnus Fromreide +Date: Sun Dec 24 13:00:49 2017 +0100 + + Do not mix variables declarations and code + +commit 808e6bb814ffa69a0134be016c457832df352218 +Author: Magnus Fromreide +Date: Sun Dec 24 12:28:48 2017 +0100 + + Remove empty statement in the declaration list in order to bring it back to C89. + +commit ce05e7735384f61d636260fdc41152af75115296 +Author: Bill Fenner +Date: Fri Dec 22 01:43:08 2017 +0000 + + features: snmptls requires row_create + +commit 1e12ff5098c980f3d332f624843f3636fb3463ef +Author: Bill Fenner +Date: Fri Dec 22 01:40:15 2017 +0000 + + features: netsnmp_check_vb_storagetype calls check_storage_transition + + If we are not removing netsnmp_check_vb_storagetype, + then we require check_storage_transition. + +commit 280e2a6dbd0d64c10d1a6904c4fb68afaf4b1617 +Author: Bill Fenner +Date: Wed Dec 20 22:49:35 2017 +0000 + + Prevent infinite loop when view is modified during agentx processing + + If the view changes while a request is being processed by an agentx + subagent, we may get stuck on snmpEnableAuthenTraps.0 since check_acm sets + type to ASN_PRIV_RETRY without turning off inclusive. The steps here: + + * getNext of snmpOutTraps.0 returns snmpSilentDrops ((Retry)) + due to scalar_group's hole handling code. + * check_getnext_results now sets inclusive=2, and the object to + snmpEnableAuthenTraps.0 (the end of the range because of the hole) + * we then do a getNext of snmpEnableAuthenTraps.0 with retry+inclusive, + which turns into a get of snmpEnableAuthenTraps.0, which returns + a value. + * check_acm finds that snmpEnableAuthenTraps.0 is not allowed, so + sets retry again without resetting inclusive; + * we then do a getNext of snmpEnableAuthenTraps.0 with retry+inclusive, + which turns into a get of snmpEnableAuthenTraps.0, which returns + a value. + * check_acm finds that snmpEnableAuthenTraps.0 is not allowed, so + sets retry again without resetting inclusive; + * ... + +commit 56c30b11f3616ea4f0c38a21e08e78f050096020 +Author: Bill Fenner +Date: Wed Dec 20 21:52:10 2017 +0000 + + NEWS: snmplib: PATCH: 1349: Fix perl/other crash against bad SNMPv3 agent + + With the patch in 1214, the snmp_api code assumed that if magic was + set, it was the "struct synch-state" from snmp_client. Of course, + magic belongs to the caller, and the perl library uses it differently, + so reaching into it is verboten. Introduce a new callback (that + was already introduced in 5.8) to report this "retries exceeded" + state, and use it in snmp_client. + +commit 91b9d75c95afae172e1e0145a358a3d4f29451c0 +Author: Bill Fenner +Date: Wed Dec 20 20:59:14 2017 +0000 + + Use NETSNMP_DS_LIB_QUICK_PRINT instead of the old ucd compat function + +commit cbb40ded0faaf8ab8ee07746707ff3d4ed483911 +Author: Bill Fenner +Date: Wed Dec 20 20:58:12 2017 +0000 + + After b009ac9037e37566f78afab4a094d3b72f732846 we do not require snprint_value + +commit 41c5c3de6b552f01bb80c743cab8833f4f0e6bb8 +Author: Bill Fenner +Date: Wed Dec 20 20:53:33 2017 +0000 + + CHANGES: Fix crash when snmptable -OX run against object that's not a table (like .1) + +commit 6907d38ed0c7200e2c1fa0e00926061db59d1290 +Author: Bill Fenner +Date: Wed Dec 20 20:35:27 2017 +0000 + + Fix OID saved to config file for SHA224 authProto + +commit c450b7f6b836789aabbf5d78ad59a41c91b96249 +Author: Robert Story +Date: Wed Dec 20 14:39:37 2017 -0500 + + remove two more duplicate functions when TLS enabled + +commit 573355d4219180a8feb3429c4c5d345495160d27 +Author: Robert Story +Date: Wed Dec 20 14:15:12 2017 -0500 + + fix compile errors when TLS support enabled + + - fix prototype + - remove duplicate function + +commit 3f6ef5a028f3d5142e68dff90dfbd95caf54b302 +Author: Robert Story +Date: Wed Dec 20 14:14:31 2017 -0500 + + remove dup DH_get0_* functions + + - fix ifdefs so version in snmplib is visible to apps + +commit 0c4709c062bd9e8da5090473454822c60fa5d9c7 +Author: Bart Van Assche +Date: Mon Dec 18 20:03:45 2017 -0800 + + snmplib: Avoid that warnings about if-statements with an empty body appear during compilation with --disable-debugging + +commit 831233136d30d26cd757fed293b22f0730642711 +Author: Huseyin Alpaslan Yildiz +Date: Mon Dec 18 18:35:08 2017 -0800 + + snmplib: Fix --disable-debugging build + +commit b964eebe0064b80946be0ca05c9dd2beb52f47e9 +Author: Bart Van Assche +Date: Sun Dec 17 14:05:42 2017 -0800 + + Unbreak the build on systems without OpenSSL, e.g. MinGW + + Fixes: commit 329a9d3c9d63 ("revamp auth/priv protocol constants handling") + +commit 3fd2b328a200d2ab6b0d1d07afbb5f57bc38a6ea +Author: Bart Van Assche +Date: Sun Dec 17 19:08:27 2017 -0800 + + OpenSSL-related MSVC build fixes + +commit c10b756d84978b9c3b5aa907fe8723b9869dc386 +Author: Bart Van Assche +Date: Sun Dec 17 08:40:44 2017 -0800 + + CHANGES: Introduce netsnmp_random(void) and netsnmp_srandom() + + This patch unbreaks the MinGW build. + +commit faa9deb85149e2dc247cd03bb9e5b60e112baba5 +Author: Bart Van Assche +Date: Sun Dec 17 14:15:30 2017 -0800 + + Fix a mismatch between the netsnmp_extend_kul() prototype and its caller + + Fixes: commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO") + +commit ad4fdcf42cca48c80f3de71c0d889a076a81763a +Author: Bart Van Assche +Date: Sun Dec 17 14:19:53 2017 -0800 + + Unbreak the compilation of the Perl modules + + Fixes: commit 329a9d3c9d63 ("revamp auth/priv protocol constants handling") + +commit f4b98f647260095fcec2b2a34d939b7ca30eda27 +Author: Bart Van Assche +Date: Sun Dec 17 14:00:39 2017 -0800 + + configure: Run autoreconf + + Fixes: commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO") + +commit 7840643a40116881fc830ed9eb2d5b06250f9fe5 +Author: Robert Story +Date: Thu Dec 14 12:03:38 2017 -0500 + + remove duplicate definitions of openssl compat functions + +commit efa3e4a9da0ff76d166e6e9cc66e88a9d040ea84 +Author: Robert Story +Date: Fri Dec 15 17:30:06 2017 -0500 + + check rc for checkout commands + +commit b66e90964e52addebbb50d294f1aa41463b8eaed +Author: Robert Story +Date: Fri Dec 15 17:20:28 2017 -0500 + + remove references to dead FTP mirrors + +commit 317c7f97ccb2fcbcdd90d17040e218eddd0cd16b +Author: Robert Story +Date: Fri Dec 15 17:00:21 2017 -0500 + + remove CVS scripts; change SVN refs to GIT + +commit be94477c2c94de10c230bbe690391b7463cf1f7d +Author: Robert Story +Date: Thu Dec 14 22:37:26 2017 -0500 + + whitespace changes + +commit 9e49de2e03b18ceb1b7cba2e715ad6180f394815 +Author: Robert Story +Date: Thu Dec 14 11:53:13 2017 -0500 + + NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO + + - they use key localization algorithm from draft-reeder-snmpv3-usm-3desede-00 + instead of the Blumenthal draft + + Also: + - configure option to enable larger AES key length code + - localized key extension via blumenthal and reeder method + +commit a0b25857bdddf70cc3f6f7d0c0211781b8dc3070 +Author: Robert Story +Date: Thu Dec 14 10:39:29 2017 -0500 + + debug tweaks + +commit 1a5d5104c7611a3142f63429f0dd0943ca573d00 +Author: Robert Story +Date: Thu Dec 14 10:33:20 2017 -0500 + + increase buffer size for larger hashes + +commit aa83281293a369ee372d749a84eb22fb8f083b5b +Author: Robert Story +Date: Thu Dec 14 10:31:39 2017 -0500 + + rework T010scapitest_capp.c to test all auth/priv protocols + +commit 9f3a2a8408d74e2f52c160fcb877994f6b664df9 +Author: Robert Story +Date: Thu Dec 14 10:28:43 2017 -0500 + + consistency in generate/check keyed hash functions; add debug + + - use mac length in both + - tweak debug output when testing code enabled + +commit ba3f4cb85f85108dcf5f8867a43f439c000ca737 +Author: Robert Story +Date: Thu Dec 14 10:25:04 2017 -0500 + + remove unused PADSIZE defines; all AES IV sizes are 128 + + - remove outdates comments + -reorderd defines by key/mac length + +commit 329a9d3c9d63e0dc2c3bc3374f52611d264fa1c3 +Author: Robert Story +Date: Thu Dec 14 09:32:31 2017 -0500 + + revamp auth/priv protocol constants handling + + - move constants into arrays + - remove hardcoded protocol OID lengths + +commit 7b2f35cadd146ea78571342d366be6e937a35c29 +Author: Robert Story +Date: Fri Sep 29 18:32:05 2017 -0400 + + NEWS: snmplib: Restore AES-192 and AES-256 privacy protocols + + - from draft-blumenthal-aes-usm-04 (precursor to RFC 3826) + - Revert "Use AES instead of AES128,192,256" + - Use OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt + + This reverts commit 2ca67bf94a380dc4e1b2322d4ef0024889938413 but also + contains additional changes. + + Some code borrowed from PATCH 1346, thanks to Alexander Ivanov + and Vladimir Sukhorukov. + +commit 0f7f5394f4432ba140a67edd5490791fca997f47 +Author: Robert Story +Date: Thu Dec 14 10:40:12 2017 -0500 + + add missed places for saving master key + +commit 1e99bf92950380049beedb5cffa640d28e9e8fbe +Author: Robert Story +Date: Thu Dec 14 10:41:16 2017 -0500 + + compare correct var when enforcing priv policy + +commit 96895c81165367bb0d70f91c5afbf4b4299c1acd +Author: Robert Story +Date: Thu Dec 14 12:03:38 2017 -0500 + + remove duplicate definitions of openssl compat functions + +commit 31cad3aa4a31730d769d7a20eac61018f0ee7d98 +Author: Robert Story +Date: Wed Dec 13 23:14:11 2017 -0500 + + check the right variable in condition + +commit 08e179bad581ccb5fd4220b7f41bfa76be8352c9 +Author: Robert Story +Date: Thu Dec 14 10:10:32 2017 -0500 + + remove dead branches from shell-functions + +commit e3782d32e05f550dfd3036261c8951f559b9d814 +Author: Robert Story +Date: Thu Dec 14 09:51:56 2017 -0500 + + log error when scoped pdu parsing fails + +commit 020a17cf90a258160175473aa0d6d84861215921 +Author: Robert Story +Date: Thu Dec 14 09:44:52 2017 -0500 + + fix compiler warnings when testing code enabled + +commit 9bafb8af58da10de28826a6c5ecd63b535367c50 +Author: Bart Van Assche +Date: Tue Dec 12 21:48:51 2017 -0800 + + configure: Suppress an autoconf warning + +commit 5ba0a484b4b023a54aff78d8c31f7d5b41c50b56 +Author: Bart Van Assche +Date: Tue Dec 12 17:53:16 2017 -0800 + + configure: Add -Wno-sign-compare and -Wno-pointer-sign to the developer flags + +commit 99072b71cfa2b8745945ff6008544203bf00d612 +Author: Bart Van Assche +Date: Tue Dec 12 17:51:33 2017 -0800 + + apps/snmpusm.c: Restore p and g checks + +commit af5d5fdf220a816245885e69ea18ca3ee04aa752 +Author: Bart Van Assche +Date: Sun Dec 10 17:58:36 2017 -0800 + + apps/snmptrapd_sql.c: Remove #include + + From a recent version of the libmysqlclient development package, about + my_config.h: + + This file should not be included by clients, include only + +commit 6c2f7bc1d139f865cab40ce6e0d7f93714f44d3f +Author: Bart Van Assche +Date: Sun Dec 10 16:08:39 2017 -0800 + + configure.in: Remove + + Commit d8e7bc024600 accidentally added the v5.4 configure.in script + to the v5.7 branch. Remove this script since the configure.ac script + is used on the v5.7 branch. + +commit e85ab00df2177ac4235632d88dd87262515e2e74 +Author: Bart Van Assche +Date: Sun Dec 10 15:19:59 2017 -0800 + + HOST-RESOURCES-MIB: Build fix + + Use config_require() instead of netsnmp_feature_require(). + + See also commit 33de26829121 (Patch 1327). + +commit d686bc3502f137f10e38fe719921c765cefa38fb +Author: Bart Van Assche +Date: Sat Dec 9 21:44:06 2017 -0800 + + CHANGES: snmplib: Add support for OpenSSL 1.1.0 + +commit 488e812deb7baac6225acabc552885c6ca2cc806 +Author: Bart Van Assche +Date: Sat Dec 9 18:43:02 2017 -0800 + + CHANGES: snmplib: Add support for OpenSSL 1.1.0 + + Add configure tests for EVP_MD_CTX_new() and EVP_MD_CTX_free(). Move + the OpenSSL backports from agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c to snmplib/snmp_openssl.c. + +commit 8e1f21659275cbafb596e3fd9819d9512716ffee +Author: Bart Van Assche +Date: Sat Dec 9 19:04:13 2017 -0800 + + CHANGES: snmptrapd: Add support for the latest libmysqlclient version + +commit a97fe4a69cf60e1b70547b4b57d5aacb7f98520e +Author: lijo +Date: Sat Dec 9 18:18:58 2017 -0800 + + CHANGES: BUG: 2802: Ensure that snmpwalk shows all ipNetToMedia (ARP) entries + + See also https://sourceforge.net/p/net-snmp/bugs/2802/. + +commit ee474421033c1cbc1923ed8ab7b867cf9f066efe +Author: Bart Van Assche +Date: Mon Dec 4 06:58:28 2017 -0800 + + CHANGES: BUG: 2814: Export snmp_enable_calllog() on Windows + +commit fa29b90482453b4bbe225258930daf6e932d31a7 +Author: Bart Van Assche +Date: Sun Nov 26 18:43:45 2017 -0800 + + configure: Regenerate + +commit e3bed7d1871786f6ed4a5b02885aac8166efc608 +Author: Bart Van Assche +Date: Sun Nov 26 18:12:51 2017 -0800 + + snmplib: Simplify snmp_vlog() + + See also https://sourceforge.net/p/net-snmp/bugs/2813/. + +commit 728a0230477fd1ed598a2f3d55f376af6db48aec +Author: Bart Van Assche +Date: Tue Jul 11 20:16:41 2017 -0700 + + Win32: Unbreak MSVC build + + See also commit ad50133f2c5a ("snmplib: Add asprintf()"). + +commit dec619dc21690aecd7c2948165d012195fba0062 +Author: Niels Baggesen +Date: Tue May 9 14:29:34 2017 +0200 + + snmplib/asprintf.c: The argument list must also be changed when changing + the function from realloc to malloc. + +commit 131005a36d634db2806ddcdfe8045394b7a73529 +Author: Niels Baggesen +Date: Tue May 9 14:28:47 2017 +0200 + + snmplib/asprintf.c: Some systems still have __va_copy, not va_copy. + +commit 31df4b680807f8c8c9f8d5b441a18e596129d02e +Author: Bart Van Assche +Date: Thu May 4 18:13:04 2017 -0700 + + snmplib, asprintf(): Make behavior conformant with glibc and FreeBSD + + Use malloc() internally instead of realloc(). Clear the pointer + to the output string if memory allocation fails. See also + https://www.freebsd.org/cgi/man.cgi?query=asprintf + +commit 4ad885bc3047f7a69bb8f12e9bc9df73768611c2 +Author: Bart Van Assche +Date: Sun Apr 16 09:03:20 2017 -0700 + + snmplib: Add asprintf() + + Add an asprintf() implementation for the platforms that do not provide + asprintf() through their C library. + +commit 4cfc23f4bc81ed4ca4c6d07077e82c7983919db3 +Author: Robert Story +Date: Thu Nov 23 01:56:52 2017 -0500 + + fix path and hardcoded user in rsync upload command + +commit 53239e2272effdd1bce003f629aa671f4fd5db34 +Author: Robert Story +Date: Wed Nov 22 13:45:58 2017 -0500 + + CHANGES/NEWS update for 5.4.5.rc1 + +commit b5846fac182e458f7edf4afb544e3537cb1de8ac +Author: Robert Story +Date: Wed Nov 22 13:35:32 2017 -0500 + + ChangeLog update for 5.4.5.rc1 + +commit 2a424d11c0c8b3adf260defd54f16c8670570fb1 +Author: Robert Story +Date: Wed Nov 22 13:26:40 2017 -0500 + + make depend for 5.4.5.rc1 + +commit 454212142ed531cf842703831a187177e27923fa +Author: Robert Story +Date: Wed Nov 22 11:20:03 2017 -0500 + + add missing titles; update gpg key for signing; remove refs to svn + +commit d688d9cceece90af6c620345d2c5fb0468df924e +Author: Robert Story +Date: Thu Oct 26 23:22:04 2017 -0400 + + remove commented code + +commit 032b28d9c1ad174c70f25e31757c3d427fb96bad +Author: Robert Story +Date: Thu Oct 26 22:36:30 2017 -0400 + + add --disable-U64 to makerelease.xml + +commit 3b36fec8fb13fd5cf0ed7423b8c5d0943d8ea989 +Author: Robert Story +Date: Thu Oct 26 21:42:33 2017 -0400 + + Release Candidate for V5-4-patches + +commit d8e7bc0246009a9ac58784c1b67baafb44d77902 +Author: Robert Story +Date: Thu Oct 26 21:42:29 2017 -0400 + + Version number update: 5.4.5.rc1 + +commit a5b4994061b1c45a960ff3e5e3941ae7ee295541 +Author: Robert Story +Date: Thu Oct 26 15:24:32 2017 -0400 + + remove distrelease script (should be using newest version from github) + +commit d687248669257328805cf0a6ff00428d0f8db66c +Author: Andrea Biscuola +Date: Thu Oct 19 07:29:00 2017 -0700 + + CHANGES: BUG: 2803: Fix a use-after-free in _sess_open() + + This patch fixes a crash on OpenBSD 6.1-CURRENT. + +commit bba1451f8ae64e3f58986408041a28f8e34e6f35 +Author: Niels Baggesen +Date: Thu Oct 19 21:09:30 2017 +0200 + + BUG 2788: fix memory leaks in error paths. + + Thanks to shqking. + +commit 2f739528b6ff89c28c58f98b0e81a2568b72348e +Author: Niels Baggesen +Date: Thu Oct 19 21:06:02 2017 +0200 + + BUG 2452: fix core dump from bad data to snmp_add_var + + Thanks to bottles and Thiruvadi Rajaraman + +commit d1211659f39e0795af7ef1c83f72356dae239e3d +Author: Niels Baggesen +Date: Thu Oct 19 21:04:34 2017 +0200 + + Augment mib-II.h for DragonflyBSD 5.0 + +commit d4278ee5b2ac069380d690d3a64e9690dc0b1ed6 +Author: Niels Baggesen +Date: Tue Sep 19 05:37:43 2017 +0200 + + rfclist: add RFC 8173 PTPBASE-MIB + +commit 8e4977513f45e5274e0fe75b1864c94c0a9b3eba +Author: Niels Baggesen +Date: Tue Sep 19 05:36:30 2017 +0200 + + snmptable, snmpnetstat: fix complaints from gcc -fsanitize=address + +commit 30694e0470ab3f6d4524dd106eb2d8195a84b518 +Author: Bart Van Assche +Date: Sat Aug 26 16:48:50 2017 -0700 + + DISMAN-PING-MIB: Initialize 'sndbuf' before using it + + This was detected by gcc. + +commit 8cace1bb6088e238d1c88b209875e403ddec1f0d +Author: Bart Van Assche +Date: Tue Aug 15 20:35:50 2017 -0700 + + snmpd, snmptrapd: Declare option strings as static const char [] + + This patch does not change any functionality. + +commit 4897ddcbe9fd16884809c37fc4ffee82469cc297 +Author: Bill Fenner +Date: Sat Jul 29 19:41:54 2017 -0700 + + CHANGES: snmptrapd: BUG: 2782: from "Josef Ridky": fix linking with MariaDB/MySQL + +commit 60c9996efe07dad51d7712eda7c5174b476eab5f +Author: Bill Fenner +Date: Mon Jul 17 06:15:47 2017 -0700 + + NEWS: snmplib: BUG: 2592: from Stuart Kendrick - increase MAXTC to 16384 + +commit aa978fddfeb8fa02efca10ae1fbad2bcd3fb8ebc +Author: Bart Van Assche +Date: Tue Jul 11 07:33:47 2017 -0700 + + Win32: Fix sh_count_procs() + + See also commit 9b9c0e287b4d ("MIBs: Use asprintf() instead of snprintf() to prevent truncation"). + +commit 2c79a264d721ab11d51e2056d50dc3eb89069026 +Author: Bart Van Assche +Date: Tue Jul 11 20:16:41 2017 -0700 + + Win32: Unbreak MSVC build + + See also commit ad50133f2c5a ("snmplib: Add asprintf()"). + +commit 0ab4a9f4aa5b9f4470549fdd9a09e03fa525d9ba +Author: Bart Van Assche +Date: Tue Jul 11 06:40:54 2017 -0700 + + CHANGES: BUG: 2789: MinGW: Use closesocket() instead of close() + +commit 15a2435e4db0ac9d44135dfa8a5fbf1b8b7391d8 +Author: Niels Baggesen +Date: Tue Jun 13 08:44:06 2017 +0200 + + Fix counters for 10Gb interfaces on FreeBSD. + + Fixes bug 2741. Patch from Andrey V. Elsukov forwarded by Ryan Steinmetz. + +commit 89ba4945bc31abc0b2a153cca1228a4aac081a4f +Author: Niels Baggesen +Date: Tue Jun 13 08:43:12 2017 +0200 + + regenerated net-snmp-config.h.in + +commit 452ccd8dee92ce021c3828bec01e95720ff016b3 +Author: Niels Baggesen +Date: Tue Jun 13 08:36:09 2017 +0200 + + rfclist: add 7697 and 8150. + +commit 65128febb24bddb39061e2d06993c8449e37860e +Author: Bill Fenner +Date: Tue May 30 14:13:34 2017 -0700 + + Allow clients to use reqid zero + + Some of 9bce2c9519a0551ee0c82ac4706fd9f3f875feab got lost + when merging it to master. Re-apply the changes to handle + snmp_*send() returning 1 when successfully sending a PDU + with reqid 0. + +commit a4f683068e48fe70430d95a8ec26ff7395530893 +Author: Bill Fenner +Date: Tue May 30 13:53:08 2017 -0700 + + python bindings require netsnmp_malloc and _free + + aeb0116b introduced use of netsnmp_malloc and _free, so + require these features. + +commit e819b1689d3c67586cf1bd3b5f19cca880ba3ba4 +Author: Bill Fenner +Date: Tue May 30 13:50:38 2017 -0700 + + register_const_config_handler is not optional + + snmp_enum.c, which is not optional, calls register_const_config_handler, + so it is also not optional. + +commit b5233965343d4c9347cb45cdca442361396e4224 +Author: Niels Baggesen +Date: Mon May 29 21:46:53 2017 +0200 + + ipaddress_solaris2.c: Fix an ipv6 memory leak. Fixes bug 2783. Thanks to lijo. + +commit 93c8f127c72f5691834c7e8b1849015b655fb228 +Author: Niels Baggesen +Date: Tue May 23 07:58:49 2017 +0200 + + swinst_rpm: Update to use headerGet when available, in place of the long deprecated headerGetEntry. + +commit 78a18abf05b755804a4f4403b8f26effbeafdc79 +Author: Niels Baggesen +Date: Tue May 23 07:37:27 2017 +0200 + + swintst_rpm: Protect against unspecified Group name. Fixes bug 2780. + +commit eb3bdab6391a8cae9dc1d2fe77a97708a2c46e99 +Author: Bart Van Assche +Date: Sun May 14 19:23:01 2017 -0700 + + Python bindings: Use a table to make the type conversion code more compact + + This patch does not change any functionality. + +commit fb12aad657782014e409e31d53770cc4f77333f1 +Author: Bart Van Assche +Date: Sun May 14 19:24:13 2017 -0700 + + Python bindings: Constify __translate_appl_type() argument + +commit 6f29a6aa6751fe372d48cf8f6e1d8b6c0b7199af +Author: Bart Van Assche +Date: Sun May 14 18:53:44 2017 -0700 + + Python bindings: Make __sprint_num_objid() enlarge the output buffer if necessary + +commit fda5f4567a0e86a2227cfa629951b8c62ab52283 +Author: Bart Van Assche +Date: Sun May 14 18:43:57 2017 -0700 + + Python bindings: Use the ANSI C function definition syntax + +commit 097acfcd83c47b44adffd6637cf3e8e0827f5abb +Author: Bart Van Assche +Date: Sun May 14 18:37:51 2017 -0700 + + Python bindings: Inline SAFE_FREE() + + ANSI C allows to pass a NULL pointer to free(). Hence change + SAFE_FREE() invocations into free(). + +commit c2a26b5fe505133d88a17a8562026261f04a394d +Author: Bart Van Assche +Date: Sun May 14 18:35:54 2017 -0700 + + Python bindings: Remove the macro DBPRT() because unused + +commit 368636fd94e484a5f4be5c0fcd205f507463412a +Author: Bill Fenner +Date: Sun May 14 13:55:23 2017 -0700 + + Ignore snmppcap + +commit 6530b948b15057ee74475281f96fe00d757be53c +Author: Bill Fenner +Date: Thu May 11 15:32:34 2017 -0700 + + Fix special handling of tcpInErrs and tcpOutRsts + + Teach the new /proc/net/snmp parser about the special + tcpInErrsValid and tcpOutRstsValid attributes, which + are set only if these values were present in the file. + If the *Valid attributes are not set, the scalars are + not served, even if there are nonzero values in them. + +commit b009ac9037e37566f78afab4a094d3b72f732846 +Author: Bart Van Assche +Date: Wed May 10 20:13:26 2017 -0700 + + Python bindings: Allow __snprint_value() to resize the output buffer for more data types + +commit 3ba02b2af206fbe56ef73fe4ec10c651b6facfab +Author: Robert Minsk +Date: Wed Feb 8 11:39:18 2017 -0800 + + Python bindings: Allow __snprint_value to resize buffer + + [bvanassche: Restored code for '\0'-termination of __snprint_value() output] + +commit aeb0116b7d2c069eabc1fa6339ce150efca9212c +Author: Robert Minsk +Date: Mon Feb 6 17:59:29 2017 -0800 + + Python bindings: Avoid truncation of strings + + See also https://sourceforge.net/p/net-snmp/code/merge-requests/8/. + + [ bvanassche: Removed code for '\0'-terminating strings that were already + '\0'-terminated ] + +commit 71e669ba82668eee51295afbcef9f8db4cfb77ff +Author: Niels Baggesen +Date: Tue May 9 14:29:34 2017 +0200 + + snmplib/asprintf.c: The argument list must also be changed when changing + the function from realloc to malloc. + +commit 7d7bfe6d0fd8afae0a6c85f1fb5c6f36873328c9 +Author: Niels Baggesen +Date: Tue May 9 14:28:47 2017 +0200 + + snmplib/asprintf.c: Some systems still have __va_copy, not va_copy. + +commit df8d86164aebdfacf2b7e8f02b8eb5d74db30c77 +Author: Bart Van Assche +Date: Sun May 7 20:00:25 2017 -0700 + + snmpd: Fix a copy-paste error + + Detected by Coverity. + +commit a5ba31ed29586fe224ef153cff465dd9db80ef98 +Author: Bart Van Assche +Date: Sun May 7 19:58:48 2017 -0700 + + snmplib: Use strlcpy() instead of strcpy() to copy a variable-length string into a fixed-size array + +commit 97da169eeab8511786a34883abc956df81aef743 +Author: Bart Van Assche +Date: Sun May 7 19:55:34 2017 -0700 + + snmplib/snmptsm: Remove dead code + + The pointer to the first element of an array is never NULL. Hence + remove a check that compares an array pointer against NULL. Detected + by Coverity. + +commit 71107f561c1cf3cfe0c6a915c3163ed2f19895b1 +Author: Bart Van Assche +Date: Sun May 7 19:53:51 2017 -0700 + + snmptrapd: Pass a positive integer to setuid() + + Detected by Coverity. + +commit b3cbf1f383619eaa14b62a7536304824a91be274 +Author: Bart Van Assche +Date: Sun May 7 19:36:01 2017 -0700 + + MIB-II: Fix an out-of-bounds array access + + Detected by Coverity. + +commit 0fa0ad1624c8fe2ae2fc7d4a7b0332ea5f910793 +Author: Bart Van Assche +Date: Sun May 7 19:29:42 2017 -0700 + + snmplib, callback mechanism: Enlarge MAX_CALLBACK_SUBIDS + + The largest callback ID defined in + include/net-snmp/agent/agent_callbacks.h is 16. Make sure it fits + in the thecallbacks[][] array. Spotted by Coverity. + +commit f585363fadfe7d965e2232560e2db227bb251cdd +Author: Bart Van Assche +Date: Sun May 7 19:28:05 2017 -0700 + + snmp_unregister_callback(): Check arguments before using these + + Spotted by Coverity. + +commit b0c18a5315f0d5a14505a0864e755c5a70b60a1e +Author: Bart Van Assche +Date: Sun May 7 19:19:31 2017 -0700 + + snmplib, netsnmp_strdup_and_null(): Simplify this function + + Although the implementation of this function looks correct to me, + Coverity did not recognize that the else-part NUL-terminates the + result string. Hence simplify the code and make it easier to analyze. + +commit 54454a549beaea5e2a4dfefa8db44f1106965baf +Author: Bart Van Assche +Date: Fri May 5 21:34:22 2017 -0700 + + snmplib, container: Avoid dereferencing a NULL pointer + + Detected by Coverity. + +commit b906c60c8a436d7360267a6d242526b33a9aaac8 +Author: Bart Van Assche +Date: Sun May 7 16:39:59 2017 -0700 + + apps/snmpusm: Only provide a DH_get0_key() replacement if openssl is available + +commit e4c6937483d4a680570cec05388d2e4b291868a6 +Author: Bart Van Assche +Date: Fri May 5 22:00:20 2017 -0700 + + MIBs: Use strlcpy() instead of strcpy() to copy a variable-length string into a fixed-size array + +commit 3041b6718642e7834cd7c749d56ac862e79352c9 +Author: Bart Van Assche +Date: Fri May 5 21:29:35 2017 -0700 + + snmplib, asn_parse_objid(): Remove a superfluous check + + Checking a pointer after it has been dereferenced is not useful, + hence remove the pointer check. Detected by Coverity. + +commit b59639a940f6e09590a4a58cfcca6bc696223824 +Author: Bart Van Assche +Date: Fri May 5 20:11:06 2017 -0700 + + Fix yet another use-after-free issue in an error path + + This was detected by Coverity. + +commit 11930128aafeab8d3b92a473c0388d44f317ab11 +Author: Bart Van Assche +Date: Fri May 5 20:15:15 2017 -0700 + + snmplib, ctime_to_timet(): Initialize tm_isdst + + Spotted by Coverity. + +commit 565f61ad8a254735fd23f68daa58bb4644838712 +Author: Bart Van Assche +Date: Fri May 5 20:11:06 2017 -0700 + + Fix use-after-free issues in error paths reported by Coverity + +commit 45b14f460f9f6a5c8043f8e1eee90a5696d89060 +Author: Bart Van Assche +Date: Fri May 5 20:00:24 2017 -0700 + + ucd-snmp/dlmod: Fix a recently introduced use-after-free + + Avoid that 'tmppath' is used after having been freed. This was + detected by Coverity. + +commit 4984f7456aa0788b1bf18c0b890e199a27574921 +Author: Bart Van Assche +Date: Thu May 4 18:42:50 2017 -0700 + + apps/snmpusm: Only provide a DH_get0_pqg() replacement if openssl is available + +commit 185539c4360fddf7f569dda79e21d0fedef042d4 +Author: Bart Van Assche +Date: Thu May 4 18:13:04 2017 -0700 + + snmplib, asprintf(): Make behavior conformant with glibc and FreeBSD + + Use malloc() internally instead of realloc(). Clear the pointer + to the output string if memory allocation fails. See also + https://www.freebsd.org/cgi/man.cgi?query=asprintf + +commit f1b6e016e2fd76770dd1ecbc2f9d7bbbf7052ce1 +Author: Bart Van Assche +Date: Tue May 2 18:02:49 2017 -0700 + + apps/snmppcap.c: Fix a compiler warning + + Change the type of the 'reqid' argument from unsigned int into int. + +commit 673f81051d58b7045eb9a38201eeaba878eebf3d +Author: Bart Van Assche +Date: Mon Apr 17 18:56:00 2017 -0700 + + snmplib, SNMPv3: Fix two memory leaks in netsnmp_parse_args() + + These were detected by Valgrind. + +commit 9b9c0e287b4dd4619da3e3ca80e1832dc1c81699 +Author: Bart Van Assche +Date: Sun Apr 16 19:19:51 2017 +0200 + + MIBs: Use asprintf() instead of snprintf() to prevent truncation + + This patch addresses most gcc 7 warnings about output buffer truncation. + +commit 6168fbae0c80d82f664864335206820091cec2b0 +Author: Bart Van Assche +Date: Sun Apr 16 18:42:49 2017 +0200 + + DISMAN-MIB, traceroute: Allocate error string dynamically + +commit 63ee31079d838b4ffc60cfadab124612b83e945b +Author: Bart Van Assche +Date: Sun Apr 16 18:40:11 2017 +0200 + + MIB-II, sendmail: Allocate paths dynamically + + This patch avoids path truncation. + +commit 632acaf38228f795e37e2d3e5edaedae4d8b3356 +Author: Bart Van Assche +Date: Sun Apr 16 18:21:25 2017 +0200 + + snmplib: Fix the code for generating a parser error string + + Avoid that the error string gets truncated to the number of + characters that corresponds to the size of a pointer. This patch + fixes a bug introduced through commit 56064b8a53da and that was + detected by gcc 7. + +commit ad50133f2c5a83e3d821b5a11c42b1114367500e +Author: Bart Van Assche +Date: Sun Apr 16 09:03:20 2017 -0700 + + snmplib: Add asprintf() + + Add an asprintf() implementation for the platforms that do not provide + asprintf() through their C library. + +commit 44f91ac3982b17854d567287375b6df4e344025b +Author: Bart Van Assche +Date: Sun Apr 16 18:24:32 2017 +0200 + + snmplib: Annotate fallthroughs such that gcc 7 can recognize these + +commit 7cf96da14c179e26768eeb73aaa81de1fa5d966f +Author: Bart Van Assche +Date: Sun Apr 16 17:37:59 2017 +0200 + + DISMAN-MIB: Initialize 'name' properly + + Initialize all elements of name[] instead of only MAX_OID_LEN / sizeof(oid) + elements. This was detected by gcc 7. + +commit 0b85614310a966dfce97c9a63b7f6b5ae22f1d0b +Author: Bart Van Assche +Date: Sun Apr 16 18:28:32 2017 +0200 + + snmplib: Avoid that gcc warns about a variable being set but not used + +commit 739a768d3e898ce83c2b06a3b772783510166583 +Author: Bill Fenner +Date: Tue May 2 10:59:27 2017 -0700 + + Rearchitect snmppcap so that it uses public APIs + + Use a funny series of callbacks and a fake file descriptor + to allow snmppcap to read from the pcap "transport". + +commit ac6683caae8110ccf668eb704a0448660447d33d +Author: Magnus Fromreide +Date: Fri Sep 25 18:50:54 2015 +0200 + + Add a fourth value to the oid list, the raw data of the value. + + The point of this is to provide the value directly, avoiding having to force + clients to guess what the value was. + The type of the parameter depends on the type tag in [2], according to the + following: + INTEGER + Signed integer + OCTET STRING, Opaque, BITS, IpAddress, Counter64, I64, U64, C64 + String + Counter, Gauge, TimeTicks, UInteger + Unsigned integer + OBJECT IDENTIFIER + NetSNMP::OID + NULL, anything else + undef + +commit c8ba362f9e2b3d57de7942d7c7f11c12a9184fc0 +Author: Magnus Fromreide +Date: Fri Sep 25 18:39:30 2015 +0200 + + Factor out the construction of OID objects to a separate function. + +commit 0b5fe83e17eed871fd6e812012df57eed48b7a5a +Author: Niels Baggesen +Date: Tue Apr 18 19:32:06 2017 +0200 + + RFC 8096 updates to deprecate IPV6 mibs. + +commit 014a706642d8f44f9ef00f561141fdf7e5c6f476 +Author: Niels Baggesen +Date: Tue Apr 18 19:30:56 2017 +0200 + + Update to current version of IANAifType-MIB. + +commit c3fb39cfe7f3ef9333cf9f107719af7f03af584a +Author: Niels Baggesen +Date: Thu Apr 13 12:08:10 2017 +0200 + + Fix snmpd -v to exit after displaying version info. + +commit 5adf9eeac9b18269a4af302e0ca1884e83507306 +Author: Niels Baggesen +Date: Thu Apr 13 11:42:34 2017 +0200 + + Patch 1340, thanks to John Baldwin. + + Always pass a valid flag to getfsstat on *BSD. + +commit 33de26829121dfa64aa4ddff6ff7977030b57691 +Author: Niels Baggesen +Date: Thu Apr 13 11:26:48 2017 +0200 + + Patch 1327, Thanks to Elan Ruusamäe. + + Improvements to HOST-RESOURCES-MIB::hrSWInstalled on debian systems + + - add Install Date information instead of bogus 0-1-1 + - include Arch in package names, like rpm output does + - use debian native separators `_` for package components, not rpm ones: `-` + + to test: + snmpbulkwalk localhost HOST-RESOURCES-MIB::hrSWInstalled + +commit d072d7f84f11c4c798c26f5d2b50d4082ec9049c +Author: Niels Baggesen +Date: Thu Apr 13 11:23:09 2017 +0200 + + swinst_apt.c: Fix indexing of hrSWInstalledTable to start from 1. + + Fixes bug 2770. Thanks to Edward Hu for reporting. + +commit 6d4988075ef12b327d32b34b7888d7c7deeb69e8 +Author: Niels Baggesen +Date: Wed Apr 12 14:28:27 2017 +0200 + + Re-enable implicit-fallthrugh warning for gcc7. + +commit 91046bab5a8916610e23c4b829945cdfdd49c203 +Author: Niels Baggesen +Date: Wed Apr 12 14:27:21 2017 +0200 + + Fix up FALL THRU annotations for gcc7 + +commit fdea26d1057bd67f0d6cdca65cd5761006fc777a +Author: Bart Van Assche +Date: Sun Apr 9 21:05:18 2017 -0700 + + gcc 7: Add -Wno-implicit-fallthrough + + Apparently gcc 7 does not recognize the fallthrough annotations in + the Net-SNMP source code. Hence disable compiler warnings about + implicit fallthrough. + +commit 0657b90b7181fd95970d14949b3486e0290b87db +Author: Bart Van Assche +Date: Sun Mar 26 21:01:15 2017 -0700 + + Cygwin, scapi.h: Fix build + + Recent versions of the Cygwin openssl header files and + are incompatible because both define X509_NAME unless OPENSSL_SYS_WIN32 + is defined. Hence avoid including openssl header files in source files + that include . + +commit 9641b472ef01208f92631016e91b0a4a518163f0 +Author: Bart Van Assche +Date: Sun Apr 9 19:52:20 2017 -0700 + + openssl 1.1.0: Fix several build errors + + Autodetect DH_get0_pqg() and DH_get0_key() to unbreak the MinGW build. + + In recent versions of openssl several data structures have been made + opaque that were not opaque before. Avoid that attempts to access + members of these opaque data structures cause the build to fail. + +commit e3bd88398c8744b6761f09bc7722e2faddadc361 +Author: Bart Van Assche +Date: Sun Apr 9 16:14:30 2017 -0700 + + MinGW: Fix build + + The Microsoft header files define PMIB_IPFORWARDROW as a pointer to + struct _MIB_IPFORWARDROW. Recent MinGW header files define the same + type as a pointer to struct MIB_IPFORWARDROW. Avoid that this + difference causes the build to fail. + +commit b27c12660585e48d7cad7356f3c04e6210ff40b7 +Author: Bart Van Assche +Date: Sun Apr 9 19:36:37 2017 -0700 + + Win32, MSVC: Provide a definition of NETSNMP_ATTRIBUTE_DEPRECATED + + See also commit 06bfd94bc005. + +commit d44dc93940bdcfd0ef6c0ae0bbc0eaa6685d255c +Author: Bart Van Assche +Date: Mon Apr 3 07:37:49 2017 -0700 + + python, test.py: Split unit tests + + Additionally, automate checking of the test results. + +commit 975699d4d13f7476fa41f57522241e43a8114c9a +Author: Bart Van Assche +Date: Fri Mar 31 20:18:07 2017 -0700 + + python, test.py: Make snmpd port configurable + + Send SNMP requests to localhost:${SNMP_SNMPD_PORT:-161}. + +commit a3d28340ff7db9876ef38176eeddcea423a06a35 +Author: Bart Van Assche +Date: Fri Mar 31 20:25:28 2017 -0700 + + python, test.py: Avoid that pylint complains about lines that are too long + +commit af48afd40c8592310aa5550c2b42266896eff949 +Author: Bart Van Assche +Date: Fri Mar 31 20:24:44 2017 -0700 + + python, test.py: Add class and method docstrings + +commit f62913a91261c1c205a08ffe676f660d5c3c2998 +Author: Bart Van Assche +Date: Fri Mar 31 20:22:25 2017 -0700 + + python, test.py: Avoid using the keyword "vars" as a variable name + +commit 6a227a06215a57d755f7a479d34a13e91eb98f2c +Author: Bart Van Assche +Date: Fri Mar 31 20:20:17 2017 -0700 + + python, test.py: Remove unused imports + +commit 1f2c92d3b67dd57a1ec0adf19012946cf22d8688 +Author: Bart Van Assche +Date: Fri Mar 31 19:42:37 2017 -0700 + + python, test.py: Fix pylint warnings about the use of whitespace + +commit da6836234d6fde353d5a2cc6427f3172a416771e +Author: Bart Van Assche +Date: Sat Apr 1 19:38:50 2017 -0700 + + python, client.py: Add __str__() methods + + This makes the output of str() more meaningful for the classes defined + in client.py. + +commit b2ce7bedd92c77923a686113af66a87b60e97f94 +Author: Bart Van Assche +Date: Sat Apr 1 19:48:26 2017 -0700 + + python, client.py: Remove superfluous semicolons + +commit 9133c091647ad8acd059afaa00d6fa3ccb1317cf +Author: Bart Van Assche +Date: Sat Apr 1 19:47:50 2017 -0700 + + python, client.py: Avoid using keywords as variable names + +commit a0720d44c709c6fee1de71da764d82c672651a9c +Author: Bart Van Assche +Date: Sat Apr 1 19:46:30 2017 -0700 + + python, client.py: Use the recommended style for comparing against None + +commit 6da39c460f621b6e8ba1ff343db5355a0ceaa97a +Author: Bart Van Assche +Date: Sat Apr 1 19:44:42 2017 -0700 + + python, client.py: Fix pylint warnings about import statements + +commit b6d6d81a794d7c4a1d1d8dfc832a59fa24c75786 +Author: Bart Van Assche +Date: Sat Apr 1 19:42:37 2017 -0700 + + python, client.py: Fix pylint warnings about whitespace + +commit ef1572659652335e4d5da925a85d70eb7a306f3c +Author: Bart Van Assche +Date: Sun Apr 2 09:20:33 2017 -0700 + + snmplib: Remove snmp_session.remote_port assignments + +commit 06bfd94bc00509146e84752065bd2669fc3bc828 +Author: Bart Van Assche +Date: Sun Apr 2 09:03:40 2017 -0700 + + snmplib: Mark snmp_session.remote_port as deprecated + + Ensure that the compiler issues a warning if a value is assigned to + remote_port. This member has been deprecated a long time ago. + +commit 0336d11e91e345e65fe6101ae6242568984b479a +Author: Bart Van Assche +Date: Sun Apr 2 09:37:20 2017 -0700 + + Fix a recently introduced init_usmDHParameters() crash + + The pointer of which the address is passed to BN_hex2bn() must be + initialized. See also commit 14bb72fd12bf. + +commit 14bb72fd12bf5b68662893f7d8afbc4a8d52a6c8 +Author: Niels Baggesen +Date: Sat Apr 1 07:55:47 2017 +0200 + + OpenSSL 1.1 fixes for SNMP-USM-DH-OBJECTS-MIB implementation. + +commit 17b6ff76e8bb51d55a73993de7e0560b94f85f8d +Author: Robert Minsk +Date: Thu Feb 9 16:00:04 2017 -0800 + + Python getnext method was allocating the return value twice + +commit 1cea00031cf964eee735888c81c00138bf3c807d +Author: Bart Van Assche +Date: Sun Mar 26 14:43:44 2017 -0700 + + apps/snmpusm: Fix recently introduced compiler warnings + + Avoid that the compiler warns about passing BIGNUM ** to a function + that accepts const BIGNUM **. See also commit bbed6b86e70b5. + +commit 53002bc8e1eba1c7c92530586481f980a07617af +Author: Bart Van Assche +Date: Wed Dec 10 09:37:31 2014 +0100 + + Fix C language preprocessor directives + + The directive '#warn' is not a valid gcc preprocessor directive but + '#warning' is. Hence change '#warn' into '#warning'. See also + https://gcc.gnu.org/onlinedocs/cpp/Diagnostics.html. + +commit 142c4239771c6282d66a553d5692037c251a2f90 +Author: Bart Van Assche +Date: Thu Mar 23 21:09:55 2017 -0400 + + MIB-II: Fix /proc/net/snmp parser + + This commit fixes bug 2764 (https://sourceforge.net/p/net-snmp/bugs/2764/). + +commit bbed6b86e70b5a3c54f14992696f2308a8d79511 +Author: Niels Baggesen +Date: Wed Mar 22 14:49:06 2017 +0100 + + Initial support for OpenSSL 1.1 API changes. A slightly modified version from + patch 1336, updated to work if you have LibreSSL. + + There is more work needed to handle TLSTCP and DTLSUDP transports. + + Thanks to Sharmila Podury. + +commit d5b10831e7153fe7e030e60a025058e46cb40439 +Author: Bart Van Assche +Date: Sat Mar 18 16:09:16 2017 -0700 + + ucd-snmp: Include if available + + Avoid that the following warning is reported: + + ucd-snmp/diskio.c:445:13: warning: In the GNU C Library, "major" is defined + by . For historical compatibility, it is + currently defined by as well, but we plan to + remove this soon. To use "major", include + directly. If you did not intend to use a system-defined macro + "major", you should undefine it after including . + +commit 8c98bab640d047660e6a5d325a735d538748b56e +Author: Bart Van Assche +Date: Sat Mar 18 15:53:06 2017 -0700 + + unit test T008asn1: Add more test cases for decoding unsigned integers + +commit 639d172c31c8fa9ce7f8ed52a484599a9e23cd7b +Author: Bart Van Assche +Date: Sat Mar 18 15:59:55 2017 -0700 + + CHANGES: snmplib: BUG: 2768: Fix decoding of unsigned integers + + See also https://sourceforge.net/p/net-snmp/bugs/2768/. + +commit c22a25f34472d49f156760a006118e620aa44514 +Author: Wes Hardaker +Date: Thu Feb 23 06:51:11 2017 -0800 + + CHANGES: python: patch from David Hankins to fix python binding error codes + +commit ba253b629620bca4bbcc686d2388dda49962bdcb +Author: Bart Van Assche +Date: Fri Jan 27 20:10:46 2017 -0800 + + testing/check_for_pskill: Change shell from bash into sh + + /bin/sh is always available on Unix but /bin/bash not. + +commit d4527b786e3e42f18be4e7ededa89a2ff71e04be +Author: Bart Van Assche +Date: Thu Dec 15 10:33:58 2016 +0100 + + apps/sshtosnmp: Avoid that the compiler warns about an empty body in an if-statement + +commit 359b795ca57829c139eaf6e84ea9256c460bc48b +Author: Niels Baggesen +Date: Fri Jan 27 22:31:50 2017 +0100 + + swinst:pkginfo: memory leak fix from bug 2760. + +commit ae23f05669560a565ef6cb9734586163da0fb97b +Author: Niels Baggesen +Date: Fri Jan 27 22:28:45 2017 +0100 + + ipaddress_solaris.c: memory leak fix from bug 2760. + +commit 024faf415a4474a67a05638f34f6257e4e918746 +Author: Niels Baggesen +Date: Fri Jan 27 22:11:13 2017 +0100 + + Remove superfluous prototype from ip-mib/data_access/ipaddress.h + (causing troubleson BSD) + +commit a77b1edecc512197eecedda385c2073be91cadde +Author: Magnus Fromreide +Date: Thu Jan 5 17:47:32 2017 +0100 + + Reduce stack usage + + Extract the outsized variable 'buffer' from the recursive _get_realloc_symbol + function into a separate function in order to save stack space + +commit 962a38f4dffb9ae52843e1ac18e74b65e5fb3486 +Author: Magnus Fromreide +Date: Thu Jan 5 17:31:53 2017 +0100 + + Do not presume that srcdir equals the current working directory. + +commit 479c0b9edeae47dfe713c585f75d04428f5e84c3 +Author: Niels Baggesen +Date: Tue Dec 13 23:06:03 2016 +0100 + + Fix reference to interface-private.h from ipaddress_sysctl.c + +commit 6650697f7b8ddd86ffa6849dc63ee5f088896714 +Author: Bart Van Assche +Date: Tue Dec 13 17:28:43 2016 +0100 + + apps/snmpps: Use ncurses header file when linking with ncurses library + + This avoids that e.g. on an AIX system the compiler warns that no + prototype is available for clear(). + +commit fd41dd00c977015f825a1c4445ceab36dc35fa77 +Author: Bart Van Assche +Date: Tue Dec 13 07:25:37 2016 +0100 + + snmplib/Makefile.in: Add netsnmp-attribute-format.h to INCLUDESUBDIRHEADERS + +commit 273fda3251e9a0fdfb1dad30344ea58ba68864e8 +Author: Bart Van Assche +Date: Tue Dec 13 07:24:15 2016 +0100 + + snmplib/Makefile.in: Sort filenames alphabetically + +commit 58816e051882ef852754901cd294b52f281cdc38 +Author: Bart Van Assche +Date: Sat Dec 3 21:06:54 2016 -0800 + + snmplib: Remove redundant NETSNMP_IMPORT + + Specifying NETSNMP_IMPORT is only necessary in header files but not + in .c files. + +commit a31eaccdda704c309564ff2df81ab1ef1401b7a1 +Author: Bart Van Assche +Date: Fri Dec 2 21:31:33 2016 -0800 + + Move more declarations of global functions and variables from .c to .h + +commit 0161ba65e2e7573dd9d46a8e40c8c7044215ea28 +Author: Bart Van Assche +Date: Sat Dec 3 20:37:26 2016 -0800 + + Convert to ANSI C syntax + +commit 81b65f4d23a976d2106bbfc2262694c1c90f457c +Author: Bart Van Assche +Date: Fri Dec 2 21:31:33 2016 -0800 + + Move declarations of global functions and variables from .c to .h + + This allows the compiler to verify consistency of variable and function + declarations for variables and functions that are used in more than one + file. + +commit 09a42c954593f70a09cc1b1925dde40891b0ac0b +Author: Bart Van Assche +Date: Sat Dec 10 12:10:46 2016 -0800 + + HOST-RESOURCES-MIB: Provide Mark_HRSW_token() and Release_HRSW_token() as functions + + This patch does not change any functionality. + +commit 8faa636e683c0bdcf3ad79b13ee04b3c130fc189 +Author: Bart Van Assche +Date: Sat Dec 3 20:12:21 2016 -0800 + + Comment out unused functions + + 'grep' shows that these functions are not called from the Net-SNMP + code base. + +commit f765ebd62045e337becef857c8d766a19ab1d132 +Author: Bart Van Assche +Date: Thu Dec 8 20:35:35 2016 -0800 + + Add -Wno-sign-compare to developer flags + +commit 87caf2bd7725fc8ae222c5b1d21730a15bbc6cea +Author: Bart Van Assche +Date: Thu Dec 8 20:53:34 2016 -0800 + + DISMAN-EVENT-MIB: Add missing parentheses + + Detected by sparse. + +commit 98c76567bc3f03c9913e50d1012e4223416a5b17 +Author: Bart Van Assche +Date: Thu Dec 8 20:56:04 2016 -0800 + + DISMAN-EVENT-MIB: Fix a syntax error + + See also commit 20ea4ec72672. + +commit 29e1d97403004adab0d9daec6c7aa59696367c3f +Author: Bart Van Assche +Date: Sun Dec 4 20:28:45 2016 -0800 + + agent/mibgroup/disman/traceroute/traceRouteCtlTable.h: Remove an unused declaration + +commit 6257dce9d5ca327265031b5d300370cd23d2ab17 +Author: Bart Van Assche +Date: Sat Dec 3 20:37:26 2016 -0800 + + Convert to ANSI C syntax + +commit ac918c1a98c5954f8089d28b3020874e77d94d9b +Author: Bart Van Assche +Date: Sat Dec 3 20:09:33 2016 -0800 + + pingCtlTable: Move two global variable definitions from .h to .c + +commit 38ab13fe1780f1fa24e9af23250c477074d421dc +Author: Bart Van Assche +Date: Tue Nov 8 22:37:53 2016 -0800 + + Remove unused variables + +commit de71e73e8aafeed3e98f84828b486360a5f38eba +Author: Bart Van Assche +Date: Fri Nov 11 18:47:53 2016 -0800 + + snmplib: Change the type of the second arg of se_read_conf() into const char * + + This allows to remove two NETSNMP_REMOVE_CONST() casts. + +commit dfd4493517431b4a0323199a65bb472e2afa5eac +Author: Bart Van Assche +Date: Tue Nov 8 22:39:54 2016 -0800 + + snmplib: Use logical or for booleans + +commit ae05eb5ad3bcdbff132665fcc556d858feb5937b +Author: Bart Van Assche +Date: Tue Nov 8 22:34:45 2016 -0800 + + Use NULL instead of 0 to represent a pointer + +commit c28ed52d23cd784cadbacbacff8230d1a2255962 +Author: Bart Van Assche +Date: Sun Dec 4 09:40:47 2016 -0800 + + Remove Emacs local variables + + Anyone who is using emacs should use dir-locals-set-class-variables + and dir-locals-set-directory-class in the emacs startup file instead + of adding local variables to every source file. + +commit d89ec41819909b2bb80d78abeae748ae8d62bebf +Author: Bart Van Assche +Date: Sun Dec 4 10:00:30 2016 -0800 + + SNMP-NOTIFICATION-MIB: Remove extraneous whitespace + +commit ffeaee67b287e034727c8aa828ed36092662a169 +Author: Robert Story +Date: Thu Dec 8 22:45:58 2016 -0500 + + version update for 5.4.5.pre2 + +commit 03984951b674e74687fff6f3df1b9978f4041794 +Author: Robert Story +Date: Thu Dec 8 22:42:53 2016 -0500 + + version update for 5.4.5.pre2 + +commit 24ab33a0a0798748957669cde374907ce5f37984 +Author: Robert Story +Date: Thu Dec 8 22:41:09 2016 -0500 + + make depend for 5.4.5.pre2 + +commit 78d42b4e3b9eac40759da601327a053eaaf3b967 +Author: Robert Story +Date: Thu Dec 8 22:28:11 2016 -0500 + + documentation update for 5.4.5.pre2 + +commit 0c32eea3e292a948d6973d4cb8df57e338fe3362 +Author: Robert Story +Date: Thu Dec 8 22:27:06 2016 -0500 + + Version number update: 5.4.5.pre2 + +commit 75e89633833446f48bbe016c155febcf3edaa72f +Author: Robert Story +Date: Thu Dec 8 22:23:18 2016 -0500 + + configure option to disable U64 typedef + +commit 0a0c5d02332023a212590e7d890b71d9fdcfbdbc +Author: Robert Story +Date: Sat Dec 3 22:30:30 2016 -0500 + + fix more printf format errors + +commit b153106a68f8ca28b961da1961ce7b4e50aa297e +Author: Niels Baggesen +Date: Thu Dec 8 06:58:53 2016 +0100 + + Add diskIOBusyTime to the UCD-DISKIO-MIB. + +commit 932645e8137a0ce4c8300303f4277ccdf809ffa6 +Author: Niels Baggesen +Date: Thu Dec 8 06:57:28 2016 +0100 + + Fix speling error in man page. + +commit 52a73dee0452559e2f6608dbeb343c661b7b5efa +Author: Niels Baggesen +Date: Thu Dec 8 06:55:36 2016 +0100 + + Fix the ifdefs around IP_RECVDSTADDR that some earlier patch broke. + +commit 09292500ae82331242da585fc748fdff5490a5ae +Author: Niels Baggesen +Date: Wed Dec 7 14:43:42 2016 +0100 + + Not all current OSes have compilers that support all developer flags. Validate them! + +commit 666920125cd261db9e5ae58f46fbb66ae7461e8c +Author: Bart Van Assche +Date: Sat Nov 5 18:09:29 2016 -0700 + + ETHERLIKE-MIB: Avoid that the compiler warns about freeing a const pointer + + See also commit ed4e48b5fab1. + +commit 1ae6ffa01c459cb82b63f2cd0b0a96f077091553 +Author: Bart Van Assche +Date: Sun May 17 10:46:56 2015 +0200 + + new DISMAN EXPRESSION MIB: Fix two compiler warnings + +commit 74dad55e7fcb50508af88bb6a68367d4ed42453f +Author: Robert Story +Date: Tue Nov 8 13:40:11 2016 -0500 + + fix compiler warnings + +commit e905cd373e784b03fbc4e6311fa2cd93705980bb +Author: Bart Van Assche +Date: Sat May 23 11:40:50 2015 +0200 + + snmplib, snmp_openssl: Add missing braces + + Detected by Coverity. + +commit 74cc95c317474ff14bbc6222b8fc8b537d3c312a +Author: Bart Van Assche +Date: Sun Dec 4 21:49:41 2016 -0800 + + deliverByNotify: Fix a compiler warning + +commit 31613e8b1eb7515ddc7cb89d72755a671c9c41f5 +Author: Bart Van Assche +Date: Mon Dec 5 18:29:18 2016 -0800 + + Do not define U64 typedef while building Net-SNMP + + The U64 typedef conflicts with a typedef in a Perl header file. Hence + disable the U64 typedef from the Net-SNMP header files. This patch + neither changes the Net-SNMP ABI nor the Net-SNMP API. + +commit 3df26802b258d93023f05ac0f1af889361b40fcd +Author: Bart Van Assche +Date: Mon Dec 5 19:10:59 2016 -0800 + + Avoid that linking fails with a C99 compliant compiler and optimization disabled + + The semantics of the C99 inline keyword differs slightly of that of + the C++ inline keyword. See also + http://stackoverflow.com/questions/16245521/c99-inline-function-in-c-file/16245669. + +commit 0fd0962d32b47ffa2f418cf31226c94541a5c2a5 +Author: Bart Van Assche +Date: Mon Dec 5 18:46:22 2016 -0800 + + configure: Display result of 'static inline' test + +commit a7b6cb4d1a55962e553f2f9ae465d6aab4709ff2 +Author: Bart Van Assche +Date: Mon Dec 5 20:28:14 2016 -0800 + + configure: Display rtentry structure type once + +commit 6d3ac9bf1e971d97daf154e978c74d9ef67b18db +Author: Bart Van Assche +Date: Sun Dec 4 21:49:41 2016 -0800 + + deliverByNotify: Fix a compiler warning + +commit e1409530f917f2608a19bcbb5dece279a16c11c2 +Author: Bart Van Assche +Date: Sat Dec 3 04:42:47 2016 +0100 + + configure: Add -Wno-unused-result to the developer flags + +commit 59eb61cdc3ffaf5980bde4193111b6f6d3fe61ef +Author: Bart Van Assche +Date: Sat Dec 3 04:32:34 2016 +0100 + + DISMAN-TRACEROUTE-MIB: Fix an error path + + Avoid that free(outip) can get called before outip is initialized. + Detected by gcc. + +commit 3f758abeb91ccb4e57b795330e3f8c969956d6bc +Author: Bart Van Assche +Date: Fri Dec 2 19:53:47 2016 -0800 + + agent/mibgroup/examples/example.c: Make the code consistent with the v5.5 branch + +commit 7b505a457b6f4d8e748803728f0051e8e6765358 +Author: Robert Story +Date: Fri Dec 2 17:24:01 2016 -0500 + + fix printf without format string and compiler warning + +commit 933084b217b144ba302da9a410203919d9290186 +Author: Bart Van Assche +Date: Sat Nov 19 20:39:25 2016 +0100 + + CHANGES: BUG: 2701: Fix Perl module build on Fedora 23/24/25 + + Avoid that building the Perl modules fails as follows: + + cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] + +commit b898c729ec4df1ce6585deef68cc7db7d38f2749 +Author: Robert Story +Date: Wed Nov 30 21:46:35 2016 -0500 + + search for autoconf-$version too + +commit d23474c85b64500788545edf031b0a2168d3ddd5 +Author: Bart Van Assche +Date: Sat Nov 26 21:25:23 2016 -0800 + + win32/netsnmpmibs/Makefile.in: Add missing source files + +commit 475ad71b1bb96c4f7b1928e9006d3b95f2148876 +Author: Bart Van Assche +Date: Sat Nov 26 20:44:18 2016 -0800 + + Win32: Add a missing NETSNMP_IMPORT declaration + +commit 09f4350e95f28ece0bbc6205256e6dcd5b7ff40d +Author: Bart Van Assche +Date: Sun Nov 27 04:24:31 2016 -0800 + + Win32, snmp_debug.c: Fix Windows build + + MSVC does not have a header file. See also commit + 5145942b7569. + +commit ee4effd7d2cceb950629c0066c15257093ecbfe1 +Author: Bart Van Assche +Date: Sat Nov 26 20:20:39 2016 -0800 + + Win32, snmp-lib: Fix sc_get_openssl_hashfn() declaration + + On Unix systems EVP_MD is an alias for struct env_md_st. On Windows + systems EVP_MD is an alias for evp_md_st (Shining Light Productions + OpenSSL v1.1.0c). Hence use EVP_MD in the scapi.h header file. + +commit 4040bf80ec19ebcebddddc5f8e14090d0540013d +Author: Bart Van Assche +Date: Sun Nov 27 09:09:45 2016 -0800 + + snmp_debug: Constify priority name array + +commit a98fe2204cbe43b2ec2f6863c4cfd68e6c5c15f8 +Author: Bart Van Assche +Date: Sun Nov 27 06:48:01 2016 -0800 + + snmplib, agent: Fix format strings + + Use % NETSNMP_PRIz instead of %l for size_t. Use %u instead of + % NETSNMP_PRIz for int. Fixes e.g. commit e207b8113260. + +commit 413eb441c2f71298cd07ff0c480505ba62cad8bb +Author: Bart Van Assche +Date: Sun Nov 27 19:18:09 2016 -0800 + + MinGW: Ensure that pskill / pslist test is run before tests + +commit 27be45f22fc620ee0edf779550aa9c13039ca427 +Author: Bart Van Assche +Date: Sun Nov 27 13:16:01 2016 -0800 + + Win32: Make strcasecmp() declaration available to the compiler + +commit 1794aedb192a99b9f6871fa711fa76eb1187f919 +Author: Bart Van Assche +Date: Sun Nov 27 13:10:16 2016 -0800 + + Win32: Enable _WINSOCK_DEPRECATED_NO_WARNINGS + +commit fda421625d20d8f8201479fa7f33c257fdc72015 +Author: Bart Van Assche +Date: Sun Nov 27 11:25:40 2016 -0800 + + Cygwin: getnetent() / getnetbyaddr() build fix + + Recent versions of Cygwin have prototypes but no implementation for + these functions. Hence avoid that the Cygwin prototypes conflict + with the implementation. + +commit 77624ea7b9d44c7816d253750e201a23929141a6 +Author: Bart Van Assche +Date: Mon Nov 28 18:22:57 2016 -0800 + + UCD-SNMP MIB: Fix a link failure on systems without regex support + + Avoid that building with MSVC or MinGW triggers fails due to a + missing init_logmatch() implementation. + +commit 79243158a5cb81731280f30abdbc3375e1061f5e +Author: Bart Van Assche +Date: Sun Nov 27 11:35:32 2016 -0800 + + UCD-SNMP MIB: Avoid integer overflows + + Certain 32-bit compilers, e.g. Cygwin-x86 gcc, use a 32-bit data type + for unsigned long. Since 'val' must be 64 bits wide, change its data + type from unsigned long into unsigned long long. + +commit 8b6f376a71d1745ffa85fa2490637dbb3c4d0012 +Author: Bart Van Assche +Date: Sun Nov 27 11:01:02 2016 -0800 + + snmpd: Rename VIEWSTATUS into VACMVIEWSTATUS + + The Cygwin header declares VIEWSTATUS as a typedef. + Avoid that the Windows build fails by renaming the Net-SNMP VIEWSTATUS + symbol. + +commit 87bae0e0241f353c7d8cd7a3f2847e760efb3712 +Author: Bart Van Assche +Date: Sun Nov 20 16:03:29 2016 -0800 + + CHANGES: BUG: 2737: Quote service executable path + + See also: + * http://isc.sans.edu/diary.html?storyid=14464 + * http://cwe.mitre.org/data/definitions/428.html + * http://www.commonexploits.com/?p=658 + +commit 657b62eeca0968fdbd4e75b946bbaef5677d8b1b +Author: Bart Van Assche +Date: Sat Nov 26 20:39:32 2016 -0800 + + Win32: Add support for OpenSSL >= 1.1.0 + + In OpenSSL version 1.1.0 the libeay32 library has been renamed into + libcrypto32. Hence update the name of the OpenSSL library. + + See also https://git.openssl.org/gitweb/?p=openssl.git;h=6928b6171ada. + +commit 2259a2331e3a191c721ff2a2583ad1263e1a0a60 +Author: Bart Van Assche +Date: Sun Nov 27 08:59:45 2016 -0800 + + Win32: Add Visual Studio 2015 version number + + Additionally, make net-snmp-config.h.in and net-snmp-config.h again + consistent. See also commit 1fa4da1c6cf9. + +commit 9850be71ab9c8d228ea09fd11a22d6ef8ae496e2 +Author: Bart Van Assche +Date: Sun Nov 27 20:26:55 2016 -0800 + + Win32: Synchronize win32/net-snmp/net-snmp-config.h and .in + +commit cc700baaff3d81c72b82ac877f099e70591d5288 +Author: Bart Van Assche +Date: Sun Nov 27 20:24:05 2016 -0800 + + snmplib/winservice.c: Suppress a compiler warning + + Avoid that gcc complains about 'static' not occurring first. + +commit 9a66d1aad05e44aa118381f7bf055e87f646313e +Author: Bart Van Assche +Date: Sat Nov 26 20:44:18 2016 -0800 + + snmplib: Add missing NETSNMP_IMPORT declarations + +commit f54f7af2be992f1667684f17cf5fd2d6f3850715 +Author: Bart Van Assche +Date: Sun Nov 27 09:18:17 2016 -0800 + + snmplib: Fix asn_parse_nlength() prototype + + All callers pass an u_long pointer as third argument to this function. + Hence change the type of the third argument from size_t into u_long. + See also commit a9850f4445cf. + +commit 829cc646955fe529f5ce9cf02ce1391a47325045 +Author: Bart Van Assche +Date: Sat Nov 26 20:52:47 2016 -0800 + + snmplib: Unify printf format attribute definitions + + This change adds NETSNMP_ATTRIBUTE_FORMAT() to the global namespace + and removes _LOG_ATTR() from that namespace. + +commit 920f20b745da6c90c56a68d6d1ea782ca4fc074b +Author: Bart Van Assche +Date: Sat Nov 19 20:39:25 2016 +0100 + + CHANGES: BUG: 2701: Fix Perl module build on Fedora 23/24/25 + + Avoid that building the Perl modules fails as follows: + + cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] + +commit d41eb3a765010792550706f48e04be0f0343555b +Author: Bart Van Assche +Date: Sat Nov 5 18:09:29 2016 -0700 + + ETHERLIKE-MIB: Avoid that the compiler warns about freeing a const pointer + + See also commit ed4e48b5fab1. + +commit a3c9a3b0188280c7a68948f3e0f6b5ab9a658a46 +Author: Robert Story +Date: Tue Nov 8 13:40:11 2016 -0500 + + fix compiler warnings + +commit 02de0a2bfcf49a8e1752a84f7977825a1df701a7 +Author: Bart Van Assche +Date: Tue Nov 15 18:17:06 2016 -0800 + + configure: Enable more developer compiler warnings + +commit cfe8da03ce1084e975f5560a86c85eaf50df0447 +Author: Bart Van Assche +Date: Tue Nov 15 18:15:55 2016 -0800 + + mibII: Swap 'static' and 'const' to keep gcc happy + +commit 32fa60a51fb52168d164d48d4461b6dc692e185f +Author: Bart Van Assche +Date: Tue Nov 15 18:14:26 2016 -0800 + + DISMAN-TRACEROUTE-MIB: Comment out dead assignments + + The value assigned to 'pmtu' is never used. Hence comment out the + assignments to 'pmtu'. This avoids that gcc complains about these + assignments. + +commit 0b325487af00c1bf282acfb877faab86b34f29e4 +Author: Bart Van Assche +Date: Sat Nov 19 08:34:22 2016 -0800 + + Make the code that handles msgMaxSize easier to read + + See also https://en.wikipedia.org/wiki/Yoda_conditions. + +commit 26b38e58112dc0dba9fbb4fb54f7b26d531cf355 +Author: Bart Van Assche +Date: Sat Nov 19 09:54:40 2016 -0800 + + Perl tests: Make test SNMP/t/session.t pass again + + The comment in perl/SNMP/t/session.t was not correct. Whether or + not session creation succeeds does not depend on whether or not an + SNMP agent is running at session destination address for the USM + security model. + + See also commit f629d1224e22. + +commit 56287c139e5635e1bbafd2792fcfc7cbd59c9b57 +Author: Robert Story +Date: Wed Nov 16 23:12:03 2016 -0500 + + Perl: Initialize session objects correctly + + This is a fix for commit f629d1224e22. + +commit f629d1224e2272cb6f86dbe9bea4c88aec7e8f92 +Author: Robert Story +Date: Tue Nov 15 12:58:11 2016 -0500 + + better handling of pdu max message size; now per packet, not per session + + - add msgMaxSize to snmp_pdu struct + - defaults to SNMP_MAX_MESSAGE_LEN, then shrunk as needed for transport + max, incoming pdu max and user configured max + - new netsnmp_max_send_msg_size() should be used to query user + configured max. returns SNMP_MAX_PACKET_LEN if not set, and + SNMP_MIN_MAX_LEN if configured value is less that required min (484) + - add some missing snmp_sess_init calls + - snmp_sess_add_ex now returns an error if session rcvMsgMaxSize and + sndMsgMaxSize are not set. + +commit 4494781070001b37d03236b73479f43cab6e3e7b +Author: Robert Story +Date: Mon Nov 14 17:36:40 2016 -0500 + + only use one 'max packet size' constant (SNMP_MAX_PACKET_LEN) + +commit a7d3d54136c88a1d2eb335d3f7a2a2080f3c0142 +Author: VMwareDev Randy +Date: Wed Jan 7 09:42:10 2015 -0500 + + CHANGES: BUG: 2387: fixed memory leak when request id is 0 + + Signed-off-by: Robert Story + +commit 734f85551926234633a28cc6bc857e9fe2f509eb +Author: Robert Story +Date: Wed Nov 9 16:22:30 2016 -0500 + + add missing prefix macro + +commit c006781f769b1e1f22c33d0354cf4b24d963c4b6 +Author: Robert Story +Date: Wed Nov 9 16:21:50 2016 -0500 + + fix a few cleanup cases; remove redundant checks + +commit e73ca98000273e1fd62ed60d72b7d153355c93ab +Author: Robert Story +Date: Wed Nov 9 16:13:01 2016 -0500 + + fix some missed HAVE_X conversions + +commit cf543e97aafd98bdfc828ca2fea6829aeb7caf10 +Author: Robert Story +Date: Thu Nov 3 12:38:05 2016 -0400 + + fix return type + + fix some usm code that didn't merge properly with VMware patches + +commit afbd7b71d83dc7c59765466fdf69472f81c96fb1 +Author: Robert Story +Date: Tue Nov 8 13:40:11 2016 -0500 + + fix compiler warnings + +commit 7302c4da707920bbb327f4d23b0f9170fae76013 +Author: Robert Story +Date: Mon Nov 7 23:41:19 2016 -0500 + + use callback to unregister notifications + + - so apps linking to agent lib don't need mib libs + +commit 37c1bd0b9812ef7b71a09b5310a12b39bb4bdb8d +Author: Robert Story +Date: Mon Nov 7 23:12:14 2016 -0500 + + align function name with other public functions + +commit 72f1693ef41f4fba4dfdba28023a292cb28fb70a +Author: Robert Story +Date: Tue Oct 25 23:36:36 2016 -0400 + + more generic unregister function + +commit b549b4f064ba3123025050d3a0caf0553701df90 +Author: Robert Story +Date: Mon Nov 7 18:01:24 2016 -0500 + + fix byte order for ports + + - UDP got whacked by recent code rework (merged from an older release) + - SSH was missed in the original fix + +commit f90d891c8f98b41cc46345dd27ae73e99afd5258 +Author: Robert Story +Date: Mon Nov 7 17:17:38 2016 -0500 + + Revert "T070com2sec_simple: Fix this test" + + This reverts commit 9b617e7b25a6119b20059db941f18f9ef7158bc6. + + - DNS resolution does work: + + - dig +short onea.net-snmp.org 8.8.8.8 + 127.0.0.1 + + - dig +short twoa.net-snmp.org 75.75.75.75 + 127.0.0.2 + 127.0.0.3 + + - old record (not under our control) can/did chance number of records: + + - dig +short www.google.com (as of today) returns 6 A records, not 1 + +commit 2a36c5763cd26c347439253f5035966d0d1c732d +Author: Bart Van Assche +Date: Sat Nov 5 19:37:37 2016 -0700 + + AgentX: Fix a use-after-free in subagent_shutdown() + + Avoid that Valgrind reports the following: + + Invalid read of size 8 + at 0x55F48B4: remove_trap_session (agent_trap.c:310) + by 0x560F871: subagent_shutdown (subagent.c:749) + by 0x630D7F7: snmp_call_callbacks (callback.c:363) + by 0x62C76B7: snmp_shutdown (snmp_api.c:944) + by 0x4057D2: main (snmptrapd.c:1356) + Address 0xa3c4130 is 0 bytes inside a block of size 488 free'd + at 0x4C2C26A: free (vg_replace_malloc.c:530) + by 0x62C992B: snmp_free_session (snmp_api.c:1904) + by 0x62C9BFE: snmp_sess_close (snmp_api.c:1989) + by 0x62C9CDD: snmp_close (snmp_api.c:2019) + by 0x560F850: subagent_shutdown (subagent.c:747) + by 0x630D7F7: snmp_call_callbacks (callback.c:363) + by 0x62C76B7: snmp_shutdown (snmp_api.c:944) + by 0x4057D2: main (snmptrapd.c:1356) + Block was alloc'd at + at 0x4C2B0BD: malloc (vg_replace_malloc.c:299) + by 0x62C78FF: _sess_copy (snmp_api.c:1081) + by 0x62C8061: snmp_sess_copy (snmp_api.c:1294) + by 0x62C9367: snmp_sess_add_ex (snmp_api.c:1796) + by 0x62C91B9: snmp_add_full (snmp_api.c:1731) + by 0x560FEE3: subagent_open_master_session (subagent.c:869) + by 0x5610350: agentx_reopen_session (subagent.c:951) + by 0x560D351: subagent_startup (subagent.c:107) + by 0x630D7F7: snmp_call_callbacks (callback.c:363) + by 0x62F2B7D: read_configs (read_config.c:1072) + by 0x62C743B: init_snmp (snmp_api.c:896) + by 0x40509B: main (snmptrapd.c:1141) + +commit bcdc51b3f70f857b18f9dc356297b00a6026c0f2 +Author: Bart Van Assche +Date: Sat Nov 5 18:13:58 2016 -0700 + + Python: Avoid that the compiler complains about redefined symbols + +commit 579b23a35b02bc5f1e6cf8dc15c4e1a514f5e535 +Author: Bart Van Assche +Date: Sat Nov 5 18:13:44 2016 -0700 + + Perl, SNMP.xs: Avoid that the compiler complains about redefined symbols + +commit 9b617e7b25a6119b20059db941f18f9ef7158bc6 +Author: Bart Van Assche +Date: Sat Nov 5 18:09:50 2016 -0700 + + T070com2sec_simple: Fix this test + + Use existing DNS names instead of names that do not exist. This patch + fixes commit c6cc9a1fd013. + +commit d3f834a9ca81365e28c69d09499973b124f3394d +Author: Bart Van Assche +Date: Sat Nov 5 18:09:29 2016 -0700 + + ETHERLIKE-MIB: Avoid that the compiler warns about freeing a const pointer + + See also commit ed4e48b5fab1. + +commit 24e52a0e66883eee34c7edb500a90352b86b6aff +Author: Bart Van Assche +Date: Sat Nov 5 17:18:47 2016 -0700 + + snmpSTDDomain: Initialize t->sock to -1 in netsnmp_std_transport() + + To improve consistency with other transport modules, initialize + t->sock to -1 (invalid socket) instead of 0 (stdin). This patch + does not change the behavior of netsnmp_std_transport() because + either t->sock is overwritten or t is freed before this function + returns. + +commit af63a7e218ef26eeec6b417d67e5b4e37d97fc80 +Author: Bart Van Assche +Date: Sat Nov 5 17:16:57 2016 -0700 + + snmpSTDDomain: Use symbolic names instead of 0 / 1 + + Use symbolic names instead of 0 / 1 to represent stdin / stdout. + Use dup2() instead of dup(). + +commit 57bf213262ce2e4c65a6d3878ee2a428146d2170 +Author: Bart Van Assche +Date: Sun Oct 23 09:00:15 2016 -0700 + + snmpCallbackDomain: Remove redundant code + + Assigning -1 to t->sock just before either freeing t or overwriting + t->sock is superfluous. Hence remove the statement "t->sock = -1". + Since comparing t->sock with -1 after rc has been tested is redundant, + remove that comparison too. + + See also commit ae744544ca49 ("minor tranport cleanup"). + +commit 93d1099c8fb6015b105ea6ae4926dab2b8f4a6a1 +Author: Bart Van Assche +Date: Sun Oct 23 08:06:20 2016 -0700 + + Rerun autoconf + +commit 15b66acde89563469997001968bbddd089feb70a +Author: Bart Van Assche +Date: Sun Oct 23 08:11:20 2016 -0700 + + configure.d/config_os_libs2: Fix a comment + +commit a4c5c7674cc9a1ba2fba76e63e07d399cbc4bbf5 +Author: Robert Story +Date: Wed Nov 2 13:35:45 2016 -0400 + + use 'goto fail' for cleanup instead of repeating code 24 times + +commit e3d525e46a3f75cba6371857e1bce362aae9d0fd +Author: Robert Story +Date: Wed Nov 2 13:33:25 2016 -0400 + + rework some code in usm_create_usmuser + +commit 9bb701626da99ee80cdf3ae6542ccefe3c1dc196 +Author: Robert Story +Date: Wed Nov 2 13:31:06 2016 -0400 + + fix some usm code that didn't merge properly with VMware patches + +commit 4e0467a9d5dfad244c36f4bf2020471c9d825077 +Author: Robert Story +Date: Tue Nov 1 14:49:45 2016 -0400 + + check malloc returns + +commit b05b16fa22f91de00c46150a96b3c75bdecedd75 +Author: Robert Story +Date: Tue Nov 1 13:48:59 2016 -0400 + + add missing set of log parameter + +commit 05a9ee73350e9d04662c83a90bc782f7b617cb87 +Author: Robert Story +Date: Tue Nov 1 10:31:17 2016 -0400 + + fix potential deref of freed ptr + + introduced in commit 9bce2c951 + +commit 82d768b7de27c99df107739211f3d91bdcdda561 +Author: Robert Story +Date: Sun Oct 23 22:37:24 2016 -0400 + + initialize stack var + +commit 3533da310f4c108894cef00b9f2dce4f5f4c511a +Author: Niels Baggesen +Date: Mon Oct 17 22:24:13 2016 +0200 + + Remove redundant extern declaration. + +commit 8e3174999fd956c66f334ee2a2f4a5283799c2af +Author: Niels Baggesen +Date: Mon Oct 17 20:33:35 2016 +0200 + + Don't mix code and data. + +commit 009017e2a2167379b24df7f5e444fdfae4bd0a9d +Author: Niels Baggesen +Date: Mon Oct 17 20:32:40 2016 +0200 + + stdout could be a macro. Don't use it in a parameter list. + +commit fd242c01476749e009b3e64f399e91595c08820b +Author: Niels Baggesen +Date: Mon Oct 17 20:31:47 2016 +0200 + + Fix a duplicated semicolon. + +commit 39b8cf55d4cc82c64f0051aa04e64022c9062da0 +Author: Robert Story +Date: Mon Oct 17 11:21:17 2016 -0400 + + fix typo + +commit f217412fae322b6da6ea8c43f638b40be0e5cb98 +Author: Robert Story +Date: Sat Oct 15 14:55:58 2016 -0400 + + Bump LIBCURRENT for 5.8 release + + - Not that 5.8 is due anytime soon, but leaving it at 5.7 value could + caues issues for systems with multiple releases installed + +commit 581df320d4407b1546f4b893c79db2be24de7794 +Author: VMwareDev Randy +Date: Wed Jun 22 17:20:12 2016 -0400 + + update net-snmp-create-v3-user.in for new SHA-2 algorithms + + Signed-off-by: Robert Story + +commit 96e4749ecbc056c68f72bbfe2857f8073a1cbd12 +Author: VMwareDev Randy +Date: Wed Jun 22 17:15:09 2016 -0400 + + fix more compiler warnings + + Signed-off-by: Robert Story + +commit ad15bd15ec65c34cd370b3fb51368baafc3e8a94 +Author: VMwareDev Randy +Date: Wed Jun 22 15:35:21 2016 -0400 + + fix sha-2 auth types to match help text; update man pages + + Signed-off-by: Robert Story + +commit 114d8426600f931dc70f87438a3c7b87b8cf24c9 +Author: Robert Story +Date: Thu Oct 13 21:04:24 2016 -0400 + + add VMware copyrights + +commit 30384f032e1829a50e28cf81282893a4b7544f85 +Author: VMwareDev Randy +Date: Sat Jun 4 17:40:26 2016 -0400 + + delete duplicated var decl + + Signed-off-by: Robert Story + +commit 0ea7638e5cbcfa10b9fc7dc34245671b030cb9cd +Author: VMwareDev Randy +Date: Sat Jun 4 17:33:05 2016 -0400 + + ifdefs for code/variables only needed in certain cases + + Signed-off-by: Robert Story + +commit 94edfbf2b7064f473b615d1c67742c1dfdb10eee +Author: VMwareDev Randy +Date: Tue Apr 14 14:24:16 2015 -0400 + + cleanup transport filters on shutdown + + Signed-off-by: Robert Story + +commit 2d69a5c09c20bb6af54d3a6eda585b7b1080d836 +Author: VMwareDev Randy +Date: Thu Apr 16 11:37:48 2015 -0400 + + fix more compiler warnings, typos + + Signed-off-by: Robert Story + +commit 1f80a2f5b0adc68268c3d1487efcd548fcb86cdb +Author: VMwareDev Randy +Date: Fri Apr 3 22:19:15 2015 -0400 + + various fixes noticed while reviewing Fortify issues + + - typos + + Signed-off-by: Robert Story + +commit cfe8828ed0570634e738b5ef6fd2b6da191b857c +Author: VMwareDev Randy +Date: Fri Apr 3 18:26:42 2015 -0400 + + address Fortify memory leaks + + Signed-off-by: Robert Story + +commit 700c0030ec7384fef2ba26114281ad657fe1b705 +Author: VMwareDev Randy +Date: Mon Mar 23 13:47:58 2015 -0400 + + fix fortify issues + + - null deref + + Signed-off-by: Robert Story + +commit 304edcc6858801384591f57f88794653f8813cef +Author: VMwareDev Randy +Date: Fri Apr 3 22:20:06 2015 -0400 + + new snmp_session_insert to insert sessions with lock + + - reducing duplicated code + + Signed-off-by: Robert Story + +commit 78c8f410ab61ee52adbd8eab2f7159980729bc92 +Author: Robert Story +Date: Thu Oct 13 13:43:42 2016 -0400 + + add range check; init vars to keep compiler happy + +commit c912c8f62bd4cc2a5f2f0787c79e9253dae920b0 +Author: Robert Story +Date: Thu Oct 13 13:41:34 2016 -0400 + + fix some compiler warnings + +commit 7954590aee91ab48edb2bc1ee7c6c610518a49a0 +Author: Robert Story +Date: Wed Oct 12 17:51:48 2016 -0400 + + restore unnecessary var init to keep compiler happy + +commit 9a8509f35c3828c6c0ba15721e81220546cbf7ef +Author: Robert Story +Date: Thu Oct 13 13:46:31 2016 -0400 + + add VMware copyrights + +commit a5661f32308447da7a4bdfb836d5b215bc5e8b93 +Author: VMwareDev Randy +Date: Thu Jun 25 16:53:00 2015 -0400 + + pdu stats tweaks + + - move pdu stats dump to function + - move pdu stats shutdown inside pdustats ifdef + + Signed-off-by: Robert Story + +commit 3295f4d7fb9bfede1f95bae7060f6bb0a62e0a14 +Author: VMwareDev Randy +Date: Thu Jun 25 12:20:03 2015 -0400 + + change debug token to stats:notif + + Signed-off-by: Robert Story + +commit cd5174ac69f9bc9f321f5b02de9502744f6a3f01 +Author: VMwareDev Randy +Date: Mon Jun 22 22:26:31 2015 -0400 + + track trap/inform stats per session + + - new snmp_sess_lookup_by_name to find trap/inform session by name + + Signed-off-by: Robert Story + +commit b7b50bbac7f21a924149d03da26ff0a44b25ec60 +Author: VMwareDev Randy +Date: Mon Jun 22 22:20:43 2015 -0400 + + snmp_send callback updates + + - add new NETSNMP_CALLBACK_OP_RESEND + - add missing calls for NETSNMP_CALLBACK_OP_SEND_FAILED + + Signed-off-by: Robert Story + +commit 775709de52a106783e625772c2ef7ccb0a173e6e +Author: VMwareDev Randy +Date: Wed Jun 17 17:41:24 2015 -0400 + + stats to track pdu processing times + + - keep the last N pdus with longest processing time + + Signed-off-by: Robert Story + +commit c3e92d6ca7cc080cda70b4f0dd51ef3eaf445327 +Author: VMwareDev Randy +Date: Thu Jun 18 14:13:54 2015 -0400 + + binary array container code redux + + Signed-off-by: Robert Story + +commit 220f3107e32abe277befc0039002849def8c3cd9 +Author: VMwareDev Randy +Date: Thu Jun 18 14:13:23 2015 -0400 + + immediately sort binary array when unsorted flag cleared + + Signed-off-by: Robert Story + +commit 734914361f6962a0a24b4902cfea9d7b94cfc380 +Author: VMwareDev Randy +Date: Wed Jun 17 17:37:32 2015 -0400 + + implement direct access methods for binary arrays + + Signed-off-by: Robert Story + +commit 871610a0dad503f9ce1d1f2db7817a05d6798de2 +Author: VMwareDev Randy +Date: Wed Jun 17 17:37:00 2015 -0400 + + add direct access methods to container + + - CONTAINER_INSERT_BEFORE(), CONTAINER_GET_AT(), + CONTAINER_REMOVE_AT() + + Signed-off-by: Robert Story + +commit 6c61442b3a0704ffaa71d216ea565021ee102701 +Author: Bill Fenner +Date: Thu Oct 6 17:11:56 2016 -0700 + + only bind if an address is given + + The equivalent commit for v4 was + 9d2c6f44e2bdc3fee8a090f64d936f035f3f42aa but it was missed for + v6, meaning v6 clients were broken. + +commit c7c7610a39790aa67664ba8f05fd1e3924040dff +Author: VMwareDev Randy +Date: Mon Mar 23 13:49:46 2015 -0400 + + fix inverted logic in conditional + + Signed-off-by: Robert Story + +commit 5426f71503df6f0ef6abcf3d1a52483444217262 +Author: VMwareDev Randy +Date: Fri Mar 6 10:27:30 2015 -0500 + + simplify some filter code + + Signed-off-by: Robert Story + +commit fff5f7c9ce464cf50c33c69292d8ce916347e153 +Author: VMwareDev Randy +Date: Sat Feb 14 16:13:01 2015 -0500 + + add missing protocol check + + Signed-off-by: Robert Story + +commit 46da28b63fe6ad02c23dcc8d62639aa934ba2b04 +Author: VMwareDev Randy +Date: Mon Feb 2 10:38:37 2015 -0500 + + new netsnmp_vacm_simple_usm_* + + Signed-off-by: Robert Story + +commit 76917bd12616eeb6ac1f1462b341273463bf309b +Author: VMwareDev Randy +Date: Mon Mar 23 16:26:50 2015 -0400 + + fix rc check for new function + + Signed-off-by: Robert Story + +commit a6fa419be4155e08fe8ec1e2f7c4b32c309536f9 +Author: VMwareDev Randy +Date: Mon Mar 23 12:43:04 2015 -0400 + + new netsnmp_agent_listen_on to open agent port + + Signed-off-by: Robert Story + +commit 7ffb8e25a0db851953155de91f0170e9bf8c457d +Author: Robert Story +Date: Thu Oct 6 10:43:10 2016 -0400 + + CHANGES: BUG: 2743: snmpd crashes when receiving a GetNext PDU with multiple Varbinds + + skip out-of-range varbinds when calling next handler + +commit 17d5591889a2fda665b1891f6f496bfa06e58c70 +Author: Robert Story +Date: Thu Oct 6 07:49:10 2016 -0400 + + add VMware copyright + +commit 0ab749ad34831f403861494b9c981c5f7ac92feb +Author: VMwareDev Randy +Date: Tue Apr 14 14:15:33 2015 -0400 + + set_exact_engineID: return length error instead of truncating + + - do truncation in exactEngineID_conf for backwards compatability + + Signed-off-by: Robert Story + +commit 85ca9164418c3e993a8a3f63994bf5149e723c67 +Author: VMwareDev Randy +Date: Tue Feb 10 17:25:52 2015 -0500 + + add set_exact_engineID() + + - also fixes a potential silent truncation of an exact id + + Signed-off-by: Robert Story + +commit 7f05103fcc67b1d36337e5b39b813541979e51aa +Author: Robert Story +Date: Wed Oct 5 21:21:44 2016 -0400 + + add debugLogLevel to snmp.conf man page + +commit b3ee47b3966834fb138c97f152ffdb7e56032171 +Author: Robert Story +Date: Wed Oct 5 21:10:30 2016 -0400 + + debug tweaks + + - validate value in range when setting level + - use our own table if no prioritynames (no numeric levels) + - case-insensitive compare + +commit ed41f787b1229814dc23a0d6ad30889d0e93924a +Author: Robert Story +Date: Wed Oct 5 21:02:55 2016 -0400 + + re-run autoconf + +commit 3eb4b473fed816108d1843dadee1ce877415b96b +Author: VMwareDev Randy +Date: Tue Apr 14 14:21:36 2015 -0400 + + add debug_enable_token_logs debug_disable_token_logs to output_api.h + + Signed-off-by: Robert Story + +commit 5a98a96f6181bfe906d602dfbfe0b57abf5f7d35 +Author: VMwareDev Randy +Date: Fri Mar 27 12:36:40 2015 -0400 + + debug indent tweaks + + - add prototype for debug_indent_reset + - assert on negative indent + - fix typo + + Signed-off-by: Robert Story + +commit 5145942b75697f4cea9656041af2fcc877ac9bf5 +Author: VMwareDev Randy +Date: Wed Feb 4 13:45:37 2015 -0500 + + syslog facility parsing, using prioritynames if available + + Signed-off-by: Robert Story + +commit 3088f6a246efa042c2c887cd73d81ee740dd161e +Author: VMwareDev Randy +Date: Wed Feb 4 13:45:14 2015 -0500 + + configure tests for sys/syslog.h and prioritnames + + Signed-off-by: Robert Story + +commit 53e11928ee128a459ceb99aeb89ac7a5afcbde9d +Author: VMwareDev Randy +Date: Wed Jan 7 23:17:55 2015 -0500 + + use dynamic debug log level in xdump() + + Signed-off-by: Robert Story + +commit 16f034eff89b28f3b685cb2a622c32941d2eccb5 +Author: VMwareDev Randy +Date: Wed Jan 7 23:03:00 2015 -0500 + + new api/config token for dynamic debug log level + + - e.g. debug messages can be logged at LOG_NOTICE instead of LOG_DEBUG + + Signed-off-by: Robert Story + +commit 7cfec0d6a9fb7846e81f2edb4315b6f9c200eec9 +Author: VMwareDev Randy +Date: Wed Jan 7 10:07:38 2015 -0500 + + new netsnmp_register_filelog_handler + + some code reuse and moves implementation details out of argument + processing. + + Signed-off-by: Robert Story + +commit 106c2e64626c0301230062779f92e0dc470f20c3 +Author: VMwareDev Randy +Date: Wed Jan 7 10:04:40 2015 -0500 + + new netsnmp_register_stdio_loghandler for both stderr and stdout + + Signed-off-by: Robert Story + +commit 72065914a684d763933ea0dbe89ebb563699838d +Author: VMwareDev Randy +Date: Mon Dec 1 13:56:09 2014 -0500 + + configure option enable-daemons-syslog-as-default + + Signed-off-by: Robert Story + +commit 9db9d1b3c625b5efa9e0cd0a8ff6ae8f535821b7 +Author: VMwareDev Randy +Date: Wed Jan 7 10:02:02 2015 -0500 + + move transport filter token registration later + + - fixes segfault in apps + + Signed-off-by: Robert Story + +commit f0bdaf03c69b053c807c212e2102c2b355e21e33 +Author: VMwareDev Randy +Date: Wed Nov 26 11:19:21 2014 -0500 + + make source address filter configureable: whitelist or blacklist + + Signed-off-by: Robert Story + +commit 9d28612ac03b1bd16ccaf12627e9e1eff0ce8cef +Author: VMwareDev Randy +Date: Tue Nov 25 23:32:10 2014 -0500 + + add packet filtering by source ip + + Signed-off-by: Robert Story + +commit ae744544ca4925869384da312f9629c0fc431115 +Author: Robert Story +Date: Wed Oct 5 00:03:24 2016 -0400 + + minor tranport cleanup + + - use netsnmp_transport_free() instead of SNMP_FREE + - add some missing netsnmp_transport_free() calls + +commit fc6a91a8602f6c256c013afe741f31c7db5286d8 +Author: Robert Story +Date: Tue Oct 4 23:54:35 2016 -0400 + + fix systemd integration in UDPIP v4/v6 reorg + +commit 58e472b488264ca5ed07dfb7a24cc2469f99b8f0 +Author: Robert Story +Date: Tue Oct 4 23:52:58 2016 -0400 + + tweak netsnmp_sd_find_*_socket return + + - use -1 as 'not found', since 0 can be a valid socket (even if systemd + would never use it. + +commit 9bbb0c54ce372a4bd0201f32d9ba8386b31d11b9 +Author: Robert Story +Date: Tue Oct 4 22:31:07 2016 -0400 + + free the right pointer + +commit e207b8113260fd7d84df0ebdb66925ab70da29b2 +Author: Robert Story +Date: Tue Oct 4 22:22:29 2016 -0400 + + tweak sndMsgMaxSize handling + + - account for oversized oid on 64 bit systems + +commit 614f21e12394e5c8a103816014f8f76267e56913 +Author: Robert Story +Date: Tue Oct 4 18:02:24 2016 -0400 + + Add VMware copyright + + Signed-off-by: Robert Story + +commit bb4f9f92a70eade9155137282df47d6d3e282c42 +Author: VMwareDev Randy +Date: Thu May 14 17:44:50 2015 -0400 + + move v3 engineID probe into initial packet build + + Signed-off-by: Robert Story + +commit 390986d4868f5db7f0fe73e329f8cd8b525b9a4e +Author: VMwareDev Randy +Date: Mon Apr 27 00:24:42 2015 -0400 + + getbulk enhancements: response size + fallback to forward encoding + + - only check reverse encode default store flag once per packet, setting + pdu msg flag for forward encoding if reverse encoding is not + configured. + - track rough response sizes as we go, so we can stop gathering response + varbinds we probably won't be able to send + - if initial reverse encoding results in a packet that is too big, set + pdu flags to retry with forward encoding and drop varbinds so that + response fits in packet size + - new private asn type to indicate encoding processing should stop + - move duplicated packet building code to new netsnmp_build_packet() + - new buffer ptr/len in agent isp struct for outgoing packet + - new _build_initial_pdu_packet() to build a response packet (saving + result in new isp struct ptr/len). this function is called by the + agent to build the response *before* snmp_send is called, so we can + a) detect tooBig errors and b) so we can fix getbulk processing by + detecting bulk responses that exceed max snd msg size and switching + to forward encoding with varbind truncation. + - add ':intermediate' to intermediate results debug tokens + + Signed-off-by: Robert Story + +commit 9fe3ae172dcf2950db764394728cdbe26dfe4855 +Author: VMwareDev Randy +Date: Sun Apr 26 23:20:22 2015 -0400 + + reduce session msg max sizes to transport max + + Signed-off-by: Robert Story + +commit cc1c1f93e2566276ce7353e4ee49b466be8a2793 +Author: VMwareDev Randy +Date: Sun Apr 26 23:16:54 2015 -0400 + + getbulk enhancements: limit responses gathered + + - new avgBulkVarbindSize default store integer + - use session sndMsgMaxSize & avgBulkVarbindSize to reduce maxresponses + - tweak some debug tokens, adding ':bulk' + + Signed-off-by: Robert Story + +commit 1a0dbe19bf2787bb5bea913f210a9a5eb4c0c80c +Author: VMwareDev Randy +Date: Fri Apr 17 12:01:16 2015 -0400 + + new snmp token sendMessageMaxSize + + Signed-off-by: Robert Story + +commit b3bbde9b47b4aa5ef69e4116b2b5314ef0b4f209 +Author: Robert Story +Date: Tue Oct 4 13:11:51 2016 -0400 + + Add VMware copyrights + +commit 7d82f92240055a9eb1a8a53bb081e90e6abe182c +Author: VMwareDev Randy +Date: Tue Apr 14 14:22:11 2015 -0400 + + add runtime checks for disabled protocols to _snmp_build + + Signed-off-by: Robert Story + +commit 9fe699a1b7dd63c3644011f08584aabbfa5ed60f +Author: VMwareDev Randy +Date: Mon Mar 23 12:52:47 2015 -0400 + + no informsink if v2c & v3 disabled + + Signed-off-by: Robert Story + +commit 4b62edbdb32016b845e5dd14582f403f1659300f +Author: VMwareDev Randy +Date: Tue Mar 10 13:33:51 2015 -0400 + + log protocol version in hex + + Signed-off-by: Robert Story + +commit 32a321ff71db8b3cea472e2a5f08d56af7ae10e1 +Author: VMwareDev Randy +Date: Tue Mar 10 13:03:50 2015 -0400 + + fix runtime protocol check macros + + Signed-off-by: Robert Story + +commit 918d6a2d89e9a68729eb474e3e720829bdbc1a04 +Author: VMwareDev Randy +Date: Tue Feb 10 11:24:45 2015 -0500 + + update man pages + + Signed-off-by: Robert Story + +commit 4ec103c7dbbd165f8e41373dfc1057181d3d3414 +Author: VMwareDev Randy +Date: Tue Feb 10 11:02:06 2015 -0500 + + add debug, warn at startup if all protocols disabled + + Signed-off-by: Robert Story + +commit 96554150efccece58a3265cdfe1b21abd9f73603 +Author: VMwareDev Randy +Date: Mon Feb 9 18:55:59 2015 -0500 + + more runtime protocol version checks + + Signed-off-by: Robert Story + +commit e422fbfb09cd7a7927d02deb35f890a84f351691 +Author: VMwareDev Randy +Date: Fri Jan 2 00:26:08 2015 -0500 + + more checks for disabling protocol versions at runtime + + Signed-off-by: Robert Story + +commit 79aa24844b00c2922d19843b05ea1521f2b9b956 +Author: VMwareDev Randy +Date: Tue Nov 25 20:06:50 2014 -0500 + + add runtime support for disabling individual protocols + + Signed-off-by: Robert Story + +commit 3a7e096473b1576f4cce50945e1b28658f8909ba +Author: Robert Story +Date: Mon Oct 3 20:18:37 2016 -0400 + + Add VMware copyrights + +commit 3fb946129cb6a041c08971796f31363b4016fe70 +Author: VMwareDev Randy +Date: Mon Oct 3 18:31:45 2016 -0400 + + finish data/mib separation for snmpNotifyFilterProfileTable + + Signed-off-by: Robert Story + +commit 58ae9e6b11d8586528249c3a5b62ad221e91f67b +Author: VMwareDev Randy +Date: Mon Oct 3 16:53:22 2016 -0400 + + update all notification tables to handle embedded nulls in names + + Signed-off-by: Robert Story + +commit 3c6b768d34194c5f2eafe2cac5ed9d65c9ea5b0f +Author: VMwareDev Randy +Date: Thu Sep 29 15:01:24 2016 -0400 + + new netsnmp_memdup_nt (allocs extra byte for null termination) + + - very similar to netsnmp_strdup_and_null, but ... + - always adds extra byte/null + + Signed-off-by: Robert Story + +commit 1c133c80ec0f69ff89f1925b65ad1ce06bfd0e2e +Author: VMwareDev Randy +Date: Mon Sep 26 13:31:48 2016 -0400 + + fix missed structure member renames + + Signed-off-by: Robert Story + +commit 8964bafcd6d6b7ffe115980d4f13c0946a32a53c +Author: VMwareDev Randy +Date: Mon Sep 26 13:30:42 2016 -0400 + + fix config_requires for notification data changes + + Signed-off-by: Robert Story + +commit 62a454fe7c138e6d252321057fd988a309a7ea15 +Author: VMwareDev Randy +Date: Mon Sep 26 13:30:11 2016 -0400 + + notification fixes + + - move store functions into data handlers + - fix code for write support + - skip duplicate init calls + + Signed-off-by: Robert Story + +commit cbef1e426e8be5564c2edf7565e8e0105c47d8b7 +Author: VMwareDev Randy +Date: Sat Jun 4 17:34:20 2016 -0400 + + more fixes for snmpTargetAddreEntry merge + + Signed-off-by: Robert Story + +commit 4a4bf1d2f8346d0c1cf33fe67bc515905245ad61 +Author: VMwareDev Randy +Date: Sat Jun 4 17:33:05 2016 -0400 + + import a bunch of non-cmake fixes from cmake branch + + - ifdefs for code/variables only needed in certain cases + + Signed-off-by: Robert Story + +commit 3aa4abeb737b97d02ec3a67327aa16dae3c152b0 +Author: VMwareDev Randy +Date: Thu Jun 2 12:54:03 2016 -0400 + + remove duplicated code/defines form snmpTargetAddrEntry + + bad merge? + + Signed-off-by: Robert Story + +commit c54d4a140c49f4e5f337893a93d469f793c55335 +Author: VMwareDev Will +Date: Thu Mar 19 22:15:49 2015 -0700 + + change a struct name so it doesn't conflict with another identical name + + Signed-off-by: Robert Story + +commit 61ac63fa6ee668cb873c633b84bdd873d9baab1d +Author: VMwareDev Randy +Date: Tue Apr 14 14:20:48 2015 -0400 + + add missing error handling in notifyTable + + Signed-off-by: Robert Story + +commit cd66a37276aa4e736947e0629b296f2ca5fff3c4 +Author: VMwareDev Randy +Date: Tue Apr 14 14:13:22 2015 -0400 + + use constant for max notification name len + + Signed-off-by: Robert Story + +commit 6b4ce3ecc1f16de90e8c13d4b49f42736d670535 +Author: VMwareDev Will +Date: Wed Mar 23 23:19:45 2016 -0700 + + remove C++ comments + + Signed-off-by: Robert Story + +commit 8b8e73942cfffeb82c0e328c4d0e975f399e0a77 +Author: VMwareDev Randy +Date: Fri Apr 3 18:26:42 2015 -0400 + + address Fortify memory leaks + + Signed-off-by: Robert Story + +commit b899c804eed3eb4024e70c241904d39b0a14075a +Author: VMwareDev Randy +Date: Sat Feb 14 15:44:52 2015 -0500 + + fix whitespace, typos; remove old warning + + Signed-off-by: Robert Story + +commit 966d9dbe85ebc2ff1ae6f13d6b69ed2385bb51ca +Author: VMwareDev Randy +Date: Sat Feb 14 15:44:08 2015 -0500 + + fix compiler warnings + + - unused var/functions + - add const where possible + + Signed-off-by: Robert Story + +commit 0bc5e42d48533f179cf6eef4a086b9bca45488f5 +Author: VMwareDev Randy +Date: Mon Feb 9 10:38:05 2015 -0500 + + add-trap callback tweaks + + - add rc to callback args struct so callers knows success/failure + - change netsnmp_create_notification_session to return session, and + rename it to netsnmp_create_v1v2_notification_session and make public + + Signed-off-by: Robert Story + +commit a16b1327659e064d6c21ba1fe40b7f186f662c6a +Author: VMwareDev Randy +Date: Mon Feb 9 10:22:24 2015 -0500 + + add cleanup on shutdown, fix feature stuff, misc code cleanup + + Signed-off-by: Robert Story + +commit e2f86edfca88b3f68ddf5512f49132f6c9637d0b +Author: VMwareDev Randy +Date: Sat Jan 24 10:42:03 2015 -0500 + + allow trap sinks to set name, tag, profile + + Signed-off-by: Robert Story + +commit f770e0f7493204f184c468a7c4dba31f0cd6fc5d +Author: VMwareDev Randy +Date: Fri Jan 23 13:47:43 2015 -0500 + + skip send_trap callbacks if no sessions for version + + Signed-off-by: Robert Story + +commit de8bc3c2d4acf9d276a2060f627fbc5ea0824415 +Author: VMwareDev Randy +Date: Fri Jan 23 08:58:10 2015 -0500 + + separate notification storage from MIB implementation + + Signed-off-by: Robert Story + +commit cdbfb179b223c4bd76951ffad773206c82922941 +Author: VMwareDev Randy +Date: Fri Jan 23 13:46:03 2015 -0500 + + new netsnmp_build_trap_oid() to build v2 snmpTrapOID for v1 traps + + Signed-off-by: Robert Story + +commit b7a910c08d7fef13b554555b1e19bd9a7974e557 +Author: Niels Baggesen +Date: Wed Sep 21 20:49:59 2016 +0200 + + Correct check for IP_PKTINFO to make it work for Solaris and NetBSD 7. + +commit a0d5c8a1010aeb74f47ee74a4efa6b61b053b161 +Author: Robert Story +Date: Wed Sep 21 09:53:42 2016 -0400 + + remove transport deprecated warning + +commit 7a956be442f1b27143f1abb5c9e68756ef1bed3a +Author: Niels Baggesen +Date: Wed Sep 21 07:37:46 2016 +0200 + + Fix IPv6 transport after recent updates. + +commit bf27cfca01580950c5e0642d60aff490f95f3791 +Author: Bill Fenner +Date: Mon Sep 19 07:07:36 2016 -0700 + + The struct is actually netsnmp_container_s. + + change 60f97905 introduced a forward declaration of + "struct netsnmp_container", but the struct in + container.h is "struct netsnmp_container_s", and + "netsnmp_container" is a typedef. This means + that code that includes both snmp_transport.h + and container.h won't compile. + +commit fd3cf7ca6ae9a8052a76d93401ce2640e67f43e5 +Author: Magnus Fromreide +Date: Sun Sep 18 23:04:01 2016 +0200 + + Remove empty statements. + +commit 9e873b1a465c26623478bf9f3cb4ea661ba1b999 +Author: Magnus Fromreide +Date: Sun Sep 18 00:56:04 2016 +0200 + + Remove a spurious semicolon among the variable declarations as that empty statement ends the variable declaration part of the function in c89. + +commit 25c0b8660b62b2cc0b6f0492e2284c1d0c792ca7 +Author: Robert Story +Date: Fri Sep 16 12:34:57 2016 -0400 + + add VMware copyright notices + +commit c49d43ed8bdbf454821322a45a52b5ccd97a7f4d +Author: Robert Story +Date: Fri Sep 16 11:28:47 2016 -0400 + + add missing test for sha2 support + +commit 39fe4f07df7d3a0a696fec43ce57896fd7c2249f +Author: VMwareDev Randy +Date: Thu May 14 17:42:38 2015 -0400 + + common parsing for snmpv3 options + + Signed-off-by: Robert Story + +commit c00b662b21c104b47bf730068c1e271878d4278e +Author: VMwareDev Will +Date: Wed Mar 25 15:40:41 2015 -0700 + + fix typo in new usm/Ku code + + Signed-off-by: Robert Story + +commit 6cad7a4385678a2f4a3a3e1894a8ceaf3990e9b7 +Author: VMwareDev Randy +Date: Sun Mar 22 22:09:36 2015 -0400 + + check user flag for saving kukey + + Signed-off-by: Robert Story + +commit ef1e2bf427a86feada4849f1f409a6b2cbcb3810 +Author: VMwareDev Randy +Date: Thu Sep 15 22:26:25 2016 -0400 + + add src to v3 notif sess, save engineID in sessions + + - use tspec for transport creation + + Signed-off-by: Robert Story + +commit cce5bba0062a8dbf1335a4c04280ebf2bb8bda00 +Author: VMwareDev Randy +Date: Thu Sep 15 22:54:01 2016 -0400 + + add usmUser flags field + + Signed-off-by: Robert Story + +commit cebd7ba90ccaa97ddf23e0667d5a6f1336d26a83 +Author: VMwareDev Randy +Date: Wed Sep 14 16:44:39 2016 -0400 + + tweak usm error handling + + - use more specific message if available + - free user on any error + + Signed-off-by: Robert Story + +commit 8687db38672f8088b919798a3adb25478c04199d +Author: VMwareDev Randy +Date: Thu Sep 15 23:06:21 2016 -0400 + + use saved master key instead of localized key + + - also copy, not dup + + Signed-off-by: Robert Story + +commit 41dc4896fb3ffbb4726f5e8bcdb3b79d8fd66ed6 +Author: VMwareDev Randy +Date: Wed Sep 14 17:02:55 2016 -0400 + + keep master keys in usm structure + + Signed-off-by: Robert Story + +commit 18c43633249fa3bde6bd96ae7e95fdec875c176b +Author: VMwareDev Randy +Date: Wed Mar 18 09:15:17 2015 -0400 + + add engineId to netsnmp_create_v3user_notification_session + + Signed-off-by: Robert Story + +commit 4641464b4ec21a39c5d1a9b5976434b192a4bf2c +Author: VMwareDev Randy +Date: Thu Sep 15 22:13:27 2016 -0400 + + netsnmp_create_v3user_notification_session + + Signed-off-by: Robert Story + +commit df26f8f2d51409827a3ce131c1b9de67d01ee6e5 +Author: VMwareDev Randy +Date: Thu Sep 15 23:16:53 2016 -0400 + + add source addr/port option to trapsink/trap2sink/informsink + + Signed-off-by: Robert Story + +commit 6b7350749490dc38709053331f3c83799d03ca6a +Author: VMwareDev Randy +Date: Thu Sep 15 23:21:37 2016 -0400 + + allow trap sinks to set name, tag, profile + + Signed-off-by: Robert Story + +commit 24d3e8714d73e0f914e823943f147038d896602a +Author: VMwareDev Randy +Date: Thu May 14 17:43:45 2015 -0400 + + case-insensitive searching in list/slist + + Signed-off-by: Robert Story + +commit ae62b6f72e707f854d4a7cafb6e754a2744440a7 +Author: VMwareDev Randy +Date: Fri Jun 3 19:57:42 2016 -0400 + + add missing space in usmUser creation + + Signed-off-by: Robert Story + +commit 2e6196582086075107d218f13add0cb407ec75c9 +Author: VMwareDev Randy +Date: Tue Apr 14 14:19:49 2015 -0400 + + usm user fixes + + - fix cut-n-paste error in default priv protocol + - add usm_remove_usmUser & usm_remove_usmUser_from_list + - use new usm_remove_usmUser_from_list in usm_remove_user_from_list + + Signed-off-by: Robert Story + +commit 5ba5b846be7b03e0afb25a7357e229a593b9a583 +Author: VMwareDev Randy +Date: Wed May 11 20:43:18 2016 -0400 + + update SHA-2 auth OIDs from RFC 7860 + + Signed-off-by: Robert Story + +commit bc41f96f3f2046e977b58b4b568954e2576f8ca0 +Author: VMwareDev Randy +Date: Mon May 25 15:07:46 2015 -0400 + + add missing SHA define + + Signed-off-by: Robert Story + +commit f2f86778a0eeebcbe829deecf8d5edfd855dbb3e +Author: VMwareDev Randy +Date: Wed May 6 18:36:45 2015 -0400 + + add support for SHA-224 SHA-256 SHA-384 SHA-512 args + + - also use SNMP_DEFAULT_*_PROTO defines instead of hardcoding + + Signed-off-by: Robert Story + +commit bd1070d6e38c0c7be42168199b42d515cc21ceed +Author: VMwareDev Randy +Date: Thu Sep 15 23:26:46 2016 -0400 + + configure: move SHA2 tests from DTLS to OpenSSL section + + Signed-off-by: Robert Story + +commit 09ac3f2f68b2cf4bc3ff98d41a7e945c5eabffbb +Author: VMwareDev Randy +Date: Thu May 14 17:40:47 2015 -0400 + + more sha2 support changes + + - bump max usm authsize to support sha512; bump KU_LEN too + - new sc_get_auth_maclen, sc_get_openssl_hashfn, usm_get_auth_oid + - add some missing ifdefs, fix others + - add slist with authtype mappings + + Signed-off-by: Robert Story + +commit d6a9d9db449b8114a315b27697d91c4a1242879d +Author: VMwareDev Randy +Date: Tue May 5 17:21:17 2015 -0400 + + update code to use sc_get_authtype() + + Signed-off-by: Robert Story + +commit 469c23efb01489e065f970bf8672f9879839f758 +Author: VMwareDev Randy +Date: Tue May 5 17:17:59 2015 -0400 + + new sc_get_authtype() to get type from OID + + - new sc_get_proper_auth_length() get length for type (instead of OID) + - add lengths for new sha2 types + + Signed-off-by: Robert Story + +commit 8c89cd63b1416960afeba6f91741152d8592703e +Author: VMwareDev Randy +Date: Tue May 5 17:13:35 2015 -0400 + + add new sha2 auth protocols + + - new NETSNMP_USMAUTH_* integer type macros, using last subid of OID + + Signed-off-by: Robert Story + +commit e4c19527ec18f401cd6d9ce1e26032cc3249714c +Author: VMwareDev Randy +Date: Mon Mar 23 10:04:22 2015 -0400 + + fix compile when system-auth not configured + + Signed-off-by: Robert Story + +commit 12342576a437e862258dbc411ad19ebb15152e6e +Author: VMwareDev Randy +Date: Sun Mar 22 23:11:15 2015 -0400 + + fix merge + + Signed-off-by: Robert Story + +commit 9015732b5c731d57c2f6e937665180330f7c52e8 +Author: VMwareDev Randy +Date: Sun Mar 22 22:56:34 2015 -0400 + + handle missing priv protocol for system authpriv + + Signed-off-by: Robert Story + +commit 298cea2ae8094f65b11349d97aaad9755fcd0660 +Author: VMwareDev Randy +Date: Sun Mar 22 20:15:51 2015 -0400 + + always require auth/priv type + + - new 'default' to use system default + - check that specified value matches system default + + Signed-off-by: Robert Story + +commit 00eca550a816becd392fdae706ad7d17c526e672 +Author: VMwareDev Randy +Date: Fri Mar 20 22:01:12 2015 -0400 + + move usmUser key length check/truncation outside ifdef + + Conflicts: + snmplib/snmpusm.c + + Signed-off-by: Robert Story + +commit d426a5c2fd74806c21cd055ec82807c3151aeaba +Author: VMwareDev Randy +Date: Thu Mar 12 01:09:05 2015 -0400 + + add --enable-usmUser-uses-default-auth-priv + + Conflicts: + configure.d/config_project_with_enable + + Signed-off-by: Robert Story + +commit 62e30bdb509e08a91c01ad12c6da3cfdb2f07baa +Author: VMwareDev Randy +Date: Thu Mar 12 01:20:01 2015 -0400 + + set errorMsg for short priv passphrase + + Signed-off-by: Robert Story + +commit c97a99647cad83e3c2f58c69eb2a2f3677799d07 +Author: VMwareDev Randy +Date: Mon Feb 2 10:38:37 2015 -0500 + + new usm_create_usmUser* + + Signed-off-by: Robert Story + +commit c2ec4f1e283209350094400be0cfcdad8ad4ddca +Author: VMwareDev Randy +Date: Thu Jun 2 12:53:01 2016 -0400 + + move ipv6 test inside ipv6 ifdef + + Signed-off-by: Robert Story + +commit c6cc9a1fd013dbab179abf159e0eb117bd847f07 +Author: VMwareDev Randy +Date: Thu Jun 2 12:52:37 2016 -0400 + + fix com2sec[6] parse code and test cases + + - fix lengths for context/secName/community tests + - fix ipv6 hostnames for 1/2 AAAA record tests + - fix error code for context too long + - fix network/mask in debug output + + Signed-off-by: Robert Story + +commit 0a2a73bf7a155840ec857981a330ad5aefd8524b +Author: VMwareDev Randy +Date: Tue Apr 14 14:13:47 2015 -0400 + + fix swapped max length checks + + Signed-off-by: Robert Story + +commit 18d4bb9e07a5d893a97662d2494957ab955fee8b +Author: VMwareDev Randy +Date: Mon Apr 6 12:09:37 2015 -0400 + + address Fortify issue: check data length before using data ptr + + Signed-off-by: Robert Story + +commit 6773bbfd1643073640114b55b5d7465764be3d69 +Author: VMwareDev Will +Date: Fri Mar 20 13:56:11 2015 -0700 + + Werror fixes + + Signed-off-by: Robert Story + +commit 9d2c6f44e2bdc3fee8a090f64d936f035f3f42aa +Author: VMwareDev Randy +Date: Thu Mar 19 23:17:03 2015 -0400 + + only bind if have addr + + Signed-off-by: Robert Story + +commit 6906ba1c59b9996b075c99654bbf11321bb31f52 +Author: VMwareDev Randy +Date: Thu Mar 19 23:15:20 2015 -0400 + + copy max msg size from base transport + + Signed-off-by: Robert Story + +commit f82dd2276688534fd7d46178e68692cedd70a03c +Author: VMwareDev Randy +Date: Thu Mar 19 22:54:41 2015 -0400 + + fix uninitialize variable, length checks, string offsets + + Signed-off-by: Robert Story + +commit 99b4c51c46bf94b0392cc589d97983ed2e1f2a17 +Author: VMwareDev Randy +Date: Fri Mar 13 13:41:13 2015 -0400 + + call correct base transport function + + Signed-off-by: Robert Story + +commit f71f38e5fd1b7d23b441f54b773329adf3cca3c5 +Author: VMwareDev Randy +Date: Fri Mar 13 12:13:02 2015 -0400 + + return UNKNOWN if we cant format addr + + Signed-off-by: Robert Story + +commit a9ce31c4b8187aea07a648cf115e956159ac072e +Author: VMwareDev Randy +Date: Wed Mar 4 20:02:32 2015 -0500 + + refactor receive api, handle shared transports + + - break _sess_process_packet into _sess_process_packet_parse_pdu and + _sess_process_packet_handle_pdu + - extract _sess_read_accept and _sess_read_dgram from _sess_read + + Signed-off-by: Robert Story + +commit 5d8372341594b5a7e0ba1b6ec76463bf6d926bbe +Author: VMwareDev Randy +Date: Thu Sep 8 22:13:17 2016 -0400 + + shared transport + udp shared domain + + - refactor udp ipv4/6 base; break into smaller functions & export them + - add transport cache + - add tspec create for UDPDomain + - update tspec struct to use generic flags instead of just 'local' + + Signed-off-by: Robert Story + +commit 6c8ef76cd08a27eae8d92c314a65b9047807a02e +Author: VMwareDev Randy +Date: Fri Feb 13 18:09:01 2015 -0500 + + fix missed pointer change, undo whitespace change + + Signed-off-by: Robert Story + +commit d5bfbf6de74d77ce047700c119a8b5b1f529d230 +Author: VMwareDev Randy +Date: Wed Feb 11 17:54:04 2015 -0500 + + new com2sec api + + Signed-off-by: Robert Story + +commit 4ad277f8ba2c6a684be42b0660b6480eb15c19c1 +Author: VMwareDev Randy +Date: Tue Nov 25 18:43:12 2014 -0500 + + add source addr/port option to trapsink/trap2sink/informsink + + Signed-off-by: Robert Story + +commit 60f97905363b84e0187eeb3b3543c72977af611b +Author: VMwareDev Randy +Date: Tue Nov 25 18:39:09 2014 -0500 + + add support for specifying client addr/port for UPDv4 transport + + - adds a new transport domain function, create_from_tspec. + - a new structure, netsnmp_tdomain_spec, hold parameters, so that + additional parameters can be added in the future without having + to change the whole API stack. + + Signed-off-by: Robert Story + +commit 493e6e3928df91c9dd14d9cf1fb062284d1b1f8f +Author: Niels Baggesen +Date: Tue Sep 13 18:19:54 2016 +0200 + + RFC 7939 updated NHDP-MIB + +commit 367c44eb60565d126a51b3e66b54bc4384e62c7e +Author: Niels Baggesen +Date: Tue Sep 13 18:18:58 2016 +0200 + + Support for OpenBSD 6.0 + +commit d6e7f8962b110a2cd65667b2c57a8a60ad3cd222 +Author: Niels Baggesen +Date: Wed Aug 31 21:43:36 2016 +0200 + + at.c: properly check return status from realloc. Thanks to Daniel Eiland (bug 2678) + +commit 7cdb389a2814c6fdc0e7d9c43248329bfc028e3b +Author: Niels Baggesen +Date: Wed Aug 31 21:17:17 2016 +0200 + + kernel_sunos5: fix a possible buffer overrun. Thanks to lvosh. + +commit 0e6c1927d2ee2f4abaf18160016c10fd13712a95 +Author: Niels Baggesen +Date: Wed Aug 31 20:59:29 2016 +0200 + + snmptrapd.c: First stringop after malloc must be strcpy, not strcat. Tankts to Jaap Keuter. + +commit 7d3d56f07d3bd88d2583ee8832ec756af377215e +Author: Niels Baggesen +Date: Tue Aug 30 07:59:12 2016 +0200 + + Backport fix for MIB files with space in the name + +commit 5d819c82a54589138fbe8ad7e5011f0e656b497c +Author: Niels Baggesen +Date: Tue Aug 30 07:36:33 2016 +0200 + + Fix failure to handle MIB files with space in names. + +commit 85297cfadff81606d5a3b5ab162b39e5966ed963 +Author: Niels Baggesen +Date: Tue Aug 30 07:31:31 2016 +0200 + + Document the "octet" varbind type for pass/pass_persist. Thanks to Sam Tannous. + +commit 088622974007093fbb63f4a5964427f3c754e26d +Author: Bart Van Assche +Date: Sat Jul 23 19:37:03 2016 -0700 + + configure: Convert acconfig.h into AH_TOP() and AH_BOTTOM() + + This patch avoids that autoheader prints the following warning: + + autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' + autoheader: WARNING: and `config.h.top', to define templates for `config.h.in' + autoheader: WARNING: is deprecated and discouraged. + autoheader: + autoheader: WARNING: Using the third argument of `AC_DEFINE' and + autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without + autoheader: WARNING: `acconfig.h': + autoheader: + autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1, + autoheader: [Define if a function `main' is needed.]) + autoheader: + autoheader: WARNING: More sophisticated templates can also be produced, see the + autoheader: WARNING: documentation. + +commit faa1af0e1f45b9533198beb693446699c683e969 +Author: Bart Van Assche +Date: Sat Jul 23 19:08:09 2016 -0700 + + T011snmp_old_api_registration_cagentlib: Expect that duplicate registrations are refused + +commit 4e793461e96a2b4fd81142ab312d074d5c8841fa +Author: Bart Van Assche +Date: Sat Jul 23 18:41:10 2016 -0700 + + CHANGES: BUG: 2712: Fix Perl module compilation + + Avoid that building the Net-SNMP Perl modules fails as follows: + + ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assignment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229. + + See also https://sourceforge.net/p/net-snmp/bugs/2712/. + +commit 71e487212bd65839e7454df9701524d08cf0d74f +Author: Niels Baggesen +Date: Thu Jul 21 21:45:26 2016 +0200 + + fsys.h: put paranthesis around macros which are expressions + +commit f6ffa6f131fd82068773fcebdcbf2cdf2412cc03 +Author: Niels Baggesen +Date: Thu Jul 21 21:41:28 2016 +0200 + + Bug#2726: Fix memory leak from udpEndpointTable when attemptinmg to insert duplicate. Thanks to Marc Branchaud + +commit e0ef511ce8c1b69fda79447eb9d790f409eb00f2 +Author: Niels Baggesen +Date: Thu Jul 21 16:32:51 2016 +0200 + + gcc 2.95 does not grok cpp directive inside macro call. + +commit 536bd305f8dbd8cb62b647e1ce768e4b369a8c1c +Author: Niels Baggesen +Date: Thu Jul 21 16:28:58 2016 +0200 + + OpenBSD: Fix a bad type causing crash with compiled in 32-bit mode. + +commit d28eefcf4062091f6dd35a64c0fbae55ad04aaf3 +Author: Bart Van Assche +Date: Wed Jul 20 19:21:20 2016 -0700 + + configure: Handle CFLAGS=-Werror=format-security etc. correctly + + See also https://sourceforge.net/p/net-snmp/patches/1330/. + +commit d8b12900629ed73a78b27535f08c4f0a721a93be +Author: Jeff Gehlbach +Date: Wed Jul 30 17:51:55 2014 -0400 + + CHANGES: snmpd: Add -cacheTime and -execType flags to "extend" config directive + + Add the following two flags to the "extend" config directive: + -cacheTime specifies the cache timeout. + -execType specifies the execution type (sh or exec). + + This enables non-volatile configuration of two aspects that + so far have been configurable only temporarily via SETs. + + See also https://sourceforge.net/p/net-snmp/patches/1290/. + +commit 32cc6c32f96f17a5a4ccab1ae3a3896894fb4b97 +Author: Bart Van Assche +Date: Tue Jul 19 20:17:15 2016 -0700 + + configure: Do not discard CFLAGS added by the configure script + + This patch restores embedded perl support and fixes a regression + introduced by commits 7c38dba0 / cd617c19. + +commit a3187c4569431ebee321e2bb0d5330eb5ea1b839 +Author: Robert Story +Date: Fri Jul 15 16:53:24 2016 -0400 + + dont call upper_bound for unsorted container + +commit 7c38dba0816eca9bd20378aab2313329502ed565 +Author: Robert Story +Date: Thu Jul 7 13:16:52 2016 -0400 + + run autoconf + +commit ded9cb57273da5c9518a281521dc1227fe03e894 +Author: Robert Story +Date: Thu Jul 7 13:14:12 2016 -0400 + + add VMware copyright to patched files + +commit 692c31cad01d3379713b86b6335419177f4e6281 +Author: Robert Story +Date: Thu Jul 7 11:02:52 2016 -0400 + + run autoconf + +commit 3b11b216f95b49ff731dcfab72da768913a6dde3 +Author: VMwareDev Randy +Date: Thu Jun 9 15:18:28 2016 -0400 + + ifdef function when unused + + Signed-off-by: Robert Story + +commit 85b869656562ab822837d128cfa3a251fefbe268 +Author: VMwareDev Randy +Date: Sat Jun 4 17:33:44 2016 -0400 + + add numbers to make some error messages unique + + Signed-off-by: Robert Story + +commit bbf3c43497993a18631329acd08b7013ff7e10e3 +Author: VMwareDev Randy +Date: Tue Apr 14 14:23:38 2015 -0400 + + limit loghandler priority levels + + Signed-off-by: Robert Story + +commit f6c78fbb7b16f86b5899370f8ffdb994ff6cac25 +Author: VMwareDev Randy +Date: Thu Apr 30 13:41:38 2015 -0400 + + missing endif + + Signed-off-by: Robert Story + +commit 40cebbcfbe3d580422f05c2194ce8b40fbddd868 +Author: VMwareDev Randy +Date: Thu Apr 16 20:41:59 2015 -0400 + + pass handler return code up to caller on error + + Signed-off-by: Robert Story + +commit 49235cd9f075dcb943355cf18d8da38420e1a99e +Author: VMwareDev Randy +Date: Thu Apr 16 11:37:48 2015 -0400 + + fix more compiler warnings, typos + + Signed-off-by: Robert Story + +commit 998df5d1ad58519f8358832db8a738099738aaad +Author: VMwareDev Randy +Date: Fri Apr 3 22:19:15 2015 -0400 + + various fixes noticed while reviewing Fortify issues + + - null checks + - typos + + Signed-off-by: Robert Story + +commit 795d77c4f54b6dfd196634707a502c6cb6ec20b8 +Author: VMwareDev Randy +Date: Fri Apr 3 22:14:31 2015 -0400 + + address mib handler related Fortify leaks + + - don't create structures/memory inline in function calls + - log messages on errors + - follow convention that register functions free reginfo on errors + + Signed-off-by: Robert Story + +commit 8a41289629fcd5940cde23bf8668caa79fc7f944 +Author: VMwareDev Randy +Date: Fri Apr 3 18:26:42 2015 -0400 + + address Fortify memory leaks + + Signed-off-by: Robert Story + +commit 09679a2c47223b96930d388afac254bf001fc0c6 +Author: VMwareDev Randy +Date: Mon Mar 23 13:47:58 2015 -0400 + + fix fortify issues + + - type mismatch + - null deref + + Signed-off-by: Robert Story + +commit 6f7a5921b79b3e01479fca592892937e084503e0 +Author: VMwareDev Randy +Date: Fri Mar 13 13:57:42 2015 -0400 + + rework netsnmp_ipv6_fmtaddr + + - strlcat/strlcpy instead of snprintf + - preallocate buffer instead of static size + + Signed-off-by: Robert Story + +commit 0c1284d76b39cba4135e3ecdd7cfff72eb0b6a31 +Author: VMwareDev Randy +Date: Fri Mar 13 12:11:01 2015 -0400 + + increase viewSubtree size to account for length + + Signed-off-by: Robert Story + +commit 742651004e142e0c6fb3abc5a0303cebba105f35 +Author: VMwareDev Randy +Date: Fri Mar 27 12:52:00 2015 -0400 + + add debug shutdown to free tokens + + Signed-off-by: Robert Story + +commit a9850f4445cf4bebf8f04f0d2168042a3726fed1 +Author: VMwareDev Randy +Date: Mon Mar 30 21:03:34 2015 -0400 + + asn parse: add NULL checks, check length lengths + + - that is, make sure we have enough data to parse length before + parsing length. + + Signed-off-by: Robert Story + +commit cd617c192a95a3b5384895c6457c093e1869338e +Author: VMwareDev Randy +Date: Wed Mar 25 16:33:39 2015 -0400 + + disable Werror for all configure tests + + Signed-off-by: Robert Story + +commit d321533c74b57279e63a38e56f4e7dfae731acde +Author: VMwareDev Randy +Date: Wed Mar 25 16:22:26 2015 -0400 + + another Werror fix + + Signed-off-by: Robert Story + +commit 235ed8ccbb872a0e9e47c3f70ad446b5a4ea716e +Author: VMwareDev Randy +Date: Tue Mar 24 12:47:15 2015 -0400 + + fix ptr math in memset + + Signed-off-by: Robert Story + +commit 77679a0dde15d61bc5a17373442c46189978d327 +Author: VMwareDev Randy +Date: Mon Mar 23 13:52:05 2015 -0400 + + better logging for unknown addr size in netsnmp_udpbase_send + + Signed-off-by: Robert Story + +commit 8a0243dc25b9ea32c195befe04e04b7a0807749b +Author: VMwareDev Randy +Date: Mon Mar 23 13:51:26 2015 -0400 + + allow ipv6 in netsnmp_gethostbyname + + Signed-off-by: Robert Story + +commit ae6c81f1789e36af831727b08240bd4e2814f854 +Author: VMwareDev Randy +Date: Fri Mar 20 16:44:16 2015 -0400 + + tests T132 and T142 don't use DES, so don't require it + + Signed-off-by: Robert Story + +commit cea974008da30de8d39a1f8ede7189265d93d598 +Author: VMwareDev Randy +Date: Fri Mar 13 12:11:44 2015 -0400 + + clear stack variable before use + + Signed-off-by: Robert Story + +commit 141c754461d51cf8573a9c81e2a4f9d35d382042 +Author: VMwareDev Randy +Date: Wed Mar 11 23:59:36 2015 -0400 + + no debug/len for failure case + + Signed-off-by: Robert Story + +commit 2d2792d1b30ea88c558cc76e59ba49e1638e4664 +Author: VMwareDev Randy +Date: Thu Mar 5 18:45:58 2015 -0500 + + handle netsnmp_indexed_addr_pair in ipv6 fmtaddr + + Signed-off-by: Robert Story + +commit fc5691d827a49fb36b078e4261d18a4a2bd63072 +Author: VMwareDev Randy +Date: Wed Mar 4 22:54:25 2015 -0500 + + use default free_item function + + Signed-off-by: Robert Story + +commit dd4c51a0b252c60062d5df0ba9f8e9dc0d6f27ee +Author: VMwareDev Randy +Date: Wed Mar 4 22:52:11 2015 -0500 + + use unique reqid/msgid for each trap sent + + Signed-off-by: Robert Story + +commit e70434007a7174580c78e5f57eeb68fa89371ce7 +Author: VMwareDev Will +Date: Wed Feb 11 23:43:39 2015 -0800 + + Use a ns_ prefix for function names that may conflict with math.h + + Signed-off-by: Robert Story + +commit 6e08b089d692bfce3643624089ee0be0d4cf3d5c +Author: VMwareDev Will +Date: Wed Feb 11 23:43:24 2015 -0800 + + Fix a const char * warning + + Signed-off-by: Robert Story + +commit 8d6f30c35f962d620eba141a3cf95965d74ba2ab +Author: VMwareDev Will +Date: Wed Feb 11 23:43:04 2015 -0800 + + Fix -Werrors regarding va_arg types + + Signed-off-by: Robert Story + +commit b3cfe3642d1210051979f667695fa2ae33fd7f45 +Author: VMwareDev Randy +Date: Tue Feb 3 20:57:17 2015 -0500 + + ifdef unused variable + + Signed-off-by: Robert Story + +commit 99a815f4f06ffc98ff6510f3a28d1fc4b39810fb +Author: VMwareDev Randy +Date: Tue Feb 3 20:11:14 2015 -0500 + + simplify ifndef block + + Signed-off-by: Robert Story + +commit 7ac7f70b63419d14e26a136ce693b19da24716a5 +Author: VMwareDev Randy +Date: Wed Jan 7 23:20:39 2015 -0500 + + fix typo in comment + + Signed-off-by: Robert Story + +commit 03b4d74db71168bdeb7c58b05a3241d243c1a39e +Author: VMwareDev Randy +Date: Wed Jan 7 10:13:35 2015 -0500 + + CHANGES: snmplib: fix bug that could drop log destinations + + Signed-off-by: Robert Story + +commit 8c91fd830c8ae180ca582893a2b74e1e7c56a79e +Author: VMwareDev Randy +Date: Fri Jan 2 02:14:24 2015 -0500 + + fix v2 errors in v1 responses when no write support + + Signed-off-by: Robert Story + +commit 777737d5a850ad54377d48d44f639fddbe80c752 +Author: VMwareDev Randy +Date: Fri Jan 2 02:12:24 2015 -0500 + + skip md5/des test if des is disabled + + Signed-off-by: Robert Story + +commit 1423c883031a420f4005ed9e0836610c676519fa +Author: VMwareDev Randy +Date: Fri Jan 2 02:11:52 2015 -0500 + + more informative config errors for DISABLE_DES & !HAVE_AES + + Signed-off-by: Robert Story + +commit 9bce2c9519a0551ee0c82ac4706fd9f3f875feab +Author: VMwareDev Randy +Date: Wed Jan 7 09:42:10 2015 -0500 + + CHANGES: BUG: 2387: fixed memory leak when request id is 0 + + Signed-off-by: Robert Story + +commit b12df261ae66dd8240a487f0c02b3d578276ee90 +Author: VMwareDev Randy +Date: Wed Jan 7 09:10:24 2015 -0500 + + clear to end of oid name to keep valgrind happy + + Signed-off-by: Robert Story + +commit 22deb593986f29615ff7dd602c02c6544ccd564a +Author: VMwareDev Randy +Date: Wed Jan 7 09:09:56 2015 -0500 + + tweaks for --disable-set-support + + - reject set before vacm checks + - reject with noerror if no varbinds sent + + Signed-off-by: Robert Story + +commit 26f18eee6d77c21537783bf235a1858fa1347ed6 +Author: VMwareDev Randy +Date: Mon Dec 15 11:00:10 2014 -0500 + + remove unused variable + + Signed-off-by: Robert Story + +commit 639f63b84e0479db4221fcdcf3975a708af0a077 +Author: VMwareDev Randy +Date: Wed Dec 17 15:43:20 2014 -0500 + + vacm mib getnext fixes: dont bail on illegal values + + Signed-off-by: Robert Story + +commit c4f8f326e38085f96df40a5ca2d62991d1780acd +Author: VMwareDev Randy +Date: Tue Dec 16 22:48:28 2014 -0500 + + Fix Silvercreek 2.1.3.2 + + use oid instead of int for suboid + + Signed-off-by: Robert Story + +commit 9e4b85d67cf5fc1c119967738545d1f1fe2d3307 +Author: VMwareDev Will +Date: Tue Dec 9 12:22:51 2014 -0800 + + fixed failed detection of functions when -Werror is specified + + Signed-off-by: Robert Story + +commit 284ca60741be5050cb86fd83c357c8fa16225170 +Author: VMwareDev Will +Date: Fri Nov 21 15:41:34 2014 -0800 + + warning fixes for unused functions and variables + + Signed-off-by: Robert Story + +commit 20a70a7af5af206e5ed757b147a11ef2e6235b6b +Author: VMwareDev Will +Date: Fri Nov 21 13:45:01 2014 -0800 + + ifdef out function definitions that aren't used when no-mib-loading is on + + Signed-off-by: Robert Story + +commit 3766ae13eb07946043d5dde94f6035c321792366 +Author: VMwareDev Will +Date: Fri Nov 21 13:02:07 2014 -0800 + + get rid of unused variable warnings + + Signed-off-by: Robert Story + +commit 19adffe3b11bc4b11e43760840a448072d7f9c32 +Author: VMwareDev Randy +Date: Sat Mar 8 00:27:26 2014 -0500 + + slight tweak to configure autoconf check + + Signed-off-by: Robert Story + +commit 3850b172597835dc4c51b1a4226b6c9f929ce963 +Author: Niels Baggesen +Date: Fri Jun 17 11:54:23 2016 +0200 + + IANAifType-MIB: yet another update ... + +commit f9e2427686e084f25b5ab40975084e88bac2f2f7 +Author: Niels Baggesen +Date: Fri Jun 17 11:53:25 2016 +0200 + + rfclist: add RFC 7870 DSLite-MIB + +commit 0552e837a8171f143a62109f2b7ac614c652303f +Author: Niels Baggesen +Date: Wed Jun 15 21:27:50 2016 +0200 + + smistrip: do white space cleanup of rfc/iana mibs. Update mibs to cleaned versions. + +commit 29ac917b7d903b5bd7a28dc834915ff17b763afb +Author: Niels Baggesen +Date: Wed Jun 15 08:54:21 2016 +0200 + + Update to current IANAifType-MIB + +commit 0dc151a72ce495d3d94704efba609505e465292b +Author: Niels Baggesen +Date: Mon Jun 13 16:50:08 2016 +0200 + + UCD-SNMP-MIB: Add 64-bit memory objects for large servers. + +commit ebdc84df87eee303d7f5cbb858d17d468f1ff551 +Author: Niels Baggesen +Date: Mon Jun 13 16:12:02 2016 +0200 + + OpenBSD5.9: fixes to handle this OS. + +commit 8f05c1afbbe60243879d51abb4e228f7770d5512 +Author: Niels Baggesen +Date: Mon Jun 13 16:10:33 2016 +0200 + + udpTable: fix goind one over array when using kvm_getfiles. + +commit 8bbd51fb4f846dfc112cb32caa788652056f7320 +Author: Niels Baggesen +Date: Thu May 26 21:31:15 2016 +0200 + + BUG#2714: properly restore NETSNMP_DS_LIB_CLIENT_ADDR in _sess_open. Thanks to Jeremiah Martell. + +commit 2573c3d378c976cb9d54ad460f5f46218656f2b1 +Author: Niels Baggesen +Date: Thu May 26 21:10:53 2016 +0200 + + FreeBSD: Fix wrong masking of diskIONReadX/NWriteX to 32-bits. + Thank to HJJakobsen for finding it. + +commit 296bdf92bd9a8f4877b6e6de7d18daba6cc4253e +Author: Niels Baggesen +Date: Thu May 26 21:07:53 2016 +0200 + + rfclist: Add RFC7856 SOFTWIRE-MESH-MIB + +commit 8dabf9a43cca47f65c3e4ada4aac1c9eb7e414e9 +Author: Niels Baggesen +Date: Wed Apr 27 20:41:53 2016 +0200 + + PATCH 1326/BUG 2503: Fix memory leak when walking ip forwarding tables. + Thanks to Christian Krause/Sam Tannous + +commit 313035a0bb204cf2b68b6d797916eeec4e2bbdef +Author: Niels Baggesen +Date: Wed Apr 27 20:38:19 2016 +0200 + + transports/snmpIPv6BaseDomain: respect NETSNMP_TRANSPORT_FLAG_HOSTNAME + when formatting address just as done for IPv4. + +commit cb268b66ee49a123ee36db18c1f4cdcf7bce477c +Author: Niels Baggesen +Date: Wed Apr 27 20:36:32 2016 +0200 + + Detect if mysql has my_load_defaults, and use it if so. + Required for MySQL 5.7 on Ubuntu 16.04. + +commit 5b07aa798e16918b762feb12e594a812ed790bab +Author: Niels Baggesen +Date: Wed Apr 27 20:30:57 2016 +0200 + + PATCH 1324: arp_netlink: Ignore messages not being AF_INET/AF_INET6 + Thanks to Sam Tannous. + +commit 71e6ff6eb2ab4c63fe1dca70e66253d2e04b235b +Author: Niels Baggesen +Date: Wed Apr 27 20:27:05 2016 +0200 + + IANA-RTPROTO-MIB: Update to current, fixing syntax error. + +commit a861f93d0f0c9e420ce77d7c261a712729464461 +Author: Niels Baggesen +Date: Fri Apr 15 17:35:22 2016 +0200 + + testing: Fedora24/RHEL7 does not install netstat by default. + Use /usr/sbin/ss as a replacement when testing. + +commit 995794a0218b6bb7a43bf23d53d4efde2a6686df +Author: Niels Baggesen +Date: Fri Apr 15 17:34:34 2016 +0200 + + IANA-RTPROTO-MIB: Update to current IANA version. + +commit 63c3e1c2553fc1bea1c175fccd499c48b875445d +Author: Niels Baggesen +Date: Fri Apr 15 17:30:51 2016 +0200 + + Update with rfc 7784 + +commit 678275783e3a2c4d7b34ef246b78447c7fe414a9 +Author: Bill Fenner +Date: Sat Apr 2 18:41:24 2016 +0000 + + If the status goes disabled after it starts, the probe is completed. + + As the comment said: if you are pinging something that does not + respond at all, the responses will never increase, and we should + be querying pingResultsSentProbes to make sure that the probe has + started. Now, if pingResultsSentProbes is nonzero and the status + becomes disabled, we consider the test to be completed. + +commit 74ffd19da3e4831f7d713d70125d760a71026a91 +Author: Bart Van Assche +Date: Sat Mar 5 15:38:17 2016 -0800 + + Revert "Trim output of net-snmp-config --cflags." + + This reverts commit 127274f8f27fba264a4c0f91190fd6f8037cdf21. Robert Story + explained as follows on the net-snmp-cvs mailing list why this patch is + wrong and needs to be reverted: + + Actually, I --cflags is supposed to be everything used to compile + the agent, so that subagents and modules for dlmod loading can be + built exactly the same. + + In particular, removing other flags can remove options that will + change structure sizes when parsing the headers, resulting in + binary incompatibilities. + + If you only need the include directories for some reason, please + add another option. + + +commit 127274f8f27fba264a4c0f91190fd6f8037cdf21 +Author: Jan Safranek +Date: Wed Feb 24 10:14:21 2016 +0100 + + Trim output of net-snmp-config --cflags. + + We should report CFLAGS needed to import and use Net-SNMP headers, not + CFLAGS used to compile actual Net-SNMP. + + E.g. we should not report various distro fortify-source options. + +commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6 +Author: Bart Van Assche +Date: Sat Feb 20 18:58:18 2016 -0800 + + Remove U64 typedef + + The U64 typedef conflicts with a typedef in a Perl header file. Hence + remove the U64 typedef from the Net-SNMP header files. This patch does + not modify the Net-SNMP ABI. + +commit ed4e48b5fab165d1ba4c431e31e543f808a2c25f +Author: Jan Safranek +Date: Wed Feb 10 14:00:12 2016 +0100 + + CHANGES: snmpd: fixed memory leak in ETHERLIKE-MIB. + + ke->name in stdup-ed at line 297: + n->name = strdup(RTA_DATA(tb[IFLA_IFNAME])); + +commit 3bbeec993754ab6fb3c23b3851479b8f714ac4db +Author: codarrenvelvindron +Date: Sun Jan 17 05:20:12 2016 +0000 + + Check for malloc failure + +commit d27ccfba26840ef8446152c007557ca4daa45a8f +Author: Jan Safranek +Date: Mon Jan 18 12:38:58 2016 +0100 + + Fixed potential bad free. + + When a 'default_domain' starts with a comma ',', the first strtok() + returns pointer somwehere to the 'default_domain' duplicate and not + to the first character. When cleaning up, make sure we try to free + the duplicate (i.e. tokenized_domain) and not the first found token + (which may be different). + +commit 8954ffd63ddd1e22b02473f0541b587013e146f4 +Author: Bart Van Assche +Date: Mon Dec 21 16:15:07 2015 +0100 + + .gitignore: Add apps/snmpping + +commit 0ac3c3d5ebe7db02505f60d763917b7d46715e22 +Author: Bart Van Assche +Date: Mon Dec 21 16:15:02 2015 +0100 + + Win32, MinGW, snmpping: Fix MinGW build + +commit e769fa1ddef4598e801fe3377d1a526976d07b2a +Author: Bart Van Assche +Date: Mon Dec 21 16:13:58 2015 +0100 + + Win32, MSVC, Perl modules: Give up if the Perl interpreter has been built with MSVC instead of gcc + +commit 24fee3539a7dfcbdac701d5c63768487e1822d87 +Author: Bart Van Assche +Date: Mon Dec 21 16:13:04 2015 +0100 + + Win32, MSVC, build.pl: Use File::Spec->catdir() + +commit 2dcb0a4fb18d475a313f093bff484aae8f9e3854 +Author: Bart Van Assche +Date: Mon Dec 21 16:11:29 2015 +0100 + + Win32: Micro-optimize perl/Makefile.PL + + Use Perl functions instead of invoking an external executable to + determine the current directory. + +commit 21be8d8c489a41594e6b73ea3ad788bc23450613 +Author: Bart Van Assche +Date: Mon Dec 21 16:11:25 2015 +0100 + + perl/*/Makefile.PL: Strip trailing whitespace + +commit 2b600693acc4947f3fdc3e64465485699e824a37 +Author: Bart Van Assche +Date: Mon Dec 21 16:11:21 2015 +0100 + + perl/*/Makefile.PL: Regenerate makefiles + +commit 224aee0d9915115502531b4af0dcf3bcfab9fd3f +Author: Bart Van Assche +Date: Mon Dec 21 16:11:14 2015 +0100 + + perl/make-perl-makefiles: Improve robustness + + Make it possible to run this script from another directory than the + perl directory. + +commit acddd4e69efc7653d49493c248a008e8d1676cec +Author: Bart Van Assche +Date: Mon Dec 21 16:11:09 2015 +0100 + + perl/Makefile.makefiles: Determine Makefile.PL list dynamically + +commit 7ea671729781e4f7e7b25c77fcb8940f8b126c3b +Author: Bart Van Assche +Date: Mon Dec 21 16:11:03 2015 +0100 + + Win32: Fix large fdset implementation + + Reported-by: Andreas Rieke + +commit f67f8f2b5d9779ecfb8f8f4bee32573e5b241afe +Author: Bart Van Assche +Date: Mon Dec 21 16:10:16 2015 +0100 + + .gitignore: Ignore Perl .json files + +commit c09140c934eb9de6b861cab063cdad66a721ffb1 +Author: Jan Safranek +Date: Mon Nov 30 14:26:46 2015 +0100 + + CHANGES: snmpd: Increase maximum AgentX packet size to 64kB. + +commit 45f256f87c32f7e851c88393ac2b626aa1e8cd4b +Author: Niels Baggesen +Date: Tue Nov 24 09:00:55 2015 +0100 + + BUG#2681: Add dynamic allocation to proxy parser. Thanks to +Date: Tue Nov 24 08:59:16 2015 +0100 + + Add RFCs 7577,7658,7659,7666 + +commit 85ac52cb0227bbda4cf0b3fbb506d25789e04446 +Author: Niels Baggesen +Date: Tue Nov 24 08:46:52 2015 +0100 + + BUG#2674: Remember to free buffer for control blocks. Thanks to Laurent GOUHIER. + +commit 40f9cb08787f41621fdaedccbe5793fad319bde2 +Author: Niels Baggesen +Date: Tue Nov 24 08:43:52 2015 +0100 + + BUG#2675: fix a stray close of filedescriptor. Thanks to Vit Zikmund. + +commit f561f6414a7a5b8be2be544f7b24fe6b529782b4 +Author: Niels Baggesen +Date: Tue Nov 24 08:32:43 2015 +0100 + + BUG#2675: fix a stray close of filedescriptor. Thanks to Vit Zikmund. + +commit 941ad547f5bdc47faeb27280b6d3047b21d1a239 +Author: Bart Van Assche +Date: Tue Oct 6 19:41:36 2015 -0700 + + CHANGES: MIB: Speed up reading /proc/net/tcp and /proc/net/tcp6 + + The time needed to read Linux procfs files is proportional to the + square of the quotient of the file size and the read buffer size. + Increase the read buffer size to decrease the time needed to read + large procfs files. + +commit 2331a015dcd95d7f34aa28962d1a37b5e360c646 +Author: Bart Van Assche +Date: Mon Oct 5 21:42:58 2015 -0700 + + BUG: 2671: container_binary_array takes O((n^2)*log(n)) time to insert n entries + + Change the complexity of netsnmp_binary_array_insert() from + O((n^2)*log(n)) into O(log(n)). + +commit 10a71e97f096ce3d0c284c8213da1b2107c32699 +Author: Bart Van Assche +Date: Mon Oct 5 21:24:38 2015 -0700 + + snmplib: binary_search(): Make source code more compact + + Additionally, remove two superfluous initializations. + +commit 50e13c2244e110319e1112a2ed3e9ba174144794 +Author: Bill Fenner +Date: Mon Oct 5 13:58:49 2015 -0700 + + CHANGES: snmpd: PATCH: 737: fixed integer64 support in pass and pass_persist + + The integer64 support was using the wrong ASN_ type, resulting + in an encoding error when trying to create the response. + As usual, the testing is way more than the change being + tested :-) + +commit e684da65018039cc87c44eaf2fe184d052ba432c +Author: Peter Rosin +Date: Fri Aug 7 17:14:07 2015 +0200 + + Allow external events in standalone agents. + + Signed-off-by: Bill Fenner + +commit a9e46754357a3852b788e0d3df27b1f432cd1b8f +Author: Niels Baggesen +Date: Mon Sep 28 20:49:24 2015 +0200 + + BUG a#2656: proper printing of index-oid for column not defined in MIB. + +commit 7781fc92322ff2d47a7cd8c37a3dc6cb21985ab1 +Author: Bill Fenner +Date: Fri Sep 11 11:20:47 2015 -0700 + + Freebsd has type and pid fields. + +commit d4519fb66d05cfc950b09726258069fc4e7de123 +Author: Bill Fenner +Date: Fri Sep 11 11:20:47 2015 -0700 + + Freebsd has type and pid fields. + +commit 0c490ab4b8f3a7b3a226adc69b8f8a86cd864b04 +Author: Bill Fenner +Date: Fri Sep 11 11:12:10 2015 -0700 + + Don't attempt to write to utmp if the process appears dead + + net-snmp has no business writing to utmp; let the system + handle that. Simply skip counting processes that appear dead. + +commit 87332ba1266414694c58e0fbca87ab9bcf02f76f +Author: Jan Safranek +Date: Tue Aug 18 17:14:20 2015 +0200 + + Fixed possible integer underrun. + + In theory, 'i' could be negative and close(-1) is not defined. + This should never happen, this patch just makes Coverity happy. + +commit aff1fb31dac236bb5f8e641c92e5651f00fa4f7d +Author: Jan Safranek +Date: Thu Jul 30 11:25:48 2015 +0200 + + CHANGES: snmpd: restore read-write flag in hrFSTable when a device becomes writable + +commit d87d2687e1d11d12c52f2bdbec4a52f5290c4e39 +Author: Bill Fenner +Date: Fri Jul 17 21:10:16 2015 +0200 + + minor snmpping improvements + + Update snmpping based on using it against JunOS: + - OperState can be disabled before it is enabled; + wait for completed, or OperState disabled plus + non-zero packets. + - SumOfSquares, when RTT < 1.0, can be less than + the number of pings; clamp the stddev to 0.0. + Not JunOS-specific: + - Retry on timeout. + - Add some debugging to the response handler. + +commit adaa69fc3c54f6907f8abb7fba7b62517385f6da +Author: Bill Fenner +Date: Thu Jul 16 08:11:35 2015 -0700 + + CHANGES: snmplib: BUG: 2573: skip malformed mib_index files + + The code trying to remove the '\n', when given a file full + of NULs, boils down to tmpbuf2[-1] = 0. The workaround is + to make sure that we have a "DIR ", to validate that the + file looks valid. + +commit 19ee9ccc2b32d03253e08717b92a09647d010f13 +Author: Niels Baggesen +Date: Mon Jul 13 21:12:25 2015 +0200 + + snmptrapd: use forkall on Solaris, if available. + +commit 109ef7fdf5402bf77f44e8d86f74deacd045d4b8 +Author: Niels Baggesen +Date: Mon Jul 13 16:33:43 2015 +0200 + + diskio: 64-bit counters for NetBSD. + +commit d774fe317160cb1dd7c839c1afb975dd4bb5ce41 +Author: Niels Baggesen +Date: Mon Jul 13 15:22:33 2015 +0200 + + diskio.c for FreeBSD: mask values to 32 bit to avoid warning when encoding. Fixes #2647. + +commit 77b80bd2011323e777ca1867ac730775f073896f +Author: Niels Baggesen +Date: Mon Jul 13 15:20:32 2015 +0200 + + Minor fixes for DragonflyBSD 4.2 + +commit 19b49d4789027bfac1c4490a05dc02bdc0248d94 +Author: Bart Van Assche +Date: Thu Jul 9 18:56:22 2015 -0700 + + include/net-snmp/net-snmp-config.h.in: Regenerate + +commit 7f00e801a134bb6f72d40368cc4931e2d051ae58 +Author: Bill Fenner +Date: Wed Jul 8 13:37:25 2015 -0700 + + CHANGES: BUG: 2602: Added return statement to example code for TrapReceiver + +commit 0c70de45d07778e329cf8740a31e1ce943d0845e +Author: Bill Fenner +Date: Tue Jul 7 15:10:04 2015 -0700 + + Regenerate + +commit 4ea8373caf9c1e5720d92995e3748757fbb58970 +Author: Bill Fenner +Date: Tue Jul 7 15:09:33 2015 -0700 + + Regenerate + +commit d6dabb0e14858bbb480b270ec6656e5f5fa9f0cc +Author: Bill Fenner +Date: Tue Jul 7 12:31:38 2015 -0700 + + Conditionally compile snmppcap on finding libpcap + + (except, we haven't exposed snmp_parse() yet, so it + still won't build.) + +commit 1eb6629cef3d3d8de3232c7ae04c2ab521b8163f +Author: Bill Fenner +Date: Tue Jul 7 08:01:26 2015 -0700 + + CHANGES: BUG: 2624: stop trying to use the deprecated perl uninstall + + Perl's ExtUtils::MakeMaker deprecated uninstall in 1997, and + has not replaced it. Stop trying to use it, and mention in + the INSTALL document that you cannot uninstall the perl + module this way. See https://sourceforge.net/p/net-snmp/bugs/2624/ + for more discussion. + +commit bf14d02f0948f2032951d271bb0d14d5ca318d80 +Author: Bill Fenner +Date: Tue Jul 7 07:55:13 2015 -0700 + + CHANGES: BUG: 2585: fix autoconf check in config_os_progs + +commit 1ab4308396dc5acd5f4d3ba97fdef315a24ab057 +Author: Bill Fenner +Date: Tue Jul 7 07:50:58 2015 -0700 + + Introduce snmpping, a client for DISMAN-PING-MIB. + +commit 9c66a12ad9c50ae52a89b1fbe8600d1813b6fc2b +Author: Alexander Heinlein +Date: Mon May 11 13:33:01 2015 +0200 + + Don't disable GET-requests with --disable-set-support (fixes #01c930e) + +commit 74e03d37c7a805d476f71bc85d300915fe48e6cb +Author: Wes Hardaker +Date: Mon Jul 6 23:39:50 2015 -0700 + + fixes for the 5.4 release tree + +commit 27ce6578f8cf4002324d7d04e07f04b0a5a9331a +Author: Wes Hardaker +Date: Mon Jul 6 23:38:32 2015 -0700 + + version update for 5.4.5.pre1 + +commit dd1e845918e6cb58f54aee52db4cc02d9b15157b +Author: Wes Hardaker +Date: Mon Jul 6 23:36:42 2015 -0700 + + version update for 5.4.5.pre1 + +commit d6abdcf1262d5908ac371e70f63c1c48b9aeeb88 +Author: Wes Hardaker +Date: Mon Jul 6 23:31:02 2015 -0700 + + make depend for 5.4.5.pre1 + +commit 66a8561c10b69a284bf83c652e6656b6d2ca5008 +Author: Wes Hardaker +Date: Mon Jul 6 23:10:13 2015 -0700 + + documentation update for 5.4.5.pre1 + +commit a188afbe66349ee15fb5a0428f206d0d03208c54 +Author: Wes Hardaker +Date: Mon Jul 6 22:15:40 2015 -0700 + + Version number update: 5.4.5.pre1 + +commit 0b35a3e365e260e5d86e778b999954ea39092096 +Author: Wes Hardaker +Date: Mon Jul 6 22:15:21 2015 -0700 + + version update for 5.4.5.pre1 + +commit c3ea313373e4139f6e391ffce4d8cf2b593de1a8 +Author: Bill Fenner +Date: Mon Jul 6 15:03:55 2015 -0700 + + Test script for https://sourceforge.net/p/net-snmp/bugs/2495/ + + Try HUP'ing the agent with exec statements configured, + and see if we get extra extNames.3 / extNames.4 configuration. + +commit 5c03c35dc517c9acb7e1c6f733675c7808ed8a3e +Author: Wes Hardaker +Date: Mon Jul 6 14:18:56 2015 -0700 + + remove the 5.5 and 5.6 branches from the list of active branches + +commit bec6243394ed78897c14e3fa46f934e0ea3d453e +Author: Jan Safranek +Date: Fri Jun 26 13:30:07 2015 +0200 + + snmpstatus: CHANGES: Fixed crash when receiving non-standard compliant responses. + + Some HW sends ifOperStatus as NULL instead of INTEGER type. We should not try to dereference this NULL. + +commit 8f431d410b803603dc809d82e0893509615d9a11 +Author: Niels Baggesen +Date: Thu Jun 25 22:32:39 2015 +0200 + + configure: fix check for --enable-perl-cc-checks + +commit e2ce8bb37819c9ae24d482ac4108772f7b2c9b8c +Author: Niels Baggesen +Date: Thu Jun 25 22:28:55 2015 +0200 + + swrun_procfs_psinfo: Fix includes for Solaris 11.2 + +commit 09f339330b494728a98c74a5e21fa0a61cba211d +Author: Bart Van Assche +Date: Sat Jun 20 16:33:31 2015 -0700 + + BUG: 2637: MSVC 14.0 build fix + +commit 59f9f3387dab4238114804a0be9e4c15667d868c +Author: Jan Safranek +Date: Fri Jun 19 09:29:06 2015 +0200 + + Fixed memory leak on realloc failure. + + Found by Coverity. + +commit f9e6b8dd0e6ba75c712dee3cb2f41a8f46e25cd4 +Author: Niels Baggesen +Date: Thu Jun 18 21:41:56 2015 +0200 + + route_sysctl.c: Ignore cloned route entries, to avoid duplicates. + +commit 315a9dfeddbad9c611833c9625d6c1c6d7c38324 +Author: Niels Baggesen +Date: Thu Jun 18 21:33:31 2015 +0200 + + nmp_transport.c: use strtok_r for strtok to avoid a race condition. + +commit dbef63d8aad631ae58a9e23f267fa735ee63ff27 +Author: Niels Baggesen +Date: Thu Jun 18 21:29:34 2015 +0200 + + Add missing -Ln together with the upper case option variants to the manual, + together with some minor nits. + +commit a58622bc39ebf0191bc2b2934da985a4d144be33 +Author: Niels Baggesen +Date: Thu Jun 18 21:27:17 2015 +0200 + + Fix some nitpicks in man pages. + +commit ed5386cd2f2fb50478b7e900e4c7da669977b4ef +Author: Niels Baggesen +Date: Thu Jun 18 21:22:49 2015 +0200 + + icmp.c: Fix missing initialization. + +commit 309a48aa0618945ad5ab1eb6b7698e28580f08c2 +Author: Bart Van Assche +Date: Tue Jun 16 19:40:58 2015 -0700 + + BUG: 2638: Fix a recently introduced build error + + Revert "MIB-II, ICMP: Fix a memory leak in an error path" + + This reverts commit 8521f044e516a77e3455e4e4fd585da0bcdeca03. + +commit 2c9e8b01f33b552f112897908a1b5f68a2a0d043 +Author: Bart Van Assche +Date: Sun May 24 18:48:05 2015 +0200 + + testing, T014gethostbyaddr_clib.c: Fix a use-after-free + +commit 72f789674f18b6785d1a42c5d380844e41e84378 +Author: Bart Van Assche +Date: Sun May 24 18:49:58 2015 +0200 + + snmptrapd: Fix memory leaks in error paths + +commit c816da4a2504f66a0555e9b046b2b7595b4cb574 +Author: Bart Van Assche +Date: Sat May 23 13:48:49 2015 +0200 + + snmptrapd: Fix gid check + + Detected by Coverity. + +commit 6f71d0e51719061f1378cf8af4a107a0e021f817 +Author: Bart Van Assche +Date: Sat May 23 13:53:35 2015 +0200 + + snmptrapd: Avoid that Coverity complains about dup2() and close() + +commit 3e6bf98e4a494d3f9ea44e7975864a7eedca0d51 +Author: Bart Van Assche +Date: Sat May 23 11:03:28 2015 +0200 + + snmptrapd: Fix a memory leak in an error path + + Detected by Coverity. + +commit 78c0b2ba8820fdc728a04b4752bca75090798e52 +Author: Bart Van Assche +Date: Sun May 24 18:32:09 2015 +0200 + + snmpd: Comment out dead code + +commit 131490da5a28e284fdd031651e1527963fdaa6fa +Author: Bart Van Assche +Date: Sun May 24 18:27:57 2015 +0200 + + snmpd: Avoid dereferencing a NULL pointer + +commit 16c199a01840ec6fd2c9fcab6af69d5a7a50423d +Author: Bart Van Assche +Date: Sat May 23 13:02:21 2015 +0200 + + encode_keychange: Check setup_engineID() return value + + Detected by Coverity. + +commit 99f836007fd823014b0efb037a6e707b56807ffb +Author: Bart Van Assche +Date: Sat May 23 13:36:17 2015 +0200 + + python: Fix a potential buffer overflow + + Detected by Coverity. + +commit cde325879630b6e63a5b6a0c2aaa3343fa356d48 +Author: Bart Van Assche +Date: Sun May 24 18:45:21 2015 +0200 + + perl: Avoid returning a pointer to an out-of-scope stack variable + + Detected by Coverity. + +commit e009d0d05343f531cfc303c24b25e9f32f55233b +Author: Bart Van Assche +Date: Sat May 23 13:45:30 2015 +0200 + + perl: Fix a potential buffer overflow + +commit 675babcb94bb0ddbebbe06c089ef47ca480dbb45 +Author: Bart Van Assche +Date: Sat May 23 11:56:22 2015 +0200 + + perl: Fix snmp_return_err() argument order + + Detected by Coverity. + +commit 0d5f487e0c09141172e723782b43eaf5275f4d83 +Author: Bart Van Assche +Date: Sat May 23 09:17:24 2015 +0200 + + MIB examples: Fix memory leak in an error path + +commit 87cadb0b1d6a476d2297cdddca60483006ba25f8 +Author: Bart Van Assche +Date: Sat May 23 08:55:00 2015 +0200 + + MIB examples: Fix a resource leak in an error path + + Detected by Coverity. + +commit bad4e22eb0a002936792821baa5d92c15b1376fe +Author: Bart Van Assche +Date: Sat May 23 09:05:18 2015 +0200 + + UCD-SNMP proxy: Fix memory leaks in error paths + + Detected by Coverity. + +commit aec75aab09550603b7d2e339d62b410405a8cc3e +Author: Bart Van Assche +Date: Sat May 23 12:06:37 2015 +0200 + + UCD-SNMP-logmatch: Prevent array overflow + + Detected by Coverity. + +commit 2c6fd84fa069d742ae330a9ef1e79227973bbe35 +Author: Bart Van Assche +Date: Sat May 23 12:04:56 2015 +0200 + + UCD-SNMP-DISKIO: Prevent array overflow + + Detected by Coverity. + +commit eefd830090be3933f5a31a4afbaaad0ba79dc7ee +Author: Bart Van Assche +Date: Sat May 23 12:34:50 2015 +0200 + + TUNNEL-MIB: Use strlcpy() instead of strcpy() + + Suggested by Coverity. + +commit 6b4d1e183f31a2a05a4f68fc72629ba655d61c2f +Author: Bart Van Assche +Date: Sun May 24 12:27:06 2015 +0200 + + SNMP-USER-BASED-SM-MIB: Avoid dereferencing a NULL pointer + +commit e7595c13a32260b738342f706e17521e9a3bf5b6 +Author: Bart Van Assche +Date: Sun May 24 12:56:14 2015 +0200 + + SMUX: Check asn_parse_header() return value consistently + +commit 117a3c1ad42d74cc2678436a5cf50fd4e07cef7a +Author: Bart Van Assche +Date: Sun May 24 12:46:41 2015 +0200 + + SMUX: Remove superfluous checks + + Checking whether a pointer is NULL after having dereferenced that + pointer does not make sense. Hence remove these checks. Detected + by Coverity. + +commit 3ec2de5a76fc444b5b17bad536d0ac8dbe67b0dd +Author: Bart Van Assche +Date: Sat May 23 08:53:30 2015 +0200 + + SMUX: Fix a resoure leak in an error path + + Was the "close(sd)" statement a typo ? Detected by Coverity. + +commit 13ce35f50f0c37e96e779d9c86ddeebbc5bc59f2 +Author: Bart Van Assche +Date: Sat May 23 08:46:13 2015 +0200 + + SMUX: Fix memory leaks in error paths + + Detected by Coverity. + +commit 15d0a26b8404e129f15d216342a80280f5aa7249 +Author: Bart Van Assche +Date: Sun May 24 09:52:19 2015 +0200 + + RMON-MIB: Fix a memory leak in an error path + +commit 4dbe86ded0b688377eef773db25340db54d4dcdc +Author: Bart Van Assche +Date: Sat May 23 12:31:15 2015 +0200 + + NET-SNMP-SYSTEM-MIB: Use strlcat() instead of strcat() + + Suggested by Coverity. + +commit 08e5b6d40f2a289a3d9e56dfda600c983ae10201 +Author: Bart Van Assche +Date: Sun May 24 09:37:50 2015 +0200 + + NET-SNMP-SYSTEM-MIB: Initialize a buffer in an error path + +commit 90610e89892b7fd7a2c026736477d7328943891d +Author: Bart Van Assche +Date: Sat May 23 11:45:48 2015 +0200 + + MIB-II, IPv6: Avoid integer overflow + + Detected by Coverity. + +commit 8404ef684664afaa2ace1f8faf4667ba71dd763f +Author: Bart Van Assche +Date: Sat May 23 12:07:51 2015 +0200 + + MIB-II, IPv6: Prevent array overflow + + Detected by Coverity. + +commit 7990c9d77c65ff864bc016332a36f5bd2dabe747 +Author: Bart Van Assche +Date: Sat May 23 08:33:20 2015 +0200 + + MIB-II, route_write: Initialize dst.sin_port and gateway.sin_port + + Detected by Coverity. + +commit f7138f2a73f622892f178da571373e30ee1bdb1d +Author: Bart Van Assche +Date: Sat May 23 07:44:16 2015 +0200 + + MIB-II, TCP table: Initialize pcb.inp_next + + Detected by Coverity. + +commit 8521f044e516a77e3455e4e4fd585da0bcdeca03 +Author: Bart Van Assche +Date: Sat May 23 08:48:33 2015 +0200 + + MIB-II, ICMP: Fix a memory leak in an error path + + Detected by Coverity. + +commit ed482d19f83ba19e73cf91f9ee7bdb1bbc58f312 +Author: Bart Van Assche +Date: Sat May 23 13:25:05 2015 +0200 + + IP-FORWARD-MIB: Fix a size check + + Use multiplication instead of division when testing + inetCidrRoutePolicy_val_ptr_len. Detected by Coverity. + +commit 05590fc804bdc8967559f18c7a2cf34104aefe56 +Author: Bart Van Assche +Date: Sat May 23 07:35:21 2015 +0200 + + IP-FORWARD-MIB: Initialize gateway.sin_port + + Detected by Coverity. + +commit 1fd0de48751ab9b86b17633e95b665d51b1cdd45 +Author: Bart Van Assche +Date: Sun May 24 12:29:02 2015 +0200 + + IF-MIB: Avoid dereferencing a NULL pointer + +commit 59f5b8cc73b2b3589acd1456f166a3c68038990b +Author: Bart Van Assche +Date: Sat May 23 08:07:08 2015 +0200 + + EtherLike-MIB: Fix a memory leak in an error path + + Detected by Coverity. + +commit 766ac18693efa958c2f3b5d816ab799e826a4851 +Author: Bart Van Assche +Date: Sat May 23 17:05:03 2015 +0200 + + DISMAN-TRACEROUTE-MIB: Fix more memory and resource leaks + +commit 843ac67881f6a68e35868ed67e4e78c9ab155666 +Author: Bart Van Assche +Date: Sat May 23 16:53:42 2015 +0200 + + DISMAN-TRACEROUTE-MIB: Fix more use-after-free issues + +commit 28822a97b17c839f67d25d0df18b105428e58ae0 +Author: Bart Van Assche +Date: Sat May 23 15:03:23 2015 +0200 + + DISMAN-TRACEROUTE-MIB: Split two functions + +commit f91c62e0a1c37fba6c1e816c18160fe1e22e84cc +Author: Bart Van Assche +Date: Sat May 23 14:48:20 2015 +0200 + + DISMAN-TRACEROUTE-MIB: Remove register declarations + + A modern compiler doesn't need these. + +commit 400729e3459c7952ae7ed40b741e6ad23c08f015 +Author: Bart Van Assche +Date: Sat May 23 08:31:36 2015 +0200 + + DISMAN-TRACEROUTE-MIB: Fix several use-after-free issues + + Detected by Coverity. + +commit 6ffb0a32f55210d6c6842bad1bc91ec690846170 +Author: Bart Van Assche +Date: Sat May 23 07:46:34 2015 +0200 + + DISMAN-TRACEROUTE-MIB: Fix several memory and resource leaks + + Detected by Coverity. + +commit f30429749a043d556cdfa8cd3abcf4737c93a8a9 +Author: Bart Van Assche +Date: Sun May 24 09:46:05 2015 +0200 + + DISMAN-PING-MIB: Fix use-after-free issues + +commit 1866a2580f83abc7c1c227404162ab06ea5c8bfd +Author: Bart Van Assche +Date: Sat May 23 11:04:45 2015 +0200 + + DISMAN-PING-MIB: Fix memory leaks in error paths + + Detected by Coverity. + +commit 309e0af8308cd2d55d971091ef7d84b3037a2308 +Author: Bart Van Assche +Date: Sat May 23 08:09:01 2015 +0200 + + DISMAN-PING-MIB: Initialize msg_flags + + Detected by Coverity. + +commit 6fd1a5873cfd098f810009ba0d6c01e9d7b94d68 +Author: Bart Van Assche +Date: Sun May 24 09:45:24 2015 +0200 + + DISMAN-NSLOOKUP-MIB: Fix use-after-free issues + +commit 82b482e26bb0295e2d9c517ca1229530eeb5edbb +Author: Bart Van Assche +Date: Sat May 23 11:37:28 2015 +0200 + + DISMAN-EXPRESSION-MIB: Fix a flag test + + Detected by Coverity. + +commit 007b5c1588c8fe2c7d846a4ccc0b0bcc12ec2564 +Author: Bart Van Assche +Date: Mon May 25 09:21:43 2015 +0200 + + snmpd: Make netsnmp_unregister_handler(NULL) safe + +commit b8d0ee82dd98fc00624c8b036ea3bb429723e26c +Author: Bart Van Assche +Date: Sun May 24 09:13:56 2015 +0200 + + snmplib, parse_imports(): Avoid reading an uninitialized modid variable for MIBs with invalid syntax + + Detected by Coverity. + +commit 55fbb6d933a75ed7c0ca201f90adcfc33707f1b8 +Author: Bart Van Assche +Date: Sun May 24 08:46:32 2015 +0200 + + snmplib, _daemon_prep(): Add error checking and switch to dup2() + + These changes reduce the number of resource leaks reported by Coverity. + +commit 3229e8a3d276ebcc57f2ddc55086cfce16efc07d +Author: Bart Van Assche +Date: Sat May 23 18:05:18 2015 +0200 + + snmplib, snmpv3_generate_engineID(): Avoid reading uninitialized data + + Detected by Coverity. + +commit d78692d40fdabc62c9b4bd8644d93c01f9d301f6 +Author: Bart Van Assche +Date: Sat May 23 16:16:04 2015 +0200 + + snmplib, TLS transport: Comment out dead code + + Detected by Coverity. + +commit c2b4001f5d489d699e4db47200c06b03ca4f22ff +Author: Bart Van Assche +Date: Sat May 23 16:11:09 2015 +0200 + + snmplib, IPv6 transport: Fix memory leaks in error paths + +commit b3bc97927052140eaf759a52c875d6558d1c5756 +Author: Bart Van Assche +Date: Sat May 23 16:08:33 2015 +0200 + + snmplib, snmp_parse_oid(): Fix a memory leak + +commit 29767f5bc157f8051cb781299a499d927a0d090c +Author: Bart Van Assche +Date: Sat May 23 15:57:43 2015 +0200 + + snmplib, netsnmp_cert_find(): Fix a memory leak + +commit 1589177e54be8614eb7e11239d791b098b2ec3e0 +Author: Bart Van Assche +Date: Sat May 23 15:49:56 2015 +0200 + + snmplib, netsnmp_tdomain_transport_full(): Make this code slightly easier to read + + This change avoids that Coverity reports a false positive for this + code. + +commit dc7ed248badb3122093d5e22c598b7eccc67b650 +Author: Bart Van Assche +Date: Sat May 23 15:41:21 2015 +0200 + + snmplib, netsnmp_parse_args(): Fix a memory leak in an error path + +commit fdefbf7120839acfd5ec3ede484687f7280cbef0 +Author: Bart Van Assche +Date: Sat May 23 15:39:32 2015 +0200 + + snmplib, parse_asntype(): Fix a memory leak in an error path + +commit f3d81e05271c9591db69ab5f76e408898e4c03c9 +Author: Bart Van Assche +Date: Sat May 23 15:32:19 2015 +0200 + + snmplib, _add_strings_to_oid(): Remove dead code + + Detected by Coverity. + +commit 83963a62ef958c985cfd9d97632d633c6e7d2240 +Author: Bart Van Assche +Date: Sat May 23 15:24:44 2015 +0200 + + snmplib, container_list_ssll: Remove a superfluous check + + Reported by Coverity. + +commit a1e8ef82b679ea777321a9668cfd9358ccee167d +Author: Bart Van Assche +Date: Sat May 23 15:13:18 2015 +0200 + + snmplib, container_list_ssll: Move NULL check before dereference + + Detected by Coverity. + +commit 2ecfad6e478c8c92cb1fccdf241dd716f68e9427 +Author: Bart Van Assche +Date: Sat May 23 15:10:33 2015 +0200 + + snmplib, TLSTCP domain: Avoid dereferencing a NULL pointer + + Detected by Coverity. + +commit f472db1e11d213c9197ee0cdc7c21e949356d493 +Author: Bart Van Assche +Date: Sat May 23 13:52:49 2015 +0200 + + snmplib, netsnmp_close_fds(): Avoid passing a negative argument to close() + +commit 2ef35da79f1925717b3ea5c3b855e2af49bf1619 +Author: Bart Van Assche +Date: Sat May 23 13:04:41 2015 +0200 + + snmplib, sprint_realloc_hexstring(): Handle netsnmp_ds_get_int() failure correctly + + Detected by Coverity. + +commit 5384fafe9b609e85b9a700074fb051f2539b28e2 +Author: Bart Van Assche +Date: Sat May 23 12:51:52 2015 +0200 + + snmplib: Check strdup() return value + + Reported by Coverity. + +commit 2e09b2b35387032bafc6fdea36783d9b5a843ca9 +Author: Bart Van Assche +Date: Sat May 23 11:40:50 2015 +0200 + + snmplib, snmp_openssl: Add missing braces + + Detected by Coverity. + +commit adf1ace7975c0c24387ee0618b80ba08a37d94bd +Author: Bart Van Assche +Date: Sun May 24 12:38:45 2015 +0200 + + snmplib, container: Make CONTAINER_FREE(NULL) a no-op + +commit 8f5d0449aa53f5b766159d0d1116a184705d5b94 +Author: Bart Van Assche +Date: Sat May 23 09:23:23 2015 +0200 + + snmplib, container: Fix a memory leak in an error path + + Detected by Coverity. + +commit 8f2f101ff96c01aa1395101ed0f0c7a68a8f1b23 +Author: Bart Van Assche +Date: Sat May 23 08:29:33 2015 +0200 + + snmplib, parse_objectid(): Fix memory leaks in error paths + + Detected by Coverity. + +commit 7ce0e040d637354b773352543c370cbc4596e06b +Author: Bart Van Assche +Date: Sat May 23 08:40:48 2015 +0200 + + snmplib, table iterator: Fix a memory leak in an error path + + Detected by Coverity. + +commit 7208d0511507d473618654fc32d26657839d5a23 +Author: Bart Van Assche +Date: Sat May 23 08:03:06 2015 +0200 + + snmplib, netsnmp_tlstmAddr_restore_common(): Fix a potential memory leak + + Detected by Coverity. + +commit 1ee72102fbe722d232d74abc4660a8b134cec8d6 +Author: Bart Van Assche +Date: Sat May 23 07:32:53 2015 +0200 + + snmplib, UDPIPv6 transport: Add a missing return statement + + Detected by Coverity. + +commit 234042b18a436708007f764c7281a300c0317245 +Author: Niels Baggesen +Date: Tue Jun 2 20:04:41 2015 +0200 + + Support for Darwin 14. + +commit 95ccfb7406592f27e0189bc1a13cec0f3aa397ea +Author: Niels Baggesen +Date: Thu May 28 18:06:28 2015 +0200 + + OpenBSD 5.7: Support IPV6-MIB + +commit 263b663d63bd648603455636f278380c2b5db55b +Author: Niels Baggesen +Date: Thu May 28 15:38:23 2015 +0200 + + NetBSD7: First stab for this OS. + +commit ebcca14b557fca2d64532c7c0ba0cc2f45cd621d +Author: Bart Van Assche +Date: Sun May 17 18:58:38 2015 +0200 + + testing: Extend T155dismanexprmib_simple + +commit 32f42f69636800a549716c981d6fd139ac1dd96c +Author: Bart Van Assche +Date: Thu May 21 08:57:43 2015 +0200 + + new DISMAN EXPRESSION MIB: Fix a double free + + Avoid that Valgrind reports the following complaint: + + Invalid read of size 8 + at 0x566EC3C: snmp_free_var_internals (snmp_api.c:5076) + by 0x566ED4E: snmp_free_var (snmp_api.c:5093) + by 0x512950C: _expValue_evalExpr (expValue.c:409) + by 0x51292F4: _expValue_evalExpr (expValue.c:375) + by 0x51292F4: _expValue_evalExpr (expValue.c:375) + by 0x512A8AE: expValue_evaluateExpression (expValue.c:771) + by 0x512B4EF: expValueTable_getEntry (expValueTable.c:142) + by 0x512C042: expValueTable_handler (expValueTable.c:267) + by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) + by 0x4E64B43: netsnmp_call_next_handler (agent_handler.c:645) + by 0x4E56987: table_helper_handler (table.c:712) + by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) + Address 0x82d9068 is 8 bytes inside a block of size 1,136 free'd + at 0x4C2A237: free (vg_replace_malloc.c:476) + by 0x566ED5A: snmp_free_var (snmp_api.c:5094) + by 0x5128F20: _expValue_evalOperator (expValue.c:303) + by 0x512A6B3: _expValue_evalExpr2 (expValue.c:717) + by 0x51294F6: _expValue_evalExpr (expValue.c:408) + by 0x51292F4: _expValue_evalExpr (expValue.c:375) + by 0x51292F4: _expValue_evalExpr (expValue.c:375) + by 0x512A8AE: expValue_evaluateExpression (expValue.c:771) + by 0x512B4EF: expValueTable_getEntry (expValueTable.c:142) + by 0x512C042: expValueTable_handler (expValueTable.c:267) + by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) + by 0x4E64B43: netsnmp_call_next_handler (agent_handler.c:645) + +commit c4e78ec41b7c10d8be2c36fdae1b2199f65e9e60 +Author: Niels Baggesen +Date: Wed May 20 20:49:38 2015 +0200 + + disman/expr/expValue: Fix memory leak when expression has errors- Thanks to Alessandro Gherardi for posting bug 2629. + +commit ee4feb816bcf693156af2fb95f5e46fb8235e0fb +Author: Niels Baggesen +Date: Wed May 20 20:47:12 2015 +0200 + + tcpTable/udpTable: make sure we skip non-ipv4 sockets from kvm_getfiles. + +commit 46241555cf13b4fade57a715e50d0dfbdb487b2f +Author: Niels Baggesen +Date: Wed May 20 20:45:46 2015 +0200 + + T155dismanexprmib_simple: a "true" sh doen not grok $(cmd) + +commit c1298429ad8249293c01cd0e6f6526fd32c363e3 +Author: Niels Baggesen +Date: Mon May 18 21:54:25 2015 +0200 + + Solaris: Enable IP-FORWARD-MIB for Solaris 8. + +commit 1555f3b132b14a191cf9d34ce7abb07260df8b14 +Author: Niels Baggesen +Date: Mon May 18 21:42:20 2015 +0200 + + rerun configure + +commit 742215b00e5862d7ffa9cc34433e924881b507d8 +Author: Niels Baggesen +Date: Mon May 18 21:40:40 2015 +0200 + + rerun configure + +commit c526720130c998785e2df96a28a637e3c7567044 +Author: Niels Baggesen +Date: Mon May 18 21:33:18 2015 +0200 + + OpenBSD5.7: include sys/queue.h before netinet6/ip6_var.h + +commit c8232991e29b244f8c2a68286b8d0f35ec4cd182 +Author: Niels Baggesen +Date: Mon May 18 21:08:23 2015 +0200 + + OpenBSD5.7: Use kvm_getfiles to get socket status. + +commit d4af91be7146253152a158f6e14e0b2c84204c58 +Author: Bart Van Assche +Date: Fri May 15 18:49:22 2015 +0200 + + CHANGES: HP-UX on ia64: Really fix large fd set implementation + +commit c86453effe42266ffbd3519b76ed2075fe6635f8 +Author: Bart Van Assche +Date: Thu May 14 13:21:41 2015 +0200 + + DISMAN EXPRESSION MIB: Add a regression test + +commit 2b874b21f0259957869f3e53cce0f7539d3c39f5 +Author: Bart Van Assche +Date: Sun May 17 10:47:30 2015 +0200 + + new DISMAN EXPRESSION MIB: Report success when destroying a non-existing row + +commit 1fd0332eb48d721c0bbc3a4c3d12a253083ef221 +Author: Bart Van Assche +Date: Sun May 17 10:46:56 2015 +0200 + + new DISMAN EXPRESSION MIB: Fix two compiler warnings + +commit 292b0dfe402697202e29be72facec27902bac0c0 +Author: Bart Van Assche +Date: Sun May 17 09:49:37 2015 +0200 + + old DISMAN EXPRESSION MIB: Disable recursion + +commit 8487a51024875c60facdd97cea27e94fc4b3f187 +Author: Bart Van Assche +Date: Sun May 17 08:12:54 2015 +0200 + + old DISMAN EXPRESSION MIB: Use callback transport instead of UDP over localhost + +commit b87babe1c000b5602e44462a173b971a146550fa +Author: Bart Van Assche +Date: Sun May 17 07:45:30 2015 +0200 + + old DISMAN EXPRESSION MIB: Move common code into a new function + +commit cbf9298fcf9b3045264ddd987a6c297bec6e04e1 +Author: Bart Van Assche +Date: Sun May 17 07:32:08 2015 +0200 + + old DISMAN EXPRESSION MIB: Simplify Evaluate_Expression() + +commit 46c26af006f59e95bb27df4b94b1b123cf88dc45 +Author: Bart Van Assche +Date: Sat May 16 17:21:34 2015 +0200 + + old DISMAN EXPRESSION MIB: Add more logging + +commit 0e7a84e44a74ee014df649c0f6f0e79bf34c2f07 +Author: Bart Van Assche +Date: Sat May 16 16:54:21 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix row destruction code + +commit d6949b578f9723ad6fdfe599beebdf63751c7017 +Author: Bart Van Assche +Date: Sat May 16 14:59:44 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix another use-after-free + + Switch from freeing and reallocating the value table to update-in-place + to avoid that Valgrind reports use-after-free complaints similar to the + following: + + Invalid read of size 8 + at 0x563A4F9: snmp_set_var_value (snmp_client.c:841) + by 0x563A229: snmp_set_var_typed_value (snmp_client.c:719) + by 0x4E51A29: netsnmp_old_api_helper (old_api.c:351) + by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) + by 0x4E64A32: netsnmp_call_handlers (agent_handler.c:616) + by 0x4E7565A: handle_var_requests (snmp_agent.c:2695) + by 0x4E76DBC: handle_pdu (snmp_agent.c:3426) + by 0x4E769FD: netsnmp_handle_request (snmp_agent.c:3313) + by 0x4E73A82: handle_snmp_packet (snmp_agent.c:2006) + by 0x566CAC6: _sess_process_packet (snmp_api.c:5412) + by 0x566E0AF: _sess_read (snmp_api.c:5833) + by 0x566E171: snmp_sess_read2 (snmp_api.c:5865) + Address 0x88be7e0 is 48 bytes inside a block of size 144 free'd + at 0x4C2A237: free (vg_replace_malloc.c:476) + by 0x51A89AE: expValueTable_clean (expValueTable.c:560) + by 0x51AA9E1: header_complex_free_entry (header_complex.c:522) + by 0x51AAA1C: header_complex_free_all (header_complex.c:537) + by 0x51A9232: var_expValueTable (expValueTable.c:763) + by 0x4E519A9: netsnmp_old_api_helper (old_api.c:325) + by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) + by 0x4E64A32: netsnmp_call_handlers (agent_handler.c:616) + by 0x4E7565A: handle_var_requests (snmp_agent.c:2695) + by 0x4E76DBC: handle_pdu (snmp_agent.c:3426) + by 0x4E769FD: netsnmp_handle_request (snmp_agent.c:3313) + by 0x4E73A82: handle_snmp_packet (snmp_agent.c:2006) + +commit affdd7f2de4e7921ddcd57ae99496fae8c81b8c0 +Author: Bart Van Assche +Date: Sat May 16 14:51:25 2015 +0200 + + old DISMAN EXPRESSION MIB: Convert exit() calls into return statements + + snmpd is a daemon and hence must not exit. + +commit 9af5161eb6c700807bc1319dc42d5d00aa65dee8 +Author: Bart Van Assche +Date: Sat May 16 14:48:58 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix expression evaluator + + Pop arguments in the correct order from the stack. Do not try to + pop elements from an empty stack. + +commit bb9d3f60b091932358ba3061795c77f455a66337 +Author: Bart Van Assche +Date: Sat May 16 13:20:50 2015 +0200 + + old DISMAN EXPRESSION MIB: Declare several variables as const + +commit dd979ac95c8945814af6c03c7b77cad590fecb19 +Author: Bart Van Assche +Date: Sat May 16 13:15:07 2015 +0200 + + old DISMAN EXPRESSION MIB: Improve source code readability + + Use isdigit() instead of open-coding that macro. Use character + constants instead of numerical ASCII codes. Use an enumeration + type instead of numerical constants. + +commit b07b5c07558bc15043be55510a18e7c0ac4b1a62 +Author: Bart Van Assche +Date: Sat May 16 13:02:52 2015 +0200 + + old DISMAN EXPRESSION MIB: Change two global variables into local variables + +commit 878467099c62d7aeb329a7e9e4dfa00d3b6b224d +Author: Bart Van Assche +Date: Sat May 16 13:07:41 2015 +0200 + + old DISMAN EXPRESSION MIB: Declare local functions and variables static + + Additionally, change the function definition order to avoid that + forward declarations would be necessary. + +commit df0eb7f41c56beb8fd1a1f4ae60215e1ff5cd21d +Author: Bart Van Assche +Date: Sat May 16 12:42:28 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix a use-after-free + + The data structure expValueTable_data only owns the expValueInstance + member but none of the other members. Hence only free that member in + the function expValueTable_clean(). + +commit 114e3592d01d38f5a393a1d0f7f48de018e532c7 +Author: Bart Van Assche +Date: Sat May 16 13:22:43 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix two memory leaks in expValueTable_add() + + Free the 'index' argument in the error path of this function. Avoid + that the expExpressionOwner, expExpressionName and expValueInstance + get overwritten immediately after having been allocated. + +commit 8e98fa0c26b09683e24a0eca9a8b820f6febb5e4 +Author: Bart Van Assche +Date: Sat May 16 12:47:19 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix a grammatical error in a variable name + +commit b0d38ec793dafabea40f300035aa44e2aae5855e +Author: Bart Van Assche +Date: Sat May 16 13:07:39 2015 +0200 + + old DISMAN EXPRESSION MIB: Fix a spelling error in a variable name + +commit 3dffb0836bbcd4235240f18b2c791c4968f5e7fc +Author: Bart Van Assche +Date: Thu May 14 14:50:28 2015 +0200 + + CHANGES: DISMAN MIB: Avoid reading past the end of a buffer + + Terminate the expExpression string with a NUL character. This + avoids that Valgrind reports the following complaint: + + Invalid read of size 1 + at 0x51A8B6F: build_valuetable (expValueTable.c:453) + by 0x51A92BF: var_expValueTable (expValueTable.c:647) + by 0x4E519A9: netsnmp_old_api_helper (old_api.c:325) + by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) + by 0x4E64A32: netsnmp_call_handlers (agent_handler.c:616) + by 0x4E7565A: handle_var_requests (snmp_agent.c:2695) + by 0x4E76DBC: handle_pdu (snmp_agent.c:3426) + by 0x4E769FD: netsnmp_handle_request (snmp_agent.c:3313) + by 0x4E73A82: handle_snmp_packet (snmp_agent.c:2006) + by 0x566CAC6: _sess_process_packet (snmp_api.c:5412) + by 0x566E0AF: _sess_read (snmp_api.c:5833) + by 0x566E171: snmp_sess_read2 (snmp_api.c:5865) + +commit f4e4853c448025095e5ee282a730e9a105b8484a +Author: Bart Van Assche +Date: Thu May 14 13:51:38 2015 +0200 + + CHANGES: DISMAN EXPRESSION MIB: Avoid that enabling this MIB causes snmpd to crash during startup + +commit 11b8afda40ecf8136ed5847438f5369ae2126af3 +Author: Alessandro Gherardi +Date: Thu May 14 13:03:34 2015 +0200 + + CHANGES: Windows: BUG: 2629: Make architecture test in build.pl case-insensitive + +commit 4503fd15677706b03a8e69214304506b47ecba9d +Author: Bart Van Assche +Date: Wed May 13 15:59:04 2015 +0200 + + CHANGES: HP-UX on ia64: Fix large fd set implementation + + Reported-by: Dixon Xavier + +commit 1b4ca14972d39d61a93bb0e3e4eea76795bedb89 +Author: Bart Van Assche +Date: Thu May 14 11:07:08 2015 +0200 + + CHANGES: Windows: Feature-request: 181: Export snmp_api and ASN functions + + See also http://sourceforge.net/p/net-snmp/feature-requests/181/. + +commit 63f167c3e92fe382e62e533418578fc5e5bfa871 +Author: Bart Van Assche +Date: Thu May 14 11:19:25 2015 +0200 + + Windows: Move a misplaced NETSNMP_IMPORT declaration + +commit c4b7d234fccee838ac5eaccdf179d76bd9440269 +Author: Bart Van Assche +Date: Wed May 13 16:09:41 2015 +0200 + + Fix a recently introduced compiler warning + + See also patch "CHANGES: snmpd: Speed up ipAddressTable loading" + (commit ID fec39af92025). + +commit 2f8166097cb893dcdcf8b5172409396bf6509da9 +Author: Niels Baggesen +Date: Mon May 11 21:51:06 2015 +0200 + + route_linux: Fix byteorder for netmask. For some unknown reason this was not fixed on the 5.6 branch at the time was fixed for 5.5 and 5.7. + +commit efde69d122516a879741aba17dc74851240055eb +Author: Niels Baggesen +Date: Mon May 11 21:44:45 2015 +0200 + + mibII.h: Reorder Solaris conditionals to enable more tables for Solaris 8. + +commit d07fba92c58db6dbb8bee5f0fc98130fcd5d3e6b +Author: Niels Baggesen +Date: Mon May 11 21:41:56 2015 +0200 + + agent_handler: Alert if inject_handler_before cannot find the insertion point. + +commit 73d8befdcfd7891c9dc51fbc21c4bc7f79a8b1a1 +Author: Niels Baggesen +Date: Mon May 11 21:38:23 2015 +0200 + + nmpps.c: Fix a spelling error. + +commit 5aa89be1843547060b376e0b69b99aac778a51dc +Author: Niels Baggesen +Date: Mon May 11 21:32:45 2015 +0200 + + snmpnetstat/inet.c: Properly print counters with format %lu. + +commit b55d4c6cb9f9adb8406f99cab75084b3edcdd496 +Author: Niels Baggesen +Date: Mon May 11 21:30:42 2015 +0200 + + tcpTable.c: Fis pre-processor comment. + +commit 4aca12795bad6af5812471eac48f338a901c3ff5 +Author: Niels Baggesen +Date: Mon May 11 21:10:29 2015 +0200 + + ipaddress_linux: Fix leaking of socket on errors. Thanks to Pete Flugstad. + +commit 476678aef383f1dd445afd04b7f3bb326d078d2d +Author: Niels Baggesen +Date: Mon May 11 21:07:52 2015 +0200 + + route_linux.c: /proc/net/ipv6_route has no header, so don't skip the first line. Thanks to Pete Flugstad. + +commit 956f752d82a171418f2062dfe0fe2753a46958bc +Author: Niels Baggesen +Date: Mon May 11 21:03:48 2015 +0200 + + systemstats_linux: Newer kernels (fedora 21, debian 8) needs a better check to locate ipInNoRoutes from /proc/net/snmp6. Thanks to Pete Flugstad. + +commit de31ed43a1b179ee12f9f1ada7b3e8565dd5455a +Author: Niels Baggesen +Date: Mon May 4 22:08:47 2015 +0200 + + Fix BUG "a2621: correct ipRouteNextHop for Solaris. + +commit 157fa81346915b7cf907006caecd0198254ac1e6 +Author: Niels Baggesen +Date: Mon May 4 21:26:36 2015 +0200 + + Solaris: first stab at ipDefaultRouterTable. + +commit 689c59bde27152279e7ef561acbcb79c4bde84a3 +Author: Niels Baggesen +Date: Mon May 4 21:20:17 2015 +0200 + + Fix a C++ comment that slipped in. + +commit e07ea3caeece79ab4297cef8d504a761c2bb2fa5 +Author: Niels Baggesen +Date: Mon May 4 21:15:26 2015 +0200 + + Solaris: Support ipIfStatsTable. + +commit b0b19bb1b9934aa040618aef5298ba7ab76bb454 +Author: Niels Baggesen +Date: Mon May 4 21:07:05 2015 +0200 + + Solaris: Add forgotten ipAddressPrefixTable. + +commit 2d788f25ee9422f2220f1218b7a50c03852154cd +Author: Jan Safranek +Date: Thu Apr 30 16:23:50 2015 +0200 + + Fixed loading speed of ipAddrTable on Linux. + + With high number of IP addresses (tested with 40 000), Address_Scan_Init + took several seconds to complete and any GET/GETNEXT request into ipAddrTable + timed out. + + The function tries to guess the number of local IP addresses in a loop, where + each iteration adds '16' to the guess. Now it doubles the value of the guess, + converging faster to the real number. + + The code is taken from netsnmp_access_ipaddress_ioctl_get_interface_count. + +commit 0bcc064f39e001ab6d619cc76140b94ca2764655 +Author: Mike Moreton +Date: Mon Sep 30 11:40:27 2013 +0100 + + There seems to be a problem with mib2c.check_values_local.conf in that it generates a file with a double include symbol of XXX_CHECKFNS_H. + As this is the same symbol as is used in xxx_checkfns.h, xxx_checkfns_local.h never gets included at all. + +commit 88be6b20bb06794f5a7f01dc29d21a1db7726cfc +Author: Jan Safranek +Date: Fri Apr 24 13:18:16 2015 +0200 + + Fix leaks and memory errors in the previous patch. + +commit fec39af920257bd1277591cbcbc1d0a5a46529ed +Author: Jan Safranek +Date: Fri Apr 24 10:49:40 2015 +0200 + + CHANGES: snmpd: Speed up ipAddressTable loading. + + netsnmp_access_ipaddress_container_load has O(n^3) complexity - it keeps + its container sorted when adding/removing items to/from it. + + This patch adds ALLOW_DUPLICATES to the helper containers, so they do not + need to be sorted on each CONTAINER_INSTERT. We will remove the duplicates + manually in one sweep. + + With high number of network intefraces, netsnmp_access_ipaddress_container_load + is now much faster, sacrificing a bit of memory. + +commit 85ec2e0881e2add1ebde5fb92cdaeedec8fa2659 +Author: Robert Story +Date: Tue Apr 21 09:53:45 2015 -0400 + + NEWS: snmp: BUG: 2622: Fix excessive indents in log file + +commit 1f38c1b40039d0efb4ef22f17701fcc670747de0 +Author: Bart Van Assche +Date: Sun Apr 19 09:23:25 2015 +0200 + + ip-mib: Fix an error log statement + + Log the input string in the error message that reports that parsing + failed instead of the output buffer. + +commit 5db433599648418b624e2207324248f185e9a8a0 +Author: Bart Van Assche +Date: Sun Apr 19 08:25:34 2015 +0200 + + ip-mib: Improve portability + + Remove a gcc-specific alignment directive. Rework the code that + required ia_address to be aligned on SPARC. See also "Fix SIGBUS + on Sparc caused by wrong alignment" (commit ID e2513cd1c4b3). + +commit 550a9d1a83fd168bc770f0e76b561c5b53af0855 +Author: Niels Baggesen +Date: Thu Apr 16 19:03:43 2015 +0200 + + Add mibs from rfc 7460, 7461. + +commit abc1d736a25aed70e580efb19aedc428e08ee802 +Author: Niels Baggesen +Date: Thu Apr 16 19:01:30 2015 +0200 + + snmpcmd.1.def: Fix a spelling error + +commit e2513cd1c4b31183d9c06286129e84a49afe88ac +Author: Niels Baggesen +Date: Thu Apr 16 18:58:34 2015 +0200 + + Patch #a1301: Fix SIGBUS on Sparc caused by wrong alignment. Thanks to Eric Snowberg. + +commit c5c435658032c26fde69978e2610c879b3a4bcc8 +Author: Niels Baggesen +Date: Thu Apr 16 18:56:55 2015 +0200 + + Patch #1300: Fix big endian / 64bit problem with Sparc by properly typing. Thanks to Eric Snowberg. + +commit 672d3f6c1b1cc80c5818c4278102dc0f20c8e88d +Author: Niels Baggesen +Date: Thu Apr 16 18:52:55 2015 +0200 + + Patch #a1302: Support for NVMFS (Non Volatile Memory File System). Thanks to Damien Stuart. + +commit f9fb050282c67d4f5125a095a82ced7bd3cea397 +Author: Niels Baggesen +Date: Thu Apr 16 18:46:30 2015 +0200 + + iBug #a2610: Fix logOption F + +commit 538767a5b3d204e1882fad8d8e84598bc0c69cf5 +Author: Robert Story +Date: Mon Apr 13 16:09:48 2015 -0400 + + fix automerge of patch 2615 + +commit f9ed9d48b83fe4ac5c68a4354847f31f772f881b +Author: Bart Van Assche +Date: Sun Apr 12 21:17:42 2015 +0200 + + CHANGES: Windows: BUG: 2550: Suppress netsnmp_assert s != (-1) messages + +commit 65dffcbdb9618be73ac270202112ec0ab1ad0ad9 +Author: Bart Van Assche +Date: Sun Apr 12 21:05:13 2015 +0200 + + Windows: snmpd, snmptrapd: Fix Visual C++ build + + See also commit f0e87f4918ffc41e03f707e9670ea422cd154a9b. + +commit e6c5e24998d2ad4e535a3b0780007bae06e04f94 +Author: Hideki Yamane +Date: Sun Apr 12 20:44:48 2015 +0200 + + CHANGES: BUG: 2616: Fix certain spelling errors in source code comments and printed messages + +commit c0da9dd2768240327941291bc4c4533db009f2c4 +Author: Bart Van Assche +Date: Mon Apr 6 13:55:05 2015 +0200 + + apps/snmpvusm: Convert most exit() calls into return statements + +commit 803b4450bb70b129180d80c406647c13068e186d +Author: Bart Van Assche +Date: Mon Apr 6 13:40:39 2015 +0200 + + apps/snmpvacm: Convert most exit() calls into return statements + +commit 94dfd84b3ac992dec3e1c90d4cbb374dc1ee0293 +Author: Bart Van Assche +Date: Mon Apr 6 13:21:32 2015 +0200 + + apps/snmpwalk: Convert most exit() calls into return statements + +commit e0d927f47bc1f3635a50b8857812e032aeb39555 +Author: Bart Van Assche +Date: Mon Apr 6 11:51:21 2015 +0200 + + apps/snmptrapd: Convert most exit() calls into return statements + +commit cc0ed429bfee2bce2c992e5958d5b005b00fcd0a +Author: Bart Van Assche +Date: Mon Apr 6 11:47:04 2015 +0200 + + apps/snmptrap: Convert most exit() calls into return statements + +commit 3c47fb21e18556fb90bf0aded8ba457a99d04712 +Author: Bart Van Assche +Date: Mon Apr 6 11:37:31 2015 +0200 + + Windows: apps/snmptranslate: Suppress netsnmp_assert s != (-1) messages + + See also http://sourceforge.net/p/net-snmp/bugs/2550/. + +commit 74d2ead97f745cf30042781ada4fbab3891869fc +Author: Bart Van Assche +Date: Mon Apr 6 11:24:55 2015 +0200 + + apps/snmpnetstat/main.c: Convert most exit() calls into return statements + +commit b7b29b299048c568c7b912053e47ce9d37213efa +Author: Bart Van Assche +Date: Mon Apr 6 11:24:52 2015 +0200 + + apps/snmpnetstat/main.c: Fix indentation + +commit 0335703dcb2646addb885a1ea36af26b513c9077 +Author: Bart Van Assche +Date: Mon Apr 6 11:19:16 2015 +0200 + + apps/snmpgetnext: Convert most exit() calls into return statements + +commit 91a92645dfac5eb88ff09963cf4f461e76af75d8 +Author: Bart Van Assche +Date: Mon Apr 6 11:13:21 2015 +0200 + + apps/snmpget: Convert most exit() calls into return statements + +commit 879c01a74023161a9eaeca2b626f99d2cf60f410 +Author: Bart Van Assche +Date: Mon Apr 6 11:02:30 2015 +0200 + + apps/snmpdf: Convert most exit() calls into return statements + +commit 0f2d228e89563139a9e9f20bc223b2b369984459 +Author: Bart Van Assche +Date: Mon Apr 6 10:59:52 2015 +0200 + + apps/snmpdelta: Convert most exit() calls into return statements + +commit adc87ddf2f4f062b60988aaf2754afdbb7dd52ef +Author: Bart Van Assche +Date: Mon Apr 6 10:54:31 2015 +0200 + + apps/snmpbulkwalk: Convert most exit() calls into return statements + +commit 63686fad45ba0a551ba07c0cfeea035e6fdccf95 +Author: Bart Van Assche +Date: Mon Apr 6 10:50:21 2015 +0200 + + apps/snmpbulkget: Convert most exit() calls into return statements + +commit 09aaf2873a4a94c8573efccba62ec86d69dc8e11 +Author: Bart Van Assche +Date: Mon Apr 6 10:35:34 2015 +0200 + + agentxtrap: Convert exit() calls into return statements + +commit a6d87a75c432628429fecf8e3d609c5e05464363 +Author: Bart Van Assche +Date: Mon Apr 6 10:21:21 2015 +0200 + + snmpd: Convert exit() calls into return statements + +commit 3c1560af31db9a05b548faeb17ce65bf120af3fb +Author: Bart Van Assche +Date: Tue Apr 7 15:34:04 2015 +0200 + + Windows: snmptrapd: Fix Visual C++ build + + See also commit 0e4bf5d3659c459128c0f98926b0db7296e9c49f. + +commit 09b4e30d4a2f896edabc06a23ec638341c82ac96 +Author: Bart Van Assche +Date: Mon Apr 6 10:15:44 2015 +0200 + + proxy_parse_config(): Remove SOCK_CLEANUP() call + + This function does not invoke SOCK_STARTUP() which means that it + shouldn't invoke SOCK_CLEANUP() either. + +commit f23bcd3ac6ddee5d0a48f9703007ccc738914791 +Author: Robert Story +Date: Sat Apr 11 18:49:02 2015 -0400 + + CHANGES: BUG: #2615: Don't return incompletely parsed varbinds + +commit db2f552f427be8cf3886f3a213e291abb7894f14 +Author: Bill Fenner +Date: Fri Apr 10 14:00:02 2015 -0700 + + WIP: snmppcap + + snmppcap parses a pcap file, sending each packet through + snmp_parse(). + + It's a work in progress, because: + - snmp_parse() is static inside snmp_api + - it's very much hardcoded for ethernet/ipv4/udp/snmp + but it's useful enough to commit, and maybe others can + work on it. + +commit a90967cd64a53e4dab110c497b2f74d545c43b0f +Author: Jan Safranek +Date: Thu Apr 9 14:45:15 2015 +0200 + + Moved 'pdu' check to the top of the function. + +commit 0a1b338294b6864f08e1e8b173aebfd1cc8bfa63 +Author: Jan Safranek +Date: Thu Apr 9 14:05:51 2015 +0200 + + Fixed file descriptor leak. + +commit 980835e379187c36e9126eafbe2e002f4684b7ea +Author: Bart Van Assche +Date: Mon Apr 6 13:55:56 2015 +0200 + + testing: Run all apps under Valgrind if DYNAMIC_ANALYZER has been set + +commit 3b37187872fcb120476665d66ece457de44c5d78 +Author: Magnus Fromreide +Date: Sun Mar 15 10:17:35 2015 +0100 + + Simplify shebang generation. + On Solaris, /bin/sh is some ancient shell that lack support for $(). + Luckily this use of it was unnecessary since it could be replaced with a + default value expansion that is supported. + +commit dba5362b9fc262d66e4dcc9de2a9d4e84a900a92 +Author: Niels Baggesen +Date: Mon Mar 9 23:06:54 2015 +0100 + + Patch #a1297: adjust IF-MIB cache time on Solaris to match global cache time (3 secs). Thanks to hjbecker. + +commit ee9e36c79cceec354b783f3b38659f433f44f848 +Author: Niels Baggesen +Date: Mon Mar 9 21:59:06 2015 +0100 + + Fix BUG#a2604 bad comparison of enum names. + +commit dbb29a079ae92f075cd5603d59af6edc69fa9cb6 +Author: Niels Baggesen +Date: Mon Mar 9 21:40:45 2015 +0100 + + Fix BUG#a2595 adding an making it an option if kernel threads are counted in hrSystemProcesses. + +commit f8be7315054a4dce1088983924110577ea0d4fbb +Author: Niels Baggesen +Date: Mon Mar 9 21:30:18 2015 +0100 + + Fix BUG#a2595 making it an option if kernel threads are counted in hrSystemProcesses. + +commit 19e2bde74a4c2a3a66469a4f00e0234b83729211 +Author: Niels Baggesen +Date: Mon Mar 9 21:27:19 2015 +0100 + + Fix BUG#a2582 showMibErrors directive and -Pe options does not work. + +commit 435dfdce740367d522e52787e74cc1f59198301c +Author: Niels Baggesen +Date: Mon Mar 9 21:24:42 2015 +0100 + + Add rfc7453 to rfclist. + +commit 18e39b1dd454c2b478e2d8fa71d2e550f34f347c +Author: Magnus Fromreide +Date: Sun Mar 8 00:49:15 2015 +0100 + + Allow builds without utilities/execute + + Move netsnmp_close_fds to it's own file that is art of libnetsnmpagent and + adjust to include that file. + +commit d9789f2570452b54112443f3b8a32cf22a4ec783 +Author: Jan Safranek +Date: Fri Feb 27 13:55:07 2015 +0100 + + Fixed compiler warning. + +commit 2e1c8075698b8066c87353035f6aaacb1d61e830 +Author: Jan Safranek +Date: Fri Feb 27 12:53:15 2015 +0100 + + Removed superflous overflow check. + + Both high and low are 32-bit, they can't be higher than 2147483647 / lower than -2147483648. + +commit 0f9ecfd10614588a8e3e0b50c78a5d1790e888fd +Author: Jan Safranek +Date: Fri Feb 27 12:19:29 2015 +0100 + + Fixed EINTR logic. + 'continue' evaluates while() condition and if it is '0', the loop is never restarted on EINTR. + +commit e886f5eb9701851ad6948583156bfd59fcb6110f +Author: Jan Safranek +Date: Wed Feb 25 09:30:24 2015 +0100 + + CHANGES: snmpd: fixed lm_sensors not reporting sensors with duplicate names. + + Some systems report two or more sensors with the same name. + This patch adds support for reporting of all these duplicate + sensor names. + + Before the patch, these sensors were reported: + > lmTempSensorsDevice.2 = STRING: Core 0 + + After the patch, new sensors appear with a prefix: + > lmTempSensorsDevice.2 = STRING: Core 0 + > lmTempSensorsDevice.6 = STRING: coretemp-isa-0004:Core 0 + + This approach keeps backward compatibility (applications used to 'Core 0' + will keep workig, while it adds new sensorscto the table (with a prefix). + +commit ac9e6fbb30fbbfb4f03ea32abbad436e5094109c +Author: Bill Fenner +Date: Tue Feb 24 10:37:35 2015 -0800 + + Regenerate configure for --disable-ipv6 + +commit b527e39fb658ca3d4bec05aa609ac8f09842ac5f +Author: Bill Fenner +Date: Tue Feb 24 10:34:10 2015 -0800 + + Fix little bugs in nsautoconf(), so that it actually modifies $PATH correctly + +commit 90a428e52299a80070a6eabef04f0ba0dcc55cec +Author: Bill Fenner +Date: Tue Feb 24 10:32:49 2015 -0800 + + Regenerate configure for --disable-ipv6 change + +commit 714656a1d1737a84e40445f7840afef0313a8b3e +Author: Bill Fenner +Date: Tue Feb 24 10:18:51 2015 -0800 + + NEWS: IPv6 support is now compiled by default. If you need an IPv4-only agent, use --disable-ipv6. + +commit ffe0dcdf22a6225af8ed470d5977c882300a8ab2 +Author: Bill Fenner +Date: Tue Feb 24 12:17:25 2015 -0500 + + CHANGES: mib2c: BUG: 2598: declare the storage for column variables in mfd's _container_load + + The _container_load function assumes that you're going to fill + in a variable for each column; declare these variables so that + the sample code compiles even before you get around to filling + in this part of the code. + +commit 95b87c7fe990869f6b4ce62c0b2f0382e47699a5 +Author: Jan Safranek +Date: Thu Feb 19 15:14:10 2015 +0100 + + Add extra check to throw away invalid SMUX messages. + + Otherwise snmpd crashes on NULL pointer dereference. + +commit 653da2f955f88d7419363e6d31f2b5f0ffdc4f73 +Author: Jan Safranek +Date: Thu Feb 19 13:40:37 2015 +0100 + + Fixed missing printf argument from previous commit. + +commit 613da4f59eff1e34c05bb7d8b56462ccabe403f7 +Author: Jan Safranek +Date: Thu Feb 19 10:44:39 2015 +0100 + + Replace "snmpapp" with appropriate macro. + +commit 53ee5f1d240ac90adae935538bdc2ca13a8caa32 +Author: Jan Safranek +Date: Wed Feb 18 16:29:16 2015 +0100 + + CHANGES: snmplib: Fixed reporting 'error writing to /var/xxx/snmpapp.conf'. + + When a client utility, such as snmptrap, tries to write to its persistent + configuration file (/var/net-snmp/snmpapp.conf in Fedora), do not report + any error when open() fails. The tool is typically run by non-root, who + cannot write to /var and the error just confuses users. + + And when doing it, make sure that "snmpapp" string is defined only on one + place, just in case. + +commit 808422f29730977cbecd4c68c6388c3ab59affde +Author: Niels Baggesen +Date: Thu Feb 12 20:24:33 2015 +0100 + + BUG#2599: Add missing tcpOutRsts.0 for Solaris. Thanks to Sowrabha. + +commit 3e1726216526668df9e0e69669bfc8da6e639d06 +Author: Bill Fenner +Date: Thu Feb 5 14:11:55 2015 -0800 + + $datarootdir or $datadir may be relative to $prefix. + + It turns out that $datadir and/or $datarootdir may be set + to ${prefix}/share, so we need to make sure that $prefix + is set here too. + +commit 58beea43ba4c7dce5459d13d8338abaeb7a3601e +Author: Bill Fenner +Date: Thu Feb 5 11:12:41 2015 -0800 + + CHANGES: mib2c: mib2c now dies when referencing an unknown variable + + In a mib2c template, referencing an unknown variable (e.g., "$foo.type") + now causes mib2c to die instead of replacing it with the empty + string (and causing perl to emit a couple of worrying undefined variable + warnings.) + +commit 077831ecf919db2b68709d7ff5c7f991892a136e +Author: Bill Fenner +Date: Thu Feb 5 11:09:52 2015 -0800 + + Warn if a template tries to use an undefined variable. + +commit 42bb6b22148fc88e4e1a5e9f5f752d69a89385b1 +Author: Bill Fenner +Date: Thu Feb 5 10:54:04 2015 -0800 + + newer autoconf wants $datarootdir + + autoconf starting with 2.60 wants to set $datarootdir to + /usr/share, and then set $datadir to ${datarootdir}. + Setting the variables this way is compatible + with earlier and later versions. + +commit 5b19938a680e58076b2dfb0780f0c7c6401e6dda +Author: Bill Fenner +Date: Thu Feb 5 10:52:46 2015 -0800 + + In ${context}_undo_commit, write one e.g. line for each writable node. + + The existing code was referring to $node without setting it, + resulting in a warning from perl about using an uninitialized + variable or three. + +commit 148f2de48e1cd6ba8ebdab8591424df64ab967a3 +Author: Jan Safranek +Date: Thu Feb 5 14:01:44 2015 +0100 + + CHANGES: snmptrapd: Correctly forward traps with Request-ID '0'. + + Request-ID of forwarded traps is taken from the incoming trap and it can be zero. + We should not report error in this case. + +commit c0f5ffa9230c1a776f0116930d8405f56eea7b27 +Author: Bill Fenner +Date: Wed Feb 4 10:31:28 2015 -0800 + + My ipCidrRouteTable fix is obsoleted by nba's work already in 5.7.3 + + Undoing my ipCidrRouteTable change. This is the danger of committing + patches that are just lying around in your old git tree. Sorry for + the churn. + +commit 46163364f83ec5fc5548750146931d8f4653bdbb +Author: Bill Fenner +Date: Wed Feb 4 08:59:17 2015 -0800 + + Use the RFC2096 ipCidrRouteTable instead of the RFC1213 ipRouteTable. + +commit fb985e43992df6ac646f86fed9af551d258fcb72 +Author: Bill Fenner +Date: Wed Feb 4 08:34:46 2015 -0800 + + If we are allocating the container, set its name. + + If the user allocated a container, don't mess with what the + user supplied, but if they are relying on us to allocate it, + give it a name so that container error logs have a useful + context. + +commit e96c7ba1f053e6287e7ecf7923b97644e72700da +Author: Bill Fenner +Date: Wed Feb 4 08:32:08 2015 -0800 + + Transition from createAndWait to notReady or notInService + + When a row is set to createAndWait, the RowStatus TC requires + that it immediately transition to notReady (if the prerequisites + are not met yet) or notInService (if they are). + +commit f1cc242a0b4ea1e159580b0a26c2720a76356af4 +Author: Bill Fenner +Date: Wed Feb 4 08:31:01 2015 -0800 + + BITs are network byte order in the PDU + +commit 7955617c9259ad15a149ca691a902ad63630cc1c +Author: Bill Fenner +Date: Wed Feb 4 08:30:18 2015 -0800 + + Use %x, not %p, to log hex values that are not pointers. + +commit d5b3035537ecfa3500dc6570e12b578c135f1b44 +Author: Bill Fenner +Date: Tue Feb 3 12:05:17 2015 -0800 + + Get rid of $$hack:$ generating $Id$ in generated files + + Just as our source is not in CVS/SVN any more, the likelyhood + of the generated source being checked into CVS/SVN is getting + lower, so don't go the extra mile to add $Id$ to generated + files. + +commit 56ed3a23976cfe7f9db09e87004a7d27562b35ce +Author: Bill Fenner +Date: Tue Feb 3 13:50:46 2015 -0500 + + CHANGES: mib2c: PATCH: 1281, BUG: 2534 fixed mfd writability + + Applied patch from Razmetov Sergey in + https://sourceforge.net/p/net-snmp/patches/1281/ + +commit 26c4c5ef94c2c237d369b901443e342bc81e6011 +Author: Bill Fenner +Date: Tue Feb 3 13:43:23 2015 -0500 + + If we guess a "-p" argument of "-1", bail early before running the syntax error. + +commit 57f48927296988c6d5f0c714001afe6d2a05d98d +Author: Bill Fenner +Date: Tue Feb 3 10:00:02 2015 -0800 + + Fix comment (used a single # instead of mib2c ##) + + https://sourceforge.net/p/net-snmp/bugs/2531/ + reports that '#Determine the first/last column names' + sneaks through. It should use a mib2c-style ## comment. + +commit a92a7ab2190b145e1f7a12a13d4537b7b72b406e +Author: Bill Fenner +Date: Tue Feb 3 09:56:45 2015 -0800 + + Fix preprocesser macros and make cache per-table + + Per https://sourceforge.net/p/net-snmp/bugs/2530/ + we were generating bad preprocessor macros like + While fixing this, it came up that the cache + has to be per-table - $i.uc wasn't even defined + the first place it was used since it wasn't + per-table - so, make it per-table. + +commit fd040a47c2ba2f5314eaeca257787d4023864c40 +Author: Bill Fenner +Date: Tue Feb 3 09:35:57 2015 -0800 + + Remove CVS $Id$, $RCSfile$, $Revision$ keywords + + These keywords were just confusing, as they have no + meaning in the git world, and mib2c would then + try to interpret them and just insert garbage. + +commit 23cb01859744a15ad7dcc77a6b31808462dc0317 +Author: Bill Fenner +Date: Tue Feb 3 08:48:38 2015 -0800 + + Proxy to self and make sure walk works. + + This test is for the case described in + https://sourceforge.net/p/net-snmp/bugs/2578/ + where the reporter upgraded from 5.3.1 to 5.7.2.1 + and started getting "Error: OID not increasing" + when walking a proxied tree. I used the system + tree instead of the reporter's enterprise tree, + but otherwise believe that the replication is + correct. This test passes under 5.7.3, so I've + passed it back to the reporter to try 5.7.3 before + we dig deeper. + +commit 852dcd644cfe4cfc7177649eaec163d6221f2be1 +Author: Bart Van Assche +Date: Mon Feb 2 20:31:29 2015 +0100 + + configure: Eliminate the hard-coded libnl-3 include path + + See also commit 3dde41998625fe0e24119a2e1f4509ba3ba2fd9a. + +commit 1072a89ffdf73beda5b13598c944952b90c647b3 +Author: Bart Van Assche +Date: Tue Feb 3 09:29:28 2015 +0100 + + snmplib: Fix a build error + + See also commit 996fd4315b217fc8d6ccad051eab62cf98249eb8. + +commit 5e8a317614d03db14c970d84b3e5259b1787b575 +Author: Bart Van Assche +Date: Tue Feb 3 09:25:06 2015 +0100 + + Rerun autoconf + + See also commit ebb1e5b575b6ff9c9cc296454552a920882fda6e. + +commit 28552ae3a7675284bcf7eed058833ea00dfba9c3 +Author: Bart Van Assche +Date: Tue Feb 3 09:37:21 2015 +0100 + + lmsensorMib: Fix a compiler warning + +commit f0e87f4918ffc41e03f707e9670ea422cd154a9b +Author: Bart Van Assche +Date: Sat Jan 31 12:05:24 2015 +0100 + + CHANGES: snmpd: BUG: 2596: Reduce fork() overhead + + Avoid that the close() loop that is executed after a fork() delays + the pass/extend API on systems with a large maximum number of files + by reducing the number of iterations of this loop on Linux systems. + + See also http://sourceforge.net/p/net-snmp/bugs/2596. + + Reported-by: andymf + +commit 332521ac55339106892d88a28acb83c4806aeb2e +Author: Bart Van Assche +Date: Sun Feb 1 20:30:53 2015 +0100 + + snmplib: Close unneeded file descriptors explicitly after a fork() + + This patch does not change any functionality + +commit 551b9d7bfbac1a8e98fccc1969da0270635f4379 +Author: Niels Baggesen +Date: Fri Jan 30 12:23:16 2015 +0100 + + BUG#a2594: icmp.h: Add conditionals for FreeBSD 11 and 12. Thanks to Ryan Steinmetz. + +commit 75d17a242e524e66b6c8214f68dc9920d5bd59df +Author: Jan Safranek +Date: Fri Jan 30 11:29:53 2015 +0100 + + CHANGES: snmpd: Remove some log messages from SMUX processing. + + These messages are not useful to system admin and only makes system log unreadable. Let's move them to debug level. + +commit b43ae325d971a47a0778ae4e271067ef93871d07 +Author: Niels Baggesen +Date: Wed Jan 28 22:16:44 2015 +0100 + + Add rfc 7420 to rfclist + +commit 134a840f4577f2941c399feba2916521972cd239 +Author: Niels Baggesen +Date: Wed Jan 28 22:11:24 2015 +0100 + + Doing autoheader/autoconf + +commit 5d45a62c39db4bf70bec05464e8b9b7d5d13c89e +Author: Niels Baggesen +Date: Wed Jan 28 22:02:07 2015 +0100 + + Fix more logging mesages with more detail. + +commit 5adf253f3aca8ec005c78a2753adb29d2acd710c +Author: Niels Baggesen +Date: Wed Jan 28 21:49:23 2015 +0100 + + Fix several log messages with more details. + +commit 58801e4d6100185cd0866b8d63808348004e9776 +Author: Jan Safranek +Date: Wed Jan 28 15:17:07 2015 +0100 + + CHANGES: snmpd: Fix 32 bit integeres in hrStorageTable. + + RFC says the integers are de-facto 31 bits: 1..2147483647. + +commit 996fd4315b217fc8d6ccad051eab62cf98249eb8 +Author: Jan Safranek +Date: Wed Jan 14 11:52:05 2015 +0100 + + Added error message when bind for clientaddr fails. + +commit 98bbad2c261d7947175fa1cb393f104d1a5b6673 +Author: Jan Safranek +Date: Wed Jan 28 14:47:56 2015 +0100 + + CHANGES: snmpd: Fixed storageUseNFS functionality in hrStorageTable. + + The option was ignored. + +commit a0b4565941d92c6a1d2442f9d0a74d8371187845 +Author: Niels Baggesen +Date: Mon Jan 26 22:27:15 2015 +0100 + + Fix agent crash in expression mib when syntax error in expr or inacessible variables. + +commit 8ebc56be4db016ef7b4d0c335ba79824df648847 +Author: Niels Baggesen +Date: Mon Jan 26 22:17:00 2015 +0100 + + BUG#a2511: Fix missing multithreading guard in default_store. + +commit e9eb2ca64775c82fe4466ea57d3ae0c32c89bfd8 +Author: Niels Baggesen +Date: Mon Jan 26 20:58:39 2015 +0100 + + PATCH#a1289: Fix a memory leak in expression-mib. Thanks to Niels Skou Olsen. + +commit 083af396e26227780f29049891a469e83fd063eb +Author: Niels Baggesen +Date: Mon Jan 26 20:54:13 2015 +0100 + + PATCH#a1271: Fix for expressions with objects without deltain expression-mib. Thanks to Jahanzeb Farooq. + +commit 7ab2cb4feade75e3034dfc59bc31a4b3fd11c242 +Author: Niels Baggesen +Date: Mon Jan 26 20:39:42 2015 +0100 + + PATCH#a1268: Scale oid_len by sizeof(oid). Thanks to Jahanzeb Farooq. + +commit e25ae5bdec2b5c1baa0becc086cae2189221b315 +Author: Niels Baggesen +Date: Mon Jan 26 20:36:09 2015 +0100 + + expression-mib: Fix agent crash for syntax error and unavailable variables in expression. + +commit ebb1e5b575b6ff9c9cc296454552a920882fda6e +Author: Niels Baggesen +Date: Mon Jan 26 20:32:39 2015 +0100 + + BUG#a2587: Replicate all threads when daemon forks (Solaris). Thanks to Gowtham Thommandra. + +commit fe144b9ff0d6f56f30210a8af35395cc1fe0dbb7 +Author: Niels Baggesen +Date: Mon Jan 26 20:29:43 2015 +0100 + + BUG#a2586: Use proper Solaris procfs.h header file. Thanks to Gowtham Thommandra. + +commit a92628a163ebf1ea62220684736300461c003875 +Author: Niels Baggesen +Date: Mon Jan 26 20:26:06 2015 +0100 + + BUG#a2584: Fix snmptrap to use clientaddr from snmp.conf. Thanks to rizwan + +commit 6a421248afab56035066355727380781d515c545 +Author: Jan Safranek +Date: Mon Jan 26 10:40:10 2015 +0100 + + Fix 32 bit integeres in hrStorageTable. + + RFC says the integers are de-facto 31 bits: 1..2147483647. + +commit c223f17b0cd723af56c5b954cecbd12a3d24bc56 +Author: Robert Story +Date: Sun Jan 25 23:58:58 2015 -0500 + + patch from David Hauck for handling netlink error case + +commit 6fe6a1bfaf5e625c741ccd1e4d51041d02e8e11b +Author: Robert Story +Date: Sun Jan 25 22:57:21 2015 -0500 + + patch from Claus Klein for null ptr dereference + +commit f4d301f7b38b9f56397a4a4ed90f7e21cdcc5753 +Author: Jan Safranek +Date: Thu Jan 22 13:24:12 2015 +0100 + + Removed unused variables from net-snmp-create-v3-user. + +commit 333aea41eb8bcdb9afae6bb89f3581f8e70ee830 +Author: Jan Safranek +Date: Thu Jan 22 12:03:39 2015 +0100 + + Fixed "netsnmp_assert 1 == new_val->high failed" appearing in system log. + + This information is completelly useless to system admin and only confuses users. + +commit bd1b6f80f7248a1e17fd8caf700a3bdc9400f97d +Author: Wes Hardaker +Date: Wed Jan 14 09:48:17 2015 -0800 + + fixed broken code with too many )s in rarely compiled code + +commit 68d2c8fd4bf2390612f288ff488b7c08102bcd0a +Author: Jan Safranek +Date: Wed Jan 14 11:52:05 2015 +0100 + + Added error message when bind for clientaddr fails. + +commit 00cd965d5804073fa391e079d3f68388060d463d +Author: Niels Baggesen +Date: Tue Dec 16 21:50:01 2014 +0100 + + Install include/net-snmp/system/darwin1?.h files. + +commit 6926df4232107c8fd52e4dd75407ed84effc464d +Author: Niels Baggesen +Date: Tue Dec 16 21:45:24 2014 +0100 + + Install include/net-snmp/system/darwin1?.h files. + +commit 8766d00cdf294447c9500ec2da3b7aaac88db9ed +Author: Niels Baggesen +Date: Tue Dec 16 21:41:34 2014 +0100 + + snmptrapd_sql.c: reorder includes to cather for mariadb-5.5.40 (CentOS 7) + +commit 3fc1242045527b3f208c5f9a96c0a6d7a41e5962 +Author: Niels Baggesen +Date: Mon Dec 15 22:46:22 2014 +0100 + + Add for Darwin 14 + +commit 92e8cbe950d66b51d0ce304fa7ede5febef6136b +Author: Niels Baggesen +Date: Mon Dec 15 22:39:53 2014 +0100 + + snmptrapd_sql.c: reorder includes to cather for mariadb-5.5.40 (CentOS 7) + +commit f6cb8472f816b81a03d97ff5420b992d3bf0e424 +Author: Niels Baggesen +Date: Thu Dec 11 22:50:50 2014 +0100 + + fsys_mntent.c: netsnmp_fsys_calculate32 is only available from V5.7, + nspatchtry/apply were a bit too optimistic. + +commit 09e688ed0155fed304a4ed950ea04af7d56b024c +Author: Bart Van Assche +Date: Wed Dec 10 09:19:03 2014 +0100 + + Follow-up for "manual merge" + + Remove the files that were added in the commit "manual merge". + Restore the configure script, the Makefile.depend files, the README + and the FAQ. Modify agent/mibgroup/mibII.h such that is no longer + references to an source code file that has been removed from this + branch. + + See also commit 72dbc380a8d33539fc1f55a84b3940d07eee5eea. + +commit eb134e31bacab7d2bdbac3bf7acc4e98cff03144 +Author: Niels Baggesen +Date: Tue Dec 9 22:13:10 2014 +0100 + + Updated list of mibs from IANA and RFC. + +commit e793a36814a106d92e71ba7884190eadabc3ad7f +Author: Niels Baggesen +Date: Tue Dec 9 22:12:33 2014 +0100 + + Updated IANA mibs + +commit 0473aba2429618bd96cec4705db84a57bd70bcd1 +Author: Niels Baggesen +Date: Tue Dec 9 22:11:19 2014 +0100 + + fsys_mntent: clear entry when statfs fails + +commit e02e93f3bd33dd57697fb4434e93763b25cda11c +Author: Niels Baggesen +Date: Tue Dec 9 22:04:37 2014 +0100 + + Patch for DragonFlyBSD 4.0 + +commit 98f94dac3852ad5e77531ea4387926c6ec74fdc0 +Author: Wes Hardaker +Date: Mon Dec 8 13:52:33 2014 -0800 + + new makerelease with various text and step fixes + +commit 1225dc2a8efd8448e2354acf75fdc6954b5e4620 +Author: Bart Van Assche +Date: Sun Oct 12 15:47:14 2014 +0200 + + Regenerate configure script + + See also "Fix detection of sha224 and sha384, patch from Brian Sipos" + (git commit ID 7ecfd3ede19e9c2218c9bf5959c095ce9fa6c8ab). + +commit 22bc79a8ee036b61f61183ba717dcb5d8915a971 +Author: Jan Safranek +Date: Fri Apr 11 09:32:18 2014 +0200 + + Mark 'mvfs' (ClearCase) filesystem as NFS. + + The main goal is to skip them when skipNFSInHostResources is used. + +commit ae24d4451a6ff8494adf262a2376e7fea9541e24 +Author: Jan Safranek +Date: Fri Apr 11 09:30:21 2014 +0200 + + Mark local functions as static. + +commit 5be210c90870ff6bab193d497d401b92c1d50db9 +Author: Jan Safranek +Date: Thu Mar 6 13:26:30 2014 +0100 + + CHANGES: snmpd: add new snmpd.conf option 'diskio' to monitor only selected disks. + + On machines with thousands of block devices, parsing /proc/diskstats is really + slow. The new option enables monitoring of selected devices, saving lot of CPU + time. + +commit e12b06e976d7476e8c1f8d77e9ad9e9c92bca502 +Author: Magnus Fromreide +Date: Sat Mar 1 01:27:27 2014 +0100 + + Regenerate configure using the correct autoconf version to make the test target succeed + +commit 3f27c6a414aa066428bad9938710dedf9501e274 +Author: Wes Hardaker +Date: Thu Dec 5 23:33:37 2013 -0800 + + Replace // comments with /* comments + +commit c1b25c33320075663e81c215276ddf2cec19f26d +Author: Magnus Fromreide +Date: Sat Feb 15 09:03:57 2014 +0100 + + Move the definition of SD_LISTEN_FDS_START to the implementation + +commit dd509c675ed2b667973625c7dd49acfb74ec89f5 +Author: Magnus Fromreide +Date: Fri Feb 14 09:52:40 2014 +0100 + + Make two more netsnmp_sd_ functions static + +commit da3a0705312f6345e52595dcfebc88d9a90abe45 +Author: Magnus Fromreide +Date: Fri Feb 14 09:47:27 2014 +0100 + + Remove unused functions + +commit c0494f691ac0476bd5d4fc8c77011a8f5136415f +Author: Magnus Fromreide +Date: Thu Feb 13 09:03:10 2014 +0100 + + Use SD_LISTEN_FDS_START instead of a magic number + +commit 9df00bd665b7065cd7b44c52e6c7e4d7f3fc4ef6 +Author: Magnus Fromreide +Date: Sun Dec 29 17:48:52 2013 +0100 + + Regenerate dependencies + +commit 4c4065249526e7a301582198b3c750a831d24835 +Author: Bart Van Assche +Date: Sat Dec 14 17:06:54 2013 +0100 + + Unbreak the Windows build (see also commit 80e27fcf) + +commit 80e27fcf2061e533a34a77413e835023772b74ed +Author: Bill Fenner +Date: Mon Dec 9 13:12:48 2013 -0800 + + CHANGES: snmptranslate: introduce bulk translation mode + + The special argument "-" causes snmptranslate to enter + bulk translation mode, in which it expects one OID per + line. Whitespace is treated as the end of the OID, and + only that portion of the line is replaced, meaning that + this can be used to translate, e.g., "snmpwalk" output + without the proper MIBs loaded: + snmptranslate -m all -OX < numeric.txt > symbolic.txt + + ---------------------------------------------------------------------- Changes: V5.7.3.rc3 -> V5.7.3 @@ -121991,7 +142110,7 @@ Changes: V5.0.9 -> V5.1 * agent/mibgroup/agentx/master.c: - - don't send requests for OIDs preceeding the start of a region + - don't send requests for OIDs preceding the start of a region (this can lead to loops if e.g. a subagent has registered two adjacent rows). @@ -151072,7 +171191,7 @@ Changes: V5.0.9 -> V5.1 * apps/snmptrapd.c: - (snmptrapd.c): - - Beta version of an extensible trap demon. + - Beta version of an extensible trap daemon. - -C 'command' on the command line runs the command and feeds it stdin information about the trap. - v1 traps are converted to v2 traps for consistancy of @@ -151374,7 +171493,7 @@ Changes: V5.0.9 -> V5.1 snmplib/snmp_impl.h, man/Makefile.in: - (*/*/*/*): Patch from Niels Baggesen: - - fix auto_nlist on preceeding _ architectures. + - fix auto_nlist on preceding _ architectures. - Change *all* define usage to new SNMP_ and ASN_ prefixes. - leave mib access open if no com2sec statements were found in snmpd.conf. @@ -169312,7 +189431,7 @@ Changes: V4.2 -> V5.0 * agent/mibgroup/agentx/master.c: - - don't send requests for OIDs preceeding the start of a region + - don't send requests for OIDs preceding the start of a region (this can lead to loops if e.g. a subagent has registered two adjacent rows). @@ -195054,7 +215173,7 @@ hardaker 9 Mar 98 17:40:04 hardaker 11 Mar 98 08:06:17 - (*/*/*/*): Patch from Niels Baggesen: - - fix auto_nlist on preceeding _ architectures. + - fix auto_nlist on preceding _ architectures. - Change *all* define usage to new SNMP_ and ASN_ prefixes. - leave mib access open if no com2sec statements were found in snmpd.conf. @@ -195176,7 +215295,7 @@ hardaker 26 Mar 98 07:22:30 hardaker 27 Mar 98 09:20:04 - (snmptrapd.c): - - Beta version of an extensible trap demon. + - Beta version of an extensible trap daemon. - -C 'command' on the command line runs the command and feeds it stdin information about the trap. - v1 traps are converted to v2 traps for consistancy of diff --git a/FAQ b/FAQ index 2844d33..f5f9aa1 100644 --- a/FAQ +++ b/FAQ @@ -1,7 +1,7 @@ Frequently Asked Questions (FAQ) for the UCD/Net-SNMP package ============================================================= FAQ Author: Dave Shield - Net-SNMP Version: 5.7.3 + Net-SNMP Version: 5.9.4 Net-SNMP/UCD-SNMP Project Leader: Wes Hardaker Email: net-snmp-coders@lists.sourceforge.net @@ -190,13 +190,11 @@ Where can I get it? Download: - http://www.net-snmp.org/download/ - - ftp://ftp.net-snmp.org/pub/sourceforge/net-snmp/ Web page: - http://www.net-snmp.org/ Sourceforge Project page: - http://www.net-snmp.org/project/ Mirrors (note that sourceforge download servers are mirrored themselves): - - US: ftp://ftp.freesnmp.com/mirrors/net-snmp/ - Greece: ftp://ftp.ntua.gr/pub/net/snmp/net-snmp/ @@ -238,8 +236,6 @@ Are there binaries available? These binaries are also available on the project FTP site, with a link on the same web page. - There is also a mirror at ftp://ftp.freesnmp.org/mirrors/net-snmp/ - What's the difference between UCD-SNMP and Net-SNMP? diff --git a/INSTALL b/INSTALL index 199de64..6e4cf81 100644 --- a/INSTALL +++ b/INSTALL @@ -113,7 +113,8 @@ The simplest way to compile this package is: files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. - 7. You can remove the application by typing `make uninstall'. + 7. You can remove the application (but not the perl or python modules) + by typing `make uninstall'. There may be additional installation issues discussed in the README's for various platforms such as README.solaris. @@ -126,7 +127,7 @@ Installing the Perl/SNMP Module (which includes other Net-SNMP specific modules as well), all of which are located in the net-snmp/perl directory. The Perl package provides a high level abstract interface to the functionality found in the -Net-SNMP libraries and demon applications. +Net-SNMP libraries and daemon applications. It is recommended you install the perl modules as you build the Net-SNMP package. The configure script can be run as follows to diff --git a/Makefile.in b/Makefile.in index cfcdf73..1c1182e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,28 +3,29 @@ # Makefile.in (at the root of net-snmp) # -top_builddir = . VPATH = @srcdir@ SUBDIRS = snmplib @MAINSUBS@ +SUBDIRDEPS = sedscript FTSUBDIRS = @FTMAINSUBS@ snmplib TESTDIRS = testing CPP = @CPP@ \ - -Iinclude -I$(srcdir)/include -I$(srcdir)/agent/mibgroup -I. -I$(srcdir) \ + -I$(srcdir)/include -I. \ -DDONT_INC_STRUCTS -DBINDIR=$(bindir) \ $(EXTRACPPFLAGS) INSTALLHEADERS=version.h net-snmp-features.h INCLUDESUBDIR=system INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \ - darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \ + darwin.h dragonfly.h dynix.h \ freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \ freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \ - freebsd12.h freebsd.h \ - generic.h \ - hpux.h irix.h linux.h mingw32.h mips.h netbsd.h osf5.h \ - openbsd.h openbsd5.h openbsd4.h \ + freebsd12.h freebsd13.h freebsd14.h freebsd.h \ + generic.h \ + hpux.h irix.h kfreebsd.h linux.h mingw32.h mingw32msvc.h mips.h \ + netbsd.h nto-qnx6.h osf5.h \ + openbsd.h openbsd6.h openbsd5.h openbsd4.h \ solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \ solaris.h sunos.h svr5.h sysv.h ultrix4.h INCLUDESUBDIR2=machine @@ -33,6 +34,7 @@ INSTALLBUILTHEADERS=include/net-snmp/net-snmp-config.h INSTALLBUILTINCLUDEHEADERS=@FEATUREHEADERS@ INSTALLBINSCRIPTS=net-snmp-config net-snmp-create-v3-user INSTALLUCDHEADERS=ucd-snmp-config.h version.h mib_module_config.h +INSTALL_PKGCONFIG=netsnmp.pc netsnmp-agent.pc # # other install rules. @@ -111,8 +113,8 @@ agentxtrap snmptrapd: @FEATURETARGS@ # # local build rules # -sedscript: sedscript.in include/net-snmp/net-snmp-config.h $(srcdir)/agent/mibgroup/mibdefs.h - $(CPP) $(srcdir)/sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript +sedscript: $(srcdir)/sedscript.in include/net-snmp/net-snmp-config.h $(srcdir)/agent/mibgroup/mibdefs.h + $(CPP) -I$(srcdir) -Iinclude $(srcdir)/sedscript.in | $(EGREP) '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript echo 's/VERSIONINFO/$(VERSION)/g' >> sedscript echo 's#DATADIR#$(datadir)#g' >> sedscript echo 's#LIBDIR#$(libdir)#g' >> sedscript @@ -120,14 +122,14 @@ sedscript: sedscript.in include/net-snmp/net-snmp-config.h $(srcdir)/agent/mibgr echo 's#PERSISTENT_DIRECTORY#$(PERSISTENT_DIRECTORY)#g' >> sedscript echo 's#SYSCONFDIR#@sysconfdir@#g' >> sedscript -EXAMPLE.conf: sedscript EXAMPLE.conf.def +EXAMPLE.conf: sedscript $(srcdir)/EXAMPLE.conf.def $(SED) -f sedscript $(srcdir)/EXAMPLE.conf.def > EXAMPLE.conf docs: docsdir docsdir: docsdox -docsdox: doxygen.conf +docsdox: $(srcdir)/doxygen.conf srcdir=$(srcdir) VERSION=$(VERSION) doxygen $(srcdir)/doxygen.conf net-snmp-config-x: net-snmp-config @@ -176,12 +178,17 @@ perlmodules: perlmakefiles subdirs exit 1 ; \ fi -perlmakefiles: net-snmp-config-x - @if test ! -f perl/Makefile; then \ - (dir=`pwd`; \ - cd perl ; \ - $(PERL) Makefile.PL -NET-SNMP-IN-SOURCE=true -NET-SNMP-CONFIG="sh $$dir/net-snmp-config" $(PERLARGS) ) ; \ - fi +perlmakefiles: perl/Makefile net-snmp-config-x + +perl/Makefile: perl/Makefile.PL subdirs + dir=`pwd` && \ + cd perl && \ + if false; then \ + carp=-MCarp::Always; \ + fi && \ + export PERL5LIB="$$dir/perl" && \ + $(PERL) $$carp Makefile.PL -NET-SNMP-IN-SOURCE=true \ + -NET-SNMP-CONFIG="sh $$dir/net-snmp-config" $(PERLARGS) perlinstall: @(cd perl ; $(MAKE) install) ; \ @@ -190,10 +197,7 @@ perlinstall: fi perluninstall: - @(cd perl ; $(MAKE) uninstall) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi + echo "WARNING: perl doesn't support uninstall" perltest: @(cd perl ; $(MAKE) test) ; \ @@ -230,7 +234,7 @@ pythonmodules: subdirs fi pythoninstall: - @(dir=`pwd`; cd python; $(PYMAKE) install --basedir=$$dir) ; \ + @(dir=`pwd`; cd python; $(PYMAKE) install --basedir=$$dir --root=$(DESTDIR) --prefix=$(prefix)) ; \ if test $$? != 0 ; then \ exit 1 ; \ fi @@ -271,6 +275,7 @@ configclean: makefileclean libtool include/net-snmp/net-snmp-config.h \ net-snmp-config net-snmp-config-x configure-summary \ net-snmp-create-v3-user net-snmp-create-v3-user-x + rm -f *.pc rm -f mibs/.index rm -f include/net-snmp/agent/mib_module_config.h \ include/net-snmp/agent/agent_module_config.h \ @@ -310,6 +315,7 @@ Makefile: Makefile.in config.status Makefile.rules Makefile.top configure_ac = configure.ac \ configure.d/config_modules_agent \ configure.d/config_modules_lib \ + configure.d/config_net_snmp_config_h \ configure.d/config_os_functions \ configure.d/config_os_headers \ configure.d/config_os_libs1 \ @@ -328,7 +334,7 @@ configure_ac = configure.ac \ configure.d/config_project_with_enable $(srcdir)/include/net-snmp/net-snmp-config.h.in: stamp-h.in -$(srcdir)/stamp-h.in: $(configure_ac) acconfig.h +$(srcdir)/stamp-h.in: $(configure_ac) @if test "x$(NOAUTODEPS)" = "x" -a "x$(AUTOHEADER)" != "x:"; then \ cd ${srcdir} && LC_COLLATE=C $(AUTOHEADER); \ echo timestamp > ${srcdir}/stamp-h.in; \ @@ -430,7 +436,7 @@ warningcheck: assertcheck: @echo "Checking for non-snmp asserts..." - @if grep -n -w "assert" `$(FIND) $(top_srcdir) -name \*.\[ch\] | grep -v snmp_assert.h | egrep -v 'perl/.*c' | grep -v openssl`; then false; fi + @if grep -n -w "assert" `$(FIND) $(top_srcdir) -name \*.\[ch\] | grep -v snmp_assert.h`; then false; fi commentcheck: @echo "Checking for C++ style comments..." @@ -449,6 +455,16 @@ perlcalloccheck: dist: tar +rpm: dist + rpmtopdir=$$PWD/rpmbuilddir && \ + for d in BUILD RPMS SOURCES SPECS SRPMS; do \ + mkdir -p $${rpmtopdir}/$$d; \ + done && \ + cp net-snmp-$(VERSION).tar.gz $${rpmtopdir}/SOURCES && \ + MAKE="$(MAKE)" rpmbuild --define="%_topdir $${rpmtopdir}" \ + -ba dist/net-snmp.spec && \ + find $${rpmtopdir} -name '*rpm' + FAQ.html: local/FAQ2HTML FAQ diff --git a/Makefile.rules b/Makefile.rules index 9e9e900..a84253c 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -23,21 +23,18 @@ $(FEATUREFILE): $(FTOBJS) $(top_builddir)/include/net-snmp/feature-details.h cat $(FTOBJS) > $(FEATUREFILE).in $(FEATUREPROCESS) $(FEATUREFILE) $(top_builddir)/include/net-snmp/feature-details.h @FEATURE_REMOVE_FLAGS@ @FEATURE_ADD_FLAGS@ ftsubdirs: - @if test "$(FTSUBDIRS)" != ""; then \ - SUBDIRS="$(FTSUBDIRS)" ; \ - else \ - SUBDIRS="$(SUBDIRS)" ; \ - fi ; \ - if test "$$SUBDIRS" != ""; then \ - it="$$SUBDIRS" ; \ - for i in $$it ; do \ - echo "making features in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) features ) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ - done \ - fi + @if test "$(FTSUBDIRS)" != ""; then \ + SUBDIRS="$(FTSUBDIRS)"; \ + else \ + SUBDIRS="$(SUBDIRS)"; \ + fi; \ + echo "$(PWD): making feature files in $${SUBDIRS}"; \ + for i in $${SUBDIRS}; do \ + test "$$i" != "" || continue; \ + echo "making features in `pwd`/$$i"; \ + (cd "$$i" && $(MAKE) features) || exit "$$?"; \ + done; \ + echo "$(PWD): finished making feature files." .PHONY: cleanfeatures cleanfeaturessubdirs cleanfeatures: cleanfeaturessubdirs @@ -70,7 +67,7 @@ cleanfeaturessubdirs: > $(top_builddir)/include/net-snmp/feature-details.h $(FEATURECHECK) --feature-global $(top_builddir)/include/net-snmp/feature-details.h $(mysubdir) $< $@ $(CC) -E $(CPPFLAGS) $(CFLAGS) -c -subdirs: +subdirs: $(SUBDIRDEPS) @if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ @@ -85,12 +82,14 @@ subdirs: # installlibs handles local, ucd and subdir libs. need to do subdir libs # before bins, sinze those libs may be needed for successful linking install: installlocalheaders @installucdheaders@ \ - installlibs \ - installlocalbin installlocalsbin \ + installlibs install_pkgconfig \ + installlocalbin installlocalsbin \ installsubdirs $(OTHERINSTALL) -uninstall: uninstalllibs uninstallbin uninstallsbin uninstallheaders \ - uninstallsubdirs $(OTHERUNINSTALL) +uninstall: uninstalllibs uninstall_pkgconfig \ + uninstallbin uninstallsbin \ + uninstallheaders \ + uninstallsubdirs $(OTHERUNINSTALL) installprogs: installbin installsbin @@ -287,6 +286,26 @@ uninstalllibs: done \ fi +# +# pkg-config files +# +install_pkgconfig: $(INSTALL_PKGCONFIG) + @if test "x$(INSTALL_PKGCONFIG)" != x; then \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(libdir)/pkgconfig; \ + for i in $(INSTALL_PKGCONFIG); do \ + echo "installing $$i in $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \ + done; \ + $(INSTALL_DATA) $(INSTALL_PKGCONFIG) $(INSTALL_PREFIX)$(libdir)/pkgconfig; \ + fi + +uninstall_pkgconfig: + @if test "x$(INSTALL_PKGCONFIG)" != x; then \ + for i in $(INSTALL_PKGCONFIG); do \ + echo "removing $$i from $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \ + $(UNINSTALL) $(INSTALL_PREFIX)$(libdir)/pkgconfig/$$i;\ + done; \ + fi + # # normal bin binaries # @@ -416,13 +435,17 @@ lint: # depend: dependdirs @if test -f Makefile.depend ; then \ - makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \ + makedepend `echo $(CPPFLAGS) | \ + awk '{for(i=1;i<=NF;i++) if (match(substr($$i,1,2), "-[ID]")) print $$i}'` \ + -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \ fi nosysdepend: nosysdependdirs @if test -f Makefile.depend ; then \ - makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \ + makedepend `echo $(CPPFLAGS) | \ + awk '{for(i=1;i<=NF;i++) if (match(substr($$i,1,2), "-[ID]")) print $$i}'` \ + -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \ $(PERL) -n -i.bak $(top_srcdir)/makenosysdepend.pl Makefile ; \ fi diff --git a/Makefile.top b/Makefile.top index 503f61e..d1b3923 100644 --- a/Makefile.top +++ b/Makefile.top @@ -4,6 +4,7 @@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ VERSION = @VERSION@ @SET_MAKE@ @@ -68,7 +69,7 @@ LINKCC = @LINKCC@ # last update, increment current (+5), and set age and revision to 0. Stop. # # - If any interfaces have been added since the last public release, then -# increment current and age, and set revision to 0. Stop. +# increment current AND age, and set revision to 0. Stop. # # - If the source code has changed at all since the last update, # then increment revision (c:r:a becomes c:r+1:a). @@ -80,11 +81,12 @@ LINKCC = @LINKCC@ # 5.3 was at 10, 5.4 is at 15, ... This leaves some room for needed # changes for past releases if absolutely necessary. # -LIBCURRENT = 30 -LIBAGE = 0 -LIBREVISION = 3 +# Most recent change: 40 for the v5.8.1 release. +LIBCURRENT = 42 +LIBAGE = 2 +LIBREVISION = 1 -LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o +LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o LIB_EXTENSION = la LIB_VERSION = LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir) @@ -97,7 +99,7 @@ RANLIB = : .c.lo: $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< .rc.lo: - $(LIBTOOL) --mode=compile --tag=CC windres -o $@ -i $< + $(LIBTOOL) --mode=compile --tag=RC @RC@ -o $@ -i $< # include paths # diff --git a/NEWS b/NEWS index dbd3700..a07e356 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,172 @@ Please see the CHANGES file for a more detailed list of specific bugs/patches that have been fixed/applied, and the ChangeLog file for a comprehensive listing of all changes made to the code. +*5.9.4*: + + IMPORTANT: SNMP over TLS and/or DTLS are not functioning properly + in this release with various versions of OpenSSL and will be fixed + in a future release. + + libsnmp: + - Remove the SNMP_SWIPE_MEM() macro Remove this macro since it is not + used in the Net-SNMP code base. + - DISPLAY-HINT fixes + - Miscellanious improvements to the transports + - Handle multiple oldEngineID configuration lines + - fixes for DNS names longer than 63 characters + + agent: + - Added a ignoremount configuration option for the HOST-MIB + - disallow SETs with a NULL varbind + - fix the --enable-minimalist build + + apps: + - snmpset: allow SET with NULL varbind for testing + - snmptrapd: improved MySQL logging code + + general: + - configure: Remove -Wno-deprecated as it is no longer needed + - miscellanious ther bug fixes, build fixes and cleanups + +*5.9.3*: + security: + - These two CVEs can be exploited by a user with read-only credentials: + - CVE-2022-24805 A buffer overflow in the handling of the INDEX of + NET-SNMP-VACM-MIB can cause an out-of-bounds memory access. + - CVE-2022-24809 A malformed OID in a GET-NEXT to the nsVacmAccessTable + can cause a NULL pointer dereference. + - These CVEs can be exploited by a user with read-write credentials: + - CVE-2022-24806 Improper Input Validation when SETing malformed + OIDs in master agent and subagent simultaneously + - CVE-2022-24807 A malformed OID in a SET request to + SNMP-VIEW-BASED-ACM-MIB::vacmAccessTable can cause an + out-of-bounds memory access. + - CVE-2022-24808 A malformed OID in a SET request to + NET-SNMP-AGENT-MIB::nsLogTable can cause a NULL pointer dereference + - CVE-2022-24810 A malformed OID in a SET to the nsVacmAccessTable + can cause a NULL pointer dereference. + - To avoid these flaws, use strong SNMPv3 credentials and do not share them. + If you must use SNMPv1 or SNMPv2c, use a complex community string + and enhance the protection by restricting access to a given IP address range. + - Thanks are due to Yu Zhang of VARAS@IIE and Nanyu Zhong of VARAS@IIE for + reporting the following CVEs that have been fixed in this release, and + to Arista Networks for providing fixes. + + misc: + - Snmp-create-v3-user: Fix the snmpd.conf path @datadir@ is + expanded in ${datarootdir} so datarootdir must be set before + @datadir@ is used. + + general: Many bug fixes + +*5.9.2*: + security: + - These two CVEs can be exploited by a user with read-only credentials: + - CVE-2022-24805 A buffer overflow in the handling of the INDEX of + NET-SNMP-VACM-MIB can cause an out-of-bounds memory access. + - CVE-2022-24809 A malformed OID in a GET-NEXT to the nsVacmAccessTable + can cause a NULL pointer dereference. + - These CVEs can be exploited by a user with read-write credentials: + - CVE-2022-24806 Improper Input Validation when SETing malformed + OIDs in master agent and subagent simultaneously + - CVE-2022-24807 A malformed OID in a SET request to + SNMP-VIEW-BASED-ACM-MIB::vacmAccessTable can cause an + out-of-bounds memory access. + - CVE-2022-24808 A malformed OID in a SET request to + NET-SNMP-AGENT-MIB::nsLogTable can cause a NULL pointer dereference + - CVE-2022-24810 A malformed OID in a SET to the nsVacmAccessTable + can cause a NULL pointer dereference. + - To avoid these flaws, use strong SNMPv3 credentials and do not share them. + If you must use SNMPv1 or SNMPv2c, use a complex community string + and enhance the protection by restricting access to a given IP address range. + - Thanks are due to Yu Zhang of VARAS@IIE and Nanyu Zhong of VARAS@IIE for + reporting the following CVEs that have been fixed in this release, and + to Arista Networks for providing fixes. + + misc: + - Snmp-create-v3-user: Fix the snmpd.conf path @datadir@ is + expanded in ${datarootdir} so datarootdir must be set before + @datadir@ is used. + + general: Many bug fixes + +*5.9.1*: + General: Many bug fixes + +*5.9* + snmplib: + - Add IPv6 support to DTLSUDP transport CHANGES: snmplib: use new + netsnmp_sockaddr_storage in netsnmp_addr_pair CHANGES: snmplib: add + base_transport ptr for tunneled transports + + snmpd: + - Security vulnerabilty in the ping MIB reported by Christopher Ertl + from Microsoft fixed + - Changing to a different uid/gid can only be done once + - The extend mib is now read-only by default + + snmptrap: + - BUG: 2899: Patch from Drew Roedersheimer to set library + engineboots/time values before sending + + unspecified: + - Add pkg-config support for building applications and sub-agents Use + the netsnmp package when building Net-SNMP applications. Use the + netsnmp-agent package when building Net-SNMP subagents. + +*5.8* + snmplib: + - TLS/DTLS fixes + - fix usm keychanges for new algorithms and longer keylengths + - IP address formatting fixes + - BUG: 2592: from Stuart Kendrick - increase MAXTC to 16384 + - add new sha2 auth protocols + - Restore AES-192 and AES-256 privacy protocols - from + draft-blumenthal-aes-usm-04 (precursor to RFC 3826) + - Use OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt + - Some code borrowed from PATCH 1346, thanks to + Alexander Ivanov and Vladimir Sukhorukov. + - BUG: 2622: Fix excessive indents in log file + - new config tokens: + - sendMessageMaxSize + - disableSNMPv1 / disableSNMPv2c + - new api for dynamic debug log level (netsnmp_set_debug_log_level) + + snmpd: + - SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress + - Com2sec and com2sec6 SOURCE values may deny sources as well as + permit. + - allow trap sinks to set Target-MIB characteristics (name, tag, profile) + - add source addr/port option to trapsink/trap2sink/informsink + - packet filtering by source ip (enableSourceFiltering/filtersource) + - several getbulk handling improvements + - several new APIs introduced for run-time configuration of agent: + - netsnmp_vacm_simple_usm_add/del + - usm_create_usmUser_* + - netsnmp_udp_com2SecEntry_create/netsnmp_udp_com2SecList_remove + - netsnmp_agent_listen_on to open agent port + + Win32: + - Add support for the DTLS-UDP and TLS-TCP transports + + scripts: + - A new 'checkbandwidth' script to check host min/max bandwidth + + snmptranslate: + - Introduce bulk translation mode The special argument "-" causes + snmptranslate to enter bulk translation mode, in which it expects + one OID per line. Whitespace is treated as the end of the OID, and + only that portion of the line is replaced, meaning that this can be + used to translate, e.g., "snmpwalk" output without the proper MIBs + loaded: snmptranslate -m all -OX < numeric.txt > symbolic.txt + + building: + - Add Travis and Appveyor CI support + - IPv6 support is now compiled by default. If you need an IPv4-only + agent, use --disable-ipv6. + - Fixed/improved support for several non-Linux platforms + - Many fixes found by Coverity anf Fortify scans + *5.7.3* Many many bug fixes and minor improvements @@ -1070,7 +1236,7 @@ UCD-SNMP NEWS: Ports: - HPUX 11 - Dynix/PTX 4.4 - - The snmpd demon can properly run as a windows service + - The snmpd daemon can properly run as a windows service *4.2.3* New: diff --git a/README b/README index 86600bc..3380cd2 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ - README file for net-snmp Version: 5.7.3 + README file for net-snmp Version: 5.9.4 DISCLAIMER @@ -62,15 +62,12 @@ AVAILABILITY Download: - http://www.net-snmp.org/download/ - - ftp://ftp.net-snmp.org/pub/sourceforge/net-snmp/ Web page: - http://www.net-snmp.org/ Project Wiki: - http://www.net-snmp.org/wiki/ Sourceforge Project page: - http://sourceforge.net/projects/net-snmp - Mirrors: - - US: ftp://ftp.freesnmp.com/mirrors/net-snmp/ The old ucd-snmp.ucdavis.edu web site and ftp server is now offline and should not be accessed any longer. @@ -248,113 +245,8 @@ CLOSING THANKS - The following people have contributed various patches and - improvements. To them we owe our deepest thanks (and you do too!): - - Wes Hardaker - Steve Waldbusser - Dan A. Dickey - Dave Shield - Giovanni S. Marzot - Niels Baggesen - Simon Leinen - David T. Perkins - Mike Perik - Sanjai Narain - francus@metsny.delphi.com - Gary Palmer - Marc G. Fournier - Gary A. Hayward - Jennifer Bray - Philip Guenther - Elwyn B Davies - Simon Burge - David Paul Zimmerman - Alan Batie - Michael Douglass - Ted Rule - Craig Bevins - Arther Hyun - Cristian Estan - Eugene Polovnikov - Jakob Ellerstedt - Michael J. Slifcak - Jonas Olsson - James H. Young - Jeff Johnson - Markku Laukkanen - Derek Simkowiak - David F. Newman - Nick Amato - Mike Baer - Patrick Lawrence - Russ Mundy - Olafur Gudmundsson - David Reeder - Ed Lewis - Bill Babson - Chris Smith - Mike Michaud - Andy Hood - Robert Story - Bert Driehuis - Juergen Schoenwaelder - Frank Strauss - Ragnar Kjrstad - Jochen Kmietsch - Jun-ichiro itojun Hagino - John L Villalovos - Christoph Mammitzsch - Arne Oesleboe - Jeff Cours - Karl Schilke - John Naylon - Ken Hornstein - Martin Oldfield - Harrie Hazewinkel - Mark Ferlatte - Marus Meissner - Stephan Wenzer - Ron Mevissen - T.J. Mather - Craig Setera - Katsuhisa ABE - Axel Kittenberger - Johannes Schmidt-Fischer - Jeffrey Watson - Bruce Shaw - Stefan Radman - Stephen J. Friedl - Alex Burger - Christophe Varoqui - Srikanth Pindiproli - Kevin Graham - Xiaofeng Ling - Brandon Knitter - Andrew Findlay - Ron Tabor - Peter Warasin - Bob Rowlands - Peter Hicks - Andy Smith - Nick Barkas - Noah Friedman - Geert De Peuter - Magnus Fromreide - Marcus Meissner - Andrew Rucker Jones - Dai.H. - Thomas Anders - Vladislav Bogdanov - Peter Martin - Thomas Lackey - Joe Buehler - Anders Persson - Rojer - Bart Van Assche - Pablo Carboni - Bill Fenner - Brian Sipos - - We've probably forgotten people on this list. Let us know if you've - contributed code and we've left you out. + This project has been graciously supported by a long list of people + (too long to keep roperly up to date). To them we owe our deepest + thanks (and you do too!). Please see the git log or ChangeLog file, + where the core developers are careful to have (hopefully always) + pointed out where patches have come from. diff --git a/README.agent-mibs b/README.agent-mibs index 53f1caa..1905fab 100644 --- a/README.agent-mibs +++ b/README.agent-mibs @@ -67,7 +67,7 @@ SNMPv2-MIB system.?.0 A 5.5 W mibII/system_mib.c .sysORLastChange.0 A 5.5 W mibII/sysORTable.c sysORTable A 5.5 C mibII/sysORTable.c - snmp.*.0 A 5.5 G mibII/snmp_mib_5_5.c + snmp.*.0 A 5.5 G mibII/snmp_mib.c setSerialNo.0 A 5.0 W mibII/setSerialNo.c ------------------------------------------------------------------------------ @@ -76,15 +76,15 @@ SNMP-FRAMEWORK-MIB ------------------------------------------------------------------------------ SNMP-MPD-MIB - snmpMPDStats.*.0 A ~4.0? G snmpv3/snmpMPDStats_5_5.c + snmpMPDStats.*.0 A ~4.0? G snmpv3/snmpMPDStats.c ------------------------------------------------------------------------------ SNMP-TARGET-MIB snmpTargetSpinLock.0 A 3.6 O target/snmpTargetAddrEntry.c snmpTargetAddrTable A 3.6 O target/snmpTargetAddrEntry.c snmpTargetParamsTable A 3.6 O target/snmpTargetParamsEntry.c - snmpUnavailableContexts.0 A 5.5 G target/target_counters_5_5.c - snmpUnknownContexts.0 A 5.5 G target/target_counters_5_5.c + snmpUnavailableContexts.0 A 5.5 G target/target_counters.c + snmpUnknownContexts.0 A 5.5 G target/target_counters.c ------------------------------------------------------------------------------ SNMP-NOTIFICATION-MIB @@ -104,8 +104,8 @@ SNMP-PROXY-MIB ------------------------------------------------------------------------------ SNMP-USER-BASED-SM-MIB - usmStats.*.0 A ~4.0 O snmpv3/usmStats.c - usmStats.*.0 A 5.5 G snmpv3/usmStats_5_5.c + usmStats.*.0 A ~4.0 O --- deleted --- + usmStats.*.0 A 5.5 G snmpv3/usmStats.c usmUserTable A ~4.0? O snmpv3/usmUser.c ------------------------------------------------------------------------------ diff --git a/README.systemd b/README.systemd new file mode 100644 index 0000000..f731851 --- /dev/null +++ b/README.systemd @@ -0,0 +1,41 @@ +README.systemd +-------------- +Net-SNMP provides two daemons, which support systemd system manager. +See http://www.freedesktop.org/wiki/Software/systemd to learn how +systemd works. Both socket activation and notification is supported by these +daemons. + +To enable systemd support, the sources must be compiled with +--with-systemd configure option. + +snmpd - The SNMP agent +---------------------- +Socket activation od snmpd daemon is implemented, but it's discouraged. +The reason is simple - snmpd not only listens and processes SNMP requests +from network, but also gathers system statistics counters, sends traps and +communicates with subagents. It even opens few netlink sockets. + +In other words, snmpd should run from system start to properly work. +This can be done in two ways: +1) either as snmpd service unit with 'Type=notification' and without a socket + unit +2) or as snmpd service unit with 'Type=simple', appropriate socket socket unit + and the snmpd service enabled. This way systemd creates the snmpd listening + socket early during boot and passes the sockets to snmpd slightly later + (but still during machine boot). This way systemd can paralelize start of + services, which depend on snmpd. Admins must adjust the socket file manually, + depending if the snmpd support AgentX, IPv6, SMUX etc. + +snmpd should be started with '-f' command line parameter to disable forking - +systemd does that for us automatically. + + +snmptrapd - The trap processing daemon +-------------------------------------- +snmptrapd supports full socket activation and also notification (if needed). +Both 'Type=simple' (with appropriate socket unit) and 'Type=notify' services +will work. Again, '-f' parameter should be provided on snmptrapd command line. + +If integration with SNMP agent using AgentX protocol is enabled, snmptrapd should +start during boot and not after first SNMP trap arrives. Same rules as for snmpd +applies then. \ No newline at end of file diff --git a/README.win32 b/README.win32 index e49243b..e2ed25d 100644 --- a/README.win32 +++ b/README.win32 @@ -4,9 +4,7 @@ * *************************************************************************** -This guide describes how to build Net-SNMP with Microsoft Visual C++, the -MinGW gcc compiler or the Cygwin gcc compiler. As developers build with other -Win32 environments, their notes will be included here. +This guide describes how to build Net-SNMP binaries for Windows. The sections in this guide are: @@ -14,7 +12,6 @@ Current Status for Win32 platforms Interactions with Other Vendor's Products Running Net-SNMP as a replacement for the Microsoft SNMP service Co-existence with Microsoft SNMP services -Installing Platform SDK Microsoft Visual C++ - Overview Microsoft Visual C++ - Configure / nmake - Building Microsoft Visual C++ - Workspace - Building @@ -26,13 +23,12 @@ Microsoft Visual C++ - Building with IPv6 Microsoft Visual C++ - Building your own applications with snmplib Microsoft Visual C++ - Extending the Agent GCC on Windows -Cygwin - Building MinGW - Building MinGW - Building with OpenSSL Configuring Net-SNMP How to Register the Net-SNMP Agent and Trap Daemon as Windows services Notes on SET support for WIN32 ports -Notes on preprocessor defines for MSVC, MinGW and Cygwin +Notes on preprocessor defines Acknowledgements @@ -42,14 +38,10 @@ Acknowledgements * *************************************************************************** -All applications build with Microsoft Visual C++ 6.0, Microsoft Development -Environment 2003 (MSVC 7.0/7.1), Microsoft Visual Studio 2005, Microsoft -Visual Studio 2008, Microsoft Visual Studio 2010, gcc under Cygwin and gcc -under MinGW. +All applications build with Microsoft Studio, MinGW and Mingw-w64. - All of the applications work (snmpwalk, snmpget, snmpset, snmptrap, ...). - - The system, snmp, ip, tcp, udp and icmp MIB-groups work (requires the - Platform SDK). + - The system, snmp, ip, tcp, udp and icmp MIB-groups work. - The Net-SNMP agent runs as an AgentX master agent or as subagent. - smux is working. - The target, notification, disman/mte groups compile but are not tested. @@ -58,28 +50,14 @@ under MinGW. - Running the agent on a non-standard UDP or TCP port works. - Snmpd can be registered as a Windows service. - Snmptrapd can be registered as a Windows service. - - Some build environments allow long pathnames that contain - embedded spaces. As this is not true for Cygwin "configure", - the documented example scripts will refer to "c:/usr" - as the base directory for installed Net-SNMP software. - When using the winExtDLL extension agent, the Net-SNMP agent will load the Windows SNMP Service extension DLLs. The next subsection relates to items that are built using Visual Studio - - All Visual Studio project (.dsp) files are cleaned, and - a) Generate code to use Multi-Threaded DLL (/MD) "C" run-time library; - b) Provide the same preprocessor defines (WIN32,_CONSOLE,_MBCS); - c) Remove unnecessary references to GDI, ODBC, and "C" libraries; - d) Debug versions build source browsing and debugging information; - e) Provide consistent include search paths. - - All Debug and Release targets linked with libsnmp project targets build without errors, and are fully functional. - - Both building via the interactive development environment and via the - command line (nmake) is supported. - - With Visual Studio 2005 and later, the Net-SNMP source code can be compiled into either 32-bit or 64-bit executables (the amd64/x64 architecture). Previous Visual Studio versions support 32-bit executables @@ -100,7 +78,7 @@ The next subsection relates to items that are built using Visual Studio - Running the Net-SNMP Agent or trap receiver as a service on Windows 95 or Windows 98 is not supported. - - The Net-SNMP agent and trap receiver will fail to start if either + - The Net-SNMP agent and trap receiver will fail to start if either cannot bind to their connect port (161 for agent, 162 for trap receiver). Check the Services panel to be sure no other SNMP program conflicts. See the section titled 'Co-existence with Microsoft SNMP services' below. @@ -109,7 +87,7 @@ The next subsection relates to items that are built using Visual Studio retaining all functionality and with slightly better SNMP conformance. See the section titled 'Co-existence with Microsoft SNMP services' below. - - The Net-SNMP agent does not use the MS SNMP.dll, therefore it cannot + - The Net-SNMP agent does not use the MS SNMP.dll, therefore it cannot run as an extensible part of the MS agent. It is possible to use a third party proxy agent for the MS agent to 'proxy' requests to the Net-SNMP agent listening on a different UDP port on the same machine. @@ -124,14 +102,17 @@ The next subsection relates to items that are built using Visual Studio * *************************************************************************** -As of Net-SNMP 5.4, the Net-SNMP agent is able to load the Windows SNMP -service extension DLLs by using the Net-SNMP winExtDLL extension. +The Net-SNMP agent is able to load the Windows SNMP service extension DLLs by +using the Net-SNMP winExtDLL extension. -The Windows SNMP service must be installed, but the service must be disabled. -This is required so that the extension DLLs are available for loading, and -also because this extension and the existing Windows extensions use the +The Windows SNMP service must be installed, but the service must be disabled. +This is required so that the extension DLLs are available for loading, and +also because this extension and the existing Windows extensions use the Windows SNMP API from snmpapi.dll. +Additionally, Net-SNMP must be built in 32-bit mode. This is because Microsoft +only provides a 32-bit version of the SNMP extension DLLs. + An alternative to winExtDLL is to proxy requests from Net-SNMP to the Windows SNMP service. See the section 'Co-existence with Microsoft SNMP services'. @@ -146,25 +127,39 @@ Limitations value of the sysUpTime varbind included in the traps generated by SNMP extension DLLs (e.g. linkUp and linkDown) and the value of the sysUpTime varbind included in traps generated by Net-SNMP itself (e.g. coldStart). - + - When using winExtDLL, hrSystemUptime.0 reports the system uptime in thousands of a second instead of hundreds of a second. This is well known behavior of the Microsoft DLL that implements this MIB object. For more information, see also https://connect.microsoft.com/onecare/feedback/ViewFeedback.aspx?FeedbackID=504908. +Installing the Windows SNMP Service +----------------------------------- + +The procedure for installing the Windows SNMP service on Windows 10 is as +follows: + +1. Use the Windows + I key combination to open the Settings App. +2. Go to the Apps category and move to Apps & features tab. +3. Tap on the Optional features button. +4. On the new page, click on the Add a feature button. +5. Scroll down to Simple Network Management Protocol (SNMP) and select it. +6. Press the Install button to install SNMP on your PC. + + Enabling the Windows SNMP extension agents ------------------------------------------ -When installing Net-SNMP using the binary available from the web site, select +When installing Net-SNMP using the binary available from the web site, select 'With Windows Extension DLL support' for the 'Net-SNMP Agent Service'. The recommended way to start snmpd is with the following command line: - snmpd.exe -I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable + snmpd.exe -I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,snmp_mib,system_mib,sysORTable -The above command will exclude all the Net-SNMP extensions that overlap with -the default Windows (2003) extensions included with Windows. Other Net-SNMP +The above command will exclude all the Net-SNMP extensions that overlap with +the default Windows (2003) extensions included with Windows. Other Net-SNMP modules take precedence over the modules loaded by winExtDLL. The binary install of Net-SNMP includes shortcuts in the Start menu for @@ -185,22 +180,21 @@ instead of the usual Net-SNMP: Windows host1 5.0.2195 Service Pack 4 2000 Server x86 Family 15 Model 12 Stepping 0 -then it's using the Windows DLLs. You may also notice that your floppy -drive is accessed when starting the service. This is from one of the +then it's using the Windows DLLs. You may also notice that your floppy +drive is accessed when starting the service. This is from one of the Windows extensions. -To see what Windows modules are being loaded, you can shut down the -service and then run snmpd.exe from the command line with winExtDLL +To see what Windows modules are being loaded, you can shut down the +service and then run snmpd.exe from the command line with winExtDLL debugging enabled using (all on one line): - snmpd.exe -Lo -I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib, - sysORTable -DwinExtDLL + snmpd.exe -Lo -I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,snmp_mib,system_mib,sysORTable -DwinExtDLL The Windows DLL snmpmib.dll (SNMPMIB) contains SNMP traffic statistics (.1.3.6.1.2.1.11). As we are using Net-SNMP and not the Windows SNMP Service, -no values will be returned from the Windows extension. To allow SNMP -statistics to be received, the Net-SNMP module snmp_mib is permitted to load -by not excluding it in the above command line. As stated above, this module +no values will be returned from the Windows extension. To allow SNMP +statistics to be received, the Net-SNMP module snmp_mib is permitted to load +by not excluding it in the above command line. As stated above, this module will take precedence over the Windows module. @@ -214,8 +208,8 @@ The following registry keys are used by the Windows SNMP Service to determine what extension DLLs to load: HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents - -Each REG_SZ value contains the registry path to an extension agent which + +Each REG_SZ value contains the registry path to an extension agent which contains the path to the DLL. For example: Name Type Value @@ -232,27 +226,15 @@ Service dependencies -------------------- Services that depend on the SNMP Service will have to be modified to depend on -Net-SNMP instead of SNMP by modifying the registry. See Microsoft article +Net-SNMP instead of SNMP by modifying the registry. See Microsoft article 193888 for more information. -Compiling Net-SNMP with the winExtDLL extension (MSVC) ------------------------------------------------------- - -When building with MSVC 6, the Microsoft Platform SDK is required. Note: the -most recent Platform SDK version that is still compatible with MSVC 6 is the -February 2003 edition. This edition is no longer available online but can be -ordered via http://mssdk.orderport.net/22221848/showall.asp. - -Configure / nmake: +Compiling Net-SNMP with the winExtDLL extension +----------------------------------------------- --add --with-winextdll to the Configure command line. - -Workspace: - --in file win32\net-snmp\net-snmp-config.h modify - /* #undef USING_WINEXTDLL_MODULE */ into the following: - #define USING_WINEXTDLL_MODULE 1 +To build Net-SNMP with the winExtDLL extension, add --with-winextdll to the +configure command line. *************************************************************************** @@ -261,51 +243,51 @@ Workspace: * *************************************************************************** -If the Microsoft SNMP agent service (SNMP Service) is running, the Net-SNMP +If the Microsoft SNMP agent service (SNMP Service) is running, the Net-SNMP agent (snmpd) will fail to start as it will not be able to bind to the default TCP/IP port of 161. -If the Microsoft SNMP Trap Receiver service is running, the Net-SNMP trap -receiver (snmptrapd) will fail to start as it will not be able to bind to the +If the Microsoft SNMP Trap Receiver service is running, the Net-SNMP trap +receiver (snmptrapd) will fail to start as it will not be able to bind to the default TCP/IP port of 162. It is not a requirement to install the Net-SNMP agent (snmpd) or trap receiver -(snmptrapd). All the command line utilities such as snmpget.exe, snmpset.exe -and the Perl modules will work without the Net-SNMP services. All the +(snmptrapd). All the command line utilities such as snmpget.exe, snmpset.exe +and the Perl modules will work without the Net-SNMP services. All the utilities will work against any SNMP agent. -The main benefit of running the Microsoft SNMP agent instead of the Net-SNMP -agent is that many Windows applications such as Microsoft SQL Server, -Microsoft Exchange etc, extend the Microsoft agent. Net-SNMP is NOT a drop +The main benefit of running the Microsoft SNMP agent instead of the Net-SNMP +agent is that many Windows applications such as Microsoft SQL Server, +Microsoft Exchange etc, extend the Microsoft agent. Net-SNMP is NOT a drop in replacement for the Microsoft agent unless the winExtDLL Net-SNMP extension -is used (see the section 'Running Net-SNMP as a replacement for the Microsoft +is used (see the section 'Running Net-SNMP as a replacement for the Microsoft SNMP service'). Running Net-SNMP in place of the Microsoft agent (without winExtDLL) will prevent the other applications from working with SNMP. Also, the Net-SNMP agent does not contain as many MIBs as the Microsoft agent. For -example, as of August 2005, the HOST-RESOURCES (host) MIB is not yet +example, as of August 2005, the HOST-RESOURCES (host) MIB is not yet implemented in Net-SNMP. There are many benefits of running the Net-SNMP agent instead of the Microsoft -such as you can extend the agent using various features found in snmpd.conf +such as you can extend the agent using various features found in snmpd.conf such as pass and pass_persist (support for others are being added), you can use SNMP v3, and there is more granular access control. -To allow both the Microsoft and Net-SNMP agent / trap receiver to run at the -same time, the default TCP/IP port must be changed on either the Microsoft or +To allow both the Microsoft and Net-SNMP agent / trap receiver to run at the +same time, the default TCP/IP port must be changed on either the Microsoft or Net-SNMP version of the application. -The Net-SNMP ports for snmpd and snmptrapd can be modified via snmpd.conf and -snmptrapd.conf or by using a command line option with each program. See the +The Net-SNMP ports for snmpd and snmptrapd can be modified via snmpd.conf and +snmptrapd.conf or by using a command line option with each program. See the Net-SNMP Help file for instructions on changing the port number. -The Microsoft services use the 'snmp' and 'snmptrap' entries in the SERVICES +The Microsoft services use the 'snmp' and 'snmptrap' entries in the SERVICES file (%SystemRoot%\system32\drivers\etc\services) to determine the port to bind -the service to when the service starts. Simply modify the entries and restart +the service to when the service starts. Simply modify the entries and restart the affected services. -Note: Changing the default port the service listens on will prevent it from - accepting requests or receiving traps from standard SNMP devices and - management stations unless they have also been reconfigured to use the +Note: Changing the default port the service listens on will prevent it from + accepting requests or receiving traps from standard SNMP devices and + management stations unless they have also been reconfigured to use the new port numbers. It is possible to configure Net-SNMP agent to listen on the default UDP port @@ -316,72 +298,72 @@ the Microsoft agent and subagents. To this, follow these steps: 1. Change the port that the Microsoft agent listens on. - 2. Configure the Microsoft agent to only accept requests from localhost. + 2. Configure the Microsoft agent to only accept requests from localhost. This can be set in the Security tab for the SNMP service in Windows 2000+. This is recommended to prevent users from querying the Microsoft agent directly. - - 3. Add a r/c community string to the Microsoft agent. This can be set in - the Security tab for the SNMP service in Windows 2000+. This will give + + 3. Add a r/c community string to the Microsoft agent. This can be set in + the Security tab for the SNMP service in Windows 2000+. This will give Net-SNMP full SNMP access. User access can be restricted by Net-SNMP as explained below. - + 4. Restart the Microsoft SNMP service. 5. Configure Net-SNMP to proxy requests to the Microsoft agent. To have it - forward ALL requests to the Microsoft agent, add the following line to + forward ALL requests to the Microsoft agent, add the following line to snmpd.conf: - + proxy -v 1 -c public localhost:1161 .1.3 - + To only forward a section of the MIB tree such as the host section, use: - + proxy -v 1 -c public localhost:1161 host - + 6. Start the Net-SNMP agent. - + Notes: If Net-SNMP has built in support for an OID and the proxy statement is not for a specific OID, then it will respond instead of proxying the request. For example, if you proxy the 'system' tree and issue - an snmpget for sysDescr.0, Net-SNMP will respond with it's own + an snmpget for sysDescr.0, Net-SNMP will respond with it's own version of sysDescr.0 instead of forwarding it. To prevent Net-SNMP - from doing this, you must prevent the system MIB from being - initialized when snmpd.exe is started by specifying what MIBS to + from doing this, you must prevent the system MIB from being + initialized when snmpd.exe is started by specifying what MIBS to initialize using the -I switch. - - If you are forwarding everything to the Microsoft agent (.1.3), + + If you are forwarding everything to the Microsoft agent (.1.3), start snmpd.exe using: - + snmpd.exe -Ivacm_conf,proxy,pass,pass_persist - + The above will enable proxy, pass and pass_persist support. See the snmpd man page for more information on the -I switch. - + If you are forwarding a section of the tree that is not implemented in Net-SNMP such as 'host', you do not need to use the -I switch as - Net-SNMP will forward the request. This may cause issues in the + Net-SNMP will forward the request. This may cause issues in the future if newer versions of Net-SNMP implement the section of the tree you are forwarding, such as the HOST-RESOURCES MIB. - - The pass and pass_persist commands will work even if the entire + + The pass and pass_persist commands will work even if the entire tree is proxied to the Microsoft Agent. - + 7. Test the agent. If you have forwarded the entire tree, issue an snmpget for sysDescr.0. For example: - + snmpget -v 1 -c public localhost sysDescr.0 - + The Microsoft agent will respond in a format similar to: - - Hardware: x86 Family 15 Model 12 Stepping 0 AT/AT COMPATIBLE - Software: + + Hardware: x86 Family 15 Model 12 Stepping 0 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Uniprocessor Free) - + The Net-SNMP agent would normally respond in a format similar to: - + Windows host1 5.0.2195 Service Pack 4 2000 Server x86 Family 15 Model 12 Stepping 0 -If you had previously configured the Microsoft agent with multiple community +If you had previously configured the Microsoft agent with multiple community strings to restrict who can read and write to the OID tree, the security settings should be transferred to snmpd.conf. For example, if the Microsoft agent was configured with: @@ -398,7 +380,7 @@ Add the following to snmpd.conf: rwcommunity S3cur39876 rwcommunity Sn0wb0ard345 -It is possible to add more granular security using Net-SNMP. For example, to +It is possible to add more granular security using Net-SNMP. For example, to restrict the public community string to only read the system tree, use: rocommunity public 0.0.0.0 system @@ -408,125 +390,65 @@ See the snmpd.conf man page for more information on configuring security. *************************************************************************** * -* Installing Platform SDK +* Microsoft Visual Studio - Overview * *************************************************************************** -If you are using Microsoft Visual Studio 6.0, you will have to install the -Platform SDK (PSDK) first. - -Once the PSDK has been installed, select the following action from the Start -Menu: Programs / Microsoft Windows SDK / Visual Studio Registration / Windows -SDK Configuration Tool. - -If you are using any of the following environments, the PSDK download is not -necessary as the required parts of the PSDK are included: - - Microsoft Visual Studio 2002 or later. - - Cygwin. - - MinGW. - -In order for the process part of the host resources MIB to work under Windows -NT you will need to obtain PSAPI.DLL. This is available under the download -section of www.microsoft.com. The DLL is included with Windows 2000 and XP, -and is also part of the VC++ distribution. - -If you are building Net-SNMP using Cygwin, go now to "Cygwin - Building". -If you are building Net-SNMP using MinGW, go now to "MinGW - Building". -Otherwise, see the Building section below. - - -*************************************************************************** -* -* Microsoft Visual C++ - Overview -* -*************************************************************************** - -There are two ways to build Net-SNMP using Microsoft Visual C++. The first -and easiest method is using Configure and nmake on the command line, and the -second is using the Workspace files inside the interactive development -environment. +nmake is required to build Net-SNMP with Microsoft Visual Studio. To use nmake on the command line, the Configure script is run first to create the various makefiles. Once these have been created, nmake is used to build the applications. Perl is required to use this method, as the Configure -script is written in Perl. ActiveState ActivePerl is available at: +script is written in Perl. Perl source code is available at: - http://www.activestate.com/Products/ActivePerl/ + https://www.cpan.org/src/ -The make file system is based on and uses the directory structure of the +The make file system is based on and uses the directory structure of the projects contained in the Workspace files which are described below. It is recommended that you read and understand how the workspaces are configured even if you will only be using the command line Configure / nmake system. -For building via the interactive development environment, there are the Win32 -workspaces win32.dsw and libdll.dsw. The last workspace allows to build a DLL -version of snmplib (netsnmp.dll). - -There is one core development library ('libsnmp'), together with a number -of utility projects for the individual executable commands ('snmpget', -'snmpwalk', etc...). All of these projects require the .lib created by -the libsnmp project. - -The agent requires the core library plus the other two library projects -('libagent' and 'netsnmpmibs') together with the main agent project ('snmpd'). - -The final application project is the trap handler 'snmptrapd'. This also -requires the agent libraries ('libagent' and 'netsnmpmibs') as well as the -core development library. - -There is a Debug version and Release version for each subproject. This is so -the Debug and Release versions of an application can be built and tested -separately. - -VC++ 6.0, 7.1, 8.0 (2005), 9.0 (2008) and 10.0 (2010) have been tested. -Building with earlier Microsoft compiler versions is no longer supported. - -Note: if you want to distribute the generated executable, you will also need +If you want to distribute the generated executable, you will also need to distribute the Microsoft Visual Studio Redistributable Package. Check the EULA included with that package before redistributing it. OpenSSL is required to support the encryption capabilities in SNMPv3, or SHA authentication. -Since the MSVC build environment does not natively use "configure" nor "make" -to generate the various pathnames that the programs require, the header files -need to be manually modified when using the IDE, and an install script is -provided. When using the Perl Configure / nmake system, the header files are -automatically modified and require no manual editing. +Since the Microsoft Visual Studio build environment does not natively use +"configure" nor "make" to generate the various pathnames that the programs +require, the header files need to be manually modified when using the IDE, and +an install script is provided. When using the Perl Configure / nmake system, +the header files are automatically modified and require no manual editing. The projects are arranged so that ALL of the usable products, the .exe files, -are written to the win32\bin directory. The win32\lib directory is used only -to build the the files in the win32\bin directory. Once building is +are written to the win32\bin directory. The win32\lib directory is used only +to build the the files in the win32\bin directory. Once building is completed, there is no further use for the files in the win32\lib directory. -Debug Information ------------------ - -Note that VC++ 6.0 has options for debugging information - the 'Program -Database'. This option is set in the Project settings, C/C++ tab, 'General' -category, and is turned on by default during the conversion of the project -files. This option is not for use with a library, as it embeds debug -information into the library that references an external file that will -not be available to the linking application. If you get an error message -along the lines of 'debugging information not available in file vc60.pdb, -make sure the library debug option is set to 'Program Database' or "/Zi". - - *************************************************************************** * -* Microsoft Visual C++ - Configure / nmake - Building +* Microsoft Visual Studio - Configure / nmake - Building * *************************************************************************** -There are two ways to build Net-SNMP using the Configure / nmake system. +There are two ways to build Net-SNMP using the Configure / nmake system. The first and easiest method is by running the win32\build.bat script. The second is manually running Configure and nmake. -Note: Perl is required to use this method as the Configure script is - written in Perl. ActiveState ActivePerl is available at: +Note: Perl is required to use this method as the Configure script is + written in Perl. The Perl source code is available at: - http://www.activestate.com/Products/ActivePerl/ + https://www.cpan.org/src/ +The Perl interpreter can be built as follows: +1. Extract the Perl source code archive. +2. In win32/Makefile, change CCTYPE to the string that corresponds to your + Visual Studio version, e.g. MSVC140. +3. Edit INST_DRV and INST_TOP if necessary. +4. Run vcvarsall.bat. +5. Run nmake. +6. Run nmake install. Win32\build.bat script ====================== @@ -558,45 +480,44 @@ steps to build using build.bat: ================================== 1. OpenSSL support: disabled - 2. Platform SDK support: disabled + 2. OpenSSL include directory: C:\OpenSSL-Win64\include + 3. OpenSSL library directory: C:\OpenSSL-Win64\lib\VC + 4. Platform SDK support: disabled - 3. Install path: c:/usr - 4. Install after build: enabled + 5. Install path: c:/usr + 6. Install after build: enabled - 5. Perl modules: disabled - 6. Install perl modules: disabled + 7. Perl modules: disabled + 8. Install perl modules: disabled - 7. Quiet build (logged): enabled - 8. Debug mode: disabled + 9. Quiet build (logged): enabled + 10. Debug mode: disabled - 9. IPv6 transports (requires SDK): disabled - 10. winExtDLL agent (requires SDK): disabled + 11. IPv6 transports (requires SDK): disabled + 12. winExtDLL agent (requires SDK): disabled - 11. Link type: static + 13. Link type: static - 12. Install development files disabled + 14. Install development files disabled F. Finished - start build Q. Quit - abort build - Select option to set / toggle: + Select option to set / toggle: -6. Toggle the options on and off as desired by typing the line number - followed by . +6. Toggle the options on and off as desired by typing the line number + followed by . - To compile with OpenSSL, the OpenSSL library and header files must - already be installed. See the section 'Microsoft Visual C++ - Building + To compile with OpenSSL, the OpenSSL library and header files must + already be installed. See the section 'Microsoft Visual C++ - Building with OpenSSL' for details. - To compile with the Platform SDK, the Platform SDK must already be - installed. See the section 'Installing Platform SDK' for details. - To use the IPv6 transports, Windows 98 or later is required. - See the section 'Running Net-SNMP as a replacement for the Microsoft + See the section 'Running Net-SNMP as a replacement for the Microsoft SNMP service' for important information on using the winExtDLL agent. - If Quiet mode is enabled, all build activity is stored in various *.out + If Quiet mode is enabled, all build activity is stored in various *.out files inside of the win32 folder. When you are ready to build, type f @@ -604,7 +525,7 @@ steps to build using build.bat: 7. Building will begin. Following is a sample screen shot of a quiet build: Building... - + Deleting old log files... Running Configure... Cleaning... @@ -618,13 +539,13 @@ steps to build using build.bat: Building Perl modules... Testing Perl modules... Installing Perl modules... - + See perlmake.out for Perl test results - + Done! -8. If the folder that Net-SNMP was installed to is ever changed, modify the - system environment variables or registry keys as explained in the +8. If the folder that Net-SNMP was installed to is ever changed, modify the + system environment variables or registry keys as explained in the 'Configuration_Overview.html' file located in win32/dist/htmlhelp. @@ -648,17 +569,16 @@ first by the Configure script. Following are sample steps to: 2. Initialize the Visual Studio build environment by running VCVARS32.bat which can be found in the bin folder of your Visual Studio install folder. -3. Type (all on one line): +3. Run the following command: - perl Configure --with-sdk --with-ssl --config=debug - --prefix="c:/usr" + perl Configure --with-sdk --with-ssl --config=debug --prefix="c:/usr" 4. The make files will be generated, and a configuration summary will appear: --------------------------------------------------------- Net-SNMP configuration summary: --------------------------------------------------------- - + Config type: debug SDK: enabled Link type: static @@ -671,7 +591,7 @@ first by the Configure script. Following are sample steps to: nmake nmake install - perl Configure --with-sdk --with-ssl --config=debug --linktype=dynamic + perl Configure --with-sdk --with-ssl --config=debug --linktype=dynamic\ --prefix="c:/usr" nmake libs_clean @@ -691,273 +611,36 @@ For a complete list of possible build targets, after generating the make files using Configure, run: nmake help - + Note: The Configure option --linktype=static (or not specifying a linktype) - will result in libsnmp being compiled and all other components being + will result in libsnmp being compiled and all other components being statically linked to it. - The Configure option --linktype=dynamic will result in libsnmp_dll - (netsnmp.dll) being compiled and all other components being dynamically + The Configure option --linktype=dynamic will result in libsnmp_dll + (netsnmp.dll) being compiled and all other components being dynamically linked to it. *************************************************************************** * -* Microsoft Visual C++ - Workspace - Building -* -*************************************************************************** - -The win32.dsw and win32dll.dsw workspaces allow to build the agent and the -applications. Proceed as follows: - -1. Update the version stamp in win32\net-snmp\net-snmp-config.h. The current - version can be found in the Unix configure script (top level folder) by - looking for the PACKAGE_VERSION variable. - -2. If SNMPv3 encryption capabilities or SHA authentication is required, - install the OpenSSL DLL and library file as described in the section - 'Microsoft Visual C++ - Building with OpenSSL" and then continue with - step 2. - -3. The default installation path is c:\usr. This folder will contain all - the binaries, MIB files, configuration files etc. To change the location, - the win32\net-snmp\net-snmp-config.h file needs to be modified by changing - the INSTALL_BASE variable. - - Note: - - All paths in net-snmp-config.h use the "/" UNIX pathname delimiter. - If a drive letter is not specified, the current drive letter is assumed. - - For example: #define INSTALL_BASE "c:/usr". - -4. When building DLLs instead of static libraries, *change* the following - line which is located near the top of the file: - - /* #undef NETSNMP_USE_DLL */ - - *to* - - #define NETSNMP_USE_DLL 1 - -5. Build the agent and the applications - - a. Open win32.dsw (static build) or win32dll.dsw (dynamic build). - b. If you want to generate 64-bit binaries instead of 32-bit binaries, - select "Build/Configuration Manager" and add the "x64" platform. - c. Select "Build/Batch Build..." - d. Select the projects and configurations you want to build. - e. Click "ReBuild All". - f. When building is done, View the Output window, clip and - save to a text file if there is some information to share. - -6. If the Perl modules are required, continue with the next section: - 'Microsoft Visual C++ - Building the Perl SNMP modules'. - - Otherwise, continue with the section: - 'Microsoft Visual C++ - Installing' - - -*************************************************************************** -* -* Microsoft Visual C++ - Workspace - Building the Perl SNMP modules -* -*************************************************************************** - -The Perl modules should be compiled against the DLL version of snmplib. -Compiling against a static version is possible, but each module will -load it's own copy of the MIB, and sharing data between modules will -not be possible. For example, the conf module tests will fail. - -1. Complete the section 'Microsoft Visual C++ - Building' and choose for - the dynamic build. This will build the libraries, agent and applications. - - Note: SNMPD.EXE and SNMPTRAPD.EXE are required for running the tests - against the SNMP Perl module. - -2. Install Net-SNMP as described in the 'Microsoft Visual C++ - Installing' - section to install the applications, the DLL and the .lib files. - -3. Continue with the Win32 section of the Perl README file located in - perl\SNMP\README. - - -*************************************************************************** -* -* Microsoft Visual C++ - Workspace - Installing -* -*************************************************************************** - -The install script "win32\install-net-snmp.bat" should be run after a -build is successful. It copies the programs, MIB files, and development -components to an install directory named in the INSTALL_BASE variable. - -1. Complete the section 'Microsoft Visual C++ - Building'. - -2. Open win32\install-net-snmp.bat using a text editor. - - The INSTALL_BASE variable must match the INSTALL_BASE compile constant - defined in "win32\net-snmp\net-snmp-config.h", using these rules: - - a. All paths in install-net-snmp.bat use the "\" DOS pathname delimiter. - - Example: set INSTALL_BASE="c:\usr". - - b. All paths in net-snmp-config.h use the "/" UNIX pathname delimiter. - If a drive letter is not specified, the current drive letter is - assumed. - - Example: #define INSTALL_BASE "c:/usr". - - Note: You may also modify "install-net-snmp.bat" in order to not install - the linking libraries, or the header files. - -3. Open a command prompt window. - -4. Cd to the base directory where this file README.win32 is located. - -5. Run win32\install-net-snmp.bat to install the programs. - - ## sample output from install-net-snmp.bat - - NOTE: Directory already exist messages are normal. If you are - not building with OpenSSL, then DLL not found messages - are normal. - - C:\net-snmp-5.1.1> win32\install-net-snmp - Remember to run this script from the base of the source directory. - Creating "c:\usr" sub-directories - A subdirectory or file c:\usr already exists. - A subdirectory or file c:\usr\bin already exists. - A subdirectory or file c:\usr\etc\snmp already exists. - A subdirectory or file c:\usr\share\snmp\snmpconf-data - already exists - A subdirectory or file c:\usr\share\snmp\snmpconf-data\ - snmp-data already exists. - A subdirectory or file c:\usr\share\snmp\snmpconf-data\ - snmpd-data already exists. - A subdirectory or file c:\usr\share\snmp\snmpconf-data\ - snmptrapd-data already exists. - A subdirectory or file c:\usr\lib already exists. - A subdirectory or file c:\usr\mibs already exists. - A subdirectory or file c:\usr\include already exists. - A subdirectory or file c:\usr\include\net-snmp already - exists - . - A subdirectory or file c:\usr\include\ucd-snmp already - exists - . - Copying MIB files to "c:\usr"\mibs - Copying compiled programs to "c:\usr"\bin - Copying snmpconf files to "c:\usr"\share\snmp\snmpconf- - data\snmp-data - Copying link libraries to "c:\usr"\lib - Copying header files to "c:\usr"\include - Deleting debugging files from "c:\usr" - Copying DLL files to "c:\usr" - The system cannot find the file specified. - Done copying files to "c:\usr" - C:\net-snmp-5.1.1> - - ## END sample output from install-net-snmp.bat - -6. Add the bin folder (c:\usr\bin in the above example) to - your system path. - -7. Test the installation. For a simple test to see if Net-SNMP is working, - open a _new_ command prompt window, and type: - - snmptranslate -IR -Td linkDown - -8. If the folder that Net-SNMP was installed to is ever changed, modify the - system environment variables or registry keys as explained in the - 'Configuration_Overview.html' file located in win32/dist/htmlhelp. - - -*************************************************************************** -* -* Microsoft Visual C++ - Building with OpenSSL +* Microsoft Visual Studio - Building with OpenSSL * *************************************************************************** OpenSSL is required to support the encryption capabilities in SNMPv3 -(or SHA authentication). The win32 version of OpenSSL can be built -from the sources or you can download a pre-compiled version. - -Building from source: -===================== - - 1. Install an assembler. If you do not have the M$ assembler installed (MASM) - you can get a free one(NASM) from: - - http://www.kernel.org/pub/software/devel/nasm - - - 2. Obtain the OpenSSL source from the link below. Follow instructions in - INSTALL.W32 - - ftp://ftp.openssl.org/source/ - - - 3. Once the OpenSSL libraries are built, copy the folder inc32\openssl to - C:\OpenSSL\Include\openssl and the folder out32dll to C:\OpenSSL\Lib\VC. - - -Using a pre-compiled version -============================ - - 1. Obtain the latest OpenSSL binary from the link below. - - http://www.slproweb.com/products/Win32OpenSSL.html - - 2. Install the package to c:\OpenSSL. - - -Project changes -=============== - - 1. Edit the win32\net-snmp\net-snmp-config.h header file. Add: - - #define NETSNMP_USE_OPENSSL 1 - - 2. Open Visual Studio, open the Tools menu and select Options. Go to - Projects and Solutions and select VC++ Directories. Add - C:\OpenSSL\Include to the list of include directories and - C:\OpenSSL\Lib\VC to the list of library directories. - - 3. Continue with the section 'Microsoft Visual C++ - Building" - - -*************************************************************************** -* -* Microsoft Visual C++ - Building with IPv6 -* -*************************************************************************** - -The default build configuration supports SNMP over IPv4-based transports. -However Windows 2000 and later include an IPv6-capable stack which -can be used to provide SNMP over IPv6. To enable IPv6, the Microsoft PSDK -is required and NETSNMP_ENABLE_IPV6 has to be enabled in -win32\net-snmp\net-snmp-config.h. Change the following single line from: - - /* #undef NETSNMP_ENABLE_IPV6 */ - - to: - - #define NETSNMP_ENABLE_IPV6 1 - -Next, continue with the section 'Microsoft Visual C++ - Building" +(or SHA authentication). Pre-compiled binaries are available from +http://www.slproweb.com/products/Win32OpenSSL.html. *************************************************************************** * -* Microsoft Visual C++ - Building your own applications with snmplib +* Microsoft Visual Studio - Building your own applications with snmplib * *************************************************************************** -Linking in an snmplib built to use the Multithreaded DLL runtime library to -an application configured for the Debug Multithreaded DLL runtime library -results in a link error along the lines of 'defaultlib "MSVCRT" conflicts +Linking in an snmplib built to use the Multithreaded DLL runtime library to +an application configured for the Debug Multithreaded DLL runtime library +results in a link error along the lines of 'defaultlib "MSVCRT" conflicts with use of other libs'. If you receive a similar message, check that the projects settings between library and application match up. @@ -986,7 +669,7 @@ Note: Some users may have better results compiling other packages that use *************************************************************************** * -* Microsoft Visual C++ - Extending the Agent +* Microsoft Visual Studio - Extending the Agent * *************************************************************************** @@ -1015,112 +698,46 @@ and 'snmpd' project. And things should work just fine. * *************************************************************************** -There are two versions of GCC (the GNU Compiler Collection) in common use on -Microsoft Windows operating systems. This section will attempt to point the +There are multiple versions of GCC (the GNU Compiler Collection) in common use +on Microsoft Windows operating systems. This section will attempt to point the user to the information required to choose the one to best suit their needs. -Cygwin +MinGW and Mingw-w64 -The Cygwin compiler and toolkit provides a Unix style shell and environment -for Windows based systems. The cygwin1.dll provides a POSIX emulation layer -that simplifies porting Unix / Linux applications to Windows. The Cygwin dlls -are required if an application is to be distributed. The dependency on the -The Cygwin tool chain and documentation can be found at: +The MinGW projects provide a Windows native version of gcc. The tool chain +links against existing Windows dlls found on most systems. Binaries compiled +with MinGW do not require additional libraries to be distributed. The MSYS +and MSYS2 environments provide a shell (Bash) and tools to emulate a Unix style +build environment on Windows. Mingw-w64 is an improved version of MinGW which +supports both 32-bit and 64-bit environments. -http://sources.redhat.com/cygwin/ +MSYS + MinGW +============ - -MinGW - -The MinGW compiler is a Windows native version of gcc. The tool chain links -against existing Windows dlls found on most systems. Binaries compiled with MinGW -do not require additional libraries to be distributed. The MSyS environment -provides a shell (Bash) and tools to emulate a Unix style build environment on -Windows. The MinGW and MSyS tools and documentation can be found at: +The MinGW and MSYS tools and documentation can be found at: http://www.mingw.org -*************************************************************************** -* -* Cygwin - Building -* -*************************************************************************** - -An alternate way to build and run Net-SNMP on Win32 is to use the Cygwin -environment. Detailed information about the Cygwin environment is available -on the web at: http://sources.redhat.com/cygwin/. - -Cygwin allows you to compile almost the complete agent and applications. -As an example, the following configure options create a working set of -programs: - -ENV_SEPARATOR=":" \ -./configure \ - --with-mib-modules="host agentx disman/event-mib examples/example" \ - --with-out-mib-modules=host/hr_network \ - -If you want to disable SNMPv3 auth and privacy features, add: - --without-openssl \ - -If you want to use IPv6 transports, add: - --enable-ipv6 - -Note: the source code should *not* be in a folder that contains a space. -For example, compiling in your 'My Documents' folder or your Desktop folder -(usually c:\Documents and Settings\xxxx\Desktop) is not supported. - -A note for Windows NT users: in order for the process part of the host -resources MIB (hr_swrun) to work under Windows NT you will need to get hold -of PSAPI.DLL. This DLL is available under the download section of -www.microsoft.com, and is also included in the VC++ distribution. - -If the folder that Net-SNMP was installed to is ever changed, modify the -system environment variables or registry keys as explained in the -'Configuration_Overview.html' file located in win32/dist/htmlhelp. - - *************************************************************************** * * MinGW - Building * *************************************************************************** -Currently the tools and agent will compile on win32 platforms using the -MinGW tools with the MSyS environment. MinGW, MSyS and the associated -documentation can be downloaded from: http://www.mingw.org. +MinGW, MSyS and the associated documentation can be downloaded from +http://www.mingw.org. Compiling net-snmp with MinGW requires GNU regex and libintl. Binaries and -developer header files for these libraries are available at: +developer header files for these libraries can be installed by running the +following command from a MinGW shell: - http://gnuwin32.sourceforge.net/packages/regex.htm - http://gnuwin32.sourceforge.net/packages/libintl.htm + mingw-get install msys-libregex msys-libintl msys-libopenssl + mingw-get upgrade msys-libregex msys-libintl msys-libopenssl Proceed as follows to build Net-SNMP: -1. Install GNU regex and GNU libintl binaries and developer files in the - MinGW tree. - -2. If SNMPv3 encryption capabilities or SHA authentication is required, - install the OpenSSL DLL and library file as described in the section - 'MinGW - Building with OpenSSL" and then continue with step 3. - -3. Determine where you want the programs to be installed. Currently - you must use path segments no longer than 8 characters, and no - embedded spaces are allowed. Due to limitations with Makefiles, - you must also specify the MIBDIRS default that corresponds to - a particular subtree from the base directory. - - Note: All paths use the "/" UNIX pathname delimiter. - Also note that embedded spaces will NOT currently work - with MinGW configure. Use the DOS 8.3 form of the path, - - For example: Say that you want to install the programs in - the directory "C:\usr". - - Use BASEDIR=c:/usr - -4. Configure net-snmp using the configure flags as shown: +1. Configure net-snmp using the configure flags as shown: BASEDIR=c:/usr @@ -1129,55 +746,55 @@ Proceed as follows to build Net-SNMP: --with-mib-modules="agentx disman/event-mib winExtDLL examples/example"\ --disable-embedded-perl --without-perl-modules \ - Note: while the Net-SNMP implementation of the host resources MIB is not - supported when using MinGW, winExtDLL is supported. Via winExtDLL you can - use Microsoft's implementation of the host resources MIB. - -4.1. If you want to use IPv6 transports, add: - --enable-ipv6 --with-transports="TCPIPv6 UDPIPv6" \ + If you want to use IPv6 transports, add: + --enable-ipv6 --with-transports="TCPIPv6 UDPIPv6" + Note: while the Net-SNMP implementation of the host resources MIB is not + supported when using MinGW, winExtDLL is supported. Via winExtDLL you can + use Microsoft's implementation of the host resources MIB. -5. Type "make" to compile the package. +2. Type "make" to compile the package. -6. Type "make install" to install the package. +3. Type "make install" to install the package. -7. If the folder that Net-SNMP was installed to is ever changed, modify the - system environment variables or registry keys as explained in the - 'Configuration_Overview.html' file located in win32/dist/htmlhelp. +4. If the folder that Net-SNMP was installed to is ever changed, modify the + system environment variables or registry keys as explained in the + 'Configuration_Overview.html' file located in win32/dist/htmlhelp. - *************************************************************************** * -* MinGW - Building with OpenSSL +* Mingw-w64 - Building * *************************************************************************** -OpenSSL is required to support the encryption capabilities in SNMPv3 -(or SHA authentication). A pre-compiled MinGW compatible version of -OpenSSL is available on the Internet. - -Follow these steps to install OpenSSL: - - 1. Obtain the latest OpenSSL binary from the link below. - - http://www.slproweb.com/products/Win32OpenSSL.html - - 2. Install the package to c:\OpenSSL - - 3. Copy the header and library files to the the MinGW directory: - - a. Copy the c:\OpenSSL\include\openssl folder to the include folder in - MinGW. - - Example: "C:\MinGW\include\openssl\*.h" +MSYS2 and Mingw-w64 can be installed as follows: +1. Download the MSYS2 installer from https://www.msys2.org/. +2. Run the MSYS2 installer. +3. Open an MSYS2 shell. +4. Run pacman -S make diffutils +5. On a 32-bit system, run + pacman -S mingw-w64-i686-gcc mingw-w64-i686-openssl +6. On a 64-bit system, run + pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl - b. Copy c:\OpenSSL\lib\MinGW\libeay32.* to the lib folder in Mingw. +Do not try to make the MinGW64 gcc compiler to use the MSYS2 openssl-devel +headers by adding /usr/include to the include path because this will trigger +plenty of complaints about redefined macros and structures. - Example: "C:\MinGW\lib\libeay32.a" - Example: "C:\MinGW\lib\libeay32.def" - - 4. Continue with the section 'MinGW - Building" +*************************************************************************** +* +* Building the Windows Net-SNMP Installer +* +*************************************************************************** +Proceed as follows: + 1. Uninstall Net-SNMP. + 2. Remove the C:\usr directory completely. + 3. Open a command prompt + 4. Run the Microsoft Visual Studio vcvarsall.bat script. + 5. Change the current working directory to the Net-SNMP win32\dist directory. + 6. Run the .\build-binary.bat script. + 7. Copy the net-snmp-${version}.x86.exe installer to the desired location. *************************************************************************** * @@ -1193,12 +810,12 @@ All configuration files should be placed in the INSTALL_BASE\etc\snmp folder. The INSTALL_BASE folder is defined in the win32\net-snmp\net-snmp-config.h file. For example, c:\usr\etc\snmp. -Included is a Perl script called snmpconf which can be used to create +Included is a Perl script called snmpconf which can be used to create configuration files. Full documentation on using snmpconf is available from the Net-SNMP web site at the above link. -To run snmpconf, first modify snmpconf.bat located in the bin folder where -Net-SNMP is installed. Modify the set MYPERLPROGRAM= line to contain the full +To run snmpconf, first modify snmpconf.bat located in the bin folder where +Net-SNMP is installed. Modify the set MYPERLPROGRAM= line to contain the full path to the snmpconf Perl script. For example: set MYPERLPROGRAM=c:\usr\bin\snmpconf @@ -1207,8 +824,8 @@ You can now run snmpconf using the standard command line such as: snmpconf -i -For detailed information on using environment variables and the registry to -configure Net-SNMP, see the 'Configuration_Overview.html' file in +For detailed information on using environment variables and the registry to +configure Net-SNMP, see the 'Configuration_Overview.html' file in win32/dist/htmlhelp. @@ -1220,7 +837,7 @@ win32/dist/htmlhelp. The Agent (snmpd.exe) and trap daemon (snmptrapd.exe) can be run as a service under Windows operating systems that have the Service Control Manager (SCM) -(Services Control Panel). This includes Windows NT, 2000, XP and 2003. +(Services Control Panel). This includes Windows NT, 2000, XP and 2003. Windows 9x/Me do not have the SCM. To allow snmpd.exe or snmptrapd.exe to run as a service, the programs need @@ -1228,7 +845,7 @@ to be registered with the SCM. This is done by running the program once with the -register command line switch from a command prompt. If Net-SNMP was installed using the binary available from the Net-SNMP web site, -there will be shortcuts in the Start menu for registering and unregistering the +there will be shortcuts in the Start menu for registering and unregistering the agent and snmptrapd. The synopsis for registering snmpd as a Windows service is: @@ -1240,7 +857,7 @@ The synopsis for registering snmptrapd as a Windows service is: snmptrapd -register [OPTIONS] [LISTENING ADDRESSES] After registration, the services 'Net-SNMP Agent' and 'Net-SNMP Trap Handler' -will be available in the SCM. The services can be started and stopped using +will be available in the SCM. The services can be started and stopped using the SCM (Services Control Panel) or from the command prompt using: net start "Net-SNMP Agent" @@ -1251,16 +868,16 @@ and net stop "Net-SNMP Agent" net stop "Net-SNMP Trap Handler" -If any command line options are specified after the -register option, they +If any command line options are specified after the -register option, they will be included when the service starts. For example, to register the -snmptrapd daemon and enable logging of traps to c:\usr\log\snmptrapd.log, +snmptrapd daemon and enable logging of traps to c:\usr\log\snmptrapd.log, enter the following command line: snmptrapd -register -Lf c:/usr/log/snmptrapd.log Note: Use Unix style slashes (/) for all paths. -For a complete list of command line options, consult the man pages, or use +For a complete list of command line options, consult the man pages, or use the -h switch: snmpd -h @@ -1269,20 +886,20 @@ the -h switch: Notes: -H will display all available snmpd.conf, snmptrapd.conf and snmp.conf configuration file options, not the command line options. - Like all Net-SNMP applications, snmpd and snmptrapd will use the - SNMPCONFPATH and SNMPSHAREPATH environment variables when run as a - service. The registry is the recommended method for defining these - variables due to a limitation in the Windows Service Control Manager + Like all Net-SNMP applications, snmpd and snmptrapd will use the + SNMPCONFPATH and SNMPSHAREPATH environment variables when run as a + service. The registry is the recommended method for defining these + variables due to a limitation in the Windows Service Control Manager (SCM). When running as a service, if any system environment variables - are changed, the system will need to be rebooted to allow the services - to access the changed environment variables (see Microsoft knowledge - base article 821761). Therefore, when running snmpd or snmptrapd as - a service, if SNMPCONFPATH or SNMPSHAREPATH is changed, a reboot will - be required after setting the environment variables, otherwise the - services may fail to start. Using the registry to store the environment + are changed, the system will need to be rebooted to allow the services + to access the changed environment variables (see Microsoft knowledge + base article 821761). Therefore, when running snmpd or snmptrapd as + a service, if SNMPCONFPATH or SNMPSHAREPATH is changed, a reboot will + be required after setting the environment variables, otherwise the + services may fail to start. Using the registry to store the environment variables eliminates this problem. See the 'Configuration_Overview.html' file in win32/dist/htmlhelp for more information on using the registry. - + Unregistering the services -------------------------- @@ -1294,7 +911,7 @@ example: snmptrapd -unregister -Note: Be sure to have all Service Control Panel windows closed when +Note: Be sure to have all Service Control Panel windows closed when unregistering, otherwise a reboot may be required to complete the removal. @@ -1302,18 +919,18 @@ Note: Be sure to have all Service Control Panel windows closed when Modifying the services ---------------------- -To change the parameters that the SCM passes to snmpd or snmptrapd, the +To change the parameters that the SCM passes to snmpd or snmptrapd, the service must be unregistered, and then re-registered with the new options. -For example, to change the parameters that SCM passes to snmpd, open a +For example, to change the parameters that SCM passes to snmpd, open a command prompt window, CD to the directory where the snmpd program is located -(unless it is already in your PATH), identify the full set of parameters you +(unless it is already in your PATH), identify the full set of parameters you desire, then type these two commands: snmpd -unregister snmpd -register [OPTIONS] [LISTENING ADDRESSES] -Note: Be sure to have all Service Control Panel windows closed when +Note: Be sure to have all Service Control Panel windows closed when unregistering, otherwise a reboot may be required to complete the removal. @@ -1328,10 +945,10 @@ The following registry keys are used by snmpd and snmptrapd: HKLM\SYSTEM\CurrentControlSet\Services\Net-SNMP Agent HKLM\SYSTEM\CurrentControlSet\Services\Net-SNMP Trap Handler - -Each command line option specified when regsitering the service will be added -to the Parameters registry subkey for the service as a ParamX REG_SZ value -where X starts at 1 and increments for each additional command line option. + +Each command line option specified when regsitering the service will be added +to the Parameters registry subkey for the service as a ParamX REG_SZ value +where X starts at 1 and increments for each additional command line option. For example, '-Lf c:/usr/log/snmptrapd.log' would be: HKLM\SYSTEM\CurrentControlSet\Services\ @@ -1341,7 +958,7 @@ For example, '-Lf c:/usr/log/snmptrapd.log' would be: Net-SNMP Trap Handler\Parameters\Param2 c:/usr/log/snmptrapd.log To add additional command line switches or modify the existing ones, it is -recommended to unregister and re-register the services with the new command +recommended to unregister and re-register the services with the new command line options. It is also possible to directly add or modify the ParamX values in the registry. @@ -1358,8 +975,8 @@ Note: The Parameters key is only created when there is at least one command Requirements: - Windows NT/2000/XP or later: Requires Windows NT 4.0 SP4 or later. - Windows 95/98/Me: Requires Windows 98 or later. + Windows NT/2000/XP or later: Requires Windows NT 4.0 SP4 or later. + Windows 95/98/Me: Requires Windows 98 or later. Windows support for SET on following groups: @@ -1371,11 +988,11 @@ ifAdminStatus is read-write. Status can be set with either 'up' or ip group: -------- -Scalar objects: +Scalar objects: ipForwarding:Currently windows supports only ON->OFF (IE, enable->disable). For any other value, it returns with failure. -ipDefaultTTL: Supports value greater than or equal to 0. +ipDefaultTTL: Supports value greater than or equal to 0. Table objects: ------------- @@ -1384,7 +1001,7 @@ Table objects: route_write.c implements this. ipRouteDest: Setting this value, updates row with new ipRouteDest and all other - entries will be same as old row. + entries will be same as old row. EX: Consider there is an entry with ipRouteDest = 10.0.0.20 Request, snmpset localhost private ip.ipRouteTable.ipRouteEntry.ipRouteDest.10.0.0.20 -a 10.0.0.16 @@ -1408,11 +1025,11 @@ ipRouteMask: Write Supported. Creation of ipRouteTable row: ----------------------------- -snmpset request for non existent OID with ipRouteIfIndex, ipRouteMetric1, +snmpset request for non existent OID with ipRouteIfIndex, ipRouteMetric1, ipRouteNextHop and ipRouteMask varbinds, creates a row. -snmpset with create option is not supported, as row creation requires -ipRouteIfIndex, ipRouteMetric1, ipRouteNextHop and ipRouteMask in a single +snmpset with create option is not supported, as row creation requires +ipRouteIfIndex, ipRouteMetric1, ipRouteNextHop and ipRouteMask in a single request. Example to create a row: @@ -1439,8 +1056,8 @@ Creation of row: snmpset request for non existent OID with ipNetToMediaPhysAddress varbind creates a row. -snmpset with create option is not supported, as row creation requires -ipNetToMediaPhysAddress in a request +snmpset with create option is not supported, as row creation requires +ipNetToMediaPhysAddress in a request request. Example to create a row: @@ -1461,41 +1078,36 @@ tcpConnState of tcpConnTable is writable and the only value which may be set by a management station is deleteTCB(12) -*************************************************************************** +******************************* * -* Notes on preprocessor defines for MSVC, MinGW and Cygwin +* Notes on preprocessor defines * -*************************************************************************** - -When adding Windows specific code, one or more of the following defines should -be used: +******************************* -Define: Description: -------- ------------ -WIN32 Defined by MSVC & MinGW +When adding Windows specific code, proceed as follows: +- Add a configure test in the appropriate file under configure.d for MinGW. +- Add the symbol defined by the configure test to + win32/net-snmp/net-snmp-config.h and also to + win32/net-snmp/net-snmp-config.h.in. If the feature is supported by + Microsoft visual Studio, define the symbol. Otherwise undefine it. -_MSC_VER Defined by MSVC only (standard MSVC macro) +Try to avoid to add #ifdef's that use the WIN32, _MSC_VER and/or mingw32 +macros. These macros are defined as follows: -mingw32 Defined by MinGW only +Define: Description: +------- ------------ +_WIN32 Defined by Microsoft Visual Studio, MinGW and Mingw-w64. -cygwin Defined by Cygwin only +_WIN64 Defined by Microsoft Visual Studio and Mingw-w64 when + generating 64-bit code. -HAVE_WIN32_PLATFORM_SDK Should be defined if the Microsoft Platform SDK is - installed and registered with MSVC or enabled for - MinGW or Cygwin +_MSC_VER Defined by Microsoft Visual Studio only -MinGW and Cygwin do not require the Microsoft Platform SDK as they both should -contain most if not all of the functionality provided by the SDK. When adding -code that requires the PSDK under MSVC, the following can usually be used: +__MINGW32__ Defined by MinGW and Mingw-w64 - #if defined (HAVE_WIN32_PLATFORM_SDK) || defined (mingw32) || defined (cygwin) - -As listed above, Cygwin does NOT define WIN32. When adding generic Windows -code that will work with MSVC, MinGW and Cygwin, the following should be used: +__MINGW64__ Defined by Mingw-w64 only - #if defined (WIN32) || defined (cygwin) - *************************************************************************** * * Acknowledgements diff --git a/aclocal.m4 b/aclocal.m4 index cd80c74..f043a68 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.16 -*- Autoconf -*- + +# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_include([m4/ac_add_search_path.m4]) m4_include([m4/ac_msg_cache.m4]) m4_include([m4/ac_msg_module_dbg.m4]) @@ -22,3 +23,4 @@ m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/netsnmp_arg.m4]) m4_include([m4/netsnmp_search_libs.m4]) +m4_include([m4/pkg.m4]) diff --git a/agent/Makefile.depend b/agent/Makefile.depend index 5798d11..22dda94 100644 --- a/agent/Makefile.depend +++ b/agent/Makefile.depend @@ -4,6 +4,7 @@ ./agent_handler.lo: ../include/net-snmp/system/linux.h ./agent_handler.lo: ../include/net-snmp/system/sysv.h ./agent_handler.lo: ../include/net-snmp/system/generic.h +./agent_handler.lo: ../include/net-snmp/machine/generic.h ./agent_handler.lo: ../include/net-snmp/net-snmp-features.h ./agent_handler.lo: ../include/net-snmp/net-snmp-includes.h ./agent_handler.lo: ../include/net-snmp/definitions.h @@ -16,6 +17,7 @@ ./agent_handler.lo: ../include/net-snmp/pdu_api.h ./agent_handler.lo: ../include/net-snmp/library/asn1.h ./agent_handler.lo: ../include/net-snmp/output_api.h +./agent_handler.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agent_handler.lo: ../include/net-snmp/library/snmp_debug.h ./agent_handler.lo: ../include/net-snmp/library/snmp_logging.h ./agent_handler.lo: ../include/net-snmp/session_api.h @@ -33,6 +35,7 @@ ./agent_handler.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agent_handler.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agent_handler.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agent_handler.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agent_handler.lo: ../include/net-snmp/library/ucd_compat.h ./agent_handler.lo: ../include/net-snmp/library/mib.h ./agent_handler.lo: ../include/net-snmp/mib_api.h @@ -51,7 +54,6 @@ ./agent_handler.lo: ../include/net-snmp/library/data_list.h ./agent_handler.lo: ../include/net-snmp/library/check_varbind.h ./agent_handler.lo: ../include/net-snmp/library/container.h -./agent_handler.lo: ../include/net-snmp/library/factory.h ./agent_handler.lo: ../include/net-snmp/library/container_binary_array.h ./agent_handler.lo: ../include/net-snmp/library/container_list_ssll.h ./agent_handler.lo: ../include/net-snmp/library/container_iterator.h @@ -73,8 +75,8 @@ ./agent_handler.lo: ../include/net-snmp/library/lcd_time.h ./agent_handler.lo: ../include/net-snmp/library/snmp_secmod.h ./agent_handler.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agent_handler.lo: ../include/net-snmp/library/snmptsm.h ./agent_handler.lo: ../include/net-snmp/library/snmpusm.h +./agent_handler.lo: ../include/net-snmp/library/snmptsm.h ./agent_handler.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./agent_handler.lo: ../include/net-snmp/agent/mib_module_config.h ./agent_handler.lo: ../include/net-snmp/agent/agent_module_config.h @@ -125,6 +127,7 @@ ./agent_index.lo: ../include/net-snmp/pdu_api.h ./agent_index.lo: ../include/net-snmp/library/asn1.h ./agent_index.lo: ../include/net-snmp/output_api.h +./agent_index.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agent_index.lo: ../include/net-snmp/library/snmp_debug.h ./agent_index.lo: ../include/net-snmp/library/snmp_logging.h ./agent_index.lo: ../include/net-snmp/session_api.h @@ -142,6 +145,7 @@ ./agent_index.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agent_index.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agent_index.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agent_index.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agent_index.lo: ../include/net-snmp/library/ucd_compat.h ./agent_index.lo: ../include/net-snmp/library/mib.h ./agent_index.lo: ../include/net-snmp/mib_api.h @@ -160,7 +164,6 @@ ./agent_index.lo: ../include/net-snmp/library/data_list.h ./agent_index.lo: ../include/net-snmp/library/check_varbind.h ./agent_index.lo: ../include/net-snmp/library/container.h -./agent_index.lo: ../include/net-snmp/library/factory.h ./agent_index.lo: ../include/net-snmp/library/container_binary_array.h ./agent_index.lo: ../include/net-snmp/library/container_list_ssll.h ./agent_index.lo: ../include/net-snmp/library/container_iterator.h @@ -181,8 +184,8 @@ ./agent_index.lo: ../include/net-snmp/library/lcd_time.h ./agent_index.lo: ../include/net-snmp/library/snmp_secmod.h ./agent_index.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agent_index.lo: ../include/net-snmp/library/snmptsm.h ./agent_index.lo: ../include/net-snmp/library/snmpusm.h +./agent_index.lo: ../include/net-snmp/library/snmptsm.h ./agent_index.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./agent_index.lo: ../include/net-snmp/agent/mib_module_config.h ./agent_index.lo: ../include/net-snmp/agent/agent_module_config.h @@ -222,7 +225,8 @@ ./agent_index.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./agent_index.lo: ../include/net-snmp/agent/agent_callbacks.h ./agent_index.lo: ../include/net-snmp/agent/agent_index.h snmpd.h -./agent_index.lo: mibgroup/struct.h ../agent/mibgroup/agentx/subagent.h +./agent_index.lo: agent_global_vars.h mibgroup/struct.h +./agent_index.lo: ../agent/mibgroup/agentx/subagent.h ./agent_index.lo: ../agent/mibgroup/agentx/client.h ./agent_read_config.lo: ../include/net-snmp/net-snmp-config.h ./agent_read_config.lo: ../include/net-snmp/net-snmp-features.h @@ -237,6 +241,7 @@ ./agent_read_config.lo: ../include/net-snmp/pdu_api.h ./agent_read_config.lo: ../include/net-snmp/library/asn1.h ./agent_read_config.lo: ../include/net-snmp/output_api.h +./agent_read_config.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agent_read_config.lo: ../include/net-snmp/library/snmp_debug.h ./agent_read_config.lo: ../include/net-snmp/library/snmp_logging.h ./agent_read_config.lo: ../include/net-snmp/session_api.h @@ -254,6 +259,7 @@ ./agent_read_config.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agent_read_config.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agent_read_config.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agent_read_config.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agent_read_config.lo: ../include/net-snmp/library/ucd_compat.h ./agent_read_config.lo: ../include/net-snmp/library/mib.h ./agent_read_config.lo: ../include/net-snmp/mib_api.h @@ -272,7 +278,6 @@ ./agent_read_config.lo: ../include/net-snmp/library/data_list.h ./agent_read_config.lo: ../include/net-snmp/library/check_varbind.h ./agent_read_config.lo: ../include/net-snmp/library/container.h -./agent_read_config.lo: ../include/net-snmp/library/factory.h ./agent_read_config.lo: ../include/net-snmp/library/container_binary_array.h ./agent_read_config.lo: ../include/net-snmp/library/container_list_ssll.h ./agent_read_config.lo: ../include/net-snmp/library/container_iterator.h @@ -293,8 +298,8 @@ ./agent_read_config.lo: ../include/net-snmp/library/lcd_time.h ./agent_read_config.lo: ../include/net-snmp/library/snmp_secmod.h ./agent_read_config.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agent_read_config.lo: ../include/net-snmp/library/snmptsm.h ./agent_read_config.lo: ../include/net-snmp/library/snmpusm.h +./agent_read_config.lo: ../include/net-snmp/library/snmptsm.h ./agent_read_config.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./agent_read_config.lo: ../include/net-snmp/agent/mib_module_config.h ./agent_read_config.lo: ../include/net-snmp/agent/agent_module_config.h @@ -338,14 +343,68 @@ ./agent_read_config.lo: mibgroup/smux/smux.h mibgroup/utilities/iquery.h ./agent_read_config.lo: mibgroup/snmpv3/usmConf.h mibgroup/mibII/vacm_conf.h ./agent_read_config.lo: ../agent/mibgroup/mib_module_includes.h -./agent_read_config.lo: mibgroup/examples/example.h mibgroup/testhandler.h -./agent_read_config.lo: mibgroup/Rmon/rows.h mibgroup/Rmon/agutil.h -./agent_read_config.lo: mibgroup/Rmon/statistics.h mibgroup/Rmon/alarmTable.h -./agent_read_config.lo: mibgroup/Rmon/history.h mibgroup/Rmon/event.h -./agent_read_config.lo: mibgroup/examples/scalar_int.h -./agent_read_config.lo: mibgroup/examples/watched.h +./agent_read_config.lo: mibgroup/Rmon/alarm.h mibgroup/agent/extend.h ./agent_read_config.lo: mibgroup/examples/data_set.h ./agent_read_config.lo: mibgroup/examples/delayed_instance.h +./agent_read_config.lo: mibgroup/examples/example.h +./agent_read_config.lo: mibgroup/examples/netSnmpHostsTable.h +./agent_read_config.lo: mibgroup/examples/netSnmpHostsTable_columns.h +./agent_read_config.lo: mibgroup/examples/netSnmpHostsTable_enums.h +./agent_read_config.lo: mibgroup/examples/notification.h +./agent_read_config.lo: mibgroup/examples/scalar_int.h +./agent_read_config.lo: mibgroup/examples/ucdDemoPublic.h +./agent_read_config.lo: mibgroup/examples/watched.h +./agent_read_config.lo: mibgroup/mibII/mta_sendmail.h mibgroup/misc/ipfwacc.h +./agent_read_config.lo: mibgroup/testhandler.h mibgroup/ucd-snmp/diskio.h +./agent_read_config.lo: mibgroup/ucd-snmp/extensible.h +./agent_read_config.lo: ../agent/mibgroup/mibdefs.h mibgroup/Rmon/rows.h +./agent_read_config.lo: mibgroup/Rmon/agutil.h mibgroup/Rmon/statistics.h +./agent_read_config.lo: mibgroup/Rmon/alarmTable.h mibgroup/Rmon/history.h +./agent_read_config.lo: mibgroup/Rmon/event.h +./agent_read_config.lo: mibgroup/disman/event/mteScalars.h +./agent_read_config.lo: mibgroup/disman/event/mteTrigger.h +./agent_read_config.lo: mibgroup/disman/event/mteTriggerTable.h +./agent_read_config.lo: mibgroup/disman/event/mteTriggerDeltaTable.h +./agent_read_config.lo: mibgroup/disman/event/mteTriggerExistenceTable.h +./agent_read_config.lo: mibgroup/disman/event/mteTriggerBooleanTable.h +./agent_read_config.lo: mibgroup/disman/event/mteTriggerThresholdTable.h +./agent_read_config.lo: mibgroup/disman/event/mteTriggerConf.h +./agent_read_config.lo: mibgroup/disman/event/mteEvent.h +./agent_read_config.lo: ../agent/mibgroup/disman/event/mteTrigger.h +./agent_read_config.lo: mibgroup/disman/event/mteEventTable.h +./agent_read_config.lo: mibgroup/disman/event/mteEventSetTable.h +./agent_read_config.lo: mibgroup/disman/event/mteEventNotificationTable.h +./agent_read_config.lo: mibgroup/disman/event/mteEventConf.h +./agent_read_config.lo: mibgroup/disman/event/mteObjects.h +./agent_read_config.lo: mibgroup/disman/event/mteObjectsTable.h +./agent_read_config.lo: mibgroup/disman/event/mteObjectsConf.h +./agent_read_config.lo: mibgroup/disman/expr/expScalars.h +./agent_read_config.lo: mibgroup/disman/expr/expExpression.h +./agent_read_config.lo: ../agent/mibgroup/disman/expr/exp_enum.h +./agent_read_config.lo: mibgroup/disman/expr/expExpressionTable.h +./agent_read_config.lo: mibgroup/disman/expr/expErrorTable.h +./agent_read_config.lo: mibgroup/disman/expr/expExpressionConf.h +./agent_read_config.lo: mibgroup/disman/expr/expObject.h +./agent_read_config.lo: ../agent/mibgroup/disman/expr/expExpression.h +./agent_read_config.lo: mibgroup/disman/expr/expObjectTable.h +./agent_read_config.lo: mibgroup/disman/expr/expObjectConf.h +./agent_read_config.lo: mibgroup/disman/expr/expValue.h +./agent_read_config.lo: mibgroup/disman/expr/expValueTable.h +./agent_read_config.lo: mibgroup/disman/nslookup/lookupCtlTable.h +./agent_read_config.lo: mibgroup/disman/nslookup/lookupResultsTable.h +./agent_read_config.lo: mibgroup/disman/ping/pingCtlTable.h +./agent_read_config.lo: mibgroup/disman/ping/pingResultsTable.h +./agent_read_config.lo: mibgroup/disman/ping/pingProbeHistoryTable.h +./agent_read_config.lo: mibgroup/disman/schedule/schedCore.h +./agent_read_config.lo: mibgroup/disman/schedule/schedConf.h +./agent_read_config.lo: mibgroup/disman/schedule/schedTable.h +./agent_read_config.lo: mibgroup/disman/traceroute/traceRouteCtlTable.h +./agent_read_config.lo: mibgroup/disman/traceroute/traceRouteResultsTable.h +./agent_read_config.lo: mibgroup/disman/traceroute/traceRouteProbeHistoryTable.h +./agent_read_config.lo: mibgroup/disman/traceroute/traceRouteHopsTable.h +./agent_read_config.lo: mibgroup/hardware/cpu/cpu.h +./agent_read_config.lo: mibgroup/hardware/cpu/cpu_linux.h +./agent_read_config.lo: mibgroup/hardware/memory/hw_mem.h ./agent_read_config.lo: mibgroup/host/hrh_storage.h ./agent_read_config.lo: mibgroup/host/hrh_filesys.h ./agent_read_config.lo: mibgroup/host/hrSWInstalledTable.h @@ -354,97 +413,135 @@ ./agent_read_config.lo: mibgroup/host/hr_other.h mibgroup/host/hr_proc.h ./agent_read_config.lo: mibgroup/host/hr_network.h mibgroup/host/hr_print.h ./agent_read_config.lo: mibgroup/host/hr_disk.h mibgroup/host/hr_partition.h +./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h +./agent_read_config.lo: ../include/net-snmp/data_access/arp.h +./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_constants.h +./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.h +./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h +./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.h +./agent_read_config.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h +./agent_read_config.lo: ../include/net-snmp/data_access/interface.h +./agent_read_config.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h +./agent_read_config.lo: ../agent/mibgroup/if-mib/ifTable/ifTable_constants.h +./agent_read_config.lo: ../agent/mibgroup/if-mib/ifTable/ifTable_interface.h +./agent_read_config.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h +./agent_read_config.lo: ../agent/mibgroup/if-mib/ifTable/ifTable_data_access.h +./agent_read_config.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_constants.h +./agent_read_config.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.h +./agent_read_config.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h +./agent_read_config.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.h +./agent_read_config.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h +./agent_read_config.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_constants.h +./agent_read_config.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.h +./agent_read_config.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h +./agent_read_config.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.h +./agent_read_config.lo: mibgroup/notification/snmpNotifyTable.h +./agent_read_config.lo: mibgroup/notification/snmpNotifyTable_data.h ./agent_read_config.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.h -./agent_read_config.lo: mibgroup/snmpv3/snmpMPDStats_5_5.h -./agent_read_config.lo: mibgroup/snmpv3/usmStats_5_5.h +./agent_read_config.lo: mibgroup/tunnel/tunnel.h mibgroup/ucd-snmp/pass.h ./agent_read_config.lo: mibgroup/snmpv3/snmpEngine.h -./agent_read_config.lo: mibgroup/snmpv3/usmUser.h -./agent_read_config.lo: mibgroup/mibII/snmp_mib_5_5.h +./agent_read_config.lo: mibgroup/snmpv3/snmpMPDStats.h +./agent_read_config.lo: mibgroup/snmpv3/usmStats.h mibgroup/snmpv3/usmUser.h ./agent_read_config.lo: mibgroup/mibII/system_mib.h -./agent_read_config.lo: mibgroup/mibII/sysORTable.h +./agent_read_config.lo: mibgroup/mibII/sysORTable.h mibgroup/mibII/snmp_mib.h ./agent_read_config.lo: mibgroup/mibII/vacm_vars.h ./agent_read_config.lo: mibgroup/mibII/setSerialNo.h mibgroup/mibII/at.h ./agent_read_config.lo: mibgroup/mibII/ip.h mibgroup/mibII/var_route.h ./agent_read_config.lo: mibgroup/mibII/route_write.h mibgroup/mibII/at.h -./agent_read_config.lo: mibgroup/mibII/tcp.h mibgroup/mibII/icmp.h -./agent_read_config.lo: mibgroup/mibII/udp.h mibgroup/mibII/ipv6.h -./agent_read_config.lo: mibgroup/ucd-snmp/disk_hw.h -./agent_read_config.lo: ../agent/mibgroup/mibdefs.h mibgroup/ucd-snmp/proc.h +./agent_read_config.lo: mibgroup/mibII/tcp.h mibgroup/mibII/udp.h +./agent_read_config.lo: mibgroup/mibII/ipv6.h mibgroup/mibII/icmp.h +./agent_read_config.lo: mibgroup/ucd-snmp/disk_hw.h mibgroup/ucd-snmp/proc.h ./agent_read_config.lo: mibgroup/ucd-snmp/versioninfo.h -./agent_read_config.lo: mibgroup/ucd-snmp/pass.h ./agent_read_config.lo: mibgroup/ucd-snmp/pass_persist.h -./agent_read_config.lo: mibgroup/ucd-snmp/loadave.h mibgroup/agent/extend.h +./agent_read_config.lo: mibgroup/ucd-snmp/loadave.h ./agent_read_config.lo: mibgroup/ucd-snmp/errormib.h mibgroup/ucd-snmp/file.h ./agent_read_config.lo: mibgroup/ucd-snmp/dlmod.h mibgroup/ucd-snmp/proxy.h ./agent_read_config.lo: mibgroup/ucd-snmp/logmatch.h ./agent_read_config.lo: mibgroup/ucd-snmp/memory.h mibgroup/ucd-snmp/vmstat.h -./agent_read_config.lo: mibgroup/notification/snmpNotifyTable.h ./agent_read_config.lo: mibgroup/notification/snmpNotifyFilterProfileTable.h +./agent_read_config.lo: mibgroup/notification/snmpNotifyFilterProfileTable_data.h ./agent_read_config.lo: mibgroup/notification-log-mib/notification_log.h -./agent_read_config.lo: mibgroup/target/target_counters_5_5.h ./agent_read_config.lo: mibgroup/target/snmpTargetAddrEntry.h +./agent_read_config.lo: mibgroup/target/snmpTargetAddrEntry_data.h ./agent_read_config.lo: mibgroup/target/snmpTargetParamsEntry.h +./agent_read_config.lo: mibgroup/target/snmpTargetParamsEntry_data.h +./agent_read_config.lo: mibgroup/target/target_counters.h ./agent_read_config.lo: mibgroup/agent/nsTransactionTable.h ./agent_read_config.lo: mibgroup/agent/nsModuleTable.h ./agent_read_config.lo: mibgroup/agent/nsDebug.h mibgroup/agent/nsCache.h ./agent_read_config.lo: mibgroup/agent/nsLogging.h ./agent_read_config.lo: mibgroup/agent/nsVacmAccessTable.h -./agent_read_config.lo: mibgroup/disman/event/mteScalars.h -./agent_read_config.lo: mibgroup/disman/event/mteTrigger.h -./agent_read_config.lo: mibgroup/disman/event/mteTriggerTable.h -./agent_read_config.lo: mibgroup/disman/event/mteTriggerDeltaTable.h -./agent_read_config.lo: mibgroup/disman/event/mteTriggerExistenceTable.h -./agent_read_config.lo: mibgroup/disman/event/mteTriggerBooleanTable.h -./agent_read_config.lo: mibgroup/disman/event/mteTriggerThresholdTable.h -./agent_read_config.lo: mibgroup/disman/event/mteTriggerConf.h -./agent_read_config.lo: mibgroup/disman/event/mteEvent.h -./agent_read_config.lo: ../agent/mibgroup/disman/event/mteTrigger.h -./agent_read_config.lo: mibgroup/disman/event/mteEventTable.h -./agent_read_config.lo: mibgroup/disman/event/mteEventSetTable.h -./agent_read_config.lo: mibgroup/disman/event/mteEventNotificationTable.h -./agent_read_config.lo: mibgroup/disman/event/mteEventConf.h -./agent_read_config.lo: mibgroup/disman/event/mteObjects.h -./agent_read_config.lo: mibgroup/disman/event/mteObjectsTable.h -./agent_read_config.lo: mibgroup/disman/event/mteObjectsConf.h -./agent_read_config.lo: mibgroup/disman/schedule/schedCore.h -./agent_read_config.lo: mibgroup/disman/schedule/schedConf.h -./agent_read_config.lo: mibgroup/disman/schedule/schedTable.h ./agent_read_config.lo: mibgroup/utilities/override.h ./agent_read_config.lo: mibgroup/host/data_access/swinst.h ./agent_read_config.lo: mibgroup/host/data_access/swrun.h ./agent_read_config.lo: mibgroup/host/hrSWRunPerfTable.h +./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h +./agent_read_config.lo: ../include/net-snmp/data_access/route.h +./agent_read_config.lo: ../agent/mibgroup/mibII/route_headers.h +./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h +./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h +./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h +./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h +./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h +./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h +./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.h +./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h +./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.h +./agent_read_config.lo: mibgroup/if-mib/data_access/interface.h +./agent_read_config.lo: mibgroup/if-mib/ifTable/ifTable.h +./agent_read_config.lo: mibgroup/notification/snmpNotifyTable_data.h +./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +./agent_read_config.lo: ../agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h +./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h +./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_oids.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_enums.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.h +./agent_read_config.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h +./agent_read_config.lo: ../include/net-snmp/data_access/tcpConn.h +./agent_read_config.lo: ../include/net-snmp/data_access/ipaddress.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_constants.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h +./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.h ./agent_read_config.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h ./agent_read_config.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h ./agent_read_config.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h ./agent_read_config.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h ./agent_read_config.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h +./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h +./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_constants.h +./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.h +./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h +./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.h ./agent_read_config.lo: mibgroup/mibII/vacm_context.h ./agent_read_config.lo: mibgroup/mibII/var_route.h mibgroup/mibII/tcpTable.h ./agent_read_config.lo: mibgroup/mibII/udpTable.h ./agent_read_config.lo: mibgroup/ip-mib/ip_scalars.h -./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h -./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h -./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h -./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h -./agent_read_config.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h -./agent_read_config.lo: mibgroup/hardware/memory/hw_mem.h +./agent_read_config.lo: mibgroup/notification/snmpNotifyFilterProfileTable_data.h +./agent_read_config.lo: mibgroup/target/snmpTargetAddrEntry_data.h +./agent_read_config.lo: mibgroup/target/snmpTargetParamsEntry_data.h ./agent_read_config.lo: mibgroup/hardware/fsys/hw_fsys.h -./agent_read_config.lo: mibgroup/hardware/cpu/cpu.h -./agent_read_config.lo: mibgroup/hardware/cpu/cpu_linux.h -./agent_read_config.lo: mibgroup/if-mib/ifTable/ifTable.h -./agent_read_config.lo: ../include/net-snmp/data_access/interface.h -./agent_read_config.lo: mibgroup/if-mib/ifTable/ifTable_constants.h -./agent_read_config.lo: mibgroup/if-mib/ifTable/ifTable_interface.h -./agent_read_config.lo: mibgroup/if-mib/ifTable/ifTable.h -./agent_read_config.lo: mibgroup/if-mib/ifTable/ifTable_data_access.h ./agent_read_config.lo: mibgroup/if-mib/ifXTable/ifXTable.h -./agent_read_config.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h ./agent_read_config.lo: mibgroup/if-mib/ifXTable/ifXTable_constants.h ./agent_read_config.lo: mibgroup/if-mib/ifXTable/ifXTable_interface.h ./agent_read_config.lo: mibgroup/if-mib/ifXTable/ifXTable.h ./agent_read_config.lo: mibgroup/if-mib/ifXTable/ifXTable_data_access.h ./agent_read_config.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h -./agent_read_config.lo: ../include/net-snmp/data_access/ipaddress.h ./agent_read_config.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h ./agent_read_config.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.h ./agent_read_config.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h @@ -462,12 +559,6 @@ ./agent_read_config.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h ./agent_read_config.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.h ./agent_read_config.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.h -./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h -./agent_read_config.lo: ../include/net-snmp/data_access/arp.h -./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_constants.h -./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.h -./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h -./agent_read_config.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.h ./agent_read_config.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h ./agent_read_config.lo: ../include/net-snmp/data_access/ipstats.h ./agent_read_config.lo: ../include/net-snmp/data_access/systemstats.h @@ -489,35 +580,6 @@ ./agent_read_config.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h ./agent_read_config.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h ./agent_read_config.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h -./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h -./agent_read_config.lo: ../include/net-snmp/data_access/route.h -./agent_read_config.lo: ../agent/mibgroup/mibII/route_headers.h -./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_constants.h -./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.h -./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h -./agent_read_config.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.h -./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h -./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h -./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.h -./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h -./agent_read_config.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h -./agent_read_config.lo: ../include/net-snmp/data_access/tcpConn.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_constants.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_constants.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h -./agent_read_config.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.h -./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h -./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_constants.h -./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.h -./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h -./agent_read_config.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.h -./agent_read_config.lo: mibgroup/if-mib/data_access/interface.h ./agent_read_config.lo: ../agent/mibgroup/agent_module_dot_conf.h ./agent_read_config.lo: ../agent/mibgroup/mib_module_dot_conf.h ./agent_registry.lo: ../include/net-snmp/net-snmp-config.h @@ -533,6 +595,7 @@ ./agent_registry.lo: ../include/net-snmp/pdu_api.h ./agent_registry.lo: ../include/net-snmp/library/asn1.h ./agent_registry.lo: ../include/net-snmp/output_api.h +./agent_registry.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agent_registry.lo: ../include/net-snmp/library/snmp_debug.h ./agent_registry.lo: ../include/net-snmp/library/snmp_logging.h ./agent_registry.lo: ../include/net-snmp/session_api.h @@ -550,6 +613,7 @@ ./agent_registry.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agent_registry.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agent_registry.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agent_registry.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agent_registry.lo: ../include/net-snmp/library/ucd_compat.h ./agent_registry.lo: ../include/net-snmp/library/mib.h ./agent_registry.lo: ../include/net-snmp/mib_api.h @@ -568,7 +632,6 @@ ./agent_registry.lo: ../include/net-snmp/library/data_list.h ./agent_registry.lo: ../include/net-snmp/library/check_varbind.h ./agent_registry.lo: ../include/net-snmp/library/container.h -./agent_registry.lo: ../include/net-snmp/library/factory.h ./agent_registry.lo: ../include/net-snmp/library/container_binary_array.h ./agent_registry.lo: ../include/net-snmp/library/container_list_ssll.h ./agent_registry.lo: ../include/net-snmp/library/container_iterator.h @@ -589,8 +652,8 @@ ./agent_registry.lo: ../include/net-snmp/library/lcd_time.h ./agent_registry.lo: ../include/net-snmp/library/snmp_secmod.h ./agent_registry.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agent_registry.lo: ../include/net-snmp/library/snmptsm.h ./agent_registry.lo: ../include/net-snmp/library/snmpusm.h +./agent_registry.lo: ../include/net-snmp/library/snmptsm.h ./agent_registry.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./agent_registry.lo: ../include/net-snmp/agent/mib_module_config.h ./agent_registry.lo: ../include/net-snmp/agent/agent_module_config.h @@ -629,7 +692,9 @@ ./agent_registry.lo: ../include/net-snmp/agent/mfd.h ./agent_registry.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./agent_registry.lo: ../include/net-snmp/agent/agent_callbacks.h snmpd.h -./agent_registry.lo: mibgroup/struct.h ../agent/mibgroup/agentx/subagent.h +./agent_registry.lo: agent_global_vars.h mibgroup/struct.h +./agent_registry.lo: ../include/net-snmp/agent/agent_index.h +./agent_registry.lo: ../agent/mibgroup/agentx/subagent.h ./agent_registry.lo: ../agent/mibgroup/agentx/client.h ./agent_sysORTable.lo: ../include/net-snmp/net-snmp-config.h ./agent_sysORTable.lo: ../include/net-snmp/net-snmp-includes.h @@ -643,6 +708,7 @@ ./agent_sysORTable.lo: ../include/net-snmp/pdu_api.h ./agent_sysORTable.lo: ../include/net-snmp/library/asn1.h ./agent_sysORTable.lo: ../include/net-snmp/output_api.h +./agent_sysORTable.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmp_debug.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmp_logging.h ./agent_sysORTable.lo: ../include/net-snmp/session_api.h @@ -660,6 +726,7 @@ ./agent_sysORTable.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agent_sysORTable.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agent_sysORTable.lo: ../include/net-snmp/library/ucd_compat.h ./agent_sysORTable.lo: ../include/net-snmp/library/mib.h ./agent_sysORTable.lo: ../include/net-snmp/mib_api.h @@ -679,7 +746,6 @@ ./agent_sysORTable.lo: ../include/net-snmp/library/data_list.h ./agent_sysORTable.lo: ../include/net-snmp/library/check_varbind.h ./agent_sysORTable.lo: ../include/net-snmp/library/container.h -./agent_sysORTable.lo: ../include/net-snmp/library/factory.h ./agent_sysORTable.lo: ../include/net-snmp/library/container_binary_array.h ./agent_sysORTable.lo: ../include/net-snmp/library/container_list_ssll.h ./agent_sysORTable.lo: ../include/net-snmp/library/container_iterator.h @@ -700,8 +766,8 @@ ./agent_sysORTable.lo: ../include/net-snmp/library/lcd_time.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmp_secmod.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agent_sysORTable.lo: ../include/net-snmp/library/snmptsm.h ./agent_sysORTable.lo: ../include/net-snmp/library/snmpusm.h +./agent_sysORTable.lo: ../include/net-snmp/library/snmptsm.h ./agent_sysORTable.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./agent_sysORTable.lo: ../include/net-snmp/agent/mib_module_config.h ./agent_sysORTable.lo: ../include/net-snmp/agent/agent_module_config.h @@ -754,6 +820,7 @@ ./agent_trap.lo: ../include/net-snmp/pdu_api.h ./agent_trap.lo: ../include/net-snmp/library/asn1.h ./agent_trap.lo: ../include/net-snmp/output_api.h +./agent_trap.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agent_trap.lo: ../include/net-snmp/library/snmp_debug.h ./agent_trap.lo: ../include/net-snmp/library/snmp_logging.h ./agent_trap.lo: ../include/net-snmp/session_api.h @@ -771,6 +838,7 @@ ./agent_trap.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agent_trap.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agent_trap.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agent_trap.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agent_trap.lo: ../include/net-snmp/library/ucd_compat.h ./agent_trap.lo: ../include/net-snmp/library/mib.h ./agent_trap.lo: ../include/net-snmp/mib_api.h @@ -787,7 +855,6 @@ ./agent_trap.lo: ../include/net-snmp/library/data_list.h ./agent_trap.lo: ../include/net-snmp/library/check_varbind.h ./agent_trap.lo: ../include/net-snmp/library/container.h -./agent_trap.lo: ../include/net-snmp/library/factory.h ./agent_trap.lo: ../include/net-snmp/library/container_binary_array.h ./agent_trap.lo: ../include/net-snmp/library/container_list_ssll.h ./agent_trap.lo: ../include/net-snmp/library/container_iterator.h @@ -810,8 +877,8 @@ ./agent_trap.lo: ../include/net-snmp/library/lcd_time.h ./agent_trap.lo: ../include/net-snmp/library/snmp_secmod.h ./agent_trap.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agent_trap.lo: ../include/net-snmp/library/snmptsm.h ./agent_trap.lo: ../include/net-snmp/library/snmpusm.h +./agent_trap.lo: ../include/net-snmp/library/snmptsm.h ./agent_trap.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./agent_trap.lo: ../include/net-snmp/agent/mib_module_config.h ./agent_trap.lo: ../include/net-snmp/agent/agent_module_config.h @@ -850,10 +917,79 @@ ./agent_trap.lo: ../include/net-snmp/agent/mfd.h ./agent_trap.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./agent_trap.lo: ../include/net-snmp/agent/agent_callbacks.h -./agent_trap.lo: ../agent/mibgroup/agentx/protocol.h +./agent_trap.lo: agent_global_vars.h ../agent/mibgroup/agentx/protocol.h +./agent_trap.lo: mibgroup/notification/snmpNotifyTable_data.h ./auto_nlist.lo: ../include/net-snmp/net-snmp-config.h ./auto_nlist.lo: ../include/net-snmp/agent/auto_nlist.h ./kernel.lo: ../include/net-snmp/net-snmp-config.h +./kernel.lo: ../include/net-snmp/net-snmp-includes.h +./kernel.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h +./kernel.lo: ../include/net-snmp/library/oid.h +./kernel.lo: ../include/net-snmp/library/types.h +./kernel.lo: ../include/net-snmp/library/snmp_api.h +./kernel.lo: ../include/net-snmp/varbind_api.h +./kernel.lo: ../include/net-snmp/library/snmp_client.h +./kernel.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h +./kernel.lo: ../include/net-snmp/output_api.h +./kernel.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./kernel.lo: ../include/net-snmp/library/snmp_debug.h +./kernel.lo: ../include/net-snmp/library/snmp_logging.h +./kernel.lo: ../include/net-snmp/session_api.h +./kernel.lo: ../include/net-snmp/library/callback.h +./kernel.lo: ../include/net-snmp/library/snmp_transport.h +./kernel.lo: ../include/net-snmp/library/snmp_service.h +./kernel.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./kernel.lo: ../include/net-snmp/library/snmpUnixDomain.h +./kernel.lo: ../include/net-snmp/library/snmpUDPDomain.h +./kernel.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./kernel.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./kernel.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./kernel.lo: ../include/net-snmp/library/snmpTCPDomain.h +./kernel.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./kernel.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./kernel.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./kernel.lo: ../include/net-snmp/library/snmpIPXDomain.h +./kernel.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./kernel.lo: ../include/net-snmp/library/ucd_compat.h +./kernel.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h +./kernel.lo: ../include/net-snmp/library/parse.h +./kernel.lo: ../include/net-snmp/library/oid_stash.h +./kernel.lo: ../include/net-snmp/net-snmp-features.h +./kernel.lo: ../include/net-snmp/library/snmp_impl.h +./kernel.lo: ../include/net-snmp/library/snmp.h +./kernel.lo: ../include/net-snmp/library/snmp-tc.h +./kernel.lo: ../include/net-snmp/library/getopt.h +./kernel.lo: ../include/net-snmp/utilities.h +./kernel.lo: ../include/net-snmp/library/system.h +./kernel.lo: ../include/net-snmp/library/tools.h +./kernel.lo: ../include/net-snmp/library/int64.h +./kernel.lo: ../include/net-snmp/library/mt_support.h +./kernel.lo: ../include/net-snmp/library/snmp_alarm.h +./kernel.lo: ../include/net-snmp/library/data_list.h +./kernel.lo: ../include/net-snmp/library/check_varbind.h +./kernel.lo: ../include/net-snmp/library/container.h +./kernel.lo: ../include/net-snmp/library/container_binary_array.h +./kernel.lo: ../include/net-snmp/library/container_list_ssll.h +./kernel.lo: ../include/net-snmp/library/container_iterator.h +./kernel.lo: ../include/net-snmp/library/container.h +./kernel.lo: ../include/net-snmp/library/snmp_assert.h +./kernel.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./kernel.lo: ../include/net-snmp/library/read_config.h +./kernel.lo: ../include/net-snmp/library/default_store.h +./kernel.lo: ../include/net-snmp/library/snmp_parse_args.h +./kernel.lo: ../include/net-snmp/library/snmp_enum.h +./kernel.lo: ../include/net-snmp/library/vacm.h +./kernel.lo: ../include/net-snmp/snmpv3_api.h +./kernel.lo: ../include/net-snmp/library/snmpv3.h +./kernel.lo: ../include/net-snmp/library/transform_oids.h +./kernel.lo: ../include/net-snmp/library/keytools.h +./kernel.lo: ../include/net-snmp/library/scapi.h +./kernel.lo: ../include/net-snmp/library/lcd_time.h +./kernel.lo: ../include/net-snmp/library/snmp_secmod.h +./kernel.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./kernel.lo: ../include/net-snmp/library/snmpusm.h +./kernel.lo: ../include/net-snmp/library/snmptsm.h kernel.h +./kernel.lo: ../include/net-snmp/agent/ds_agent.h ./mib_modules.lo: ../include/net-snmp/agent/mib_module_config.h ./mib_modules.lo: ../include/net-snmp/net-snmp-config.h ./mib_modules.lo: ../include/net-snmp/net-snmp-includes.h @@ -867,6 +1003,7 @@ ./mib_modules.lo: ../include/net-snmp/pdu_api.h ./mib_modules.lo: ../include/net-snmp/library/asn1.h ./mib_modules.lo: ../include/net-snmp/output_api.h +./mib_modules.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./mib_modules.lo: ../include/net-snmp/library/snmp_debug.h ./mib_modules.lo: ../include/net-snmp/library/snmp_logging.h ./mib_modules.lo: ../include/net-snmp/session_api.h @@ -884,6 +1021,7 @@ ./mib_modules.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./mib_modules.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./mib_modules.lo: ../include/net-snmp/library/snmpIPXDomain.h +./mib_modules.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./mib_modules.lo: ../include/net-snmp/library/ucd_compat.h ./mib_modules.lo: ../include/net-snmp/library/mib.h ./mib_modules.lo: ../include/net-snmp/mib_api.h @@ -903,7 +1041,6 @@ ./mib_modules.lo: ../include/net-snmp/library/data_list.h ./mib_modules.lo: ../include/net-snmp/library/check_varbind.h ./mib_modules.lo: ../include/net-snmp/library/container.h -./mib_modules.lo: ../include/net-snmp/library/factory.h ./mib_modules.lo: ../include/net-snmp/library/container_binary_array.h ./mib_modules.lo: ../include/net-snmp/library/container_list_ssll.h ./mib_modules.lo: ../include/net-snmp/library/container_iterator.h @@ -924,8 +1061,8 @@ ./mib_modules.lo: ../include/net-snmp/library/lcd_time.h ./mib_modules.lo: ../include/net-snmp/library/snmp_secmod.h ./mib_modules.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./mib_modules.lo: ../include/net-snmp/library/snmptsm.h ./mib_modules.lo: ../include/net-snmp/library/snmpusm.h +./mib_modules.lo: ../include/net-snmp/library/snmptsm.h ./mib_modules.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./mib_modules.lo: ../include/net-snmp/agent/agent_module_config.h ./mib_modules.lo: ../include/net-snmp/agent/snmp_agent.h @@ -962,52 +1099,26 @@ ./mib_modules.lo: ../include/net-snmp/agent/table_array.h ./mib_modules.lo: ../include/net-snmp/agent/mfd.h ./mib_modules.lo: ../include/net-snmp/agent/snmp_get_statistic.h m2m.h +./mib_modules.lo: ../include/net-snmp/data_access/interface.h ./mib_modules.lo: mibgroup/struct.h ../include/net-snmp/agent/mib_modules.h ./mib_modules.lo: ../agent/mibgroup/mib_module_includes.h -./mib_modules.lo: mibgroup/examples/example.h mibgroup/testhandler.h -./mib_modules.lo: mibgroup/Rmon/rows.h mibgroup/Rmon/agutil.h -./mib_modules.lo: mibgroup/Rmon/statistics.h mibgroup/Rmon/alarmTable.h -./mib_modules.lo: mibgroup/Rmon/history.h mibgroup/Rmon/event.h -./mib_modules.lo: mibgroup/examples/scalar_int.h mibgroup/examples/watched.h +./mib_modules.lo: mibgroup/Rmon/alarm.h mibgroup/agent/extend.h ./mib_modules.lo: mibgroup/examples/data_set.h ./mib_modules.lo: mibgroup/examples/delayed_instance.h -./mib_modules.lo: mibgroup/host/hrh_storage.h mibgroup/host/hrh_filesys.h -./mib_modules.lo: mibgroup/host/hrSWInstalledTable.h -./mib_modules.lo: mibgroup/host/hrSWRunTable.h mibgroup/host/hr_system.h -./mib_modules.lo: mibgroup/host/hr_device.h mibgroup/host/hr_other.h -./mib_modules.lo: mibgroup/host/hr_proc.h mibgroup/host/hr_network.h -./mib_modules.lo: mibgroup/host/hr_print.h mibgroup/host/hr_disk.h -./mib_modules.lo: mibgroup/host/hr_partition.h -./mib_modules.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.h -./mib_modules.lo: mibgroup/snmpv3/snmpMPDStats_5_5.h -./mib_modules.lo: mibgroup/snmpv3/usmStats_5_5.h mibgroup/snmpv3/snmpEngine.h -./mib_modules.lo: mibgroup/snmpv3/usmUser.h mibgroup/mibII/snmp_mib_5_5.h -./mib_modules.lo: mibgroup/mibII/system_mib.h mibgroup/mibII/sysORTable.h -./mib_modules.lo: mibgroup/mibII/vacm_vars.h mibgroup/mibII/setSerialNo.h -./mib_modules.lo: mibgroup/mibII/at.h mibgroup/mibII/ip.h -./mib_modules.lo: mibgroup/mibII/var_route.h mibgroup/mibII/route_write.h -./mib_modules.lo: mibgroup/mibII/at.h mibgroup/mibII/tcp.h -./mib_modules.lo: mibgroup/mibII/icmp.h mibgroup/mibII/udp.h -./mib_modules.lo: mibgroup/mibII/ipv6.h mibgroup/ucd-snmp/disk_hw.h -./mib_modules.lo: ../agent/mibgroup/mibdefs.h mibgroup/ucd-snmp/proc.h -./mib_modules.lo: mibgroup/ucd-snmp/versioninfo.h mibgroup/ucd-snmp/pass.h -./mib_modules.lo: mibgroup/ucd-snmp/pass_persist.h -./mib_modules.lo: mibgroup/ucd-snmp/loadave.h mibgroup/agent/extend.h -./mib_modules.lo: mibgroup/ucd-snmp/errormib.h mibgroup/ucd-snmp/file.h -./mib_modules.lo: mibgroup/ucd-snmp/dlmod.h mibgroup/ucd-snmp/proxy.h -./mib_modules.lo: mibgroup/ucd-snmp/logmatch.h mibgroup/ucd-snmp/memory.h -./mib_modules.lo: mibgroup/ucd-snmp/vmstat.h -./mib_modules.lo: mibgroup/notification/snmpNotifyTable.h -./mib_modules.lo: mibgroup/notification/snmpNotifyFilterProfileTable.h -./mib_modules.lo: mibgroup/notification-log-mib/notification_log.h -./mib_modules.lo: mibgroup/target/target_counters_5_5.h -./mib_modules.lo: mibgroup/target/snmpTargetAddrEntry.h -./mib_modules.lo: mibgroup/target/snmpTargetParamsEntry.h -./mib_modules.lo: mibgroup/agent/nsTransactionTable.h -./mib_modules.lo: mibgroup/agent/nsModuleTable.h mibgroup/agent/nsDebug.h -./mib_modules.lo: mibgroup/agent/nsCache.h mibgroup/agent/nsLogging.h -./mib_modules.lo: mibgroup/agent/nsVacmAccessTable.h -./mib_modules.lo: mibgroup/disman/event/mteScalars.h +./mib_modules.lo: mibgroup/examples/example.h +./mib_modules.lo: mibgroup/examples/netSnmpHostsTable.h +./mib_modules.lo: mibgroup/examples/netSnmpHostsTable_columns.h +./mib_modules.lo: mibgroup/examples/netSnmpHostsTable_enums.h +./mib_modules.lo: mibgroup/examples/notification.h +./mib_modules.lo: mibgroup/examples/scalar_int.h +./mib_modules.lo: mibgroup/examples/ucdDemoPublic.h +./mib_modules.lo: mibgroup/examples/watched.h mibgroup/mibII/mta_sendmail.h +./mib_modules.lo: mibgroup/misc/ipfwacc.h mibgroup/testhandler.h +./mib_modules.lo: mibgroup/ucd-snmp/diskio.h mibgroup/ucd-snmp/extensible.h +./mib_modules.lo: ../agent/mibgroup/mibdefs.h mibgroup/Rmon/rows.h +./mib_modules.lo: mibgroup/Rmon/agutil.h mibgroup/Rmon/statistics.h +./mib_modules.lo: mibgroup/Rmon/alarmTable.h mibgroup/Rmon/history.h +./mib_modules.lo: mibgroup/Rmon/event.h mibgroup/disman/event/mteScalars.h ./mib_modules.lo: mibgroup/disman/event/mteTrigger.h ./mib_modules.lo: mibgroup/disman/event/mteTriggerTable.h ./mib_modules.lo: mibgroup/disman/event/mteTriggerDeltaTable.h @@ -1024,88 +1135,97 @@ ./mib_modules.lo: mibgroup/disman/event/mteObjects.h ./mib_modules.lo: mibgroup/disman/event/mteObjectsTable.h ./mib_modules.lo: mibgroup/disman/event/mteObjectsConf.h +./mib_modules.lo: mibgroup/disman/expr/expScalars.h +./mib_modules.lo: mibgroup/disman/expr/expExpression.h +./mib_modules.lo: ../agent/mibgroup/disman/expr/exp_enum.h +./mib_modules.lo: mibgroup/disman/expr/expExpressionTable.h +./mib_modules.lo: mibgroup/disman/expr/expErrorTable.h +./mib_modules.lo: mibgroup/disman/expr/expExpressionConf.h +./mib_modules.lo: mibgroup/disman/expr/expObject.h +./mib_modules.lo: ../agent/mibgroup/disman/expr/expExpression.h +./mib_modules.lo: mibgroup/disman/expr/expObjectTable.h +./mib_modules.lo: mibgroup/disman/expr/expObjectConf.h +./mib_modules.lo: mibgroup/disman/expr/expValue.h +./mib_modules.lo: mibgroup/disman/expr/expValueTable.h +./mib_modules.lo: mibgroup/disman/nslookup/lookupCtlTable.h +./mib_modules.lo: mibgroup/disman/nslookup/lookupResultsTable.h +./mib_modules.lo: mibgroup/disman/ping/pingCtlTable.h +./mib_modules.lo: mibgroup/disman/ping/pingResultsTable.h +./mib_modules.lo: mibgroup/disman/ping/pingProbeHistoryTable.h ./mib_modules.lo: mibgroup/disman/schedule/schedCore.h ./mib_modules.lo: mibgroup/disman/schedule/schedConf.h ./mib_modules.lo: mibgroup/disman/schedule/schedTable.h -./mib_modules.lo: mibgroup/utilities/override.h -./mib_modules.lo: mibgroup/host/data_access/swinst.h -./mib_modules.lo: mibgroup/host/data_access/swrun.h -./mib_modules.lo: mibgroup/host/hrSWRunPerfTable.h -./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h -./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h -./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h -./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h -./mib_modules.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h -./mib_modules.lo: mibgroup/mibII/vacm_context.h mibgroup/mibII/var_route.h -./mib_modules.lo: mibgroup/mibII/tcpTable.h mibgroup/mibII/udpTable.h -./mib_modules.lo: mibgroup/ip-mib/ip_scalars.h -./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h -./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h -./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h -./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h -./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h -./mib_modules.lo: mibgroup/hardware/memory/hw_mem.h -./mib_modules.lo: mibgroup/hardware/fsys/hw_fsys.h +./mib_modules.lo: mibgroup/disman/traceroute/traceRouteCtlTable.h +./mib_modules.lo: mibgroup/disman/traceroute/traceRouteResultsTable.h +./mib_modules.lo: mibgroup/disman/traceroute/traceRouteProbeHistoryTable.h +./mib_modules.lo: mibgroup/disman/traceroute/traceRouteHopsTable.h ./mib_modules.lo: mibgroup/hardware/cpu/cpu.h ./mib_modules.lo: mibgroup/hardware/cpu/cpu_linux.h -./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable.h -./mib_modules.lo: ../include/net-snmp/data_access/interface.h -./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable_constants.h -./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable_interface.h -./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable.h -./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable_data_access.h -./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable.h -./mib_modules.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h -./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable_constants.h -./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable_interface.h -./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable.h -./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h -./mib_modules.lo: ../include/net-snmp/data_access/ipaddress.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h -./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h -./mib_modules.lo: ../include/net-snmp/data_access/defaultrouter.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_oids.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.h +./mib_modules.lo: mibgroup/hardware/memory/hw_mem.h +./mib_modules.lo: mibgroup/host/hrh_storage.h mibgroup/host/hrh_filesys.h +./mib_modules.lo: mibgroup/host/hrSWInstalledTable.h +./mib_modules.lo: mibgroup/host/hrSWRunTable.h mibgroup/host/hr_system.h +./mib_modules.lo: mibgroup/host/hr_device.h mibgroup/host/hr_other.h +./mib_modules.lo: mibgroup/host/hr_proc.h mibgroup/host/hr_network.h +./mib_modules.lo: mibgroup/host/hr_print.h mibgroup/host/hr_disk.h +./mib_modules.lo: mibgroup/host/hr_partition.h ./mib_modules.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h ./mib_modules.lo: ../include/net-snmp/data_access/arp.h ./mib_modules.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_constants.h ./mib_modules.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.h ./mib_modules.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h ./mib_modules.lo: mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h -./mib_modules.lo: ../include/net-snmp/data_access/ipstats.h -./mib_modules.lo: ../include/net-snmp/data_access/systemstats.h -./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_constants.h -./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.h -./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h -./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h -./mib_modules.lo: ../include/net-snmp/data_access/scopezone.h -./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_oids.h -./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_enums.h -./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.h -./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h -./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h -./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h +./mib_modules.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h +./mib_modules.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h +./mib_modules.lo: ../agent/mibgroup/if-mib/ifTable/ifTable_constants.h +./mib_modules.lo: ../agent/mibgroup/if-mib/ifTable/ifTable_interface.h +./mib_modules.lo: ../agent/mibgroup/if-mib/ifTable/ifTable.h +./mib_modules.lo: ../agent/mibgroup/if-mib/ifTable/ifTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_constants.h +./mib_modules.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h +./mib_modules.lo: mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h +./mib_modules.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_constants.h +./mib_modules.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h +./mib_modules.lo: mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.h +./mib_modules.lo: mibgroup/notification/snmpNotifyTable.h +./mib_modules.lo: mibgroup/notification/snmpNotifyTable_data.h +./mib_modules.lo: mibgroup/tsm-mib/snmpTsmConfigurationUsePrefix.h +./mib_modules.lo: mibgroup/tunnel/tunnel.h mibgroup/ucd-snmp/pass.h +./mib_modules.lo: mibgroup/snmpv3/snmpEngine.h mibgroup/snmpv3/snmpMPDStats.h +./mib_modules.lo: mibgroup/snmpv3/usmStats.h mibgroup/snmpv3/usmUser.h +./mib_modules.lo: mibgroup/mibII/system_mib.h mibgroup/mibII/sysORTable.h +./mib_modules.lo: mibgroup/mibII/snmp_mib.h mibgroup/mibII/vacm_vars.h +./mib_modules.lo: mibgroup/mibII/setSerialNo.h mibgroup/mibII/at.h +./mib_modules.lo: mibgroup/mibII/ip.h mibgroup/mibII/var_route.h +./mib_modules.lo: mibgroup/mibII/route_write.h mibgroup/mibII/at.h +./mib_modules.lo: mibgroup/mibII/tcp.h mibgroup/mibII/udp.h +./mib_modules.lo: mibgroup/mibII/ipv6.h mibgroup/mibII/icmp.h +./mib_modules.lo: mibgroup/ucd-snmp/disk_hw.h mibgroup/ucd-snmp/proc.h +./mib_modules.lo: mibgroup/ucd-snmp/versioninfo.h +./mib_modules.lo: mibgroup/ucd-snmp/pass_persist.h +./mib_modules.lo: mibgroup/ucd-snmp/loadave.h mibgroup/ucd-snmp/errormib.h +./mib_modules.lo: mibgroup/ucd-snmp/file.h mibgroup/ucd-snmp/dlmod.h +./mib_modules.lo: mibgroup/ucd-snmp/proxy.h mibgroup/ucd-snmp/logmatch.h +./mib_modules.lo: mibgroup/ucd-snmp/memory.h mibgroup/ucd-snmp/vmstat.h +./mib_modules.lo: mibgroup/notification/snmpNotifyFilterProfileTable.h +./mib_modules.lo: mibgroup/notification/snmpNotifyFilterProfileTable_data.h +./mib_modules.lo: mibgroup/notification-log-mib/notification_log.h +./mib_modules.lo: mibgroup/target/snmpTargetAddrEntry.h +./mib_modules.lo: mibgroup/target/snmpTargetAddrEntry_data.h +./mib_modules.lo: mibgroup/target/snmpTargetParamsEntry.h +./mib_modules.lo: mibgroup/target/snmpTargetParamsEntry_data.h +./mib_modules.lo: mibgroup/target/target_counters.h +./mib_modules.lo: mibgroup/agent/nsTransactionTable.h +./mib_modules.lo: mibgroup/agent/nsModuleTable.h mibgroup/agent/nsDebug.h +./mib_modules.lo: mibgroup/agent/nsCache.h mibgroup/agent/nsLogging.h +./mib_modules.lo: mibgroup/agent/nsVacmAccessTable.h +./mib_modules.lo: mibgroup/utilities/override.h +./mib_modules.lo: mibgroup/host/data_access/swinst.h +./mib_modules.lo: mibgroup/host/data_access/swrun.h +./mib_modules.lo: mibgroup/host/hrSWRunPerfTable.h ./mib_modules.lo: mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h ./mib_modules.lo: ../include/net-snmp/data_access/route.h ./mib_modules.lo: ../agent/mibgroup/mibII/route_headers.h @@ -1118,8 +1238,28 @@ ./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.h ./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h ./mib_modules.lo: mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.h +./mib_modules.lo: mibgroup/if-mib/data_access/interface.h +./mib_modules.lo: mibgroup/if-mib/ifTable/ifTable.h +./mib_modules.lo: mibgroup/notification/snmpNotifyTable_data.h +./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +./mib_modules.lo: ../agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h +./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h +./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +./mib_modules.lo: mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_oids.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_enums.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.h +./mib_modules.lo: mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.h ./mib_modules.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h ./mib_modules.lo: ../include/net-snmp/data_access/tcpConn.h +./mib_modules.lo: ../include/net-snmp/data_access/ipaddress.h ./mib_modules.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_constants.h ./mib_modules.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.h ./mib_modules.lo: mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h @@ -1129,14 +1269,71 @@ ./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.h ./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h ./mib_modules.lo: mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.h +./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmSession/snmpTlstmSession.h +./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h +./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h +./mib_modules.lo: mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h +./mib_modules.lo: mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.h ./mib_modules.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h ./mib_modules.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_constants.h ./mib_modules.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.h ./mib_modules.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h ./mib_modules.lo: mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.h -./mib_modules.lo: mibgroup/if-mib/data_access/interface.h +./mib_modules.lo: mibgroup/mibII/vacm_context.h mibgroup/mibII/var_route.h +./mib_modules.lo: mibgroup/mibII/tcpTable.h mibgroup/mibII/udpTable.h +./mib_modules.lo: mibgroup/ip-mib/ip_scalars.h +./mib_modules.lo: mibgroup/notification/snmpNotifyFilterProfileTable_data.h +./mib_modules.lo: mibgroup/target/snmpTargetAddrEntry_data.h +./mib_modules.lo: mibgroup/target/snmpTargetParamsEntry_data.h +./mib_modules.lo: mibgroup/hardware/fsys/hw_fsys.h +./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable.h +./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable_constants.h +./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable_interface.h +./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable.h +./mib_modules.lo: mibgroup/if-mib/ifXTable/ifXTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h +./mib_modules.lo: mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h +./mib_modules.lo: ../include/net-snmp/data_access/defaultrouter.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_oids.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.h +./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h +./mib_modules.lo: ../include/net-snmp/data_access/ipstats.h +./mib_modules.lo: ../include/net-snmp/data_access/systemstats.h +./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_constants.h +./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h +./mib_modules.lo: mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h +./mib_modules.lo: ../include/net-snmp/data_access/scopezone.h +./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_oids.h +./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_enums.h +./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h +./mib_modules.lo: mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h +./mib_modules.lo: mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h ./mib_modules.lo: ../agent/mibgroup/mib_module_shutdown.h ./mib_modules.lo: ../agent/mibgroup/mib_module_inits.h +./netsnmp_close_fds.lo: ../include/net-snmp/net-snmp-config.h +./netsnmp_close_fds.lo: ../include/net-snmp/agent/netsnmp_close_fds.h ./object_monitor.lo: ../include/net-snmp/net-snmp-config.h ./object_monitor.lo: ../include/net-snmp/net-snmp-includes.h ./object_monitor.lo: ../include/net-snmp/definitions.h @@ -1149,6 +1346,7 @@ ./object_monitor.lo: ../include/net-snmp/pdu_api.h ./object_monitor.lo: ../include/net-snmp/library/asn1.h ./object_monitor.lo: ../include/net-snmp/output_api.h +./object_monitor.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./object_monitor.lo: ../include/net-snmp/library/snmp_debug.h ./object_monitor.lo: ../include/net-snmp/library/snmp_logging.h ./object_monitor.lo: ../include/net-snmp/session_api.h @@ -1166,6 +1364,7 @@ ./object_monitor.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./object_monitor.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./object_monitor.lo: ../include/net-snmp/library/snmpIPXDomain.h +./object_monitor.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./object_monitor.lo: ../include/net-snmp/library/ucd_compat.h ./object_monitor.lo: ../include/net-snmp/library/mib.h ./object_monitor.lo: ../include/net-snmp/mib_api.h @@ -1185,7 +1384,6 @@ ./object_monitor.lo: ../include/net-snmp/library/data_list.h ./object_monitor.lo: ../include/net-snmp/library/check_varbind.h ./object_monitor.lo: ../include/net-snmp/library/container.h -./object_monitor.lo: ../include/net-snmp/library/factory.h ./object_monitor.lo: ../include/net-snmp/library/container_binary_array.h ./object_monitor.lo: ../include/net-snmp/library/container_list_ssll.h ./object_monitor.lo: ../include/net-snmp/library/container_iterator.h @@ -1206,8 +1404,8 @@ ./object_monitor.lo: ../include/net-snmp/library/lcd_time.h ./object_monitor.lo: ../include/net-snmp/library/snmp_secmod.h ./object_monitor.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./object_monitor.lo: ../include/net-snmp/library/snmptsm.h ./object_monitor.lo: ../include/net-snmp/library/snmpusm.h +./object_monitor.lo: ../include/net-snmp/library/snmptsm.h ./object_monitor.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./object_monitor.lo: ../include/net-snmp/agent/mib_module_config.h ./object_monitor.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1259,6 +1457,7 @@ ./snmp_agent.lo: ../include/net-snmp/pdu_api.h ./snmp_agent.lo: ../include/net-snmp/library/asn1.h ./snmp_agent.lo: ../include/net-snmp/output_api.h +./snmp_agent.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_agent.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_agent.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_agent.lo: ../include/net-snmp/session_api.h @@ -1276,6 +1475,7 @@ ./snmp_agent.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_agent.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_agent.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_agent.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_agent.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_agent.lo: ../include/net-snmp/library/mib.h ./snmp_agent.lo: ../include/net-snmp/mib_api.h @@ -1294,7 +1494,6 @@ ./snmp_agent.lo: ../include/net-snmp/library/data_list.h ./snmp_agent.lo: ../include/net-snmp/library/check_varbind.h ./snmp_agent.lo: ../include/net-snmp/library/container.h -./snmp_agent.lo: ../include/net-snmp/library/factory.h ./snmp_agent.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_agent.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_agent.lo: ../include/net-snmp/library/container_iterator.h @@ -1315,8 +1514,8 @@ ./snmp_agent.lo: ../include/net-snmp/library/lcd_time.h ./snmp_agent.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_agent.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_agent.lo: ../include/net-snmp/library/snmptsm.h ./snmp_agent.lo: ../include/net-snmp/library/snmpusm.h +./snmp_agent.lo: ../include/net-snmp/library/snmptsm.h ./snmp_agent.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./snmp_agent.lo: ../include/net-snmp/agent/mib_module_config.h ./snmp_agent.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1353,117 +1552,13 @@ ./snmp_agent.lo: ../include/net-snmp/agent/table_container.h ./snmp_agent.lo: ../include/net-snmp/agent/table_array.h ./snmp_agent.lo: ../include/net-snmp/agent/mfd.h -./snmp_agent.lo: ../include/net-snmp/agent/snmp_get_statistic.h snmpd.h +./snmp_agent.lo: ../include/net-snmp/agent/snmp_get_statistic.h +./snmp_agent.lo: ../include/net-snmp/library/large_fd_set.h +./snmp_agent.lo: agent_global_vars.h snmpd.h ./snmp_agent.lo: ../include/net-snmp/agent/mib_modules.h ./snmp_agent.lo: ../agent/mibgroup/agentx/protocol.h +./snmp_agent.lo: ../agent/mibgroup/agentx/master.h ./snmp_agent.lo: ../agent/mibgroup/smux/smux.h -./snmpd.lo: ../include/net-snmp/net-snmp-config.h -./snmpd.lo: ../include/net-snmp/net-snmp-features.h -./snmpd.lo: ../include/net-snmp/types.h -./snmpd.lo: ../include/net-snmp/library/oid.h -./snmpd.lo: ../include/net-snmp/library/types.h -./snmpd.lo: ../include/net-snmp/definitions.h -./snmpd.lo: ../include/net-snmp/library/snmp_api.h -./snmpd.lo: ../include/net-snmp/varbind_api.h -./snmpd.lo: ../include/net-snmp/library/snmp_client.h -./snmpd.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h -./snmpd.lo: ../include/net-snmp/output_api.h -./snmpd.lo: ../include/net-snmp/library/snmp_debug.h -./snmpd.lo: ../include/net-snmp/library/snmp_logging.h -./snmpd.lo: ../include/net-snmp/session_api.h -./snmpd.lo: ../include/net-snmp/library/callback.h -./snmpd.lo: ../include/net-snmp/library/snmp_transport.h -./snmpd.lo: ../include/net-snmp/library/snmp_service.h -./snmpd.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpUnixDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpUDPDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpTCPDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmpd.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmpd.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmpd.lo: ../include/net-snmp/library/snmpIPXDomain.h -./snmpd.lo: ../include/net-snmp/library/ucd_compat.h -./snmpd.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h -./snmpd.lo: ../include/net-snmp/library/parse.h -./snmpd.lo: ../include/net-snmp/library/oid_stash.h -./snmpd.lo: ../include/net-snmp/library/snmp_impl.h -./snmpd.lo: ../include/net-snmp/library/snmp.h -./snmpd.lo: ../include/net-snmp/library/snmp-tc.h -./snmpd.lo: ../include/net-snmp/net-snmp-includes.h -./snmpd.lo: ../include/net-snmp/library/getopt.h -./snmpd.lo: ../include/net-snmp/utilities.h -./snmpd.lo: ../include/net-snmp/library/system.h -./snmpd.lo: ../include/net-snmp/library/tools.h -./snmpd.lo: ../include/net-snmp/library/int64.h -./snmpd.lo: ../include/net-snmp/library/mt_support.h -./snmpd.lo: ../include/net-snmp/library/snmp_alarm.h -./snmpd.lo: ../include/net-snmp/library/data_list.h -./snmpd.lo: ../include/net-snmp/library/check_varbind.h -./snmpd.lo: ../include/net-snmp/library/container.h -./snmpd.lo: ../include/net-snmp/library/factory.h -./snmpd.lo: ../include/net-snmp/library/container_binary_array.h -./snmpd.lo: ../include/net-snmp/library/container_list_ssll.h -./snmpd.lo: ../include/net-snmp/library/container_iterator.h -./snmpd.lo: ../include/net-snmp/library/container.h -./snmpd.lo: ../include/net-snmp/library/snmp_assert.h -./snmpd.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h -./snmpd.lo: ../include/net-snmp/library/read_config.h -./snmpd.lo: ../include/net-snmp/library/default_store.h -./snmpd.lo: ../include/net-snmp/library/snmp_parse_args.h -./snmpd.lo: ../include/net-snmp/library/snmp_enum.h -./snmpd.lo: ../include/net-snmp/library/vacm.h -./snmpd.lo: ../include/net-snmp/snmpv3_api.h -./snmpd.lo: ../include/net-snmp/library/snmpv3.h -./snmpd.lo: ../include/net-snmp/library/transform_oids.h -./snmpd.lo: ../include/net-snmp/library/keytools.h -./snmpd.lo: ../include/net-snmp/library/scapi.h -./snmpd.lo: ../include/net-snmp/library/lcd_time.h -./snmpd.lo: ../include/net-snmp/library/snmp_secmod.h -./snmpd.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpd.lo: ../include/net-snmp/library/snmptsm.h -./snmpd.lo: ../include/net-snmp/library/snmpusm.h -./snmpd.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h -./snmpd.lo: ../include/net-snmp/agent/mib_module_config.h -./snmpd.lo: ../include/net-snmp/agent/agent_module_config.h -./snmpd.lo: ../include/net-snmp/agent/snmp_agent.h -./snmpd.lo: ../include/net-snmp/agent/snmp_vars.h -./snmpd.lo: ../include/net-snmp/agent/agent_handler.h -./snmpd.lo: ../include/net-snmp/agent/var_struct.h -./snmpd.lo: ../include/net-snmp/agent/agent_registry.h -./snmpd.lo: ../include/net-snmp/library/fd_event_manager.h -./snmpd.lo: ../include/net-snmp/agent/ds_agent.h -./snmpd.lo: ../include/net-snmp/agent/agent_read_config.h -./snmpd.lo: ../include/net-snmp/agent/agent_trap.h -./snmpd.lo: ../include/net-snmp/agent/all_helpers.h -./snmpd.lo: ../include/net-snmp/agent/instance.h -./snmpd.lo: ../include/net-snmp/agent/baby_steps.h -./snmpd.lo: ../include/net-snmp/agent/scalar.h -./snmpd.lo: ../include/net-snmp/agent/scalar_group.h -./snmpd.lo: ../include/net-snmp/agent/watcher.h -./snmpd.lo: ../include/net-snmp/agent/multiplexer.h -./snmpd.lo: ../include/net-snmp/agent/null.h -./snmpd.lo: ../include/net-snmp/agent/debug_handler.h -./snmpd.lo: ../include/net-snmp/agent/cache_handler.h -./snmpd.lo: ../include/net-snmp/agent/old_api.h -./snmpd.lo: ../include/net-snmp/agent/read_only.h -./snmpd.lo: ../include/net-snmp/agent/row_merge.h -./snmpd.lo: ../include/net-snmp/agent/serialize.h -./snmpd.lo: ../include/net-snmp/agent/bulk_to_next.h -./snmpd.lo: ../include/net-snmp/agent/mode_end_call.h -./snmpd.lo: ../include/net-snmp/agent/table.h -./snmpd.lo: ../include/net-snmp/agent/table_data.h -./snmpd.lo: ../include/net-snmp/agent/table_dataset.h -./snmpd.lo: ../include/net-snmp/agent/table_tdata.h -./snmpd.lo: ../include/net-snmp/agent/table_iterator.h -./snmpd.lo: ../include/net-snmp/agent/table_container.h -./snmpd.lo: ../include/net-snmp/agent/table_array.h -./snmpd.lo: ../include/net-snmp/agent/mfd.h -./snmpd.lo: ../include/net-snmp/agent/snmp_get_statistic.h -./snmpd.lo: ../include/net-snmp/library/large_fd_set.h m2m.h snmpd.h -./snmpd.lo: ../include/net-snmp/agent/mib_modules.h mibgroup/smux/smux.h ./snmp_perl.lo: ../include/net-snmp/net-snmp-config.h ./snmp_perl.lo: ../include/net-snmp/net-snmp-includes.h ./snmp_perl.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -1475,6 +1570,7 @@ ./snmp_perl.lo: ../include/net-snmp/pdu_api.h ./snmp_perl.lo: ../include/net-snmp/library/asn1.h ./snmp_perl.lo: ../include/net-snmp/output_api.h +./snmp_perl.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_perl.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_perl.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_perl.lo: ../include/net-snmp/session_api.h @@ -1492,6 +1588,7 @@ ./snmp_perl.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_perl.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_perl.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_perl.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_perl.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_perl.lo: ../include/net-snmp/library/mib.h ./snmp_perl.lo: ../include/net-snmp/mib_api.h @@ -1511,7 +1608,6 @@ ./snmp_perl.lo: ../include/net-snmp/library/data_list.h ./snmp_perl.lo: ../include/net-snmp/library/check_varbind.h ./snmp_perl.lo: ../include/net-snmp/library/container.h -./snmp_perl.lo: ../include/net-snmp/library/factory.h ./snmp_perl.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_perl.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_perl.lo: ../include/net-snmp/library/container_iterator.h @@ -1532,8 +1628,8 @@ ./snmp_perl.lo: ../include/net-snmp/library/lcd_time.h ./snmp_perl.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_perl.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_perl.lo: ../include/net-snmp/library/snmptsm.h ./snmp_perl.lo: ../include/net-snmp/library/snmpusm.h +./snmp_perl.lo: ../include/net-snmp/library/snmptsm.h ./snmp_perl.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./snmp_perl.lo: ../include/net-snmp/agent/mib_module_config.h ./snmp_perl.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1574,8 +1670,7 @@ ./snmp_vars.lo: ../include/net-snmp/net-snmp-config.h ./snmp_vars.lo: ../include/net-snmp/net-snmp-includes.h ./snmp_vars.lo: ../include/net-snmp/definitions.h -./snmp_vars.lo: ../include/net-snmp/types.h -./snmp_vars.lo: ../include/net-snmp/library/oid.h +./snmp_vars.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./snmp_vars.lo: ../include/net-snmp/library/types.h ./snmp_vars.lo: ../include/net-snmp/library/snmp_api.h ./snmp_vars.lo: ../include/net-snmp/varbind_api.h @@ -1583,6 +1678,7 @@ ./snmp_vars.lo: ../include/net-snmp/pdu_api.h ./snmp_vars.lo: ../include/net-snmp/library/asn1.h ./snmp_vars.lo: ../include/net-snmp/output_api.h +./snmp_vars.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_vars.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_vars.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_vars.lo: ../include/net-snmp/session_api.h @@ -1600,6 +1696,7 @@ ./snmp_vars.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_vars.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_vars.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_vars.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_vars.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_vars.lo: ../include/net-snmp/library/mib.h ./snmp_vars.lo: ../include/net-snmp/mib_api.h @@ -1619,7 +1716,6 @@ ./snmp_vars.lo: ../include/net-snmp/library/data_list.h ./snmp_vars.lo: ../include/net-snmp/library/check_varbind.h ./snmp_vars.lo: ../include/net-snmp/library/container.h -./snmp_vars.lo: ../include/net-snmp/library/factory.h ./snmp_vars.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_vars.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_vars.lo: ../include/net-snmp/library/container_iterator.h @@ -1640,8 +1736,8 @@ ./snmp_vars.lo: ../include/net-snmp/library/lcd_time.h ./snmp_vars.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_vars.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_vars.lo: ../include/net-snmp/library/snmptsm.h ./snmp_vars.lo: ../include/net-snmp/library/snmpusm.h +./snmp_vars.lo: ../include/net-snmp/library/snmptsm.h ./snmp_vars.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./snmp_vars.lo: ../include/net-snmp/agent/mib_module_config.h ./snmp_vars.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1680,14 +1776,125 @@ ./snmp_vars.lo: ../include/net-snmp/agent/mfd.h ./snmp_vars.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./snmp_vars.lo: ../include/net-snmp/agent/mib_modules.h -./snmp_vars.lo: ../include/net-snmp/agent/agent_sysORTable.h kernel.h -./snmp_vars.lo: mibgroup/struct.h snmpd.h +./snmp_vars.lo: ../include/net-snmp/agent/agent_sysORTable.h +./snmp_vars.lo: agent_global_vars.h kernel.h mibgroup/struct.h snmpd.h ./snmp_vars.lo: ../agent/mibgroup/agentx/agentx_config.h ./snmp_vars.lo: ../agent/mibgroup/agentx/subagent.h ./snmp_vars.lo: ../agent/mibgroup/agent_module_includes.h ./snmp_vars.lo: mibgroup/smux/smux.h mibgroup/utilities/iquery.h ./snmp_vars.lo: mibgroup/snmpv3/usmConf.h mibgroup/mibII/vacm_conf.h ./snmp_vars.lo: snmp_perl.h ../agent/mibgroup/agent_module_inits.h +./snmpd.lo: ../include/net-snmp/net-snmp-config.h +./snmpd.lo: ../include/net-snmp/net-snmp-features.h +./snmpd.lo: ../include/net-snmp/types.h +./snmpd.lo: ../include/net-snmp/library/oid.h +./snmpd.lo: ../include/net-snmp/library/types.h +./snmpd.lo: ../include/net-snmp/definitions.h +./snmpd.lo: ../include/net-snmp/library/snmp_api.h +./snmpd.lo: ../include/net-snmp/varbind_api.h +./snmpd.lo: ../include/net-snmp/library/snmp_client.h +./snmpd.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h +./snmpd.lo: ../include/net-snmp/output_api.h +./snmpd.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmpd.lo: ../include/net-snmp/library/snmp_debug.h +./snmpd.lo: ../include/net-snmp/library/snmp_logging.h +./snmpd.lo: ../include/net-snmp/session_api.h +./snmpd.lo: ../include/net-snmp/library/callback.h +./snmpd.lo: ../include/net-snmp/library/snmp_transport.h +./snmpd.lo: ../include/net-snmp/library/snmp_service.h +./snmpd.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmpd.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmpd.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpd.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmpd.lo: ../include/net-snmp/library/ucd_compat.h +./snmpd.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h +./snmpd.lo: ../include/net-snmp/library/parse.h +./snmpd.lo: ../include/net-snmp/library/oid_stash.h +./snmpd.lo: ../include/net-snmp/library/snmp_impl.h +./snmpd.lo: ../include/net-snmp/library/snmp.h +./snmpd.lo: ../include/net-snmp/library/snmp-tc.h +./snmpd.lo: ../include/net-snmp/net-snmp-includes.h +./snmpd.lo: ../include/net-snmp/library/getopt.h +./snmpd.lo: ../include/net-snmp/utilities.h +./snmpd.lo: ../include/net-snmp/library/system.h +./snmpd.lo: ../include/net-snmp/library/tools.h +./snmpd.lo: ../include/net-snmp/library/int64.h +./snmpd.lo: ../include/net-snmp/library/mt_support.h +./snmpd.lo: ../include/net-snmp/library/snmp_alarm.h +./snmpd.lo: ../include/net-snmp/library/data_list.h +./snmpd.lo: ../include/net-snmp/library/check_varbind.h +./snmpd.lo: ../include/net-snmp/library/container.h +./snmpd.lo: ../include/net-snmp/library/container_binary_array.h +./snmpd.lo: ../include/net-snmp/library/container_list_ssll.h +./snmpd.lo: ../include/net-snmp/library/container_iterator.h +./snmpd.lo: ../include/net-snmp/library/container.h +./snmpd.lo: ../include/net-snmp/library/snmp_assert.h +./snmpd.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./snmpd.lo: ../include/net-snmp/library/read_config.h +./snmpd.lo: ../include/net-snmp/library/default_store.h +./snmpd.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmpd.lo: ../include/net-snmp/library/snmp_enum.h +./snmpd.lo: ../include/net-snmp/library/vacm.h +./snmpd.lo: ../include/net-snmp/snmpv3_api.h +./snmpd.lo: ../include/net-snmp/library/snmpv3.h +./snmpd.lo: ../include/net-snmp/library/transform_oids.h +./snmpd.lo: ../include/net-snmp/library/keytools.h +./snmpd.lo: ../include/net-snmp/library/scapi.h +./snmpd.lo: ../include/net-snmp/library/lcd_time.h +./snmpd.lo: ../include/net-snmp/library/snmp_secmod.h +./snmpd.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmpd.lo: ../include/net-snmp/library/snmpusm.h +./snmpd.lo: ../include/net-snmp/library/snmptsm.h +./snmpd.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h +./snmpd.lo: ../include/net-snmp/agent/mib_module_config.h +./snmpd.lo: ../include/net-snmp/agent/agent_module_config.h +./snmpd.lo: ../include/net-snmp/agent/snmp_agent.h +./snmpd.lo: ../include/net-snmp/agent/snmp_vars.h +./snmpd.lo: ../include/net-snmp/agent/agent_handler.h +./snmpd.lo: ../include/net-snmp/agent/var_struct.h +./snmpd.lo: ../include/net-snmp/agent/agent_registry.h +./snmpd.lo: ../include/net-snmp/library/fd_event_manager.h +./snmpd.lo: ../include/net-snmp/agent/ds_agent.h +./snmpd.lo: ../include/net-snmp/agent/agent_read_config.h +./snmpd.lo: ../include/net-snmp/agent/agent_trap.h +./snmpd.lo: ../include/net-snmp/agent/all_helpers.h +./snmpd.lo: ../include/net-snmp/agent/instance.h +./snmpd.lo: ../include/net-snmp/agent/baby_steps.h +./snmpd.lo: ../include/net-snmp/agent/scalar.h +./snmpd.lo: ../include/net-snmp/agent/scalar_group.h +./snmpd.lo: ../include/net-snmp/agent/watcher.h +./snmpd.lo: ../include/net-snmp/agent/multiplexer.h +./snmpd.lo: ../include/net-snmp/agent/null.h +./snmpd.lo: ../include/net-snmp/agent/debug_handler.h +./snmpd.lo: ../include/net-snmp/agent/cache_handler.h +./snmpd.lo: ../include/net-snmp/agent/old_api.h +./snmpd.lo: ../include/net-snmp/agent/read_only.h +./snmpd.lo: ../include/net-snmp/agent/row_merge.h +./snmpd.lo: ../include/net-snmp/agent/serialize.h +./snmpd.lo: ../include/net-snmp/agent/bulk_to_next.h +./snmpd.lo: ../include/net-snmp/agent/mode_end_call.h +./snmpd.lo: ../include/net-snmp/agent/table.h +./snmpd.lo: ../include/net-snmp/agent/table_data.h +./snmpd.lo: ../include/net-snmp/agent/table_dataset.h +./snmpd.lo: ../include/net-snmp/agent/table_tdata.h +./snmpd.lo: ../include/net-snmp/agent/table_iterator.h +./snmpd.lo: ../include/net-snmp/agent/table_container.h +./snmpd.lo: ../include/net-snmp/agent/table_array.h +./snmpd.lo: ../include/net-snmp/agent/mfd.h +./snmpd.lo: ../include/net-snmp/agent/snmp_get_statistic.h +./snmpd.lo: agent_global_vars.h ../include/net-snmp/library/large_fd_set.h +./snmpd.lo: m2m.h snmpd.h ../include/net-snmp/agent/mib_modules.h +./snmpd.lo: ../include/net-snmp/agent/netsnmp_close_fds.h +./snmpd.lo: ../snmplib/snmp_syslog.h mibgroup/util_funcs/restart.h +./snmpd.lo: ../include/net-snmp/library/sd-daemon.h mibgroup/smux/smux.h ./helpers/all_helpers.lo: ../include/net-snmp/net-snmp-config.h ./helpers/all_helpers.lo: ../include/net-snmp/net-snmp-features.h ./helpers/all_helpers.lo: ../include/net-snmp/net-snmp-includes.h @@ -1701,6 +1908,7 @@ ./helpers/all_helpers.lo: ../include/net-snmp/pdu_api.h ./helpers/all_helpers.lo: ../include/net-snmp/library/asn1.h ./helpers/all_helpers.lo: ../include/net-snmp/output_api.h +./helpers/all_helpers.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/all_helpers.lo: ../include/net-snmp/session_api.h @@ -1718,6 +1926,7 @@ ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/all_helpers.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/all_helpers.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/all_helpers.lo: ../include/net-snmp/library/mib.h ./helpers/all_helpers.lo: ../include/net-snmp/mib_api.h @@ -1736,7 +1945,6 @@ ./helpers/all_helpers.lo: ../include/net-snmp/library/data_list.h ./helpers/all_helpers.lo: ../include/net-snmp/library/check_varbind.h ./helpers/all_helpers.lo: ../include/net-snmp/library/container.h -./helpers/all_helpers.lo: ../include/net-snmp/library/factory.h ./helpers/all_helpers.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/all_helpers.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/all_helpers.lo: ../include/net-snmp/library/container_iterator.h @@ -1757,8 +1965,8 @@ ./helpers/all_helpers.lo: ../include/net-snmp/library/lcd_time.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/all_helpers.lo: ../include/net-snmp/library/snmptsm.h ./helpers/all_helpers.lo: ../include/net-snmp/library/snmpusm.h +./helpers/all_helpers.lo: ../include/net-snmp/library/snmptsm.h ./helpers/all_helpers.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/all_helpers.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/all_helpers.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1810,6 +2018,7 @@ ./helpers/baby_steps.lo: ../include/net-snmp/pdu_api.h ./helpers/baby_steps.lo: ../include/net-snmp/library/asn1.h ./helpers/baby_steps.lo: ../include/net-snmp/output_api.h +./helpers/baby_steps.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/baby_steps.lo: ../include/net-snmp/session_api.h @@ -1827,6 +2036,7 @@ ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/baby_steps.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/baby_steps.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/baby_steps.lo: ../include/net-snmp/library/mib.h ./helpers/baby_steps.lo: ../include/net-snmp/mib_api.h @@ -1845,7 +2055,6 @@ ./helpers/baby_steps.lo: ../include/net-snmp/library/data_list.h ./helpers/baby_steps.lo: ../include/net-snmp/library/check_varbind.h ./helpers/baby_steps.lo: ../include/net-snmp/library/container.h -./helpers/baby_steps.lo: ../include/net-snmp/library/factory.h ./helpers/baby_steps.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/baby_steps.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/baby_steps.lo: ../include/net-snmp/library/container_iterator.h @@ -1866,8 +2075,8 @@ ./helpers/baby_steps.lo: ../include/net-snmp/library/lcd_time.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/baby_steps.lo: ../include/net-snmp/library/snmptsm.h ./helpers/baby_steps.lo: ../include/net-snmp/library/snmpusm.h +./helpers/baby_steps.lo: ../include/net-snmp/library/snmptsm.h ./helpers/baby_steps.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/baby_steps.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/baby_steps.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1917,6 +2126,7 @@ ./helpers/bulk_to_next.lo: ../include/net-snmp/pdu_api.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/asn1.h ./helpers/bulk_to_next.lo: ../include/net-snmp/output_api.h +./helpers/bulk_to_next.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/bulk_to_next.lo: ../include/net-snmp/session_api.h @@ -1934,6 +2144,7 @@ ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/mib.h ./helpers/bulk_to_next.lo: ../include/net-snmp/mib_api.h @@ -1953,7 +2164,6 @@ ./helpers/bulk_to_next.lo: ../include/net-snmp/library/data_list.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/check_varbind.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/container.h -./helpers/bulk_to_next.lo: ../include/net-snmp/library/factory.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/container_iterator.h @@ -1974,8 +2184,8 @@ ./helpers/bulk_to_next.lo: ../include/net-snmp/library/lcd_time.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmptsm.h ./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmpusm.h +./helpers/bulk_to_next.lo: ../include/net-snmp/library/snmptsm.h ./helpers/bulk_to_next.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/bulk_to_next.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/bulk_to_next.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2026,6 +2236,7 @@ ./helpers/cache_handler.lo: ../include/net-snmp/pdu_api.h ./helpers/cache_handler.lo: ../include/net-snmp/library/asn1.h ./helpers/cache_handler.lo: ../include/net-snmp/output_api.h +./helpers/cache_handler.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/cache_handler.lo: ../include/net-snmp/session_api.h @@ -2043,6 +2254,7 @@ ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/cache_handler.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/cache_handler.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/cache_handler.lo: ../include/net-snmp/library/mib.h ./helpers/cache_handler.lo: ../include/net-snmp/mib_api.h @@ -2061,7 +2273,6 @@ ./helpers/cache_handler.lo: ../include/net-snmp/library/data_list.h ./helpers/cache_handler.lo: ../include/net-snmp/library/check_varbind.h ./helpers/cache_handler.lo: ../include/net-snmp/library/container.h -./helpers/cache_handler.lo: ../include/net-snmp/library/factory.h ./helpers/cache_handler.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/cache_handler.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/cache_handler.lo: ../include/net-snmp/library/container_iterator.h @@ -2082,8 +2293,8 @@ ./helpers/cache_handler.lo: ../include/net-snmp/library/lcd_time.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/cache_handler.lo: ../include/net-snmp/library/snmptsm.h ./helpers/cache_handler.lo: ../include/net-snmp/library/snmpusm.h +./helpers/cache_handler.lo: ../include/net-snmp/library/snmptsm.h ./helpers/cache_handler.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/cache_handler.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/cache_handler.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2133,6 +2344,7 @@ ./helpers/debug_handler.lo: ../include/net-snmp/pdu_api.h ./helpers/debug_handler.lo: ../include/net-snmp/library/asn1.h ./helpers/debug_handler.lo: ../include/net-snmp/output_api.h +./helpers/debug_handler.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/debug_handler.lo: ../include/net-snmp/session_api.h @@ -2150,6 +2362,7 @@ ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/debug_handler.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/debug_handler.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/debug_handler.lo: ../include/net-snmp/library/mib.h ./helpers/debug_handler.lo: ../include/net-snmp/mib_api.h @@ -2169,7 +2382,6 @@ ./helpers/debug_handler.lo: ../include/net-snmp/library/data_list.h ./helpers/debug_handler.lo: ../include/net-snmp/library/check_varbind.h ./helpers/debug_handler.lo: ../include/net-snmp/library/container.h -./helpers/debug_handler.lo: ../include/net-snmp/library/factory.h ./helpers/debug_handler.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/debug_handler.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/debug_handler.lo: ../include/net-snmp/library/container_iterator.h @@ -2190,8 +2402,8 @@ ./helpers/debug_handler.lo: ../include/net-snmp/library/lcd_time.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/debug_handler.lo: ../include/net-snmp/library/snmptsm.h ./helpers/debug_handler.lo: ../include/net-snmp/library/snmpusm.h +./helpers/debug_handler.lo: ../include/net-snmp/library/snmptsm.h ./helpers/debug_handler.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/debug_handler.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/debug_handler.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2242,6 +2454,7 @@ ./helpers/instance.lo: ../include/net-snmp/pdu_api.h ./helpers/instance.lo: ../include/net-snmp/library/asn1.h ./helpers/instance.lo: ../include/net-snmp/output_api.h +./helpers/instance.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/instance.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/instance.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/instance.lo: ../include/net-snmp/session_api.h @@ -2259,6 +2472,7 @@ ./helpers/instance.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/instance.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/instance.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/instance.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/instance.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/instance.lo: ../include/net-snmp/library/mib.h ./helpers/instance.lo: ../include/net-snmp/mib_api.h @@ -2277,7 +2491,6 @@ ./helpers/instance.lo: ../include/net-snmp/library/data_list.h ./helpers/instance.lo: ../include/net-snmp/library/check_varbind.h ./helpers/instance.lo: ../include/net-snmp/library/container.h -./helpers/instance.lo: ../include/net-snmp/library/factory.h ./helpers/instance.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/instance.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/instance.lo: ../include/net-snmp/library/container_iterator.h @@ -2298,8 +2511,8 @@ ./helpers/instance.lo: ../include/net-snmp/library/lcd_time.h ./helpers/instance.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/instance.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/instance.lo: ../include/net-snmp/library/snmptsm.h ./helpers/instance.lo: ../include/net-snmp/library/snmpusm.h +./helpers/instance.lo: ../include/net-snmp/library/snmptsm.h ./helpers/instance.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/instance.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/instance.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2350,6 +2563,7 @@ ./helpers/mode_end_call.lo: ../include/net-snmp/pdu_api.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/asn1.h ./helpers/mode_end_call.lo: ../include/net-snmp/output_api.h +./helpers/mode_end_call.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/mode_end_call.lo: ../include/net-snmp/session_api.h @@ -2367,6 +2581,7 @@ ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/mib.h ./helpers/mode_end_call.lo: ../include/net-snmp/mib_api.h @@ -2385,7 +2600,6 @@ ./helpers/mode_end_call.lo: ../include/net-snmp/library/data_list.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/check_varbind.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/container.h -./helpers/mode_end_call.lo: ../include/net-snmp/library/factory.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/container_iterator.h @@ -2406,8 +2620,8 @@ ./helpers/mode_end_call.lo: ../include/net-snmp/library/lcd_time.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/mode_end_call.lo: ../include/net-snmp/library/snmptsm.h ./helpers/mode_end_call.lo: ../include/net-snmp/library/snmpusm.h +./helpers/mode_end_call.lo: ../include/net-snmp/library/snmptsm.h ./helpers/mode_end_call.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/mode_end_call.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/mode_end_call.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2457,6 +2671,7 @@ ./helpers/multiplexer.lo: ../include/net-snmp/pdu_api.h ./helpers/multiplexer.lo: ../include/net-snmp/library/asn1.h ./helpers/multiplexer.lo: ../include/net-snmp/output_api.h +./helpers/multiplexer.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/multiplexer.lo: ../include/net-snmp/session_api.h @@ -2474,6 +2689,7 @@ ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/multiplexer.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/multiplexer.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/multiplexer.lo: ../include/net-snmp/library/mib.h ./helpers/multiplexer.lo: ../include/net-snmp/mib_api.h @@ -2493,7 +2709,6 @@ ./helpers/multiplexer.lo: ../include/net-snmp/library/data_list.h ./helpers/multiplexer.lo: ../include/net-snmp/library/check_varbind.h ./helpers/multiplexer.lo: ../include/net-snmp/library/container.h -./helpers/multiplexer.lo: ../include/net-snmp/library/factory.h ./helpers/multiplexer.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/multiplexer.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/multiplexer.lo: ../include/net-snmp/library/container_iterator.h @@ -2514,8 +2729,8 @@ ./helpers/multiplexer.lo: ../include/net-snmp/library/lcd_time.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/multiplexer.lo: ../include/net-snmp/library/snmptsm.h ./helpers/multiplexer.lo: ../include/net-snmp/library/snmpusm.h +./helpers/multiplexer.lo: ../include/net-snmp/library/snmptsm.h ./helpers/multiplexer.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/multiplexer.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/multiplexer.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2565,6 +2780,7 @@ ./helpers/null.lo: ../include/net-snmp/pdu_api.h ./helpers/null.lo: ../include/net-snmp/library/asn1.h ./helpers/null.lo: ../include/net-snmp/output_api.h +./helpers/null.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/null.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/null.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/null.lo: ../include/net-snmp/session_api.h @@ -2582,6 +2798,7 @@ ./helpers/null.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/null.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/null.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/null.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/null.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/null.lo: ../include/net-snmp/library/mib.h ./helpers/null.lo: ../include/net-snmp/mib_api.h @@ -2601,7 +2818,6 @@ ./helpers/null.lo: ../include/net-snmp/library/data_list.h ./helpers/null.lo: ../include/net-snmp/library/check_varbind.h ./helpers/null.lo: ../include/net-snmp/library/container.h -./helpers/null.lo: ../include/net-snmp/library/factory.h ./helpers/null.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/null.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/null.lo: ../include/net-snmp/library/container_iterator.h @@ -2622,8 +2838,8 @@ ./helpers/null.lo: ../include/net-snmp/library/lcd_time.h ./helpers/null.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/null.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/null.lo: ../include/net-snmp/library/snmptsm.h ./helpers/null.lo: ../include/net-snmp/library/snmpusm.h +./helpers/null.lo: ../include/net-snmp/library/snmptsm.h ./helpers/null.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/null.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/null.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2673,6 +2889,7 @@ ./helpers/old_api.lo: ../include/net-snmp/pdu_api.h ./helpers/old_api.lo: ../include/net-snmp/library/asn1.h ./helpers/old_api.lo: ../include/net-snmp/output_api.h +./helpers/old_api.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/old_api.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/old_api.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/old_api.lo: ../include/net-snmp/session_api.h @@ -2690,6 +2907,7 @@ ./helpers/old_api.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/old_api.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/old_api.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/old_api.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/old_api.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/old_api.lo: ../include/net-snmp/library/mib.h ./helpers/old_api.lo: ../include/net-snmp/mib_api.h @@ -2709,7 +2927,6 @@ ./helpers/old_api.lo: ../include/net-snmp/library/data_list.h ./helpers/old_api.lo: ../include/net-snmp/library/check_varbind.h ./helpers/old_api.lo: ../include/net-snmp/library/container.h -./helpers/old_api.lo: ../include/net-snmp/library/factory.h ./helpers/old_api.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/old_api.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/old_api.lo: ../include/net-snmp/library/container_iterator.h @@ -2730,8 +2947,8 @@ ./helpers/old_api.lo: ../include/net-snmp/library/lcd_time.h ./helpers/old_api.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/old_api.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/old_api.lo: ../include/net-snmp/library/snmptsm.h ./helpers/old_api.lo: ../include/net-snmp/library/snmpusm.h +./helpers/old_api.lo: ../include/net-snmp/library/snmptsm.h ./helpers/old_api.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/old_api.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/old_api.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2782,6 +2999,7 @@ ./helpers/read_only.lo: ../include/net-snmp/pdu_api.h ./helpers/read_only.lo: ../include/net-snmp/library/asn1.h ./helpers/read_only.lo: ../include/net-snmp/output_api.h +./helpers/read_only.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/read_only.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/read_only.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/read_only.lo: ../include/net-snmp/session_api.h @@ -2799,6 +3017,7 @@ ./helpers/read_only.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/read_only.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/read_only.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/read_only.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/read_only.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/read_only.lo: ../include/net-snmp/library/mib.h ./helpers/read_only.lo: ../include/net-snmp/mib_api.h @@ -2818,7 +3037,6 @@ ./helpers/read_only.lo: ../include/net-snmp/library/data_list.h ./helpers/read_only.lo: ../include/net-snmp/library/check_varbind.h ./helpers/read_only.lo: ../include/net-snmp/library/container.h -./helpers/read_only.lo: ../include/net-snmp/library/factory.h ./helpers/read_only.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/read_only.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/read_only.lo: ../include/net-snmp/library/container_iterator.h @@ -2839,8 +3057,8 @@ ./helpers/read_only.lo: ../include/net-snmp/library/lcd_time.h ./helpers/read_only.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/read_only.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/read_only.lo: ../include/net-snmp/library/snmptsm.h ./helpers/read_only.lo: ../include/net-snmp/library/snmpusm.h +./helpers/read_only.lo: ../include/net-snmp/library/snmptsm.h ./helpers/read_only.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/read_only.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/read_only.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2891,6 +3109,7 @@ ./helpers/row_merge.lo: ../include/net-snmp/pdu_api.h ./helpers/row_merge.lo: ../include/net-snmp/library/asn1.h ./helpers/row_merge.lo: ../include/net-snmp/output_api.h +./helpers/row_merge.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/row_merge.lo: ../include/net-snmp/session_api.h @@ -2908,6 +3127,7 @@ ./helpers/row_merge.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/row_merge.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/row_merge.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/row_merge.lo: ../include/net-snmp/library/mib.h ./helpers/row_merge.lo: ../include/net-snmp/mib_api.h @@ -2926,7 +3146,6 @@ ./helpers/row_merge.lo: ../include/net-snmp/library/data_list.h ./helpers/row_merge.lo: ../include/net-snmp/library/check_varbind.h ./helpers/row_merge.lo: ../include/net-snmp/library/container.h -./helpers/row_merge.lo: ../include/net-snmp/library/factory.h ./helpers/row_merge.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/row_merge.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/row_merge.lo: ../include/net-snmp/library/container_iterator.h @@ -2947,8 +3166,8 @@ ./helpers/row_merge.lo: ../include/net-snmp/library/lcd_time.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/row_merge.lo: ../include/net-snmp/library/snmptsm.h ./helpers/row_merge.lo: ../include/net-snmp/library/snmpusm.h +./helpers/row_merge.lo: ../include/net-snmp/library/snmptsm.h ./helpers/row_merge.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/row_merge.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/row_merge.lo: ../include/net-snmp/agent/agent_module_config.h @@ -2998,6 +3217,7 @@ ./helpers/scalar.lo: ../include/net-snmp/pdu_api.h ./helpers/scalar.lo: ../include/net-snmp/library/asn1.h ./helpers/scalar.lo: ../include/net-snmp/output_api.h +./helpers/scalar.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/scalar.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/scalar.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/scalar.lo: ../include/net-snmp/session_api.h @@ -3015,6 +3235,7 @@ ./helpers/scalar.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/scalar.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/scalar.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/scalar.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/scalar.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/scalar.lo: ../include/net-snmp/library/mib.h ./helpers/scalar.lo: ../include/net-snmp/mib_api.h @@ -3034,7 +3255,6 @@ ./helpers/scalar.lo: ../include/net-snmp/library/data_list.h ./helpers/scalar.lo: ../include/net-snmp/library/check_varbind.h ./helpers/scalar.lo: ../include/net-snmp/library/container.h -./helpers/scalar.lo: ../include/net-snmp/library/factory.h ./helpers/scalar.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/scalar.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/scalar.lo: ../include/net-snmp/library/container_iterator.h @@ -3055,8 +3275,8 @@ ./helpers/scalar.lo: ../include/net-snmp/library/lcd_time.h ./helpers/scalar.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/scalar.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/scalar.lo: ../include/net-snmp/library/snmptsm.h ./helpers/scalar.lo: ../include/net-snmp/library/snmpusm.h +./helpers/scalar.lo: ../include/net-snmp/library/snmptsm.h ./helpers/scalar.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/scalar.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/scalar.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3106,6 +3326,7 @@ ./helpers/scalar_group.lo: ../include/net-snmp/pdu_api.h ./helpers/scalar_group.lo: ../include/net-snmp/library/asn1.h ./helpers/scalar_group.lo: ../include/net-snmp/output_api.h +./helpers/scalar_group.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/scalar_group.lo: ../include/net-snmp/session_api.h @@ -3123,6 +3344,7 @@ ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/scalar_group.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/scalar_group.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/scalar_group.lo: ../include/net-snmp/library/mib.h ./helpers/scalar_group.lo: ../include/net-snmp/mib_api.h @@ -3142,7 +3364,6 @@ ./helpers/scalar_group.lo: ../include/net-snmp/library/data_list.h ./helpers/scalar_group.lo: ../include/net-snmp/library/check_varbind.h ./helpers/scalar_group.lo: ../include/net-snmp/library/container.h -./helpers/scalar_group.lo: ../include/net-snmp/library/factory.h ./helpers/scalar_group.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/scalar_group.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/scalar_group.lo: ../include/net-snmp/library/container_iterator.h @@ -3163,8 +3384,8 @@ ./helpers/scalar_group.lo: ../include/net-snmp/library/lcd_time.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/scalar_group.lo: ../include/net-snmp/library/snmptsm.h ./helpers/scalar_group.lo: ../include/net-snmp/library/snmpusm.h +./helpers/scalar_group.lo: ../include/net-snmp/library/snmptsm.h ./helpers/scalar_group.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/scalar_group.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/scalar_group.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3214,6 +3435,7 @@ ./helpers/serialize.lo: ../include/net-snmp/pdu_api.h ./helpers/serialize.lo: ../include/net-snmp/library/asn1.h ./helpers/serialize.lo: ../include/net-snmp/output_api.h +./helpers/serialize.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/serialize.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/serialize.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/serialize.lo: ../include/net-snmp/session_api.h @@ -3231,6 +3453,7 @@ ./helpers/serialize.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/serialize.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/serialize.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/serialize.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/serialize.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/serialize.lo: ../include/net-snmp/library/mib.h ./helpers/serialize.lo: ../include/net-snmp/mib_api.h @@ -3250,7 +3473,6 @@ ./helpers/serialize.lo: ../include/net-snmp/library/data_list.h ./helpers/serialize.lo: ../include/net-snmp/library/check_varbind.h ./helpers/serialize.lo: ../include/net-snmp/library/container.h -./helpers/serialize.lo: ../include/net-snmp/library/factory.h ./helpers/serialize.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/serialize.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/serialize.lo: ../include/net-snmp/library/container_iterator.h @@ -3271,8 +3493,8 @@ ./helpers/serialize.lo: ../include/net-snmp/library/lcd_time.h ./helpers/serialize.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/serialize.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/serialize.lo: ../include/net-snmp/library/snmptsm.h ./helpers/serialize.lo: ../include/net-snmp/library/snmpusm.h +./helpers/serialize.lo: ../include/net-snmp/library/snmptsm.h ./helpers/serialize.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/serialize.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/serialize.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3323,6 +3545,7 @@ ./helpers/snmp_get_statistic.lo: ../include/net-snmp/pdu_api.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/asn1.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/output_api.h +./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/session_api.h @@ -3340,6 +3563,7 @@ ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/mib.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/mib_api.h @@ -3358,7 +3582,6 @@ ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/data_list.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/check_varbind.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/container.h -./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/factory.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/container_iterator.h @@ -3379,8 +3602,8 @@ ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/lcd_time.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmptsm.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmpusm.h +./helpers/snmp_get_statistic.lo: ../include/net-snmp/library/snmptsm.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/snmp_get_statistic.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3431,6 +3654,7 @@ ./helpers/stash_cache.lo: ../include/net-snmp/pdu_api.h ./helpers/stash_cache.lo: ../include/net-snmp/library/asn1.h ./helpers/stash_cache.lo: ../include/net-snmp/output_api.h +./helpers/stash_cache.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/stash_cache.lo: ../include/net-snmp/session_api.h @@ -3448,6 +3672,7 @@ ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/stash_cache.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/stash_cache.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/stash_cache.lo: ../include/net-snmp/library/mib.h ./helpers/stash_cache.lo: ../include/net-snmp/mib_api.h @@ -3466,7 +3691,6 @@ ./helpers/stash_cache.lo: ../include/net-snmp/library/data_list.h ./helpers/stash_cache.lo: ../include/net-snmp/library/check_varbind.h ./helpers/stash_cache.lo: ../include/net-snmp/library/container.h -./helpers/stash_cache.lo: ../include/net-snmp/library/factory.h ./helpers/stash_cache.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/stash_cache.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/stash_cache.lo: ../include/net-snmp/library/container_iterator.h @@ -3487,8 +3711,8 @@ ./helpers/stash_cache.lo: ../include/net-snmp/library/lcd_time.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/stash_cache.lo: ../include/net-snmp/library/snmptsm.h ./helpers/stash_cache.lo: ../include/net-snmp/library/snmpusm.h +./helpers/stash_cache.lo: ../include/net-snmp/library/snmptsm.h ./helpers/stash_cache.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/stash_cache.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/stash_cache.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3541,6 +3765,7 @@ ./helpers/stash_to_next.lo: ../include/net-snmp/pdu_api.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/asn1.h ./helpers/stash_to_next.lo: ../include/net-snmp/output_api.h +./helpers/stash_to_next.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/stash_to_next.lo: ../include/net-snmp/session_api.h @@ -3558,6 +3783,7 @@ ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/mib.h ./helpers/stash_to_next.lo: ../include/net-snmp/mib_api.h @@ -3576,7 +3802,6 @@ ./helpers/stash_to_next.lo: ../include/net-snmp/library/data_list.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/check_varbind.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/container.h -./helpers/stash_to_next.lo: ../include/net-snmp/library/factory.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/container_iterator.h @@ -3597,8 +3822,8 @@ ./helpers/stash_to_next.lo: ../include/net-snmp/library/lcd_time.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/stash_to_next.lo: ../include/net-snmp/library/snmptsm.h ./helpers/stash_to_next.lo: ../include/net-snmp/library/snmpusm.h +./helpers/stash_to_next.lo: ../include/net-snmp/library/snmptsm.h ./helpers/stash_to_next.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/stash_to_next.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/stash_to_next.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3638,114 +3863,6 @@ ./helpers/stash_to_next.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./helpers/stash_to_next.lo: ../include/net-snmp/agent/stash_to_next.h ./helpers/stash_to_next.lo: ../include/net-snmp/agent/stash_cache.h -./helpers/table_array.lo: ../include/net-snmp/net-snmp-config.h -./helpers/table_array.lo: ../include/net-snmp/net-snmp-features.h -./helpers/table_array.lo: ../include/net-snmp/net-snmp-includes.h -./helpers/table_array.lo: ../include/net-snmp/definitions.h -./helpers/table_array.lo: ../include/net-snmp/types.h -./helpers/table_array.lo: ../include/net-snmp/library/oid.h -./helpers/table_array.lo: ../include/net-snmp/library/types.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_api.h -./helpers/table_array.lo: ../include/net-snmp/varbind_api.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_client.h -./helpers/table_array.lo: ../include/net-snmp/pdu_api.h -./helpers/table_array.lo: ../include/net-snmp/library/asn1.h -./helpers/table_array.lo: ../include/net-snmp/output_api.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_debug.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_logging.h -./helpers/table_array.lo: ../include/net-snmp/session_api.h -./helpers/table_array.lo: ../include/net-snmp/library/callback.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_transport.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_service.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpUnixDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpTCPDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpIPXDomain.h -./helpers/table_array.lo: ../include/net-snmp/library/ucd_compat.h -./helpers/table_array.lo: ../include/net-snmp/library/mib.h -./helpers/table_array.lo: ../include/net-snmp/mib_api.h -./helpers/table_array.lo: ../include/net-snmp/library/parse.h -./helpers/table_array.lo: ../include/net-snmp/library/oid_stash.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_impl.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp-tc.h -./helpers/table_array.lo: ../include/net-snmp/library/getopt.h -./helpers/table_array.lo: ../include/net-snmp/utilities.h -./helpers/table_array.lo: ../include/net-snmp/library/system.h -./helpers/table_array.lo: ../include/net-snmp/library/tools.h -./helpers/table_array.lo: ../include/net-snmp/library/int64.h -./helpers/table_array.lo: ../include/net-snmp/library/mt_support.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_alarm.h -./helpers/table_array.lo: ../include/net-snmp/library/data_list.h -./helpers/table_array.lo: ../include/net-snmp/library/check_varbind.h -./helpers/table_array.lo: ../include/net-snmp/library/container.h -./helpers/table_array.lo: ../include/net-snmp/library/factory.h -./helpers/table_array.lo: ../include/net-snmp/library/container_binary_array.h -./helpers/table_array.lo: ../include/net-snmp/library/container_list_ssll.h -./helpers/table_array.lo: ../include/net-snmp/library/container_iterator.h -./helpers/table_array.lo: ../include/net-snmp/library/container.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_assert.h -./helpers/table_array.lo: ../include/net-snmp/version.h -./helpers/table_array.lo: ../include/net-snmp/config_api.h -./helpers/table_array.lo: ../include/net-snmp/library/read_config.h -./helpers/table_array.lo: ../include/net-snmp/library/default_store.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_parse_args.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_enum.h -./helpers/table_array.lo: ../include/net-snmp/library/vacm.h -./helpers/table_array.lo: ../include/net-snmp/snmpv3_api.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpv3.h -./helpers/table_array.lo: ../include/net-snmp/library/transform_oids.h -./helpers/table_array.lo: ../include/net-snmp/library/keytools.h -./helpers/table_array.lo: ../include/net-snmp/library/scapi.h -./helpers/table_array.lo: ../include/net-snmp/library/lcd_time.h -./helpers/table_array.lo: ../include/net-snmp/library/snmp_secmod.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_array.lo: ../include/net-snmp/library/snmptsm.h -./helpers/table_array.lo: ../include/net-snmp/library/snmpusm.h -./helpers/table_array.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h -./helpers/table_array.lo: ../include/net-snmp/agent/mib_module_config.h -./helpers/table_array.lo: ../include/net-snmp/agent/agent_module_config.h -./helpers/table_array.lo: ../include/net-snmp/agent/snmp_agent.h -./helpers/table_array.lo: ../include/net-snmp/agent/snmp_vars.h -./helpers/table_array.lo: ../include/net-snmp/agent/agent_handler.h -./helpers/table_array.lo: ../include/net-snmp/agent/var_struct.h -./helpers/table_array.lo: ../include/net-snmp/agent/agent_registry.h -./helpers/table_array.lo: ../include/net-snmp/library/fd_event_manager.h -./helpers/table_array.lo: ../include/net-snmp/agent/ds_agent.h -./helpers/table_array.lo: ../include/net-snmp/agent/agent_read_config.h -./helpers/table_array.lo: ../include/net-snmp/agent/agent_trap.h -./helpers/table_array.lo: ../include/net-snmp/agent/all_helpers.h -./helpers/table_array.lo: ../include/net-snmp/agent/instance.h -./helpers/table_array.lo: ../include/net-snmp/agent/baby_steps.h -./helpers/table_array.lo: ../include/net-snmp/agent/scalar.h -./helpers/table_array.lo: ../include/net-snmp/agent/scalar_group.h -./helpers/table_array.lo: ../include/net-snmp/agent/watcher.h -./helpers/table_array.lo: ../include/net-snmp/agent/multiplexer.h -./helpers/table_array.lo: ../include/net-snmp/agent/null.h -./helpers/table_array.lo: ../include/net-snmp/agent/debug_handler.h -./helpers/table_array.lo: ../include/net-snmp/agent/cache_handler.h -./helpers/table_array.lo: ../include/net-snmp/agent/old_api.h -./helpers/table_array.lo: ../include/net-snmp/agent/read_only.h -./helpers/table_array.lo: ../include/net-snmp/agent/row_merge.h -./helpers/table_array.lo: ../include/net-snmp/agent/serialize.h -./helpers/table_array.lo: ../include/net-snmp/agent/bulk_to_next.h -./helpers/table_array.lo: ../include/net-snmp/agent/mode_end_call.h -./helpers/table_array.lo: ../include/net-snmp/agent/table.h -./helpers/table_array.lo: ../include/net-snmp/agent/table_data.h -./helpers/table_array.lo: ../include/net-snmp/agent/table_dataset.h -./helpers/table_array.lo: ../include/net-snmp/agent/table_tdata.h -./helpers/table_array.lo: ../include/net-snmp/agent/table_iterator.h -./helpers/table_array.lo: ../include/net-snmp/agent/table_container.h -./helpers/table_array.lo: ../include/net-snmp/agent/table_array.h -./helpers/table_array.lo: ../include/net-snmp/agent/mfd.h -./helpers/table_array.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./helpers/table.lo: ../include/net-snmp/net-snmp-config.h ./helpers/table.lo: ../include/net-snmp/net-snmp-features.h ./helpers/table.lo: ../include/net-snmp/net-snmp-includes.h @@ -3759,6 +3876,7 @@ ./helpers/table.lo: ../include/net-snmp/pdu_api.h ./helpers/table.lo: ../include/net-snmp/library/asn1.h ./helpers/table.lo: ../include/net-snmp/output_api.h +./helpers/table.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table.lo: ../include/net-snmp/session_api.h @@ -3776,6 +3894,7 @@ ./helpers/table.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table.lo: ../include/net-snmp/library/mib.h ./helpers/table.lo: ../include/net-snmp/mib_api.h @@ -3794,7 +3913,6 @@ ./helpers/table.lo: ../include/net-snmp/library/data_list.h ./helpers/table.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table.lo: ../include/net-snmp/library/container.h -./helpers/table.lo: ../include/net-snmp/library/factory.h ./helpers/table.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table.lo: ../include/net-snmp/library/container_iterator.h @@ -3815,8 +3933,8 @@ ./helpers/table.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3854,6 +3972,115 @@ ./helpers/table.lo: ../include/net-snmp/agent/table_array.h ./helpers/table.lo: ../include/net-snmp/agent/mfd.h ./helpers/table.lo: ../include/net-snmp/agent/snmp_get_statistic.h +./helpers/table_array.lo: ../include/net-snmp/net-snmp-config.h +./helpers/table_array.lo: ../include/net-snmp/net-snmp-features.h +./helpers/table_array.lo: ../include/net-snmp/net-snmp-includes.h +./helpers/table_array.lo: ../include/net-snmp/definitions.h +./helpers/table_array.lo: ../include/net-snmp/types.h +./helpers/table_array.lo: ../include/net-snmp/library/oid.h +./helpers/table_array.lo: ../include/net-snmp/library/types.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_api.h +./helpers/table_array.lo: ../include/net-snmp/varbind_api.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_client.h +./helpers/table_array.lo: ../include/net-snmp/pdu_api.h +./helpers/table_array.lo: ../include/net-snmp/library/asn1.h +./helpers/table_array.lo: ../include/net-snmp/output_api.h +./helpers/table_array.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_debug.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_logging.h +./helpers/table_array.lo: ../include/net-snmp/session_api.h +./helpers/table_array.lo: ../include/net-snmp/library/callback.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_transport.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_service.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpUnixDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpTCPDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./helpers/table_array.lo: ../include/net-snmp/library/ucd_compat.h +./helpers/table_array.lo: ../include/net-snmp/library/mib.h +./helpers/table_array.lo: ../include/net-snmp/mib_api.h +./helpers/table_array.lo: ../include/net-snmp/library/parse.h +./helpers/table_array.lo: ../include/net-snmp/library/oid_stash.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_impl.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp-tc.h +./helpers/table_array.lo: ../include/net-snmp/library/getopt.h +./helpers/table_array.lo: ../include/net-snmp/utilities.h +./helpers/table_array.lo: ../include/net-snmp/library/system.h +./helpers/table_array.lo: ../include/net-snmp/library/tools.h +./helpers/table_array.lo: ../include/net-snmp/library/int64.h +./helpers/table_array.lo: ../include/net-snmp/library/mt_support.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_alarm.h +./helpers/table_array.lo: ../include/net-snmp/library/data_list.h +./helpers/table_array.lo: ../include/net-snmp/library/check_varbind.h +./helpers/table_array.lo: ../include/net-snmp/library/container.h +./helpers/table_array.lo: ../include/net-snmp/library/container_binary_array.h +./helpers/table_array.lo: ../include/net-snmp/library/container_list_ssll.h +./helpers/table_array.lo: ../include/net-snmp/library/container_iterator.h +./helpers/table_array.lo: ../include/net-snmp/library/container.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_assert.h +./helpers/table_array.lo: ../include/net-snmp/version.h +./helpers/table_array.lo: ../include/net-snmp/config_api.h +./helpers/table_array.lo: ../include/net-snmp/library/read_config.h +./helpers/table_array.lo: ../include/net-snmp/library/default_store.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_parse_args.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_enum.h +./helpers/table_array.lo: ../include/net-snmp/library/vacm.h +./helpers/table_array.lo: ../include/net-snmp/snmpv3_api.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpv3.h +./helpers/table_array.lo: ../include/net-snmp/library/transform_oids.h +./helpers/table_array.lo: ../include/net-snmp/library/keytools.h +./helpers/table_array.lo: ../include/net-snmp/library/scapi.h +./helpers/table_array.lo: ../include/net-snmp/library/lcd_time.h +./helpers/table_array.lo: ../include/net-snmp/library/snmp_secmod.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./helpers/table_array.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_array.lo: ../include/net-snmp/library/snmptsm.h +./helpers/table_array.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h +./helpers/table_array.lo: ../include/net-snmp/agent/mib_module_config.h +./helpers/table_array.lo: ../include/net-snmp/agent/agent_module_config.h +./helpers/table_array.lo: ../include/net-snmp/agent/snmp_agent.h +./helpers/table_array.lo: ../include/net-snmp/agent/snmp_vars.h +./helpers/table_array.lo: ../include/net-snmp/agent/agent_handler.h +./helpers/table_array.lo: ../include/net-snmp/agent/var_struct.h +./helpers/table_array.lo: ../include/net-snmp/agent/agent_registry.h +./helpers/table_array.lo: ../include/net-snmp/library/fd_event_manager.h +./helpers/table_array.lo: ../include/net-snmp/agent/ds_agent.h +./helpers/table_array.lo: ../include/net-snmp/agent/agent_read_config.h +./helpers/table_array.lo: ../include/net-snmp/agent/agent_trap.h +./helpers/table_array.lo: ../include/net-snmp/agent/all_helpers.h +./helpers/table_array.lo: ../include/net-snmp/agent/instance.h +./helpers/table_array.lo: ../include/net-snmp/agent/baby_steps.h +./helpers/table_array.lo: ../include/net-snmp/agent/scalar.h +./helpers/table_array.lo: ../include/net-snmp/agent/scalar_group.h +./helpers/table_array.lo: ../include/net-snmp/agent/watcher.h +./helpers/table_array.lo: ../include/net-snmp/agent/multiplexer.h +./helpers/table_array.lo: ../include/net-snmp/agent/null.h +./helpers/table_array.lo: ../include/net-snmp/agent/debug_handler.h +./helpers/table_array.lo: ../include/net-snmp/agent/cache_handler.h +./helpers/table_array.lo: ../include/net-snmp/agent/old_api.h +./helpers/table_array.lo: ../include/net-snmp/agent/read_only.h +./helpers/table_array.lo: ../include/net-snmp/agent/row_merge.h +./helpers/table_array.lo: ../include/net-snmp/agent/serialize.h +./helpers/table_array.lo: ../include/net-snmp/agent/bulk_to_next.h +./helpers/table_array.lo: ../include/net-snmp/agent/mode_end_call.h +./helpers/table_array.lo: ../include/net-snmp/agent/table.h +./helpers/table_array.lo: ../include/net-snmp/agent/table_data.h +./helpers/table_array.lo: ../include/net-snmp/agent/table_dataset.h +./helpers/table_array.lo: ../include/net-snmp/agent/table_tdata.h +./helpers/table_array.lo: ../include/net-snmp/agent/table_iterator.h +./helpers/table_array.lo: ../include/net-snmp/agent/table_container.h +./helpers/table_array.lo: ../include/net-snmp/agent/table_array.h +./helpers/table_array.lo: ../include/net-snmp/agent/mfd.h +./helpers/table_array.lo: ../include/net-snmp/agent/snmp_get_statistic.h ./helpers/table_container.lo: ../include/net-snmp/net-snmp-config.h ./helpers/table_container.lo: ../include/net-snmp/net-snmp-features.h ./helpers/table_container.lo: ../include/net-snmp/net-snmp-includes.h @@ -3867,6 +4094,7 @@ ./helpers/table_container.lo: ../include/net-snmp/pdu_api.h ./helpers/table_container.lo: ../include/net-snmp/library/asn1.h ./helpers/table_container.lo: ../include/net-snmp/output_api.h +./helpers/table_container.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table_container.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table_container.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table_container.lo: ../include/net-snmp/session_api.h @@ -3884,6 +4112,7 @@ ./helpers/table_container.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table_container.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table_container.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_container.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table_container.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table_container.lo: ../include/net-snmp/library/mib.h ./helpers/table_container.lo: ../include/net-snmp/mib_api.h @@ -3902,7 +4131,6 @@ ./helpers/table_container.lo: ../include/net-snmp/library/data_list.h ./helpers/table_container.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table_container.lo: ../include/net-snmp/library/container.h -./helpers/table_container.lo: ../include/net-snmp/library/factory.h ./helpers/table_container.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table_container.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table_container.lo: ../include/net-snmp/library/container_iterator.h @@ -3923,8 +4151,8 @@ ./helpers/table_container.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table_container.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table_container.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_container.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_container.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_container.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_container.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table_container.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table_container.lo: ../include/net-snmp/agent/agent_module_config.h @@ -3975,6 +4203,7 @@ ./helpers/table_data.lo: ../include/net-snmp/pdu_api.h ./helpers/table_data.lo: ../include/net-snmp/library/asn1.h ./helpers/table_data.lo: ../include/net-snmp/output_api.h +./helpers/table_data.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table_data.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table_data.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table_data.lo: ../include/net-snmp/session_api.h @@ -3992,6 +4221,7 @@ ./helpers/table_data.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table_data.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table_data.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_data.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table_data.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table_data.lo: ../include/net-snmp/library/mib.h ./helpers/table_data.lo: ../include/net-snmp/mib_api.h @@ -4010,7 +4240,6 @@ ./helpers/table_data.lo: ../include/net-snmp/library/data_list.h ./helpers/table_data.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table_data.lo: ../include/net-snmp/library/container.h -./helpers/table_data.lo: ../include/net-snmp/library/factory.h ./helpers/table_data.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table_data.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table_data.lo: ../include/net-snmp/library/container_iterator.h @@ -4031,8 +4260,8 @@ ./helpers/table_data.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table_data.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table_data.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_data.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_data.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_data.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_data.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table_data.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table_data.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4083,6 +4312,7 @@ ./helpers/table_dataset.lo: ../include/net-snmp/pdu_api.h ./helpers/table_dataset.lo: ../include/net-snmp/library/asn1.h ./helpers/table_dataset.lo: ../include/net-snmp/output_api.h +./helpers/table_dataset.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table_dataset.lo: ../include/net-snmp/session_api.h @@ -4100,6 +4330,7 @@ ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_dataset.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table_dataset.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table_dataset.lo: ../include/net-snmp/library/mib.h ./helpers/table_dataset.lo: ../include/net-snmp/mib_api.h @@ -4118,7 +4349,6 @@ ./helpers/table_dataset.lo: ../include/net-snmp/library/data_list.h ./helpers/table_dataset.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table_dataset.lo: ../include/net-snmp/library/container.h -./helpers/table_dataset.lo: ../include/net-snmp/library/factory.h ./helpers/table_dataset.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table_dataset.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table_dataset.lo: ../include/net-snmp/library/container_iterator.h @@ -4139,8 +4369,8 @@ ./helpers/table_dataset.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_dataset.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_dataset.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_dataset.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_dataset.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table_dataset.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table_dataset.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4191,6 +4421,7 @@ ./helpers/table_iterator.lo: ../include/net-snmp/pdu_api.h ./helpers/table_iterator.lo: ../include/net-snmp/library/asn1.h ./helpers/table_iterator.lo: ../include/net-snmp/output_api.h +./helpers/table_iterator.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table_iterator.lo: ../include/net-snmp/session_api.h @@ -4208,6 +4439,7 @@ ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_iterator.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table_iterator.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table_iterator.lo: ../include/net-snmp/library/mib.h ./helpers/table_iterator.lo: ../include/net-snmp/mib_api.h @@ -4226,7 +4458,6 @@ ./helpers/table_iterator.lo: ../include/net-snmp/library/data_list.h ./helpers/table_iterator.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table_iterator.lo: ../include/net-snmp/library/container.h -./helpers/table_iterator.lo: ../include/net-snmp/library/factory.h ./helpers/table_iterator.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table_iterator.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table_iterator.lo: ../include/net-snmp/library/container_iterator.h @@ -4247,8 +4478,8 @@ ./helpers/table_iterator.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_iterator.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_iterator.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_iterator.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_iterator.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table_iterator.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table_iterator.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4300,6 +4531,7 @@ ./helpers/table_row.lo: ../include/net-snmp/pdu_api.h ./helpers/table_row.lo: ../include/net-snmp/library/asn1.h ./helpers/table_row.lo: ../include/net-snmp/output_api.h +./helpers/table_row.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table_row.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table_row.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table_row.lo: ../include/net-snmp/session_api.h @@ -4317,6 +4549,7 @@ ./helpers/table_row.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table_row.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table_row.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_row.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table_row.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table_row.lo: ../include/net-snmp/library/mib.h ./helpers/table_row.lo: ../include/net-snmp/mib_api.h @@ -4335,7 +4568,6 @@ ./helpers/table_row.lo: ../include/net-snmp/library/data_list.h ./helpers/table_row.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table_row.lo: ../include/net-snmp/library/container.h -./helpers/table_row.lo: ../include/net-snmp/library/factory.h ./helpers/table_row.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table_row.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table_row.lo: ../include/net-snmp/library/container_iterator.h @@ -4356,8 +4588,8 @@ ./helpers/table_row.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table_row.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table_row.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_row.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_row.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_row.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_row.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table_row.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table_row.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4408,6 +4640,7 @@ ./helpers/table_tdata.lo: ../include/net-snmp/pdu_api.h ./helpers/table_tdata.lo: ../include/net-snmp/library/asn1.h ./helpers/table_tdata.lo: ../include/net-snmp/output_api.h +./helpers/table_tdata.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/table_tdata.lo: ../include/net-snmp/session_api.h @@ -4425,6 +4658,7 @@ ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/table_tdata.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/table_tdata.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/table_tdata.lo: ../include/net-snmp/library/mib.h ./helpers/table_tdata.lo: ../include/net-snmp/mib_api.h @@ -4443,7 +4677,6 @@ ./helpers/table_tdata.lo: ../include/net-snmp/library/data_list.h ./helpers/table_tdata.lo: ../include/net-snmp/library/check_varbind.h ./helpers/table_tdata.lo: ../include/net-snmp/library/container.h -./helpers/table_tdata.lo: ../include/net-snmp/library/factory.h ./helpers/table_tdata.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/table_tdata.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/table_tdata.lo: ../include/net-snmp/library/container_iterator.h @@ -4464,8 +4697,8 @@ ./helpers/table_tdata.lo: ../include/net-snmp/library/lcd_time.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/table_tdata.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_tdata.lo: ../include/net-snmp/library/snmpusm.h +./helpers/table_tdata.lo: ../include/net-snmp/library/snmptsm.h ./helpers/table_tdata.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/table_tdata.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/table_tdata.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4516,6 +4749,7 @@ ./helpers/watcher.lo: ../include/net-snmp/pdu_api.h ./helpers/watcher.lo: ../include/net-snmp/library/asn1.h ./helpers/watcher.lo: ../include/net-snmp/output_api.h +./helpers/watcher.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./helpers/watcher.lo: ../include/net-snmp/library/snmp_debug.h ./helpers/watcher.lo: ../include/net-snmp/library/snmp_logging.h ./helpers/watcher.lo: ../include/net-snmp/session_api.h @@ -4533,6 +4767,7 @@ ./helpers/watcher.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./helpers/watcher.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./helpers/watcher.lo: ../include/net-snmp/library/snmpIPXDomain.h +./helpers/watcher.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./helpers/watcher.lo: ../include/net-snmp/library/ucd_compat.h ./helpers/watcher.lo: ../include/net-snmp/library/mib.h ./helpers/watcher.lo: ../include/net-snmp/mib_api.h @@ -4551,7 +4786,6 @@ ./helpers/watcher.lo: ../include/net-snmp/library/data_list.h ./helpers/watcher.lo: ../include/net-snmp/library/check_varbind.h ./helpers/watcher.lo: ../include/net-snmp/library/container.h -./helpers/watcher.lo: ../include/net-snmp/library/factory.h ./helpers/watcher.lo: ../include/net-snmp/library/container_binary_array.h ./helpers/watcher.lo: ../include/net-snmp/library/container_list_ssll.h ./helpers/watcher.lo: ../include/net-snmp/library/container_iterator.h @@ -4572,8 +4806,8 @@ ./helpers/watcher.lo: ../include/net-snmp/library/lcd_time.h ./helpers/watcher.lo: ../include/net-snmp/library/snmp_secmod.h ./helpers/watcher.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./helpers/watcher.lo: ../include/net-snmp/library/snmptsm.h ./helpers/watcher.lo: ../include/net-snmp/library/snmpusm.h +./helpers/watcher.lo: ../include/net-snmp/library/snmptsm.h ./helpers/watcher.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./helpers/watcher.lo: ../include/net-snmp/agent/mib_module_config.h ./helpers/watcher.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4623,6 +4857,7 @@ ./mibgroup/header_complex.lo: ../include/net-snmp/pdu_api.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/asn1.h ./mibgroup/header_complex.lo: ../include/net-snmp/output_api.h +./mibgroup/header_complex.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmp_debug.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmp_logging.h ./mibgroup/header_complex.lo: ../include/net-snmp/session_api.h @@ -4640,6 +4875,7 @@ ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpIPXDomain.h +./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/ucd_compat.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/mib.h ./mibgroup/header_complex.lo: ../include/net-snmp/mib_api.h @@ -4659,7 +4895,6 @@ ./mibgroup/header_complex.lo: ../include/net-snmp/library/data_list.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/check_varbind.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/container.h -./mibgroup/header_complex.lo: ../include/net-snmp/library/factory.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/container_binary_array.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/container_list_ssll.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/container_iterator.h @@ -4680,8 +4915,8 @@ ./mibgroup/header_complex.lo: ../include/net-snmp/library/lcd_time.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmp_secmod.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./mibgroup/header_complex.lo: ../include/net-snmp/library/snmptsm.h ./mibgroup/header_complex.lo: ../include/net-snmp/library/snmpusm.h +./mibgroup/header_complex.lo: ../include/net-snmp/library/snmptsm.h ./mibgroup/header_complex.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./mibgroup/header_complex.lo: ../include/net-snmp/agent/mib_module_config.h ./mibgroup/header_complex.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4734,6 +4969,7 @@ ./mibgroup/testhandler.lo: ../include/net-snmp/pdu_api.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/asn1.h ./mibgroup/testhandler.lo: ../include/net-snmp/output_api.h +./mibgroup/testhandler.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmp_debug.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmp_logging.h ./mibgroup/testhandler.lo: ../include/net-snmp/session_api.h @@ -4751,6 +4987,7 @@ ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpIPXDomain.h +./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/ucd_compat.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/mib.h ./mibgroup/testhandler.lo: ../include/net-snmp/mib_api.h @@ -4769,7 +5006,6 @@ ./mibgroup/testhandler.lo: ../include/net-snmp/library/data_list.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/check_varbind.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/container.h -./mibgroup/testhandler.lo: ../include/net-snmp/library/factory.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/container_binary_array.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/container_list_ssll.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/container_iterator.h @@ -4790,8 +5026,8 @@ ./mibgroup/testhandler.lo: ../include/net-snmp/library/lcd_time.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmp_secmod.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./mibgroup/testhandler.lo: ../include/net-snmp/library/snmptsm.h ./mibgroup/testhandler.lo: ../include/net-snmp/library/snmpusm.h +./mibgroup/testhandler.lo: ../include/net-snmp/library/snmptsm.h ./mibgroup/testhandler.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./mibgroup/testhandler.lo: ../include/net-snmp/agent/mib_module_config.h ./mibgroup/testhandler.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4843,6 +5079,7 @@ ./mibgroup/util_funcs.lo: ../include/net-snmp/pdu_api.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/asn1.h ./mibgroup/util_funcs.lo: ../include/net-snmp/output_api.h +./mibgroup/util_funcs.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmp_debug.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmp_logging.h ./mibgroup/util_funcs.lo: ../include/net-snmp/session_api.h @@ -4860,6 +5097,7 @@ ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpIPXDomain.h +./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/ucd_compat.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/mib.h ./mibgroup/util_funcs.lo: ../include/net-snmp/mib_api.h @@ -4878,7 +5116,6 @@ ./mibgroup/util_funcs.lo: ../include/net-snmp/library/data_list.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/check_varbind.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/container.h -./mibgroup/util_funcs.lo: ../include/net-snmp/library/factory.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/container_binary_array.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/container_list_ssll.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/container_iterator.h @@ -4899,8 +5136,8 @@ ./mibgroup/util_funcs.lo: ../include/net-snmp/library/lcd_time.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmp_secmod.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmptsm.h ./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmpusm.h +./mibgroup/util_funcs.lo: ../include/net-snmp/library/snmptsm.h ./mibgroup/util_funcs.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./mibgroup/util_funcs.lo: ../include/net-snmp/agent/mib_module_config.h ./mibgroup/util_funcs.lo: ../include/net-snmp/agent/agent_module_config.h @@ -4938,6 +5175,7 @@ ./mibgroup/util_funcs.lo: ../include/net-snmp/agent/table_array.h ./mibgroup/util_funcs.lo: ../include/net-snmp/agent/mfd.h ./mibgroup/util_funcs.lo: ../include/net-snmp/agent/snmp_get_statistic.h +./mibgroup/util_funcs.lo: ../include/net-snmp/agent/netsnmp_close_fds.h ./mibgroup/util_funcs.lo: ./mibgroup/struct.h ./mibgroup/util_funcs.h ./mibgroup/util_funcs.lo: ./mibgroup/util_funcs/header_generic.h ./mibgroup/util_funcs.lo: ./mibgroup/util_funcs/header_simple_table.h diff --git a/agent/Makefile.in b/agent/Makefile.in index 748b01c..44f8818 100644 --- a/agent/Makefile.in +++ b/agent/Makefile.in @@ -2,7 +2,6 @@ # Makefile for snmpd # -top_builddir = .. mysubdir=agent # use GNU vpath, if available, to only set a path for source and headers @@ -16,7 +15,7 @@ mysubdir=agent # # what to install # -SUBDIRS=helpers mibgroup +SUBDIRS=helpers FTSUBDIRS=mibgroup helpers INSTALLSBINPROGS= @SNMPD@ @@ -65,7 +64,8 @@ HEADERS=\ table_dataset.h \ table_tdata.h \ table_iterator.h \ - watcher.h + watcher.h \ + netsnmp_close_fds.h HEADERSONLY=mfd.h set_helper.h @@ -177,6 +177,7 @@ LIBAGENTOBJS= \ agent_sysORTable.o \ agent_trap.o \ kernel.o \ + netsnmp_close_fds.o \ snmp_agent.o \ snmp_vars.o \ $(agentgroup_list_o) \ @@ -217,6 +218,7 @@ LLIBAGENTOBJS= \ agent_sysORTable.lo \ agent_trap.lo \ kernel.lo \ + netsnmp_close_fds.lo \ snmp_agent.lo \ snmp_vars.lo \ $(agentgroup_list_lo) \ @@ -257,6 +259,7 @@ LLIBAGENTFTS= \ agent_sysORTable.ft \ agent_trap.ft \ kernel.ft \ + netsnmp_close_fds.ft \ snmp_agent.ft \ snmp_vars.ft \ $(agentgroup_list_ft) \ @@ -270,9 +273,12 @@ FTAGENTOBJS=snmpd.ft @other_ftagentobjs@ # # Define OBJS and LOBJS for clean target (just this directory) # -OBJS = $(LIBAGENTOBJS) $(AGENTOBJS) mib_modules.o auto_nlist.o -LOBJS = $(LLIBAGENTOBJS) $(LAGENTOBJS) mib_modules.lo auto_nlist.lo -FTOBJS = $(LLIBAGENTFTS) $(FTAGENTOBJS) mib_modules.ft auto_nlist.ft +OBJS = $(LIBAGENTOBJS) $(MIBOBJS) $(AGENTOBJS) \ + mib_modules.o auto_nlist.o +LOBJS = $(LLIBAGENTOBJS) $(LMIBOBJS) $(LAGENTOBJS) \ + mib_modules.lo auto_nlist.lo +FTOBJS = $(LLIBAGENTFTS) $(FTMIBOBJS) $(FTAGENTOBJS) \ + mib_modules.ft auto_nlist.ft FEATUREFILE = $(top_builddir)/include/net-snmp/agent/features.h @@ -297,11 +303,11 @@ snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LI $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS} libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS) - $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@ + $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@ $(RANLIB) $(AGENTLIB) -libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS) - $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@ +libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS) subdirs + $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@ $(RANLIB) $(MIBLIB) agentlib: $(AGENTLIB) @@ -342,4 +348,3 @@ mib_modules.lo: mibgroup/mib_module_inits.h subdirs: agentlib # wait for agentlib before building 'subdirs' target - diff --git a/agent/agent_global_vars.h b/agent/agent_global_vars.h new file mode 100644 index 0000000..ad44243 --- /dev/null +++ b/agent/agent_global_vars.h @@ -0,0 +1,36 @@ +#ifndef _AGENT_GLOBAL_VARS_H_ +#define _AGENT_GLOBAL_VARS_H_ + +/* + * Global variables defined in libnetsnmpagent.so that are used in MIB + * implementations. To do: avoid that MIB implementations depend on these + * variables and/or make sure that all these variables have a netsnmp_ prefix. + */ + +/* Forward declarations. */ + +struct snmp_session; +struct netsnmp_agent_session_s; +struct netsnmp_agent_session_s; + +/* Global variable declarations. */ + +extern int netsnmp_running; +extern int callback_master_num; +extern long snmp_enableauthentraps; +extern int snmp_enableauthentrapsset; + +extern struct snmp_session *main_session; +extern struct netsnmp_agent_session_s *netsnmp_processing_set; +extern struct netsnmp_agent_session_s *agent_delegated_list; + +extern const oid snmptrap_oid[]; +extern const size_t snmptrap_oid_len; +extern const oid snmptrapenterprise_oid[]; +extern const size_t snmptrapenterprise_oid_len; +extern const oid sysuptime_oid[]; +extern const size_t sysuptime_oid_len; +extern const oid version_sysoid[]; +extern const int version_sysoid_len; + +#endif /* _AGENT_GLOBAL_VARS_H_ */ diff --git a/agent/agent_handler.c b/agent/agent_handler.c index 59e9613..cba644a 100644 --- a/agent/agent_handler.c +++ b/agent/agent_handler.c @@ -7,13 +7,18 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif @@ -22,9 +27,9 @@ #include -netsnmp_feature_child_of(agent_handler, libnetsnmpagent) +netsnmp_feature_child_of(agent_handler, libnetsnmpagent); -netsnmp_feature_child_of(handler_mark_requests_as_delegated, agent_handler) +netsnmp_feature_child_of(handler_mark_requests_as_delegated, agent_handler); static netsnmp_mib_handler *_clone_handler(netsnmp_mib_handler *it); @@ -293,8 +298,16 @@ netsnmp_register_handler(netsnmp_handler_registration *reginfo) * for handlers that can't GETBULK, force a conversion handler on them */ if (!(reginfo->modes & HANDLER_CAN_GETBULK)) { - netsnmp_inject_handler(reginfo, - netsnmp_get_bulk_to_next_handler()); + handler = netsnmp_get_bulk_to_next_handler(); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_WARNING, "could not inject bulk to next handler\n"); + if (handler) + netsnmp_handler_free(handler); + /** should this be a critical error? */ + netsnmp_handler_registration_free(reginfo); + return SNMP_ERR_GENERR; + } } for (handler = reginfo->handler; handler; handler = handler->next) { @@ -327,6 +340,8 @@ netsnmp_register_handler(netsnmp_handler_registration *reginfo) int netsnmp_unregister_handler(netsnmp_handler_registration *reginfo) { + if (!reginfo) + return SNMPERR_SUCCESS; return unregister_mib_context(reginfo->rootoid, reginfo->rootoid_len, reginfo->priority, reginfo->range_subid, reginfo->range_ubound, @@ -439,8 +454,13 @@ netsnmp_inject_handler_before(netsnmp_handler_registration *reginfo, if (strcmp(nexth->handler_name, before_what) == 0) break; } - if (!nexth) + if (!nexth) { + snmp_log(LOG_ERR, "Cannot inject '%s' before '%s': not found\n", handler->handler_name, before_what); + snmp_log(LOG_ERR, "The handlers are:\n"); + for (nexth = reginfo->handler; nexth; nexth = nexth->next) + snmp_log(LOG_ERR, " %s\n", nexth->handler_name); return SNMP_ERR_GENERR; + } if (prevh) { /* after prevh and before nexth */ prevh->next = handler; @@ -647,7 +667,7 @@ netsnmp_call_next_handler(netsnmp_mib_handler *current, * * @return Returns SNMPERR_SUCCESS or SNMP_ERR_* error code. */ -netsnmp_feature_child_of(netsnmp_call_next_handler_one_request,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_call_next_handler_one_request,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_CALL_NEXT_HANDLER_ONE_REQUEST NETSNMP_INLINE int netsnmp_call_next_handler_one_request(netsnmp_mib_handler *current, @@ -786,56 +806,51 @@ netsnmp_handler_registration_dup(netsnmp_handler_registration *reginfo) { netsnmp_handler_registration *r = NULL; - if (reginfo == NULL) { + if (reginfo == NULL) return NULL; - } + r = calloc(1, sizeof(netsnmp_handler_registration)); + if (!r) + return r; + r->modes = reginfo->modes; + r->priority = reginfo->priority; + r->range_subid = reginfo->range_subid; + r->timeout = reginfo->timeout; + r->range_ubound = reginfo->range_ubound; + r->rootoid_len = reginfo->rootoid_len; + + if (reginfo->handlerName != NULL) { + r->handlerName = strdup(reginfo->handlerName); + if (r->handlerName == NULL) + goto err; + } - r = (netsnmp_handler_registration *) calloc(1, - sizeof - (netsnmp_handler_registration)); - - if (r != NULL) { - r->modes = reginfo->modes; - r->priority = reginfo->priority; - r->range_subid = reginfo->range_subid; - r->timeout = reginfo->timeout; - r->range_ubound = reginfo->range_ubound; - r->rootoid_len = reginfo->rootoid_len; - - if (reginfo->handlerName != NULL) { - r->handlerName = strdup(reginfo->handlerName); - if (r->handlerName == NULL) { - netsnmp_handler_registration_free(r); - return NULL; - } - } - - if (reginfo->contextName != NULL) { - r->contextName = strdup(reginfo->contextName); - if (r->contextName == NULL) { - netsnmp_handler_registration_free(r); - return NULL; - } - } - - if (reginfo->rootoid != NULL) { - r->rootoid = - snmp_duplicate_objid(reginfo->rootoid, reginfo->rootoid_len); - if (r->rootoid == NULL) { - netsnmp_handler_registration_free(r); - return NULL; - } - } + if (reginfo->contextName != NULL) { + r->contextName = strdup(reginfo->contextName); + if (r->contextName == NULL) + goto err; + } - r->handler = netsnmp_handler_dup(reginfo->handler); - if (r->handler == NULL) { - netsnmp_handler_registration_free(r); - return NULL; - } - return r; + if (reginfo->rootoid != NULL) { + /* + * + 1 to make the following code safe: + * reginfo->rootoid[reginfo->rootoid_len++] = 0; + * See also netsnmp_scalar_helper_handler(). + */ + r->rootoid = malloc((reginfo->rootoid_len + 1) * sizeof(oid)); + if (r->rootoid == NULL) + goto err; + memcpy(r->rootoid, reginfo->rootoid, + reginfo->rootoid_len * sizeof(oid)); } + r->handler = netsnmp_handler_dup(reginfo->handler); + if (r->handler == NULL) + goto err; + return r; + +err: + netsnmp_handler_registration_free(r); return NULL; } @@ -1183,7 +1198,7 @@ netsnmp_inject_handler_into_subtree(netsnmp_subtree *tp, const char *name, tptr->label_a, tptr->reginfo->handlerName)); netsnmp_inject_handler_before(tptr->reginfo, _clone_handler(handler), before_what); - } else { + } else if (tptr->reginfo != NULL) { for (mh = tptr->reginfo->handler; mh != NULL; mh = mh->next) { if (mh->handler_name && strcmp(mh->handler_name, name) == 0) { DEBUGMSGTL(("injectHandler", "injecting handler into %s\n", diff --git a/agent/agent_index.c b/agent/agent_index.c index 0129217..7d77f36 100644 --- a/agent/agent_index.c +++ b/agent/agent_index.c @@ -10,26 +10,26 @@ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -39,6 +39,7 @@ #include #include "snmpd.h" +#include "agent_global_vars.h" #include "mibgroup/struct.h" #include #include @@ -48,9 +49,9 @@ #include "agentx/client.h" #endif -netsnmp_feature_child_of(agent_index_all, libnetsnmpagent) +netsnmp_feature_child_of(agent_index_all, libnetsnmpagent); -netsnmp_feature_child_of(remove_index, agent_index_all) +netsnmp_feature_child_of(remove_index, agent_index_all); /* * Initial support for index allocation @@ -65,8 +66,6 @@ struct snmp_index { struct snmp_index *next_idx; } *snmp_index_head = NULL; -extern netsnmp_session *main_session; - /* * The caller is responsible for free()ing the memory returned by * this function. @@ -455,7 +454,7 @@ register_index(netsnmp_variable_list * varbind, int flags, * Release an allocated index, * to allow it to be used elsewhere */ -netsnmp_feature_child_of(release_index,netsnmp_unused) +netsnmp_feature_child_of(release_index,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_RELEASE_INDEX int release_index(netsnmp_variable_list * varbind) @@ -598,7 +597,7 @@ unregister_index(netsnmp_variable_list * varbind, int remember, return SNMP_ERR_NOERROR; } -netsnmp_feature_child_of(unregister_indexes,netsnmp_unused) +netsnmp_feature_child_of(unregister_indexes,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_UNREGISTER_INDEXES int unregister_string_index(oid * name, size_t name_len, char *cp) @@ -705,7 +704,7 @@ dump_idx_registry(void) } } -netsnmp_feature_child_of(count_indexes, netsnmp_unused) +netsnmp_feature_child_of(count_indexes, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_UNUSED unsigned long count_indexes(oid * name, size_t namelen, int include_unallocated) diff --git a/agent/agent_read_config.c b/agent/agent_read_config.c index f9ef1af..69d7d3a 100644 --- a/agent/agent_read_config.c +++ b/agent/agent_read_config.c @@ -1,19 +1,24 @@ /* * agent_read_config.c + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -22,36 +27,36 @@ #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETINET_IP6_H +#ifdef HAVE_NETINET_IP6_H #include #endif #endif -#if HAVE_SYS_QUEUE_H +#ifdef HAVE_SYS_QUEUE_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #ifndef dynix #include #else @@ -59,31 +64,31 @@ #endif #endif #endif -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H # ifdef sysv5UnixWare7 # define _KMEMUSER 1 /* needs this for queue_t */ # endif #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H +#ifdef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H #include #endif #endif -#if HAVE_NETINET_IN_PCB_H +#ifdef HAVE_NETINET_IN_PCB_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_PWD_H @@ -107,13 +112,38 @@ #include "agent_module_includes.h" #include "mib_module_includes.h" -netsnmp_feature_child_of(agent_read_config_all, libnetsnmpagent) +netsnmp_feature_child_of(agent_read_config_all, libnetsnmpagent); + +netsnmp_feature_child_of(snmpd_unregister_config_handler, agent_read_config_all); + +void netsnmp_set_agent_user_id(int uid) +{ + static int agent_user_id = -1; + + if (agent_user_id != -1 && uid != agent_user_id) { + snmp_log(LOG_ERR, "User ID has already been set -- can not change\n"); + return; + } + agent_user_id = uid; + netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_USERID, uid); +} -netsnmp_feature_child_of(snmpd_unregister_config_handler, agent_read_config_all) +void netsnmp_set_agent_group_id(int gid) +{ + static int agent_group_id = -1; + + if (agent_group_id != -1 && gid != agent_group_id) { + snmp_log(LOG_ERR, "Group ID has already been set -- can not change\n"); + return; + } + agent_group_id = gid; + netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_GROUPID, + gid); +} #ifdef HAVE_UNISTD_H void -snmpd_set_agent_user(const char *token, char *cptr) +netsnmp_parse_agent_user(const char *token, char *cptr) { if (cptr[0] == '#') { char *ecp; @@ -123,8 +153,7 @@ snmpd_set_agent_user(const char *token, char *cptr) if (*ecp != 0) { config_perror("Bad number"); } else { - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID, uid); + netsnmp_set_agent_user_id(uid); } #if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) } else { @@ -132,8 +161,7 @@ snmpd_set_agent_user(const char *token, char *cptr) info = getpwnam(cptr); if (info) - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID, info->pw_uid); + netsnmp_set_agent_user_id(info->pw_uid); else config_perror("User not found in passwd database"); endpwent(); @@ -142,7 +170,7 @@ snmpd_set_agent_user(const char *token, char *cptr) } void -snmpd_set_agent_group(const char *token, char *cptr) +netsnmp_parse_agent_group(const char *token, char *cptr) { if (cptr[0] == '#') { char *ecp; @@ -151,8 +179,7 @@ snmpd_set_agent_group(const char *token, char *cptr) if (*ecp != 0) { config_perror("Bad number"); } else { - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID, gid); + netsnmp_set_agent_group_id(gid); } #if defined(HAVE_GETGRNAM) && defined(HAVE_GRP_H) } else { @@ -160,8 +187,7 @@ snmpd_set_agent_group(const char *token, char *cptr) info = getgrnam(cptr); if (info) - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID, info->gr_gid); + netsnmp_set_agent_group_id(info->gr_gid); else config_perror("Group not found in group database"); endgrent(); @@ -188,7 +214,6 @@ snmpd_set_agent_address(const char *token, char *cptr) * append to the older specification string */ snprintf(buf, sizeof(buf), "%s,%s", ptr, cptr); - buf[sizeof(buf) - 1] = '\0'; } else { strlcpy(buf, cptr, sizeof(buf)); } @@ -223,22 +248,22 @@ init_agent_read_config(const char *app) register_app_config_handler("trapsink", snmpd_parse_config_trapsink, snmpd_free_trapsinks, - "host [community] [port]"); + "[-profile p] [-name n] [-tag t] host [community] [port]"); #endif #ifndef NETSNMP_DISABLE_SNMPV2C register_app_config_handler("trap2sink", snmpd_parse_config_trap2sink, snmpd_free_trapsinks, - "host [community] [port]"); + "[-profile p] [-name n] [-tag t] host [community] [port]"); register_app_config_handler("informsink", snmpd_parse_config_informsink, snmpd_free_trapsinks, - "host [community] [port]"); + "[-profile p] [-name n] [-tag t] host [community] [port]"); #endif register_app_config_handler("trapsess", snmpd_parse_config_trapsess, snmpd_free_trapsinks, - "[snmpcmdargs] host"); + "[-profile p] [-name n] [-tag t] [snmpcmdargs] host"); } #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) register_app_config_handler("trapcommunity", @@ -251,9 +276,9 @@ init_agent_read_config(const char *app) NETSNMP_DS_AGENT_TRAP_ADDR); #ifdef HAVE_UNISTD_H register_app_config_handler("agentuser", - snmpd_set_agent_user, NULL, "userid"); + netsnmp_parse_agent_user, NULL, "userid"); register_app_config_handler("agentgroup", - snmpd_set_agent_group, NULL, "groupid"); + netsnmp_parse_agent_group, NULL, "groupid"); #endif #ifndef NETSNMP_NO_LISTEN_SUPPORT register_app_config_handler("agentaddress", @@ -275,6 +300,18 @@ init_agent_read_config(const char *app) netsnmp_ds_register_config(ASN_INTEGER, app, "maxGetbulkResponses", NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES); + netsnmp_ds_register_config(ASN_INTEGER, app, "avgBulkVarbindSize", + NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_AVG_BULKVARBINDSIZE); +#ifndef NETSNMP_NO_PDU_STATS + netsnmp_ds_register_config(ASN_INTEGER, app, "pduStatsMax", + NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_PDU_STATS_MAX); + netsnmp_ds_register_config(ASN_INTEGER, app, "pduStatsThreshold", + NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_PDU_STATS_THRESHOLD); +#endif /* NETSNMP_NO_PDU_STATS */ + netsnmp_init_handler_conf(); #include "agent_module_dot_conf.h" @@ -316,7 +353,7 @@ snmpd_register_const_config_handler(const char *token, } #ifdef NETSNMP_FEATURE_REQUIRE_SNMPD_UNREGISTER_CONFIG_HANDLER -netsnmp_feature_require(unregister_app_config_handler) +netsnmp_feature_require(unregister_app_config_handler); #endif /* NETSNMP_FEATURE_REQUIRE_SNMPD_UNREGISTER_CONFIG_HANDLER */ #ifndef NETSNMP_FEATURE_REMOVE_SNMPD_UNREGISTER_CONFIG_HANDLER diff --git a/agent/agent_registry.c b/agent/agent_registry.c index 0dd6c42..7e67543 100644 --- a/agent/agent_registry.c +++ b/agent/agent_registry.c @@ -10,6 +10,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup agent_registry Registry of MIB subtrees, modules, sessions, etc * Maintain a registry of MIB subtrees, together with related information @@ -25,26 +30,26 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -54,11 +59,13 @@ #include #include "snmpd.h" +#include "agent_global_vars.h" #include "mibgroup/struct.h" #include #include #include #include +#include #include #ifdef USING_AGENTX_SUBAGENT_MODULE @@ -66,9 +73,9 @@ #include "agentx/client.h" #endif -netsnmp_feature_child_of(agent_registry_all, libnetsnmpagent) +netsnmp_feature_child_of(agent_registry_all, libnetsnmpagent); -netsnmp_feature_child_of(unregister_mib_table_row, agent_registry_all) +netsnmp_feature_child_of(unregister_mib_table_row, agent_registry_all); /** @defgroup agent_lookup_cache Lookup cache, storing the registered OIDs. * Maintain the cache used for locating sub-trees and OIDs. @@ -554,7 +561,7 @@ netsnmp_subtree_change_prev(netsnmp_subtree *ptr, netsnmp_subtree *theprev) &ptr->oid_off); } -netsnmp_feature_child_of(netsnmp_subtree_compare,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_subtree_compare,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_SUBTREE_COMPARE /** Compares OIDs of given subtrees. * @@ -793,12 +800,12 @@ netsnmp_subtree_load(netsnmp_subtree *new_sub, const char *context_name) /* Handle new subtrees that start in virgin territory. */ if (tree1 == NULL) { - netsnmp_subtree *new2 = NULL; + /*netsnmp_subtree *new2 = NULL;*/ /* Is there any overlap with later subtrees? */ if (tree2 && snmp_oid_compare(new_sub->end_a, new_sub->end_len, tree2->start_a, tree2->start_len) > 0) { - new2 = netsnmp_subtree_split(new_sub, - tree2->start_a, tree2->start_len); + /*new2 =*/ + netsnmp_subtree_split(new_sub, tree2->start_a, tree2->start_len); } /* Link the new subtree (less any overlapping region) with the list of @@ -820,11 +827,15 @@ netsnmp_subtree_load(netsnmp_subtree *new_sub, const char *context_name) netsnmp_subtree_change_next(new_sub, tree2); +#if 0 + /* The code below cannot be reached which is why it has been + surrounded with #if 0 / #endif. */ /* If there was any overlap, recurse to merge in the overlapping region (including anything that may follow the overlap). */ if (new2) { return netsnmp_subtree_load(new2, context_name); } +#endif } } else { /* If the new subtree starts *within* an existing registration @@ -1253,7 +1264,6 @@ netsnmp_register_mib(const char *moduleName, */ if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE) != MASTER_AGENT) { - extern struct snmp_session *main_session; if (main_session == NULL) { register_mib_detach_node(subtree); } @@ -1268,7 +1278,6 @@ netsnmp_register_mib(const char *moduleName, reg_parms.range_ubound = range_ubound; reg_parms.timeout = timeout; reg_parms.flags = (u_char) flags; - reg_parms.contextName = context; reg_parms.session = ss; reg_parms.reginfo = reginfo; reg_parms.contextName = context; @@ -2059,11 +2068,13 @@ in_a_view(oid *name, size_t *namelen, netsnmp_pdu *pdu, int type) #ifndef NETSNMP_DISABLE_SNMPV2C case SNMP_VERSION_2c: #endif - case SNMP_VERSION_3: + case SNMP_VERSION_3: + NETSNMP_RUNTIME_PROTOCOL_CHECK(pdu->version,unsupported_version); snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_ACM_CHECK, &view_parms); return view_parms.errorcode; } + unsupported_version: return VACM_NOSECNAME; } @@ -2100,10 +2111,12 @@ check_access(netsnmp_pdu *pdu) case SNMP_VERSION_2c: #endif case SNMP_VERSION_3: + NETSNMP_RUNTIME_PROTOCOL_CHECK(pdu->version,unsupported_version); snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_ACM_CHECK_INITIAL, &view_parms); return view_parms.errorcode; } + unsupported_version: return 1; } @@ -2144,14 +2157,16 @@ netsnmp_acm_check_subtree(netsnmp_pdu *pdu, oid *name, size_t namelen) case SNMP_VERSION_2c: #endif case SNMP_VERSION_3: + NETSNMP_RUNTIME_PROTOCOL_CHECK(pdu->version,unsupported_version); snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_ACM_CHECK_SUBTREE, &view_parms); return view_parms.errorcode; } + unsupported_version: return 1; } -netsnmp_feature_child_of(get_session_for_oid,netsnmp_unused) +netsnmp_feature_child_of(get_session_for_oid,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_GET_SESSION_FOR_OID netsnmp_session * get_session_for_oid(const oid *name, size_t len, const char *context_name) @@ -2232,7 +2247,6 @@ shutdown_tree(void) { } -extern void dump_idx_registry(void); void dump_registry(void) { @@ -2319,7 +2333,7 @@ dump_registry(void) /* End of MIB registration code */ -netsnmp_feature_child_of(register_signal, netsnmp_unused) +netsnmp_feature_child_of(register_signal, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_SIGNAL /** @defgroup agent_signals POSIX signals support for agents. diff --git a/agent/agent_sysORTable.c b/agent/agent_sysORTable.c index f628060..b11037a 100644 --- a/agent/agent_sysORTable.c +++ b/agent/agent_sysORTable.c @@ -1,8 +1,8 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/agent/agent_trap.c b/agent/agent_trap.c index 080b8bf..c856625 100644 --- a/agent/agent_trap.c +++ b/agent/agent_trap.c @@ -10,6 +10,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup agent_trap Trap generation routines for mib modules to use * @ingroup agent @@ -20,34 +25,34 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include @@ -57,6 +62,7 @@ #include #include #include +#include "agent_global_vars.h" #include #include @@ -65,13 +71,17 @@ #include "agentx/protocol.h" #endif -netsnmp_feature_child_of(agent_trap_all, libnetsnmpagent) +#ifdef USING_NOTIFICATION_SNMPNOTIFYTABLE_DATA_MODULE +#include "mibgroup/notification/snmpNotifyTable_data.h" +#endif + +netsnmp_feature_child_of(agent_trap_all, libnetsnmpagent); -netsnmp_feature_child_of(trap_vars_with_context, agent_trap_all) -netsnmp_feature_child_of(remove_trap_session, agent_trap_all) +netsnmp_feature_child_of(trap_vars_with_context, agent_trap_all); +netsnmp_feature_child_of(remove_trap_session, agent_trap_all); -netsnmp_feature_child_of(send_v3trap,netsnmp_unused) -netsnmp_feature_child_of(send_trap_pdu,netsnmp_unused) +netsnmp_feature_child_of(send_v3trap,netsnmp_unused); +netsnmp_feature_child_of(send_trap_pdu,netsnmp_unused); struct trap_sink { netsnmp_session *sesp; @@ -119,9 +129,6 @@ int snmp_enableauthentrapsset = 0; * Prototypes */ /* - * static int create_v1_trap_session (const char *, u_short, const char *); - * static int create_v2_trap_session (const char *, u_short, const char *); - * static int create_v2_inform_session (const char *, u_short, const char *); * static void free_trap_session (struct trap_sink *sp); * static void send_v1_trap (netsnmp_session *, int, int); * static void send_v2_trap (netsnmp_session *, int, int, int); @@ -147,10 +154,44 @@ free_trap_session(struct trap_sink *sp) free(sp); } +#ifndef NETSNMP_NO_TRAP_STATS +static void +_dump_trap_stats(netsnmp_session *sess) +{ + if (NULL == sess || NULL == sess->trap_stats) + return; + + DEBUGIF("stats:notif") { + DEBUGMSGT_NC(("stats:notif", "%s inform stats\n", sess->paramName)); + DEBUGMSGT_NC(("stats:notif", " %ld sends, last @ %ld\n", + sess->trap_stats->sent_count, + sess->trap_stats->sent_last_sent)); + DEBUGMSGT_NC(("stats:notif", " %ld acks, last @ %ld\n", + sess->trap_stats->ack_count, + sess->trap_stats->ack_last_rcvd)); + DEBUGMSGT_NC(("stats:notif", " %ld failed sends, last @ %ld\n", + sess->trap_stats->sent_fail_count, + sess->trap_stats->sent_last_fail)); + DEBUGMSGT_NC(("stats:notif", " %ld timeouts, last @ %ld\n", + sess->trap_stats->timeouts, + sess->trap_stats->sent_last_timeout)); + DEBUGMSGT_NC(("stats:notif", " %ld v3 errs, last @ %ld\n", + sess->trap_stats->sec_err_count, + sess->trap_stats->sec_err_last)); + } +} +#endif /* NETSNMP_NO_TRAP_STATS */ + int -add_trap_session(netsnmp_session * ss, int pdutype, int confirm, - int version) +netsnmp_add_notification_session(netsnmp_session * ss, int pdutype, + int confirm, int version, const char *name, + const char *tag, const char* profile) { + if (NETSNMP_RUNTIME_PROTOCOL_SKIP(version)) { + DEBUGMSGTL(("trap", "skipping trap sink (version 0x%02x disabled)\n", + version)); + return 0; + } if (snmp_callback_available(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_NOTIFICATIONS) == SNMPERR_SUCCESS) { @@ -161,9 +202,17 @@ add_trap_session(netsnmp_session * ss, int pdutype, int confirm, DEBUGMSGTL(("trap", "adding callback trap sink (%p)\n", ss)); args.ss = ss; args.confirm = confirm; + args.nameData = name; + args.nameLen = (NULL == name) ? 0 : strlen(name); + args.tagData = tag; + args.tagLen = (NULL == tag) ? 0 : strlen(tag); + args.profileData = profile; + args.profileLen = (NULL == profile) ? 0: strlen(profile); snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, (void *) &args); + if (args.rc != SNMPERR_SUCCESS) + return 0; } else { /* * no other support exists, handle it ourselves. @@ -181,9 +230,44 @@ add_trap_session(netsnmp_session * ss, int pdutype, int confirm, new_sink->next = sinks; sinks = new_sink; } + return 1; } +/* + * xxx needs update to support embedded NUL. + * xxx should probably also be using and unregister callback, similar to + * how registaration is done. + */ +void +netsnmp_unregister_notification(const char *name, u_char len) +{ + if (snmp_callback_available(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_UNREGISTER_NOTIFICATIONS) == + SNMPERR_SUCCESS) { + /* + * something else wants to handle notification registrations + */ + struct agent_add_trap_args args; + DEBUGMSGTL(("trap", "removing callback trap sink\n")); + args.nameData = name; + args.nameLen = len; + snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_UNREGISTER_NOTIFICATIONS, + (void *) &args); + } else + NETSNMP_LOGONCE((LOG_WARNING, + "netsnmp_unregister_notification not supported\n")); +} + +int +add_trap_session(netsnmp_session * ss, int pdutype, int confirm, + int version) +{ + return netsnmp_add_notification_session(ss, pdutype, confirm, version, + NULL, NULL, NULL); +} + #ifndef NETSNMP_FEATURE_REMOVE_REMOVE_TRAP_SESSION int remove_trap_session(netsnmp_session * ss) @@ -220,17 +304,31 @@ remove_trap_session(netsnmp_session * ss) #endif /* NETSNMP_FEATURE_REMOVE_REMOVE_TRAP_SESSION */ #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) -static int -create_trap_session2(const char *sink, const char* sinkport, - char *com, int version, int pdutype) +netsnmp_session * +netsnmp_create_v1v2_notification_session(const char *sink, const char* sinkport, + const char *com, const char *src, + int version, int pdutype, + const char *name, const char *tag, + const char* profile) { netsnmp_transport *t; netsnmp_session session, *sesp; + netsnmp_tdomain_spec tspec; + char tmp[SPRINT_MAX_LEN]; + int rc; + const char *client_addr = NULL; + + if (NETSNMP_RUNTIME_PROTOCOL_SKIP(version)) { + config_perror("SNMP version disabled"); + DEBUGMSGTL(("trap", "skipping trap sink (version 0x%02x disabled)\n", + version)); + return NULL; + } - memset(&session, 0, sizeof(netsnmp_session)); + snmp_sess_init(&session); session.version = version; if (com) { - session.community = (u_char *) com; + session.community = (u_char *) NETSNMP_REMOVE_CONST(char *, com); session.community_len = strlen(com); } @@ -242,34 +340,77 @@ create_trap_session2(const char *sink, const char* sinkport, session.retries = SNMP_DEFAULT_RETRIES; } + memset(&tspec, 0, sizeof(netsnmp_tdomain_spec)); + /* + * use specified soure or client addr, if available. If no, and * if the sink is localhost, bind to localhost, to reduce open ports. */ - if ((NULL == netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_CLIENT_ADDR)) && - ((0 == strcmp("localhost",sink)) || (0 == strcmp("127.0.0.1",sink)))) - session.localname = strdup("localhost"); - - t = netsnmp_tdomain_transport_full("snmptrap", sink, 0, NULL, sinkport); - if (t != NULL) { - sesp = snmp_add(&session, t, NULL, NULL); - - if (sesp) { - return add_trap_session(sesp, pdutype, - (pdutype == SNMP_MSG_INFORM), version); - } + if (NULL != src) + tspec.source = src; + else { + client_addr = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR); + if ((NULL == client_addr) && + ((0 == strcmp("localhost",sink)) || + (0 == strcmp("127.0.0.1",sink)))) + client_addr = "localhost"; + tspec.source = client_addr; } - /* - * diagnose snmp_open errors with the input netsnmp_session pointer - */ - snmp_sess_perror("snmpd: create_trap_session", &session); - return 0; + session.localname = NETSNMP_REMOVE_CONST(char *,tspec.source); + + tspec.application = "snmptrap"; + if (NULL == sinkport) + tspec.target = sink; + else { + snprintf(tmp, sizeof(tmp)-1,"%s:%s", sink, sinkport); + tspec.target = tmp; + } + tspec.default_domain = NULL; + tspec.default_target = sinkport; + t = netsnmp_tdomain_transport_tspec(&tspec); + if ((NULL == t) || + ((sesp = snmp_add(&session, t, NULL, NULL)) == NULL)) { + /** diagnose snmp_open errors with the input netsnmp_session pointer */ + snmp_sess_perror("snmpd: netsnmp_create_notification_session", + &session); + /* transport freed by snmp_add */ + return NULL; + } + + rc = netsnmp_add_notification_session(sesp, pdutype, + (pdutype == SNMP_MSG_INFORM), + version, name, tag, profile); + if (0 == rc) + return NULL; + + return sesp; +} + +int +create_trap_session_with_src(const char *sink, const char* sinkport, + const char *com, const char *src, int version, + int pdutype) +{ + void *ss = netsnmp_create_v1v2_notification_session(sink, sinkport, com, + src, version, pdutype, + NULL, NULL, NULL); + return (ss != NULL); +} + +int +create_trap_session2(const char *sink, const char* sinkport, + char *com, int version, int pdutype) +{ + return create_trap_session_with_src(sink, sinkport, com, NULL, version, + pdutype); } int create_trap_session(char *sink, u_short sinkport, char *com, int version, int pdutype) { + void *ss; char buf[sizeof(sinkport) * 3 + 2]; if (sinkport != 0) { sprintf(buf, ":%hu", sinkport); @@ -277,37 +418,14 @@ create_trap_session(char *sink, u_short sinkport, "Using a separate port number is deprecated, please correct " "the sink specification instead"); } - return create_trap_session2(sink, sinkport ? buf : NULL, com, version, - pdutype); + ss = netsnmp_create_v1v2_notification_session(sink, sinkport ? buf : NULL, + com, NULL, version, pdutype, + NULL, NULL, NULL); + return (ss != NULL); } #endif /* support for community based SNMP */ -#ifndef NETSNMP_DISABLE_SNMPV1 -static int -create_v1_trap_session(char *sink, const char *sinkport, char *com) -{ - return create_trap_session2(sink, sinkport, com, - SNMP_VERSION_1, SNMP_MSG_TRAP); -} -#endif - -#ifndef NETSNMP_DISABLE_SNMPV2C -static int -create_v2_trap_session(const char *sink, const char *sinkport, char *com) -{ - return create_trap_session2(sink, sinkport, com, - SNMP_VERSION_2c, SNMP_MSG_TRAP2); -} - -static int -create_v2_inform_session(const char *sink, const char *sinkport, char *com) -{ - return create_trap_session2(sink, sinkport, com, - SNMP_VERSION_2c, SNMP_MSG_INFORM); -} -#endif - void snmpd_free_trapsinks(void) { @@ -461,6 +579,32 @@ convert_v2pdu_to_v1( netsnmp_pdu* template_v2pdu ) return template_v1pdu; } +/* + * Set t_oid from the PDU enterprise & specific trap fields. + */ +int +netsnmp_build_trap_oid(netsnmp_pdu *pdu, oid *t_oid, size_t *t_oid_len) +{ + if (NULL == pdu || NULL == t_oid || NULL == t_oid_len) + return SNMPERR_GENERR; + if (pdu->trap_type == SNMP_TRAP_ENTERPRISESPECIFIC) { + if (*t_oid_len < (pdu->enterprise_length + 2)) + return SNMPERR_LONG_OID; + memcpy(t_oid, pdu->enterprise, pdu->enterprise_length*sizeof(oid)); + *t_oid_len = pdu->enterprise_length; + t_oid[(*t_oid_len)++] = 0; + t_oid[(*t_oid_len)++] = pdu->specific_type; + } else { + /** use cold_start_oid as template */ + if (*t_oid_len < OID_LENGTH(cold_start_oid)) + return SNMPERR_LONG_OID; + memcpy(t_oid, cold_start_oid, sizeof(cold_start_oid)); + t_oid[9] = pdu->trap_type + 1; /* set actual trap type */ + *t_oid_len = OID_LENGTH(cold_start_oid); + } + return SNMPERR_SUCCESS; +} + netsnmp_pdu* convert_v1pdu_to_v2( netsnmp_pdu* template_v1pdu ) { @@ -487,20 +631,11 @@ convert_v1pdu_to_v2( netsnmp_pdu* template_v1pdu ) * either using one of the standard defined trap OIDs, * or constructing this from the PDU enterprise & specific trap fields */ - if (template_v1pdu->trap_type == SNMP_TRAP_ENTERPRISESPECIFIC) { - memcpy(enterprise, template_v1pdu->enterprise, - template_v1pdu->enterprise_length*sizeof(oid)); - enterprise_len = template_v1pdu->enterprise_length; - enterprise[enterprise_len++] = 0; - enterprise[enterprise_len++] = template_v1pdu->specific_type; - } else { - memcpy(enterprise, cold_start_oid, sizeof(cold_start_oid)); - enterprise[9] = template_v1pdu->trap_type+1; - enterprise_len = sizeof(cold_start_oid)/sizeof(oid); - } - var = NULL; - if (!snmp_varlist_add_variable( &var, + enterprise_len = OID_LENGTH(enterprise); + if ((netsnmp_build_trap_oid(template_v1pdu, enterprise, &enterprise_len) + != SNMPERR_SUCCESS) || + !snmp_varlist_add_variable( &var, snmptrap_oid, snmptrap_oid_len, ASN_OBJECT_ID, (u_char*)enterprise, enterprise_len*sizeof(oid))) { @@ -819,22 +954,23 @@ netsnmp_send_traps(int trap, int specific, for (sink = sinks; sink; sink = sink->next) { #ifndef NETSNMP_DISABLE_SNMPV1 if (sink->version == SNMP_VERSION_1) { - if (template_v1pdu) { - send_trap_to_sess(sink->sesp, template_v1pdu); - } - } else { + if (template_v1pdu && + !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V1)) { + send_trap_to_sess(sink->sesp, template_v1pdu); + } + } else #endif - if (template_v2pdu) { + if (template_v2pdu) { template_v2pdu->command = sink->pdutype; send_trap_to_sess(sink->sesp, template_v2pdu); - } -#ifndef NETSNMP_DISABLE_SNMPV1 } -#endif } +#ifndef NETSNMP_DISABLE_SNMPV1 if (template_v1pdu) snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP1, template_v1pdu); +#endif if (template_v2pdu) snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP2, template_v2pdu); @@ -856,6 +992,58 @@ send_enterprise_trap_vars(int trap, return; } +/** + * Handles stats for basic traps (really just send failed +*/ +int +handle_trap_callback(int op, netsnmp_session * session, int reqid, + netsnmp_pdu *pdu, void *magic) +{ + if (NULL == session) + return 0; + + DEBUGMSGTL(("trap", "handle_trap_callback for session %s\n", + session->paramName ? session->paramName : "UNKNOWN")); + switch (op) { + + case NETSNMP_CALLBACK_OP_SEND_FAILED: + DEBUGMSGTL(("trap", "failed to send an inform for reqid=%d\n", reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) { + session->trap_stats->sent_last_fail = netsnmp_get_agent_uptime(); + ++session->trap_stats->sent_fail_count; + } +#endif /* NETSNMP_NO_TRAP_STATS */ + break; + + case NETSNMP_CALLBACK_OP_SEC_ERROR: + DEBUGMSGTL(("trap", "sec error sending a trap for reqid=%d\n", + reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) { + session->trap_stats->sec_err_last = netsnmp_get_agent_uptime(); + ++session->trap_stats->sec_err_count; + } +#endif /* NETSNMP_NO_TRAP_STATS */ + break; + + case NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE: + case NETSNMP_CALLBACK_OP_TIMED_OUT: + case NETSNMP_CALLBACK_OP_RESEND: + default: + DEBUGMSGTL(("trap", + "received op=%d for reqid=%d when trying to send a trap\n", + op, reqid)); + } +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) + _dump_trap_stats(session); +#endif /* NETSNMP_NO_TRAP_STATS */ + + return 1; +} + + /** * Captures responses or the lack there of from INFORMs that were sent * 1) a response is received from an INFORM @@ -866,31 +1054,91 @@ handle_inform_response(int op, netsnmp_session * session, int reqid, netsnmp_pdu *pdu, void *magic) { - /* XXX: possibly stats update */ + if (NULL == session) + return 0; + + DEBUGMSGTL(("trap", "handle_inform_response for session %s\n", + session->paramName ? session->paramName : "UNKNOWN")); switch (op) { case NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE: snmp_increment_statistic(STAT_SNMPINPKTS); - DEBUGMSGTL(("trap", "received the inform response for reqid=%d\n", + if (pdu->command != SNMP_MSG_REPORT) { + DEBUGMSGTL(("trap", "received the inform response for reqid=%d\n", + reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) { + ++session->trap_stats->ack_count; + session->trap_stats->ack_last_rcvd = netsnmp_get_agent_uptime(); + } +#endif /* NETSNMP_NO_TRAP_STATS */ + break; + } else { + int type = session->s_snmp_errno ? session->s_snmp_errno : + snmpv3_get_report_type(pdu); + DEBUGMSGTL(("trap", "received report %d for inform reqid=%d\n", + type, reqid)); + /* + * xxx-rks: what stats, if any, to bump for other report types? + * - ignore NOT_IN_TIME, as agent will sync and retry. + */ + if (SNMPERR_AUTHENTICATION_FAILURE != type) + break; + } + /** AUTH failures fall through to sec error */ + /* FALL THROUGH */ + + case NETSNMP_CALLBACK_OP_SEC_ERROR: + DEBUGMSGTL(("trap", "sec error sending an inform for reqid=%d\n", reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) { + session->trap_stats->sec_err_last = netsnmp_get_agent_uptime(); + ++session->trap_stats->sec_err_count; + } +#endif /* NETSNMP_NO_TRAP_STATS */ break; case NETSNMP_CALLBACK_OP_TIMED_OUT: DEBUGMSGTL(("trap", "received a timeout sending an inform for reqid=%d\n", reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) { + ++session->trap_stats->timeouts; + session->trap_stats->sent_last_timeout = + netsnmp_get_agent_uptime(); + } +#endif /* NETSNMP_NO_TRAP_STATS */ + break; + + case NETSNMP_CALLBACK_OP_RESEND: + DEBUGMSGTL(("trap", "resending an inform for reqid=%d\n", reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) + session->trap_stats->sent_last_sent = netsnmp_get_agent_uptime(); +#endif /* NETSNMP_NO_TRAP_STATS */ break; case NETSNMP_CALLBACK_OP_SEND_FAILED: - DEBUGMSGTL(("trap", - "failed to send an inform for reqid=%d\n", - reqid)); + DEBUGMSGTL(("trap", "failed to send an inform for reqid=%d\n", reqid)); +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) { + session->trap_stats->sent_last_fail = netsnmp_get_agent_uptime(); + ++session->trap_stats->sent_fail_count; + } +#endif /* NETSNMP_NO_TRAP_STATS */ break; default: DEBUGMSGTL(("trap", "received op=%d for reqid=%d when trying to send an inform\n", op, reqid)); } +#ifndef NETSNMP_NO_TRAP_STATS + if (session->trap_stats) + _dump_trap_stats(session); +#endif /* NETSNMP_NO_TRAP_STATS */ + return 1; } @@ -908,8 +1156,24 @@ send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu *template_pdu) if (!sess || !template_pdu) return; - DEBUGMSGTL(("trap", "sending trap type=%d, version=%ld\n", - template_pdu->command, sess->version)); + if (NETSNMP_RUNTIME_PROTOCOL_SKIP(sess->version)) { + DEBUGMSGTL(("trap", "not sending trap type=%d, version %02lx disabled\n", + template_pdu->command, sess->version)); + return; + } + DEBUGIF("trap") { + struct session_list *sessp = snmp_sess_pointer(sess); + netsnmp_transport *t = sessp->transport; + const void *dst = template_pdu->transport_data; + const int dst_len = template_pdu->transport_data_length; + char *peer = NULL; + + if (t && t->f_fmtaddr) + peer = t->f_fmtaddr(t, dst, dst_len); + DEBUGMSGTL(("trap", "sending trap type=%d, version=%ld to %s\n", + template_pdu->command, sess->version, peer ? peer : "(?)")); + free(peer); + } #ifndef NETSNMP_DISABLE_SNMPV1 if (sess->version == SNMP_VERSION_1 && @@ -921,7 +1185,36 @@ send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu *template_pdu) #endif template_pdu->version = sess->version; pdu = snmp_clone_pdu(template_pdu); + if(!pdu) { + snmp_log(LOG_WARNING, "send_trap: failed to clone PDU\n"); + return; + } + pdu->sessid = sess->sessid; /* AgentX only ? */ + /* + * RFC 3414 sayeth: + * + * - If an SNMP engine uses a msgID for correlating Response messages to + * outstanding Request messages, then it MUST use different msgIDs in + * all such Request messages that it sends out during a Time Window + * (150 seconds) period. + * + * A Command Generator or Notification Originator Application MUST use + * different request-ids in all Request PDUs that it sends out during + * a TimeWindow (150 seconds) period. + */ + pdu->reqid = snmp_get_next_reqid(); + pdu->msgid = snmp_get_next_msgid(); + +#ifndef NETSNMP_NO_TRAP_STATS + /** allocate space for trap stats */ + if (NULL == sess->trap_stats) { + sess->trap_stats = SNMP_MALLOC_TYPEDEF(netsnmp_trap_stats); + if (NULL == sess->trap_stats) + snmp_log(LOG_ERR, "malloc for %s trap stats failed\n", + sess->paramName ? sess->paramName : "UNKNOWN"); + } +#endif /* NETSNMP_NO_TRAP_STATS */ if ( template_pdu->command == SNMP_MSG_INFORM #ifdef USING_AGENTX_PROTOCOL_MODULE @@ -930,7 +1223,6 @@ send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu *template_pdu) ) { result = snmp_async_send(sess, pdu, &handle_inform_response, NULL); - } else { if ((sess->version == SNMP_VERSION_3) && (pdu->command == SNMP_MSG_TRAP2) && @@ -942,15 +1234,23 @@ send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu *template_pdu) pdu->securityEngineIDLen = len; } - result = snmp_send(sess, pdu); + result = snmp_async_send(sess, pdu, &handle_trap_callback, NULL); } if (result == 0) { snmp_sess_perror("snmpd: send_trap", sess); snmp_free_pdu(pdu); + /** trap stats for failure handled in callback */ } else { snmp_increment_statistic(STAT_SNMPOUTTRAPS); snmp_increment_statistic(STAT_SNMPOUTPKTS); +#ifndef NETSNMP_NO_TRAP_STATS + if (sess->trap_stats) { + sess->trap_stats->sent_last_sent = netsnmp_get_agent_uptime(); + ++sess->trap_stats->sent_count; + _dump_trap_stats(sess); + } +#endif /* NETSNMP_NO_TRAP_STATS */ } } @@ -1125,62 +1425,70 @@ snmpd_parse_config_authtrap(const char *token, char *cptr) } } -#ifndef NETSNMP_DISABLE_SNMPV1 -void -snmpd_parse_config_trapsink(const char *token, char *cptr) +#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) +static void +_parse_config_sink(const char *token, char *cptr, int version, int type) { - char *sp, *cp, *pp = NULL; - char *st; + char *sp, *cp, *pp = NULL, *src = NULL; + char *st, *name = NULL, *tag = NULL, *profile = NULL; + int done = 0; if (!snmp_trapcommunity) snmp_trapcommunity = strdup("public"); sp = strtok_r(cptr, " \t\n", &st); + /* + * check for optional arguments + */ + do { + if (*sp != '-') { + done = 1; + continue; + } + if (strcmp(sp, "-name") == 0) + name = strtok_r(NULL, " \t\n", &st); + else if (strcmp(sp, "-tag") == 0) + tag = strtok_r(NULL, " \t\n", &st); + else if (strcmp(sp, "-profile") == 0) + profile = strtok_r(NULL, " \t\n", &st); + else if (strcmp(sp, "-s") == 0) + src = strtok_r(NULL, " \t\n", &st); + else + netsnmp_config_warn("ignoring unknown argument: %s", sp); + sp = strtok_r(NULL, " \t\n", &st); + } while (!done); cp = strtok_r(NULL, " \t\n", &st); if (cp) pp = strtok_r(NULL, " \t\n", &st); if (pp) - config_pwarn("The separate port argument to trapsink is deprecated"); - if (create_v1_trap_session(sp, pp, cp ? cp : snmp_trapcommunity) == 0) { - netsnmp_config_error("cannot create trapsink: %s", cptr); + config_pwarn("The separate port argument for sinks is deprecated"); + if (netsnmp_create_v1v2_notification_session(sp, pp, + cp ? cp : snmp_trapcommunity, + src, version, type, name, tag, + profile) == NULL) { + netsnmp_config_error("cannot create sink: %s", cptr); } } #endif +#ifndef NETSNMP_DISABLE_SNMPV1 +void +snmpd_parse_config_trapsink(const char *token, char *cptr) +{ + _parse_config_sink(token, cptr, SNMP_VERSION_1, SNMP_MSG_TRAP); +} +#endif + #ifndef NETSNMP_DISABLE_SNMPV2C void snmpd_parse_config_trap2sink(const char *word, char *cptr) { - char *st, *sp, *cp, *pp = NULL; - - if (!snmp_trapcommunity) - snmp_trapcommunity = strdup("public"); - sp = strtok_r(cptr, " \t\n", &st); - cp = strtok_r(NULL, " \t\n", &st); - if (cp) - pp = strtok_r(NULL, " \t\n", &st); - if (pp) - config_pwarn("The separate port argument to trapsink2 is deprecated"); - if (create_v2_trap_session(sp, pp, cp ? cp : snmp_trapcommunity) == 0) { - netsnmp_config_error("cannot create trap2sink: %s", cptr); - } + _parse_config_sink(word, cptr, SNMP_VERSION_2c, SNMP_MSG_TRAP2); } void snmpd_parse_config_informsink(const char *word, char *cptr) { - char *st, *sp, *cp, *pp = NULL; - - if (!snmp_trapcommunity) - snmp_trapcommunity = strdup("public"); - sp = strtok_r(cptr, " \t\n", &st); - cp = strtok_r(NULL, " \t\n", &st); - if (cp) - pp = strtok_r(NULL, " \t\n", &st); - if (pp) - config_pwarn("The separate port argument to informsink is deprecated"); - if (create_v2_inform_session(sp, pp, cp ? cp : snmp_trapcommunity) == 0) { - netsnmp_config_error("cannot create informsink: %s", cptr); - } + _parse_config_sink(word, cptr, SNMP_VERSION_2c, SNMP_MSG_INFORM); } #endif @@ -1210,57 +1518,252 @@ trapOptProc(int argc, char *const *argv, int opt) } } +netsnmp_session * +netsnmp_create_v3user_notification_session(const char *dest, const char *user, + int level, const char *context, + int pdutype, const u_char *engineId, + size_t engineId_len, const char *src, + const char *notif_name, + const char *notif_tag, + const char* notif_profile) +{ + netsnmp_session session, *ss = NULL; + struct usmUser *usmUser; + netsnmp_tdomain_spec tspec; + netsnmp_transport *transport; + u_char tmp_engineId[SPRINT_MAX_LEN]; + int rc; + + if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V3)) { + netsnmp_config_error("SNMPv3 disabled, cannot create notification session"); + return NULL; + } + if (NULL == dest || NULL == user) + return NULL; + + /** authlevel */ + if ((SNMP_SEC_LEVEL_AUTHPRIV != level) && + (SNMP_SEC_LEVEL_AUTHNOPRIV != level) && + (SNMP_SEC_LEVEL_NOAUTH != level)) { + DEBUGMSGTL(("trap:v3user_notif_sess", "bad level %d\n", level)); + return NULL; + } + + /** need engineId to look up users */ + if (NULL == engineId) { + engineId_len = snmpv3_get_engineID( tmp_engineId, sizeof(tmp_engineId)); + engineId = tmp_engineId; + } + + usmUser = usm_get_user(engineId, engineId_len, user); + if (NULL == usmUser) { + DEBUGMSGTL(("trap:v3user_notif_sess", "usmUser %s not found\n", user)); + return NULL; + } + + snmp_sess_init(&session); + + session.version = SNMP_VERSION_3; + + session.peername = NETSNMP_REMOVE_CONST(char*,dest); + + session.securityName = NETSNMP_REMOVE_CONST(char*,user); + session.securityNameLen = strlen(user); + + if (NULL != context) { + session.contextName = NETSNMP_REMOVE_CONST(char*,context); + session.contextNameLen = strlen(context); + } + + session.securityLevel = level; + + /** auth prot */ + if (NULL != usmUser->authProtocol) { + session.securityAuthProto = + snmp_duplicate_objid(usmUser->authProtocol, + usmUser->authProtocolLen); + session.securityAuthProtoLen = usmUser->authProtocolLen; + if (NULL == session.securityAuthProto) + goto bail; + } + + /** authkey */ + if (((SNMP_SEC_LEVEL_AUTHPRIV == level) || + (SNMP_SEC_LEVEL_AUTHNOPRIV == level)) && + (usmUser->flags & USMUSER_FLAG_KEEP_MASTER_KEY)) { + netsnmp_assert(usmUser->authKeyKuLen > 0); + memcpy(session.securityAuthKey, usmUser->authKeyKu, + usmUser->authKeyKuLen); + session.securityAuthKeyLen = usmUser->authKeyKuLen; + } + + /** priv prot */ + if (NULL != usmUser->privProtocol) { + session.securityPrivProto = + snmp_duplicate_objid(usmUser->privProtocol, + usmUser->privProtocolLen); + session.securityPrivProtoLen = usmUser->privProtocolLen; + if (NULL == session.securityPrivProto) + goto bail; + } + + /** privkey */ + if ((SNMP_SEC_LEVEL_AUTHPRIV == level) && + (usmUser->flags & USMUSER_FLAG_KEEP_MASTER_KEY)) { + netsnmp_assert(usmUser->privKeyKuLen > 0); + memcpy(session.securityPrivKey, usmUser->privKeyKu, + usmUser->privKeyKuLen); + session.securityPrivKeyLen = usmUser->privKeyKuLen; + } + + /** engineId */ + session.contextEngineID = netsnmp_memdup(usmUser->engineID, + usmUser->engineIDLen); + session.contextEngineIDLen = usmUser->engineIDLen; + + /** open the tranport */ + + memset(&tspec, 0, sizeof(netsnmp_tdomain_spec)); + tspec.application = "snmptrap"; + tspec.target = session.peername; + tspec.default_domain = NULL; + tspec.default_target = NULL; + tspec.source = src; + transport = netsnmp_tdomain_transport_tspec(&tspec); + if (transport == NULL) { + DEBUGMSGTL(("trap:v3user_notif_sess", "could not create transport\n")); + goto bail; + } + + if ((rc = netsnmp_sess_config_and_open_transport(&session, transport)) + != SNMPERR_SUCCESS) { + DEBUGMSGTL(("trap:v3user_notif_sess", "config/open failed\n")); + goto bail; + } + + ss = snmp_add(&session, transport, NULL, NULL); + if (!ss) { + DEBUGMSGTL(("trap:v3user_notif_sess", "snmp_add failed\n")); + goto bail; + } + + if (netsnmp_add_notification_session(ss, pdutype, + (pdutype == SNMP_MSG_INFORM), + ss->version, notif_name, notif_tag, + notif_profile) != 1) { + DEBUGMSGTL(("trap:v3user_notif_sess", "add notification failed\n")); + snmp_close(ss); + ss = NULL; + goto bail; + } + + bail: + /** free any allocated mem in session */ + SNMP_FREE(session.securityAuthProto); + SNMP_FREE(session.securityPrivProto); + SNMP_FREE(session.contextEngineID); + + return ss; +} void snmpd_parse_config_trapsess(const char *word, char *cptr) { char *argv[MAX_ARGS], *cp = cptr; + char *profile = NULL, *name = NULL, *tag = NULL; int argn, rc; netsnmp_session session, *ss; netsnmp_transport *transport; size_t len; + char tmp[SPRINT_MAX_LEN]; + char *clientaddr_save = NULL; /* * inform or trap? default to trap */ traptype = SNMP_MSG_TRAP2; + do { + if (strncmp(cp, "-profile", 8) == 0) { + cp = skip_token(cp); + cp = copy_nword(cp, tmp, SPRINT_MAX_LEN); + free(profile); + profile = strdup(tmp); + } else if (strncmp(cp, "-name", 5) == 0) { + cp = skip_token(cp); + cp = copy_nword(cp, tmp, SPRINT_MAX_LEN); + free(name); + name = strdup(tmp); + } else if (strncmp(cp, "-tag", 4) == 0) { + cp = skip_token(cp); + cp = copy_nword(cp, tmp, SPRINT_MAX_LEN); + free(tag); + tag = strdup(tmp); + } else + break; + } while(cp); + /* * create the argv[] like array */ argv[0] = strdup("snmpd-trapsess"); /* bogus entry for getopt() */ for (argn = 1; cp && argn < MAX_ARGS; argn++) { - char tmp[SPRINT_MAX_LEN]; - cp = copy_nword(cp, tmp, SPRINT_MAX_LEN); argv[argn] = strdup(tmp); } + /** parse args (also initializes session) */ netsnmp_parse_args(argn, argv, &session, "C:", trapOptProc, NETSNMP_PARSE_ARGS_NOLOGGING | NETSNMP_PARSE_ARGS_NOZERO); + if (NETSNMP_RUNTIME_PROTOCOL_SKIP(session.version)) { + config_perror("snmpd: protocol version disabled at runtime"); + for (; argn > 0; argn--) + free(argv[argn - 1]); + goto cleanup; + } + + if (NULL != session.localname) { + clientaddr_save = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR); + if (clientaddr_save) + clientaddr_save = strdup(clientaddr_save); + netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR, + session.localname); + } + transport = netsnmp_transport_open_client("snmptrap", session.peername); + + if (NULL != session.localname) + netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR, clientaddr_save); + if (transport == NULL) { config_perror("snmpd: failed to parse this line."); - return; + for (; argn > 0; argn--) + free(argv[argn - 1]); + goto cleanup; } if ((rc = netsnmp_sess_config_and_open_transport(&session, transport)) != SNMPERR_SUCCESS) { session.s_snmp_errno = rc; session.s_errno = 0; - return; + for (; argn > 0; argn--) + free(argv[argn - 1]); + goto cleanup; } ss = snmp_add(&session, transport, NULL, NULL); - for (; argn > 0; argn--) { + for (; argn > 0; argn--) free(argv[argn - 1]); - } if (!ss) { config_perror ("snmpd: failed to parse this line or the remote trap receiver is down. Possible cause:"); snmp_sess_perror("snmpd: snmpd_parse_config_trapsess()", &session); - return; + goto cleanup; } /* @@ -1278,10 +1781,21 @@ snmpd_parse_config_trapsess(const char *word, char *cptr) } #ifndef NETSNMP_DISABLE_SNMPV1 - if (ss->version == SNMP_VERSION_1) + if ((ss->version == SNMP_VERSION_1) && + !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V1)) traptype = SNMP_MSG_TRAP; #endif - add_trap_session(ss, traptype, (traptype == SNMP_MSG_INFORM), ss->version); + netsnmp_add_notification_session(ss, traptype, + (traptype == SNMP_MSG_INFORM), + ss->version, name, tag, profile); + + cleanup: + netsnmp_cleanup_session(&session); + SNMP_FREE(clientaddr_save); + SNMP_FREE(profile); + SNMP_FREE(name); + SNMP_FREE(tag); } #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) diff --git a/agent/auto_nlist.c b/agent/auto_nlist.c index ecdaf24..42a98b9 100644 --- a/agent/auto_nlist.c +++ b/agent/auto_nlist.c @@ -1,24 +1,23 @@ #include #ifdef NETSNMP_CAN_USE_NLIST -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include #include #include #include -#ifdef HAVE_NLIST_H -#include -#endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include +#elif defined(HAVE_NLIST_H) +#include #endif #include @@ -52,9 +51,6 @@ auto_nlist_value(const char *string) } } if (*ptr == 0) { -#if !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)) - static char *n_name = NULL; -#endif *ptr = (struct autonlist *) malloc(sizeof(struct autonlist)); memset(*ptr, 0, sizeof(struct autonlist)); it = *ptr; @@ -72,17 +68,17 @@ auto_nlist_value(const char *string) #elif defined(freebsd9) sprintf(__DECONST(char*, it->nl[0].n_name), "_%s", string); #else + { + static char *name; - if (n_name != NULL) - free(n_name); - - n_name = malloc(strlen(string) + 2); - if (n_name == NULL) { - snmp_log(LOG_ERR, "nlist err: failed to allocate memory"); - return (-1); + free(name); + name = NULL; + if (asprintf(&name, "_%s", string) < 0) { + snmp_log(LOG_ERR, "nlist err: failed to allocate memory"); + return -1; + } + it->nl[0].n_name = name; } - snprintf(n_name, strlen(string) + 2, "_%s", string); - it->nl[0].n_name = (const char*)n_name; #endif it->nl[1].n_name = 0; init_nlist(it->nl); @@ -104,7 +100,7 @@ auto_nlist_value(const char *string) return (-1); } strcpy(n_name2, string); - it->nl[0].n_name = (const char*)n_name2; + it->nl[0].n_name = n_name2; #endif init_nlist(it->nl); } @@ -150,7 +146,7 @@ static void init_nlist(struct nlist nl[]) { int ret; -#if HAVE_KVM_OPENFILES +#ifdef HAVE_KVM_OPENFILES kvm_t *kernel; char kvm_errbuf[4096]; diff --git a/agent/helpers/Makefile.depend b/agent/helpers/Makefile.depend index 165e333..5c40a0f 100644 --- a/agent/helpers/Makefile.depend +++ b/agent/helpers/Makefile.depend @@ -4,6 +4,7 @@ ./all_helpers.lo: ../../include/net-snmp/system/linux.h ./all_helpers.lo: ../../include/net-snmp/system/sysv.h ./all_helpers.lo: ../../include/net-snmp/system/generic.h +./all_helpers.lo: ../../include/net-snmp/machine/generic.h ./all_helpers.lo: ../../include/net-snmp/net-snmp-features.h ./all_helpers.lo: ../../include/net-snmp/net-snmp-includes.h ./all_helpers.lo: ../../include/net-snmp/definitions.h @@ -16,6 +17,7 @@ ./all_helpers.lo: ../../include/net-snmp/pdu_api.h ./all_helpers.lo: ../../include/net-snmp/library/asn1.h ./all_helpers.lo: ../../include/net-snmp/output_api.h +./all_helpers.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./all_helpers.lo: ../../include/net-snmp/library/snmp_debug.h ./all_helpers.lo: ../../include/net-snmp/library/snmp_logging.h ./all_helpers.lo: ../../include/net-snmp/session_api.h @@ -33,6 +35,7 @@ ./all_helpers.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./all_helpers.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./all_helpers.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./all_helpers.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./all_helpers.lo: ../../include/net-snmp/library/ucd_compat.h ./all_helpers.lo: ../../include/net-snmp/library/mib.h ./all_helpers.lo: ../../include/net-snmp/mib_api.h @@ -51,7 +54,6 @@ ./all_helpers.lo: ../../include/net-snmp/library/data_list.h ./all_helpers.lo: ../../include/net-snmp/library/check_varbind.h ./all_helpers.lo: ../../include/net-snmp/library/container.h -./all_helpers.lo: ../../include/net-snmp/library/factory.h ./all_helpers.lo: ../../include/net-snmp/library/container_binary_array.h ./all_helpers.lo: ../../include/net-snmp/library/container_list_ssll.h ./all_helpers.lo: ../../include/net-snmp/library/container_iterator.h @@ -73,8 +75,8 @@ ./all_helpers.lo: ../../include/net-snmp/library/lcd_time.h ./all_helpers.lo: ../../include/net-snmp/library/snmp_secmod.h ./all_helpers.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./all_helpers.lo: ../../include/net-snmp/library/snmptsm.h ./all_helpers.lo: ../../include/net-snmp/library/snmpusm.h +./all_helpers.lo: ../../include/net-snmp/library/snmptsm.h ./all_helpers.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./all_helpers.lo: ../../include/net-snmp/agent/mib_module_config.h ./all_helpers.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -126,6 +128,7 @@ ./baby_steps.lo: ../../include/net-snmp/pdu_api.h ./baby_steps.lo: ../../include/net-snmp/library/asn1.h ./baby_steps.lo: ../../include/net-snmp/output_api.h +./baby_steps.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./baby_steps.lo: ../../include/net-snmp/library/snmp_debug.h ./baby_steps.lo: ../../include/net-snmp/library/snmp_logging.h ./baby_steps.lo: ../../include/net-snmp/session_api.h @@ -143,6 +146,7 @@ ./baby_steps.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./baby_steps.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./baby_steps.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./baby_steps.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./baby_steps.lo: ../../include/net-snmp/library/ucd_compat.h ./baby_steps.lo: ../../include/net-snmp/library/mib.h ./baby_steps.lo: ../../include/net-snmp/mib_api.h @@ -161,7 +165,6 @@ ./baby_steps.lo: ../../include/net-snmp/library/data_list.h ./baby_steps.lo: ../../include/net-snmp/library/check_varbind.h ./baby_steps.lo: ../../include/net-snmp/library/container.h -./baby_steps.lo: ../../include/net-snmp/library/factory.h ./baby_steps.lo: ../../include/net-snmp/library/container_binary_array.h ./baby_steps.lo: ../../include/net-snmp/library/container_list_ssll.h ./baby_steps.lo: ../../include/net-snmp/library/container_iterator.h @@ -182,8 +185,8 @@ ./baby_steps.lo: ../../include/net-snmp/library/lcd_time.h ./baby_steps.lo: ../../include/net-snmp/library/snmp_secmod.h ./baby_steps.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./baby_steps.lo: ../../include/net-snmp/library/snmptsm.h ./baby_steps.lo: ../../include/net-snmp/library/snmpusm.h +./baby_steps.lo: ../../include/net-snmp/library/snmptsm.h ./baby_steps.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./baby_steps.lo: ../../include/net-snmp/agent/mib_module_config.h ./baby_steps.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -233,6 +236,7 @@ ./bulk_to_next.lo: ../../include/net-snmp/pdu_api.h ./bulk_to_next.lo: ../../include/net-snmp/library/asn1.h ./bulk_to_next.lo: ../../include/net-snmp/output_api.h +./bulk_to_next.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmp_debug.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmp_logging.h ./bulk_to_next.lo: ../../include/net-snmp/session_api.h @@ -250,6 +254,7 @@ ./bulk_to_next.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./bulk_to_next.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./bulk_to_next.lo: ../../include/net-snmp/library/ucd_compat.h ./bulk_to_next.lo: ../../include/net-snmp/library/mib.h ./bulk_to_next.lo: ../../include/net-snmp/mib_api.h @@ -269,7 +274,6 @@ ./bulk_to_next.lo: ../../include/net-snmp/library/data_list.h ./bulk_to_next.lo: ../../include/net-snmp/library/check_varbind.h ./bulk_to_next.lo: ../../include/net-snmp/library/container.h -./bulk_to_next.lo: ../../include/net-snmp/library/factory.h ./bulk_to_next.lo: ../../include/net-snmp/library/container_binary_array.h ./bulk_to_next.lo: ../../include/net-snmp/library/container_list_ssll.h ./bulk_to_next.lo: ../../include/net-snmp/library/container_iterator.h @@ -290,8 +294,8 @@ ./bulk_to_next.lo: ../../include/net-snmp/library/lcd_time.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmp_secmod.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./bulk_to_next.lo: ../../include/net-snmp/library/snmptsm.h ./bulk_to_next.lo: ../../include/net-snmp/library/snmpusm.h +./bulk_to_next.lo: ../../include/net-snmp/library/snmptsm.h ./bulk_to_next.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./bulk_to_next.lo: ../../include/net-snmp/agent/mib_module_config.h ./bulk_to_next.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -342,6 +346,7 @@ ./cache_handler.lo: ../../include/net-snmp/pdu_api.h ./cache_handler.lo: ../../include/net-snmp/library/asn1.h ./cache_handler.lo: ../../include/net-snmp/output_api.h +./cache_handler.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./cache_handler.lo: ../../include/net-snmp/library/snmp_debug.h ./cache_handler.lo: ../../include/net-snmp/library/snmp_logging.h ./cache_handler.lo: ../../include/net-snmp/session_api.h @@ -359,6 +364,7 @@ ./cache_handler.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./cache_handler.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./cache_handler.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./cache_handler.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./cache_handler.lo: ../../include/net-snmp/library/ucd_compat.h ./cache_handler.lo: ../../include/net-snmp/library/mib.h ./cache_handler.lo: ../../include/net-snmp/mib_api.h @@ -377,7 +383,6 @@ ./cache_handler.lo: ../../include/net-snmp/library/data_list.h ./cache_handler.lo: ../../include/net-snmp/library/check_varbind.h ./cache_handler.lo: ../../include/net-snmp/library/container.h -./cache_handler.lo: ../../include/net-snmp/library/factory.h ./cache_handler.lo: ../../include/net-snmp/library/container_binary_array.h ./cache_handler.lo: ../../include/net-snmp/library/container_list_ssll.h ./cache_handler.lo: ../../include/net-snmp/library/container_iterator.h @@ -398,8 +403,8 @@ ./cache_handler.lo: ../../include/net-snmp/library/lcd_time.h ./cache_handler.lo: ../../include/net-snmp/library/snmp_secmod.h ./cache_handler.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./cache_handler.lo: ../../include/net-snmp/library/snmptsm.h ./cache_handler.lo: ../../include/net-snmp/library/snmpusm.h +./cache_handler.lo: ../../include/net-snmp/library/snmptsm.h ./cache_handler.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./cache_handler.lo: ../../include/net-snmp/agent/mib_module_config.h ./cache_handler.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -449,6 +454,7 @@ ./debug_handler.lo: ../../include/net-snmp/pdu_api.h ./debug_handler.lo: ../../include/net-snmp/library/asn1.h ./debug_handler.lo: ../../include/net-snmp/output_api.h +./debug_handler.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./debug_handler.lo: ../../include/net-snmp/library/snmp_debug.h ./debug_handler.lo: ../../include/net-snmp/library/snmp_logging.h ./debug_handler.lo: ../../include/net-snmp/session_api.h @@ -466,6 +472,7 @@ ./debug_handler.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./debug_handler.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./debug_handler.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./debug_handler.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./debug_handler.lo: ../../include/net-snmp/library/ucd_compat.h ./debug_handler.lo: ../../include/net-snmp/library/mib.h ./debug_handler.lo: ../../include/net-snmp/mib_api.h @@ -485,7 +492,6 @@ ./debug_handler.lo: ../../include/net-snmp/library/data_list.h ./debug_handler.lo: ../../include/net-snmp/library/check_varbind.h ./debug_handler.lo: ../../include/net-snmp/library/container.h -./debug_handler.lo: ../../include/net-snmp/library/factory.h ./debug_handler.lo: ../../include/net-snmp/library/container_binary_array.h ./debug_handler.lo: ../../include/net-snmp/library/container_list_ssll.h ./debug_handler.lo: ../../include/net-snmp/library/container_iterator.h @@ -506,8 +512,8 @@ ./debug_handler.lo: ../../include/net-snmp/library/lcd_time.h ./debug_handler.lo: ../../include/net-snmp/library/snmp_secmod.h ./debug_handler.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./debug_handler.lo: ../../include/net-snmp/library/snmptsm.h ./debug_handler.lo: ../../include/net-snmp/library/snmpusm.h +./debug_handler.lo: ../../include/net-snmp/library/snmptsm.h ./debug_handler.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./debug_handler.lo: ../../include/net-snmp/agent/mib_module_config.h ./debug_handler.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -558,6 +564,7 @@ ./instance.lo: ../../include/net-snmp/pdu_api.h ./instance.lo: ../../include/net-snmp/library/asn1.h ./instance.lo: ../../include/net-snmp/output_api.h +./instance.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./instance.lo: ../../include/net-snmp/library/snmp_debug.h ./instance.lo: ../../include/net-snmp/library/snmp_logging.h ./instance.lo: ../../include/net-snmp/session_api.h @@ -575,6 +582,7 @@ ./instance.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./instance.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./instance.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./instance.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./instance.lo: ../../include/net-snmp/library/ucd_compat.h ./instance.lo: ../../include/net-snmp/library/mib.h ./instance.lo: ../../include/net-snmp/mib_api.h @@ -593,7 +601,6 @@ ./instance.lo: ../../include/net-snmp/library/data_list.h ./instance.lo: ../../include/net-snmp/library/check_varbind.h ./instance.lo: ../../include/net-snmp/library/container.h -./instance.lo: ../../include/net-snmp/library/factory.h ./instance.lo: ../../include/net-snmp/library/container_binary_array.h ./instance.lo: ../../include/net-snmp/library/container_list_ssll.h ./instance.lo: ../../include/net-snmp/library/container_iterator.h @@ -614,8 +621,8 @@ ./instance.lo: ../../include/net-snmp/library/lcd_time.h ./instance.lo: ../../include/net-snmp/library/snmp_secmod.h ./instance.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./instance.lo: ../../include/net-snmp/library/snmptsm.h ./instance.lo: ../../include/net-snmp/library/snmpusm.h +./instance.lo: ../../include/net-snmp/library/snmptsm.h ./instance.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./instance.lo: ../../include/net-snmp/agent/mib_module_config.h ./instance.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -666,6 +673,7 @@ ./mode_end_call.lo: ../../include/net-snmp/pdu_api.h ./mode_end_call.lo: ../../include/net-snmp/library/asn1.h ./mode_end_call.lo: ../../include/net-snmp/output_api.h +./mode_end_call.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./mode_end_call.lo: ../../include/net-snmp/library/snmp_debug.h ./mode_end_call.lo: ../../include/net-snmp/library/snmp_logging.h ./mode_end_call.lo: ../../include/net-snmp/session_api.h @@ -683,6 +691,7 @@ ./mode_end_call.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./mode_end_call.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./mode_end_call.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mode_end_call.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./mode_end_call.lo: ../../include/net-snmp/library/ucd_compat.h ./mode_end_call.lo: ../../include/net-snmp/library/mib.h ./mode_end_call.lo: ../../include/net-snmp/mib_api.h @@ -701,7 +710,6 @@ ./mode_end_call.lo: ../../include/net-snmp/library/data_list.h ./mode_end_call.lo: ../../include/net-snmp/library/check_varbind.h ./mode_end_call.lo: ../../include/net-snmp/library/container.h -./mode_end_call.lo: ../../include/net-snmp/library/factory.h ./mode_end_call.lo: ../../include/net-snmp/library/container_binary_array.h ./mode_end_call.lo: ../../include/net-snmp/library/container_list_ssll.h ./mode_end_call.lo: ../../include/net-snmp/library/container_iterator.h @@ -722,8 +730,8 @@ ./mode_end_call.lo: ../../include/net-snmp/library/lcd_time.h ./mode_end_call.lo: ../../include/net-snmp/library/snmp_secmod.h ./mode_end_call.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mode_end_call.lo: ../../include/net-snmp/library/snmptsm.h ./mode_end_call.lo: ../../include/net-snmp/library/snmpusm.h +./mode_end_call.lo: ../../include/net-snmp/library/snmptsm.h ./mode_end_call.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./mode_end_call.lo: ../../include/net-snmp/agent/mib_module_config.h ./mode_end_call.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -773,6 +781,7 @@ ./multiplexer.lo: ../../include/net-snmp/pdu_api.h ./multiplexer.lo: ../../include/net-snmp/library/asn1.h ./multiplexer.lo: ../../include/net-snmp/output_api.h +./multiplexer.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./multiplexer.lo: ../../include/net-snmp/library/snmp_debug.h ./multiplexer.lo: ../../include/net-snmp/library/snmp_logging.h ./multiplexer.lo: ../../include/net-snmp/session_api.h @@ -790,6 +799,7 @@ ./multiplexer.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./multiplexer.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./multiplexer.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./multiplexer.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./multiplexer.lo: ../../include/net-snmp/library/ucd_compat.h ./multiplexer.lo: ../../include/net-snmp/library/mib.h ./multiplexer.lo: ../../include/net-snmp/mib_api.h @@ -809,7 +819,6 @@ ./multiplexer.lo: ../../include/net-snmp/library/data_list.h ./multiplexer.lo: ../../include/net-snmp/library/check_varbind.h ./multiplexer.lo: ../../include/net-snmp/library/container.h -./multiplexer.lo: ../../include/net-snmp/library/factory.h ./multiplexer.lo: ../../include/net-snmp/library/container_binary_array.h ./multiplexer.lo: ../../include/net-snmp/library/container_list_ssll.h ./multiplexer.lo: ../../include/net-snmp/library/container_iterator.h @@ -830,8 +839,8 @@ ./multiplexer.lo: ../../include/net-snmp/library/lcd_time.h ./multiplexer.lo: ../../include/net-snmp/library/snmp_secmod.h ./multiplexer.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./multiplexer.lo: ../../include/net-snmp/library/snmptsm.h ./multiplexer.lo: ../../include/net-snmp/library/snmpusm.h +./multiplexer.lo: ../../include/net-snmp/library/snmptsm.h ./multiplexer.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./multiplexer.lo: ../../include/net-snmp/agent/mib_module_config.h ./multiplexer.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -881,6 +890,7 @@ ./null.lo: ../../include/net-snmp/pdu_api.h ./null.lo: ../../include/net-snmp/library/asn1.h ./null.lo: ../../include/net-snmp/output_api.h +./null.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./null.lo: ../../include/net-snmp/library/snmp_debug.h ./null.lo: ../../include/net-snmp/library/snmp_logging.h ./null.lo: ../../include/net-snmp/session_api.h @@ -898,6 +908,7 @@ ./null.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./null.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./null.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./null.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./null.lo: ../../include/net-snmp/library/ucd_compat.h ./null.lo: ../../include/net-snmp/library/mib.h ./null.lo: ../../include/net-snmp/mib_api.h @@ -917,7 +928,6 @@ ./null.lo: ../../include/net-snmp/library/data_list.h ./null.lo: ../../include/net-snmp/library/check_varbind.h ./null.lo: ../../include/net-snmp/library/container.h -./null.lo: ../../include/net-snmp/library/factory.h ./null.lo: ../../include/net-snmp/library/container_binary_array.h ./null.lo: ../../include/net-snmp/library/container_list_ssll.h ./null.lo: ../../include/net-snmp/library/container_iterator.h @@ -938,8 +948,8 @@ ./null.lo: ../../include/net-snmp/library/lcd_time.h ./null.lo: ../../include/net-snmp/library/snmp_secmod.h ./null.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./null.lo: ../../include/net-snmp/library/snmptsm.h ./null.lo: ../../include/net-snmp/library/snmpusm.h +./null.lo: ../../include/net-snmp/library/snmptsm.h ./null.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./null.lo: ../../include/net-snmp/agent/mib_module_config.h ./null.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -989,6 +999,7 @@ ./old_api.lo: ../../include/net-snmp/pdu_api.h ./old_api.lo: ../../include/net-snmp/library/asn1.h ./old_api.lo: ../../include/net-snmp/output_api.h +./old_api.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./old_api.lo: ../../include/net-snmp/library/snmp_debug.h ./old_api.lo: ../../include/net-snmp/library/snmp_logging.h ./old_api.lo: ../../include/net-snmp/session_api.h @@ -1006,6 +1017,7 @@ ./old_api.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./old_api.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./old_api.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./old_api.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./old_api.lo: ../../include/net-snmp/library/ucd_compat.h ./old_api.lo: ../../include/net-snmp/library/mib.h ./old_api.lo: ../../include/net-snmp/mib_api.h @@ -1025,7 +1037,6 @@ ./old_api.lo: ../../include/net-snmp/library/data_list.h ./old_api.lo: ../../include/net-snmp/library/check_varbind.h ./old_api.lo: ../../include/net-snmp/library/container.h -./old_api.lo: ../../include/net-snmp/library/factory.h ./old_api.lo: ../../include/net-snmp/library/container_binary_array.h ./old_api.lo: ../../include/net-snmp/library/container_list_ssll.h ./old_api.lo: ../../include/net-snmp/library/container_iterator.h @@ -1046,8 +1057,8 @@ ./old_api.lo: ../../include/net-snmp/library/lcd_time.h ./old_api.lo: ../../include/net-snmp/library/snmp_secmod.h ./old_api.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./old_api.lo: ../../include/net-snmp/library/snmptsm.h ./old_api.lo: ../../include/net-snmp/library/snmpusm.h +./old_api.lo: ../../include/net-snmp/library/snmptsm.h ./old_api.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./old_api.lo: ../../include/net-snmp/agent/mib_module_config.h ./old_api.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1098,6 +1109,7 @@ ./read_only.lo: ../../include/net-snmp/pdu_api.h ./read_only.lo: ../../include/net-snmp/library/asn1.h ./read_only.lo: ../../include/net-snmp/output_api.h +./read_only.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./read_only.lo: ../../include/net-snmp/library/snmp_debug.h ./read_only.lo: ../../include/net-snmp/library/snmp_logging.h ./read_only.lo: ../../include/net-snmp/session_api.h @@ -1115,6 +1127,7 @@ ./read_only.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./read_only.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./read_only.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./read_only.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./read_only.lo: ../../include/net-snmp/library/ucd_compat.h ./read_only.lo: ../../include/net-snmp/library/mib.h ./read_only.lo: ../../include/net-snmp/mib_api.h @@ -1134,7 +1147,6 @@ ./read_only.lo: ../../include/net-snmp/library/data_list.h ./read_only.lo: ../../include/net-snmp/library/check_varbind.h ./read_only.lo: ../../include/net-snmp/library/container.h -./read_only.lo: ../../include/net-snmp/library/factory.h ./read_only.lo: ../../include/net-snmp/library/container_binary_array.h ./read_only.lo: ../../include/net-snmp/library/container_list_ssll.h ./read_only.lo: ../../include/net-snmp/library/container_iterator.h @@ -1155,8 +1167,8 @@ ./read_only.lo: ../../include/net-snmp/library/lcd_time.h ./read_only.lo: ../../include/net-snmp/library/snmp_secmod.h ./read_only.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./read_only.lo: ../../include/net-snmp/library/snmptsm.h ./read_only.lo: ../../include/net-snmp/library/snmpusm.h +./read_only.lo: ../../include/net-snmp/library/snmptsm.h ./read_only.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./read_only.lo: ../../include/net-snmp/agent/mib_module_config.h ./read_only.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1207,6 +1219,7 @@ ./row_merge.lo: ../../include/net-snmp/pdu_api.h ./row_merge.lo: ../../include/net-snmp/library/asn1.h ./row_merge.lo: ../../include/net-snmp/output_api.h +./row_merge.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./row_merge.lo: ../../include/net-snmp/library/snmp_debug.h ./row_merge.lo: ../../include/net-snmp/library/snmp_logging.h ./row_merge.lo: ../../include/net-snmp/session_api.h @@ -1224,6 +1237,7 @@ ./row_merge.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./row_merge.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./row_merge.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./row_merge.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./row_merge.lo: ../../include/net-snmp/library/ucd_compat.h ./row_merge.lo: ../../include/net-snmp/library/mib.h ./row_merge.lo: ../../include/net-snmp/mib_api.h @@ -1242,7 +1256,6 @@ ./row_merge.lo: ../../include/net-snmp/library/data_list.h ./row_merge.lo: ../../include/net-snmp/library/check_varbind.h ./row_merge.lo: ../../include/net-snmp/library/container.h -./row_merge.lo: ../../include/net-snmp/library/factory.h ./row_merge.lo: ../../include/net-snmp/library/container_binary_array.h ./row_merge.lo: ../../include/net-snmp/library/container_list_ssll.h ./row_merge.lo: ../../include/net-snmp/library/container_iterator.h @@ -1263,8 +1276,8 @@ ./row_merge.lo: ../../include/net-snmp/library/lcd_time.h ./row_merge.lo: ../../include/net-snmp/library/snmp_secmod.h ./row_merge.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./row_merge.lo: ../../include/net-snmp/library/snmptsm.h ./row_merge.lo: ../../include/net-snmp/library/snmpusm.h +./row_merge.lo: ../../include/net-snmp/library/snmptsm.h ./row_merge.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./row_merge.lo: ../../include/net-snmp/agent/mib_module_config.h ./row_merge.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1314,6 +1327,7 @@ ./scalar.lo: ../../include/net-snmp/pdu_api.h ./scalar.lo: ../../include/net-snmp/library/asn1.h ./scalar.lo: ../../include/net-snmp/output_api.h +./scalar.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./scalar.lo: ../../include/net-snmp/library/snmp_debug.h ./scalar.lo: ../../include/net-snmp/library/snmp_logging.h ./scalar.lo: ../../include/net-snmp/session_api.h @@ -1331,6 +1345,7 @@ ./scalar.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./scalar.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./scalar.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./scalar.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./scalar.lo: ../../include/net-snmp/library/ucd_compat.h ./scalar.lo: ../../include/net-snmp/library/mib.h ./scalar.lo: ../../include/net-snmp/mib_api.h @@ -1350,7 +1365,6 @@ ./scalar.lo: ../../include/net-snmp/library/data_list.h ./scalar.lo: ../../include/net-snmp/library/check_varbind.h ./scalar.lo: ../../include/net-snmp/library/container.h -./scalar.lo: ../../include/net-snmp/library/factory.h ./scalar.lo: ../../include/net-snmp/library/container_binary_array.h ./scalar.lo: ../../include/net-snmp/library/container_list_ssll.h ./scalar.lo: ../../include/net-snmp/library/container_iterator.h @@ -1371,8 +1385,8 @@ ./scalar.lo: ../../include/net-snmp/library/lcd_time.h ./scalar.lo: ../../include/net-snmp/library/snmp_secmod.h ./scalar.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./scalar.lo: ../../include/net-snmp/library/snmptsm.h ./scalar.lo: ../../include/net-snmp/library/snmpusm.h +./scalar.lo: ../../include/net-snmp/library/snmptsm.h ./scalar.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./scalar.lo: ../../include/net-snmp/agent/mib_module_config.h ./scalar.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1422,6 +1436,7 @@ ./scalar_group.lo: ../../include/net-snmp/pdu_api.h ./scalar_group.lo: ../../include/net-snmp/library/asn1.h ./scalar_group.lo: ../../include/net-snmp/output_api.h +./scalar_group.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./scalar_group.lo: ../../include/net-snmp/library/snmp_debug.h ./scalar_group.lo: ../../include/net-snmp/library/snmp_logging.h ./scalar_group.lo: ../../include/net-snmp/session_api.h @@ -1439,6 +1454,7 @@ ./scalar_group.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./scalar_group.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./scalar_group.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./scalar_group.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./scalar_group.lo: ../../include/net-snmp/library/ucd_compat.h ./scalar_group.lo: ../../include/net-snmp/library/mib.h ./scalar_group.lo: ../../include/net-snmp/mib_api.h @@ -1458,7 +1474,6 @@ ./scalar_group.lo: ../../include/net-snmp/library/data_list.h ./scalar_group.lo: ../../include/net-snmp/library/check_varbind.h ./scalar_group.lo: ../../include/net-snmp/library/container.h -./scalar_group.lo: ../../include/net-snmp/library/factory.h ./scalar_group.lo: ../../include/net-snmp/library/container_binary_array.h ./scalar_group.lo: ../../include/net-snmp/library/container_list_ssll.h ./scalar_group.lo: ../../include/net-snmp/library/container_iterator.h @@ -1479,8 +1494,8 @@ ./scalar_group.lo: ../../include/net-snmp/library/lcd_time.h ./scalar_group.lo: ../../include/net-snmp/library/snmp_secmod.h ./scalar_group.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./scalar_group.lo: ../../include/net-snmp/library/snmptsm.h ./scalar_group.lo: ../../include/net-snmp/library/snmpusm.h +./scalar_group.lo: ../../include/net-snmp/library/snmptsm.h ./scalar_group.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./scalar_group.lo: ../../include/net-snmp/agent/mib_module_config.h ./scalar_group.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1530,6 +1545,7 @@ ./serialize.lo: ../../include/net-snmp/pdu_api.h ./serialize.lo: ../../include/net-snmp/library/asn1.h ./serialize.lo: ../../include/net-snmp/output_api.h +./serialize.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./serialize.lo: ../../include/net-snmp/library/snmp_debug.h ./serialize.lo: ../../include/net-snmp/library/snmp_logging.h ./serialize.lo: ../../include/net-snmp/session_api.h @@ -1547,6 +1563,7 @@ ./serialize.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./serialize.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./serialize.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./serialize.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./serialize.lo: ../../include/net-snmp/library/ucd_compat.h ./serialize.lo: ../../include/net-snmp/library/mib.h ./serialize.lo: ../../include/net-snmp/mib_api.h @@ -1566,7 +1583,6 @@ ./serialize.lo: ../../include/net-snmp/library/data_list.h ./serialize.lo: ../../include/net-snmp/library/check_varbind.h ./serialize.lo: ../../include/net-snmp/library/container.h -./serialize.lo: ../../include/net-snmp/library/factory.h ./serialize.lo: ../../include/net-snmp/library/container_binary_array.h ./serialize.lo: ../../include/net-snmp/library/container_list_ssll.h ./serialize.lo: ../../include/net-snmp/library/container_iterator.h @@ -1587,8 +1603,8 @@ ./serialize.lo: ../../include/net-snmp/library/lcd_time.h ./serialize.lo: ../../include/net-snmp/library/snmp_secmod.h ./serialize.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./serialize.lo: ../../include/net-snmp/library/snmptsm.h ./serialize.lo: ../../include/net-snmp/library/snmpusm.h +./serialize.lo: ../../include/net-snmp/library/snmptsm.h ./serialize.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./serialize.lo: ../../include/net-snmp/agent/mib_module_config.h ./serialize.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1639,6 +1655,7 @@ ./snmp_get_statistic.lo: ../../include/net-snmp/pdu_api.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/asn1.h ./snmp_get_statistic.lo: ../../include/net-snmp/output_api.h +./snmp_get_statistic.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmp_debug.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmp_logging.h ./snmp_get_statistic.lo: ../../include/net-snmp/session_api.h @@ -1656,6 +1673,7 @@ ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/ucd_compat.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/mib.h ./snmp_get_statistic.lo: ../../include/net-snmp/mib_api.h @@ -1674,7 +1692,6 @@ ./snmp_get_statistic.lo: ../../include/net-snmp/library/data_list.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/check_varbind.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/container.h -./snmp_get_statistic.lo: ../../include/net-snmp/library/factory.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/container_binary_array.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/container_list_ssll.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/container_iterator.h @@ -1695,8 +1712,8 @@ ./snmp_get_statistic.lo: ../../include/net-snmp/library/lcd_time.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmp_secmod.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmp_get_statistic.lo: ../../include/net-snmp/library/snmptsm.h ./snmp_get_statistic.lo: ../../include/net-snmp/library/snmpusm.h +./snmp_get_statistic.lo: ../../include/net-snmp/library/snmptsm.h ./snmp_get_statistic.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./snmp_get_statistic.lo: ../../include/net-snmp/agent/mib_module_config.h ./snmp_get_statistic.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1747,6 +1764,7 @@ ./stash_cache.lo: ../../include/net-snmp/pdu_api.h ./stash_cache.lo: ../../include/net-snmp/library/asn1.h ./stash_cache.lo: ../../include/net-snmp/output_api.h +./stash_cache.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./stash_cache.lo: ../../include/net-snmp/library/snmp_debug.h ./stash_cache.lo: ../../include/net-snmp/library/snmp_logging.h ./stash_cache.lo: ../../include/net-snmp/session_api.h @@ -1764,6 +1782,7 @@ ./stash_cache.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./stash_cache.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./stash_cache.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./stash_cache.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./stash_cache.lo: ../../include/net-snmp/library/ucd_compat.h ./stash_cache.lo: ../../include/net-snmp/library/mib.h ./stash_cache.lo: ../../include/net-snmp/mib_api.h @@ -1782,7 +1801,6 @@ ./stash_cache.lo: ../../include/net-snmp/library/data_list.h ./stash_cache.lo: ../../include/net-snmp/library/check_varbind.h ./stash_cache.lo: ../../include/net-snmp/library/container.h -./stash_cache.lo: ../../include/net-snmp/library/factory.h ./stash_cache.lo: ../../include/net-snmp/library/container_binary_array.h ./stash_cache.lo: ../../include/net-snmp/library/container_list_ssll.h ./stash_cache.lo: ../../include/net-snmp/library/container_iterator.h @@ -1803,8 +1821,8 @@ ./stash_cache.lo: ../../include/net-snmp/library/lcd_time.h ./stash_cache.lo: ../../include/net-snmp/library/snmp_secmod.h ./stash_cache.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./stash_cache.lo: ../../include/net-snmp/library/snmptsm.h ./stash_cache.lo: ../../include/net-snmp/library/snmpusm.h +./stash_cache.lo: ../../include/net-snmp/library/snmptsm.h ./stash_cache.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./stash_cache.lo: ../../include/net-snmp/agent/mib_module_config.h ./stash_cache.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1857,6 +1875,7 @@ ./stash_to_next.lo: ../../include/net-snmp/pdu_api.h ./stash_to_next.lo: ../../include/net-snmp/library/asn1.h ./stash_to_next.lo: ../../include/net-snmp/output_api.h +./stash_to_next.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./stash_to_next.lo: ../../include/net-snmp/library/snmp_debug.h ./stash_to_next.lo: ../../include/net-snmp/library/snmp_logging.h ./stash_to_next.lo: ../../include/net-snmp/session_api.h @@ -1874,6 +1893,7 @@ ./stash_to_next.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./stash_to_next.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./stash_to_next.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./stash_to_next.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./stash_to_next.lo: ../../include/net-snmp/library/ucd_compat.h ./stash_to_next.lo: ../../include/net-snmp/library/mib.h ./stash_to_next.lo: ../../include/net-snmp/mib_api.h @@ -1892,7 +1912,6 @@ ./stash_to_next.lo: ../../include/net-snmp/library/data_list.h ./stash_to_next.lo: ../../include/net-snmp/library/check_varbind.h ./stash_to_next.lo: ../../include/net-snmp/library/container.h -./stash_to_next.lo: ../../include/net-snmp/library/factory.h ./stash_to_next.lo: ../../include/net-snmp/library/container_binary_array.h ./stash_to_next.lo: ../../include/net-snmp/library/container_list_ssll.h ./stash_to_next.lo: ../../include/net-snmp/library/container_iterator.h @@ -1913,8 +1932,8 @@ ./stash_to_next.lo: ../../include/net-snmp/library/lcd_time.h ./stash_to_next.lo: ../../include/net-snmp/library/snmp_secmod.h ./stash_to_next.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./stash_to_next.lo: ../../include/net-snmp/library/snmptsm.h ./stash_to_next.lo: ../../include/net-snmp/library/snmpusm.h +./stash_to_next.lo: ../../include/net-snmp/library/snmptsm.h ./stash_to_next.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./stash_to_next.lo: ../../include/net-snmp/agent/mib_module_config.h ./stash_to_next.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -1954,114 +1973,6 @@ ./stash_to_next.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./stash_to_next.lo: ../../include/net-snmp/agent/stash_to_next.h ./stash_to_next.lo: ../../include/net-snmp/agent/stash_cache.h -./table_array.lo: ../../include/net-snmp/net-snmp-config.h -./table_array.lo: ../../include/net-snmp/net-snmp-features.h -./table_array.lo: ../../include/net-snmp/net-snmp-includes.h -./table_array.lo: ../../include/net-snmp/definitions.h -./table_array.lo: ../../include/net-snmp/types.h -./table_array.lo: ../../include/net-snmp/library/oid.h -./table_array.lo: ../../include/net-snmp/library/types.h -./table_array.lo: ../../include/net-snmp/library/snmp_api.h -./table_array.lo: ../../include/net-snmp/varbind_api.h -./table_array.lo: ../../include/net-snmp/library/snmp_client.h -./table_array.lo: ../../include/net-snmp/pdu_api.h -./table_array.lo: ../../include/net-snmp/library/asn1.h -./table_array.lo: ../../include/net-snmp/output_api.h -./table_array.lo: ../../include/net-snmp/library/snmp_debug.h -./table_array.lo: ../../include/net-snmp/library/snmp_logging.h -./table_array.lo: ../../include/net-snmp/session_api.h -./table_array.lo: ../../include/net-snmp/library/callback.h -./table_array.lo: ../../include/net-snmp/library/snmp_transport.h -./table_array.lo: ../../include/net-snmp/library/snmp_service.h -./table_array.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./table_array.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./table_array.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./table_array.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./table_array.lo: ../../include/net-snmp/library/ucd_compat.h -./table_array.lo: ../../include/net-snmp/library/mib.h -./table_array.lo: ../../include/net-snmp/mib_api.h -./table_array.lo: ../../include/net-snmp/library/parse.h -./table_array.lo: ../../include/net-snmp/library/oid_stash.h -./table_array.lo: ../../include/net-snmp/library/snmp_impl.h -./table_array.lo: ../../include/net-snmp/library/snmp.h -./table_array.lo: ../../include/net-snmp/library/snmp-tc.h -./table_array.lo: ../../include/net-snmp/library/getopt.h -./table_array.lo: ../../include/net-snmp/utilities.h -./table_array.lo: ../../include/net-snmp/library/system.h -./table_array.lo: ../../include/net-snmp/library/tools.h -./table_array.lo: ../../include/net-snmp/library/int64.h -./table_array.lo: ../../include/net-snmp/library/mt_support.h -./table_array.lo: ../../include/net-snmp/library/snmp_alarm.h -./table_array.lo: ../../include/net-snmp/library/data_list.h -./table_array.lo: ../../include/net-snmp/library/check_varbind.h -./table_array.lo: ../../include/net-snmp/library/container.h -./table_array.lo: ../../include/net-snmp/library/factory.h -./table_array.lo: ../../include/net-snmp/library/container_binary_array.h -./table_array.lo: ../../include/net-snmp/library/container_list_ssll.h -./table_array.lo: ../../include/net-snmp/library/container_iterator.h -./table_array.lo: ../../include/net-snmp/library/container.h -./table_array.lo: ../../include/net-snmp/library/snmp_assert.h -./table_array.lo: ../../include/net-snmp/version.h -./table_array.lo: ../../include/net-snmp/config_api.h -./table_array.lo: ../../include/net-snmp/library/read_config.h -./table_array.lo: ../../include/net-snmp/library/default_store.h -./table_array.lo: ../../include/net-snmp/library/snmp_parse_args.h -./table_array.lo: ../../include/net-snmp/library/snmp_enum.h -./table_array.lo: ../../include/net-snmp/library/vacm.h -./table_array.lo: ../../include/net-snmp/snmpv3_api.h -./table_array.lo: ../../include/net-snmp/library/snmpv3.h -./table_array.lo: ../../include/net-snmp/library/transform_oids.h -./table_array.lo: ../../include/net-snmp/library/keytools.h -./table_array.lo: ../../include/net-snmp/library/scapi.h -./table_array.lo: ../../include/net-snmp/library/lcd_time.h -./table_array.lo: ../../include/net-snmp/library/snmp_secmod.h -./table_array.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_array.lo: ../../include/net-snmp/library/snmptsm.h -./table_array.lo: ../../include/net-snmp/library/snmpusm.h -./table_array.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./table_array.lo: ../../include/net-snmp/agent/mib_module_config.h -./table_array.lo: ../../include/net-snmp/agent/agent_module_config.h -./table_array.lo: ../../include/net-snmp/agent/snmp_agent.h -./table_array.lo: ../../include/net-snmp/agent/snmp_vars.h -./table_array.lo: ../../include/net-snmp/agent/agent_handler.h -./table_array.lo: ../../include/net-snmp/agent/var_struct.h -./table_array.lo: ../../include/net-snmp/agent/agent_registry.h -./table_array.lo: ../../include/net-snmp/library/fd_event_manager.h -./table_array.lo: ../../include/net-snmp/agent/ds_agent.h -./table_array.lo: ../../include/net-snmp/agent/agent_read_config.h -./table_array.lo: ../../include/net-snmp/agent/agent_trap.h -./table_array.lo: ../../include/net-snmp/agent/all_helpers.h -./table_array.lo: ../../include/net-snmp/agent/instance.h -./table_array.lo: ../../include/net-snmp/agent/baby_steps.h -./table_array.lo: ../../include/net-snmp/agent/scalar.h -./table_array.lo: ../../include/net-snmp/agent/scalar_group.h -./table_array.lo: ../../include/net-snmp/agent/watcher.h -./table_array.lo: ../../include/net-snmp/agent/multiplexer.h -./table_array.lo: ../../include/net-snmp/agent/null.h -./table_array.lo: ../../include/net-snmp/agent/debug_handler.h -./table_array.lo: ../../include/net-snmp/agent/cache_handler.h -./table_array.lo: ../../include/net-snmp/agent/old_api.h -./table_array.lo: ../../include/net-snmp/agent/read_only.h -./table_array.lo: ../../include/net-snmp/agent/row_merge.h -./table_array.lo: ../../include/net-snmp/agent/serialize.h -./table_array.lo: ../../include/net-snmp/agent/bulk_to_next.h -./table_array.lo: ../../include/net-snmp/agent/mode_end_call.h -./table_array.lo: ../../include/net-snmp/agent/table.h -./table_array.lo: ../../include/net-snmp/agent/table_data.h -./table_array.lo: ../../include/net-snmp/agent/table_dataset.h -./table_array.lo: ../../include/net-snmp/agent/table_tdata.h -./table_array.lo: ../../include/net-snmp/agent/table_iterator.h -./table_array.lo: ../../include/net-snmp/agent/table_container.h -./table_array.lo: ../../include/net-snmp/agent/table_array.h -./table_array.lo: ../../include/net-snmp/agent/mfd.h -./table_array.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./table.lo: ../../include/net-snmp/net-snmp-config.h ./table.lo: ../../include/net-snmp/net-snmp-features.h ./table.lo: ../../include/net-snmp/net-snmp-includes.h @@ -2075,6 +1986,7 @@ ./table.lo: ../../include/net-snmp/pdu_api.h ./table.lo: ../../include/net-snmp/library/asn1.h ./table.lo: ../../include/net-snmp/output_api.h +./table.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table.lo: ../../include/net-snmp/library/snmp_debug.h ./table.lo: ../../include/net-snmp/library/snmp_logging.h ./table.lo: ../../include/net-snmp/session_api.h @@ -2092,6 +2004,7 @@ ./table.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table.lo: ../../include/net-snmp/library/ucd_compat.h ./table.lo: ../../include/net-snmp/library/mib.h ./table.lo: ../../include/net-snmp/mib_api.h @@ -2110,7 +2023,6 @@ ./table.lo: ../../include/net-snmp/library/data_list.h ./table.lo: ../../include/net-snmp/library/check_varbind.h ./table.lo: ../../include/net-snmp/library/container.h -./table.lo: ../../include/net-snmp/library/factory.h ./table.lo: ../../include/net-snmp/library/container_binary_array.h ./table.lo: ../../include/net-snmp/library/container_list_ssll.h ./table.lo: ../../include/net-snmp/library/container_iterator.h @@ -2131,8 +2043,8 @@ ./table.lo: ../../include/net-snmp/library/lcd_time.h ./table.lo: ../../include/net-snmp/library/snmp_secmod.h ./table.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table.lo: ../../include/net-snmp/library/snmptsm.h ./table.lo: ../../include/net-snmp/library/snmpusm.h +./table.lo: ../../include/net-snmp/library/snmptsm.h ./table.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table.lo: ../../include/net-snmp/agent/mib_module_config.h ./table.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2170,6 +2082,115 @@ ./table.lo: ../../include/net-snmp/agent/table_array.h ./table.lo: ../../include/net-snmp/agent/mfd.h ./table.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./table_array.lo: ../../include/net-snmp/net-snmp-config.h +./table_array.lo: ../../include/net-snmp/net-snmp-features.h +./table_array.lo: ../../include/net-snmp/net-snmp-includes.h +./table_array.lo: ../../include/net-snmp/definitions.h +./table_array.lo: ../../include/net-snmp/types.h +./table_array.lo: ../../include/net-snmp/library/oid.h +./table_array.lo: ../../include/net-snmp/library/types.h +./table_array.lo: ../../include/net-snmp/library/snmp_api.h +./table_array.lo: ../../include/net-snmp/varbind_api.h +./table_array.lo: ../../include/net-snmp/library/snmp_client.h +./table_array.lo: ../../include/net-snmp/pdu_api.h +./table_array.lo: ../../include/net-snmp/library/asn1.h +./table_array.lo: ../../include/net-snmp/output_api.h +./table_array.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./table_array.lo: ../../include/net-snmp/library/snmp_debug.h +./table_array.lo: ../../include/net-snmp/library/snmp_logging.h +./table_array.lo: ../../include/net-snmp/session_api.h +./table_array.lo: ../../include/net-snmp/library/callback.h +./table_array.lo: ../../include/net-snmp/library/snmp_transport.h +./table_array.lo: ../../include/net-snmp/library/snmp_service.h +./table_array.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./table_array.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./table_array.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_array.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./table_array.lo: ../../include/net-snmp/library/ucd_compat.h +./table_array.lo: ../../include/net-snmp/library/mib.h +./table_array.lo: ../../include/net-snmp/mib_api.h +./table_array.lo: ../../include/net-snmp/library/parse.h +./table_array.lo: ../../include/net-snmp/library/oid_stash.h +./table_array.lo: ../../include/net-snmp/library/snmp_impl.h +./table_array.lo: ../../include/net-snmp/library/snmp.h +./table_array.lo: ../../include/net-snmp/library/snmp-tc.h +./table_array.lo: ../../include/net-snmp/library/getopt.h +./table_array.lo: ../../include/net-snmp/utilities.h +./table_array.lo: ../../include/net-snmp/library/system.h +./table_array.lo: ../../include/net-snmp/library/tools.h +./table_array.lo: ../../include/net-snmp/library/int64.h +./table_array.lo: ../../include/net-snmp/library/mt_support.h +./table_array.lo: ../../include/net-snmp/library/snmp_alarm.h +./table_array.lo: ../../include/net-snmp/library/data_list.h +./table_array.lo: ../../include/net-snmp/library/check_varbind.h +./table_array.lo: ../../include/net-snmp/library/container.h +./table_array.lo: ../../include/net-snmp/library/container_binary_array.h +./table_array.lo: ../../include/net-snmp/library/container_list_ssll.h +./table_array.lo: ../../include/net-snmp/library/container_iterator.h +./table_array.lo: ../../include/net-snmp/library/container.h +./table_array.lo: ../../include/net-snmp/library/snmp_assert.h +./table_array.lo: ../../include/net-snmp/version.h +./table_array.lo: ../../include/net-snmp/config_api.h +./table_array.lo: ../../include/net-snmp/library/read_config.h +./table_array.lo: ../../include/net-snmp/library/default_store.h +./table_array.lo: ../../include/net-snmp/library/snmp_parse_args.h +./table_array.lo: ../../include/net-snmp/library/snmp_enum.h +./table_array.lo: ../../include/net-snmp/library/vacm.h +./table_array.lo: ../../include/net-snmp/snmpv3_api.h +./table_array.lo: ../../include/net-snmp/library/snmpv3.h +./table_array.lo: ../../include/net-snmp/library/transform_oids.h +./table_array.lo: ../../include/net-snmp/library/keytools.h +./table_array.lo: ../../include/net-snmp/library/scapi.h +./table_array.lo: ../../include/net-snmp/library/lcd_time.h +./table_array.lo: ../../include/net-snmp/library/snmp_secmod.h +./table_array.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./table_array.lo: ../../include/net-snmp/library/snmpusm.h +./table_array.lo: ../../include/net-snmp/library/snmptsm.h +./table_array.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./table_array.lo: ../../include/net-snmp/agent/mib_module_config.h +./table_array.lo: ../../include/net-snmp/agent/agent_module_config.h +./table_array.lo: ../../include/net-snmp/agent/snmp_agent.h +./table_array.lo: ../../include/net-snmp/agent/snmp_vars.h +./table_array.lo: ../../include/net-snmp/agent/agent_handler.h +./table_array.lo: ../../include/net-snmp/agent/var_struct.h +./table_array.lo: ../../include/net-snmp/agent/agent_registry.h +./table_array.lo: ../../include/net-snmp/library/fd_event_manager.h +./table_array.lo: ../../include/net-snmp/agent/ds_agent.h +./table_array.lo: ../../include/net-snmp/agent/agent_read_config.h +./table_array.lo: ../../include/net-snmp/agent/agent_trap.h +./table_array.lo: ../../include/net-snmp/agent/all_helpers.h +./table_array.lo: ../../include/net-snmp/agent/instance.h +./table_array.lo: ../../include/net-snmp/agent/baby_steps.h +./table_array.lo: ../../include/net-snmp/agent/scalar.h +./table_array.lo: ../../include/net-snmp/agent/scalar_group.h +./table_array.lo: ../../include/net-snmp/agent/watcher.h +./table_array.lo: ../../include/net-snmp/agent/multiplexer.h +./table_array.lo: ../../include/net-snmp/agent/null.h +./table_array.lo: ../../include/net-snmp/agent/debug_handler.h +./table_array.lo: ../../include/net-snmp/agent/cache_handler.h +./table_array.lo: ../../include/net-snmp/agent/old_api.h +./table_array.lo: ../../include/net-snmp/agent/read_only.h +./table_array.lo: ../../include/net-snmp/agent/row_merge.h +./table_array.lo: ../../include/net-snmp/agent/serialize.h +./table_array.lo: ../../include/net-snmp/agent/bulk_to_next.h +./table_array.lo: ../../include/net-snmp/agent/mode_end_call.h +./table_array.lo: ../../include/net-snmp/agent/table.h +./table_array.lo: ../../include/net-snmp/agent/table_data.h +./table_array.lo: ../../include/net-snmp/agent/table_dataset.h +./table_array.lo: ../../include/net-snmp/agent/table_tdata.h +./table_array.lo: ../../include/net-snmp/agent/table_iterator.h +./table_array.lo: ../../include/net-snmp/agent/table_container.h +./table_array.lo: ../../include/net-snmp/agent/table_array.h +./table_array.lo: ../../include/net-snmp/agent/mfd.h +./table_array.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./table_container.lo: ../../include/net-snmp/net-snmp-config.h ./table_container.lo: ../../include/net-snmp/net-snmp-features.h ./table_container.lo: ../../include/net-snmp/net-snmp-includes.h @@ -2183,6 +2204,7 @@ ./table_container.lo: ../../include/net-snmp/pdu_api.h ./table_container.lo: ../../include/net-snmp/library/asn1.h ./table_container.lo: ../../include/net-snmp/output_api.h +./table_container.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table_container.lo: ../../include/net-snmp/library/snmp_debug.h ./table_container.lo: ../../include/net-snmp/library/snmp_logging.h ./table_container.lo: ../../include/net-snmp/session_api.h @@ -2200,6 +2222,7 @@ ./table_container.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table_container.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table_container.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_container.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table_container.lo: ../../include/net-snmp/library/ucd_compat.h ./table_container.lo: ../../include/net-snmp/library/mib.h ./table_container.lo: ../../include/net-snmp/mib_api.h @@ -2218,7 +2241,6 @@ ./table_container.lo: ../../include/net-snmp/library/data_list.h ./table_container.lo: ../../include/net-snmp/library/check_varbind.h ./table_container.lo: ../../include/net-snmp/library/container.h -./table_container.lo: ../../include/net-snmp/library/factory.h ./table_container.lo: ../../include/net-snmp/library/container_binary_array.h ./table_container.lo: ../../include/net-snmp/library/container_list_ssll.h ./table_container.lo: ../../include/net-snmp/library/container_iterator.h @@ -2239,8 +2261,8 @@ ./table_container.lo: ../../include/net-snmp/library/lcd_time.h ./table_container.lo: ../../include/net-snmp/library/snmp_secmod.h ./table_container.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_container.lo: ../../include/net-snmp/library/snmptsm.h ./table_container.lo: ../../include/net-snmp/library/snmpusm.h +./table_container.lo: ../../include/net-snmp/library/snmptsm.h ./table_container.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table_container.lo: ../../include/net-snmp/agent/mib_module_config.h ./table_container.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2291,6 +2313,7 @@ ./table_data.lo: ../../include/net-snmp/pdu_api.h ./table_data.lo: ../../include/net-snmp/library/asn1.h ./table_data.lo: ../../include/net-snmp/output_api.h +./table_data.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table_data.lo: ../../include/net-snmp/library/snmp_debug.h ./table_data.lo: ../../include/net-snmp/library/snmp_logging.h ./table_data.lo: ../../include/net-snmp/session_api.h @@ -2308,6 +2331,7 @@ ./table_data.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table_data.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table_data.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_data.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table_data.lo: ../../include/net-snmp/library/ucd_compat.h ./table_data.lo: ../../include/net-snmp/library/mib.h ./table_data.lo: ../../include/net-snmp/mib_api.h @@ -2326,7 +2350,6 @@ ./table_data.lo: ../../include/net-snmp/library/data_list.h ./table_data.lo: ../../include/net-snmp/library/check_varbind.h ./table_data.lo: ../../include/net-snmp/library/container.h -./table_data.lo: ../../include/net-snmp/library/factory.h ./table_data.lo: ../../include/net-snmp/library/container_binary_array.h ./table_data.lo: ../../include/net-snmp/library/container_list_ssll.h ./table_data.lo: ../../include/net-snmp/library/container_iterator.h @@ -2347,8 +2370,8 @@ ./table_data.lo: ../../include/net-snmp/library/lcd_time.h ./table_data.lo: ../../include/net-snmp/library/snmp_secmod.h ./table_data.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_data.lo: ../../include/net-snmp/library/snmptsm.h ./table_data.lo: ../../include/net-snmp/library/snmpusm.h +./table_data.lo: ../../include/net-snmp/library/snmptsm.h ./table_data.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table_data.lo: ../../include/net-snmp/agent/mib_module_config.h ./table_data.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2399,6 +2422,7 @@ ./table_dataset.lo: ../../include/net-snmp/pdu_api.h ./table_dataset.lo: ../../include/net-snmp/library/asn1.h ./table_dataset.lo: ../../include/net-snmp/output_api.h +./table_dataset.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table_dataset.lo: ../../include/net-snmp/library/snmp_debug.h ./table_dataset.lo: ../../include/net-snmp/library/snmp_logging.h ./table_dataset.lo: ../../include/net-snmp/session_api.h @@ -2416,6 +2440,7 @@ ./table_dataset.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table_dataset.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table_dataset.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_dataset.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table_dataset.lo: ../../include/net-snmp/library/ucd_compat.h ./table_dataset.lo: ../../include/net-snmp/library/mib.h ./table_dataset.lo: ../../include/net-snmp/mib_api.h @@ -2434,7 +2459,6 @@ ./table_dataset.lo: ../../include/net-snmp/library/data_list.h ./table_dataset.lo: ../../include/net-snmp/library/check_varbind.h ./table_dataset.lo: ../../include/net-snmp/library/container.h -./table_dataset.lo: ../../include/net-snmp/library/factory.h ./table_dataset.lo: ../../include/net-snmp/library/container_binary_array.h ./table_dataset.lo: ../../include/net-snmp/library/container_list_ssll.h ./table_dataset.lo: ../../include/net-snmp/library/container_iterator.h @@ -2455,8 +2479,8 @@ ./table_dataset.lo: ../../include/net-snmp/library/lcd_time.h ./table_dataset.lo: ../../include/net-snmp/library/snmp_secmod.h ./table_dataset.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_dataset.lo: ../../include/net-snmp/library/snmptsm.h ./table_dataset.lo: ../../include/net-snmp/library/snmpusm.h +./table_dataset.lo: ../../include/net-snmp/library/snmptsm.h ./table_dataset.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table_dataset.lo: ../../include/net-snmp/agent/mib_module_config.h ./table_dataset.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2507,6 +2531,7 @@ ./table_iterator.lo: ../../include/net-snmp/pdu_api.h ./table_iterator.lo: ../../include/net-snmp/library/asn1.h ./table_iterator.lo: ../../include/net-snmp/output_api.h +./table_iterator.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table_iterator.lo: ../../include/net-snmp/library/snmp_debug.h ./table_iterator.lo: ../../include/net-snmp/library/snmp_logging.h ./table_iterator.lo: ../../include/net-snmp/session_api.h @@ -2524,6 +2549,7 @@ ./table_iterator.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table_iterator.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table_iterator.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_iterator.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table_iterator.lo: ../../include/net-snmp/library/ucd_compat.h ./table_iterator.lo: ../../include/net-snmp/library/mib.h ./table_iterator.lo: ../../include/net-snmp/mib_api.h @@ -2542,7 +2568,6 @@ ./table_iterator.lo: ../../include/net-snmp/library/data_list.h ./table_iterator.lo: ../../include/net-snmp/library/check_varbind.h ./table_iterator.lo: ../../include/net-snmp/library/container.h -./table_iterator.lo: ../../include/net-snmp/library/factory.h ./table_iterator.lo: ../../include/net-snmp/library/container_binary_array.h ./table_iterator.lo: ../../include/net-snmp/library/container_list_ssll.h ./table_iterator.lo: ../../include/net-snmp/library/container_iterator.h @@ -2563,8 +2588,8 @@ ./table_iterator.lo: ../../include/net-snmp/library/lcd_time.h ./table_iterator.lo: ../../include/net-snmp/library/snmp_secmod.h ./table_iterator.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_iterator.lo: ../../include/net-snmp/library/snmptsm.h ./table_iterator.lo: ../../include/net-snmp/library/snmpusm.h +./table_iterator.lo: ../../include/net-snmp/library/snmptsm.h ./table_iterator.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table_iterator.lo: ../../include/net-snmp/agent/mib_module_config.h ./table_iterator.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2616,6 +2641,7 @@ ./table_row.lo: ../../include/net-snmp/pdu_api.h ./table_row.lo: ../../include/net-snmp/library/asn1.h ./table_row.lo: ../../include/net-snmp/output_api.h +./table_row.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table_row.lo: ../../include/net-snmp/library/snmp_debug.h ./table_row.lo: ../../include/net-snmp/library/snmp_logging.h ./table_row.lo: ../../include/net-snmp/session_api.h @@ -2633,6 +2659,7 @@ ./table_row.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table_row.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table_row.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_row.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table_row.lo: ../../include/net-snmp/library/ucd_compat.h ./table_row.lo: ../../include/net-snmp/library/mib.h ./table_row.lo: ../../include/net-snmp/mib_api.h @@ -2651,7 +2678,6 @@ ./table_row.lo: ../../include/net-snmp/library/data_list.h ./table_row.lo: ../../include/net-snmp/library/check_varbind.h ./table_row.lo: ../../include/net-snmp/library/container.h -./table_row.lo: ../../include/net-snmp/library/factory.h ./table_row.lo: ../../include/net-snmp/library/container_binary_array.h ./table_row.lo: ../../include/net-snmp/library/container_list_ssll.h ./table_row.lo: ../../include/net-snmp/library/container_iterator.h @@ -2672,8 +2698,8 @@ ./table_row.lo: ../../include/net-snmp/library/lcd_time.h ./table_row.lo: ../../include/net-snmp/library/snmp_secmod.h ./table_row.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_row.lo: ../../include/net-snmp/library/snmptsm.h ./table_row.lo: ../../include/net-snmp/library/snmpusm.h +./table_row.lo: ../../include/net-snmp/library/snmptsm.h ./table_row.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table_row.lo: ../../include/net-snmp/agent/mib_module_config.h ./table_row.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2724,6 +2750,7 @@ ./table_tdata.lo: ../../include/net-snmp/pdu_api.h ./table_tdata.lo: ../../include/net-snmp/library/asn1.h ./table_tdata.lo: ../../include/net-snmp/output_api.h +./table_tdata.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./table_tdata.lo: ../../include/net-snmp/library/snmp_debug.h ./table_tdata.lo: ../../include/net-snmp/library/snmp_logging.h ./table_tdata.lo: ../../include/net-snmp/session_api.h @@ -2741,6 +2768,7 @@ ./table_tdata.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./table_tdata.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./table_tdata.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./table_tdata.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./table_tdata.lo: ../../include/net-snmp/library/ucd_compat.h ./table_tdata.lo: ../../include/net-snmp/library/mib.h ./table_tdata.lo: ../../include/net-snmp/mib_api.h @@ -2759,7 +2787,6 @@ ./table_tdata.lo: ../../include/net-snmp/library/data_list.h ./table_tdata.lo: ../../include/net-snmp/library/check_varbind.h ./table_tdata.lo: ../../include/net-snmp/library/container.h -./table_tdata.lo: ../../include/net-snmp/library/factory.h ./table_tdata.lo: ../../include/net-snmp/library/container_binary_array.h ./table_tdata.lo: ../../include/net-snmp/library/container_list_ssll.h ./table_tdata.lo: ../../include/net-snmp/library/container_iterator.h @@ -2780,8 +2807,8 @@ ./table_tdata.lo: ../../include/net-snmp/library/lcd_time.h ./table_tdata.lo: ../../include/net-snmp/library/snmp_secmod.h ./table_tdata.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./table_tdata.lo: ../../include/net-snmp/library/snmptsm.h ./table_tdata.lo: ../../include/net-snmp/library/snmpusm.h +./table_tdata.lo: ../../include/net-snmp/library/snmptsm.h ./table_tdata.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./table_tdata.lo: ../../include/net-snmp/agent/mib_module_config.h ./table_tdata.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -2832,6 +2859,7 @@ ./watcher.lo: ../../include/net-snmp/pdu_api.h ./watcher.lo: ../../include/net-snmp/library/asn1.h ./watcher.lo: ../../include/net-snmp/output_api.h +./watcher.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./watcher.lo: ../../include/net-snmp/library/snmp_debug.h ./watcher.lo: ../../include/net-snmp/library/snmp_logging.h ./watcher.lo: ../../include/net-snmp/session_api.h @@ -2849,6 +2877,7 @@ ./watcher.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./watcher.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./watcher.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./watcher.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./watcher.lo: ../../include/net-snmp/library/ucd_compat.h ./watcher.lo: ../../include/net-snmp/library/mib.h ./watcher.lo: ../../include/net-snmp/mib_api.h @@ -2867,7 +2896,6 @@ ./watcher.lo: ../../include/net-snmp/library/data_list.h ./watcher.lo: ../../include/net-snmp/library/check_varbind.h ./watcher.lo: ../../include/net-snmp/library/container.h -./watcher.lo: ../../include/net-snmp/library/factory.h ./watcher.lo: ../../include/net-snmp/library/container_binary_array.h ./watcher.lo: ../../include/net-snmp/library/container_list_ssll.h ./watcher.lo: ../../include/net-snmp/library/container_iterator.h @@ -2888,8 +2916,8 @@ ./watcher.lo: ../../include/net-snmp/library/lcd_time.h ./watcher.lo: ../../include/net-snmp/library/snmp_secmod.h ./watcher.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./watcher.lo: ../../include/net-snmp/library/snmptsm.h ./watcher.lo: ../../include/net-snmp/library/snmpusm.h +./watcher.lo: ../../include/net-snmp/library/snmptsm.h ./watcher.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./watcher.lo: ../../include/net-snmp/agent/mib_module_config.h ./watcher.lo: ../../include/net-snmp/agent/agent_module_config.h diff --git a/agent/helpers/Makefile.in b/agent/helpers/Makefile.in index 5178b79..51f409d 100644 --- a/agent/helpers/Makefile.in +++ b/agent/helpers/Makefile.in @@ -2,8 +2,6 @@ # Makefile for libnetsnmphelpers # -top_builddir=../.. - # use GNU vpath, if available, to only set a path for source and headers # VPATH will pick up objects too, which is bad if you are sharing a # source dir... @@ -34,5 +32,5 @@ LOBJS = dummy.lo all: standardall libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION): $(LOBJS) - $(LIB_LD_CMD) $@ $(LOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) $(LIB_LD_LIBS) + $(LIB_LD_CMD) $@ $(LOBJS) $(LDFLAGS) $(RANLIB) $@ diff --git a/agent/helpers/all_helpers.c b/agent/helpers/all_helpers.c index e1e1b78..76089a6 100644 --- a/agent/helpers/all_helpers.c +++ b/agent/helpers/all_helpers.c @@ -13,7 +13,7 @@ #include #include -netsnmp_feature_child_of(mib_helpers, libnetsnmpagent) +netsnmp_feature_child_of(mib_helpers, libnetsnmpagent); /** call the initialization sequence for all handlers with init_ routines. */ diff --git a/agent/helpers/baby_steps.c b/agent/helpers/baby_steps.c index d79acbc..489a3bf 100644 --- a/agent/helpers/baby_steps.c +++ b/agent/helpers/baby_steps.c @@ -1,17 +1,22 @@ /* * baby_steps.c * $Id$ + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include #include -netsnmp_feature_provide(baby_steps) -netsnmp_feature_child_of(baby_steps, mib_helpers) +netsnmp_feature_provide(baby_steps); +netsnmp_feature_child_of(baby_steps, mib_helpers); #ifdef NETSNMP_FEATURE_REQUIRE_BABY_STEPS -netsnmp_feature_require(check_requests_error) +netsnmp_feature_require(check_requests_error); #endif #ifndef NETSNMP_FEATURE_REMOVE_BABY_STEPS @@ -142,8 +147,7 @@ _baby_steps_helper(netsnmp_mib_handler *handler, * merge helper as well (or if requests are serialized). */ bs_modes->completed = 0; - /** fall through */ - + /* FALL THROUGH */ case MODE_SET_RESERVE2: case MODE_SET_ACTION: case MODE_SET_COMMIT: @@ -351,13 +355,20 @@ _baby_steps_helper(netsnmp_mib_handler *handler, * handler as a run-time injectable handler for configuration file * use. */ -netsnmp_feature_child_of(netsnmp_baby_steps_handler_init,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_baby_steps_handler_init,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_BABY_STEPS_HANDLER_INIT void netsnmp_baby_steps_handler_init(void) { - netsnmp_register_handler_by_name("baby_steps", - netsnmp_baby_steps_handler_get(BABY_STEP_ALL)); + netsnmp_mib_handler *handler = + netsnmp_baby_steps_handler_get(BABY_STEP_ALL); + if (NULL == handler) { + netsnmp_handler_free(handler); + snmp_log(LOG_ERR, "could not create baby steps handler\n"); + return; + } + + netsnmp_register_handler_by_name("baby_steps", handler); } #endif /* NETSNMP_FEATURE_REMOVE_NETSNMP_BABY_STEPS_HANDLER_INIT */ diff --git a/agent/helpers/bulk_to_next.c b/agent/helpers/bulk_to_next.c index e607eda..ed57aa4 100644 --- a/agent/helpers/bulk_to_next.c +++ b/agent/helpers/bulk_to_next.c @@ -1,3 +1,13 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include #include @@ -132,8 +142,11 @@ netsnmp_bulk_to_next_helper(netsnmp_mib_handler *handler, void netsnmp_init_bulk_to_next_helper(void) { - netsnmp_register_handler_by_name("bulk_to_next", - netsnmp_get_bulk_to_next_handler()); + netsnmp_mib_handler *hnd = netsnmp_get_bulk_to_next_handler(); + if (!hnd) + return; + + netsnmp_register_handler_by_name("bulk_to_next", hnd); } /** @} */ diff --git a/agent/helpers/cache_handler.c b/agent/helpers/cache_handler.c index 520a4cf..2c007a8 100644 --- a/agent/helpers/cache_handler.c +++ b/agent/helpers/cache_handler.c @@ -7,11 +7,16 @@ * Copyright (C) 2007 Apple, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -22,10 +27,10 @@ #include -netsnmp_feature_child_of(cache_handler, mib_helpers) +netsnmp_feature_child_of(cache_handler, mib_helpers); -netsnmp_feature_child_of(cache_find_by_oid, cache_handler) -netsnmp_feature_child_of(cache_get_head, cache_handler) +netsnmp_feature_child_of(cache_find_by_oid, cache_handler); +netsnmp_feature_child_of(cache_get_head, cache_handler); static netsnmp_cache *cache_head = NULL; static int cache_outstanding_valid = 0; @@ -428,38 +433,68 @@ netsnmp_get_cache_handler(int timeout, NetsnmpCacheLoad * load_hook, return ret; } +#if !defined(NETSNMP_FEATURE_REMOVE_NETSNMP_CACHE_HANDLER_REGISTER) || !defined(NETSNMP_FEATURE_REMOVE_NETSNMP_REGISTER_CACHE_HANDLER) +static int +_cache_handler_register(netsnmp_handler_registration * reginfo, + netsnmp_mib_handler *handler) +{ + /** success path */ + if (reginfo && handler && + (netsnmp_inject_handler(reginfo, handler) == SNMPERR_SUCCESS)) + return netsnmp_register_handler(reginfo); + + /** error path */ + snmp_log(LOG_ERR, "could not register cache handler\n"); + + if (handler) + netsnmp_handler_free(handler); + + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; +} +#endif + /** functionally the same as calling netsnmp_register_handler() but also * injects a cache handler at the same time for you. */ -netsnmp_feature_child_of(netsnmp_cache_handler_register,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_cache_handler_register,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_CACHE_HANDLER_REGISTER int netsnmp_cache_handler_register(netsnmp_handler_registration * reginfo, netsnmp_cache* cache) { - netsnmp_mib_handler *handler = NULL; - handler = netsnmp_cache_handler_get(cache); + if ((NULL == reginfo) || (NULL == cache)) { + snmp_log(LOG_ERR, "bad param in netsnmp_cache_handler_register\n"); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } - netsnmp_inject_handler(reginfo, handler); - return netsnmp_register_handler(reginfo); + return _cache_handler_register(reginfo, netsnmp_cache_handler_get(cache)); } #endif /* NETSNMP_FEATURE_REMOVE_NETSNMP_CACHE_HANDLER_REGISTER */ /** functionally the same as calling netsnmp_register_handler() but also * injects a cache handler at the same time for you. */ -netsnmp_feature_child_of(netsnmp_register_cache_handler,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_register_cache_handler,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_REGISTER_CACHE_HANDLER int netsnmp_register_cache_handler(netsnmp_handler_registration * reginfo, int timeout, NetsnmpCacheLoad * load_hook, NetsnmpCacheFree * free_hook) { - netsnmp_mib_handler *handler = NULL; - handler = netsnmp_get_cache_handler(timeout, load_hook, free_hook, - reginfo->rootoid, - reginfo->rootoid_len); + netsnmp_mib_handler *handler; + + if (NULL == reginfo) { + snmp_log(LOG_ERR, "bad param in netsnmp_cache_handler_register\n"); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + + handler = netsnmp_get_cache_handler(timeout, load_hook, free_hook, + reginfo->rootoid, + reginfo->rootoid_len); - netsnmp_inject_handler(reginfo, handler); - return netsnmp_register_handler(reginfo); + return _cache_handler_register(reginfo, handler); } #endif /* NETSNMP_FEATURE_REMOVE_NETSNMP_REGISTER_CACHE_HANDLER */ @@ -503,7 +538,7 @@ netsnmp_cache_reqinfo_extract(netsnmp_agent_request_info * reqinfo, } /** Extract the cache information for a given request (PDU) */ -netsnmp_feature_child_of(netsnmp_extract_cache_info,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_extract_cache_info,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_EXTRACT_CACHE_INFO netsnmp_cache * netsnmp_extract_cache_info(netsnmp_agent_request_info * reqinfo) @@ -559,7 +594,7 @@ netsnmp_cache_is_valid(netsnmp_agent_request_info * reqinfo, /** Is the cache valid for a given request? * for backwards compatability. netsnmp_cache_is_valid() is preferred. */ -netsnmp_feature_child_of(netsnmp_is_cache_valid,netsnmp_unused) +netsnmp_feature_child_of(netsnmp_is_cache_valid,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_IS_CACHE_VALID int netsnmp_is_cache_valid(netsnmp_agent_request_info * reqinfo) @@ -596,7 +631,7 @@ netsnmp_cache_helper_handler(netsnmp_mib_handler * handler, "cache not found, disabled or had no load method\n")); return SNMP_ERR_NOERROR; } - snprintf(addrstr,sizeof(addrstr), "%ld", (long int)cache); + snprintf(addrstr, sizeof(addrstr), "%p", cache); DEBUGMSGTL(("helper:cache_handler", "using cache %s: ", addrstr)); DEBUGMSGOID(("helper:cache_handler", cache->rootoid, cache->rootoid_len)); DEBUGMSG(("helper:cache_handler", "\n")); diff --git a/agent/helpers/debug_handler.c b/agent/helpers/debug_handler.c index e4a8438..342e8dc 100644 --- a/agent/helpers/debug_handler.c +++ b/agent/helpers/debug_handler.c @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include @@ -21,7 +26,7 @@ * All debugging output is done via the standard debugging routines * with a token name of "helper:debug", so use the -Dhelper:debug * command line flag to see the output when running the snmpd - * demon. It's not recommended you compile this into a handler chain + * daemon. It's not recommended you compile this into a handler chain * during compile time, but instead use the "injectHandler" token in * the snmpd.conf file (or similar) to add it to the chain later: * @@ -161,6 +166,11 @@ netsnmp_debug_helper(netsnmp_mib_handler *handler, void netsnmp_init_debug_helper(void) { - netsnmp_register_handler_by_name("debug", netsnmp_get_debug_handler()); + netsnmp_mib_handler *handler = netsnmp_get_debug_handler(); + if (!handler) { + snmp_log(LOG_ERR, "could not create debug handler\n"); + return; + } + netsnmp_register_handler_by_name("debug", handler); } /** @} */ diff --git a/agent/helpers/instance.c b/agent/helpers/instance.c index a5ee841..4afa723 100644 --- a/agent/helpers/instance.c +++ b/agent/helpers/instance.c @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include @@ -17,7 +22,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -27,8 +32,8 @@ #include #include -netsnmp_feature_provide(instance) -netsnmp_feature_child_of(instance, mib_helpers) +netsnmp_feature_provide(instance); +netsnmp_feature_child_of(instance, mib_helpers); typedef struct netsnmp_num_file_instance_s { int refcnt; @@ -38,6 +43,7 @@ typedef struct netsnmp_num_file_instance_s { int flags; } netsnmp_num_file_instance; +#ifndef NETSNMP_FEATURE_REMOVE_REGISTER_NUM_FILE_INSTANCE /** @defgroup instance instance * Process individual MIB instances easily. * @ingroup leaf @@ -59,6 +65,7 @@ netsnmp_num_file_instance_deref(netsnmp_num_file_instance *nfi) free(nfi); } } +#endif /* NETSNMP_FEATURE_REMOVE_REGISTER_NUM_FILE_INSTANCE */ /** * Creates an instance helper handler, calls netsnmp_create_handler, which @@ -96,9 +103,17 @@ int netsnmp_register_instance(netsnmp_handler_registration *reginfo) { netsnmp_mib_handler *handler = netsnmp_get_instance_handler(); - handler->flags |= MIB_HANDLER_INSTANCE; - netsnmp_inject_handler(reginfo, handler); - return netsnmp_register_serialize(reginfo); + if (handler) { + handler->flags |= MIB_HANDLER_INSTANCE; + if (netsnmp_inject_handler(reginfo, handler) == SNMPERR_SUCCESS) + return netsnmp_register_serialize(reginfo); + } + + snmp_log(LOG_ERR, "failed to register instance\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } /** @@ -122,11 +137,27 @@ netsnmp_register_instance(netsnmp_handler_registration *reginfo) int netsnmp_register_read_only_instance(netsnmp_handler_registration *reginfo) { - netsnmp_inject_handler(reginfo, netsnmp_get_instance_handler()); - netsnmp_inject_handler(reginfo, netsnmp_get_read_only_handler()); - return netsnmp_register_serialize(reginfo); + netsnmp_mib_handler *h1, *h2; + if (!reginfo) + return MIB_REGISTRATION_FAILED; + + h1 = netsnmp_get_instance_handler(); + h2 = netsnmp_get_read_only_handler(); + if (h1 && h2 && netsnmp_inject_handler(reginfo, h1) == SNMPERR_SUCCESS) { + h1 = NULL; + if (netsnmp_inject_handler(reginfo, h2) == SNMPERR_SUCCESS) + return netsnmp_register_serialize(reginfo); + } + + snmp_log(LOG_ERR, "failed to register read only instance\n"); + netsnmp_handler_free(h1); + netsnmp_handler_free(h2); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } +#ifndef NETSNMP_FEATURE_REMOVE_REGISTER_NUM_FILE_INSTANCE static netsnmp_handler_registration * get_reg(const char *name, @@ -142,34 +173,48 @@ get_reg(const char *name, if (subhandler) { myreg = - netsnmp_create_handler_registration(name, - subhandler, - reg_oid, reg_oid_len, - modes); + netsnmp_create_handler_registration(name, subhandler, reg_oid, + reg_oid_len, modes); + if (!myreg) + return NULL; myhandler = netsnmp_create_handler(ourname, scalarh); + if (!myhandler) { + netsnmp_handler_registration_free(myreg); + return NULL; + } myhandler->myvoid = it; myhandler->data_clone = (void*(*)(void*))netsnmp_num_file_instance_ref; myhandler->data_free = (void(*)(void*))netsnmp_num_file_instance_deref; - netsnmp_inject_handler(myreg, myhandler); + if (netsnmp_inject_handler(myreg, myhandler) != SNMPERR_SUCCESS) { + netsnmp_handler_free(myhandler); + netsnmp_handler_registration_free(myreg); + return NULL; + } } else { - myreg = - netsnmp_create_handler_registration(name, - scalarh, - reg_oid, reg_oid_len, - modes); + myreg = netsnmp_create_handler_registration(name, scalarh, reg_oid, + reg_oid_len, modes); + if (!myreg) + return NULL; myreg->handler->myvoid = it; myreg->handler->data_clone = (void *(*)(void *))netsnmp_num_file_instance_ref; myreg->handler->data_free = (void (*)(void *))netsnmp_num_file_instance_deref; } - if (contextName) + if (contextName) { myreg->contextName = strdup(contextName); + if (!myreg->contextName) { + netsnmp_handler_registration_free(myreg); + return NULL; + } + } + return myreg; } +#endif /* NETSNMP_FEATURE_REMOVE_REGISTER_NUM_FILE_INSTANCE */ /* Watched 'long' instances are writable on both 32-bit and 64-bit systems */ -netsnmp_feature_child_of(read_only_ulong_instance,instance) +netsnmp_feature_child_of(read_only_ulong_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_READ_ONLY_ULONG_INSTANCE int netsnmp_register_read_only_ulong_instance(const char *name, @@ -187,7 +232,7 @@ netsnmp_register_read_only_ulong_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_READ_ONLY_ULONG_INSTANCE */ -netsnmp_feature_child_of(ulong_instance,instance) +netsnmp_feature_child_of(ulong_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_ULONG_INSTANCE int netsnmp_register_ulong_instance(const char *name, @@ -204,7 +249,7 @@ netsnmp_register_ulong_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_ULONG_INSTANCE */ -netsnmp_feature_child_of(read_only_counter32_instance,instance) +netsnmp_feature_child_of(read_only_counter32_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_READ_ONLY_COUNTER32_INSTANCE int netsnmp_register_read_only_counter32_instance(const char *name, @@ -223,7 +268,7 @@ netsnmp_register_read_only_counter32_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_READ_ONLY_COUNTER32_INSTANCE */ -netsnmp_feature_child_of(read_only_long_instance,instance) +netsnmp_feature_child_of(read_only_long_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_READ_ONLY_LONG_INSTANCE int netsnmp_register_read_only_long_instance(const char *name, @@ -240,7 +285,7 @@ netsnmp_register_read_only_long_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_READ_ONLY_LONG_INSTANCE */ -netsnmp_feature_child_of(long_instance,instance) +netsnmp_feature_child_of(long_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_LONG_INSTANCE int netsnmp_register_long_instance(const char *name, @@ -256,7 +301,7 @@ netsnmp_register_long_instance(const char *name, #endif /* NETSNMP_FEATURE_REMOVE_LONG_INSTANCE */ /* Watched 'int' instances are only writable on 32-bit systems */ -netsnmp_feature_child_of(read_only_uint_instance,instance) +netsnmp_feature_child_of(read_only_uint_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_READ_ONLY_UINT_INSTANCE int netsnmp_register_read_only_uint_instance(const char *name, @@ -274,7 +319,7 @@ netsnmp_register_read_only_uint_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_READ_ONLY_UINT_INSTANCE */ -netsnmp_feature_child_of(uint_instance,instance) +netsnmp_feature_child_of(uint_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_UINT_INSTANCE int netsnmp_register_uint_instance(const char *name, @@ -290,7 +335,7 @@ netsnmp_register_uint_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_UINT_INSTANCE */ -netsnmp_feature_child_of(read_only_int_instance,instance) +netsnmp_feature_child_of(read_only_int_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_READ_ONLY_INT_INSTANCE int netsnmp_register_read_only_int_instance(const char *name, @@ -308,7 +353,7 @@ netsnmp_register_read_only_int_instance(const char *name, /* * Compatibility with earlier (inconsistently named) routine */ -netsnmp_feature_child_of(register_read_only_int_instance,netsnmp_unused) +netsnmp_feature_child_of(register_read_only_int_instance,netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_INT_INSTANCE int register_read_only_int_instance(const char *name, @@ -325,7 +370,7 @@ register_read_only_int_instance(const char *name, * Context registrations */ -netsnmp_feature_child_of(register_read_only_ulong_instance_context,instance) +netsnmp_feature_child_of(register_read_only_ulong_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_ULONG_INSTANCE_CONTEXT int netsnmp_register_read_only_ulong_instance_context(const char *name, @@ -347,7 +392,7 @@ netsnmp_register_read_only_ulong_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_ULONG_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_ulong_instance_context,instance) +netsnmp_feature_child_of(register_ulong_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_ULONG_INSTANCE_CONTEXT int netsnmp_register_ulong_instance_context(const char *name, @@ -367,7 +412,7 @@ netsnmp_register_ulong_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_ULONG_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_read_only_counter32_instance_context,instance) +netsnmp_feature_child_of(register_read_only_counter32_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_COUNTER32_INSTANCE_CONTEXT int netsnmp_register_read_only_counter32_instance_context(const char *name, @@ -389,7 +434,7 @@ netsnmp_register_read_only_counter32_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_COUNTER32_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_read_only_long_instance_context,instance) +netsnmp_feature_child_of(register_read_only_long_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_LONG_INSTANCE_CONTEXT int netsnmp_register_read_only_long_instance_context(const char *name, @@ -411,7 +456,7 @@ netsnmp_register_read_only_long_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_LONG_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_long_instance_context,instance) +netsnmp_feature_child_of(register_long_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_LONG_INSTANCE_CONTEXT int netsnmp_register_long_instance_context(const char *name, @@ -431,7 +476,7 @@ netsnmp_register_long_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_LONG_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_int_instance_context,instance) +netsnmp_feature_child_of(register_int_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_INT_INSTANCE_CONTEXT int netsnmp_register_int_instance_context(const char *name, @@ -452,7 +497,7 @@ netsnmp_register_int_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_INT_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_read_only_int_instance_context,instance) +netsnmp_feature_child_of(register_read_only_int_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_INT_INSTANCE_CONTEXT int netsnmp_register_read_only_int_instance_context(const char *name, @@ -476,7 +521,7 @@ netsnmp_register_read_only_int_instance_context(const char *name, /* * Compatibility with earlier (inconsistently named) routine */ -netsnmp_feature_child_of(read_only_int_instance_context,instance) +netsnmp_feature_child_of(read_only_int_instance_context,instance); #ifndef NETSNMP_FEATURE_REMOVE_READ_ONLY_INT_INSTANCE_CONTEXT int register_read_only_int_instance_context(const char *name, @@ -492,7 +537,7 @@ register_read_only_int_instance_context(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_READ_ONLY_INT_INSTANCE_CONTEXT */ -netsnmp_feature_child_of(register_num_file_instance,instance) +netsnmp_feature_child_of(register_num_file_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_NUM_FILE_INSTANCE int netsnmp_register_num_file_instance(const char *name, @@ -536,7 +581,7 @@ netsnmp_register_num_file_instance(const char *name, } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_NUM_FILE_INSTANCE */ -netsnmp_feature_child_of(register_int_instance,instance) +netsnmp_feature_child_of(register_int_instance,instance); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_INT_INSTANCE /** * This function registers an int helper handler to a specified OID. @@ -694,8 +739,7 @@ netsnmp_instance_num_file_handler(netsnmp_mib_handler *handler, if (rc < 0) netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED); - /** fall through */ - + /* FALL THROUGH */ case MODE_SET_COMMIT: case MODE_SET_FREE: if (NULL != nfi->filep) { diff --git a/agent/helpers/mode_end_call.c b/agent/helpers/mode_end_call.c index 0bfcc69..ac5fee3 100644 --- a/agent/helpers/mode_end_call.c +++ b/agent/helpers/mode_end_call.c @@ -16,8 +16,8 @@ #include -netsnmp_feature_provide(mode_end_call) -netsnmp_feature_child_of(mode_end_call, mib_helpers) +netsnmp_feature_provide(mode_end_call); +netsnmp_feature_child_of(mode_end_call, mib_helpers); #ifndef NETSNMP_FEATURE_REMOVE_MODE_END_CALL /** @defgroup mode_end_call mode_end_call diff --git a/agent/helpers/multiplexer.c b/agent/helpers/multiplexer.c index 2a7a664..f4ca18d 100644 --- a/agent/helpers/multiplexer.c +++ b/agent/helpers/multiplexer.c @@ -72,11 +72,13 @@ netsnmp_multiplexer_helper_handler(netsnmp_mib_handler *handler, if (handler) break; /* Deliberate fallthrough to use GetNext handler */ + /* FALL THROUGH */ case MODE_GETNEXT: handler = methods->getnext_handler; if (handler) break; /* Deliberate fallthrough to use Get handler */ + /* FALL THROUGH */ case MODE_GET: handler = methods->get_handler; if (!handler) { diff --git a/agent/helpers/null.c b/agent/helpers/null.c index 97dfc92..1b4b455 100644 --- a/agent/helpers/null.c +++ b/agent/helpers/null.c @@ -1,3 +1,13 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include #include @@ -5,7 +15,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -32,6 +42,16 @@ netsnmp_register_null_context(oid * loc, size_t loc_len, if (contextName) reginfo->contextName = strdup(contextName); reginfo->modes = HANDLER_CAN_DEFAULT | HANDLER_CAN_GETBULK; + + if (!reginfo->handlerName || !reginfo->handler || + (contextName && !reginfo->contextName)) { + snmp_log(LOG_ERR,"null context allocation failure(s)\n"); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + } else { + snmp_log(LOG_ERR,"null context allocation failure\n"); + return MIB_REGISTRATION_FAILED; } return netsnmp_register_handler(reginfo); } diff --git a/agent/helpers/old_api.c b/agent/helpers/old_api.c index d2b99d9..f2fffe3 100644 --- a/agent/helpers/old_api.c +++ b/agent/helpers/old_api.c @@ -1,3 +1,13 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include #include @@ -5,7 +15,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -15,6 +25,17 @@ #include +/* + * mib clients are passed a pointer to a oid buffer. Some mib clients + * * (namely, those first noticed in mibII/vacm.c) modify this oid buffer + * * before they determine if they really need to send results back out + * * using it. If the master agent determined that the client was not the + * * right one to talk with, it will use the same oid buffer to pass to the + * * rest of the clients, which may not longer be valid. This should be + * * fixed in all clients rather than the master. However, its not a + * * particularily easy bug to track down so this saves debugging time at + * * the expense of a few memcpy's. + */ #define MIB_CLIENTS_ARE_EVIL 1 #ifdef HAVE_DMALLOC_H @@ -30,7 +51,6 @@ static void free_wrapper(void * p) * don't use these! */ void set_current_agent_session(netsnmp_agent_session *asp); -netsnmp_agent_session *netsnmp_get_current_agent_session(void); /** @defgroup old_api old_api * Calls mib module code written in the old style of code. @@ -84,6 +104,7 @@ netsnmp_register_old_api(const char *moduleName, { unsigned int i; + int res; /* * register all subtree nodes @@ -103,9 +124,12 @@ netsnmp_register_old_api(const char *moduleName, reginfo->rootoid_len = (mibloclen + vp->namelen); reginfo->rootoid = (oid *) malloc(reginfo->rootoid_len * sizeof(oid)); - if (reginfo->rootoid == NULL) { + if (NULL == reginfo->handler || NULL == reginfo->handlerName || + NULL == reginfo->rootoid) { + netsnmp_handler_free(reginfo->handler); SNMP_FREE(vp); SNMP_FREE(reginfo->handlerName); + SNMP_FREE(reginfo->rootoid); SNMP_FREE(reginfo); return SNMP_ERR_GENERR; } @@ -130,9 +154,11 @@ netsnmp_register_old_api(const char *moduleName, /* * register ourselves in the mib tree */ - if (netsnmp_register_handler(reginfo) != MIB_REGISTERED_OK) { - /** netsnmp_handler_registration_free(reginfo); already freed */ - /* SNMP_FREE(vp); already freed */ + res = netsnmp_register_handler(reginfo); + if (MIB_REGISTERED_OK != res) { + /** reginfo already freed on error. */ + snmp_log(LOG_WARNING, "old_api handler registration failed\n"); + return res; } } return SNMPERR_SUCCESS; @@ -168,23 +194,17 @@ netsnmp_register_mib_table_row(const char *moduleName, * Unregister whatever we have registered so far, and * return an error. */ + snmp_log(LOG_ERR, "mib table row registration failed\n"); rc = MIB_REGISTRATION_FAILED; break; } - memset(r, 0, sizeof(netsnmp_handler_registration)); r->handler = get_old_api_handler(); r->handlerName = strdup(moduleName); - - if (r->handlerName == NULL) { - netsnmp_handler_registration_free(r); - break; - } - r->rootoid_len = mibloclen; r->rootoid = (oid *) malloc(r->rootoid_len * sizeof(oid)); - - if (r->rootoid == NULL) { + if (r->handler == NULL || r->handlerName == NULL || + r->rootoid == NULL) { netsnmp_handler_registration_free(r); rc = MIB_REGISTRATION_FAILED; break; @@ -201,15 +221,9 @@ netsnmp_register_mib_table_row(const char *moduleName, r->handler->data_clone = (void *(*)(void *))netsnmp_duplicate_variable; r->handler->data_free = free; - if (r->handler->myvoid == NULL) { - netsnmp_handler_registration_free(r); - rc = MIB_REGISTRATION_FAILED; - break; - } - r->contextName = (context) ? strdup(context) : NULL; - - if (context != NULL && r->contextName == NULL) { + if (r->handler->myvoid == NULL || + (context != NULL && r->contextName == NULL)) { netsnmp_handler_registration_free(r); rc = MIB_REGISTRATION_FAILED; break; @@ -227,9 +241,10 @@ netsnmp_register_mib_table_row(const char *moduleName, if ((rc = netsnmp_register_handler_nocallback(r)) != MIB_REGISTERED_OK) { + snmp_log(LOG_ERR, "mib table row registration failed\n"); DEBUGMSGTL(("netsnmp_register_mib_table_row", "register failed %d\n", rc)); - netsnmp_handler_registration_free(r); + /** reginfo already freed */ break; } @@ -266,7 +281,7 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, netsnmp_request_info *requests) { -#if MIB_CLIENTS_ARE_EVIL +#ifdef MIB_CLIENTS_ARE_EVIL oid save[MAX_OID_LEN]; size_t savelen = 0; #endif @@ -274,7 +289,7 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, int exact = 1; int status; - struct variable *vp; + struct variable *const vp = handler->myvoid; netsnmp_old_api_cache *cacheptr; netsnmp_agent_session *oldasp = NULL; u_char *access = NULL; @@ -283,8 +298,6 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, size_t tmp_len; oid tmp_name[MAX_OID_LEN]; - vp = (struct variable *) handler->myvoid; - /* * create old variable structure with right information */ @@ -304,7 +317,7 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, for (; requests; requests = requests->next) { -#if MIB_CLIENTS_ARE_EVIL +#ifdef MIB_CLIENTS_ARE_EVIL savelen = requests->requestvb->name_length; memcpy(save, requests->requestvb->name, savelen * sizeof(oid)); #endif @@ -318,9 +331,12 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, /* * Actually call the old mib-module function */ - if (vp && vp->findVar) { - memcpy(tmp_name, requests->requestvb->name, - requests->requestvb->name_length*sizeof(oid)); + if (vp->findVar) { + tmp_len = requests->requestvb->name_length*sizeof(oid); + memcpy(tmp_name, requests->requestvb->name, tmp_len); + /** clear the rest of tmp_name to keep valgrind happy */ + memset(&tmp_name[requests->requestvb->name_length], 0x0, + sizeof(tmp_name)-tmp_len); tmp_len = requests->requestvb->name_length; access = (*(vp->findVar)) (cvp, tmp_name, &tmp_len, exact, &len, &write_method); @@ -354,7 +370,7 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, /* * no result returned */ -#if MIB_CLIENTS_ARE_EVIL +#ifdef MIB_CLIENTS_ARE_EVIL if (access == NULL) { if (netsnmp_oid_equals(requests->requestvb->name, requests->requestvb->name_length, @@ -391,6 +407,7 @@ netsnmp_old_api_helper(netsnmp_mib_handler *handler, /* * BBB: fall through for everything that is a set (see AAA) */ + /* FALL THROUGH */ default: /* diff --git a/agent/helpers/read_only.c b/agent/helpers/read_only.c index 0b06d4f..359d91a 100644 --- a/agent/helpers/read_only.c +++ b/agent/helpers/read_only.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -73,8 +84,12 @@ netsnmp_read_only_helper(netsnmp_mib_handler *handler, void netsnmp_init_read_only_helper(void) { - netsnmp_register_handler_by_name("read_only", - netsnmp_get_read_only_handler()); + netsnmp_mib_handler *handler = netsnmp_get_read_only_handler(); + if (!handler) { + snmp_log(LOG_ERR, "could not create read_only handler\n"); + return; + } + netsnmp_register_handler_by_name("read_only", handler); } /** @} */ diff --git a/agent/helpers/row_merge.c b/agent/helpers/row_merge.c index 4a8e476..4b46418 100644 --- a/agent/helpers/row_merge.c +++ b/agent/helpers/row_merge.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -6,15 +17,17 @@ #include -#if HAVE_STRING_H +#include + +#ifdef HAVE_STRING_H #include #else #include #endif -netsnmp_feature_provide(row_merge) -netsnmp_feature_child_of(row_merge, row_merge_all) -netsnmp_feature_child_of(row_merge_all, mib_helpers) +netsnmp_feature_provide(row_merge); +netsnmp_feature_child_of(row_merge, row_merge_all); +netsnmp_feature_child_of(row_merge_all, mib_helpers); #ifndef NETSNMP_FEATURE_REMOVE_ROW_MERGE @@ -45,14 +58,26 @@ netsnmp_get_row_merge_handler(int prefix_len) /** functionally the same as calling netsnmp_register_handler() but also * injects a row_merge handler at the same time for you. */ -netsnmp_feature_child_of(register_row_merge, row_merge_all) +netsnmp_feature_child_of(register_row_merge, row_merge_all); #ifndef NETSNMP_FEATURE_REMOVE_REGISTER_ROW_MERGE int netsnmp_register_row_merge(netsnmp_handler_registration *reginfo) { - netsnmp_inject_handler(reginfo, - netsnmp_get_row_merge_handler(reginfo->rootoid_len+1)); - return netsnmp_register_handler(reginfo); + netsnmp_mib_handler *handler; + + if (!reginfo) + return MIB_REGISTRATION_FAILED; + + handler = netsnmp_get_row_merge_handler(reginfo->rootoid_len+1); + if (handler && + (netsnmp_inject_handler(reginfo, handler) == SNMPERR_SUCCESS)) + return netsnmp_register_handler(reginfo); + + snmp_log(LOG_ERR, "failed to register row_merge\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_ROW_MERGE */ diff --git a/agent/helpers/scalar.c b/agent/helpers/scalar.c index 7a4c9e0..1f197fc 100644 --- a/agent/helpers/scalar.c +++ b/agent/helpers/scalar.c @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -16,7 +21,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -74,6 +79,8 @@ netsnmp_get_scalar_handler(void) int netsnmp_register_scalar(netsnmp_handler_registration *reginfo) { + netsnmp_mib_handler *h1, *h2; + /* * Extend the registered OID with space for the instance subid * (but don't extend the length just yet!) @@ -82,9 +89,22 @@ netsnmp_register_scalar(netsnmp_handler_registration *reginfo) (reginfo->rootoid_len+1) * sizeof(oid) ); reginfo->rootoid[ reginfo->rootoid_len ] = 0; - netsnmp_inject_handler(reginfo, netsnmp_get_instance_handler()); - netsnmp_inject_handler(reginfo, netsnmp_get_scalar_handler()); - return netsnmp_register_serialize(reginfo); + h1 = netsnmp_get_instance_handler(); + h2 = netsnmp_get_scalar_handler(); + if (h1 && h2) { + if (netsnmp_inject_handler(reginfo, h1) == SNMPERR_SUCCESS) { + h1 = NULL; + if (netsnmp_inject_handler(reginfo, h2) == SNMPERR_SUCCESS) + return netsnmp_register_serialize(reginfo); + } + } + + snmp_log(LOG_ERR, "register scalar failed\n"); + netsnmp_handler_free(h1); + netsnmp_handler_free(h2); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } @@ -99,7 +119,7 @@ netsnmp_register_scalar(netsnmp_handler_registration *reginfo) * a read only scalar helper handler. * * @return MIB_REGISTERED_OK is returned if the registration was a success. - * Failures are MIB_REGISTRATION_FAILURE and MIB_DUPLICATE_REGISTRATION. + * Failures are MIB_REGISTRATION_FAILED and MIB_DUPLICATE_REGISTRATION. * * @see netsnmp_register_scalar * @see netsnmp_get_scalar_handler @@ -109,6 +129,7 @@ netsnmp_register_scalar(netsnmp_handler_registration *reginfo) int netsnmp_register_read_only_scalar(netsnmp_handler_registration *reginfo) { + netsnmp_mib_handler *h1, *h2, *h3; /* * Extend the registered OID with space for the instance subid * (but don't extend the length just yet!) @@ -117,10 +138,27 @@ netsnmp_register_read_only_scalar(netsnmp_handler_registration *reginfo) (reginfo->rootoid_len+1) * sizeof(oid) ); reginfo->rootoid[ reginfo->rootoid_len ] = 0; - netsnmp_inject_handler(reginfo, netsnmp_get_instance_handler()); - netsnmp_inject_handler(reginfo, netsnmp_get_scalar_handler()); - netsnmp_inject_handler(reginfo, netsnmp_get_read_only_handler()); - return netsnmp_register_serialize(reginfo); + h1 = netsnmp_get_instance_handler(); + h2 = netsnmp_get_scalar_handler(); + h3 = netsnmp_get_read_only_handler(); + if (h1 && h2 && h3) { + if (netsnmp_inject_handler(reginfo, h1) == SNMPERR_SUCCESS) { + h1 = NULL; + if (netsnmp_inject_handler(reginfo, h2) == SNMPERR_SUCCESS) { + h2 = NULL; + if (netsnmp_inject_handler(reginfo, h3) == SNMPERR_SUCCESS) + return netsnmp_register_serialize(reginfo); + } + } + } + + snmp_log(LOG_ERR, "register read only scalar failed\n"); + netsnmp_handler_free(h1); + netsnmp_handler_free(h2); + netsnmp_handler_free(h3); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } diff --git a/agent/helpers/scalar_group.c b/agent/helpers/scalar_group.c index 6b7f098..fc10f4b 100644 --- a/agent/helpers/scalar_group.c +++ b/agent/helpers/scalar_group.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -6,7 +17,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -60,9 +71,25 @@ int netsnmp_register_scalar_group(netsnmp_handler_registration *reginfo, oid first, oid last) { - netsnmp_inject_handler(reginfo, netsnmp_get_instance_handler()); - netsnmp_inject_handler(reginfo, netsnmp_get_scalar_group_handler(first, last)); - return netsnmp_register_serialize(reginfo); + netsnmp_mib_handler *h1, *h2; + + h1 = netsnmp_get_instance_handler(); + h2 = netsnmp_get_scalar_group_handler(first, last); + + if (h1 && h2) { + if (netsnmp_inject_handler(reginfo, h1) == SNMPERR_SUCCESS) { + h1 = NULL; + if (netsnmp_inject_handler(reginfo, h2) == SNMPERR_SUCCESS) + return netsnmp_register_serialize(reginfo); + } + } + + snmp_log(LOG_ERR, "register read only scalar group failed\n"); + netsnmp_handler_free(h1); + netsnmp_handler_free(h2); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } @@ -98,17 +125,12 @@ netsnmp_scalar_group_helper_handler(netsnmp_mib_handler *handler, root_tmp[reginfo->rootoid_len + 1] = 0; root_save = reginfo->rootoid; - ret = SNMP_ERR_NOCREATION; switch (reqinfo->mode) { /* * The handling of "exact" requests is basically the same. * The only difference between GET and SET requests is the * error/exception to return on failure. */ - case MODE_GET: - ret = SNMP_NOSUCHOBJECT; - /* Fallthrough */ - #ifndef NETSNMP_NO_WRITE_SUPPORT case MODE_SET_RESERVE1: case MODE_SET_RESERVE2: @@ -117,6 +139,8 @@ netsnmp_scalar_group_helper_handler(netsnmp_mib_handler *handler, case MODE_SET_UNDO: case MODE_SET_FREE: #endif /* NETSNMP_NO_WRITE_SUPPORT */ + case MODE_GET: + ret = reqinfo->mode == MODE_GET ? SNMP_NOSUCHOBJECT : SNMP_ERR_NOCREATION; if (cmp != 0 || requests->requestvb->name_length <= reginfo->rootoid_len) { /* diff --git a/agent/helpers/serialize.c b/agent/helpers/serialize.c index eec66b4..9680797 100644 --- a/agent/helpers/serialize.c +++ b/agent/helpers/serialize.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -33,7 +44,15 @@ netsnmp_get_serialize_handler(void) int netsnmp_register_serialize(netsnmp_handler_registration *reginfo) { - netsnmp_inject_handler(reginfo, netsnmp_get_serialize_handler()); + netsnmp_mib_handler *handler = netsnmp_get_serialize_handler(); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create serialize handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + return netsnmp_register_handler(reginfo); } @@ -86,8 +105,12 @@ netsnmp_serialize_helper_handler(netsnmp_mib_handler *handler, void netsnmp_init_serialize(void) { - netsnmp_register_handler_by_name("serialize", - netsnmp_get_serialize_handler()); + netsnmp_mib_handler *handler = netsnmp_get_serialize_handler(); + if (!handler) { + snmp_log(LOG_ERR, "could not create serialize handler\n"); + return; + } + netsnmp_register_handler_by_name("serialize", handler); } /** @} */ diff --git a/agent/helpers/snmp_get_statistic.c b/agent/helpers/snmp_get_statistic.c index efac2ac..54a7421 100644 --- a/agent/helpers/snmp_get_statistic.c +++ b/agent/helpers/snmp_get_statistic.c @@ -1,16 +1,27 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include #include #include - #include +#include -netsnmp_feature_provide(helper_statistics) -netsnmp_feature_child_of(helper_statistics, mib_helpers) +netsnmp_feature_provide(helper_statistics); +netsnmp_feature_child_of(helper_statistics, mib_helpers); #ifdef NETSNMP_FEATURE_REQUIRE_HELPER_STATISTICS /* if we're not needed, then neither is this */ -netsnmp_feature_require(statistics) +netsnmp_feature_require(statistics); #endif #ifndef NETSNMP_FEATURE_REMOVE_HELPER_STATISTICS @@ -52,9 +63,17 @@ int netsnmp_register_statistic_handler(netsnmp_handler_registration *reginfo, oid start, int begin, int end) { - netsnmp_inject_handler(reginfo, - netsnmp_get_statistic_handler(begin - start)); - return netsnmp_register_scalar_group(reginfo, start, start + (end - begin)); + netsnmp_mib_handler *handler = + netsnmp_get_statistic_handler(begin - start); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create statistic handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + return netsnmp_register_scalar_group(reginfo, start, + start + (end - begin)); } #else /* !NETSNMP_FEATURE_REMOVE_HELPER_GET_STATISTICS */ netsnmp_feature_unused(helper_statistics); diff --git a/agent/helpers/stash_cache.c b/agent/helpers/stash_cache.c index 5da1796..41fb4cc 100644 --- a/agent/helpers/stash_cache.c +++ b/agent/helpers/stash_cache.c @@ -4,12 +4,12 @@ #include #include -netsnmp_feature_provide(stash_cache) -netsnmp_feature_child_of(stash_cache, mib_helpers) +netsnmp_feature_provide(stash_cache); +netsnmp_feature_child_of(stash_cache, mib_helpers); #ifdef NETSNMP_FEATURE_REQUIRE_STASH_CACHE -netsnmp_feature_require(oid_stash) -netsnmp_feature_require(oid_stash_iterate) -netsnmp_feature_require(oid_stash_get_data) +netsnmp_feature_require(oid_stash); +netsnmp_feature_require(oid_stash_iterate); +netsnmp_feature_require(oid_stash_get_data); #endif #ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE diff --git a/agent/helpers/stash_to_next.c b/agent/helpers/stash_to_next.c index d7baffd..aa91798 100644 --- a/agent/helpers/stash_to_next.c +++ b/agent/helpers/stash_to_next.c @@ -4,12 +4,12 @@ #include #include -netsnmp_feature_provide(stash_to_next) -netsnmp_feature_child_of(stash_to_next, mib_helpers) +netsnmp_feature_provide(stash_to_next); +netsnmp_feature_child_of(stash_to_next, mib_helpers); #ifdef NETSNMP_FEATURE_REQUIRE_STASH_TO_NEXT -netsnmp_feature_require(oid_stash) -netsnmp_feature_require(oid_stash_add_data) +netsnmp_feature_require(oid_stash); +netsnmp_feature_require(oid_stash_add_data); #endif #ifndef NETSNMP_FEATURE_REMOVE_STASH_TO_NEXT diff --git a/agent/helpers/table.c b/agent/helpers/table.c index 882e84c..c9b11dd 100644 --- a/agent/helpers/table.c +++ b/agent/helpers/table.c @@ -17,6 +17,11 @@ * Copyright (C) 2007 Apple, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -28,10 +33,10 @@ #include #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(oid_stash) +netsnmp_feature_require(oid_stash); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -39,12 +44,12 @@ netsnmp_feature_require(oid_stash) #include -netsnmp_feature_child_of(table_all, mib_helpers) +netsnmp_feature_child_of(table_all, mib_helpers); -netsnmp_feature_child_of(table_build_result, table_all) -netsnmp_feature_child_of(table_get_or_create_row_stash, table_all) -netsnmp_feature_child_of(registration_owns_table_info, table_all) -netsnmp_feature_child_of(table_sparse, table_all) +netsnmp_feature_child_of(table_build_result, table_all); +netsnmp_feature_child_of(table_get_or_create_row_stash, table_all); +netsnmp_feature_child_of(registration_owns_table_info, table_all); +netsnmp_feature_child_of(table_sparse, table_all); static void table_helper_cleanup(netsnmp_agent_request_info *reqinfo, netsnmp_request_info *request, @@ -151,9 +156,14 @@ int netsnmp_register_table(netsnmp_handler_registration *reginfo, netsnmp_table_registration_info *tabreq) { - int rc = netsnmp_inject_handler(reginfo, netsnmp_get_table_handler(tabreq)); - if (SNMPERR_SUCCESS != rc) - return rc; + netsnmp_mib_handler *handler = netsnmp_get_table_handler(tabreq); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create table handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } return netsnmp_register_handler(reginfo); } @@ -406,6 +416,8 @@ table_helper_handler(netsnmp_mib_handler *handler, if (reqinfo->mode == MODE_GET) table_helper_cleanup(reqinfo, request, SNMP_NOSUCHOBJECT); + else + request->processed = 1; /* skip if next handler called */ continue; } @@ -479,10 +491,13 @@ table_helper_handler(netsnmp_mib_handler *handler, if (reqinfo->mode == MODE_SET_RESERVE1) table_helper_cleanup(reqinfo, request, SNMP_ERR_NOTWRITABLE); - else if (reqinfo->mode == MODE_GET) + else #endif /* NETSNMP_NO_WRITE_SUPPORT */ + if (reqinfo->mode == MODE_GET) table_helper_cleanup(reqinfo, request, SNMP_NOSUCHOBJECT); + else + request->processed = 1; /* skip if next handler called */ continue; } /* @@ -828,12 +843,11 @@ netsnmp_sparse_table_register(netsnmp_handler_registration *reginfo, netsnmp_table_registration_info *tabreq) { netsnmp_mib_handler *handler1, *handler2; - int rc; handler1 = netsnmp_create_handler(SPARSE_TABLE_HANDLER_NAME, sparse_table_helper_handler); if (NULL == handler1) - return SNMP_ERR_GENERR; + return MIB_REGISTRATION_FAILED; handler2 = netsnmp_get_table_handler(tabreq); if (NULL == handler2 ) { @@ -841,18 +855,16 @@ netsnmp_sparse_table_register(netsnmp_handler_registration *reginfo, return SNMP_ERR_GENERR; } - rc = netsnmp_inject_handler(reginfo, handler1); - if (SNMPERR_SUCCESS != rc) { + if (SNMPERR_SUCCESS != netsnmp_inject_handler(reginfo, handler1)) { netsnmp_handler_free(handler1); netsnmp_handler_free(handler2); - return rc; + return MIB_REGISTRATION_FAILED; } - rc = netsnmp_inject_handler(reginfo, handler2); - if (SNMPERR_SUCCESS != rc) { + if (SNMPERR_SUCCESS != netsnmp_inject_handler(reginfo, handler2)) { /** handler1 is in reginfo... remove and free?? */ netsnmp_handler_free(handler2); - return rc; + return MIB_REGISTRATION_FAILED; } /** both handlers now in reginfo, so nothing to do on error */ @@ -986,7 +998,8 @@ netsnmp_update_indexes_from_variable_list(netsnmp_table_request_info *tri) if (!tri) return SNMPERR_GENERR; - return build_oid_noalloc(tri->index_oid, sizeof(tri->index_oid), + return build_oid_noalloc(tri->index_oid, + sizeof(tri->index_oid) / sizeof(tri->index_oid[0]), &tri->index_oid_len, NULL, 0, tri->indexes); } @@ -1225,6 +1238,7 @@ netsnmp_table_helper_add_indexes(netsnmp_table_registration_info *tinfo, } #ifndef NETSNMP_NO_WRITE_SUPPORT +#ifndef NETSNMP_FEATURE_REMOVE_TABLE_GET_OR_CREATE_ROW_STASH static void _row_stash_data_list_free(void *ptr) { netsnmp_oid_stash_node **tmp = (netsnmp_oid_stash_node **)ptr; @@ -1232,7 +1246,6 @@ _row_stash_data_list_free(void *ptr) { free(ptr); } -#ifndef NETSNMP_FEATURE_REMOVE_TABLE_GET_OR_CREATE_ROW_STASH /** returns a row-wide place to store data in. @todo This function will likely change to add free pointer functions. */ netsnmp_oid_stash_node ** diff --git a/agent/helpers/table_array.c b/agent/helpers/table_array.c index 7c98aae..2c044e2 100644 --- a/agent/helpers/table_array.c +++ b/agent/helpers/table_array.c @@ -1,6 +1,15 @@ /* * table_array.c * $Id$ + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -11,7 +20,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -21,12 +30,12 @@ #include #include -netsnmp_feature_child_of(table_array_all, mib_helpers) +netsnmp_feature_child_of(table_array_all, mib_helpers); -netsnmp_feature_child_of(table_array_register,table_array_all) -netsnmp_feature_child_of(table_array_find_table_array_handler,table_array_all) -netsnmp_feature_child_of(table_array_extract_array_context,table_array_all) -netsnmp_feature_child_of(table_array_check_row_status,table_array_all) +netsnmp_feature_child_of(table_array_register,table_array_all); +netsnmp_feature_child_of(table_array_find_table_array_handler,table_array_all); +netsnmp_feature_child_of(table_array_extract_array_context,table_array_all); +netsnmp_feature_child_of(table_array_check_row_status,table_array_all); #ifndef NETSNMP_FEATURE_REMOVE_TABLE_CONTAINER @@ -212,9 +221,17 @@ netsnmp_table_array_register(netsnmp_handler_registration *reginfo, netsnmp_container *container, int group_rows) { - netsnmp_inject_handler(reginfo, - netsnmp_create_handler(reginfo->handlerName, - netsnmp_table_array_helper_handler)); + netsnmp_mib_handler *handler = + netsnmp_create_handler(reginfo->handlerName, + netsnmp_table_array_helper_handler); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create table array handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return SNMP_ERR_GENERR; + } + return netsnmp_table_container_register(reginfo, tabreg, cb, container, group_rows); } diff --git a/agent/helpers/table_container.c b/agent/helpers/table_container.c index 08e9741..edd67a8 100644 --- a/agent/helpers/table_container.c +++ b/agent/helpers/table_container.c @@ -1,6 +1,15 @@ /* * table_container.c * $Id$ + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -11,7 +20,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -21,14 +30,14 @@ #include #include -netsnmp_feature_provide(table_container) -netsnmp_feature_child_of(table_container, table_container_all) -netsnmp_feature_child_of(table_container_replace_row, table_container_all) -netsnmp_feature_child_of(table_container_extract, table_container_all) -netsnmp_feature_child_of(table_container_management, table_container_all) -netsnmp_feature_child_of(table_container_row_remove, table_container_all) -netsnmp_feature_child_of(table_container_row_insert, table_container_all) -netsnmp_feature_child_of(table_container_all, mib_helpers) +netsnmp_feature_provide(table_container); +netsnmp_feature_child_of(table_container, table_container_all); +netsnmp_feature_child_of(table_container_replace_row, table_container_all); +netsnmp_feature_child_of(table_container_extract, table_container_all); +netsnmp_feature_child_of(table_container_management, table_container_all); +netsnmp_feature_child_of(table_container_row_remove, table_container_all); +netsnmp_feature_child_of(table_container_row_insert, table_container_all); +netsnmp_feature_child_of(table_container_all, mib_helpers); #ifndef NETSNMP_FEATURE_REMOVE_TABLE_CONTAINER @@ -340,6 +349,7 @@ netsnmp_container_table_register(netsnmp_handler_registration *reginfo, if ((NULL == reginfo) || (NULL == reginfo->handler) || (NULL == tabreg)) { snmp_log(LOG_ERR, "bad param in netsnmp_container_table_register\n"); + netsnmp_handler_registration_free(reginfo); return SNMPERR_GENERR; } @@ -347,7 +357,13 @@ netsnmp_container_table_register(netsnmp_handler_registration *reginfo, container = netsnmp_container_find(reginfo->handlerName); handler = netsnmp_container_table_handler_get(tabreg, container, key_type); - netsnmp_inject_handler(reginfo, handler ); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create container table handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } return netsnmp_register_table(reginfo, tabreg); } diff --git a/agent/helpers/table_data.c b/agent/helpers/table_data.c index 659d903..19c7285 100644 --- a/agent/helpers/table_data.c +++ b/agent/helpers/table_data.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -6,7 +17,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -15,24 +26,24 @@ #include #include -netsnmp_feature_child_of(table_data_all, mib_helpers) +netsnmp_feature_child_of(table_data_all, mib_helpers); -netsnmp_feature_child_of(table_data, table_data_all) -netsnmp_feature_child_of(register_read_only_table_data, table_data_all) -netsnmp_feature_child_of(extract_table_row_data, table_data_all) -netsnmp_feature_child_of(insert_table_row, table_data_all) -netsnmp_feature_child_of(table_data_delete_table, table_data_all) +netsnmp_feature_child_of(table_data, table_data_all); +netsnmp_feature_child_of(register_read_only_table_data, table_data_all); +netsnmp_feature_child_of(extract_table_row_data, table_data_all); +netsnmp_feature_child_of(insert_table_row, table_data_all); +netsnmp_feature_child_of(table_data_delete_table, table_data_all); -netsnmp_feature_child_of(table_data_extras, table_data_all) +netsnmp_feature_child_of(table_data_extras, table_data_all); -netsnmp_feature_child_of(table_data_create_table, table_data_extras) -netsnmp_feature_child_of(table_data_create_row, table_data_extras) -netsnmp_feature_child_of(table_data_copy_row, table_data_extras) -netsnmp_feature_child_of(table_data_remove_delete_row, table_data_extras) -netsnmp_feature_child_of(table_data_unregister, table_data_extras) -netsnmp_feature_child_of(table_data_row_count, table_data_extras) -netsnmp_feature_child_of(table_data_row_operations, table_data_extras) -netsnmp_feature_child_of(table_data_row_first, table_data_extras) +netsnmp_feature_child_of(table_data_create_table, table_data_extras); +netsnmp_feature_child_of(table_data_create_row, table_data_extras); +netsnmp_feature_child_of(table_data_copy_row, table_data_extras); +netsnmp_feature_child_of(table_data_remove_delete_row, table_data_extras); +netsnmp_feature_child_of(table_data_unregister, table_data_extras); +netsnmp_feature_child_of(table_data_row_count, table_data_extras); +netsnmp_feature_child_of(table_data_row_operations, table_data_extras); +netsnmp_feature_child_of(table_data_row_first, table_data_extras); #ifndef NETSNMP_FEATURE_REMOVE_TABLE_DATA @@ -430,7 +441,15 @@ netsnmp_register_table_data(netsnmp_handler_registration *reginfo, netsnmp_table_data *table, netsnmp_table_registration_info *table_info) { - netsnmp_inject_handler(reginfo, netsnmp_get_table_data_handler(table)); + netsnmp_mib_handler *handler = netsnmp_get_table_data_handler(table); + if (!table || !handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create table data handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + return netsnmp_register_table(reginfo, table_info); } @@ -443,7 +462,15 @@ netsnmp_register_read_only_table_data(netsnmp_handler_registration *reginfo, netsnmp_table_data *table, netsnmp_table_registration_info *table_info) { - netsnmp_inject_handler(reginfo, netsnmp_get_read_only_handler()); + netsnmp_mib_handler *handler = netsnmp_get_read_only_handler(); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create read only table data handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + return netsnmp_register_table_data(reginfo, table, table_info); } #endif /* NETSNMP_FEATURE_REMOVE_REGISTER_READ_ONLY_TABLE_DATA */ diff --git a/agent/helpers/table_dataset.c b/agent/helpers/table_dataset.c index 931c27a..7aef147 100644 --- a/agent/helpers/table_dataset.c +++ b/agent/helpers/table_dataset.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -7,38 +18,38 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -netsnmp_feature_child_of(table_dataset_all, mib_helpers) -netsnmp_feature_child_of(table_dataset, table_dataset_all) -netsnmp_feature_child_of(table_dataset_remove_row, table_dataset_all) -netsnmp_feature_child_of(table_data_set_column, table_dataset_all) -netsnmp_feature_child_of(table_dataset_get_newrow, table_dataset_all) -netsnmp_feature_child_of(table_set_add_indexes, table_dataset_all) -netsnmp_feature_child_of(delete_table_data_set, table_dataset_all) -netsnmp_feature_child_of(table_set_multi_add_default_row, table_dataset_all) -netsnmp_feature_child_of(table_dataset_unregister_auto_data_table, table_dataset_all) +netsnmp_feature_child_of(table_dataset_all, mib_helpers); +netsnmp_feature_child_of(table_dataset, table_dataset_all); +netsnmp_feature_child_of(table_dataset_remove_row, table_dataset_all); +netsnmp_feature_child_of(table_data_set_column, table_dataset_all); +netsnmp_feature_child_of(table_dataset_get_newrow, table_dataset_all); +netsnmp_feature_child_of(table_set_add_indexes, table_dataset_all); +netsnmp_feature_child_of(delete_table_data_set, table_dataset_all); +netsnmp_feature_child_of(table_set_multi_add_default_row, table_dataset_all); +netsnmp_feature_child_of(table_dataset_unregister_auto_data_table, table_dataset_all); #ifdef NETSNMP_FEATURE_REQUIRE_TABLE_DATASET -netsnmp_feature_require(table_get_or_create_row_stash) -netsnmp_feature_require(table_data_delete_table) -netsnmp_feature_require(table_data) -netsnmp_feature_require(oid_stash_get_data) -netsnmp_feature_require(oid_stash_add_data) +netsnmp_feature_require(table_get_or_create_row_stash); +netsnmp_feature_require(table_data_delete_table); +netsnmp_feature_require(table_data); +netsnmp_feature_require(oid_stash_get_data); +netsnmp_feature_require(oid_stash_add_data); #endif /* NETSNMP_FEATURE_REQUIRE_TABLE_DATASET */ #ifndef NETSNMP_FEATURE_REMOVE_TABLE_DATASET #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(oid_stash) +netsnmp_feature_require(oid_stash); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ #ifndef NETSNMP_DISABLE_MIB_LOADING -netsnmp_feature_require(mib_to_asn_type) +netsnmp_feature_require(mib_to_asn_type); #endif /* NETSNMP_DISABLE_MIB_LOADING */ static netsnmp_data_list *auto_tables; @@ -425,6 +436,7 @@ netsnmp_register_table_data_set(netsnmp_handler_registration *reginfo, netsnmp_table_data_set *data_set, netsnmp_table_registration_info *table_info) { + netsnmp_mib_handler *handler; int ret; if (NULL == table_info) { @@ -462,8 +474,15 @@ netsnmp_register_table_data_set(netsnmp_handler_registration *reginfo, table_info->max_column = maxcol; } - netsnmp_inject_handler(reginfo, - netsnmp_get_table_data_set_handler(data_set)); + handler = netsnmp_get_table_data_set_handler(data_set); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create table data set handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return MIB_REGISTRATION_FAILED; + } + ret = netsnmp_register_table_data(reginfo, data_set->table, table_info); if (ret == SNMPERR_SUCCESS && reginfo->handler) @@ -502,23 +521,28 @@ netsnmp_table_data_set_helper_handler(netsnmp_mib_handler *handler, netsnmp_request_info *requests) { netsnmp_table_data_set_storage *data = NULL; - newrow_stash *newrowstash = NULL; - netsnmp_table_row *row, *newrow = NULL; netsnmp_table_request_info *table_info; netsnmp_request_info *request; + netsnmp_table_row *row = NULL; +#ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_oid_stash_node **stashp = NULL; + netsnmp_table_row *newrow = NULL; + newrow_stash *newrowstash = NULL; +#endif /* NETSNMP_NO_WRITE_SUPPORT */ if (!handler) return SNMPERR_GENERR; DEBUGMSGTL(("netsnmp_table_data_set", "handler starting\n")); for (request = requests; request; request = request->next) { +#ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_table_data_set *datatable = (netsnmp_table_data_set *) handler->myvoid; const oid * const suffix = requests->requestvb->name + reginfo->rootoid_len + 2; const size_t suffix_len = requests->requestvb->name_length - (reginfo->rootoid_len + 2); +#endif /* NETSNMP_NO_WRITE_SUPPORT */ if (request->processed) continue; diff --git a/agent/helpers/table_iterator.c b/agent/helpers/table_iterator.c index 8ed5cd0..c6a5a6e 100644 --- a/agent/helpers/table_iterator.c +++ b/agent/helpers/table_iterator.c @@ -10,6 +10,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup table_iterator table_iterator @@ -90,7 +95,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -100,16 +105,16 @@ #include #include -netsnmp_feature_child_of(table_iterator_all, mib_helpers) +netsnmp_feature_child_of(table_iterator_all, mib_helpers); -netsnmp_feature_child_of(table_iterator_insert_context, table_iterator_all) -netsnmp_feature_child_of(table_iterator_create_table, table_iterator_all) -netsnmp_feature_child_of(table_iterator_row_first, table_iterator_all) -netsnmp_feature_child_of(table_iterator_row_count, table_iterator_all) +netsnmp_feature_child_of(table_iterator_insert_context, table_iterator_all); +netsnmp_feature_child_of(table_iterator_create_table, table_iterator_all); +netsnmp_feature_child_of(table_iterator_row_first, table_iterator_all); +netsnmp_feature_child_of(table_iterator_row_count, table_iterator_all); #ifdef NETSNMP_FEATURE_REQUIRE_STASH_CACHE -netsnmp_feature_require(data_list_get_list_node) -netsnmp_feature_require(oid_stash_add_data) +netsnmp_feature_require(data_list_get_list_node); +netsnmp_feature_require(oid_stash_add_data); #endif /* NETSNMP_FEATURE_REQUIRE_STASH_CACHE */ /* ================================== @@ -259,14 +264,21 @@ int netsnmp_register_table_iterator(netsnmp_handler_registration *reginfo, netsnmp_iterator_info *iinfo) { + netsnmp_mib_handler *handler = netsnmp_get_table_iterator_handler(iinfo); + + if (!reginfo || !iinfo || !handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create iterator table handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return SNMP_ERR_GENERR; + } + #ifndef NETSNMP_FEATURE_REMOVE_STASH_CACHE reginfo->modes |= HANDLER_CAN_STASH; #endif /* NETSNMP_FEATURE_REMOVE_STASH_CACHE */ - netsnmp_inject_handler(reginfo, - netsnmp_get_table_iterator_handler(iinfo)); - if (!iinfo) - return SNMPERR_GENERR; - if (!iinfo->indexes && iinfo->table_reginfo && + + if (!iinfo->indexes && iinfo->table_reginfo && iinfo->table_reginfo->indexes ) iinfo->indexes = snmp_clone_varbind( iinfo->table_reginfo->indexes ); @@ -731,6 +743,7 @@ netsnmp_table_iterator_helper_handler(netsnmp_mib_handler *handler, if (free_this_index_search) snmp_free_varbind (free_this_index_search); + SNMP_FREE(reqtmp); return SNMP_ERR_GENERR; } vb->type = ASN_NULL; @@ -837,7 +850,8 @@ netsnmp_table_iterator_helper_handler(netsnmp_mib_handler *handler, netsnmp_request_get_list_data(request, TI_REQUEST_CACHE); if (!ti_info->results) { - int nc; + int nc; + table_info = netsnmp_extract_table_info(request); nc = netsnmp_table_next_column(table_info); if (0 == nc) { @@ -845,7 +859,6 @@ netsnmp_table_iterator_helper_handler(netsnmp_mib_handler *handler, snmp_set_var_objid(request->requestvb, coloid, reginfo->rootoid_len+2); request->processed = TABLE_ITERATOR_NOTAGAIN; - break; } else { table_info->colnum = nc; hintok = 0; diff --git a/agent/helpers/table_row.c b/agent/helpers/table_row.c index 2a33f23..b465750 100644 --- a/agent/helpers/table_row.c +++ b/agent/helpers/table_row.c @@ -3,14 +3,21 @@ * * Helper for registering single row slices of a shared table * - * $Id$ + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #define TABLE_ROW_DATA "table_row" #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -24,9 +31,9 @@ #include #include -netsnmp_feature_child_of(table_row_all, mib_helpers) +netsnmp_feature_child_of(table_row_all, mib_helpers); -netsnmp_feature_child_of(table_row_extract, table_row_all) +netsnmp_feature_child_of(table_row_extract, table_row_all); /* @@ -110,6 +117,7 @@ netsnmp_table_row_register(netsnmp_handler_registration *reginfo, if ((NULL == reginfo) || (NULL == reginfo->handler) || (NULL == tabreg)) { snmp_log(LOG_ERR, "bad param in netsnmp_table_row_register\n"); + netsnmp_handler_registration_free(reginfo); return SNMPERR_GENERR; } @@ -150,7 +158,13 @@ netsnmp_table_row_register(netsnmp_handler_registration *reginfo, * ... insert a minimal handler ... */ handler = netsnmp_table_row_handler_get(row); - netsnmp_inject_handler(reginfo, handler ); + if (!handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create table row handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return SNMP_ERR_GENERR; + } /* * ... and register the row diff --git a/agent/helpers/table_tdata.c b/agent/helpers/table_tdata.c index 8865084..8677967 100644 --- a/agent/helpers/table_tdata.c +++ b/agent/helpers/table_tdata.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -6,7 +17,7 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -16,21 +27,17 @@ #include #include -#if HAVE_DMALLOC_H -#include -#endif - -netsnmp_feature_child_of(table_tdata_all, mib_helpers) -netsnmp_feature_child_of(table_tdata, table_tdata_all) -netsnmp_feature_child_of(table_tdata_delete_table, table_tdata_all) -netsnmp_feature_child_of(table_tdata_extract_table, table_tdata_all) -netsnmp_feature_child_of(table_tdata_remove_row, table_tdata_all) -netsnmp_feature_child_of(table_tdata_insert_row, table_tdata_all) +netsnmp_feature_child_of(table_tdata_all, mib_helpers); +netsnmp_feature_child_of(table_tdata, table_tdata_all); +netsnmp_feature_child_of(table_tdata_delete_table, table_tdata_all); +netsnmp_feature_child_of(table_tdata_extract_table, table_tdata_all); +netsnmp_feature_child_of(table_tdata_remove_row, table_tdata_all); +netsnmp_feature_child_of(table_tdata_insert_row, table_tdata_all); #ifdef NETSNMP_FEATURE_REQUIRE_TABLE_TDATA -netsnmp_feature_require(table_container_row_insert) +netsnmp_feature_require(table_container_row_insert); #ifdef NETSNMP_FEATURE_REQUIRE_TABLE_TDATA_REMOVE_ROW -netsnmp_feature_require(table_container_row_remove) +netsnmp_feature_require(table_container_row_remove); #endif /* NETSNMP_FEATURE_REQUIRE_TABLE_TDATA_REMOVE_ROW */ #endif /* NETSNMP_FEATURE_REQUIRE_TABLE_TDATA */ @@ -83,7 +90,7 @@ netsnmp_tdata_create_table(const char *name, long flags) table->container = netsnmp_container_find( name ); if (!table->container) table->container = netsnmp_container_find( "table_container" ); - if (table->container) + if (table->container && name) table->container->container_name = strdup(name); } return table; @@ -116,7 +123,7 @@ netsnmp_tdata_create_row(void) } /** clones a 'tdata' row. DOES NOT CLONE THE TABLE-SPECIFIC ENTRY DATA. */ -netsnmp_feature_child_of(tdata_clone_row, table_tdata_all) +netsnmp_feature_child_of(tdata_clone_row, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_CLONE_ROW netsnmp_tdata_row * netsnmp_tdata_clone_row(netsnmp_tdata_row *row) @@ -154,7 +161,7 @@ netsnmp_tdata_clone_row(netsnmp_tdata_row *row) /** copy the contents of a 'tdata' row. DOES NOT COPY THE TABLE-SPECIFIC ENTRY DATA. */ -netsnmp_feature_child_of(tdata_copy_row, table_tdata_all) +netsnmp_feature_child_of(tdata_copy_row, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_COPY_ROW int netsnmp_tdata_copy_row(netsnmp_tdata_row *dst_row, netsnmp_tdata_row *src_row) @@ -256,7 +263,7 @@ netsnmp_tdata_add_row(netsnmp_tdata *table, } /** swaps out origrow with newrow. This does *not* delete/free anything! */ -netsnmp_feature_child_of(tdata_replace_row, table_tdata_all) +netsnmp_feature_child_of(tdata_replace_row, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_REPLACE_ROW void netsnmp_tdata_replace_row(netsnmp_tdata *table, @@ -354,17 +361,15 @@ _netsnmp_tdata_helper_handler(netsnmp_mib_handler *handler, netsnmp_request_info *request; netsnmp_table_request_info *table_info; netsnmp_tdata_row *row; - int need_processing = 1; + int need_processing; switch ( reqinfo->mode ) { case MODE_GET: - need_processing = 0; /* only need processing if some vars found */ - /** Fall through */ - #ifndef NETSNMP_NO_WRITE_SUPPORT case MODE_SET_RESERVE1: #endif /* NETSNMP_NO_WRITE_SUPPORT */ + need_processing = reqinfo->mode == MODE_GET ? 0 : 1; for (request = requests; request; request = request->next) { if (request->processed) continue; @@ -405,12 +410,21 @@ netsnmp_tdata_register(netsnmp_handler_registration *reginfo, netsnmp_tdata *table, netsnmp_table_registration_info *table_info) { - netsnmp_inject_handler(reginfo, netsnmp_get_tdata_handler(table)); + netsnmp_mib_handler *handler = netsnmp_get_tdata_handler(table); + + if (!reginfo || !table || !table_info || !handler || + (netsnmp_inject_handler(reginfo, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, "could not create tdata handler\n"); + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reginfo); + return SNMP_ERR_GENERR; + } + return netsnmp_container_table_register(reginfo, table_info, table->container, TABLE_CONTAINER_KEY_NETSNMP_INDEX); } -netsnmp_feature_child_of(tdata_unregister, table_tdata_all) +netsnmp_feature_child_of(tdata_unregister, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_UNREGISTER int netsnmp_tdata_unregister(netsnmp_handler_registration *reginfo) @@ -431,7 +445,7 @@ netsnmp_tdata_extract_table(netsnmp_request_info *request) #endif /* NETSNMP_FEATURE_REMOVE_TABLE_TDATA_EXTRACT_TABLE */ /** extracts the tdata container from the request structure */ -netsnmp_feature_child_of(tdata_extract_container, table_tdata_all) +netsnmp_feature_child_of(tdata_extract_container, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_EXTRACT_CONTAINER netsnmp_container * netsnmp_tdata_extract_container(netsnmp_request_info *request) @@ -578,7 +592,7 @@ netsnmp_tdata_row_next_byoid(netsnmp_tdata *table, return (netsnmp_tdata_row*)CONTAINER_NEXT( table->container, &index ); } -netsnmp_feature_child_of(tdata_row_count, table_tdata_all) +netsnmp_feature_child_of(tdata_row_count, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_ROW_COUNT int netsnmp_tdata_row_count(netsnmp_tdata *table) @@ -597,7 +611,7 @@ netsnmp_tdata_row_count(netsnmp_tdata *table) /** compare a row with the given index values */ -netsnmp_feature_child_of(tdata_compare_idx, table_tdata_all) +netsnmp_feature_child_of(tdata_compare_idx, table_tdata_all); #ifndef NETSNMP_FEATURE_REMOVE_TDATA_COMPARE_IDX int netsnmp_tdata_compare_idx(netsnmp_tdata_row *row, diff --git a/agent/helpers/watcher.c b/agent/helpers/watcher.c index 9b3933b..3988e2a 100644 --- a/agent/helpers/watcher.c +++ b/agent/helpers/watcher.c @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include @@ -20,18 +31,18 @@ static void free_wrapper(void * p) #define free_wrapper free #endif -netsnmp_feature_provide(watcher_all) -netsnmp_feature_child_of(watcher_all, mib_helpers) -netsnmp_feature_child_of(watcher_create_info6, watcher_all) -netsnmp_feature_child_of(watcher_register_timestamp, watcher_all) -netsnmp_feature_child_of(watcher_ulong_scalar, watcher_all) -netsnmp_feature_child_of(watcher_read_only_ulong_scalar, watcher_all) -netsnmp_feature_child_of(watcher_read_only_int_scalar, watcher_all) -netsnmp_feature_child_of(watcher_long_scalar, watcher_all) -netsnmp_feature_child_of(watcher_read_only_long_scalar, watcher_all) -netsnmp_feature_child_of(watcher_int_scalar, watcher_all) -netsnmp_feature_child_of(read_only_counter32_scalar, watcher_all) -netsnmp_feature_child_of(watcher_spinlock, watcher_all) +netsnmp_feature_provide(watcher_all); +netsnmp_feature_child_of(watcher_all, mib_helpers); +netsnmp_feature_child_of(watcher_create_info6, watcher_all); +netsnmp_feature_child_of(watcher_register_timestamp, watcher_all); +netsnmp_feature_child_of(watcher_ulong_scalar, watcher_all); +netsnmp_feature_child_of(watcher_read_only_ulong_scalar, watcher_all); +netsnmp_feature_child_of(watcher_read_only_int_scalar, watcher_all); +netsnmp_feature_child_of(watcher_long_scalar, watcher_all); +netsnmp_feature_child_of(watcher_read_only_long_scalar, watcher_all); +netsnmp_feature_child_of(watcher_int_scalar, watcher_all); +netsnmp_feature_child_of(read_only_counter32_scalar, watcher_all); +netsnmp_feature_child_of(watcher_spinlock, watcher_all); /** @defgroup watcher watcher * Watch a specified variable and process it as an instance or scalar object @@ -107,13 +118,22 @@ int netsnmp_register_watched_instance(netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo) { - netsnmp_mib_handler *whandler; + netsnmp_mib_handler *whandler = NULL; - whandler = netsnmp_get_watcher_handler(); - whandler->myvoid = (void *)watchinfo; + if (reginfo && watchinfo) { + whandler = netsnmp_get_watcher_handler(); + if (whandler) { + whandler->myvoid = (void *)watchinfo; + if (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS) + return netsnmp_register_instance(reginfo); + } + } + + snmp_log(LOG_ERR, "could not create watched instance handler\n"); + netsnmp_handler_free(whandler); + netsnmp_handler_registration_free(reginfo); - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_instance(reginfo); + return MIB_REGISTRATION_FAILED; } /** @@ -125,14 +145,23 @@ int netsnmp_register_watched_instance2(netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo) { - netsnmp_mib_handler *whandler; + netsnmp_mib_handler *whandler = NULL; - whandler = netsnmp_get_watcher_handler(); - whandler->myvoid = (void *)watchinfo; - netsnmp_owns_watcher_info(whandler); + if (reginfo && watchinfo) { + whandler = netsnmp_get_watcher_handler(); + if (whandler) { + whandler->myvoid = (void *)watchinfo; + netsnmp_owns_watcher_info(whandler); + if (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS) + return netsnmp_register_instance(reginfo); + } + } - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_instance(reginfo); + snmp_log(LOG_ERR, "could not create watched instance2 handler\n"); + netsnmp_handler_free(whandler); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } /** @@ -144,13 +173,22 @@ int netsnmp_register_watched_scalar(netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo) { - netsnmp_mib_handler *whandler; + netsnmp_mib_handler *whandler = NULL; - whandler = netsnmp_get_watcher_handler(); - whandler->myvoid = (void *)watchinfo; + if (reginfo && watchinfo) { + whandler = netsnmp_get_watcher_handler(); + if (whandler) { + whandler->myvoid = (void *)watchinfo; + if (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS) + return netsnmp_register_scalar(reginfo); + } + } - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_scalar(reginfo); + snmp_log(LOG_ERR, "could not create watched scalar handler\n"); + netsnmp_handler_free(whandler); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } /** @@ -162,14 +200,23 @@ int netsnmp_register_watched_scalar2(netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo) { - netsnmp_mib_handler *whandler; + netsnmp_mib_handler *whandler = NULL; + + if (reginfo && watchinfo) { + whandler = netsnmp_get_watcher_handler(); + if (whandler) { + whandler->myvoid = (void *)watchinfo; + netsnmp_owns_watcher_info(whandler); + if (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS) + return netsnmp_register_scalar(reginfo); + } + } - whandler = netsnmp_get_watcher_handler(); - whandler->myvoid = (void *)watchinfo; - netsnmp_owns_watcher_info(whandler); + snmp_log(LOG_ERR, "could not create watched scalar2 handler\n"); + netsnmp_handler_free(whandler); + netsnmp_handler_registration_free(reginfo); - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_scalar(reginfo); + return MIB_REGISTRATION_FAILED; } void @@ -242,7 +289,9 @@ netsnmp_watcher_helper_handler(netsnmp_mib_handler *handler, netsnmp_request_info *requests) { netsnmp_watcher_info *winfo = (netsnmp_watcher_info *) handler->myvoid; +#ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_watcher_cache *old_data; +#endif /* NETSNMP_NO_WRITE_SUPPORT */ DEBUGMSGTL(("helper:watcher", "Got request: %d\n", reqinfo->mode)); DEBUGMSGTL(( "helper:watcher", " oid:")); @@ -359,9 +408,16 @@ netsnmp_watched_timestamp_register(netsnmp_mib_handler *whandler, netsnmp_handler_registration *reginfo, marker_t timestamp) { - whandler->myvoid = (void *)timestamp; - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_scalar(reginfo); /* XXX - or instance? */ + if (reginfo && whandler && timestamp) { + whandler->myvoid = (void *)timestamp; + if (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS) + return netsnmp_register_scalar(reginfo); /* XXX - or instance? */ + } + + snmp_log(LOG_ERR, "could not create watched timestamp handler\n"); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } #ifndef NETSNMP_FEATURE_REMOVE_WATCHER_REGISTER_TIMESTAMP @@ -452,15 +508,28 @@ int netsnmp_register_watched_spinlock(netsnmp_handler_registration *reginfo, int *spinlock) { - netsnmp_mib_handler *whandler; - netsnmp_watcher_info *winfo; - - whandler = netsnmp_get_watched_spinlock_handler(); - whandler->myvoid = (void *)spinlock; - winfo = netsnmp_create_watcher_info((void *)spinlock, - sizeof(int), ASN_INTEGER, WATCHER_FIXED_SIZE); - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_watched_scalar2(reginfo, winfo); + netsnmp_mib_handler *whandler = NULL; + netsnmp_watcher_info *winfo = NULL; + + if (reginfo && spinlock) { + whandler = netsnmp_get_watched_spinlock_handler(); + if (whandler) { + whandler->myvoid = (void *)spinlock; + winfo = netsnmp_create_watcher_info((void *)spinlock, sizeof(int), + ASN_INTEGER, + WATCHER_FIXED_SIZE); + if (winfo && + (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS)) + return netsnmp_register_watched_scalar2(reginfo, winfo); + } + } + + snmp_log(LOG_ERR, "could not create watched spinlock handler\n"); + SNMP_FREE(winfo); + netsnmp_handler_free(whandler); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } @@ -470,8 +539,10 @@ netsnmp_watched_spinlock_handler(netsnmp_mib_handler *handler, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { +#ifndef NETSNMP_NO_WRITE_SUPPORT int *spinlock = (int *) handler->myvoid; netsnmp_request_info *request; +#endif /* NETSNMP_NO_WRITE_SUPPORT */ DEBUGMSGTL(("helper:watcher:spinlock", "Got request: %d\n", reqinfo->mode)); @@ -537,26 +608,34 @@ register_scalar_watcher(const char* name, { netsnmp_handler_registration *reginfo = NULL; netsnmp_mib_handler *whandler = NULL; - netsnmp_watcher_info* watchinfo = - netsnmp_create_watcher_info(data, size, type, WATCHER_FIXED_SIZE); - if (watchinfo) + netsnmp_watcher_info* watchinfo; + + if (!name || !reg_oid || !data) + return MIB_REGISTRATION_FAILED; + + watchinfo = netsnmp_create_watcher_info(data, size, type, + WATCHER_FIXED_SIZE); + if (watchinfo) { whandler = netsnmp_get_watcher_handler(); - if (watchinfo && whandler) { - whandler->myvoid = watchinfo; - netsnmp_owns_watcher_info(whandler); - reginfo = - netsnmp_create_handler_registration( - name, subhandler, reg_oid, reg_oid_len, mode); - } - if (watchinfo && whandler && reginfo) { - netsnmp_inject_handler(reginfo, whandler); - return netsnmp_register_scalar(reginfo); + if (whandler) { + whandler->myvoid = watchinfo; + netsnmp_owns_watcher_info(whandler); + reginfo = + netsnmp_create_handler_registration(name, subhandler, + reg_oid, reg_oid_len, + mode); + if (reginfo && + (netsnmp_inject_handler(reginfo, whandler) == SNMPERR_SUCCESS)) + return netsnmp_register_scalar(reginfo); + } } - if (whandler) - netsnmp_handler_free(whandler); - else if (watchinfo) - free(watchinfo); - return SNMP_ERR_RESOURCEUNAVAILABLE; + + snmp_log(LOG_ERR, "failed to register scalar watcher\n"); + netsnmp_handler_free(whandler); + SNMP_FREE(watchinfo); + netsnmp_handler_registration_free(reginfo); + + return MIB_REGISTRATION_FAILED; } #ifndef NETSNMP_FEATURE_REMOVE_WATCHER_ULONG_SCALAR diff --git a/agent/kernel.c b/agent/kernel.c index 00fde77..9a6d225 100644 --- a/agent/kernel.c +++ b/agent/kernel.c @@ -17,27 +17,25 @@ #include -#ifdef NETSNMP_CAN_USE_NLIST - #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include #endif @@ -46,13 +44,8 @@ #include "kernel.h" #include -#ifndef NULL -#define NULL 0 -#endif - - -#if HAVE_KVM_H -kvm_t *kd = NULL; +#if defined(HAVE_KVM_H) && !defined(NETSNMP_NO_KMEM_USAGE) +kvm_t *kd; /** * Initialize the support for accessing kernel virtual memory. @@ -64,7 +57,7 @@ init_kmem(const char *file) { int res = TRUE; -#if HAVE_KVM_OPENFILES +#ifdef HAVE_KVM_OPENFILES char err[4096]; kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, err); @@ -112,7 +105,7 @@ klookup(unsigned long off, void *target, size_t siz) return 0; result = kvm_read(kd, off, target, siz); if (result != siz) { -#if HAVE_KVM_OPENFILES +#ifdef HAVE_KVM_OPENFILES snmp_log(LOG_ERR, "kvm_read(*, %lx, %p, %x) = %d: %s\n", off, target, (unsigned) siz, result, kvm_geterr(kd)); #else @@ -137,7 +130,8 @@ free_kmem(void) } } -#else /* HAVE_KVM_H */ +#elif defined(HAVE_NLIST_H) && !defined(__linux__) && \ + !defined(NETSNMP_NO_KMEM_USAGE) static off_t klseek(off_t); static int klread(char *, int); @@ -259,8 +253,15 @@ free_kmem(void) } } -#endif /* HAVE_KVM_H */ - #else -int unused; /* Suppress "empty translation unit" warning */ -#endif /* NETSNMP_CAN_USE_NLIST */ +int +init_kmem(const char *file) +{ + return 1; /* success */ +} + +void +free_kmem(void) +{ +} +#endif diff --git a/agent/kernel.h b/agent/kernel.h index 131687a..f43d4e7 100644 --- a/agent/kernel.h +++ b/agent/kernel.h @@ -15,16 +15,16 @@ */ /***********************************************************************/ -#ifdef NETSNMP_CAN_USE_NLIST extern int init_kmem(const char *); -extern int klookup(unsigned long, void *, size_t); extern void free_kmem(void); +#ifdef HAVE_KVM_H +extern int klookup(unsigned long, void *, size_t); #define NETSNMP_KLOOKUP(x,y,z) klookup((unsigned long) x,y,z) #else #define NETSNMP_KLOOKUP(x,y,z) (0) #endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include extern kvm_t *kd; #endif diff --git a/agent/mib_modules.c b/agent/mib_modules.c index cde317e..72f4a0c 100644 --- a/agent/mib_modules.c +++ b/agent/mib_modules.c @@ -4,29 +4,29 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -65,9 +65,6 @@ init_mib_modules(void) { static int once = 0; -#ifdef USING_IF_MIB_DATA_ACCESS_INTERFACE_MODULE - netsnmp_access_interface_init(); -#endif # include "mib_module_inits.h" need_shutdown = 1; diff --git a/agent/mibgroup/Makefile.depend b/agent/mibgroup/Makefile.depend index a5ab40b..ec6a493 100644 --- a/agent/mibgroup/Makefile.depend +++ b/agent/mibgroup/Makefile.depend @@ -4,6 +4,7 @@ ./header_complex.lo: ../../include/net-snmp/system/linux.h ./header_complex.lo: ../../include/net-snmp/system/sysv.h ./header_complex.lo: ../../include/net-snmp/system/generic.h +./header_complex.lo: ../../include/net-snmp/machine/generic.h ./header_complex.lo: ../../include/net-snmp/net-snmp-includes.h ./header_complex.lo: ../../include/net-snmp/definitions.h ./header_complex.lo: ../../include/net-snmp/types.h @@ -15,6 +16,7 @@ ./header_complex.lo: ../../include/net-snmp/pdu_api.h ./header_complex.lo: ../../include/net-snmp/library/asn1.h ./header_complex.lo: ../../include/net-snmp/output_api.h +./header_complex.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./header_complex.lo: ../../include/net-snmp/library/snmp_debug.h ./header_complex.lo: ../../include/net-snmp/library/snmp_logging.h ./header_complex.lo: ../../include/net-snmp/session_api.h @@ -32,6 +34,7 @@ ./header_complex.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./header_complex.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./header_complex.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./header_complex.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./header_complex.lo: ../../include/net-snmp/library/ucd_compat.h ./header_complex.lo: ../../include/net-snmp/library/mib.h ./header_complex.lo: ../../include/net-snmp/mib_api.h @@ -51,7 +54,6 @@ ./header_complex.lo: ../../include/net-snmp/library/data_list.h ./header_complex.lo: ../../include/net-snmp/library/check_varbind.h ./header_complex.lo: ../../include/net-snmp/library/container.h -./header_complex.lo: ../../include/net-snmp/library/factory.h ./header_complex.lo: ../../include/net-snmp/library/container_binary_array.h ./header_complex.lo: ../../include/net-snmp/library/container_list_ssll.h ./header_complex.lo: ../../include/net-snmp/library/container_iterator.h @@ -73,8 +75,8 @@ ./header_complex.lo: ../../include/net-snmp/library/lcd_time.h ./header_complex.lo: ../../include/net-snmp/library/snmp_secmod.h ./header_complex.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./header_complex.lo: ../../include/net-snmp/library/snmptsm.h ./header_complex.lo: ../../include/net-snmp/library/snmpusm.h +./header_complex.lo: ../../include/net-snmp/library/snmptsm.h ./header_complex.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./header_complex.lo: ../../include/net-snmp/agent/mib_module_config.h ./header_complex.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -127,6 +129,7 @@ ./testhandler.lo: ../../include/net-snmp/pdu_api.h ./testhandler.lo: ../../include/net-snmp/library/asn1.h ./testhandler.lo: ../../include/net-snmp/output_api.h +./testhandler.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./testhandler.lo: ../../include/net-snmp/library/snmp_debug.h ./testhandler.lo: ../../include/net-snmp/library/snmp_logging.h ./testhandler.lo: ../../include/net-snmp/session_api.h @@ -144,6 +147,7 @@ ./testhandler.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./testhandler.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./testhandler.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./testhandler.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./testhandler.lo: ../../include/net-snmp/library/ucd_compat.h ./testhandler.lo: ../../include/net-snmp/library/mib.h ./testhandler.lo: ../../include/net-snmp/mib_api.h @@ -162,7 +166,6 @@ ./testhandler.lo: ../../include/net-snmp/library/data_list.h ./testhandler.lo: ../../include/net-snmp/library/check_varbind.h ./testhandler.lo: ../../include/net-snmp/library/container.h -./testhandler.lo: ../../include/net-snmp/library/factory.h ./testhandler.lo: ../../include/net-snmp/library/container_binary_array.h ./testhandler.lo: ../../include/net-snmp/library/container_list_ssll.h ./testhandler.lo: ../../include/net-snmp/library/container_iterator.h @@ -183,8 +186,8 @@ ./testhandler.lo: ../../include/net-snmp/library/lcd_time.h ./testhandler.lo: ../../include/net-snmp/library/snmp_secmod.h ./testhandler.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./testhandler.lo: ../../include/net-snmp/library/snmptsm.h ./testhandler.lo: ../../include/net-snmp/library/snmpusm.h +./testhandler.lo: ../../include/net-snmp/library/snmptsm.h ./testhandler.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./testhandler.lo: ../../include/net-snmp/agent/mib_module_config.h ./testhandler.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -236,6 +239,7 @@ ./util_funcs.lo: ../../include/net-snmp/pdu_api.h ./util_funcs.lo: ../../include/net-snmp/library/asn1.h ./util_funcs.lo: ../../include/net-snmp/output_api.h +./util_funcs.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./util_funcs.lo: ../../include/net-snmp/library/snmp_debug.h ./util_funcs.lo: ../../include/net-snmp/library/snmp_logging.h ./util_funcs.lo: ../../include/net-snmp/session_api.h @@ -253,6 +257,7 @@ ./util_funcs.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./util_funcs.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./util_funcs.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./util_funcs.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./util_funcs.lo: ../../include/net-snmp/library/ucd_compat.h ./util_funcs.lo: ../../include/net-snmp/library/mib.h ./util_funcs.lo: ../../include/net-snmp/mib_api.h @@ -271,7 +276,6 @@ ./util_funcs.lo: ../../include/net-snmp/library/data_list.h ./util_funcs.lo: ../../include/net-snmp/library/check_varbind.h ./util_funcs.lo: ../../include/net-snmp/library/container.h -./util_funcs.lo: ../../include/net-snmp/library/factory.h ./util_funcs.lo: ../../include/net-snmp/library/container_binary_array.h ./util_funcs.lo: ../../include/net-snmp/library/container_list_ssll.h ./util_funcs.lo: ../../include/net-snmp/library/container_iterator.h @@ -292,8 +296,8 @@ ./util_funcs.lo: ../../include/net-snmp/library/lcd_time.h ./util_funcs.lo: ../../include/net-snmp/library/snmp_secmod.h ./util_funcs.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./util_funcs.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs.lo: ../../include/net-snmp/library/snmpusm.h +./util_funcs.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./util_funcs.lo: ../../include/net-snmp/agent/mib_module_config.h ./util_funcs.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -330,7 +334,8 @@ ./util_funcs.lo: ../../include/net-snmp/agent/table_container.h ./util_funcs.lo: ../../include/net-snmp/agent/table_array.h ./util_funcs.lo: ../../include/net-snmp/agent/mfd.h -./util_funcs.lo: ../../include/net-snmp/agent/snmp_get_statistic.h struct.h +./util_funcs.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./util_funcs.lo: ../../include/net-snmp/agent/netsnmp_close_fds.h struct.h ./util_funcs.lo: util_funcs.h util_funcs/header_generic.h ./util_funcs.lo: util_funcs/header_simple_table.h ./util_funcs.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h utilities/execute.h @@ -338,8855 +343,6 @@ ./winExtDLL.lo: ../../include/net-snmp/net-snmp-config.h ./winExtDLL.lo: ../../include/net-snmp/net-snmp-features.h ./winExtDLL.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/extend.lo: ../../include/net-snmp/net-snmp-config.h -./agent/extend.lo: ../../include/net-snmp/net-snmp-features.h -./agent/extend.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/extend.lo: ../../include/net-snmp/definitions.h -./agent/extend.lo: ../../include/net-snmp/types.h -./agent/extend.lo: ../../include/net-snmp/library/oid.h -./agent/extend.lo: ../../include/net-snmp/library/types.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_api.h -./agent/extend.lo: ../../include/net-snmp/varbind_api.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_client.h -./agent/extend.lo: ../../include/net-snmp/pdu_api.h -./agent/extend.lo: ../../include/net-snmp/library/asn1.h -./agent/extend.lo: ../../include/net-snmp/output_api.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/extend.lo: ../../include/net-snmp/session_api.h -./agent/extend.lo: ../../include/net-snmp/library/callback.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_service.h -./agent/extend.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/extend.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/extend.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/extend.lo: ../../include/net-snmp/library/mib.h -./agent/extend.lo: ../../include/net-snmp/mib_api.h -./agent/extend.lo: ../../include/net-snmp/library/parse.h -./agent/extend.lo: ../../include/net-snmp/library/oid_stash.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/extend.lo: ../../include/net-snmp/library/snmp.h -./agent/extend.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/extend.lo: ../../include/net-snmp/library/getopt.h -./agent/extend.lo: ../../include/net-snmp/utilities.h -./agent/extend.lo: ../../include/net-snmp/library/system.h -./agent/extend.lo: ../../include/net-snmp/library/tools.h -./agent/extend.lo: ../../include/net-snmp/library/int64.h -./agent/extend.lo: ../../include/net-snmp/library/mt_support.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/extend.lo: ../../include/net-snmp/library/data_list.h -./agent/extend.lo: ../../include/net-snmp/library/check_varbind.h -./agent/extend.lo: ../../include/net-snmp/library/container.h -./agent/extend.lo: ../../include/net-snmp/library/factory.h -./agent/extend.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/extend.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/extend.lo: ../../include/net-snmp/library/container_iterator.h -./agent/extend.lo: ../../include/net-snmp/library/container.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/extend.lo: ../../include/net-snmp/version.h -./agent/extend.lo: ../../include/net-snmp/config_api.h -./agent/extend.lo: ../../include/net-snmp/library/read_config.h -./agent/extend.lo: ../../include/net-snmp/library/default_store.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/extend.lo: ../../include/net-snmp/library/vacm.h -./agent/extend.lo: ../../include/net-snmp/snmpv3_api.h -./agent/extend.lo: ../../include/net-snmp/library/snmpv3.h -./agent/extend.lo: ../../include/net-snmp/library/transform_oids.h -./agent/extend.lo: ../../include/net-snmp/library/keytools.h -./agent/extend.lo: ../../include/net-snmp/library/scapi.h -./agent/extend.lo: ../../include/net-snmp/library/lcd_time.h -./agent/extend.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/extend.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/extend.lo: ../../include/net-snmp/library/snmptsm.h -./agent/extend.lo: ../../include/net-snmp/library/snmpusm.h -./agent/extend.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/extend.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/extend.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/extend.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/extend.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/extend.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/extend.lo: ../../include/net-snmp/agent/var_struct.h -./agent/extend.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/extend.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/extend.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/extend.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/extend.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/extend.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/extend.lo: ../../include/net-snmp/agent/instance.h -./agent/extend.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/extend.lo: ../../include/net-snmp/agent/scalar.h -./agent/extend.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/extend.lo: ../../include/net-snmp/agent/watcher.h -./agent/extend.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/extend.lo: ../../include/net-snmp/agent/null.h -./agent/extend.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/extend.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/extend.lo: ../../include/net-snmp/agent/old_api.h -./agent/extend.lo: ../../include/net-snmp/agent/read_only.h -./agent/extend.lo: ../../include/net-snmp/agent/row_merge.h -./agent/extend.lo: ../../include/net-snmp/agent/serialize.h -./agent/extend.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/extend.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/extend.lo: ../../include/net-snmp/agent/table.h -./agent/extend.lo: ../../include/net-snmp/agent/table_data.h -./agent/extend.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/extend.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/extend.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/extend.lo: ../../include/net-snmp/agent/table_container.h -./agent/extend.lo: ../../include/net-snmp/agent/table_array.h -./agent/extend.lo: ../../include/net-snmp/agent/mfd.h -./agent/extend.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/extend.lo: ../../include/net-snmp/agent/agent_callbacks.h -./agent/extend.lo: agent/extend.h utilities/execute.h struct.h -./agent/extend.lo: util_funcs/header_simple_table.h mibdefs.h -./agent/nsCache.lo: ../../include/net-snmp/net-snmp-config.h -./agent/nsCache.lo: ../../include/net-snmp/net-snmp-features.h -./agent/nsCache.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/nsCache.lo: ../../include/net-snmp/definitions.h -./agent/nsCache.lo: ../../include/net-snmp/types.h -./agent/nsCache.lo: ../../include/net-snmp/library/oid.h -./agent/nsCache.lo: ../../include/net-snmp/library/types.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_api.h -./agent/nsCache.lo: ../../include/net-snmp/varbind_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_client.h -./agent/nsCache.lo: ../../include/net-snmp/pdu_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/asn1.h -./agent/nsCache.lo: ../../include/net-snmp/output_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/nsCache.lo: ../../include/net-snmp/session_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/callback.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_service.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/nsCache.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/nsCache.lo: ../../include/net-snmp/library/mib.h -./agent/nsCache.lo: ../../include/net-snmp/mib_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/parse.h -./agent/nsCache.lo: ../../include/net-snmp/library/oid_stash.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/nsCache.lo: ../../include/net-snmp/library/getopt.h -./agent/nsCache.lo: ../../include/net-snmp/utilities.h -./agent/nsCache.lo: ../../include/net-snmp/library/system.h -./agent/nsCache.lo: ../../include/net-snmp/library/tools.h -./agent/nsCache.lo: ../../include/net-snmp/library/int64.h -./agent/nsCache.lo: ../../include/net-snmp/library/mt_support.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/nsCache.lo: ../../include/net-snmp/library/data_list.h -./agent/nsCache.lo: ../../include/net-snmp/library/check_varbind.h -./agent/nsCache.lo: ../../include/net-snmp/library/container.h -./agent/nsCache.lo: ../../include/net-snmp/library/factory.h -./agent/nsCache.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/nsCache.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/nsCache.lo: ../../include/net-snmp/library/container_iterator.h -./agent/nsCache.lo: ../../include/net-snmp/library/container.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/nsCache.lo: ../../include/net-snmp/version.h -./agent/nsCache.lo: ../../include/net-snmp/config_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/read_config.h -./agent/nsCache.lo: ../../include/net-snmp/library/default_store.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/nsCache.lo: ../../include/net-snmp/library/vacm.h -./agent/nsCache.lo: ../../include/net-snmp/snmpv3_api.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpv3.h -./agent/nsCache.lo: ../../include/net-snmp/library/transform_oids.h -./agent/nsCache.lo: ../../include/net-snmp/library/keytools.h -./agent/nsCache.lo: ../../include/net-snmp/library/scapi.h -./agent/nsCache.lo: ../../include/net-snmp/library/lcd_time.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmptsm.h -./agent/nsCache.lo: ../../include/net-snmp/library/snmpusm.h -./agent/nsCache.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/nsCache.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/nsCache.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/nsCache.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/nsCache.lo: ../../include/net-snmp/agent/var_struct.h -./agent/nsCache.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/nsCache.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/nsCache.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/nsCache.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/nsCache.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/nsCache.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/nsCache.lo: ../../include/net-snmp/agent/instance.h -./agent/nsCache.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/nsCache.lo: ../../include/net-snmp/agent/scalar.h -./agent/nsCache.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/nsCache.lo: ../../include/net-snmp/agent/watcher.h -./agent/nsCache.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/nsCache.lo: ../../include/net-snmp/agent/null.h -./agent/nsCache.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/nsCache.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/nsCache.lo: ../../include/net-snmp/agent/old_api.h -./agent/nsCache.lo: ../../include/net-snmp/agent/read_only.h -./agent/nsCache.lo: ../../include/net-snmp/agent/row_merge.h -./agent/nsCache.lo: ../../include/net-snmp/agent/serialize.h -./agent/nsCache.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/nsCache.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table_data.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table_container.h -./agent/nsCache.lo: ../../include/net-snmp/agent/table_array.h -./agent/nsCache.lo: ../../include/net-snmp/agent/mfd.h -./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/nsCache.lo: agent/nsCache.h -./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-config.h -./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/nsDebug.lo: ../../include/net-snmp/definitions.h -./agent/nsDebug.lo: ../../include/net-snmp/types.h -./agent/nsDebug.lo: ../../include/net-snmp/library/oid.h -./agent/nsDebug.lo: ../../include/net-snmp/library/types.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_api.h -./agent/nsDebug.lo: ../../include/net-snmp/varbind_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_client.h -./agent/nsDebug.lo: ../../include/net-snmp/pdu_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/asn1.h -./agent/nsDebug.lo: ../../include/net-snmp/output_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/nsDebug.lo: ../../include/net-snmp/session_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/callback.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_service.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/nsDebug.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/nsDebug.lo: ../../include/net-snmp/library/mib.h -./agent/nsDebug.lo: ../../include/net-snmp/mib_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/parse.h -./agent/nsDebug.lo: ../../include/net-snmp/library/oid_stash.h -./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-features.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/nsDebug.lo: ../../include/net-snmp/library/getopt.h -./agent/nsDebug.lo: ../../include/net-snmp/utilities.h -./agent/nsDebug.lo: ../../include/net-snmp/library/system.h -./agent/nsDebug.lo: ../../include/net-snmp/library/tools.h -./agent/nsDebug.lo: ../../include/net-snmp/library/int64.h -./agent/nsDebug.lo: ../../include/net-snmp/library/mt_support.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/nsDebug.lo: ../../include/net-snmp/library/data_list.h -./agent/nsDebug.lo: ../../include/net-snmp/library/check_varbind.h -./agent/nsDebug.lo: ../../include/net-snmp/library/container.h -./agent/nsDebug.lo: ../../include/net-snmp/library/factory.h -./agent/nsDebug.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/nsDebug.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/nsDebug.lo: ../../include/net-snmp/library/container_iterator.h -./agent/nsDebug.lo: ../../include/net-snmp/library/container.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/nsDebug.lo: ../../include/net-snmp/version.h -./agent/nsDebug.lo: ../../include/net-snmp/config_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/read_config.h -./agent/nsDebug.lo: ../../include/net-snmp/library/default_store.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/nsDebug.lo: ../../include/net-snmp/library/vacm.h -./agent/nsDebug.lo: ../../include/net-snmp/snmpv3_api.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpv3.h -./agent/nsDebug.lo: ../../include/net-snmp/library/transform_oids.h -./agent/nsDebug.lo: ../../include/net-snmp/library/keytools.h -./agent/nsDebug.lo: ../../include/net-snmp/library/scapi.h -./agent/nsDebug.lo: ../../include/net-snmp/library/lcd_time.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmptsm.h -./agent/nsDebug.lo: ../../include/net-snmp/library/snmpusm.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/var_struct.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/nsDebug.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/instance.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/scalar.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/watcher.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/null.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/old_api.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/read_only.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/row_merge.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/serialize.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table_data.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table_container.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/table_array.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/mfd.h -./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/nsDebug.lo: agent/nsDebug.h -./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-config.h -./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-features.h -./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/nsLogging.lo: ../../include/net-snmp/definitions.h -./agent/nsLogging.lo: ../../include/net-snmp/types.h -./agent/nsLogging.lo: ../../include/net-snmp/library/oid.h -./agent/nsLogging.lo: ../../include/net-snmp/library/types.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_api.h -./agent/nsLogging.lo: ../../include/net-snmp/varbind_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_client.h -./agent/nsLogging.lo: ../../include/net-snmp/pdu_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/asn1.h -./agent/nsLogging.lo: ../../include/net-snmp/output_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/nsLogging.lo: ../../include/net-snmp/session_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/callback.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_service.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/nsLogging.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/nsLogging.lo: ../../include/net-snmp/library/mib.h -./agent/nsLogging.lo: ../../include/net-snmp/mib_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/parse.h -./agent/nsLogging.lo: ../../include/net-snmp/library/oid_stash.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/nsLogging.lo: ../../include/net-snmp/library/getopt.h -./agent/nsLogging.lo: ../../include/net-snmp/utilities.h -./agent/nsLogging.lo: ../../include/net-snmp/library/system.h -./agent/nsLogging.lo: ../../include/net-snmp/library/tools.h -./agent/nsLogging.lo: ../../include/net-snmp/library/int64.h -./agent/nsLogging.lo: ../../include/net-snmp/library/mt_support.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/nsLogging.lo: ../../include/net-snmp/library/data_list.h -./agent/nsLogging.lo: ../../include/net-snmp/library/check_varbind.h -./agent/nsLogging.lo: ../../include/net-snmp/library/container.h -./agent/nsLogging.lo: ../../include/net-snmp/library/factory.h -./agent/nsLogging.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/nsLogging.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/nsLogging.lo: ../../include/net-snmp/library/container_iterator.h -./agent/nsLogging.lo: ../../include/net-snmp/library/container.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/nsLogging.lo: ../../include/net-snmp/version.h -./agent/nsLogging.lo: ../../include/net-snmp/config_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/read_config.h -./agent/nsLogging.lo: ../../include/net-snmp/library/default_store.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/nsLogging.lo: ../../include/net-snmp/library/vacm.h -./agent/nsLogging.lo: ../../include/net-snmp/snmpv3_api.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpv3.h -./agent/nsLogging.lo: ../../include/net-snmp/library/transform_oids.h -./agent/nsLogging.lo: ../../include/net-snmp/library/keytools.h -./agent/nsLogging.lo: ../../include/net-snmp/library/scapi.h -./agent/nsLogging.lo: ../../include/net-snmp/library/lcd_time.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmptsm.h -./agent/nsLogging.lo: ../../include/net-snmp/library/snmpusm.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/var_struct.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/nsLogging.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/instance.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/scalar.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/watcher.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/null.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/old_api.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/read_only.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/row_merge.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/serialize.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table_data.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table_container.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/table_array.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/mfd.h -./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/nsLogging.lo: agent/nsLogging.h -./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-config.h -./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-features.h -./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/nsModuleTable.lo: ../../include/net-snmp/definitions.h -./agent/nsModuleTable.lo: ../../include/net-snmp/types.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/oid.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/types.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/varbind_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_client.h -./agent/nsModuleTable.lo: ../../include/net-snmp/pdu_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/asn1.h -./agent/nsModuleTable.lo: ../../include/net-snmp/output_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/nsModuleTable.lo: ../../include/net-snmp/session_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/callback.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_service.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/mib.h -./agent/nsModuleTable.lo: ../../include/net-snmp/mib_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/parse.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/oid_stash.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/getopt.h -./agent/nsModuleTable.lo: ../../include/net-snmp/utilities.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/system.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/tools.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/int64.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/mt_support.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/data_list.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/check_varbind.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/container.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/factory.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/container_iterator.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/container.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/nsModuleTable.lo: ../../include/net-snmp/version.h -./agent/nsModuleTable.lo: ../../include/net-snmp/config_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/read_config.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/default_store.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/vacm.h -./agent/nsModuleTable.lo: ../../include/net-snmp/snmpv3_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpv3.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/transform_oids.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/keytools.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/scapi.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/lcd_time.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmptsm.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpusm.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/var_struct.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/nsModuleTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/instance.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/scalar.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/watcher.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/null.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/old_api.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/read_only.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/row_merge.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/serialize.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_data.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_container.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_array.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/mfd.h -./agent/nsModuleTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/nsModuleTable.lo: ./agent/nsModuleTable.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/net-snmp-config.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/net-snmp-features.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/definitions.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/types.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/oid.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/types.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/varbind_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_client.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/pdu_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/asn1.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/output_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/session_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/callback.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_service.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/mib.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/mib_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/parse.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/oid_stash.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/getopt.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/utilities.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/system.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/tools.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/int64.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/mt_support.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/data_list.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/check_varbind.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/factory.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container_iterator.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/version.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/config_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/read_config.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/default_store.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/vacm.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/snmpv3_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpv3.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/transform_oids.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/keytools.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/scapi.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/lcd_time.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmptsm.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpusm.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/var_struct.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/instance.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/scalar.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/watcher.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/null.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/old_api.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/read_only.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/row_merge.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/serialize.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_data.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_container.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_array.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/mfd.h -./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/nsTransactionTable.lo: ./agent/nsTransactionTable.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/net-snmp-config.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/net-snmp-features.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/net-snmp-includes.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/definitions.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/types.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/oid.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/types.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/varbind_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_client.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/pdu_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/asn1.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/output_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_debug.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_logging.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/session_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/callback.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_transport.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_service.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/ucd_compat.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/mib.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/mib_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/parse.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/oid_stash.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_impl.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp-tc.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/getopt.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/utilities.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/system.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/tools.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/int64.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/mt_support.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/data_list.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/check_varbind.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/factory.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container_binary_array.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container_iterator.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_assert.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/version.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/config_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/read_config.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/default_store.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_enum.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/vacm.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/snmpv3_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpv3.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/transform_oids.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/keytools.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/scapi.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/lcd_time.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmptsm.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpusm.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_handler.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/var_struct.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_registry.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/ds_agent.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_trap.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/all_helpers.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/instance.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/baby_steps.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/scalar.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/scalar_group.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/watcher.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/multiplexer.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/null.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/debug_handler.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/cache_handler.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/old_api.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/read_only.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/row_merge.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/serialize.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_data.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_dataset.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_tdata.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_iterator.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_container.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_array.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/mfd.h -./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agent/nsVacmAccessTable.lo: ./agent/nsVacmAccessTable.h -./agentx/agentx_config.lo: ../../include/net-snmp/net-snmp-config.h -./agentx/agentx_config.lo: ../../include/net-snmp/net-snmp-features.h -./agentx/agentx_config.lo: ../../include/net-snmp/net-snmp-includes.h -./agentx/agentx_config.lo: ../../include/net-snmp/definitions.h -./agentx/agentx_config.lo: ../../include/net-snmp/types.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/oid.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/types.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/varbind_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_client.h -./agentx/agentx_config.lo: ../../include/net-snmp/pdu_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/asn1.h -./agentx/agentx_config.lo: ../../include/net-snmp/output_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_debug.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_logging.h -./agentx/agentx_config.lo: ../../include/net-snmp/session_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/callback.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_transport.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_service.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/ucd_compat.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/mib.h -./agentx/agentx_config.lo: ../../include/net-snmp/mib_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/parse.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/oid_stash.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_impl.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp-tc.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/getopt.h -./agentx/agentx_config.lo: ../../include/net-snmp/utilities.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/system.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/tools.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/int64.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/mt_support.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_alarm.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/data_list.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/check_varbind.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/container.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/factory.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/container_binary_array.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/container_list_ssll.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/container_iterator.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/container.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_assert.h -./agentx/agentx_config.lo: ../../include/net-snmp/version.h -./agentx/agentx_config.lo: ../../include/net-snmp/config_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/read_config.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/default_store.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_enum.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/vacm.h -./agentx/agentx_config.lo: ../../include/net-snmp/snmpv3_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpv3.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/transform_oids.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/keytools.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/scapi.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/lcd_time.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_secmod.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmptsm.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpusm.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/mib_module_config.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_module_config.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/snmp_agent.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/snmp_vars.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_handler.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/var_struct.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_registry.h -./agentx/agentx_config.lo: ../../include/net-snmp/library/fd_event_manager.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/ds_agent.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_read_config.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_trap.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/all_helpers.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/instance.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/baby_steps.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/scalar.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/scalar_group.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/watcher.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/multiplexer.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/null.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/debug_handler.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/cache_handler.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/old_api.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/read_only.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/row_merge.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/serialize.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/mode_end_call.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_data.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_dataset.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_tdata.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_iterator.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_container.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_array.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/mfd.h -./agentx/agentx_config.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agentx/agentx_config.lo: ../../agent/snmpd.h agentx/agentx_config.h -./agentx/agentx_config.lo: agentx/protocol.h -./agentx/client.lo: ../../include/net-snmp/net-snmp-config.h -./agentx/client.lo: ../../include/net-snmp/net-snmp-features.h -./agentx/client.lo: ../../include/net-snmp/net-snmp-includes.h -./agentx/client.lo: ../../include/net-snmp/definitions.h -./agentx/client.lo: ../../include/net-snmp/types.h -./agentx/client.lo: ../../include/net-snmp/library/oid.h -./agentx/client.lo: ../../include/net-snmp/library/types.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_api.h -./agentx/client.lo: ../../include/net-snmp/varbind_api.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_client.h -./agentx/client.lo: ../../include/net-snmp/pdu_api.h -./agentx/client.lo: ../../include/net-snmp/library/asn1.h -./agentx/client.lo: ../../include/net-snmp/output_api.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_debug.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_logging.h -./agentx/client.lo: ../../include/net-snmp/session_api.h -./agentx/client.lo: ../../include/net-snmp/library/callback.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_transport.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_service.h -./agentx/client.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agentx/client.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agentx/client.lo: ../../include/net-snmp/library/ucd_compat.h -./agentx/client.lo: ../../include/net-snmp/library/mib.h -./agentx/client.lo: ../../include/net-snmp/mib_api.h -./agentx/client.lo: ../../include/net-snmp/library/parse.h -./agentx/client.lo: ../../include/net-snmp/library/oid_stash.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_impl.h -./agentx/client.lo: ../../include/net-snmp/library/snmp.h -./agentx/client.lo: ../../include/net-snmp/library/snmp-tc.h -./agentx/client.lo: ../../include/net-snmp/library/getopt.h -./agentx/client.lo: ../../include/net-snmp/utilities.h -./agentx/client.lo: ../../include/net-snmp/library/system.h -./agentx/client.lo: ../../include/net-snmp/library/tools.h -./agentx/client.lo: ../../include/net-snmp/library/int64.h -./agentx/client.lo: ../../include/net-snmp/library/mt_support.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_alarm.h -./agentx/client.lo: ../../include/net-snmp/library/data_list.h -./agentx/client.lo: ../../include/net-snmp/library/check_varbind.h -./agentx/client.lo: ../../include/net-snmp/library/container.h -./agentx/client.lo: ../../include/net-snmp/library/factory.h -./agentx/client.lo: ../../include/net-snmp/library/container_binary_array.h -./agentx/client.lo: ../../include/net-snmp/library/container_list_ssll.h -./agentx/client.lo: ../../include/net-snmp/library/container_iterator.h -./agentx/client.lo: ../../include/net-snmp/library/container.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_assert.h -./agentx/client.lo: ../../include/net-snmp/version.h -./agentx/client.lo: ../../include/net-snmp/config_api.h -./agentx/client.lo: ../../include/net-snmp/library/read_config.h -./agentx/client.lo: ../../include/net-snmp/library/default_store.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_enum.h -./agentx/client.lo: ../../include/net-snmp/library/vacm.h -./agentx/client.lo: ../../include/net-snmp/snmpv3_api.h -./agentx/client.lo: ../../include/net-snmp/library/snmpv3.h -./agentx/client.lo: ../../include/net-snmp/library/transform_oids.h -./agentx/client.lo: ../../include/net-snmp/library/keytools.h -./agentx/client.lo: ../../include/net-snmp/library/scapi.h -./agentx/client.lo: ../../include/net-snmp/library/lcd_time.h -./agentx/client.lo: ../../include/net-snmp/library/snmp_secmod.h -./agentx/client.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agentx/client.lo: ../../include/net-snmp/library/snmptsm.h -./agentx/client.lo: ../../include/net-snmp/library/snmpusm.h -./agentx/client.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agentx/client.lo: ../../include/net-snmp/agent/mib_module_config.h -./agentx/client.lo: ../../include/net-snmp/agent/agent_module_config.h -./agentx/client.lo: ../../include/net-snmp/agent/snmp_agent.h -./agentx/client.lo: ../../include/net-snmp/agent/snmp_vars.h -./agentx/client.lo: ../../include/net-snmp/agent/agent_handler.h -./agentx/client.lo: ../../include/net-snmp/agent/var_struct.h -./agentx/client.lo: ../../include/net-snmp/agent/agent_registry.h -./agentx/client.lo: ../../include/net-snmp/library/fd_event_manager.h -./agentx/client.lo: ../../include/net-snmp/agent/ds_agent.h -./agentx/client.lo: ../../include/net-snmp/agent/agent_read_config.h -./agentx/client.lo: ../../include/net-snmp/agent/agent_trap.h -./agentx/client.lo: ../../include/net-snmp/agent/all_helpers.h -./agentx/client.lo: ../../include/net-snmp/agent/instance.h -./agentx/client.lo: ../../include/net-snmp/agent/baby_steps.h -./agentx/client.lo: ../../include/net-snmp/agent/scalar.h -./agentx/client.lo: ../../include/net-snmp/agent/scalar_group.h -./agentx/client.lo: ../../include/net-snmp/agent/watcher.h -./agentx/client.lo: ../../include/net-snmp/agent/multiplexer.h -./agentx/client.lo: ../../include/net-snmp/agent/null.h -./agentx/client.lo: ../../include/net-snmp/agent/debug_handler.h -./agentx/client.lo: ../../include/net-snmp/agent/cache_handler.h -./agentx/client.lo: ../../include/net-snmp/agent/old_api.h -./agentx/client.lo: ../../include/net-snmp/agent/read_only.h -./agentx/client.lo: ../../include/net-snmp/agent/row_merge.h -./agentx/client.lo: ../../include/net-snmp/agent/serialize.h -./agentx/client.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agentx/client.lo: ../../include/net-snmp/agent/mode_end_call.h -./agentx/client.lo: ../../include/net-snmp/agent/table.h -./agentx/client.lo: ../../include/net-snmp/agent/table_data.h -./agentx/client.lo: ../../include/net-snmp/agent/table_dataset.h -./agentx/client.lo: ../../include/net-snmp/agent/table_tdata.h -./agentx/client.lo: ../../include/net-snmp/agent/table_iterator.h -./agentx/client.lo: ../../include/net-snmp/agent/table_container.h -./agentx/client.lo: ../../include/net-snmp/agent/table_array.h -./agentx/client.lo: ../../include/net-snmp/agent/mfd.h -./agentx/client.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agentx/client.lo: ../../include/net-snmp/agent/agent_index.h -./agentx/client.lo: agentx/protocol.h agentx/client.h agentx/subagent.h -./agentx/master_admin.lo: ../../include/net-snmp/net-snmp-config.h -./agentx/master_admin.lo: ../../include/net-snmp/net-snmp-features.h -./agentx/master_admin.lo: ../../include/net-snmp/net-snmp-includes.h -./agentx/master_admin.lo: ../../include/net-snmp/definitions.h -./agentx/master_admin.lo: ../../include/net-snmp/types.h -./agentx/master_admin.lo: ../../include/net-snmp/library/oid.h -./agentx/master_admin.lo: ../../include/net-snmp/library/types.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_api.h -./agentx/master_admin.lo: ../../include/net-snmp/varbind_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_client.h -./agentx/master_admin.lo: ../../include/net-snmp/pdu_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/asn1.h -./agentx/master_admin.lo: ../../include/net-snmp/output_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_debug.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_logging.h -./agentx/master_admin.lo: ../../include/net-snmp/session_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/callback.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_transport.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_service.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agentx/master_admin.lo: ../../include/net-snmp/library/ucd_compat.h -./agentx/master_admin.lo: ../../include/net-snmp/library/mib.h -./agentx/master_admin.lo: ../../include/net-snmp/mib_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/parse.h -./agentx/master_admin.lo: ../../include/net-snmp/library/oid_stash.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_impl.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp-tc.h -./agentx/master_admin.lo: ../../include/net-snmp/library/getopt.h -./agentx/master_admin.lo: ../../include/net-snmp/utilities.h -./agentx/master_admin.lo: ../../include/net-snmp/library/system.h -./agentx/master_admin.lo: ../../include/net-snmp/library/tools.h -./agentx/master_admin.lo: ../../include/net-snmp/library/int64.h -./agentx/master_admin.lo: ../../include/net-snmp/library/mt_support.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_alarm.h -./agentx/master_admin.lo: ../../include/net-snmp/library/data_list.h -./agentx/master_admin.lo: ../../include/net-snmp/library/check_varbind.h -./agentx/master_admin.lo: ../../include/net-snmp/library/container.h -./agentx/master_admin.lo: ../../include/net-snmp/library/factory.h -./agentx/master_admin.lo: ../../include/net-snmp/library/container_binary_array.h -./agentx/master_admin.lo: ../../include/net-snmp/library/container_list_ssll.h -./agentx/master_admin.lo: ../../include/net-snmp/library/container_iterator.h -./agentx/master_admin.lo: ../../include/net-snmp/library/container.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_assert.h -./agentx/master_admin.lo: ../../include/net-snmp/version.h -./agentx/master_admin.lo: ../../include/net-snmp/config_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/read_config.h -./agentx/master_admin.lo: ../../include/net-snmp/library/default_store.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_enum.h -./agentx/master_admin.lo: ../../include/net-snmp/library/vacm.h -./agentx/master_admin.lo: ../../include/net-snmp/snmpv3_api.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpv3.h -./agentx/master_admin.lo: ../../include/net-snmp/library/transform_oids.h -./agentx/master_admin.lo: ../../include/net-snmp/library/keytools.h -./agentx/master_admin.lo: ../../include/net-snmp/library/scapi.h -./agentx/master_admin.lo: ../../include/net-snmp/library/lcd_time.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_secmod.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmptsm.h -./agentx/master_admin.lo: ../../include/net-snmp/library/snmpusm.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/mib_module_config.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_module_config.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/snmp_agent.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/snmp_vars.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_handler.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/var_struct.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_registry.h -./agentx/master_admin.lo: ../../include/net-snmp/library/fd_event_manager.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/ds_agent.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_read_config.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_trap.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/all_helpers.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/instance.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/baby_steps.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/scalar.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/scalar_group.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/watcher.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/multiplexer.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/null.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/debug_handler.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/cache_handler.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/old_api.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/read_only.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/row_merge.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/serialize.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/mode_end_call.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table_data.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table_dataset.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table_tdata.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table_iterator.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table_container.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/table_array.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/mfd.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agentx/master_admin.lo: agentx/protocol.h agentx/client.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_index.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_callbacks.h -./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_sysORTable.h -./agentx/master_admin.lo: ./agentx/master.h -./agentx/master.lo: ../../include/net-snmp/net-snmp-config.h -./agentx/master.lo: ../../include/net-snmp/net-snmp-features.h -./agentx/master.lo: ../../include/net-snmp/net-snmp-includes.h -./agentx/master.lo: ../../include/net-snmp/definitions.h -./agentx/master.lo: ../../include/net-snmp/types.h -./agentx/master.lo: ../../include/net-snmp/library/oid.h -./agentx/master.lo: ../../include/net-snmp/library/types.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_api.h -./agentx/master.lo: ../../include/net-snmp/varbind_api.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_client.h -./agentx/master.lo: ../../include/net-snmp/pdu_api.h -./agentx/master.lo: ../../include/net-snmp/library/asn1.h -./agentx/master.lo: ../../include/net-snmp/output_api.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_debug.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_logging.h -./agentx/master.lo: ../../include/net-snmp/session_api.h -./agentx/master.lo: ../../include/net-snmp/library/callback.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_transport.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_service.h -./agentx/master.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agentx/master.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agentx/master.lo: ../../include/net-snmp/library/ucd_compat.h -./agentx/master.lo: ../../include/net-snmp/library/mib.h -./agentx/master.lo: ../../include/net-snmp/mib_api.h -./agentx/master.lo: ../../include/net-snmp/library/parse.h -./agentx/master.lo: ../../include/net-snmp/library/oid_stash.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_impl.h -./agentx/master.lo: ../../include/net-snmp/library/snmp.h -./agentx/master.lo: ../../include/net-snmp/library/snmp-tc.h -./agentx/master.lo: ../../include/net-snmp/library/getopt.h -./agentx/master.lo: ../../include/net-snmp/utilities.h -./agentx/master.lo: ../../include/net-snmp/library/system.h -./agentx/master.lo: ../../include/net-snmp/library/tools.h -./agentx/master.lo: ../../include/net-snmp/library/int64.h -./agentx/master.lo: ../../include/net-snmp/library/mt_support.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_alarm.h -./agentx/master.lo: ../../include/net-snmp/library/data_list.h -./agentx/master.lo: ../../include/net-snmp/library/check_varbind.h -./agentx/master.lo: ../../include/net-snmp/library/container.h -./agentx/master.lo: ../../include/net-snmp/library/factory.h -./agentx/master.lo: ../../include/net-snmp/library/container_binary_array.h -./agentx/master.lo: ../../include/net-snmp/library/container_list_ssll.h -./agentx/master.lo: ../../include/net-snmp/library/container_iterator.h -./agentx/master.lo: ../../include/net-snmp/library/container.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_assert.h -./agentx/master.lo: ../../include/net-snmp/version.h -./agentx/master.lo: ../../include/net-snmp/config_api.h -./agentx/master.lo: ../../include/net-snmp/library/read_config.h -./agentx/master.lo: ../../include/net-snmp/library/default_store.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_enum.h -./agentx/master.lo: ../../include/net-snmp/library/vacm.h -./agentx/master.lo: ../../include/net-snmp/snmpv3_api.h -./agentx/master.lo: ../../include/net-snmp/library/snmpv3.h -./agentx/master.lo: ../../include/net-snmp/library/transform_oids.h -./agentx/master.lo: ../../include/net-snmp/library/keytools.h -./agentx/master.lo: ../../include/net-snmp/library/scapi.h -./agentx/master.lo: ../../include/net-snmp/library/lcd_time.h -./agentx/master.lo: ../../include/net-snmp/library/snmp_secmod.h -./agentx/master.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agentx/master.lo: ../../include/net-snmp/library/snmptsm.h -./agentx/master.lo: ../../include/net-snmp/library/snmpusm.h -./agentx/master.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agentx/master.lo: ../../include/net-snmp/agent/mib_module_config.h -./agentx/master.lo: ../../include/net-snmp/agent/agent_module_config.h -./agentx/master.lo: ../../include/net-snmp/agent/snmp_agent.h -./agentx/master.lo: ../../include/net-snmp/agent/snmp_vars.h -./agentx/master.lo: ../../include/net-snmp/agent/agent_handler.h -./agentx/master.lo: ../../include/net-snmp/agent/var_struct.h -./agentx/master.lo: ../../include/net-snmp/agent/agent_registry.h -./agentx/master.lo: ../../include/net-snmp/library/fd_event_manager.h -./agentx/master.lo: ../../include/net-snmp/agent/ds_agent.h -./agentx/master.lo: ../../include/net-snmp/agent/agent_read_config.h -./agentx/master.lo: ../../include/net-snmp/agent/agent_trap.h -./agentx/master.lo: ../../include/net-snmp/agent/all_helpers.h -./agentx/master.lo: ../../include/net-snmp/agent/instance.h -./agentx/master.lo: ../../include/net-snmp/agent/baby_steps.h -./agentx/master.lo: ../../include/net-snmp/agent/scalar.h -./agentx/master.lo: ../../include/net-snmp/agent/scalar_group.h -./agentx/master.lo: ../../include/net-snmp/agent/watcher.h -./agentx/master.lo: ../../include/net-snmp/agent/multiplexer.h -./agentx/master.lo: ../../include/net-snmp/agent/null.h -./agentx/master.lo: ../../include/net-snmp/agent/debug_handler.h -./agentx/master.lo: ../../include/net-snmp/agent/cache_handler.h -./agentx/master.lo: ../../include/net-snmp/agent/old_api.h -./agentx/master.lo: ../../include/net-snmp/agent/read_only.h -./agentx/master.lo: ../../include/net-snmp/agent/row_merge.h -./agentx/master.lo: ../../include/net-snmp/agent/serialize.h -./agentx/master.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agentx/master.lo: ../../include/net-snmp/agent/mode_end_call.h -./agentx/master.lo: ../../include/net-snmp/agent/table.h -./agentx/master.lo: ../../include/net-snmp/agent/table_data.h -./agentx/master.lo: ../../include/net-snmp/agent/table_dataset.h -./agentx/master.lo: ../../include/net-snmp/agent/table_tdata.h -./agentx/master.lo: ../../include/net-snmp/agent/table_iterator.h -./agentx/master.lo: ../../include/net-snmp/agent/table_container.h -./agentx/master.lo: ../../include/net-snmp/agent/table_array.h -./agentx/master.lo: ../../include/net-snmp/agent/mfd.h -./agentx/master.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agentx/master.lo: ../../agent/snmpd.h agentx/protocol.h -./agentx/master.lo: agentx/master_admin.h -./agentx/protocol.lo: ../../include/net-snmp/net-snmp-config.h -./agentx/protocol.lo: ../../include/net-snmp/net-snmp-includes.h -./agentx/protocol.lo: ../../include/net-snmp/definitions.h -./agentx/protocol.lo: ../../include/net-snmp/types.h -./agentx/protocol.lo: ../../include/net-snmp/library/oid.h -./agentx/protocol.lo: ../../include/net-snmp/library/types.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_api.h -./agentx/protocol.lo: ../../include/net-snmp/varbind_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_client.h -./agentx/protocol.lo: ../../include/net-snmp/pdu_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/asn1.h -./agentx/protocol.lo: ../../include/net-snmp/output_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_debug.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_logging.h -./agentx/protocol.lo: ../../include/net-snmp/session_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/callback.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_transport.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_service.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agentx/protocol.lo: ../../include/net-snmp/library/ucd_compat.h -./agentx/protocol.lo: ../../include/net-snmp/library/mib.h -./agentx/protocol.lo: ../../include/net-snmp/mib_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/parse.h -./agentx/protocol.lo: ../../include/net-snmp/library/oid_stash.h -./agentx/protocol.lo: ../../include/net-snmp/net-snmp-features.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_impl.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp-tc.h -./agentx/protocol.lo: ../../include/net-snmp/library/getopt.h -./agentx/protocol.lo: ../../include/net-snmp/utilities.h -./agentx/protocol.lo: ../../include/net-snmp/library/system.h -./agentx/protocol.lo: ../../include/net-snmp/library/tools.h -./agentx/protocol.lo: ../../include/net-snmp/library/int64.h -./agentx/protocol.lo: ../../include/net-snmp/library/mt_support.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_alarm.h -./agentx/protocol.lo: ../../include/net-snmp/library/data_list.h -./agentx/protocol.lo: ../../include/net-snmp/library/check_varbind.h -./agentx/protocol.lo: ../../include/net-snmp/library/container.h -./agentx/protocol.lo: ../../include/net-snmp/library/factory.h -./agentx/protocol.lo: ../../include/net-snmp/library/container_binary_array.h -./agentx/protocol.lo: ../../include/net-snmp/library/container_list_ssll.h -./agentx/protocol.lo: ../../include/net-snmp/library/container_iterator.h -./agentx/protocol.lo: ../../include/net-snmp/library/container.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_assert.h -./agentx/protocol.lo: ../../include/net-snmp/version.h -./agentx/protocol.lo: ../../include/net-snmp/config_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/read_config.h -./agentx/protocol.lo: ../../include/net-snmp/library/default_store.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_enum.h -./agentx/protocol.lo: ../../include/net-snmp/library/vacm.h -./agentx/protocol.lo: ../../include/net-snmp/snmpv3_api.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpv3.h -./agentx/protocol.lo: ../../include/net-snmp/library/transform_oids.h -./agentx/protocol.lo: ../../include/net-snmp/library/keytools.h -./agentx/protocol.lo: ../../include/net-snmp/library/scapi.h -./agentx/protocol.lo: ../../include/net-snmp/library/lcd_time.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmp_secmod.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmptsm.h -./agentx/protocol.lo: ../../include/net-snmp/library/snmpusm.h -./agentx/protocol.lo: agentx/protocol.h -./agentx/subagent.lo: ../../include/net-snmp/net-snmp-config.h -./agentx/subagent.lo: ../../include/net-snmp/net-snmp-features.h -./agentx/subagent.lo: ../../include/net-snmp/net-snmp-includes.h -./agentx/subagent.lo: ../../include/net-snmp/definitions.h -./agentx/subagent.lo: ../../include/net-snmp/types.h -./agentx/subagent.lo: ../../include/net-snmp/library/oid.h -./agentx/subagent.lo: ../../include/net-snmp/library/types.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_api.h -./agentx/subagent.lo: ../../include/net-snmp/varbind_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_client.h -./agentx/subagent.lo: ../../include/net-snmp/pdu_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/asn1.h -./agentx/subagent.lo: ../../include/net-snmp/output_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_debug.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_logging.h -./agentx/subagent.lo: ../../include/net-snmp/session_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/callback.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_transport.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_service.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./agentx/subagent.lo: ../../include/net-snmp/library/ucd_compat.h -./agentx/subagent.lo: ../../include/net-snmp/library/mib.h -./agentx/subagent.lo: ../../include/net-snmp/mib_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/parse.h -./agentx/subagent.lo: ../../include/net-snmp/library/oid_stash.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_impl.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp-tc.h -./agentx/subagent.lo: ../../include/net-snmp/library/getopt.h -./agentx/subagent.lo: ../../include/net-snmp/utilities.h -./agentx/subagent.lo: ../../include/net-snmp/library/system.h -./agentx/subagent.lo: ../../include/net-snmp/library/tools.h -./agentx/subagent.lo: ../../include/net-snmp/library/int64.h -./agentx/subagent.lo: ../../include/net-snmp/library/mt_support.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_alarm.h -./agentx/subagent.lo: ../../include/net-snmp/library/data_list.h -./agentx/subagent.lo: ../../include/net-snmp/library/check_varbind.h -./agentx/subagent.lo: ../../include/net-snmp/library/container.h -./agentx/subagent.lo: ../../include/net-snmp/library/factory.h -./agentx/subagent.lo: ../../include/net-snmp/library/container_binary_array.h -./agentx/subagent.lo: ../../include/net-snmp/library/container_list_ssll.h -./agentx/subagent.lo: ../../include/net-snmp/library/container_iterator.h -./agentx/subagent.lo: ../../include/net-snmp/library/container.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_assert.h -./agentx/subagent.lo: ../../include/net-snmp/version.h -./agentx/subagent.lo: ../../include/net-snmp/config_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/read_config.h -./agentx/subagent.lo: ../../include/net-snmp/library/default_store.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_parse_args.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_enum.h -./agentx/subagent.lo: ../../include/net-snmp/library/vacm.h -./agentx/subagent.lo: ../../include/net-snmp/snmpv3_api.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpv3.h -./agentx/subagent.lo: ../../include/net-snmp/library/transform_oids.h -./agentx/subagent.lo: ../../include/net-snmp/library/keytools.h -./agentx/subagent.lo: ../../include/net-snmp/library/scapi.h -./agentx/subagent.lo: ../../include/net-snmp/library/lcd_time.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmp_secmod.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmptsm.h -./agentx/subagent.lo: ../../include/net-snmp/library/snmpusm.h -./agentx/subagent.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./agentx/subagent.lo: ../../include/net-snmp/agent/mib_module_config.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_module_config.h -./agentx/subagent.lo: ../../include/net-snmp/agent/snmp_agent.h -./agentx/subagent.lo: ../../include/net-snmp/agent/snmp_vars.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_handler.h -./agentx/subagent.lo: ../../include/net-snmp/agent/var_struct.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_registry.h -./agentx/subagent.lo: ../../include/net-snmp/library/fd_event_manager.h -./agentx/subagent.lo: ../../include/net-snmp/agent/ds_agent.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_read_config.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_trap.h -./agentx/subagent.lo: ../../include/net-snmp/agent/all_helpers.h -./agentx/subagent.lo: ../../include/net-snmp/agent/instance.h -./agentx/subagent.lo: ../../include/net-snmp/agent/baby_steps.h -./agentx/subagent.lo: ../../include/net-snmp/agent/scalar.h -./agentx/subagent.lo: ../../include/net-snmp/agent/scalar_group.h -./agentx/subagent.lo: ../../include/net-snmp/agent/watcher.h -./agentx/subagent.lo: ../../include/net-snmp/agent/multiplexer.h -./agentx/subagent.lo: ../../include/net-snmp/agent/null.h -./agentx/subagent.lo: ../../include/net-snmp/agent/debug_handler.h -./agentx/subagent.lo: ../../include/net-snmp/agent/cache_handler.h -./agentx/subagent.lo: ../../include/net-snmp/agent/old_api.h -./agentx/subagent.lo: ../../include/net-snmp/agent/read_only.h -./agentx/subagent.lo: ../../include/net-snmp/agent/row_merge.h -./agentx/subagent.lo: ../../include/net-snmp/agent/serialize.h -./agentx/subagent.lo: ../../include/net-snmp/agent/bulk_to_next.h -./agentx/subagent.lo: ../../include/net-snmp/agent/mode_end_call.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table_data.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table_dataset.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table_tdata.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table_iterator.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table_container.h -./agentx/subagent.lo: ../../include/net-snmp/agent/table_array.h -./agentx/subagent.lo: ../../include/net-snmp/agent/mfd.h -./agentx/subagent.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./agentx/subagent.lo: ../../agent/snmpd.h agentx/protocol.h agentx/client.h -./agentx/subagent.lo: agentx/agentx_config.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_callbacks.h -./agentx/subagent.lo: ../../include/net-snmp/agent/sysORTable.h -./agentx/subagent.lo: ../../include/net-snmp/agent/agent_sysORTable.h -./agentx/subagent.lo: ./agentx/subagent.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/net-snmp-config.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/net-snmp-features.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/net-snmp-includes.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/definitions.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/types.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/oid.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/types.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/varbind_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_client.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/pdu_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/asn1.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/output_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_debug.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_logging.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/session_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/callback.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_transport.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_service.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/ucd_compat.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/mib.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/mib_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/parse.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/oid_stash.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_impl.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp-tc.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/getopt.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/utilities.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/system.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/tools.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/int64.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/mt_support.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_alarm.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/data_list.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/check_varbind.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/factory.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container_binary_array.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container_list_ssll.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container_iterator.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_assert.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/version.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/config_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/read_config.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/default_store.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_parse_args.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_enum.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/vacm.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/snmpv3_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpv3.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/transform_oids.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/keytools.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/scapi.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/lcd_time.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_secmod.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmptsm.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpusm.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/mib_module_config.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_module_config.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/snmp_agent.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/snmp_vars.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_handler.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/var_struct.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_registry.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/library/fd_event_manager.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/ds_agent.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_read_config.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_trap.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/all_helpers.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/instance.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/baby_steps.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/scalar.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/scalar_group.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/watcher.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/multiplexer.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/null.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/debug_handler.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/cache_handler.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/old_api.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/read_only.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/row_merge.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/serialize.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/bulk_to_next.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/mode_end_call.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_data.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_dataset.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_tdata.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_iterator.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_container.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_array.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/mfd.h -./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./deliver/deliverByNotify.lo: ./deliver/deliverByNotify.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/definitions.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/types.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/types.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/output_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/session_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/utilities.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/system.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/version.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/config_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteEventNotificationTable.lo: ./disman/mteEventNotificationTable.h -./disman/mteEventTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteEventTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteEventTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteEventTable.lo: ../../include/net-snmp/definitions.h -./disman/mteEventTable.lo: ../../include/net-snmp/types.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/types.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteEventTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteEventTable.lo: ../../include/net-snmp/output_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteEventTable.lo: ../../include/net-snmp/session_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteEventTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteEventTable.lo: ../../include/net-snmp/utilities.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/system.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/container.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/container.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteEventTable.lo: ../../include/net-snmp/version.h -./disman/mteEventTable.lo: ../../include/net-snmp/config_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteEventTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteEventTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteEventTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteEventTable.lo: ./disman/mteTriggerTable.h -./disman/mteEventTable.lo: ./disman/mteEventTable.h -./disman/mteEventTable.lo: ./disman/mteEventNotificationTable.h -./disman/mteEventTable.lo: ./disman/mteObjectsTable.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/definitions.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/types.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/types.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/output_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/session_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/utilities.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/system.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/version.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/config_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteObjectsTable.lo: header_complex.h ./disman/mteTriggerTable.h -./disman/mteObjectsTable.lo: ./disman/mteObjectsTable.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/definitions.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/types.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/types.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/output_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/session_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/utilities.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/system.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/version.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/config_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteTriggerBooleanTable.lo: header_complex.h -./disman/mteTriggerBooleanTable.lo: ./disman/mteTriggerBooleanTable.h -./disman/mteTriggerBooleanTable.lo: ./disman/mteTriggerTable.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/definitions.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/types.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/types.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/output_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/session_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/utilities.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/system.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/version.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/config_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteTriggerDeltaTable.lo: header_complex.h -./disman/mteTriggerDeltaTable.lo: ./disman/mteTriggerDeltaTable.h -./disman/mteTriggerDeltaTable.lo: ./disman/mteTriggerTable.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/definitions.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/types.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/types.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/output_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/session_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/utilities.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/system.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/version.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/config_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteTriggerExistenceTable.lo: header_complex.h -./disman/mteTriggerExistenceTable.lo: ./disman/mteTriggerExistenceTable.h -./disman/mteTriggerExistenceTable.lo: ./disman/mteTriggerTable.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/definitions.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/types.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/types.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/output_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/session_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/utilities.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/system.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/version.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/config_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteTriggerTable.lo: header_complex.h ./disman/mteTriggerTable.h -./disman/mteTriggerTable.lo: ./disman/mteTriggerBooleanTable.h -./disman/mteTriggerTable.lo: ./disman/mteTriggerDeltaTable.h -./disman/mteTriggerTable.lo: ./disman/mteTriggerExistenceTable.h -./disman/mteTriggerTable.lo: ./disman/mteTriggerThresholdTable.h -./disman/mteTriggerTable.lo: ./disman/mteEventTable.h -./disman/mteTriggerTable.lo: ./disman/mteObjectsTable.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/net-snmp-config.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/net-snmp-includes.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/definitions.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/types.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/oid.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/types.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/varbind_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_client.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/pdu_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/asn1.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/output_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_debug.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_logging.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/session_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/callback.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_transport.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_service.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/ucd_compat.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/mib.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/mib_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/parse.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/oid_stash.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/net-snmp-features.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_impl.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp-tc.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/getopt.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/utilities.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/system.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/tools.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/int64.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/mt_support.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/data_list.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/check_varbind.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/factory.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container_binary_array.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container_iterator.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_assert.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/version.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/config_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/read_config.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/default_store.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_enum.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/vacm.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/snmpv3_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpv3.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/transform_oids.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/keytools.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/scapi.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/lcd_time.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmptsm.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpusm.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_handler.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/var_struct.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_registry.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/ds_agent.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_trap.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/all_helpers.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/instance.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/baby_steps.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/scalar.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/scalar_group.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/watcher.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/multiplexer.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/null.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/debug_handler.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/cache_handler.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/old_api.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/read_only.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/row_merge.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/serialize.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_data.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_dataset.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_tdata.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_iterator.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_container.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_array.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/mfd.h -./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./disman/mteTriggerThresholdTable.lo: header_complex.h -./disman/mteTriggerThresholdTable.lo: ./disman/mteTriggerThresholdTable.h -./disman/mteTriggerThresholdTable.lo: ./disman/mteTriggerTable.h -./examples/data_set.lo: ../../include/net-snmp/net-snmp-config.h -./examples/data_set.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/data_set.lo: ../../include/net-snmp/definitions.h -./examples/data_set.lo: ../../include/net-snmp/types.h -./examples/data_set.lo: ../../include/net-snmp/library/oid.h -./examples/data_set.lo: ../../include/net-snmp/library/types.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_api.h -./examples/data_set.lo: ../../include/net-snmp/varbind_api.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_client.h -./examples/data_set.lo: ../../include/net-snmp/pdu_api.h -./examples/data_set.lo: ../../include/net-snmp/library/asn1.h -./examples/data_set.lo: ../../include/net-snmp/output_api.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/data_set.lo: ../../include/net-snmp/session_api.h -./examples/data_set.lo: ../../include/net-snmp/library/callback.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_service.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/data_set.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/data_set.lo: ../../include/net-snmp/library/mib.h -./examples/data_set.lo: ../../include/net-snmp/mib_api.h -./examples/data_set.lo: ../../include/net-snmp/library/parse.h -./examples/data_set.lo: ../../include/net-snmp/library/oid_stash.h -./examples/data_set.lo: ../../include/net-snmp/net-snmp-features.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/data_set.lo: ../../include/net-snmp/library/getopt.h -./examples/data_set.lo: ../../include/net-snmp/utilities.h -./examples/data_set.lo: ../../include/net-snmp/library/system.h -./examples/data_set.lo: ../../include/net-snmp/library/tools.h -./examples/data_set.lo: ../../include/net-snmp/library/int64.h -./examples/data_set.lo: ../../include/net-snmp/library/mt_support.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/data_set.lo: ../../include/net-snmp/library/data_list.h -./examples/data_set.lo: ../../include/net-snmp/library/check_varbind.h -./examples/data_set.lo: ../../include/net-snmp/library/container.h -./examples/data_set.lo: ../../include/net-snmp/library/factory.h -./examples/data_set.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/data_set.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/data_set.lo: ../../include/net-snmp/library/container_iterator.h -./examples/data_set.lo: ../../include/net-snmp/library/container.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/data_set.lo: ../../include/net-snmp/version.h -./examples/data_set.lo: ../../include/net-snmp/config_api.h -./examples/data_set.lo: ../../include/net-snmp/library/read_config.h -./examples/data_set.lo: ../../include/net-snmp/library/default_store.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/data_set.lo: ../../include/net-snmp/library/vacm.h -./examples/data_set.lo: ../../include/net-snmp/snmpv3_api.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpv3.h -./examples/data_set.lo: ../../include/net-snmp/library/transform_oids.h -./examples/data_set.lo: ../../include/net-snmp/library/keytools.h -./examples/data_set.lo: ../../include/net-snmp/library/scapi.h -./examples/data_set.lo: ../../include/net-snmp/library/lcd_time.h -./examples/data_set.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/data_set.lo: ../../include/net-snmp/library/snmptsm.h -./examples/data_set.lo: ../../include/net-snmp/library/snmpusm.h -./examples/data_set.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/data_set.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/data_set.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/data_set.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/data_set.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/data_set.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/data_set.lo: ../../include/net-snmp/agent/var_struct.h -./examples/data_set.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/data_set.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/data_set.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/data_set.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/data_set.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/data_set.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/data_set.lo: ../../include/net-snmp/agent/instance.h -./examples/data_set.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/data_set.lo: ../../include/net-snmp/agent/scalar.h -./examples/data_set.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/data_set.lo: ../../include/net-snmp/agent/watcher.h -./examples/data_set.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/data_set.lo: ../../include/net-snmp/agent/null.h -./examples/data_set.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/data_set.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/data_set.lo: ../../include/net-snmp/agent/old_api.h -./examples/data_set.lo: ../../include/net-snmp/agent/read_only.h -./examples/data_set.lo: ../../include/net-snmp/agent/row_merge.h -./examples/data_set.lo: ../../include/net-snmp/agent/serialize.h -./examples/data_set.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/data_set.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/data_set.lo: ../../include/net-snmp/agent/table.h -./examples/data_set.lo: ../../include/net-snmp/agent/table_data.h -./examples/data_set.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/data_set.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/data_set.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/data_set.lo: ../../include/net-snmp/agent/table_container.h -./examples/data_set.lo: ../../include/net-snmp/agent/table_array.h -./examples/data_set.lo: ../../include/net-snmp/agent/mfd.h -./examples/data_set.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/delayed_instance.lo: ../../include/net-snmp/net-snmp-config.h -./examples/delayed_instance.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/delayed_instance.lo: ../../include/net-snmp/definitions.h -./examples/delayed_instance.lo: ../../include/net-snmp/types.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/oid.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/types.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/varbind_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_client.h -./examples/delayed_instance.lo: ../../include/net-snmp/pdu_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/asn1.h -./examples/delayed_instance.lo: ../../include/net-snmp/output_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/delayed_instance.lo: ../../include/net-snmp/session_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/callback.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_service.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/mib.h -./examples/delayed_instance.lo: ../../include/net-snmp/mib_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/parse.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/oid_stash.h -./examples/delayed_instance.lo: ../../include/net-snmp/net-snmp-features.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/getopt.h -./examples/delayed_instance.lo: ../../include/net-snmp/utilities.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/system.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/tools.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/int64.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/mt_support.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/data_list.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/check_varbind.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/container.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/factory.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/container_iterator.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/container.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/delayed_instance.lo: ../../include/net-snmp/version.h -./examples/delayed_instance.lo: ../../include/net-snmp/config_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/read_config.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/default_store.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/vacm.h -./examples/delayed_instance.lo: ../../include/net-snmp/snmpv3_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpv3.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/transform_oids.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/keytools.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/scapi.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/lcd_time.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmptsm.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpusm.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/var_struct.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/delayed_instance.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/instance.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/scalar.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/watcher.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/null.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/old_api.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/read_only.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/row_merge.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/serialize.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_data.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_container.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_array.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/mfd.h -./examples/delayed_instance.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/delayed_instance.lo: ./examples/delayed_instance.h -./examples/example.lo: ../../include/net-snmp/net-snmp-config.h -./examples/example.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/example.lo: ../../include/net-snmp/definitions.h -./examples/example.lo: ../../include/net-snmp/types.h -./examples/example.lo: ../../include/net-snmp/library/oid.h -./examples/example.lo: ../../include/net-snmp/library/types.h -./examples/example.lo: ../../include/net-snmp/library/snmp_api.h -./examples/example.lo: ../../include/net-snmp/varbind_api.h -./examples/example.lo: ../../include/net-snmp/library/snmp_client.h -./examples/example.lo: ../../include/net-snmp/pdu_api.h -./examples/example.lo: ../../include/net-snmp/library/asn1.h -./examples/example.lo: ../../include/net-snmp/output_api.h -./examples/example.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/example.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/example.lo: ../../include/net-snmp/session_api.h -./examples/example.lo: ../../include/net-snmp/library/callback.h -./examples/example.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/example.lo: ../../include/net-snmp/library/snmp_service.h -./examples/example.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/example.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/example.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/example.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/example.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/example.lo: ../../include/net-snmp/library/mib.h -./examples/example.lo: ../../include/net-snmp/mib_api.h -./examples/example.lo: ../../include/net-snmp/library/parse.h -./examples/example.lo: ../../include/net-snmp/library/oid_stash.h -./examples/example.lo: ../../include/net-snmp/net-snmp-features.h -./examples/example.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/example.lo: ../../include/net-snmp/library/snmp.h -./examples/example.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/example.lo: ../../include/net-snmp/library/getopt.h -./examples/example.lo: ../../include/net-snmp/utilities.h -./examples/example.lo: ../../include/net-snmp/library/system.h -./examples/example.lo: ../../include/net-snmp/library/tools.h -./examples/example.lo: ../../include/net-snmp/library/int64.h -./examples/example.lo: ../../include/net-snmp/library/mt_support.h -./examples/example.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/example.lo: ../../include/net-snmp/library/data_list.h -./examples/example.lo: ../../include/net-snmp/library/check_varbind.h -./examples/example.lo: ../../include/net-snmp/library/container.h -./examples/example.lo: ../../include/net-snmp/library/factory.h -./examples/example.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/example.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/example.lo: ../../include/net-snmp/library/container_iterator.h -./examples/example.lo: ../../include/net-snmp/library/container.h -./examples/example.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/example.lo: ../../include/net-snmp/version.h -./examples/example.lo: ../../include/net-snmp/config_api.h -./examples/example.lo: ../../include/net-snmp/library/read_config.h -./examples/example.lo: ../../include/net-snmp/library/default_store.h -./examples/example.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/example.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/example.lo: ../../include/net-snmp/library/vacm.h -./examples/example.lo: ../../include/net-snmp/snmpv3_api.h -./examples/example.lo: ../../include/net-snmp/library/snmpv3.h -./examples/example.lo: ../../include/net-snmp/library/transform_oids.h -./examples/example.lo: ../../include/net-snmp/library/keytools.h -./examples/example.lo: ../../include/net-snmp/library/scapi.h -./examples/example.lo: ../../include/net-snmp/library/lcd_time.h -./examples/example.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/example.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/example.lo: ../../include/net-snmp/library/snmptsm.h -./examples/example.lo: ../../include/net-snmp/library/snmpusm.h -./examples/example.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/example.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/example.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/example.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/example.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/example.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/example.lo: ../../include/net-snmp/agent/var_struct.h -./examples/example.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/example.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/example.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/example.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/example.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/example.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/example.lo: ../../include/net-snmp/agent/instance.h -./examples/example.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/example.lo: ../../include/net-snmp/agent/scalar.h -./examples/example.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/example.lo: ../../include/net-snmp/agent/watcher.h -./examples/example.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/example.lo: ../../include/net-snmp/agent/null.h -./examples/example.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/example.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/example.lo: ../../include/net-snmp/agent/old_api.h -./examples/example.lo: ../../include/net-snmp/agent/read_only.h -./examples/example.lo: ../../include/net-snmp/agent/row_merge.h -./examples/example.lo: ../../include/net-snmp/agent/serialize.h -./examples/example.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/example.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/example.lo: ../../include/net-snmp/agent/table.h -./examples/example.lo: ../../include/net-snmp/agent/table_data.h -./examples/example.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/example.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/example.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/example.lo: ../../include/net-snmp/agent/table_container.h -./examples/example.lo: ../../include/net-snmp/agent/table_array.h -./examples/example.lo: ../../include/net-snmp/agent/mfd.h -./examples/example.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/example.lo: util_funcs/header_generic.h ./examples/example.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/net-snmp-config.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/definitions.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/types.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/oid.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/types.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/varbind_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_client.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/pdu_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/asn1.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/output_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/session_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/callback.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_service.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/mib.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/mib_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/parse.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/oid_stash.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/net-snmp-features.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/getopt.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/utilities.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/system.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/tools.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/int64.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/mt_support.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/data_list.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/check_varbind.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/factory.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container_iterator.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/version.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/config_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/read_config.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/default_store.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/vacm.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/snmpv3_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpv3.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/transform_oids.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/keytools.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/scapi.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/lcd_time.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmptsm.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpusm.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/var_struct.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/instance.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/scalar.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/watcher.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/null.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/old_api.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/read_only.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/row_merge.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/serialize.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_data.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_container.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_array.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/mfd.h -./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/netSnmpHostsTable_access.lo: ./examples/netSnmpHostsTable_access.h -./examples/netSnmpHostsTable_access.lo: ./examples/netSnmpHostsTable_enums.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/net-snmp-config.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/net-snmp-features.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/definitions.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/types.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/oid.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/types.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/varbind_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_client.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/pdu_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/asn1.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/output_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/session_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/callback.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_service.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/mib.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/mib_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/parse.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/oid_stash.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/getopt.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/utilities.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/system.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/tools.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/int64.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/mt_support.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/data_list.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/check_varbind.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/factory.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container_iterator.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/version.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/config_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/read_config.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/default_store.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/vacm.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/snmpv3_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpv3.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/transform_oids.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/keytools.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/scapi.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/lcd_time.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmptsm.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpusm.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/var_struct.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/instance.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/scalar.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/watcher.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/null.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/old_api.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/read_only.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/row_merge.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/serialize.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_data.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_container.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_array.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/mfd.h -./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable.h -./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_columns.h -./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_enums.h -./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_checkfns.h -./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_access.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/net-snmp-config.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/net-snmp-features.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/definitions.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/types.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/oid.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/types.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/varbind_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_client.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/pdu_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/asn1.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/output_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/session_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/callback.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_service.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/mib.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/mib_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/parse.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/oid_stash.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/getopt.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/utilities.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/system.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/tools.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/int64.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/mt_support.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/data_list.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/check_varbind.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/factory.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container_iterator.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/version.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/config_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/read_config.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/default_store.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/vacm.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/snmpv3_api.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpv3.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/transform_oids.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/keytools.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/scapi.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/lcd_time.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmptsm.h -./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpusm.h -./examples/netSnmpHostsTable_checkfns.lo: ./examples/netSnmpHostsTable_checkfns.h -./examples/netSnmpHostsTable_checkfns.lo: ./examples/netSnmpHostsTable_checkfns_local.h -./examples/netSnmpHostsTable_checkfns.lo: ./examples/netSnmpHostsTable_enums.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/net-snmp-config.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/definitions.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/types.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/oid.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/types.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/varbind_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_client.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/pdu_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/asn1.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/output_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/session_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/callback.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_service.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/mib.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/mib_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/parse.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/oid_stash.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/net-snmp-features.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/getopt.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/utilities.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/system.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/tools.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/int64.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/mt_support.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/data_list.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/check_varbind.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/factory.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container_iterator.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/version.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/config_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/read_config.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/default_store.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/vacm.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/snmpv3_api.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpv3.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/transform_oids.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/keytools.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/scapi.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/lcd_time.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmptsm.h -./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpusm.h -./examples/netSnmpHostsTable_checkfns_local.lo: ./examples/netSnmpHostsTable_checkfns.h -./examples/netSnmpHostsTable_checkfns_local.lo: ./examples/netSnmpHostsTable_enums.h -./examples/notification.lo: ../../include/net-snmp/net-snmp-config.h -./examples/notification.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/notification.lo: ../../include/net-snmp/definitions.h -./examples/notification.lo: ../../include/net-snmp/types.h -./examples/notification.lo: ../../include/net-snmp/library/oid.h -./examples/notification.lo: ../../include/net-snmp/library/types.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_api.h -./examples/notification.lo: ../../include/net-snmp/varbind_api.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_client.h -./examples/notification.lo: ../../include/net-snmp/pdu_api.h -./examples/notification.lo: ../../include/net-snmp/library/asn1.h -./examples/notification.lo: ../../include/net-snmp/output_api.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/notification.lo: ../../include/net-snmp/session_api.h -./examples/notification.lo: ../../include/net-snmp/library/callback.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_service.h -./examples/notification.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/notification.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/notification.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/notification.lo: ../../include/net-snmp/library/mib.h -./examples/notification.lo: ../../include/net-snmp/mib_api.h -./examples/notification.lo: ../../include/net-snmp/library/parse.h -./examples/notification.lo: ../../include/net-snmp/library/oid_stash.h -./examples/notification.lo: ../../include/net-snmp/net-snmp-features.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/notification.lo: ../../include/net-snmp/library/snmp.h -./examples/notification.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/notification.lo: ../../include/net-snmp/library/getopt.h -./examples/notification.lo: ../../include/net-snmp/utilities.h -./examples/notification.lo: ../../include/net-snmp/library/system.h -./examples/notification.lo: ../../include/net-snmp/library/tools.h -./examples/notification.lo: ../../include/net-snmp/library/int64.h -./examples/notification.lo: ../../include/net-snmp/library/mt_support.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/notification.lo: ../../include/net-snmp/library/data_list.h -./examples/notification.lo: ../../include/net-snmp/library/check_varbind.h -./examples/notification.lo: ../../include/net-snmp/library/container.h -./examples/notification.lo: ../../include/net-snmp/library/factory.h -./examples/notification.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/notification.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/notification.lo: ../../include/net-snmp/library/container_iterator.h -./examples/notification.lo: ../../include/net-snmp/library/container.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/notification.lo: ../../include/net-snmp/version.h -./examples/notification.lo: ../../include/net-snmp/config_api.h -./examples/notification.lo: ../../include/net-snmp/library/read_config.h -./examples/notification.lo: ../../include/net-snmp/library/default_store.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/notification.lo: ../../include/net-snmp/library/vacm.h -./examples/notification.lo: ../../include/net-snmp/snmpv3_api.h -./examples/notification.lo: ../../include/net-snmp/library/snmpv3.h -./examples/notification.lo: ../../include/net-snmp/library/transform_oids.h -./examples/notification.lo: ../../include/net-snmp/library/keytools.h -./examples/notification.lo: ../../include/net-snmp/library/scapi.h -./examples/notification.lo: ../../include/net-snmp/library/lcd_time.h -./examples/notification.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/notification.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/notification.lo: ../../include/net-snmp/library/snmptsm.h -./examples/notification.lo: ../../include/net-snmp/library/snmpusm.h -./examples/notification.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/notification.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/notification.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/notification.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/notification.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/notification.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/notification.lo: ../../include/net-snmp/agent/var_struct.h -./examples/notification.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/notification.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/notification.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/notification.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/notification.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/notification.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/notification.lo: ../../include/net-snmp/agent/instance.h -./examples/notification.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/notification.lo: ../../include/net-snmp/agent/scalar.h -./examples/notification.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/notification.lo: ../../include/net-snmp/agent/watcher.h -./examples/notification.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/notification.lo: ../../include/net-snmp/agent/null.h -./examples/notification.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/notification.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/notification.lo: ../../include/net-snmp/agent/old_api.h -./examples/notification.lo: ../../include/net-snmp/agent/read_only.h -./examples/notification.lo: ../../include/net-snmp/agent/row_merge.h -./examples/notification.lo: ../../include/net-snmp/agent/serialize.h -./examples/notification.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/notification.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/notification.lo: ../../include/net-snmp/agent/table.h -./examples/notification.lo: ../../include/net-snmp/agent/table_data.h -./examples/notification.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/notification.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/notification.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/notification.lo: ../../include/net-snmp/agent/table_container.h -./examples/notification.lo: ../../include/net-snmp/agent/table_array.h -./examples/notification.lo: ../../include/net-snmp/agent/mfd.h -./examples/notification.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/notification.lo: notification.h -./examples/scalar_int.lo: ../../include/net-snmp/net-snmp-config.h -./examples/scalar_int.lo: ../../include/net-snmp/net-snmp-features.h -./examples/scalar_int.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/scalar_int.lo: ../../include/net-snmp/definitions.h -./examples/scalar_int.lo: ../../include/net-snmp/types.h -./examples/scalar_int.lo: ../../include/net-snmp/library/oid.h -./examples/scalar_int.lo: ../../include/net-snmp/library/types.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_api.h -./examples/scalar_int.lo: ../../include/net-snmp/varbind_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_client.h -./examples/scalar_int.lo: ../../include/net-snmp/pdu_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/asn1.h -./examples/scalar_int.lo: ../../include/net-snmp/output_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/scalar_int.lo: ../../include/net-snmp/session_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/callback.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_service.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/scalar_int.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/scalar_int.lo: ../../include/net-snmp/library/mib.h -./examples/scalar_int.lo: ../../include/net-snmp/mib_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/parse.h -./examples/scalar_int.lo: ../../include/net-snmp/library/oid_stash.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/scalar_int.lo: ../../include/net-snmp/library/getopt.h -./examples/scalar_int.lo: ../../include/net-snmp/utilities.h -./examples/scalar_int.lo: ../../include/net-snmp/library/system.h -./examples/scalar_int.lo: ../../include/net-snmp/library/tools.h -./examples/scalar_int.lo: ../../include/net-snmp/library/int64.h -./examples/scalar_int.lo: ../../include/net-snmp/library/mt_support.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/scalar_int.lo: ../../include/net-snmp/library/data_list.h -./examples/scalar_int.lo: ../../include/net-snmp/library/check_varbind.h -./examples/scalar_int.lo: ../../include/net-snmp/library/container.h -./examples/scalar_int.lo: ../../include/net-snmp/library/factory.h -./examples/scalar_int.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/scalar_int.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/scalar_int.lo: ../../include/net-snmp/library/container_iterator.h -./examples/scalar_int.lo: ../../include/net-snmp/library/container.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/scalar_int.lo: ../../include/net-snmp/version.h -./examples/scalar_int.lo: ../../include/net-snmp/config_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/read_config.h -./examples/scalar_int.lo: ../../include/net-snmp/library/default_store.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/scalar_int.lo: ../../include/net-snmp/library/vacm.h -./examples/scalar_int.lo: ../../include/net-snmp/snmpv3_api.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpv3.h -./examples/scalar_int.lo: ../../include/net-snmp/library/transform_oids.h -./examples/scalar_int.lo: ../../include/net-snmp/library/keytools.h -./examples/scalar_int.lo: ../../include/net-snmp/library/scapi.h -./examples/scalar_int.lo: ../../include/net-snmp/library/lcd_time.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmptsm.h -./examples/scalar_int.lo: ../../include/net-snmp/library/snmpusm.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/var_struct.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/scalar_int.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/instance.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/scalar.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/watcher.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/null.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/old_api.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/read_only.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/row_merge.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/serialize.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table_data.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table_container.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/table_array.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/mfd.h -./examples/scalar_int.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/net-snmp-config.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/definitions.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/types.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/oid.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/types.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/varbind_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_client.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/pdu_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/asn1.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/output_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/session_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/callback.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_service.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/mib.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/mib_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/parse.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/oid_stash.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/net-snmp-features.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/getopt.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/utilities.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/system.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/tools.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/int64.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/mt_support.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/data_list.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/check_varbind.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/factory.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container_iterator.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/version.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/config_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/read_config.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/default_store.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/vacm.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/snmpv3_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpv3.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/transform_oids.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/keytools.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/scapi.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/lcd_time.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmptsm.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpusm.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/var_struct.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/instance.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/scalar.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/watcher.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/null.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/old_api.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/read_only.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/row_merge.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/serialize.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_data.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_container.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_array.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/mfd.h -./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./examples/ucdDemoPublic.lo: util_funcs/header_generic.h -./examples/ucdDemoPublic.lo: ./examples/ucdDemoPublic.h -./examples/watched.lo: ../../include/net-snmp/net-snmp-config.h -./examples/watched.lo: ../../include/net-snmp/net-snmp-includes.h -./examples/watched.lo: ../../include/net-snmp/definitions.h -./examples/watched.lo: ../../include/net-snmp/types.h -./examples/watched.lo: ../../include/net-snmp/library/oid.h -./examples/watched.lo: ../../include/net-snmp/library/types.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_api.h -./examples/watched.lo: ../../include/net-snmp/varbind_api.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_client.h -./examples/watched.lo: ../../include/net-snmp/pdu_api.h -./examples/watched.lo: ../../include/net-snmp/library/asn1.h -./examples/watched.lo: ../../include/net-snmp/output_api.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_debug.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_logging.h -./examples/watched.lo: ../../include/net-snmp/session_api.h -./examples/watched.lo: ../../include/net-snmp/library/callback.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_transport.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_service.h -./examples/watched.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./examples/watched.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./examples/watched.lo: ../../include/net-snmp/library/ucd_compat.h -./examples/watched.lo: ../../include/net-snmp/library/mib.h -./examples/watched.lo: ../../include/net-snmp/mib_api.h -./examples/watched.lo: ../../include/net-snmp/library/parse.h -./examples/watched.lo: ../../include/net-snmp/library/oid_stash.h -./examples/watched.lo: ../../include/net-snmp/net-snmp-features.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_impl.h -./examples/watched.lo: ../../include/net-snmp/library/snmp.h -./examples/watched.lo: ../../include/net-snmp/library/snmp-tc.h -./examples/watched.lo: ../../include/net-snmp/library/getopt.h -./examples/watched.lo: ../../include/net-snmp/utilities.h -./examples/watched.lo: ../../include/net-snmp/library/system.h -./examples/watched.lo: ../../include/net-snmp/library/tools.h -./examples/watched.lo: ../../include/net-snmp/library/int64.h -./examples/watched.lo: ../../include/net-snmp/library/mt_support.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_alarm.h -./examples/watched.lo: ../../include/net-snmp/library/data_list.h -./examples/watched.lo: ../../include/net-snmp/library/check_varbind.h -./examples/watched.lo: ../../include/net-snmp/library/container.h -./examples/watched.lo: ../../include/net-snmp/library/factory.h -./examples/watched.lo: ../../include/net-snmp/library/container_binary_array.h -./examples/watched.lo: ../../include/net-snmp/library/container_list_ssll.h -./examples/watched.lo: ../../include/net-snmp/library/container_iterator.h -./examples/watched.lo: ../../include/net-snmp/library/container.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_assert.h -./examples/watched.lo: ../../include/net-snmp/version.h -./examples/watched.lo: ../../include/net-snmp/config_api.h -./examples/watched.lo: ../../include/net-snmp/library/read_config.h -./examples/watched.lo: ../../include/net-snmp/library/default_store.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_parse_args.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_enum.h -./examples/watched.lo: ../../include/net-snmp/library/vacm.h -./examples/watched.lo: ../../include/net-snmp/snmpv3_api.h -./examples/watched.lo: ../../include/net-snmp/library/snmpv3.h -./examples/watched.lo: ../../include/net-snmp/library/transform_oids.h -./examples/watched.lo: ../../include/net-snmp/library/keytools.h -./examples/watched.lo: ../../include/net-snmp/library/scapi.h -./examples/watched.lo: ../../include/net-snmp/library/lcd_time.h -./examples/watched.lo: ../../include/net-snmp/library/snmp_secmod.h -./examples/watched.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./examples/watched.lo: ../../include/net-snmp/library/snmptsm.h -./examples/watched.lo: ../../include/net-snmp/library/snmpusm.h -./examples/watched.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./examples/watched.lo: ../../include/net-snmp/agent/mib_module_config.h -./examples/watched.lo: ../../include/net-snmp/agent/agent_module_config.h -./examples/watched.lo: ../../include/net-snmp/agent/snmp_agent.h -./examples/watched.lo: ../../include/net-snmp/agent/snmp_vars.h -./examples/watched.lo: ../../include/net-snmp/agent/agent_handler.h -./examples/watched.lo: ../../include/net-snmp/agent/var_struct.h -./examples/watched.lo: ../../include/net-snmp/agent/agent_registry.h -./examples/watched.lo: ../../include/net-snmp/library/fd_event_manager.h -./examples/watched.lo: ../../include/net-snmp/agent/ds_agent.h -./examples/watched.lo: ../../include/net-snmp/agent/agent_read_config.h -./examples/watched.lo: ../../include/net-snmp/agent/agent_trap.h -./examples/watched.lo: ../../include/net-snmp/agent/all_helpers.h -./examples/watched.lo: ../../include/net-snmp/agent/instance.h -./examples/watched.lo: ../../include/net-snmp/agent/baby_steps.h -./examples/watched.lo: ../../include/net-snmp/agent/scalar.h -./examples/watched.lo: ../../include/net-snmp/agent/scalar_group.h -./examples/watched.lo: ../../include/net-snmp/agent/watcher.h -./examples/watched.lo: ../../include/net-snmp/agent/multiplexer.h -./examples/watched.lo: ../../include/net-snmp/agent/null.h -./examples/watched.lo: ../../include/net-snmp/agent/debug_handler.h -./examples/watched.lo: ../../include/net-snmp/agent/cache_handler.h -./examples/watched.lo: ../../include/net-snmp/agent/old_api.h -./examples/watched.lo: ../../include/net-snmp/agent/read_only.h -./examples/watched.lo: ../../include/net-snmp/agent/row_merge.h -./examples/watched.lo: ../../include/net-snmp/agent/serialize.h -./examples/watched.lo: ../../include/net-snmp/agent/bulk_to_next.h -./examples/watched.lo: ../../include/net-snmp/agent/mode_end_call.h -./examples/watched.lo: ../../include/net-snmp/agent/table.h -./examples/watched.lo: ../../include/net-snmp/agent/table_data.h -./examples/watched.lo: ../../include/net-snmp/agent/table_dataset.h -./examples/watched.lo: ../../include/net-snmp/agent/table_tdata.h -./examples/watched.lo: ../../include/net-snmp/agent/table_iterator.h -./examples/watched.lo: ../../include/net-snmp/agent/table_container.h -./examples/watched.lo: ../../include/net-snmp/agent/table_array.h -./examples/watched.lo: ../../include/net-snmp/agent/mfd.h -./examples/watched.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hr_device.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_device.lo: host_res.h -./host/hr_device.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_device.lo: ../../include/net-snmp/definitions.h -./host/hr_device.lo: ../../include/net-snmp/types.h -./host/hr_device.lo: ../../include/net-snmp/library/oid.h -./host/hr_device.lo: ../../include/net-snmp/library/types.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_device.lo: ../../include/net-snmp/varbind_api.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_device.lo: ../../include/net-snmp/pdu_api.h -./host/hr_device.lo: ../../include/net-snmp/library/asn1.h -./host/hr_device.lo: ../../include/net-snmp/output_api.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_device.lo: ../../include/net-snmp/session_api.h -./host/hr_device.lo: ../../include/net-snmp/library/callback.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_device.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_device.lo: ../../include/net-snmp/library/mib.h -./host/hr_device.lo: ../../include/net-snmp/mib_api.h -./host/hr_device.lo: ../../include/net-snmp/library/parse.h -./host/hr_device.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_device.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_device.lo: ../../include/net-snmp/library/getopt.h -./host/hr_device.lo: ../../include/net-snmp/utilities.h -./host/hr_device.lo: ../../include/net-snmp/library/system.h -./host/hr_device.lo: ../../include/net-snmp/library/tools.h -./host/hr_device.lo: ../../include/net-snmp/library/int64.h -./host/hr_device.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_device.lo: ../../include/net-snmp/library/data_list.h -./host/hr_device.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_device.lo: ../../include/net-snmp/library/container.h -./host/hr_device.lo: ../../include/net-snmp/library/factory.h -./host/hr_device.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_device.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_device.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_device.lo: ../../include/net-snmp/library/container.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_device.lo: ../../include/net-snmp/version.h -./host/hr_device.lo: ../../include/net-snmp/config_api.h -./host/hr_device.lo: ../../include/net-snmp/library/read_config.h -./host/hr_device.lo: ../../include/net-snmp/library/default_store.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_device.lo: ../../include/net-snmp/library/vacm.h -./host/hr_device.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_device.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_device.lo: ../../include/net-snmp/library/keytools.h -./host/hr_device.lo: ../../include/net-snmp/library/scapi.h -./host/hr_device.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_device.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_device.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_device.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_device.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_device.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_device.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_device.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_device.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_device.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_device.lo: ./host/hr_device.h -./host/hr_disk.lo: ../../include/net-snmp/net-snmp-config.h host_res.h -./host/hr_disk.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_disk.lo: ../../include/net-snmp/definitions.h -./host/hr_disk.lo: ../../include/net-snmp/types.h -./host/hr_disk.lo: ../../include/net-snmp/library/oid.h -./host/hr_disk.lo: ../../include/net-snmp/library/types.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_disk.lo: ../../include/net-snmp/varbind_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_disk.lo: ../../include/net-snmp/pdu_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/asn1.h -./host/hr_disk.lo: ../../include/net-snmp/output_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_disk.lo: ../../include/net-snmp/session_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/callback.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_disk.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_disk.lo: ../../include/net-snmp/library/mib.h -./host/hr_disk.lo: ../../include/net-snmp/mib_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/parse.h -./host/hr_disk.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_disk.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_disk.lo: ../../include/net-snmp/library/getopt.h -./host/hr_disk.lo: ../../include/net-snmp/utilities.h -./host/hr_disk.lo: ../../include/net-snmp/library/system.h -./host/hr_disk.lo: ../../include/net-snmp/library/tools.h -./host/hr_disk.lo: ../../include/net-snmp/library/int64.h -./host/hr_disk.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_disk.lo: ../../include/net-snmp/library/data_list.h -./host/hr_disk.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_disk.lo: ../../include/net-snmp/library/container.h -./host/hr_disk.lo: ../../include/net-snmp/library/factory.h -./host/hr_disk.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_disk.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_disk.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_disk.lo: ../../include/net-snmp/library/container.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_disk.lo: ../../include/net-snmp/version.h -./host/hr_disk.lo: ../../include/net-snmp/config_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/read_config.h -./host/hr_disk.lo: ../../include/net-snmp/library/default_store.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_disk.lo: ../../include/net-snmp/library/vacm.h -./host/hr_disk.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_disk.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_disk.lo: ../../include/net-snmp/library/keytools.h -./host/hr_disk.lo: ../../include/net-snmp/library/scapi.h -./host/hr_disk.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_disk.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_disk.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_disk.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_disk.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_disk.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_disk.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_disk.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_disk.lo: ./host/hr_disk.h -./host/hr_disk.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_filesys.lo: ../../include/net-snmp/definitions.h -./host/hr_filesys.lo: ../../include/net-snmp/types.h -./host/hr_filesys.lo: ../../include/net-snmp/library/oid.h -./host/hr_filesys.lo: ../../include/net-snmp/library/types.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_filesys.lo: ../../include/net-snmp/varbind_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_filesys.lo: ../../include/net-snmp/pdu_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/asn1.h -./host/hr_filesys.lo: ../../include/net-snmp/output_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_filesys.lo: ../../include/net-snmp/session_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/callback.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_filesys.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_filesys.lo: ../../include/net-snmp/library/mib.h -./host/hr_filesys.lo: ../../include/net-snmp/mib_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/parse.h -./host/hr_filesys.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_filesys.lo: ../../include/net-snmp/library/getopt.h -./host/hr_filesys.lo: ../../include/net-snmp/utilities.h -./host/hr_filesys.lo: ../../include/net-snmp/library/system.h -./host/hr_filesys.lo: ../../include/net-snmp/library/tools.h -./host/hr_filesys.lo: ../../include/net-snmp/library/int64.h -./host/hr_filesys.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_filesys.lo: ../../include/net-snmp/library/data_list.h -./host/hr_filesys.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_filesys.lo: ../../include/net-snmp/library/container.h -./host/hr_filesys.lo: ../../include/net-snmp/library/factory.h -./host/hr_filesys.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_filesys.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_filesys.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_filesys.lo: ../../include/net-snmp/library/container.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_filesys.lo: ../../include/net-snmp/version.h -./host/hr_filesys.lo: ../../include/net-snmp/config_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/read_config.h -./host/hr_filesys.lo: ../../include/net-snmp/library/default_store.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_filesys.lo: ../../include/net-snmp/library/vacm.h -./host/hr_filesys.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_filesys.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_filesys.lo: ../../include/net-snmp/library/keytools.h -./host/hr_filesys.lo: ../../include/net-snmp/library/scapi.h -./host/hr_filesys.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_filesys.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_filesys.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/instance.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/scalar.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/watcher.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/null.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/old_api.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/read_only.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/row_merge.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/serialize.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table_data.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table_container.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/table_array.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/mfd.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hr_filesys.lo: ../../include/net-snmp/agent/hardware/memory.h -./host/hr_filesys.lo: host_res.h ./host/hr_filesys.h ./host/hr_storage.h -./host/hr_filesys.lo: ./host/hr_disk.h -./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-config.h -./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-features.h -./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hrh_filesys.lo: ../../include/net-snmp/definitions.h -./host/hrh_filesys.lo: ../../include/net-snmp/types.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/oid.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/types.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/varbind_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_client.h -./host/hrh_filesys.lo: ../../include/net-snmp/pdu_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/asn1.h -./host/hrh_filesys.lo: ../../include/net-snmp/output_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hrh_filesys.lo: ../../include/net-snmp/session_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/callback.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_service.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/mib.h -./host/hrh_filesys.lo: ../../include/net-snmp/mib_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/parse.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/oid_stash.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/getopt.h -./host/hrh_filesys.lo: ../../include/net-snmp/utilities.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/system.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/tools.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/int64.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/mt_support.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/data_list.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/check_varbind.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/container.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/factory.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/container_iterator.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/container.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hrh_filesys.lo: ../../include/net-snmp/version.h -./host/hrh_filesys.lo: ../../include/net-snmp/config_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/read_config.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/default_store.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/vacm.h -./host/hrh_filesys.lo: ../../include/net-snmp/snmpv3_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpv3.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/transform_oids.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/keytools.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/scapi.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/lcd_time.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmptsm.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpusm.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/var_struct.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hrh_filesys.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/instance.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/scalar.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/watcher.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/null.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/old_api.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/read_only.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/row_merge.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/serialize.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_data.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_container.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_array.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/mfd.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/hardware/memory.h -./host/hrh_filesys.lo: ../../include/net-snmp/agent/hardware/fsys.h -./host/hrh_filesys.lo: host_res.h ./host/hrh_filesys.h ./host/hrh_storage.h -./host/hrh_filesys.lo: ./host/hr_disk.h -./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-config.h -./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hrh_storage.lo: ../../include/net-snmp/definitions.h -./host/hrh_storage.lo: ../../include/net-snmp/types.h -./host/hrh_storage.lo: ../../include/net-snmp/library/oid.h -./host/hrh_storage.lo: ../../include/net-snmp/library/types.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_api.h -./host/hrh_storage.lo: ../../include/net-snmp/varbind_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_client.h -./host/hrh_storage.lo: ../../include/net-snmp/pdu_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/asn1.h -./host/hrh_storage.lo: ../../include/net-snmp/output_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hrh_storage.lo: ../../include/net-snmp/session_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/callback.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_service.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hrh_storage.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hrh_storage.lo: ../../include/net-snmp/library/mib.h -./host/hrh_storage.lo: ../../include/net-snmp/mib_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/parse.h -./host/hrh_storage.lo: ../../include/net-snmp/library/oid_stash.h -./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-features.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hrh_storage.lo: ../../include/net-snmp/library/getopt.h -./host/hrh_storage.lo: ../../include/net-snmp/utilities.h -./host/hrh_storage.lo: ../../include/net-snmp/library/system.h -./host/hrh_storage.lo: ../../include/net-snmp/library/tools.h -./host/hrh_storage.lo: ../../include/net-snmp/library/int64.h -./host/hrh_storage.lo: ../../include/net-snmp/library/mt_support.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hrh_storage.lo: ../../include/net-snmp/library/data_list.h -./host/hrh_storage.lo: ../../include/net-snmp/library/check_varbind.h -./host/hrh_storage.lo: ../../include/net-snmp/library/container.h -./host/hrh_storage.lo: ../../include/net-snmp/library/factory.h -./host/hrh_storage.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hrh_storage.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hrh_storage.lo: ../../include/net-snmp/library/container_iterator.h -./host/hrh_storage.lo: ../../include/net-snmp/library/container.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hrh_storage.lo: ../../include/net-snmp/version.h -./host/hrh_storage.lo: ../../include/net-snmp/config_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/read_config.h -./host/hrh_storage.lo: ../../include/net-snmp/library/default_store.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hrh_storage.lo: ../../include/net-snmp/library/vacm.h -./host/hrh_storage.lo: ../../include/net-snmp/snmpv3_api.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpv3.h -./host/hrh_storage.lo: ../../include/net-snmp/library/transform_oids.h -./host/hrh_storage.lo: ../../include/net-snmp/library/keytools.h -./host/hrh_storage.lo: ../../include/net-snmp/library/scapi.h -./host/hrh_storage.lo: ../../include/net-snmp/library/lcd_time.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmptsm.h -./host/hrh_storage.lo: ../../include/net-snmp/library/snmpusm.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/var_struct.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hrh_storage.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/instance.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/scalar.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/watcher.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/null.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/old_api.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/read_only.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/row_merge.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/serialize.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table_data.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table_container.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/table_array.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/mfd.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/hardware/memory.h -./host/hrh_storage.lo: ../../include/net-snmp/agent/hardware/fsys.h -./host/hrh_storage.lo: host_res.h ./host/hrh_filesys.h ./host/hrh_storage.h -./host/hrh_storage.lo: ./host/hr_disk.h -./host/hr_network.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_network.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_network.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_network.lo: ../../include/net-snmp/definitions.h -./host/hr_network.lo: ../../include/net-snmp/types.h -./host/hr_network.lo: ../../include/net-snmp/library/oid.h -./host/hr_network.lo: ../../include/net-snmp/library/types.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_network.lo: ../../include/net-snmp/varbind_api.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_network.lo: ../../include/net-snmp/pdu_api.h -./host/hr_network.lo: ../../include/net-snmp/library/asn1.h -./host/hr_network.lo: ../../include/net-snmp/output_api.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_network.lo: ../../include/net-snmp/session_api.h -./host/hr_network.lo: ../../include/net-snmp/library/callback.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_network.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_network.lo: ../../include/net-snmp/library/mib.h -./host/hr_network.lo: ../../include/net-snmp/mib_api.h -./host/hr_network.lo: ../../include/net-snmp/library/parse.h -./host/hr_network.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_network.lo: ../../include/net-snmp/library/getopt.h -./host/hr_network.lo: ../../include/net-snmp/utilities.h -./host/hr_network.lo: ../../include/net-snmp/library/system.h -./host/hr_network.lo: ../../include/net-snmp/library/tools.h -./host/hr_network.lo: ../../include/net-snmp/library/int64.h -./host/hr_network.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_network.lo: ../../include/net-snmp/library/data_list.h -./host/hr_network.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_network.lo: ../../include/net-snmp/library/container.h -./host/hr_network.lo: ../../include/net-snmp/library/factory.h -./host/hr_network.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_network.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_network.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_network.lo: ../../include/net-snmp/library/container.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_network.lo: ../../include/net-snmp/version.h -./host/hr_network.lo: ../../include/net-snmp/config_api.h -./host/hr_network.lo: ../../include/net-snmp/library/read_config.h -./host/hr_network.lo: ../../include/net-snmp/library/default_store.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_network.lo: ../../include/net-snmp/library/vacm.h -./host/hr_network.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_network.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_network.lo: ../../include/net-snmp/library/keytools.h -./host/hr_network.lo: ../../include/net-snmp/library/scapi.h -./host/hr_network.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_network.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_network.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_network.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_network.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hr_network.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hr_network.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hr_network.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_network.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_network.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_network.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_network.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_network.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_network.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hr_network.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hr_network.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hr_network.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hr_network.lo: ../../include/net-snmp/agent/instance.h -./host/hr_network.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hr_network.lo: ../../include/net-snmp/agent/scalar.h -./host/hr_network.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hr_network.lo: ../../include/net-snmp/agent/watcher.h -./host/hr_network.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hr_network.lo: ../../include/net-snmp/agent/null.h -./host/hr_network.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hr_network.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hr_network.lo: ../../include/net-snmp/agent/old_api.h -./host/hr_network.lo: ../../include/net-snmp/agent/read_only.h -./host/hr_network.lo: ../../include/net-snmp/agent/row_merge.h -./host/hr_network.lo: ../../include/net-snmp/agent/serialize.h -./host/hr_network.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hr_network.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hr_network.lo: ../../include/net-snmp/agent/table.h -./host/hr_network.lo: ../../include/net-snmp/agent/table_data.h -./host/hr_network.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hr_network.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hr_network.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hr_network.lo: ../../include/net-snmp/agent/table_container.h -./host/hr_network.lo: ../../include/net-snmp/agent/table_array.h -./host/hr_network.lo: ../../include/net-snmp/agent/mfd.h -./host/hr_network.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hr_network.lo: ../../include/net-snmp/data_access/interface.h -./host/hr_network.lo: host_res.h mibII/interfaces.h -./host/hr_network.lo: ./host/hr_network.h -./host/hr_other.lo: ../../include/net-snmp/net-snmp-config.h host_res.h -./host/hr_other.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_other.lo: ../../include/net-snmp/definitions.h -./host/hr_other.lo: ../../include/net-snmp/types.h -./host/hr_other.lo: ../../include/net-snmp/library/oid.h -./host/hr_other.lo: ../../include/net-snmp/library/types.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_other.lo: ../../include/net-snmp/varbind_api.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_other.lo: ../../include/net-snmp/pdu_api.h -./host/hr_other.lo: ../../include/net-snmp/library/asn1.h -./host/hr_other.lo: ../../include/net-snmp/output_api.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_other.lo: ../../include/net-snmp/session_api.h -./host/hr_other.lo: ../../include/net-snmp/library/callback.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_other.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_other.lo: ../../include/net-snmp/library/mib.h -./host/hr_other.lo: ../../include/net-snmp/mib_api.h -./host/hr_other.lo: ../../include/net-snmp/library/parse.h -./host/hr_other.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_other.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_other.lo: ../../include/net-snmp/library/getopt.h -./host/hr_other.lo: ../../include/net-snmp/utilities.h -./host/hr_other.lo: ../../include/net-snmp/library/system.h -./host/hr_other.lo: ../../include/net-snmp/library/tools.h -./host/hr_other.lo: ../../include/net-snmp/library/int64.h -./host/hr_other.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_other.lo: ../../include/net-snmp/library/data_list.h -./host/hr_other.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_other.lo: ../../include/net-snmp/library/container.h -./host/hr_other.lo: ../../include/net-snmp/library/factory.h -./host/hr_other.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_other.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_other.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_other.lo: ../../include/net-snmp/library/container.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_other.lo: ../../include/net-snmp/version.h -./host/hr_other.lo: ../../include/net-snmp/config_api.h -./host/hr_other.lo: ../../include/net-snmp/library/read_config.h -./host/hr_other.lo: ../../include/net-snmp/library/default_store.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_other.lo: ../../include/net-snmp/library/vacm.h -./host/hr_other.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_other.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_other.lo: ../../include/net-snmp/library/keytools.h -./host/hr_other.lo: ../../include/net-snmp/library/scapi.h -./host/hr_other.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_other.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_other.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_other.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_other.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_other.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_other.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_other.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_other.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_other.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_other.lo: ./host/hr_other.h -./host/hr_partition.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_partition.lo: host_res.h -./host/hr_partition.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_partition.lo: ../../include/net-snmp/definitions.h -./host/hr_partition.lo: ../../include/net-snmp/types.h -./host/hr_partition.lo: ../../include/net-snmp/library/oid.h -./host/hr_partition.lo: ../../include/net-snmp/library/types.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_partition.lo: ../../include/net-snmp/varbind_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_partition.lo: ../../include/net-snmp/pdu_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/asn1.h -./host/hr_partition.lo: ../../include/net-snmp/output_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_partition.lo: ../../include/net-snmp/session_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/callback.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_partition.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_partition.lo: ../../include/net-snmp/library/mib.h -./host/hr_partition.lo: ../../include/net-snmp/mib_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/parse.h -./host/hr_partition.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_partition.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_partition.lo: ../../include/net-snmp/library/getopt.h -./host/hr_partition.lo: ../../include/net-snmp/utilities.h -./host/hr_partition.lo: ../../include/net-snmp/library/system.h -./host/hr_partition.lo: ../../include/net-snmp/library/tools.h -./host/hr_partition.lo: ../../include/net-snmp/library/int64.h -./host/hr_partition.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_partition.lo: ../../include/net-snmp/library/data_list.h -./host/hr_partition.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_partition.lo: ../../include/net-snmp/library/container.h -./host/hr_partition.lo: ../../include/net-snmp/library/factory.h -./host/hr_partition.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_partition.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_partition.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_partition.lo: ../../include/net-snmp/library/container.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_partition.lo: ../../include/net-snmp/version.h -./host/hr_partition.lo: ../../include/net-snmp/config_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/read_config.h -./host/hr_partition.lo: ../../include/net-snmp/library/default_store.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_partition.lo: ../../include/net-snmp/library/vacm.h -./host/hr_partition.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_partition.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_partition.lo: ../../include/net-snmp/library/keytools.h -./host/hr_partition.lo: ../../include/net-snmp/library/scapi.h -./host/hr_partition.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_partition.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_partition.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_partition.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_partition.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_partition.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_partition.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_partition.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_partition.lo: ./host/hr_partition.h ./host/hr_filesys.h -./host/hr_partition.lo: ./host/hr_disk.h -./host/hr_print.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_print.lo: host_res.h -./host/hr_print.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_print.lo: ../../include/net-snmp/definitions.h -./host/hr_print.lo: ../../include/net-snmp/types.h -./host/hr_print.lo: ../../include/net-snmp/library/oid.h -./host/hr_print.lo: ../../include/net-snmp/library/types.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_print.lo: ../../include/net-snmp/varbind_api.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_print.lo: ../../include/net-snmp/pdu_api.h -./host/hr_print.lo: ../../include/net-snmp/library/asn1.h -./host/hr_print.lo: ../../include/net-snmp/output_api.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_print.lo: ../../include/net-snmp/session_api.h -./host/hr_print.lo: ../../include/net-snmp/library/callback.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_print.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_print.lo: ../../include/net-snmp/library/mib.h -./host/hr_print.lo: ../../include/net-snmp/mib_api.h -./host/hr_print.lo: ../../include/net-snmp/library/parse.h -./host/hr_print.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_print.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_print.lo: ../../include/net-snmp/library/getopt.h -./host/hr_print.lo: ../../include/net-snmp/utilities.h -./host/hr_print.lo: ../../include/net-snmp/library/system.h -./host/hr_print.lo: ../../include/net-snmp/library/tools.h -./host/hr_print.lo: ../../include/net-snmp/library/int64.h -./host/hr_print.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_print.lo: ../../include/net-snmp/library/data_list.h -./host/hr_print.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_print.lo: ../../include/net-snmp/library/container.h -./host/hr_print.lo: ../../include/net-snmp/library/factory.h -./host/hr_print.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_print.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_print.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_print.lo: ../../include/net-snmp/library/container.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_print.lo: ../../include/net-snmp/version.h -./host/hr_print.lo: ../../include/net-snmp/config_api.h -./host/hr_print.lo: ../../include/net-snmp/library/read_config.h -./host/hr_print.lo: ../../include/net-snmp/library/default_store.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_print.lo: ../../include/net-snmp/library/vacm.h -./host/hr_print.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_print.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_print.lo: ../../include/net-snmp/library/keytools.h -./host/hr_print.lo: ../../include/net-snmp/library/scapi.h -./host/hr_print.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_print.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_print.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_print.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_print.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_print.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_print.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_print.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_print.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_print.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_print.lo: ./host/hr_print.h struct.h util_funcs.h -./host/hr_print.lo: util_funcs/header_generic.h -./host/hr_print.lo: util_funcs/header_simple_table.h -./host/hr_print.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h -./host/hr_proc.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_proc.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_proc.lo: ../../include/net-snmp/definitions.h -./host/hr_proc.lo: ../../include/net-snmp/types.h -./host/hr_proc.lo: ../../include/net-snmp/library/oid.h -./host/hr_proc.lo: ../../include/net-snmp/library/types.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_proc.lo: ../../include/net-snmp/varbind_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_proc.lo: ../../include/net-snmp/pdu_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/asn1.h -./host/hr_proc.lo: ../../include/net-snmp/output_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_proc.lo: ../../include/net-snmp/session_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/callback.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_proc.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_proc.lo: ../../include/net-snmp/library/mib.h -./host/hr_proc.lo: ../../include/net-snmp/mib_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/parse.h -./host/hr_proc.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_proc.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_proc.lo: ../../include/net-snmp/library/getopt.h -./host/hr_proc.lo: ../../include/net-snmp/utilities.h -./host/hr_proc.lo: ../../include/net-snmp/library/system.h -./host/hr_proc.lo: ../../include/net-snmp/library/tools.h -./host/hr_proc.lo: ../../include/net-snmp/library/int64.h -./host/hr_proc.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_proc.lo: ../../include/net-snmp/library/data_list.h -./host/hr_proc.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_proc.lo: ../../include/net-snmp/library/container.h -./host/hr_proc.lo: ../../include/net-snmp/library/factory.h -./host/hr_proc.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_proc.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_proc.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_proc.lo: ../../include/net-snmp/library/container.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_proc.lo: ../../include/net-snmp/version.h -./host/hr_proc.lo: ../../include/net-snmp/config_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/read_config.h -./host/hr_proc.lo: ../../include/net-snmp/library/default_store.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_proc.lo: ../../include/net-snmp/library/vacm.h -./host/hr_proc.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_proc.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_proc.lo: ../../include/net-snmp/library/keytools.h -./host/hr_proc.lo: ../../include/net-snmp/library/scapi.h -./host/hr_proc.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_proc.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_proc.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hr_proc.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hr_proc.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_proc.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_proc.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_proc.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_proc.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_proc.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hr_proc.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hr_proc.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hr_proc.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hr_proc.lo: ../../include/net-snmp/agent/instance.h -./host/hr_proc.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hr_proc.lo: ../../include/net-snmp/agent/scalar.h -./host/hr_proc.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hr_proc.lo: ../../include/net-snmp/agent/watcher.h -./host/hr_proc.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hr_proc.lo: ../../include/net-snmp/agent/null.h -./host/hr_proc.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hr_proc.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hr_proc.lo: ../../include/net-snmp/agent/old_api.h -./host/hr_proc.lo: ../../include/net-snmp/agent/read_only.h -./host/hr_proc.lo: ../../include/net-snmp/agent/row_merge.h -./host/hr_proc.lo: ../../include/net-snmp/agent/serialize.h -./host/hr_proc.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hr_proc.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table_data.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table_container.h -./host/hr_proc.lo: ../../include/net-snmp/agent/table_array.h -./host/hr_proc.lo: ../../include/net-snmp/agent/mfd.h -./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hr_proc.lo: host_res.h -./host/hr_proc.lo: ./host/hr_proc.h ../../include/net-snmp/agent/auto_nlist.h -./host/hr_proc.lo: ../../include/net-snmp/agent/hardware/cpu.h -./host/hr_proc.lo: ucd-snmp/loadave.h mibdefs.h -./host/hr_storage.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_storage.lo: host_res.h -./host/hr_storage.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_storage.lo: ../../include/net-snmp/definitions.h -./host/hr_storage.lo: ../../include/net-snmp/types.h -./host/hr_storage.lo: ../../include/net-snmp/library/oid.h -./host/hr_storage.lo: ../../include/net-snmp/library/types.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_storage.lo: ../../include/net-snmp/varbind_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_storage.lo: ../../include/net-snmp/pdu_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/asn1.h -./host/hr_storage.lo: ../../include/net-snmp/output_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_storage.lo: ../../include/net-snmp/session_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/callback.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_storage.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_storage.lo: ../../include/net-snmp/library/mib.h -./host/hr_storage.lo: ../../include/net-snmp/mib_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/parse.h -./host/hr_storage.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_storage.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_storage.lo: ../../include/net-snmp/library/getopt.h -./host/hr_storage.lo: ../../include/net-snmp/utilities.h -./host/hr_storage.lo: ../../include/net-snmp/library/system.h -./host/hr_storage.lo: ../../include/net-snmp/library/tools.h -./host/hr_storage.lo: ../../include/net-snmp/library/int64.h -./host/hr_storage.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_storage.lo: ../../include/net-snmp/library/data_list.h -./host/hr_storage.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_storage.lo: ../../include/net-snmp/library/container.h -./host/hr_storage.lo: ../../include/net-snmp/library/factory.h -./host/hr_storage.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_storage.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_storage.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_storage.lo: ../../include/net-snmp/library/container.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_storage.lo: ../../include/net-snmp/version.h -./host/hr_storage.lo: ../../include/net-snmp/config_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/read_config.h -./host/hr_storage.lo: ../../include/net-snmp/library/default_store.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_storage.lo: ../../include/net-snmp/library/vacm.h -./host/hr_storage.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_storage.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_storage.lo: ../../include/net-snmp/library/keytools.h -./host/hr_storage.lo: ../../include/net-snmp/library/scapi.h -./host/hr_storage.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_storage.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_storage.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_storage.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_storage.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_storage.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_storage.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_storage.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_storage.lo: ./host/hr_storage.h ./host/hr_filesys.h -./host/hr_storage.lo: ../../include/net-snmp/agent/auto_nlist.h -./host/hr_storage.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hr_storage.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hr_storage.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hr_storage.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hr_storage.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hr_storage.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hr_storage.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hr_storage.lo: ../../include/net-snmp/agent/instance.h -./host/hr_storage.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hr_storage.lo: ../../include/net-snmp/agent/scalar.h -./host/hr_storage.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hr_storage.lo: ../../include/net-snmp/agent/watcher.h -./host/hr_storage.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hr_storage.lo: ../../include/net-snmp/agent/null.h -./host/hr_storage.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hr_storage.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hr_storage.lo: ../../include/net-snmp/agent/old_api.h -./host/hr_storage.lo: ../../include/net-snmp/agent/read_only.h -./host/hr_storage.lo: ../../include/net-snmp/agent/row_merge.h -./host/hr_storage.lo: ../../include/net-snmp/agent/serialize.h -./host/hr_storage.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hr_storage.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table_data.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table_container.h -./host/hr_storage.lo: ../../include/net-snmp/agent/table_array.h -./host/hr_storage.lo: ../../include/net-snmp/agent/mfd.h -./host/hr_storage.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hr_storage.lo: ../../include/net-snmp/agent/hardware/memory.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/net-snmp-config.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/definitions.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/types.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/oid.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/types.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/varbind_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_client.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/pdu_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/asn1.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/output_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/session_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/callback.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_service.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/mib.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/mib_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/parse.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/oid_stash.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/net-snmp-features.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/getopt.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/utilities.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/system.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/tools.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/int64.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/mt_support.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/data_list.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/check_varbind.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/factory.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container_iterator.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/version.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/config_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/read_config.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/default_store.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/vacm.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/snmpv3_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpv3.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/transform_oids.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/keytools.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/scapi.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/lcd_time.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmptsm.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpusm.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/var_struct.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/instance.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/scalar.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/watcher.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/null.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/old_api.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/read_only.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/row_merge.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/serialize.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_data.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_container.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_array.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/mfd.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hrSWInstalledTable.lo: ../../include/net-snmp/data_access/swinst.h -./host/hrSWInstalledTable.lo: ./host/hrSWInstalledTable.h -./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_swinst.lo: host_res.h -./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_swinst.lo: ../../include/net-snmp/definitions.h -./host/hr_swinst.lo: ../../include/net-snmp/types.h -./host/hr_swinst.lo: ../../include/net-snmp/library/oid.h -./host/hr_swinst.lo: ../../include/net-snmp/library/types.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_swinst.lo: ../../include/net-snmp/varbind_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_swinst.lo: ../../include/net-snmp/pdu_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/asn1.h -./host/hr_swinst.lo: ../../include/net-snmp/output_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_swinst.lo: ../../include/net-snmp/session_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/callback.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_swinst.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_swinst.lo: ../../include/net-snmp/library/mib.h -./host/hr_swinst.lo: ../../include/net-snmp/mib_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/parse.h -./host/hr_swinst.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_swinst.lo: ../../include/net-snmp/library/getopt.h -./host/hr_swinst.lo: ../../include/net-snmp/utilities.h -./host/hr_swinst.lo: ../../include/net-snmp/library/system.h -./host/hr_swinst.lo: ../../include/net-snmp/library/tools.h -./host/hr_swinst.lo: ../../include/net-snmp/library/int64.h -./host/hr_swinst.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_swinst.lo: ../../include/net-snmp/library/data_list.h -./host/hr_swinst.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_swinst.lo: ../../include/net-snmp/library/container.h -./host/hr_swinst.lo: ../../include/net-snmp/library/factory.h -./host/hr_swinst.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_swinst.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_swinst.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_swinst.lo: ../../include/net-snmp/library/container.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_swinst.lo: ../../include/net-snmp/version.h -./host/hr_swinst.lo: ../../include/net-snmp/config_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/read_config.h -./host/hr_swinst.lo: ../../include/net-snmp/library/default_store.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_swinst.lo: ../../include/net-snmp/library/vacm.h -./host/hr_swinst.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_swinst.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_swinst.lo: ../../include/net-snmp/library/keytools.h -./host/hr_swinst.lo: ../../include/net-snmp/library/scapi.h -./host/hr_swinst.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_swinst.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_swinst.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_swinst.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_swinst.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_swinst.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_swinst.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_swinst.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_swinst.lo: ./host/hr_swinst.h -./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_swrun.lo: ../../include/net-snmp/output_api.h -./host/hr_swrun.lo: ../../include/net-snmp/types.h -./host/hr_swrun.lo: ../../include/net-snmp/library/oid.h -./host/hr_swrun.lo: ../../include/net-snmp/library/types.h -./host/hr_swrun.lo: ../../include/net-snmp/definitions.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_swrun.lo: ../../include/net-snmp/varbind_api.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_swrun.lo: ../../include/net-snmp/pdu_api.h -./host/hr_swrun.lo: ../../include/net-snmp/library/asn1.h -./host/hr_swrun.lo: ../../include/net-snmp/session_api.h -./host/hr_swrun.lo: ../../include/net-snmp/library/callback.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_swrun.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_swrun.lo: ../../include/net-snmp/library/mib.h -./host/hr_swrun.lo: ../../include/net-snmp/mib_api.h -./host/hr_swrun.lo: ../../include/net-snmp/library/parse.h -./host/hr_swrun.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_swrun.lo: host_res.h -./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_swrun.lo: ../../include/net-snmp/library/getopt.h -./host/hr_swrun.lo: ../../include/net-snmp/utilities.h -./host/hr_swrun.lo: ../../include/net-snmp/library/system.h -./host/hr_swrun.lo: ../../include/net-snmp/library/tools.h -./host/hr_swrun.lo: ../../include/net-snmp/library/int64.h -./host/hr_swrun.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_swrun.lo: ../../include/net-snmp/library/data_list.h -./host/hr_swrun.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_swrun.lo: ../../include/net-snmp/library/container.h -./host/hr_swrun.lo: ../../include/net-snmp/library/factory.h -./host/hr_swrun.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_swrun.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_swrun.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_swrun.lo: ../../include/net-snmp/library/container.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_swrun.lo: ../../include/net-snmp/version.h -./host/hr_swrun.lo: ../../include/net-snmp/config_api.h -./host/hr_swrun.lo: ../../include/net-snmp/library/read_config.h -./host/hr_swrun.lo: ../../include/net-snmp/library/default_store.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_swrun.lo: ../../include/net-snmp/library/vacm.h -./host/hr_swrun.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_swrun.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_swrun.lo: ../../include/net-snmp/library/keytools.h -./host/hr_swrun.lo: ../../include/net-snmp/library/scapi.h -./host/hr_swrun.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_swrun.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_swrun.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_swrun.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_swrun.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_swrun.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_swrun.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_swrun.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_swrun.lo: ./host/hr_swrun.h -./host/hr_swrun.lo: ../../include/net-snmp/agent/auto_nlist.h -./host/hr_swrun.lo: ../../agent/kernel.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/net-snmp-config.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/definitions.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/types.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/oid.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/types.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/varbind_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_client.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/pdu_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/asn1.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/output_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/session_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/callback.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_service.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/mib.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/mib_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/parse.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/oid_stash.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/net-snmp-features.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/getopt.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/utilities.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/system.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/tools.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/int64.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/mt_support.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/data_list.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/check_varbind.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/factory.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container_iterator.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/version.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/config_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/read_config.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/default_store.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/vacm.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/snmpv3_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpv3.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/transform_oids.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/keytools.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/scapi.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/lcd_time.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmptsm.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpusm.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/var_struct.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/instance.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/scalar.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/watcher.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/null.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/old_api.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/read_only.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/row_merge.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/serialize.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_data.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_container.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_array.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/mfd.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hrSWRunPerfTable.lo: ../../include/net-snmp/data_access/swrun.h -./host/hrSWRunPerfTable.lo: ./host/hrSWRunPerfTable.h -./host/hrSWRunPerfTable.lo: ./host/data_access/swrun.h -./host/hrSWRunTable.lo: ../../include/net-snmp/net-snmp-config.h -./host/hrSWRunTable.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hrSWRunTable.lo: ../../include/net-snmp/definitions.h -./host/hrSWRunTable.lo: ../../include/net-snmp/types.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/oid.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/types.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/varbind_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_client.h -./host/hrSWRunTable.lo: ../../include/net-snmp/pdu_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/asn1.h -./host/hrSWRunTable.lo: ../../include/net-snmp/output_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hrSWRunTable.lo: ../../include/net-snmp/session_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/callback.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_service.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/mib.h -./host/hrSWRunTable.lo: ../../include/net-snmp/mib_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/parse.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/oid_stash.h -./host/hrSWRunTable.lo: ../../include/net-snmp/net-snmp-features.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/getopt.h -./host/hrSWRunTable.lo: ../../include/net-snmp/utilities.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/system.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/tools.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/int64.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/mt_support.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/data_list.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/check_varbind.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/container.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/factory.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/container_iterator.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/container.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hrSWRunTable.lo: ../../include/net-snmp/version.h -./host/hrSWRunTable.lo: ../../include/net-snmp/config_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/read_config.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/default_store.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/vacm.h -./host/hrSWRunTable.lo: ../../include/net-snmp/snmpv3_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpv3.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/transform_oids.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/keytools.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/scapi.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/lcd_time.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmptsm.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpusm.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/var_struct.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hrSWRunTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/instance.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/scalar.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/watcher.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/null.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/old_api.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/read_only.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/row_merge.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/serialize.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_data.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_container.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_array.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/mfd.h -./host/hrSWRunTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./host/hrSWRunTable.lo: ../../include/net-snmp/data_access/swrun.h -./host/hrSWRunTable.lo: ./host/data_access/swrun.h ./host/hrSWRunTable.h -./host/hr_system.lo: ../../include/net-snmp/net-snmp-config.h -./host/hr_system.lo: ../../include/net-snmp/net-snmp-features.h -./host/hr_system.lo: ../../include/net-snmp/net-snmp-includes.h -./host/hr_system.lo: ../../include/net-snmp/definitions.h -./host/hr_system.lo: ../../include/net-snmp/types.h -./host/hr_system.lo: ../../include/net-snmp/library/oid.h -./host/hr_system.lo: ../../include/net-snmp/library/types.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_api.h -./host/hr_system.lo: ../../include/net-snmp/varbind_api.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_client.h -./host/hr_system.lo: ../../include/net-snmp/pdu_api.h -./host/hr_system.lo: ../../include/net-snmp/library/asn1.h -./host/hr_system.lo: ../../include/net-snmp/output_api.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_debug.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_logging.h -./host/hr_system.lo: ../../include/net-snmp/session_api.h -./host/hr_system.lo: ../../include/net-snmp/library/callback.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_transport.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_service.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./host/hr_system.lo: ../../include/net-snmp/library/ucd_compat.h -./host/hr_system.lo: ../../include/net-snmp/library/mib.h -./host/hr_system.lo: ../../include/net-snmp/mib_api.h -./host/hr_system.lo: ../../include/net-snmp/library/parse.h -./host/hr_system.lo: ../../include/net-snmp/library/oid_stash.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_impl.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp-tc.h -./host/hr_system.lo: ../../include/net-snmp/library/getopt.h -./host/hr_system.lo: ../../include/net-snmp/utilities.h -./host/hr_system.lo: ../../include/net-snmp/library/system.h -./host/hr_system.lo: ../../include/net-snmp/library/tools.h -./host/hr_system.lo: ../../include/net-snmp/library/int64.h -./host/hr_system.lo: ../../include/net-snmp/library/mt_support.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_alarm.h -./host/hr_system.lo: ../../include/net-snmp/library/data_list.h -./host/hr_system.lo: ../../include/net-snmp/library/check_varbind.h -./host/hr_system.lo: ../../include/net-snmp/library/container.h -./host/hr_system.lo: ../../include/net-snmp/library/factory.h -./host/hr_system.lo: ../../include/net-snmp/library/container_binary_array.h -./host/hr_system.lo: ../../include/net-snmp/library/container_list_ssll.h -./host/hr_system.lo: ../../include/net-snmp/library/container_iterator.h -./host/hr_system.lo: ../../include/net-snmp/library/container.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_assert.h -./host/hr_system.lo: ../../include/net-snmp/version.h -./host/hr_system.lo: ../../include/net-snmp/config_api.h -./host/hr_system.lo: ../../include/net-snmp/library/read_config.h -./host/hr_system.lo: ../../include/net-snmp/library/default_store.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_parse_args.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_enum.h -./host/hr_system.lo: ../../include/net-snmp/library/vacm.h -./host/hr_system.lo: ../../include/net-snmp/snmpv3_api.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpv3.h -./host/hr_system.lo: ../../include/net-snmp/library/transform_oids.h -./host/hr_system.lo: ../../include/net-snmp/library/keytools.h -./host/hr_system.lo: ../../include/net-snmp/library/scapi.h -./host/hr_system.lo: ../../include/net-snmp/library/lcd_time.h -./host/hr_system.lo: ../../include/net-snmp/library/snmp_secmod.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./host/hr_system.lo: ../../include/net-snmp/library/snmptsm.h -./host/hr_system.lo: ../../include/net-snmp/library/snmpusm.h -./host/hr_system.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./host/hr_system.lo: ../../include/net-snmp/agent/mib_module_config.h -./host/hr_system.lo: ../../include/net-snmp/agent/agent_module_config.h -./host/hr_system.lo: ../../include/net-snmp/agent/snmp_agent.h -./host/hr_system.lo: ../../include/net-snmp/agent/snmp_vars.h -./host/hr_system.lo: ../../include/net-snmp/agent/agent_handler.h -./host/hr_system.lo: ../../include/net-snmp/agent/var_struct.h -./host/hr_system.lo: ../../include/net-snmp/agent/agent_registry.h -./host/hr_system.lo: ../../include/net-snmp/library/fd_event_manager.h -./host/hr_system.lo: ../../include/net-snmp/agent/ds_agent.h -./host/hr_system.lo: ../../include/net-snmp/agent/agent_read_config.h -./host/hr_system.lo: ../../include/net-snmp/agent/agent_trap.h -./host/hr_system.lo: ../../include/net-snmp/agent/all_helpers.h -./host/hr_system.lo: ../../include/net-snmp/agent/instance.h -./host/hr_system.lo: ../../include/net-snmp/agent/baby_steps.h -./host/hr_system.lo: ../../include/net-snmp/agent/scalar.h -./host/hr_system.lo: ../../include/net-snmp/agent/scalar_group.h -./host/hr_system.lo: ../../include/net-snmp/agent/watcher.h -./host/hr_system.lo: ../../include/net-snmp/agent/multiplexer.h -./host/hr_system.lo: ../../include/net-snmp/agent/null.h -./host/hr_system.lo: ../../include/net-snmp/agent/debug_handler.h -./host/hr_system.lo: ../../include/net-snmp/agent/cache_handler.h -./host/hr_system.lo: ../../include/net-snmp/agent/old_api.h -./host/hr_system.lo: ../../include/net-snmp/agent/read_only.h -./host/hr_system.lo: ../../include/net-snmp/agent/row_merge.h -./host/hr_system.lo: ../../include/net-snmp/agent/serialize.h -./host/hr_system.lo: ../../include/net-snmp/agent/bulk_to_next.h -./host/hr_system.lo: ../../include/net-snmp/agent/mode_end_call.h -./host/hr_system.lo: ../../include/net-snmp/agent/table.h -./host/hr_system.lo: ../../include/net-snmp/agent/table_data.h -./host/hr_system.lo: ../../include/net-snmp/agent/table_dataset.h -./host/hr_system.lo: ../../include/net-snmp/agent/table_tdata.h -./host/hr_system.lo: ../../include/net-snmp/agent/table_iterator.h -./host/hr_system.lo: ../../include/net-snmp/agent/table_container.h -./host/hr_system.lo: ../../include/net-snmp/agent/table_array.h -./host/hr_system.lo: ../../include/net-snmp/agent/mfd.h -./host/hr_system.lo: ../../include/net-snmp/agent/snmp_get_statistic.h host.h -./host/hr_system.lo: host_res.h ./host/hr_system.h -./host/hr_system.lo: ../../include/net-snmp/agent/auto_nlist.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/net-snmp-config.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/net-snmp-features.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/net-snmp-includes.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/definitions.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/types.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/oid.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/types.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/varbind_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_client.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/pdu_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/asn1.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/output_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_debug.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_logging.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/session_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/callback.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_transport.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_service.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/ucd_compat.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/mib.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/mib_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/parse.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/oid_stash.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_impl.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp-tc.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/getopt.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/utilities.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/system.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/tools.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/int64.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/mt_support.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_alarm.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/data_list.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/check_varbind.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/factory.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container_binary_array.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container_list_ssll.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container_iterator.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_assert.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/version.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/config_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/read_config.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/default_store.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_parse_args.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_enum.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/vacm.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/snmpv3_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpv3.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/transform_oids.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/keytools.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/scapi.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/lcd_time.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_secmod.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmptsm.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpusm.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/mib_module_config.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_module_config.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/snmp_agent.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/snmp_vars.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_handler.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/var_struct.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_registry.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/fd_event_manager.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/ds_agent.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_read_config.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_trap.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/all_helpers.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/instance.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/baby_steps.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/scalar.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/scalar_group.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/watcher.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/multiplexer.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/null.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/debug_handler.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/cache_handler.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/old_api.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/read_only.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/row_merge.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/serialize.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/bulk_to_next.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/mode_end_call.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_data.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_dataset.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_tdata.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_iterator.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_container.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_array.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/mfd.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./ip-mib/ip_scalars.lo: ../../include/net-snmp/data_access/ip_scalars.h -./ip-mib/ip_scalars.lo: ./ip-mib/ip_scalars.h -./mibII/at.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/at.lo: ./mibII/mibII_common.h -./mibII/at.lo: ../../agent/kernel.h -./mibII/at.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/at.lo: ../../include/net-snmp/definitions.h -./mibII/at.lo: ../../include/net-snmp/types.h -./mibII/at.lo: ../../include/net-snmp/library/oid.h -./mibII/at.lo: ../../include/net-snmp/library/types.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/at.lo: ../../include/net-snmp/varbind_api.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/at.lo: ../../include/net-snmp/pdu_api.h -./mibII/at.lo: ../../include/net-snmp/library/asn1.h -./mibII/at.lo: ../../include/net-snmp/output_api.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/at.lo: ../../include/net-snmp/session_api.h -./mibII/at.lo: ../../include/net-snmp/library/callback.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/at.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/at.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/at.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/at.lo: ../../include/net-snmp/library/mib.h -./mibII/at.lo: ../../include/net-snmp/mib_api.h -./mibII/at.lo: ../../include/net-snmp/library/parse.h -./mibII/at.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/at.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/at.lo: ../../include/net-snmp/library/snmp.h -./mibII/at.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/at.lo: ../../include/net-snmp/library/getopt.h -./mibII/at.lo: ../../include/net-snmp/utilities.h -./mibII/at.lo: ../../include/net-snmp/library/system.h -./mibII/at.lo: ../../include/net-snmp/library/tools.h -./mibII/at.lo: ../../include/net-snmp/library/int64.h -./mibII/at.lo: ../../include/net-snmp/library/mt_support.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/at.lo: ../../include/net-snmp/library/data_list.h -./mibII/at.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/at.lo: ../../include/net-snmp/library/container.h -./mibII/at.lo: ../../include/net-snmp/library/factory.h -./mibII/at.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/at.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/at.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/at.lo: ../../include/net-snmp/library/container.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/at.lo: ../../include/net-snmp/version.h -./mibII/at.lo: ../../include/net-snmp/config_api.h -./mibII/at.lo: ../../include/net-snmp/library/read_config.h -./mibII/at.lo: ../../include/net-snmp/library/default_store.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/at.lo: ../../include/net-snmp/library/vacm.h -./mibII/at.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/at.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/at.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/at.lo: ../../include/net-snmp/library/keytools.h -./mibII/at.lo: ../../include/net-snmp/library/scapi.h -./mibII/at.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/at.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/at.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/at.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/at.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/at.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/at.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/at.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/at.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/at.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/at.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/at.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/at.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/at.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/at.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/at.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/at.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/at.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/at.lo: ../../include/net-snmp/agent/instance.h -./mibII/at.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/at.lo: ../../include/net-snmp/agent/scalar.h -./mibII/at.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/at.lo: ../../include/net-snmp/agent/watcher.h -./mibII/at.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/at.lo: ../../include/net-snmp/agent/null.h -./mibII/at.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/at.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/at.lo: ../../include/net-snmp/agent/old_api.h -./mibII/at.lo: ../../include/net-snmp/agent/read_only.h -./mibII/at.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/at.lo: ../../include/net-snmp/agent/serialize.h -./mibII/at.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/at.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/at.lo: ../../include/net-snmp/agent/table.h -./mibII/at.lo: ../../include/net-snmp/agent/table_data.h -./mibII/at.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/at.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/at.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/at.lo: ../../include/net-snmp/agent/table_container.h -./mibII/at.lo: ../../include/net-snmp/agent/table_array.h -./mibII/at.lo: ../../include/net-snmp/agent/mfd.h -./mibII/at.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/at.lo: ../../include/net-snmp/agent/auto_nlist.h ./mibII/at.h -./mibII/at.lo: ./mibII/interfaces.h -./mibII/at.lo: ../../include/net-snmp/data_access/interface.h -./mibII/icmp.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/icmp.lo: ./mibII/mibII_common.h -./mibII/icmp.lo: ../../agent/kernel.h -./mibII/icmp.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/icmp.lo: ../../include/net-snmp/definitions.h -./mibII/icmp.lo: ../../include/net-snmp/types.h -./mibII/icmp.lo: ../../include/net-snmp/library/oid.h -./mibII/icmp.lo: ../../include/net-snmp/library/types.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/icmp.lo: ../../include/net-snmp/varbind_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/icmp.lo: ../../include/net-snmp/pdu_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/asn1.h -./mibII/icmp.lo: ../../include/net-snmp/output_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/icmp.lo: ../../include/net-snmp/session_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/callback.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/icmp.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/icmp.lo: ../../include/net-snmp/library/mib.h -./mibII/icmp.lo: ../../include/net-snmp/mib_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/parse.h -./mibII/icmp.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/icmp.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/icmp.lo: ../../include/net-snmp/library/getopt.h -./mibII/icmp.lo: ../../include/net-snmp/utilities.h -./mibII/icmp.lo: ../../include/net-snmp/library/system.h -./mibII/icmp.lo: ../../include/net-snmp/library/tools.h -./mibII/icmp.lo: ../../include/net-snmp/library/int64.h -./mibII/icmp.lo: ../../include/net-snmp/library/mt_support.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/icmp.lo: ../../include/net-snmp/library/data_list.h -./mibII/icmp.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/icmp.lo: ../../include/net-snmp/library/container.h -./mibII/icmp.lo: ../../include/net-snmp/library/factory.h -./mibII/icmp.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/icmp.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/icmp.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/icmp.lo: ../../include/net-snmp/library/container.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/icmp.lo: ../../include/net-snmp/version.h -./mibII/icmp.lo: ../../include/net-snmp/config_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/read_config.h -./mibII/icmp.lo: ../../include/net-snmp/library/default_store.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/icmp.lo: ../../include/net-snmp/library/vacm.h -./mibII/icmp.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/icmp.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/icmp.lo: ../../include/net-snmp/library/keytools.h -./mibII/icmp.lo: ../../include/net-snmp/library/scapi.h -./mibII/icmp.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/icmp.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/icmp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/icmp.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/icmp.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/icmp.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/icmp.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/icmp.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/icmp.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/icmp.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/icmp.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/icmp.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/icmp.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/icmp.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/icmp.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/icmp.lo: ../../include/net-snmp/agent/instance.h -./mibII/icmp.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/icmp.lo: ../../include/net-snmp/agent/scalar.h -./mibII/icmp.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/icmp.lo: ../../include/net-snmp/agent/watcher.h -./mibII/icmp.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/icmp.lo: ../../include/net-snmp/agent/null.h -./mibII/icmp.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/icmp.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/icmp.lo: ../../include/net-snmp/agent/old_api.h -./mibII/icmp.lo: ../../include/net-snmp/agent/read_only.h -./mibII/icmp.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/icmp.lo: ../../include/net-snmp/agent/serialize.h -./mibII/icmp.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/icmp.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table_data.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table_container.h -./mibII/icmp.lo: ../../include/net-snmp/agent/table_array.h -./mibII/icmp.lo: ../../include/net-snmp/agent/mfd.h -./mibII/icmp.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/icmp.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/icmp.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/icmp.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/icmp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/icmp.h -./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/interfaces.lo: ../../agent/kernel.h -./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/interfaces.lo: ../../include/net-snmp/definitions.h -./mibII/interfaces.lo: ../../include/net-snmp/types.h -./mibII/interfaces.lo: ../../include/net-snmp/library/oid.h -./mibII/interfaces.lo: ../../include/net-snmp/library/types.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/interfaces.lo: ../../include/net-snmp/varbind_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/interfaces.lo: ../../include/net-snmp/pdu_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/asn1.h -./mibII/interfaces.lo: ../../include/net-snmp/output_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/interfaces.lo: ../../include/net-snmp/session_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/callback.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/interfaces.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/interfaces.lo: ../../include/net-snmp/library/mib.h -./mibII/interfaces.lo: ../../include/net-snmp/mib_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/parse.h -./mibII/interfaces.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/interfaces.lo: ../../include/net-snmp/library/getopt.h -./mibII/interfaces.lo: ../../include/net-snmp/utilities.h -./mibII/interfaces.lo: ../../include/net-snmp/library/system.h -./mibII/interfaces.lo: ../../include/net-snmp/library/tools.h -./mibII/interfaces.lo: ../../include/net-snmp/library/int64.h -./mibII/interfaces.lo: ../../include/net-snmp/library/mt_support.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/interfaces.lo: ../../include/net-snmp/library/data_list.h -./mibII/interfaces.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/interfaces.lo: ../../include/net-snmp/library/container.h -./mibII/interfaces.lo: ../../include/net-snmp/library/factory.h -./mibII/interfaces.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/interfaces.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/interfaces.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/interfaces.lo: ../../include/net-snmp/library/container.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/interfaces.lo: ../../include/net-snmp/version.h -./mibII/interfaces.lo: ../../include/net-snmp/config_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/read_config.h -./mibII/interfaces.lo: ../../include/net-snmp/library/default_store.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/interfaces.lo: ../../include/net-snmp/library/vacm.h -./mibII/interfaces.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/interfaces.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/interfaces.lo: ../../include/net-snmp/library/keytools.h -./mibII/interfaces.lo: ../../include/net-snmp/library/scapi.h -./mibII/interfaces.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/interfaces.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/interfaces.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/instance.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/scalar.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/watcher.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/null.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/old_api.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/read_only.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/serialize.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table_data.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table_container.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/table_array.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/mfd.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/interfaces.lo: ../../include/net-snmp/data_access/interface.h -./mibII/interfaces.lo: ./mibII/interfaces.h struct.h util_funcs.h -./mibII/interfaces.lo: util_funcs/header_generic.h -./mibII/interfaces.lo: util_funcs/header_simple_table.h -./mibII/interfaces.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h -./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/ipAddr.lo: ../../agent/kernel.h -./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/ipAddr.lo: ../../include/net-snmp/definitions.h -./mibII/ipAddr.lo: ../../include/net-snmp/types.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/oid.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/types.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/varbind_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/ipAddr.lo: ../../include/net-snmp/pdu_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/asn1.h -./mibII/ipAddr.lo: ../../include/net-snmp/output_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/ipAddr.lo: ../../include/net-snmp/session_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/callback.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/mib.h -./mibII/ipAddr.lo: ../../include/net-snmp/mib_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/parse.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/getopt.h -./mibII/ipAddr.lo: ../../include/net-snmp/utilities.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/system.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/tools.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/int64.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/mt_support.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/data_list.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/container.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/factory.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/container.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/ipAddr.lo: ../../include/net-snmp/version.h -./mibII/ipAddr.lo: ../../include/net-snmp/config_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/read_config.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/default_store.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/vacm.h -./mibII/ipAddr.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/keytools.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/scapi.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/ipAddr.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/instance.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/scalar.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/watcher.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/null.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/old_api.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/read_only.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/serialize.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_data.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_container.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_array.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/mfd.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/ipAddr.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/ipAddr.lo: ../../include/net-snmp/data_access/interface.h -./mibII/ipAddr.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h -./mibII/ipAddr.lo: ./mibII/at.h ./mibII/interfaces.h -./mibII/ip.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/ip.lo: ./mibII/mibII_common.h -./mibII/ip.lo: ../../agent/kernel.h -./mibII/ip.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/ip.lo: ../../include/net-snmp/definitions.h -./mibII/ip.lo: ../../include/net-snmp/types.h -./mibII/ip.lo: ../../include/net-snmp/library/oid.h -./mibII/ip.lo: ../../include/net-snmp/library/types.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/ip.lo: ../../include/net-snmp/varbind_api.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/ip.lo: ../../include/net-snmp/pdu_api.h -./mibII/ip.lo: ../../include/net-snmp/library/asn1.h -./mibII/ip.lo: ../../include/net-snmp/output_api.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/ip.lo: ../../include/net-snmp/session_api.h -./mibII/ip.lo: ../../include/net-snmp/library/callback.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/ip.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/ip.lo: ../../include/net-snmp/library/mib.h -./mibII/ip.lo: ../../include/net-snmp/mib_api.h -./mibII/ip.lo: ../../include/net-snmp/library/parse.h -./mibII/ip.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/ip.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/ip.lo: ../../include/net-snmp/library/getopt.h -./mibII/ip.lo: ../../include/net-snmp/utilities.h -./mibII/ip.lo: ../../include/net-snmp/library/system.h -./mibII/ip.lo: ../../include/net-snmp/library/tools.h -./mibII/ip.lo: ../../include/net-snmp/library/int64.h -./mibII/ip.lo: ../../include/net-snmp/library/mt_support.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/ip.lo: ../../include/net-snmp/library/data_list.h -./mibII/ip.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/ip.lo: ../../include/net-snmp/library/container.h -./mibII/ip.lo: ../../include/net-snmp/library/factory.h -./mibII/ip.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/ip.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/ip.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/ip.lo: ../../include/net-snmp/library/container.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/ip.lo: ../../include/net-snmp/version.h -./mibII/ip.lo: ../../include/net-snmp/config_api.h -./mibII/ip.lo: ../../include/net-snmp/library/read_config.h -./mibII/ip.lo: ../../include/net-snmp/library/default_store.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/ip.lo: ../../include/net-snmp/library/vacm.h -./mibII/ip.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/ip.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/ip.lo: ../../include/net-snmp/library/keytools.h -./mibII/ip.lo: ../../include/net-snmp/library/scapi.h -./mibII/ip.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/ip.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/ip.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/ip.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/ip.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/ip.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/ip.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/ip.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/ip.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/ip.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/ip.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/ip.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/ip.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/ip.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/ip.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/ip.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/ip.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/ip.lo: ../../include/net-snmp/agent/instance.h -./mibII/ip.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/ip.lo: ../../include/net-snmp/agent/scalar.h -./mibII/ip.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/ip.lo: ../../include/net-snmp/agent/watcher.h -./mibII/ip.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/ip.lo: ../../include/net-snmp/agent/null.h -./mibII/ip.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/ip.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/ip.lo: ../../include/net-snmp/agent/old_api.h -./mibII/ip.lo: ../../include/net-snmp/agent/read_only.h -./mibII/ip.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/ip.lo: ../../include/net-snmp/agent/serialize.h -./mibII/ip.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/ip.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/ip.lo: ../../include/net-snmp/agent/table.h -./mibII/ip.lo: ../../include/net-snmp/agent/table_data.h -./mibII/ip.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/ip.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/ip.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/ip.lo: ../../include/net-snmp/agent/table_container.h -./mibII/ip.lo: ../../include/net-snmp/agent/table_array.h -./mibII/ip.lo: ../../include/net-snmp/agent/mfd.h -./mibII/ip.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/ip.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/ip.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/ip.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/ip.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/ip.h -./mibII/ip.lo: ./mibII/var_route.h ./mibII/route_write.h ./mibII/at.h -./mibII/ip.lo: ./mibII/ipAddr.h ./mibII/interfaces.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/ipCidrRouteTable_access.lo: ./mibII/route_headers.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/definitions.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/types.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/oid.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/types.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/varbind_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/pdu_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/asn1.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/output_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/session_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/callback.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/mib.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/mib_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/parse.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/getopt.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/utilities.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/system.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/tools.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/int64.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/mt_support.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/data_list.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/factory.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/version.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/config_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/read_config.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/default_store.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/vacm.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/keytools.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/scapi.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/instance.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/scalar.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/watcher.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/null.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/old_api.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/read_only.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/serialize.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_data.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_container.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_array.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/mfd.h -./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/ipCidrRouteTable_access.lo: ./mibII/ipCidrRouteTable_access.h -./mibII/ipCidrRouteTable_access.lo: ./mibII/ipCidrRouteTable_enums.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/ipCidrRouteTable.lo: ./mibII/route_headers.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/definitions.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/types.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/oid.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/types.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/varbind_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/pdu_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/asn1.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/output_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/session_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/callback.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/mib.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/mib_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/parse.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/getopt.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/utilities.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/system.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/tools.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/int64.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/mt_support.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/data_list.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/factory.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/version.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/config_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/read_config.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/default_store.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/vacm.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/keytools.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/scapi.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/instance.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/scalar.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/watcher.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/null.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/old_api.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/read_only.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/serialize.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_data.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_container.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_array.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/mfd.h -./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable.h -./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_columns.h -./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_enums.h -./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_checkfns.h -./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_access.h -./mibII/ipCidrRouteTable.lo: ./mibII/var_route.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/definitions.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/types.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/oid.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/types.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/varbind_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/pdu_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/asn1.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/output_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/session_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/callback.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/mib.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/mib_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/parse.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/getopt.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/utilities.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/system.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/tools.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/int64.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/mt_support.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/data_list.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/factory.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/version.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/config_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/read_config.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/default_store.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/vacm.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/keytools.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/scapi.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/ipCidrRouteTable_checkfns.lo: ./mibII/ipCidrRouteTable_checkfns.h -./mibII/ipCidrRouteTable_checkfns.lo: ./mibII/ipCidrRouteTable_enums.h -./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/ipv6.lo: ../../include/net-snmp/definitions.h -./mibII/ipv6.lo: ../../include/net-snmp/types.h -./mibII/ipv6.lo: ../../include/net-snmp/library/oid.h -./mibII/ipv6.lo: ../../include/net-snmp/library/types.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/ipv6.lo: ../../include/net-snmp/varbind_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/ipv6.lo: ../../include/net-snmp/pdu_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/asn1.h -./mibII/ipv6.lo: ../../include/net-snmp/output_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/ipv6.lo: ../../include/net-snmp/session_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/callback.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/ipv6.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/ipv6.lo: ../../include/net-snmp/library/mib.h -./mibII/ipv6.lo: ../../include/net-snmp/mib_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/parse.h -./mibII/ipv6.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/ipv6.lo: ../../include/net-snmp/library/getopt.h -./mibII/ipv6.lo: ../../include/net-snmp/utilities.h -./mibII/ipv6.lo: ../../include/net-snmp/library/system.h -./mibII/ipv6.lo: ../../include/net-snmp/library/tools.h -./mibII/ipv6.lo: ../../include/net-snmp/library/int64.h -./mibII/ipv6.lo: ../../include/net-snmp/library/mt_support.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/ipv6.lo: ../../include/net-snmp/library/data_list.h -./mibII/ipv6.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/ipv6.lo: ../../include/net-snmp/library/container.h -./mibII/ipv6.lo: ../../include/net-snmp/library/factory.h -./mibII/ipv6.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/ipv6.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/ipv6.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/ipv6.lo: ../../include/net-snmp/library/container.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/ipv6.lo: ../../include/net-snmp/version.h -./mibII/ipv6.lo: ../../include/net-snmp/config_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/read_config.h -./mibII/ipv6.lo: ../../include/net-snmp/library/default_store.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/ipv6.lo: ../../include/net-snmp/library/vacm.h -./mibII/ipv6.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/ipv6.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/ipv6.lo: ../../include/net-snmp/library/keytools.h -./mibII/ipv6.lo: ../../include/net-snmp/library/scapi.h -./mibII/ipv6.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/ipv6.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/ipv6.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/instance.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/scalar.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/watcher.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/null.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/old_api.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/read_only.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/serialize.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table_data.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table_container.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/table_array.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/mfd.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/ipv6.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/ipv6.lo: ../../agent/kernel.h ./mibII/ipv6.h ./mibII/var_route.h -./mibII/ipv6.lo: ./mibII/route_write.h ./mibII/at.h ./mibII/interfaces.h -./mibII/kernel_linux.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/kernel_linux.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/kernel_linux.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/kernel_linux.lo: ../../include/net-snmp/definitions.h -./mibII/kernel_linux.lo: ../../include/net-snmp/types.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/oid.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/types.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/varbind_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/kernel_linux.lo: ../../include/net-snmp/pdu_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/asn1.h -./mibII/kernel_linux.lo: ../../include/net-snmp/output_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/kernel_linux.lo: ../../include/net-snmp/session_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/callback.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/mib.h -./mibII/kernel_linux.lo: ../../include/net-snmp/mib_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/parse.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/getopt.h -./mibII/kernel_linux.lo: ../../include/net-snmp/utilities.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/system.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/tools.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/int64.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/mt_support.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/data_list.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/container.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/factory.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/container.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/kernel_linux.lo: ../../include/net-snmp/version.h -./mibII/kernel_linux.lo: ../../include/net-snmp/config_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/read_config.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/default_store.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/vacm.h -./mibII/kernel_linux.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/keytools.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/scapi.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/kernel_linux.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/instance.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/scalar.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/watcher.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/null.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/old_api.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/read_only.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/serialize.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_data.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_container.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_array.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mfd.h -./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/kernel_linux.lo: ./mibII/kernel_linux.h ./mibII/kernel_mib.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/definitions.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/types.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/oid.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/types.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/varbind_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/pdu_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/asn1.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/output_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/session_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/callback.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/mib.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/mib_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/parse.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/getopt.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/utilities.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/system.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/tools.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/int64.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/mt_support.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/data_list.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/factory.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/version.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/config_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/read_config.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/default_store.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/vacm.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/keytools.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/scapi.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/instance.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/scalar.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/watcher.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/null.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/old_api.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/read_only.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/serialize.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_data.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_container.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_array.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mfd.h -./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/kernel_netbsd.lo: ./mibII/kernel_netbsd.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/definitions.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/types.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/oid.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/types.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/varbind_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/pdu_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/asn1.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/output_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/session_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/callback.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/mib.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/mib_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/parse.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/getopt.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/utilities.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/system.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/tools.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/int64.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/mt_support.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/data_list.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/factory.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/version.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/config_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/read_config.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/default_store.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/vacm.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/keytools.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/scapi.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/instance.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/scalar.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/watcher.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/null.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/old_api.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/read_only.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/serialize.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_data.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_container.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_array.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mfd.h -./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/kernel_sysctl.lo: ./mibII/kernel_sysctl.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/definitions.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/types.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/oid.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/types.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/varbind_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/pdu_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/asn1.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/output_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/session_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/callback.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/mib.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/mib_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/parse.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/getopt.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/utilities.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/system.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/tools.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/int64.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/mt_support.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/data_list.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/factory.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/version.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/config_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/read_config.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/default_store.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/vacm.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/keytools.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/scapi.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/instance.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/scalar.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/watcher.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/null.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/old_api.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/read_only.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/serialize.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_data.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_container.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_array.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mfd.h -./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/mta_sendmail.lo: ./mibII/mta_sendmail.h -./mibII/route_write.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/route_write.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/route_write.lo: ../../include/net-snmp/definitions.h -./mibII/route_write.lo: ../../include/net-snmp/types.h -./mibII/route_write.lo: ../../include/net-snmp/library/oid.h -./mibII/route_write.lo: ../../include/net-snmp/library/types.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/route_write.lo: ../../include/net-snmp/varbind_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/route_write.lo: ../../include/net-snmp/pdu_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/asn1.h -./mibII/route_write.lo: ../../include/net-snmp/output_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/route_write.lo: ../../include/net-snmp/session_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/callback.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/route_write.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/route_write.lo: ../../include/net-snmp/library/mib.h -./mibII/route_write.lo: ../../include/net-snmp/mib_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/parse.h -./mibII/route_write.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/route_write.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/route_write.lo: ../../include/net-snmp/library/getopt.h -./mibII/route_write.lo: ../../include/net-snmp/utilities.h -./mibII/route_write.lo: ../../include/net-snmp/library/system.h -./mibII/route_write.lo: ../../include/net-snmp/library/tools.h -./mibII/route_write.lo: ../../include/net-snmp/library/int64.h -./mibII/route_write.lo: ../../include/net-snmp/library/mt_support.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/route_write.lo: ../../include/net-snmp/library/data_list.h -./mibII/route_write.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/route_write.lo: ../../include/net-snmp/library/container.h -./mibII/route_write.lo: ../../include/net-snmp/library/factory.h -./mibII/route_write.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/route_write.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/route_write.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/route_write.lo: ../../include/net-snmp/library/container.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/route_write.lo: ../../include/net-snmp/version.h -./mibII/route_write.lo: ../../include/net-snmp/config_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/read_config.h -./mibII/route_write.lo: ../../include/net-snmp/library/default_store.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/route_write.lo: ../../include/net-snmp/library/vacm.h -./mibII/route_write.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/route_write.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/route_write.lo: ../../include/net-snmp/library/keytools.h -./mibII/route_write.lo: ../../include/net-snmp/library/scapi.h -./mibII/route_write.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/route_write.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/route_write.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/route_write.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/route_write.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/route_write.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/route_write.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/route_write.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/route_write.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/route_write.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/route_write.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/route_write.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/route_write.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/route_write.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/route_write.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/route_write.lo: ../../include/net-snmp/agent/instance.h -./mibII/route_write.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/route_write.lo: ../../include/net-snmp/agent/scalar.h -./mibII/route_write.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/route_write.lo: ../../include/net-snmp/agent/watcher.h -./mibII/route_write.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/route_write.lo: ../../include/net-snmp/agent/null.h -./mibII/route_write.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/route_write.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/route_write.lo: ../../include/net-snmp/agent/old_api.h -./mibII/route_write.lo: ../../include/net-snmp/agent/read_only.h -./mibII/route_write.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/route_write.lo: ../../include/net-snmp/agent/serialize.h -./mibII/route_write.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/route_write.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table_data.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table_container.h -./mibII/route_write.lo: ../../include/net-snmp/agent/table_array.h -./mibII/route_write.lo: ../../include/net-snmp/agent/mfd.h -./mibII/route_write.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/route_write.lo: ./mibII/ip.h ./mibII/var_route.h -./mibII/route_write.lo: ./mibII/route_write.h ./mibII/at.h -./mibII/setSerialNo.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/setSerialNo.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/setSerialNo.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/setSerialNo.lo: ../../include/net-snmp/definitions.h -./mibII/setSerialNo.lo: ../../include/net-snmp/types.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/oid.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/types.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/varbind_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/setSerialNo.lo: ../../include/net-snmp/pdu_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/asn1.h -./mibII/setSerialNo.lo: ../../include/net-snmp/output_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/setSerialNo.lo: ../../include/net-snmp/session_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/callback.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/mib.h -./mibII/setSerialNo.lo: ../../include/net-snmp/mib_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/parse.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/getopt.h -./mibII/setSerialNo.lo: ../../include/net-snmp/utilities.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/system.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/tools.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/int64.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/mt_support.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/data_list.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/container.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/factory.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/container.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/setSerialNo.lo: ../../include/net-snmp/version.h -./mibII/setSerialNo.lo: ../../include/net-snmp/config_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/read_config.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/default_store.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/vacm.h -./mibII/setSerialNo.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/keytools.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/scapi.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/setSerialNo.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/instance.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/scalar.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/watcher.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/null.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/old_api.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/read_only.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/serialize.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_data.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_container.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_array.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/mfd.h -./mibII/setSerialNo.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/setSerialNo.lo: ./mibII/setSerialNo.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/definitions.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/types.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/oid.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/types.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/varbind_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/pdu_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/asn1.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/output_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/session_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/callback.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/mib.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/mib_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/parse.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/getopt.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/utilities.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/system.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/tools.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/int64.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/mt_support.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/data_list.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/container.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/factory.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/container.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/version.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/config_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/read_config.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/default_store.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/vacm.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/keytools.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/scapi.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/instance.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/scalar.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/watcher.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/null.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/old_api.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/read_only.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/serialize.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table_data.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table_container.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/table_array.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/mfd.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/snmp_mib_5_5.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/snmp_mib_5_5.lo: ./mibII/snmp_mib_5_5.h ./mibII/updates.h -./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/snmp_mib.lo: ../../include/net-snmp/definitions.h -./mibII/snmp_mib.lo: ../../include/net-snmp/types.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/oid.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/types.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/varbind_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/snmp_mib.lo: ../../include/net-snmp/pdu_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/asn1.h -./mibII/snmp_mib.lo: ../../include/net-snmp/output_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/snmp_mib.lo: ../../include/net-snmp/session_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/callback.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/mib.h -./mibII/snmp_mib.lo: ../../include/net-snmp/mib_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/parse.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/getopt.h -./mibII/snmp_mib.lo: ../../include/net-snmp/utilities.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/system.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/tools.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/int64.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/mt_support.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/data_list.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/container.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/factory.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/container.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/snmp_mib.lo: ../../include/net-snmp/version.h -./mibII/snmp_mib.lo: ../../include/net-snmp/config_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/read_config.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/default_store.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/vacm.h -./mibII/snmp_mib.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/keytools.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/scapi.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/snmp_mib.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/instance.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/scalar.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/watcher.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/null.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/old_api.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/read_only.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/serialize.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_data.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_container.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_array.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/mfd.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/snmp_mib.lo: ./mibII/snmp_mib.h ./mibII/updates.h -./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/sysORTable.lo: ../../include/net-snmp/definitions.h -./mibII/sysORTable.lo: ../../include/net-snmp/types.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/oid.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/types.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/varbind_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/sysORTable.lo: ../../include/net-snmp/pdu_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/asn1.h -./mibII/sysORTable.lo: ../../include/net-snmp/output_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/sysORTable.lo: ../../include/net-snmp/session_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/callback.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/mib.h -./mibII/sysORTable.lo: ../../include/net-snmp/mib_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/parse.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/getopt.h -./mibII/sysORTable.lo: ../../include/net-snmp/utilities.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/system.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/tools.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/int64.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/mt_support.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/data_list.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/container.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/factory.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/container.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/sysORTable.lo: ../../include/net-snmp/version.h -./mibII/sysORTable.lo: ../../include/net-snmp/config_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/read_config.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/default_store.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/vacm.h -./mibII/sysORTable.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/keytools.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/scapi.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/sysORTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/instance.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/scalar.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/watcher.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/null.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/old_api.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/read_only.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/serialize.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_data.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_container.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_array.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/mfd.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_sysORTable.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/sysORTable.lo: ./mibII/sysORTable.h -./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/system_mib.lo: ../../include/net-snmp/definitions.h -./mibII/system_mib.lo: ../../include/net-snmp/types.h -./mibII/system_mib.lo: ../../include/net-snmp/library/oid.h -./mibII/system_mib.lo: ../../include/net-snmp/library/types.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/system_mib.lo: ../../include/net-snmp/varbind_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/system_mib.lo: ../../include/net-snmp/pdu_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/asn1.h -./mibII/system_mib.lo: ../../include/net-snmp/output_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/system_mib.lo: ../../include/net-snmp/session_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/callback.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/system_mib.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/system_mib.lo: ../../include/net-snmp/library/mib.h -./mibII/system_mib.lo: ../../include/net-snmp/mib_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/parse.h -./mibII/system_mib.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/system_mib.lo: ../../include/net-snmp/library/getopt.h -./mibII/system_mib.lo: ../../include/net-snmp/utilities.h -./mibII/system_mib.lo: ../../include/net-snmp/library/system.h -./mibII/system_mib.lo: ../../include/net-snmp/library/tools.h -./mibII/system_mib.lo: ../../include/net-snmp/library/int64.h -./mibII/system_mib.lo: ../../include/net-snmp/library/mt_support.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/system_mib.lo: ../../include/net-snmp/library/data_list.h -./mibII/system_mib.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/system_mib.lo: ../../include/net-snmp/library/container.h -./mibII/system_mib.lo: ../../include/net-snmp/library/factory.h -./mibII/system_mib.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/system_mib.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/system_mib.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/system_mib.lo: ../../include/net-snmp/library/container.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/system_mib.lo: ../../include/net-snmp/version.h -./mibII/system_mib.lo: ../../include/net-snmp/config_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/read_config.h -./mibII/system_mib.lo: ../../include/net-snmp/library/default_store.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/system_mib.lo: ../../include/net-snmp/library/vacm.h -./mibII/system_mib.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/system_mib.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/system_mib.lo: ../../include/net-snmp/library/keytools.h -./mibII/system_mib.lo: ../../include/net-snmp/library/scapi.h -./mibII/system_mib.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/system_mib.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/system_mib.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/instance.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/scalar.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/watcher.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/null.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/old_api.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/read_only.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/serialize.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table_data.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table_container.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/table_array.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/mfd.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/system_mib.lo: util_funcs.h util_funcs/header_generic.h -./mibII/system_mib.lo: util_funcs/header_simple_table.h struct.h -./mibII/system_mib.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h -./mibII/system_mib.lo: ./mibII/system_mib.h ./mibII/updates.h -./mibII/tcp.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/tcp.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/tcp.lo: ./mibII/mibII_common.h -./mibII/tcp.lo: ../../agent/kernel.h -./mibII/tcp.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/tcp.lo: ../../include/net-snmp/definitions.h -./mibII/tcp.lo: ../../include/net-snmp/types.h -./mibII/tcp.lo: ../../include/net-snmp/library/oid.h -./mibII/tcp.lo: ../../include/net-snmp/library/types.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/tcp.lo: ../../include/net-snmp/varbind_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/tcp.lo: ../../include/net-snmp/pdu_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/asn1.h -./mibII/tcp.lo: ../../include/net-snmp/output_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/tcp.lo: ../../include/net-snmp/session_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/callback.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/tcp.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/tcp.lo: ../../include/net-snmp/library/mib.h -./mibII/tcp.lo: ../../include/net-snmp/mib_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/parse.h -./mibII/tcp.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/tcp.lo: ../../include/net-snmp/library/getopt.h -./mibII/tcp.lo: ../../include/net-snmp/utilities.h -./mibII/tcp.lo: ../../include/net-snmp/library/system.h -./mibII/tcp.lo: ../../include/net-snmp/library/tools.h -./mibII/tcp.lo: ../../include/net-snmp/library/int64.h -./mibII/tcp.lo: ../../include/net-snmp/library/mt_support.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/tcp.lo: ../../include/net-snmp/library/data_list.h -./mibII/tcp.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/tcp.lo: ../../include/net-snmp/library/container.h -./mibII/tcp.lo: ../../include/net-snmp/library/factory.h -./mibII/tcp.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/tcp.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/tcp.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/tcp.lo: ../../include/net-snmp/library/container.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/tcp.lo: ../../include/net-snmp/version.h -./mibII/tcp.lo: ../../include/net-snmp/config_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/read_config.h -./mibII/tcp.lo: ../../include/net-snmp/library/default_store.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/tcp.lo: ../../include/net-snmp/library/vacm.h -./mibII/tcp.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/tcp.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/tcp.lo: ../../include/net-snmp/library/keytools.h -./mibII/tcp.lo: ../../include/net-snmp/library/scapi.h -./mibII/tcp.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/tcp.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/tcp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/tcp.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/tcp.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/tcp.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/tcp.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/tcp.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/tcp.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/tcp.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/tcp.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/tcp.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/tcp.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/tcp.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/tcp.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/tcp.lo: ../../include/net-snmp/agent/instance.h -./mibII/tcp.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/tcp.lo: ../../include/net-snmp/agent/scalar.h -./mibII/tcp.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/tcp.lo: ../../include/net-snmp/agent/watcher.h -./mibII/tcp.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/tcp.lo: ../../include/net-snmp/agent/null.h -./mibII/tcp.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/tcp.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/tcp.lo: ../../include/net-snmp/agent/old_api.h -./mibII/tcp.lo: ../../include/net-snmp/agent/read_only.h -./mibII/tcp.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/tcp.lo: ../../include/net-snmp/agent/serialize.h -./mibII/tcp.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/tcp.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table_data.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table_container.h -./mibII/tcp.lo: ../../include/net-snmp/agent/table_array.h -./mibII/tcp.lo: ../../include/net-snmp/agent/mfd.h -./mibII/tcp.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/tcp.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/tcp.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/tcp.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/tcp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/tcp.h -./mibII/tcp.lo: ./mibII/tcpTable.h -./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/tcpTable.lo: ./mibII/mibII_common.h -./mibII/tcpTable.lo: ../../agent/kernel.h -./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/tcpTable.lo: ../../include/net-snmp/definitions.h -./mibII/tcpTable.lo: ../../include/net-snmp/types.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/oid.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/types.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/varbind_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/tcpTable.lo: ../../include/net-snmp/pdu_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/asn1.h -./mibII/tcpTable.lo: ../../include/net-snmp/output_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/tcpTable.lo: ../../include/net-snmp/session_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/callback.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/mib.h -./mibII/tcpTable.lo: ../../include/net-snmp/mib_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/parse.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/getopt.h -./mibII/tcpTable.lo: ../../include/net-snmp/utilities.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/system.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/tools.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/int64.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/mt_support.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/data_list.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/container.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/factory.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/container.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/tcpTable.lo: ../../include/net-snmp/version.h -./mibII/tcpTable.lo: ../../include/net-snmp/config_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/read_config.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/default_store.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/vacm.h -./mibII/tcpTable.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/keytools.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/scapi.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/tcpTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/instance.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/scalar.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/watcher.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/null.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/old_api.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/read_only.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/serialize.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_data.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_container.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_array.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/mfd.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/tcpTable.lo: ../../include/net-snmp/agent/auto_nlist.h ./mibII/tcp.h -./mibII/tcpTable.lo: ./mibII/tcpTable.h -./mibII/udp.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/udp.lo: ./mibII/mibII_common.h -./mibII/udp.lo: ../../agent/kernel.h -./mibII/udp.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/udp.lo: ../../include/net-snmp/definitions.h -./mibII/udp.lo: ../../include/net-snmp/types.h -./mibII/udp.lo: ../../include/net-snmp/library/oid.h -./mibII/udp.lo: ../../include/net-snmp/library/types.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/udp.lo: ../../include/net-snmp/varbind_api.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/udp.lo: ../../include/net-snmp/pdu_api.h -./mibII/udp.lo: ../../include/net-snmp/library/asn1.h -./mibII/udp.lo: ../../include/net-snmp/output_api.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/udp.lo: ../../include/net-snmp/session_api.h -./mibII/udp.lo: ../../include/net-snmp/library/callback.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/udp.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/udp.lo: ../../include/net-snmp/library/mib.h -./mibII/udp.lo: ../../include/net-snmp/mib_api.h -./mibII/udp.lo: ../../include/net-snmp/library/parse.h -./mibII/udp.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/udp.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/udp.lo: ../../include/net-snmp/library/getopt.h -./mibII/udp.lo: ../../include/net-snmp/utilities.h -./mibII/udp.lo: ../../include/net-snmp/library/system.h -./mibII/udp.lo: ../../include/net-snmp/library/tools.h -./mibII/udp.lo: ../../include/net-snmp/library/int64.h -./mibII/udp.lo: ../../include/net-snmp/library/mt_support.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/udp.lo: ../../include/net-snmp/library/data_list.h -./mibII/udp.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/udp.lo: ../../include/net-snmp/library/container.h -./mibII/udp.lo: ../../include/net-snmp/library/factory.h -./mibII/udp.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/udp.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/udp.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/udp.lo: ../../include/net-snmp/library/container.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/udp.lo: ../../include/net-snmp/version.h -./mibII/udp.lo: ../../include/net-snmp/config_api.h -./mibII/udp.lo: ../../include/net-snmp/library/read_config.h -./mibII/udp.lo: ../../include/net-snmp/library/default_store.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/udp.lo: ../../include/net-snmp/library/vacm.h -./mibII/udp.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/udp.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/udp.lo: ../../include/net-snmp/library/keytools.h -./mibII/udp.lo: ../../include/net-snmp/library/scapi.h -./mibII/udp.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/udp.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/udp.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/udp.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/udp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/udp.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/udp.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/udp.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/udp.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/udp.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/udp.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/udp.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/udp.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/udp.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/udp.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/udp.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/udp.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/udp.lo: ../../include/net-snmp/agent/instance.h -./mibII/udp.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/udp.lo: ../../include/net-snmp/agent/scalar.h -./mibII/udp.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/udp.lo: ../../include/net-snmp/agent/watcher.h -./mibII/udp.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/udp.lo: ../../include/net-snmp/agent/null.h -./mibII/udp.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/udp.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/udp.lo: ../../include/net-snmp/agent/old_api.h -./mibII/udp.lo: ../../include/net-snmp/agent/read_only.h -./mibII/udp.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/udp.lo: ../../include/net-snmp/agent/serialize.h -./mibII/udp.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/udp.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/udp.lo: ../../include/net-snmp/agent/table.h -./mibII/udp.lo: ../../include/net-snmp/agent/table_data.h -./mibII/udp.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/udp.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/udp.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/udp.lo: ../../include/net-snmp/agent/table_container.h -./mibII/udp.lo: ../../include/net-snmp/agent/table_array.h -./mibII/udp.lo: ../../include/net-snmp/agent/mfd.h -./mibII/udp.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/udp.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/udp.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/udp.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/udp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/udp.h -./mibII/udp.lo: ./mibII/udpTable.h -./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/udpTable.lo: ./mibII/mibII_common.h -./mibII/udpTable.lo: ../../agent/kernel.h -./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/udpTable.lo: ../../include/net-snmp/definitions.h -./mibII/udpTable.lo: ../../include/net-snmp/types.h -./mibII/udpTable.lo: ../../include/net-snmp/library/oid.h -./mibII/udpTable.lo: ../../include/net-snmp/library/types.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/udpTable.lo: ../../include/net-snmp/varbind_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/udpTable.lo: ../../include/net-snmp/pdu_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/asn1.h -./mibII/udpTable.lo: ../../include/net-snmp/output_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/udpTable.lo: ../../include/net-snmp/session_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/callback.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/udpTable.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/udpTable.lo: ../../include/net-snmp/library/mib.h -./mibII/udpTable.lo: ../../include/net-snmp/mib_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/parse.h -./mibII/udpTable.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/udpTable.lo: ../../include/net-snmp/library/getopt.h -./mibII/udpTable.lo: ../../include/net-snmp/utilities.h -./mibII/udpTable.lo: ../../include/net-snmp/library/system.h -./mibII/udpTable.lo: ../../include/net-snmp/library/tools.h -./mibII/udpTable.lo: ../../include/net-snmp/library/int64.h -./mibII/udpTable.lo: ../../include/net-snmp/library/mt_support.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/udpTable.lo: ../../include/net-snmp/library/data_list.h -./mibII/udpTable.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/udpTable.lo: ../../include/net-snmp/library/container.h -./mibII/udpTable.lo: ../../include/net-snmp/library/factory.h -./mibII/udpTable.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/udpTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/udpTable.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/udpTable.lo: ../../include/net-snmp/library/container.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/udpTable.lo: ../../include/net-snmp/version.h -./mibII/udpTable.lo: ../../include/net-snmp/config_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/read_config.h -./mibII/udpTable.lo: ../../include/net-snmp/library/default_store.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/udpTable.lo: ../../include/net-snmp/library/vacm.h -./mibII/udpTable.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/udpTable.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/udpTable.lo: ../../include/net-snmp/library/keytools.h -./mibII/udpTable.lo: ../../include/net-snmp/library/scapi.h -./mibII/udpTable.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/udpTable.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/udpTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/instance.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/scalar.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/watcher.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/null.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/old_api.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/read_only.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/serialize.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table_data.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table_container.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/table_array.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/mfd.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/udpTable.lo: ../../include/net-snmp/agent/auto_nlist.h ./mibII/udp.h -./mibII/udpTable.lo: ./mibII/udpTable.h -./mibII/updates.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/updates.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/updates.lo: ../../include/net-snmp/definitions.h -./mibII/updates.lo: ../../include/net-snmp/types.h -./mibII/updates.lo: ../../include/net-snmp/library/oid.h -./mibII/updates.lo: ../../include/net-snmp/library/types.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/updates.lo: ../../include/net-snmp/varbind_api.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/updates.lo: ../../include/net-snmp/pdu_api.h -./mibII/updates.lo: ../../include/net-snmp/library/asn1.h -./mibII/updates.lo: ../../include/net-snmp/output_api.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/updates.lo: ../../include/net-snmp/session_api.h -./mibII/updates.lo: ../../include/net-snmp/library/callback.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/updates.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/updates.lo: ../../include/net-snmp/library/mib.h -./mibII/updates.lo: ../../include/net-snmp/mib_api.h -./mibII/updates.lo: ../../include/net-snmp/library/parse.h -./mibII/updates.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/updates.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/updates.lo: ../../include/net-snmp/library/getopt.h -./mibII/updates.lo: ../../include/net-snmp/utilities.h -./mibII/updates.lo: ../../include/net-snmp/library/system.h -./mibII/updates.lo: ../../include/net-snmp/library/tools.h -./mibII/updates.lo: ../../include/net-snmp/library/int64.h -./mibII/updates.lo: ../../include/net-snmp/library/mt_support.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/updates.lo: ../../include/net-snmp/library/data_list.h -./mibII/updates.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/updates.lo: ../../include/net-snmp/library/container.h -./mibII/updates.lo: ../../include/net-snmp/library/factory.h -./mibII/updates.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/updates.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/updates.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/updates.lo: ../../include/net-snmp/library/container.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/updates.lo: ../../include/net-snmp/version.h -./mibII/updates.lo: ../../include/net-snmp/config_api.h -./mibII/updates.lo: ../../include/net-snmp/library/read_config.h -./mibII/updates.lo: ../../include/net-snmp/library/default_store.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/updates.lo: ../../include/net-snmp/library/vacm.h -./mibII/updates.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/updates.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/updates.lo: ../../include/net-snmp/library/keytools.h -./mibII/updates.lo: ../../include/net-snmp/library/scapi.h -./mibII/updates.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/updates.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/updates.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/updates.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/updates.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/updates.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/updates.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/updates.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/updates.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/updates.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/updates.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/updates.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/updates.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/updates.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/updates.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/updates.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/updates.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/updates.lo: ../../include/net-snmp/agent/instance.h -./mibII/updates.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/updates.lo: ../../include/net-snmp/agent/scalar.h -./mibII/updates.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/updates.lo: ../../include/net-snmp/agent/watcher.h -./mibII/updates.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/updates.lo: ../../include/net-snmp/agent/null.h -./mibII/updates.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/updates.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/updates.lo: ../../include/net-snmp/agent/old_api.h -./mibII/updates.lo: ../../include/net-snmp/agent/read_only.h -./mibII/updates.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/updates.lo: ../../include/net-snmp/agent/serialize.h -./mibII/updates.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/updates.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/updates.lo: ../../include/net-snmp/agent/table.h -./mibII/updates.lo: ../../include/net-snmp/agent/table_data.h -./mibII/updates.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/updates.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/updates.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/updates.lo: ../../include/net-snmp/agent/table_container.h -./mibII/updates.lo: ../../include/net-snmp/agent/table_array.h -./mibII/updates.lo: ../../include/net-snmp/agent/mfd.h -./mibII/updates.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/vacm_conf.lo: ../../include/net-snmp/definitions.h -./mibII/vacm_conf.lo: ../../include/net-snmp/types.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/oid.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/types.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/varbind_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/vacm_conf.lo: ../../include/net-snmp/pdu_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/asn1.h -./mibII/vacm_conf.lo: ../../include/net-snmp/output_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/vacm_conf.lo: ../../include/net-snmp/session_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/callback.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/mib.h -./mibII/vacm_conf.lo: ../../include/net-snmp/mib_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/parse.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/getopt.h -./mibII/vacm_conf.lo: ../../include/net-snmp/utilities.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/system.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/tools.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/int64.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/mt_support.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/data_list.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/container.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/factory.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/container.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/vacm_conf.lo: ../../include/net-snmp/version.h -./mibII/vacm_conf.lo: ../../include/net-snmp/config_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/read_config.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/default_store.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/vacm.h -./mibII/vacm_conf.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/keytools.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/scapi.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/vacm_conf.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/instance.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/scalar.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/watcher.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/null.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/old_api.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/read_only.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/serialize.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_data.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_container.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_array.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/mfd.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/vacm_conf.lo: ./mibII/vacm_conf.h ../../agent/snmpd.h -./mibII/vacm_context.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/vacm_context.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/vacm_context.lo: ../../include/net-snmp/definitions.h -./mibII/vacm_context.lo: ../../include/net-snmp/types.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/oid.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/types.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/varbind_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/vacm_context.lo: ../../include/net-snmp/pdu_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/asn1.h -./mibII/vacm_context.lo: ../../include/net-snmp/output_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/vacm_context.lo: ../../include/net-snmp/session_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/callback.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/mib.h -./mibII/vacm_context.lo: ../../include/net-snmp/mib_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/parse.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/vacm_context.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/getopt.h -./mibII/vacm_context.lo: ../../include/net-snmp/utilities.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/system.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/tools.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/int64.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/mt_support.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/data_list.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/container.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/factory.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/container.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/vacm_context.lo: ../../include/net-snmp/version.h -./mibII/vacm_context.lo: ../../include/net-snmp/config_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/read_config.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/default_store.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/vacm.h -./mibII/vacm_context.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/keytools.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/scapi.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/vacm_context.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/instance.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/scalar.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/watcher.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/null.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/old_api.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/read_only.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/serialize.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_data.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_container.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_array.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/mfd.h -./mibII/vacm_context.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/vacm_context.lo: ./mibII/vacm_context.h -./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/vacm_vars.lo: ../../include/net-snmp/definitions.h -./mibII/vacm_vars.lo: ../../include/net-snmp/types.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/oid.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/types.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/varbind_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/vacm_vars.lo: ../../include/net-snmp/pdu_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/asn1.h -./mibII/vacm_vars.lo: ../../include/net-snmp/output_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/vacm_vars.lo: ../../include/net-snmp/session_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/callback.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/mib.h -./mibII/vacm_vars.lo: ../../include/net-snmp/mib_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/parse.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/getopt.h -./mibII/vacm_vars.lo: ../../include/net-snmp/utilities.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/system.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/tools.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/int64.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/mt_support.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/data_list.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/container.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/factory.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/container.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/vacm_vars.lo: ../../include/net-snmp/version.h -./mibII/vacm_vars.lo: ../../include/net-snmp/config_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/read_config.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/default_store.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/vacm.h -./mibII/vacm_vars.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/keytools.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/scapi.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/vacm_vars.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/instance.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/scalar.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/watcher.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/null.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/old_api.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/read_only.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/serialize.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_data.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_container.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_array.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/mfd.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_callbacks.h -./mibII/vacm_vars.lo: ../../include/net-snmp/agent/sysORTable.h -./mibII/vacm_vars.lo: ./mibII/vacm_vars.h util_funcs/header_generic.h -./mibII/var_route.lo: ../../include/net-snmp/net-snmp-config.h -./mibII/var_route.lo: ../../include/net-snmp/net-snmp-features.h -./mibII/var_route.lo: ./mibII/route_headers.h -./mibII/var_route.lo: ../../include/net-snmp/net-snmp-includes.h -./mibII/var_route.lo: ../../include/net-snmp/definitions.h -./mibII/var_route.lo: ../../include/net-snmp/types.h -./mibII/var_route.lo: ../../include/net-snmp/library/oid.h -./mibII/var_route.lo: ../../include/net-snmp/library/types.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_api.h -./mibII/var_route.lo: ../../include/net-snmp/varbind_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_client.h -./mibII/var_route.lo: ../../include/net-snmp/pdu_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/asn1.h -./mibII/var_route.lo: ../../include/net-snmp/output_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_debug.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_logging.h -./mibII/var_route.lo: ../../include/net-snmp/session_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/callback.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_transport.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_service.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./mibII/var_route.lo: ../../include/net-snmp/library/ucd_compat.h -./mibII/var_route.lo: ../../include/net-snmp/library/mib.h -./mibII/var_route.lo: ../../include/net-snmp/mib_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/parse.h -./mibII/var_route.lo: ../../include/net-snmp/library/oid_stash.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_impl.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp-tc.h -./mibII/var_route.lo: ../../include/net-snmp/library/getopt.h -./mibII/var_route.lo: ../../include/net-snmp/utilities.h -./mibII/var_route.lo: ../../include/net-snmp/library/system.h -./mibII/var_route.lo: ../../include/net-snmp/library/tools.h -./mibII/var_route.lo: ../../include/net-snmp/library/int64.h -./mibII/var_route.lo: ../../include/net-snmp/library/mt_support.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_alarm.h -./mibII/var_route.lo: ../../include/net-snmp/library/data_list.h -./mibII/var_route.lo: ../../include/net-snmp/library/check_varbind.h -./mibII/var_route.lo: ../../include/net-snmp/library/container.h -./mibII/var_route.lo: ../../include/net-snmp/library/factory.h -./mibII/var_route.lo: ../../include/net-snmp/library/container_binary_array.h -./mibII/var_route.lo: ../../include/net-snmp/library/container_list_ssll.h -./mibII/var_route.lo: ../../include/net-snmp/library/container_iterator.h -./mibII/var_route.lo: ../../include/net-snmp/library/container.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_assert.h -./mibII/var_route.lo: ../../include/net-snmp/version.h -./mibII/var_route.lo: ../../include/net-snmp/config_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/read_config.h -./mibII/var_route.lo: ../../include/net-snmp/library/default_store.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_parse_args.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_enum.h -./mibII/var_route.lo: ../../include/net-snmp/library/vacm.h -./mibII/var_route.lo: ../../include/net-snmp/snmpv3_api.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpv3.h -./mibII/var_route.lo: ../../include/net-snmp/library/transform_oids.h -./mibII/var_route.lo: ../../include/net-snmp/library/keytools.h -./mibII/var_route.lo: ../../include/net-snmp/library/scapi.h -./mibII/var_route.lo: ../../include/net-snmp/library/lcd_time.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmp_secmod.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmptsm.h -./mibII/var_route.lo: ../../include/net-snmp/library/snmpusm.h -./mibII/var_route.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./mibII/var_route.lo: ../../include/net-snmp/agent/mib_module_config.h -./mibII/var_route.lo: ../../include/net-snmp/agent/agent_module_config.h -./mibII/var_route.lo: ../../include/net-snmp/agent/snmp_agent.h -./mibII/var_route.lo: ../../include/net-snmp/agent/snmp_vars.h -./mibII/var_route.lo: ../../include/net-snmp/agent/agent_handler.h -./mibII/var_route.lo: ../../include/net-snmp/agent/var_struct.h -./mibII/var_route.lo: ../../include/net-snmp/agent/agent_registry.h -./mibII/var_route.lo: ../../include/net-snmp/library/fd_event_manager.h -./mibII/var_route.lo: ../../include/net-snmp/agent/ds_agent.h -./mibII/var_route.lo: ../../include/net-snmp/agent/agent_read_config.h -./mibII/var_route.lo: ../../include/net-snmp/agent/agent_trap.h -./mibII/var_route.lo: ../../include/net-snmp/agent/all_helpers.h -./mibII/var_route.lo: ../../include/net-snmp/agent/instance.h -./mibII/var_route.lo: ../../include/net-snmp/agent/baby_steps.h -./mibII/var_route.lo: ../../include/net-snmp/agent/scalar.h -./mibII/var_route.lo: ../../include/net-snmp/agent/scalar_group.h -./mibII/var_route.lo: ../../include/net-snmp/agent/watcher.h -./mibII/var_route.lo: ../../include/net-snmp/agent/multiplexer.h -./mibII/var_route.lo: ../../include/net-snmp/agent/null.h -./mibII/var_route.lo: ../../include/net-snmp/agent/debug_handler.h -./mibII/var_route.lo: ../../include/net-snmp/agent/cache_handler.h -./mibII/var_route.lo: ../../include/net-snmp/agent/old_api.h -./mibII/var_route.lo: ../../include/net-snmp/agent/read_only.h -./mibII/var_route.lo: ../../include/net-snmp/agent/row_merge.h -./mibII/var_route.lo: ../../include/net-snmp/agent/serialize.h -./mibII/var_route.lo: ../../include/net-snmp/agent/bulk_to_next.h -./mibII/var_route.lo: ../../include/net-snmp/agent/mode_end_call.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table_data.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table_dataset.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table_tdata.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table_iterator.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table_container.h -./mibII/var_route.lo: ../../include/net-snmp/agent/table_array.h -./mibII/var_route.lo: ../../include/net-snmp/agent/mfd.h -./mibII/var_route.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./mibII/var_route.lo: ../../include/net-snmp/agent/auto_nlist.h -./mibII/var_route.lo: ../../include/net-snmp/data_access/interface.h -./mibII/var_route.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h -./mibII/var_route.lo: ./mibII/at.h ../../agent/kernel.h ./mibII/interfaces.h -./mibII/var_route.lo: struct.h util_funcs.h util_funcs/header_generic.h -./mibII/var_route.lo: util_funcs/header_simple_table.h -./mibII/var_route.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h -./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-config.h -./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-includes.h -./misc/ipfwacc.lo: ../../include/net-snmp/definitions.h -./misc/ipfwacc.lo: ../../include/net-snmp/types.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/oid.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/types.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/varbind_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_client.h -./misc/ipfwacc.lo: ../../include/net-snmp/pdu_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/asn1.h -./misc/ipfwacc.lo: ../../include/net-snmp/output_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_debug.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_logging.h -./misc/ipfwacc.lo: ../../include/net-snmp/session_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/callback.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_transport.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_service.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/ucd_compat.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/mib.h -./misc/ipfwacc.lo: ../../include/net-snmp/mib_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/parse.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/oid_stash.h -./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-features.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_impl.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp-tc.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/getopt.h -./misc/ipfwacc.lo: ../../include/net-snmp/utilities.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/system.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/tools.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/int64.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/mt_support.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_alarm.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/data_list.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/check_varbind.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/container.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/factory.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/container_binary_array.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/container_list_ssll.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/container_iterator.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/container.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_assert.h -./misc/ipfwacc.lo: ../../include/net-snmp/version.h -./misc/ipfwacc.lo: ../../include/net-snmp/config_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/read_config.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/default_store.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_parse_args.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_enum.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/vacm.h -./misc/ipfwacc.lo: ../../include/net-snmp/snmpv3_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpv3.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/transform_oids.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/keytools.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/scapi.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/lcd_time.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_secmod.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmptsm.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpusm.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/mib_module_config.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_module_config.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/snmp_agent.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/snmp_vars.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_handler.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/var_struct.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_registry.h -./misc/ipfwacc.lo: ../../include/net-snmp/library/fd_event_manager.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/ds_agent.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_read_config.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_trap.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/all_helpers.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/instance.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/baby_steps.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/scalar.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/scalar_group.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/watcher.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/multiplexer.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/null.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/debug_handler.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/cache_handler.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/old_api.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/read_only.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/row_merge.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/serialize.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/bulk_to_next.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/mode_end_call.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_data.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_dataset.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_tdata.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_iterator.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_container.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_array.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/mfd.h -./misc/ipfwacc.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./misc/ipfwacc.lo: util_funcs/header_simple_table.h ./misc/ipfwacc.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/net-snmp-config.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/net-snmp-features.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/net-snmp-includes.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/definitions.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/types.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/oid.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/types.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/varbind_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_client.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/pdu_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/asn1.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/output_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_debug.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_logging.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/session_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/callback.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_transport.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_service.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/ucd_compat.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/mib.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/mib_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/parse.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/oid_stash.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_impl.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp-tc.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/getopt.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/utilities.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/system.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/tools.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/int64.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/mt_support.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_alarm.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/data_list.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/check_varbind.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/factory.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container_binary_array.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container_list_ssll.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container_iterator.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_assert.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/version.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/config_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/read_config.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/default_store.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_parse_args.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_enum.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/vacm.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/snmpv3_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpv3.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/transform_oids.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/keytools.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/scapi.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/lcd_time.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_secmod.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmptsm.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpusm.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/mib_module_config.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_module_config.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/snmp_agent.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/snmp_vars.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_handler.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/var_struct.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_registry.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/fd_event_manager.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/ds_agent.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_read_config.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_trap.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/all_helpers.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/instance.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/baby_steps.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/scalar.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/scalar_group.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/watcher.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/multiplexer.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/null.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/debug_handler.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/cache_handler.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/old_api.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/read_only.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/row_merge.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/serialize.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/bulk_to_next.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/mode_end_call.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_data.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_dataset.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_tdata.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_iterator.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_container.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_array.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/mfd.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/sysORTable.h -./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_callbacks.h -./notification-log-mib/notification_log.lo: ./notification-log-mib/notification_log.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/net-snmp-config.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/net-snmp-features.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/net-snmp-includes.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/definitions.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/types.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/oid.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/types.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/varbind_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_client.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/pdu_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/asn1.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/output_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_debug.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_logging.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/session_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/callback.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_transport.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_service.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/ucd_compat.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/mib.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/mib_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/parse.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/oid_stash.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_impl.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp-tc.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/getopt.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/utilities.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/system.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/tools.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/int64.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/mt_support.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/data_list.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/check_varbind.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/factory.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container_binary_array.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container_iterator.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_assert.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/version.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/config_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/read_config.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/default_store.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_enum.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/vacm.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/snmpv3_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpv3.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/transform_oids.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/keytools.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/scapi.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/lcd_time.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmptsm.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpusm.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_handler.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/var_struct.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_registry.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/ds_agent.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_trap.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/all_helpers.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/instance.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/baby_steps.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/scalar.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/scalar_group.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/watcher.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/multiplexer.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/null.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/debug_handler.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/cache_handler.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/old_api.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/read_only.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/row_merge.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/serialize.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_data.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_dataset.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_tdata.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_iterator.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_container.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_array.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/mfd.h -./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./notification/snmpNotifyFilterProfileTable.lo: header_complex.h -./notification/snmpNotifyFilterProfileTable.lo: ./notification/snmpNotifyFilterProfileTable.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/net-snmp-config.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/net-snmp-features.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/net-snmp-includes.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/definitions.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/types.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/oid.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/types.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/varbind_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_client.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/pdu_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/asn1.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/output_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_debug.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_logging.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/session_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/callback.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_transport.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_service.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/ucd_compat.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/mib.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/mib_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/parse.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/oid_stash.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_impl.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp-tc.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/getopt.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/utilities.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/system.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/tools.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/int64.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/mt_support.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_alarm.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/data_list.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/check_varbind.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/factory.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container_binary_array.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container_list_ssll.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container_iterator.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_assert.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/version.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/config_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/read_config.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/default_store.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_parse_args.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_enum.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/vacm.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/snmpv3_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpv3.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/transform_oids.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/keytools.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/scapi.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/lcd_time.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_secmod.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmptsm.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpusm.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/mib_module_config.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_module_config.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/snmp_agent.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/snmp_vars.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_handler.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/var_struct.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_registry.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/fd_event_manager.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/ds_agent.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_read_config.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_trap.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/all_helpers.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/instance.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/baby_steps.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/scalar.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/scalar_group.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/watcher.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/multiplexer.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/null.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/debug_handler.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/cache_handler.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/old_api.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/read_only.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/row_merge.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/serialize.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/bulk_to_next.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/mode_end_call.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_data.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_dataset.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_tdata.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_iterator.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_container.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_array.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/mfd.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./notification/snmpNotifyTable.lo: header_complex.h -./notification/snmpNotifyTable.lo: ./notification/snmpNotifyTable.h -./notification/snmpNotifyTable.lo: ./notification/snmpNotifyFilterProfileTable.h -./notification/snmpNotifyTable.lo: target/snmpTargetParamsEntry.h -./notification/snmpNotifyTable.lo: target/snmpTargetAddrEntry.h -./notification/snmpNotifyTable.lo: target/target.h -./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h -./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h -./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h -./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h -./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_callbacks.h -./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/sysORTable.h -./notification/snmpNotifyTable.lo: notification-log-mib/notification_log.h ./Rmon/agutil.lo: ../../include/net-snmp/net-snmp-config.h ./Rmon/agutil.lo: ../../include/net-snmp/net-snmp-includes.h ./Rmon/agutil.lo: ../../include/net-snmp/definitions.h @@ -9199,6 +355,7 @@ ./Rmon/agutil.lo: ../../include/net-snmp/pdu_api.h ./Rmon/agutil.lo: ../../include/net-snmp/library/asn1.h ./Rmon/agutil.lo: ../../include/net-snmp/output_api.h +./Rmon/agutil.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/agutil.lo: ../../include/net-snmp/session_api.h @@ -9216,6 +373,7 @@ ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/agutil.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/agutil.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/agutil.lo: ../../include/net-snmp/library/mib.h ./Rmon/agutil.lo: ../../include/net-snmp/mib_api.h @@ -9235,7 +393,6 @@ ./Rmon/agutil.lo: ../../include/net-snmp/library/data_list.h ./Rmon/agutil.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/agutil.lo: ../../include/net-snmp/library/container.h -./Rmon/agutil.lo: ../../include/net-snmp/library/factory.h ./Rmon/agutil.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/agutil.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/agutil.lo: ../../include/net-snmp/library/container_iterator.h @@ -9256,8 +413,8 @@ ./Rmon/agutil.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/agutil.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/agutil.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/agutil.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/agutil.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/agutil.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/agutil.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9308,6 +465,7 @@ ./Rmon/alarm.lo: ../../include/net-snmp/pdu_api.h ./Rmon/alarm.lo: ../../include/net-snmp/library/asn1.h ./Rmon/alarm.lo: ../../include/net-snmp/output_api.h +./Rmon/alarm.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/alarm.lo: ../../include/net-snmp/session_api.h @@ -9325,6 +483,7 @@ ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/alarm.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/alarm.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/alarm.lo: ../../include/net-snmp/library/mib.h ./Rmon/alarm.lo: ../../include/net-snmp/mib_api.h @@ -9344,7 +503,6 @@ ./Rmon/alarm.lo: ../../include/net-snmp/library/data_list.h ./Rmon/alarm.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/alarm.lo: ../../include/net-snmp/library/container.h -./Rmon/alarm.lo: ../../include/net-snmp/library/factory.h ./Rmon/alarm.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/alarm.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/alarm.lo: ../../include/net-snmp/library/container_iterator.h @@ -9365,8 +523,8 @@ ./Rmon/alarm.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/alarm.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/alarm.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/alarm.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/alarm.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/alarm.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/alarm.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9404,7 +562,8 @@ ./Rmon/alarm.lo: ../../include/net-snmp/agent/table_array.h ./Rmon/alarm.lo: ../../include/net-snmp/agent/mfd.h ./Rmon/alarm.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./Rmon/alarm.lo: ./Rmon/alarm.h ./Rmon/agutil_api.h ./Rmon/row_api.h +./Rmon/alarm.lo: ./Rmon/alarm.h ./Rmon/event.h ./Rmon/agutil_api.h +./Rmon/alarm.lo: ./Rmon/row_api.h ./Rmon/alarmTable.lo: ../../include/net-snmp/net-snmp-config.h ./Rmon/alarmTable.lo: ../../include/net-snmp/net-snmp-features.h ./Rmon/alarmTable.lo: ../../include/net-snmp/net-snmp-includes.h @@ -9418,6 +577,7 @@ ./Rmon/alarmTable.lo: ../../include/net-snmp/pdu_api.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/asn1.h ./Rmon/alarmTable.lo: ../../include/net-snmp/output_api.h +./Rmon/alarmTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/alarmTable.lo: ../../include/net-snmp/session_api.h @@ -9435,6 +595,7 @@ ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/mib.h ./Rmon/alarmTable.lo: ../../include/net-snmp/mib_api.h @@ -9453,7 +614,6 @@ ./Rmon/alarmTable.lo: ../../include/net-snmp/library/data_list.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/container.h -./Rmon/alarmTable.lo: ../../include/net-snmp/library/factory.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -9474,8 +634,8 @@ ./Rmon/alarmTable.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/alarmTable.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/alarmTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/alarmTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/alarmTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9513,7 +673,7 @@ ./Rmon/alarmTable.lo: ../../include/net-snmp/agent/table_array.h ./Rmon/alarmTable.lo: ../../include/net-snmp/agent/mfd.h ./Rmon/alarmTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./Rmon/alarmTable.lo: utilities/iquery.h ./Rmon/alarmTable.h +./Rmon/alarmTable.lo: utilities/iquery.h ./Rmon/alarmTable.h ./Rmon/event.h ./Rmon/event.lo: ../../include/net-snmp/net-snmp-config.h ./Rmon/event.lo: ../../include/net-snmp/net-snmp-features.h ./Rmon/event.lo: ../../include/net-snmp/net-snmp-includes.h @@ -9527,6 +687,7 @@ ./Rmon/event.lo: ../../include/net-snmp/pdu_api.h ./Rmon/event.lo: ../../include/net-snmp/library/asn1.h ./Rmon/event.lo: ../../include/net-snmp/output_api.h +./Rmon/event.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/event.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/event.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/event.lo: ../../include/net-snmp/session_api.h @@ -9544,6 +705,7 @@ ./Rmon/event.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/event.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/event.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/event.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/event.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/event.lo: ../../include/net-snmp/library/mib.h ./Rmon/event.lo: ../../include/net-snmp/mib_api.h @@ -9562,7 +724,6 @@ ./Rmon/event.lo: ../../include/net-snmp/library/data_list.h ./Rmon/event.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/event.lo: ../../include/net-snmp/library/container.h -./Rmon/event.lo: ../../include/net-snmp/library/factory.h ./Rmon/event.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/event.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/event.lo: ../../include/net-snmp/library/container_iterator.h @@ -9583,8 +744,8 @@ ./Rmon/event.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/event.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/event.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/event.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/event.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/event.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/event.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/event.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/event.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9635,6 +796,7 @@ ./Rmon/history.lo: ../../include/net-snmp/pdu_api.h ./Rmon/history.lo: ../../include/net-snmp/library/asn1.h ./Rmon/history.lo: ../../include/net-snmp/output_api.h +./Rmon/history.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/history.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/history.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/history.lo: ../../include/net-snmp/session_api.h @@ -9652,6 +814,7 @@ ./Rmon/history.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/history.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/history.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/history.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/history.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/history.lo: ../../include/net-snmp/library/mib.h ./Rmon/history.lo: ../../include/net-snmp/mib_api.h @@ -9671,7 +834,6 @@ ./Rmon/history.lo: ../../include/net-snmp/library/data_list.h ./Rmon/history.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/history.lo: ../../include/net-snmp/library/container.h -./Rmon/history.lo: ../../include/net-snmp/library/factory.h ./Rmon/history.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/history.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/history.lo: ../../include/net-snmp/library/container_iterator.h @@ -9692,8 +854,8 @@ ./Rmon/history.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/history.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/history.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/history.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/history.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/history.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/history.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/history.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/history.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9744,6 +906,7 @@ ./Rmon/rows.lo: ../../include/net-snmp/pdu_api.h ./Rmon/rows.lo: ../../include/net-snmp/library/asn1.h ./Rmon/rows.lo: ../../include/net-snmp/output_api.h +./Rmon/rows.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/rows.lo: ../../include/net-snmp/session_api.h @@ -9761,6 +924,7 @@ ./Rmon/rows.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/rows.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/rows.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/rows.lo: ../../include/net-snmp/library/mib.h ./Rmon/rows.lo: ../../include/net-snmp/mib_api.h @@ -9780,7 +944,6 @@ ./Rmon/rows.lo: ../../include/net-snmp/library/data_list.h ./Rmon/rows.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/rows.lo: ../../include/net-snmp/library/container.h -./Rmon/rows.lo: ../../include/net-snmp/library/factory.h ./Rmon/rows.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/rows.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/rows.lo: ../../include/net-snmp/library/container_iterator.h @@ -9801,8 +964,8 @@ ./Rmon/rows.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/rows.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/rows.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/rows.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/rows.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/rows.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/rows.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9853,6 +1016,7 @@ ./Rmon/statistics.lo: ../../include/net-snmp/pdu_api.h ./Rmon/statistics.lo: ../../include/net-snmp/library/asn1.h ./Rmon/statistics.lo: ../../include/net-snmp/output_api.h +./Rmon/statistics.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmp_debug.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmp_logging.h ./Rmon/statistics.lo: ../../include/net-snmp/session_api.h @@ -9870,6 +1034,7 @@ ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./Rmon/statistics.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./Rmon/statistics.lo: ../../include/net-snmp/library/ucd_compat.h ./Rmon/statistics.lo: ../../include/net-snmp/library/mib.h ./Rmon/statistics.lo: ../../include/net-snmp/mib_api.h @@ -9889,7 +1054,6 @@ ./Rmon/statistics.lo: ../../include/net-snmp/library/data_list.h ./Rmon/statistics.lo: ../../include/net-snmp/library/check_varbind.h ./Rmon/statistics.lo: ../../include/net-snmp/library/container.h -./Rmon/statistics.lo: ../../include/net-snmp/library/factory.h ./Rmon/statistics.lo: ../../include/net-snmp/library/container_binary_array.h ./Rmon/statistics.lo: ../../include/net-snmp/library/container_list_ssll.h ./Rmon/statistics.lo: ../../include/net-snmp/library/container_iterator.h @@ -9910,8 +1074,8 @@ ./Rmon/statistics.lo: ../../include/net-snmp/library/lcd_time.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmp_secmod.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./Rmon/statistics.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/statistics.lo: ../../include/net-snmp/library/snmpusm.h +./Rmon/statistics.lo: ../../include/net-snmp/library/snmptsm.h ./Rmon/statistics.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./Rmon/statistics.lo: ../../include/net-snmp/agent/mib_module_config.h ./Rmon/statistics.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -9951,6 +1115,9072 @@ ./Rmon/statistics.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./Rmon/statistics.lo: ./Rmon/statistics.h ./Rmon/agutil_api.h ./Rmon/statistics.lo: ./Rmon/row_api.h +./agent/extend.lo: ../../include/net-snmp/net-snmp-config.h +./agent/extend.lo: ../../include/net-snmp/net-snmp-features.h +./agent/extend.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/extend.lo: ../../include/net-snmp/definitions.h +./agent/extend.lo: ../../include/net-snmp/types.h +./agent/extend.lo: ../../include/net-snmp/library/oid.h +./agent/extend.lo: ../../include/net-snmp/library/types.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_api.h +./agent/extend.lo: ../../include/net-snmp/varbind_api.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_client.h +./agent/extend.lo: ../../include/net-snmp/pdu_api.h +./agent/extend.lo: ../../include/net-snmp/library/asn1.h +./agent/extend.lo: ../../include/net-snmp/output_api.h +./agent/extend.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/extend.lo: ../../include/net-snmp/session_api.h +./agent/extend.lo: ../../include/net-snmp/library/callback.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_service.h +./agent/extend.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/extend.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/extend.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/extend.lo: ../../include/net-snmp/library/mib.h +./agent/extend.lo: ../../include/net-snmp/mib_api.h +./agent/extend.lo: ../../include/net-snmp/library/parse.h +./agent/extend.lo: ../../include/net-snmp/library/oid_stash.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/extend.lo: ../../include/net-snmp/library/snmp.h +./agent/extend.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/extend.lo: ../../include/net-snmp/library/getopt.h +./agent/extend.lo: ../../include/net-snmp/utilities.h +./agent/extend.lo: ../../include/net-snmp/library/system.h +./agent/extend.lo: ../../include/net-snmp/library/tools.h +./agent/extend.lo: ../../include/net-snmp/library/int64.h +./agent/extend.lo: ../../include/net-snmp/library/mt_support.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/extend.lo: ../../include/net-snmp/library/data_list.h +./agent/extend.lo: ../../include/net-snmp/library/check_varbind.h +./agent/extend.lo: ../../include/net-snmp/library/container.h +./agent/extend.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/extend.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/extend.lo: ../../include/net-snmp/library/container_iterator.h +./agent/extend.lo: ../../include/net-snmp/library/container.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/extend.lo: ../../include/net-snmp/version.h +./agent/extend.lo: ../../include/net-snmp/config_api.h +./agent/extend.lo: ../../include/net-snmp/library/read_config.h +./agent/extend.lo: ../../include/net-snmp/library/default_store.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/extend.lo: ../../include/net-snmp/library/vacm.h +./agent/extend.lo: ../../include/net-snmp/snmpv3_api.h +./agent/extend.lo: ../../include/net-snmp/library/snmpv3.h +./agent/extend.lo: ../../include/net-snmp/library/transform_oids.h +./agent/extend.lo: ../../include/net-snmp/library/keytools.h +./agent/extend.lo: ../../include/net-snmp/library/scapi.h +./agent/extend.lo: ../../include/net-snmp/library/lcd_time.h +./agent/extend.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/extend.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/extend.lo: ../../include/net-snmp/library/snmpusm.h +./agent/extend.lo: ../../include/net-snmp/library/snmptsm.h +./agent/extend.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/extend.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/extend.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/extend.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/extend.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/extend.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/extend.lo: ../../include/net-snmp/agent/var_struct.h +./agent/extend.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/extend.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/extend.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/extend.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/extend.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/extend.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/extend.lo: ../../include/net-snmp/agent/instance.h +./agent/extend.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/extend.lo: ../../include/net-snmp/agent/scalar.h +./agent/extend.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/extend.lo: ../../include/net-snmp/agent/watcher.h +./agent/extend.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/extend.lo: ../../include/net-snmp/agent/null.h +./agent/extend.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/extend.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/extend.lo: ../../include/net-snmp/agent/old_api.h +./agent/extend.lo: ../../include/net-snmp/agent/read_only.h +./agent/extend.lo: ../../include/net-snmp/agent/row_merge.h +./agent/extend.lo: ../../include/net-snmp/agent/serialize.h +./agent/extend.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/extend.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/extend.lo: ../../include/net-snmp/agent/table.h +./agent/extend.lo: ../../include/net-snmp/agent/table_data.h +./agent/extend.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/extend.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/extend.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/extend.lo: ../../include/net-snmp/agent/table_container.h +./agent/extend.lo: ../../include/net-snmp/agent/table_array.h +./agent/extend.lo: ../../include/net-snmp/agent/mfd.h +./agent/extend.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/extend.lo: ../../include/net-snmp/agent/agent_callbacks.h +./agent/extend.lo: agent/extend.h utilities/execute.h struct.h +./agent/nsCache.lo: ../../include/net-snmp/net-snmp-config.h +./agent/nsCache.lo: ../../include/net-snmp/net-snmp-features.h +./agent/nsCache.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/nsCache.lo: ../../include/net-snmp/definitions.h +./agent/nsCache.lo: ../../include/net-snmp/types.h +./agent/nsCache.lo: ../../include/net-snmp/library/oid.h +./agent/nsCache.lo: ../../include/net-snmp/library/types.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_api.h +./agent/nsCache.lo: ../../include/net-snmp/varbind_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_client.h +./agent/nsCache.lo: ../../include/net-snmp/pdu_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/asn1.h +./agent/nsCache.lo: ../../include/net-snmp/output_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/nsCache.lo: ../../include/net-snmp/session_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/callback.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_service.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/nsCache.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/nsCache.lo: ../../include/net-snmp/library/mib.h +./agent/nsCache.lo: ../../include/net-snmp/mib_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/parse.h +./agent/nsCache.lo: ../../include/net-snmp/library/oid_stash.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/nsCache.lo: ../../include/net-snmp/library/getopt.h +./agent/nsCache.lo: ../../include/net-snmp/utilities.h +./agent/nsCache.lo: ../../include/net-snmp/library/system.h +./agent/nsCache.lo: ../../include/net-snmp/library/tools.h +./agent/nsCache.lo: ../../include/net-snmp/library/int64.h +./agent/nsCache.lo: ../../include/net-snmp/library/mt_support.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/nsCache.lo: ../../include/net-snmp/library/data_list.h +./agent/nsCache.lo: ../../include/net-snmp/library/check_varbind.h +./agent/nsCache.lo: ../../include/net-snmp/library/container.h +./agent/nsCache.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/nsCache.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/nsCache.lo: ../../include/net-snmp/library/container_iterator.h +./agent/nsCache.lo: ../../include/net-snmp/library/container.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/nsCache.lo: ../../include/net-snmp/version.h +./agent/nsCache.lo: ../../include/net-snmp/config_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/read_config.h +./agent/nsCache.lo: ../../include/net-snmp/library/default_store.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/nsCache.lo: ../../include/net-snmp/library/vacm.h +./agent/nsCache.lo: ../../include/net-snmp/snmpv3_api.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpv3.h +./agent/nsCache.lo: ../../include/net-snmp/library/transform_oids.h +./agent/nsCache.lo: ../../include/net-snmp/library/keytools.h +./agent/nsCache.lo: ../../include/net-snmp/library/scapi.h +./agent/nsCache.lo: ../../include/net-snmp/library/lcd_time.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmpusm.h +./agent/nsCache.lo: ../../include/net-snmp/library/snmptsm.h +./agent/nsCache.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/nsCache.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/nsCache.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/nsCache.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/nsCache.lo: ../../include/net-snmp/agent/var_struct.h +./agent/nsCache.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/nsCache.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/nsCache.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/nsCache.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/nsCache.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/nsCache.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/nsCache.lo: ../../include/net-snmp/agent/instance.h +./agent/nsCache.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/nsCache.lo: ../../include/net-snmp/agent/scalar.h +./agent/nsCache.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/nsCache.lo: ../../include/net-snmp/agent/watcher.h +./agent/nsCache.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/nsCache.lo: ../../include/net-snmp/agent/null.h +./agent/nsCache.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/nsCache.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/nsCache.lo: ../../include/net-snmp/agent/old_api.h +./agent/nsCache.lo: ../../include/net-snmp/agent/read_only.h +./agent/nsCache.lo: ../../include/net-snmp/agent/row_merge.h +./agent/nsCache.lo: ../../include/net-snmp/agent/serialize.h +./agent/nsCache.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/nsCache.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table_data.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table_container.h +./agent/nsCache.lo: ../../include/net-snmp/agent/table_array.h +./agent/nsCache.lo: ../../include/net-snmp/agent/mfd.h +./agent/nsCache.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/nsCache.lo: agent/nsCache.h +./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-config.h +./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/nsDebug.lo: ../../include/net-snmp/definitions.h +./agent/nsDebug.lo: ../../include/net-snmp/types.h +./agent/nsDebug.lo: ../../include/net-snmp/library/oid.h +./agent/nsDebug.lo: ../../include/net-snmp/library/types.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_api.h +./agent/nsDebug.lo: ../../include/net-snmp/varbind_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_client.h +./agent/nsDebug.lo: ../../include/net-snmp/pdu_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/asn1.h +./agent/nsDebug.lo: ../../include/net-snmp/output_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/nsDebug.lo: ../../include/net-snmp/session_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/callback.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_service.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/nsDebug.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/nsDebug.lo: ../../include/net-snmp/library/mib.h +./agent/nsDebug.lo: ../../include/net-snmp/mib_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/parse.h +./agent/nsDebug.lo: ../../include/net-snmp/library/oid_stash.h +./agent/nsDebug.lo: ../../include/net-snmp/net-snmp-features.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/nsDebug.lo: ../../include/net-snmp/library/getopt.h +./agent/nsDebug.lo: ../../include/net-snmp/utilities.h +./agent/nsDebug.lo: ../../include/net-snmp/library/system.h +./agent/nsDebug.lo: ../../include/net-snmp/library/tools.h +./agent/nsDebug.lo: ../../include/net-snmp/library/int64.h +./agent/nsDebug.lo: ../../include/net-snmp/library/mt_support.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/nsDebug.lo: ../../include/net-snmp/library/data_list.h +./agent/nsDebug.lo: ../../include/net-snmp/library/check_varbind.h +./agent/nsDebug.lo: ../../include/net-snmp/library/container.h +./agent/nsDebug.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/nsDebug.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/nsDebug.lo: ../../include/net-snmp/library/container_iterator.h +./agent/nsDebug.lo: ../../include/net-snmp/library/container.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/nsDebug.lo: ../../include/net-snmp/version.h +./agent/nsDebug.lo: ../../include/net-snmp/config_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/read_config.h +./agent/nsDebug.lo: ../../include/net-snmp/library/default_store.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/nsDebug.lo: ../../include/net-snmp/library/vacm.h +./agent/nsDebug.lo: ../../include/net-snmp/snmpv3_api.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpv3.h +./agent/nsDebug.lo: ../../include/net-snmp/library/transform_oids.h +./agent/nsDebug.lo: ../../include/net-snmp/library/keytools.h +./agent/nsDebug.lo: ../../include/net-snmp/library/scapi.h +./agent/nsDebug.lo: ../../include/net-snmp/library/lcd_time.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmpusm.h +./agent/nsDebug.lo: ../../include/net-snmp/library/snmptsm.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/var_struct.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/nsDebug.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/instance.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/scalar.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/watcher.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/null.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/old_api.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/read_only.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/row_merge.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/serialize.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table_data.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table_container.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/table_array.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/mfd.h +./agent/nsDebug.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/nsDebug.lo: agent/nsDebug.h +./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-config.h +./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-features.h +./agent/nsLogging.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/nsLogging.lo: ../../include/net-snmp/definitions.h +./agent/nsLogging.lo: ../../include/net-snmp/types.h +./agent/nsLogging.lo: ../../include/net-snmp/library/oid.h +./agent/nsLogging.lo: ../../include/net-snmp/library/types.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_api.h +./agent/nsLogging.lo: ../../include/net-snmp/varbind_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_client.h +./agent/nsLogging.lo: ../../include/net-snmp/pdu_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/asn1.h +./agent/nsLogging.lo: ../../include/net-snmp/output_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/nsLogging.lo: ../../include/net-snmp/session_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/callback.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_service.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/nsLogging.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/nsLogging.lo: ../../include/net-snmp/library/mib.h +./agent/nsLogging.lo: ../../include/net-snmp/mib_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/parse.h +./agent/nsLogging.lo: ../../include/net-snmp/library/oid_stash.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/nsLogging.lo: ../../include/net-snmp/library/getopt.h +./agent/nsLogging.lo: ../../include/net-snmp/utilities.h +./agent/nsLogging.lo: ../../include/net-snmp/library/system.h +./agent/nsLogging.lo: ../../include/net-snmp/library/tools.h +./agent/nsLogging.lo: ../../include/net-snmp/library/int64.h +./agent/nsLogging.lo: ../../include/net-snmp/library/mt_support.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/nsLogging.lo: ../../include/net-snmp/library/data_list.h +./agent/nsLogging.lo: ../../include/net-snmp/library/check_varbind.h +./agent/nsLogging.lo: ../../include/net-snmp/library/container.h +./agent/nsLogging.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/nsLogging.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/nsLogging.lo: ../../include/net-snmp/library/container_iterator.h +./agent/nsLogging.lo: ../../include/net-snmp/library/container.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/nsLogging.lo: ../../include/net-snmp/version.h +./agent/nsLogging.lo: ../../include/net-snmp/config_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/read_config.h +./agent/nsLogging.lo: ../../include/net-snmp/library/default_store.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/nsLogging.lo: ../../include/net-snmp/library/vacm.h +./agent/nsLogging.lo: ../../include/net-snmp/snmpv3_api.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpv3.h +./agent/nsLogging.lo: ../../include/net-snmp/library/transform_oids.h +./agent/nsLogging.lo: ../../include/net-snmp/library/keytools.h +./agent/nsLogging.lo: ../../include/net-snmp/library/scapi.h +./agent/nsLogging.lo: ../../include/net-snmp/library/lcd_time.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmpusm.h +./agent/nsLogging.lo: ../../include/net-snmp/library/snmptsm.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/var_struct.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/nsLogging.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/instance.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/scalar.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/watcher.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/null.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/old_api.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/read_only.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/row_merge.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/serialize.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table_data.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table_container.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/table_array.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/mfd.h +./agent/nsLogging.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/nsLogging.lo: agent/nsLogging.h +./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-config.h +./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-features.h +./agent/nsModuleTable.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/nsModuleTable.lo: ../../include/net-snmp/definitions.h +./agent/nsModuleTable.lo: ../../include/net-snmp/types.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/oid.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/types.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/varbind_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_client.h +./agent/nsModuleTable.lo: ../../include/net-snmp/pdu_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/asn1.h +./agent/nsModuleTable.lo: ../../include/net-snmp/output_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/nsModuleTable.lo: ../../include/net-snmp/session_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/callback.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_service.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/mib.h +./agent/nsModuleTable.lo: ../../include/net-snmp/mib_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/parse.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/oid_stash.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/getopt.h +./agent/nsModuleTable.lo: ../../include/net-snmp/utilities.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/system.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/tools.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/int64.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/mt_support.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/data_list.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/check_varbind.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/container.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/container_iterator.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/container.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/nsModuleTable.lo: ../../include/net-snmp/version.h +./agent/nsModuleTable.lo: ../../include/net-snmp/config_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/read_config.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/default_store.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/vacm.h +./agent/nsModuleTable.lo: ../../include/net-snmp/snmpv3_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpv3.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/transform_oids.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/keytools.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/scapi.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/lcd_time.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmpusm.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/snmptsm.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/var_struct.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/nsModuleTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/instance.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/scalar.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/watcher.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/null.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/old_api.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/read_only.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/row_merge.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/serialize.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_data.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_container.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/table_array.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/mfd.h +./agent/nsModuleTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/nsModuleTable.lo: ./agent/nsModuleTable.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/net-snmp-config.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/net-snmp-features.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/definitions.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/types.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/oid.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/types.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/varbind_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_client.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/pdu_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/asn1.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/output_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/session_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/callback.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_service.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/mib.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/mib_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/parse.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/oid_stash.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/getopt.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/utilities.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/system.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/tools.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/int64.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/mt_support.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/data_list.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/check_varbind.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container_iterator.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/container.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/version.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/config_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/read_config.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/default_store.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/vacm.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/snmpv3_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpv3.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/transform_oids.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/keytools.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/scapi.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/lcd_time.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmpusm.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/snmptsm.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/var_struct.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/instance.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/scalar.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/watcher.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/null.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/old_api.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/read_only.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/row_merge.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/serialize.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_data.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_container.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/table_array.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/mfd.h +./agent/nsTransactionTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/nsTransactionTable.lo: ../../agent/agent_global_vars.h +./agent/nsTransactionTable.lo: ./agent/nsTransactionTable.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/net-snmp-config.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/net-snmp-features.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/net-snmp-includes.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/definitions.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/types.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/oid.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/types.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/varbind_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_client.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/pdu_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/asn1.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/output_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_debug.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_logging.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/session_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/callback.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_transport.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_service.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/ucd_compat.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/mib.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/mib_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/parse.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/oid_stash.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_impl.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp-tc.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/getopt.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/utilities.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/system.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/tools.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/int64.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/mt_support.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/data_list.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/check_varbind.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container_binary_array.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container_iterator.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/container.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_assert.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/version.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/config_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/read_config.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/default_store.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_enum.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/vacm.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/snmpv3_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpv3.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/transform_oids.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/keytools.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/scapi.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/lcd_time.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmpusm.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/snmptsm.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_handler.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/var_struct.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_registry.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/ds_agent.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/agent_trap.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/all_helpers.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/instance.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/baby_steps.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/scalar.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/scalar_group.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/watcher.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/multiplexer.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/null.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/debug_handler.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/cache_handler.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/old_api.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/read_only.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/row_merge.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/serialize.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_data.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_dataset.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_tdata.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_iterator.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_container.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/table_array.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/mfd.h +./agent/nsVacmAccessTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agent/nsVacmAccessTable.lo: ./agent/nsVacmAccessTable.h +./agentx/agentx_config.lo: ../../include/net-snmp/net-snmp-config.h +./agentx/agentx_config.lo: ../../include/net-snmp/net-snmp-features.h +./agentx/agentx_config.lo: ../../include/net-snmp/net-snmp-includes.h +./agentx/agentx_config.lo: ../../include/net-snmp/definitions.h +./agentx/agentx_config.lo: ../../include/net-snmp/types.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/oid.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/types.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/varbind_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_client.h +./agentx/agentx_config.lo: ../../include/net-snmp/pdu_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/asn1.h +./agentx/agentx_config.lo: ../../include/net-snmp/output_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_debug.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_logging.h +./agentx/agentx_config.lo: ../../include/net-snmp/session_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/callback.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_transport.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_service.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/ucd_compat.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/mib.h +./agentx/agentx_config.lo: ../../include/net-snmp/mib_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/parse.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/oid_stash.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_impl.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp-tc.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/getopt.h +./agentx/agentx_config.lo: ../../include/net-snmp/utilities.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/system.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/tools.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/int64.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/mt_support.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_alarm.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/data_list.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/check_varbind.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/container.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/container_binary_array.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/container_list_ssll.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/container_iterator.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/container.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_assert.h +./agentx/agentx_config.lo: ../../include/net-snmp/version.h +./agentx/agentx_config.lo: ../../include/net-snmp/config_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/read_config.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/default_store.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_enum.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/vacm.h +./agentx/agentx_config.lo: ../../include/net-snmp/snmpv3_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpv3.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/transform_oids.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/keytools.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/scapi.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/lcd_time.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmp_secmod.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmpusm.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/snmptsm.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/mib_module_config.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_module_config.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/snmp_agent.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/snmp_vars.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_handler.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/var_struct.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_registry.h +./agentx/agentx_config.lo: ../../include/net-snmp/library/fd_event_manager.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/ds_agent.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_read_config.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/agent_trap.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/all_helpers.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/instance.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/baby_steps.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/scalar.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/scalar_group.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/watcher.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/multiplexer.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/null.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/debug_handler.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/cache_handler.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/old_api.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/read_only.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/row_merge.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/serialize.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/mode_end_call.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_data.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_dataset.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_tdata.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_iterator.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_container.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/table_array.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/mfd.h +./agentx/agentx_config.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agentx/agentx_config.lo: ../../agent/snmpd.h agentx/agentx_config.h +./agentx/agentx_config.lo: agentx/protocol.h +./agentx/client.lo: ../../include/net-snmp/net-snmp-config.h +./agentx/client.lo: ../../include/net-snmp/net-snmp-features.h +./agentx/client.lo: ../../include/net-snmp/net-snmp-includes.h +./agentx/client.lo: ../../include/net-snmp/definitions.h +./agentx/client.lo: ../../include/net-snmp/types.h +./agentx/client.lo: ../../include/net-snmp/library/oid.h +./agentx/client.lo: ../../include/net-snmp/library/types.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_api.h +./agentx/client.lo: ../../include/net-snmp/varbind_api.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_client.h +./agentx/client.lo: ../../include/net-snmp/pdu_api.h +./agentx/client.lo: ../../include/net-snmp/library/asn1.h +./agentx/client.lo: ../../include/net-snmp/output_api.h +./agentx/client.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_debug.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_logging.h +./agentx/client.lo: ../../include/net-snmp/session_api.h +./agentx/client.lo: ../../include/net-snmp/library/callback.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_transport.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_service.h +./agentx/client.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agentx/client.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agentx/client.lo: ../../include/net-snmp/library/ucd_compat.h +./agentx/client.lo: ../../include/net-snmp/library/mib.h +./agentx/client.lo: ../../include/net-snmp/mib_api.h +./agentx/client.lo: ../../include/net-snmp/library/parse.h +./agentx/client.lo: ../../include/net-snmp/library/oid_stash.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_impl.h +./agentx/client.lo: ../../include/net-snmp/library/snmp.h +./agentx/client.lo: ../../include/net-snmp/library/snmp-tc.h +./agentx/client.lo: ../../include/net-snmp/library/getopt.h +./agentx/client.lo: ../../include/net-snmp/utilities.h +./agentx/client.lo: ../../include/net-snmp/library/system.h +./agentx/client.lo: ../../include/net-snmp/library/tools.h +./agentx/client.lo: ../../include/net-snmp/library/int64.h +./agentx/client.lo: ../../include/net-snmp/library/mt_support.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_alarm.h +./agentx/client.lo: ../../include/net-snmp/library/data_list.h +./agentx/client.lo: ../../include/net-snmp/library/check_varbind.h +./agentx/client.lo: ../../include/net-snmp/library/container.h +./agentx/client.lo: ../../include/net-snmp/library/container_binary_array.h +./agentx/client.lo: ../../include/net-snmp/library/container_list_ssll.h +./agentx/client.lo: ../../include/net-snmp/library/container_iterator.h +./agentx/client.lo: ../../include/net-snmp/library/container.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_assert.h +./agentx/client.lo: ../../include/net-snmp/version.h +./agentx/client.lo: ../../include/net-snmp/config_api.h +./agentx/client.lo: ../../include/net-snmp/library/read_config.h +./agentx/client.lo: ../../include/net-snmp/library/default_store.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_enum.h +./agentx/client.lo: ../../include/net-snmp/library/vacm.h +./agentx/client.lo: ../../include/net-snmp/snmpv3_api.h +./agentx/client.lo: ../../include/net-snmp/library/snmpv3.h +./agentx/client.lo: ../../include/net-snmp/library/transform_oids.h +./agentx/client.lo: ../../include/net-snmp/library/keytools.h +./agentx/client.lo: ../../include/net-snmp/library/scapi.h +./agentx/client.lo: ../../include/net-snmp/library/lcd_time.h +./agentx/client.lo: ../../include/net-snmp/library/snmp_secmod.h +./agentx/client.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agentx/client.lo: ../../include/net-snmp/library/snmpusm.h +./agentx/client.lo: ../../include/net-snmp/library/snmptsm.h +./agentx/client.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agentx/client.lo: ../../include/net-snmp/agent/mib_module_config.h +./agentx/client.lo: ../../include/net-snmp/agent/agent_module_config.h +./agentx/client.lo: ../../include/net-snmp/agent/snmp_agent.h +./agentx/client.lo: ../../include/net-snmp/agent/snmp_vars.h +./agentx/client.lo: ../../include/net-snmp/agent/agent_handler.h +./agentx/client.lo: ../../include/net-snmp/agent/var_struct.h +./agentx/client.lo: ../../include/net-snmp/agent/agent_registry.h +./agentx/client.lo: ../../include/net-snmp/library/fd_event_manager.h +./agentx/client.lo: ../../include/net-snmp/agent/ds_agent.h +./agentx/client.lo: ../../include/net-snmp/agent/agent_read_config.h +./agentx/client.lo: ../../include/net-snmp/agent/agent_trap.h +./agentx/client.lo: ../../include/net-snmp/agent/all_helpers.h +./agentx/client.lo: ../../include/net-snmp/agent/instance.h +./agentx/client.lo: ../../include/net-snmp/agent/baby_steps.h +./agentx/client.lo: ../../include/net-snmp/agent/scalar.h +./agentx/client.lo: ../../include/net-snmp/agent/scalar_group.h +./agentx/client.lo: ../../include/net-snmp/agent/watcher.h +./agentx/client.lo: ../../include/net-snmp/agent/multiplexer.h +./agentx/client.lo: ../../include/net-snmp/agent/null.h +./agentx/client.lo: ../../include/net-snmp/agent/debug_handler.h +./agentx/client.lo: ../../include/net-snmp/agent/cache_handler.h +./agentx/client.lo: ../../include/net-snmp/agent/old_api.h +./agentx/client.lo: ../../include/net-snmp/agent/read_only.h +./agentx/client.lo: ../../include/net-snmp/agent/row_merge.h +./agentx/client.lo: ../../include/net-snmp/agent/serialize.h +./agentx/client.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agentx/client.lo: ../../include/net-snmp/agent/mode_end_call.h +./agentx/client.lo: ../../include/net-snmp/agent/table.h +./agentx/client.lo: ../../include/net-snmp/agent/table_data.h +./agentx/client.lo: ../../include/net-snmp/agent/table_dataset.h +./agentx/client.lo: ../../include/net-snmp/agent/table_tdata.h +./agentx/client.lo: ../../include/net-snmp/agent/table_iterator.h +./agentx/client.lo: ../../include/net-snmp/agent/table_container.h +./agentx/client.lo: ../../include/net-snmp/agent/table_array.h +./agentx/client.lo: ../../include/net-snmp/agent/mfd.h +./agentx/client.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agentx/client.lo: ../../include/net-snmp/agent/agent_index.h +./agentx/client.lo: ../../agent/agent_global_vars.h agentx/protocol.h +./agentx/client.lo: agentx/client.h agentx/subagent.h +./agentx/master.lo: ../../include/net-snmp/net-snmp-config.h +./agentx/master.lo: ../../include/net-snmp/net-snmp-features.h +./agentx/master.lo: ../../include/net-snmp/net-snmp-includes.h +./agentx/master.lo: ../../include/net-snmp/definitions.h +./agentx/master.lo: ../../include/net-snmp/types.h +./agentx/master.lo: ../../include/net-snmp/library/oid.h +./agentx/master.lo: ../../include/net-snmp/library/types.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_api.h +./agentx/master.lo: ../../include/net-snmp/varbind_api.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_client.h +./agentx/master.lo: ../../include/net-snmp/pdu_api.h +./agentx/master.lo: ../../include/net-snmp/library/asn1.h +./agentx/master.lo: ../../include/net-snmp/output_api.h +./agentx/master.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_debug.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_logging.h +./agentx/master.lo: ../../include/net-snmp/session_api.h +./agentx/master.lo: ../../include/net-snmp/library/callback.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_transport.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_service.h +./agentx/master.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agentx/master.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agentx/master.lo: ../../include/net-snmp/library/ucd_compat.h +./agentx/master.lo: ../../include/net-snmp/library/mib.h +./agentx/master.lo: ../../include/net-snmp/mib_api.h +./agentx/master.lo: ../../include/net-snmp/library/parse.h +./agentx/master.lo: ../../include/net-snmp/library/oid_stash.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_impl.h +./agentx/master.lo: ../../include/net-snmp/library/snmp.h +./agentx/master.lo: ../../include/net-snmp/library/snmp-tc.h +./agentx/master.lo: ../../include/net-snmp/library/getopt.h +./agentx/master.lo: ../../include/net-snmp/utilities.h +./agentx/master.lo: ../../include/net-snmp/library/system.h +./agentx/master.lo: ../../include/net-snmp/library/tools.h +./agentx/master.lo: ../../include/net-snmp/library/int64.h +./agentx/master.lo: ../../include/net-snmp/library/mt_support.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_alarm.h +./agentx/master.lo: ../../include/net-snmp/library/data_list.h +./agentx/master.lo: ../../include/net-snmp/library/check_varbind.h +./agentx/master.lo: ../../include/net-snmp/library/container.h +./agentx/master.lo: ../../include/net-snmp/library/container_binary_array.h +./agentx/master.lo: ../../include/net-snmp/library/container_list_ssll.h +./agentx/master.lo: ../../include/net-snmp/library/container_iterator.h +./agentx/master.lo: ../../include/net-snmp/library/container.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_assert.h +./agentx/master.lo: ../../include/net-snmp/version.h +./agentx/master.lo: ../../include/net-snmp/config_api.h +./agentx/master.lo: ../../include/net-snmp/library/read_config.h +./agentx/master.lo: ../../include/net-snmp/library/default_store.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_enum.h +./agentx/master.lo: ../../include/net-snmp/library/vacm.h +./agentx/master.lo: ../../include/net-snmp/snmpv3_api.h +./agentx/master.lo: ../../include/net-snmp/library/snmpv3.h +./agentx/master.lo: ../../include/net-snmp/library/transform_oids.h +./agentx/master.lo: ../../include/net-snmp/library/keytools.h +./agentx/master.lo: ../../include/net-snmp/library/scapi.h +./agentx/master.lo: ../../include/net-snmp/library/lcd_time.h +./agentx/master.lo: ../../include/net-snmp/library/snmp_secmod.h +./agentx/master.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agentx/master.lo: ../../include/net-snmp/library/snmpusm.h +./agentx/master.lo: ../../include/net-snmp/library/snmptsm.h +./agentx/master.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agentx/master.lo: ../../include/net-snmp/agent/mib_module_config.h +./agentx/master.lo: ../../include/net-snmp/agent/agent_module_config.h +./agentx/master.lo: ../../include/net-snmp/agent/snmp_agent.h +./agentx/master.lo: ../../include/net-snmp/agent/snmp_vars.h +./agentx/master.lo: ../../include/net-snmp/agent/agent_handler.h +./agentx/master.lo: ../../include/net-snmp/agent/var_struct.h +./agentx/master.lo: ../../include/net-snmp/agent/agent_registry.h +./agentx/master.lo: ../../include/net-snmp/library/fd_event_manager.h +./agentx/master.lo: ../../include/net-snmp/agent/ds_agent.h +./agentx/master.lo: ../../include/net-snmp/agent/agent_read_config.h +./agentx/master.lo: ../../include/net-snmp/agent/agent_trap.h +./agentx/master.lo: ../../include/net-snmp/agent/all_helpers.h +./agentx/master.lo: ../../include/net-snmp/agent/instance.h +./agentx/master.lo: ../../include/net-snmp/agent/baby_steps.h +./agentx/master.lo: ../../include/net-snmp/agent/scalar.h +./agentx/master.lo: ../../include/net-snmp/agent/scalar_group.h +./agentx/master.lo: ../../include/net-snmp/agent/watcher.h +./agentx/master.lo: ../../include/net-snmp/agent/multiplexer.h +./agentx/master.lo: ../../include/net-snmp/agent/null.h +./agentx/master.lo: ../../include/net-snmp/agent/debug_handler.h +./agentx/master.lo: ../../include/net-snmp/agent/cache_handler.h +./agentx/master.lo: ../../include/net-snmp/agent/old_api.h +./agentx/master.lo: ../../include/net-snmp/agent/read_only.h +./agentx/master.lo: ../../include/net-snmp/agent/row_merge.h +./agentx/master.lo: ../../include/net-snmp/agent/serialize.h +./agentx/master.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agentx/master.lo: ../../include/net-snmp/agent/mode_end_call.h +./agentx/master.lo: ../../include/net-snmp/agent/table.h +./agentx/master.lo: ../../include/net-snmp/agent/table_data.h +./agentx/master.lo: ../../include/net-snmp/agent/table_dataset.h +./agentx/master.lo: ../../include/net-snmp/agent/table_tdata.h +./agentx/master.lo: ../../include/net-snmp/agent/table_iterator.h +./agentx/master.lo: ../../include/net-snmp/agent/table_container.h +./agentx/master.lo: ../../include/net-snmp/agent/table_array.h +./agentx/master.lo: ../../include/net-snmp/agent/mfd.h +./agentx/master.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agentx/master.lo: ../../agent/snmpd.h agentx/protocol.h +./agentx/master.lo: agentx/master_admin.h +./agentx/master_admin.lo: ../../include/net-snmp/net-snmp-config.h +./agentx/master_admin.lo: ../../include/net-snmp/net-snmp-features.h +./agentx/master_admin.lo: ../../include/net-snmp/net-snmp-includes.h +./agentx/master_admin.lo: ../../include/net-snmp/definitions.h +./agentx/master_admin.lo: ../../include/net-snmp/types.h +./agentx/master_admin.lo: ../../include/net-snmp/library/oid.h +./agentx/master_admin.lo: ../../include/net-snmp/library/types.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_api.h +./agentx/master_admin.lo: ../../include/net-snmp/varbind_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_client.h +./agentx/master_admin.lo: ../../include/net-snmp/pdu_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/asn1.h +./agentx/master_admin.lo: ../../include/net-snmp/output_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_debug.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_logging.h +./agentx/master_admin.lo: ../../include/net-snmp/session_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/callback.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_transport.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_service.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agentx/master_admin.lo: ../../include/net-snmp/library/ucd_compat.h +./agentx/master_admin.lo: ../../include/net-snmp/library/mib.h +./agentx/master_admin.lo: ../../include/net-snmp/mib_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/parse.h +./agentx/master_admin.lo: ../../include/net-snmp/library/oid_stash.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_impl.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp-tc.h +./agentx/master_admin.lo: ../../include/net-snmp/library/getopt.h +./agentx/master_admin.lo: ../../include/net-snmp/utilities.h +./agentx/master_admin.lo: ../../include/net-snmp/library/system.h +./agentx/master_admin.lo: ../../include/net-snmp/library/tools.h +./agentx/master_admin.lo: ../../include/net-snmp/library/int64.h +./agentx/master_admin.lo: ../../include/net-snmp/library/mt_support.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_alarm.h +./agentx/master_admin.lo: ../../include/net-snmp/library/data_list.h +./agentx/master_admin.lo: ../../include/net-snmp/library/check_varbind.h +./agentx/master_admin.lo: ../../include/net-snmp/library/container.h +./agentx/master_admin.lo: ../../include/net-snmp/library/container_binary_array.h +./agentx/master_admin.lo: ../../include/net-snmp/library/container_list_ssll.h +./agentx/master_admin.lo: ../../include/net-snmp/library/container_iterator.h +./agentx/master_admin.lo: ../../include/net-snmp/library/container.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_assert.h +./agentx/master_admin.lo: ../../include/net-snmp/version.h +./agentx/master_admin.lo: ../../include/net-snmp/config_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/read_config.h +./agentx/master_admin.lo: ../../include/net-snmp/library/default_store.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_enum.h +./agentx/master_admin.lo: ../../include/net-snmp/library/vacm.h +./agentx/master_admin.lo: ../../include/net-snmp/snmpv3_api.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpv3.h +./agentx/master_admin.lo: ../../include/net-snmp/library/transform_oids.h +./agentx/master_admin.lo: ../../include/net-snmp/library/keytools.h +./agentx/master_admin.lo: ../../include/net-snmp/library/scapi.h +./agentx/master_admin.lo: ../../include/net-snmp/library/lcd_time.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmp_secmod.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmpusm.h +./agentx/master_admin.lo: ../../include/net-snmp/library/snmptsm.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/mib_module_config.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_module_config.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/snmp_agent.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/snmp_vars.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_handler.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/var_struct.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_registry.h +./agentx/master_admin.lo: ../../include/net-snmp/library/fd_event_manager.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/ds_agent.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_read_config.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_trap.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/all_helpers.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/instance.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/baby_steps.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/scalar.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/scalar_group.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/watcher.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/multiplexer.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/null.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/debug_handler.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/cache_handler.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/old_api.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/read_only.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/row_merge.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/serialize.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/mode_end_call.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table_data.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table_dataset.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table_tdata.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table_iterator.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table_container.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/table_array.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/mfd.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agentx/master_admin.lo: ../../agent/agent_global_vars.h agentx/protocol.h +./agentx/master_admin.lo: agentx/client.h agentx/subagent.h +./agentx/master_admin.lo: agentx/master_admin.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_index.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_callbacks.h +./agentx/master_admin.lo: ../../include/net-snmp/agent/agent_sysORTable.h +./agentx/master_admin.lo: ./agentx/master.h +./agentx/protocol.lo: ../../include/net-snmp/net-snmp-config.h +./agentx/protocol.lo: ../../include/net-snmp/net-snmp-includes.h +./agentx/protocol.lo: ../../include/net-snmp/definitions.h +./agentx/protocol.lo: ../../include/net-snmp/types.h +./agentx/protocol.lo: ../../include/net-snmp/library/oid.h +./agentx/protocol.lo: ../../include/net-snmp/library/types.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_api.h +./agentx/protocol.lo: ../../include/net-snmp/varbind_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_client.h +./agentx/protocol.lo: ../../include/net-snmp/pdu_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/asn1.h +./agentx/protocol.lo: ../../include/net-snmp/output_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_debug.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_logging.h +./agentx/protocol.lo: ../../include/net-snmp/session_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/callback.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_transport.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_service.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agentx/protocol.lo: ../../include/net-snmp/library/ucd_compat.h +./agentx/protocol.lo: ../../include/net-snmp/library/mib.h +./agentx/protocol.lo: ../../include/net-snmp/mib_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/parse.h +./agentx/protocol.lo: ../../include/net-snmp/library/oid_stash.h +./agentx/protocol.lo: ../../include/net-snmp/net-snmp-features.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_impl.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp-tc.h +./agentx/protocol.lo: ../../include/net-snmp/library/getopt.h +./agentx/protocol.lo: ../../include/net-snmp/utilities.h +./agentx/protocol.lo: ../../include/net-snmp/library/system.h +./agentx/protocol.lo: ../../include/net-snmp/library/tools.h +./agentx/protocol.lo: ../../include/net-snmp/library/int64.h +./agentx/protocol.lo: ../../include/net-snmp/library/mt_support.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_alarm.h +./agentx/protocol.lo: ../../include/net-snmp/library/data_list.h +./agentx/protocol.lo: ../../include/net-snmp/library/check_varbind.h +./agentx/protocol.lo: ../../include/net-snmp/library/container.h +./agentx/protocol.lo: ../../include/net-snmp/library/container_binary_array.h +./agentx/protocol.lo: ../../include/net-snmp/library/container_list_ssll.h +./agentx/protocol.lo: ../../include/net-snmp/library/container_iterator.h +./agentx/protocol.lo: ../../include/net-snmp/library/container.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_assert.h +./agentx/protocol.lo: ../../include/net-snmp/version.h +./agentx/protocol.lo: ../../include/net-snmp/config_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/read_config.h +./agentx/protocol.lo: ../../include/net-snmp/library/default_store.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_enum.h +./agentx/protocol.lo: ../../include/net-snmp/library/vacm.h +./agentx/protocol.lo: ../../include/net-snmp/snmpv3_api.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpv3.h +./agentx/protocol.lo: ../../include/net-snmp/library/transform_oids.h +./agentx/protocol.lo: ../../include/net-snmp/library/keytools.h +./agentx/protocol.lo: ../../include/net-snmp/library/scapi.h +./agentx/protocol.lo: ../../include/net-snmp/library/lcd_time.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmp_secmod.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmpusm.h +./agentx/protocol.lo: ../../include/net-snmp/library/snmptsm.h +./agentx/protocol.lo: agentx/protocol.h +./agentx/subagent.lo: ../../include/net-snmp/net-snmp-config.h +./agentx/subagent.lo: ../../include/net-snmp/net-snmp-features.h +./agentx/subagent.lo: ../../include/net-snmp/net-snmp-includes.h +./agentx/subagent.lo: ../../include/net-snmp/definitions.h +./agentx/subagent.lo: ../../include/net-snmp/types.h +./agentx/subagent.lo: ../../include/net-snmp/library/oid.h +./agentx/subagent.lo: ../../include/net-snmp/library/types.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_api.h +./agentx/subagent.lo: ../../include/net-snmp/varbind_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_client.h +./agentx/subagent.lo: ../../include/net-snmp/pdu_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/asn1.h +./agentx/subagent.lo: ../../include/net-snmp/output_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_debug.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_logging.h +./agentx/subagent.lo: ../../include/net-snmp/session_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/callback.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_transport.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_service.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./agentx/subagent.lo: ../../include/net-snmp/library/ucd_compat.h +./agentx/subagent.lo: ../../include/net-snmp/library/mib.h +./agentx/subagent.lo: ../../include/net-snmp/mib_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/parse.h +./agentx/subagent.lo: ../../include/net-snmp/library/oid_stash.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_impl.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp-tc.h +./agentx/subagent.lo: ../../include/net-snmp/library/getopt.h +./agentx/subagent.lo: ../../include/net-snmp/utilities.h +./agentx/subagent.lo: ../../include/net-snmp/library/system.h +./agentx/subagent.lo: ../../include/net-snmp/library/tools.h +./agentx/subagent.lo: ../../include/net-snmp/library/int64.h +./agentx/subagent.lo: ../../include/net-snmp/library/mt_support.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_alarm.h +./agentx/subagent.lo: ../../include/net-snmp/library/data_list.h +./agentx/subagent.lo: ../../include/net-snmp/library/check_varbind.h +./agentx/subagent.lo: ../../include/net-snmp/library/container.h +./agentx/subagent.lo: ../../include/net-snmp/library/container_binary_array.h +./agentx/subagent.lo: ../../include/net-snmp/library/container_list_ssll.h +./agentx/subagent.lo: ../../include/net-snmp/library/container_iterator.h +./agentx/subagent.lo: ../../include/net-snmp/library/container.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_assert.h +./agentx/subagent.lo: ../../include/net-snmp/version.h +./agentx/subagent.lo: ../../include/net-snmp/config_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/read_config.h +./agentx/subagent.lo: ../../include/net-snmp/library/default_store.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_parse_args.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_enum.h +./agentx/subagent.lo: ../../include/net-snmp/library/vacm.h +./agentx/subagent.lo: ../../include/net-snmp/snmpv3_api.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpv3.h +./agentx/subagent.lo: ../../include/net-snmp/library/transform_oids.h +./agentx/subagent.lo: ../../include/net-snmp/library/keytools.h +./agentx/subagent.lo: ../../include/net-snmp/library/scapi.h +./agentx/subagent.lo: ../../include/net-snmp/library/lcd_time.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmp_secmod.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmpusm.h +./agentx/subagent.lo: ../../include/net-snmp/library/snmptsm.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_index.h +./agentx/subagent.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./agentx/subagent.lo: ../../include/net-snmp/agent/mib_module_config.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_module_config.h +./agentx/subagent.lo: ../../include/net-snmp/agent/snmp_agent.h +./agentx/subagent.lo: ../../include/net-snmp/agent/snmp_vars.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_handler.h +./agentx/subagent.lo: ../../include/net-snmp/agent/var_struct.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_registry.h +./agentx/subagent.lo: ../../include/net-snmp/library/fd_event_manager.h +./agentx/subagent.lo: ../../include/net-snmp/agent/ds_agent.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_read_config.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_trap.h +./agentx/subagent.lo: ../../include/net-snmp/agent/all_helpers.h +./agentx/subagent.lo: ../../include/net-snmp/agent/instance.h +./agentx/subagent.lo: ../../include/net-snmp/agent/baby_steps.h +./agentx/subagent.lo: ../../include/net-snmp/agent/scalar.h +./agentx/subagent.lo: ../../include/net-snmp/agent/scalar_group.h +./agentx/subagent.lo: ../../include/net-snmp/agent/watcher.h +./agentx/subagent.lo: ../../include/net-snmp/agent/multiplexer.h +./agentx/subagent.lo: ../../include/net-snmp/agent/null.h +./agentx/subagent.lo: ../../include/net-snmp/agent/debug_handler.h +./agentx/subagent.lo: ../../include/net-snmp/agent/cache_handler.h +./agentx/subagent.lo: ../../include/net-snmp/agent/old_api.h +./agentx/subagent.lo: ../../include/net-snmp/agent/read_only.h +./agentx/subagent.lo: ../../include/net-snmp/agent/row_merge.h +./agentx/subagent.lo: ../../include/net-snmp/agent/serialize.h +./agentx/subagent.lo: ../../include/net-snmp/agent/bulk_to_next.h +./agentx/subagent.lo: ../../include/net-snmp/agent/mode_end_call.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table_data.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table_dataset.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table_tdata.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table_iterator.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table_container.h +./agentx/subagent.lo: ../../include/net-snmp/agent/table_array.h +./agentx/subagent.lo: ../../include/net-snmp/agent/mfd.h +./agentx/subagent.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./agentx/subagent.lo: ../../agent/snmpd.h ../../agent/agent_global_vars.h +./agentx/subagent.lo: agentx/protocol.h agentx/client.h +./agentx/subagent.lo: agentx/agentx_config.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_callbacks.h +./agentx/subagent.lo: ../../include/net-snmp/agent/sysORTable.h +./agentx/subagent.lo: ../../include/net-snmp/agent/agent_sysORTable.h +./agentx/subagent.lo: ./agentx/subagent.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/net-snmp-config.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/net-snmp-features.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/net-snmp-includes.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/definitions.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/types.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/oid.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/types.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/varbind_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_client.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/pdu_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/asn1.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/output_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_debug.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_logging.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/session_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/callback.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_transport.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_service.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/ucd_compat.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/mib.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/mib_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/parse.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/oid_stash.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_impl.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp-tc.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/getopt.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/utilities.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/system.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/tools.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/int64.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/mt_support.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_alarm.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/data_list.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/check_varbind.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container_binary_array.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container_list_ssll.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container_iterator.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/container.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_assert.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/version.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/config_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/read_config.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/default_store.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_parse_args.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_enum.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/vacm.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/snmpv3_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpv3.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/transform_oids.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/keytools.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/scapi.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/lcd_time.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmp_secmod.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmpusm.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/snmptsm.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/mib_module_config.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_module_config.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/snmp_agent.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/snmp_vars.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_handler.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/var_struct.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_registry.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/library/fd_event_manager.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/ds_agent.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_read_config.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/agent_trap.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/all_helpers.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/instance.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/baby_steps.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/scalar.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/scalar_group.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/watcher.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/multiplexer.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/null.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/debug_handler.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/cache_handler.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/old_api.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/read_only.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/row_merge.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/serialize.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/bulk_to_next.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/mode_end_call.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_data.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_dataset.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_tdata.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_iterator.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_container.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/table_array.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/mfd.h +./deliver/deliverByNotify.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./deliver/deliverByNotify.lo: ./deliver/deliverByNotify.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/definitions.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/types.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/types.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/output_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/session_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/utilities.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/system.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/container.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/version.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/config_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteEventNotificationTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteEventNotificationTable.lo: ./disman/mteEventNotificationTable.h +./disman/mteEventTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteEventTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteEventTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteEventTable.lo: ../../include/net-snmp/definitions.h +./disman/mteEventTable.lo: ../../include/net-snmp/types.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/types.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteEventTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteEventTable.lo: ../../include/net-snmp/output_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteEventTable.lo: ../../include/net-snmp/session_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteEventTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteEventTable.lo: ../../include/net-snmp/utilities.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/system.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/container.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/container.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteEventTable.lo: ../../include/net-snmp/version.h +./disman/mteEventTable.lo: ../../include/net-snmp/config_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteEventTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteEventTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteEventTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteEventTable.lo: ./disman/mteTriggerTable.h +./disman/mteEventTable.lo: ./disman/mteEventTable.h +./disman/mteEventTable.lo: ./disman/mteEventNotificationTable.h +./disman/mteEventTable.lo: ./disman/mteObjectsTable.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/definitions.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/types.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/types.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/output_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/session_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/utilities.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/system.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/container.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/version.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/config_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteObjectsTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteObjectsTable.lo: header_complex.h ./disman/mteTriggerTable.h +./disman/mteObjectsTable.lo: ./disman/mteObjectsTable.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/definitions.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/types.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/types.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/output_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/session_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/utilities.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/system.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/version.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/config_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteTriggerBooleanTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteTriggerBooleanTable.lo: header_complex.h +./disman/mteTriggerBooleanTable.lo: ./disman/mteTriggerBooleanTable.h +./disman/mteTriggerBooleanTable.lo: ./disman/mteTriggerTable.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/definitions.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/types.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/types.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/output_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/session_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/utilities.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/system.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/version.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/config_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteTriggerDeltaTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteTriggerDeltaTable.lo: header_complex.h +./disman/mteTriggerDeltaTable.lo: ./disman/mteTriggerDeltaTable.h +./disman/mteTriggerDeltaTable.lo: ./disman/mteTriggerTable.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/definitions.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/types.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/types.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/output_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/session_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/utilities.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/system.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/version.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/config_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteTriggerExistenceTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteTriggerExistenceTable.lo: header_complex.h +./disman/mteTriggerExistenceTable.lo: ./disman/mteTriggerExistenceTable.h +./disman/mteTriggerExistenceTable.lo: ./disman/mteTriggerTable.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/definitions.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/types.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/types.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/output_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/session_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/utilities.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/system.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/version.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/config_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteTriggerTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteTriggerTable.lo: header_complex.h ./disman/mteTriggerTable.h +./disman/mteTriggerTable.lo: ./disman/mteTriggerBooleanTable.h +./disman/mteTriggerTable.lo: ./disman/mteTriggerDeltaTable.h +./disman/mteTriggerTable.lo: ./disman/mteTriggerExistenceTable.h +./disman/mteTriggerTable.lo: ./disman/mteTriggerThresholdTable.h +./disman/mteTriggerTable.lo: ./disman/mteEventTable.h +./disman/mteTriggerTable.lo: ./disman/mteObjectsTable.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/net-snmp-config.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/net-snmp-includes.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/definitions.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/types.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/oid.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/types.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/varbind_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_client.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/pdu_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/asn1.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/output_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_debug.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_logging.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/session_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/callback.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_transport.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_service.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/ucd_compat.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/mib.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/mib_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/parse.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/oid_stash.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/net-snmp-features.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_impl.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp-tc.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/getopt.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/utilities.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/system.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/tools.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/int64.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/mt_support.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/data_list.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/check_varbind.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container_binary_array.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container_iterator.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/container.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_assert.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/version.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/config_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/read_config.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/default_store.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_enum.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/vacm.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/snmpv3_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpv3.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/transform_oids.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/keytools.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/scapi.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/lcd_time.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmpusm.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/snmptsm.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_handler.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/var_struct.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_registry.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/ds_agent.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/agent_trap.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/all_helpers.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/instance.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/baby_steps.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/scalar.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/scalar_group.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/watcher.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/multiplexer.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/null.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/debug_handler.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/cache_handler.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/old_api.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/read_only.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/row_merge.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/serialize.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_data.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_dataset.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_tdata.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_iterator.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_container.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/table_array.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/mfd.h +./disman/mteTriggerThresholdTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./disman/mteTriggerThresholdTable.lo: header_complex.h +./disman/mteTriggerThresholdTable.lo: ./disman/mteTriggerThresholdTable.h +./disman/mteTriggerThresholdTable.lo: ./disman/mteTriggerTable.h +./examples/data_set.lo: ../../include/net-snmp/net-snmp-config.h +./examples/data_set.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/data_set.lo: ../../include/net-snmp/definitions.h +./examples/data_set.lo: ../../include/net-snmp/types.h +./examples/data_set.lo: ../../include/net-snmp/library/oid.h +./examples/data_set.lo: ../../include/net-snmp/library/types.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_api.h +./examples/data_set.lo: ../../include/net-snmp/varbind_api.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_client.h +./examples/data_set.lo: ../../include/net-snmp/pdu_api.h +./examples/data_set.lo: ../../include/net-snmp/library/asn1.h +./examples/data_set.lo: ../../include/net-snmp/output_api.h +./examples/data_set.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/data_set.lo: ../../include/net-snmp/session_api.h +./examples/data_set.lo: ../../include/net-snmp/library/callback.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_service.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/data_set.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/data_set.lo: ../../include/net-snmp/library/mib.h +./examples/data_set.lo: ../../include/net-snmp/mib_api.h +./examples/data_set.lo: ../../include/net-snmp/library/parse.h +./examples/data_set.lo: ../../include/net-snmp/library/oid_stash.h +./examples/data_set.lo: ../../include/net-snmp/net-snmp-features.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/data_set.lo: ../../include/net-snmp/library/getopt.h +./examples/data_set.lo: ../../include/net-snmp/utilities.h +./examples/data_set.lo: ../../include/net-snmp/library/system.h +./examples/data_set.lo: ../../include/net-snmp/library/tools.h +./examples/data_set.lo: ../../include/net-snmp/library/int64.h +./examples/data_set.lo: ../../include/net-snmp/library/mt_support.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/data_set.lo: ../../include/net-snmp/library/data_list.h +./examples/data_set.lo: ../../include/net-snmp/library/check_varbind.h +./examples/data_set.lo: ../../include/net-snmp/library/container.h +./examples/data_set.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/data_set.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/data_set.lo: ../../include/net-snmp/library/container_iterator.h +./examples/data_set.lo: ../../include/net-snmp/library/container.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/data_set.lo: ../../include/net-snmp/version.h +./examples/data_set.lo: ../../include/net-snmp/config_api.h +./examples/data_set.lo: ../../include/net-snmp/library/read_config.h +./examples/data_set.lo: ../../include/net-snmp/library/default_store.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/data_set.lo: ../../include/net-snmp/library/vacm.h +./examples/data_set.lo: ../../include/net-snmp/snmpv3_api.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpv3.h +./examples/data_set.lo: ../../include/net-snmp/library/transform_oids.h +./examples/data_set.lo: ../../include/net-snmp/library/keytools.h +./examples/data_set.lo: ../../include/net-snmp/library/scapi.h +./examples/data_set.lo: ../../include/net-snmp/library/lcd_time.h +./examples/data_set.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/data_set.lo: ../../include/net-snmp/library/snmpusm.h +./examples/data_set.lo: ../../include/net-snmp/library/snmptsm.h +./examples/data_set.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/data_set.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/data_set.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/data_set.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/data_set.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/data_set.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/data_set.lo: ../../include/net-snmp/agent/var_struct.h +./examples/data_set.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/data_set.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/data_set.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/data_set.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/data_set.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/data_set.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/data_set.lo: ../../include/net-snmp/agent/instance.h +./examples/data_set.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/data_set.lo: ../../include/net-snmp/agent/scalar.h +./examples/data_set.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/data_set.lo: ../../include/net-snmp/agent/watcher.h +./examples/data_set.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/data_set.lo: ../../include/net-snmp/agent/null.h +./examples/data_set.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/data_set.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/data_set.lo: ../../include/net-snmp/agent/old_api.h +./examples/data_set.lo: ../../include/net-snmp/agent/read_only.h +./examples/data_set.lo: ../../include/net-snmp/agent/row_merge.h +./examples/data_set.lo: ../../include/net-snmp/agent/serialize.h +./examples/data_set.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/data_set.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/data_set.lo: ../../include/net-snmp/agent/table.h +./examples/data_set.lo: ../../include/net-snmp/agent/table_data.h +./examples/data_set.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/data_set.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/data_set.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/data_set.lo: ../../include/net-snmp/agent/table_container.h +./examples/data_set.lo: ../../include/net-snmp/agent/table_array.h +./examples/data_set.lo: ../../include/net-snmp/agent/mfd.h +./examples/data_set.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/delayed_instance.lo: ../../include/net-snmp/net-snmp-config.h +./examples/delayed_instance.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/delayed_instance.lo: ../../include/net-snmp/definitions.h +./examples/delayed_instance.lo: ../../include/net-snmp/types.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/oid.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/types.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/varbind_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_client.h +./examples/delayed_instance.lo: ../../include/net-snmp/pdu_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/asn1.h +./examples/delayed_instance.lo: ../../include/net-snmp/output_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/delayed_instance.lo: ../../include/net-snmp/session_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/callback.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_service.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/mib.h +./examples/delayed_instance.lo: ../../include/net-snmp/mib_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/parse.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/oid_stash.h +./examples/delayed_instance.lo: ../../include/net-snmp/net-snmp-features.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/getopt.h +./examples/delayed_instance.lo: ../../include/net-snmp/utilities.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/system.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/tools.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/int64.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/mt_support.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/data_list.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/check_varbind.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/container.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/container_iterator.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/container.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/delayed_instance.lo: ../../include/net-snmp/version.h +./examples/delayed_instance.lo: ../../include/net-snmp/config_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/read_config.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/default_store.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/vacm.h +./examples/delayed_instance.lo: ../../include/net-snmp/snmpv3_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpv3.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/transform_oids.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/keytools.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/scapi.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/lcd_time.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmpusm.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/snmptsm.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/var_struct.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/delayed_instance.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/instance.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/scalar.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/watcher.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/null.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/old_api.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/read_only.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/row_merge.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/serialize.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_data.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_container.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/table_array.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/mfd.h +./examples/delayed_instance.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/delayed_instance.lo: ./examples/delayed_instance.h +./examples/example.lo: ../../include/net-snmp/net-snmp-config.h +./examples/example.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/example.lo: ../../include/net-snmp/definitions.h +./examples/example.lo: ../../include/net-snmp/types.h +./examples/example.lo: ../../include/net-snmp/library/oid.h +./examples/example.lo: ../../include/net-snmp/library/types.h +./examples/example.lo: ../../include/net-snmp/library/snmp_api.h +./examples/example.lo: ../../include/net-snmp/varbind_api.h +./examples/example.lo: ../../include/net-snmp/library/snmp_client.h +./examples/example.lo: ../../include/net-snmp/pdu_api.h +./examples/example.lo: ../../include/net-snmp/library/asn1.h +./examples/example.lo: ../../include/net-snmp/output_api.h +./examples/example.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/example.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/example.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/example.lo: ../../include/net-snmp/session_api.h +./examples/example.lo: ../../include/net-snmp/library/callback.h +./examples/example.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/example.lo: ../../include/net-snmp/library/snmp_service.h +./examples/example.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/example.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/example.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/example.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/example.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/example.lo: ../../include/net-snmp/library/mib.h +./examples/example.lo: ../../include/net-snmp/mib_api.h +./examples/example.lo: ../../include/net-snmp/library/parse.h +./examples/example.lo: ../../include/net-snmp/library/oid_stash.h +./examples/example.lo: ../../include/net-snmp/net-snmp-features.h +./examples/example.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/example.lo: ../../include/net-snmp/library/snmp.h +./examples/example.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/example.lo: ../../include/net-snmp/library/getopt.h +./examples/example.lo: ../../include/net-snmp/utilities.h +./examples/example.lo: ../../include/net-snmp/library/system.h +./examples/example.lo: ../../include/net-snmp/library/tools.h +./examples/example.lo: ../../include/net-snmp/library/int64.h +./examples/example.lo: ../../include/net-snmp/library/mt_support.h +./examples/example.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/example.lo: ../../include/net-snmp/library/data_list.h +./examples/example.lo: ../../include/net-snmp/library/check_varbind.h +./examples/example.lo: ../../include/net-snmp/library/container.h +./examples/example.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/example.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/example.lo: ../../include/net-snmp/library/container_iterator.h +./examples/example.lo: ../../include/net-snmp/library/container.h +./examples/example.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/example.lo: ../../include/net-snmp/version.h +./examples/example.lo: ../../include/net-snmp/config_api.h +./examples/example.lo: ../../include/net-snmp/library/read_config.h +./examples/example.lo: ../../include/net-snmp/library/default_store.h +./examples/example.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/example.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/example.lo: ../../include/net-snmp/library/vacm.h +./examples/example.lo: ../../include/net-snmp/snmpv3_api.h +./examples/example.lo: ../../include/net-snmp/library/snmpv3.h +./examples/example.lo: ../../include/net-snmp/library/transform_oids.h +./examples/example.lo: ../../include/net-snmp/library/keytools.h +./examples/example.lo: ../../include/net-snmp/library/scapi.h +./examples/example.lo: ../../include/net-snmp/library/lcd_time.h +./examples/example.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/example.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/example.lo: ../../include/net-snmp/library/snmpusm.h +./examples/example.lo: ../../include/net-snmp/library/snmptsm.h +./examples/example.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/example.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/example.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/example.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/example.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/example.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/example.lo: ../../include/net-snmp/agent/var_struct.h +./examples/example.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/example.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/example.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/example.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/example.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/example.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/example.lo: ../../include/net-snmp/agent/instance.h +./examples/example.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/example.lo: ../../include/net-snmp/agent/scalar.h +./examples/example.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/example.lo: ../../include/net-snmp/agent/watcher.h +./examples/example.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/example.lo: ../../include/net-snmp/agent/null.h +./examples/example.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/example.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/example.lo: ../../include/net-snmp/agent/old_api.h +./examples/example.lo: ../../include/net-snmp/agent/read_only.h +./examples/example.lo: ../../include/net-snmp/agent/row_merge.h +./examples/example.lo: ../../include/net-snmp/agent/serialize.h +./examples/example.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/example.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/example.lo: ../../include/net-snmp/agent/table.h +./examples/example.lo: ../../include/net-snmp/agent/table_data.h +./examples/example.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/example.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/example.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/example.lo: ../../include/net-snmp/agent/table_container.h +./examples/example.lo: ../../include/net-snmp/agent/table_array.h +./examples/example.lo: ../../include/net-snmp/agent/mfd.h +./examples/example.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/example.lo: util_funcs/header_generic.h ./examples/example.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/net-snmp-config.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/net-snmp-features.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/definitions.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/types.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/oid.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/types.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/varbind_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_client.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/pdu_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/asn1.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/output_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/session_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/callback.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_service.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/mib.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/mib_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/parse.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/oid_stash.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/getopt.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/utilities.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/system.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/tools.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/int64.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/mt_support.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/data_list.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/check_varbind.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container_iterator.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/version.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/config_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/read_config.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/default_store.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/vacm.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/snmpv3_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpv3.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/transform_oids.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/keytools.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/scapi.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/lcd_time.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmpusm.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/snmptsm.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/var_struct.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/instance.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/scalar.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/watcher.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/null.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/old_api.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/read_only.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/row_merge.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/serialize.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_data.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_container.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/table_array.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/mfd.h +./examples/netSnmpHostsTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable.h +./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_columns.h +./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_enums.h +./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_checkfns.h +./examples/netSnmpHostsTable.lo: ./examples/netSnmpHostsTable_access.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/net-snmp-config.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/definitions.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/types.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/oid.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/types.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/varbind_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_client.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/pdu_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/asn1.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/output_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/session_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/callback.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_service.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/mib.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/mib_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/parse.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/oid_stash.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/net-snmp-features.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/getopt.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/utilities.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/system.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/tools.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/int64.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/mt_support.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/data_list.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/check_varbind.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container_iterator.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/version.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/config_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/read_config.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/default_store.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/vacm.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/snmpv3_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpv3.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/transform_oids.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/keytools.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/scapi.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/lcd_time.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmpusm.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/snmptsm.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/var_struct.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/instance.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/scalar.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/watcher.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/null.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/old_api.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/read_only.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/row_merge.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/serialize.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_data.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_container.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/table_array.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/mfd.h +./examples/netSnmpHostsTable_access.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/netSnmpHostsTable_access.lo: ./examples/netSnmpHostsTable_access.h +./examples/netSnmpHostsTable_access.lo: ./examples/netSnmpHostsTable_enums.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/net-snmp-config.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/net-snmp-features.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/definitions.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/types.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/oid.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/types.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/varbind_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_client.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/pdu_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/asn1.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/output_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/session_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/callback.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_service.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/mib.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/mib_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/parse.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/oid_stash.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/getopt.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/utilities.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/system.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/tools.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/int64.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/mt_support.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/data_list.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/check_varbind.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container_iterator.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/version.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/config_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/read_config.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/default_store.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/vacm.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/snmpv3_api.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpv3.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/transform_oids.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/keytools.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/scapi.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/lcd_time.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmpusm.h +./examples/netSnmpHostsTable_checkfns.lo: ../../include/net-snmp/library/snmptsm.h +./examples/netSnmpHostsTable_checkfns.lo: ./examples/netSnmpHostsTable_checkfns.h +./examples/netSnmpHostsTable_checkfns.lo: ./examples/netSnmpHostsTable_checkfns_local.h +./examples/netSnmpHostsTable_checkfns.lo: ./examples/netSnmpHostsTable_enums.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/net-snmp-config.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/definitions.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/types.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/oid.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/types.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/varbind_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_client.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/pdu_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/asn1.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/output_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/session_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/callback.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_service.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/mib.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/mib_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/parse.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/oid_stash.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/net-snmp-features.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/getopt.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/utilities.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/system.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/tools.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/int64.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/mt_support.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/data_list.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/check_varbind.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container_iterator.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/container.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/version.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/config_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/read_config.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/default_store.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/vacm.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/snmpv3_api.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpv3.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/transform_oids.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/keytools.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/scapi.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/lcd_time.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmpusm.h +./examples/netSnmpHostsTable_checkfns_local.lo: ../../include/net-snmp/library/snmptsm.h +./examples/netSnmpHostsTable_checkfns_local.lo: ./examples/netSnmpHostsTable_checkfns.h +./examples/netSnmpHostsTable_checkfns_local.lo: ./examples/netSnmpHostsTable_enums.h +./examples/netSnmpHostsTable_checkfns_local.lo: ./examples/netSnmpHostsTable_checkfns_local.h +./examples/notification.lo: ../../include/net-snmp/net-snmp-config.h +./examples/notification.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/notification.lo: ../../include/net-snmp/definitions.h +./examples/notification.lo: ../../include/net-snmp/types.h +./examples/notification.lo: ../../include/net-snmp/library/oid.h +./examples/notification.lo: ../../include/net-snmp/library/types.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_api.h +./examples/notification.lo: ../../include/net-snmp/varbind_api.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_client.h +./examples/notification.lo: ../../include/net-snmp/pdu_api.h +./examples/notification.lo: ../../include/net-snmp/library/asn1.h +./examples/notification.lo: ../../include/net-snmp/output_api.h +./examples/notification.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/notification.lo: ../../include/net-snmp/session_api.h +./examples/notification.lo: ../../include/net-snmp/library/callback.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_service.h +./examples/notification.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/notification.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/notification.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/notification.lo: ../../include/net-snmp/library/mib.h +./examples/notification.lo: ../../include/net-snmp/mib_api.h +./examples/notification.lo: ../../include/net-snmp/library/parse.h +./examples/notification.lo: ../../include/net-snmp/library/oid_stash.h +./examples/notification.lo: ../../include/net-snmp/net-snmp-features.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/notification.lo: ../../include/net-snmp/library/snmp.h +./examples/notification.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/notification.lo: ../../include/net-snmp/library/getopt.h +./examples/notification.lo: ../../include/net-snmp/utilities.h +./examples/notification.lo: ../../include/net-snmp/library/system.h +./examples/notification.lo: ../../include/net-snmp/library/tools.h +./examples/notification.lo: ../../include/net-snmp/library/int64.h +./examples/notification.lo: ../../include/net-snmp/library/mt_support.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/notification.lo: ../../include/net-snmp/library/data_list.h +./examples/notification.lo: ../../include/net-snmp/library/check_varbind.h +./examples/notification.lo: ../../include/net-snmp/library/container.h +./examples/notification.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/notification.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/notification.lo: ../../include/net-snmp/library/container_iterator.h +./examples/notification.lo: ../../include/net-snmp/library/container.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/notification.lo: ../../include/net-snmp/version.h +./examples/notification.lo: ../../include/net-snmp/config_api.h +./examples/notification.lo: ../../include/net-snmp/library/read_config.h +./examples/notification.lo: ../../include/net-snmp/library/default_store.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/notification.lo: ../../include/net-snmp/library/vacm.h +./examples/notification.lo: ../../include/net-snmp/snmpv3_api.h +./examples/notification.lo: ../../include/net-snmp/library/snmpv3.h +./examples/notification.lo: ../../include/net-snmp/library/transform_oids.h +./examples/notification.lo: ../../include/net-snmp/library/keytools.h +./examples/notification.lo: ../../include/net-snmp/library/scapi.h +./examples/notification.lo: ../../include/net-snmp/library/lcd_time.h +./examples/notification.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/notification.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/notification.lo: ../../include/net-snmp/library/snmpusm.h +./examples/notification.lo: ../../include/net-snmp/library/snmptsm.h +./examples/notification.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/notification.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/notification.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/notification.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/notification.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/notification.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/notification.lo: ../../include/net-snmp/agent/var_struct.h +./examples/notification.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/notification.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/notification.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/notification.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/notification.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/notification.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/notification.lo: ../../include/net-snmp/agent/instance.h +./examples/notification.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/notification.lo: ../../include/net-snmp/agent/scalar.h +./examples/notification.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/notification.lo: ../../include/net-snmp/agent/watcher.h +./examples/notification.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/notification.lo: ../../include/net-snmp/agent/null.h +./examples/notification.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/notification.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/notification.lo: ../../include/net-snmp/agent/old_api.h +./examples/notification.lo: ../../include/net-snmp/agent/read_only.h +./examples/notification.lo: ../../include/net-snmp/agent/row_merge.h +./examples/notification.lo: ../../include/net-snmp/agent/serialize.h +./examples/notification.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/notification.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/notification.lo: ../../include/net-snmp/agent/table.h +./examples/notification.lo: ../../include/net-snmp/agent/table_data.h +./examples/notification.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/notification.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/notification.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/notification.lo: ../../include/net-snmp/agent/table_container.h +./examples/notification.lo: ../../include/net-snmp/agent/table_array.h +./examples/notification.lo: ../../include/net-snmp/agent/mfd.h +./examples/notification.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/notification.lo: notification.h +./examples/scalar_int.lo: ../../include/net-snmp/net-snmp-config.h +./examples/scalar_int.lo: ../../include/net-snmp/net-snmp-features.h +./examples/scalar_int.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/scalar_int.lo: ../../include/net-snmp/definitions.h +./examples/scalar_int.lo: ../../include/net-snmp/types.h +./examples/scalar_int.lo: ../../include/net-snmp/library/oid.h +./examples/scalar_int.lo: ../../include/net-snmp/library/types.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_api.h +./examples/scalar_int.lo: ../../include/net-snmp/varbind_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_client.h +./examples/scalar_int.lo: ../../include/net-snmp/pdu_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/asn1.h +./examples/scalar_int.lo: ../../include/net-snmp/output_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/scalar_int.lo: ../../include/net-snmp/session_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/callback.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_service.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/scalar_int.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/scalar_int.lo: ../../include/net-snmp/library/mib.h +./examples/scalar_int.lo: ../../include/net-snmp/mib_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/parse.h +./examples/scalar_int.lo: ../../include/net-snmp/library/oid_stash.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/scalar_int.lo: ../../include/net-snmp/library/getopt.h +./examples/scalar_int.lo: ../../include/net-snmp/utilities.h +./examples/scalar_int.lo: ../../include/net-snmp/library/system.h +./examples/scalar_int.lo: ../../include/net-snmp/library/tools.h +./examples/scalar_int.lo: ../../include/net-snmp/library/int64.h +./examples/scalar_int.lo: ../../include/net-snmp/library/mt_support.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/scalar_int.lo: ../../include/net-snmp/library/data_list.h +./examples/scalar_int.lo: ../../include/net-snmp/library/check_varbind.h +./examples/scalar_int.lo: ../../include/net-snmp/library/container.h +./examples/scalar_int.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/scalar_int.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/scalar_int.lo: ../../include/net-snmp/library/container_iterator.h +./examples/scalar_int.lo: ../../include/net-snmp/library/container.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/scalar_int.lo: ../../include/net-snmp/version.h +./examples/scalar_int.lo: ../../include/net-snmp/config_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/read_config.h +./examples/scalar_int.lo: ../../include/net-snmp/library/default_store.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/scalar_int.lo: ../../include/net-snmp/library/vacm.h +./examples/scalar_int.lo: ../../include/net-snmp/snmpv3_api.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpv3.h +./examples/scalar_int.lo: ../../include/net-snmp/library/transform_oids.h +./examples/scalar_int.lo: ../../include/net-snmp/library/keytools.h +./examples/scalar_int.lo: ../../include/net-snmp/library/scapi.h +./examples/scalar_int.lo: ../../include/net-snmp/library/lcd_time.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmpusm.h +./examples/scalar_int.lo: ../../include/net-snmp/library/snmptsm.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/var_struct.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/scalar_int.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/instance.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/scalar.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/watcher.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/null.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/old_api.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/read_only.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/row_merge.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/serialize.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table_data.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table_container.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/table_array.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/mfd.h +./examples/scalar_int.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/net-snmp-config.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/definitions.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/types.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/oid.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/types.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/varbind_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_client.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/pdu_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/asn1.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/output_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/session_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/callback.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_service.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/mib.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/mib_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/parse.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/oid_stash.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/net-snmp-features.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/getopt.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/utilities.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/system.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/tools.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/int64.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/mt_support.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/data_list.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/check_varbind.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container_iterator.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/container.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/version.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/config_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/read_config.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/default_store.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/vacm.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/snmpv3_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpv3.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/transform_oids.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/keytools.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/scapi.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/lcd_time.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmpusm.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/snmptsm.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/var_struct.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/instance.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/scalar.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/watcher.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/null.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/old_api.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/read_only.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/row_merge.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/serialize.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_data.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_container.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/table_array.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/mfd.h +./examples/ucdDemoPublic.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./examples/ucdDemoPublic.lo: util_funcs/header_generic.h +./examples/ucdDemoPublic.lo: ./examples/ucdDemoPublic.h +./examples/watched.lo: ../../include/net-snmp/net-snmp-config.h +./examples/watched.lo: ../../include/net-snmp/net-snmp-includes.h +./examples/watched.lo: ../../include/net-snmp/definitions.h +./examples/watched.lo: ../../include/net-snmp/types.h +./examples/watched.lo: ../../include/net-snmp/library/oid.h +./examples/watched.lo: ../../include/net-snmp/library/types.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_api.h +./examples/watched.lo: ../../include/net-snmp/varbind_api.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_client.h +./examples/watched.lo: ../../include/net-snmp/pdu_api.h +./examples/watched.lo: ../../include/net-snmp/library/asn1.h +./examples/watched.lo: ../../include/net-snmp/output_api.h +./examples/watched.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_debug.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_logging.h +./examples/watched.lo: ../../include/net-snmp/session_api.h +./examples/watched.lo: ../../include/net-snmp/library/callback.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_transport.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_service.h +./examples/watched.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./examples/watched.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./examples/watched.lo: ../../include/net-snmp/library/ucd_compat.h +./examples/watched.lo: ../../include/net-snmp/library/mib.h +./examples/watched.lo: ../../include/net-snmp/mib_api.h +./examples/watched.lo: ../../include/net-snmp/library/parse.h +./examples/watched.lo: ../../include/net-snmp/library/oid_stash.h +./examples/watched.lo: ../../include/net-snmp/net-snmp-features.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_impl.h +./examples/watched.lo: ../../include/net-snmp/library/snmp.h +./examples/watched.lo: ../../include/net-snmp/library/snmp-tc.h +./examples/watched.lo: ../../include/net-snmp/library/getopt.h +./examples/watched.lo: ../../include/net-snmp/utilities.h +./examples/watched.lo: ../../include/net-snmp/library/system.h +./examples/watched.lo: ../../include/net-snmp/library/tools.h +./examples/watched.lo: ../../include/net-snmp/library/int64.h +./examples/watched.lo: ../../include/net-snmp/library/mt_support.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_alarm.h +./examples/watched.lo: ../../include/net-snmp/library/data_list.h +./examples/watched.lo: ../../include/net-snmp/library/check_varbind.h +./examples/watched.lo: ../../include/net-snmp/library/container.h +./examples/watched.lo: ../../include/net-snmp/library/container_binary_array.h +./examples/watched.lo: ../../include/net-snmp/library/container_list_ssll.h +./examples/watched.lo: ../../include/net-snmp/library/container_iterator.h +./examples/watched.lo: ../../include/net-snmp/library/container.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_assert.h +./examples/watched.lo: ../../include/net-snmp/version.h +./examples/watched.lo: ../../include/net-snmp/config_api.h +./examples/watched.lo: ../../include/net-snmp/library/read_config.h +./examples/watched.lo: ../../include/net-snmp/library/default_store.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_parse_args.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_enum.h +./examples/watched.lo: ../../include/net-snmp/library/vacm.h +./examples/watched.lo: ../../include/net-snmp/snmpv3_api.h +./examples/watched.lo: ../../include/net-snmp/library/snmpv3.h +./examples/watched.lo: ../../include/net-snmp/library/transform_oids.h +./examples/watched.lo: ../../include/net-snmp/library/keytools.h +./examples/watched.lo: ../../include/net-snmp/library/scapi.h +./examples/watched.lo: ../../include/net-snmp/library/lcd_time.h +./examples/watched.lo: ../../include/net-snmp/library/snmp_secmod.h +./examples/watched.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./examples/watched.lo: ../../include/net-snmp/library/snmpusm.h +./examples/watched.lo: ../../include/net-snmp/library/snmptsm.h +./examples/watched.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./examples/watched.lo: ../../include/net-snmp/agent/mib_module_config.h +./examples/watched.lo: ../../include/net-snmp/agent/agent_module_config.h +./examples/watched.lo: ../../include/net-snmp/agent/snmp_agent.h +./examples/watched.lo: ../../include/net-snmp/agent/snmp_vars.h +./examples/watched.lo: ../../include/net-snmp/agent/agent_handler.h +./examples/watched.lo: ../../include/net-snmp/agent/var_struct.h +./examples/watched.lo: ../../include/net-snmp/agent/agent_registry.h +./examples/watched.lo: ../../include/net-snmp/library/fd_event_manager.h +./examples/watched.lo: ../../include/net-snmp/agent/ds_agent.h +./examples/watched.lo: ../../include/net-snmp/agent/agent_read_config.h +./examples/watched.lo: ../../include/net-snmp/agent/agent_trap.h +./examples/watched.lo: ../../include/net-snmp/agent/all_helpers.h +./examples/watched.lo: ../../include/net-snmp/agent/instance.h +./examples/watched.lo: ../../include/net-snmp/agent/baby_steps.h +./examples/watched.lo: ../../include/net-snmp/agent/scalar.h +./examples/watched.lo: ../../include/net-snmp/agent/scalar_group.h +./examples/watched.lo: ../../include/net-snmp/agent/watcher.h +./examples/watched.lo: ../../include/net-snmp/agent/multiplexer.h +./examples/watched.lo: ../../include/net-snmp/agent/null.h +./examples/watched.lo: ../../include/net-snmp/agent/debug_handler.h +./examples/watched.lo: ../../include/net-snmp/agent/cache_handler.h +./examples/watched.lo: ../../include/net-snmp/agent/old_api.h +./examples/watched.lo: ../../include/net-snmp/agent/read_only.h +./examples/watched.lo: ../../include/net-snmp/agent/row_merge.h +./examples/watched.lo: ../../include/net-snmp/agent/serialize.h +./examples/watched.lo: ../../include/net-snmp/agent/bulk_to_next.h +./examples/watched.lo: ../../include/net-snmp/agent/mode_end_call.h +./examples/watched.lo: ../../include/net-snmp/agent/table.h +./examples/watched.lo: ../../include/net-snmp/agent/table_data.h +./examples/watched.lo: ../../include/net-snmp/agent/table_dataset.h +./examples/watched.lo: ../../include/net-snmp/agent/table_tdata.h +./examples/watched.lo: ../../include/net-snmp/agent/table_iterator.h +./examples/watched.lo: ../../include/net-snmp/agent/table_container.h +./examples/watched.lo: ../../include/net-snmp/agent/table_array.h +./examples/watched.lo: ../../include/net-snmp/agent/mfd.h +./examples/watched.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/net-snmp-config.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/definitions.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/types.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/oid.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/types.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/varbind_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_client.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/pdu_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/asn1.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/output_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/session_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/callback.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_service.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/mib.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/mib_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/parse.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/oid_stash.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/net-snmp-features.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/getopt.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/utilities.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/system.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/tools.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/int64.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/mt_support.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/data_list.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/check_varbind.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container_iterator.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/container.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/version.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/config_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/read_config.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/default_store.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/vacm.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/snmpv3_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpv3.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/transform_oids.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/keytools.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/scapi.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/lcd_time.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmpusm.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/snmptsm.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/var_struct.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/instance.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/scalar.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/watcher.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/null.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/old_api.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/read_only.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/row_merge.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/serialize.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_data.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_container.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/table_array.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/mfd.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hrSWInstalledTable.lo: ../../include/net-snmp/data_access/swinst.h +./host/hrSWInstalledTable.lo: ./host/hrSWInstalledTable.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/net-snmp-config.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/definitions.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/types.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/oid.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/types.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/varbind_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_client.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/pdu_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/asn1.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/output_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/session_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/callback.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_service.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/mib.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/mib_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/parse.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/oid_stash.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/net-snmp-features.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/getopt.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/utilities.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/system.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/tools.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/int64.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/mt_support.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/data_list.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/check_varbind.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container_iterator.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/container.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/version.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/config_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/read_config.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/default_store.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/vacm.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/snmpv3_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpv3.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/transform_oids.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/keytools.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/scapi.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/lcd_time.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmpusm.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/snmptsm.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/var_struct.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/instance.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/scalar.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/watcher.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/null.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/old_api.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/read_only.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/row_merge.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/serialize.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_data.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_container.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/table_array.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/mfd.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hrSWRunPerfTable.lo: ../../include/net-snmp/data_access/swrun.h +./host/hrSWRunPerfTable.lo: ./host/hrSWRunPerfTable.h +./host/hrSWRunPerfTable.lo: ./host/data_access/swrun.h +./host/hrSWRunTable.lo: ../../include/net-snmp/net-snmp-config.h +./host/hrSWRunTable.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hrSWRunTable.lo: ../../include/net-snmp/definitions.h +./host/hrSWRunTable.lo: ../../include/net-snmp/types.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/oid.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/types.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/varbind_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_client.h +./host/hrSWRunTable.lo: ../../include/net-snmp/pdu_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/asn1.h +./host/hrSWRunTable.lo: ../../include/net-snmp/output_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hrSWRunTable.lo: ../../include/net-snmp/session_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/callback.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_service.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/mib.h +./host/hrSWRunTable.lo: ../../include/net-snmp/mib_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/parse.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/oid_stash.h +./host/hrSWRunTable.lo: ../../include/net-snmp/net-snmp-features.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/getopt.h +./host/hrSWRunTable.lo: ../../include/net-snmp/utilities.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/system.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/tools.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/int64.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/mt_support.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/data_list.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/check_varbind.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/container.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/container_iterator.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/container.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hrSWRunTable.lo: ../../include/net-snmp/version.h +./host/hrSWRunTable.lo: ../../include/net-snmp/config_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/read_config.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/default_store.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/vacm.h +./host/hrSWRunTable.lo: ../../include/net-snmp/snmpv3_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpv3.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/transform_oids.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/keytools.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/scapi.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/lcd_time.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmpusm.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/snmptsm.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/var_struct.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hrSWRunTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/instance.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/scalar.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/watcher.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/null.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/old_api.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/read_only.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/row_merge.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/serialize.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_data.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_container.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/table_array.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/mfd.h +./host/hrSWRunTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hrSWRunTable.lo: ../../include/net-snmp/data_access/swrun.h +./host/hrSWRunTable.lo: ./host/data_access/swrun.h ./host/hrSWRunTable.h +./host/hr_device.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_device.lo: host_res.h +./host/hr_device.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_device.lo: ../../include/net-snmp/definitions.h +./host/hr_device.lo: ../../include/net-snmp/types.h +./host/hr_device.lo: ../../include/net-snmp/library/oid.h +./host/hr_device.lo: ../../include/net-snmp/library/types.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_device.lo: ../../include/net-snmp/varbind_api.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_device.lo: ../../include/net-snmp/pdu_api.h +./host/hr_device.lo: ../../include/net-snmp/library/asn1.h +./host/hr_device.lo: ../../include/net-snmp/output_api.h +./host/hr_device.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_device.lo: ../../include/net-snmp/session_api.h +./host/hr_device.lo: ../../include/net-snmp/library/callback.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_device.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_device.lo: ../../include/net-snmp/library/mib.h +./host/hr_device.lo: ../../include/net-snmp/mib_api.h +./host/hr_device.lo: ../../include/net-snmp/library/parse.h +./host/hr_device.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_device.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_device.lo: ../../include/net-snmp/library/getopt.h +./host/hr_device.lo: ../../include/net-snmp/utilities.h +./host/hr_device.lo: ../../include/net-snmp/library/system.h +./host/hr_device.lo: ../../include/net-snmp/library/tools.h +./host/hr_device.lo: ../../include/net-snmp/library/int64.h +./host/hr_device.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_device.lo: ../../include/net-snmp/library/data_list.h +./host/hr_device.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_device.lo: ../../include/net-snmp/library/container.h +./host/hr_device.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_device.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_device.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_device.lo: ../../include/net-snmp/library/container.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_device.lo: ../../include/net-snmp/version.h +./host/hr_device.lo: ../../include/net-snmp/config_api.h +./host/hr_device.lo: ../../include/net-snmp/library/read_config.h +./host/hr_device.lo: ../../include/net-snmp/library/default_store.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_device.lo: ../../include/net-snmp/library/vacm.h +./host/hr_device.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_device.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_device.lo: ../../include/net-snmp/library/keytools.h +./host/hr_device.lo: ../../include/net-snmp/library/scapi.h +./host/hr_device.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_device.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_device.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_device.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_device.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_device.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_device.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_device.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_device.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_device.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_device.lo: ./host/hr_device.h +./host/hr_disk.lo: ../../include/net-snmp/net-snmp-config.h host_res.h +./host/hr_disk.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_disk.lo: ../../include/net-snmp/definitions.h +./host/hr_disk.lo: ../../include/net-snmp/types.h +./host/hr_disk.lo: ../../include/net-snmp/library/oid.h +./host/hr_disk.lo: ../../include/net-snmp/library/types.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_disk.lo: ../../include/net-snmp/varbind_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_disk.lo: ../../include/net-snmp/pdu_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/asn1.h +./host/hr_disk.lo: ../../include/net-snmp/output_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_disk.lo: ../../include/net-snmp/session_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/callback.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_disk.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_disk.lo: ../../include/net-snmp/library/mib.h +./host/hr_disk.lo: ../../include/net-snmp/mib_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/parse.h +./host/hr_disk.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_disk.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_disk.lo: ../../include/net-snmp/library/getopt.h +./host/hr_disk.lo: ../../include/net-snmp/utilities.h +./host/hr_disk.lo: ../../include/net-snmp/library/system.h +./host/hr_disk.lo: ../../include/net-snmp/library/tools.h +./host/hr_disk.lo: ../../include/net-snmp/library/int64.h +./host/hr_disk.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_disk.lo: ../../include/net-snmp/library/data_list.h +./host/hr_disk.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_disk.lo: ../../include/net-snmp/library/container.h +./host/hr_disk.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_disk.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_disk.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_disk.lo: ../../include/net-snmp/library/container.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_disk.lo: ../../include/net-snmp/version.h +./host/hr_disk.lo: ../../include/net-snmp/config_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/read_config.h +./host/hr_disk.lo: ../../include/net-snmp/library/default_store.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_disk.lo: ../../include/net-snmp/library/vacm.h +./host/hr_disk.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_disk.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_disk.lo: ../../include/net-snmp/library/keytools.h +./host/hr_disk.lo: ../../include/net-snmp/library/scapi.h +./host/hr_disk.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_disk.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_disk.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_disk.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_disk.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_disk.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_disk.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_disk.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_disk.lo: ./host/hr_disk.h +./host/hr_disk.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_filesys.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_filesys.lo: ../../include/net-snmp/definitions.h +./host/hr_filesys.lo: ../../include/net-snmp/types.h +./host/hr_filesys.lo: ../../include/net-snmp/library/oid.h +./host/hr_filesys.lo: ../../include/net-snmp/library/types.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_filesys.lo: ../../include/net-snmp/varbind_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_filesys.lo: ../../include/net-snmp/pdu_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/asn1.h +./host/hr_filesys.lo: ../../include/net-snmp/output_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_filesys.lo: ../../include/net-snmp/session_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/callback.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_filesys.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_filesys.lo: ../../include/net-snmp/library/mib.h +./host/hr_filesys.lo: ../../include/net-snmp/mib_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/parse.h +./host/hr_filesys.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_filesys.lo: ../../include/net-snmp/library/getopt.h +./host/hr_filesys.lo: ../../include/net-snmp/utilities.h +./host/hr_filesys.lo: ../../include/net-snmp/library/system.h +./host/hr_filesys.lo: ../../include/net-snmp/library/tools.h +./host/hr_filesys.lo: ../../include/net-snmp/library/int64.h +./host/hr_filesys.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_filesys.lo: ../../include/net-snmp/library/data_list.h +./host/hr_filesys.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_filesys.lo: ../../include/net-snmp/library/container.h +./host/hr_filesys.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_filesys.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_filesys.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_filesys.lo: ../../include/net-snmp/library/container.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_filesys.lo: ../../include/net-snmp/version.h +./host/hr_filesys.lo: ../../include/net-snmp/config_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/read_config.h +./host/hr_filesys.lo: ../../include/net-snmp/library/default_store.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_filesys.lo: ../../include/net-snmp/library/vacm.h +./host/hr_filesys.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_filesys.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_filesys.lo: ../../include/net-snmp/library/keytools.h +./host/hr_filesys.lo: ../../include/net-snmp/library/scapi.h +./host/hr_filesys.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_filesys.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_filesys.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/instance.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/scalar.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/watcher.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/null.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/old_api.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/read_only.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/row_merge.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/serialize.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table_data.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table_container.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/table_array.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/mfd.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hr_filesys.lo: ../../include/net-snmp/agent/hardware/memory.h +./host/hr_filesys.lo: host_res.h ./host/hr_filesys.h ./host/hr_storage.h +./host/hr_filesys.lo: ./host/hr_disk.h +./host/hr_network.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_network.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_network.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_network.lo: ../../include/net-snmp/definitions.h +./host/hr_network.lo: ../../include/net-snmp/types.h +./host/hr_network.lo: ../../include/net-snmp/library/oid.h +./host/hr_network.lo: ../../include/net-snmp/library/types.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_network.lo: ../../include/net-snmp/varbind_api.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_network.lo: ../../include/net-snmp/pdu_api.h +./host/hr_network.lo: ../../include/net-snmp/library/asn1.h +./host/hr_network.lo: ../../include/net-snmp/output_api.h +./host/hr_network.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_network.lo: ../../include/net-snmp/session_api.h +./host/hr_network.lo: ../../include/net-snmp/library/callback.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_network.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_network.lo: ../../include/net-snmp/library/mib.h +./host/hr_network.lo: ../../include/net-snmp/mib_api.h +./host/hr_network.lo: ../../include/net-snmp/library/parse.h +./host/hr_network.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_network.lo: ../../include/net-snmp/library/getopt.h +./host/hr_network.lo: ../../include/net-snmp/utilities.h +./host/hr_network.lo: ../../include/net-snmp/library/system.h +./host/hr_network.lo: ../../include/net-snmp/library/tools.h +./host/hr_network.lo: ../../include/net-snmp/library/int64.h +./host/hr_network.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_network.lo: ../../include/net-snmp/library/data_list.h +./host/hr_network.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_network.lo: ../../include/net-snmp/library/container.h +./host/hr_network.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_network.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_network.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_network.lo: ../../include/net-snmp/library/container.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_network.lo: ../../include/net-snmp/version.h +./host/hr_network.lo: ../../include/net-snmp/config_api.h +./host/hr_network.lo: ../../include/net-snmp/library/read_config.h +./host/hr_network.lo: ../../include/net-snmp/library/default_store.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_network.lo: ../../include/net-snmp/library/vacm.h +./host/hr_network.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_network.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_network.lo: ../../include/net-snmp/library/keytools.h +./host/hr_network.lo: ../../include/net-snmp/library/scapi.h +./host/hr_network.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_network.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_network.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_network.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_network.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hr_network.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hr_network.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hr_network.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_network.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_network.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_network.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_network.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_network.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_network.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hr_network.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hr_network.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hr_network.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hr_network.lo: ../../include/net-snmp/agent/instance.h +./host/hr_network.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hr_network.lo: ../../include/net-snmp/agent/scalar.h +./host/hr_network.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hr_network.lo: ../../include/net-snmp/agent/watcher.h +./host/hr_network.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hr_network.lo: ../../include/net-snmp/agent/null.h +./host/hr_network.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hr_network.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hr_network.lo: ../../include/net-snmp/agent/old_api.h +./host/hr_network.lo: ../../include/net-snmp/agent/read_only.h +./host/hr_network.lo: ../../include/net-snmp/agent/row_merge.h +./host/hr_network.lo: ../../include/net-snmp/agent/serialize.h +./host/hr_network.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hr_network.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hr_network.lo: ../../include/net-snmp/agent/table.h +./host/hr_network.lo: ../../include/net-snmp/agent/table_data.h +./host/hr_network.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hr_network.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hr_network.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hr_network.lo: ../../include/net-snmp/agent/table_container.h +./host/hr_network.lo: ../../include/net-snmp/agent/table_array.h +./host/hr_network.lo: ../../include/net-snmp/agent/mfd.h +./host/hr_network.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hr_network.lo: ../../include/net-snmp/data_access/interface.h +./host/hr_network.lo: host_res.h mibII/interfaces.h ./host/hr_network.h +./host/hr_other.lo: ../../include/net-snmp/net-snmp-config.h host_res.h +./host/hr_other.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_other.lo: ../../include/net-snmp/definitions.h +./host/hr_other.lo: ../../include/net-snmp/types.h +./host/hr_other.lo: ../../include/net-snmp/library/oid.h +./host/hr_other.lo: ../../include/net-snmp/library/types.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_other.lo: ../../include/net-snmp/varbind_api.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_other.lo: ../../include/net-snmp/pdu_api.h +./host/hr_other.lo: ../../include/net-snmp/library/asn1.h +./host/hr_other.lo: ../../include/net-snmp/output_api.h +./host/hr_other.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_other.lo: ../../include/net-snmp/session_api.h +./host/hr_other.lo: ../../include/net-snmp/library/callback.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_other.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_other.lo: ../../include/net-snmp/library/mib.h +./host/hr_other.lo: ../../include/net-snmp/mib_api.h +./host/hr_other.lo: ../../include/net-snmp/library/parse.h +./host/hr_other.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_other.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_other.lo: ../../include/net-snmp/library/getopt.h +./host/hr_other.lo: ../../include/net-snmp/utilities.h +./host/hr_other.lo: ../../include/net-snmp/library/system.h +./host/hr_other.lo: ../../include/net-snmp/library/tools.h +./host/hr_other.lo: ../../include/net-snmp/library/int64.h +./host/hr_other.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_other.lo: ../../include/net-snmp/library/data_list.h +./host/hr_other.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_other.lo: ../../include/net-snmp/library/container.h +./host/hr_other.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_other.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_other.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_other.lo: ../../include/net-snmp/library/container.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_other.lo: ../../include/net-snmp/version.h +./host/hr_other.lo: ../../include/net-snmp/config_api.h +./host/hr_other.lo: ../../include/net-snmp/library/read_config.h +./host/hr_other.lo: ../../include/net-snmp/library/default_store.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_other.lo: ../../include/net-snmp/library/vacm.h +./host/hr_other.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_other.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_other.lo: ../../include/net-snmp/library/keytools.h +./host/hr_other.lo: ../../include/net-snmp/library/scapi.h +./host/hr_other.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_other.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_other.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_other.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_other.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_other.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_other.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_other.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_other.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_other.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_other.lo: ./host/hr_other.h +./host/hr_partition.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_partition.lo: host_res.h +./host/hr_partition.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_partition.lo: ../../include/net-snmp/definitions.h +./host/hr_partition.lo: ../../include/net-snmp/types.h +./host/hr_partition.lo: ../../include/net-snmp/library/oid.h +./host/hr_partition.lo: ../../include/net-snmp/library/types.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_partition.lo: ../../include/net-snmp/varbind_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_partition.lo: ../../include/net-snmp/pdu_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/asn1.h +./host/hr_partition.lo: ../../include/net-snmp/output_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_partition.lo: ../../include/net-snmp/session_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/callback.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_partition.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_partition.lo: ../../include/net-snmp/library/mib.h +./host/hr_partition.lo: ../../include/net-snmp/mib_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/parse.h +./host/hr_partition.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_partition.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_partition.lo: ../../include/net-snmp/library/getopt.h +./host/hr_partition.lo: ../../include/net-snmp/utilities.h +./host/hr_partition.lo: ../../include/net-snmp/library/system.h +./host/hr_partition.lo: ../../include/net-snmp/library/tools.h +./host/hr_partition.lo: ../../include/net-snmp/library/int64.h +./host/hr_partition.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_partition.lo: ../../include/net-snmp/library/data_list.h +./host/hr_partition.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_partition.lo: ../../include/net-snmp/library/container.h +./host/hr_partition.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_partition.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_partition.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_partition.lo: ../../include/net-snmp/library/container.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_partition.lo: ../../include/net-snmp/version.h +./host/hr_partition.lo: ../../include/net-snmp/config_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/read_config.h +./host/hr_partition.lo: ../../include/net-snmp/library/default_store.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_partition.lo: ../../include/net-snmp/library/vacm.h +./host/hr_partition.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_partition.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_partition.lo: ../../include/net-snmp/library/keytools.h +./host/hr_partition.lo: ../../include/net-snmp/library/scapi.h +./host/hr_partition.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_partition.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_partition.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_partition.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_partition.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_partition.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_partition.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_partition.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_partition.lo: ./host/hr_partition.h ./host/hr_filesys.h +./host/hr_partition.lo: ./host/hr_disk.h +./host/hr_print.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_print.lo: host_res.h +./host/hr_print.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_print.lo: ../../include/net-snmp/definitions.h +./host/hr_print.lo: ../../include/net-snmp/types.h +./host/hr_print.lo: ../../include/net-snmp/library/oid.h +./host/hr_print.lo: ../../include/net-snmp/library/types.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_print.lo: ../../include/net-snmp/varbind_api.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_print.lo: ../../include/net-snmp/pdu_api.h +./host/hr_print.lo: ../../include/net-snmp/library/asn1.h +./host/hr_print.lo: ../../include/net-snmp/output_api.h +./host/hr_print.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_print.lo: ../../include/net-snmp/session_api.h +./host/hr_print.lo: ../../include/net-snmp/library/callback.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_print.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_print.lo: ../../include/net-snmp/library/mib.h +./host/hr_print.lo: ../../include/net-snmp/mib_api.h +./host/hr_print.lo: ../../include/net-snmp/library/parse.h +./host/hr_print.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_print.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_print.lo: ../../include/net-snmp/library/getopt.h +./host/hr_print.lo: ../../include/net-snmp/utilities.h +./host/hr_print.lo: ../../include/net-snmp/library/system.h +./host/hr_print.lo: ../../include/net-snmp/library/tools.h +./host/hr_print.lo: ../../include/net-snmp/library/int64.h +./host/hr_print.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_print.lo: ../../include/net-snmp/library/data_list.h +./host/hr_print.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_print.lo: ../../include/net-snmp/library/container.h +./host/hr_print.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_print.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_print.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_print.lo: ../../include/net-snmp/library/container.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_print.lo: ../../include/net-snmp/version.h +./host/hr_print.lo: ../../include/net-snmp/config_api.h +./host/hr_print.lo: ../../include/net-snmp/library/read_config.h +./host/hr_print.lo: ../../include/net-snmp/library/default_store.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_print.lo: ../../include/net-snmp/library/vacm.h +./host/hr_print.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_print.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_print.lo: ../../include/net-snmp/library/keytools.h +./host/hr_print.lo: ../../include/net-snmp/library/scapi.h +./host/hr_print.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_print.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_print.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_print.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_print.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_print.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_print.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_print.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_print.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_print.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_print.lo: ./host/hr_print.h struct.h util_funcs.h +./host/hr_print.lo: util_funcs/header_generic.h +./host/hr_print.lo: util_funcs/header_simple_table.h +./host/hr_print.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h +./host/hr_proc.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_proc.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_proc.lo: ../../include/net-snmp/definitions.h +./host/hr_proc.lo: ../../include/net-snmp/types.h +./host/hr_proc.lo: ../../include/net-snmp/library/oid.h +./host/hr_proc.lo: ../../include/net-snmp/library/types.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_proc.lo: ../../include/net-snmp/varbind_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_proc.lo: ../../include/net-snmp/pdu_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/asn1.h +./host/hr_proc.lo: ../../include/net-snmp/output_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_proc.lo: ../../include/net-snmp/session_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/callback.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_proc.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_proc.lo: ../../include/net-snmp/library/mib.h +./host/hr_proc.lo: ../../include/net-snmp/mib_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/parse.h +./host/hr_proc.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_proc.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_proc.lo: ../../include/net-snmp/library/getopt.h +./host/hr_proc.lo: ../../include/net-snmp/utilities.h +./host/hr_proc.lo: ../../include/net-snmp/library/system.h +./host/hr_proc.lo: ../../include/net-snmp/library/tools.h +./host/hr_proc.lo: ../../include/net-snmp/library/int64.h +./host/hr_proc.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_proc.lo: ../../include/net-snmp/library/data_list.h +./host/hr_proc.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_proc.lo: ../../include/net-snmp/library/container.h +./host/hr_proc.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_proc.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_proc.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_proc.lo: ../../include/net-snmp/library/container.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_proc.lo: ../../include/net-snmp/version.h +./host/hr_proc.lo: ../../include/net-snmp/config_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/read_config.h +./host/hr_proc.lo: ../../include/net-snmp/library/default_store.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_proc.lo: ../../include/net-snmp/library/vacm.h +./host/hr_proc.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_proc.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_proc.lo: ../../include/net-snmp/library/keytools.h +./host/hr_proc.lo: ../../include/net-snmp/library/scapi.h +./host/hr_proc.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_proc.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_proc.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hr_proc.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hr_proc.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_proc.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_proc.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_proc.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_proc.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_proc.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hr_proc.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hr_proc.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hr_proc.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hr_proc.lo: ../../include/net-snmp/agent/instance.h +./host/hr_proc.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hr_proc.lo: ../../include/net-snmp/agent/scalar.h +./host/hr_proc.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hr_proc.lo: ../../include/net-snmp/agent/watcher.h +./host/hr_proc.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hr_proc.lo: ../../include/net-snmp/agent/null.h +./host/hr_proc.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hr_proc.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hr_proc.lo: ../../include/net-snmp/agent/old_api.h +./host/hr_proc.lo: ../../include/net-snmp/agent/read_only.h +./host/hr_proc.lo: ../../include/net-snmp/agent/row_merge.h +./host/hr_proc.lo: ../../include/net-snmp/agent/serialize.h +./host/hr_proc.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hr_proc.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table_data.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table_container.h +./host/hr_proc.lo: ../../include/net-snmp/agent/table_array.h +./host/hr_proc.lo: ../../include/net-snmp/agent/mfd.h +./host/hr_proc.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hr_proc.lo: host_res.h ./host/hr_proc.h +./host/hr_proc.lo: ../../include/net-snmp/agent/auto_nlist.h +./host/hr_proc.lo: ../../include/net-snmp/agent/hardware/cpu.h +./host/hr_proc.lo: ucd-snmp/loadave.h mibdefs.h +./host/hr_storage.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_storage.lo: host_res.h +./host/hr_storage.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_storage.lo: ../../include/net-snmp/definitions.h +./host/hr_storage.lo: ../../include/net-snmp/types.h +./host/hr_storage.lo: ../../include/net-snmp/library/oid.h +./host/hr_storage.lo: ../../include/net-snmp/library/types.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_storage.lo: ../../include/net-snmp/varbind_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_storage.lo: ../../include/net-snmp/pdu_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/asn1.h +./host/hr_storage.lo: ../../include/net-snmp/output_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_storage.lo: ../../include/net-snmp/session_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/callback.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_storage.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_storage.lo: ../../include/net-snmp/library/mib.h +./host/hr_storage.lo: ../../include/net-snmp/mib_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/parse.h +./host/hr_storage.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_storage.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_storage.lo: ../../include/net-snmp/library/getopt.h +./host/hr_storage.lo: ../../include/net-snmp/utilities.h +./host/hr_storage.lo: ../../include/net-snmp/library/system.h +./host/hr_storage.lo: ../../include/net-snmp/library/tools.h +./host/hr_storage.lo: ../../include/net-snmp/library/int64.h +./host/hr_storage.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_storage.lo: ../../include/net-snmp/library/data_list.h +./host/hr_storage.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_storage.lo: ../../include/net-snmp/library/container.h +./host/hr_storage.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_storage.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_storage.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_storage.lo: ../../include/net-snmp/library/container.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_storage.lo: ../../include/net-snmp/version.h +./host/hr_storage.lo: ../../include/net-snmp/config_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/read_config.h +./host/hr_storage.lo: ../../include/net-snmp/library/default_store.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_storage.lo: ../../include/net-snmp/library/vacm.h +./host/hr_storage.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_storage.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_storage.lo: ../../include/net-snmp/library/keytools.h +./host/hr_storage.lo: ../../include/net-snmp/library/scapi.h +./host/hr_storage.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_storage.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_storage.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_storage.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_storage.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_storage.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_storage.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_storage.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_storage.lo: ./host/hr_storage.h ./host/hr_filesys.h +./host/hr_storage.lo: ../../include/net-snmp/agent/auto_nlist.h +./host/hr_storage.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hr_storage.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hr_storage.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hr_storage.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hr_storage.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hr_storage.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hr_storage.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hr_storage.lo: ../../include/net-snmp/agent/instance.h +./host/hr_storage.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hr_storage.lo: ../../include/net-snmp/agent/scalar.h +./host/hr_storage.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hr_storage.lo: ../../include/net-snmp/agent/watcher.h +./host/hr_storage.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hr_storage.lo: ../../include/net-snmp/agent/null.h +./host/hr_storage.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hr_storage.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hr_storage.lo: ../../include/net-snmp/agent/old_api.h +./host/hr_storage.lo: ../../include/net-snmp/agent/read_only.h +./host/hr_storage.lo: ../../include/net-snmp/agent/row_merge.h +./host/hr_storage.lo: ../../include/net-snmp/agent/serialize.h +./host/hr_storage.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hr_storage.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table_data.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table_container.h +./host/hr_storage.lo: ../../include/net-snmp/agent/table_array.h +./host/hr_storage.lo: ../../include/net-snmp/agent/mfd.h +./host/hr_storage.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hr_storage.lo: ../../include/net-snmp/agent/hardware/memory.h +./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_swinst.lo: host_res.h +./host/hr_swinst.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_swinst.lo: ../../include/net-snmp/definitions.h +./host/hr_swinst.lo: ../../include/net-snmp/types.h +./host/hr_swinst.lo: ../../include/net-snmp/library/oid.h +./host/hr_swinst.lo: ../../include/net-snmp/library/types.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_swinst.lo: ../../include/net-snmp/varbind_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_swinst.lo: ../../include/net-snmp/pdu_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/asn1.h +./host/hr_swinst.lo: ../../include/net-snmp/output_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_swinst.lo: ../../include/net-snmp/session_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/callback.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_swinst.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_swinst.lo: ../../include/net-snmp/library/mib.h +./host/hr_swinst.lo: ../../include/net-snmp/mib_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/parse.h +./host/hr_swinst.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_swinst.lo: ../../include/net-snmp/library/getopt.h +./host/hr_swinst.lo: ../../include/net-snmp/utilities.h +./host/hr_swinst.lo: ../../include/net-snmp/library/system.h +./host/hr_swinst.lo: ../../include/net-snmp/library/tools.h +./host/hr_swinst.lo: ../../include/net-snmp/library/int64.h +./host/hr_swinst.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_swinst.lo: ../../include/net-snmp/library/data_list.h +./host/hr_swinst.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_swinst.lo: ../../include/net-snmp/library/container.h +./host/hr_swinst.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_swinst.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_swinst.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_swinst.lo: ../../include/net-snmp/library/container.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_swinst.lo: ../../include/net-snmp/version.h +./host/hr_swinst.lo: ../../include/net-snmp/config_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/read_config.h +./host/hr_swinst.lo: ../../include/net-snmp/library/default_store.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_swinst.lo: ../../include/net-snmp/library/vacm.h +./host/hr_swinst.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_swinst.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_swinst.lo: ../../include/net-snmp/library/keytools.h +./host/hr_swinst.lo: ../../include/net-snmp/library/scapi.h +./host/hr_swinst.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_swinst.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_swinst.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_swinst.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_swinst.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_swinst.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_swinst.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_swinst.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_swinst.lo: ./host/hr_swinst.h +./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_swrun.lo: ../../include/net-snmp/output_api.h +./host/hr_swrun.lo: ../../include/net-snmp/types.h +./host/hr_swrun.lo: ../../include/net-snmp/library/oid.h +./host/hr_swrun.lo: ../../include/net-snmp/library/types.h +./host/hr_swrun.lo: ../../include/net-snmp/definitions.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_swrun.lo: ../../include/net-snmp/varbind_api.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_swrun.lo: ../../include/net-snmp/pdu_api.h +./host/hr_swrun.lo: ../../include/net-snmp/library/asn1.h +./host/hr_swrun.lo: ../../include/net-snmp/session_api.h +./host/hr_swrun.lo: ../../include/net-snmp/library/callback.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_swrun.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_swrun.lo: ../../include/net-snmp/library/mib.h +./host/hr_swrun.lo: ../../include/net-snmp/mib_api.h +./host/hr_swrun.lo: ../../include/net-snmp/library/parse.h +./host/hr_swrun.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_swrun.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_swrun.lo: host_res.h +./host/hr_swrun.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_swrun.lo: ../../include/net-snmp/library/getopt.h +./host/hr_swrun.lo: ../../include/net-snmp/utilities.h +./host/hr_swrun.lo: ../../include/net-snmp/library/system.h +./host/hr_swrun.lo: ../../include/net-snmp/library/tools.h +./host/hr_swrun.lo: ../../include/net-snmp/library/int64.h +./host/hr_swrun.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_swrun.lo: ../../include/net-snmp/library/data_list.h +./host/hr_swrun.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_swrun.lo: ../../include/net-snmp/library/container.h +./host/hr_swrun.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_swrun.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_swrun.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_swrun.lo: ../../include/net-snmp/library/container.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_swrun.lo: ../../include/net-snmp/version.h +./host/hr_swrun.lo: ../../include/net-snmp/config_api.h +./host/hr_swrun.lo: ../../include/net-snmp/library/read_config.h +./host/hr_swrun.lo: ../../include/net-snmp/library/default_store.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_swrun.lo: ../../include/net-snmp/library/vacm.h +./host/hr_swrun.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_swrun.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_swrun.lo: ../../include/net-snmp/library/keytools.h +./host/hr_swrun.lo: ../../include/net-snmp/library/scapi.h +./host/hr_swrun.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_swrun.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_swrun.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_swrun.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_swrun.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_swrun.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_swrun.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_swrun.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_swrun.lo: ./host/hr_swrun.h +./host/hr_swrun.lo: ../../include/net-snmp/agent/auto_nlist.h +./host/hr_swrun.lo: ../../agent/kernel.h +./host/hr_system.lo: ../../include/net-snmp/net-snmp-config.h +./host/hr_system.lo: ../../include/net-snmp/net-snmp-features.h +./host/hr_system.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hr_system.lo: ../../include/net-snmp/definitions.h +./host/hr_system.lo: ../../include/net-snmp/types.h +./host/hr_system.lo: ../../include/net-snmp/library/oid.h +./host/hr_system.lo: ../../include/net-snmp/library/types.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_api.h +./host/hr_system.lo: ../../include/net-snmp/varbind_api.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_client.h +./host/hr_system.lo: ../../include/net-snmp/pdu_api.h +./host/hr_system.lo: ../../include/net-snmp/library/asn1.h +./host/hr_system.lo: ../../include/net-snmp/output_api.h +./host/hr_system.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hr_system.lo: ../../include/net-snmp/session_api.h +./host/hr_system.lo: ../../include/net-snmp/library/callback.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_service.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hr_system.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hr_system.lo: ../../include/net-snmp/library/mib.h +./host/hr_system.lo: ../../include/net-snmp/mib_api.h +./host/hr_system.lo: ../../include/net-snmp/library/parse.h +./host/hr_system.lo: ../../include/net-snmp/library/oid_stash.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hr_system.lo: ../../include/net-snmp/library/getopt.h +./host/hr_system.lo: ../../include/net-snmp/utilities.h +./host/hr_system.lo: ../../include/net-snmp/library/system.h +./host/hr_system.lo: ../../include/net-snmp/library/tools.h +./host/hr_system.lo: ../../include/net-snmp/library/int64.h +./host/hr_system.lo: ../../include/net-snmp/library/mt_support.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hr_system.lo: ../../include/net-snmp/library/data_list.h +./host/hr_system.lo: ../../include/net-snmp/library/check_varbind.h +./host/hr_system.lo: ../../include/net-snmp/library/container.h +./host/hr_system.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hr_system.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hr_system.lo: ../../include/net-snmp/library/container_iterator.h +./host/hr_system.lo: ../../include/net-snmp/library/container.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hr_system.lo: ../../include/net-snmp/version.h +./host/hr_system.lo: ../../include/net-snmp/config_api.h +./host/hr_system.lo: ../../include/net-snmp/library/read_config.h +./host/hr_system.lo: ../../include/net-snmp/library/default_store.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hr_system.lo: ../../include/net-snmp/library/vacm.h +./host/hr_system.lo: ../../include/net-snmp/snmpv3_api.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpv3.h +./host/hr_system.lo: ../../include/net-snmp/library/transform_oids.h +./host/hr_system.lo: ../../include/net-snmp/library/keytools.h +./host/hr_system.lo: ../../include/net-snmp/library/scapi.h +./host/hr_system.lo: ../../include/net-snmp/library/lcd_time.h +./host/hr_system.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hr_system.lo: ../../include/net-snmp/library/snmpusm.h +./host/hr_system.lo: ../../include/net-snmp/library/snmptsm.h +./host/hr_system.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hr_system.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hr_system.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hr_system.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hr_system.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hr_system.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hr_system.lo: ../../include/net-snmp/agent/var_struct.h +./host/hr_system.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hr_system.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hr_system.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hr_system.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hr_system.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hr_system.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hr_system.lo: ../../include/net-snmp/agent/instance.h +./host/hr_system.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hr_system.lo: ../../include/net-snmp/agent/scalar.h +./host/hr_system.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hr_system.lo: ../../include/net-snmp/agent/watcher.h +./host/hr_system.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hr_system.lo: ../../include/net-snmp/agent/null.h +./host/hr_system.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hr_system.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hr_system.lo: ../../include/net-snmp/agent/old_api.h +./host/hr_system.lo: ../../include/net-snmp/agent/read_only.h +./host/hr_system.lo: ../../include/net-snmp/agent/row_merge.h +./host/hr_system.lo: ../../include/net-snmp/agent/serialize.h +./host/hr_system.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hr_system.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hr_system.lo: ../../include/net-snmp/agent/table.h +./host/hr_system.lo: ../../include/net-snmp/agent/table_data.h +./host/hr_system.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hr_system.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hr_system.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hr_system.lo: ../../include/net-snmp/agent/table_container.h +./host/hr_system.lo: ../../include/net-snmp/agent/table_array.h +./host/hr_system.lo: ../../include/net-snmp/agent/mfd.h +./host/hr_system.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hr_system.lo: ../../include/net-snmp/data_access/swrun.h host.h +./host/hr_system.lo: host_res.h ./host/hr_system.h +./host/hr_system.lo: ../../include/net-snmp/agent/auto_nlist.h +./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-config.h +./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-features.h +./host/hrh_filesys.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hrh_filesys.lo: ../../include/net-snmp/definitions.h +./host/hrh_filesys.lo: ../../include/net-snmp/types.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/oid.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/types.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/varbind_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_client.h +./host/hrh_filesys.lo: ../../include/net-snmp/pdu_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/asn1.h +./host/hrh_filesys.lo: ../../include/net-snmp/output_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hrh_filesys.lo: ../../include/net-snmp/session_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/callback.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_service.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/mib.h +./host/hrh_filesys.lo: ../../include/net-snmp/mib_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/parse.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/oid_stash.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/getopt.h +./host/hrh_filesys.lo: ../../include/net-snmp/utilities.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/system.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/tools.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/int64.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/mt_support.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/data_list.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/check_varbind.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/container.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/container_iterator.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/container.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hrh_filesys.lo: ../../include/net-snmp/version.h +./host/hrh_filesys.lo: ../../include/net-snmp/config_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/read_config.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/default_store.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/vacm.h +./host/hrh_filesys.lo: ../../include/net-snmp/snmpv3_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpv3.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/transform_oids.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/keytools.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/scapi.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/lcd_time.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmpusm.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/snmptsm.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/var_struct.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hrh_filesys.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/instance.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/scalar.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/watcher.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/null.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/old_api.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/read_only.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/row_merge.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/serialize.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_data.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_container.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/table_array.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/mfd.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/hardware/memory.h +./host/hrh_filesys.lo: ../../include/net-snmp/agent/hardware/fsys.h +./host/hrh_filesys.lo: host_res.h ./host/hrh_filesys.h ./host/hrh_storage.h +./host/hrh_filesys.lo: ./host/hr_disk.h ./host/hr_filesys.h +./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-config.h +./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-includes.h +./host/hrh_storage.lo: ../../include/net-snmp/definitions.h +./host/hrh_storage.lo: ../../include/net-snmp/types.h +./host/hrh_storage.lo: ../../include/net-snmp/library/oid.h +./host/hrh_storage.lo: ../../include/net-snmp/library/types.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_api.h +./host/hrh_storage.lo: ../../include/net-snmp/varbind_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_client.h +./host/hrh_storage.lo: ../../include/net-snmp/pdu_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/asn1.h +./host/hrh_storage.lo: ../../include/net-snmp/output_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_debug.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_logging.h +./host/hrh_storage.lo: ../../include/net-snmp/session_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/callback.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_transport.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_service.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./host/hrh_storage.lo: ../../include/net-snmp/library/ucd_compat.h +./host/hrh_storage.lo: ../../include/net-snmp/library/mib.h +./host/hrh_storage.lo: ../../include/net-snmp/mib_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/parse.h +./host/hrh_storage.lo: ../../include/net-snmp/library/oid_stash.h +./host/hrh_storage.lo: ../../include/net-snmp/net-snmp-features.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_impl.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp-tc.h +./host/hrh_storage.lo: ../../include/net-snmp/library/getopt.h +./host/hrh_storage.lo: ../../include/net-snmp/utilities.h +./host/hrh_storage.lo: ../../include/net-snmp/library/system.h +./host/hrh_storage.lo: ../../include/net-snmp/library/tools.h +./host/hrh_storage.lo: ../../include/net-snmp/library/int64.h +./host/hrh_storage.lo: ../../include/net-snmp/library/mt_support.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_alarm.h +./host/hrh_storage.lo: ../../include/net-snmp/library/data_list.h +./host/hrh_storage.lo: ../../include/net-snmp/library/check_varbind.h +./host/hrh_storage.lo: ../../include/net-snmp/library/container.h +./host/hrh_storage.lo: ../../include/net-snmp/library/container_binary_array.h +./host/hrh_storage.lo: ../../include/net-snmp/library/container_list_ssll.h +./host/hrh_storage.lo: ../../include/net-snmp/library/container_iterator.h +./host/hrh_storage.lo: ../../include/net-snmp/library/container.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_assert.h +./host/hrh_storage.lo: ../../include/net-snmp/version.h +./host/hrh_storage.lo: ../../include/net-snmp/config_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/read_config.h +./host/hrh_storage.lo: ../../include/net-snmp/library/default_store.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_parse_args.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_enum.h +./host/hrh_storage.lo: ../../include/net-snmp/library/vacm.h +./host/hrh_storage.lo: ../../include/net-snmp/snmpv3_api.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpv3.h +./host/hrh_storage.lo: ../../include/net-snmp/library/transform_oids.h +./host/hrh_storage.lo: ../../include/net-snmp/library/keytools.h +./host/hrh_storage.lo: ../../include/net-snmp/library/scapi.h +./host/hrh_storage.lo: ../../include/net-snmp/library/lcd_time.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmp_secmod.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmpusm.h +./host/hrh_storage.lo: ../../include/net-snmp/library/snmptsm.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/mib_module_config.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_module_config.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/snmp_agent.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/snmp_vars.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_handler.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/var_struct.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_registry.h +./host/hrh_storage.lo: ../../include/net-snmp/library/fd_event_manager.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/ds_agent.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_read_config.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/agent_trap.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/all_helpers.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/instance.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/baby_steps.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/scalar.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/scalar_group.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/watcher.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/multiplexer.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/null.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/debug_handler.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/cache_handler.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/old_api.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/read_only.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/row_merge.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/serialize.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/bulk_to_next.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/mode_end_call.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table_data.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table_dataset.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table_tdata.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table_iterator.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table_container.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/table_array.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/mfd.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/hardware/memory.h +./host/hrh_storage.lo: ../../include/net-snmp/agent/hardware/fsys.h +./host/hrh_storage.lo: host_res.h ./host/hrh_filesys.h ./host/hrh_storage.h +./host/hrh_storage.lo: ./host/hr_disk.h ./host/hr_filesys.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/net-snmp-config.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/net-snmp-features.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/net-snmp-includes.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/definitions.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/types.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/oid.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/types.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/varbind_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_client.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/pdu_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/asn1.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/output_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_debug.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_logging.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/session_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/callback.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_transport.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_service.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/ucd_compat.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/mib.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/mib_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/parse.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/oid_stash.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_impl.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp-tc.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/getopt.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/utilities.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/system.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/tools.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/int64.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/mt_support.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_alarm.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/data_list.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/check_varbind.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container_binary_array.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container_list_ssll.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container_iterator.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/container.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_assert.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/version.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/config_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/read_config.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/default_store.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_parse_args.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_enum.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/vacm.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/snmpv3_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpv3.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/transform_oids.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/keytools.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/scapi.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/lcd_time.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmp_secmod.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmpusm.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/snmptsm.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/mib_module_config.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_module_config.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/snmp_agent.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/snmp_vars.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_handler.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/var_struct.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_registry.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/library/fd_event_manager.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/ds_agent.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_read_config.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/agent_trap.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/all_helpers.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/instance.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/baby_steps.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/scalar.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/scalar_group.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/watcher.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/multiplexer.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/null.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/debug_handler.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/cache_handler.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/old_api.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/read_only.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/row_merge.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/serialize.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/bulk_to_next.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/mode_end_call.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_data.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_dataset.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_tdata.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_iterator.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_container.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/table_array.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/mfd.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./ip-mib/ip_scalars.lo: ../../include/net-snmp/data_access/ip_scalars.h +./ip-mib/ip_scalars.lo: ./ip-mib/ip_scalars.h +./mibII/at.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/at.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/at.lo: ../../include/net-snmp/definitions.h +./mibII/at.lo: ../../include/net-snmp/types.h +./mibII/at.lo: ../../include/net-snmp/library/oid.h +./mibII/at.lo: ../../include/net-snmp/library/types.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/at.lo: ../../include/net-snmp/varbind_api.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/at.lo: ../../include/net-snmp/pdu_api.h +./mibII/at.lo: ../../include/net-snmp/library/asn1.h +./mibII/at.lo: ../../include/net-snmp/output_api.h +./mibII/at.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/at.lo: ../../include/net-snmp/session_api.h +./mibII/at.lo: ../../include/net-snmp/library/callback.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/at.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/at.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/at.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/at.lo: ../../include/net-snmp/library/mib.h +./mibII/at.lo: ../../include/net-snmp/mib_api.h +./mibII/at.lo: ../../include/net-snmp/library/parse.h +./mibII/at.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/at.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/at.lo: ../../include/net-snmp/library/snmp.h +./mibII/at.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/at.lo: ../../include/net-snmp/library/getopt.h +./mibII/at.lo: ../../include/net-snmp/utilities.h +./mibII/at.lo: ../../include/net-snmp/library/system.h +./mibII/at.lo: ../../include/net-snmp/library/tools.h +./mibII/at.lo: ../../include/net-snmp/library/int64.h +./mibII/at.lo: ../../include/net-snmp/library/mt_support.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/at.lo: ../../include/net-snmp/library/data_list.h +./mibII/at.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/at.lo: ../../include/net-snmp/library/container.h +./mibII/at.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/at.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/at.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/at.lo: ../../include/net-snmp/library/container.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/at.lo: ../../include/net-snmp/version.h +./mibII/at.lo: ../../include/net-snmp/config_api.h +./mibII/at.lo: ../../include/net-snmp/library/read_config.h +./mibII/at.lo: ../../include/net-snmp/library/default_store.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/at.lo: ../../include/net-snmp/library/vacm.h +./mibII/at.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/at.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/at.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/at.lo: ../../include/net-snmp/library/keytools.h +./mibII/at.lo: ../../include/net-snmp/library/scapi.h +./mibII/at.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/at.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/at.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/at.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/at.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/at.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/at.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/at.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/at.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/at.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/at.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/at.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/at.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/at.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/at.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/at.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/at.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/at.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/at.lo: ../../include/net-snmp/agent/instance.h +./mibII/at.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/at.lo: ../../include/net-snmp/agent/scalar.h +./mibII/at.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/at.lo: ../../include/net-snmp/agent/watcher.h +./mibII/at.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/at.lo: ../../include/net-snmp/agent/null.h +./mibII/at.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/at.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/at.lo: ../../include/net-snmp/agent/old_api.h +./mibII/at.lo: ../../include/net-snmp/agent/read_only.h +./mibII/at.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/at.lo: ../../include/net-snmp/agent/serialize.h +./mibII/at.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/at.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/at.lo: ../../include/net-snmp/agent/table.h +./mibII/at.lo: ../../include/net-snmp/agent/table_data.h +./mibII/at.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/at.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/at.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/at.lo: ../../include/net-snmp/agent/table_container.h +./mibII/at.lo: ../../include/net-snmp/agent/table_array.h +./mibII/at.lo: ../../include/net-snmp/agent/mfd.h +./mibII/at.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./mibII/at.h +./mibII/icmp.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/icmp.lo: ./mibII/mibII_common.h +./mibII/icmp.lo: ../../agent/kernel.h +./mibII/icmp.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/icmp.lo: ../../include/net-snmp/definitions.h +./mibII/icmp.lo: ../../include/net-snmp/types.h +./mibII/icmp.lo: ../../include/net-snmp/library/oid.h +./mibII/icmp.lo: ../../include/net-snmp/library/types.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/icmp.lo: ../../include/net-snmp/varbind_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/icmp.lo: ../../include/net-snmp/pdu_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/asn1.h +./mibII/icmp.lo: ../../include/net-snmp/output_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/icmp.lo: ../../include/net-snmp/session_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/callback.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/icmp.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/icmp.lo: ../../include/net-snmp/library/mib.h +./mibII/icmp.lo: ../../include/net-snmp/mib_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/parse.h +./mibII/icmp.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/icmp.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/icmp.lo: ../../include/net-snmp/library/getopt.h +./mibII/icmp.lo: ../../include/net-snmp/utilities.h +./mibII/icmp.lo: ../../include/net-snmp/library/system.h +./mibII/icmp.lo: ../../include/net-snmp/library/tools.h +./mibII/icmp.lo: ../../include/net-snmp/library/int64.h +./mibII/icmp.lo: ../../include/net-snmp/library/mt_support.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/icmp.lo: ../../include/net-snmp/library/data_list.h +./mibII/icmp.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/icmp.lo: ../../include/net-snmp/library/container.h +./mibII/icmp.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/icmp.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/icmp.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/icmp.lo: ../../include/net-snmp/library/container.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/icmp.lo: ../../include/net-snmp/version.h +./mibII/icmp.lo: ../../include/net-snmp/config_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/read_config.h +./mibII/icmp.lo: ../../include/net-snmp/library/default_store.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/icmp.lo: ../../include/net-snmp/library/vacm.h +./mibII/icmp.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/icmp.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/icmp.lo: ../../include/net-snmp/library/keytools.h +./mibII/icmp.lo: ../../include/net-snmp/library/scapi.h +./mibII/icmp.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/icmp.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/icmp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/icmp.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/icmp.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/icmp.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/icmp.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/icmp.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/icmp.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/icmp.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/icmp.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/icmp.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/icmp.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/icmp.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/icmp.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/icmp.lo: ../../include/net-snmp/agent/instance.h +./mibII/icmp.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/icmp.lo: ../../include/net-snmp/agent/scalar.h +./mibII/icmp.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/icmp.lo: ../../include/net-snmp/agent/watcher.h +./mibII/icmp.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/icmp.lo: ../../include/net-snmp/agent/null.h +./mibII/icmp.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/icmp.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/icmp.lo: ../../include/net-snmp/agent/old_api.h +./mibII/icmp.lo: ../../include/net-snmp/agent/read_only.h +./mibII/icmp.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/icmp.lo: ../../include/net-snmp/agent/serialize.h +./mibII/icmp.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/icmp.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table_data.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table_container.h +./mibII/icmp.lo: ../../include/net-snmp/agent/table_array.h +./mibII/icmp.lo: ../../include/net-snmp/agent/mfd.h +./mibII/icmp.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/icmp.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/icmp.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/icmp.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/icmp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/icmp.h +./mibII/icmp.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h +./mibII/icmp.lo: ./mibII/at.h +./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/interfaces.lo: ../../agent/kernel.h +./mibII/interfaces.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/interfaces.lo: ../../include/net-snmp/definitions.h +./mibII/interfaces.lo: ../../include/net-snmp/types.h +./mibII/interfaces.lo: ../../include/net-snmp/library/oid.h +./mibII/interfaces.lo: ../../include/net-snmp/library/types.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/interfaces.lo: ../../include/net-snmp/varbind_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/interfaces.lo: ../../include/net-snmp/pdu_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/asn1.h +./mibII/interfaces.lo: ../../include/net-snmp/output_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/interfaces.lo: ../../include/net-snmp/session_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/callback.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/interfaces.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/interfaces.lo: ../../include/net-snmp/library/mib.h +./mibII/interfaces.lo: ../../include/net-snmp/mib_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/parse.h +./mibII/interfaces.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/interfaces.lo: ../../include/net-snmp/library/getopt.h +./mibII/interfaces.lo: ../../include/net-snmp/utilities.h +./mibII/interfaces.lo: ../../include/net-snmp/library/system.h +./mibII/interfaces.lo: ../../include/net-snmp/library/tools.h +./mibII/interfaces.lo: ../../include/net-snmp/library/int64.h +./mibII/interfaces.lo: ../../include/net-snmp/library/mt_support.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/interfaces.lo: ../../include/net-snmp/library/data_list.h +./mibII/interfaces.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/interfaces.lo: ../../include/net-snmp/library/container.h +./mibII/interfaces.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/interfaces.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/interfaces.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/interfaces.lo: ../../include/net-snmp/library/container.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/interfaces.lo: ../../include/net-snmp/version.h +./mibII/interfaces.lo: ../../include/net-snmp/config_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/read_config.h +./mibII/interfaces.lo: ../../include/net-snmp/library/default_store.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/interfaces.lo: ../../include/net-snmp/library/vacm.h +./mibII/interfaces.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/interfaces.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/interfaces.lo: ../../include/net-snmp/library/keytools.h +./mibII/interfaces.lo: ../../include/net-snmp/library/scapi.h +./mibII/interfaces.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/interfaces.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/interfaces.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/instance.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/scalar.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/watcher.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/null.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/old_api.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/read_only.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/serialize.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table_data.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table_container.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/table_array.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/mfd.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/interfaces.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/interfaces.lo: ../../include/net-snmp/data_access/interface.h +./mibII/interfaces.lo: ./mibII/interfaces.h struct.h util_funcs.h +./mibII/interfaces.lo: util_funcs/header_generic.h +./mibII/interfaces.lo: util_funcs/header_simple_table.h +./mibII/interfaces.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h +./mibII/ip.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/ip.lo: ./mibII/mibII_common.h +./mibII/ip.lo: ../../agent/kernel.h +./mibII/ip.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/ip.lo: ../../include/net-snmp/definitions.h +./mibII/ip.lo: ../../include/net-snmp/types.h +./mibII/ip.lo: ../../include/net-snmp/library/oid.h +./mibII/ip.lo: ../../include/net-snmp/library/types.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/ip.lo: ../../include/net-snmp/varbind_api.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/ip.lo: ../../include/net-snmp/pdu_api.h +./mibII/ip.lo: ../../include/net-snmp/library/asn1.h +./mibII/ip.lo: ../../include/net-snmp/output_api.h +./mibII/ip.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/ip.lo: ../../include/net-snmp/session_api.h +./mibII/ip.lo: ../../include/net-snmp/library/callback.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/ip.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/ip.lo: ../../include/net-snmp/library/mib.h +./mibII/ip.lo: ../../include/net-snmp/mib_api.h +./mibII/ip.lo: ../../include/net-snmp/library/parse.h +./mibII/ip.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/ip.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/ip.lo: ../../include/net-snmp/library/getopt.h +./mibII/ip.lo: ../../include/net-snmp/utilities.h +./mibII/ip.lo: ../../include/net-snmp/library/system.h +./mibII/ip.lo: ../../include/net-snmp/library/tools.h +./mibII/ip.lo: ../../include/net-snmp/library/int64.h +./mibII/ip.lo: ../../include/net-snmp/library/mt_support.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/ip.lo: ../../include/net-snmp/library/data_list.h +./mibII/ip.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/ip.lo: ../../include/net-snmp/library/container.h +./mibII/ip.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/ip.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/ip.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/ip.lo: ../../include/net-snmp/library/container.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/ip.lo: ../../include/net-snmp/version.h +./mibII/ip.lo: ../../include/net-snmp/config_api.h +./mibII/ip.lo: ../../include/net-snmp/library/read_config.h +./mibII/ip.lo: ../../include/net-snmp/library/default_store.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/ip.lo: ../../include/net-snmp/library/vacm.h +./mibII/ip.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/ip.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/ip.lo: ../../include/net-snmp/library/keytools.h +./mibII/ip.lo: ../../include/net-snmp/library/scapi.h +./mibII/ip.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/ip.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/ip.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/ip.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/ip.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/ip.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/ip.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/ip.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/ip.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/ip.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/ip.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/ip.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/ip.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/ip.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/ip.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/ip.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/ip.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/ip.lo: ../../include/net-snmp/agent/instance.h +./mibII/ip.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/ip.lo: ../../include/net-snmp/agent/scalar.h +./mibII/ip.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/ip.lo: ../../include/net-snmp/agent/watcher.h +./mibII/ip.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/ip.lo: ../../include/net-snmp/agent/null.h +./mibII/ip.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/ip.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/ip.lo: ../../include/net-snmp/agent/old_api.h +./mibII/ip.lo: ../../include/net-snmp/agent/read_only.h +./mibII/ip.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/ip.lo: ../../include/net-snmp/agent/serialize.h +./mibII/ip.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/ip.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/ip.lo: ../../include/net-snmp/agent/table.h +./mibII/ip.lo: ../../include/net-snmp/agent/table_data.h +./mibII/ip.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/ip.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/ip.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/ip.lo: ../../include/net-snmp/agent/table_container.h +./mibII/ip.lo: ../../include/net-snmp/agent/table_array.h +./mibII/ip.lo: ../../include/net-snmp/agent/mfd.h +./mibII/ip.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/ip.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/ip.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/ip.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/ip.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/ip.h +./mibII/ip.lo: ./mibII/var_route.h ./mibII/route_write.h ./mibII/at.h +./mibII/ip.lo: ./mibII/ipAddr.h ./mibII/interfaces.h +./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/ipAddr.lo: ../../agent/kernel.h +./mibII/ipAddr.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/ipAddr.lo: ../../include/net-snmp/definitions.h +./mibII/ipAddr.lo: ../../include/net-snmp/types.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/oid.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/types.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/varbind_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/ipAddr.lo: ../../include/net-snmp/pdu_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/asn1.h +./mibII/ipAddr.lo: ../../include/net-snmp/output_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/ipAddr.lo: ../../include/net-snmp/session_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/callback.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/mib.h +./mibII/ipAddr.lo: ../../include/net-snmp/mib_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/parse.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/getopt.h +./mibII/ipAddr.lo: ../../include/net-snmp/utilities.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/system.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/tools.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/int64.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/mt_support.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/data_list.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/container.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/container.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/ipAddr.lo: ../../include/net-snmp/version.h +./mibII/ipAddr.lo: ../../include/net-snmp/config_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/read_config.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/default_store.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/vacm.h +./mibII/ipAddr.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/keytools.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/scapi.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/ipAddr.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/instance.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/scalar.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/watcher.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/null.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/old_api.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/read_only.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/serialize.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_data.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_container.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/table_array.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/mfd.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/ipAddr.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/ipAddr.lo: ../../include/net-snmp/data_access/interface.h +./mibII/ipAddr.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h +./mibII/ipAddr.lo: ./mibII/at.h ./mibII/ipAddr.h ./mibII/interfaces.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/ipCidrRouteTable.lo: ./mibII/route_headers.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/definitions.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/types.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/oid.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/types.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/varbind_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/pdu_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/asn1.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/output_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/session_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/callback.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/mib.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/mib_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/parse.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/getopt.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/utilities.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/system.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/tools.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/int64.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/mt_support.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/data_list.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/container.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/version.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/config_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/read_config.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/default_store.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/vacm.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/keytools.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/scapi.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/instance.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/scalar.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/watcher.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/null.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/old_api.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/read_only.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/serialize.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_data.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_container.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/table_array.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/mfd.h +./mibII/ipCidrRouteTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable.h +./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_columns.h +./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_enums.h +./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_checkfns.h +./mibII/ipCidrRouteTable.lo: ./mibII/ipCidrRouteTable_access.h +./mibII/ipCidrRouteTable.lo: ./mibII/var_route.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/ipCidrRouteTable_access.lo: ./mibII/route_headers.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/definitions.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/types.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/oid.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/types.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/varbind_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/pdu_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/asn1.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/output_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/session_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/callback.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/mib.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/mib_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/parse.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/getopt.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/utilities.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/system.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/tools.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/int64.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/mt_support.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/data_list.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/container.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/version.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/config_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/read_config.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/default_store.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/vacm.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/keytools.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/scapi.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/instance.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/scalar.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/watcher.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/null.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/old_api.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/read_only.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/serialize.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_data.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_container.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/table_array.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/mfd.h +./mibII/ipCidrRouteTable_access.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/ipCidrRouteTable_access.lo: ./mibII/ipCidrRouteTable_access.h +./mibII/ipCidrRouteTable_access.lo: ./mibII/ipCidrRouteTable_enums.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/definitions.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/types.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/oid.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/types.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/varbind_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/pdu_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/asn1.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/output_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/session_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/callback.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/mib.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/mib_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/parse.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/getopt.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/utilities.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/system.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/tools.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/int64.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/mt_support.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/data_list.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/container.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/version.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/config_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/read_config.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/default_store.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/vacm.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/keytools.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/scapi.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/ipCidrRouteTable_checkfns.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/ipCidrRouteTable_checkfns.lo: ./mibII/ipCidrRouteTable_checkfns.h +./mibII/ipCidrRouteTable_checkfns.lo: ./mibII/ipCidrRouteTable_enums.h +./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/ipv6.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/ipv6.lo: ../../include/net-snmp/definitions.h +./mibII/ipv6.lo: ../../include/net-snmp/types.h +./mibII/ipv6.lo: ../../include/net-snmp/library/oid.h +./mibII/ipv6.lo: ../../include/net-snmp/library/types.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/ipv6.lo: ../../include/net-snmp/varbind_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/ipv6.lo: ../../include/net-snmp/pdu_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/asn1.h +./mibII/ipv6.lo: ../../include/net-snmp/output_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/ipv6.lo: ../../include/net-snmp/session_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/callback.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/ipv6.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/ipv6.lo: ../../include/net-snmp/library/mib.h +./mibII/ipv6.lo: ../../include/net-snmp/mib_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/parse.h +./mibII/ipv6.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/ipv6.lo: ../../include/net-snmp/library/getopt.h +./mibII/ipv6.lo: ../../include/net-snmp/utilities.h +./mibII/ipv6.lo: ../../include/net-snmp/library/system.h +./mibII/ipv6.lo: ../../include/net-snmp/library/tools.h +./mibII/ipv6.lo: ../../include/net-snmp/library/int64.h +./mibII/ipv6.lo: ../../include/net-snmp/library/mt_support.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/ipv6.lo: ../../include/net-snmp/library/data_list.h +./mibII/ipv6.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/ipv6.lo: ../../include/net-snmp/library/container.h +./mibII/ipv6.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/ipv6.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/ipv6.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/ipv6.lo: ../../include/net-snmp/library/container.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/ipv6.lo: ../../include/net-snmp/version.h +./mibII/ipv6.lo: ../../include/net-snmp/config_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/read_config.h +./mibII/ipv6.lo: ../../include/net-snmp/library/default_store.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/ipv6.lo: ../../include/net-snmp/library/vacm.h +./mibII/ipv6.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/ipv6.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/ipv6.lo: ../../include/net-snmp/library/keytools.h +./mibII/ipv6.lo: ../../include/net-snmp/library/scapi.h +./mibII/ipv6.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/ipv6.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/ipv6.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/instance.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/scalar.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/watcher.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/null.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/old_api.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/read_only.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/serialize.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table_data.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table_container.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/table_array.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/mfd.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/ipv6.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/ipv6.lo: ../../agent/kernel.h ./mibII/ipv6.h ./mibII/var_route.h +./mibII/ipv6.lo: ./mibII/route_write.h ./mibII/at.h ./mibII/interfaces.h +./mibII/kernel_linux.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/kernel_linux.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/kernel_linux.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/kernel_linux.lo: ../../include/net-snmp/definitions.h +./mibII/kernel_linux.lo: ../../include/net-snmp/types.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/oid.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/types.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/varbind_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/kernel_linux.lo: ../../include/net-snmp/pdu_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/asn1.h +./mibII/kernel_linux.lo: ../../include/net-snmp/output_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/kernel_linux.lo: ../../include/net-snmp/session_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/callback.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/mib.h +./mibII/kernel_linux.lo: ../../include/net-snmp/mib_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/parse.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/getopt.h +./mibII/kernel_linux.lo: ../../include/net-snmp/utilities.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/system.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/tools.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/int64.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/mt_support.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/data_list.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/container.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/container.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/kernel_linux.lo: ../../include/net-snmp/version.h +./mibII/kernel_linux.lo: ../../include/net-snmp/config_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/read_config.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/default_store.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/vacm.h +./mibII/kernel_linux.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/keytools.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/scapi.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/kernel_linux.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/instance.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/scalar.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/watcher.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/null.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/old_api.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/read_only.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/serialize.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_data.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_container.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/table_array.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/mfd.h +./mibII/kernel_linux.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/kernel_linux.lo: ./mibII/kernel_linux.h ./mibII/kernel_mib.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/definitions.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/types.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/oid.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/types.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/varbind_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/pdu_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/asn1.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/output_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/session_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/callback.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/mib.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/mib_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/parse.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/getopt.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/utilities.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/system.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/tools.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/int64.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/mt_support.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/data_list.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/container.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/version.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/config_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/read_config.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/default_store.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/vacm.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/keytools.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/scapi.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/instance.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/scalar.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/watcher.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/null.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/old_api.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/read_only.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/serialize.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_data.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_container.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/table_array.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/mfd.h +./mibII/kernel_netbsd.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/kernel_netbsd.lo: ./mibII/kernel_netbsd.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/definitions.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/types.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/oid.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/types.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/varbind_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/pdu_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/asn1.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/output_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/session_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/callback.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/mib.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/mib_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/parse.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/getopt.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/utilities.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/system.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/tools.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/int64.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/mt_support.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/data_list.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/container.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/version.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/config_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/read_config.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/default_store.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/vacm.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/keytools.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/scapi.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/instance.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/scalar.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/watcher.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/null.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/old_api.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/read_only.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/serialize.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_data.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_container.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/table_array.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/mfd.h +./mibII/kernel_sysctl.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/kernel_sysctl.lo: ./mibII/kernel_sysctl.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/definitions.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/types.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/oid.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/types.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/varbind_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/pdu_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/asn1.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/output_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/session_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/callback.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/mib.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/mib_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/parse.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/getopt.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/utilities.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/system.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/tools.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/int64.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/mt_support.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/data_list.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/container.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/version.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/config_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/read_config.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/default_store.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/vacm.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/keytools.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/scapi.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/instance.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/scalar.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/watcher.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/null.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/old_api.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/read_only.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/serialize.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_data.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_container.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/table_array.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/mfd.h +./mibII/mta_sendmail.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/mta_sendmail.lo: ./mibII/mta_sendmail.h +./mibII/route_write.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/route_write.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/route_write.lo: ../../include/net-snmp/definitions.h +./mibII/route_write.lo: ../../include/net-snmp/types.h +./mibII/route_write.lo: ../../include/net-snmp/library/oid.h +./mibII/route_write.lo: ../../include/net-snmp/library/types.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/route_write.lo: ../../include/net-snmp/varbind_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/route_write.lo: ../../include/net-snmp/pdu_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/asn1.h +./mibII/route_write.lo: ../../include/net-snmp/output_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/route_write.lo: ../../include/net-snmp/session_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/callback.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/route_write.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/route_write.lo: ../../include/net-snmp/library/mib.h +./mibII/route_write.lo: ../../include/net-snmp/mib_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/parse.h +./mibII/route_write.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/route_write.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/route_write.lo: ../../include/net-snmp/library/getopt.h +./mibII/route_write.lo: ../../include/net-snmp/utilities.h +./mibII/route_write.lo: ../../include/net-snmp/library/system.h +./mibII/route_write.lo: ../../include/net-snmp/library/tools.h +./mibII/route_write.lo: ../../include/net-snmp/library/int64.h +./mibII/route_write.lo: ../../include/net-snmp/library/mt_support.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/route_write.lo: ../../include/net-snmp/library/data_list.h +./mibII/route_write.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/route_write.lo: ../../include/net-snmp/library/container.h +./mibII/route_write.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/route_write.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/route_write.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/route_write.lo: ../../include/net-snmp/library/container.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/route_write.lo: ../../include/net-snmp/version.h +./mibII/route_write.lo: ../../include/net-snmp/config_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/read_config.h +./mibII/route_write.lo: ../../include/net-snmp/library/default_store.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/route_write.lo: ../../include/net-snmp/library/vacm.h +./mibII/route_write.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/route_write.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/route_write.lo: ../../include/net-snmp/library/keytools.h +./mibII/route_write.lo: ../../include/net-snmp/library/scapi.h +./mibII/route_write.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/route_write.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/route_write.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/route_write.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/route_write.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/route_write.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/route_write.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/route_write.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/route_write.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/route_write.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/route_write.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/route_write.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/route_write.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/route_write.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/route_write.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/route_write.lo: ../../include/net-snmp/agent/instance.h +./mibII/route_write.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/route_write.lo: ../../include/net-snmp/agent/scalar.h +./mibII/route_write.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/route_write.lo: ../../include/net-snmp/agent/watcher.h +./mibII/route_write.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/route_write.lo: ../../include/net-snmp/agent/null.h +./mibII/route_write.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/route_write.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/route_write.lo: ../../include/net-snmp/agent/old_api.h +./mibII/route_write.lo: ../../include/net-snmp/agent/read_only.h +./mibII/route_write.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/route_write.lo: ../../include/net-snmp/agent/serialize.h +./mibII/route_write.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/route_write.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table_data.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table_container.h +./mibII/route_write.lo: ../../include/net-snmp/agent/table_array.h +./mibII/route_write.lo: ../../include/net-snmp/agent/mfd.h +./mibII/route_write.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/route_write.lo: ./mibII/ip.h ./mibII/var_route.h +./mibII/route_write.lo: ./mibII/route_write.h ./mibII/at.h +./mibII/setSerialNo.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/setSerialNo.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/setSerialNo.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/setSerialNo.lo: ../../include/net-snmp/definitions.h +./mibII/setSerialNo.lo: ../../include/net-snmp/types.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/oid.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/types.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/varbind_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/setSerialNo.lo: ../../include/net-snmp/pdu_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/asn1.h +./mibII/setSerialNo.lo: ../../include/net-snmp/output_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/setSerialNo.lo: ../../include/net-snmp/session_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/callback.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/mib.h +./mibII/setSerialNo.lo: ../../include/net-snmp/mib_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/parse.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/getopt.h +./mibII/setSerialNo.lo: ../../include/net-snmp/utilities.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/system.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/tools.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/int64.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/mt_support.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/data_list.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/container.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/container.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/setSerialNo.lo: ../../include/net-snmp/version.h +./mibII/setSerialNo.lo: ../../include/net-snmp/config_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/read_config.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/default_store.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/vacm.h +./mibII/setSerialNo.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/keytools.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/scapi.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/setSerialNo.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/instance.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/scalar.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/watcher.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/null.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/old_api.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/read_only.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/serialize.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_data.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_container.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/table_array.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/mfd.h +./mibII/setSerialNo.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/setSerialNo.lo: ./mibII/setSerialNo.h +./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/snmp_mib.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/snmp_mib.lo: ../../include/net-snmp/definitions.h +./mibII/snmp_mib.lo: ../../include/net-snmp/types.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/oid.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/types.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/varbind_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/snmp_mib.lo: ../../include/net-snmp/pdu_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/asn1.h +./mibII/snmp_mib.lo: ../../include/net-snmp/output_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/snmp_mib.lo: ../../include/net-snmp/session_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/callback.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/mib.h +./mibII/snmp_mib.lo: ../../include/net-snmp/mib_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/parse.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/getopt.h +./mibII/snmp_mib.lo: ../../include/net-snmp/utilities.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/system.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/tools.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/int64.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/mt_support.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/data_list.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/container.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/container.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/snmp_mib.lo: ../../include/net-snmp/version.h +./mibII/snmp_mib.lo: ../../include/net-snmp/config_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/read_config.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/default_store.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/vacm.h +./mibII/snmp_mib.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/keytools.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/scapi.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/snmp_mib.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/instance.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/scalar.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/watcher.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/null.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/old_api.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/read_only.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/serialize.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_data.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_container.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/table_array.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/mfd.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/snmp_mib.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/snmp_mib.lo: ./mibII/snmp_mib.h ./mibII/system_mib.h +./mibII/snmp_mib.lo: ./mibII/updates.h ../../agent/agent_global_vars.h +./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/sysORTable.lo: ../../include/net-snmp/definitions.h +./mibII/sysORTable.lo: ../../include/net-snmp/types.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/oid.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/types.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/varbind_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/sysORTable.lo: ../../include/net-snmp/pdu_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/asn1.h +./mibII/sysORTable.lo: ../../include/net-snmp/output_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/sysORTable.lo: ../../include/net-snmp/session_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/callback.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/mib.h +./mibII/sysORTable.lo: ../../include/net-snmp/mib_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/parse.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/sysORTable.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/getopt.h +./mibII/sysORTable.lo: ../../include/net-snmp/utilities.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/system.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/tools.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/int64.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/mt_support.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/data_list.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/container.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/container.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/sysORTable.lo: ../../include/net-snmp/version.h +./mibII/sysORTable.lo: ../../include/net-snmp/config_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/read_config.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/default_store.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/vacm.h +./mibII/sysORTable.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/keytools.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/scapi.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/sysORTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/instance.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/scalar.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/watcher.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/null.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/old_api.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/read_only.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/serialize.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_data.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_container.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/table_array.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/mfd.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_sysORTable.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/sysORTable.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/sysORTable.lo: ./mibII/sysORTable.h ./mibII/system_mib.h +./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/system_mib.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/system_mib.lo: ../../include/net-snmp/definitions.h +./mibII/system_mib.lo: ../../include/net-snmp/types.h +./mibII/system_mib.lo: ../../include/net-snmp/library/oid.h +./mibII/system_mib.lo: ../../include/net-snmp/library/types.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/system_mib.lo: ../../include/net-snmp/varbind_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/system_mib.lo: ../../include/net-snmp/pdu_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/asn1.h +./mibII/system_mib.lo: ../../include/net-snmp/output_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/system_mib.lo: ../../include/net-snmp/session_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/callback.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/system_mib.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/system_mib.lo: ../../include/net-snmp/library/mib.h +./mibII/system_mib.lo: ../../include/net-snmp/mib_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/parse.h +./mibII/system_mib.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/system_mib.lo: ../../include/net-snmp/library/getopt.h +./mibII/system_mib.lo: ../../include/net-snmp/utilities.h +./mibII/system_mib.lo: ../../include/net-snmp/library/system.h +./mibII/system_mib.lo: ../../include/net-snmp/library/tools.h +./mibII/system_mib.lo: ../../include/net-snmp/library/int64.h +./mibII/system_mib.lo: ../../include/net-snmp/library/mt_support.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/system_mib.lo: ../../include/net-snmp/library/data_list.h +./mibII/system_mib.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/system_mib.lo: ../../include/net-snmp/library/container.h +./mibII/system_mib.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/system_mib.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/system_mib.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/system_mib.lo: ../../include/net-snmp/library/container.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/system_mib.lo: ../../include/net-snmp/version.h +./mibII/system_mib.lo: ../../include/net-snmp/config_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/read_config.h +./mibII/system_mib.lo: ../../include/net-snmp/library/default_store.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/system_mib.lo: ../../include/net-snmp/library/vacm.h +./mibII/system_mib.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/system_mib.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/system_mib.lo: ../../include/net-snmp/library/keytools.h +./mibII/system_mib.lo: ../../include/net-snmp/library/scapi.h +./mibII/system_mib.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/system_mib.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/system_mib.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/instance.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/scalar.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/watcher.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/null.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/old_api.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/read_only.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/serialize.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table_data.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table_container.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/table_array.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/mfd.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/system_mib.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/system_mib.lo: util_funcs.h util_funcs/header_generic.h +./mibII/system_mib.lo: util_funcs/header_simple_table.h struct.h +./mibII/system_mib.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h +./mibII/system_mib.lo: ./mibII/system_mib.h ./mibII/updates.h +./mibII/system_mib.lo: ../../agent/agent_global_vars.h +./mibII/tcp.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/tcp.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/tcp.lo: ./mibII/mibII_common.h +./mibII/tcp.lo: ../../agent/kernel.h +./mibII/tcp.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/tcp.lo: ../../include/net-snmp/definitions.h +./mibII/tcp.lo: ../../include/net-snmp/types.h +./mibII/tcp.lo: ../../include/net-snmp/library/oid.h +./mibII/tcp.lo: ../../include/net-snmp/library/types.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/tcp.lo: ../../include/net-snmp/varbind_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/tcp.lo: ../../include/net-snmp/pdu_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/asn1.h +./mibII/tcp.lo: ../../include/net-snmp/output_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/tcp.lo: ../../include/net-snmp/session_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/callback.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/tcp.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/tcp.lo: ../../include/net-snmp/library/mib.h +./mibII/tcp.lo: ../../include/net-snmp/mib_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/parse.h +./mibII/tcp.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/tcp.lo: ../../include/net-snmp/library/getopt.h +./mibII/tcp.lo: ../../include/net-snmp/utilities.h +./mibII/tcp.lo: ../../include/net-snmp/library/system.h +./mibII/tcp.lo: ../../include/net-snmp/library/tools.h +./mibII/tcp.lo: ../../include/net-snmp/library/int64.h +./mibII/tcp.lo: ../../include/net-snmp/library/mt_support.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/tcp.lo: ../../include/net-snmp/library/data_list.h +./mibII/tcp.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/tcp.lo: ../../include/net-snmp/library/container.h +./mibII/tcp.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/tcp.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/tcp.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/tcp.lo: ../../include/net-snmp/library/container.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/tcp.lo: ../../include/net-snmp/version.h +./mibII/tcp.lo: ../../include/net-snmp/config_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/read_config.h +./mibII/tcp.lo: ../../include/net-snmp/library/default_store.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/tcp.lo: ../../include/net-snmp/library/vacm.h +./mibII/tcp.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/tcp.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/tcp.lo: ../../include/net-snmp/library/keytools.h +./mibII/tcp.lo: ../../include/net-snmp/library/scapi.h +./mibII/tcp.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/tcp.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/tcp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/tcp.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/tcp.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/tcp.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/tcp.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/tcp.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/tcp.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/tcp.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/tcp.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/tcp.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/tcp.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/tcp.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/tcp.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/tcp.lo: ../../include/net-snmp/agent/instance.h +./mibII/tcp.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/tcp.lo: ../../include/net-snmp/agent/scalar.h +./mibII/tcp.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/tcp.lo: ../../include/net-snmp/agent/watcher.h +./mibII/tcp.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/tcp.lo: ../../include/net-snmp/agent/null.h +./mibII/tcp.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/tcp.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/tcp.lo: ../../include/net-snmp/agent/old_api.h +./mibII/tcp.lo: ../../include/net-snmp/agent/read_only.h +./mibII/tcp.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/tcp.lo: ../../include/net-snmp/agent/serialize.h +./mibII/tcp.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/tcp.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table_data.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table_container.h +./mibII/tcp.lo: ../../include/net-snmp/agent/table_array.h +./mibII/tcp.lo: ../../include/net-snmp/agent/mfd.h +./mibII/tcp.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/tcp.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/tcp.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/tcp.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/tcp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/tcp.h +./mibII/tcp.lo: ./mibII/tcpTable.h +./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/tcpTable.lo: ./mibII/mibII_common.h +./mibII/tcpTable.lo: ../../agent/kernel.h +./mibII/tcpTable.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/tcpTable.lo: ../../include/net-snmp/definitions.h +./mibII/tcpTable.lo: ../../include/net-snmp/types.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/oid.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/types.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/varbind_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/tcpTable.lo: ../../include/net-snmp/pdu_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/asn1.h +./mibII/tcpTable.lo: ../../include/net-snmp/output_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/tcpTable.lo: ../../include/net-snmp/session_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/callback.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/mib.h +./mibII/tcpTable.lo: ../../include/net-snmp/mib_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/parse.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/getopt.h +./mibII/tcpTable.lo: ../../include/net-snmp/utilities.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/system.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/tools.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/int64.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/mt_support.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/data_list.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/container.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/container.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/tcpTable.lo: ../../include/net-snmp/version.h +./mibII/tcpTable.lo: ../../include/net-snmp/config_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/read_config.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/default_store.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/vacm.h +./mibII/tcpTable.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/keytools.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/scapi.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/tcpTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/instance.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/scalar.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/watcher.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/null.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/old_api.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/read_only.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/serialize.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_data.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_container.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/table_array.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/mfd.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/tcpTable.lo: ../../include/net-snmp/agent/auto_nlist.h ./mibII/tcp.h +./mibII/tcpTable.lo: ./mibII/tcpTable.h +./mibII/udp.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/udp.lo: ./mibII/mibII_common.h +./mibII/udp.lo: ../../agent/kernel.h +./mibII/udp.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/udp.lo: ../../include/net-snmp/definitions.h +./mibII/udp.lo: ../../include/net-snmp/types.h +./mibII/udp.lo: ../../include/net-snmp/library/oid.h +./mibII/udp.lo: ../../include/net-snmp/library/types.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/udp.lo: ../../include/net-snmp/varbind_api.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/udp.lo: ../../include/net-snmp/pdu_api.h +./mibII/udp.lo: ../../include/net-snmp/library/asn1.h +./mibII/udp.lo: ../../include/net-snmp/output_api.h +./mibII/udp.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/udp.lo: ../../include/net-snmp/session_api.h +./mibII/udp.lo: ../../include/net-snmp/library/callback.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/udp.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/udp.lo: ../../include/net-snmp/library/mib.h +./mibII/udp.lo: ../../include/net-snmp/mib_api.h +./mibII/udp.lo: ../../include/net-snmp/library/parse.h +./mibII/udp.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/udp.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/udp.lo: ../../include/net-snmp/library/getopt.h +./mibII/udp.lo: ../../include/net-snmp/utilities.h +./mibII/udp.lo: ../../include/net-snmp/library/system.h +./mibII/udp.lo: ../../include/net-snmp/library/tools.h +./mibII/udp.lo: ../../include/net-snmp/library/int64.h +./mibII/udp.lo: ../../include/net-snmp/library/mt_support.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/udp.lo: ../../include/net-snmp/library/data_list.h +./mibII/udp.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/udp.lo: ../../include/net-snmp/library/container.h +./mibII/udp.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/udp.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/udp.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/udp.lo: ../../include/net-snmp/library/container.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/udp.lo: ../../include/net-snmp/version.h +./mibII/udp.lo: ../../include/net-snmp/config_api.h +./mibII/udp.lo: ../../include/net-snmp/library/read_config.h +./mibII/udp.lo: ../../include/net-snmp/library/default_store.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/udp.lo: ../../include/net-snmp/library/vacm.h +./mibII/udp.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/udp.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/udp.lo: ../../include/net-snmp/library/keytools.h +./mibII/udp.lo: ../../include/net-snmp/library/scapi.h +./mibII/udp.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/udp.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/udp.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/udp.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/udp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/udp.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/udp.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/udp.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/udp.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/udp.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/udp.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/udp.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/udp.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/udp.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/udp.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/udp.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/udp.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/udp.lo: ../../include/net-snmp/agent/instance.h +./mibII/udp.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/udp.lo: ../../include/net-snmp/agent/scalar.h +./mibII/udp.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/udp.lo: ../../include/net-snmp/agent/watcher.h +./mibII/udp.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/udp.lo: ../../include/net-snmp/agent/null.h +./mibII/udp.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/udp.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/udp.lo: ../../include/net-snmp/agent/old_api.h +./mibII/udp.lo: ../../include/net-snmp/agent/read_only.h +./mibII/udp.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/udp.lo: ../../include/net-snmp/agent/serialize.h +./mibII/udp.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/udp.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/udp.lo: ../../include/net-snmp/agent/table.h +./mibII/udp.lo: ../../include/net-snmp/agent/table_data.h +./mibII/udp.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/udp.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/udp.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/udp.lo: ../../include/net-snmp/agent/table_container.h +./mibII/udp.lo: ../../include/net-snmp/agent/table_array.h +./mibII/udp.lo: ../../include/net-snmp/agent/mfd.h +./mibII/udp.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/udp.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/udp.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/udp.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/udp.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./mibII/udp.h +./mibII/udp.lo: ./mibII/udpTable.h +./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/udpTable.lo: ./mibII/mibII_common.h +./mibII/udpTable.lo: ../../agent/kernel.h +./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/udpTable.lo: ../../include/net-snmp/definitions.h +./mibII/udpTable.lo: ../../include/net-snmp/types.h +./mibII/udpTable.lo: ../../include/net-snmp/library/oid.h +./mibII/udpTable.lo: ../../include/net-snmp/library/types.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/udpTable.lo: ../../include/net-snmp/varbind_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/udpTable.lo: ../../include/net-snmp/pdu_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/asn1.h +./mibII/udpTable.lo: ../../include/net-snmp/output_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/udpTable.lo: ../../include/net-snmp/session_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/callback.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/udpTable.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/udpTable.lo: ../../include/net-snmp/library/mib.h +./mibII/udpTable.lo: ../../include/net-snmp/mib_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/parse.h +./mibII/udpTable.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/udpTable.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/udpTable.lo: ../../include/net-snmp/library/getopt.h +./mibII/udpTable.lo: ../../include/net-snmp/utilities.h +./mibII/udpTable.lo: ../../include/net-snmp/library/system.h +./mibII/udpTable.lo: ../../include/net-snmp/library/tools.h +./mibII/udpTable.lo: ../../include/net-snmp/library/int64.h +./mibII/udpTable.lo: ../../include/net-snmp/library/mt_support.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/udpTable.lo: ../../include/net-snmp/library/data_list.h +./mibII/udpTable.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/udpTable.lo: ../../include/net-snmp/library/container.h +./mibII/udpTable.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/udpTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/udpTable.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/udpTable.lo: ../../include/net-snmp/library/container.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/udpTable.lo: ../../include/net-snmp/version.h +./mibII/udpTable.lo: ../../include/net-snmp/config_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/read_config.h +./mibII/udpTable.lo: ../../include/net-snmp/library/default_store.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/udpTable.lo: ../../include/net-snmp/library/vacm.h +./mibII/udpTable.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/udpTable.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/udpTable.lo: ../../include/net-snmp/library/keytools.h +./mibII/udpTable.lo: ../../include/net-snmp/library/scapi.h +./mibII/udpTable.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/udpTable.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/udpTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/instance.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/scalar.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/watcher.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/null.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/old_api.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/read_only.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/serialize.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table_data.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table_container.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/table_array.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/mfd.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/udpTable.lo: ../../include/net-snmp/agent/auto_nlist.h ./mibII/udp.h +./mibII/udpTable.lo: ./mibII/udpTable.h +./mibII/updates.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/updates.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/updates.lo: ../../include/net-snmp/definitions.h +./mibII/updates.lo: ../../include/net-snmp/types.h +./mibII/updates.lo: ../../include/net-snmp/library/oid.h +./mibII/updates.lo: ../../include/net-snmp/library/types.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/updates.lo: ../../include/net-snmp/varbind_api.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/updates.lo: ../../include/net-snmp/pdu_api.h +./mibII/updates.lo: ../../include/net-snmp/library/asn1.h +./mibII/updates.lo: ../../include/net-snmp/output_api.h +./mibII/updates.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/updates.lo: ../../include/net-snmp/session_api.h +./mibII/updates.lo: ../../include/net-snmp/library/callback.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/updates.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/updates.lo: ../../include/net-snmp/library/mib.h +./mibII/updates.lo: ../../include/net-snmp/mib_api.h +./mibII/updates.lo: ../../include/net-snmp/library/parse.h +./mibII/updates.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/updates.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/updates.lo: ../../include/net-snmp/library/getopt.h +./mibII/updates.lo: ../../include/net-snmp/utilities.h +./mibII/updates.lo: ../../include/net-snmp/library/system.h +./mibII/updates.lo: ../../include/net-snmp/library/tools.h +./mibII/updates.lo: ../../include/net-snmp/library/int64.h +./mibII/updates.lo: ../../include/net-snmp/library/mt_support.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/updates.lo: ../../include/net-snmp/library/data_list.h +./mibII/updates.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/updates.lo: ../../include/net-snmp/library/container.h +./mibII/updates.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/updates.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/updates.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/updates.lo: ../../include/net-snmp/library/container.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/updates.lo: ../../include/net-snmp/version.h +./mibII/updates.lo: ../../include/net-snmp/config_api.h +./mibII/updates.lo: ../../include/net-snmp/library/read_config.h +./mibII/updates.lo: ../../include/net-snmp/library/default_store.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/updates.lo: ../../include/net-snmp/library/vacm.h +./mibII/updates.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/updates.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/updates.lo: ../../include/net-snmp/library/keytools.h +./mibII/updates.lo: ../../include/net-snmp/library/scapi.h +./mibII/updates.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/updates.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/updates.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/updates.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/updates.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/updates.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/updates.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/updates.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/updates.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/updates.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/updates.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/updates.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/updates.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/updates.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/updates.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/updates.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/updates.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/updates.lo: ../../include/net-snmp/agent/instance.h +./mibII/updates.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/updates.lo: ../../include/net-snmp/agent/scalar.h +./mibII/updates.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/updates.lo: ../../include/net-snmp/agent/watcher.h +./mibII/updates.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/updates.lo: ../../include/net-snmp/agent/null.h +./mibII/updates.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/updates.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/updates.lo: ../../include/net-snmp/agent/old_api.h +./mibII/updates.lo: ../../include/net-snmp/agent/read_only.h +./mibII/updates.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/updates.lo: ../../include/net-snmp/agent/serialize.h +./mibII/updates.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/updates.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/updates.lo: ../../include/net-snmp/agent/table.h +./mibII/updates.lo: ../../include/net-snmp/agent/table_data.h +./mibII/updates.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/updates.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/updates.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/updates.lo: ../../include/net-snmp/agent/table_container.h +./mibII/updates.lo: ../../include/net-snmp/agent/table_array.h +./mibII/updates.lo: ../../include/net-snmp/agent/mfd.h +./mibII/updates.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/updates.lo: ./mibII/updates.h +./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/vacm_conf.lo: ../../include/net-snmp/definitions.h +./mibII/vacm_conf.lo: ../../include/net-snmp/types.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/oid.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/types.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/varbind_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/vacm_conf.lo: ../../include/net-snmp/pdu_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/asn1.h +./mibII/vacm_conf.lo: ../../include/net-snmp/output_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/vacm_conf.lo: ../../include/net-snmp/session_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/callback.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/mib.h +./mibII/vacm_conf.lo: ../../include/net-snmp/mib_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/parse.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/vacm_conf.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/getopt.h +./mibII/vacm_conf.lo: ../../include/net-snmp/utilities.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/system.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/tools.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/int64.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/mt_support.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/data_list.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/container.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/container.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/vacm_conf.lo: ../../include/net-snmp/version.h +./mibII/vacm_conf.lo: ../../include/net-snmp/config_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/read_config.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/default_store.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/vacm.h +./mibII/vacm_conf.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/keytools.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/scapi.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/vacm_conf.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/instance.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/scalar.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/watcher.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/null.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/old_api.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/read_only.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/serialize.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_data.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_container.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/table_array.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/mfd.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/vacm_conf.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/vacm_conf.lo: ./mibII/vacm_conf.h ../../agent/snmpd.h +./mibII/vacm_context.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/vacm_context.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/vacm_context.lo: ../../include/net-snmp/definitions.h +./mibII/vacm_context.lo: ../../include/net-snmp/types.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/oid.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/types.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/varbind_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/vacm_context.lo: ../../include/net-snmp/pdu_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/asn1.h +./mibII/vacm_context.lo: ../../include/net-snmp/output_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/vacm_context.lo: ../../include/net-snmp/session_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/callback.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/mib.h +./mibII/vacm_context.lo: ../../include/net-snmp/mib_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/parse.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/vacm_context.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/getopt.h +./mibII/vacm_context.lo: ../../include/net-snmp/utilities.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/system.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/tools.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/int64.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/mt_support.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/data_list.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/container.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/container.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/vacm_context.lo: ../../include/net-snmp/version.h +./mibII/vacm_context.lo: ../../include/net-snmp/config_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/read_config.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/default_store.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/vacm.h +./mibII/vacm_context.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/keytools.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/scapi.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/vacm_context.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/instance.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/scalar.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/watcher.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/null.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/old_api.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/read_only.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/serialize.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_data.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_container.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/table_array.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/mfd.h +./mibII/vacm_context.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/vacm_context.lo: ./mibII/vacm_context.h +./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/vacm_vars.lo: ../../include/net-snmp/definitions.h +./mibII/vacm_vars.lo: ../../include/net-snmp/types.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/oid.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/types.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/varbind_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/vacm_vars.lo: ../../include/net-snmp/pdu_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/asn1.h +./mibII/vacm_vars.lo: ../../include/net-snmp/output_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/vacm_vars.lo: ../../include/net-snmp/session_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/callback.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/mib.h +./mibII/vacm_vars.lo: ../../include/net-snmp/mib_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/parse.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/vacm_vars.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/getopt.h +./mibII/vacm_vars.lo: ../../include/net-snmp/utilities.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/system.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/tools.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/int64.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/mt_support.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/data_list.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/container.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/container.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/vacm_vars.lo: ../../include/net-snmp/version.h +./mibII/vacm_vars.lo: ../../include/net-snmp/config_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/read_config.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/default_store.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/vacm.h +./mibII/vacm_vars.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/keytools.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/scapi.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/vacm_vars.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/instance.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/scalar.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/watcher.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/null.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/old_api.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/read_only.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/serialize.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_data.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_container.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/table_array.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/mfd.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/agent_callbacks.h +./mibII/vacm_vars.lo: ../../include/net-snmp/agent/sysORTable.h +./mibII/vacm_vars.lo: ./mibII/vacm_vars.h util_funcs/header_generic.h +./mibII/var_route.lo: ../../include/net-snmp/net-snmp-config.h +./mibII/var_route.lo: ../../include/net-snmp/net-snmp-features.h +./mibII/var_route.lo: ./mibII/route_headers.h +./mibII/var_route.lo: ../../include/net-snmp/net-snmp-includes.h +./mibII/var_route.lo: ../../include/net-snmp/definitions.h +./mibII/var_route.lo: ../../include/net-snmp/types.h +./mibII/var_route.lo: ../../include/net-snmp/library/oid.h +./mibII/var_route.lo: ../../include/net-snmp/library/types.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_api.h +./mibII/var_route.lo: ../../include/net-snmp/varbind_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_client.h +./mibII/var_route.lo: ../../include/net-snmp/pdu_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/asn1.h +./mibII/var_route.lo: ../../include/net-snmp/output_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_debug.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_logging.h +./mibII/var_route.lo: ../../include/net-snmp/session_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/callback.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_transport.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_service.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./mibII/var_route.lo: ../../include/net-snmp/library/ucd_compat.h +./mibII/var_route.lo: ../../include/net-snmp/library/mib.h +./mibII/var_route.lo: ../../include/net-snmp/mib_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/parse.h +./mibII/var_route.lo: ../../include/net-snmp/library/oid_stash.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_impl.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp-tc.h +./mibII/var_route.lo: ../../include/net-snmp/library/getopt.h +./mibII/var_route.lo: ../../include/net-snmp/utilities.h +./mibII/var_route.lo: ../../include/net-snmp/library/system.h +./mibII/var_route.lo: ../../include/net-snmp/library/tools.h +./mibII/var_route.lo: ../../include/net-snmp/library/int64.h +./mibII/var_route.lo: ../../include/net-snmp/library/mt_support.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_alarm.h +./mibII/var_route.lo: ../../include/net-snmp/library/data_list.h +./mibII/var_route.lo: ../../include/net-snmp/library/check_varbind.h +./mibII/var_route.lo: ../../include/net-snmp/library/container.h +./mibII/var_route.lo: ../../include/net-snmp/library/container_binary_array.h +./mibII/var_route.lo: ../../include/net-snmp/library/container_list_ssll.h +./mibII/var_route.lo: ../../include/net-snmp/library/container_iterator.h +./mibII/var_route.lo: ../../include/net-snmp/library/container.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_assert.h +./mibII/var_route.lo: ../../include/net-snmp/version.h +./mibII/var_route.lo: ../../include/net-snmp/config_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/read_config.h +./mibII/var_route.lo: ../../include/net-snmp/library/default_store.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_parse_args.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_enum.h +./mibII/var_route.lo: ../../include/net-snmp/library/vacm.h +./mibII/var_route.lo: ../../include/net-snmp/snmpv3_api.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpv3.h +./mibII/var_route.lo: ../../include/net-snmp/library/transform_oids.h +./mibII/var_route.lo: ../../include/net-snmp/library/keytools.h +./mibII/var_route.lo: ../../include/net-snmp/library/scapi.h +./mibII/var_route.lo: ../../include/net-snmp/library/lcd_time.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmp_secmod.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmpusm.h +./mibII/var_route.lo: ../../include/net-snmp/library/snmptsm.h +./mibII/var_route.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./mibII/var_route.lo: ../../include/net-snmp/agent/mib_module_config.h +./mibII/var_route.lo: ../../include/net-snmp/agent/agent_module_config.h +./mibII/var_route.lo: ../../include/net-snmp/agent/snmp_agent.h +./mibII/var_route.lo: ../../include/net-snmp/agent/snmp_vars.h +./mibII/var_route.lo: ../../include/net-snmp/agent/agent_handler.h +./mibII/var_route.lo: ../../include/net-snmp/agent/var_struct.h +./mibII/var_route.lo: ../../include/net-snmp/agent/agent_registry.h +./mibII/var_route.lo: ../../include/net-snmp/library/fd_event_manager.h +./mibII/var_route.lo: ../../include/net-snmp/agent/ds_agent.h +./mibII/var_route.lo: ../../include/net-snmp/agent/agent_read_config.h +./mibII/var_route.lo: ../../include/net-snmp/agent/agent_trap.h +./mibII/var_route.lo: ../../include/net-snmp/agent/all_helpers.h +./mibII/var_route.lo: ../../include/net-snmp/agent/instance.h +./mibII/var_route.lo: ../../include/net-snmp/agent/baby_steps.h +./mibII/var_route.lo: ../../include/net-snmp/agent/scalar.h +./mibII/var_route.lo: ../../include/net-snmp/agent/scalar_group.h +./mibII/var_route.lo: ../../include/net-snmp/agent/watcher.h +./mibII/var_route.lo: ../../include/net-snmp/agent/multiplexer.h +./mibII/var_route.lo: ../../include/net-snmp/agent/null.h +./mibII/var_route.lo: ../../include/net-snmp/agent/debug_handler.h +./mibII/var_route.lo: ../../include/net-snmp/agent/cache_handler.h +./mibII/var_route.lo: ../../include/net-snmp/agent/old_api.h +./mibII/var_route.lo: ../../include/net-snmp/agent/read_only.h +./mibII/var_route.lo: ../../include/net-snmp/agent/row_merge.h +./mibII/var_route.lo: ../../include/net-snmp/agent/serialize.h +./mibII/var_route.lo: ../../include/net-snmp/agent/bulk_to_next.h +./mibII/var_route.lo: ../../include/net-snmp/agent/mode_end_call.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table_data.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table_dataset.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table_tdata.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table_iterator.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table_container.h +./mibII/var_route.lo: ../../include/net-snmp/agent/table_array.h +./mibII/var_route.lo: ../../include/net-snmp/agent/mfd.h +./mibII/var_route.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./mibII/var_route.lo: ../../include/net-snmp/agent/auto_nlist.h +./mibII/var_route.lo: ../../include/net-snmp/data_access/interface.h +./mibII/var_route.lo: ./mibII/ip.h ./mibII/var_route.h ./mibII/route_write.h +./mibII/var_route.lo: ./mibII/at.h ../../agent/kernel.h ./mibII/interfaces.h +./mibII/var_route.lo: struct.h util_funcs.h util_funcs/header_generic.h +./mibII/var_route.lo: util_funcs/header_simple_table.h +./mibII/var_route.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h +./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-config.h +./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-includes.h +./misc/ipfwacc.lo: ../../include/net-snmp/definitions.h +./misc/ipfwacc.lo: ../../include/net-snmp/types.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/oid.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/types.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/varbind_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_client.h +./misc/ipfwacc.lo: ../../include/net-snmp/pdu_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/asn1.h +./misc/ipfwacc.lo: ../../include/net-snmp/output_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_debug.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_logging.h +./misc/ipfwacc.lo: ../../include/net-snmp/session_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/callback.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_transport.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_service.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/ucd_compat.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/mib.h +./misc/ipfwacc.lo: ../../include/net-snmp/mib_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/parse.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/oid_stash.h +./misc/ipfwacc.lo: ../../include/net-snmp/net-snmp-features.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_impl.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp-tc.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/getopt.h +./misc/ipfwacc.lo: ../../include/net-snmp/utilities.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/system.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/tools.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/int64.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/mt_support.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_alarm.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/data_list.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/check_varbind.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/container.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/container_binary_array.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/container_list_ssll.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/container_iterator.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/container.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_assert.h +./misc/ipfwacc.lo: ../../include/net-snmp/version.h +./misc/ipfwacc.lo: ../../include/net-snmp/config_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/read_config.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/default_store.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_parse_args.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_enum.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/vacm.h +./misc/ipfwacc.lo: ../../include/net-snmp/snmpv3_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpv3.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/transform_oids.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/keytools.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/scapi.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/lcd_time.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmp_secmod.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmpusm.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/snmptsm.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/mib_module_config.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_module_config.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/snmp_agent.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/snmp_vars.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_handler.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/var_struct.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_registry.h +./misc/ipfwacc.lo: ../../include/net-snmp/library/fd_event_manager.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/ds_agent.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_read_config.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/agent_trap.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/all_helpers.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/instance.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/baby_steps.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/scalar.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/scalar_group.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/watcher.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/multiplexer.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/null.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/debug_handler.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/cache_handler.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/old_api.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/read_only.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/row_merge.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/serialize.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/bulk_to_next.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/mode_end_call.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_data.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_dataset.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_tdata.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_iterator.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_container.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/table_array.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/mfd.h +./misc/ipfwacc.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./misc/ipfwacc.lo: util_funcs/header_simple_table.h ./misc/ipfwacc.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/net-snmp-config.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/net-snmp-features.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/net-snmp-includes.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/definitions.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/types.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/oid.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/types.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/varbind_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_client.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/pdu_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/asn1.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/output_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_debug.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_logging.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/session_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/callback.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_transport.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_service.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/ucd_compat.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/mib.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/mib_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/parse.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/oid_stash.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_impl.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp-tc.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/getopt.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/utilities.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/system.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/tools.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/int64.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/mt_support.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_alarm.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/data_list.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/check_varbind.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container_binary_array.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container_list_ssll.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container_iterator.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/container.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_assert.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/version.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/config_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/read_config.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/default_store.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_parse_args.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_enum.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/vacm.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/snmpv3_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpv3.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/transform_oids.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/keytools.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/scapi.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/lcd_time.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmp_secmod.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmpusm.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/snmptsm.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/mib_module_config.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_module_config.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/snmp_agent.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/snmp_vars.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_handler.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/var_struct.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_registry.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/library/fd_event_manager.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/ds_agent.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_read_config.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_trap.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/all_helpers.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/instance.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/baby_steps.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/scalar.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/scalar_group.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/watcher.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/multiplexer.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/null.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/debug_handler.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/cache_handler.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/old_api.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/read_only.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/row_merge.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/serialize.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/bulk_to_next.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/mode_end_call.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_data.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_dataset.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_tdata.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_iterator.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_container.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/table_array.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/mfd.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/sysORTable.h +./notification-log-mib/notification_log.lo: ../../include/net-snmp/agent/agent_callbacks.h +./notification-log-mib/notification_log.lo: ./notification-log-mib/notification_log.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/net-snmp-config.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/net-snmp-features.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/net-snmp-includes.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/definitions.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/types.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/oid.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/types.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/varbind_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_client.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/pdu_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/asn1.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/output_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_debug.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_logging.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/session_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/callback.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_transport.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_service.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/ucd_compat.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/mib.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/mib_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/parse.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/oid_stash.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_impl.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp-tc.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/getopt.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/utilities.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/system.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/tools.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/int64.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/mt_support.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/data_list.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/check_varbind.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container_binary_array.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container_iterator.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_assert.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/version.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/config_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/read_config.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/default_store.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_enum.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/vacm.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/snmpv3_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpv3.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/transform_oids.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/keytools.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/scapi.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/lcd_time.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmpusm.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/snmptsm.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_handler.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/var_struct.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_registry.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/ds_agent.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/agent_trap.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/all_helpers.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/instance.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/baby_steps.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/scalar.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/scalar_group.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/watcher.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/multiplexer.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/null.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/debug_handler.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/cache_handler.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/old_api.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/read_only.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/row_merge.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/serialize.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_data.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_dataset.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_tdata.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_iterator.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_container.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/table_array.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/mfd.h +./notification/snmpNotifyFilterProfileTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./notification/snmpNotifyFilterProfileTable.lo: header_complex.h +./notification/snmpNotifyFilterProfileTable.lo: ./notification/snmpNotifyTable_data.h +./notification/snmpNotifyFilterProfileTable.lo: ./notification/snmpNotifyFilterProfileTable.h +./notification/snmpNotifyFilterProfileTable.lo: ./notification/snmpNotifyFilterProfileTable_data.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/net-snmp-config.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/net-snmp-features.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/net-snmp-includes.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/definitions.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/types.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/oid.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/types.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/varbind_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_client.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/pdu_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/asn1.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/output_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_debug.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_logging.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/session_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/callback.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_transport.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_service.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/ucd_compat.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/mib.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/mib_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/parse.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/oid_stash.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_impl.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp-tc.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/getopt.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/utilities.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/system.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/tools.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/int64.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/mt_support.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_alarm.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/data_list.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/check_varbind.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/container_binary_array.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/container_list_ssll.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/container_iterator.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_assert.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/version.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/config_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/read_config.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/default_store.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_parse_args.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_enum.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/vacm.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/snmpv3_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpv3.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/transform_oids.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/keytools.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/scapi.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/lcd_time.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmp_secmod.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmpusm.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/snmptsm.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/mib_module_config.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/agent_module_config.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/snmp_agent.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/snmp_vars.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/agent_handler.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/var_struct.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/agent_registry.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/library/fd_event_manager.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/ds_agent.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/agent_read_config.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/agent_trap.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/all_helpers.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/instance.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/baby_steps.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/scalar.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/scalar_group.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/watcher.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/multiplexer.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/null.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/debug_handler.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/cache_handler.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/old_api.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/read_only.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/row_merge.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/serialize.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/bulk_to_next.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/mode_end_call.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table_data.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table_dataset.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table_tdata.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table_iterator.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table_container.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/table_array.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/mfd.h +./notification/snmpNotifyFilterProfileTable_data.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./notification/snmpNotifyFilterProfileTable_data.lo: header_complex.h +./notification/snmpNotifyFilterProfileTable_data.lo: ./notification/snmpNotifyTable_data.h +./notification/snmpNotifyFilterProfileTable_data.lo: ./notification/snmpNotifyFilterProfileTable_data.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/net-snmp-config.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/net-snmp-features.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/net-snmp-includes.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/definitions.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/types.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/oid.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/types.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/varbind_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_client.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/pdu_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/asn1.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/output_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_debug.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_logging.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/session_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/callback.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_transport.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_service.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/ucd_compat.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/mib.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/mib_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/parse.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/oid_stash.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_impl.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp-tc.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/getopt.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/utilities.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/system.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/tools.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/int64.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/mt_support.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_alarm.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/data_list.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/check_varbind.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container_binary_array.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container_list_ssll.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container_iterator.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_assert.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/version.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/config_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/read_config.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/default_store.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_parse_args.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_enum.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/vacm.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/snmpv3_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpv3.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/transform_oids.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/keytools.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/scapi.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/lcd_time.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmp_secmod.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmpusm.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/snmptsm.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/mib_module_config.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_module_config.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/snmp_agent.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/snmp_vars.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_handler.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/var_struct.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_registry.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/library/fd_event_manager.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/ds_agent.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_read_config.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_trap.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/all_helpers.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/instance.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/baby_steps.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/scalar.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/scalar_group.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/watcher.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/multiplexer.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/null.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/debug_handler.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/cache_handler.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/old_api.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/read_only.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/row_merge.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/serialize.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/bulk_to_next.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/mode_end_call.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_data.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_dataset.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_tdata.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_iterator.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_container.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/table_array.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/mfd.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./notification/snmpNotifyTable.lo: ../../agent/agent_global_vars.h +./notification/snmpNotifyTable.lo: header_complex.h +./notification/snmpNotifyTable.lo: ./notification/snmpNotifyTable.h +./notification/snmpNotifyTable.lo: ./notification/snmpNotifyTable_data.h +./notification/snmpNotifyTable.lo: ./notification/snmpNotifyFilterProfileTable.h +./notification/snmpNotifyTable.lo: ./notification/snmpNotifyFilterProfileTable_data.h +./notification/snmpNotifyTable.lo: target/snmpTargetParamsEntry.h +./notification/snmpNotifyTable.lo: target/snmpTargetParamsEntry_data.h +./notification/snmpNotifyTable.lo: target/snmpTargetAddrEntry.h +./notification/snmpNotifyTable.lo: target/snmpTargetAddrEntry_data.h +./notification/snmpNotifyTable.lo: target/target.h +./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h +./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h +./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +./notification/snmpNotifyTable.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/agent_callbacks.h +./notification/snmpNotifyTable.lo: ../../include/net-snmp/agent/sysORTable.h +./notification/snmpNotifyTable.lo: notification-log-mib/notification_log.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/net-snmp-config.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/net-snmp-features.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/net-snmp-includes.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/definitions.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/types.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/oid.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/types.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/varbind_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_client.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/pdu_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/asn1.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/output_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_debug.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_logging.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/session_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/callback.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_transport.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_service.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/ucd_compat.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/mib.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/mib_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/parse.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/oid_stash.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_impl.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp-tc.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/getopt.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/utilities.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/system.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/tools.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/int64.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/mt_support.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_alarm.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/data_list.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/check_varbind.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/container_binary_array.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/container_list_ssll.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/container_iterator.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/container.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_assert.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/version.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/config_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/read_config.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/default_store.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_parse_args.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_enum.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/vacm.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/snmpv3_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpv3.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/transform_oids.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/keytools.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/scapi.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/lcd_time.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmp_secmod.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmpusm.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/snmptsm.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/mib_module_config.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/agent_module_config.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/snmp_agent.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/snmp_vars.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/agent_handler.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/var_struct.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/agent_registry.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/library/fd_event_manager.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/ds_agent.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/agent_read_config.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/agent_trap.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/all_helpers.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/instance.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/baby_steps.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/scalar.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/scalar_group.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/watcher.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/multiplexer.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/null.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/debug_handler.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/cache_handler.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/old_api.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/read_only.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/row_merge.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/serialize.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/bulk_to_next.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/mode_end_call.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table_data.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table_dataset.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table_tdata.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table_iterator.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table_container.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/table_array.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/mfd.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./notification/snmpNotifyTable_data.lo: ../../agent/agent_global_vars.h +./notification/snmpNotifyTable_data.lo: header_complex.h +./notification/snmpNotifyTable_data.lo: ./notification/snmpNotifyTable_data.h +./notification/snmpNotifyTable_data.lo: notification/snmpNotifyFilterProfileTable_data.h +./notification/snmpNotifyTable_data.lo: target/snmpTargetParamsEntry_data.h +./notification/snmpNotifyTable_data.lo: target/snmpTargetAddrEntry_data.h +./notification/snmpNotifyTable_data.lo: target/target.h agentx/subagent.h +./notification/snmpNotifyTable_data.lo: snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/agent_callbacks.h +./notification/snmpNotifyTable_data.lo: ../../include/net-snmp/agent/sysORTable.h +./notification/snmpNotifyTable_data.lo: notification-log-mib/notification_log.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/net-snmp-config.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/net-snmp-includes.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/definitions.h @@ -9963,6 +10193,7 @@ ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/session_api.h @@ -9980,6 +10211,7 @@ ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/mib_api.h @@ -9999,7 +10231,6 @@ ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10020,8 +10251,8 @@ ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpAssocLocalAddrTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10073,6 +10304,7 @@ ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/session_api.h @@ -10090,6 +10322,7 @@ ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/mib_api.h @@ -10109,7 +10342,6 @@ ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10130,8 +10362,8 @@ ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpAssocRemAddrTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10183,6 +10415,7 @@ ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/session_api.h @@ -10200,6 +10433,7 @@ ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/mib_api.h @@ -10219,7 +10453,6 @@ ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10240,8 +10473,8 @@ ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpAssocTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10293,6 +10526,7 @@ ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/session_api.h @@ -10310,6 +10544,7 @@ ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/mib_api.h @@ -10329,7 +10564,6 @@ ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10350,8 +10584,8 @@ ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpLookupLocalPortTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10403,6 +10637,7 @@ ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/session_api.h @@ -10420,6 +10655,7 @@ ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/mib_api.h @@ -10439,7 +10675,6 @@ ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10460,8 +10695,8 @@ ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpLookupRemHostNameTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10513,6 +10748,7 @@ ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/session_api.h @@ -10530,6 +10766,7 @@ ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/mib_api.h @@ -10549,7 +10786,6 @@ ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10570,8 +10806,8 @@ ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpLookupRemIPAddrTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10623,6 +10859,7 @@ ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/session_api.h @@ -10640,6 +10877,7 @@ ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/mib_api.h @@ -10659,7 +10897,6 @@ ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10680,8 +10917,8 @@ ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpLookupRemPortTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10733,6 +10970,7 @@ ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/session_api.h @@ -10750,6 +10988,7 @@ ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/mib_api.h @@ -10769,7 +11008,6 @@ ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/container_iterator.h @@ -10790,8 +11028,8 @@ ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpLookupRemPrimIPAddrTable.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10843,6 +11081,7 @@ ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/session_api.h @@ -10860,6 +11099,7 @@ ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/mib_api.h @@ -10879,7 +11119,6 @@ ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/container_iterator.h @@ -10900,8 +11139,8 @@ ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpScalars.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpScalars.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -10953,6 +11192,7 @@ ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/session_api.h @@ -10970,6 +11210,7 @@ ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/mib_api.h @@ -10989,7 +11230,6 @@ ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/container_iterator.h @@ -11010,8 +11250,8 @@ ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpScalars_common.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11062,6 +11302,7 @@ ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/session_api.h @@ -11079,6 +11320,7 @@ ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/mib_api.h @@ -11098,7 +11340,6 @@ ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/container_iterator.h @@ -11119,8 +11360,8 @@ ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpScalars_freebsd.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11171,6 +11412,7 @@ ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/session_api.h @@ -11188,6 +11430,7 @@ ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/mib_api.h @@ -11207,7 +11450,6 @@ ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/container_iterator.h @@ -11228,8 +11470,8 @@ ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpScalars_linux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11280,6 +11522,7 @@ ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/session_api.h @@ -11297,6 +11540,7 @@ ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/mib_api.h @@ -11316,7 +11560,6 @@ ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/container_iterator.h @@ -11337,8 +11580,8 @@ ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpScalars_solaris2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11391,6 +11634,7 @@ ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/session_api.h @@ -11408,6 +11652,7 @@ ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/mib_api.h @@ -11426,7 +11671,6 @@ ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/container_iterator.h @@ -11447,8 +11691,8 @@ ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpTables_common.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11507,6 +11751,7 @@ ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/session_api.h @@ -11524,6 +11769,7 @@ ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/mib_api.h @@ -11543,7 +11789,6 @@ ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/container_iterator.h @@ -11564,8 +11809,8 @@ ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpTables_freebsd.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11622,6 +11867,7 @@ ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/session_api.h @@ -11639,6 +11885,7 @@ ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/mib_api.h @@ -11658,7 +11905,6 @@ ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/container_iterator.h @@ -11679,8 +11925,8 @@ ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpTables_linux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11735,6 +11981,7 @@ ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/pdu_api.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/asn1.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/output_api.h +./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmp_debug.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmp_logging.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/session_api.h @@ -11752,6 +11999,7 @@ ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/ucd_compat.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/mib.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/mib_api.h @@ -11771,7 +12019,6 @@ ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/data_list.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/check_varbind.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/container.h -./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/factory.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/container_binary_array.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/container_list_ssll.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/container_iterator.h @@ -11792,8 +12039,8 @@ ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/lcd_time.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmp_secmod.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmpusm.h +./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/agent/mib_module_config.h ./sctp-mib/sctpTables_solaris2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11852,6 +12099,7 @@ ./smux/smux.lo: ../../include/net-snmp/pdu_api.h ./smux/smux.lo: ../../include/net-snmp/library/asn1.h ./smux/smux.lo: ../../include/net-snmp/output_api.h +./smux/smux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./smux/smux.lo: ../../include/net-snmp/library/snmp_debug.h ./smux/smux.lo: ../../include/net-snmp/library/snmp_logging.h ./smux/smux.lo: ../../include/net-snmp/session_api.h @@ -11869,6 +12117,7 @@ ./smux/smux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./smux/smux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./smux/smux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./smux/smux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./smux/smux.lo: ../../include/net-snmp/library/ucd_compat.h ./smux/smux.lo: ../../include/net-snmp/library/mib.h ./smux/smux.lo: ../../include/net-snmp/mib_api.h @@ -11887,7 +12136,6 @@ ./smux/smux.lo: ../../include/net-snmp/library/data_list.h ./smux/smux.lo: ../../include/net-snmp/library/check_varbind.h ./smux/smux.lo: ../../include/net-snmp/library/container.h -./smux/smux.lo: ../../include/net-snmp/library/factory.h ./smux/smux.lo: ../../include/net-snmp/library/container_binary_array.h ./smux/smux.lo: ../../include/net-snmp/library/container_list_ssll.h ./smux/smux.lo: ../../include/net-snmp/library/container_iterator.h @@ -11908,8 +12156,8 @@ ./smux/smux.lo: ../../include/net-snmp/library/lcd_time.h ./smux/smux.lo: ../../include/net-snmp/library/snmp_secmod.h ./smux/smux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./smux/smux.lo: ../../include/net-snmp/library/snmptsm.h ./smux/smux.lo: ../../include/net-snmp/library/snmpusm.h +./smux/smux.lo: ../../include/net-snmp/library/snmptsm.h ./smux/smux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./smux/smux.lo: ../../include/net-snmp/agent/mib_module_config.h ./smux/smux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -11947,7 +12195,7 @@ ./smux/smux.lo: ../../include/net-snmp/agent/table_array.h ./smux/smux.lo: ../../include/net-snmp/agent/mfd.h ./smux/smux.lo: ../../include/net-snmp/agent/snmp_get_statistic.h smux.h -./smux/smux.lo: mibdefs.h ../../agent/snmpd.h +./smux/smux.lo: ../../agent/snmpd.h ./smux/snmp_bgp.lo: ../../include/net-snmp/net-snmp-config.h ./smux/snmp_bgp.lo: ../../include/net-snmp/net-snmp-includes.h ./smux/snmp_bgp.lo: ../../include/net-snmp/definitions.h @@ -11960,6 +12208,7 @@ ./smux/snmp_bgp.lo: ../../include/net-snmp/pdu_api.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/asn1.h ./smux/snmp_bgp.lo: ../../include/net-snmp/output_api.h +./smux/snmp_bgp.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmp_debug.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmp_logging.h ./smux/snmp_bgp.lo: ../../include/net-snmp/session_api.h @@ -11977,6 +12226,7 @@ ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/ucd_compat.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/mib.h ./smux/snmp_bgp.lo: ../../include/net-snmp/mib_api.h @@ -11996,7 +12246,6 @@ ./smux/snmp_bgp.lo: ../../include/net-snmp/library/data_list.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/check_varbind.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/container.h -./smux/snmp_bgp.lo: ../../include/net-snmp/library/factory.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/container_binary_array.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/container_list_ssll.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/container_iterator.h @@ -12017,8 +12266,8 @@ ./smux/snmp_bgp.lo: ../../include/net-snmp/library/lcd_time.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmp_secmod.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmptsm.h ./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmpusm.h +./smux/snmp_bgp.lo: ../../include/net-snmp/library/snmptsm.h ./smux/snmp_bgp.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./smux/snmp_bgp.lo: ../../include/net-snmp/agent/mib_module_config.h ./smux/snmp_bgp.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12069,6 +12318,7 @@ ./smux/snmp_ospf.lo: ../../include/net-snmp/pdu_api.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/asn1.h ./smux/snmp_ospf.lo: ../../include/net-snmp/output_api.h +./smux/snmp_ospf.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmp_debug.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmp_logging.h ./smux/snmp_ospf.lo: ../../include/net-snmp/session_api.h @@ -12086,6 +12336,7 @@ ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/ucd_compat.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/mib.h ./smux/snmp_ospf.lo: ../../include/net-snmp/mib_api.h @@ -12105,7 +12356,6 @@ ./smux/snmp_ospf.lo: ../../include/net-snmp/library/data_list.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/check_varbind.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/container.h -./smux/snmp_ospf.lo: ../../include/net-snmp/library/factory.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/container_binary_array.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/container_list_ssll.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/container_iterator.h @@ -12126,8 +12376,8 @@ ./smux/snmp_ospf.lo: ../../include/net-snmp/library/lcd_time.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmp_secmod.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmptsm.h ./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmpusm.h +./smux/snmp_ospf.lo: ../../include/net-snmp/library/snmptsm.h ./smux/snmp_ospf.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./smux/snmp_ospf.lo: ../../include/net-snmp/agent/mib_module_config.h ./smux/snmp_ospf.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12178,6 +12428,7 @@ ./smux/snmp_rip2.lo: ../../include/net-snmp/pdu_api.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/asn1.h ./smux/snmp_rip2.lo: ../../include/net-snmp/output_api.h +./smux/snmp_rip2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmp_debug.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmp_logging.h ./smux/snmp_rip2.lo: ../../include/net-snmp/session_api.h @@ -12195,6 +12446,7 @@ ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/ucd_compat.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/mib.h ./smux/snmp_rip2.lo: ../../include/net-snmp/mib_api.h @@ -12214,7 +12466,6 @@ ./smux/snmp_rip2.lo: ../../include/net-snmp/library/data_list.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/check_varbind.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/container.h -./smux/snmp_rip2.lo: ../../include/net-snmp/library/factory.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/container_binary_array.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/container_list_ssll.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/container_iterator.h @@ -12235,8 +12486,8 @@ ./smux/snmp_rip2.lo: ../../include/net-snmp/library/lcd_time.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmp_secmod.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmptsm.h ./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmpusm.h +./smux/snmp_rip2.lo: ../../include/net-snmp/library/snmptsm.h ./smux/snmp_rip2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./smux/snmp_rip2.lo: ../../include/net-snmp/agent/mib_module_config.h ./smux/snmp_rip2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12288,6 +12539,7 @@ ./snmpv3/snmpEngine.lo: ../../include/net-snmp/pdu_api.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/asn1.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/output_api.h +./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmp_debug.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmp_logging.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/session_api.h @@ -12305,6 +12557,7 @@ ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/ucd_compat.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/mib.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/mib_api.h @@ -12323,7 +12576,6 @@ ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/data_list.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/check_varbind.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/container.h -./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/factory.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/container_binary_array.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/container_list_ssll.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/container_iterator.h @@ -12344,8 +12596,8 @@ ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/lcd_time.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmp_secmod.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmpusm.h +./snmpv3/snmpEngine.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/agent/mib_module_config.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12386,118 +12638,8 @@ ./snmpv3/snmpEngine.lo: ../../include/net-snmp/agent/sysORTable.h ./snmpv3/snmpEngine.lo: ../../include/net-snmp/agent/agent_callbacks.h ./snmpv3/snmpEngine.lo: util_funcs/header_generic.h ./snmpv3/snmpEngine.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/net-snmp-config.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/net-snmp-features.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/net-snmp-includes.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/definitions.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/types.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/oid.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/types.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/varbind_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_client.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/pdu_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/asn1.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/output_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_debug.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_logging.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/session_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/callback.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_transport.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_service.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/ucd_compat.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/mib.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/mib_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/parse.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/oid_stash.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_impl.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp-tc.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/getopt.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/utilities.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/system.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/tools.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/int64.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/mt_support.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_alarm.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/data_list.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/check_varbind.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/container.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/factory.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/container_binary_array.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/container_list_ssll.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/container_iterator.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/container.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_assert.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/version.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/config_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/read_config.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/default_store.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_parse_args.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_enum.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/vacm.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/snmpv3_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpv3.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/transform_oids.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/keytools.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/scapi.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/lcd_time.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmp_secmod.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmptsm.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/snmpusm.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/mib_module_config.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/agent_module_config.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/snmp_agent.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/snmp_vars.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/agent_handler.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/var_struct.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/agent_registry.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/library/fd_event_manager.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/ds_agent.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/agent_read_config.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/agent_trap.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/all_helpers.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/instance.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/baby_steps.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/scalar.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/scalar_group.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/watcher.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/multiplexer.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/null.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/debug_handler.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/cache_handler.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/old_api.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/read_only.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/row_merge.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/serialize.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/bulk_to_next.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/mode_end_call.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table_data.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table_dataset.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table_tdata.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table_iterator.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table_container.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/table_array.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/mfd.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/sysORTable.h -./snmpv3/snmpMPDStats_5_5.lo: ../../include/net-snmp/agent/agent_callbacks.h -./snmpv3/snmpMPDStats_5_5.lo: ./snmpv3/snmpMPDStats_5_5.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/net-snmp-config.h +./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/net-snmp-features.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/net-snmp-includes.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/definitions.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/types.h @@ -12509,6 +12651,7 @@ ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/pdu_api.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/asn1.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/output_api.h +./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmp_debug.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmp_logging.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/session_api.h @@ -12526,12 +12669,12 @@ ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/ucd_compat.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/mib.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/mib_api.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/parse.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/oid_stash.h -./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/net-snmp-features.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmp_impl.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmp.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmp-tc.h @@ -12545,7 +12688,6 @@ ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/data_list.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/check_varbind.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/container.h -./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/factory.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/container_binary_array.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/container_list_ssll.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/container_iterator.h @@ -12566,8 +12708,8 @@ ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/lcd_time.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmp_secmod.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmpusm.h +./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/agent/mib_module_config.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12607,7 +12749,7 @@ ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/agent/sysORTable.h ./snmpv3/snmpMPDStats.lo: ../../include/net-snmp/agent/agent_callbacks.h -./snmpv3/snmpMPDStats.lo: ./snmpv3/snmpMPDStats.h util_funcs/header_generic.h +./snmpv3/snmpMPDStats.lo: ./snmpv3/snmpMPDStats.h ./snmpv3/usmConf.lo: ../../include/net-snmp/net-snmp-config.h ./snmpv3/usmConf.lo: ../../include/net-snmp/net-snmp-includes.h ./snmpv3/usmConf.lo: ../../include/net-snmp/definitions.h @@ -12620,6 +12762,7 @@ ./snmpv3/usmConf.lo: ../../include/net-snmp/pdu_api.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/asn1.h ./snmpv3/usmConf.lo: ../../include/net-snmp/output_api.h +./snmpv3/usmConf.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmp_debug.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmp_logging.h ./snmpv3/usmConf.lo: ../../include/net-snmp/session_api.h @@ -12637,6 +12780,7 @@ ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/ucd_compat.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/mib.h ./snmpv3/usmConf.lo: ../../include/net-snmp/mib_api.h @@ -12656,7 +12800,6 @@ ./snmpv3/usmConf.lo: ../../include/net-snmp/library/data_list.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/check_varbind.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/container.h -./snmpv3/usmConf.lo: ../../include/net-snmp/library/factory.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/container_binary_array.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/container_list_ssll.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/container_iterator.h @@ -12677,8 +12820,8 @@ ./snmpv3/usmConf.lo: ../../include/net-snmp/library/lcd_time.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmp_secmod.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmpusm.h +./snmpv3/usmConf.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/usmConf.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./snmpv3/usmConf.lo: ../../include/net-snmp/agent/mib_module_config.h ./snmpv3/usmConf.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12716,118 +12859,8 @@ ./snmpv3/usmConf.lo: ../../include/net-snmp/agent/table_array.h ./snmpv3/usmConf.lo: ../../include/net-snmp/agent/mfd.h ./snmpv3/usmConf.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/net-snmp-config.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/net-snmp-features.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/net-snmp-includes.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/definitions.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/types.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/oid.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/types.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/varbind_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_client.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/pdu_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/asn1.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/output_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_debug.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_logging.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/session_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/callback.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_transport.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_service.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/ucd_compat.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/mib.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/mib_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/parse.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/oid_stash.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_impl.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp-tc.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/getopt.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/utilities.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/system.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/tools.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/int64.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/mt_support.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_alarm.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/data_list.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/check_varbind.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/container.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/factory.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/container_binary_array.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/container_list_ssll.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/container_iterator.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/container.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_assert.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/version.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/config_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/read_config.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/default_store.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_parse_args.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_enum.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/vacm.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/snmpv3_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpv3.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/transform_oids.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/keytools.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/scapi.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/lcd_time.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmp_secmod.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmptsm.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/snmpusm.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/mib_module_config.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/agent_module_config.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/snmp_agent.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/snmp_vars.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/agent_handler.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/var_struct.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/agent_registry.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/library/fd_event_manager.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/ds_agent.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/agent_read_config.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/agent_trap.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/all_helpers.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/instance.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/baby_steps.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/scalar.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/scalar_group.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/watcher.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/multiplexer.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/null.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/debug_handler.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/cache_handler.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/old_api.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/read_only.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/row_merge.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/serialize.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/bulk_to_next.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/mode_end_call.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table_data.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table_dataset.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table_tdata.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table_iterator.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table_container.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/table_array.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/mfd.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/sysORTable.h -./snmpv3/usmStats_5_5.lo: ../../include/net-snmp/agent/agent_callbacks.h -./snmpv3/usmStats_5_5.lo: ./snmpv3/usmStats_5_5.h ./snmpv3/usmStats.lo: ../../include/net-snmp/net-snmp-config.h +./snmpv3/usmStats.lo: ../../include/net-snmp/net-snmp-features.h ./snmpv3/usmStats.lo: ../../include/net-snmp/net-snmp-includes.h ./snmpv3/usmStats.lo: ../../include/net-snmp/definitions.h ./snmpv3/usmStats.lo: ../../include/net-snmp/types.h @@ -12839,6 +12872,7 @@ ./snmpv3/usmStats.lo: ../../include/net-snmp/pdu_api.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/asn1.h ./snmpv3/usmStats.lo: ../../include/net-snmp/output_api.h +./snmpv3/usmStats.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp_debug.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp_logging.h ./snmpv3/usmStats.lo: ../../include/net-snmp/session_api.h @@ -12856,12 +12890,12 @@ ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/ucd_compat.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/mib.h ./snmpv3/usmStats.lo: ../../include/net-snmp/mib_api.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/parse.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/oid_stash.h -./snmpv3/usmStats.lo: ../../include/net-snmp/net-snmp-features.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp_impl.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp-tc.h @@ -12875,7 +12909,6 @@ ./snmpv3/usmStats.lo: ../../include/net-snmp/library/data_list.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/check_varbind.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/container.h -./snmpv3/usmStats.lo: ../../include/net-snmp/library/factory.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/container_binary_array.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/container_list_ssll.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/container_iterator.h @@ -12896,8 +12929,8 @@ ./snmpv3/usmStats.lo: ../../include/net-snmp/library/lcd_time.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmp_secmod.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmpusm.h +./snmpv3/usmStats.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/usmStats.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./snmpv3/usmStats.lo: ../../include/net-snmp/agent/mib_module_config.h ./snmpv3/usmStats.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -12937,7 +12970,7 @@ ./snmpv3/usmStats.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./snmpv3/usmStats.lo: ../../include/net-snmp/agent/sysORTable.h ./snmpv3/usmStats.lo: ../../include/net-snmp/agent/agent_callbacks.h -./snmpv3/usmStats.lo: util_funcs/header_generic.h ./snmpv3/usmStats.h +./snmpv3/usmStats.lo: ./snmpv3/usmStats.h ./snmpv3/usmUser.lo: ../../include/net-snmp/net-snmp-config.h ./snmpv3/usmUser.lo: ../../include/net-snmp/net-snmp-features.h ./snmpv3/usmUser.lo: ../../include/net-snmp/net-snmp-includes.h @@ -12951,6 +12984,7 @@ ./snmpv3/usmUser.lo: ../../include/net-snmp/pdu_api.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/asn1.h ./snmpv3/usmUser.lo: ../../include/net-snmp/output_api.h +./snmpv3/usmUser.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmp_debug.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmp_logging.h ./snmpv3/usmUser.lo: ../../include/net-snmp/session_api.h @@ -12968,6 +13002,7 @@ ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/ucd_compat.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/mib.h ./snmpv3/usmUser.lo: ../../include/net-snmp/mib_api.h @@ -12986,7 +13021,6 @@ ./snmpv3/usmUser.lo: ../../include/net-snmp/library/data_list.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/check_varbind.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/container.h -./snmpv3/usmUser.lo: ../../include/net-snmp/library/factory.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/container_binary_array.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/container_list_ssll.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/container_iterator.h @@ -13007,8 +13041,8 @@ ./snmpv3/usmUser.lo: ../../include/net-snmp/library/lcd_time.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmp_secmod.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmpusm.h +./snmpv3/usmUser.lo: ../../include/net-snmp/library/snmptsm.h ./snmpv3/usmUser.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./snmpv3/usmUser.lo: ../../include/net-snmp/agent/mib_module_config.h ./snmpv3/usmUser.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13059,6 +13093,7 @@ ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/pdu_api.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/asn1.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/output_api.h +./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmp_debug.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmp_logging.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/session_api.h @@ -13076,6 +13111,7 @@ ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/ucd_compat.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/mib.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/mib_api.h @@ -13095,7 +13131,6 @@ ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/data_list.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/check_varbind.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/container.h -./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/factory.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/container_binary_array.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/container_list_ssll.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/container_iterator.h @@ -13116,8 +13151,8 @@ ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/lcd_time.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmp_secmod.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmptsm.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmpusm.h +./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/library/snmptsm.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/agent/mib_module_config.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13156,7 +13191,119 @@ ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/agent/mfd.h ./target/snmpTargetAddrEntry.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./target/snmpTargetAddrEntry.lo: ./target/snmpTargetAddrEntry.h +./target/snmpTargetAddrEntry.lo: target/snmpTargetAddrEntry_data.h ./target/snmpTargetAddrEntry.lo: util_funcs/header_generic.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/net-snmp-config.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/net-snmp-includes.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/definitions.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/types.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/oid.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/types.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/varbind_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_client.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/pdu_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/asn1.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/output_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_debug.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_logging.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/session_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/callback.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_transport.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_service.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/ucd_compat.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/mib.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/mib_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/parse.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/oid_stash.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/net-snmp-features.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_impl.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp-tc.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/getopt.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/utilities.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/system.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/tools.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/int64.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/mt_support.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_alarm.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/data_list.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/check_varbind.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/container.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/container_binary_array.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/container_list_ssll.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/container_iterator.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/container.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_assert.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/version.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/config_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/read_config.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/default_store.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_parse_args.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_enum.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/vacm.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/snmpv3_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpv3.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/transform_oids.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/keytools.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/scapi.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/lcd_time.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmp_secmod.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmpusm.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/snmptsm.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/mib_module_config.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/agent_module_config.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/snmp_agent.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/snmp_vars.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/agent_handler.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/var_struct.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/agent_registry.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/library/fd_event_manager.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/ds_agent.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/agent_read_config.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/agent_trap.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/all_helpers.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/instance.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/baby_steps.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/scalar.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/scalar_group.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/watcher.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/multiplexer.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/null.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/debug_handler.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/cache_handler.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/old_api.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/read_only.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/row_merge.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/serialize.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/bulk_to_next.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/mode_end_call.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table_data.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table_dataset.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table_tdata.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table_iterator.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table_container.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/table_array.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/mfd.h +./target/snmpTargetAddrEntry_data.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./target/snmpTargetAddrEntry_data.lo: target/snmpTargetAddrEntry_data.h +./target/snmpTargetAddrEntry_data.lo: util_funcs/header_generic.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/net-snmp-config.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/net-snmp-includes.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/definitions.h @@ -13169,6 +13316,7 @@ ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/pdu_api.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/asn1.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/output_api.h +./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmp_debug.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmp_logging.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/session_api.h @@ -13186,6 +13334,7 @@ ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/ucd_compat.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/mib.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/mib_api.h @@ -13205,7 +13354,6 @@ ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/data_list.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/check_varbind.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/container.h -./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/factory.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/container_binary_array.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/container_list_ssll.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/container_iterator.h @@ -13226,8 +13374,8 @@ ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/lcd_time.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmp_secmod.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmptsm.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmpusm.h +./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/library/snmptsm.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/agent/mib_module_config.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13266,6 +13414,117 @@ ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/agent/mfd.h ./target/snmpTargetParamsEntry.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./target/snmpTargetParamsEntry.lo: ./target/snmpTargetParamsEntry.h +./target/snmpTargetParamsEntry.lo: target/snmpTargetParamsEntry_data.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/net-snmp-config.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/net-snmp-includes.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/definitions.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/types.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/oid.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/types.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/varbind_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_client.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/pdu_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/asn1.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/output_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_debug.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_logging.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/session_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/callback.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_transport.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_service.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/ucd_compat.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/mib.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/mib_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/parse.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/oid_stash.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/net-snmp-features.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_impl.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp-tc.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/getopt.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/utilities.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/system.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/tools.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/int64.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/mt_support.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_alarm.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/data_list.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/check_varbind.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/container.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/container_binary_array.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/container_list_ssll.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/container_iterator.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/container.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_assert.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/version.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/config_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/read_config.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/default_store.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_parse_args.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_enum.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/vacm.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/snmpv3_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpv3.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/transform_oids.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/keytools.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/scapi.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/lcd_time.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmp_secmod.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmpusm.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/snmptsm.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/mib_module_config.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/agent_module_config.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/snmp_agent.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/snmp_vars.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/agent_handler.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/var_struct.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/agent_registry.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/library/fd_event_manager.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/ds_agent.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/agent_read_config.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/agent_trap.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/all_helpers.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/instance.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/baby_steps.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/scalar.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/scalar_group.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/watcher.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/multiplexer.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/null.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/debug_handler.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/cache_handler.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/old_api.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/read_only.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/row_merge.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/serialize.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/bulk_to_next.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/mode_end_call.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table_data.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table_dataset.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table_tdata.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table_iterator.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table_container.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/table_array.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/mfd.h +./target/snmpTargetParamsEntry_data.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./target/snmpTargetParamsEntry_data.lo: target/snmpTargetParamsEntry_data.h ./target/target.lo: ../../include/net-snmp/net-snmp-config.h ./target/target.lo: ../../include/net-snmp/net-snmp-features.h ./target/target.lo: ../../include/net-snmp/net-snmp-includes.h @@ -13279,6 +13538,7 @@ ./target/target.lo: ../../include/net-snmp/pdu_api.h ./target/target.lo: ../../include/net-snmp/library/asn1.h ./target/target.lo: ../../include/net-snmp/output_api.h +./target/target.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./target/target.lo: ../../include/net-snmp/library/snmp_debug.h ./target/target.lo: ../../include/net-snmp/library/snmp_logging.h ./target/target.lo: ../../include/net-snmp/session_api.h @@ -13296,6 +13556,7 @@ ./target/target.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./target/target.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./target/target.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./target/target.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./target/target.lo: ../../include/net-snmp/library/ucd_compat.h ./target/target.lo: ../../include/net-snmp/library/mib.h ./target/target.lo: ../../include/net-snmp/mib_api.h @@ -13314,7 +13575,6 @@ ./target/target.lo: ../../include/net-snmp/library/data_list.h ./target/target.lo: ../../include/net-snmp/library/check_varbind.h ./target/target.lo: ../../include/net-snmp/library/container.h -./target/target.lo: ../../include/net-snmp/library/factory.h ./target/target.lo: ../../include/net-snmp/library/container_binary_array.h ./target/target.lo: ../../include/net-snmp/library/container_list_ssll.h ./target/target.lo: ../../include/net-snmp/library/container_iterator.h @@ -13335,8 +13595,8 @@ ./target/target.lo: ../../include/net-snmp/library/lcd_time.h ./target/target.lo: ../../include/net-snmp/library/snmp_secmod.h ./target/target.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./target/target.lo: ../../include/net-snmp/library/snmptsm.h ./target/target.lo: ../../include/net-snmp/library/snmpusm.h +./target/target.lo: ../../include/net-snmp/library/snmptsm.h ./target/target.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./target/target.lo: ../../include/net-snmp/agent/mib_module_config.h ./target/target.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13375,117 +13635,11 @@ ./target/target.lo: ../../include/net-snmp/agent/mfd.h ./target/target.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./target/target.lo: ./target/snmpTargetAddrEntry.h -./target/target.lo: ./target/snmpTargetParamsEntry.h target.h -./target/target_counters_5_5.lo: ../../include/net-snmp/net-snmp-config.h -./target/target_counters_5_5.lo: ../../include/net-snmp/net-snmp-features.h -./target/target_counters_5_5.lo: ../../include/net-snmp/net-snmp-includes.h -./target/target_counters_5_5.lo: ../../include/net-snmp/definitions.h -./target/target_counters_5_5.lo: ../../include/net-snmp/types.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/oid.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/types.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/varbind_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_client.h -./target/target_counters_5_5.lo: ../../include/net-snmp/pdu_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/asn1.h -./target/target_counters_5_5.lo: ../../include/net-snmp/output_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_debug.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_logging.h -./target/target_counters_5_5.lo: ../../include/net-snmp/session_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/callback.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_transport.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_service.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/ucd_compat.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/mib.h -./target/target_counters_5_5.lo: ../../include/net-snmp/mib_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/parse.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/oid_stash.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_impl.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp-tc.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/getopt.h -./target/target_counters_5_5.lo: ../../include/net-snmp/utilities.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/system.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/tools.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/int64.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/mt_support.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_alarm.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/data_list.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/check_varbind.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/container.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/factory.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/container_binary_array.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/container_list_ssll.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/container_iterator.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/container.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_assert.h -./target/target_counters_5_5.lo: ../../include/net-snmp/version.h -./target/target_counters_5_5.lo: ../../include/net-snmp/config_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/read_config.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/default_store.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_parse_args.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_enum.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/vacm.h -./target/target_counters_5_5.lo: ../../include/net-snmp/snmpv3_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpv3.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/transform_oids.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/keytools.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/scapi.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/lcd_time.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmp_secmod.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmptsm.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/snmpusm.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/mib_module_config.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/agent_module_config.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/snmp_agent.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/snmp_vars.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/agent_handler.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/var_struct.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/agent_registry.h -./target/target_counters_5_5.lo: ../../include/net-snmp/library/fd_event_manager.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/ds_agent.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/agent_read_config.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/agent_trap.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/all_helpers.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/instance.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/baby_steps.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/scalar.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/scalar_group.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/watcher.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/multiplexer.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/null.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/debug_handler.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/cache_handler.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/old_api.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/read_only.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/row_merge.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/serialize.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/bulk_to_next.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/mode_end_call.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table_data.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table_dataset.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table_tdata.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table_iterator.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table_container.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/table_array.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/mfd.h -./target/target_counters_5_5.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./target/target_counters_5_5.lo: ./target/target_counters_5_5.h +./target/target.lo: target/snmpTargetAddrEntry_data.h +./target/target.lo: ./target/snmpTargetParamsEntry.h +./target/target.lo: target/snmpTargetParamsEntry_data.h target.h ./target/target_counters.lo: ../../include/net-snmp/net-snmp-config.h +./target/target_counters.lo: ../../include/net-snmp/net-snmp-features.h ./target/target_counters.lo: ../../include/net-snmp/net-snmp-includes.h ./target/target_counters.lo: ../../include/net-snmp/definitions.h ./target/target_counters.lo: ../../include/net-snmp/types.h @@ -13497,6 +13651,7 @@ ./target/target_counters.lo: ../../include/net-snmp/pdu_api.h ./target/target_counters.lo: ../../include/net-snmp/library/asn1.h ./target/target_counters.lo: ../../include/net-snmp/output_api.h +./target/target_counters.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./target/target_counters.lo: ../../include/net-snmp/library/snmp_debug.h ./target/target_counters.lo: ../../include/net-snmp/library/snmp_logging.h ./target/target_counters.lo: ../../include/net-snmp/session_api.h @@ -13514,12 +13669,12 @@ ./target/target_counters.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./target/target_counters.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./target/target_counters.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./target/target_counters.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./target/target_counters.lo: ../../include/net-snmp/library/ucd_compat.h ./target/target_counters.lo: ../../include/net-snmp/library/mib.h ./target/target_counters.lo: ../../include/net-snmp/mib_api.h ./target/target_counters.lo: ../../include/net-snmp/library/parse.h ./target/target_counters.lo: ../../include/net-snmp/library/oid_stash.h -./target/target_counters.lo: ../../include/net-snmp/net-snmp-features.h ./target/target_counters.lo: ../../include/net-snmp/library/snmp_impl.h ./target/target_counters.lo: ../../include/net-snmp/library/snmp.h ./target/target_counters.lo: ../../include/net-snmp/library/snmp-tc.h @@ -13533,7 +13688,6 @@ ./target/target_counters.lo: ../../include/net-snmp/library/data_list.h ./target/target_counters.lo: ../../include/net-snmp/library/check_varbind.h ./target/target_counters.lo: ../../include/net-snmp/library/container.h -./target/target_counters.lo: ../../include/net-snmp/library/factory.h ./target/target_counters.lo: ../../include/net-snmp/library/container_binary_array.h ./target/target_counters.lo: ../../include/net-snmp/library/container_list_ssll.h ./target/target_counters.lo: ../../include/net-snmp/library/container_iterator.h @@ -13554,8 +13708,8 @@ ./target/target_counters.lo: ../../include/net-snmp/library/lcd_time.h ./target/target_counters.lo: ../../include/net-snmp/library/snmp_secmod.h ./target/target_counters.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./target/target_counters.lo: ../../include/net-snmp/library/snmptsm.h ./target/target_counters.lo: ../../include/net-snmp/library/snmpusm.h +./target/target_counters.lo: ../../include/net-snmp/library/snmptsm.h ./target/target_counters.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./target/target_counters.lo: ../../include/net-snmp/agent/mib_module_config.h ./target/target_counters.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13606,6 +13760,7 @@ ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/pdu_api.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/asn1.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/output_api.h +./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmp_debug.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmp_logging.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/session_api.h @@ -13623,6 +13778,7 @@ ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/ucd_compat.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/mib.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/mib_api.h @@ -13642,7 +13798,6 @@ ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/data_list.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/check_varbind.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/container.h -./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/factory.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/container_binary_array.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/container_list_ssll.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/container_iterator.h @@ -13663,8 +13818,8 @@ ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/lcd_time.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmp_secmod.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmptsm.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmpusm.h +./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/library/snmptsm.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/agent/mib_module_config.h ./tsm-mib/snmpTsmConfigurationUsePrefix.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13715,6 +13870,7 @@ ./tunnel/tunnel.lo: ../../include/net-snmp/pdu_api.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/asn1.h ./tunnel/tunnel.lo: ../../include/net-snmp/output_api.h +./tunnel/tunnel.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmp_debug.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmp_logging.h ./tunnel/tunnel.lo: ../../include/net-snmp/session_api.h @@ -13732,6 +13888,7 @@ ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/ucd_compat.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/mib.h ./tunnel/tunnel.lo: ../../include/net-snmp/mib_api.h @@ -13751,7 +13908,6 @@ ./tunnel/tunnel.lo: ../../include/net-snmp/library/data_list.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/check_varbind.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/container.h -./tunnel/tunnel.lo: ../../include/net-snmp/library/factory.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/container_binary_array.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/container_list_ssll.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/container_iterator.h @@ -13772,8 +13928,8 @@ ./tunnel/tunnel.lo: ../../include/net-snmp/library/lcd_time.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmp_secmod.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./tunnel/tunnel.lo: ../../include/net-snmp/library/snmptsm.h ./tunnel/tunnel.lo: ../../include/net-snmp/library/snmpusm.h +./tunnel/tunnel.lo: ../../include/net-snmp/library/snmptsm.h ./tunnel/tunnel.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./tunnel/tunnel.lo: ../../include/net-snmp/agent/mib_module_config.h ./tunnel/tunnel.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -13820,117 +13976,6 @@ ./tunnel/tunnel.lo: if-mib/ifTable/ifTable.h ./tunnel/tunnel.lo: if-mib/ifTable/ifTable_data_access.h ./tunnel/tunnel.lo: if-mib/ifTable/ifTable_defs.h -./ucd-snmp/disk.lo: ../../include/net-snmp/net-snmp-config.h -./ucd-snmp/disk.lo: ../../include/net-snmp/net-snmp-includes.h -./ucd-snmp/disk.lo: ../../include/net-snmp/definitions.h -./ucd-snmp/disk.lo: ../../include/net-snmp/types.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/oid.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/types.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/varbind_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_client.h -./ucd-snmp/disk.lo: ../../include/net-snmp/pdu_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/asn1.h -./ucd-snmp/disk.lo: ../../include/net-snmp/output_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_debug.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_logging.h -./ucd-snmp/disk.lo: ../../include/net-snmp/session_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/callback.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_transport.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_service.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/ucd_compat.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/mib.h -./ucd-snmp/disk.lo: ../../include/net-snmp/mib_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/parse.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/oid_stash.h -./ucd-snmp/disk.lo: ../../include/net-snmp/net-snmp-features.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_impl.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp-tc.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/getopt.h -./ucd-snmp/disk.lo: ../../include/net-snmp/utilities.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/system.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/tools.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/int64.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/mt_support.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_alarm.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/data_list.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/check_varbind.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/factory.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/container_binary_array.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/container_list_ssll.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/container_iterator.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_assert.h -./ucd-snmp/disk.lo: ../../include/net-snmp/version.h -./ucd-snmp/disk.lo: ../../include/net-snmp/config_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/read_config.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/default_store.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_parse_args.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_enum.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/vacm.h -./ucd-snmp/disk.lo: ../../include/net-snmp/snmpv3_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpv3.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/transform_oids.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/keytools.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/scapi.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/lcd_time.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmp_secmod.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmptsm.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/snmpusm.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/mib_module_config.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/agent_module_config.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/snmp_agent.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/snmp_vars.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/agent_handler.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/var_struct.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/agent_registry.h -./ucd-snmp/disk.lo: ../../include/net-snmp/library/fd_event_manager.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/ds_agent.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/agent_read_config.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/agent_trap.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/all_helpers.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/instance.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/baby_steps.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/scalar.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/scalar_group.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/watcher.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/multiplexer.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/null.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/debug_handler.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/cache_handler.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/old_api.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/read_only.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/row_merge.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/serialize.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/bulk_to_next.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/mode_end_call.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table_data.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table_dataset.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table_tdata.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table_iterator.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table_container.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/table_array.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/mfd.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./ucd-snmp/disk.lo: ../../include/net-snmp/agent/auto_nlist.h struct.h -./ucd-snmp/disk.lo: ./ucd-snmp/disk.h mibdefs.h -./ucd-snmp/disk.lo: util_funcs/header_simple_table.h ./ucd-snmp/errormib.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/net-snmp-includes.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/definitions.h @@ -13943,6 +13988,7 @@ ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/session_api.h @@ -13960,6 +14006,7 @@ ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/mib_api.h @@ -13979,7 +14026,6 @@ ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/container_iterator.h @@ -14000,8 +14046,8 @@ ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/disk_hw.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14040,7 +14086,7 @@ ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/mfd.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./ucd-snmp/disk_hw.lo: ../../include/net-snmp/agent/hardware/fsys.h struct.h -./ucd-snmp/disk_hw.lo: ./ucd-snmp/disk.h mibdefs.h +./ucd-snmp/disk_hw.lo: mibdefs.h ./ucd-snmp/disk_hw.h ./ucd-snmp/disk_hw.lo: util_funcs/header_simple_table.h ./ucd-snmp/errormib.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/net-snmp-includes.h @@ -14054,6 +14100,7 @@ ./ucd-snmp/diskio.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/diskio.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/session_api.h @@ -14071,6 +14118,7 @@ ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/mib_api.h @@ -14090,7 +14138,6 @@ ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/diskio.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/container_iterator.h @@ -14111,8 +14158,8 @@ ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/diskio.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14151,7 +14198,8 @@ ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/mfd.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/snmp_get_statistic.h ./ucd-snmp/diskio.lo: ../../include/net-snmp/agent/agent_callbacks.h -./ucd-snmp/diskio.lo: util_funcs/header_simple_table.h ./ucd-snmp/diskio.h +./ucd-snmp/diskio.lo: util_funcs/header_simple_table.h struct.h +./ucd-snmp/diskio.lo: ./ucd-snmp/diskio.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/net-snmp-features.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/net-snmp-includes.h @@ -14165,6 +14213,7 @@ ./ucd-snmp/dlmod.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/session_api.h @@ -14182,6 +14231,7 @@ ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/mib_api.h @@ -14200,7 +14250,6 @@ ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/container_iterator.h @@ -14221,8 +14270,8 @@ ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/dlmod.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/dlmod.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14273,6 +14322,7 @@ ./ucd-snmp/errormib.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/errormib.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/session_api.h @@ -14290,6 +14340,7 @@ ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/mib_api.h @@ -14309,7 +14360,6 @@ ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/errormib.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/container_iterator.h @@ -14330,8 +14380,8 @@ ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/errormib.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/errormib.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14385,6 +14435,7 @@ ./ucd-snmp/extensible.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/extensible.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/session_api.h @@ -14402,6 +14453,7 @@ ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/mib_api.h @@ -14420,7 +14472,6 @@ ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/extensible.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/container_iterator.h @@ -14441,8 +14492,8 @@ ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/extensible.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14483,7 +14534,7 @@ ./ucd-snmp/extensible.lo: ../../include/net-snmp/agent/auto_nlist.h ./ucd-snmp/extensible.lo: ../../include/net-snmp/agent/agent_callbacks.h ./ucd-snmp/extensible.lo: struct.h ./ucd-snmp/extensible.h mibdefs.h -./ucd-snmp/extensible.lo: ../../agent/mibgroup/util_funcs.h +./ucd-snmp/extensible.lo: ./ucd-snmp/pass.h ../../agent/mibgroup/util_funcs.h ./ucd-snmp/extensible.lo: util_funcs/header_generic.h ./ucd-snmp/extensible.lo: util_funcs/header_simple_table.h ./ucd-snmp/extensible.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h @@ -14500,6 +14551,7 @@ ./ucd-snmp/file.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/file.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/file.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/file.lo: ../../include/net-snmp/session_api.h @@ -14517,6 +14569,7 @@ ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/file.lo: ../../include/net-snmp/mib_api.h @@ -14536,7 +14589,6 @@ ./ucd-snmp/file.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/file.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/container_iterator.h @@ -14557,8 +14609,8 @@ ./ucd-snmp/file.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/file.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/file.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/file.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/file.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/file.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/file.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14610,6 +14662,7 @@ ./ucd-snmp/hpux.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/hpux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/session_api.h @@ -14627,6 +14680,7 @@ ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/mib_api.h @@ -14646,7 +14700,6 @@ ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/hpux.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/container_iterator.h @@ -14667,8 +14720,8 @@ ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/hpux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/hpux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14720,6 +14773,7 @@ ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/session_api.h @@ -14737,6 +14791,7 @@ ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/mib_api.h @@ -14755,7 +14810,6 @@ ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/container_iterator.h @@ -14776,8 +14830,8 @@ ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/lmSensors.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/lmSensors.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14829,6 +14883,7 @@ ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/session_api.h @@ -14846,6 +14901,7 @@ ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/mib_api.h @@ -14865,7 +14921,6 @@ ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/container_iterator.h @@ -14886,8 +14941,8 @@ ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/lmsensorsMib.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -14940,6 +14995,7 @@ ./ucd-snmp/loadave.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/loadave.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/session_api.h @@ -14957,6 +15013,7 @@ ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/mib_api.h @@ -14976,7 +15033,6 @@ ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/loadave.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/container_iterator.h @@ -14997,8 +15053,8 @@ ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/loadave.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/loadave.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15041,6 +15097,117 @@ ./ucd-snmp/loadave.lo: util_funcs/header_simple_table.h ../../agent/kernel.h ./ucd-snmp/logmatch.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/logmatch.lo: ./ucd-snmp/logmatch.h +./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-config.h +./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-includes.h +./ucd-snmp/memory.lo: ../../include/net-snmp/definitions.h +./ucd-snmp/memory.lo: ../../include/net-snmp/types.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/oid.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/types.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/varbind_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_client.h +./ucd-snmp/memory.lo: ../../include/net-snmp/pdu_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/asn1.h +./ucd-snmp/memory.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_debug.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_logging.h +./ucd-snmp/memory.lo: ../../include/net-snmp/session_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/callback.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_transport.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_service.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/ucd_compat.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/mib.h +./ucd-snmp/memory.lo: ../../include/net-snmp/mib_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/parse.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/oid_stash.h +./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-features.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_impl.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp-tc.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/getopt.h +./ucd-snmp/memory.lo: ../../include/net-snmp/utilities.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/system.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/tools.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/int64.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/mt_support.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_alarm.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/data_list.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/check_varbind.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/container.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/container_binary_array.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/container_list_ssll.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/container_iterator.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/container.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_assert.h +./ucd-snmp/memory.lo: ../../include/net-snmp/version.h +./ucd-snmp/memory.lo: ../../include/net-snmp/config_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/read_config.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/default_store.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_parse_args.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_enum.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/vacm.h +./ucd-snmp/memory.lo: ../../include/net-snmp/snmpv3_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpv3.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/transform_oids.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/keytools.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/scapi.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/lcd_time.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_secmod.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmptsm.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/mib_module_config.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_module_config.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/snmp_agent.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/snmp_vars.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_handler.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/var_struct.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_registry.h +./ucd-snmp/memory.lo: ../../include/net-snmp/library/fd_event_manager.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/ds_agent.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_read_config.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_trap.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/all_helpers.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/instance.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/baby_steps.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/scalar.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/scalar_group.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/watcher.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/multiplexer.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/null.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/debug_handler.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/cache_handler.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/old_api.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/read_only.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/row_merge.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/serialize.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/bulk_to_next.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/mode_end_call.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_data.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_dataset.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_tdata.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_iterator.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_container.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_array.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/mfd.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./ucd-snmp/memory.lo: ../../include/net-snmp/agent/hardware/memory.h +./ucd-snmp/memory.lo: ./ucd-snmp/memory.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/net-snmp-includes.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/definitions.h @@ -15053,6 +15220,7 @@ ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/session_api.h @@ -15070,6 +15238,7 @@ ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/mib_api.h @@ -15089,7 +15258,6 @@ ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/container_iterator.h @@ -15110,8 +15278,8 @@ ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15152,116 +15320,6 @@ ./ucd-snmp/memory_aix4.lo: ../../include/net-snmp/agent/auto_nlist.h ./ucd-snmp/memory_aix4.lo: util_funcs/header_generic.h ./ucd-snmp/memory.h ./ucd-snmp/memory_aix4.lo: ./ucd-snmp/memory_aix4.h mibdefs.h -./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-config.h -./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-includes.h -./ucd-snmp/memory.lo: ../../include/net-snmp/definitions.h -./ucd-snmp/memory.lo: ../../include/net-snmp/types.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/oid.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/types.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/varbind_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_client.h -./ucd-snmp/memory.lo: ../../include/net-snmp/pdu_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/asn1.h -./ucd-snmp/memory.lo: ../../include/net-snmp/output_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_debug.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_logging.h -./ucd-snmp/memory.lo: ../../include/net-snmp/session_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/callback.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_transport.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_service.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/ucd_compat.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/mib.h -./ucd-snmp/memory.lo: ../../include/net-snmp/mib_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/parse.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/oid_stash.h -./ucd-snmp/memory.lo: ../../include/net-snmp/net-snmp-features.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_impl.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp-tc.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/getopt.h -./ucd-snmp/memory.lo: ../../include/net-snmp/utilities.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/system.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/tools.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/int64.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/mt_support.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_alarm.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/data_list.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/check_varbind.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/factory.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/container_binary_array.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/container_list_ssll.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/container_iterator.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_assert.h -./ucd-snmp/memory.lo: ../../include/net-snmp/version.h -./ucd-snmp/memory.lo: ../../include/net-snmp/config_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/read_config.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/default_store.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_parse_args.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_enum.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/vacm.h -./ucd-snmp/memory.lo: ../../include/net-snmp/snmpv3_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpv3.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/transform_oids.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/keytools.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/scapi.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/lcd_time.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmp_secmod.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmptsm.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/snmpusm.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/mib_module_config.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_module_config.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/snmp_agent.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/snmp_vars.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_handler.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/var_struct.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_registry.h -./ucd-snmp/memory.lo: ../../include/net-snmp/library/fd_event_manager.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/ds_agent.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_read_config.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/agent_trap.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/all_helpers.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/instance.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/baby_steps.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/scalar.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/scalar_group.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/watcher.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/multiplexer.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/null.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/debug_handler.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/cache_handler.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/old_api.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/read_only.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/row_merge.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/serialize.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/bulk_to_next.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/mode_end_call.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_data.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_dataset.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_tdata.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_iterator.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_container.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/table_array.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/mfd.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./ucd-snmp/memory.lo: ../../include/net-snmp/agent/hardware/memory.h -./ucd-snmp/memory.lo: ./ucd-snmp/memory.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/net-snmp-includes.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/definitions.h @@ -15274,6 +15332,7 @@ ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/session_api.h @@ -15291,6 +15350,7 @@ ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/mib_api.h @@ -15310,7 +15370,6 @@ ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/container_iterator.h @@ -15331,8 +15390,8 @@ ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_darwin7.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15385,6 +15444,7 @@ ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/session_api.h @@ -15402,6 +15462,7 @@ ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/mib_api.h @@ -15421,7 +15482,6 @@ ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/container_iterator.h @@ -15442,8 +15502,8 @@ ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_dynix.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15496,6 +15556,7 @@ ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/session_api.h @@ -15513,6 +15574,7 @@ ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/mib_api.h @@ -15532,7 +15594,6 @@ ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/container_iterator.h @@ -15553,8 +15614,8 @@ ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_freebsd2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15610,6 +15671,7 @@ ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/session_api.h @@ -15627,6 +15689,7 @@ ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/mib_api.h @@ -15646,7 +15709,6 @@ ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/container_iterator.h @@ -15667,8 +15729,8 @@ ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_hpux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15721,6 +15783,7 @@ ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/session_api.h @@ -15738,6 +15801,7 @@ ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/mib_api.h @@ -15757,7 +15821,6 @@ ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/container_iterator.h @@ -15778,8 +15841,8 @@ ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_netbsd1.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15832,6 +15895,7 @@ ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/session_api.h @@ -15849,6 +15913,7 @@ ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/mib_api.h @@ -15868,7 +15933,6 @@ ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/container_iterator.h @@ -15889,8 +15953,8 @@ ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/memory_solaris2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -15945,6 +16009,7 @@ ./ucd-snmp/pass.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/pass.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/pass.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/pass.lo: ../../include/net-snmp/session_api.h @@ -15962,6 +16027,7 @@ ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/pass.lo: ../../include/net-snmp/mib_api.h @@ -15980,7 +16046,6 @@ ./ucd-snmp/pass.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/pass.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/container_iterator.h @@ -16001,8 +16066,8 @@ ./ucd-snmp/pass.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/pass.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/pass.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/pass.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/pass.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16057,6 +16122,7 @@ ./ucd-snmp/pass_common.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/session_api.h @@ -16074,6 +16140,7 @@ ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/mib_api.h @@ -16093,7 +16160,6 @@ ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/container_iterator.h @@ -16114,8 +16180,8 @@ ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/pass_common.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/pass_common.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16171,6 +16237,7 @@ ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/session_api.h @@ -16188,6 +16255,7 @@ ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/mib_api.h @@ -16206,7 +16274,6 @@ ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/container_iterator.h @@ -16227,8 +16294,8 @@ ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/pass_persist.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/pass_persist.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16284,6 +16351,7 @@ ./ucd-snmp/proc.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/proc.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/proc.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/proc.lo: ../../include/net-snmp/session_api.h @@ -16301,6 +16369,7 @@ ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/proc.lo: ../../include/net-snmp/mib_api.h @@ -16319,7 +16388,6 @@ ./ucd-snmp/proc.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/proc.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/container_iterator.h @@ -16340,8 +16408,8 @@ ./ucd-snmp/proc.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/proc.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/proc.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/proc.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/proc.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16379,12 +16447,12 @@ ./ucd-snmp/proc.lo: ../../include/net-snmp/agent/table_array.h ./ucd-snmp/proc.lo: ../../include/net-snmp/agent/mfd.h ./ucd-snmp/proc.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./ucd-snmp/proc.lo: struct.h ./ucd-snmp/proc.h mibdefs.h +./ucd-snmp/proc.lo: mibdefs.h struct.h ./ucd-snmp/proc.h ./ucd-snmp/proc.lo: ../../include/net-snmp/data_access/swrun.h ./ucd-snmp/proc.lo: ./ucd-snmp/errormib.h util_funcs.h ./ucd-snmp/proc.lo: util_funcs/header_generic.h ./ucd-snmp/proc.lo: util_funcs/header_simple_table.h -./ucd-snmp/proc.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ../../agent/kernel.h +./ucd-snmp/proc.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/net-snmp-features.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/net-snmp-includes.h @@ -16398,6 +16466,7 @@ ./ucd-snmp/proxy.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/proxy.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/session_api.h @@ -16415,6 +16484,7 @@ ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/mib_api.h @@ -16433,7 +16503,6 @@ ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/proxy.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/container_iterator.h @@ -16454,8 +16523,8 @@ ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/proxy.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/proxy.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16507,6 +16576,7 @@ ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/session_api.h @@ -16524,6 +16594,7 @@ ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/mib_api.h @@ -16542,7 +16613,6 @@ ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/container_iterator.h @@ -16563,8 +16633,8 @@ ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/versioninfo.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/versioninfo.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16606,6 +16676,118 @@ ./ucd-snmp/versioninfo.lo: util_funcs/header_generic.h util_funcs/restart.h ./ucd-snmp/versioninfo.lo: util_funcs.h util_funcs/header_simple_table.h ./ucd-snmp/versioninfo.lo: util_funcs/MIB_STATS_CACHE_TIMEOUT.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-config.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-includes.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/definitions.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/types.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/oid.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/types.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/varbind_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_client.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/pdu_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/asn1.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_debug.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_logging.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/session_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/callback.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_transport.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_service.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/ucd_compat.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/mib.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/mib_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/parse.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/oid_stash.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-features.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_impl.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp-tc.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/getopt.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/utilities.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/system.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/tools.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/int64.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/mt_support.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_alarm.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/data_list.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/check_varbind.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container_binary_array.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container_list_ssll.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container_iterator.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_assert.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/version.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/config_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/read_config.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/default_store.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_parse_args.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_enum.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/vacm.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/snmpv3_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpv3.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/transform_oids.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/keytools.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/scapi.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/lcd_time.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_secmod.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmptsm.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/mib_module_config.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_module_config.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/snmp_agent.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/snmp_vars.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_handler.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/var_struct.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_registry.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/fd_event_manager.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/ds_agent.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_read_config.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_trap.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/all_helpers.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/instance.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/baby_steps.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/scalar.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/scalar_group.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/watcher.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/multiplexer.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/null.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/debug_handler.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/cache_handler.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/old_api.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/read_only.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/row_merge.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/serialize.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/bulk_to_next.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/mode_end_call.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_data.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_dataset.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_tdata.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_iterator.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_container.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_array.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/mfd.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/auto_nlist.h +./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/hardware/cpu.h +./ucd-snmp/vmstat.lo: ./ucd-snmp/vmstat.h mibdefs.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/net-snmp-includes.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/definitions.h @@ -16618,6 +16800,7 @@ ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/session_api.h @@ -16635,6 +16818,7 @@ ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/mib_api.h @@ -16654,7 +16838,6 @@ ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/container_iterator.h @@ -16675,8 +16858,8 @@ ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_aix4.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16728,6 +16911,7 @@ ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/session_api.h @@ -16745,6 +16929,7 @@ ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/mib_api.h @@ -16764,7 +16949,6 @@ ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/container_iterator.h @@ -16785,8 +16969,8 @@ ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -16827,117 +17011,6 @@ ./ucd-snmp/vmstat_bsdi4.lo: ../../include/net-snmp/agent/auto_nlist.h ./ucd-snmp/vmstat_bsdi4.lo: util_funcs/header_generic.h ./ucd-snmp/vmstat.h ./ucd-snmp/vmstat_bsdi4.lo: mibdefs.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-config.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-includes.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/definitions.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/types.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/oid.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/types.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/varbind_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_client.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/pdu_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/asn1.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/output_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_debug.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_logging.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/session_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/callback.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_transport.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_service.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/ucd_compat.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/mib.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/mib_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/parse.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/oid_stash.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/net-snmp-features.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_impl.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp-tc.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/getopt.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/utilities.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/system.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/tools.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/int64.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/mt_support.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_alarm.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/data_list.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/check_varbind.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/factory.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container_binary_array.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container_list_ssll.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container_iterator.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_assert.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/version.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/config_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/read_config.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/default_store.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_parse_args.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_enum.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/vacm.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/snmpv3_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpv3.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/transform_oids.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/keytools.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/scapi.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/lcd_time.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmp_secmod.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmptsm.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/snmpusm.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/mib_module_config.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_module_config.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/snmp_agent.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/snmp_vars.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_handler.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/var_struct.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_registry.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/library/fd_event_manager.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/ds_agent.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_read_config.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/agent_trap.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/all_helpers.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/instance.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/baby_steps.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/scalar.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/scalar_group.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/watcher.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/multiplexer.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/null.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/debug_handler.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/cache_handler.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/old_api.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/read_only.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/row_merge.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/serialize.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/bulk_to_next.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/mode_end_call.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_data.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_dataset.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_tdata.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_iterator.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_container.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/table_array.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/mfd.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/auto_nlist.h -./ucd-snmp/vmstat.lo: ../../include/net-snmp/agent/hardware/cpu.h -./ucd-snmp/vmstat.lo: ./ucd-snmp/vmstat.h mibdefs.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/net-snmp-config.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/net-snmp-includes.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/definitions.h @@ -16950,6 +17023,7 @@ ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/session_api.h @@ -16967,6 +17041,7 @@ ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/mib_api.h @@ -16986,7 +17061,6 @@ ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/container_iterator.h @@ -17007,8 +17081,8 @@ ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_darwin7.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17061,6 +17135,7 @@ ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/session_api.h @@ -17078,6 +17153,7 @@ ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/mib_api.h @@ -17097,7 +17173,6 @@ ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/container_iterator.h @@ -17118,8 +17193,8 @@ ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_dynix.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17171,6 +17246,7 @@ ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/session_api.h @@ -17188,6 +17264,7 @@ ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/mib_api.h @@ -17207,7 +17284,6 @@ ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/container_iterator.h @@ -17228,8 +17304,8 @@ ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_freebsd2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17283,6 +17359,7 @@ ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/session_api.h @@ -17300,6 +17377,7 @@ ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/mib_api.h @@ -17319,7 +17397,6 @@ ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/container_iterator.h @@ -17340,8 +17417,8 @@ ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_hpux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17394,6 +17471,7 @@ ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/session_api.h @@ -17411,6 +17489,7 @@ ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/mib_api.h @@ -17429,7 +17508,6 @@ ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/container_iterator.h @@ -17450,8 +17528,8 @@ ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_linux.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17505,6 +17583,7 @@ ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/session_api.h @@ -17522,6 +17601,7 @@ ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/mib_api.h @@ -17541,7 +17621,6 @@ ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/container_iterator.h @@ -17562,8 +17641,8 @@ ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_netbsd1.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17616,6 +17695,7 @@ ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/pdu_api.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/asn1.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/output_api.h +./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmp_debug.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmp_logging.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/session_api.h @@ -17633,6 +17713,7 @@ ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/ucd_compat.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/mib.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/mib_api.h @@ -17652,7 +17733,6 @@ ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/data_list.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/check_varbind.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/container.h -./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/factory.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/container_binary_array.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/container_list_ssll.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/container_iterator.h @@ -17673,8 +17753,8 @@ ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/lcd_time.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmp_secmod.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmpusm.h +./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/library/snmptsm.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/agent/mib_module_config.h ./ucd-snmp/vmstat_solaris2.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17727,6 +17807,7 @@ ./util_funcs/Exit.lo: ../../include/net-snmp/pdu_api.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/asn1.h ./util_funcs/Exit.lo: ../../include/net-snmp/output_api.h +./util_funcs/Exit.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmp_debug.h ./util_funcs/Exit.lo: ../../include/net-snmp/session_api.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/callback.h @@ -17743,6 +17824,7 @@ ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./util_funcs/Exit.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/ucd_compat.h ./util_funcs/Exit.lo: ../../include/net-snmp/library/mib.h ./util_funcs/Exit.lo: ../../include/net-snmp/mib_api.h @@ -17755,7 +17837,7 @@ ./util_funcs/Exit.lo: ./util_funcs/Exit.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/net-snmp-config.h ./util_funcs/get_pid_from_inode.lo: ./util_funcs/get_pid_from_inode.h -./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/output_api.h +./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/system.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/types.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/oid.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/types.h @@ -17765,6 +17847,10 @@ ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_client.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/pdu_api.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/asn1.h +./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/output_api.h +./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_debug.h +./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_logging.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/session_api.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/callback.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_transport.h @@ -17780,6 +17866,7 @@ ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/ucd_compat.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/mib.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/mib_api.h @@ -17789,8 +17876,6 @@ ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_impl.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp.h ./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp-tc.h -./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_debug.h -./util_funcs/get_pid_from_inode.lo: ../../include/net-snmp/library/snmp_logging.h ./util_funcs/header_generic.lo: ../../include/net-snmp/net-snmp-config.h ./util_funcs/header_generic.lo: ../../include/net-snmp/net-snmp-includes.h ./util_funcs/header_generic.lo: ../../include/net-snmp/definitions.h @@ -17803,6 +17888,7 @@ ./util_funcs/header_generic.lo: ../../include/net-snmp/pdu_api.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/asn1.h ./util_funcs/header_generic.lo: ../../include/net-snmp/output_api.h +./util_funcs/header_generic.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmp_debug.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmp_logging.h ./util_funcs/header_generic.lo: ../../include/net-snmp/session_api.h @@ -17820,6 +17906,7 @@ ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/ucd_compat.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/mib.h ./util_funcs/header_generic.lo: ../../include/net-snmp/mib_api.h @@ -17839,7 +17926,6 @@ ./util_funcs/header_generic.lo: ../../include/net-snmp/library/data_list.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/check_varbind.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/container.h -./util_funcs/header_generic.lo: ../../include/net-snmp/library/factory.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/container_binary_array.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/container_list_ssll.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/container_iterator.h @@ -17860,8 +17946,8 @@ ./util_funcs/header_generic.lo: ../../include/net-snmp/library/lcd_time.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmp_secmod.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmpusm.h +./util_funcs/header_generic.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs/header_generic.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./util_funcs/header_generic.lo: ../../include/net-snmp/agent/mib_module_config.h ./util_funcs/header_generic.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -17912,6 +17998,7 @@ ./util_funcs/header_simple_table.lo: ../../include/net-snmp/pdu_api.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/asn1.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/output_api.h +./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmp_debug.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmp_logging.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/session_api.h @@ -17929,6 +18016,7 @@ ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/ucd_compat.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/mib.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/mib_api.h @@ -17948,7 +18036,6 @@ ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/data_list.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/check_varbind.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/container.h -./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/factory.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/container_binary_array.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/container_list_ssll.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/container_iterator.h @@ -17969,8 +18056,8 @@ ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/lcd_time.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmp_secmod.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmpusm.h +./util_funcs/header_simple_table.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/agent/mib_module_config.h ./util_funcs/header_simple_table.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -18021,6 +18108,7 @@ ./util_funcs/restart.lo: ../../include/net-snmp/pdu_api.h ./util_funcs/restart.lo: ../../include/net-snmp/library/asn1.h ./util_funcs/restart.lo: ../../include/net-snmp/output_api.h +./util_funcs/restart.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmp_debug.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmp_logging.h ./util_funcs/restart.lo: ../../include/net-snmp/session_api.h @@ -18038,6 +18126,7 @@ ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./util_funcs/restart.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./util_funcs/restart.lo: ../../include/net-snmp/library/ucd_compat.h ./util_funcs/restart.lo: ../../include/net-snmp/library/mib.h ./util_funcs/restart.lo: ../../include/net-snmp/mib_api.h @@ -18057,7 +18146,6 @@ ./util_funcs/restart.lo: ../../include/net-snmp/library/data_list.h ./util_funcs/restart.lo: ../../include/net-snmp/library/check_varbind.h ./util_funcs/restart.lo: ../../include/net-snmp/library/container.h -./util_funcs/restart.lo: ../../include/net-snmp/library/factory.h ./util_funcs/restart.lo: ../../include/net-snmp/library/container_binary_array.h ./util_funcs/restart.lo: ../../include/net-snmp/library/container_list_ssll.h ./util_funcs/restart.lo: ../../include/net-snmp/library/container_iterator.h @@ -18078,8 +18166,46 @@ ./util_funcs/restart.lo: ../../include/net-snmp/library/lcd_time.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmp_secmod.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./util_funcs/restart.lo: ../../include/net-snmp/library/snmptsm.h ./util_funcs/restart.lo: ../../include/net-snmp/library/snmpusm.h +./util_funcs/restart.lo: ../../include/net-snmp/library/snmptsm.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/mib_module_config.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/agent_module_config.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/snmp_agent.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/snmp_vars.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/agent_handler.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/var_struct.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/agent_registry.h +./util_funcs/restart.lo: ../../include/net-snmp/library/fd_event_manager.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/ds_agent.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/agent_read_config.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/agent_trap.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/all_helpers.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/instance.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/baby_steps.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/scalar.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/scalar_group.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/watcher.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/multiplexer.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/null.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/debug_handler.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/cache_handler.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/old_api.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/read_only.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/row_merge.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/serialize.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/bulk_to_next.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/mode_end_call.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table_data.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table_dataset.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table_tdata.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table_iterator.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table_container.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/table_array.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/mfd.h +./util_funcs/restart.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./util_funcs/restart.lo: ./util_funcs/restart.h ucd-snmp/errormib.h mibdefs.h ./utilities/execute.lo: ../../include/net-snmp/net-snmp-config.h ./utilities/execute.lo: ../../include/net-snmp/net-snmp-includes.h ./utilities/execute.lo: ../../include/net-snmp/definitions.h @@ -18092,6 +18218,7 @@ ./utilities/execute.lo: ../../include/net-snmp/pdu_api.h ./utilities/execute.lo: ../../include/net-snmp/library/asn1.h ./utilities/execute.lo: ../../include/net-snmp/output_api.h +./utilities/execute.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./utilities/execute.lo: ../../include/net-snmp/library/snmp_debug.h ./utilities/execute.lo: ../../include/net-snmp/library/snmp_logging.h ./utilities/execute.lo: ../../include/net-snmp/session_api.h @@ -18109,6 +18236,7 @@ ./utilities/execute.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./utilities/execute.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./utilities/execute.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./utilities/execute.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./utilities/execute.lo: ../../include/net-snmp/library/ucd_compat.h ./utilities/execute.lo: ../../include/net-snmp/library/mib.h ./utilities/execute.lo: ../../include/net-snmp/mib_api.h @@ -18128,7 +18256,6 @@ ./utilities/execute.lo: ../../include/net-snmp/library/data_list.h ./utilities/execute.lo: ../../include/net-snmp/library/check_varbind.h ./utilities/execute.lo: ../../include/net-snmp/library/container.h -./utilities/execute.lo: ../../include/net-snmp/library/factory.h ./utilities/execute.lo: ../../include/net-snmp/library/container_binary_array.h ./utilities/execute.lo: ../../include/net-snmp/library/container_list_ssll.h ./utilities/execute.lo: ../../include/net-snmp/library/container_iterator.h @@ -18149,8 +18276,8 @@ ./utilities/execute.lo: ../../include/net-snmp/library/lcd_time.h ./utilities/execute.lo: ../../include/net-snmp/library/snmp_secmod.h ./utilities/execute.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./utilities/execute.lo: ../../include/net-snmp/library/snmptsm.h ./utilities/execute.lo: ../../include/net-snmp/library/snmpusm.h +./utilities/execute.lo: ../../include/net-snmp/library/snmptsm.h ./utilities/execute.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./utilities/execute.lo: ../../include/net-snmp/agent/mib_module_config.h ./utilities/execute.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -18188,8 +18315,9 @@ ./utilities/execute.lo: ../../include/net-snmp/agent/table_array.h ./utilities/execute.lo: ../../include/net-snmp/agent/mfd.h ./utilities/execute.lo: ../../include/net-snmp/agent/snmp_get_statistic.h -./utilities/execute.lo: ucd-snmp/errormib.h mibdefs.h ./utilities/execute.h -./utilities/execute.lo: struct.h +./utilities/execute.lo: ucd-snmp/errormib.h mibdefs.h +./utilities/execute.lo: ../../include/net-snmp/agent/netsnmp_close_fds.h +./utilities/execute.lo: ./utilities/execute.h struct.h ./utilities/iquery.lo: ../../include/net-snmp/net-snmp-config.h ./utilities/iquery.lo: ../../include/net-snmp/net-snmp-features.h ./utilities/iquery.lo: ../../include/net-snmp/net-snmp-includes.h @@ -18203,6 +18331,7 @@ ./utilities/iquery.lo: ../../include/net-snmp/pdu_api.h ./utilities/iquery.lo: ../../include/net-snmp/library/asn1.h ./utilities/iquery.lo: ../../include/net-snmp/output_api.h +./utilities/iquery.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmp_debug.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmp_logging.h ./utilities/iquery.lo: ../../include/net-snmp/session_api.h @@ -18220,6 +18349,7 @@ ./utilities/iquery.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./utilities/iquery.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./utilities/iquery.lo: ../../include/net-snmp/library/ucd_compat.h ./utilities/iquery.lo: ../../include/net-snmp/library/mib.h ./utilities/iquery.lo: ../../include/net-snmp/mib_api.h @@ -18238,7 +18368,6 @@ ./utilities/iquery.lo: ../../include/net-snmp/library/data_list.h ./utilities/iquery.lo: ../../include/net-snmp/library/check_varbind.h ./utilities/iquery.lo: ../../include/net-snmp/library/container.h -./utilities/iquery.lo: ../../include/net-snmp/library/factory.h ./utilities/iquery.lo: ../../include/net-snmp/library/container_binary_array.h ./utilities/iquery.lo: ../../include/net-snmp/library/container_list_ssll.h ./utilities/iquery.lo: ../../include/net-snmp/library/container_iterator.h @@ -18259,8 +18388,8 @@ ./utilities/iquery.lo: ../../include/net-snmp/library/lcd_time.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmp_secmod.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./utilities/iquery.lo: ../../include/net-snmp/library/snmptsm.h ./utilities/iquery.lo: ../../include/net-snmp/library/snmpusm.h +./utilities/iquery.lo: ../../include/net-snmp/library/snmptsm.h ./utilities/iquery.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./utilities/iquery.lo: ../../include/net-snmp/agent/mib_module_config.h ./utilities/iquery.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -18298,6 +18427,7 @@ ./utilities/iquery.lo: ../../include/net-snmp/agent/table_array.h ./utilities/iquery.lo: ../../include/net-snmp/agent/mfd.h ./utilities/iquery.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./utilities/iquery.lo: ../../agent/agent_global_vars.h agentx/subagent.h ./utilities/iquery.lo: utilities/iquery.h ./utilities/override.lo: ../../include/net-snmp/net-snmp-config.h ./utilities/override.lo: ../../include/net-snmp/net-snmp-includes.h @@ -18311,6 +18441,7 @@ ./utilities/override.lo: ../../include/net-snmp/pdu_api.h ./utilities/override.lo: ../../include/net-snmp/library/asn1.h ./utilities/override.lo: ../../include/net-snmp/output_api.h +./utilities/override.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./utilities/override.lo: ../../include/net-snmp/library/snmp_debug.h ./utilities/override.lo: ../../include/net-snmp/library/snmp_logging.h ./utilities/override.lo: ../../include/net-snmp/session_api.h @@ -18328,6 +18459,7 @@ ./utilities/override.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./utilities/override.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./utilities/override.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./utilities/override.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./utilities/override.lo: ../../include/net-snmp/library/ucd_compat.h ./utilities/override.lo: ../../include/net-snmp/library/mib.h ./utilities/override.lo: ../../include/net-snmp/mib_api.h @@ -18347,7 +18479,6 @@ ./utilities/override.lo: ../../include/net-snmp/library/data_list.h ./utilities/override.lo: ../../include/net-snmp/library/check_varbind.h ./utilities/override.lo: ../../include/net-snmp/library/container.h -./utilities/override.lo: ../../include/net-snmp/library/factory.h ./utilities/override.lo: ../../include/net-snmp/library/container_binary_array.h ./utilities/override.lo: ../../include/net-snmp/library/container_list_ssll.h ./utilities/override.lo: ../../include/net-snmp/library/container_iterator.h @@ -18368,8 +18499,8 @@ ./utilities/override.lo: ../../include/net-snmp/library/lcd_time.h ./utilities/override.lo: ../../include/net-snmp/library/snmp_secmod.h ./utilities/override.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./utilities/override.lo: ../../include/net-snmp/library/snmptsm.h ./utilities/override.lo: ../../include/net-snmp/library/snmpusm.h +./utilities/override.lo: ../../include/net-snmp/library/snmptsm.h ./utilities/override.lo: ../../include/net-snmp/agent/net-snmp-agent-includes.h ./utilities/override.lo: ../../include/net-snmp/agent/mib_module_config.h ./utilities/override.lo: ../../include/net-snmp/agent/agent_module_config.h @@ -18407,3 +18538,4 @@ ./utilities/override.lo: ../../include/net-snmp/agent/table_array.h ./utilities/override.lo: ../../include/net-snmp/agent/mfd.h ./utilities/override.lo: ../../include/net-snmp/agent/snmp_get_statistic.h +./utilities/override.lo: ./utilities/override.h diff --git a/agent/mibgroup/Makefile.in b/agent/mibgroup/Makefile.in index 2341ab4..41c49d5 100644 --- a/agent/mibgroup/Makefile.in +++ b/agent/mibgroup/Makefile.in @@ -1,4 +1,3 @@ -top_builddir=../.. mysubdir=agent/mibgroup # currently assumes gcc: (XXX: fix via configure tests) diff --git a/agent/mibgroup/Rmon.h b/agent/mibgroup/Rmon.h index 3a7d3a4..acc12c8 100644 --- a/agent/mibgroup/Rmon.h +++ b/agent/mibgroup/Rmon.h @@ -44,13 +44,13 @@ * */ -config_require(Rmon/rows) -config_require(Rmon/agutil) -config_require(Rmon/statistics) +config_require(Rmon/rows); +config_require(Rmon/agutil); +config_require(Rmon/statistics); /* older implementation: */ /* config_require(Rmon/alarm) */ -config_require(Rmon/alarmTable) -config_require(Rmon/history) -config_require(Rmon/event) -config_add_mib(RMON-MIB) +config_require(Rmon/alarmTable); +config_require(Rmon/history); +config_require(Rmon/event); +config_add_mib(RMON-MIB); diff --git a/agent/mibgroup/Rmon/agutil.c b/agent/mibgroup/Rmon/agutil.c index 12c6342..4a0617a 100644 --- a/agent/mibgroup/Rmon/agutil.c +++ b/agent/mibgroup/Rmon/agutil.c @@ -210,7 +210,7 @@ AGUTIL_sys_up_time(void) void SYSTEM_get_eth_statistics(VAR_OID_T * data_source, ETH_STATS_T * where) { -#if OPTICALL_ACESS +#ifdef OPTICALL_ACESS where->ifIndex = data_source->objid[data_source->length - 1]; agent_get_Rmon_ethernet_statistics(where->ifIndex, 1, /* exact */ where); diff --git a/agent/mibgroup/Rmon/agutil_api.h b/agent/mibgroup/Rmon/agutil_api.h index 3959fab..e1532c3 100644 --- a/agent/mibgroup/Rmon/agutil_api.h +++ b/agent/mibgroup/Rmon/agutil_api.h @@ -63,7 +63,7 @@ int AGUTIL_get_oid_value(u_char * var_val, u_char var_val_type, u_long AGUTIL_sys_up_time(void); -#if OPTICALL_ACESS +#ifdef OPTICALL_ACESS #define ETH_STATS_T UID_PORT_STATISTICS_T #else typedef struct { diff --git a/agent/mibgroup/Rmon/alarm.c b/agent/mibgroup/Rmon/alarm.c index 95cb017..d40cbfa 100644 --- a/agent/mibgroup/Rmon/alarm.c +++ b/agent/mibgroup/Rmon/alarm.c @@ -20,17 +20,17 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -40,6 +40,7 @@ #include #include #include "alarm.h" +#include "event.h" /* * Implementation headers */ @@ -128,18 +129,7 @@ 0; #endif -/* - * find & enjoy it in event.c - */ - extern int - event_api_send_alarm(u_char is_rising, - u_long alarm_index, - u_long event_index, - oid * alarmed_var, - size_t alarmed_var_length, - u_long sample_type, - u_long value, - u_long the_threshold, char *alarm_descr); +static unsigned char zero_octet_string[1]; static int fetch_var_val(oid * name, size_t namelen, u_long * new_value) @@ -185,7 +175,7 @@ fetch_var_val(oid * name, size_t namelen, u_long * new_value) && snmp_oid_compare(name, namelen, tree_ptr->end_a, tree_ptr->end_len) > 0) { memcpy(name, tree_ptr->end_a, tree_ptr->end_len); - access = 0; + access = NULL; ag_trace("access := 0"); } @@ -566,7 +556,7 @@ write_alarmEntry(int action, u_char * var_val, u_char var_val_type, case IDalarmOwner: if (hdr->new_owner) AGFREE(hdr->new_owner); - hdr->new_owner = AGMALLOC(MAX_OWNERSTRING);; + hdr->new_owner = AGMALLOC(MAX_OWNERSTRING); if (!hdr->new_owner) return SNMP_ERR_TOOBIG; snmp_status = AGUTIL_get_string_value(var_val, var_val_type, @@ -657,7 +647,7 @@ var_alarmEntry(struct variable * vp, oid * name, size_t * length, return (unsigned char *) hdr->owner; } else { *var_len = 0; - return (unsigned char *) ""; + return zero_octet_string; } case IDalarmStatus: diff --git a/agent/mibgroup/Rmon/alarmTable.c b/agent/mibgroup/Rmon/alarmTable.c index 6181628..ccf59b3 100644 --- a/agent/mibgroup/Rmon/alarmTable.c +++ b/agent/mibgroup/Rmon/alarmTable.c @@ -15,17 +15,22 @@ #include #include "utilities/iquery.h" #include "alarmTable.h" +#include "event.h" -netsnmp_feature_require(iquery) -netsnmp_feature_require(query_set_default_session) -netsnmp_feature_require(table_tdata) -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(table_tdata_extract_table) +netsnmp_feature_require(iquery); +netsnmp_feature_require(query_set_default_session); +netsnmp_feature_require(table_tdata); +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(table_tdata_extract_table); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(table_tdata_insert_row) -netsnmp_feature_require(iquery_pdu_session) +netsnmp_feature_require(table_tdata_insert_row); +netsnmp_feature_require(iquery_pdu_session); #endif /* NETSNMP_NO_WRITE_SUPPORT */ +static netsnmp_tdata *alarm_data; +static netsnmp_table_registration_info *alarm_info; +static netsnmp_handler_registration *alarm_reg; + /** Initializes the alarmTable module */ void init_alarmTable(void) @@ -42,42 +47,37 @@ initialize_table_alarmTable(void) { static oid alarmTable_oid[] = { 1, 3, 6, 1, 2, 1, 16, 3, 1 }; size_t alarmTable_oid_len = OID_LENGTH(alarmTable_oid); - netsnmp_handler_registration *reg; - netsnmp_tdata *table_data; - netsnmp_table_registration_info *table_info; DEBUGMSGTL(( "rmon:alarmTable", "initialize_table_alarmTable called.\n")); - reg = + alarm_reg = netsnmp_create_handler_registration("alarmTable", alarmTable_handler, alarmTable_oid, alarmTable_oid_len, HANDLER_CAN_RWRITE); - table_data = netsnmp_tdata_create_table("alarmTable", 0); - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER, /* index: alarmIndex */ + alarm_data = netsnmp_tdata_create_table("alarmTable", 0); + alarm_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + netsnmp_table_helper_add_indexes(alarm_info, ASN_INTEGER, /* index: alarmIndex */ 0); - table_info->min_column = COLUMN_ALARMINDEX; - table_info->max_column = COLUMN_ALARMSTATUS; + alarm_info->min_column = COLUMN_ALARMINDEX; + alarm_info->max_column = COLUMN_ALARMSTATUS; - netsnmp_tdata_register(reg, table_data, table_info); + netsnmp_tdata_register(alarm_reg, alarm_data, alarm_info); /* * Initialise the contents of the table here */ } -extern int -event_api_send_alarm(u_char is_rising, - u_long alarm_index, - u_long event_index, - oid * alarmed_var, - size_t alarmed_var_length, - u_long sample_type, - u_long value, - u_long the_threshold, const char *alarm_descr); + +void shutdown_alarmTable(void) +{ + netsnmp_tdata_unregister(alarm_reg); + netsnmp_table_registration_info_free(alarm_info); +} + #define ALARM_STR1_LEN 32 typedef enum { @@ -814,7 +814,7 @@ alarmTable_handler(netsnmp_mib_handler *handler, netsnmp_query_set_default_session(sess); DEBUGMSGTL(("rmon:alarmTable", "user name %s\n", secName)); } else { - snmp_log(LOG_ERR, "user name %s not found\n", secName); + snmp_log(LOG_ERR, "user name not found\n"); config_perror("Unknown user name\n"); } diff --git a/agent/mibgroup/Rmon/alarmTable.h b/agent/mibgroup/Rmon/alarmTable.h index 1a070b2..b05aed2 100644 --- a/agent/mibgroup/Rmon/alarmTable.h +++ b/agent/mibgroup/Rmon/alarmTable.h @@ -11,15 +11,16 @@ #ifndef ALARMTABLE_H #define ALARMTABLE_H -config_require(utilities/iquery) -config_require(Rmon/agutil) -config_require(Rmon/rows) -config_require(Rmon/event) +config_require(utilities/iquery); +config_require(Rmon/agutil); +config_require(Rmon/rows); +config_require(Rmon/event); /* * function declarations */ void init_alarmTable(void); +void shutdown_alarmTable(void); void initialize_table_alarmTable(void); Netsnmp_Node_Handler alarmTable_handler; diff --git a/agent/mibgroup/Rmon/event.c b/agent/mibgroup/Rmon/event.c index bb87bfe..6206d47 100644 --- a/agent/mibgroup/Rmon/event.c +++ b/agent/mibgroup/Rmon/event.c @@ -21,20 +21,20 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -50,7 +50,7 @@ #include "agutil_api.h" #include "row_api.h" -netsnmp_feature_require(snprint_objid) +netsnmp_feature_require(snprint_objid); /* * File scope definitions section @@ -346,7 +346,7 @@ write_eventControl(int action, u_char * var_val, u_char var_val_type, case Leaf_eventOwner: if (hdr->new_owner) AGFREE(hdr->new_owner); - hdr->new_owner = AGMALLOC(MAX_OWNERSTRING);; + hdr->new_owner = AGMALLOC(MAX_OWNERSTRING); if (!hdr->new_owner) return SNMP_ERR_TOOBIG; snmp_status = AGUTIL_get_string_value(var_val, var_val_type, @@ -507,7 +507,7 @@ create_explanaition(CRTL_ENTRY_T * evptr, u_char is_rising, oid * alarmed_var, size_t alarmed_var_length, u_long value, u_long the_threshold, - u_long sample_type, char *alarm_descr) + u_long sample_type, const char *alarm_descr) { #define UNEQ_LENGTH (1 + 11 + 4 + 11 + 1 + 20) char expl[UNEQ_LENGTH]; @@ -524,7 +524,7 @@ create_explanaition(CRTL_ENTRY_T * evptr, u_char is_rising, tmp = strchr(pch, '.'); if (!tmp) break; - if (isdigit(tmp[1]) || '"' == tmp[1]) + if (isdigit((unsigned char)tmp[1]) || '"' == tmp[1]) break; pch = tmp + 1; } @@ -653,7 +653,8 @@ event_api_send_alarm(u_char is_rising, oid * alarmed_var, size_t alarmed_var_length, u_long sample_type, - u_long value, u_long the_threshold, char *alarm_descr) + u_long value, u_long the_threshold, + const char *alarm_descr) { RMON_ENTRY_T *eptr; CRTL_ENTRY_T *evptr; diff --git a/agent/mibgroup/Rmon/event.h b/agent/mibgroup/Rmon/event.h index b03e162..16e88db 100644 --- a/agent/mibgroup/Rmon/event.h +++ b/agent/mibgroup/Rmon/event.h @@ -26,8 +26,16 @@ */ void init_event(void); -config_require(util_funcs) +config_require(util_funcs); + +config_require(Rmon/agutil); +config_require(Rmon/rows); + + int + event_api_send_alarm(u_char is_rising, u_long alarm_index, + u_long event_index, oid * alarmed_var, + size_t alarmed_var_length, u_long sample_type, + u_long value, u_long the_threshold, + const char *alarm_descr); -config_require(Rmon/agutil) -config_require(Rmon/rows) #endif /* _MIBGROUP_EVENT_H */ diff --git a/agent/mibgroup/Rmon/history.c b/agent/mibgroup/Rmon/history.c index c8e9c25..428ffdb 100644 --- a/agent/mibgroup/Rmon/history.c +++ b/agent/mibgroup/Rmon/history.c @@ -20,20 +20,20 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -211,7 +211,7 @@ write_historyControl(int action, u_char * var_val, u_char var_val_type, case Leaf_historyControlOwner: if (hdr->new_owner) AGFREE(hdr->new_owner); - hdr->new_owner = AGMALLOC(MAX_OWNERSTRING);; + hdr->new_owner = AGMALLOC(MAX_OWNERSTRING); if (!hdr->new_owner) return SNMP_ERR_TOOBIG; snmp_status = AGUTIL_get_string_value(var_val, var_val_type, diff --git a/agent/mibgroup/Rmon/statistics.c b/agent/mibgroup/Rmon/statistics.c index 3ed4acb..cdde5fb 100644 --- a/agent/mibgroup/Rmon/statistics.c +++ b/agent/mibgroup/Rmon/statistics.c @@ -20,20 +20,20 @@ #include -#if HAVE_STDLIB +#ifdef HAVE_STDLIB #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif @@ -272,7 +272,7 @@ write_etherStatsEntry(int action, u_char * var_val, u_char var_val_type, case Leaf_etherStatsOwner: if (hdr->new_owner) AGFREE(hdr->new_owner); - hdr->new_owner = AGMALLOC(MAX_OWNERSTRING);; + hdr->new_owner = AGMALLOC(MAX_OWNERSTRING); if (!hdr->new_owner) return SNMP_ERR_TOOBIG; snmp_status = AGUTIL_get_string_value(var_val, var_val_type, diff --git a/agent/mibgroup/agent/extend.c b/agent/mibgroup/agent/extend.c index 48379a2..bdbdcdf 100644 --- a/agent/mibgroup/agent/extend.c +++ b/agent/mibgroup/agent/extend.c @@ -16,17 +16,19 @@ #define SHELLCOMMAND 3 #endif -netsnmp_feature_require(extract_table_row_data) -netsnmp_feature_require(table_data_delete_table) +/* This mib is potentially dangerous to turn on by default, since it + * allows arbitrary commands to be set by anyone with SNMP WRITE + * access to the MIB table. If all of your users are "root" level + * users, then it may be safe to turn on. */ +#define ENABLE_EXTEND_WRITE_ACCESS 0 + +netsnmp_feature_require(extract_table_row_data); +netsnmp_feature_require(table_data_delete_table); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(insert_table_row) +netsnmp_feature_require(insert_table_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ oid ns_extend_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2 }; -oid extend_count_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 1 }; -oid extend_config_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 2 }; -oid extend_out1_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 3 }; -oid extend_out2_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 4 }; typedef struct extend_registration_block_s { netsnmp_table_data *dinfo; @@ -258,6 +260,10 @@ _unregister_extend(extend_registration_block *eptr) } netsnmp_table_data_delete_table(eptr->dinfo); + netsnmp_unregister_handler( eptr->reg[0] ); + netsnmp_unregister_handler( eptr->reg[1] ); + netsnmp_unregister_handler( eptr->reg[2] ); + netsnmp_unregister_handler( eptr->reg[3] ); free(eptr->root_oid); free(eptr); } @@ -270,11 +276,14 @@ extend_clear_callback(int majorID, int minorID, for ( eptr=ereg_head; eptr; eptr=enext ) { enext=eptr->next; + netsnmp_table_data_delete_table(eptr->dinfo); netsnmp_unregister_handler( eptr->reg[0] ); netsnmp_unregister_handler( eptr->reg[1] ); netsnmp_unregister_handler( eptr->reg[2] ); netsnmp_unregister_handler( eptr->reg[3] ); - SNMP_FREE(eptr); + if (eptr->root_oid) + free(eptr->root_oid); + free(eptr); } ereg_head = NULL; return 0; @@ -352,8 +361,8 @@ extend_load_cache(netsnmp_cache *cache, void *magic) ret = run_exec_command( cmd_buf, extension->input, out_buf, &out_len); DEBUGMSG(( "nsExtendTable:cache", ": %s : %d\n", cmd_buf, ret)); if (ret >= 0) { - if (out_buf[ out_len-1 ] == '\n') - out_buf[ --out_len ] = '\0'; /* Stomp on trailing newline */ + if (out_len > 0 && out_buf[out_len - 1] == '\n') + out_buf[--out_len] = '\0'; /* Strip trailing newline */ extension->output = strdup( out_buf ); extension->out_len = out_len; /* @@ -522,8 +531,28 @@ extend_parse_config(const char *token, char *cptr) size_t oid_len; extend_registration_block *eptr; int flags; + int cache_timeout = 0; + int exec_type = NS_EXTEND_ETYPE_EXEC; - cptr = copy_nword(cptr, exec_name, sizeof(exec_name)); + cptr = copy_nword(cptr, exec_name, sizeof(exec_name)); + if (strcmp(exec_name, "-cacheTime") == 0) { + char cache_timeout_str[32]; + + cptr = copy_nword(cptr, cache_timeout_str, sizeof(cache_timeout_str)); + /* If atoi can't do the conversion, it returns 0 */ + cache_timeout = atoi(cache_timeout_str); + cptr = copy_nword(cptr, exec_name, sizeof(exec_name)); + } + if (strcmp(exec_name, "-execType") == 0) { + char exec_type_str[16]; + + cptr = copy_nword(cptr, exec_type_str, sizeof(exec_type_str)); + if (strcmp(exec_type_str, "sh") == 0) + exec_type = NS_EXTEND_ETYPE_SHELL; + else + exec_type = NS_EXTEND_ETYPE_EXEC; + cptr = copy_nword(cptr, exec_name, sizeof(exec_name)); + } if ( *exec_name == '.' ) { oid_len = MAX_OID_LEN - 2; if (0 == read_objid( exec_name, oid_buf, &oid_len )) { @@ -545,13 +574,18 @@ extend_parse_config(const char *token, char *cptr) flags = (NS_EXTEND_FLAGS_ACTIVE | NS_EXTEND_FLAGS_CONFIG); if (!strcmp( token, "sh" ) || !strcmp( token, "extend-sh" ) || - !strcmp( token, "sh2" )) + !strcmp( token, "sh2") || + exec_type == NS_EXTEND_ETYPE_SHELL) flags |= NS_EXTEND_FLAGS_SHELL; if (!strcmp( token, "execFix" ) || !strcmp( token, "extendfix" ) || !strcmp( token, "execFix2" )) { - strcpy( exec_name2, exec_name ); - strcat( exec_name, "Fix" ); + strlcpy(exec_name2, exec_name, sizeof(exec_name2)); + if (snprintf(exec_name, sizeof(exec_name), "%sFix", exec_name2) >= + sizeof(exec_name)) { + config_perror("ERROR: argument too long"); + return; + } flags |= NS_EXTEND_FLAGS_WRITEABLE; /* XXX - Check for shell... */ } @@ -566,6 +600,8 @@ extend_parse_config(const char *token, char *cptr) extension->command = strdup( exec_command ); if (cptr) extension->args = strdup( cptr ); + if (cache_timeout != 0) + extension->cache->timeout = cache_timeout; } else { snmp_log(LOG_ERR, "Failed to register extend entry '%s' - possibly duplicate name.\n", exec_name ); return; @@ -627,9 +663,9 @@ handle_nsExtendConfigTable(netsnmp_mib_handler *handler, netsnmp_request_info *request; netsnmp_table_request_info *table_info; netsnmp_extend *extension; - extend_registration_block *eptr; + extend_registration_block *eptr NETSNMP_ATTRIBUTE_UNUSED; int i; - int need_to_validate = 0; + int need_to_validate NETSNMP_ATTRIBUTE_UNUSED = 0; for ( request=requests; request; request=request->next ) { if (request->processed) @@ -723,7 +759,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler *handler, * **********/ -#ifndef NETSNMP_NO_WRITE_SUPPORT +#if !defined(NETSNMP_NO_WRITE_SUPPORT) && ENABLE_EXTEND_WRITE_ACCESS case MODE_SET_RESERVE1: /* * Validate the new assignments @@ -1049,7 +1085,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler *handler, } } break; -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ +#endif /* !NETSNMP_NO_WRITE_SUPPORT and ENABLE_EXTEND_WRITE_ACCESS */ default: netsnmp_set_request_error(reqinfo, request, SNMP_ERR_GENERR); @@ -1057,7 +1093,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler *handler, } } -#ifndef NETSNMP_NO_WRITE_SUPPORT +#if !defined(NETSNMP_NO_WRITE_SUPPORT) && ENABLE_EXTEND_WRITE_ACCESS /* * If we're marking a given row as active, * then we need to check that it's ready. @@ -1082,7 +1118,7 @@ handle_nsExtendConfigTable(netsnmp_mib_handler *handler, } } } -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ +#endif /* !NETSNMP_NO_WRITE_SUPPORT && ENABLE_EXTEND_WRITE_ACCESS */ return SNMP_ERR_NOERROR; } @@ -1507,52 +1543,49 @@ var_extensible_old(struct variable * vp, idx = name[*length-1] -1; if (idx > max_compatability_entries) return NULL; - exten = &compatability_entries[ idx ]; - if (exten) { - switch (vp->magic) { - case MIBINDEX: - long_ret = name[*length - 1]; - return ((u_char *) (&long_ret)); - case ERRORNAME: /* name defined in config file */ - *var_len = strlen(exten->exec_entry->token); - return ((u_char *) (exten->exec_entry->token)); - case SHELLCOMMAND: - cmdline = _get_cmdline(exten->exec_entry); + exten = &compatability_entries[idx]; + switch (vp->magic) { + case MIBINDEX: + long_ret = name[*length - 1]; + return (u_char *) &long_ret; + case ERRORNAME: /* name defined in config file */ + *var_len = strlen(exten->exec_entry->token); + return ((u_char *) (exten->exec_entry->token)); + case SHELLCOMMAND: + cmdline = _get_cmdline(exten->exec_entry); + if (cmdline) + *var_len = strlen(cmdline); + return (u_char *) cmdline; + case ERRORFLAG: /* return code from the process */ + netsnmp_cache_check_and_reload( exten->exec_entry->cache ); + long_ret = exten->exec_entry->result; + return (u_char *) &long_ret; + case ERRORMSG: /* first line of text returned from the process */ + netsnmp_cache_check_and_reload( exten->exec_entry->cache ); + if (exten->exec_entry->numlines > 1) { + *var_len = (exten->exec_entry->lines[1])- + (exten->exec_entry->output) -1; + } else if (exten->exec_entry->output) { + *var_len = strlen(exten->exec_entry->output); + } else { + *var_len = 0; + } + return (u_char *) exten->exec_entry->output; + case ERRORFIX: + *write_method = fixExec2Error; + long_return = 0; + return (u_char *) &long_return; + + case ERRORFIXCMD: + if (exten->efix_entry) { + cmdline = _get_cmdline(exten->efix_entry); if (cmdline) *var_len = strlen(cmdline); - return ((u_char *) cmdline); - case ERRORFLAG: /* return code from the process */ - netsnmp_cache_check_and_reload( exten->exec_entry->cache ); - long_ret = exten->exec_entry->result; - return ((u_char *) (&long_ret)); - case ERRORMSG: /* first line of text returned from the process */ - netsnmp_cache_check_and_reload( exten->exec_entry->cache ); - if (exten->exec_entry->numlines > 1) { - *var_len = (exten->exec_entry->lines[1])- - (exten->exec_entry->output) -1; - } else if (exten->exec_entry->output) { - *var_len = strlen(exten->exec_entry->output); - } else { - *var_len = 0; - } - return ((u_char *) (exten->exec_entry->output)); - case ERRORFIX: - *write_method = fixExec2Error; - long_return = 0; - return ((u_char *) &long_return); - - case ERRORFIXCMD: - if (exten->efix_entry) { - cmdline = _get_cmdline(exten->efix_entry); - if (cmdline) - *var_len = strlen(cmdline); - return ((u_char *) cmdline); - } else { - *var_len = 0; - return ((u_char *) &long_return); /* Just needs to be non-null! */ - } + return (u_char *) cmdline; + } else { + *var_len = 0; + return (u_char *) &long_return; /* Just needs to be non-null! */ } - return NULL; } return NULL; } @@ -1565,13 +1598,10 @@ fixExec2Error(int action, size_t var_val_len, u_char * statP, oid * name, size_t name_len) { - netsnmp_old_extend *exten = NULL; - unsigned int idx; - - idx = name[name_len-1] -1; - exten = &compatability_entries[ idx ]; +#if !defined(NETSNMP_NO_WRITE_SUPPORT) && ENABLE_EXTEND_WRITE_ACCESS + unsigned int idx = name[name_len - 1] - 1; + const netsnmp_old_extend *exten = &compatability_entries[idx]; -#ifndef NETSNMP_NO_WRITE_SUPPORT switch (action) { case MODE_SET_RESERVE1: if (var_val_type != ASN_INTEGER) { @@ -1592,7 +1622,7 @@ fixExec2Error(int action, case MODE_SET_COMMIT: netsnmp_cache_check_and_reload( exten->efix_entry->cache ); } -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ +#endif /* !NETSNMP_NO_WRITE_SUPPORT && ENABLE_EXTEND_WRITE_ACCESS */ return SNMP_ERR_NOERROR; } #endif /* USING_UCD_SNMP_EXTENSIBLE_MODULE */ diff --git a/agent/mibgroup/agent/extend.h b/agent/mibgroup/agent/extend.h index 8b76cd4..355c894 100644 --- a/agent/mibgroup/agent/extend.h +++ b/agent/mibgroup/agent/extend.h @@ -1,9 +1,9 @@ #ifndef NETSNMP_EXTEND_H #define NETSNMP_EXTEND_H -config_require( util_funcs/header_simple_table ) -config_require( utilities/execute ) -config_add_mib(NET-SNMP-EXTEND-MIB) +config_require( util_funcs/header_simple_table ); +config_require( utilities/execute ); +config_add_mib(NET-SNMP-EXTEND-MIB); typedef struct netsnmp_extend_s { char *token; diff --git a/agent/mibgroup/agent/nsCache.c b/agent/mibgroup/agent/nsCache.c index d32263b..993c907 100644 --- a/agent/mibgroup/agent/nsCache.c +++ b/agent/mibgroup/agent/nsCache.c @@ -13,7 +13,7 @@ #include #include "agent/nsCache.h" -netsnmp_feature_require(cache_get_head) +netsnmp_feature_require(cache_get_head); /* @@ -96,6 +96,7 @@ init_nsCache(void) */ iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info); if (!iinfo) { + SNMP_FREE(table_info); return; } iinfo->get_first_data_point = get_first_cache_entry; diff --git a/agent/mibgroup/agent/nsDebug.c b/agent/mibgroup/agent/nsDebug.c index 89a90b0..d8f2842 100644 --- a/agent/mibgroup/agent/nsDebug.c +++ b/agent/mibgroup/agent/nsDebug.c @@ -3,6 +3,7 @@ #include #include +#include #ifdef HAVE_STRING_H #include #else diff --git a/agent/mibgroup/agent/nsLogging.c b/agent/mibgroup/agent/nsLogging.c index 7f20bdb..7f42904 100644 --- a/agent/mibgroup/agent/nsLogging.c +++ b/agent/mibgroup/agent/nsLogging.c @@ -13,9 +13,9 @@ #include #include "agent/nsLogging.h" -netsnmp_feature_require(logging_external) +netsnmp_feature_require(logging_external); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(table_iterator_insert_context) +netsnmp_feature_require(table_iterator_insert_context); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -54,6 +54,7 @@ init_nsLogging(void) */ iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info); if (!iinfo) { + SNMP_FREE(table_info); return; } iinfo->get_first_data_point = get_first_logging_entry; @@ -146,6 +147,8 @@ handle_nsLoggingTable(netsnmp_mib_handler *handler, continue; logh = (netsnmp_log_handler*)netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info(request); + if (!table_info || !table_info->indexes) + continue; switch (table_info->colnum) { case NSLOGGING_TYPE: @@ -200,6 +203,8 @@ handle_nsLoggingTable(netsnmp_mib_handler *handler, } logh = (netsnmp_log_handler*)netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info(request); + if (!table_info || !table_info->indexes) + continue; switch (table_info->colnum) { case NSLOGGING_TYPE: @@ -393,6 +398,8 @@ handle_nsLoggingTable(netsnmp_mib_handler *handler, continue; logh = (netsnmp_log_handler*)netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info(request); + if (!table_info || !table_info->indexes) + continue; switch (table_info->colnum) { case NSLOGGING_TYPE: diff --git a/agent/mibgroup/agent/nsModuleTable.c b/agent/mibgroup/agent/nsModuleTable.c index 84bd8fa..a2324d9 100644 --- a/agent/mibgroup/agent/nsModuleTable.c +++ b/agent/mibgroup/agent/nsModuleTable.c @@ -9,7 +9,7 @@ #include #include "nsModuleTable.h" -netsnmp_feature_require(table_dataset) +netsnmp_feature_require(table_dataset); void nsModuleTable_free(void *context, netsnmp_iterator_info *dont_care) diff --git a/agent/mibgroup/agent/nsTransactionTable.c b/agent/mibgroup/agent/nsTransactionTable.c index d7d3ce9..50b071d 100644 --- a/agent/mibgroup/agent/nsTransactionTable.c +++ b/agent/mibgroup/agent/nsTransactionTable.c @@ -6,12 +6,13 @@ #include #include #include +#include "agent_global_vars.h" #include #include #include "nsTransactionTable.h" -netsnmp_feature_require(table_dataset) +netsnmp_feature_require(table_dataset); /** Initialize the nsTransactionTable table by defining it's contents and how it's structured */ @@ -95,8 +96,6 @@ init_nsTransactionTable(void) each appropriately according to the data matching the first row and return the put_index_data variable at the end of the function. */ -extern netsnmp_agent_session *agent_delegated_list; - netsnmp_variable_list * nsTransactionTable_get_first_data_point(void **my_loop_context, void **my_data_context, diff --git a/agent/mibgroup/agent/nsVacmAccessTable.c b/agent/mibgroup/agent/nsVacmAccessTable.c index 79fa97d..6c43210 100644 --- a/agent/mibgroup/agent/nsVacmAccessTable.c +++ b/agent/mibgroup/agent/nsVacmAccessTable.c @@ -10,10 +10,10 @@ #include #include "nsVacmAccessTable.h" -netsnmp_feature_require(check_vb_storagetype) +netsnmp_feature_require(check_vb_storagetype); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(table_iterator_insert_context) +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(table_iterator_insert_context); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /** Initializes the nsVacmAccessTable module */ @@ -170,9 +170,13 @@ nsVacmAccessTable_handler(netsnmp_mib_handler *handler, entry = (struct vacm_accessEntry *) netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info(request); + if (!table_info || !table_info->indexes) + continue; /* Extract the authType token from the list of indexes */ idx = table_info->indexes->next_variable->next_variable->next_variable->next_variable; + if (idx->val_len >= sizeof(atype)) + continue; memset(atype, 0, sizeof(atype)); memcpy(atype, (char *)idx->val.string, idx->val_len); viewIdx = se_find_value_in_slist(VACM_VIEW_ENUM_NAME, atype); @@ -212,6 +216,8 @@ nsVacmAccessTable_handler(netsnmp_mib_handler *handler, entry = (struct vacm_accessEntry *) netsnmp_extract_iterator_context(request); table_info = netsnmp_extract_table_info(request); + if (!table_info || !table_info->indexes) + continue; ret = SNMP_ERR_NOERROR; switch (table_info->colnum) { @@ -247,6 +253,8 @@ nsVacmAccessTable_handler(netsnmp_mib_handler *handler, * Extract the authType token from the list of indexes */ idx = table_info->indexes->next_variable->next_variable->next_variable->next_variable; + if (idx->val_len >= sizeof(atype)) + continue; memset(atype, 0, sizeof(atype)); memcpy(atype, (char *)idx->val.string, idx->val_len); viewIdx = se_find_value_in_slist(VACM_VIEW_ENUM_NAME, atype); @@ -294,8 +302,10 @@ nsVacmAccessTable_handler(netsnmp_mib_handler *handler, idx = idx->next_variable; model = *idx->val.integer; idx = idx->next_variable; level = *idx->val.integer; entry = vacm_createAccessEntry( gName, cPrefix, model, level ); - entry->storageType = ST_NONVOLATILE; - netsnmp_insert_iterator_context(request, (void*)entry); + if (entry) { + entry->storageType = ST_NONVOLATILE; + netsnmp_insert_iterator_context(request, (void*)entry); + } } } } @@ -321,6 +331,8 @@ nsVacmAccessTable_handler(netsnmp_mib_handler *handler, /* Extract the authType token from the list of indexes */ idx = table_info->indexes->next_variable->next_variable->next_variable->next_variable; + if (idx->val_len >= sizeof(atype)) + continue; memset(atype, 0, sizeof(atype)); memcpy(atype, (char *)idx->val.string, idx->val_len); viewIdx = se_find_value_in_slist(VACM_VIEW_ENUM_NAME, atype); diff --git a/agent/mibgroup/agent/nsVacmAccessTable.h b/agent/mibgroup/agent/nsVacmAccessTable.h index e7a7e20..595d883 100644 --- a/agent/mibgroup/agent/nsVacmAccessTable.h +++ b/agent/mibgroup/agent/nsVacmAccessTable.h @@ -5,13 +5,14 @@ #ifndef NSVACMACCESSTABLE_H #define NSVACMACCESSTABLE_H -config_add_mib(NET-SNMP-VACM-MIB) +config_add_mib(NET-SNMP-VACM-MIB); /* * function declarations */ void init_nsVacmAccessTable(void); void initialize_table_nsVacmAccessTable(void); +void init_register_nsVacm_context(const char *context); Netsnmp_Node_Handler nsVacmAccessTable_handler; Netsnmp_First_Data_Point nsVacmAccessTable_get_first_data_point; Netsnmp_Next_Data_Point nsVacmAccessTable_get_next_data_point; diff --git a/agent/mibgroup/agent_mibs.h b/agent/mibgroup/agent_mibs.h index 50dd159..30033a0 100644 --- a/agent/mibgroup/agent_mibs.h +++ b/agent/mibgroup/agent_mibs.h @@ -1,9 +1,9 @@ -config_require(agent/nsTransactionTable) -config_require(agent/nsModuleTable) +config_require(agent/nsTransactionTable); +config_require(agent/nsModuleTable); #ifndef NETSNMP_NO_DEBUGGING -config_require(agent/nsDebug) +config_require(agent/nsDebug); #endif -config_require(agent/nsCache) -config_require(agent/nsLogging) -config_require(agent/nsVacmAccessTable) -config_add_mib(NET-SNMP-AGENT-MIB) +config_require(agent/nsCache); +config_require(agent/nsLogging); +config_require(agent/nsVacmAccessTable); +config_add_mib(NET-SNMP-AGENT-MIB); diff --git a/agent/mibgroup/agentx.h b/agent/mibgroup/agentx.h index de47fa8..dc376b5 100644 --- a/agent/mibgroup/agentx.h +++ b/agent/mibgroup/agentx.h @@ -1,6 +1,6 @@ #ifndef _AGENTX_MIBGROUP_H #define _AGENTX_MIBGROUP_H -config_require(agentx/master) -config_require(agentx/subagent) +config_require(agentx/master); +config_require(agentx/subagent); #endif /* _AGENTX_MIBGROUP_H */ diff --git a/agent/mibgroup/agentx/agentx_config.c b/agent/mibgroup/agentx/agentx_config.c index b590c7a..4d5f023 100644 --- a/agent/mibgroup/agentx/agentx_config.c +++ b/agent/mibgroup/agentx/agentx_config.c @@ -9,7 +9,7 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -21,8 +21,8 @@ #include "agentx/agentx_config.h" #include "agentx/protocol.h" -netsnmp_feature_require(user_information) -netsnmp_feature_require(string_time_to_secs) +netsnmp_feature_require(user_information); +netsnmp_feature_require(string_time_to_secs); /* --------------------------------------------------------------------- * @@ -140,6 +140,22 @@ agentx_parse_agentx_retries(const char *token, char *cptr) } #endif /* USING_AGENTX_MASTER_MODULE */ +#ifdef USING_AGENTX_SUBAGENT_MODULE +void +agentx_parse_agentx_ping_interval(const char *token, char *cptr) +{ + int x = atoi(cptr); + + DEBUGMSGTL(("agentx/config/ping", "%s\n", cptr)); + if (x < 1) { + config_perror("Invalid ping interval value"); + return; + } + netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, x); +} +#endif /* USING_AGENTX_SUBAGENT_MODULE */ + /* --------------------------------------------------------------------- * * Sub-agent @@ -160,7 +176,7 @@ agentx_register_config_handler(const char *token, register_config_handler(":agentx", token, parser, releaser, help); } -netsnmp_feature_child_of(agentx_unregister_config_handler, netsnmp_unused) +netsnmp_feature_child_of(agentx_unregister_config_handler, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_AGENTX_UNREGISTER_CONFIG_HANDLER void agentx_unregister_config_handler(const char *token) @@ -187,6 +203,21 @@ agentx_config_init(void) agentx_register_config_handler("agentxsocket", agentx_parse_agentx_socket, NULL, "AgentX bind address"); + + agentx_register_config_handler("agentxRetries", + agentx_parse_agentx_retries, NULL, + "AgentX Retries"); + /* default to 5 retries */ + netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_AGENTX_RETRIES, 5); + + agentx_register_config_handler("agentxTimeout", + agentx_parse_agentx_timeout, NULL, + "AgentX Timeout (seconds)"); + /* default to 1 second */ + netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_AGENTX_TIMEOUT, 1 * ONE_SEC); + #ifdef USING_AGENTX_MASTER_MODULE /* * tokens for master agent @@ -198,33 +229,20 @@ agentx_config_init(void) agentx_register_config_handler("agentxperms", agentx_parse_agentx_perms, NULL, "AgentX socket permissions: socket_perms [directory_perms [username|userid [groupname|groupid]]]"); - agentx_register_config_handler("agentxRetries", - agentx_parse_agentx_retries, NULL, - "AgentX Retries"); - agentx_register_config_handler("agentxTimeout", - agentx_parse_agentx_timeout, NULL, - "AgentX Timeout (seconds)"); } #endif /* USING_AGENTX_MASTER_MODULE */ #ifdef USING_AGENTX_SUBAGENT_MODULE /* - * tokens for master agent + * tokens for subagent */ if (SUB_AGENT == agent_role) { - /* - * set up callbacks to initiate master agent pings for this session - */ - netsnmp_ds_register_config(ASN_INTEGER, - netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_APPTYPE), - "agentxPingInterval", - NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL); - /* ping and/or reconnect by default every 15 seconds */ - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 15); - + agentx_register_config_handler("agentxPingInterval", + agentx_parse_agentx_ping_interval, NULL, + "AgentX ping interval"); + /* ping and/or reconnect by default every 15 seconds */ + netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 15); } #endif /* USING_AGENTX_SUBAGENT_MODULE */ } diff --git a/agent/mibgroup/agentx/agentx_config.h b/agent/mibgroup/agentx/agentx_config.h index 9496a47..e64f14a 100644 --- a/agent/mibgroup/agentx/agentx_config.h +++ b/agent/mibgroup/agentx/agentx_config.h @@ -1,7 +1,7 @@ #ifndef __AGENTX_CONFIG_H__ #define __AGENTX_CONFIG_H__ -config_belongs_in(agent_module) +config_belongs_in(agent_module); #ifdef __cplusplus extern "C" { diff --git a/agent/mibgroup/agentx/client.c b/agent/mibgroup/agentx/client.c index d36fe2d..fe5c31a 100644 --- a/agent/mibgroup/agentx/client.c +++ b/agent/mibgroup/agentx/client.c @@ -7,42 +7,43 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include #include +#include "agent_global_vars.h" #include "agentx/protocol.h" #include "agentx/client.h" #include "agentx/subagent.h" -netsnmp_feature_require(set_agent_uptime) +netsnmp_feature_require(set_agent_uptime); /* * AgentX handling utility routines @@ -51,7 +52,7 @@ netsnmp_feature_require(set_agent_uptime) * the SNMP equivalents */ -int +static int agentx_synch_input(int op, netsnmp_session * session, int reqid, netsnmp_pdu *pdu, void *magic) @@ -88,7 +89,7 @@ agentx_synch_input(int op, -int +static int agentx_synch_response(netsnmp_session * ss, netsnmp_pdu *pdu, netsnmp_pdu **response) { @@ -104,9 +105,7 @@ int agentx_open_session(netsnmp_session * ss) { netsnmp_pdu *pdu, *response; - extern oid version_sysoid[]; - extern int version_sysoid_len; - u_long timeout; + int timeout; DEBUGMSGTL(("agentx/subagent", "opening session \n")); if (ss == NULL || !IS_AGENTX_VERSION(ss->version)) { @@ -119,7 +118,7 @@ agentx_open_session(netsnmp_session * ss) timeout = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_AGENTX_TIMEOUT); if (timeout < 0) - pdu->time = 0; + pdu->time = 0; else /* for master TIMEOUT is usec, but Agentx Open specifies sec */ pdu->time = timeout/ONE_SEC; diff --git a/agent/mibgroup/agentx/client.h b/agent/mibgroup/agentx/client.h index 1701aaa..3e84615 100644 --- a/agent/mibgroup/agentx/client.h +++ b/agent/mibgroup/agentx/client.h @@ -1,7 +1,7 @@ #ifndef AGENTX_CLIENT_H #define AGENTX_CLIENT_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); #ifdef __cplusplus extern "C" { diff --git a/agent/mibgroup/agentx/master.c b/agent/mibgroup/agentx/master.c index c42a42a..ed7ecd1 100644 --- a/agent/mibgroup/agentx/master.c +++ b/agent/mibgroup/agentx/master.c @@ -15,7 +15,7 @@ #include #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif @@ -24,20 +24,20 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_STAT_H @@ -51,9 +51,9 @@ #include "agentx/protocol.h" #include "agentx/master_admin.h" -netsnmp_feature_require(handler_mark_requests_as_delegated) -netsnmp_feature_require(unix_socket_paths) -netsnmp_feature_require(free_agent_snmp_session_by_session) +netsnmp_feature_require(handler_mark_requests_as_delegated); +netsnmp_feature_require(unix_socket_paths); +netsnmp_feature_require(free_agent_snmp_session_by_session); void real_init_master(void) @@ -123,7 +123,6 @@ real_init_master(void) * Let 'snmp_open' interpret the descriptor. */ sess.local_port = AGENTX_PORT; /* Indicate server & set default port */ - sess.remote_port = 0; sess.callback = handle_master_agentx_packet; errno = 0; t = netsnmp_transport_open_server("agentx", sess.peername); @@ -179,13 +178,17 @@ real_init_master(void) agentx_sock_user = -1; if (agentx_sock_group == 0 ) agentx_sock_group = -1; - chown(name, agentx_sock_user, agentx_sock_group); + NETSNMP_IGNORE_RESULT(chown(name, agentx_sock_user, + agentx_sock_group)); } } #endif session = snmp_add_full(&sess, t, NULL, agentx_parse, NULL, NULL, agentx_realloc_build, agentx_check_packet, NULL); + /* snmp_add_full() frees 't' upon failure. */ + if (!session) + t = NULL; } if (session == NULL) { netsnmp_transport_free(t); @@ -219,7 +222,10 @@ agentx_got_response(int operation, if (!cache) { DEBUGMSGTL(("agentx/master", "response too late on session %8p\n", session)); - return 0; + /* response is too late, free the cache */ + if (magic) + netsnmp_free_delegated_cache((netsnmp_delegated_cache*) magic); + return 1; } requests = cache->requests; @@ -278,6 +284,11 @@ agentx_got_response(int operation, netsnmp_free_delegated_cache(cache); return 0; + case NETSNMP_CALLBACK_OP_RESEND: + DEBUGMSGTL(("agentx/master", "resend on session %8p req=0x%x\n", + session, (unsigned)reqid)); + return 0; + case NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE: /* * This session is alive @@ -531,7 +542,7 @@ agentx_master_handler(netsnmp_mib_handler *handler, if (snmp_oid_compare(nptr, nlen, request->subtree->start_a, request->subtree->start_len) < 0) { - DEBUGMSGTL(("agentx/master","inexact request preceeding region (")); + DEBUGMSGTL(("agentx/master","inexact request preceding region (")); DEBUGMSGOID(("agentx/master", request->subtree->start_a, request->subtree->start_len)); DEBUGMSG(("agentx/master", ")\n")); diff --git a/agent/mibgroup/agentx/master.h b/agent/mibgroup/agentx/master.h index a5dbfad..d5b0134 100644 --- a/agent/mibgroup/agentx/master.h +++ b/agent/mibgroup/agentx/master.h @@ -1,12 +1,11 @@ #ifndef _AGENTX_MASTER_H #define _AGENTX_MASTER_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); -config_require(agentx/protocol) -config_require(agentx/client) -config_require(agentx/master_admin) -config_require(agentx/agentx_config) +config_require(agentx/protocol); +config_require(agentx/master_admin); +config_require(agentx/agentx_config); void init_master(void); void real_init_master(void); diff --git a/agent/mibgroup/agentx/master_admin.c b/agent/mibgroup/agentx/master_admin.c index 4eaeab6..d536657 100644 --- a/agent/mibgroup/agentx/master_admin.c +++ b/agent/mibgroup/agentx/master_admin.c @@ -13,28 +13,31 @@ #ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #include #include +#include "agent_global_vars.h" #include "agentx/protocol.h" #include "agentx/client.h" +#include "agentx/subagent.h" +#include "agentx/master_admin.h" #include #include @@ -42,11 +45,11 @@ #include #include "master.h" -netsnmp_feature_require(unregister_mib_table_row) -netsnmp_feature_require(trap_vars_with_context) -netsnmp_feature_require(calculate_sectime_diff) -netsnmp_feature_require(allocate_globalcacheid) -netsnmp_feature_require(remove_index) +netsnmp_feature_require(unregister_mib_table_row); +netsnmp_feature_require(trap_vars_with_context); +netsnmp_feature_require(calculate_sectime_diff); +netsnmp_feature_require(allocate_globalcacheid); +netsnmp_feature_require(remove_index); netsnmp_session * find_agentx_session(netsnmp_session * session, int sessid) @@ -133,11 +136,16 @@ close_agentx_session(netsnmp_session * session, int sessid) * requests, so that the delegated request will be completed and * further requests can be processed */ - netsnmp_remove_delegated_requests_for_session(session); + while (netsnmp_remove_delegated_requests_for_session(session)) { + DEBUGMSGTL(("agentx/master", "Continue removing delegated reqests\n")); + } + if (session->subsession != NULL) { netsnmp_session *subsession = session->subsession; for(; subsession; subsession = subsession->next) { - netsnmp_remove_delegated_requests_for_session(subsession); + while (netsnmp_remove_delegated_requests_for_session(subsession)) { + DEBUGMSGTL(("agentx/master", "Continue removing delegated subsession reqests\n")); + } } } @@ -153,6 +161,7 @@ close_agentx_session(netsnmp_session * session, int sessid) for (sp = session->subsession; sp != NULL; sp = sp->next) { if (sp->sessid == sessid) { + netsnmp_remove_delegated_requests_for_session(sp); unregister_mibs_by_session(sp); unregister_index_by_session(sp); unregister_sysORTable_by_session(sp); @@ -408,8 +417,6 @@ agentx_notify(netsnmp_session * session, netsnmp_pdu *pdu) { netsnmp_session *sp; netsnmp_variable_list *var; - extern const oid sysuptime_oid[], snmptrap_oid[]; - extern const size_t sysuptime_oid_len, snmptrap_oid_len; sp = find_agentx_session(session, pdu->sessid); if (sp == NULL) @@ -437,17 +444,12 @@ agentx_notify(netsnmp_session * session, netsnmp_pdu *pdu) * as this is valid AgentX syntax. */ - /* If a context name was specified, send the trap using that context. - * Otherwise, send the trap without the context using the old method */ - if (pdu->contextName != NULL) - { - send_trap_vars_with_context(-1, -1, pdu->variables, - pdu->contextName); - } - else - { + /* If a context name was specified, send the trap using that context. + * Otherwise, send the trap without the context using the old method */ + if (pdu->contextName != NULL) + send_trap_vars_with_context(-1, -1, pdu->variables, pdu->contextName); + else send_trap_vars(-1, -1, pdu->variables); - } return AGENTX_ERR_NOERROR; } diff --git a/agent/mibgroup/agentx/master_admin.h b/agent/mibgroup/agentx/master_admin.h index 8f1a6cc..725f0e2 100644 --- a/agent/mibgroup/agentx/master_admin.h +++ b/agent/mibgroup/agentx/master_admin.h @@ -1,7 +1,7 @@ #ifndef _AGENTX_MASTER_ADMIN_H #define _AGENTX_MASTER_ADMIN_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); int handle_master_agentx_packet(int, netsnmp_session *, int, netsnmp_pdu *, void *); diff --git a/agent/mibgroup/agentx/protocol.c b/agent/mibgroup/agentx/protocol.c index 0845cf1..f8a0203 100644 --- a/agent/mibgroup/agentx/protocol.c +++ b/agent/mibgroup/agentx/protocol.c @@ -11,34 +11,35 @@ #include +#include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -98,9 +99,7 @@ agentx_realloc_build_int(u_char ** buf, size_t * buf_len, size_t * out_len, { unsigned int ivalue = value; size_t ilen = *out_len; -#ifdef WORDS_BIGENDIAN unsigned int i = 0; -#endif while ((*out_len + 4) >= *buf_len) { if (!(allow_realloc && snmp_realloc(buf, buf_len))) { @@ -109,22 +108,21 @@ agentx_realloc_build_int(u_char ** buf, size_t * buf_len, size_t * out_len, } if (network_order) { -#ifndef WORDS_BIGENDIAN - value = ntohl(value); -#endif + if (!NETSNMP_BIGENDIAN) + value = ntohl(value); memmove((*buf + *out_len), &value, 4); *out_len += 4; } else { -#ifndef WORDS_BIGENDIAN - memmove((*buf + *out_len), &value, 4); - *out_len += 4; -#else - for (i = 0; i < 4; i++) { - *(*buf + *out_len) = (u_char) value & 0xff; - (*out_len)++; - value >>= 8; + if (!NETSNMP_BIGENDIAN) { + memmove((*buf + *out_len), &value, 4); + *out_len += 4; + } else { + for (i = 0; i < 4; i++) { + *(*buf + *out_len) = (u_char) value & 0xff; + (*out_len)++; + value >>= 8; + } } -#endif } DEBUGDUMPSETUP("send", (*buf + ilen), 4); DEBUGMSG(("dumpv_send", " Integer:\t%u (0x%.2X)\n", ivalue, @@ -139,25 +137,24 @@ agentx_build_int(u_char * bufp, u_int value, int network_byte_order) u_int orig_val = value; if (network_byte_order) { -#ifndef WORDS_BIGENDIAN - value = ntohl(value); -#endif + if (!NETSNMP_BIGENDIAN) + value = ntohl(value); memmove(bufp, &value, 4); } else { -#ifndef WORDS_BIGENDIAN - memmove(bufp, &value, 4); -#else - *bufp = (u_char) value & 0xff; - value >>= 8; - bufp++; - *bufp = (u_char) value & 0xff; - value >>= 8; - bufp++; - *bufp = (u_char) value & 0xff; - value >>= 8; - bufp++; - *bufp = (u_char) value & 0xff; -#endif + if (!NETSNMP_BIGENDIAN) { + memmove(bufp, &value, 4); + } else { + *bufp = (u_char) value & 0xff; + value >>= 8; + bufp++; + *bufp = (u_char) value & 0xff; + value >>= 8; + bufp++; + *bufp = (u_char) value & 0xff; + value >>= 8; + bufp++; + *bufp = (u_char) value & 0xff; + } } DEBUGDUMPSETUP("send", orig_bufp, 4); DEBUGMSG(("dumpv_send", " Integer:\t%u (0x%.2X)\n", orig_val, @@ -171,9 +168,7 @@ agentx_realloc_build_short(u_char ** buf, size_t * buf_len, { unsigned short ivalue = value; size_t ilen = *out_len; -#ifdef WORDS_BIGENDIAN unsigned short i = 0; -#endif while ((*out_len + 2) >= *buf_len) { if (!(allow_realloc && snmp_realloc(buf, buf_len))) { @@ -182,22 +177,21 @@ agentx_realloc_build_short(u_char ** buf, size_t * buf_len, } if (network_order) { -#ifndef WORDS_BIGENDIAN - value = ntohs(value); -#endif + if (!NETSNMP_BIGENDIAN) + value = ntohs(value); memmove((*buf + *out_len), &value, 2); *out_len += 2; } else { -#ifndef WORDS_BIGENDIAN - memmove((*buf + *out_len), &value, 2); - *out_len += 2; -#else - for (i = 0; i < 2; i++) { - *(*buf + *out_len) = (u_char) value & 0xff; - (*out_len)++; - value >>= 8; + if (!NETSNMP_BIGENDIAN) { + memmove((*buf + *out_len), &value, 2); + *out_len += 2; + } else { + for (i = 0; i < 2; i++) { + *(*buf + *out_len) = (u_char) value & 0xff; + (*out_len)++; + value >>= 8; + } } -#endif } DEBUGDUMPSETUP("send", (*buf + ilen), 2); DEBUGMSG(("dumpv_send", " Short:\t%hu (0x%.2hX)\n", ivalue, ivalue)); @@ -323,7 +317,7 @@ agentx_realloc_build_string(u_char ** buf, size_t * buf_len, } DEBUGDUMPSETUP("send", (*buf + ilen + 4), ((string_len + 3) / 4) * 4); - DEBUGMSG(("dumpv_send", " String:\t%s\n", string)); + DEBUGMSG(("dumpv_send", " String:\t%.*s\n", (int)string_len, string)); DEBUGINDENTLESS(); DEBUGINDENTLESS(); return 1; @@ -694,16 +688,16 @@ _agentx_realloc_build(u_char ** buf, size_t * buf_len, size_t * out_len, pdu->flags &= ~(AGENTX_MSG_FLAG_NON_DEFAULT_CONTEXT); } - /* We've received a PDU that has specified a context. NetSNMP however, uses - * the pdu->community field to specify context when using the AgentX - * protocol. Therefore we need to copy the context name and length into the - * pdu->community and pdu->community_len fields, respectively. */ - if (pdu->contextName != NULL && pdu->community == NULL) - { - pdu->community = (u_char *) strdup(pdu->contextName); - pdu->community_len = pdu->contextNameLen; - pdu->flags |= AGENTX_MSG_FLAG_NON_DEFAULT_CONTEXT; - } + /* We've received a PDU that has specified a context. NetSNMP however, uses + * the pdu->community field to specify context when using the AgentX + * protocol. Therefore we need to copy the context name and length into the + * pdu->community and pdu->community_len fields, respectively. */ + if (pdu->contextName != NULL && pdu->community == NULL) + { + pdu->community = (u_char *) strdup(pdu->contextName); + pdu->community_len = pdu->contextNameLen; + pdu->flags |= AGENTX_MSG_FLAG_NON_DEFAULT_CONTEXT; + } /* * Build the header (and context if appropriate). @@ -872,9 +866,7 @@ _agentx_realloc_build(u_char ** buf, size_t * buf_len, size_t * out_len, } DEBUGINDENTLESS(); - /* - * Fallthrough - */ + /* FALL THROUGH */ case AGENTX_MSG_GET: case AGENTX_MSG_GETNEXT: @@ -929,9 +921,7 @@ _agentx_realloc_build(u_char ** buf, size_t * buf_len, size_t * out_len, DEBUGMSG(("dumpv_send", " errindex:\t%ld\n", pdu->errindex)); DEBUGINDENTLESS(); - /* - * Fallthrough - */ + /* FALL THROUGH */ case AGENTX_MSG_INDEX_ALLOCATE: case AGENTX_MSG_INDEX_DEALLOCATE: @@ -1037,8 +1027,8 @@ agentx_realloc_build(netsnmp_session * session, netsnmp_pdu *pdu, * ***********************/ -int -agentx_parse_int(u_char * data, u_int network_byte_order) +static int +agentx_parse_int(const u_char *data, u_int network_byte_order) { u_int value = 0; @@ -1049,25 +1039,24 @@ agentx_parse_int(u_char * data, u_int network_byte_order) DEBUGDUMPSETUP("recv", data, 4); if (network_byte_order) { memmove(&value, data, 4); -#ifndef WORDS_BIGENDIAN - value = ntohl(value); -#endif + if (!NETSNMP_BIGENDIAN) + value = ntohl(value); } else { -#ifndef WORDS_BIGENDIAN - memmove(&value, data, 4); -#else - /* - * The equivalent of the 'ntohl()' macro, - * except this macro is null on big-endian systems - */ - value += data[3]; - value <<= 8; - value += data[2]; - value <<= 8; - value += data[1]; - value <<= 8; - value += data[0]; -#endif + if (!NETSNMP_BIGENDIAN) { + memmove(&value, data, 4); + } else { + /* + * The equivalent of the 'ntohl()' macro, + * except this macro is null on big-endian systems + */ + value += data[3]; + value <<= 8; + value += data[2]; + value <<= 8; + value += data[1]; + value <<= 8; + value += data[0]; + } } DEBUGMSG(("dumpv_recv", " Integer:\t%u (0x%.2X)\n", value, value)); @@ -1075,28 +1064,27 @@ agentx_parse_int(u_char * data, u_int network_byte_order) } -int -agentx_parse_short(u_char * data, u_int network_byte_order) +static int +agentx_parse_short(const u_char *data, u_int network_byte_order) { u_short value = 0; if (network_byte_order) { memmove(&value, data, 2); -#ifndef WORDS_BIGENDIAN - value = ntohs(value); -#endif + if (!NETSNMP_BIGENDIAN) + value = ntohs(value); } else { -#ifndef WORDS_BIGENDIAN - memmove(&value, data, 2); -#else - /* - * The equivalent of the 'ntohs()' macro, - * except this macro is null on big-endian systems - */ - value += data[1]; - value <<= 8; - value += data[0]; -#endif + if (!NETSNMP_BIGENDIAN) { + memmove(&value, data, 2); + } else { + /* + * The equivalent of the 'ntohs()' macro, + * except this macro is null on big-endian systems + */ + value += data[1]; + value <<= 8; + value += data[0]; + } } DEBUGDUMPSETUP("recv", data, 2); @@ -1104,18 +1092,48 @@ agentx_parse_short(u_char * data, u_int network_byte_order) return value; } +/** + * struct rszbuf - a resizeable buffer + * @buf: Buffer pointer. + * @size: Size in bytes of the memory region @buf points at. Negative if @buf + * has not been allocated dynamically. + * @used: Number of bytes in buf with useful data. If @buf points at an OID, + * @used must be multiplied with sizeof(oid). + */ +struct rszbuf { + void *buf; + int size; + unsigned used; +}; + +/* Free @rb->buf if it has been allocated dynamically. */ +static void cleanup_rszbuf(struct rszbuf *rb) +{ + if (rb->size > 0) + free(rb->buf); +} + +/* Reallocate @rb->buf if it is smaller than @min_size. */ +static int increase_size(struct rszbuf *rb, int min_size) +{ + if (min_size <= abs(rb->size)) + return 1; + cleanup_rszbuf(rb); + rb->buf = malloc(min_size); + rb->size = rb->buf ? min_size : 0; + return rb->buf != NULL; +} -u_char * -agentx_parse_oid(u_char * data, size_t * length, int *inc, - oid * oid_buf, size_t * oid_len, u_int network_byte_order) +const u_char * +agentx_parse_oid(const u_char *data, size_t *length, int *inc, + struct rszbuf *oid_buf, u_int network_byte_order) { u_int n_subid; u_int prefix; u_int tmp_oid_len; int i; - int int_offset; - u_int *int_ptr = (u_int *)oid_buf; - u_char *buf_ptr = data; + oid *oid_ptr; + const u_char *buf_ptr = data; if (*length < 4) { DEBUGMSGTL(("agentx", "Incomplete Object ID\n")); @@ -1140,7 +1158,6 @@ agentx_parse_oid(u_char * data, size_t * length, int *inc, prefix = data[1]; if (inc) *inc = data[2]; - int_offset = sizeof(oid)/4; buf_ptr += 4; *length -= 4; @@ -1151,8 +1168,10 @@ agentx_parse_oid(u_char * data, size_t * length, int *inc, /* * Null OID */ - memset(int_ptr, 0, 2 * sizeof(oid)); - *oid_len = 2; + if (!increase_size(oid_buf, 2 * sizeof(oid))) + return NULL; + memset(oid_buf->buf, 0, 2 * sizeof(oid)); + oid_buf->used = 2; DEBUGPRINTINDENT("dumpv_recv"); DEBUGMSG(("dumpv_recv", "OID: NULL (0.0)\n")); DEBUGINDENTLESS(); @@ -1162,64 +1181,44 @@ agentx_parse_oid(u_char * data, size_t * length, int *inc, /* * Check that the expanded OID will fit in the buffer provided */ - tmp_oid_len = (prefix ? n_subid + 5 : n_subid); - if (*oid_len < tmp_oid_len) { - DEBUGMSGTL(("agentx", "Oversized Object ID (buf=%" NETSNMP_PRIz "d" - " pdu=%d)\n", *oid_len, tmp_oid_len)); + tmp_oid_len = n_subid + 5 * (prefix != 0); + if (!increase_size(oid_buf, tmp_oid_len * sizeof(oid))) { + DEBUGMSGTL(("agentx", "Out of memory\n")); DEBUGINDENTLESS(); return NULL; } -#ifdef WORDS_BIGENDIAN -# define endianoff 1 -#else -# define endianoff 0 -#endif if (*length < 4 * n_subid) { DEBUGMSGTL(("agentx", "Incomplete Object ID\n")); DEBUGINDENTLESS(); return NULL; } + oid_ptr = oid_buf->buf; + if (prefix) { - if (int_offset == 2) { /* align OID values in 64 bit agent */ - memset(int_ptr, 0, 10*sizeof(int_ptr[0])); - int_ptr[0+endianoff] = 1; - int_ptr[2+endianoff] = 3; - int_ptr[4+endianoff] = 6; - int_ptr[6+endianoff] = 1; - int_ptr[8+endianoff] = prefix; - } else { /* assume int_offset == 1 */ - int_ptr[0] = 1; - int_ptr[1] = 3; - int_ptr[2] = 6; - int_ptr[3] = 1; - int_ptr[4] = prefix; - } - int_ptr = int_ptr + (int_offset * 5); + *oid_ptr++ = 1; + *oid_ptr++ = 3; + *oid_ptr++ = 6; + *oid_ptr++ = 1; + *oid_ptr++ = prefix; } - for (i = 0; i < (int) (int_offset * n_subid); i = i + int_offset) { + for (i = 0; i < n_subid; i++) { int x; x = agentx_parse_int(buf_ptr, network_byte_order); - if (int_offset == 2) { - int_ptr[i+0] = 0; - int_ptr[i+1] = 0; - int_ptr[i+endianoff]=x; - } else { - int_ptr[i] = x; - } + *oid_ptr++ = x; buf_ptr += 4; *length -= 4; } - *oid_len = tmp_oid_len; + oid_buf->used = tmp_oid_len; DEBUGINDENTLESS(); DEBUGPRINTINDENT("dumpv_recv"); DEBUGMSG(("dumpv_recv", "OID: ")); - DEBUGMSGOID(("dumpv_recv", oid_buf, *oid_len)); + DEBUGMSGOID(("dumpv_recv", oid_buf->buf, oid_buf->used)); DEBUGMSG(("dumpv_recv", "\n")); return buf_ptr; @@ -1227,9 +1226,8 @@ agentx_parse_oid(u_char * data, size_t * length, int *inc, -u_char * -agentx_parse_string(u_char * data, size_t * length, - u_char * string, size_t * str_len, +static const u_char * +agentx_parse_string(const u_char *data, size_t *length, struct rszbuf *string, u_int network_byte_order) { u_int len; @@ -1241,22 +1239,30 @@ agentx_parse_string(u_char * data, size_t * length, } len = agentx_parse_int(data, network_byte_order); + if (len > UINT_MAX - 4) { + DEBUGMSGTL(("agentx", "Too long: %u\n", len)); + return NULL; + } if (*length < len + 4) { DEBUGMSGTL(("agentx", "Incomplete string (still too short: %d)\n", (int)*length)); return NULL; } - if (len > *str_len) { - DEBUGMSGTL(("agentx", "String too long (too long)\n")); + if (!increase_size(string, len + 1)) { + DEBUGMSGTL(("agentx", "Out of memory\n")); return NULL; } - memmove(string, data + 4, len); - string[len] = '\0'; - *str_len = len; + memmove(string->buf, data + 4, len); + memset((char *)string->buf + len, '\0', 1); + string->used = len; + + len = (len + 3) & ~3UL; /* Include padding. */ - len += 3; /* Extend the string length to include the padding */ - len >>= 2; - len <<= 2; + if (*length < len + 4) { + DEBUGMSGTL(("agentx", "Packet too short for string padding (still too short: %d)\n", + (int)*length)); + return NULL; + } *length -= (len + 4); DEBUGDUMPSETUP("recv", data, (len + 4)); @@ -1265,7 +1271,7 @@ agentx_parse_string(u_char * data, size_t * length, size_t buf_len = 0, out_len = 0; if (sprint_realloc_asciistring(&buf, &buf_len, &out_len, 1, - string, len)) { + string->buf, string->used)) { DEBUGMSG(("dumpv_recv", "String: %s\n", buf)); } else { DEBUGMSG(("dumpv_recv", "String: %s [TRUNCATED]\n", buf)); @@ -1277,10 +1283,9 @@ agentx_parse_string(u_char * data, size_t * length, return data + (len + 4); } -u_char * -agentx_parse_opaque(u_char * data, size_t * length, int *type, - u_char * opaque_buf, size_t * opaque_len, - u_int network_byte_order) +static const u_char * +agentx_parse_opaque(const u_char *data, size_t *length, int *type, + struct rszbuf *opaque_buf, u_int network_byte_order) { #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES union { @@ -1292,35 +1297,34 @@ agentx_parse_opaque(u_char * data, size_t * length, int *type, int tmp; u_char *buf; #endif - u_char *const cp = - agentx_parse_string(data, length, - opaque_buf, opaque_len, network_byte_order); + const u_char *const cp = + agentx_parse_string(data, length, opaque_buf, network_byte_order); #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES if (cp == NULL) return NULL; - buf = opaque_buf; + buf = opaque_buf->buf; - if ((*opaque_len <= 3) || (buf[0] != ASN_OPAQUE_TAG1)) + if (opaque_buf->used <= 3 || buf[0] != ASN_OPAQUE_TAG1) return cp; /* Unrecognised opaque type */ switch (buf[1]) { case ASN_OPAQUE_FLOAT: - if ((*opaque_len != (3 + sizeof(float))) || + if (opaque_buf->used != 3 + sizeof(float) || (buf[2] != sizeof(float))) return cp; /* Encoding isn't right for FLOAT */ memcpy(&fu.c[0], &buf[3], sizeof(float)); fu.intVal[0] = ntohl(fu.intVal[0]); - *opaque_len = sizeof(float); - memcpy(opaque_buf, &fu.c[0], sizeof(float)); + opaque_buf->used = sizeof(float); + memcpy(buf, &fu.c[0], sizeof(float)); *type = ASN_OPAQUE_FLOAT; DEBUGMSG(("dumpv_recv", "Float: %f\n", fu.floatVal)); return cp; case ASN_OPAQUE_DOUBLE: - if ((*opaque_len != (3 + sizeof(double))) || + if (opaque_buf->used != 3 + sizeof(double) || (buf[2] != sizeof(double))) return cp; /* Encoding isn't right for DOUBLE */ @@ -1328,8 +1332,8 @@ agentx_parse_opaque(u_char * data, size_t * length, int *type, tmp = ntohl(fu.intVal[1]); fu.intVal[1] = ntohl(fu.intVal[0]); fu.intVal[0] = tmp; - *opaque_len = sizeof(double); - memcpy(opaque_buf, &fu.c[0], sizeof(double)); + opaque_buf->used = sizeof(double); + memcpy(buf, &fu.c[0], sizeof(double)); *type = ASN_OPAQUE_DOUBLE; DEBUGMSG(("dumpv_recv", "Double: %f\n", fu.doubleVal)); return cp; @@ -1346,16 +1350,17 @@ agentx_parse_opaque(u_char * data, size_t * length, int *type, } -u_char * -agentx_parse_varbind(u_char * data, size_t * length, int *type, - oid * oid_buf, size_t * oid_len, - u_char * data_buf, size_t * data_len, +static const u_char * +agentx_parse_varbind(const u_char *data, size_t *length, int *type, + struct rszbuf *oid_buf, struct rszbuf *data_buf, u_int network_byte_order) { - u_char *bufp = data; + const u_char *bufp = data; u_int int_val; struct counter64 tmp64; + if (*length < 4) + return NULL; DEBUGDUMPHEADER("recv", "VarBind:"); DEBUGDUMPHEADER("recv", "Type"); *type = agentx_parse_short(bufp, network_byte_order); @@ -1363,8 +1368,7 @@ agentx_parse_varbind(u_char * data, size_t * length, int *type, bufp += 4; *length -= 4; - bufp = agentx_parse_oid(bufp, length, NULL, oid_buf, oid_len, - network_byte_order); + bufp = agentx_parse_oid(bufp, length, NULL, oid_buf, network_byte_order); if (bufp == NULL) { DEBUGINDENTLESS(); return NULL; @@ -1376,37 +1380,43 @@ agentx_parse_varbind(u_char * data, size_t * length, int *type, case ASN_GAUGE: case ASN_TIMETICKS: case ASN_UINTEGER: + if (*length < 4) { + DEBUGINDENTLESS(); + return NULL; + } int_val = agentx_parse_int(bufp, network_byte_order); - memmove(data_buf, &int_val, 4); - *data_len = 4; + memmove(data_buf->buf, &int_val, 4); + data_buf->used = 4; bufp += 4; *length -= 4; break; case ASN_OCTET_STR: case ASN_IPADDRESS: - bufp = agentx_parse_string(bufp, length, data_buf, data_len, - network_byte_order); + bufp = agentx_parse_string(bufp, length, data_buf, network_byte_order); break; case ASN_OPAQUE: - bufp = agentx_parse_opaque(bufp, length, type, data_buf, data_len, + bufp = agentx_parse_opaque(bufp, length, type, data_buf, network_byte_order); break; case ASN_PRIV_INCL_RANGE: case ASN_PRIV_EXCL_RANGE: case ASN_OBJECT_ID: - bufp = - agentx_parse_oid(bufp, length, NULL, (oid *) data_buf, - data_len, network_byte_order); - *data_len *= sizeof(oid); + bufp = agentx_parse_oid(bufp, length, NULL, data_buf, + network_byte_order); + data_buf->used *= sizeof(oid); /* * 'agentx_parse_oid()' returns the number of sub_ids */ break; case ASN_COUNTER64: + if (*length < 8) { + DEBUGINDENTLESS(); + return NULL; + } memset(&tmp64, 0, sizeof(tmp64)); if (network_byte_order) { tmp64.high = agentx_parse_int(bufp, network_byte_order); @@ -1416,8 +1426,8 @@ agentx_parse_varbind(u_char * data, size_t * length, int *type, tmp64.low = agentx_parse_int(bufp, network_byte_order); } - memcpy(data_buf, &tmp64, sizeof(tmp64)); - *data_len = sizeof(tmp64); + memcpy(data_buf->buf, &tmp64, sizeof(tmp64)); + data_buf->used = sizeof(tmp64); bufp += 8; *length -= 8; break; @@ -1429,7 +1439,7 @@ agentx_parse_varbind(u_char * data, size_t * length, int *type, /* * No data associated with these types. */ - *data_len = 0; + data_buf->used = 0; break; default: @@ -1467,10 +1477,10 @@ agentx_parse_varbind(u_char * data, size_t * length, int *type, * (and hence we should have the full packet), any subsequent * "running out of room" is indeed an error. */ -u_char * -agentx_parse_header(netsnmp_pdu *pdu, u_char * data, size_t * length) +static const u_char * +agentx_parse_header(netsnmp_pdu *pdu, const u_char *data, size_t *length) { - register u_char *bufp = data; + const u_char *bufp = data; size_t payload; if (*length < 20) { /* Incomplete header */ @@ -1549,23 +1559,36 @@ int agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, size_t len) { - register u_char *bufp = data; - u_char buffer[SNMP_MAX_MSG_SIZE]; - oid oid_buffer[MAX_OID_LEN], end_oid_buf[MAX_OID_LEN]; - size_t buf_len = sizeof(buffer); - size_t oid_buf_len = MAX_OID_LEN; - size_t end_oid_buf_len = MAX_OID_LEN; - + const u_char *bufp = data; + char data_buffer[64]; + struct rszbuf data_buf = { + data_buffer, + -(int)sizeof(data_buffer) + }; + oid oid_buffer[32]; + struct rszbuf oid_buf = { + oid_buffer, + -(int)sizeof(oid_buffer) + }; + oid end_oid_buffer[32]; + struct rszbuf end_oid_buf = { + end_oid_buffer, + -(int)sizeof(end_oid_buffer) + }; int range_bound; /* OID-range upper bound */ int inc; /* Inclusive SearchRange flag */ int type; /* VarBind data type */ size_t *length = &len; + const int dbgindent = debug_indent_get(); + int res = SNMP_ERR_NOERROR; if (pdu == NULL) - return (0); + return SNMP_ERR_NOERROR; - if (!IS_AGENTX_VERSION(session->version)) - return SNMPERR_BAD_VERSION; + if (!IS_AGENTX_VERSION(session->version)) { + res = SNMPERR_BAD_VERSION; + goto out; + } #ifndef SNMPERR_INCOMPLETE_PACKET /* @@ -1582,13 +1605,17 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, #define SNMPERR_INCOMPLETE_PACKET SNMPERR_ASN_PARSE_ERR #endif + if (len > 65536) + goto parse_err; /* * Handle (common) header .... */ bufp = agentx_parse_header(pdu, bufp, length); - if (bufp == NULL) - return SNMPERR_INCOMPLETE_PACKET; /* i.e. wait for the rest */ + if (bufp == NULL) { + res = SNMPERR_INCOMPLETE_PACKET; /* i.e. wait for the rest */ + goto out; + } /* * Control PDU handling @@ -1602,33 +1629,33 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, */ if (pdu->flags & AGENTX_MSG_FLAG_NON_DEFAULT_CONTEXT) { DEBUGDUMPHEADER("recv", "Context"); - bufp = agentx_parse_string(bufp, length, buffer, &buf_len, - pdu->flags & + bufp = agentx_parse_string(bufp, length, &data_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); DEBUGINDENTLESS(); if (bufp == NULL) - return SNMPERR_ASN_PARSE_ERR; + goto parse_err; - pdu->community_len = buf_len; - snmp_clone_mem((void **) &pdu->community, - (void *) buffer, (unsigned) buf_len); + pdu->community_len = data_buf.used; + snmp_clone_mem((void **)&pdu->community, data_buf.buf, data_buf.used); - /* The NetSNMP API stuffs the context into the PDU's community string - * field, when using the AgentX Protocol. The rest of the code however, - * expects to find the context in the PDU's context field. Therefore we - * need to copy the context into the PDU's context fields. */ - if (pdu->community_len > 0 && pdu->contextName == NULL) - { - pdu->contextName = strdup((char *) pdu->community); - pdu->contextNameLen = pdu->community_len; - } - - buf_len = sizeof(buffer); + /* The NetSNMP API stuffs the context into the PDU's community string + * field, when using the AgentX Protocol. The rest of the code however, + * expects to find the context in the PDU's context field. Therefore we + * need to copy the context into the PDU's context fields. */ + if (pdu->community_len > 0 && pdu->contextName == NULL) { + pdu->contextName = strdup((char *) pdu->community); + pdu->contextNameLen = pdu->community_len; + } } +#define AGENTX_NEEDLEN( len ) \ + if ( *length < len ) { \ + goto parse_err; \ + } DEBUGDUMPHEADER("recv", "PDU"); switch (pdu->command) { case AGENTX_MSG_OPEN: + AGENTX_NEEDLEN(4); pdu->time = *bufp; /* Timeout */ bufp += 4; *length -= 4; @@ -1637,33 +1664,23 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, * Store subagent OID & description in a VarBind */ DEBUGDUMPHEADER("recv", "Subagent OID"); - bufp = agentx_parse_oid(bufp, length, NULL, - oid_buffer, &oid_buf_len, - pdu-> - flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); + bufp = agentx_parse_oid(bufp, length, NULL, &oid_buf, pdu->flags & + AGENTX_FLAGS_NETWORK_BYTE_ORDER); DEBUGINDENTLESS(); - if (bufp == NULL) { - DEBUGINDENTLESS(); - return SNMPERR_ASN_PARSE_ERR; - } + if (bufp == NULL) + goto parse_err; DEBUGDUMPHEADER("recv", "Subagent Description"); - bufp = agentx_parse_string(bufp, length, buffer, &buf_len, - pdu-> - flags & + bufp = agentx_parse_string(bufp, length, &data_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); DEBUGINDENTLESS(); - if (bufp == NULL) { - DEBUGINDENTLESS(); - return SNMPERR_ASN_PARSE_ERR; - } - snmp_pdu_add_variable(pdu, oid_buffer, oid_buf_len, - ASN_OCTET_STR, buffer, buf_len); - - oid_buf_len = MAX_OID_LEN; - buf_len = sizeof(buffer); + if (bufp == NULL) + goto parse_err; + snmp_pdu_add_variable(pdu, oid_buf.buf, oid_buf.used, + ASN_OCTET_STR, data_buf.buf, data_buf.used); break; case AGENTX_MSG_CLOSE: + AGENTX_NEEDLEN(4); pdu->errstat = *bufp; /* Reason */ bufp += 4; *length -= 4; @@ -1672,6 +1689,7 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, case AGENTX_MSG_UNREGISTER: case AGENTX_MSG_REGISTER: + AGENTX_NEEDLEN(4); DEBUGDUMPHEADER("recv", "Registration Header"); if (pdu->command == AGENTX_MSG_REGISTER) { pdu->time = *bufp; /* Timeout (Register only) */ @@ -1692,16 +1710,16 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, DEBUGINDENTLESS(); DEBUGDUMPHEADER("recv", "Registration OID"); - bufp = agentx_parse_oid(bufp, length, NULL, - oid_buffer, &oid_buf_len, - pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); + bufp = agentx_parse_oid(bufp, length, NULL, &oid_buf, pdu->flags & + AGENTX_FLAGS_NETWORK_BYTE_ORDER); DEBUGINDENTLESS(); - if (bufp == NULL) { - DEBUGINDENTLESS(); - return SNMPERR_ASN_PARSE_ERR; - } + if (bufp == NULL) + goto parse_err; if (pdu->range_subid) { + if (pdu->range_subid > oid_buf.used) + goto parse_err; + AGENTX_NEEDLEN(4); range_bound = agentx_parse_int(bufp, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); bufp += 4; @@ -1710,21 +1728,21 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, /* * Construct the end-OID. */ - end_oid_buf_len = oid_buf_len * sizeof(oid); - memcpy(end_oid_buf, oid_buffer, end_oid_buf_len); - end_oid_buf[pdu->range_subid - 1] = range_bound; - - snmp_pdu_add_variable(pdu, oid_buffer, oid_buf_len, - ASN_PRIV_INCL_RANGE, - (u_char *) end_oid_buf, end_oid_buf_len); + if (!increase_size(&end_oid_buf, oid_buf.used * sizeof(oid))) + goto parse_err; + memcpy(end_oid_buf.buf, oid_buf.buf, oid_buf.used * sizeof(oid)); + ((oid *)end_oid_buf.buf)[pdu->range_subid - 1] = range_bound; + + snmp_pdu_add_variable(pdu, oid_buf.buf, oid_buf.used, + ASN_PRIV_INCL_RANGE, end_oid_buf.buf, + oid_buf.used * sizeof(oid)); } else { - snmp_add_null_var(pdu, oid_buffer, oid_buf_len); + snmp_add_null_var(pdu, oid_buf.buf, oid_buf.used); } - - oid_buf_len = MAX_OID_LEN; break; case AGENTX_MSG_GETBULK: + AGENTX_NEEDLEN(4); DEBUGDUMPHEADER("recv", "Non-repeaters"); pdu->non_repeaters = agentx_parse_short(bufp, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); @@ -1735,9 +1753,7 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, DEBUGINDENTLESS(); bufp += 4; *length -= 4; - /* - * Fallthrough - SearchRange handling is the same - */ + /* FALLTHROUGH */ case AGENTX_MSG_GETNEXT: case AGENTX_MSG_GET: @@ -1748,42 +1764,23 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, */ DEBUGDUMPHEADER("recv", "Search Range"); while (*length > 0) { - bufp = agentx_parse_oid(bufp, length, &inc, - oid_buffer, &oid_buf_len, - pdu->flags & + bufp = agentx_parse_oid(bufp, length, &inc, &oid_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); - if (bufp == NULL) { - DEBUGINDENTLESS(); - DEBUGINDENTLESS(); - return SNMPERR_ASN_PARSE_ERR; - } - bufp = agentx_parse_oid(bufp, length, NULL, - end_oid_buf, &end_oid_buf_len, + if (bufp == NULL) + goto parse_err; + bufp = agentx_parse_oid(bufp, length, NULL, &end_oid_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); - if (bufp == NULL) { - DEBUGINDENTLESS(); - DEBUGINDENTLESS(); - return SNMPERR_ASN_PARSE_ERR; - } - end_oid_buf_len *= sizeof(oid); + if (bufp == NULL) + goto parse_err; /* * 'agentx_parse_oid()' returns the number of sub_ids */ - - if (inc) { - snmp_pdu_add_variable(pdu, oid_buffer, oid_buf_len, - ASN_PRIV_INCL_RANGE, - (u_char *) end_oid_buf, - end_oid_buf_len); - } else { - snmp_pdu_add_variable(pdu, oid_buffer, oid_buf_len, - ASN_PRIV_EXCL_RANGE, - (u_char *) end_oid_buf, - end_oid_buf_len); - } - oid_buf_len = MAX_OID_LEN; - end_oid_buf_len = MAX_OID_LEN; + snmp_pdu_add_variable(pdu, oid_buf.buf, oid_buf.used, + inc ? ASN_PRIV_INCL_RANGE : + ASN_PRIV_EXCL_RANGE, + end_oid_buf.buf, + end_oid_buf.used * sizeof(oid)); } DEBUGINDENTLESS(); @@ -1794,6 +1791,8 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, pdu->flags |= UCD_MSG_FLAG_RESPONSE_PDU; + AGENTX_NEEDLEN(8); + /* * sysUpTime */ @@ -1809,9 +1808,7 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); bufp += 4; *length -= 4; - /* - * Fallthrough - VarBind handling is the same - */ + /* FALL THROUGH */ case AGENTX_MSG_INDEX_ALLOCATE: case AGENTX_MSG_INDEX_DEALLOCATE: @@ -1825,21 +1822,13 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, DEBUGDUMPHEADER("recv", "VarBindList"); while (*length > 0) { - bufp = agentx_parse_varbind(bufp, length, &type, - oid_buffer, &oid_buf_len, - buffer, &buf_len, - pdu->flags & + bufp = agentx_parse_varbind(bufp, length, &type, &oid_buf, + &data_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); - if (bufp == NULL) { - DEBUGINDENTLESS(); - DEBUGINDENTLESS(); - return SNMPERR_ASN_PARSE_ERR; - } - snmp_pdu_add_variable(pdu, oid_buffer, oid_buf_len, - (u_char) type, buffer, buf_len); - - oid_buf_len = MAX_OID_LEN; - buf_len = sizeof(buffer); + if (bufp == NULL) + goto parse_err; + snmp_pdu_add_variable(pdu, oid_buf.buf, oid_buf.used, type, + data_buf.buf, data_buf.used); } DEBUGINDENTLESS(); break; @@ -1859,53 +1848,54 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data, /* * Store AgentCap OID & description in a VarBind */ - bufp = agentx_parse_oid(bufp, length, NULL, - oid_buffer, &oid_buf_len, + bufp = agentx_parse_oid(bufp, length, NULL, &oid_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); if (bufp == NULL) - return SNMPERR_ASN_PARSE_ERR; - bufp = agentx_parse_string(bufp, length, buffer, &buf_len, - pdu->flags & + goto parse_err; + bufp = agentx_parse_string(bufp, length, &data_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); if (bufp == NULL) - return SNMPERR_ASN_PARSE_ERR; - snmp_pdu_add_variable(pdu, oid_buffer, oid_buf_len, - ASN_OCTET_STR, buffer, buf_len); - - oid_buf_len = MAX_OID_LEN; - buf_len = sizeof(buffer); + goto parse_err; + snmp_pdu_add_variable(pdu, oid_buf.buf, oid_buf.used, + ASN_OCTET_STR, data_buf.buf, data_buf.used); break; case AGENTX_MSG_REMOVE_AGENT_CAPS: /* * Store AgentCap OID & description in a VarBind */ - bufp = agentx_parse_oid(bufp, length, NULL, - oid_buffer, &oid_buf_len, + bufp = agentx_parse_oid(bufp, length, NULL, &oid_buf, pdu->flags & AGENTX_FLAGS_NETWORK_BYTE_ORDER); if (bufp == NULL) - return SNMPERR_ASN_PARSE_ERR; - snmp_add_null_var(pdu, oid_buffer, oid_buf_len); - - oid_buf_len = MAX_OID_LEN; + goto parse_err; + snmp_add_null_var(pdu, oid_buf.buf, oid_buf.used); break; default: - DEBUGINDENTLESS(); DEBUGMSGTL(("agentx", "Unrecognised PDU type: %d\n", pdu->command)); - return SNMPERR_UNKNOWN_PDU; + res = SNMPERR_UNKNOWN_PDU; } - DEBUGINDENTLESS(); - return SNMP_ERR_NOERROR; + +out: + debug_indent_add(dbgindent - debug_indent_get()); + cleanup_rszbuf(&end_oid_buf); + cleanup_rszbuf(&oid_buf); + cleanup_rszbuf(&data_buf); + return res; + +parse_err: + res = SNMPERR_ASN_PARSE_ERR; + goto out; } +#undef AGENTX_NEEDLEN #ifdef TESTING -testit(netsnmp_pdu *pdu1) +void testit(netsnmp_pdu *pdu1) { char packet1[BUFSIZ]; char packet2[BUFSIZ]; @@ -1974,7 +1964,7 @@ testit(netsnmp_pdu *pdu1) -main() +int main(void) { netsnmp_pdu pdu1; oid oid_buf[] = { 1, 3, 6, 1, 2, 1, 10 }; diff --git a/agent/mibgroup/agentx/protocol.h b/agent/mibgroup/agentx/protocol.h index e1eebc1..d2d08b2 100644 --- a/agent/mibgroup/agentx/protocol.h +++ b/agent/mibgroup/agentx/protocol.h @@ -1,7 +1,7 @@ #ifndef AGENTX_PROTOCOL_H #define AGENTX_PROTOCOL_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); #ifdef __cplusplus extern "C" { diff --git a/agent/mibgroup/agentx/subagent.c b/agent/mibgroup/agentx/subagent.c index 1f9d31c..7a2e87a 100644 --- a/agent/mibgroup/agentx/subagent.c +++ b/agent/mibgroup/agentx/subagent.c @@ -8,33 +8,35 @@ #ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include +#include #include #include #include "snmpd.h" +#include "agent_global_vars.h" #include "agentx/protocol.h" #include "agentx/client.h" #include "agentx/agentx_config.h" @@ -45,10 +47,10 @@ #include "subagent.h" -netsnmp_feature_child_of(agentx_subagent, agentx_all) -netsnmp_feature_child_of(agentx_enable_subagent, agentx_subagent) +netsnmp_feature_child_of(agentx_subagent, agentx_all); +netsnmp_feature_child_of(agentx_enable_subagent, agentx_subagent); -netsnmp_feature_require(remove_trap_session) +netsnmp_feature_require(remove_trap_session); #ifdef USING_AGENTX_SUBAGENT_MODULE @@ -89,8 +91,6 @@ struct agent_netsnmp_set_info { static struct agent_netsnmp_set_info *Sets = NULL; netsnmp_session *agentx_callback_sess = NULL; -extern int callback_master_num; -extern netsnmp_session *main_session; /* from snmp_agent.c */ int subagent_startup(int majorID, int minorID, @@ -247,6 +247,8 @@ static void send_agentx_error(netsnmp_session *session, netsnmp_pdu *pdu, int errstat, int errindex) { pdu = snmp_clone_pdu(pdu); + if (!pdu) + return; pdu->command = AGENTX_MSG_RESPONSE; pdu->version = session->version; pdu->errstat = errstat; @@ -503,6 +505,9 @@ handle_agentx_packet(int operation, netsnmp_session * session, int reqid, */ internal_pdu = snmp_clone_pdu(pdu); + if (!internal_pdu) + return 1; + free(internal_pdu->contextName); internal_pdu->contextName = (char *) internal_pdu->community; internal_pdu->contextNameLen = internal_pdu->community_len; internal_pdu->community = NULL; @@ -548,6 +553,8 @@ handle_subagent_response(int op, netsnmp_session * session, int reqid, } pdu = snmp_clone_pdu(pdu); + if (!pdu) + return 1; DEBUGMSGTL(("agentx/subagent", "handling AgentX response (cmd 0x%02x orig_cmd 0x%02x)" " (req=0x%x,trans=0x%x,sess=0x%x)\n", @@ -642,6 +649,8 @@ handle_subagent_set_response(int op, netsnmp_session * session, int reqid, (unsigned)pdu->command, (unsigned)pdu->reqid, (unsigned)pdu->transid, (unsigned)pdu->sessid)); pdu = snmp_clone_pdu(pdu); + if (!pdu) + return 1; asi = (struct agent_netsnmp_set_info *) magic; retsess = asi->sess; @@ -675,11 +684,13 @@ handle_subagent_set_response(int op, netsnmp_session * session, int reqid, pdu->variables = NULL; /* the variables were added by us */ } - netsnmp_assert(retsess != NULL); - pdu->command = AGENTX_MSG_RESPONSE; - pdu->version = retsess->version; + if (retsess && pdu) { + pdu->command = AGENTX_MSG_RESPONSE; + pdu->version = retsess->version; - if (!snmp_send(retsess, pdu)) { + if (!snmp_send(retsess, pdu)) + snmp_free_pdu(pdu); + } else if (pdu) { snmp_free_pdu(pdu); } DEBUGMSGTL(("agentx/subagent", " FINISHED\n")); @@ -744,11 +755,11 @@ subagent_shutdown(int majorID, int minorID, void *serverarg, void *clientarg) return 0; } agentx_close_session(thesession, AGENTX_CLOSE_SHUTDOWN); - snmp_close(thesession); if (main_session != NULL) { remove_trap_session(main_session); main_session = NULL; } + snmp_close(thesession); DEBUGMSGTL(("agentx/subagent", "shut down finished.\n")); subagent_init_init = 0; @@ -870,6 +881,8 @@ subagent_open_master_session(void) agentx_realloc_build, agentx_check_packet, NULL); if (main_session == NULL) { + /* snmp_add_full() frees 't' upon failure. */ + t = NULL; if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS)) { char buf[1024]; diff --git a/agent/mibgroup/agentx/subagent.h b/agent/mibgroup/agentx/subagent.h index b55bec1..bc63e8b 100644 --- a/agent/mibgroup/agentx/subagent.h +++ b/agent/mibgroup/agentx/subagent.h @@ -1,14 +1,14 @@ #ifndef _AGENTX_SUBAGENT_H #define _AGENTX_SUBAGENT_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); -config_require(agentx/protocol) -config_require(agentx/client) -config_require(agentx/agentx_config) +config_require(agentx/protocol); +config_require(agentx/client); +config_require(agentx/agentx_config); #ifndef NETSNMP_TRANSPORT_CALLBACK_DOMAIN -config_error(agentx/subagent depends on the Callback transport) +config_error(agentx/subagent depends on the Callback transport); #endif int subagent_init(void); diff --git a/agent/mibgroup/default_modules.h b/agent/mibgroup/default_modules.h index fc5f26a..75575a4 100644 --- a/agent/mibgroup/default_modules.h +++ b/agent/mibgroup/default_modules.h @@ -3,54 +3,54 @@ /* these go into both the mini agent and the full agent */ -config_require(snmpv3mibs) +config_require(snmpv3mibs); /* very few default mibs */ -config_add_mib(SNMPv2-MIB) -config_add_mib(IF-MIB) -config_add_mib(IP-MIB) -config_add_mib(TCP-MIB) -config_add_mib(UDP-MIB) +config_add_mib(SNMPv2-MIB); +config_add_mib(IF-MIB); +config_add_mib(IP-MIB); +config_add_mib(TCP-MIB); +config_add_mib(UDP-MIB); #ifdef NETSNMP_MINI_AGENT /* limit the mibII modules to the bare minimum */ -config_require(mibII/snmp_mib) -config_require(mibII/system_mib) -config_require(mibII/sysORTable) -config_require(mibII/vacm_vars) -config_require(mibII/vacm_conf) +config_require(mibII/snmp_mib); +config_require(mibII/system_mib); +config_require(mibII/sysORTable); +config_require(mibII/vacm_vars); +config_require(mibII/vacm_conf); #else /* !NETSNMP_MINI_AGENT == the full shabang */ -config_require(mibII) -config_require(ucd_snmp) -config_require(notification) -config_require(notification-log-mib) -config_require(target) -config_require(agent_mibs) -config_require(agentx) -config_require(disman/event) +config_require(mibII); +config_require(ucd_snmp); +config_require(notification); +config_require(notification-log-mib); +config_require(target); +config_require(agent_mibs); +config_require(agentx); +config_require(disman/event); #ifndef NETSNMP_NO_WRITE_SUPPORT -config_require(disman/schedule) +config_require(disman/schedule); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ -config_require(utilities) +config_require(utilities); /* default MIBs to auto-include for parsing */ /* NOTE: we consider these MIBs users will likely want to load by default, even if they're not supporting it in the agent (ie, the command line tools need to load them anyway) */ -config_add_mib(HOST-RESOURCES-MIB) -config_add_mib(NOTIFICATION-LOG-MIB) -config_add_mib(DISMAN-EVENT-MIB) +config_add_mib(HOST-RESOURCES-MIB); +config_add_mib(NOTIFICATION-LOG-MIB); +config_add_mib(DISMAN-EVENT-MIB); #ifndef NETSNMP_NO_WRITE_SUPPORT -config_add_mib(DISMAN-SCHEDULE-MIB) +config_add_mib(DISMAN-SCHEDULE-MIB); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ /* architecture specific extra modules */ /* these symbols are set in the host specific net-snmp/system/.h files */ #ifdef NETSNMP_INCLUDE_HOST_RESOURCES - config_require(host) + config_require(host); #endif #endif diff --git a/agent/mibgroup/deliver/deliverByNotify.c b/agent/mibgroup/deliver/deliverByNotify.c index c89879a..6414b4a 100644 --- a/agent/mibgroup/deliver/deliverByNotify.c +++ b/agent/mibgroup/deliver/deliverByNotify.c @@ -5,7 +5,7 @@ #include -netsnmp_feature_require(container_fifo) +netsnmp_feature_require(container_fifo); #include "deliverByNotify.h" @@ -191,7 +191,7 @@ parse_deliver_config(const char *token, char *line) { config_perror("no frequency given"); return; } - copy_nword(cp, buf, buf_len); + copy_nword_const(cp, buf, buf_len); frequency = netsnmp_string_time_to_secs(buf); cp = skip_token_const(cp); diff --git a/agent/mibgroup/deliver/deliverByNotify.h b/agent/mibgroup/deliver/deliverByNotify.h index 292c366..da40221 100644 --- a/agent/mibgroup/deliver/deliverByNotify.h +++ b/agent/mibgroup/deliver/deliverByNotify.h @@ -1,18 +1,18 @@ #ifndef DELIVERBYNOTIFY_H #define DELIVERBYNOTIFY_H 1 -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -config_add_mib(NET-SNMP-PERIODIC-NOTIFY-MIB) +config_add_mib(NET-SNMP-PERIODIC-NOTIFY-MIB); void init_deliverByNotify(void); diff --git a/agent/mibgroup/disman.h b/agent/mibgroup/disman.h index 6b7cdd5..0dc50b8 100644 --- a/agent/mibgroup/disman.h +++ b/agent/mibgroup/disman.h @@ -1,11 +1,11 @@ /* * Wrapper for the full DisMan implementation */ -config_require(disman/event-mib) -config_require(disman/expression-mib) +config_require(disman/event-mib); +config_require(disman/expression-mib); #ifndef NETSNMP_NO_WRITE_SUPPORT /* the schedule mib is all about writing (SETs) */ -config_require(disman/schedule) +config_require(disman/schedule); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ /* config_require(disman/nslookup-mib) */ /* config_require(disman/ping-mib) */ diff --git a/agent/mibgroup/disman/event-mib.h b/agent/mibgroup/disman/event-mib.h index 58c8391..757c99b 100644 --- a/agent/mibgroup/disman/event-mib.h +++ b/agent/mibgroup/disman/event-mib.h @@ -1,2 +1,2 @@ -config_require(disman/event) +config_require(disman/event); diff --git a/agent/mibgroup/disman/event.h b/agent/mibgroup/disman/event.h index e646975..cda1382 100644 --- a/agent/mibgroup/disman/event.h +++ b/agent/mibgroup/disman/event.h @@ -1,34 +1,34 @@ -config_add_mib(DISMAN-EVENT-MIB) +config_add_mib(DISMAN-EVENT-MIB); /* * wrapper for the new disman event mib implementation code files */ -config_require(disman/event/mteScalars) -config_require(disman/event/mteTrigger) -config_require(disman/event/mteTriggerTable) -config_require(disman/event/mteTriggerDeltaTable) -config_require(disman/event/mteTriggerExistenceTable) -config_require(disman/event/mteTriggerBooleanTable) -config_require(disman/event/mteTriggerThresholdTable) -config_require(disman/event/mteTriggerConf) -config_require(disman/event/mteEvent) -config_require(disman/event/mteEventTable) -config_require(disman/event/mteEventSetTable) -config_require(disman/event/mteEventNotificationTable) -config_require(disman/event/mteEventConf) -config_require(disman/event/mteObjects) -config_require(disman/event/mteObjectsTable) -config_require(disman/event/mteObjectsConf) +config_require(disman/event/mteScalars); +config_require(disman/event/mteTrigger); +config_require(disman/event/mteTriggerTable); +config_require(disman/event/mteTriggerDeltaTable); +config_require(disman/event/mteTriggerExistenceTable); +config_require(disman/event/mteTriggerBooleanTable); +config_require(disman/event/mteTriggerThresholdTable); +config_require(disman/event/mteTriggerConf); +config_require(disman/event/mteEvent); +config_require(disman/event/mteEventTable); +config_require(disman/event/mteEventSetTable); +config_require(disman/event/mteEventNotificationTable); +config_require(disman/event/mteEventConf); +config_require(disman/event/mteObjects); +config_require(disman/event/mteObjectsTable); +config_require(disman/event/mteObjectsConf); /* * conflicts with the previous implementation */ -config_exclude(disman/mteTriggerTable) -config_exclude(disman/mteTriggerDeltaTable) -config_exclude(disman/mteTriggerExistenceTable) -config_exclude(disman/mteTriggerBooleanTable) -config_exclude(disman/mteTriggerThresholdTable) -config_exclude(disman/mteObjectsTable) -config_exclude(disman/mteEventTable) -config_exclude(disman/mteEventNotificationTable) +config_exclude(disman/mteTriggerTable); +config_exclude(disman/mteTriggerDeltaTable); +config_exclude(disman/mteTriggerExistenceTable); +config_exclude(disman/mteTriggerBooleanTable); +config_exclude(disman/mteTriggerThresholdTable); +config_exclude(disman/mteObjectsTable); +config_exclude(disman/mteEventTable); +config_exclude(disman/mteEventNotificationTable); diff --git a/agent/mibgroup/disman/event/mteEvent.c b/agent/mibgroup/disman/event/mteEvent.c index bc4ff0b..43d034b 100644 --- a/agent/mibgroup/disman/event/mteEvent.c +++ b/agent/mibgroup/disman/event/mteEvent.c @@ -7,13 +7,15 @@ #include #include #include +#include "agent_global_vars.h" +#include "agentx/subagent.h" #include "disman/event/mteEvent.h" #include "disman/event/mteTrigger.h" #include "disman/event/mteObjects.h" -netsnmp_feature_child_of(disman_debugging, libnetsnmpmibs) -netsnmp_feature_child_of(mteevent, libnetsnmpmibs) -netsnmp_feature_child_of(mteevent_removeentry, mteevent) +netsnmp_feature_child_of(disman_debugging, libnetsnmpmibs); +netsnmp_feature_child_of(mteevent, libnetsnmpmibs); +netsnmp_feature_child_of(mteevent_removeentry, mteevent); netsnmp_tdata *event_table_data; @@ -76,9 +78,7 @@ _init_builtin_mteEvent( const char *event, const char *oname, oid *trapOID, size netsnmp_tdata_row *row; struct mteEvent *entry; - memset(ename, 0, sizeof(ename)); - ename[0] = '_'; - memcpy(ename+1, event, strlen(event)); + snprintf(ename, sizeof(ename), "_%s", event); row = mteEvent_createEntry( "_snmpd", ename, 1 ); if (!row || !row->data) @@ -89,7 +89,7 @@ _init_builtin_mteEvent( const char *event, const char *oname, oid *trapOID, size entry->mteNotification_len = trapOID_len; memcpy( entry->mteNotification, trapOID, trapOID_len*sizeof(oid)); memcpy( entry->mteNotifyOwner, "_snmpd", 6 ); - memcpy( entry->mteNotifyObjects, oname, strlen(oname)); + strlcpy(entry->mteNotifyObjects, oname, sizeof(entry->mteNotifyObjects)); entry->flags |= MTE_EVENT_FLAG_ENABLED| MTE_EVENT_FLAG_ACTIVE| MTE_EVENT_FLAG_VALID; @@ -349,8 +349,6 @@ _mteEvent_fire_notify( struct mteEvent *entry, /* The event to fire */ oid *suffix, size_t sfx_len ) /* Matching instance */ { netsnmp_variable_list *var, *v2; - extern const oid snmptrap_oid[]; - extern const size_t snmptrap_oid_len; netsnmp_session *s; /* diff --git a/agent/mibgroup/disman/event/mteEventConf.c b/agent/mibgroup/disman/event/mteEventConf.c index 24192a6..f011fb1 100644 --- a/agent/mibgroup/disman/event/mteEventConf.c +++ b/agent/mibgroup/disman/event/mteEventConf.c @@ -12,7 +12,7 @@ #include "disman/event/mteEvent.h" #include "disman/event/mteEventConf.h" -netsnmp_feature_require(iquery) +netsnmp_feature_require(iquery); /** Initializes the mteEventsConf module */ void diff --git a/agent/mibgroup/disman/event/mteEventConf.h b/agent/mibgroup/disman/event/mteEventConf.h index 47001f0..b6b59f6 100644 --- a/agent/mibgroup/disman/event/mteEventConf.h +++ b/agent/mibgroup/disman/event/mteEventConf.h @@ -1,7 +1,7 @@ #ifndef MTEEVENTCONF_H #define MTEEVENTCONF_H -config_require(utilities/iquery) +config_require(utilities/iquery); /* * function declarations diff --git a/agent/mibgroup/disman/event/mteEventNotificationTable.c b/agent/mibgroup/disman/event/mteEventNotificationTable.c index 7d2c94a..8747736 100644 --- a/agent/mibgroup/disman/event/mteEventNotificationTable.c +++ b/agent/mibgroup/disman/event/mteEventNotificationTable.c @@ -13,10 +13,10 @@ #include "disman/event/mteEvent.h" #include "disman/event/mteEventNotificationTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_oid) +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_oid); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/event/mteEventSetTable.c b/agent/mibgroup/disman/event/mteEventSetTable.c index ee696f1..fd0d713 100644 --- a/agent/mibgroup/disman/event/mteEventSetTable.c +++ b/agent/mibgroup/disman/event/mteEventSetTable.c @@ -13,11 +13,11 @@ #include "disman/event/mteEvent.h" #include "disman/event/mteEventSetTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_oid) -netsnmp_feature_require(check_vb_truthvalue) +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_oid); +netsnmp_feature_require(check_vb_truthvalue); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/event/mteEventTable.c b/agent/mibgroup/disman/event/mteEventTable.c index c5b534e..e6ef001 100644 --- a/agent/mibgroup/disman/event/mteEventTable.c +++ b/agent/mibgroup/disman/event/mteEventTable.c @@ -14,14 +14,14 @@ #include "disman/event/mteEvent.h" #include "disman/event/mteEventTable.h" -netsnmp_feature_require(iquery) -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(iquery); +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(iquery_pdu_session) -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(mteevent_removeentry) -netsnmp_feature_require(check_vb_truthvalue) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(iquery_pdu_session); +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(mteevent_removeentry); +netsnmp_feature_require(check_vb_truthvalue); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/event/mteObjects.c b/agent/mibgroup/disman/event/mteObjects.c index cf950c1..42d7343 100644 --- a/agent/mibgroup/disman/event/mteObjects.c +++ b/agent/mibgroup/disman/event/mteObjects.c @@ -311,7 +311,7 @@ mteObjects_vblist( netsnmp_variable_list *vblist, while (row && !netsnmp_tdata_compare_subtree_idx( row, &owner_var )) { entry = (struct mteObject *)netsnmp_tdata_row_entry(row); - memset(name, 0, MAX_OID_LEN); + memset(name, 0, sizeof(name)); memcpy(name, entry->mteObjectID, entry->mteObjectID_len*sizeof(oid)); name_len = entry->mteObjectID_len; diff --git a/agent/mibgroup/disman/event/mteObjectsTable.c b/agent/mibgroup/disman/event/mteObjectsTable.c index f7f6e02..40d4708 100644 --- a/agent/mibgroup/disman/event/mteObjectsTable.c +++ b/agent/mibgroup/disman/event/mteObjectsTable.c @@ -13,11 +13,11 @@ #include "disman/event/mteObjects.h" #include "disman/event/mteObjectsTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_oid) -netsnmp_feature_require(check_vb_truthvalue) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(check_vb_oid); +netsnmp_feature_require(check_vb_truthvalue); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/event/mteScalars.c b/agent/mibgroup/disman/event/mteScalars.c index 769adc1..9fe3aa8 100644 --- a/agent/mibgroup/disman/event/mteScalars.c +++ b/agent/mibgroup/disman/event/mteScalars.c @@ -106,9 +106,7 @@ handle_mteTriggerFailures(netsnmp_mib_handler *handler, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { -#ifdef USING_DISMAN_EVENT_MTETRIGGER_MODULE - extern long mteTriggerFailures; -#else +#ifndef USING_DISMAN_EVENT_MTETRIGGER_MODULE long mteTriggerFailures = 0; #endif diff --git a/agent/mibgroup/disman/event/mteTrigger.c b/agent/mibgroup/disman/event/mteTrigger.c index 5a0dcba..e9a8831 100644 --- a/agent/mibgroup/disman/event/mteTrigger.c +++ b/agent/mibgroup/disman/event/mteTrigger.c @@ -7,12 +7,13 @@ #include #include #include +#include "agent_global_vars.h" #include "disman/event/mteTrigger.h" #include "disman/event/mteEvent.h" -netsnmp_feature_child_of(disman_debugging, libnetsnmpmibs) -netsnmp_feature_child_of(mtetrigger, libnetsnmpmibs) -netsnmp_feature_child_of(mtetrigger_removeentry, mtetrigger) +netsnmp_feature_child_of(disman_debugging, libnetsnmpmibs); +netsnmp_feature_child_of(mtetrigger, libnetsnmpmibs); +netsnmp_feature_child_of(mtetrigger_removeentry, mtetrigger); netsnmp_tdata *trigger_table_data; @@ -219,7 +220,6 @@ mteTrigger_run( unsigned int reg, void *clientarg) } { - extern netsnmp_agent_session *netsnmp_processing_set; if (netsnmp_processing_set) { /* * netsnmp_handle_request will not be responsive to our efforts to @@ -429,7 +429,7 @@ mteTrigger_run( unsigned int reg, void *clientarg) DEBUGMSGOID(("disman:event:trigger:fire", vp1->name, vp1->name_length)); DEBUGMSG(( "disman:event:trigger:fire", - " (present)\n"));; + " (present)\n")); entry->mteTriggerXOwner = entry->mteTExObjOwner; entry->mteTriggerXObjects = entry->mteTExObjects; entry->mteTriggerFired = vp1; @@ -451,7 +451,7 @@ mteTrigger_run( unsigned int reg, void *clientarg) DEBUGMSGOID(("disman:event:trigger:fire", var->name, var->name_length)); DEBUGMSG(( "disman:event:trigger:fire", - " (absent)\n"));; + " (absent)\n")); entry->mteTriggerXOwner = entry->mteTExObjOwner; entry->mteTriggerXObjects = entry->mteTExObjects; /* @@ -530,7 +530,7 @@ mteTrigger_run( unsigned int reg, void *clientarg) DEBUGMSGOID(("disman:event:trigger:fire", vp1->name, vp1->name_length)); DEBUGMSG(( "disman:event:trigger:fire", - " %s\n", reason));; + " %s\n", reason)); entry->mteTriggerXOwner = entry->mteTExObjOwner; entry->mteTriggerXObjects = entry->mteTExObjects; n = entry->mteTriggerValueID_len; @@ -585,7 +585,7 @@ mteTrigger_run( unsigned int reg, void *clientarg) DEBUGMSGOID(("disman:event:trigger:fire", var->name, var->name_length)); DEBUGMSG(( "disman:event:trigger:fire", - " (boolean/threshold) %d\n", var->type));; + " (boolean/threshold) %d\n", var->type)); snmp_free_varbind( entry->old_results ); entry->old_results = var; return; diff --git a/agent/mibgroup/disman/event/mteTrigger.h b/agent/mibgroup/disman/event/mteTrigger.h index 19626b1..f4f6b89 100644 --- a/agent/mibgroup/disman/event/mteTrigger.h +++ b/agent/mibgroup/disman/event/mteTrigger.h @@ -184,6 +184,7 @@ struct mteTrigger { * Container structure for the (combined) mteTrigger*Tables, * and routine to create this. */ +extern long mteTriggerFailures; extern netsnmp_tdata *trigger_table_data; extern void init_trigger_table_data(void); diff --git a/agent/mibgroup/disman/event/mteTriggerBooleanTable.c b/agent/mibgroup/disman/event/mteTriggerBooleanTable.c index ed1ec30..e6089e8 100644 --- a/agent/mibgroup/disman/event/mteTriggerBooleanTable.c +++ b/agent/mibgroup/disman/event/mteTriggerBooleanTable.c @@ -13,10 +13,10 @@ #include "disman/event/mteTrigger.h" #include "disman/event/mteTriggerBooleanTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_truthvalue) +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_truthvalue); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/event/mteTriggerConf.c b/agent/mibgroup/disman/event/mteTriggerConf.c index e7bb69b..ff710c6 100644 --- a/agent/mibgroup/disman/event/mteTriggerConf.c +++ b/agent/mibgroup/disman/event/mteTriggerConf.c @@ -15,7 +15,7 @@ #include -netsnmp_feature_require(iquery) +netsnmp_feature_require(iquery); /** Initializes the mteTriggerConf module */ void @@ -507,13 +507,12 @@ parse_mteMonitor(const char *token, const char *line) memcpy(oid_name_buf, buf, SPRINT_MAX_LEN); memset( buf, 0, SPRINT_MAX_LEN); cp = copy_nword_const(cp, buf, SPRINT_MAX_LEN); - value = strtol(buf, NULL, 0); + value = strtol(buf, NULL, 0); /* * ... then save the rest of the line for later. */ - memset( buf, 0, strlen(buf)); - memcpy( buf, cp, strlen(cp)); + strlcpy(buf, cp, sizeof(buf)); cp = NULL; /* To terminate the processing loop */ DEBUGMSGTL(("disman:event:conf", "%s: Thresh (%s, %ld, %s)\n", tname, oid_name_buf, value, buf)); diff --git a/agent/mibgroup/disman/event/mteTriggerConf.h b/agent/mibgroup/disman/event/mteTriggerConf.h index bfbcfcb..da7ac89 100644 --- a/agent/mibgroup/disman/event/mteTriggerConf.h +++ b/agent/mibgroup/disman/event/mteTriggerConf.h @@ -1,7 +1,7 @@ #ifndef MTETRIGGERCONF_H #define MTETRIGGERCONF_H -config_require(utilities/iquery) +config_require(utilities/iquery); /* * function declarations diff --git a/agent/mibgroup/disman/event/mteTriggerDeltaTable.c b/agent/mibgroup/disman/event/mteTriggerDeltaTable.c index c2c2e8e..7219da5 100644 --- a/agent/mibgroup/disman/event/mteTriggerDeltaTable.c +++ b/agent/mibgroup/disman/event/mteTriggerDeltaTable.c @@ -13,10 +13,10 @@ #include "disman/event/mteTrigger.h" #include "disman/event/mteTriggerDeltaTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_oid) -netsnmp_feature_require(check_vb_truthvalue) +netsnmp_feature_require(check_vb_oid); +netsnmp_feature_require(check_vb_truthvalue); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /** Initializes the mteTriggerDeltaTable module */ @@ -63,8 +63,11 @@ init_mteTriggerDeltaTable(void) /* Register this using the (common) trigger_table_data container */ rc = netsnmp_tdata_register(reg, trigger_table_data, table_info); - if (rc != SNMPERR_SUCCESS) + if (rc != SNMPERR_SUCCESS) { + snmp_log(LOG_ERR, "%s: netsnmp_tdata_register() returned %d\n", + __func__, rc); return; + } netsnmp_handler_owns_table_info(reg->handler->next); DEBUGMSGTL(("disman:event:init", "Trigger Delta Table\n")); } diff --git a/agent/mibgroup/disman/event/mteTriggerExistenceTable.c b/agent/mibgroup/disman/event/mteTriggerExistenceTable.c index 22b683e..19885d9 100644 --- a/agent/mibgroup/disman/event/mteTriggerExistenceTable.c +++ b/agent/mibgroup/disman/event/mteTriggerExistenceTable.c @@ -13,9 +13,9 @@ #include "disman/event/mteTrigger.h" #include "disman/event/mteTriggerExistenceTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) +netsnmp_feature_require(check_vb_type_and_max_size); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; @@ -63,9 +63,11 @@ init_mteTriggerExistenceTable(void) /* Register this using the (common) trigger_table_data container */ rc = netsnmp_tdata_register(reg, trigger_table_data, table_info); - if (rc != SNMPERR_SUCCESS) + if (rc != SNMPERR_SUCCESS) { + snmp_log(LOG_ERR, "%s: netsnmp_tdata_register() returned %d\n", + __func__, rc); return; - + } netsnmp_handler_owns_table_info(reg->handler->next); DEBUGMSGTL(("disman:event:init", "Trigger Exist Table\n")); } diff --git a/agent/mibgroup/disman/event/mteTriggerTable.c b/agent/mibgroup/disman/event/mteTriggerTable.c index 88c2f8b..095f361 100644 --- a/agent/mibgroup/disman/event/mteTriggerTable.c +++ b/agent/mibgroup/disman/event/mteTriggerTable.c @@ -15,16 +15,16 @@ #include "disman/event/mteTrigger.h" #include "disman/event/mteTriggerTable.h" -netsnmp_feature_require(iquery) -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(iquery); +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(iquery_pdu_session) -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_oid) -netsnmp_feature_require(check_vb_uint) -netsnmp_feature_require(mtetrigger_removeentry) -netsnmp_feature_require(check_vb_truthvalue) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(iquery_pdu_session); +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_oid); +netsnmp_feature_require(check_vb_uint); +netsnmp_feature_require(mtetrigger_removeentry); +netsnmp_feature_require(check_vb_truthvalue); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/event/mteTriggerTable.h b/agent/mibgroup/disman/event/mteTriggerTable.h index c5c393a..6cab9ae 100644 --- a/agent/mibgroup/disman/event/mteTriggerTable.h +++ b/agent/mibgroup/disman/event/mteTriggerTable.h @@ -5,7 +5,7 @@ #ifndef MTETRIGGERTABLE_H #define MTETRIGGERTABLE_H -config_require(utilities/iquery) +config_require(utilities/iquery); /* * function declarations diff --git a/agent/mibgroup/disman/event/mteTriggerThresholdTable.c b/agent/mibgroup/disman/event/mteTriggerThresholdTable.c index 5aed0c8..f4ed7f1 100644 --- a/agent/mibgroup/disman/event/mteTriggerThresholdTable.c +++ b/agent/mibgroup/disman/event/mteTriggerThresholdTable.c @@ -13,9 +13,9 @@ #include "disman/event/mteTrigger.h" #include "disman/event/mteTriggerThresholdTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) +netsnmp_feature_require(check_vb_type_and_max_size); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/expr/expErrorTable.c b/agent/mibgroup/disman/expr/expErrorTable.c index a759e2d..36ee126 100644 --- a/agent/mibgroup/disman/expr/expErrorTable.c +++ b/agent/mibgroup/disman/expr/expErrorTable.c @@ -13,7 +13,12 @@ #include "disman/expr/expExpression.h" #include "disman/expr/expErrorTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); + +static Netsnmp_Node_Handler expErrorTable_handler; + +static netsnmp_handler_registration *error_table_reg; +static netsnmp_table_registration_info *error_table_info; /* Initializes the expExpressionErrorTable module */ void @@ -21,8 +26,6 @@ init_expErrorTable(void) { static oid expErrorTable_oid[] = { 1, 3, 6, 1, 2, 1, 90, 1, 2, 2 }; size_t expErrorTable_oid_len = OID_LENGTH(expErrorTable_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *table_info; /* * Ensure the expression table container is available... @@ -32,29 +35,33 @@ init_expErrorTable(void) /* * ... then set up the MIB interface to the expExpressionErrorTable slice */ - reg = netsnmp_create_handler_registration("expErrorTable", + error_table_reg = netsnmp_create_handler_registration("expErrorTable", expErrorTable_handler, expErrorTable_oid, expErrorTable_oid_len, HANDLER_CAN_RWRITE); - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - netsnmp_table_helper_add_indexes(table_info, + error_table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + netsnmp_table_helper_add_indexes(error_table_info, /* index: expExpressionOwner */ ASN_OCTET_STR, /* index: expExpressionName */ ASN_OCTET_STR, 0); - table_info->min_column = COLUMN_EXPERRORTIME; - table_info->max_column = COLUMN_EXPERRORINSTANCE; + error_table_info->min_column = COLUMN_EXPERRORTIME; + error_table_info->max_column = COLUMN_EXPERRORINSTANCE; /* Register this using the (common) expr_table_data container */ - netsnmp_tdata_register(reg, expr_table_data, table_info); + netsnmp_tdata_register(error_table_reg, expr_table_data, error_table_info); DEBUGMSGTL(("disman:expr:init", "Expression Error Table container (%p)\n", expr_table_data)); } +void +shutdown_expErrorTable(void) +{ +} /** handles requests for the expExpressionErrorTable table */ int diff --git a/agent/mibgroup/disman/expr/expErrorTable.h b/agent/mibgroup/disman/expr/expErrorTable.h index 1d8339e..920b286 100644 --- a/agent/mibgroup/disman/expr/expErrorTable.h +++ b/agent/mibgroup/disman/expr/expErrorTable.h @@ -9,7 +9,7 @@ * function declarations */ void init_expErrorTable(void); -Netsnmp_Node_Handler expErrorTable_handler; +void shutdown_expErrorTable(void); /* * column number definitions for table expExpressionErrorTable diff --git a/agent/mibgroup/disman/expr/expExpression.c b/agent/mibgroup/disman/expr/expExpression.c index c924141..7502e3f 100644 --- a/agent/mibgroup/disman/expr/expExpression.c +++ b/agent/mibgroup/disman/expr/expExpression.c @@ -304,7 +304,7 @@ expExpression_getData( unsigned int reg, void *clientarg ) void expExpression_enable( struct expExpression *entry ) { - DEBUGMSG(("disman:expr:run", "Enabling %s\n", entry->expName)); + DEBUGMSGTL(("disman:expr:run", "Enabling %s\n", entry->expName)); if (!entry) return; diff --git a/agent/mibgroup/disman/expr/expExpressionConf.c b/agent/mibgroup/disman/expr/expExpressionConf.c index 826d679..a1e813b 100644 --- a/agent/mibgroup/disman/expr/expExpressionConf.c +++ b/agent/mibgroup/disman/expr/expExpressionConf.c @@ -15,7 +15,7 @@ #include "disman/expr/expObject.h" #include "disman/expr/expExpressionConf.h" -netsnmp_feature_require(iquery) +netsnmp_feature_require(iquery); /* Initializes the expExpressionConf module */ void diff --git a/agent/mibgroup/disman/expr/expExpressionTable.c b/agent/mibgroup/disman/expr/expExpressionTable.c index 79aa715..49cd380 100644 --- a/agent/mibgroup/disman/expr/expExpressionTable.c +++ b/agent/mibgroup/disman/expr/expExpressionTable.c @@ -14,22 +14,25 @@ #include "disman/expr/expExpression.h" #include "disman/expr/expExpressionTable.h" -netsnmp_feature_require(iquery) -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(iquery); +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(table_tdata_insert_row) -netsnmp_feature_require(iquery_pdu_session) +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(table_tdata_insert_row); +netsnmp_feature_require(iquery_pdu_session); #endif /* NETSNMP_NO_WRITE_SUPPORT */ +static Netsnmp_Node_Handler expExpressionTable_handler; + +static netsnmp_handler_registration *expr_table_reg; +static netsnmp_table_registration_info *expr_table_info; + /* Initializes the expExpressionTable module */ void init_expExpressionTable(void) { static oid expExpressionTable_oid[] = { 1, 3, 6, 1, 2, 1, 90, 1, 2, 1 }; size_t expExpressionTable_oid_len = OID_LENGTH(expExpressionTable_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *table_info; /* * Ensure the expression table container is available... @@ -39,29 +42,35 @@ init_expExpressionTable(void) /* * ... then set up the MIB interface to the expExpressionTable slice */ - reg = netsnmp_create_handler_registration("expExpressionTable", + expr_table_reg = netsnmp_create_handler_registration("expExpressionTable", expExpressionTable_handler, expExpressionTable_oid, expExpressionTable_oid_len, HANDLER_CAN_RWRITE); - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - netsnmp_table_helper_add_indexes(table_info, + expr_table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + netsnmp_table_helper_add_indexes(expr_table_info, /* index: expExpressionOwner */ ASN_OCTET_STR, /* index: expExpressionName */ ASN_OCTET_STR, 0); - table_info->min_column = COLUMN_EXPEXPRESSION; - table_info->max_column = COLUMN_EXPEXPRESSIONENTRYSTATUS; + expr_table_info->min_column = COLUMN_EXPEXPRESSION; + expr_table_info->max_column = COLUMN_EXPEXPRESSIONENTRYSTATUS; /* Register this using the (common) expr_table_data container */ - netsnmp_tdata_register(reg, expr_table_data, table_info); + netsnmp_tdata_register(expr_table_reg, expr_table_data, expr_table_info); DEBUGMSGTL(("disman:expr:init", "Expression Table container (%p)\n", expr_table_data)); } +void +shutdown_expExpressionTable(void) +{ + netsnmp_tdata_unregister(expr_table_reg); + netsnmp_table_registration_info_free(expr_table_info); +} /** handles requests for the expExpressionTable table */ int @@ -279,7 +288,8 @@ expExpressionTable_handler(netsnmp_mib_handler *handler, tinfo = netsnmp_extract_table_info(request); entry = (struct expExpression *) netsnmp_tdata_extract_entry(request); - if (!entry) { + if (!entry && tinfo->colnum != COLUMN_EXPEXPRESSIONENTRYSTATUS && + *request->requestvb->val.integer != RS_DESTROY) { /* * New rows must be created via the RowStatus column */ diff --git a/agent/mibgroup/disman/expr/expExpressionTable.h b/agent/mibgroup/disman/expr/expExpressionTable.h index a32d8f5..68e5076 100644 --- a/agent/mibgroup/disman/expr/expExpressionTable.h +++ b/agent/mibgroup/disman/expr/expExpressionTable.h @@ -9,7 +9,7 @@ * function declarations */ void init_expExpressionTable(void); -Netsnmp_Node_Handler expExpressionTable_handler; +void shutdown_expExpressionTable(void); /* * column number definitions for table expExpressionTable diff --git a/agent/mibgroup/disman/expr/expObjectConf.c b/agent/mibgroup/disman/expr/expObjectConf.c index 64069d9..2ed8f71 100644 --- a/agent/mibgroup/disman/expr/expObjectConf.c +++ b/agent/mibgroup/disman/expr/expObjectConf.c @@ -11,7 +11,7 @@ #include "disman/expr/expObject.h" #include "disman/expr/expObjectConf.h" -netsnmp_feature_require(iquery) +netsnmp_feature_require(iquery); /* Initializes the expObjectConf module */ void diff --git a/agent/mibgroup/disman/expr/expObjectTable.c b/agent/mibgroup/disman/expr/expObjectTable.c index adda438..27d09f3 100644 --- a/agent/mibgroup/disman/expr/expObjectTable.c +++ b/agent/mibgroup/disman/expr/expObjectTable.c @@ -13,21 +13,22 @@ #include "disman/expr/expObject.h" #include "disman/expr/expObjectTable.h" -netsnmp_feature_require(table_tdata) +netsnmp_feature_require(table_tdata); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_oid) -netsnmp_feature_require(check_vb_truthvalue) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(check_vb_oid); +netsnmp_feature_require(check_vb_truthvalue); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ +static netsnmp_handler_registration *object_table_reg; +static netsnmp_table_registration_info *object_table_info; + /* Initializes the expObjectTable module */ void init_expObjectTable(void) { static oid expObjectTable_oid[] = { 1, 3, 6, 1, 2, 1, 90, 1, 2, 3 }; size_t expObjectTable_oid_len = OID_LENGTH(expObjectTable_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *table_info; /* * Ensure the expObject table container is available... @@ -37,14 +38,14 @@ init_expObjectTable(void) /* * ... then set up the MIB interface to the expObjectTable */ - reg = netsnmp_create_handler_registration("expObjectTable", + object_table_reg = netsnmp_create_handler_registration("expObjectTable", expObjectTable_handler, expObjectTable_oid, expObjectTable_oid_len, HANDLER_CAN_RWRITE); - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - netsnmp_table_helper_add_indexes(table_info, + object_table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + netsnmp_table_helper_add_indexes(object_table_info, /* index: expExpressionOwner */ ASN_OCTET_STR, /* index: expExpressionName */ @@ -53,15 +54,21 @@ init_expObjectTable(void) ASN_UNSIGNED, 0); - table_info->min_column = COLUMN_EXPOBJECTID; - table_info->max_column = COLUMN_EXPOBJECTENTRYSTATUS; + object_table_info->min_column = COLUMN_EXPOBJECTID; + object_table_info->max_column = COLUMN_EXPOBJECTENTRYSTATUS; /* Register this using the common expObject_table_data container */ - netsnmp_tdata_register(reg, expObject_table_data, table_info); + netsnmp_tdata_register(object_table_reg, expObject_table_data, object_table_info); DEBUGMSGTL(("disman:expr:init", "Expression Object Table container (%p)\n", expObject_table_data)); } +void +shutdown_expObjectTable(void) +{ + netsnmp_tdata_unregister(object_table_reg); + netsnmp_table_registration_info_free(object_table_info); +} /** handles requests for the expObjectTable table */ int @@ -288,7 +295,8 @@ expObjectTable_handler(netsnmp_mib_handler *handler, tinfo = netsnmp_extract_table_info(request); entry = (struct expObject *) netsnmp_tdata_extract_entry(request); - if (!entry) { + if (!entry && tinfo->colnum != COLUMN_EXPOBJECTENTRYSTATUS && + *request->requestvb->val.integer != RS_DESTROY) { /* * New rows must be created via the RowStatus column */ @@ -322,7 +330,7 @@ expObjectTable_handler(netsnmp_mib_handler *handler, memset(entry->expObjectID, 0, sizeof(entry->expObjectID)); memcpy(entry->expObjectID, request->requestvb->val.string, request->requestvb->val_len); - entry->expObjectID_len = request->requestvb->val_len; + entry->expObjectID_len = request->requestvb->val_len/sizeof(oid); break; case COLUMN_EXPOBJECTIDWILDCARD: if (*request->requestvb->val.integer == TV_TRUE) @@ -371,7 +379,7 @@ expObjectTable_handler(netsnmp_mib_handler *handler, ret = 1; /* Set the prefix later */ entry->flags |= EXP_OBJ_FLAG_DWILD; } else { - if ( entry->flags | EXP_OBJ_FLAG_PREFIX ) { + if ( entry->flags & EXP_OBJ_FLAG_PREFIX ) { exp = expExpression_getEntry( entry->expOwner, entry->expName ); memset( exp->expPrefix, 0, MAX_OID_LEN*sizeof(oid)); diff --git a/agent/mibgroup/disman/expr/expObjectTable.h b/agent/mibgroup/disman/expr/expObjectTable.h index 568f67a..855a3b0 100644 --- a/agent/mibgroup/disman/expr/expObjectTable.h +++ b/agent/mibgroup/disman/expr/expObjectTable.h @@ -9,6 +9,7 @@ * function declarations */ void init_expObjectTable(void); +void shutdown_expObjectTable(void); Netsnmp_Node_Handler expObjectTable_handler; /* diff --git a/agent/mibgroup/disman/expr/expValue.c b/agent/mibgroup/disman/expr/expValue.c index eeff402..11fcd83 100644 --- a/agent/mibgroup/disman/expr/expValue.c +++ b/agent/mibgroup/disman/expr/expValue.c @@ -3,6 +3,10 @@ * Core implementation of expression evaluation */ +#ifdef HAVE_INTTYPES_H +#include +#endif + #include #include #include @@ -242,6 +246,9 @@ _expValue_evalOperator(netsnmp_variable_list *left, netsnmp_variable_list *right) { int n; + if (left->val.integer == NULL || right->val.integer == NULL) { + return right; + } switch( *op->val.integer ) { case EXP_OPERATOR_ADD: n = *left->val.integer + *right->val.integer; break; @@ -354,6 +361,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, /* Note position of failure in expression */ var->data = (void *)(cp1 - exprRaw); snmp_free_var(exprAlDente); + *exprEnd = cp1; return var; } else { if (vtail) @@ -372,7 +380,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, suffix, suffix_len ); if ( var && var->type == ASN_NULL ) { /* Adjust position of failure */ - var->data = (void *)(cp1 - exprRaw + (int)var->data); + var->data = (void *)(cp1 - exprRaw + (uintptr_t)var->data); return var; } else if (*cp2 != ')') { snmp_free_var(exprAlDente); @@ -381,6 +389,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, EXPERRCODE_PARENTHESIS ); var->type = ASN_NULL; var->data = (void *)(cp2 - exprRaw); + *exprEnd = cp1; return var; } else { if (vtail) @@ -401,7 +410,6 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, */ *exprEnd = cp1; var = _expValue_evalExpr2( exprAlDente ); - snmp_free_var(exprAlDente); return var; /* === Constants === */ @@ -501,6 +509,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, EXPERRCODE_SYNTAX ); var->type = ASN_NULL; var->data = (void *)(cp1 - exprRaw); + *exprEnd = cp1; return var; } n = ops[ *cp1 & 0xFF ]; @@ -531,6 +540,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, EXPERRCODE_SYNTAX ); var->type = ASN_NULL; var->data = (void *)(cp1 - exprRaw); + *exprEnd = cp1; return var; } if ( *(cp1+1) == '=' ) @@ -574,6 +584,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, EXPERRCODE_FUNCTION ); var->type = ASN_NULL; var->data = (void *)(cp1 - exprRaw); + *exprEnd = cp1; return var; } else if (!isspace( *cp1 & 0xFF )) { @@ -585,6 +596,7 @@ _expValue_evalExpr( netsnmp_variable_list *expIdx, EXPERRCODE_OPERATOR ); var->type = ASN_NULL; var->data = (void *)(cp1 - exprRaw); + *exprEnd = cp1; return var; } cp1++; @@ -722,13 +734,19 @@ expValue_evaluateExpression( struct expExpression *exp, char exprRaw[ EXP_STR3_LEN+1 ]; netsnmp_variable_list *var; netsnmp_variable_list owner_var, name_var, param_var; - long n; + int n; char *cp; if (!exp) return NULL; /* + * Gather data for evaluating expressions with no regular delta-value + * sampling, i.e. expressions with sampling/delta interval of 0 + */ + expExpression_getData(0, exp); + + /* * Set up a varbind list containing the various index values * (including a placeholder for expObjectIndex). * @@ -743,7 +761,7 @@ expValue_evaluateExpression( struct expExpression *exp, (u_char*)exp->expName, strlen(exp->expName)); n = 99; /* dummy value */ snmp_set_var_typed_value( ¶m_var, ASN_INTEGER, - (u_char*)&n, sizeof(long)); + (u_char*)&n, sizeof(n)); owner_var.next_variable = &name_var; name_var.next_variable = ¶m_var; @@ -762,7 +780,7 @@ expValue_evaluateExpression( struct expExpression *exp, * When we had finished, there was a lot * of bricks^Wcharacters left over.... */ - _expValue_setError( exp, EXPERRCODE_SYNTAX, suffix, suffix_len, NULL ); + _expValue_setError( exp, EXPERRCODE_SYNTAX, suffix, suffix_len, var ); return NULL; } if (!var) { @@ -799,10 +817,11 @@ _expValue_setError( struct expExpression *exp, int reason, return; exp->expErrorCount++; /* exp->expErrorTime = NOW; */ - exp->expErrorIndex = ( var && var->data ? (int)var->data : 0 ); + exp->expErrorIndex = ( var && var->data ? (uintptr_t)var->data : 0 ); exp->expErrorCode = reason; memset( exp->expErrorInstance, 0, sizeof(exp->expErrorInstance)); memcpy( exp->expErrorInstance, suffix, suffix_len * sizeof(oid)); exp->expErrorInst_len = suffix_len; + if (var) var->data = NULL; snmp_free_var( var ); } diff --git a/agent/mibgroup/disman/expr/expValueTable.c b/agent/mibgroup/disman/expr/expValueTable.c index d74dbd1..f5db2fc 100644 --- a/agent/mibgroup/disman/expr/expValueTable.c +++ b/agent/mibgroup/disman/expr/expValueTable.c @@ -12,37 +12,45 @@ #include "expValue.h" #include "expValueTable.h" +static Netsnmp_Node_Handler expValueTable_handler; +static netsnmp_handler_registration *value_table_reg; +static netsnmp_table_registration_info *value_table_info; + /** Initializes the expValueTable module */ void init_expValueTable(void) { static oid expValueTable_oid[] = { 1, 3, 6, 1, 2, 1, 90, 1, 3, 1 }; size_t expValueTable_oid_len = OID_LENGTH(expValueTable_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *table_info; - reg = + value_table_reg = netsnmp_create_handler_registration("expValueTable", expValueTable_handler, expValueTable_oid, expValueTable_oid_len, HANDLER_CAN_RONLY); - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - netsnmp_table_helper_add_indexes(table_info, + value_table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + netsnmp_table_helper_add_indexes(value_table_info, ASN_OCTET_STR, /* expExpressionOwner */ ASN_OCTET_STR, /* expExpressionName */ /* expValueInstance */ ASN_PRIV_IMPLIED_OBJECT_ID, 0); - table_info->min_column = COLUMN_EXPVALUECOUNTER32VAL; - table_info->max_column = COLUMN_EXPVALUECOUNTER64VAL; + value_table_info->min_column = COLUMN_EXPVALUECOUNTER32VAL; + value_table_info->max_column = COLUMN_EXPVALUECOUNTER64VAL; - netsnmp_register_table(reg, table_info); + netsnmp_register_table(value_table_reg, value_table_info); DEBUGMSGTL(("disman:expr:init", "Expression Value Table\n")); } +void +shutdown_expValueTable(void) +{ + netsnmp_tdata_unregister(value_table_reg); + netsnmp_table_registration_info_free(value_table_info); +} netsnmp_variable_list * expValueTable_getEntry(netsnmp_variable_list * indexes, @@ -320,6 +328,8 @@ expValueTable_handler(netsnmp_mib_handler *handler, (u_char *)value->val.counter64, value->val_len); break; } + /* remember to free the variable list, or we will leak here.. */ + snmp_free_varbind(value); } break; diff --git a/agent/mibgroup/disman/expr/expValueTable.h b/agent/mibgroup/disman/expr/expValueTable.h index 15f3202..1f20e0d 100644 --- a/agent/mibgroup/disman/expr/expValueTable.h +++ b/agent/mibgroup/disman/expr/expValueTable.h @@ -5,8 +5,7 @@ * function declarations */ void init_expValueTable(void); -Netsnmp_Node_Handler expValueTable_handler; -netsnmp_variable_list *expValue_getVal(netsnmp_variable_list *, int); +void shutdown_expValueTable(void); /* * column number definitions for table expValueTable diff --git a/agent/mibgroup/disman/expression-mib.h b/agent/mibgroup/disman/expression-mib.h index 18db2af..e32f3b8 100644 --- a/agent/mibgroup/disman/expression-mib.h +++ b/agent/mibgroup/disman/expression-mib.h @@ -14,8 +14,8 @@ /* * wrapper for the disman expression mib code files */ -config_require(disman/expression/expExpressionTable) -config_require(disman/expression/expErrorTable) -config_require(disman/expression/expObjectTable) -config_require(disman/expression/expValueTable) -config_add_mib(DISMAN-EXPRESSION-MIB) +config_require(disman/expression/expExpressionTable); +config_require(disman/expression/expErrorTable); +config_require(disman/expression/expObjectTable); +config_require(disman/expression/expValueTable); +config_add_mib(DISMAN-EXPRESSION-MIB); diff --git a/agent/mibgroup/disman/expression.h b/agent/mibgroup/disman/expression.h index 82f7cc0..503972a 100644 --- a/agent/mibgroup/disman/expression.h +++ b/agent/mibgroup/disman/expression.h @@ -1,13 +1,13 @@ /* * wrapper for the disman expression mib code files */ -config_require(disman/expr/expScalars) -config_require(disman/expr/expExpression) -config_require(disman/expr/expExpressionTable) -config_require(disman/expr/expErrorTable) -config_require(disman/expr/expExpressionConf) -config_require(disman/expr/expObject) -config_require(disman/expr/expObjectTable) -config_require(disman/expr/expObjectConf) -config_require(disman/expr/expValue) -config_require(disman/expr/expValueTable) +config_require(disman/expr/expScalars); +config_require(disman/expr/expExpression); +config_require(disman/expr/expExpressionTable); +config_require(disman/expr/expErrorTable); +config_require(disman/expr/expExpressionConf); +config_require(disman/expr/expObject); +config_require(disman/expr/expObjectTable); +config_require(disman/expr/expObjectConf); +config_require(disman/expr/expValue); +config_require(disman/expr/expValueTable); diff --git a/agent/mibgroup/disman/expression/expErrorTable.c b/agent/mibgroup/disman/expression/expErrorTable.c index 1feb3ee..0231d64 100644 --- a/agent/mibgroup/disman/expression/expErrorTable.c +++ b/agent/mibgroup/disman/expression/expErrorTable.c @@ -22,10 +22,10 @@ * This should always be included first before anything else */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -79,9 +79,6 @@ struct variable2 expErrorTable_variables[] = { var_expErrorTable, 2, {1, 4}} }; -extern struct header_complex_index *expExpressionTableStorage; - - void init_expErrorTable(void) { diff --git a/agent/mibgroup/disman/expression/expErrorTable.h b/agent/mibgroup/disman/expression/expErrorTable.h index 5399159..99ba3c3 100644 --- a/agent/mibgroup/disman/expression/expErrorTable.h +++ b/agent/mibgroup/disman/expression/expErrorTable.h @@ -26,7 +26,7 @@ /* * we may use header_complex from the header_complex module */ -config_require(header_complex) +config_require(header_complex); struct expErrorTable_data { diff --git a/agent/mibgroup/disman/expression/expExpressionTable.c b/agent/mibgroup/disman/expression/expExpressionTable.c index 212952d..b7dde9c 100644 --- a/agent/mibgroup/disman/expression/expExpressionTable.c +++ b/agent/mibgroup/disman/expression/expExpressionTable.c @@ -22,10 +22,10 @@ */ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -46,9 +46,9 @@ #include "expObjectTable.h" #include "expValueTable.h" -netsnmp_feature_require(tdomain_support) +netsnmp_feature_require(tdomain_support); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -97,8 +97,6 @@ struct variable2 expExpressionTable_variables[] = { */ struct header_complex_index *expExpressionTableStorage = NULL; -extern struct header_complex_index *expObjectTableStorage; -extern struct header_complex_index *expValueTableStorage; oid mmTimeInstance[] = { 1, 3, 6, 1, 2, 1, 1, 3, 0 }; @@ -563,7 +561,10 @@ write_expExpression(int action, */ tmpvar = StorageTmp->expExpression; tmplen = StorageTmp->expExpressionLen; - StorageTmp->expExpression = netsnmp_memdup(var_val, var_val_len); + StorageTmp->expExpression = malloc(var_val_len + 1); + if (StorageTmp->expExpression) + snprintf(StorageTmp->expExpression, var_val_len + 1, "%.*s", + (int)var_val_len, var_val); StorageTmp->expExpressionLen = var_val_len; break; @@ -1029,7 +1030,7 @@ write_expExpressionEntryStatus(int action, */ - if (StorageTmp == NULL) { + if (StorageTmp == NULL && set_value != RS_DESTROY) { /* * row creation, so add it */ @@ -1038,7 +1039,7 @@ write_expExpressionEntryStatus(int action, /* * XXX: ack, and if it is NULL? */ - } else if (set_value != RS_DESTROY) { + } else if (StorageTmp && set_value != RS_DESTROY) { /* * set the flag? */ diff --git a/agent/mibgroup/disman/expression/expExpressionTable.h b/agent/mibgroup/disman/expression/expExpressionTable.h index 6c139f8..da655f2 100644 --- a/agent/mibgroup/disman/expression/expExpressionTable.h +++ b/agent/mibgroup/disman/expression/expExpressionTable.h @@ -25,7 +25,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* * our storage structure(s) @@ -116,6 +116,8 @@ config_require(header_complex) #define EXP_FAILURE_DIVIDEBYZERO 11 + extern struct header_complex_index *expExpressionTableStorage; + /* * function prototypes */ diff --git a/agent/mibgroup/disman/expression/expObjectTable.c b/agent/mibgroup/disman/expression/expObjectTable.c index e057f56..d9dead8 100644 --- a/agent/mibgroup/disman/expression/expObjectTable.c +++ b/agent/mibgroup/disman/expression/expObjectTable.c @@ -23,10 +23,10 @@ */ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -36,7 +36,7 @@ #endif #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -99,12 +99,6 @@ struct variable2 expObjectTable_variables[] = { }; -/* - * global storage of our data, saved in and configured by header_complex() - */ -extern struct header_complex_index *expExpressionTableStorage; -extern struct header_complex_index *expValueTableStorage; - struct header_complex_index *expObjectTableStorage = NULL; /* @@ -1374,7 +1368,7 @@ write_expObjectEntryStatus(int action, */ - if (StorageTmp == NULL) { + if (StorageTmp == NULL && set_value != RS_DESTROY) { /* * row creation, so add it */ @@ -1383,7 +1377,7 @@ write_expObjectEntryStatus(int action, /* * XXX: ack, and if it is NULL? */ - } else if (set_value != RS_DESTROY) { + } else if (StorageTmp != NULL && set_value != RS_DESTROY) { /* * set the flag? */ diff --git a/agent/mibgroup/disman/expression/expObjectTable.h b/agent/mibgroup/disman/expression/expObjectTable.h index 86fea31..a9190f0 100644 --- a/agent/mibgroup/disman/expression/expObjectTable.h +++ b/agent/mibgroup/disman/expression/expObjectTable.h @@ -24,7 +24,7 @@ /* * we may use header_complex from the header_complex module */ -config_require(header_complex) +config_require(header_complex); struct expObjectTable_data { char *expExpressionOwner; @@ -68,6 +68,9 @@ config_require(header_complex) #define EXPOBJCETSAMPLETYPE_ABSOLUTEVALUE 1 #define EXPOBJCETSAMPLETYPE_DELTAVALUE 2 #define EXPOBJCETSAMPLETYPE_CHANGEVALUE 3 + + extern struct header_complex_index *expObjectTableStorage; + /* * function prototypes */ diff --git a/agent/mibgroup/disman/expression/expValueTable.c b/agent/mibgroup/disman/expression/expValueTable.c index 6b315c6..1228a5f 100644 --- a/agent/mibgroup/disman/expression/expValueTable.c +++ b/agent/mibgroup/disman/expression/expValueTable.c @@ -22,13 +22,14 @@ * This should always be included first before anything else */ #include -#if HAVE_STDLIB_H +#include +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -43,6 +44,7 @@ */ #include #include +#include "utilities/iquery.h" #include "header_complex.h" #include "expExpressionTable.h" #include "expValueTable.h" @@ -56,22 +58,22 @@ * variable below. */ -oid expValueTable_variables_oid[] = - { 1, 3, 6, 1, 2, 1, 90, 1, 3, 1 }; +static const oid expValueTable_variables_oid[] = { + 1, 3, 6, 1, 2, 1, 90, 1, 3, 1 +}; struct s_node { unsigned data; struct s_node *next; }; typedef struct s_node nodelink; -nodelink *operater = NULL; -nodelink *operand = NULL; +static FindVarMethod var_expValueTable; /* * variable2 expObjectTable_variables: */ -struct variable2 expValueTable_variables[] = { +static const struct variable2 expValueTable_variables[] = { /* * magic number , variable type , ro/rw , callback fn , L, oidsuffix */ @@ -102,13 +104,7 @@ struct variable2 expValueTable_variables[] = { }; -/* - * global storage of our data, saved in and configured by header_complex() - */ -extern struct header_complex_index *expExpressionTableStorage; -extern struct header_complex_index *expObjectTableStorage; -struct header_complex_index *expValueTableStorage = NULL; -struct snmp_session session; +static struct header_complex_index *expValueTableStorage = NULL; /* * init_expValueTable(): @@ -127,127 +123,328 @@ init_expValueTable(void) REGISTER_MIB("expValueTable", expValueTable_variables, variable2, expValueTable_variables_oid); - init_snmp("snmpapp"); - - /* - * Initialize a "session" that defines who we're going to talk to - */ - snmp_sess_init(&session); /* set up defaults */ - session.peername = strdup("localhost"); DEBUGMSGTL(("expValueTable", "done.\n")); } -struct expValueTable_data * -create_expValueTable_data(void) +static int +expValueTable_set(struct expExpressionTable_data *expression_data, + const char *owner, size_t owner_len, const char *name, + size_t name_len, oid *index, size_t index_len) { - struct expValueTable_data *StorageNew; + netsnmp_variable_list *vars = NULL; + struct expValueTable_data *thedata; + struct header_complex_index *hcindex; + int found = 0; + + for (hcindex = expValueTableStorage; hcindex; hcindex = hcindex->next) { + thedata = hcindex->data; + if (strcmp(thedata->expExpressionOwner, owner) == 0 && + thedata->expExpressionOwnerLen == owner_len && + strcmp(thedata->expExpressionName, name) == 0 && + thedata->expExpressionNameLen == name_len) { + found = 1; + break; + } + + } - StorageNew = SNMP_MALLOC_STRUCT(expValueTable_data); + if (found) { + if (snmp_oid_compare(thedata->expValueInstance, + thedata->expValueInstanceLen, index, + index_len) != 0) { + SNMP_FREE(thedata->expValueInstance); + thedata->expValueInstance = netsnmp_memdup(index, index_len); + thedata->expValueInstanceLen = index_len; + } else { + SNMP_FREE(index); + } + } else if ((thedata = calloc(1, sizeof(*thedata)))) { + thedata->expExpressionOwner = owner; + thedata->expExpressionOwnerLen = owner_len; + thedata->expExpressionName = name; + thedata->expExpressionNameLen = name_len; + thedata->expValueInstance = index; + thedata->expValueInstanceLen = index_len; + thedata->expression_data = expression_data; + + snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, + (const char *) thedata->expExpressionOwner, + thedata->expExpressionOwnerLen); + snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, + (const char *) thedata->expExpressionName, + thedata->expExpressionNameLen); + snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OBJECT_ID, + (u_char *) thedata->expValueInstance, + thedata->expValueInstanceLen * sizeof(oid)); - /* - * fill in default row values here into StorageNew - */ - /* - * fill in values for all tables (even if not - * appropriate), since its easier to do here than anywhere - * else - */ - StorageNew->expExpressionOwner = strdup(""); - StorageNew->expExpressionName = strdup(""); - StorageNew->expValueInstance = calloc(1, sizeof(oid) * sizeof(2)); /* 0.0.0 */ - StorageNew->expValueInstanceLen = 3; - return StorageNew; + header_complex_add_data(&expValueTableStorage, vars, thedata); + } else { + return SNMPERR_GENERR; + } + + thedata->set = 1; + + return SNMPERR_SUCCESS; } -/* - * mteTriggerTable_add(): adds a structure node to our data set - */ -int -expValueTable_add(struct expExpressionTable_data *expression_data, - char *owner, size_t owner_len, char *name, - size_t name_len, oid * index, size_t index_len) +static void push(nodelink ** stack, unsigned long value) { - netsnmp_variable_list *vars = NULL; - struct expValueTable_data *thedata, *StorageTmp; - struct header_complex_index *hcindex; - int founded = 0; - thedata = create_expValueTable_data(); - thedata->expValueCounter32Val = 0; - thedata->expExpressionOwner = owner; - thedata->expExpressionOwnerLen = owner_len; - thedata->expExpressionName = name; - thedata->expExpressionNameLen = name_len; - thedata->expValueInstance = index; - thedata->expValueInstanceLen = index_len; - thedata->expression_data = expression_data; - DEBUGMSGTL(("expValueTable", "adding data... ")); - /* - * add the index variables to the varbind list, which is - * used by header_complex to index the data - */ + nodelink *newnode; + newnode = (nodelink *) malloc(sizeof(nodelink)); + if (!newnode) { + printf("\nMemory allocation failure!"); + return; + } + newnode->data = value; + newnode->next = *stack; + *stack = newnode; +} +static unsigned long pop(nodelink **stack) +{ + unsigned long value; + nodelink *top; - snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) thedata->expExpressionOwner, thedata->expExpressionOwnerLen); /* expExpressionOwner */ - snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) thedata->expExpressionName, thedata->expExpressionNameLen); /* expExpressionName */ - snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OBJECT_ID, - (u_char *) thedata->expValueInstance, - thedata->expValueInstanceLen * sizeof(oid)); + if (!*stack) + return 0; - for (hcindex = expValueTableStorage; hcindex != NULL; - hcindex = hcindex->next) { - StorageTmp = (struct expValueTable_data *) hcindex->data; - if (!strcmp - (StorageTmp->expExpressionOwner, thedata->expExpressionOwner) - && (StorageTmp->expExpressionOwnerLen == - thedata->expExpressionOwnerLen) - && !strcmp(StorageTmp->expExpressionName, - thedata->expExpressionName) - && (StorageTmp->expExpressionNameLen == - thedata->expExpressionNameLen) - && !snmp_oid_compare(StorageTmp->expValueInstance, - StorageTmp->expValueInstanceLen, - thedata->expValueInstance, - thedata->expValueInstanceLen)) { - founded = 1; - break; - } + top = *stack; + *stack = (*stack)->next; + value = top->data; + free(top); + return value; +} +static int priority(char operator) +{ + switch (operator) { + case '*': + case '/': + return 4; + case '+': + case '-': + return 3; + case ')': + return 2; + case '(': + return 1; + default: + return 0; } - if (!founded) { - header_complex_add_data(&expValueTableStorage, vars, thedata); - DEBUGMSGTL(("expValueTable", "registered an entry\n")); - } else { - SNMP_FREE(thedata); - DEBUGMSGTL(("expValueTable", - "already have an entry, dont registe\n")); +} + +static unsigned long calculate(int operator, unsigned long a, unsigned long b) +{ + switch (operator) { + case '+': + return (a + b); + case '-': + return (a - b); + case '*': + return (a * b); + case '/': + if (operator == '/' && b == 0) { + snmp_log(LOG_ERR, "Division by zero attempted\n"); + return 0; + } else + return (a / b); } + return 0; +} +static unsigned long get_operand(const char *p, int *length) +{ + char c[13]; + int i = 0, k = 1; + unsigned long result = 0; - DEBUGMSGTL(("expValueTable", "done.\n")); - return SNMPERR_SUCCESS; + while (isdigit((unsigned char) *p)) + c[i++] = *(p++); + *length += --i; + for (; i >= 0; i--) { + result += (c[i] - 48) * k; + k *= 10; + } + return result; +} + +enum operator_class { + c_other = 0, + c_digit = 1, + c_binop = 2, + c_rpar = 3, + c_lpar = 4, +}; + +static int operator_class(char c) +{ + if (isdigit((unsigned char) c)) + return c_digit; + else if (c == '*' || c == '+' || c == '-' || c == '/') + return c_binop; + else if (c == ')') + return c_rpar; + else if (c == '(') + return c_lpar; + else + return c_other; } +static void eval(nodelink **operator, nodelink **operand, char new_op) +{ + unsigned long a, b, op, c; + + DEBUGMSG(("expValueTable", "eval: operator %c; new_op %c\n", + *operator ? (*operator)->data : '?', new_op)); + + while (*operator != NULL && + priority(new_op) <= priority((*operator)->data)) { + b = pop(operand); + op = pop(operator); + if (op) { + a = pop(operand); + c = calculate(op, a, b); + DEBUGMSG(("expValueTable", "eval: %ld %c %ld -> %ld\n", a, (char)op, + b, c)); + push(operand, c); + } else { + DEBUGMSG(("expValueTable", "eval: returning %ld\n", b)); + push(operand, b); + break; + } + } +} +static unsigned long get_result(const char *expr) +{ + int position = 0; + unsigned long a, result = 0; + const char *expression; + nodelink *operator = NULL; + nodelink *operand = NULL; + expression = expr; + while (*(expression + position) != '\0' + && *(expression + position) != '\n') { + switch (operator_class(*(expression + position))) { + case c_digit: + push(&operand, get_operand(expression + position, &position)); + break; + case c_binop: + eval(&operator, &operand, *(expression + position)); + push(&operator, *(expression + position)); + break; + case c_rpar: + eval(&operator, &operand, ')'); + if (operator->data == '(') + pop(&operator); + break; + case c_lpar: + push(&operator, '('); + break; + default: + printf("\nInvalid character in expression:"); + a = 0; + while (*(expression + (int) a) != '\n' + && *(expression + (int) a) != '\0') { + if (a != position) + printf("%c", *(expression + (int) a)); + else + printf("<%c>", *(expression + (int) a)); + a++; + } + return 0; + } /* end switch */ + position++; + } + eval(&operator, &operand, ')'); + result = pop(&operand); + DEBUGMSG(("expValueTable", "%s: %s -> %ld\n", __func__, expr, result)); + return result; +} -unsigned long -Evaluate_Expression(struct expValueTable_data *vtable_data) +static int iquery(struct variable_list **vars, char *secName, int snmp_version, + const oid *name, int name_len) { + struct snmp_session *ss; + struct snmp_pdu *pdu; + struct snmp_pdu *response; + struct variable_list *v; + int status, rc = SNMP_ERR_GENERR; + + ss = netsnmp_query_get_default_session(); + if (!ss) { + snmp_log(LOG_ERR, "%s: default SNMP session not available\n", __func__); + goto out; + } + + ss->retries = 0; + + pdu = snmp_pdu_create(SNMP_MSG_GET); + if (!pdu) { + snmp_log(LOG_ERR, "%s: failed to create an SNMP PDU\n", __func__); + goto out; + } + + if (snmp_add_null_var(pdu, name, name_len) == NULL) { + snmp_log(LOG_ERR, "%s: appending a variable to a PDU failed\n", + __func__); + goto free_pdu; + } + + DEBUGMSGTL(("expValueTable", "%s: querying OID ", __func__)); + DEBUGMSGOID(("expValueTable", name, name_len)); + DEBUGMSG(("expValueTable", "\n")); + + status = snmp_synch_response(ss, pdu, &response); + + DEBUGMSGTL(("expValueTable", "%s: SNMP response status %d; rc %ld\n", + __func__, status, response ? response->errstat : -1)); + + if (status != STAT_SUCCESS) + goto free_pdu; + rc = response->errstat; + *vars = snmp_clone_varbind(response->variables); + if (*vars == NULL) + goto free_response; + + for (v = *vars; v; v = v->next_variable) { + DEBUGMSGTL(("expValueTable", "%s: response variable type %d; oid ", + __func__, v->type)); + DEBUGMSGOID(("expValueTable", v->name, v->name_length)); + if (v->type == ASN_INTEGER) + DEBUGMSG(("expValueTable", "; value %ld\n", *v->val.integer)); + DEBUGMSG(("expValueTable", "\n")); + } + + rc = SNMPERR_SUCCESS; + +free_response: + if (response) + snmp_free_pdu(response); + +free_pdu: + /* if (pdu) snmp_free_pdu(pdu); -- triggers a use-after-free */ + +out: + return rc; +} + +static unsigned long Evaluate_Expression(struct expValueTable_data *vtable_data) +{ struct header_complex_index *hcindex; struct expObjectTable_data *objstorage, *objfound; - struct expValueTable_data *valstorage; - valstorage = vtable_data; - - char *expression; + struct expValueTable_data *const valstorage = vtable_data; + const char *expression; char *result, *resultbak; char *temp, *tempbak; - char intchar[10]; - int i = 0, j, k, l; - long value; - unsigned long result_u_long; + int i = 0, j, l; + unsigned long result_u_long = 0; + static int level; + temp = malloc(100); result = malloc(100); tempbak = temp; @@ -255,8 +452,19 @@ Evaluate_Expression(struct expValueTable_data *vtable_data) *result = '\0'; resultbak = result; + level++; + + if (level > 1) { + snmp_log(LOG_ERR, "%s: detected recursion\n", __func__); + goto out; + } + expression = vtable_data->expression_data->expExpression; + DEBUGMSGTL(("expValueTable", "%s(%s.%s): evaluating %s\n", __func__, + valstorage->expExpressionOwner, valstorage->expExpressionName, + expression)); + while (*expression != '\0') { if (*expression == '$') { objfound = NULL; @@ -296,14 +504,19 @@ Evaluate_Expression(struct expValueTable_data *vtable_data) } } - if (!objfound) { - /* have err */ - return 0; + snmp_log(LOG_ERR, "%s: lookup of expression %s.%s failed\n", + __func__, valstorage->expExpressionOwner, + valstorage->expExpressionName); + goto out; } - struct snmp_session *ss; - struct snmp_pdu *pdu; - struct snmp_pdu *response; + + DEBUGMSGTL(("expValueTable", "%s: Found OID ", __func__)); + DEBUGMSGOID(("expValueTable", objfound->expObjectID, + objfound->expObjectIDLen)); + DEBUGMSG(("expValueTable", "%s\n", + objfound->expObjectIDWildcard == + EXPOBJCETIDWILDCARD_TRUE ? "(wildcard)" : "")); oid anOID[MAX_OID_LEN]; size_t anOID_len; @@ -319,124 +532,49 @@ Evaluate_Expression(struct expValueTable_data *vtable_data) (valstorage->expValueInstanceLen - 2) * sizeof(oid)); } - struct variable_list *vars; - int status; - - /* - * Initialize the SNMP library - */ - - /* - * Initialize a "session" that defines who we're going to talk to - */ - session.version = vtable_data->expression_data->pdu_version; - - /* - * set the SNMPv1 community name used for authentication - */ - session.community = - vtable_data->expression_data->pdu_community; - session.community_len = - vtable_data->expression_data->pdu_community_len; - /* - * Open the session - */ - SOCK_STARTUP; - ss = snmp_open(&session); /* establish the session */ - - if (!ss) { - /* err */ - exit(2); - } - pdu = snmp_pdu_create(SNMP_MSG_GET); - snmp_add_null_var(pdu, anOID, anOID_len); - - /* - * Send the Request out. - */ - status = snmp_synch_response(ss, pdu, &response); - - /* - * Process the response. - */ - if (status == STAT_SUCCESS - && response->errstat == SNMP_ERR_NOERROR) { - /* - * SUCCESS: Print the result variables - */ - - vars = response->variables; - value = *(vars->val.integer); - sprintf(intchar, "%lu", value); - for (k = 1; k <= strlen(intchar); k++) { - *result = intchar[k - 1]; - result++; - } - - } else { - /* - * FAILURE: print what went wrong! - */ - - if (status == STAT_SUCCESS) - fprintf(stderr, "Error in packet\nReason: %s\n", - snmp_errstring(response->errstat)); - else - snmp_sess_perror("snmpget", ss); - - } - - /* - * Clean up: - * 1) free the response. - * 2) close the session. - */ - if (response) - snmp_free_pdu(response); - snmp_close(ss); - - SOCK_CLEANUP; + struct variable_list *vars; + int rc; + + rc = iquery(&vars, + (char *)vtable_data->expression_data->pdu_community, + vtable_data->expression_data->pdu_version, + anOID, anOID_len); + if (rc != SNMP_ERR_NOERROR) + snmp_log(LOG_ERR, "Error in packet: %s\n", snmp_errstring(rc)); + sprintf(result, "%lu", rc == SNMP_ERR_NOERROR ? + *(vars->val.integer) : 0); + result += strlen(result); } else { - *result = *expression; - result++; - expression++; + *result++ = *expression++; } } result_u_long = get_result(resultbak); + DEBUGMSGTL(("expValueTable", "%s(%s.%s): evaluated %s into %ld\n", __func__, + valstorage->expExpressionOwner, valstorage->expExpressionName, + resultbak, result_u_long)); + +out: free(tempbak); free(resultbak); + level--; return result_u_long; } - - - - - - - -void -expValueTable_clean(void *data) +static void expValueTable_clean(void *data) { - struct expValueTable_data *cleanme = - (struct expValueTable_data *) data; + struct expValueTable_data *cleanme = data; + SNMP_FREE(cleanme->expValueInstance); - SNMP_FREE(cleanme->expValueIpAddressVal); - SNMP_FREE(cleanme->expValueOctetStringVal); - SNMP_FREE(cleanme->expValueOidVal); SNMP_FREE(cleanme); } - - -void -build_valuetable(void) +static void build_valuetable(void) { struct expExpressionTable_data *expstorage; struct expObjectTable_data *objstorage, *objfound = NULL; struct header_complex_index *hcindex, *object_hcindex; - char *expression; + const char *expression; oid *index; int i = 0, j, l; @@ -506,74 +644,30 @@ build_valuetable(void) *index = 0; *(index + 1) = 0; *(index + 2) = 0; - expValueTable_add(expstorage, objfound->expExpressionOwner, + expValueTable_set(expstorage, objfound->expExpressionOwner, objfound->expExpressionOwnerLen, objfound->expExpressionName, objfound->expExpressionNameLen, index, 3); } else { - oid *targetOID; - size_t taggetOID_len; - targetOID = objfound->expObjectID; - struct snmp_pdu *pdu; - struct snmp_pdu *response; + oid *targetOID = objfound->expObjectID; + size_t taggetOID_len = objfound->expObjectIDLen; oid *next_OID; size_t next_OID_len; - taggetOID_len = objfound->expObjectIDLen; - int status; - struct snmp_session *ss; - /* - * Initialize the SNMP library - */ - - - /* - * set the SNMP version number - */ - session.version = expstorage->pdu_version; - - /* - * set the SNMPv1 community name used for authentication - */ - session.community = expstorage->pdu_community; - session.community_len = expstorage->pdu_community_len; - - /* - * Open the session - */ - SOCK_STARTUP; - ss = snmp_open(&session); /* establish the session */ - if (!ss) { - snmp_perror("ack"); - snmp_log(LOG_ERR, "something horrible happened!!!\n"); - exit(2); - } + struct variable_list *vars; + int rc; next_OID = targetOID; next_OID_len = taggetOID_len; do { index = calloc(1, MAX_OID_LEN); - pdu = snmp_pdu_create(SNMP_MSG_GETNEXT); - - snmp_add_null_var(pdu, next_OID, next_OID_len); - - /* - * Send the Request out. - */ - status = snmp_synch_response(ss, pdu, &response); - - /* - * Process the response. - */ - if (status == STAT_SUCCESS - && response->errstat == SNMP_ERR_NOERROR) { - /* - * SUCCESS: Print the result variables - */ - - if (((response->variables->type >= SNMP_NOSUCHOBJECT && - response->variables->type <= SNMP_ENDOFMIBVIEW) + + rc = iquery(&vars, (char *)expstorage->pdu_community, + expstorage->pdu_version, next_OID, next_OID_len); + if (rc == SNMP_ERR_NOERROR) { + if (((vars->type >= SNMP_NOSUCHOBJECT && + vars->type <= SNMP_ENDOFMIBVIEW) || snmp_oid_compare(targetOID, taggetOID_len, - response->variables->name, + vars->name, taggetOID_len) != 0)) { break; } @@ -581,80 +675,64 @@ build_valuetable(void) *index = 0; *(index + 1) = 0; - memcpy(index + 2, - response->variables->name + taggetOID_len, - (response->variables->name_length - - taggetOID_len) * sizeof(oid)); - expValueTable_add(expstorage, + memcpy(index + 2, vars->name + taggetOID_len, + (vars->name_length - taggetOID_len) * sizeof(oid)); + expValueTable_set(expstorage, objfound->expExpressionOwner, objfound->expExpressionOwnerLen, objfound->expExpressionName, objfound->expExpressionNameLen, index, - response->variables->name_length - + vars->name_length - taggetOID_len + 2); - next_OID = response->variables->name; - - next_OID_len = response->variables->name_length; - - - - + next_OID = vars->name; + next_OID_len = vars->name_length; } else { - /* - * FAILURE: print what went wrong! - */ - if (status == STAT_SUCCESS) - fprintf(stderr, "Error in packet\nReason: %s\n", - snmp_errstring(response->errstat)); - else - snmp_sess_perror("snmpget", ss); + snmp_log(LOG_ERR, "Error in packet: %s\n", + snmp_errstring(rc)); } } while (TRUE); - } - } - } - - -/* - * var_expValueTable(): - */ -unsigned char * -var_expValueTable(struct variable *vp, - oid * name, - size_t *length, - int exact, size_t *var_len, WriteMethod ** write_method) +static unsigned char *var_expValueTable(struct variable *vp, oid * name, + size_t *length, int exact, + size_t *var_len, + WriteMethod ** write_method) { - struct expValueTable_data *StorageTmp = NULL; - - - DEBUGMSGTL(("expValueTable", "var_expValueTable: Entering... \n")); - /* - * before we build valuetable we must free any other valutable if exist - */ - header_complex_free_all(expValueTableStorage, expValueTable_clean); - expValueTableStorage = NULL; + struct header_complex_index *hciptr, *hciptrn; + for (hciptr = expValueTableStorage; hciptr; hciptr = hciptr->next) { + StorageTmp = hciptr->data; + StorageTmp->set = 0; + } build_valuetable(); + for (hciptr = expValueTableStorage; hciptr; hciptr = hciptrn) { + hciptrn = hciptr->next; + StorageTmp = hciptr->data; + if (!StorageTmp->set) + header_complex_free_entry(hciptr, expValueTable_clean); + } /* * this assumes you have registered all your data properly */ if ((StorageTmp = header_complex(expValueTableStorage, vp, name, length, exact, - var_len, write_method)) == NULL) + var_len, write_method)) == NULL) { + DEBUGMSGTL(("expValueTable", "%s: entry not found.\n", __func__)); return NULL; + } + + DEBUGMSGTL(("expValueTable", "%s: vp->magic = %d.\n", __func__, vp->magic)); /* @@ -709,165 +787,3 @@ var_expValueTable(struct variable *vp, return NULL; } } - - - - - -void -push(nodelink ** stack, unsigned long value) -{ - nodelink *newnode; - newnode = (nodelink *) malloc(sizeof(nodelink)); - if (!newnode) { - printf("\nMemory allocation failure!"); - return; - } - newnode->data = value; - newnode->next = *stack; - *stack = newnode; -} - -unsigned long -pop(nodelink ** stack) -{ - unsigned long value; - nodelink *top; - top = *stack; - *stack = (*stack)->next; - value = top->data; - free(top); - return value; -} - -int -priority(char operater) -{ - switch (operater) { - case '*': - case '/': - return 4; - case '+': - case '-': - return 3; - case ')': - return 2; - case '(': - return 1; - default: - return 0; - } -} - -unsigned long -calculate(int operater, unsigned long a, unsigned long b) -{ - switch (operater) { - case '+': - return (a + b); - case '-': - return (a - b); - case '*': - return (a * b); - case '/': - if (operater == '/' && b == 0) { - printf("\nDivision mustn\'t be 0!"); - exit(0); - } else - return (a / b); - } - return 0; -} - -unsigned long -get_operand(char *p, int *length) -{ - char c[13]; - int i = 0, k = 1; - unsigned long result = 0; - while (*p <= 57 && *p >= 48) - c[i++] = *(p++); - *length += --i; - for (; i >= 0; i--) { - result += (c[i] - 48) * k; - k *= 10; - } - return result; -} - -int -operator_class(char c) -{ - if (c <= 57 && c >= 48) - return 1; - if (c == 42 || c == 43 || c == 45 || c == 47) - return 2; - if (c == 41) - return 3; - if (c == 40) - return 4; - return 0; -} - -unsigned long -get_result(char *expr) -{ - int position = 0; - unsigned long op = 0, a = 0, b = 0, result = 0; - char *expression; - expression = expr; - while (*(expression + position) != '\0' - && *(expression + position) != '\n') { - switch (operator_class(*(expression + position))) { - case 1: - push(&operand, get_operand(expression + position, &position)); - break; - case 2: - if (operater != NULL) - while (operater != NULL - && priority(*(expression + position)) <= - priority(operater->data)) { - a = pop(&operand); - b = pop(&operand); - op = pop(&operater); - push(&operand, calculate(op, b, a)); - } - push(&operater, *(expression + position)); - break; - case 3: - while (operater != NULL && operater->data != '(') { - a = pop(&operand); - b = pop(&operand); - op = pop(&operater); - push(&operand, calculate(op, b, a)); - } - if (operater->data == '(') - pop(&operater); - break; - case 4: - push(&operater, '('); - break; - default: - printf("\nInvalid character in expression:"); - a = 0; - while (*(expression + (int) a) != '\n' - && *(expression + (int) a) != '\0') { - if (a != position) - printf("%c", *(expression + (int) a)); - else - printf("<%c>", *(expression + (int) a)); - a++; - } - exit(0); - } /* end switch */ - position++; - } - while (operater != NULL) { - op = pop(&operater); - a = pop(&operand); - b = pop(&operand); - push(&operand, calculate(op, b, a)); - } - result = pop(&operand); - return result; -} diff --git a/agent/mibgroup/disman/expression/expValueTable.h b/agent/mibgroup/disman/expression/expValueTable.h index 8569f9d..600ac74 100644 --- a/agent/mibgroup/disman/expression/expValueTable.h +++ b/agent/mibgroup/disman/expression/expValueTable.h @@ -20,14 +20,14 @@ /* * we may use header_complex from the header_complex module */ -config_require(header_complex) +config_require(header_complex); #ifndef _MIBGROUP_EXPVALUETABLE_H #define _MIBGROUP_EXPVALUETABLE_H struct expValueTable_data { - char *expExpressionOwner; + const char *expExpressionOwner; size_t expExpressionOwnerLen; - char *expExpressionName; + const char *expExpressionName; size_t expExpressionNameLen; oid *expValueInstance; size_t expValueInstanceLen; @@ -35,16 +35,17 @@ config_require(header_complex) unsigned long expValueUnsigned32Val; unsigned long expValueTimeTicksVal; long expValueInteger32Val; - u_long *expValueIpAddressVal; - char *expValueOctetStringVal; + const u_long *expValueIpAddressVal; + const char *expValueOctetStringVal; size_t expValueOctetStringValLen; - oid *expValueOidVal; + const oid *expValueOidVal; size_t expValueOidValLen; long expValueCounter64Val; /* internal var */ struct expExpressionTable_data *expression_data; char *valuestr; + int set; }; @@ -52,12 +53,5 @@ config_require(header_complex) * function prototypes */ void init_expValueTable(void); - unsigned long get_result(char *expr); - FindVarMethod var_expValueTable; - int expValueTable_add(struct expExpressionTable_data - *expression_data, char *owner, - size_t owner_len, char *name, - size_t name_len, oid * index, - size_t index_len); #endif /* _MIBGROUP_EXPVALUETABLE_H */ diff --git a/agent/mibgroup/disman/mteEventNotificationTable.c b/agent/mibgroup/disman/mteEventNotificationTable.c index 48add68..6035c2c 100644 --- a/agent/mibgroup/disman/mteEventNotificationTable.c +++ b/agent/mibgroup/disman/mteEventNotificationTable.c @@ -9,8 +9,8 @@ #include #include "mteEventNotificationTable.h" -netsnmp_feature_require(table_dataset) -netsnmp_feature_require(table_set_multi_add_default_row) +netsnmp_feature_require(table_dataset); +netsnmp_feature_require(table_set_multi_add_default_row); netsnmp_table_data_set *mteEventNotif_table_set; diff --git a/agent/mibgroup/disman/mteEventTable.c b/agent/mibgroup/disman/mteEventTable.c index 22bad73..e5052eb 100644 --- a/agent/mibgroup/disman/mteEventTable.c +++ b/agent/mibgroup/disman/mteEventTable.c @@ -12,8 +12,8 @@ #include "mteEventNotificationTable.h" #include "mteObjectsTable.h" -netsnmp_feature_require(table_dataset) -netsnmp_feature_require(table_set_multi_add_default_row) +netsnmp_feature_require(table_dataset); +netsnmp_feature_require(table_set_multi_add_default_row); static netsnmp_table_data_set *table_set = NULL; @@ -263,7 +263,7 @@ run_mte_events(struct mteTriggerTable_data *item, tc = netsnmp_table_data_set_find_column(col1, COLUMN_MTEEVENTACTIONS); - if (!tc->data.bitstring[0] & 0x80) { + if (!(tc->data.bitstring[0] & 0x80)) { /* not a notification. next! (XXX: do sets) */ continue; } diff --git a/agent/mibgroup/disman/mteObjectsTable.c b/agent/mibgroup/disman/mteObjectsTable.c index 09ceb2a..945aaf2 100644 --- a/agent/mibgroup/disman/mteObjectsTable.c +++ b/agent/mibgroup/disman/mteObjectsTable.c @@ -9,17 +9,17 @@ */ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -801,7 +801,7 @@ write_mteObjectsEntryStatus(int action, * permanently. Make sure that anything done here can't fail! */ if (StorageDel != NULL) { - StorageDel = 0; + StorageDel = NULL; /* * XXX: free it, its dead */ diff --git a/agent/mibgroup/disman/mteObjectsTable.h b/agent/mibgroup/disman/mteObjectsTable.h index 4d44c87..fea5f03 100644 --- a/agent/mibgroup/disman/mteObjectsTable.h +++ b/agent/mibgroup/disman/mteObjectsTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* diff --git a/agent/mibgroup/disman/mteTriggerBooleanTable.c b/agent/mibgroup/disman/mteTriggerBooleanTable.c index 5b17927..732a279 100644 --- a/agent/mibgroup/disman/mteTriggerBooleanTable.c +++ b/agent/mibgroup/disman/mteTriggerBooleanTable.c @@ -8,10 +8,10 @@ * This should always be included first before anything else */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -109,12 +109,6 @@ struct variable2 mteTriggerBooleanTable_variables[] = { */ -/* - * global storage of our data, saved in and configured by header_complex() - */ -extern struct header_complex_index *mteTriggerTableStorage; - - /* * init_mteTriggerBooleanTable(): * Initialization routine. This is called when the agent starts up. diff --git a/agent/mibgroup/disman/mteTriggerBooleanTable.h b/agent/mibgroup/disman/mteTriggerBooleanTable.h index 6413da5..74b09ae 100644 --- a/agent/mibgroup/disman/mteTriggerBooleanTable.h +++ b/agent/mibgroup/disman/mteTriggerBooleanTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* * enum definitions from the covered mib sections */ diff --git a/agent/mibgroup/disman/mteTriggerDeltaTable.c b/agent/mibgroup/disman/mteTriggerDeltaTable.c index c829e6a..c7bdd77 100644 --- a/agent/mibgroup/disman/mteTriggerDeltaTable.c +++ b/agent/mibgroup/disman/mteTriggerDeltaTable.c @@ -8,10 +8,10 @@ * This should always be included first before anything else */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -85,13 +85,6 @@ struct variable2 mteTriggerDeltaTable_variables[] = { */ -/* - * global storage of our data, saved in and configured by header_complex() - */ -extern struct header_complex_index *mteTriggerTableStorage; - - - /* * init_mteTriggerDeltaTable(): * Initialization routine. This is called when the agent starts up. diff --git a/agent/mibgroup/disman/mteTriggerDeltaTable.h b/agent/mibgroup/disman/mteTriggerDeltaTable.h index fa4872a..9566a47 100644 --- a/agent/mibgroup/disman/mteTriggerDeltaTable.h +++ b/agent/mibgroup/disman/mteTriggerDeltaTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* diff --git a/agent/mibgroup/disman/mteTriggerExistenceTable.c b/agent/mibgroup/disman/mteTriggerExistenceTable.c index 4e6b64b..30ffac4 100644 --- a/agent/mibgroup/disman/mteTriggerExistenceTable.c +++ b/agent/mibgroup/disman/mteTriggerExistenceTable.c @@ -8,10 +8,10 @@ * This should always be included first before anything else */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -103,14 +103,6 @@ struct variable2 mteTriggerExistenceTable_variables[] = { */ -/* - * global storage of our data, saved in and configured by header_complex() - */ -extern struct header_complex_index *mteTriggerTableStorage; - - - - /* * init_mteTriggerExistenceTable(): * Initialization routine. This is called when the agent starts up. diff --git a/agent/mibgroup/disman/mteTriggerExistenceTable.h b/agent/mibgroup/disman/mteTriggerExistenceTable.h index 75c6427..31747ee 100644 --- a/agent/mibgroup/disman/mteTriggerExistenceTable.h +++ b/agent/mibgroup/disman/mteTriggerExistenceTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* * enum definitions from the covered mib sections diff --git a/agent/mibgroup/disman/mteTriggerTable.c b/agent/mibgroup/disman/mteTriggerTable.c index 80a45a3..684cd6b 100644 --- a/agent/mibgroup/disman/mteTriggerTable.c +++ b/agent/mibgroup/disman/mteTriggerTable.c @@ -9,10 +9,10 @@ */ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -21,12 +21,12 @@ #include #endif -netsnmp_feature_require(mib_snprint_variable) -netsnmp_feature_require(tdomain_support) -netsnmp_feature_require(check_vb_uint) -netsnmp_feature_require(string_time_to_secs) +netsnmp_feature_require(mib_snprint_variable); +netsnmp_feature_require(tdomain_support); +netsnmp_feature_require(check_vb_uint); +netsnmp_feature_require(string_time_to_secs); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -189,7 +189,6 @@ struct variable2 mteTriggerTable_variables[] = { struct header_complex_index *mteTriggerTableStorage = NULL; netsnmp_session *mte_callback_sess = NULL; -extern int callback_master_num; /* * init_mteTriggerTable(): @@ -468,7 +467,7 @@ parse_simple_monitor(const char *token, char *line) */ return; } - StorageNew->mteTriggerFrequency = (unsigend long) freq; + StorageNew->mteTriggerFrequency = (unsigned long) freq; } else { config_perror("No parameter after -r given\n"); /* @@ -2917,7 +2916,7 @@ write_mteTriggerEntryStatus(int action, */ if (StorageDel != NULL) { mte_disable_trigger(StorageDel); - StorageDel = 0; + StorageDel = NULL; /* * XXX: free it, its dead */ @@ -3164,7 +3163,7 @@ mte_get_response(struct mteTriggerTable_data *item, netsnmp_pdu *pdu) * xxx */ char *errstr; - snmp_error(mte_callback_sess, 0, 0, &errstr); + snmp_error(mte_callback_sess, NULL, NULL, &errstr); if (response) { DEBUGMSGTL(("mteTriggerTable", "Error received: status=%d, sess_error=%s, pduerr=%d/%s, pdu version=%d\n", diff --git a/agent/mibgroup/disman/mteTriggerTable.h b/agent/mibgroup/disman/mteTriggerTable.h index c427602..3d6738f 100644 --- a/agent/mibgroup/disman/mteTriggerTable.h +++ b/agent/mibgroup/disman/mteTriggerTable.h @@ -13,11 +13,11 @@ */ -config_require(header_complex) -config_require(utilities/iquery) +config_require(header_complex); +config_require(utilities/iquery); #ifndef NETSNMP_TRANSPORT_CALLBACK_DOMAIN -config_error(disman/mteTriggerTable depends on the Callback transport) +config_error(disman/mteTriggerTable depends on the Callback transport); #endif /* @@ -215,6 +215,8 @@ config_error(disman/mteTriggerTable depends on the Callback transport) #define MTE_FAILURE_SAMPLEOVERRUN -6 + extern struct header_complex_index *mteTriggerTableStorage; + /* * function prototypes */ diff --git a/agent/mibgroup/disman/mteTriggerThresholdTable.c b/agent/mibgroup/disman/mteTriggerThresholdTable.c index be963c1..ed86300 100644 --- a/agent/mibgroup/disman/mteTriggerThresholdTable.c +++ b/agent/mibgroup/disman/mteTriggerThresholdTable.c @@ -8,10 +8,10 @@ * This should always be included first before anything else */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -157,11 +157,6 @@ struct variable2 mteTriggerThresholdTable_variables[] = { * (L = length of the oidsuffix) */ -/* - * global storage of our data, saved in and configured by header_complex() - */ -extern struct header_complex_index *mteTriggerTableStorage; - /* * init_mteTriggerThresholdTable(): diff --git a/agent/mibgroup/disman/mteTriggerThresholdTable.h b/agent/mibgroup/disman/mteTriggerThresholdTable.h index 8f33011..b788325 100644 --- a/agent/mibgroup/disman/mteTriggerThresholdTable.h +++ b/agent/mibgroup/disman/mteTriggerThresholdTable.h @@ -13,7 +13,7 @@ */ -config_require(header_complex) +config_require(header_complex); /* * enum definitions from the covered mib sections diff --git a/agent/mibgroup/disman/nslookup-mib.h b/agent/mibgroup/disman/nslookup-mib.h index 1c3fb1c..ed253fd 100644 --- a/agent/mibgroup/disman/nslookup-mib.h +++ b/agent/mibgroup/disman/nslookup-mib.h @@ -14,7 +14,7 @@ /* * wrapper for the disman name lookup mib code files */ -config_require(disman/nslookup/lookupCtlTable) -config_require(disman/nslookup/lookupResultsTable) -config_add_mib(DISMAN-NSLOOKUP-MIB) +config_require(disman/nslookup/lookupCtlTable); +config_require(disman/nslookup/lookupResultsTable); +config_add_mib(DISMAN-NSLOOKUP-MIB); diff --git a/agent/mibgroup/disman/nslookup/lookupCtlTable.c b/agent/mibgroup/disman/nslookup/lookupCtlTable.c index 0f71da6..c05a783 100644 --- a/agent/mibgroup/disman/nslookup/lookupCtlTable.c +++ b/agent/mibgroup/disman/nslookup/lookupCtlTable.c @@ -21,7 +21,7 @@ #include #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ #include @@ -217,22 +217,19 @@ lookupResultsTable_add(struct lookupTable_data *thedata) void lookupCtlTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; - struct lookupTable_data *StorageDel = NULL; + struct header_complex_index *hciptr, *nhciptr; + struct lookupTable_data *StorageDel; + DEBUGMSGTL(("lookupCtlTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { - StorageDel = - header_complex_extract_entry(&lookupCtlTableStorage, hciptr); + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; + StorageDel = header_complex_extract_entry(&lookupCtlTableStorage, + hciptr); if (StorageDel != NULL) { free(StorageDel->lookupCtlOwnerIndex); - StorageDel->lookupCtlOwnerIndex = NULL; free(StorageDel->lookupCtlOperationName); - StorageDel->lookupCtlOperationName = NULL; free(StorageDel->lookupCtlTargetAddress); - StorageDel->lookupCtlTargetAddress = NULL; free(StorageDel); - StorageDel = NULL; - } DEBUGMSGTL(("lookupCtlTable", "cleaner ")); } @@ -564,7 +561,8 @@ run_lookup(struct lookupTable_data *item) while (lookup->h_aliases[i]) { temp = add_result(item, n, INETADDRESSTYPE_DNS, lookup->h_aliases[i], strlen(lookup->h_aliases[i])); - current->next = temp; + if (current) + current->next = temp; current = temp; i = i + 1; n = n + 1; @@ -581,7 +579,7 @@ run_lookup(struct lookupTable_data *item) else if (addressType == INETADDRESSTYPE_DNS) { struct hostent *lookup; -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO int res; struct addrinfo *ais; struct addrinfo hints = { 0, AF_INET6, SOCK_DGRAM }; @@ -628,7 +626,7 @@ run_lookup(struct lookupTable_data *item) } } -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO netsnmp_get_monotonic_clock(&tpstart); res = netsnmp_getaddrinfo(address, NULL, &hints, &ais); netsnmp_get_monotonic_clock(&tpend); @@ -678,7 +676,7 @@ run_lookup(struct lookupTable_data *item) } freeaddrinfo(ais); } -#elif HAVE_GETHOSTBYNAME2 +#elif defined(HAVE_GETHOSTBYNAME2) netsnmp_get_monotonic_clock(&tpstart); lookup = gethostbyname2(address, AF_INET6); netsnmp_get_monotonic_clock(&tpend); @@ -887,8 +885,8 @@ modify_lookupCtlRc(struct lookupTable_data *thedata, long val) int lookupResultsTable_del(struct lookupTable_data *thedata) { - struct header_complex_index *hciptr2 = NULL; - struct lookupResultsTable_data *StorageDel = NULL; + struct header_complex_index *hciptr2, *nhciptr2; + struct lookupResultsTable_data *StorageDel; netsnmp_variable_list *vars = NULL; oid newoid[MAX_OID_LEN]; size_t newoid_len; @@ -901,11 +899,10 @@ lookupResultsTable_del(struct lookupTable_data *thedata) memset(newoid, '\0', MAX_OID_LEN * sizeof(oid)); header_complex_generate_oid(newoid, &newoid_len, NULL, 0, vars); - snmp_free_varbind(vars); vars = NULL; - for (hciptr2 = lookupResultsTableStorage; hciptr2 != NULL; - hciptr2 = hciptr2->next) { + for (hciptr2 = lookupResultsTableStorage; hciptr2; hciptr2 = nhciptr2) { + nhciptr2 = hciptr2->next; if (snmp_oid_compare(newoid, newoid_len, hciptr2->name, newoid_len) == 0) { StorageDel = @@ -918,7 +915,6 @@ lookupResultsTable_del(struct lookupTable_data *thedata) SNMP_FREE(StorageDel); } DEBUGMSGTL(("lookupResultsTable", "delete success!\n")); - } } return SNMPERR_SUCCESS; diff --git a/agent/mibgroup/disman/nslookup/lookupCtlTable.h b/agent/mibgroup/disman/nslookup/lookupCtlTable.h index 085b25b..417f630 100644 --- a/agent/mibgroup/disman/nslookup/lookupCtlTable.h +++ b/agent/mibgroup/disman/nslookup/lookupCtlTable.h @@ -56,6 +56,9 @@ struct lookupResultsTable_data { int storagetype; }; +extern struct header_complex_index *lookupCtlTableStorage; +extern struct header_complex_index *lookupResultsTableStorage; + /* * function declarations */ diff --git a/agent/mibgroup/disman/nslookup/lookupResultsTable.c b/agent/mibgroup/disman/nslookup/lookupResultsTable.c index d6a937c..6813795 100644 --- a/agent/mibgroup/disman/nslookup/lookupResultsTable.c +++ b/agent/mibgroup/disman/nslookup/lookupResultsTable.c @@ -34,12 +34,6 @@ struct variable2 lookupResultsTable_variables[] = { var_lookupResultsTable, 2, {1, 3}} }; -/* - * global storage of our data, saved in and configured by header_complex() - */ - -extern struct header_complex_index *lookupCtlTableStorage; -extern struct header_complex_index *lookupResultsTableStorage; int lookupResultsTable_inadd(struct lookupResultsTable_data *thedata); @@ -47,13 +41,14 @@ lookupResultsTable_inadd(struct lookupResultsTable_data *thedata); void lookupResultsTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; - struct lookupResultsTable_data *StorageDel = NULL; + struct header_complex_index *hciptr, *nhciptr; + struct lookupResultsTable_data *StorageDel; + DEBUGMSGTL(("lookupResultsTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { - StorageDel = - header_complex_extract_entry(&lookupResultsTableStorage, - hciptr); + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; + StorageDel = header_complex_extract_entry(&lookupResultsTableStorage, + hciptr); if (StorageDel != NULL) { SNMP_FREE(StorageDel->lookupCtlOwnerIndex); SNMP_FREE(StorageDel->lookupCtlOperationName); @@ -62,8 +57,8 @@ lookupResultsTable_cleaner(struct header_complex_index *thestuff) } DEBUGMSGTL(("lookupResultsTable", "cleaner ")); } - } + void init_lookupResultsTable(void) { diff --git a/agent/mibgroup/disman/old-event-mib.h b/agent/mibgroup/disman/old-event-mib.h index 71ef1f5..681784b 100644 --- a/agent/mibgroup/disman/old-event-mib.h +++ b/agent/mibgroup/disman/old-event-mib.h @@ -1,33 +1,33 @@ -config_add_mib(DISMAN-EVENT-MIB) +config_add_mib(DISMAN-EVENT-MIB); /* * wrapper for the original disman event mib implementation code files */ -config_require(disman/mteTriggerTable) -config_require(disman/mteTriggerDeltaTable) -config_require(disman/mteTriggerExistenceTable) -config_require(disman/mteTriggerBooleanTable) -config_require(disman/mteTriggerThresholdTable) -config_require(disman/mteObjectsTable) -config_require(disman/mteEventTable) -config_require(disman/mteEventNotificationTable) +config_require(disman/mteTriggerTable); +config_require(disman/mteTriggerDeltaTable); +config_require(disman/mteTriggerExistenceTable); +config_require(disman/mteTriggerBooleanTable); +config_require(disman/mteTriggerThresholdTable); +config_require(disman/mteObjectsTable); +config_require(disman/mteEventTable); +config_require(disman/mteEventNotificationTable); /* * conflicts with the new implementation */ -config_exclude(disman/event/mteScalars) -config_exclude(disman/event/mteTrigger) -config_exclude(disman/event/mteTriggerTable) -config_exclude(disman/event/mteTriggerDeltaTable) -config_exclude(disman/event/mteTriggerExistenceTable) -config_exclude(disman/event/mteTriggerBooleanTable) -config_exclude(disman/event/mteTriggerThresholdTable) -config_exclude(disman/event/mteTriggerConf) -config_exclude(disman/event/mteEvent) -config_exclude(disman/event/mteEventTable) -config_exclude(disman/event/mteEventSetTable) -config_exclude(disman/event/mteEventNotificationTable) -config_exclude(disman/event/mteEventConf) -config_exclude(disman/event/mteObjects) -config_exclude(disman/event/mteObjectsTable) -config_exclude(disman/event/mteObjectsConf) +config_exclude(disman/event/mteScalars); +config_exclude(disman/event/mteTrigger); +config_exclude(disman/event/mteTriggerTable); +config_exclude(disman/event/mteTriggerDeltaTable); +config_exclude(disman/event/mteTriggerExistenceTable); +config_exclude(disman/event/mteTriggerBooleanTable); +config_exclude(disman/event/mteTriggerThresholdTable); +config_exclude(disman/event/mteTriggerConf); +config_exclude(disman/event/mteEvent); +config_exclude(disman/event/mteEventTable); +config_exclude(disman/event/mteEventSetTable); +config_exclude(disman/event/mteEventNotificationTable); +config_exclude(disman/event/mteEventConf); +config_exclude(disman/event/mteObjects); +config_exclude(disman/event/mteObjectsTable); +config_exclude(disman/event/mteObjectsConf); diff --git a/agent/mibgroup/disman/ping-mib.h b/agent/mibgroup/disman/ping-mib.h index 640b37f..d969c9c 100644 --- a/agent/mibgroup/disman/ping-mib.h +++ b/agent/mibgroup/disman/ping-mib.h @@ -14,7 +14,7 @@ /* * wrapper for the disman ping mib code files */ -config_require(disman/ping/pingCtlTable) -config_require(disman/ping/pingResultsTable) -config_require(disman/ping/pingProbeHistoryTable) -config_add_mib(DISMAN-PING-MIB) +config_require(disman/ping/pingCtlTable); +config_require(disman/ping/pingResultsTable); +config_require(disman/ping/pingProbeHistoryTable); +config_add_mib(DISMAN-PING-MIB); diff --git a/agent/mibgroup/disman/ping/pingCtlTable.c b/agent/mibgroup/disman/ping/pingCtlTable.c index 87b09ef..79373d9 100644 --- a/agent/mibgroup/disman/ping/pingCtlTable.c +++ b/agent/mibgroup/disman/ping/pingCtlTable.c @@ -21,10 +21,10 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -36,8 +36,9 @@ #include #include -#include +#include #include +#include #include #include "pingCtlTable.h" @@ -45,18 +46,39 @@ #include "pingProbeHistoryTable.h" #include "header_complex.h" -static inline void tvsub(struct timeval *, struct timeval *); -static inline int schedule_exit(int, int *, long *, long *, long *, long *); -static inline int in_flight(__u16 *, long *, long *, long *); -static inline void acknowledge(__u16, __u16 *, long *, int *); -static inline void advance_ntransmitted(__u16 *, long *); -static inline void update_interval(int, int, int *, int *); +NETSNMP_STATIC_INLINE void tvsub(struct timeval *, struct timeval *); +NETSNMP_STATIC_INLINE int schedule_exit(int, int *, long *, long *, long *, long *); +NETSNMP_STATIC_INLINE int in_flight(__u16 *, long *, long *, long *); +NETSNMP_STATIC_INLINE void acknowledge(__u16, __u16 *, long *, int *); +NETSNMP_STATIC_INLINE void advance_ntransmitted(__u16 *, long *); +NETSNMP_STATIC_INLINE void update_interval(int, int, int *, int *); static long llsqrt(long long); static __inline__ int ipv6_addr_any(struct in6_addr *); static char *pr_addr(struct in6_addr *, int); static char *pr_addr_n(struct in6_addr *); void pingCtlTable_cleaner(struct header_complex_index *thestuff); +static char rcvd_tbl[MAX_DUP_CHK / 8]; + +static struct proto { + int (*fproc) (char *, ssize_t, struct timeval *, time_t, + struct pingCtlTable_data *, + struct addrinfo *, int, unsigned long *, + unsigned long *, unsigned long *, + unsigned long *, unsigned long, int, int, + int, struct pingProbeHistoryTable_data *, + pid_t); + void (*fsend) (int, pid_t, int, int, char *); + struct sockaddr *sasend; /* sockaddr{} for send, from getaddrinfo */ + struct sockaddr *sarecv; /* sockaddr{} for receiving */ + socklen_t salen; /* length of sockaddr{}s */ + int icmpproto; /* IPPROTO_xxx value for ICMP */ +} *pr; + +static volatile int exiting; +static volatile int status_snapshot; + + /* *pingCtlTable_variables_oid: * @@ -507,6 +529,7 @@ parse_pingCtlTable(const char *token, char *line) &StorageTmp->pingCtlSourceAddressLen); if (StorageTmp->pingCtlSourceAddress == NULL) { config_perror("invalid specification for pingCtlSourceAddress"); + free(StorageTmp); return; } @@ -1012,6 +1035,7 @@ sock_ntop_host(const struct sockaddr *sa, socklen_t salen) } +#if 0 char * Sock_ntop_host(const struct sockaddr *sa, socklen_t salen) { @@ -1023,6 +1047,7 @@ Sock_ntop_host(const struct sockaddr *sa, socklen_t salen) } return (ptr); } +#endif @@ -1083,6 +1108,7 @@ host_serv(const char *host, const char *serv, int family, int socktype) * end host_serv */ +#if 0 /* * There is no easy way to pass back the integer return code from * getaddrinfo() in the function above, short of adding another argument @@ -1102,7 +1128,7 @@ Host_serv(const char *host, const char *serv, int family, int socktype) hints.ai_socktype = socktype; /* 0, SOCK_STREAM, SOCK_DGRAM, etc. */ if ((n = netsnmp_getaddrinfo(host, serv, &hints, &res)) != 0) { -#if HAVE_GAI_STRERROR +#ifdef HAVE_GAI_STRERROR snmp_log(LOG_ERR, "host_serv error for %s, %s: %s", (host == NULL) ? "(no hostname)" : host, (serv == NULL) ? "(no service name)" : serv, @@ -1116,6 +1142,7 @@ Host_serv(const char *host, const char *serv, int family, int socktype) return (res); /* return pointer to first on linked list */ } +#endif int readable_timeo(int fd, int sec) @@ -1306,7 +1333,8 @@ readloop(struct pingCtlTable_data *item, struct addrinfo *ai, int datalen, snmp_log_perror("pingCtlTable: failed to create socket"); return; } - setuid(getuid()); /* don't need special permissions any more */ + /* don't need special permissions any more */ + NETSNMP_IGNORE_RESULT(setuid(getuid())); tv.tv_sec = 5; tv.tv_usec = 0; @@ -1386,9 +1414,12 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep, ip = (struct ip *) ptr; /* start of IP header */ hlen1 = ip->ip_hl << 2; /* length of IP header */ - icmp = (struct icmp *) (ptr + hlen1); /* start of ICMP header */ - if ((icmplen = len - hlen1) < 8) + if ((icmplen = len - hlen1) < 8) { DEBUGMSGTL(("pingCtlTable", "icmplen (%d) < 8", icmplen)); + return SNMP_ERR_BADVALUE; + } + + icmp = (struct icmp *) (ptr + hlen1); /* start of ICMP header */ DEBUGMSGTL(("pingCtlTable", "ICMP type = %d (%sa reply)\n", icmp->icmp_type, @@ -1400,8 +1431,10 @@ proc_v4(char *ptr, ssize_t len, struct timeval *tvrecv, time_t timep, return SNMP_ERR_NOERROR; } - if (icmplen < 16) + if (icmplen < 16) { DEBUGMSGTL(("pingCtlTable", "icmplen (%d) < 16", icmplen)); + return SNMP_ERR_BADVALUE; + } tvsend = (struct timeval *) icmp->icmp_data; @@ -1790,7 +1823,7 @@ run_ping(unsigned int clientreg, void *clientarg) socket_errno = errno; uid = getuid(); - setuid(uid); + NETSNMP_IGNORE_RESULT(setuid(uid)); source.sin6_family = AF_INET6; memset(&firsthop, 0, sizeof(firsthop)); @@ -1944,6 +1977,7 @@ run_ping(unsigned int clientreg, void *clientarg) sz_opt); if (err < 0) { perror("setsockopt(RAW_CHECKSUM)"); + free(packet); return; } @@ -1967,6 +2001,7 @@ run_ping(unsigned int clientreg, void *clientarg) if (err < 0) { perror("setsockopt(ICMP6_FILTER)"); + free(packet); return; } @@ -1975,6 +2010,7 @@ run_ping(unsigned int clientreg, void *clientarg) if (setsockopt(icmp_sock, IPPROTO_IPV6, IPV6_HOPLIMIT, &on, sizeof(on)) == -1) { perror("can't receive hop limit"); + free(packet); return; } } @@ -4409,7 +4445,7 @@ write_pingCtlRowStatus(int action, } -static inline void +NETSNMP_STATIC_INLINE void tvsub(struct timeval *out, struct timeval *in) { if ((out->tv_usec -= in->tv_usec) < 0) { @@ -4420,7 +4456,7 @@ tvsub(struct timeval *out, struct timeval *in) } -static inline int +NETSNMP_STATIC_INLINE int schedule_exit(int next, int *deadline, long *npackets, long *nreceived, long *ntransmitted, long *tmax) { @@ -4429,7 +4465,7 @@ schedule_exit(int next, int *deadline, long *npackets, long *nreceived, return next; } -static inline int +NETSNMP_STATIC_INLINE int in_flight(__u16 * acked, long *nreceived, long *ntransmitted, long *nerrors) { @@ -4438,7 +4474,7 @@ in_flight(__u16 * acked, long *nreceived, long *ntransmitted, 0x7FFF) ? diff : (*ntransmitted) - (*nreceived) - (*nerrors); } -static inline void +NETSNMP_STATIC_INLINE void acknowledge(__u16 seq, __u16 * acked, long *ntransmitted, int *pipesize) { __u16 diff = (__u16) (*ntransmitted) - seq; @@ -4451,7 +4487,7 @@ acknowledge(__u16 seq, __u16 * acked, long *ntransmitted, int *pipesize) } } -static inline void +NETSNMP_STATIC_INLINE void advance_ntransmitted(__u16 * acked, long *ntransmitted) { (*ntransmitted)++; @@ -4463,7 +4499,7 @@ advance_ntransmitted(__u16 * acked, long *ntransmitted) } -static inline void +NETSNMP_STATIC_INLINE void update_interval(int uid, int interval, int *rtt_addend, int *rtt) { int est = (*rtt) ? (*rtt) / 8 : interval * 1000; @@ -4585,7 +4621,7 @@ pinger(int icmp_sock, int preload, int cmsglen, char *cmsgbuf, && (*pipesize) < (*screen_width)) || in_flight(acked, nreceived, ntransmitted, nerrors) < (*screen_width)) - write(STDOUT_FILENO, ".", 1); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, ".", 1)); } return interval - tokens; @@ -4647,7 +4683,7 @@ pinger(int icmp_sock, int preload, int cmsglen, char *cmsgbuf, if (i == 0 && !(options & F_QUIET)) { if (options & F_FLOOD) - write(STDOUT_FILENO, "E", 1); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, "E", 1)); else perror("ping: sendmsg"); } @@ -4666,10 +4702,8 @@ sock_setbufs(int icmp_sock, int alloc, int preload) { int rcvbuf, hold; socklen_t tmplen = sizeof(hold); - int sndbuf; + int sndbuf = alloc; - if (!sndbuf) - sndbuf = alloc; setsockopt(icmp_sock, SOL_SOCKET, SO_SNDBUF, (char *) &sndbuf, sizeof(sndbuf)); @@ -4960,6 +4994,7 @@ main_loop(struct pingCtlTable_data *item, int icmp_sock, int preload, msg.msg_iovlen = 1; msg.msg_control = ans_data; msg.msg_controllen = sizeof(ans_data); + msg.msg_flags = 0; cc = recvmsg(icmp_sock, &msg, polling); time_t timep; @@ -5244,9 +5279,9 @@ gather_statistics(int *series, struct pingCtlTable_data *item, __u8 * ptr, if (options & F_FLOOD) { if (!csfailed) - write(STDOUT_FILENO, "\b \b", 3); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, "\b \b", 3)); else - write(STDOUT_FILENO, "\bC", 1); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, "\bC", 1)); } else { int i; __u8 *cp, *dp; @@ -5568,7 +5603,7 @@ receive_error_msg(int icmp_sock, struct sockaddr_in6 *whereto, int options, if (options & F_QUIET) goto out; if (options & F_FLOOD) - write(STDOUT_FILENO, "E", 1); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, "E", 1)); else if (e->ee_errno != EMSGSIZE) snmp_log(LOG_ERR, "ping: local error: %s\n", strerror(e->ee_errno)); else @@ -5592,7 +5627,7 @@ receive_error_msg(int icmp_sock, struct sockaddr_in6 *whereto, int options, if (options & F_QUIET) goto out; if (options & F_FLOOD) { - write(STDOUT_FILENO, "\bE", 2); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, "\bE", 2)); } else { fflush(stdout); } @@ -5639,6 +5674,7 @@ send_v6(int icmp_sock, int cmsglen, char *cmsgbuf, iov.iov_len = cc; iov.iov_base = outpack; + memset(&mhdr, 0, sizeof(mhdr)); mhdr.msg_name = whereto; mhdr.msg_namelen = sizeof(struct sockaddr_in6); mhdr.msg_iov = &iov; @@ -5745,7 +5781,7 @@ parse_reply(int *series, struct pingCtlTable_data *item, return 0; (*nerrors)++; if (options & F_FLOOD) { - write(STDOUT_FILENO, "\bE", 2); + NETSNMP_IGNORE_RESULT(write(STDOUT_FILENO, "\bE", 2)); return 0; } DEBUGMSGTL(("pingCtlTable", "From %s: icmp_seq=%u ", diff --git a/agent/mibgroup/disman/ping/pingCtlTable.h b/agent/mibgroup/disman/ping/pingCtlTable.h index ca69d13..9c7b18e 100644 --- a/agent/mibgroup/disman/ping/pingCtlTable.h +++ b/agent/mibgroup/disman/ping/pingCtlTable.h @@ -82,10 +82,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -201,6 +201,9 @@ struct pingProbeHistoryTable_data { }; +extern struct header_complex_index *pingCtlTableStorage; +extern struct header_complex_index *pingResultsTableStorage; +extern struct header_complex_index *pingProbeHistoryTableStorage; /* * function declarations @@ -285,20 +288,6 @@ void readloop(struct pingCtlTable_data *, struct addrinfo *, void sig_alrm(int); void tv_sub(struct timeval *, struct timeval *); unsigned long round_double(double); -struct proto { - int (*fproc) (char *, ssize_t, struct timeval *, time_t, - struct pingCtlTable_data *, - struct addrinfo *, int, unsigned long *, - unsigned long *, unsigned long *, - unsigned long *, unsigned long, int, int, - int, struct pingProbeHistoryTable_data *, - pid_t); - void (*fsend) (int, pid_t, int, int, char *); - struct sockaddr *sasend; /* sockaddr{} for send, from getaddrinfo */ - struct sockaddr *sarecv; /* sockaddr{} for receiving */ - socklen_t salen; /* length of sockaddr{}s */ - int icmpproto; /* IPPROTO_xxx value for ICMP */ -} *pr; /* @@ -337,10 +326,7 @@ struct proto { #define MAX_DUP_CHK 0x10000 -char rcvd_tbl[MAX_DUP_CHK / 8]; -volatile int exiting; -volatile int status_snapshot; #ifndef MSG_CONFIRM #define MSG_CONFIRM 0 diff --git a/agent/mibgroup/disman/ping/pingProbeHistoryTable.c b/agent/mibgroup/disman/ping/pingProbeHistoryTable.c index 78c75be..4dcba0c 100644 --- a/agent/mibgroup/disman/ping/pingProbeHistoryTable.c +++ b/agent/mibgroup/disman/ping/pingProbeHistoryTable.c @@ -16,10 +16,10 @@ /* * This should always be included first before anything else */ -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -61,27 +61,24 @@ struct variable2 pingProbeHistoryTable_variables[] = { }; -/* - * global storage of our data, saved in and configured by header_complex() - */ - -extern struct header_complex_index *pingCtlTableStorage; -extern struct header_complex_index *pingProbeHistoryTableStorage; int pingProbeHistoryTable_inadd(struct pingProbeHistoryTable_data *thedata); +#if 0 void pingProbeHistoryTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; + struct header_complex_index *hciptr, *nhciptr; DEBUGMSGTL(("pingProbeHistoryTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; header_complex_extract_entry(&pingProbeHistoryTableStorage, hciptr); DEBUGMSGTL(("pingProbeHistoryTable", "cleaner ")); } - } +#endif + void init_pingProbeHistoryTable(void) { @@ -137,6 +134,7 @@ parse_pingProbeHistoryTable(const char *token, char *line) &StorageTmp->pingCtlOwnerIndexLen); if (StorageTmp->pingCtlOwnerIndex == NULL) { config_perror("invalid specification for pingCtlOwnerIndex"); + free(StorageTmp); return; } @@ -146,6 +144,7 @@ parse_pingProbeHistoryTable(const char *token, char *line) &StorageTmp->pingCtlTestNameLen); if (StorageTmp->pingCtlTestName == NULL) { config_perror("invalid specification for pingCtlTestName"); + free(StorageTmp); return; } @@ -171,6 +170,7 @@ parse_pingProbeHistoryTable(const char *token, char *line) &StorageTmp->pingProbeHistoryTimeLen); if (StorageTmp->pingProbeHistoryTime == NULL) { config_perror("invalid specification for pingProbeHistoryTime"); + free(StorageTmp); return; } diff --git a/agent/mibgroup/disman/ping/pingResultsTable.c b/agent/mibgroup/disman/ping/pingResultsTable.c index 1445d86..c583847 100644 --- a/agent/mibgroup/disman/ping/pingResultsTable.c +++ b/agent/mibgroup/disman/ping/pingResultsTable.c @@ -16,10 +16,10 @@ * This should always be included first before anything else */ -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -72,29 +72,24 @@ struct variable2 pingResultsTable_variables[] = { }; - - -/* - * global storage of our data, saved in and configured by header_complex() - */ - -extern struct header_complex_index *pingCtlTableStorage; -extern struct header_complex_index *pingResultsTableStorage; int pingResultsTable_inadd(struct pingResultsTable_data *thedata); +#if 0 void pingResultsTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr; + struct header_complex_index *hciptr, *nhciptr; DEBUGMSGTL(("pingResultsTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; header_complex_extract_entry(&pingResultsTableStorage, hciptr); DEBUGMSGTL(("pingResultsTable", "cleaner ")); } - } +#endif + void init_pingResultsTable(void) { diff --git a/agent/mibgroup/disman/schedule.h b/agent/mibgroup/disman/schedule.h index a3351b6..392f2e0 100644 --- a/agent/mibgroup/disman/schedule.h +++ b/agent/mibgroup/disman/schedule.h @@ -1,3 +1,3 @@ -config_require(disman/schedule/schedCore) -config_require(disman/schedule/schedConf) -config_require(disman/schedule/schedTable) +config_require(disman/schedule/schedCore); +config_require(disman/schedule/schedConf); +config_require(disman/schedule/schedTable); diff --git a/agent/mibgroup/disman/schedule/schedConf.c b/agent/mibgroup/disman/schedule/schedConf.c index 0cbdbc6..218973d 100644 --- a/agent/mibgroup/disman/schedule/schedConf.c +++ b/agent/mibgroup/disman/schedule/schedConf.c @@ -11,8 +11,8 @@ #include "disman/schedule/schedCore.h" #include "disman/schedule/schedConf.h" -netsnmp_feature_require(iquery) -netsnmp_feature_require(string_time_to_secs) +netsnmp_feature_require(iquery); +netsnmp_feature_require(string_time_to_secs); static int schedEntries; diff --git a/agent/mibgroup/disman/schedule/schedConf.h b/agent/mibgroup/disman/schedule/schedConf.h index 91f4965..cec9c8d 100644 --- a/agent/mibgroup/disman/schedule/schedConf.h +++ b/agent/mibgroup/disman/schedule/schedConf.h @@ -1,7 +1,7 @@ #ifndef SCHEDCONF_H #define SCHEDCONF_H -config_require(disman/schedule/schedCore) +config_require(disman/schedule/schedCore); /* * function declarations diff --git a/agent/mibgroup/disman/schedule/schedCore.c b/agent/mibgroup/disman/schedule/schedCore.c index c3db34f..f9dcc32 100644 --- a/agent/mibgroup/disman/schedule/schedCore.c +++ b/agent/mibgroup/disman/schedule/schedCore.c @@ -10,9 +10,9 @@ #include "disman/schedule/schedCore.h" #include "utilities/iquery.h" -netsnmp_feature_require(iquery) +netsnmp_feature_require(iquery); -netsnmp_feature_child_of(sched_nextrowtime, netsnmp_unused) +netsnmp_feature_child_of(sched_nextrowtime, netsnmp_unused); netsnmp_tdata *schedule_table; @@ -312,8 +312,8 @@ sched_nextTime( struct schedTable_entry *entry ) ctime(&entry->schedNextRun))); return; } - /* Fallthrough */ DEBUGMSGTL(("disman:schedule:time", "one-shot: fallthrough\n")); + /* FALL THROUGH */ case SCHED_TYPE_CALENDAR: /* * Check for complete time specification @@ -454,6 +454,7 @@ schedTable_createEntry(const char *schedOwner, const char *schedName) { struct schedTable_entry *entry; netsnmp_tdata_row *row; + int len; DEBUGMSGTL(("disman:schedule:entry", "creating entry (%s, %s)\n", schedOwner, schedName)); @@ -472,16 +473,20 @@ schedTable_createEntry(const char *schedOwner, const char *schedName) * data structure, and in the table_data helper. */ if (schedOwner) { - memcpy(entry->schedOwner, schedOwner, strlen(schedOwner)); - netsnmp_tdata_row_add_index(row, ASN_OCTET_STR, - entry->schedOwner, strlen(schedOwner)); + len = strlen(schedOwner); + if (len > sizeof(entry->schedOwner)) + len = sizeof(entry->schedOwner); + memcpy(entry->schedOwner, schedOwner, len); + netsnmp_tdata_row_add_index(row, ASN_OCTET_STR, entry->schedOwner, len); } else netsnmp_tdata_row_add_index(row, ASN_OCTET_STR, "", 0 ); - memcpy( entry->schedName, schedName, strlen(schedName)); - netsnmp_tdata_row_add_index(row, ASN_OCTET_STR, - entry->schedName, strlen(schedName)); + len = strlen(schedName); + if (len > sizeof(entry->schedName)) + len = sizeof(entry->schedName); + memcpy(entry->schedName, schedName, len); + netsnmp_tdata_row_add_index(row, ASN_OCTET_STR, entry->schedName, len); /* * Set the (non-zero) default values in the row data structure. */ diff --git a/agent/mibgroup/disman/schedule/schedCore.h b/agent/mibgroup/disman/schedule/schedCore.h index 35866d7..d753b9c 100644 --- a/agent/mibgroup/disman/schedule/schedCore.h +++ b/agent/mibgroup/disman/schedule/schedCore.h @@ -1,7 +1,7 @@ #ifndef SCHEDCORE_H #define SCHEDCORE_H -config_require(utilities/iquery) +config_require(utilities/iquery); /* * Values for schedType field diff --git a/agent/mibgroup/disman/schedule/schedTable.c b/agent/mibgroup/disman/schedule/schedTable.c index bba48fd..b2d8aaf 100644 --- a/agent/mibgroup/disman/schedule/schedTable.c +++ b/agent/mibgroup/disman/schedule/schedTable.c @@ -14,16 +14,16 @@ #include "disman/schedule/schedCore.h" #include "disman/schedule/schedTable.h" -netsnmp_feature_require(iquery) -netsnmp_feature_require(iquery_pdu_session) -netsnmp_feature_require(table_tdata) -netsnmp_feature_require(date_n_time) -netsnmp_feature_require(check_vb_uint) +netsnmp_feature_require(iquery); +netsnmp_feature_require(iquery_pdu_session); +netsnmp_feature_require(table_tdata); +netsnmp_feature_require(date_n_time); +netsnmp_feature_require(check_vb_uint); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_oid) -netsnmp_feature_require(check_vb_truthvalue) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_oid); +netsnmp_feature_require(check_vb_truthvalue); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ static netsnmp_table_registration_info *table_info; diff --git a/agent/mibgroup/disman/schedule/schedTable.h b/agent/mibgroup/disman/schedule/schedTable.h index 52033ba..b899f0b 100644 --- a/agent/mibgroup/disman/schedule/schedTable.h +++ b/agent/mibgroup/disman/schedule/schedTable.h @@ -1,8 +1,8 @@ #ifndef SCHEDTABLE_H #define SCHEDTABLE_H -config_require(disman/schedule/schedCore) -config_add_mib(DISMAN-SCHEDULE-MIB) +config_require(disman/schedule/schedCore); +config_add_mib(DISMAN-SCHEDULE-MIB); /* * function declarations diff --git a/agent/mibgroup/disman/traceroute-mib.h b/agent/mibgroup/disman/traceroute-mib.h index b33d69e..238dbdb 100644 --- a/agent/mibgroup/disman/traceroute-mib.h +++ b/agent/mibgroup/disman/traceroute-mib.h @@ -14,8 +14,8 @@ /* * wrapper for the disman traceroute mib code files */ -config_require(disman/traceroute/traceRouteCtlTable) -config_require(disman/traceroute/traceRouteResultsTable) -config_require(disman/traceroute/traceRouteProbeHistoryTable) -config_require(disman/traceroute/traceRouteHopsTable) -config_add_mib(DISMAN-TRACEROUTE-MIB) +config_require(disman/traceroute/traceRouteCtlTable); +config_require(disman/traceroute/traceRouteResultsTable); +config_require(disman/traceroute/traceRouteProbeHistoryTable); +config_require(disman/traceroute/traceRouteHopsTable); +config_add_mib(DISMAN-TRACEROUTE-MIB); diff --git a/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c b/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c index b925c5e..8de9709 100644 --- a/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c +++ b/agent/mibgroup/disman/traceroute/traceRouteCtlTable.c @@ -22,9 +22,10 @@ #include #include #include +#include #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ #include "traceRouteCtlTable.h" @@ -108,6 +109,8 @@ struct header_complex_index *traceRouteResultsTableStorage = NULL; struct header_complex_index *traceRouteProbeHistoryTableStorage = NULL; struct header_complex_index *traceRouteHopsTableStorage = NULL; +static char * +findsaddr(const struct sockaddr_in *to, struct sockaddr_in *from); int traceRouteResultsTable_add(struct traceRouteCtlTable_data *thedata); int @@ -138,6 +141,110 @@ init_traceRouteCtlTable(void) DEBUGMSGTL(("traceRouteCtlTable", "done.\n")); } +static void +init_trResultsTable_ipv4(char *host, + struct traceRouteResultsTable_data *StorageTmp) +{ + struct sockaddr whereto; /* Who to try to reach */ + struct sockaddr_in *to = (struct sockaddr_in *) &whereto; + struct hostinfo *hi; + + hi = gethostinfo(host); + if (hi == NULL) { + DEBUGMSGTL(("traceRouteCtlTable", "hi calloc %s\n", + strerror(errno))); + exit(1); + } + + setsin(to, hi->addrs[0]); + if (inet_ntoa(to->sin_addr) == NULL) { + StorageTmp->traceRouteResultsIpTgtAddrType = 0; + StorageTmp->traceRouteResultsIpTgtAddr = strdup(""); + StorageTmp->traceRouteResultsIpTgtAddrLen = 0; + } else { + StorageTmp->traceRouteResultsIpTgtAddrType = 1; + StorageTmp->traceRouteResultsIpTgtAddr = + (char *) malloc(sizeof(char) * + (strlen(inet_ntoa(to->sin_addr)) + 1)); + if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { + DEBUGMSGTL(("traceRouteCtlTable", + "traceRouteResultsIpTgtAddr malloc %s\n", + strerror(errno))); + exit(1); + } + + memcpy(StorageTmp->traceRouteResultsIpTgtAddr, inet_ntoa(to->sin_addr), + strlen(inet_ntoa(to->sin_addr)) + 1); + StorageTmp->traceRouteResultsIpTgtAddr[strlen(inet_ntoa(to->sin_addr))] + = '\0'; + StorageTmp->traceRouteResultsIpTgtAddrLen = + strlen(inet_ntoa(to->sin_addr)); + } + freehostinfo(hi); +} + +static void +init_trResultsTable_ipv6(char *host, + struct traceRouteResultsTable_data *StorageTmp) +{ + struct sockaddr_in6 whereto; /* Who to try to reach */ + struct sockaddr_in6 *to = (struct sockaddr_in6 *) &whereto; + struct hostent *hp = NULL; + /* struct hostenv hp; */ + char pa[64]; + + memset(pa, '\0', 64); + + to->sin6_family = AF_INET6; + to->sin6_port = htons(33434); + + if (inet_pton(AF_INET6, host, &to->sin6_addr) > 0) { + StorageTmp->traceRouteResultsIpTgtAddrType = 2; + StorageTmp->traceRouteResultsIpTgtAddr = + (char *) malloc(sizeof(char) * (strlen(host) + 1)); + if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { + DEBUGMSGTL(("traceRouteCtlTable", + "traceRouteResultsIpTgtAddr malloc %s\n", + strerror(errno))); + exit(1); + } + memset(StorageTmp->traceRouteResultsIpTgtAddr, '\0', + sizeof(char) * (strlen(host) + 1)); + memcpy(StorageTmp->traceRouteResultsIpTgtAddr, host, strlen(host) + 1); + StorageTmp->traceRouteResultsIpTgtAddr[strlen(host)] = '\0'; + StorageTmp->traceRouteResultsIpTgtAddrLen = strlen(host); + } else { + hp = gethostbyname2(host, AF_INET6); + if (hp != NULL) { + const char *hostname; + + memmove((caddr_t) & to->sin6_addr, hp->h_addr, 16); + hostname = inet_ntop(AF_INET6, &to->sin6_addr, pa, 64); + StorageTmp->traceRouteResultsIpTgtAddrType = 2; + StorageTmp->traceRouteResultsIpTgtAddr = + (char *) malloc(sizeof(char) * (strlen(hostname) + 1)); + if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { + DEBUGMSGTL(("traceRouteCtlTable", + "traceRouteResultsIpTgtAddr malloc %s\n", + strerror(errno))); + exit(1); + } + memset(StorageTmp->traceRouteResultsIpTgtAddr, '\0', + sizeof(char) * (strlen(host) + 1)); + memcpy(StorageTmp->traceRouteResultsIpTgtAddr, hostname, + strlen(hostname) + 1); + StorageTmp->traceRouteResultsIpTgtAddr[strlen(hostname)] = '\0'; + StorageTmp->traceRouteResultsIpTgtAddrLen = strlen(hostname); + } else { + DEBUGMSGTL(("traceRouteCtlTable", + "traceroute: unknown host %s\n", host)); + + StorageTmp->traceRouteResultsIpTgtAddrType = 0; + StorageTmp->traceRouteResultsIpTgtAddr = strdup(""); + StorageTmp->traceRouteResultsIpTgtAddrLen = 0; + } + } +} void init_trResultsTable(struct traceRouteCtlTable_data *item) @@ -203,106 +310,14 @@ init_trResultsTable(struct traceRouteCtlTable_data *item) StorageTmp->traceRouteResultsOperStatus = 1; - if (item->traceRouteCtlTargetAddressType == 1 - || item->traceRouteCtlTargetAddressType == 16) { - struct sockaddr whereto; /* Who to try to reach */ - register struct sockaddr_in *to = (struct sockaddr_in *) &whereto; - register struct hostinfo *hi = NULL; - hi = gethostinfo(host); - if (hi == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", "hi calloc %s\n", - strerror(errno))); - exit(1); - } - - setsin(to, hi->addrs[0]); - if (inet_ntoa(to->sin_addr) == NULL) { - StorageTmp->traceRouteResultsIpTgtAddrType = 0; - StorageTmp->traceRouteResultsIpTgtAddr = strdup(""); - StorageTmp->traceRouteResultsIpTgtAddrLen = 0; - } else { - StorageTmp->traceRouteResultsIpTgtAddrType = 1; - StorageTmp->traceRouteResultsIpTgtAddr = - (char *) malloc(sizeof(char) * - (strlen(inet_ntoa(to->sin_addr)) + 1)); - if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - "traceRouteResultsIpTgtAddr malloc %s\n", - strerror(errno))); - exit(1); - } - - memcpy(StorageTmp->traceRouteResultsIpTgtAddr, - inet_ntoa(to->sin_addr), - strlen(inet_ntoa(to->sin_addr)) + 1); - StorageTmp-> - traceRouteResultsIpTgtAddr[strlen(inet_ntoa(to->sin_addr))] - = '\0'; - StorageTmp->traceRouteResultsIpTgtAddrLen = - strlen(inet_ntoa(to->sin_addr)); - } - } - if (item->traceRouteCtlTargetAddressType == 2) { - - struct sockaddr_in6 whereto; /* Who to try to reach */ - register struct sockaddr_in6 *to = - (struct sockaddr_in6 *) &whereto; - struct hostent *hp = NULL; - /* struct hostenv hp; */ - char pa[64]; - memset(pa, '\0', 64); - - to->sin6_family = AF_INET6; - to->sin6_port = htons(33434); - - if (inet_pton(AF_INET6, host, &to->sin6_addr) > 0) { - StorageTmp->traceRouteResultsIpTgtAddrType = 2; - StorageTmp->traceRouteResultsIpTgtAddr = - (char *) malloc(sizeof(char) * (strlen(host) + 1)); - if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - "traceRouteResultsIpTgtAddr malloc %s\n", - strerror(errno))); - exit(1); - } - memset(StorageTmp->traceRouteResultsIpTgtAddr, '\0', - sizeof(char) * (strlen(host) + 1)); - memcpy(StorageTmp->traceRouteResultsIpTgtAddr, host, - strlen(host) + 1); - StorageTmp->traceRouteResultsIpTgtAddr[strlen(host)] = '\0'; - StorageTmp->traceRouteResultsIpTgtAddrLen = strlen(host); - } else { - hp = gethostbyname2(host, AF_INET6); - if (hp != NULL) { - const char *hostname; - memmove((caddr_t) & to->sin6_addr, hp->h_addr, 16); - hostname = inet_ntop(AF_INET6, &to->sin6_addr, pa, 64); - StorageTmp->traceRouteResultsIpTgtAddrType = 2; - StorageTmp->traceRouteResultsIpTgtAddr = - (char *) malloc(sizeof(char) * (strlen(hostname) + 1)); - if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - "traceRouteResultsIpTgtAddr malloc %s\n", - strerror(errno))); - exit(1); - } - memset(StorageTmp->traceRouteResultsIpTgtAddr, '\0', - sizeof(char) * (strlen(host) + 1)); - memcpy(StorageTmp->traceRouteResultsIpTgtAddr, hostname, - strlen(hostname) + 1); - StorageTmp->traceRouteResultsIpTgtAddr[strlen(hostname)] = - '\0'; - StorageTmp->traceRouteResultsIpTgtAddrLen = - strlen(hostname); - } else { - DEBUGMSGTL(("traceRouteCtlTable", - "traceroute: unknown host %s\n", host)); - - StorageTmp->traceRouteResultsIpTgtAddrType = 0; - StorageTmp->traceRouteResultsIpTgtAddr = strdup(""); - StorageTmp->traceRouteResultsIpTgtAddrLen = 0; - } - } + switch (item->traceRouteCtlTargetAddressType) { + case 1: + case 16: + init_trResultsTable_ipv4(host, StorageTmp); + break; + case 2: + init_trResultsTable_ipv6(host, StorageTmp); + break; } StorageTmp->traceRouteResultsCurHopCount = 0; @@ -327,7 +342,7 @@ init_trResultsTable(struct traceRouteCtlTable_data *item) "init an entry error\n")); } } - + free(host); } @@ -563,10 +578,8 @@ traceRouteProbeHistoryTable_addall(struct traceRouteCtlTable_data *thedata) p = p->next; } while (p != NULL); - else { - return SNMP_ERR_INCONSISTENTNAME; - } + return SNMP_ERR_INCONSISTENTNAME; } @@ -755,33 +768,25 @@ traceRouteProbeHistoryTable_delLast(struct traceRouteCtlTable_data void traceRouteCtlTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; - struct traceRouteCtlTable_data *StorageDel = NULL; + struct header_complex_index *hciptr, *nhciptr; + struct traceRouteCtlTable_data *StorageDel; + DEBUGMSGTL(("traceRouteCtlTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; StorageDel = header_complex_extract_entry(&traceRouteCtlTableStorage, hciptr); if (StorageDel != NULL) { free(StorageDel->traceRouteCtlOwnerIndex); - StorageDel->traceRouteCtlOwnerIndex = NULL; free(StorageDel->traceRouteCtlTestName); - StorageDel->traceRouteCtlTestName = NULL; free(StorageDel->traceRouteCtlTargetAddress); - StorageDel->traceRouteCtlTargetAddress = NULL; free(StorageDel->traceRouteCtlSourceAddress); - StorageDel->traceRouteCtlSourceAddress = NULL; free(StorageDel->traceRouteCtlMiscOptions); - StorageDel->traceRouteCtlMiscOptions = NULL; free(StorageDel->traceRouteCtlDescr); - StorageDel->traceRouteCtlDescr = NULL; free(StorageDel->traceRouteCtlTrapGeneration); - StorageDel->traceRouteCtlTrapGeneration = NULL; free(StorageDel->traceRouteCtlType); - StorageDel->traceRouteCtlType = NULL; free(StorageDel); - StorageDel = NULL; - } DEBUGMSGTL(("traceRouteCtlTable", "cleaner ")); } @@ -814,6 +819,7 @@ parse_traceRouteCtlTable(const char *token, char *line) &StorageTmp->traceRouteCtlOwnerIndexLen); if (StorageTmp->traceRouteCtlOwnerIndex == NULL) { config_perror("invalid specification for traceRouteCtlOwnerIndex"); + free(StorageTmp); return; } @@ -823,6 +829,7 @@ parse_traceRouteCtlTable(const char *token, char *line) &StorageTmp->traceRouteCtlTestNameLen); if (StorageTmp->traceRouteCtlTestName == NULL) { config_perror("invalid specification for traceRouteCtlTestName"); + free(StorageTmp); return; } @@ -838,6 +845,7 @@ parse_traceRouteCtlTable(const char *token, char *line) if (StorageTmp->traceRouteCtlTargetAddress == NULL) { config_perror ("invalid specification for traceRouteCtlTargetAddress"); + free(StorageTmp); return; } @@ -882,6 +890,7 @@ parse_traceRouteCtlTable(const char *token, char *line) if (StorageTmp->traceRouteCtlSourceAddress == NULL) { config_perror ("invalid specification for traceRouteCtlSourceAddress"); + free(StorageTmp); return; } @@ -896,6 +905,7 @@ parse_traceRouteCtlTable(const char *token, char *line) if (StorageTmp->traceRouteCtlMiscOptions == NULL) { config_perror ("invalid specification for traceRouteCtlMiscOptions"); + free(StorageTmp); return; } @@ -935,6 +945,7 @@ parse_traceRouteCtlTable(const char *token, char *line) &StorageTmp->traceRouteCtlDescrLen); if (StorageTmp->traceRouteCtlDescr == NULL) { config_perror("invalid specification for traceRouteCtlTrapDescr"); + free(StorageTmp); return; } @@ -949,6 +960,7 @@ parse_traceRouteCtlTable(const char *token, char *line) if (StorageTmp->traceRouteCtlTrapGeneration == NULL) { config_perror ("invalid specification for traceRouteCtlTrapGeneration"); + free(StorageTmp); return; } @@ -963,6 +975,7 @@ parse_traceRouteCtlTable(const char *token, char *line) &StorageTmp->traceRouteCtlTypeLen); if (StorageTmp->traceRouteCtlType == NULL) { config_perror("invalid specification for traceRouteCtlType"); + free(StorageTmp); return; } @@ -1349,7 +1362,7 @@ var_traceRouteCtlTable(struct variable *vp, int traceRouteResultsTable_del(struct traceRouteCtlTable_data *thedata) { - struct header_complex_index *hciptr2 = NULL; + struct header_complex_index *hciptr2, *nhciptr2; netsnmp_variable_list *vars = NULL; oid newoid[MAX_OID_LEN]; size_t newoid_len = 0; @@ -1360,8 +1373,8 @@ traceRouteResultsTable_del(struct traceRouteCtlTable_data *thedata) memset(newoid, '\0', sizeof(oid) * MAX_OID_LEN); header_complex_generate_oid(newoid, &newoid_len, NULL, 0, vars); - for (hciptr2 = traceRouteResultsTableStorage; hciptr2 != NULL; - hciptr2 = hciptr2->next) { + for (hciptr2 = traceRouteResultsTableStorage; hciptr2; hciptr2 = nhciptr2) { + nhciptr2 = hciptr2->next; if (snmp_oid_compare(newoid, newoid_len, hciptr2->name, newoid_len) == 0) { header_complex_extract_entry(&traceRouteResultsTableStorage, @@ -1380,7 +1393,7 @@ traceRouteResultsTable_del(struct traceRouteCtlTable_data *thedata) int traceRouteProbeHistoryTable_del(struct traceRouteCtlTable_data *thedata) { - struct header_complex_index *hciptr2 = NULL; + struct header_complex_index *hciptr2, *nhciptr2; netsnmp_variable_list *vars = NULL; oid newoid[MAX_OID_LEN]; size_t newoid_len = 0; @@ -1392,8 +1405,9 @@ traceRouteProbeHistoryTable_del(struct traceRouteCtlTable_data *thedata) header_complex_generate_oid(newoid, &newoid_len, NULL, 0, vars); - for (hciptr2 = traceRouteProbeHistoryTableStorage; hciptr2 != NULL; - hciptr2 = hciptr2->next) { + for (hciptr2 = traceRouteProbeHistoryTableStorage; hciptr2; + hciptr2 = nhciptr2) { + nhciptr2 = hciptr2->next; if (snmp_oid_compare(newoid, newoid_len, hciptr2->name, newoid_len) == 0) { header_complex_extract_entry(&traceRouteProbeHistoryTableStorage, @@ -1411,7 +1425,7 @@ traceRouteProbeHistoryTable_del(struct traceRouteCtlTable_data *thedata) int traceRouteHopsTable_del(struct traceRouteCtlTable_data *thedata) { - struct header_complex_index *hciptr2 = NULL; + struct header_complex_index *hciptr2, *nhciptr2; netsnmp_variable_list *vars = NULL; oid newoid[MAX_OID_LEN]; size_t newoid_len = 0; @@ -1423,13 +1437,12 @@ traceRouteHopsTable_del(struct traceRouteCtlTable_data *thedata) header_complex_generate_oid(newoid, &newoid_len, NULL, 0, vars); - for (hciptr2 = traceRouteHopsTableStorage; hciptr2 != NULL; - hciptr2 = hciptr2->next) { + for (hciptr2 = traceRouteHopsTableStorage; hciptr2; hciptr2 = nhciptr2) { + nhciptr2 = hciptr2->next; if (snmp_oid_compare(newoid, newoid_len, hciptr2->name, newoid_len) == 0) { header_complex_extract_entry(&traceRouteHopsTableStorage, hciptr2); DEBUGMSGTL(("traceRouteHopsTable", "delete success!\n")); - } } vars = NULL; @@ -4042,1545 +4055,1577 @@ write_traceRouteCtlRowStatus(int action, } -void -run_traceRoute(unsigned int clientreg, void *clientarg) +static void +run_traceRoute_ipv4(struct traceRouteCtlTable_data *item) { - struct traceRouteCtlTable_data *item = clientarg; - u_short port = item->traceRouteCtlPort; /* start udp dest port # for probe packets ൱ctlport */ - int waittime = item->traceRouteCtlTimeOut; /* time to wait for response (in seconds) ctltimeout */ + u_short port = item->traceRouteCtlPort; /* start udp dest port # for probe packets */ + int waittime = item->traceRouteCtlTimeOut; /* time to wait for response (in seconds) */ int nprobes = item->traceRouteCtlProbesPerHop; - - if (item->traceRouteCtlInitialTtl > item->traceRouteCtlMaxTtl) { - DEBUGMSGTL(("traceRouteCtlTable", - "first ttl (%lu) may not be greater than max ttl (%lu)\n", - item->traceRouteCtlInitialTtl, - item->traceRouteCtlMaxTtl)); - return; - } - char *old_HopsAddress[255]; int count = 0; int flag = 0; - if (item->traceRouteCtlTargetAddressType == 1 - || item->traceRouteCtlTargetAddressType == 16) { - register int code, n; - const char *cp; - register const char *err; - register u_char *outp; - register u_int32_t *ap; - struct sockaddr whereto; /* Who to try to reach */ - struct sockaddr wherefrom; /* Who we are */ - - register struct sockaddr_in *from = - (struct sockaddr_in *) &wherefrom; - register struct sockaddr_in *to = (struct sockaddr_in *) &whereto; - register struct hostinfo *hi; - int on = 1; - register struct protoent *pe; - register int ttl, probe, i; - register int seq = 0; - int tos = 0, settos = 0; - register int lsrr = 0; - register u_short off = 0; - struct ifaddrlist *al; - char errbuf[132]; - int minpacket = 0; /* min ip packet size */ - - - struct ip *outip; /* last output (udp) packet */ - struct udphdr *outudp; /* last output (udp) packet */ - int packlen = 0; /* total length of packet */ - int optlen = 0; /* length of ip options */ - int options = 0; /* socket options */ - int s; /* receive (icmp) socket file descriptor */ - int sndsock; /* send (udp/icmp) socket file descriptor */ - - u_short ident; - /* - * loose source route gateway list (including room for final destination) - */ - u_int32_t gwlist[NGATEWAYS + 1]; - static const char devnull[] = "/dev/null"; - char *device = NULL; - char *source = NULL; - char *hostname; - u_int pausemsecs = 0; - u_char packet[512]; /* last inbound (icmp) packet */ - - int pmtu = 0; /* Path MTU Discovery (RFC1191) */ - - struct outdata *outdata; /* last output (udp) packet */ - - minpacket = sizeof(*outip) + sizeof(*outdata) + optlen; - minpacket += sizeof(*outudp); - packlen = minpacket; /* minimum sized packet */ - - hostname = - (char *) malloc(item->traceRouteCtlTargetAddressLen + 1); - if (hostname == NULL) - return; - memcpy(hostname, item->traceRouteCtlTargetAddress, - item->traceRouteCtlTargetAddressLen + 1); - hostname[item->traceRouteCtlTargetAddressLen] = '\0'; - - hi = gethostinfo(hostname); - setsin(to, hi->addrs[0]); - if (hi->n > 1) - DEBUGMSGTL(("traceRouteCtlTable", - "Warning: %s has multiple addresses; using %s\n", - hostname, inet_ntoa(to->sin_addr))); - hostname = hi->name; - hi->name = NULL; - freehostinfo(hi); + int code, n, k; + const char *cp; + char *err; + u_char *outp; + u_int32_t *ap; + struct sockaddr whereto; /* Who to try to reach */ + struct sockaddr wherefrom; /* Who we are */ + + struct sockaddr_in *from = (struct sockaddr_in *) &wherefrom; + struct sockaddr_in *to = (struct sockaddr_in *) &whereto; + struct hostinfo *hi; + int on = 1; + struct protoent *pe; + int ttl, probe, i; + int seq = 0; + int tos = 0, settos = 0; + int lsrr = 0; + u_short off = 0; + struct ifaddrlist *al; + char errbuf[132]; + int minpacket = 0; /* min ip packet size */ - netsnmp_set_line_buffering(stdout); + struct ip *outip = NULL; /* last output (udp) packet */ + struct udphdr *outudp; /* last output (udp) packet */ + int packlen = 0; /* total length of packet */ + int optlen = 0; /* length of ip options */ + int options = 0; /* socket options */ + int s = -1; /* receive (icmp) socket file descriptor */ + int sndsock = -1; /* send (udp/icmp) socket file descriptor */ + int fd[3] = { -1, -1, -1 }; - outip = (struct ip *) malloc(packlen); - if (outip == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - "malloc: %s\n", strerror(errno))); - exit(1); - } - memset((char *) outip, 0, packlen); + u_short ident; + /* + * loose source route gateway list (including room for final destination) + */ + u_int32_t gwlist[NGATEWAYS + 1]; + static const char devnull[] = "/dev/null"; + char *device = NULL; + char *source = NULL; + char *hostname; + u_int pausemsecs = 0; + u_char packet[512]; /* last inbound (icmp) packet */ + + int pmtu = 0; /* Path MTU Discovery (RFC1191) */ + + struct outdata *outdata; /* last output (udp) packet */ + + minpacket = sizeof(*outip) + sizeof(*outdata) + optlen; + minpacket += sizeof(*outudp); + packlen = minpacket; /* minimum sized packet */ + + hostname = malloc(item->traceRouteCtlTargetAddressLen + 1); + if (hostname == NULL) + goto out; + memcpy(hostname, item->traceRouteCtlTargetAddress, + item->traceRouteCtlTargetAddressLen + 1); + hostname[item->traceRouteCtlTargetAddressLen] = '\0'; + + hi = gethostinfo(hostname); + setsin(to, hi->addrs[0]); + if (hi->n > 1) + DEBUGMSGTL(("traceRouteCtlTable", + "Warning: %s has multiple addresses; using %s\n", + hostname, inet_ntoa(to->sin_addr))); + free(hostname); + hostname = strdup(hi->name); + freehostinfo(hi); + + + netsnmp_set_line_buffering(stdout); + + outip = (struct ip *) malloc(packlen); + if (outip == NULL) { + DEBUGMSGTL(("traceRouteCtlTable", + "malloc: %s\n", strerror(errno))); + exit(1); + } + memset((char *) outip, 0, packlen); - outip->ip_v = IPVERSION; - if (settos) - outip->ip_tos = tos; + outip->ip_v = IPVERSION; + if (settos) + outip->ip_tos = tos; #ifdef BYTESWAP_IP_HDR - outip->ip_len = htons(packlen); - outip->ip_off = htons(off); + outip->ip_len = htons(packlen); + outip->ip_off = htons(off); #else - outip->ip_len = packlen; - outip->ip_off = off; + outip->ip_len = packlen; + outip->ip_off = off; #endif - outp = (u_char *) (outip + 1); + outp = (u_char *) (outip + 1); #ifdef HAVE_RAW_OPTIONS - if (lsrr > 0) { - register u_char *optlist; + if (lsrr > 0) { + u_char *optlist; - optlist = outp; - outp += optlen; + optlist = outp; + outp += optlen; - /* - * final hop - */ - gwlist[lsrr] = to->sin_addr.s_addr; + /* + * final hop + */ + gwlist[lsrr] = to->sin_addr.s_addr; - outip->ip_dst.s_addr = gwlist[0]; + outip->ip_dst.s_addr = gwlist[0]; - /* - * force 4 byte alignment - */ - optlist[0] = IPOPT_NOP; - /* - * loose source route option - */ - optlist[1] = IPOPT_LSRR; - i = lsrr * sizeof(gwlist[0]); - optlist[2] = i + 3; - /* - * Pointer to LSRR addresses - */ - optlist[3] = IPOPT_MINOFF; - memcpy(optlist + 4, gwlist + 1, i); - } else + /* + * force 4 byte alignment + */ + optlist[0] = IPOPT_NOP; + /* + * loose source route option + */ + optlist[1] = IPOPT_LSRR; + i = lsrr * sizeof(gwlist[0]); + optlist[2] = i + 3; + /* + * Pointer to LSRR addresses + */ + optlist[3] = IPOPT_MINOFF; + memcpy(optlist + 4, gwlist + 1, i); + } else #endif - outip->ip_dst = to->sin_addr; - outip->ip_hl = (outp - (u_char *) outip) >> 2; - ident = (getpid() & 0xffff) | 0x8000; + outip->ip_dst = to->sin_addr; + outip->ip_hl = (outp - (u_char *) outip) >> 2; + ident = (getpid() & 0xffff) | 0x8000; - outip->ip_p = IPPROTO_UDP; + outip->ip_p = IPPROTO_UDP; - outudp = (struct udphdr *) outp; - outudp->source = htons(ident); - outudp->len = - htons((u_short) (packlen - (sizeof(*outip) + optlen))); - outdata = (struct outdata *) (outudp + 1); + outudp = (struct udphdr *) outp; + outudp->source = htons(ident); + outudp->len = + htons((u_short) (packlen - (sizeof(*outip) + optlen))); + outdata = (struct outdata *) (outudp + 1); - cp = "icmp"; - if ((pe = getprotobyname(cp)) == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - "unknown protocol %s\n", cp)); - exit(1); - } + cp = "icmp"; + if ((pe = getprotobyname(cp)) == NULL) { + DEBUGMSGTL(("traceRouteCtlTable", + "unknown protocol %s\n", cp)); + exit(1); + } - /* - * Insure the socket fds won't be 0, 1 or 2 - */ - if (open(devnull, O_RDONLY) < 0 || - open(devnull, O_RDONLY) < 0 || open(devnull, O_RDONLY) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", - "open \"%s\": %s\n", devnull, strerror(errno))); - exit(1); - } - if ((s = socket(AF_INET, SOCK_RAW, pe->p_proto)) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", - "icmp socket: %s\n", strerror(errno))); - exit(1); - } - if (options & SO_DEBUG) - (void) setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *) &on, - sizeof(on)); - if (options & SO_DONTROUTE) - (void) setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *) &on, - sizeof(on)); + /* + * Insure the socket fds won't be 0, 1 or 2 + */ + if ((fd[0] = open(devnull, O_RDONLY)) < 0 || + (fd[1] = open(devnull, O_RDONLY)) < 0 || + (fd[2] = open(devnull, O_RDONLY)) < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + "open \"%s\": %s\n", devnull, strerror(errno))); + exit(1); + } + if ((s = socket(AF_INET, SOCK_RAW, pe->p_proto)) < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + "icmp socket: %s\n", strerror(errno))); + exit(1); + } + if (options & SO_DEBUG) + (void) setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *) &on, + sizeof(on)); + if (options & SO_DONTROUTE) + (void) setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *) &on, + sizeof(on)); #ifndef __hpux - printf("raw\n"); - sndsock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + printf("raw\n"); + sndsock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); #else - printf("udp\n"); - sndsock = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); + printf("udp\n"); + sndsock = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); #endif - if (sndsock < 0) { + if (sndsock < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + "raw socket: %s\n", strerror(errno))); + exit(1); + } +#if defined(IP_OPTIONS) && !defined(HAVE_RAW_OPTIONS) + if (lsrr > 0) { + u_char optlist[MAX_IPOPTLEN]; + + cp = "ip"; + if ((pe = getprotobyname(cp)) == NULL) { DEBUGMSGTL(("traceRouteCtlTable", - "raw socket: %s\n", strerror(errno))); + "unknown protocol %s\n", cp)); exit(1); } -#if defined(IP_OPTIONS) && !defined(HAVE_RAW_OPTIONS) - if (lsrr > 0) { - u_char optlist[MAX_IPOPTLEN]; - - cp = "ip"; - if ((pe = getprotobyname(cp)) == NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - "unknown protocol %s\n", cp)); - exit(1); - } - /* - * final hop - */ - gwlist[lsrr] = to->sin_addr.s_addr; - ++lsrr; + /* + * final hop + */ + gwlist[lsrr] = to->sin_addr.s_addr; + ++lsrr; - /* - * force 4 byte alignment - */ - optlist[0] = IPOPT_NOP; - /* - * loose source route option - */ - optlist[1] = IPOPT_LSRR; - i = lsrr * sizeof(gwlist[0]); - optlist[2] = i + 3; - /* - * Pointer to LSRR addresses - */ - optlist[3] = IPOPT_MINOFF; - memcpy(optlist + 4, gwlist, i); + /* + * force 4 byte alignment + */ + optlist[0] = IPOPT_NOP; + /* + * loose source route option + */ + optlist[1] = IPOPT_LSRR; + i = lsrr * sizeof(gwlist[0]); + optlist[2] = i + 3; + /* + * Pointer to LSRR addresses + */ + optlist[3] = IPOPT_MINOFF; + memcpy(optlist + 4, gwlist, i); - if ((setsockopt(sndsock, pe->p_proto, IP_OPTIONS, - (char *) optlist, - i + sizeof(gwlist[0]))) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", "IP_OPTIONS: %s\n", - strerror(errno))); - exit(1); - } + if ((setsockopt(sndsock, pe->p_proto, IP_OPTIONS, + (char *) optlist, + i + sizeof(gwlist[0]))) < 0) { + DEBUGMSGTL(("traceRouteCtlTable", "IP_OPTIONS: %s\n", + strerror(errno))); + exit(1); } + } #endif #ifdef SO_SNDBUF - if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *) &packlen, - sizeof(packlen)) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", - "SO_SNDBUF: %s\n", strerror(errno))); - exit(1); - } + if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *) &packlen, + sizeof(packlen)) < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + "SO_SNDBUF: %s\n", strerror(errno))); + exit(1); + } #endif #ifdef IP_HDRINCL - if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, (char *) &on, - sizeof(on)) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", - "IP_HDRINCL: %s\n", strerror(errno))); - exit(1); - } + if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, (char *) &on, + sizeof(on)) < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + "IP_HDRINCL: %s\n", strerror(errno))); + exit(1); + } #else #ifdef IP_TOS - if (settos && setsockopt(sndsock, IPPROTO_IP, IP_TOS, - (char *) &tos, sizeof(tos)) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", - "setsockopt tos %d: %s\n", strerror(errno))); - exit(1); - } + if (settos && setsockopt(sndsock, IPPROTO_IP, IP_TOS, + (char *) &tos, sizeof(tos)) < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + "setsockopt tos %d: %s\n", strerror(errno))); + exit(1); + } #endif #endif - if (options & SO_DEBUG) - (void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, (char *) &on, - sizeof(on)); - if (options & SO_DONTROUTE) - (void) setsockopt(sndsock, SOL_SOCKET, SO_DONTROUTE, - (char *) &on, sizeof(on)); - /* - * Get the interface address list - */ - n = ifaddrlist(&al, errbuf); - if (n < 0) { + if (options & SO_DEBUG) + (void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, (char *) &on, + sizeof(on)); + if (options & SO_DONTROUTE) + (void) setsockopt(sndsock, SOL_SOCKET, SO_DONTROUTE, + (char *) &on, sizeof(on)); + /* + * Get the interface address list + */ + n = ifaddrlist(&al, errbuf); + if (n < 0) { + DEBUGMSGTL(("traceRouteCtlTable", + " ifaddrlist: %s\n", errbuf)); + exit(1); + } + if (n == 0) { + DEBUGMSGTL(("traceRouteCtlTable", + " Can't find any network interfaces\n")); + + exit(1); + } + + /* + * Look for a specific device + */ + if (device != NULL) { + for (i = n; i > 0; --i, ++al) + if (strcmp(device, al->device) == 0) + break; + if (i <= 0) { DEBUGMSGTL(("traceRouteCtlTable", - " ifaddrlist: %s\n", errbuf)); + " Can't find interface %.32s\n", device)); + exit(1); } - if (n == 0) { + } + /* + * Determine our source address + */ + if (source == NULL) { + /* + * If a device was specified, use the interface address. + * Otherwise, try to determine our source address. + */ + if (device != NULL) + setsin(from, al->addr); + else if ((err = findsaddr(to, from)) != NULL) { DEBUGMSGTL(("traceRouteCtlTable", - " Can't find any network interfaces\n")); - + " findsaddr: %s\n", err)); + free(err); exit(1); } + } else { + hi = gethostinfo(source); + source = hi->name; + hi->name = NULL; /* - * Look for a specific device + * If the device was specified make sure it + * corresponds to the source address specified. + * Otherwise, use the first address (and warn if + * there are more than one). */ if (device != NULL) { - for (i = n; i > 0; --i, ++al) - if (strcmp(device, al->device) == 0) + for (i = hi->n, ap = hi->addrs; i > 0; --i, ++ap) + if (*ap == al->addr) break; if (i <= 0) { DEBUGMSGTL(("traceRouteCtlTable", - " Can't find interface %.32s\n", device)); + " %s is not on interface %.32s\n", + source, device)); exit(1); } + setsin(from, *ap); + } else { + setsin(from, hi->addrs[0]); + if (hi->n > 1) + DEBUGMSGTL(("traceRouteCtlTable", + " Warning: %s has multiple addresses; using %s\n", + source, inet_ntoa(from->sin_addr))); + } - /* - * Determine our source address - */ - if (source == NULL) { - /* - * If a device was specified, use the interface address. - * Otherwise, try to determine our source address. - */ - if (device != NULL) - setsin(from, al->addr); - else if ((err = findsaddr(to, from)) != NULL) { - DEBUGMSGTL(("traceRouteCtlTable", - " findsaddr: %s\n", err)); - exit(1); - } - - } else { - hi = gethostinfo(source); - source = hi->name; - hi->name = NULL; - /* - * If the device was specified make sure it - * corresponds to the source address specified. - * Otherwise, use the first address (and warn if - * there are more than one). - */ - if (device != NULL) { - for (i = hi->n, ap = hi->addrs; i > 0; --i, ++ap) - if (*ap == al->addr) - break; - if (i <= 0) { - DEBUGMSGTL(("traceRouteCtlTable", - " %s is not on interface %.32s\n", - source, device)); - - exit(1); - } - setsin(from, *ap); - } else { - setsin(from, hi->addrs[0]); - if (hi->n > 1) - DEBUGMSGTL(("traceRouteCtlTable", - " Warning: %s has multiple addresses; using %s\n", - source, inet_ntoa(from->sin_addr))); - - } - freehostinfo(hi); - } - /* - * Revert to non-privileged user after opening sockets - */ - setgid(getgid()); - setuid(getuid()); + freehostinfo(hi); + } + /* + * Revert to non-privileged user after opening sockets + */ + NETSNMP_IGNORE_RESULT(setgid(getgid())); + NETSNMP_IGNORE_RESULT(setuid(getuid())); - outip->ip_src = from->sin_addr; + outip->ip_src = from->sin_addr; #ifndef IP_HDRINCL - if (bind(sndsock, (struct sockaddr *) from, sizeof(*from)) < 0) { - DEBUGMSGTL(("traceRouteCtlTable", - " bind: %s\n", strerror(errno))); - exit(1); - } -#endif + if (bind(sndsock, (struct sockaddr *) from, sizeof(*from)) < 0) { DEBUGMSGTL(("traceRouteCtlTable", - " to %s (%s)", hostname, inet_ntoa(to->sin_addr))); - - if (source) - DEBUGMSGTL(("traceRouteCtlTable", " from %s", source)); - - DEBUGMSGTL(("traceRouteCtlTable", - ", %lu hops max, %d byte packets\n", - item->traceRouteCtlMaxTtl, packlen)); - (void) fflush(stderr); - - struct traceRouteResultsTable_data *StorageResults = NULL; - netsnmp_variable_list *vars_results = NULL; - - struct traceRouteHopsTable_data *temp = NULL; - struct traceRouteHopsTable_data *current_temp = NULL; - struct traceRouteHopsTable_data *current = NULL; + " bind: %s\n", strerror(errno))); + exit(1); + } +#endif + DEBUGMSGTL(("traceRouteCtlTable", + " to %s (%s)", hostname, inet_ntoa(to->sin_addr))); - unsigned long index = 0; + if (source) + DEBUGMSGTL(("traceRouteCtlTable", " from %s", source)); - struct traceRouteProbeHistoryTable_data *temp_his = NULL; - struct traceRouteProbeHistoryTable_data *current_temp_his = NULL; + DEBUGMSGTL(("traceRouteCtlTable", + ", %lu hops max, %d byte packets\n", + item->traceRouteCtlMaxTtl, packlen)); + (void) fflush(stderr); - snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ - snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ - if ((StorageResults = - header_complex_get(traceRouteResultsTableStorage, - vars_results)) == NULL) - return; - snmp_free_varbind(vars_results); - vars_results = NULL; + struct traceRouteResultsTable_data *StorageResults = NULL; + netsnmp_variable_list *vars_results = NULL; + struct traceRouteHopsTable_data *temp = NULL; + struct traceRouteHopsTable_data *current_temp = NULL; + struct traceRouteHopsTable_data *current = NULL; - for (ttl = item->traceRouteCtlInitialTtl; - ttl <= item->traceRouteCtlMaxTtl; ++ttl) { + unsigned long index = 0; - u_int32_t lastaddr = 0; - int gotlastaddr = 0; - int got_there = 0; - int unreachable = 0; - int sentfirst = 0; - time_t timep = 0; + struct traceRouteProbeHistoryTable_data *temp_his = NULL; + struct traceRouteProbeHistoryTable_data *current_temp_his = NULL; - StorageResults->traceRouteResultsCurHopCount = ttl; - if (item->traceRouteCtlCreateHopsEntries == 1) { - if (ttl == item->traceRouteCtlInitialTtl) { - int k = 0; - count = traceRouteHopsTable_count(item); - - - struct traceRouteHopsTable_data *StorageTmp = NULL; - struct header_complex_index *hciptr2 = NULL; - netsnmp_variable_list *vars = NULL; - oid newoid[MAX_OID_LEN]; - size_t newoid_len; - - snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ - snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ - - header_complex_generate_oid(newoid, &newoid_len, NULL, - 0, vars); - - for (hciptr2 = traceRouteHopsTableStorage; - hciptr2 != NULL; hciptr2 = hciptr2->next) { - if (snmp_oid_compare - (newoid, newoid_len, hciptr2->name, - newoid_len) == 0) { - StorageTmp = - header_complex_extract_entry - (&traceRouteHopsTableStorage, hciptr2); - - old_HopsAddress[k] = - (char *) malloc(StorageTmp-> - traceRouteHopsIpTgtAddressLen - + 1); - if (old_HopsAddress[k] == NULL) { - exit(1); - } - old_HopsAddress[k] = netsnmp_memdup( - StorageTmp->traceRouteHopsIpTgtAddress, - StorageTmp-> - traceRouteHopsIpTgtAddressLen + 1); - old_HopsAddress[k][StorageTmp-> - traceRouteHopsIpTgtAddressLen] - = '\0'; - - k++; - StorageTmp = NULL; + snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ + snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ + if ((StorageResults = + header_complex_get(traceRouteResultsTableStorage, + vars_results)) == NULL) { + goto out; + } + snmp_free_varbind(vars_results); + vars_results = NULL; + + + for (ttl = item->traceRouteCtlInitialTtl; + ttl <= item->traceRouteCtlMaxTtl; ++ttl) { + + u_int32_t lastaddr = 0; + int gotlastaddr = 0; + int got_there = 0; + int unreachable = 0; + int sentfirst = 0; + time_t timep = 0; + + StorageResults->traceRouteResultsCurHopCount = ttl; + if (item->traceRouteCtlCreateHopsEntries == 1) { + if (ttl == item->traceRouteCtlInitialTtl) { + int k = 0; + count = traceRouteHopsTable_count(item); + + + struct traceRouteHopsTable_data *StorageTmp = NULL; + struct header_complex_index *hciptr2, *nhciptr2; + netsnmp_variable_list *vars = NULL; + oid newoid[MAX_OID_LEN]; + size_t newoid_len; + + snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ + snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ + + header_complex_generate_oid(newoid, &newoid_len, NULL, + 0, vars); + + for (hciptr2 = traceRouteHopsTableStorage; hciptr2; + hciptr2 = nhciptr2) { + nhciptr2 = hciptr2->next; + if (snmp_oid_compare + (newoid, newoid_len, hciptr2->name, + newoid_len) == 0) { + StorageTmp = + header_complex_extract_entry + (&traceRouteHopsTableStorage, hciptr2); + + old_HopsAddress[k] = + (char *) malloc(StorageTmp-> + traceRouteHopsIpTgtAddressLen + + 1); + if (old_HopsAddress[k] == NULL) { + exit(1); } + old_HopsAddress[k] = netsnmp_memdup( + StorageTmp->traceRouteHopsIpTgtAddress, + StorageTmp-> + traceRouteHopsIpTgtAddressLen + 1); + old_HopsAddress[k][StorageTmp-> + traceRouteHopsIpTgtAddressLen] + = '\0'; + + k++; + StorageTmp = NULL; } - traceRouteHopsTable_del(item); - index = 0; } + traceRouteHopsTable_del(item); + index = 0; + } - temp = SNMP_MALLOC_STRUCT(traceRouteHopsTable_data); - temp->traceRouteCtlOwnerIndex = - (char *) malloc(item->traceRouteCtlOwnerIndexLen + 1); - memcpy(temp->traceRouteCtlOwnerIndex, - item->traceRouteCtlOwnerIndex, - item->traceRouteCtlOwnerIndexLen + 1); - temp->traceRouteCtlOwnerIndex[item-> - traceRouteCtlOwnerIndexLen] = - '\0'; - temp->traceRouteCtlOwnerIndexLen = - item->traceRouteCtlOwnerIndexLen; + temp = SNMP_MALLOC_STRUCT(traceRouteHopsTable_data); + temp->traceRouteCtlOwnerIndex = + (char *) malloc(item->traceRouteCtlOwnerIndexLen + 1); + memcpy(temp->traceRouteCtlOwnerIndex, + item->traceRouteCtlOwnerIndex, + item->traceRouteCtlOwnerIndexLen + 1); + temp->traceRouteCtlOwnerIndex[item-> + traceRouteCtlOwnerIndexLen] = + '\0'; + temp->traceRouteCtlOwnerIndexLen = + item->traceRouteCtlOwnerIndexLen; + + temp->traceRouteCtlTestName = + (char *) malloc(item->traceRouteCtlTestNameLen + 1); + memcpy(temp->traceRouteCtlTestName, + item->traceRouteCtlTestName, + item->traceRouteCtlTestNameLen + 1); + temp->traceRouteCtlTestName[item-> + traceRouteCtlTestNameLen] = + '\0'; + temp->traceRouteCtlTestNameLen = + item->traceRouteCtlTestNameLen; + + /* add lock to protect */ + pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_lock(&counter_mutex); + temp->traceRouteHopsHopIndex = ++index; + pthread_mutex_unlock(&counter_mutex); + /* endsadsadsad */ + + + temp->traceRouteHopsIpTgtAddressType = 0; + temp->traceRouteHopsIpTgtAddress = strdup(""); + temp->traceRouteHopsIpTgtAddressLen = 0; + temp->traceRouteHopsMinRtt = 0; + temp->traceRouteHopsMaxRtt = 0; + temp->traceRouteHopsAverageRtt = 0; + temp->traceRouteHopsRttSumOfSquares = 0; + temp->traceRouteHopsSentProbes = 0; + temp->traceRouteHopsProbeResponses = 0; + + temp->traceRouteHopsLastGoodProbeLen = 0; + if (index == 1) + item->traceRouteHops = temp; + else { + (current_temp)->next = temp; + } - temp->traceRouteCtlTestName = - (char *) malloc(item->traceRouteCtlTestNameLen + 1); - memcpy(temp->traceRouteCtlTestName, - item->traceRouteCtlTestName, - item->traceRouteCtlTestNameLen + 1); - temp->traceRouteCtlTestName[item-> - traceRouteCtlTestNameLen] = - '\0'; - temp->traceRouteCtlTestNameLen = - item->traceRouteCtlTestNameLen; + current_temp = temp; - /* add lock to protect */ - pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&counter_mutex); - temp->traceRouteHopsHopIndex = ++index; - pthread_mutex_unlock(&counter_mutex); - /* endsadsadsad */ + if (index + 1 >= item->traceRouteCtlMaxTtl) { + current_temp->next = NULL; + } + if (item->traceRouteHops != NULL) - temp->traceRouteHopsIpTgtAddressType = 0; - temp->traceRouteHopsIpTgtAddress = strdup(""); - temp->traceRouteHopsIpTgtAddressLen = 0; - temp->traceRouteHopsMinRtt = 0; - temp->traceRouteHopsMaxRtt = 0; - temp->traceRouteHopsAverageRtt = 0; - temp->traceRouteHopsRttSumOfSquares = 0; - temp->traceRouteHopsSentProbes = 0; - temp->traceRouteHopsProbeResponses = 0; + if (traceRouteHopsTable_add(current_temp) != + SNMPERR_SUCCESS) + DEBUGMSGTL(("traceRouteHopsTable", + "registered an entry error\n")); - temp->traceRouteHopsLastGoodProbeLen = 0; - if (index == 1) - item->traceRouteHops = temp; - else { - (current_temp)->next = temp; - } + } + unsigned long maxRtt = 0; + unsigned long minRtt = 0; + unsigned long averageRtt = 0; + unsigned long sumRtt = 0; + unsigned long responseProbe = 0; + unsigned long sumOfSquare = 0; + for (probe = 0; probe < nprobes; ++probe) { + int cc; + struct timeval t1, t2; + struct timezone tz; + struct ip *ip = NULL; + unsigned long Rtt = 0; + + if (sentfirst && pausemsecs > 0) + usleep(pausemsecs * 1000); + (void) gettimeofday(&t1, &tz); + send_probe(to, ++seq, ttl, &t1, outip, outudp, packlen, + optlen, hostname, ident, sndsock, port, + outdata); + ++sentfirst; + while ((cc = + wait_for_reply(s, from, &t1, packet, + waittime)) != 0) { + (void) gettimeofday(&t2, &tz); + timep = 0; + time(&timep); + i = packet_ok(packet, cc, from, seq, ident, pmtu, + port); + /* + * Skip short packet + */ + if (i == 0) + continue; + if (!gotlastaddr || from->sin_addr.s_addr != lastaddr) { + struct ip *ip; + int hlen; + ip = (struct ip *) packet; + hlen = ip->ip_hl << 2; + cc -= hlen; + DEBUGMSGTL(("traceRouteCtlTable", + " %s", inet_ntoa(from->sin_addr))); - current_temp = temp; - if (index + 1 >= item->traceRouteCtlMaxTtl) { - current_temp->next = NULL; + lastaddr = from->sin_addr.s_addr; + ++gotlastaddr; } - - if (item->traceRouteHops != NULL) - - if (traceRouteHopsTable_add(current_temp) != - SNMPERR_SUCCESS) - DEBUGMSGTL(("traceRouteHopsTable", - "registered an entry error\n")); - - } - register unsigned long maxRtt = 0; - register unsigned long minRtt = 0; - register unsigned long averageRtt = 0; - register unsigned long sumRtt = 0; - register unsigned long responseProbe = 0; - register unsigned long sumOfSquare = 0; - for (probe = 0; probe < nprobes; ++probe) { - register int cc; - struct timeval t1, t2; - struct timezone tz; - register struct ip *ip = NULL; - register unsigned long Rtt = 0; - - if (sentfirst && pausemsecs > 0) - usleep(pausemsecs * 1000); - (void) gettimeofday(&t1, &tz); - send_probe(to, ++seq, ttl, &t1, outip, outudp, packlen, - optlen, hostname, ident, sndsock, port, - outdata); - ++sentfirst; - while ((cc = - wait_for_reply(s, from, &t1, packet, - waittime)) != 0) { - (void) gettimeofday(&t2, &tz); - timep = 0; - time(&timep); - i = packet_ok(packet, cc, from, seq, ident, pmtu, - port); - /* - * Skip short packet - */ - if (i == 0) - continue; - if (!gotlastaddr || from->sin_addr.s_addr != lastaddr) { - register struct ip *ip; - register int hlen; - ip = (struct ip *) packet; - hlen = ip->ip_hl << 2; - cc -= hlen; - DEBUGMSGTL(("traceRouteCtlTable", - " %s", inet_ntoa(from->sin_addr))); - - - lastaddr = from->sin_addr.s_addr; - ++gotlastaddr; - } - Rtt = deltaT(&t1, &t2); - responseProbe = responseProbe + 1; - if (probe == 0) { + Rtt = deltaT(&t1, &t2); + responseProbe = responseProbe + 1; + if (probe == 0) { + minRtt = Rtt; + maxRtt = Rtt; + averageRtt = Rtt; + sumRtt = Rtt; + sumOfSquare = Rtt * Rtt; + } else { + if (Rtt < minRtt) minRtt = Rtt; + if (Rtt > maxRtt) maxRtt = Rtt; - averageRtt = Rtt; - sumRtt = Rtt; - sumOfSquare = Rtt * Rtt; - } else { - if (Rtt < minRtt) - minRtt = Rtt; - if (Rtt > maxRtt) - maxRtt = Rtt; - sumRtt = (sumRtt) + Rtt; - averageRtt = - round((double) (sumRtt) / - (double) responseProbe); - sumOfSquare = sumOfSquare + Rtt * Rtt; - } + sumRtt = (sumRtt) + Rtt; + averageRtt = + round((double) (sumRtt) / + (double) responseProbe); + sumOfSquare = sumOfSquare + Rtt * Rtt; + } - StorageResults->traceRouteResultsCurProbeCount = - probe + 1; - if (i == -2) { + StorageResults->traceRouteResultsCurProbeCount = + probe + 1; + if (i == -2) { #ifndef ARCHAIC - ip = (struct ip *) packet; - if (ip->ip_ttl <= 1) - Printf(" !"); + ip = (struct ip *) packet; + if (ip->ip_ttl <= 1) + Printf(" !"); #endif - ++got_there; - break; - } - /* - * time exceeded in transit - */ - if (i == -1) - break; - code = i - 1; - switch (code) { + ++got_there; + break; + } + /* + * time exceeded in transit + */ + if (i == -1) + break; + code = i - 1; + switch (code) { - case ICMP_UNREACH_PORT: + case ICMP_UNREACH_PORT: #ifndef ARCHAIC - ip = (struct ip *) packet; - if (ip->ip_ttl <= 1) - Printf(" !"); + ip = (struct ip *) packet; + if (ip->ip_ttl <= 1) + Printf(" !"); #endif - ++got_there; - break; + ++got_there; + break; - case ICMP_UNREACH_NET: - ++unreachable; - Printf(" !N"); - break; + case ICMP_UNREACH_NET: + ++unreachable; + Printf(" !N"); + break; - case ICMP_UNREACH_HOST: - ++unreachable; - Printf(" !H"); - break; + case ICMP_UNREACH_HOST: + ++unreachable; + Printf(" !H"); + break; - case ICMP_UNREACH_PROTOCOL: - ++got_there; - Printf(" !P"); - break; + case ICMP_UNREACH_PROTOCOL: + ++got_there; + Printf(" !P"); + break; - case ICMP_UNREACH_NEEDFRAG: - ++unreachable; - Printf(" !F-%d", pmtu); - break; + case ICMP_UNREACH_NEEDFRAG: + ++unreachable; + Printf(" !F-%d", pmtu); + break; - case ICMP_UNREACH_SRCFAIL: - ++unreachable; - Printf(" !S"); - break; + case ICMP_UNREACH_SRCFAIL: + ++unreachable; + Printf(" !S"); + break; - case ICMP_UNREACH_FILTER_PROHIB: - ++unreachable; - Printf(" !X"); - break; + case ICMP_UNREACH_FILTER_PROHIB: + ++unreachable; + Printf(" !X"); + break; - case ICMP_UNREACH_HOST_PRECEDENCE: - ++unreachable; - Printf(" !V"); - break; + case ICMP_UNREACH_HOST_PRECEDENCE: + ++unreachable; + Printf(" !V"); + break; - case ICMP_UNREACH_PRECEDENCE_CUTOFF: - ++unreachable; - Printf(" !C"); - break; + case ICMP_UNREACH_PRECEDENCE_CUTOFF: + ++unreachable; + Printf(" !C"); + break; - default: - ++unreachable; - Printf(" !<%d>", code); - break; - } + default: + ++unreachable; + Printf(" !<%d>", code); break; } - if (cc == 0) { - timep = 0; - time(&timep); - Printf(" *"); - Rtt = (item->traceRouteCtlTimeOut) * 1000; - } - if (item->traceRouteCtlMaxRows != 0) { - - temp_his = - SNMP_MALLOC_STRUCT - (traceRouteProbeHistoryTable_data); - temp_his->traceRouteCtlOwnerIndex = - (char *) malloc(item->traceRouteCtlOwnerIndexLen + - 1); - memcpy(temp_his->traceRouteCtlOwnerIndex, - item->traceRouteCtlOwnerIndex, - item->traceRouteCtlOwnerIndexLen + 1); - temp_his->traceRouteCtlOwnerIndex[item-> - traceRouteCtlOwnerIndexLen] - = '\0'; - temp_his->traceRouteCtlOwnerIndexLen = - item->traceRouteCtlOwnerIndexLen; - - temp_his->traceRouteCtlTestName = - (char *) malloc(item->traceRouteCtlTestNameLen + - 1); - memcpy(temp_his->traceRouteCtlTestName, - item->traceRouteCtlTestName, - item->traceRouteCtlTestNameLen + 1); - temp_his->traceRouteCtlTestName[item-> - traceRouteCtlTestNameLen] - = '\0'; - temp_his->traceRouteCtlTestNameLen = - item->traceRouteCtlTestNameLen; - - /* add lock to protect */ - pthread_mutex_t counter_mutex = - PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&counter_mutex); - if (item->traceRouteProbeHistoryMaxIndex >= - (unsigned long) (2147483647)) - item->traceRouteProbeHistoryMaxIndex = 0; - temp_his->traceRouteProbeHistoryIndex = - ++(item->traceRouteProbeHistoryMaxIndex); - pthread_mutex_unlock(&counter_mutex); - /* endsadsadsad */ - temp_his->traceRouteProbeHistoryHopIndex = ttl; - temp_his->traceRouteProbeHistoryProbeIndex = probe + 1; - - temp_his->traceRouteProbeHistoryHAddrType = 1; - temp_his->traceRouteProbeHistoryHAddr = - (char *) malloc(strlen(inet_ntoa(from->sin_addr)) + - 1); - strcpy(temp_his->traceRouteProbeHistoryHAddr, - (inet_ntoa(from->sin_addr))); - temp_his-> - traceRouteProbeHistoryHAddr[strlen - (inet_ntoa - (from->sin_addr))] = - '\0'; - temp_his->traceRouteProbeHistoryHAddrLen = - strlen(inet_ntoa(from->sin_addr)); - - temp_his->traceRouteProbeHistoryResponse = Rtt; - temp_his->traceRouteProbeHistoryStatus = 1; - temp_his->traceRouteProbeHistoryLastRC = 0; - - temp_his->traceRouteProbeHistoryTime_time = timep; - temp_his->traceRouteProbeHistoryTime = - netsnmp_memdup(date_n_time(&timep, - &temp_his->traceRouteProbeHistoryTimeLen), - 11); - if (probe == 0) - item->traceRouteProbeHis = temp_his; - else { - (current_temp_his)->next = temp_his; - } - - current_temp_his = temp_his; + break; + } + if (cc == 0) { + timep = 0; + time(&timep); + Printf(" *"); + Rtt = (item->traceRouteCtlTimeOut) * 1000; + } + if (item->traceRouteCtlMaxRows != 0) { + + temp_his = + SNMP_MALLOC_STRUCT + (traceRouteProbeHistoryTable_data); + temp_his->traceRouteCtlOwnerIndex = + (char *) malloc(item->traceRouteCtlOwnerIndexLen + + 1); + memcpy(temp_his->traceRouteCtlOwnerIndex, + item->traceRouteCtlOwnerIndex, + item->traceRouteCtlOwnerIndexLen + 1); + temp_his->traceRouteCtlOwnerIndex[item-> + traceRouteCtlOwnerIndexLen] + = '\0'; + temp_his->traceRouteCtlOwnerIndexLen = + item->traceRouteCtlOwnerIndexLen; - if (probe + 1 >= nprobes) { - current_temp_his->next = NULL; + temp_his->traceRouteCtlTestName = + (char *) malloc(item->traceRouteCtlTestNameLen + + 1); + memcpy(temp_his->traceRouteCtlTestName, + item->traceRouteCtlTestName, + item->traceRouteCtlTestNameLen + 1); + temp_his->traceRouteCtlTestName[item-> + traceRouteCtlTestNameLen] + = '\0'; + temp_his->traceRouteCtlTestNameLen = + item->traceRouteCtlTestNameLen; - } + /* add lock to protect */ + pthread_mutex_t counter_mutex = + PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_lock(&counter_mutex); + if (item->traceRouteProbeHistoryMaxIndex >= + (unsigned long) (2147483647)) + item->traceRouteProbeHistoryMaxIndex = 0; + temp_his->traceRouteProbeHistoryIndex = + ++(item->traceRouteProbeHistoryMaxIndex); + pthread_mutex_unlock(&counter_mutex); + /* endsadsadsad */ + temp_his->traceRouteProbeHistoryHopIndex = ttl; + temp_his->traceRouteProbeHistoryProbeIndex = probe + 1; + + temp_his->traceRouteProbeHistoryHAddrType = 1; + temp_his->traceRouteProbeHistoryHAddr = + (char *) malloc(strlen(inet_ntoa(from->sin_addr)) + + 1); + strcpy(temp_his->traceRouteProbeHistoryHAddr, + (inet_ntoa(from->sin_addr))); + temp_his-> + traceRouteProbeHistoryHAddr[strlen + (inet_ntoa + (from->sin_addr))] = + '\0'; + temp_his->traceRouteProbeHistoryHAddrLen = + strlen(inet_ntoa(from->sin_addr)); + + temp_his->traceRouteProbeHistoryResponse = Rtt; + temp_his->traceRouteProbeHistoryStatus = 1; + temp_his->traceRouteProbeHistoryLastRC = 0; + + temp_his->traceRouteProbeHistoryTime_time = timep; + temp_his->traceRouteProbeHistoryTime = + netsnmp_memdup(date_n_time(&timep, + &temp_his->traceRouteProbeHistoryTimeLen), + 11); + if (probe == 0) + item->traceRouteProbeHis = temp_his; + else { + (current_temp_his)->next = temp_his; + } - if (item->traceRouteProbeHis != NULL) { - if (traceRouteProbeHistoryTable_count(item) < - item->traceRouteCtlMaxRows) { - if (traceRouteProbeHistoryTable_add - (current_temp_his) != SNMPERR_SUCCESS) - DEBUGMSGTL(("traceRouteProbeHistoryTable", - "registered an entry error\n")); - } else { - traceRouteProbeHistoryTable_delLast(item); - if (traceRouteProbeHistoryTable_add - (current_temp_his) != SNMPERR_SUCCESS) - DEBUGMSGTL(("traceRouteProbeHistoryTable", - "registered an entry error\n")); + current_temp_his = temp_his; - } - } + if (probe + 1 >= nprobes) { + current_temp_his->next = NULL; } - if (item->traceRouteCtlCreateHopsEntries == 1) { - netsnmp_variable_list *vars_hops = NULL; - snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ - snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ - snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_UNSIGNED, (char *) &index, sizeof(index)); /* traceRouteHopsIndex */ - if ((current = - header_complex_get(traceRouteHopsTableStorage, - vars_hops)) == NULL) - return; - snmp_free_varbind(vars_hops); - vars_hops = NULL; - - current->traceRouteHopsIpTgtAddressType = 1; - current->traceRouteHopsIpTgtAddress = - (char *) malloc(strlen(inet_ntoa(from->sin_addr)) + - 1); - current->traceRouteHopsIpTgtAddress = - strdup(inet_ntoa(from->sin_addr)); - current-> - traceRouteHopsIpTgtAddress[strlen - (inet_ntoa - (from->sin_addr))] = - '\0'; - current->traceRouteHopsIpTgtAddressLen = - strlen(inet_ntoa(from->sin_addr)); - if (count != 0) { - if (strcmp - (old_HopsAddress[index - 1], - current->traceRouteHopsIpTgtAddress) != 0) - flag = 1; + if (item->traceRouteProbeHis != NULL) { + if (traceRouteProbeHistoryTable_count(item) < + item->traceRouteCtlMaxRows) { + if (traceRouteProbeHistoryTable_add + (current_temp_his) != SNMPERR_SUCCESS) + DEBUGMSGTL(("traceRouteProbeHistoryTable", + "registered an entry error\n")); + } else { + traceRouteProbeHistoryTable_delLast(item); + if (traceRouteProbeHistoryTable_add + (current_temp_his) != SNMPERR_SUCCESS) + DEBUGMSGTL(("traceRouteProbeHistoryTable", + "registered an entry error\n")); + } + } - current->traceRouteHopsIpTgtAddressLen = - strlen(inet_ntoa(from->sin_addr)); - current->traceRouteHopsMinRtt = minRtt; - current->traceRouteHopsMaxRtt = maxRtt; - current->traceRouteHopsAverageRtt = averageRtt; - current->traceRouteHopsRttSumOfSquares = sumOfSquare; - current->traceRouteHopsSentProbes = probe + 1; - current->traceRouteHopsProbeResponses = responseProbe; - current->traceRouteHopsLastGoodProbe_time = timep; - current->traceRouteHopsLastGoodProbe = - netsnmp_memdup(date_n_time(&timep, - ¤t->traceRouteHopsLastGoodProbeLen), - 11); + } + + if (item->traceRouteCtlCreateHopsEntries == 1) { + netsnmp_variable_list *vars_hops = NULL; + snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ + snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ + snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_UNSIGNED, (char *) &index, sizeof(index)); /* traceRouteHopsIndex */ + if ((current = + header_complex_get(traceRouteHopsTableStorage, + vars_hops)) == NULL) { + goto out; + } + snmp_free_varbind(vars_hops); + vars_hops = NULL; + + current->traceRouteHopsIpTgtAddressType = 1; + current->traceRouteHopsIpTgtAddress = + (char *) malloc(strlen(inet_ntoa(from->sin_addr)) + + 1); + current->traceRouteHopsIpTgtAddress = + strdup(inet_ntoa(from->sin_addr)); + current-> + traceRouteHopsIpTgtAddress[strlen + (inet_ntoa + (from->sin_addr))] = + '\0'; + current->traceRouteHopsIpTgtAddressLen = + strlen(inet_ntoa(from->sin_addr)); + if (count != 0) { + if (strcmp + (old_HopsAddress[index - 1], + current->traceRouteHopsIpTgtAddress) != 0) + flag = 1; } - (void) fflush(stdout); + current->traceRouteHopsIpTgtAddressLen = + strlen(inet_ntoa(from->sin_addr)); + current->traceRouteHopsMinRtt = minRtt; + current->traceRouteHopsMaxRtt = maxRtt; + current->traceRouteHopsAverageRtt = averageRtt; + current->traceRouteHopsRttSumOfSquares = sumOfSquare; + current->traceRouteHopsSentProbes = probe + 1; + current->traceRouteHopsProbeResponses = responseProbe; + current->traceRouteHopsLastGoodProbe_time = timep; + current->traceRouteHopsLastGoodProbe = + netsnmp_memdup(date_n_time(&timep, + ¤t->traceRouteHopsLastGoodProbeLen), + 11); } - putchar('\n'); + (void) fflush(stdout); + } + putchar('\n'); - if (got_there - || (unreachable > 0 && unreachable >= nprobes - 1)) { - if (got_there != 0) { - StorageResults->traceRouteResultsTestAttempts = - StorageResults->traceRouteResultsTestAttempts + 1; + if (got_there + || (unreachable > 0 && unreachable >= nprobes - 1)) { - StorageResults->traceRouteResultsTestSuccesses = - StorageResults->traceRouteResultsTestSuccesses + 1; + if (got_there != 0) { + StorageResults->traceRouteResultsTestAttempts = + StorageResults->traceRouteResultsTestAttempts + 1; - StorageResults->traceRouteResultsLastGoodPath_time = timep; - StorageResults->traceRouteResultsLastGoodPath = - netsnmp_memdup(date_n_time(&timep, - &StorageResults-> - traceRouteResultsLastGoodPathLen), - 11); - if ((item-> - traceRouteCtlTrapGeneration[0] & - TRACEROUTETRAPGENERATION_TESTCOMPLETED) != 0) { - DEBUGMSGTL(("traceRouteProbeHistoryTable", - "TEST completed!\n")); - send_traceRoute_trap(item, traceRouteTestCompleted, - sizeof - (traceRouteTestCompleted) / - sizeof(oid)); - } - } + StorageResults->traceRouteResultsTestSuccesses = + StorageResults->traceRouteResultsTestSuccesses + 1; - else { - StorageResults->traceRouteResultsTestAttempts = - StorageResults->traceRouteResultsTestAttempts + 1; - if ((item-> - traceRouteCtlTrapGeneration[0] & - TRACEROUTETRAPGENERATION_TESTFAILED) != 0) { - DEBUGMSGTL(("traceRouteProbeHistoryTable", - "test Failed!\n")); - send_traceRoute_trap(item, traceRouteTestFailed, - sizeof(traceRouteTestFailed) / - sizeof(oid)); - } + StorageResults->traceRouteResultsLastGoodPath_time = timep; + StorageResults->traceRouteResultsLastGoodPath = + netsnmp_memdup(date_n_time(&timep, + &StorageResults-> + traceRouteResultsLastGoodPathLen), + 11); + if ((item-> + traceRouteCtlTrapGeneration[0] & + TRACEROUTETRAPGENERATION_TESTCOMPLETED) != 0) { + DEBUGMSGTL(("traceRouteProbeHistoryTable", + "TEST completed!\n")); + send_traceRoute_trap(item, traceRouteTestCompleted, + sizeof + (traceRouteTestCompleted) / + sizeof(oid)); } - break; + } - } else if (ttl == item->traceRouteCtlMaxTtl - && (probe + 1) == nprobes) { + else { StorageResults->traceRouteResultsTestAttempts = StorageResults->traceRouteResultsTestAttempts + 1; - if ((item-> traceRouteCtlTrapGeneration[0] & TRACEROUTETRAPGENERATION_TESTFAILED) != 0) { DEBUGMSGTL(("traceRouteProbeHistoryTable", "test Failed!\n")); send_traceRoute_trap(item, traceRouteTestFailed, - sizeof(traceRouteTestFailed) / - sizeof(oid)); + sizeof(traceRouteTestFailed) / + sizeof(oid)); } } + break; + } else if (ttl == item->traceRouteCtlMaxTtl + && (probe + 1) == nprobes) { + StorageResults->traceRouteResultsTestAttempts = + StorageResults->traceRouteResultsTestAttempts + 1; + + if ((item-> + traceRouteCtlTrapGeneration[0] & + TRACEROUTETRAPGENERATION_TESTFAILED) != 0) { + DEBUGMSGTL(("traceRouteProbeHistoryTable", + "test Failed!\n")); + send_traceRoute_trap(item, traceRouteTestFailed, + sizeof(traceRouteTestFailed) / + sizeof(oid)); + } } + } + + if (flag == 1) { + DEBUGMSGTL(("traceRouteProbeHistoryTable", "path changed!\n")); + send_traceRoute_trap(item, traceRoutePathChange, + sizeof(traceRoutePathChange) / + sizeof(oid)); + } + +out: + for (k = 0; k < count; k++) + free(old_HopsAddress[k]); + for (k = 0; k < 3; k++) + if (fd[k] >= 0) + close(fd[k]); + if (s >= 0) + close(s); + if (sndsock >= 0) close(sndsock); + free(outip); + free(hostname); +} - if (flag == 1) { - DEBUGMSGTL(("traceRouteProbeHistoryTable", "path changed!\n")); - send_traceRoute_trap(item, traceRoutePathChange, - sizeof(traceRoutePathChange) / - sizeof(oid)); - } +static void +run_traceRoute_ipv6(struct traceRouteCtlTable_data *item) +{ + int nprobes = item->traceRouteCtlProbesPerHop; + char *old_HopsAddress[255]; + int count = 0; + int flag = 0; - int k = 0; - for (k = 0; k < count; k++) { - free(old_HopsAddress[k]); - old_HopsAddress[k] = NULL; - } - } - if (item->traceRouteCtlTargetAddressType == 2) { - int icmp_sock = 0; /* receive (icmp) socket file descriptor */ - int sndsock = 0; /* send (udp) socket file descriptor */ + int icmp_sock = -1; /* receive (icmp) socket file descriptor */ + int sndsock = -1; /* send (udp) socket file descriptor */ - struct sockaddr_in6 whereto; /* Who to try to reach */ + struct sockaddr_in6 whereto; /* Who to try to reach */ - struct sockaddr_in6 saddr; - struct sockaddr_in6 firsthop; - char *source = NULL; - char *device = NULL; - char *hostname = NULL; + struct sockaddr_in6 saddr; + struct sockaddr_in6 firsthop; + char *source = NULL; + char *device = NULL; + char *hostname; - pid_t ident = 0; - u_short port = 32768 + 666; /* start udp dest port # for probe packets */ - int options = 0; /* socket options */ - int waittime = 5; /* time to wait for response (in seconds) */ + pid_t ident = 0; + u_short port = 32768 + 666; /* start udp dest port # for probe packets */ + int options = 0; /* socket options */ + int waittime = 5; /* time to wait for response (in seconds) */ - char *sendbuff = NULL; - int datalen = sizeof(struct pkt_format); + char *sendbuff = NULL; + int datalen = sizeof(struct pkt_format); - u_char packet[512]; /* last inbound (icmp) packet */ + u_char packet[512]; /* last inbound (icmp) packet */ - char pa[64]; - struct hostent *hp = NULL; - struct sockaddr_in6 from, *to = NULL; - int i = 0, on = 0, probe = 0, seq = 0, tos = - 0, ttl = 0; - int socket_errno = 0; + char pa[64]; + struct hostent *hp = NULL; + struct sockaddr_in6 from, *to = NULL; + int i = 0, k, on = 0, probe = 0, seq = 0, tos = 0, ttl = 0; + int socket_errno = 0; - icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); - socket_errno = errno; + icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); + socket_errno = errno; - setuid(getuid()); + NETSNMP_IGNORE_RESULT(setuid(getuid())); - on = 1; - seq = tos = 0; - to = (struct sockaddr_in6 *) &whereto; + on = 1; + seq = tos = 0; + to = (struct sockaddr_in6 *) &whereto; - hostname = - (char *) malloc(item->traceRouteCtlTargetAddressLen + 1); - memcpy(hostname, item->traceRouteCtlTargetAddress, - item->traceRouteCtlTargetAddressLen + 1); - hostname[item->traceRouteCtlTargetAddressLen] = '\0'; + hostname = malloc(item->traceRouteCtlTargetAddressLen + 1); + if (!hostname) + goto out; + memcpy(hostname, item->traceRouteCtlTargetAddress, + item->traceRouteCtlTargetAddressLen + 1); + hostname[item->traceRouteCtlTargetAddressLen] = '\0'; - setlinebuf(stdout); + setlinebuf(stdout); - memset(&whereto, '\0', sizeof(struct sockaddr_in6)); + memset(&whereto, '\0', sizeof(struct sockaddr_in6)); - to->sin6_family = AF_INET6; - to->sin6_port = htons(port); + to->sin6_family = AF_INET6; + to->sin6_port = htons(port); - if (inet_pton(AF_INET6, hostname, &to->sin6_addr) <= 0) { - hp = gethostbyname2(hostname, AF_INET6); - if (hp != NULL) { - memmove((caddr_t) & to->sin6_addr, hp->h_addr, 16); - hostname = (char *) hp->h_name; - } else { - (void) fprintf(stderr, - "traceroute: unknown host %s\n", hostname); - return; - } - } - firsthop = *to; - - datalen = item->traceRouteCtlDataSize; - if (datalen < (int) sizeof(struct pkt_format) - || datalen >= MAXPACKET) { - Fprintf(stderr, - "traceroute: packet size must be %d <= s < %d.\n", - (int) sizeof(struct pkt_format), MAXPACKET); - datalen = 16; + if (inet_pton(AF_INET6, hostname, &to->sin6_addr) <= 0) { + hp = gethostbyname2(hostname, AF_INET6); + if (hp != NULL) { + memmove((caddr_t) & to->sin6_addr, hp->h_addr, 16); + free(hostname); + hostname = strdup((char *) hp->h_name); + } else { + fprintf(stderr, "traceroute: unknown host %s\n", hostname); + free(hostname); + hostname = NULL; + goto out; } + } + firsthop = *to; - ident = getpid(); + datalen = item->traceRouteCtlDataSize; + if (datalen < (int) sizeof(struct pkt_format) + || datalen >= MAXPACKET) { + Fprintf(stderr, + "traceroute: packet size must be %d <= s < %d.\n", + (int) sizeof(struct pkt_format), MAXPACKET); + datalen = 16; + } - sendbuff = malloc(datalen); - if (sendbuff == NULL) { - fprintf(stderr, "malloc failed\n"); - return; - } + ident = getpid(); - if (icmp_sock < 0) { - errno = socket_errno; - perror("traceroute6: icmp socket"); - return; - } + sendbuff = malloc(datalen); + if (sendbuff == NULL) { + fprintf(stderr, "malloc failed\n"); + goto out; + } - if (options & SO_DEBUG) - setsockopt(icmp_sock, SOL_SOCKET, SO_DEBUG, - (char *) &on, sizeof(on)); - if (options & SO_DONTROUTE) - setsockopt(icmp_sock, SOL_SOCKET, SO_DONTROUTE, - (char *) &on, sizeof(on)); + if (icmp_sock < 0) { + errno = socket_errno; + perror("traceroute6: icmp socket"); + goto out; + } - if ((sndsock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - perror("traceroute: UDP socket"); - return; - } + if (options & SO_DEBUG) + setsockopt(icmp_sock, SOL_SOCKET, SO_DEBUG, + (char *) &on, sizeof(on)); + if (options & SO_DONTROUTE) + setsockopt(icmp_sock, SOL_SOCKET, SO_DONTROUTE, + (char *) &on, sizeof(on)); + + if ((sndsock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { + perror("traceroute: UDP socket"); + goto out; + } #ifdef SO_SNDBUF - if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *) &datalen, - sizeof(datalen)) < 0) { - perror("traceroute: SO_SNDBUF"); - return; - } + if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *) &datalen, + sizeof(datalen)) < 0) { + perror("traceroute: SO_SNDBUF"); + goto out; + } #endif /* SO_SNDBUF */ - if (options & SO_DEBUG) - (void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, - (char *) &on, sizeof(on)); - if (options & SO_DONTROUTE) - (void) setsockopt(sndsock, SOL_SOCKET, SO_DONTROUTE, - (char *) &on, sizeof(on)); + if (options & SO_DEBUG) + (void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, + (char *) &on, sizeof(on)); + if (options & SO_DONTROUTE) + (void) setsockopt(sndsock, SOL_SOCKET, SO_DONTROUTE, + (char *) &on, sizeof(on)); - if (source == NULL) { - socklen_t alen; - int probe_fd = socket(AF_INET6, SOCK_DGRAM, 0); + if (source == NULL) { + socklen_t alen; + int probe_fd = socket(AF_INET6, SOCK_DGRAM, 0); - if (probe_fd < 0) { - perror("socket"); - return; - } - if (device) { - if (setsockopt - (probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, - strlen(device) + 1) == -1) - perror("WARNING: interface is ignored"); - } - firsthop.sin6_port = htons(1025); - if (connect - (probe_fd, (struct sockaddr *) &firsthop, - sizeof(firsthop)) == -1) { - perror("connect"); - return; - } - alen = sizeof(saddr); - if (getsockname(probe_fd, (struct sockaddr *) &saddr, &alen) == - -1) { - perror("getsockname"); - return; - } - saddr.sin6_port = 0; + if (probe_fd < 0) { + perror("socket"); close(probe_fd); - } else { - memset(&saddr, '\0', sizeof(struct sockaddr_in6)); - saddr.sin6_family = AF_INET6; - if (inet_pton(AF_INET6, source, &saddr.sin6_addr) < 0) { - Printf("traceroute: unknown addr %s\n", source); - return; - } + goto out; } - - if (bind(sndsock, (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { - perror("traceroute: bind sending socket"); - return; + if (device) { + if (setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, + strlen(device) + 1) == -1) + perror("WARNING: interface is ignored"); + } + firsthop.sin6_port = htons(1025); + if (connect(probe_fd, (struct sockaddr *) &firsthop, + sizeof(firsthop)) == -1) { + perror("connect"); + close(probe_fd); + goto out; } - if (bind(icmp_sock, (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { - perror("traceroute: bind icmp6 socket"); - return; + alen = sizeof(saddr); + if (getsockname(probe_fd, (struct sockaddr *) &saddr, &alen) == -1) { + perror("getsockname"); + close(probe_fd); + goto out; } + saddr.sin6_port = 0; + close(probe_fd); + } else { + memset(&saddr, '\0', sizeof(struct sockaddr_in6)); + saddr.sin6_family = AF_INET6; + if (inet_pton(AF_INET6, source, &saddr.sin6_addr) < 0) { + Printf("traceroute: unknown addr %s\n", source); + goto out; + } + } - Fprintf(stderr, "traceroute to %s (%s)", hostname, - inet_ntop(AF_INET6, &to->sin6_addr, pa, 64)); - - Fprintf(stderr, " from %s", - inet_ntop(AF_INET6, &saddr.sin6_addr, pa, 64)); - Fprintf(stderr, ", %lu hops max, %d byte packets\n", - item->traceRouteCtlMaxTtl, datalen); - (void) fflush(stderr); - + if (bind(sndsock, (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { + perror("traceroute: bind sending socket"); + goto out; + } + if (bind(icmp_sock, (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { + perror("traceroute: bind icmp6 socket"); + goto out; + } - struct traceRouteResultsTable_data *StorageResults = NULL; - netsnmp_variable_list *vars_results = NULL; + Fprintf(stderr, "traceroute to %s (%s)", hostname, + inet_ntop(AF_INET6, &to->sin6_addr, pa, 64)); - struct traceRouteHopsTable_data *temp = NULL; - struct traceRouteHopsTable_data *current_temp = NULL; - struct traceRouteHopsTable_data *current = NULL; + Fprintf(stderr, " from %s", + inet_ntop(AF_INET6, &saddr.sin6_addr, pa, 64)); + Fprintf(stderr, ", %lu hops max, %d byte packets\n", + item->traceRouteCtlMaxTtl, datalen); + (void) fflush(stderr); - unsigned long index = 0; - struct traceRouteProbeHistoryTable_data *temp_his = NULL; - struct traceRouteProbeHistoryTable_data *current_temp_his = NULL; + struct traceRouteResultsTable_data *StorageResults = NULL; + netsnmp_variable_list *vars_results = NULL; - snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ - snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ - if ((StorageResults = - header_complex_get(traceRouteResultsTableStorage, - vars_results)) == NULL) - return; - snmp_free_varbind(vars_results); - vars_results = NULL; + struct traceRouteHopsTable_data *temp = NULL; + struct traceRouteHopsTable_data *current_temp = NULL; + struct traceRouteHopsTable_data *current = NULL; - for (ttl = item->traceRouteCtlInitialTtl; - ttl <= item->traceRouteCtlMaxTtl; ++ttl) { - struct in6_addr lastaddr = { {{0,}} }; - int got_there = 0; - int unreachable = 0; - time_t timep = 0; - Printf("%2d ", ttl); + unsigned long index = 0; + struct traceRouteProbeHistoryTable_data *temp_his = NULL; + struct traceRouteProbeHistoryTable_data *current_temp_his = NULL; - StorageResults->traceRouteResultsCurHopCount = ttl; - if (item->traceRouteCtlCreateHopsEntries == 1) { - if (ttl == item->traceRouteCtlInitialTtl) { - - int k = 0; - count = traceRouteHopsTable_count(item); - struct traceRouteHopsTable_data *StorageTmp = NULL; - struct header_complex_index *hciptr2 = NULL; - netsnmp_variable_list *vars = NULL; - oid newoid[MAX_OID_LEN]; - size_t newoid_len; - - snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ - snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ - - header_complex_generate_oid(newoid, &newoid_len, NULL, - 0, vars); - - snmp_free_varbind(vars); - vars = NULL; - - for (hciptr2 = traceRouteHopsTableStorage; - hciptr2 != NULL; hciptr2 = hciptr2->next) { - if (snmp_oid_compare - (newoid, newoid_len, hciptr2->name, - newoid_len) == 0) { - StorageTmp = - header_complex_extract_entry - (&traceRouteHopsTableStorage, hciptr2); - - old_HopsAddress[k] = - (char *) malloc(StorageTmp-> - traceRouteHopsIpTgtAddressLen - + 1); - if (old_HopsAddress[k] == NULL) { - exit(1); - } - old_HopsAddress[k] = netsnmp_memdup( - StorageTmp->traceRouteHopsIpTgtAddress, - StorageTmp-> - traceRouteHopsIpTgtAddressLen + 1); - old_HopsAddress[k][StorageTmp-> - traceRouteHopsIpTgtAddressLen] - = '\0'; - - k++; + snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ + snmp_varlist_add_variable(&vars_results, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ + if ((StorageResults = + header_complex_get(traceRouteResultsTableStorage, + vars_results)) == NULL) { + goto out; + } + snmp_free_varbind(vars_results); + vars_results = NULL; + + for (ttl = item->traceRouteCtlInitialTtl; + ttl <= item->traceRouteCtlMaxTtl; ++ttl) { + struct in6_addr lastaddr = { {{0,}} }; + int got_there = 0; + int unreachable = 0; + time_t timep = 0; + Printf("%2d ", ttl); + + + StorageResults->traceRouteResultsCurHopCount = ttl; + if (item->traceRouteCtlCreateHopsEntries == 1) { + if (ttl == item->traceRouteCtlInitialTtl) { + + int k = 0; + count = traceRouteHopsTable_count(item); + struct traceRouteHopsTable_data *StorageTmp; + struct header_complex_index *hciptr2, *nhciptr2; + netsnmp_variable_list *vars = NULL; + oid newoid[MAX_OID_LEN]; + size_t newoid_len; + + snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ + snmp_varlist_add_variable(&vars, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ + + header_complex_generate_oid(newoid, &newoid_len, NULL, + 0, vars); + + snmp_free_varbind(vars); + vars = NULL; + + for (hciptr2 = traceRouteHopsTableStorage; hciptr2; + hciptr2 = nhciptr2) { + nhciptr2 = hciptr2->next; + if (snmp_oid_compare + (newoid, newoid_len, hciptr2->name, + newoid_len) == 0) { + StorageTmp = + header_complex_extract_entry + (&traceRouteHopsTableStorage, hciptr2); + + old_HopsAddress[k] = + (char *) malloc(StorageTmp-> + traceRouteHopsIpTgtAddressLen + + 1); + if (old_HopsAddress[k] == NULL) { + exit(1); } + old_HopsAddress[k] = netsnmp_memdup( + StorageTmp->traceRouteHopsIpTgtAddress, + StorageTmp-> + traceRouteHopsIpTgtAddressLen + 1); + old_HopsAddress[k][StorageTmp-> + traceRouteHopsIpTgtAddressLen] + = '\0'; + + k++; } - traceRouteHopsTable_del(item); - index = 0; } + traceRouteHopsTable_del(item); + index = 0; + } + + temp = SNMP_MALLOC_STRUCT(traceRouteHopsTable_data); + temp->traceRouteCtlOwnerIndex = + (char *) malloc(item->traceRouteCtlOwnerIndexLen + 1); + memcpy(temp->traceRouteCtlOwnerIndex, + item->traceRouteCtlOwnerIndex, + item->traceRouteCtlOwnerIndexLen + 1); + temp->traceRouteCtlOwnerIndex[item-> + traceRouteCtlOwnerIndexLen] = + '\0'; + temp->traceRouteCtlOwnerIndexLen = + item->traceRouteCtlOwnerIndexLen; + + temp->traceRouteCtlTestName = + (char *) malloc(item->traceRouteCtlTestNameLen + 1); + memcpy(temp->traceRouteCtlTestName, + item->traceRouteCtlTestName, + item->traceRouteCtlTestNameLen + 1); + temp->traceRouteCtlTestName[item-> + traceRouteCtlTestNameLen] = + '\0'; + temp->traceRouteCtlTestNameLen = + item->traceRouteCtlTestNameLen; + + /* add lock to protect */ + pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_lock(&counter_mutex); + temp->traceRouteHopsHopIndex = ++index; + pthread_mutex_unlock(&counter_mutex); + /* endsadsadsad */ + + + temp->traceRouteHopsIpTgtAddressType = 0; + temp->traceRouteHopsIpTgtAddress = strdup(""); + temp->traceRouteHopsIpTgtAddressLen = 0; + temp->traceRouteHopsMinRtt = 0; + temp->traceRouteHopsMaxRtt = 0; + temp->traceRouteHopsAverageRtt = 0; + temp->traceRouteHopsRttSumOfSquares = 0; + temp->traceRouteHopsSentProbes = 0; + temp->traceRouteHopsProbeResponses = 0; + + temp->traceRouteHopsLastGoodProbeLen = 0; + if (index == 1) + item->traceRouteHops = temp; + else { + (current_temp)->next = temp; + } + + current_temp = temp; + + if (index >= item->traceRouteCtlMaxTtl) { + current_temp->next = NULL; + } + + if (item->traceRouteHops != NULL) + + if (traceRouteHopsTable_add(current_temp) != + SNMPERR_SUCCESS) + DEBUGMSGTL(("traceRouteHopsTable", + "registered an entry error\n")); + + } + + unsigned long maxRtt = 0; + unsigned long minRtt = 0; + unsigned long averageRtt = 0; + unsigned long sumRtt = 0; + unsigned long responseProbe = 0; + unsigned long sumOfSquare = 0; + for (probe = 0; probe < nprobes; ++probe) { + int cc = 0, reset_timer = 0; + struct timeval t1, t2; + struct timezone tz; + unsigned long Rtt = 0; + + gettimeofday(&t1, &tz); + + send_probe_v6(++seq, ttl, sendbuff, ident, &tz, sndsock, + datalen, &whereto, hostname); + reset_timer = 1; + + while ((cc = + wait_for_reply_v6(icmp_sock, &from, reset_timer, + waittime, icmp_sock, + packet)) != 0) { + gettimeofday(&t2, &tz); + timep = 0; + time(&timep); + if ((i = + packet_ok_v6(packet, cc, &from, seq, &t1, + ident))) { + reset_timer = 1; + if (memcmp + (&from.sin6_addr, &lastaddr, + sizeof(struct in6_addr))) { + + memcpy(&lastaddr, + &from.sin6_addr, + sizeof(struct in6_addr)); + } + + Rtt = deltaT(&t1, &t2); + responseProbe = responseProbe + 1; + if (probe == 0) { + minRtt = Rtt; + maxRtt = Rtt; + averageRtt = Rtt; + sumRtt = Rtt; + sumOfSquare = Rtt * Rtt; + } else { + if (Rtt < minRtt) + minRtt = Rtt; + if (Rtt > maxRtt) + maxRtt = Rtt; + sumRtt = (sumRtt) + Rtt; + averageRtt = + round((double) (sumRtt) / + (double) responseProbe); + sumOfSquare = sumOfSquare + Rtt * Rtt; + } + + StorageResults->traceRouteResultsCurProbeCount = + probe + 1; + + + switch (i - 1) { + case ICMP6_DST_UNREACH_NOPORT: + ++got_there; + break; + + case ICMP6_DST_UNREACH_NOROUTE: + ++unreachable; + Printf(" !N"); + break; + case ICMP6_DST_UNREACH_ADDR: + ++unreachable; + Printf(" !H"); + break; + + case ICMP6_DST_UNREACH_ADMIN: + ++unreachable; + Printf(" !S"); + break; + } + break; + } else + reset_timer = 0; + } + if (cc == 0) { + timep = 0; + time(&timep); + Printf(" *"); + Rtt = (item->traceRouteCtlTimeOut) * 1000; + } + + if (item->traceRouteCtlMaxRows != 0) { - temp = SNMP_MALLOC_STRUCT(traceRouteHopsTable_data); - temp->traceRouteCtlOwnerIndex = - (char *) malloc(item->traceRouteCtlOwnerIndexLen + 1); - memcpy(temp->traceRouteCtlOwnerIndex, + temp_his = + SNMP_MALLOC_STRUCT + (traceRouteProbeHistoryTable_data); + temp_his->traceRouteCtlOwnerIndex = + (char *) malloc(item->traceRouteCtlOwnerIndexLen + + 1); + memcpy(temp_his->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen + 1); - temp->traceRouteCtlOwnerIndex[item-> - traceRouteCtlOwnerIndexLen] = - '\0'; - temp->traceRouteCtlOwnerIndexLen = + temp_his->traceRouteCtlOwnerIndex[item-> + traceRouteCtlOwnerIndexLen] + = '\0'; + temp_his->traceRouteCtlOwnerIndexLen = item->traceRouteCtlOwnerIndexLen; - temp->traceRouteCtlTestName = - (char *) malloc(item->traceRouteCtlTestNameLen + 1); - memcpy(temp->traceRouteCtlTestName, + temp_his->traceRouteCtlTestName = + (char *) malloc(item->traceRouteCtlTestNameLen + + 1); + memcpy(temp_his->traceRouteCtlTestName, item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen + 1); - temp->traceRouteCtlTestName[item-> - traceRouteCtlTestNameLen] = - '\0'; - temp->traceRouteCtlTestNameLen = + temp_his->traceRouteCtlTestName[item-> + traceRouteCtlTestNameLen] + = '\0'; + temp_his->traceRouteCtlTestNameLen = item->traceRouteCtlTestNameLen; /* add lock to protect */ - pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t counter_mutex = + PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&counter_mutex); - temp->traceRouteHopsHopIndex = ++index; + if (item->traceRouteProbeHistoryMaxIndex >= + (unsigned long) (2147483647)) + item->traceRouteProbeHistoryMaxIndex = 0; + temp_his->traceRouteProbeHistoryIndex = + ++(item->traceRouteProbeHistoryMaxIndex); pthread_mutex_unlock(&counter_mutex); /* endsadsadsad */ - - - temp->traceRouteHopsIpTgtAddressType = 0; - temp->traceRouteHopsIpTgtAddress = strdup(""); - temp->traceRouteHopsIpTgtAddressLen = 0; - temp->traceRouteHopsMinRtt = 0; - temp->traceRouteHopsMaxRtt = 0; - temp->traceRouteHopsAverageRtt = 0; - temp->traceRouteHopsRttSumOfSquares = 0; - temp->traceRouteHopsSentProbes = 0; - temp->traceRouteHopsProbeResponses = 0; - - temp->traceRouteHopsLastGoodProbeLen = 0; - if (index == 1) - item->traceRouteHops = temp; + temp_his->traceRouteProbeHistoryHopIndex = ttl; + temp_his->traceRouteProbeHistoryProbeIndex = probe + 1; + + temp_his->traceRouteProbeHistoryHAddrType = 2; + temp_his->traceRouteProbeHistoryHAddr = + (char *) + malloc(strlen + (inet_ntop + (AF_INET6, &from.sin6_addr, pa, 64)) + 1); + temp_his->traceRouteProbeHistoryHAddr = + strdup(inet_ntop + (AF_INET6, &from.sin6_addr, pa, 64)); + temp_his-> + traceRouteProbeHistoryHAddr[strlen + (inet_ntop + (AF_INET6, + &from.sin6_addr, pa, + 64))] = '\0'; + temp_his->traceRouteProbeHistoryHAddrLen = + strlen(inet_ntop + (AF_INET6, &from.sin6_addr, pa, 64)); + + temp_his->traceRouteProbeHistoryResponse = Rtt; + temp_his->traceRouteProbeHistoryStatus = 1; + temp_his->traceRouteProbeHistoryLastRC = 0; + + temp_his->traceRouteProbeHistoryTime_time = timep; + temp_his->traceRouteProbeHistoryTime = netsnmp_memdup( + date_n_time(&timep, + &temp_his->traceRouteProbeHistoryTimeLen), 11); + + if (probe == 0) + item->traceRouteProbeHis = temp_his; else { - (current_temp)->next = temp; + (current_temp_his)->next = temp_his; } - current_temp = temp; + current_temp_his = temp_his; - if (index >= item->traceRouteCtlMaxTtl) { - current_temp->next = NULL; + if (probe + 1 >= nprobes) { + current_temp_his->next = NULL; } - if (item->traceRouteHops != NULL) + if (item->traceRouteProbeHis != NULL) { + if (traceRouteProbeHistoryTable_count(item) < + item->traceRouteCtlMaxRows) { + if (traceRouteProbeHistoryTable_add + (current_temp_his) != SNMPERR_SUCCESS) + DEBUGMSGTL(("traceRouteProbeHistoryTable", + "registered an entry error\n")); + } else { + traceRouteProbeHistoryTable_delLast(item); + if (traceRouteProbeHistoryTable_add + (current_temp_his) != SNMPERR_SUCCESS) + DEBUGMSGTL(("traceRouteProbeHistoryTable", + "registered an entry error\n")); - if (traceRouteHopsTable_add(current_temp) != - SNMPERR_SUCCESS) - DEBUGMSGTL(("traceRouteHopsTable", - "registered an entry error\n")); + } + } } - - register unsigned long maxRtt = 0; - register unsigned long minRtt = 0; - register unsigned long averageRtt = 0; - register unsigned long sumRtt = 0; - register unsigned long responseProbe = 0; - register unsigned long sumOfSquare = 0; - for (probe = 0; probe < nprobes; ++probe) { - int cc = 0, reset_timer = 0; - struct timeval t1, t2; - struct timezone tz; - register unsigned long Rtt = 0; - - gettimeofday(&t1, &tz); - - send_probe_v6(++seq, ttl, sendbuff, ident, &tz, sndsock, - datalen, &whereto, hostname); - reset_timer = 1; - - while ((cc = - wait_for_reply_v6(icmp_sock, &from, reset_timer, - waittime, icmp_sock, - packet)) != 0) { - gettimeofday(&t2, &tz); - timep = 0; - time(&timep); - if ((i = - packet_ok_v6(packet, cc, &from, seq, &t1, - ident))) { - reset_timer = 1; - if (memcmp - (&from.sin6_addr, &lastaddr, - sizeof(struct in6_addr))) { - - memcpy(&lastaddr, - &from.sin6_addr, - sizeof(struct in6_addr)); - } - - Rtt = deltaT(&t1, &t2); - responseProbe = responseProbe + 1; - if (probe == 0) { - minRtt = Rtt; - maxRtt = Rtt; - averageRtt = Rtt; - sumRtt = Rtt; - sumOfSquare = Rtt * Rtt; - } else { - if (Rtt < minRtt) - minRtt = Rtt; - if (Rtt > maxRtt) - maxRtt = Rtt; - sumRtt = (sumRtt) + Rtt; - averageRtt = - round((double) (sumRtt) / - (double) responseProbe); - sumOfSquare = sumOfSquare + Rtt * Rtt; - } - - StorageResults->traceRouteResultsCurProbeCount = - probe + 1; - - - switch (i - 1) { - case ICMP6_DST_UNREACH_NOPORT: - ++got_there; - break; - - case ICMP6_DST_UNREACH_NOROUTE: - ++unreachable; - Printf(" !N"); - break; - case ICMP6_DST_UNREACH_ADDR: - ++unreachable; - Printf(" !H"); - break; - - case ICMP6_DST_UNREACH_ADMIN: - ++unreachable; - Printf(" !S"); - break; - } - break; - } else - reset_timer = 0; - } - if (cc == 0) { - timep = 0; - time(&timep); - Printf(" *"); - Rtt = (item->traceRouteCtlTimeOut) * 1000; + if (item->traceRouteCtlCreateHopsEntries == 1) { + netsnmp_variable_list *vars_hops = NULL; + snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ + snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ + snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_UNSIGNED, (char *) &index, sizeof(index)); /* traceRouteHopsIndex */ + if ((current = + header_complex_get(traceRouteHopsTableStorage, + vars_hops)) == NULL) + goto out; + current->traceRouteHopsIpTgtAddressType = 2; + current->traceRouteHopsIpTgtAddress = + (char *) + malloc(strlen + (inet_ntop + (AF_INET6, &from.sin6_addr, pa, 64)) + 1); + current->traceRouteHopsIpTgtAddress = + strdup(inet_ntop + (AF_INET6, &from.sin6_addr, pa, 64)); + current-> + traceRouteHopsIpTgtAddress[strlen + (inet_ntop + (AF_INET6, + &from.sin6_addr, pa, + 64))] = '\0'; + + if (count != 0) { + if (strcmp + (old_HopsAddress[index - 1], + current->traceRouteHopsIpTgtAddress) != 0) + flag = 1; } - if (item->traceRouteCtlMaxRows != 0) { - - temp_his = - SNMP_MALLOC_STRUCT - (traceRouteProbeHistoryTable_data); - temp_his->traceRouteCtlOwnerIndex = - (char *) malloc(item->traceRouteCtlOwnerIndexLen + - 1); - memcpy(temp_his->traceRouteCtlOwnerIndex, - item->traceRouteCtlOwnerIndex, - item->traceRouteCtlOwnerIndexLen + 1); - temp_his->traceRouteCtlOwnerIndex[item-> - traceRouteCtlOwnerIndexLen] - = '\0'; - temp_his->traceRouteCtlOwnerIndexLen = - item->traceRouteCtlOwnerIndexLen; - - temp_his->traceRouteCtlTestName = - (char *) malloc(item->traceRouteCtlTestNameLen + - 1); - memcpy(temp_his->traceRouteCtlTestName, - item->traceRouteCtlTestName, - item->traceRouteCtlTestNameLen + 1); - temp_his->traceRouteCtlTestName[item-> - traceRouteCtlTestNameLen] - = '\0'; - temp_his->traceRouteCtlTestNameLen = - item->traceRouteCtlTestNameLen; - - /* add lock to protect */ - pthread_mutex_t counter_mutex = - PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&counter_mutex); - if (item->traceRouteProbeHistoryMaxIndex >= - (unsigned long) (2147483647)) - item->traceRouteProbeHistoryMaxIndex = 0; - temp_his->traceRouteProbeHistoryIndex = - ++(item->traceRouteProbeHistoryMaxIndex); - pthread_mutex_unlock(&counter_mutex); - /* endsadsadsad */ - temp_his->traceRouteProbeHistoryHopIndex = ttl; - temp_his->traceRouteProbeHistoryProbeIndex = probe + 1; - - temp_his->traceRouteProbeHistoryHAddrType = 2; - temp_his->traceRouteProbeHistoryHAddr = - (char *) - malloc(strlen - (inet_ntop - (AF_INET6, &from.sin6_addr, pa, 64)) + 1); - temp_his->traceRouteProbeHistoryHAddr = - strdup(inet_ntop - (AF_INET6, &from.sin6_addr, pa, 64)); - temp_his-> - traceRouteProbeHistoryHAddr[strlen - (inet_ntop - (AF_INET6, - &from.sin6_addr, pa, - 64))] = '\0'; - temp_his->traceRouteProbeHistoryHAddrLen = - strlen(inet_ntop - (AF_INET6, &from.sin6_addr, pa, 64)); - - temp_his->traceRouteProbeHistoryResponse = Rtt; - temp_his->traceRouteProbeHistoryStatus = 1; - temp_his->traceRouteProbeHistoryLastRC = 0; - - temp_his->traceRouteProbeHistoryTime_time = timep; - temp_his->traceRouteProbeHistoryTime = netsnmp_memdup( - date_n_time(&timep, - &temp_his->traceRouteProbeHistoryTimeLen), 11); - - if (probe == 0) - item->traceRouteProbeHis = temp_his; - else { - (current_temp_his)->next = temp_his; - } - - current_temp_his = temp_his; - - if (probe + 1 >= nprobes) { - current_temp_his->next = NULL; - } + current->traceRouteHopsIpTgtAddressLen = + strlen(inet_ntop + (AF_INET6, &from.sin6_addr, pa, 64)); + current->traceRouteHopsMinRtt = minRtt; + current->traceRouteHopsMaxRtt = maxRtt; + current->traceRouteHopsAverageRtt = averageRtt; + current->traceRouteHopsRttSumOfSquares = sumOfSquare; + current->traceRouteHopsSentProbes = probe + 1; + current->traceRouteHopsProbeResponses = responseProbe; + current->traceRouteHopsLastGoodProbe_time = timep; + current->traceRouteHopsLastGoodProbe = + netsnmp_memdup(date_n_time(&timep, + ¤t->traceRouteHopsLastGoodProbeLen), 11); + + snmp_free_varbind(vars_hops); + vars_hops = NULL; + } - if (item->traceRouteProbeHis != NULL) { - if (traceRouteProbeHistoryTable_count(item) < - item->traceRouteCtlMaxRows) { - if (traceRouteProbeHistoryTable_add - (current_temp_his) != SNMPERR_SUCCESS) - DEBUGMSGTL(("traceRouteProbeHistoryTable", - "registered an entry error\n")); - } else { - traceRouteProbeHistoryTable_delLast(item); - if (traceRouteProbeHistoryTable_add - (current_temp_his) != SNMPERR_SUCCESS) - DEBUGMSGTL(("traceRouteProbeHistoryTable", - "registered an entry error\n")); - } - } + (void) fflush(stdout); + } + putchar('\n'); - } - if (item->traceRouteCtlCreateHopsEntries == 1) { - netsnmp_variable_list *vars_hops = NULL; - snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlOwnerIndex, item->traceRouteCtlOwnerIndexLen); /* traceRouteCtlOwnerIndex */ - snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_OCTET_STR, (char *) item->traceRouteCtlTestName, item->traceRouteCtlTestNameLen); /* traceRouteCtlTestName */ - snmp_varlist_add_variable(&vars_hops, NULL, 0, ASN_UNSIGNED, (char *) &index, sizeof(index)); /* traceRouteHopsIndex */ - if ((current = - header_complex_get(traceRouteHopsTableStorage, - vars_hops)) == NULL) - return; - current->traceRouteHopsIpTgtAddressType = 2; - current->traceRouteHopsIpTgtAddress = - (char *) - malloc(strlen - (inet_ntop - (AF_INET6, &from.sin6_addr, pa, 64)) + 1); - current->traceRouteHopsIpTgtAddress = - strdup(inet_ntop - (AF_INET6, &from.sin6_addr, pa, 64)); - current-> - traceRouteHopsIpTgtAddress[strlen - (inet_ntop - (AF_INET6, - &from.sin6_addr, pa, - 64))] = '\0'; - - if (count != 0) { - if (strcmp - (old_HopsAddress[index - 1], - current->traceRouteHopsIpTgtAddress) != 0) - flag = 1; - } - current->traceRouteHopsIpTgtAddressLen = - strlen(inet_ntop - (AF_INET6, &from.sin6_addr, pa, 64)); - current->traceRouteHopsMinRtt = minRtt; - current->traceRouteHopsMaxRtt = maxRtt; - current->traceRouteHopsAverageRtt = averageRtt; - current->traceRouteHopsRttSumOfSquares = sumOfSquare; - current->traceRouteHopsSentProbes = probe + 1; - current->traceRouteHopsProbeResponses = responseProbe; - current->traceRouteHopsLastGoodProbe_time = timep; - current->traceRouteHopsLastGoodProbe = - netsnmp_memdup(date_n_time(&timep, - ¤t->traceRouteHopsLastGoodProbeLen), 11); - - snmp_free_varbind(vars_hops); - vars_hops = NULL; - } + if (got_there || unreachable >= nprobes - 1) { - (void) fflush(stdout); - } - putchar('\n'); - - - if (got_there || unreachable >= nprobes - 1) { - - - if (got_there != 0) { - StorageResults->traceRouteResultsTestAttempts = - StorageResults->traceRouteResultsTestAttempts + 1; - - StorageResults->traceRouteResultsTestSuccesses = - StorageResults->traceRouteResultsTestSuccesses + 1; - StorageResults->traceRouteResultsLastGoodPath_time = timep; - StorageResults->traceRouteResultsLastGoodPath = - netsnmp_memdup(date_n_time(&timep, - &StorageResults-> - traceRouteResultsLastGoodPathLen), - 11); - if ((item-> - traceRouteCtlTrapGeneration[0] & - TRACEROUTETRAPGENERATION_TESTCOMPLETED) != 0) { - printf("TEST completed!\n"); - send_traceRoute_trap(item, traceRouteTestCompleted, - sizeof - (traceRouteTestCompleted) / - sizeof(oid)); - } - } + if (got_there != 0) { + StorageResults->traceRouteResultsTestAttempts = + StorageResults->traceRouteResultsTestAttempts + 1; - else { - StorageResults->traceRouteResultsTestAttempts = - StorageResults->traceRouteResultsTestAttempts + 1; - if ((item-> - traceRouteCtlTrapGeneration[0] & - TRACEROUTETRAPGENERATION_TESTFAILED) != 0) { - printf("test Failed!\n"); - send_traceRoute_trap(item, traceRouteTestFailed, - sizeof(traceRouteTestFailed) / - sizeof(oid)); - } + StorageResults->traceRouteResultsTestSuccesses = + StorageResults->traceRouteResultsTestSuccesses + 1; + StorageResults->traceRouteResultsLastGoodPath_time = timep; + StorageResults->traceRouteResultsLastGoodPath = + netsnmp_memdup(date_n_time(&timep, + &StorageResults-> + traceRouteResultsLastGoodPathLen), + 11); + if ((item-> + traceRouteCtlTrapGeneration[0] & + TRACEROUTETRAPGENERATION_TESTCOMPLETED) != 0) { + printf("TEST completed!\n"); + send_traceRoute_trap(item, traceRouteTestCompleted, + sizeof + (traceRouteTestCompleted) / + sizeof(oid)); } - break; + } - } else if (ttl == item->traceRouteCtlMaxTtl - && (probe + 1) == nprobes) { + else { StorageResults->traceRouteResultsTestAttempts = StorageResults->traceRouteResultsTestAttempts + 1; - if ((item-> traceRouteCtlTrapGeneration[0] & TRACEROUTETRAPGENERATION_TESTFAILED) != 0) { printf("test Failed!\n"); send_traceRoute_trap(item, traceRouteTestFailed, - sizeof(traceRouteTestFailed) / - sizeof(oid)); + sizeof(traceRouteTestFailed) / + sizeof(oid)); } } + break; + } else if (ttl == item->traceRouteCtlMaxTtl + && (probe + 1) == nprobes) { + StorageResults->traceRouteResultsTestAttempts = + StorageResults->traceRouteResultsTestAttempts + 1; + + if ((item-> + traceRouteCtlTrapGeneration[0] & + TRACEROUTETRAPGENERATION_TESTFAILED) != 0) { + printf("test Failed!\n"); + send_traceRoute_trap(item, traceRouteTestFailed, + sizeof(traceRouteTestFailed) / + sizeof(oid)); + } } + } + + if (flag == 1) { + printf("path changed!\n"); + send_traceRoute_trap(item, traceRoutePathChange, + sizeof(traceRoutePathChange) / + sizeof(oid)); + } + +out: + for (k = 0; k < count; k++) + free(old_HopsAddress[k]); + + free(sendbuff); + if (sndsock >= 0) close(sndsock); + if (icmp_sock >= 0) + close(icmp_sock); + free(hostname); +} - if (flag == 1) { - printf("path changed!\n"); - send_traceRoute_trap(item, traceRoutePathChange, - sizeof(traceRoutePathChange) / - sizeof(oid)); - } +void +run_traceRoute(unsigned int clientreg, void *clientarg) +{ + struct traceRouteCtlTable_data *item = clientarg; - int k = 0; - for (k = 0; k < count; k++) { - free(old_HopsAddress[k]); - old_HopsAddress[k] = NULL; - } + if (item->traceRouteCtlInitialTtl > item->traceRouteCtlMaxTtl) { + DEBUGMSGTL(("traceRouteCtlTable", + "first ttl (%lu) may not be greater than max ttl (%lu)\n", + item->traceRouteCtlInitialTtl, + item->traceRouteCtlMaxTtl)); + return; + } + switch (item->traceRouteCtlTargetAddressType) { + case 1: + case 16: + run_traceRoute_ipv4(item); + break; + case 2: + run_traceRoute_ipv6(item); + break; } - return; } - int -wait_for_reply(register int sock, register struct sockaddr_in *fromp, - register const struct timeval *tp, u_char * packet, +wait_for_reply(int sock, struct sockaddr_in *fromp, + const struct timeval *tp, u_char * packet, int waittime) { fd_set fds; struct timeval now, wait; struct timezone tz; - register int cc = 0; + int cc = 0; socklen_t fromlen = sizeof(*fromp); FD_ZERO(&fds); @@ -5646,14 +5691,14 @@ struct udpiphdr { #define ui_len ui_i.tot_len void -send_probe(struct sockaddr_in *whereto, register int seq, int ttl, - register struct timeval *tp, register struct ip *outip, - register struct udphdr *outudp, int packlen, int optlen, +send_probe(struct sockaddr_in *whereto, int seq, int ttl, + struct timeval *tp, struct ip *outip, + struct udphdr *outudp, int packlen, int optlen, char *hostname, u_short ident, int sndsock, u_short port, struct outdata *outdata) { - register int cc = 0; - register struct udpiphdr *ui = NULL, *oui = NULL; + int cc = 0; + struct udpiphdr *ui = NULL, *oui = NULL; struct ip tip; outip->ip_ttl = ttl; @@ -5732,7 +5777,7 @@ send_probe(struct sockaddr_in *whereto, register int seq, int ttl, #else cc = sendto(sndsock, (char *) outip, - packlen, 0, whereto, sizeof(*whereto)); + packlen, 0, (void *)whereto, sizeof(*whereto)); #endif if (cc < 0 || cc != packlen) { if (cc < 0) @@ -5783,7 +5828,7 @@ send_probe_v6(int seq, int ttl, char *sendbuff, pid_t ident, unsigned long deltaT(struct timeval *t1p, struct timeval *t2p) { - register unsigned long dt; + unsigned long dt; dt = (unsigned long) ((long) (t2p->tv_sec - t1p->tv_sec) * 1000 + (long) (t2p->tv_usec - t1p->tv_usec) / 1000); @@ -5792,14 +5837,15 @@ deltaT(struct timeval *t1p, struct timeval *t2p) int -packet_ok(register u_char * buf, int cc, register struct sockaddr_in *from, - register int seq, u_short ident, int pmtu, u_short port) +packet_ok(u_char * buf, int cc, struct sockaddr_in *from, + int seq, u_short ident, int pmtu NETSNMP_ATTRIBUTE_UNUSED, + u_short port) { - register struct icmp *icp = NULL; - register u_char type, code; - register int hlen = 0; + struct icmp *icp = NULL; + u_char type, code; + int hlen = 0; #ifndef ARCHAIC - register struct ip *ip = NULL; + struct ip *ip = NULL; ip = (struct ip *) buf; hlen = ip->ip_hl << 2; @@ -5817,6 +5863,7 @@ packet_ok(register u_char * buf, int cc, register struct sockaddr_in *from, /* * Path MTU Discovery (RFC1191) */ +#if 0 if (code != ICMP_UNREACH_NEEDFRAG) pmtu = 0; else { @@ -5826,10 +5873,15 @@ packet_ok(register u_char * buf, int cc, register struct sockaddr_in *from, pmtu = ntohs(((struct my_pmtu *) &icp->icmp_void)->ipm_nextmtu); #endif } +#endif if ((type == ICMP_TIMXCEED && code == ICMP_TIMXCEED_INTRANS) || type == ICMP_UNREACH || type == ICMP_ECHOREPLY) { - register struct ip *hip; - register struct udphdr *up; + struct ip *hip; + struct udphdr *up; + + if(cc < offsetof(struct icmp, icmp_ip) + sizeof(icp->icmp_ip)) { + return (0); + } hip = &icp->icmp_ip; hlen = hip->ip_hl << 2; @@ -5857,6 +5909,9 @@ packet_ok_v6(u_char * buf, int cc, struct sockaddr_in6 *from, int seq, struct icmp6_hdr *icp = NULL; u_char type, code; + if(cc < sizeof(struct icmp6_hdr)) + return 0; + icp = (struct icmp6_hdr *) buf; type = icp->icmp6_type; @@ -5898,12 +5953,12 @@ packet_ok_v6(u_char * buf, int cc, struct sockaddr_in6 *from, int seq, */ u_short -in_checksum(register u_short * addr, register int len) +in_checksum(u_short * addr, int len) { - register int nleft = len; - register u_short *w = addr; - register u_short answer; - register int sum = 0; + int nleft = len; + u_short *w = addr; + u_short answer; + int sum = 0; /* * Our algorithm is simple, using a 32 bit accumulator (sum), @@ -5936,7 +5991,7 @@ in_checksum(register u_short * addr, register int len) * Out is assumed to be >= in. */ void -tvsub(register struct timeval *out, register struct timeval *in) +tvsub(struct timeval *out, struct timeval *in) { if ((out->tv_usec -= in->tv_usec) < 0) { @@ -5948,13 +6003,13 @@ tvsub(register struct timeval *out, register struct timeval *in) struct hostinfo * -gethostinfo(register char *hostname) +gethostinfo(char *hostname) { - register int n; - register struct hostent *hp = NULL; - register struct hostinfo *hi = NULL; - register char **p = NULL; - register u_int32_t addr, *ap = NULL; + int n; + struct hostent *hp = NULL; + struct hostinfo *hi = NULL; + char **p = NULL; + u_int32_t addr, *ap = NULL; if (strlen(hostname) > 64) { Fprintf(stderr, "%s: hostname \"%.32s...\" is too long\n", @@ -6004,18 +6059,18 @@ gethostinfo(register char *hostname) } void -freehostinfo(register struct hostinfo *hi) +freehostinfo(struct hostinfo *hi) { if (hi->name != NULL) { free(hi->name); hi->name = NULL; } - free((char *) hi->addrs); - free((char *) hi); + free(hi->addrs); + free(hi); } void -setsin(register struct sockaddr_in *sin, register u_int32_t addr) +setsin(struct sockaddr_in *sin, u_int32_t addr) { memset(sin, 0, sizeof(*sin)); @@ -6030,22 +6085,23 @@ setsin(register struct sockaddr_in *sin, register u_int32_t addr) /* * Return the source address for the given destination address */ -const char * -findsaddr(register const struct sockaddr_in *to, - register struct sockaddr_in *from) +static char * +findsaddr(const struct sockaddr_in *to, + struct sockaddr_in *from) { - register int i, n; - register FILE *f; - register u_int32_t mask; + int i, n; + FILE *f; + u_int32_t mask; u_int32_t dest, tmask; struct ifaddrlist *al; char buf[256], tdevice[256], device[256]; - static char errbuf[132]; + char *errbuf = NULL; static const char route[] = "/proc/net/route"; if ((f = fopen(route, "r")) == NULL) { - sprintf(errbuf, "open %s: %.128s", route, strerror(errno)); - return (errbuf); + if (asprintf(&errbuf, "open %s: %s", route, strerror(errno)) < 0) + snmp_log(LOG_ERR, "error buffer allocation failed\n"); + return errbuf; } /* @@ -6059,8 +6115,10 @@ findsaddr(register const struct sockaddr_in *to, if (n == 1 && strncmp(buf, "Iface", 5) == 0) continue; if ((i = sscanf(buf, "%s %x %*s %*s %*s %*s %*s %x", - tdevice, &dest, &tmask)) != 3) - return ("junk in buffer"); + tdevice, &dest, &tmask)) != 3) { + fclose(f); + return strdup("junk in buffer"); + } if ((to->sin_addr.s_addr & tmask) == dest && (tmask > mask || mask == 0)) { mask = tmask; @@ -6070,7 +6128,7 @@ findsaddr(register const struct sockaddr_in *to, fclose(f); if (device[0] == '\0') - return ("Can't find interface"); + return strdup("Can't find interface"); /* * Get the interface address list @@ -6079,7 +6137,7 @@ findsaddr(register const struct sockaddr_in *to, return (errbuf); if (n == 0) - return ("Can't find any network interfaces"); + return strdup("Can't find any network interfaces"); /* * Find our appropriate source address @@ -6097,15 +6155,15 @@ findsaddr(register const struct sockaddr_in *to, } int -ifaddrlist(register struct ifaddrlist **ipaddrp, register char *errbuf) +ifaddrlist(struct ifaddrlist **ipaddrp, char *errbuf) { - register int fd, nipaddr; + int fd, nipaddr; #ifdef HAVE_SOCKADDR_SA_LEN - register int n; + int n; #endif - register struct ifreq *ifrp, *ifend, *ifnext; - register struct sockaddr_in *sin; - register struct ifaddrlist *al; + struct ifreq *ifrp, *ifend, *ifnext; + struct sockaddr_in *sin; + struct ifaddrlist *al; struct ifconf ifc; struct ifreq ibuf[(32 * 1024) / sizeof(struct ifreq)], ifr; #define MAX_IPADDR (sizeof(ibuf) / sizeof(ibuf[0])) diff --git a/agent/mibgroup/disman/traceroute/traceRouteCtlTable.h b/agent/mibgroup/disman/traceroute/traceRouteCtlTable.h index 0711978..8e7e6aa 100644 --- a/agent/mibgroup/disman/traceroute/traceRouteCtlTable.h +++ b/agent/mibgroup/disman/traceroute/traceRouteCtlTable.h @@ -274,8 +274,6 @@ WriteMethod write_traceRouteCtlRowStatus; static const char copyright[] = "@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000\n\ The Regents of the University of California. All rights reserved.\n"; -static const char rcsid[] = - "@(#)$Id$ (LBL)"; #endif /* @@ -580,7 +578,6 @@ void freehostinfo(struct hostinfo *); void getaddr(u_int32_t *, char *); struct hostinfo *gethostinfo(char *); u_short in_checksum(u_short *, int); -char *inetname(struct in_addr); void run_traceRoute(unsigned int, void *); int packet_ok(u_char *, int, struct sockaddr_in *, int, u_short, int, u_short); @@ -599,8 +596,6 @@ int usleep(u_int); #endif void setsin(struct sockaddr_in *, u_int32_t); int ifaddrlist(struct ifaddrlist **, char *); -const char *findsaddr(const struct sockaddr_in *, - struct sockaddr_in *); struct addrinfo *host_serv_tr(const char *, const char *, int, int); char *sock_ntop_host_tr(const struct sockaddr *, socklen_t); diff --git a/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c b/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c index 763757d..b6e2d39 100644 --- a/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c +++ b/agent/mibgroup/disman/traceroute/traceRouteHopsTable.c @@ -12,10 +12,10 @@ */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -61,41 +61,30 @@ struct variable2 traceRouteHopsTable_variables[] = { }; - - -/* - * global storage of our data, saved in and configured by header_complex() - */ - -extern struct header_complex_index *traceRouteCtlTableStorage; -extern struct header_complex_index *traceRouteHopsTableStorage; void traceRouteHopsTable_inadd(struct traceRouteHopsTable_data *thedata); void traceRouteHopsTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; - struct traceRouteHopsTable_data *StorageDel = NULL; + struct header_complex_index *hciptr, *nhciptr; + struct traceRouteHopsTable_data *StorageDel; + DEBUGMSGTL(("traceRouteHopsTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { - StorageDel = - header_complex_extract_entry(&traceRouteHopsTableStorage, - hciptr); + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; + StorageDel = header_complex_extract_entry(&traceRouteHopsTableStorage, + hciptr); if (StorageDel != NULL) { free(StorageDel->traceRouteCtlOwnerIndex); - StorageDel->traceRouteCtlOwnerIndex = NULL; free(StorageDel->traceRouteCtlTestName); - StorageDel->traceRouteCtlTestName = NULL; free(StorageDel->traceRouteHopsLastGoodProbe); - StorageDel->traceRouteHopsLastGoodProbe = NULL; free(StorageDel); - StorageDel = NULL; } DEBUGMSGTL(("traceRouteHopsTable", "cleaner ")); } - } + void init_traceRouteHopsTable(void) { @@ -151,6 +140,7 @@ parse_traceRouteHopsTable(const char *token, char *line) &StorageTmp->traceRouteCtlOwnerIndexLen); if (StorageTmp->traceRouteCtlOwnerIndex == NULL) { config_perror("invalid specification for traceRouteCtlOwnerIndex"); + free(StorageTmp); return; } @@ -160,6 +150,7 @@ parse_traceRouteHopsTable(const char *token, char *line) &StorageTmp->traceRouteCtlTestNameLen); if (StorageTmp->traceRouteCtlTestName == NULL) { config_perror("invalid specification for traceRouteCtlTestName"); + free(StorageTmp); return; } @@ -178,6 +169,7 @@ parse_traceRouteHopsTable(const char *token, char *line) if (StorageTmp->traceRouteHopsIpTgtAddress == NULL) { config_perror ("invalid specification for traceRouteHopsIpTgtAddress"); + free(StorageTmp); return; } @@ -211,6 +203,7 @@ parse_traceRouteHopsTable(const char *token, char *line) if (StorageTmp->traceRouteHopsLastGoodProbe == NULL) { config_perror ("invalid specification for traceRouteHopsLastGoodProbe"); + free(StorageTmp); return; } diff --git a/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c b/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c index 0b410c5..489acfc 100644 --- a/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c +++ b/agent/mibgroup/disman/traceroute/traceRouteProbeHistoryTable.c @@ -11,10 +11,10 @@ *Date:2004.8.20 */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -54,12 +54,6 @@ struct variable2 traceRouteProbeHistoryTable_variables[] = { }; -/* - * global storage of our data, saved in and configured by header_complex() - */ - -extern struct header_complex_index *traceRouteCtlTableStorage; -extern struct header_complex_index *traceRouteProbeHistoryTableStorage; void traceRouteProbeHistoryTable_inadd(struct traceRouteProbeHistoryTable_data *thedata); @@ -67,29 +61,25 @@ traceRouteProbeHistoryTable_inadd(struct traceRouteProbeHistoryTable_data void traceRouteProbeHistoryTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; - struct traceRouteProbeHistoryTable_data *StorageDel = NULL; + struct header_complex_index *hciptr, *nhciptr; + struct traceRouteProbeHistoryTable_data *StorageDel; + DEBUGMSGTL(("traceRouteProbeHistoryTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { - StorageDel = - header_complex_extract_entry + for (hciptr = thestuff; hciptr != NULL; hciptr = nhciptr) { + nhciptr = hciptr->next; + StorageDel = header_complex_extract_entry (&traceRouteProbeHistoryTableStorage, hciptr); if (StorageDel != NULL) { free(StorageDel->traceRouteCtlOwnerIndex); - StorageDel->traceRouteCtlOwnerIndex = NULL; free(StorageDel->traceRouteCtlTestName); - StorageDel->traceRouteCtlTestName = NULL; free(StorageDel->traceRouteProbeHistoryHAddr); - StorageDel->traceRouteProbeHistoryHAddr = NULL; free(StorageDel->traceRouteProbeHistoryTime); - StorageDel->traceRouteProbeHistoryTime = NULL; free(StorageDel); - StorageDel = NULL; } DEBUGMSGTL(("traceRouteProbeHistoryTable", "cleaner ")); } - } + void init_traceRouteProbeHistoryTable(void) { @@ -147,6 +137,7 @@ parse_traceRouteProbeHistoryTable(const char *token, char *line) &StorageTmp->traceRouteCtlOwnerIndexLen); if (StorageTmp->traceRouteCtlOwnerIndex == NULL) { config_perror("invalid specification for traceRouteCtlOwnerIndex"); + free(StorageTmp); return; } @@ -156,6 +147,7 @@ parse_traceRouteProbeHistoryTable(const char *token, char *line) &StorageTmp->traceRouteCtlTestNameLen); if (StorageTmp->traceRouteCtlTestName == NULL) { config_perror("invalid specification for traceRouteCtlTestName"); + free(StorageTmp); return; } @@ -182,6 +174,7 @@ parse_traceRouteProbeHistoryTable(const char *token, char *line) if (StorageTmp->traceRouteProbeHistoryHAddr == NULL) { config_perror ("invalid specification for traceRouteProbeHistoryHAddr"); + free(StorageTmp); return; } @@ -204,6 +197,7 @@ parse_traceRouteProbeHistoryTable(const char *token, char *line) if (StorageTmp->traceRouteProbeHistoryTime == NULL) { config_perror ("invalid specification for traceRouteProbeHistoryTime"); + free(StorageTmp); return; } diff --git a/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c b/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c index aba6cf1..116623c 100644 --- a/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c +++ b/agent/mibgroup/disman/traceroute/traceRouteResultsTable.c @@ -20,10 +20,10 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -42,7 +42,7 @@ #include "traceRouteHopsTable.h" #include "header_complex.h" -netsnmp_feature_require(table_dataset) +netsnmp_feature_require(table_dataset); /* *traceRouteResultsTable_variables_oid: @@ -71,42 +71,30 @@ struct variable2 traceRouteResultsTable_variables[] = { }; - -/* - * global storage of our data, saved in and configured by header_complex() - */ - -extern struct header_complex_index *traceRouteCtlTableStorage; -extern struct header_complex_index *traceRouteResultsTableStorage; void traceRouteResultsTable_inadd(struct traceRouteResultsTable_data *thedata); void traceRouteResultsTable_cleaner(struct header_complex_index *thestuff) { - struct header_complex_index *hciptr = NULL; - struct traceRouteResultsTable_data *StorageDel = NULL; + struct header_complex_index *hciptr, *nhciptr; + struct traceRouteResultsTable_data *StorageDel; + DEBUGMSGTL(("traceRouteResultsTable", "cleanerout ")); - for (hciptr = thestuff; hciptr != NULL; hciptr = hciptr->next) { + for (hciptr = thestuff; hciptr; hciptr = nhciptr) { + nhciptr = hciptr->next; StorageDel = header_complex_extract_entry(&traceRouteResultsTableStorage, hciptr); if (StorageDel != NULL) { free(StorageDel->traceRouteCtlOwnerIndex); - StorageDel->traceRouteCtlOwnerIndex = NULL; free(StorageDel->traceRouteCtlTestName); - StorageDel->traceRouteCtlTestName = NULL; free(StorageDel->traceRouteResultsIpTgtAddr); - StorageDel->traceRouteResultsIpTgtAddr = NULL; free(StorageDel->traceRouteResultsLastGoodPath); - StorageDel->traceRouteResultsLastGoodPath = NULL; free(StorageDel); - StorageDel = NULL; - } DEBUGMSGTL(("traceRouteResultsTable", "cleaner ")); } - } void @@ -166,6 +154,7 @@ parse_traceRouteResultsTable(const char *token, char *line) &StorageTmp->traceRouteCtlOwnerIndexLen); if (StorageTmp->traceRouteCtlOwnerIndex == NULL) { config_perror("invalid specification for traceRouteCtlOwnerIndex"); + free(StorageTmp); return; } @@ -175,6 +164,7 @@ parse_traceRouteResultsTable(const char *token, char *line) &StorageTmp->traceRouteCtlTestNameLen); if (StorageTmp->traceRouteCtlTestName == NULL) { config_perror("invalid specification for traceRouteCtlTestName"); + free(StorageTmp); return; } @@ -201,6 +191,7 @@ parse_traceRouteResultsTable(const char *token, char *line) if (StorageTmp->traceRouteResultsIpTgtAddr == NULL) { config_perror ("invalid specification for traceRouteResultsIpTgtAddr"); + free(StorageTmp); return; } @@ -220,6 +211,7 @@ parse_traceRouteResultsTable(const char *token, char *line) if (StorageTmp->traceRouteResultsLastGoodPath == NULL) { config_perror ("invalid specification for traceRouteResultsLastGoodPath!"); + free(StorageTmp); return; } diff --git a/agent/mibgroup/disman/traceroute/traceRouteResultsTable.h b/agent/mibgroup/disman/traceroute/traceRouteResultsTable.h index f31ffbf..6a42c87 100644 --- a/agent/mibgroup/disman/traceroute/traceRouteResultsTable.h +++ b/agent/mibgroup/disman/traceroute/traceRouteResultsTable.h @@ -17,6 +17,11 @@ config_require(header_complex); +extern struct header_complex_index *traceRouteCtlTableStorage; +extern struct header_complex_index *traceRouteResultsTableStorage; +extern struct header_complex_index *traceRouteProbeHistoryTableStorage; +extern struct header_complex_index *traceRouteHopsTableStorage; + /* * function declarations */ diff --git a/agent/mibgroup/etherlike-mib.h b/agent/mibgroup/etherlike-mib.h index 224e254..87ed4d5 100644 --- a/agent/mibgroup/etherlike-mib.h +++ b/agent/mibgroup/etherlike-mib.h @@ -2,6 +2,6 @@ * module to include the modules */ -config_require(etherlike-mib/dot3StatsTable) -config_add_mib(EtherLike-MIB) +config_require(etherlike-mib/dot3StatsTable); +config_add_mib(EtherLike-MIB); diff --git a/agent/mibgroup/etherlike-mib/data_access/dot3stats.h b/agent/mibgroup/etherlike-mib/data_access/dot3stats.h index 7d2b44f..2f773ce 100644 --- a/agent/mibgroup/etherlike-mib/data_access/dot3stats.h +++ b/agent/mibgroup/etherlike-mib/data_access/dot3stats.h @@ -3,5 +3,5 @@ */ #if defined(linux) -config_require(etherlike-mib/data_access/dot3stats_linux) +config_require(etherlike-mib/data_access/dot3stats_linux); #endif diff --git a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c index 6eb69f7..937cc56 100644 --- a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c +++ b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c @@ -5,6 +5,13 @@ #include #include #include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "util_funcs.h" /* * include our parent header @@ -122,6 +129,9 @@ dot3stats_interface_ioctl_ifindex_get (int fd, const char *name) { struct ifreq ifrq; int rc = 0; + if (!netsnmp_access_interface_include(name)) + return 0; + DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_ifindex_get", "called\n")); rc = _dot3Stats_ioctl_get(fd, SIOCGIFINDEX, &ifrq, name); @@ -137,7 +147,7 @@ dot3stats_interface_ioctl_ifindex_get (int fd, const char *name) { #endif /* SIOCGIFINDEX */ } -# if HAVE_LINUX_RTNETLINK_H /* { NETLINK */ +# if defined(HAVE_LINUX_RTNETLINK_H) /* { NETLINK */ /* * The following code is based upon code I got from Stephen Hemminger */ @@ -154,7 +164,7 @@ struct rtnl_handle { struct ifstat_ent { struct ifstat_ent *next; - const char *name; + char *name; int ifindex; struct rtnl_link_stats stats; }; @@ -465,6 +475,7 @@ _dot3Stats_netlink_get_errorcntrs(dot3StatsTable_rowreq_ctx *rowreq_ctx, const c done = 1; } kern_db = ke->next; + free(ke->name); free(ke); } @@ -740,6 +751,11 @@ interface_ioctl_dot3stats_get (dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, co rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSALIGNMENTERRORS_FLAG; } + if (DOT3STATSFCSERRORS(s)) { + data->dot3StatsFCSErrors = (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSFCSERRORS_FLAG; + } + if (DOT3STATSMULTIPLECOLLISIONFRAMES(s)) { data->dot3StatsMultipleCollisionFrames = (u_long)eth_stats->data[i]; rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSMULTIPLECOLLISIONFRAMES_FLAG; @@ -759,6 +775,10 @@ interface_ioctl_dot3stats_get (dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, co data->dot3StatsExcessiveCollisions = (u_long)eth_stats->data[i]; rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSEXCESSIVECOLLISIONS_FLAG; } + if (DOT3STATSDEFERREDTRANSMISSIONS(s)) { + data->dot3StatsDeferredTransmissions = (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDEFERREDTRANSMISSIONS_FLAG; + } } free(eth_strings); @@ -773,56 +793,34 @@ interface_ioctl_dot3stats_get (dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, co /* * @retval 0 success - * @retval -1 ETHTOOL_GSET failed + * @retval -1 Both ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET failed * @retval -2 function not supported if HAVE_LINUX_ETHTOOL_H not defined */ int -interface_ioctl_dot3stats_duplex_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name) { - -#ifdef HAVE_LINUX_ETHTOOL_H +interface_ioctl_dot3stats_duplex_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name) +{ dot3StatsTable_data *data = &rowreq_ctx->data; - struct ethtool_cmd edata; - struct ifreq ifr; + struct netsnmp_linux_link_settings nlls; int err; - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_duplex_get", - "called\n")); - - memset(&edata, 0, sizeof (edata)); - memset(&ifr, 0, sizeof (ifr)); - edata.cmd = ETHTOOL_GSET; - ifr.ifr_data = (char *)&edata; - - err = _dot3Stats_ioctl_get (fd, SIOCETHTOOL, &ifr, name); - if (err < 0) { - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_duplex_get", - "ETHTOOL_GSET failed\n")); - - return -1; - } - + err = netsnmp_get_link_settings(&nlls, fd, name); if (err == 0) { rowreq_ctx->column_exists_flags |= COLUMN_DOT3STATSDUPLEXSTATUS_FLAG; - switch (edata.duplex) { + switch (nlls.duplex) { case DUPLEX_HALF: - data->dot3StatsDuplexStatus = (u_long) DOT3STATSDUPLEXSTATUS_HALFDUPLEX; + data->dot3StatsDuplexStatus = DOT3STATSDUPLEXSTATUS_HALFDUPLEX; break; case DUPLEX_FULL: - data->dot3StatsDuplexStatus = (u_long) DOT3STATSDUPLEXSTATUS_FULLDUPLEX; + data->dot3StatsDuplexStatus = DOT3STATSDUPLEXSTATUS_FULLDUPLEX; break; default: - data->dot3StatsDuplexStatus = (u_long) DOT3STATSDUPLEXSTATUS_UNKNOWN; + data->dot3StatsDuplexStatus = DOT3STATSDUPLEXSTATUS_UNKNOWN; break; - }; + } } - DEBUGMSGTL(("access:dot3StatsTable:interface_ioctl_dot3Stats_duplex_get", - "ETHTOOL_GSET processed\n")); return err; -#else - return -2; -#endif } @@ -894,8 +892,8 @@ _dot3Stats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name) */ if(NULL == name) { DEBUGMSGTL(("access:dot3StatsTable:ioctl", - "_dot3Stats_ioctl_get invalid ifname '%s'\n", name)); - snmp_log (LOG_ERR, "access:dot3StatsTable:ioctl, _dot3Stats_ioctl_get error on interface '%s'\n", name); + "_dot3Stats_ioctl_get interface name is NULL")); + snmp_log (LOG_ERR, "access:dot3StatsTable:ioctl, _dot3Stats_ioctl_get interface name is NULL"); return -1; } diff --git a/agent/mibgroup/etherlike-mib/dot3StatsTable.h b/agent/mibgroup/etherlike-mib/dot3StatsTable.h index b04f7bf..d2b7fd8 100644 --- a/agent/mibgroup/etherlike-mib/dot3StatsTable.h +++ b/agent/mibgroup/etherlike-mib/dot3StatsTable.h @@ -2,10 +2,10 @@ * module to include the modules */ -config_require(etherlike-mib/data_access/dot3stats) -config_require(etherlike-mib/dot3StatsTable/dot3StatsTable) -config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_data_get) -config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_data_set) -config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_data_access) -config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_interface) +config_require(etherlike-mib/data_access/dot3stats); +config_require(etherlike-mib/dot3StatsTable/dot3StatsTable); +config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_data_get); +config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_data_set); +config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_data_access); +config_require(etherlike-mib/dot3StatsTable/dot3StatsTable_interface); diff --git a/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c b/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c index 74f33bf..5afce2b 100644 --- a/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c +++ b/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_data_access.c @@ -12,6 +12,10 @@ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif + /* * include our parent header */ @@ -186,7 +190,7 @@ dot3StatsTable_container_shutdown(netsnmp_container * container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -286,6 +290,7 @@ dot3StatsTable_container_load(netsnmp_container * container) rowreq_ctx = dot3StatsTable_allocate_rowreq_ctx(NULL); if (NULL == rowreq_ctx) { snmp_log(LOG_ERR, "memory allocation for dot3StatsTable failed\n"); + dot3stats_interface_name_list_free(list_head); close(fd); return MFD_RESOURCE_UNAVAILABLE; } @@ -308,6 +313,11 @@ dot3StatsTable_container_load(netsnmp_container * container) */ memset (&rowreq_ctx->data, 0, sizeof (rowreq_ctx->data)); + + interface_sysclassnet_dot3stats_get(rowreq_ctx, p->name); + + interface_dot3stats_get_errorcounters(rowreq_ctx, p->name); + rc = interface_ioctl_dot3stats_get (rowreq_ctx, fd, p->name); if (rc < 0) { @@ -325,10 +335,6 @@ dot3StatsTable_container_load(netsnmp_container * container) continue; } - interface_sysclassnet_dot3stats_get(rowreq_ctx, p->name); - - interface_dot3stats_get_errorcounters(rowreq_ctx, p->name); - /* * insert into table container */ diff --git a/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c b/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c index e0741f3..7718231 100644 --- a/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c +++ b/agent/mibgroup/etherlike-mib/dot3StatsTable/dot3StatsTable_interface.c @@ -47,9 +47,9 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); /********************************************************************** ********************************************************************** @@ -988,7 +988,7 @@ _mfd_dot3StatsTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h b/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h index ef9232a..e5d0c1e 100644 --- a/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h +++ b/agent/mibgroup/etherlike-mib/dot3StatsTable/ioctl_imp_common.h @@ -7,11 +7,13 @@ /* use kernel's ethtool.h */ +#ifdef HAVE_LINUX_ETHTOOL_NEEDS_U64 #include typedef __u64 u64; typedef __u32 u32; typedef __u16 u16; typedef __u8 u8; +#endif #include /* structure for storing the interface names in the system */ @@ -37,29 +39,41 @@ int interface_ioctl_dot3stats_duplex_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, #define INTEL_TRANSMIT_MULTIPLE_COLLISIONS "tx_multi_coll_ok" #define BROADCOM_TRANSMIT_MULTIPLE_COLLISIONS_BNX2 "tx_multi_collisions" #define BROADCOM_TRANSMIT_MULTIPLE_COLLISIONS_TG3 "tx_mult_collisions" +#define DSA_TRANSMIT_MULTIPLE_COLLISIONS "multiple" #define INTEL_TRANSMIT_LATE_COLLISIONS "tx_abort_late_coll" #define BROADCOM_TRANSMIT_LATE_COLLISIONS "tx_late_collisions" +#define DSA_TRANSMIT_LATE_COLLISIONS "late" #define INTEL_TRANSMIT_SINGLE_COLLISIONS "tx_single_coll_ok" #define BROADCOM_TRANSMIT_SINGLE_COLLISIONS "tx_single_collisions" +#define DSA_TRANSMIT_SINGLE_COLLISIONS "single" #define BROADCOM_TRANSMIT_EXCESS_COLLISIONS_BNX2 "tx_excess_collisions" #define BROADCOM_TRANSMIT_EXCESS_COLLISIONS_TG3 "tx_excessive_collisions" +#define DSA_TRANSMIT_EXCESS_COLLISIONS "excessive" +#define DSA_RECEIVE_FCS_ERROR "in_fcs_error" + +#define DSA_TRANSMIT_DEFERRED "deferred" #define DOT3STATSALIGNMENTERRORS(x) strstr(x, INTEL_RECEIVE_ALIGN_ERRORS) +#define DOT3STATSFCSERRORS(x) strstr(x, DSA_RECEIVE_FCS_ERROR) +#define DOT3STATSDEFERREDTRANSMISSIONS(x) !strcmp(x, DSA_TRANSMIT_DEFERRED) #define DOT3STATSMULTIPLECOLLISIONFRAMES(x) (strstr(x, INTEL_TRANSMIT_MULTIPLE_COLLISIONS)) || \ + (!strcmp(x, DSA_TRANSMIT_MULTIPLE_COLLISIONS)) || \ (strstr(x, BROADCOM_TRANSMIT_MULTIPLE_COLLISIONS_BNX2)) || \ (strstr(x, BROADCOM_TRANSMIT_MULTIPLE_COLLISIONS_TG3)) #define DOT3STATSLATECOLLISIONS(x) (strstr(x, INTEL_TRANSMIT_LATE_COLLISIONS)) || \ + (!strcmp(x, DSA_TRANSMIT_LATE_COLLISIONS)) || \ (strstr(x, BROADCOM_TRANSMIT_LATE_COLLISIONS)) #define DOT3STATSSINGLECOLLISIONFRAMES(x) (strstr(x, INTEL_TRANSMIT_SINGLE_COLLISIONS)) || \ + (!strcmp(x, DSA_TRANSMIT_SINGLE_COLLISIONS)) || \ (strstr(x, BROADCOM_TRANSMIT_SINGLE_COLLISIONS)) #define DOT3STATSEXCESSIVECOLLISIONS(x) (strstr(x, BROADCOM_TRANSMIT_EXCESS_COLLISIONS_BNX2)) || \ - (strstr(x, BROADCOM_TRANSMIT_EXCESS_COLLISIONS_TG3)) - + (strstr(x, BROADCOM_TRANSMIT_EXCESS_COLLISIONS_TG3)) || \ + (!strcmp(x, DSA_TRANSMIT_EXCESS_COLLISIONS)) diff --git a/agent/mibgroup/examples.h b/agent/mibgroup/examples.h index 83d3ccb..a313d62 100644 --- a/agent/mibgroup/examples.h +++ b/agent/mibgroup/examples.h @@ -1,4 +1,4 @@ -config_require(examples/scalar_int) -config_require(examples/watched) -config_require(examples/data_set) -config_require(examples/delayed_instance) +config_require(examples/scalar_int); +config_require(examples/watched); +config_require(examples/data_set); +config_require(examples/delayed_instance); diff --git a/agent/mibgroup/examples/data_set.c b/agent/mibgroup/examples/data_set.c index cc6a04a..fd4b5e5 100644 --- a/agent/mibgroup/examples/data_set.c +++ b/agent/mibgroup/examples/data_set.c @@ -68,12 +68,12 @@ #include #include -netsnmp_feature_require(table_set_multi_add_default_row) -netsnmp_feature_require(unregister_auto_data_table) -netsnmp_feature_require(delete_table_data_set) -netsnmp_feature_require(table_dataset) -netsnmp_feature_require(table_set_multi_add_default_row) -netsnmp_feature_require(table_dataset_unregister_auto_data_table) +netsnmp_feature_require(table_set_multi_add_default_row); +netsnmp_feature_require(unregister_auto_data_table); +netsnmp_feature_require(delete_table_data_set); +netsnmp_feature_require(table_dataset); +netsnmp_feature_require(table_set_multi_add_default_row); +netsnmp_feature_require(table_dataset_unregister_auto_data_table); static netsnmp_table_data_set *table_set; diff --git a/agent/mibgroup/examples/example.c b/agent/mibgroup/examples/example.c index dd97daf..b4be671 100644 --- a/agent/mibgroup/examples/example.c +++ b/agent/mibgroup/examples/example.c @@ -7,10 +7,10 @@ * include important headers */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -628,7 +628,7 @@ write_exampletrap2(int action, long intval; /* - * these variales will be used when we send the trap + * these variables will be used when we send the trap */ oid objid_snmptrap[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 }; /* snmpTrapOID.0 */ oid demo_trap[] = { 1, 3, 6, 1, 4, 1, 2021, 13, 990 }; /*demo-trap */ @@ -719,7 +719,7 @@ write_exampletrap2(int action, var_obj.name = example_string_oid; var_obj.name_length = sizeof(example_string_oid) / sizeof(oid); /* number of sub-ids */ var_obj.type = ASN_OCTET_STR; /* type of variable */ - var_obj.val.string = (unsigned char *) example_str; /* value */ + var_obj.val.string = (u_char *)example_str; /* value */ var_obj.val_len = strlen(example_str); DEBUGMSGTL(("example", "write_exampletrap2 sending the v2 trap\n")); send_v2trap(&var_trap); diff --git a/agent/mibgroup/examples/example.h b/agent/mibgroup/examples/example.h index 04b73e0..a144fcf 100644 --- a/agent/mibgroup/examples/example.h +++ b/agent/mibgroup/examples/example.h @@ -17,7 +17,7 @@ extern "C" { * We use 'header_generic' from the util_funcs/header_generic module, * so make sure this module is included in the agent. */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); /* diff --git a/agent/mibgroup/examples/netSnmpHostsTable.c b/agent/mibgroup/examples/netSnmpHostsTable.c index 8ea2d03..9e699fe 100644 --- a/agent/mibgroup/examples/netSnmpHostsTable.c +++ b/agent/mibgroup/examples/netSnmpHostsTable.c @@ -11,9 +11,9 @@ #include "netSnmpHostsTable_checkfns.h" #include "netSnmpHostsTable_access.h" -netsnmp_feature_require(oid_stash) -netsnmp_feature_require(oid_stash_get_data) -netsnmp_feature_require(oid_stash_add_data) +netsnmp_feature_require(oid_stash); +netsnmp_feature_require(oid_stash_get_data); +netsnmp_feature_require(oid_stash_add_data); static netsnmp_oid_stash_node *undoStorage = NULL; static netsnmp_oid_stash_node *commitStorage = NULL; @@ -65,6 +65,8 @@ initialize_table_netSnmpHostsTable(void) if (!my_handler || !table_info || !iinfo) { snmp_log(LOG_ERR, "malloc failed in initialize_table_netSnmpHostsTable"); + free(iinfo); + free(table_info); return; /** Serious error. */ } diff --git a/agent/mibgroup/examples/netSnmpHostsTable.h b/agent/mibgroup/examples/netSnmpHostsTable.h index b6164a9..8603fd1 100644 --- a/agent/mibgroup/examples/netSnmpHostsTable.h +++ b/agent/mibgroup/examples/netSnmpHostsTable.h @@ -6,9 +6,9 @@ #define NETSNMPHOSTSTABLE_H /** other required module components */ -config_require(examples/netSnmpHostsTable_access) -config_require(examples/netSnmpHostsTable_checkfns) -config_add_mib(NET-SNMP-EXAMPLES-MIB) +config_require(examples/netSnmpHostsTable_access); +config_require(examples/netSnmpHostsTable_checkfns); +config_add_mib(NET-SNMP-EXAMPLES-MIB); #ifdef __cplusplus extern "C" { diff --git a/agent/mibgroup/examples/netSnmpHostsTable_access.c b/agent/mibgroup/examples/netSnmpHostsTable_access.c index 3d2e5fb..d72d10f 100644 --- a/agent/mibgroup/examples/netSnmpHostsTable_access.c +++ b/agent/mibgroup/examples/netSnmpHostsTable_access.c @@ -225,8 +225,10 @@ netSnmpHostsTable_commit_row(void **my_data_context, int new_or_del) if ((out = fopen(HOSTS_FILE ".snmp", "w")) == NULL) return SNMP_ERR_COMMITFAILED; - if ((in = fopen(HOSTS_FILE, "r")) == NULL) + if ((in = fopen(HOSTS_FILE, "r")) == NULL) { + fclose(out); return SNMP_ERR_COMMITFAILED; + } while(fgets(line, sizeof(line), in)) { copy_nword(line,myaddr,sizeof(myaddr)); diff --git a/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c b/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c index 25a7330..b0c985f 100644 --- a/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c +++ b/agent/mibgroup/examples/netSnmpHostsTable_checkfns.c @@ -20,7 +20,7 @@ #include "netSnmpHostsTable_checkfns_local.h" #include "netSnmpHostsTable_enums.h" -netsnmp_feature_require(check_storage_transition) +netsnmp_feature_require(check_storage_transition); /** Decides if an incoming value for the netSnmpHostAddressType mib node is legal. * @param type The incoming data type. @@ -83,7 +83,7 @@ check_netSnmpHostAddress(int type, char *val, size_t val_len, return SNMP_ERR_WRONGTYPE; /** Check the ranges of the passed value for legality */ - if (!(val_len >= 0 && val_len <= 255)) + if (val_len > 255) return SNMP_ERR_WRONGVALUE; /** looks ok, call the local version of the same function. */ diff --git a/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h b/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h index cb996bb..b718d78 100644 --- a/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h +++ b/agent/mibgroup/examples/netSnmpHostsTable_checkfns.h @@ -12,7 +12,7 @@ #define NETSNMPHOSTSTABLE_CHECKFNS_H /** make sure we load the functions that you can modify */ -config_require(examples/netSnmpHostsTable_checkfns_local) +config_require(examples/netSnmpHostsTable_checkfns_local); #ifdef __cplusplus extern "C" { diff --git a/agent/mibgroup/examples/netSnmpHostsTable_checkfns_local.c b/agent/mibgroup/examples/netSnmpHostsTable_checkfns_local.c index a29360d..78c9939 100644 --- a/agent/mibgroup/examples/netSnmpHostsTable_checkfns_local.c +++ b/agent/mibgroup/examples/netSnmpHostsTable_checkfns_local.c @@ -10,6 +10,7 @@ #include #include "netSnmpHostsTable_checkfns.h" #include "netSnmpHostsTable_enums.h" +#include "netSnmpHostsTable_checkfns_local.h" /** Decides if an incoming value for the netSnmpHostAddressType mib node is legal, from a local implementation specific viewpoint. * @param type The incoming data type. diff --git a/agent/mibgroup/examples/notification.c b/agent/mibgroup/examples/notification.c index ab60201..705e0d3 100644 --- a/agent/mibgroup/examples/notification.c +++ b/agent/mibgroup/examples/notification.c @@ -11,7 +11,7 @@ * * When this module is compiled into the agent (run configure with * --with-mib-modules="examples/notification") then it should send - * out traps, which when received by the snmptrapd demon will look + * out traps, which when received by the snmptrapd daemon will look * roughly like: * * 2002-05-08 08:57:05 localhost.localdomain [udp:127.0.0.1:32865]: diff --git a/agent/mibgroup/examples/scalar_int.c b/agent/mibgroup/examples/scalar_int.c index db4d295..5900533 100644 --- a/agent/mibgroup/examples/scalar_int.c +++ b/agent/mibgroup/examples/scalar_int.c @@ -31,7 +31,7 @@ * if --enable-minimalist has been turned on, we need to register * the support we need so the needed functions aren't removed at compile time */ -netsnmp_feature_require(long_instance) +netsnmp_feature_require(long_instance); /* * Then, we declare the variables we want to be accessed diff --git a/agent/mibgroup/examples/ucdDemoPublic.c b/agent/mibgroup/examples/ucdDemoPublic.c index 8e9e66a..284648e 100644 --- a/agent/mibgroup/examples/ucdDemoPublic.c +++ b/agent/mibgroup/examples/ucdDemoPublic.c @@ -3,20 +3,20 @@ */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -107,11 +107,11 @@ var_ucdDemoPublic(struct variable *vp, static char string[MYMAX + 1], *cp; int i; - *write_method = 0; /* assume it isnt writable for the time being */ + *write_method = NULL; /* assume it isnt writable for the time being */ *var_len = sizeof(long_ret); /* assume an integer and change later if not */ if (header_generic(vp, name, length, exact, var_len, write_method)) - return 0; + return NULL; /* * this is where we do the value assignments for the mib results. @@ -146,7 +146,7 @@ var_ucdDemoPublic(struct variable *vp, DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_ucdDemoPublic\n", vp->magic)); } - return 0; + return NULL; } int diff --git a/agent/mibgroup/examples/ucdDemoPublic.h b/agent/mibgroup/examples/ucdDemoPublic.h index 253f4ff..4e55a86 100644 --- a/agent/mibgroup/examples/ucdDemoPublic.h +++ b/agent/mibgroup/examples/ucdDemoPublic.h @@ -9,7 +9,7 @@ * we use header_generic from the util_funcs module */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #ifdef __cplusplus extern "C" { diff --git a/agent/mibgroup/hardware/cpu.h b/agent/mibgroup/hardware/cpu.h index 3956679..ca45ce5 100644 --- a/agent/mibgroup/hardware/cpu.h +++ b/agent/mibgroup/hardware/cpu.h @@ -1,35 +1,35 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); #if defined(linux) -config_require(hardware/cpu/cpu_linux) +config_require(hardware/cpu/cpu_linux); #elif defined(darwin) -config_require(hardware/cpu/cpu_mach) +config_require(hardware/cpu/cpu_mach); #elif (defined(irix6) && defined(NETSNMP_INCLUDE_HARDWARE_CPU_PCP_MODULE)) -config_require(hardware/cpu/cpu_pcp) +config_require(hardware/cpu/cpu_pcp); #elif defined(irix6) -config_require(hardware/cpu/cpu_sysinfo) +config_require(hardware/cpu/cpu_sysinfo); #elif defined(dragonfly) -config_require(hardware/cpu/cpu_kinfo) +config_require(hardware/cpu/cpu_kinfo); #elif (defined(netbsd) || defined(netbsd1) || defined(netbsdelf) || defined(netbsdelf2)|| defined(netbsdelf3) || defined(openbsd) || defined(freebsd4) || defined(freebsd5) || defined(freebsd6)) -config_require(hardware/cpu/cpu_sysctl) +config_require(hardware/cpu/cpu_sysctl); #elif (defined(freebsd2) || defined(freebsd3)) -config_require(hardware/cpu/cpu_nlist) +config_require(hardware/cpu/cpu_nlist); #elif (defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)) -config_require(hardware/cpu/cpu_perfstat) +config_require(hardware/cpu/cpu_perfstat); #elif (defined(solaris2)) -config_require(hardware/cpu/cpu_kstat) +config_require(hardware/cpu/cpu_kstat); #elif (defined(hpux10) || defined(hpux11)) -config_require(hardware/cpu/cpu_pstat) +config_require(hardware/cpu/cpu_pstat); #else -config_require(hardware/cpu/cpu_null) +config_require(hardware/cpu/cpu_null); #endif diff --git a/agent/mibgroup/hardware/cpu/cpu.c b/agent/mibgroup/hardware/cpu/cpu.c index 2772001..b58f20d 100644 --- a/agent/mibgroup/hardware/cpu/cpu.c +++ b/agent/mibgroup/hardware/cpu/cpu.c @@ -3,15 +3,15 @@ #include #include #include +#include "cpu.h" -netsnmp_feature_child_of(hardware_cpu, libnetsnmpmibs) +netsnmp_feature_child_of(hardware_cpu, libnetsnmpmibs); -netsnmp_feature_child_of(hardware_cpu_copy_stats, hardware_cpu) -netsnmp_feature_child_of(hardware_cpu_load, hardware_cpu) -netsnmp_feature_child_of(hardware_cpu_get_cache, hardware_cpu) -netsnmp_feature_child_of(hardware_cpu_get_byName, hardware_cpu) +netsnmp_feature_child_of(hardware_cpu_copy_stats, hardware_cpu); +netsnmp_feature_child_of(hardware_cpu_load, hardware_cpu); +netsnmp_feature_child_of(hardware_cpu_get_cache, hardware_cpu); +netsnmp_feature_child_of(hardware_cpu_get_byName, hardware_cpu); -extern NetsnmpCacheLoad netsnmp_cpu_arch_load; static void _cpu_update_stats( unsigned int, void* ); static int _cpuAutoUpdate = 5; @@ -148,7 +148,7 @@ netsnmp_cpu_info *netsnmp_cpu_get_byName( char *name, int create ) { return NULL; } - strcpy(cpu->name, name); + strlcpy(cpu->name, name, sizeof(cpu)); if ( _cpu_tail ) { cpu->idx = _cpu_tail->idx+1; _cpu_tail->next = cpu; diff --git a/agent/mibgroup/hardware/cpu/cpu_kerndata.h b/agent/mibgroup/hardware/cpu/cpu_kerndata.h index 7a0d9c7..176dc3a 100644 --- a/agent/mibgroup/hardware/cpu/cpu_kerndata.h +++ b/agent/mibgroup/hardware/cpu/cpu_kerndata.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_kerndata(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_kinfo.c b/agent/mibgroup/hardware/cpu/cpu_kinfo.c index 37cf847..eddfe9e 100644 --- a/agent/mibgroup/hardware/cpu/cpu_kinfo.c +++ b/agent/mibgroup/hardware/cpu/cpu_kinfo.c @@ -14,7 +14,7 @@ #include #include -netsnmp_feature_require(hardware_cpu_copy_stats) +netsnmp_feature_require(hardware_cpu_copy_stats); void _cpu_copy_stats( netsnmp_cpu_info *cpu ); /* diff --git a/agent/mibgroup/hardware/cpu/cpu_kinfo.h b/agent/mibgroup/hardware/cpu/cpu_kinfo.h index 774f5f2..b70720d 100644 --- a/agent/mibgroup/hardware/cpu/cpu_kinfo.h +++ b/agent/mibgroup/hardware/cpu/cpu_kinfo.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_kinfo( void ); diff --git a/agent/mibgroup/hardware/cpu/cpu_kstat.c b/agent/mibgroup/hardware/cpu/cpu_kstat.c index 33f188e..3cc396f 100644 --- a/agent/mibgroup/hardware/cpu/cpu_kstat.c +++ b/agent/mibgroup/hardware/cpu/cpu_kstat.c @@ -22,9 +22,10 @@ int _cpu_status(char *state); * Initialise the list of CPUs on the system * (including descriptions) */ -void init_cpu_kstat( void ) { - int i = 0, n = 0, clock, state_begin; - char ctype[15], ftype[15], state[10]; +void init_cpu_kstat(void) +{ + int i = 0, n = 0, clock; + char ctype[16], ftype[16], state[10]; kstat_t *ksp; kstat_named_t *ks_data; netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 1 ); @@ -49,8 +50,6 @@ void init_cpu_kstat( void ) { for (i=0, ks_data = ksp->ks_data; i < ksp->ks_ndata; i++, ks_data++) { if ( strcmp( ks_data->name, "state" ) == 0 ) { strlcpy(state, ks_data->value.c, sizeof(state)); - } else if ( strcmp( ks_data->name, "state_begin" ) == 0 ) { - state_begin = ks_data->value.i32; } else if ( strcmp( ks_data->name, "cpu_type" ) == 0 ) { strlcpy(ctype, ks_data->value.c, sizeof(ctype)); } else if ( strcmp( ks_data->name, "fpu_type" ) == 0 ) { diff --git a/agent/mibgroup/hardware/cpu/cpu_kstat.h b/agent/mibgroup/hardware/cpu/cpu_kstat.h index ce38628..f9afbd5 100644 --- a/agent/mibgroup/hardware/cpu/cpu_kstat.h +++ b/agent/mibgroup/hardware/cpu/cpu_kstat.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_kstat(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_linux.c b/agent/mibgroup/hardware/cpu/cpu_linux.c index b1dc308..5f1489f 100644 --- a/agent/mibgroup/hardware/cpu/cpu_linux.c +++ b/agent/mibgroup/hardware/cpu/cpu_linux.c @@ -2,6 +2,7 @@ #include #include #include +#include "cpu_linux.h" #include #include @@ -53,7 +54,7 @@ void init_cpu_linux( void ) { cpu->status = 2; /* running */ sprintf( cpu->name, "cpu%d", i ); #if defined(__s390__) || defined(__s390x__) - strcat( cpu->descr, "An S/390 CPU" ); + strlcat(cpu->descr, "An S/390 CPU", sizeof(cpu->descr)); #endif } #if defined(__s390__) || defined(__s390x__) @@ -63,8 +64,8 @@ void init_cpu_linux( void ) { n++; cpu = netsnmp_cpu_get_byIdx( i, 1 ); cpu->status = 2; /* running */ - sprintf( cpu->name, "cpu%d", i ); - strcat( cpu->descr, "An S/390 CPU" ); + sprintf(cpu->name, "cpu%d", i); + strlcat(cpu->descr, "An S/390 CPU", sizeof(cpu->descr)); } } #endif @@ -72,17 +73,23 @@ void init_cpu_linux( void ) { #ifdef DESCR_FIELD if (!strncmp( buf, DESCR_FIELD, strlen(DESCR_FIELD))) { cp = strchr( buf, ':' ); - strcpy( cpu->descr, cp+2 ); - cp = strchr( cpu->descr, '\n' ); - *cp = 0; + if (cp) { + strlcpy(cpu->descr, cp + 2, sizeof(cpu->descr)); + cp = strchr(cpu->descr, '\n'); + if (cp) + *cp = 0; + } } #endif #ifdef DESCR2_FIELD if (!strncmp( buf, DESCR2_FIELD, strlen(DESCR2_FIELD))) { cp = strchr( buf, ':' ); - strcat( cpu->descr, cp ); - cp = strchr( cpu->descr, '\n' ); - *cp = 0; + if (cp) { + strlcat(cpu->descr, cp, sizeof(cpu->descr)); + cp = strchr(cpu->descr, '\n'); + if (cp) + *cp = 0; + } } #endif } @@ -114,6 +121,10 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { if (bsize == 0) { bsize = getpagesize()-1; buff = (char*)malloc(bsize+1); + if (buff == NULL) { + close(statfd); + return -1; + } } while ((bytes_read = read(statfd, buff, bsize)) == bsize) { bsize += BUFSIZ; @@ -332,4 +343,3 @@ void _cpu_load_swap_etc( char *buff, netsnmp_cpu_info *cpu ) { } first = 0; } - diff --git a/agent/mibgroup/hardware/cpu/cpu_linux.h b/agent/mibgroup/hardware/cpu/cpu_linux.h index 9bcdb19..3a2d5bb 100644 --- a/agent/mibgroup/hardware/cpu/cpu_linux.h +++ b/agent/mibgroup/hardware/cpu/cpu_linux.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_linux(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_mach.h b/agent/mibgroup/hardware/cpu/cpu_mach.h index f3f408f..42aaa9a 100644 --- a/agent/mibgroup/hardware/cpu/cpu_mach.h +++ b/agent/mibgroup/hardware/cpu/cpu_mach.h @@ -1,4 +1,4 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_mach( void ); diff --git a/agent/mibgroup/hardware/cpu/cpu_nlist.c b/agent/mibgroup/hardware/cpu/cpu_nlist.c index 974028a..ddc39d7 100644 --- a/agent/mibgroup/hardware/cpu/cpu_nlist.c +++ b/agent/mibgroup/hardware/cpu/cpu_nlist.c @@ -32,7 +32,7 @@ #define CPU_SYMBOL "cp_time" #define MEM_SYMBOL "cnt" -netsnmp_feature_require(hardware_cpu_copy_stats) +netsnmp_feature_require(hardware_cpu_copy_stats); void _cpu_copy_stats( netsnmp_cpu_info *cpu ); /* diff --git a/agent/mibgroup/hardware/cpu/cpu_nlist.h b/agent/mibgroup/hardware/cpu/cpu_nlist.h index d28ba6f..0e4e57e 100644 --- a/agent/mibgroup/hardware/cpu/cpu_nlist.h +++ b/agent/mibgroup/hardware/cpu/cpu_nlist.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_nlist( void ); diff --git a/agent/mibgroup/hardware/cpu/cpu_null.h b/agent/mibgroup/hardware/cpu/cpu_null.h index 3150358..0be0747 100644 --- a/agent/mibgroup/hardware/cpu/cpu_null.h +++ b/agent/mibgroup/hardware/cpu/cpu_null.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_null(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_pcp.c b/agent/mibgroup/hardware/cpu/cpu_pcp.c index 94c7b5c..62c0a04 100644 --- a/agent/mibgroup/hardware/cpu/cpu_pcp.c +++ b/agent/mibgroup/hardware/cpu/cpu_pcp.c @@ -120,7 +120,7 @@ void init_cpu_pcp( void ) { for (i=0; iname, tstr); + strlcpy(cpu->name, tstr, sizeof(cpu->name)); strcpy(cpu->descr, "An electronic chip that makes the computer work"); } } diff --git a/agent/mibgroup/hardware/cpu/cpu_pcp.h b/agent/mibgroup/hardware/cpu/cpu_pcp.h index ddb7547..9eb4240 100644 --- a/agent/mibgroup/hardware/cpu/cpu_pcp.h +++ b/agent/mibgroup/hardware/cpu/cpu_pcp.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_pcp(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_perfstat.c b/agent/mibgroup/hardware/cpu/cpu_perfstat.c index 5fdd531..81d7c8f 100644 --- a/agent/mibgroup/hardware/cpu/cpu_perfstat.c +++ b/agent/mibgroup/hardware/cpu/cpu_perfstat.c @@ -15,7 +15,7 @@ #include #include -netsnmp_feature_require(hardware_cpu_copy_stats) +netsnmp_feature_require(hardware_cpu_copy_stats); void _cpu_copy_stats( netsnmp_cpu_info *cpu ); /* diff --git a/agent/mibgroup/hardware/cpu/cpu_perfstat.h b/agent/mibgroup/hardware/cpu/cpu_perfstat.h index 8b8b62c..c6a5073 100644 --- a/agent/mibgroup/hardware/cpu/cpu_perfstat.h +++ b/agent/mibgroup/hardware/cpu/cpu_perfstat.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_perfstat(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_pstat.h b/agent/mibgroup/hardware/cpu/cpu_pstat.h index 2353f68..e05c645 100644 --- a/agent/mibgroup/hardware/cpu/cpu_pstat.h +++ b/agent/mibgroup/hardware/cpu/cpu_pstat.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_pstat(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_sysctl.c b/agent/mibgroup/hardware/cpu/cpu_sysctl.c index 5ecb68e..e60947a 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysctl.c +++ b/agent/mibgroup/hardware/cpu/cpu_sysctl.c @@ -12,7 +12,7 @@ #include #include -#if defined(__FreeBSD__) +#if defined(freebsd3) #include #if !defined(CPUSTATES) #include @@ -30,8 +30,11 @@ #ifdef HAVE_VM_VM_EXTERN_H #include #endif +#ifdef HAVE_UVM_UVM_EXTERN_H +#include +#endif -netsnmp_feature_require(hardware_cpu_copy_stats) +netsnmp_feature_require(hardware_cpu_copy_stats); void _cpu_copy_stats( netsnmp_cpu_info *cpu ); @@ -85,11 +88,11 @@ void init_cpu_sysctl( void ) { #elif defined(KERN_CPTIME2) /* OpenBSD */ #define NETSNMP_KERN_CPU KERN_CPTIME #define NETSNMP_KERN_MCPU -#define NETSNMP_KERN_MCPU_TYPE u_int64_t +#define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS #elif defined(KERN_CPTIME) /* OpenBSD */ #define NETSNMP_KERN_CPU KERN_CPTIME -#elif defined(__FreeBSD__) +#elif defined(freebsd3) #define NETSNMP_KERN_MCPU 1 /* Enable support for multi-cpu stats. Valid for FreeBSD >=6.4, >=7.1, >=8.0 and beyond */ #define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS @@ -129,9 +132,22 @@ void init_cpu_sysctl( void ) { #define NETSNMP_VM_STATS_TYPE struct uvmexp #endif /* VM_UVMEXP2 || VM_UVMEXP */ -#elif defined(__FreeBSD__) /* FreeBSD */ +#elif defined(freebsd3) /* FreeBSD */ +#if __FreeBSD_version >= 1200028 +#define VMMETER_TYPE uint64_t +#else +#define VMMETER_TYPE u_int +#endif +struct __vmmeter { + VMMETER_TYPE v_intr; + VMMETER_TYPE v_swtch; + VMMETER_TYPE v_swappgsin; + VMMETER_TYPE v_swappgsout; + VMMETER_TYPE v_swapin; + VMMETER_TYPE v_swapout; +}; #define NETSNMP_VM_STATS VM_METER -#define NETSNMP_VM_STATS_TYPE struct vmmeter +#define NETSNMP_VM_STATS_TYPE struct __vmmeter #define NS_VM_INTR v_intr #define NS_VM_SWTCH v_swtch #define NS_VM_PAGEIN v_swappgsin @@ -169,27 +185,25 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { */ NETSNMP_CPU_STATS cpu_stats[CPUSTATES]; size_t cpu_size = sizeof(cpu_stats); -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(freebsd3) && !defined(__NetBSD__) int cpu_mib[] = { CTL_KERN, NETSNMP_KERN_CPU }; #endif -#ifdef __FreeBSD__ +#ifdef freebsd3 static int cp_times = -1; #endif +#ifdef NETSNMP_KERN_MCPU #ifdef KERN_CPTIME2 int mcpu_mib[] = { CTL_KERN, KERN_CPTIME2, 0 }; #endif -#ifdef NETSNMP_KERN_MCPU int i; int act_cpu = cpu_num; NETSNMP_KERN_MCPU_TYPE *mcpu_stats; size_t mcpu_size; #endif NETSNMP_VM_STATS_TYPE mem_stats; - int mem_mib[] = { CTL_VM, NETSNMP_VM_STATS }; - size_t mem_size = sizeof(NETSNMP_VM_STATS_TYPE); netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 ); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(freebsd3) || defined(__NetBSD__) sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0); #else sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0); @@ -202,11 +216,34 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { cpu->intrpt_ticks = cpu_stats[CP_INTR]; /* wait_ticks, sirq_ticks unused */ - /* - * Interrupt/Context Switch statistics - * XXX - Do these really belong here ? - */ - sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0); +#ifdef freebsd3 +#define GET_VM_STATS(space, name) sysctlbyname("vm.stats." #space "." #name, &mem_stats.name, &len, NULL, 0) + { + size_t len; + + len = sizeof(VMMETER_TYPE); + GET_VM_STATS(sys, v_intr); + GET_VM_STATS(sys, v_swtch); + GET_VM_STATS(vm, v_swappgsin); + GET_VM_STATS(vm, v_swappgsout); + GET_VM_STATS(vm, v_swapin); + GET_VM_STATS(vm, v_swapout); + } +#undef GET_VM_STATS +#else + { + static const int mem_mib[] = { CTL_VM, NETSNMP_VM_STATS }; + size_t mem_size = sizeof(mem_stats); + + sysctl(mem_mib, sizeof(mem_mib) / sizeof(mem_mib[0]), &mem_stats, + &mem_size, NULL, 0); + netsnmp_assert(mem_size == sizeof(mem_stats)); + } +#endif + /* + * Interrupt/Context Switch statistics + * XXX - Do these really belong here ? + */ cpu->nInterrupts = mem_stats.NS_VM_INTR; cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH; cpu->swapIn = mem_stats.NS_VM_SWAPIN; @@ -226,7 +263,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { mcpu_size = cpu_num*sizeof(cpu_stats); mcpu_stats = malloc(mcpu_size); sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0); -#elif defined(__FreeBSD__) +#elif defined(freebsd3) if (cp_times == -1) { int ret = sysctlbyname("kern.cp_times", NULL, &mcpu_size, NULL, 0); cp_times = ret == -1 ? 0 : 1; diff --git a/agent/mibgroup/hardware/cpu/cpu_sysctl.h b/agent/mibgroup/hardware/cpu/cpu_sysctl.h index f37b907..ff81086 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysctl.h +++ b/agent/mibgroup/hardware/cpu/cpu_sysctl.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_sysctl(void); diff --git a/agent/mibgroup/hardware/cpu/cpu_sysinfo.c b/agent/mibgroup/hardware/cpu/cpu_sysinfo.c index ed1f357..7b009a2 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysinfo.c +++ b/agent/mibgroup/hardware/cpu/cpu_sysinfo.c @@ -66,7 +66,7 @@ void init_cpu_sysinfo( void ) { cpu = netsnmp_cpu_get_byIdx(i, 1); sprintf(tstr, "cpu%d",i); - strcpy(cpu->name, tstr); + strlcpy(cpu->name, tstr, sizeof(cpu->name)); strcpy(cpu->descr, "Central Processing Unit"); } } diff --git a/agent/mibgroup/hardware/cpu/cpu_sysinfo.h b/agent/mibgroup/hardware/cpu/cpu_sysinfo.h index 36c6e13..4618714 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysinfo.h +++ b/agent/mibgroup/hardware/cpu/cpu_sysinfo.h @@ -1,2 +1,2 @@ -config_require(hardware/cpu/cpu) +config_require(hardware/cpu/cpu); void init_cpu_sysinfo(void); diff --git a/agent/mibgroup/hardware/fsys.h b/agent/mibgroup/hardware/fsys.h index 8cbf439..0566f01 100644 --- a/agent/mibgroup/hardware/fsys.h +++ b/agent/mibgroup/hardware/fsys.h @@ -1,10 +1,10 @@ -config_require(hardware/fsys/hw_fsys) +config_require(hardware/fsys/hw_fsys); #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) -config_require(hardware/fsys/fsys_mntctl) +config_require(hardware/fsys/fsys_mntctl); #elif defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT) -config_require(hardware/fsys/fsys_getfsstats) +config_require(hardware/fsys/fsys_getfsstats); #elif defined(HAVE_GETMNTENT) && !defined(irix6) -config_require(hardware/fsys/fsys_mntent) +config_require(hardware/fsys/fsys_mntent); #else -config_require(hardware/fsys/fsys_void) +config_require(hardware/fsys/fsys_void); #endif diff --git a/agent/mibgroup/hardware/fsys/fsys_getfsstats.c b/agent/mibgroup/hardware/fsys/fsys_getfsstats.c index 05027f4..3f21f6b 100644 --- a/agent/mibgroup/hardware/fsys/fsys_getfsstats.c +++ b/agent/mibgroup/hardware/fsys/fsys_getfsstats.c @@ -3,14 +3,15 @@ #include #include #include "hardware/fsys/hw_fsys.h" +#include "hardware/fsys/hw_fsys_private.h" -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif @@ -67,6 +68,8 @@ _fs_type( char *typename ) return NETSNMP_FS_TYPE_NTFS; else if ( !strcmp(typename, MOUNT_ZFS) ) return NETSNMP_FS_TYPE_OTHER; + else if ( !strcmp(typename, MOUNT_NVMFS) ) + return NETSNMP_FS_TYPE_OTHER; else if ( !strcmp(typename, MOUNT_ACFS) ) return NETSNMP_FS_TYPE_OTHER; @@ -116,11 +119,11 @@ netsnmp_fsys_arch_load( void ) /* * Retrieve information about the currently mounted filesystems... */ - n = NSFS_GETFSSTAT( NULL, 0, 0 ); + n = NSFS_GETFSSTAT( NULL, 0, MNT_WAIT ); if ( n==0 ) return; stats = (struct NSFS_STATFS *)malloc( n * sizeof( struct NSFS_STATFS )); - n = NSFS_GETFSSTAT( stats, n * sizeof( struct NSFS_STATFS ), MNT_NOWAIT ); + n = NSFS_GETFSSTAT( stats, n * sizeof( struct NSFS_STATFS ), MNT_WAIT ); /* * ... and insert this into the filesystem container. @@ -132,9 +135,7 @@ netsnmp_fsys_arch_load( void ) continue; strlcpy( entry->path, stats[i].f_mntonname, sizeof(entry->path)); - entry->path[sizeof(entry->path)-1] = '\0'; strlcpy( entry->device, stats[i].f_mntfromname, sizeof(entry->device)); - entry->device[sizeof(entry->device)-1] = '\0'; entry->units = stats[i].f_bsize; /* or f_frsize */ entry->size = stats[i].f_blocks; entry->used = (stats[i].f_blocks - stats[i].f_bfree); diff --git a/agent/mibgroup/hardware/fsys/fsys_mntctl.c b/agent/mibgroup/hardware/fsys/fsys_mntctl.c index 9fbb068..2267244 100644 --- a/agent/mibgroup/hardware/fsys/fsys_mntctl.c +++ b/agent/mibgroup/hardware/fsys/fsys_mntctl.c @@ -4,21 +4,21 @@ #include #include -#if HAVE_SYS_MNTCTL_H +#ifdef HAVE_SYS_MNTCTL_H #include #endif -#if HAVE_SYS_VMOUNT_H +#ifdef HAVE_SYS_VMOUNT_H #include #endif -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -int +static int _fsys_remote( char *device, int type, char *host ) { if (( type == NETSNMP_FS_TYPE_NFS) || @@ -28,7 +28,7 @@ _fsys_remote( char *device, int type, char *host ) return 0; } -int +static int _fsys_type( int type) { DEBUGMSGTL(("fsys:type", "Classifying %d\n", type)); @@ -43,8 +43,9 @@ _fsys_type( int type) case MNT_NFS: case MNT_NFS3: - case MNT_AUTOFS: return NETSNMP_FS_TYPE_NFS; + case MNT_AUTOFS: + return NETSNMP_FS_TYPE_AUTOFS; /* * The following code covers selected filesystems @@ -155,12 +156,15 @@ netsnmp_fsys_arch_load( void ) */ /* - * Optionally skip retrieving statistics for remote mounts + * Skip retrieving statistics for AUTOFS and optionally for remote + * mounts. */ if ( (entry->flags & NETSNMP_FS_FLAG_REMOTE) && netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES)) continue; + if (entry->type == NETSNMP_FS_TYPE_AUTOFS) + continue; if ( statfs( entry->path, &stat_buf ) < 0 ) { snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path ); diff --git a/agent/mibgroup/hardware/fsys/fsys_mntent.c b/agent/mibgroup/hardware/fsys/fsys_mntent.c index 94d23db..e103b25 100644 --- a/agent/mibgroup/hardware/fsys/fsys_mntent.c +++ b/agent/mibgroup/hardware/fsys/fsys_mntent.c @@ -2,29 +2,37 @@ #include #include #include +#include "hw_fsys.h" +#include "hardware/fsys/hw_fsys_private.h" #include -#if HAVE_MNTENT_H +#ifdef HAVE_MNTENT_H #include #endif -#if HAVE_SYS_MNTTAB_H +#ifdef HAVE_SYS_MNTTAB_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #include #endif -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif +#if defined(HAVE_PCRE_H) +#include +#elif defined(HAVE_REGEX_H) +#include +#include +#endif #ifdef solaris2 #define _NETSNMP_GETMNTENT_TWO_ARGS 1 @@ -57,7 +65,38 @@ #endif -int +/* + * File systems to monitor and that are not covered by any hrFSTypes + * enumeration. + */ +static const char *other_fs[] = { + "acfs", + "btrfs", + "cvfs", + "f2fs", + "fuse.glusterfs", + "gfs", + "gfs2", + "glusterfs", + "jfs", + "jffs2", + "lofs", + "mvfs", + "nsspool", + "nssvol", + "nvmfs", + "ocfs2", + "reiserfs", + "simfs", + "tmpfs", + "virtiofs", + "vxfs", + "xfs", + "zfs", + NULL, +}; + +static int _fsys_remote( char *device, int type ) { if (( type == NETSNMP_FS_TYPE_NFS) || @@ -67,9 +106,11 @@ _fsys_remote( char *device, int type ) return 0; } -int +static int _fsys_type( char *typename ) { + const char **fs; + DEBUGMSGTL(("fsys:type", "Classifying %s\n", typename)); if ( !typename || *typename=='\0' ) @@ -103,7 +144,9 @@ _fsys_type( char *typename ) !strcmp(typename, MNTTYPE_NFS3) || !strcmp(typename, MNTTYPE_NFS4) || !strcmp(typename, MNTTYPE_CIFS) || /* i.e. SMB - ?? */ - !strcmp(typename, MNTTYPE_SMBFS) /* ?? */ ) + !strcmp(typename, MNTTYPE_SMBFS) || /* ?? */ + /* mvfs (IBM ClearCase) is nfs-like in nature */ + !strcmp(typename, MNTTYPE_MVFS)) return NETSNMP_FS_TYPE_NFS; else if ( !strcmp(typename, MNTTYPE_NCPFS) ) return NETSNMP_FS_TYPE_NETWARE; @@ -120,37 +163,21 @@ _fsys_type( char *typename ) !strcmp(typename, MNTTYPE_VFAT) ) return NETSNMP_FS_TYPE_FAT32; - /* - * The following code covers selected filesystems - * which are not covered by the HR-TYPES enumerations, - * but should still be monitored. - * These are all mapped into type "other" - * - * (The systems listed are not fixed in stone, - * but are simply here to illustrate the principle!) - */ - else if ( !strcmp(typename, MNTTYPE_MVFS) || - !strcmp(typename, MNTTYPE_TMPFS) || - !strcmp(typename, MNTTYPE_GFS) || - !strcmp(typename, MNTTYPE_GFS2) || - !strcmp(typename, MNTTYPE_XFS) || - !strcmp(typename, MNTTYPE_JFS) || - !strcmp(typename, MNTTYPE_VXFS) || - !strcmp(typename, MNTTYPE_REISERFS) || - !strcmp(typename, MNTTYPE_OCFS2) || - !strcmp(typename, MNTTYPE_CVFS) || - !strcmp(typename, MNTTYPE_SIMFS) || - !strcmp(typename, MNTTYPE_BTRFS) || - !strcmp(typename, MNTTYPE_ZFS) || - !strcmp(typename, MNTTYPE_ACFS) || - !strcmp(typename, MNTTYPE_LOFS)) - return NETSNMP_FS_TYPE_OTHER; + for (fs = other_fs; *fs; fs++) + if (strcmp(typename, *fs) == 0) + return NETSNMP_FS_TYPE_OTHER; + + /* Detection of AUTOFS. + * This file system will be ignored by default + */ + if (!strcmp(typename, MNTTYPE_AUTOFS)) + return NETSNMP_FS_TYPE_AUTOFS; + /* * All other types are silently skipped */ - else - return NETSNMP_FS_TYPE_IGNORE; + return NETSNMP_FS_TYPE_IGNORE; } void @@ -159,6 +186,44 @@ netsnmp_fsys_arch_init( void ) return; } +static int +ignore_mount_point(const char *name) +{ + conf_mount_list *m_ptr; +#ifdef HAVE_PCRE_H + int found_ndx[3]; +#endif + + if (!ignoremount_list) + return FALSE; + + for (m_ptr = ignoremount_list; m_ptr; m_ptr = m_ptr->next) { +#if defined(HAVE_PCRE_H) + if (m_ptr->regex_ptr) { + if (pcre_exec(m_ptr->regex_ptr, NULL, name, strlen(name), 0, 0, + found_ndx, 3) >= 0) + return TRUE; + } else { + if (strcmp(name, m_ptr->name) == 0) + return TRUE; + } +#elif defined(HAVE_REGEX_H) + if (m_ptr->regex_ptr) { + if (regexec(m_ptr->regex_ptr, name, 0, NULL, 0) == 0) + return TRUE; + } else { + if (strcmp(name, m_ptr->name) == 0) + return TRUE; + } +#else + if (strcmp(name, m_ptr->name) == 0) + return TRUE; +#endif + } + + return FALSE; +} + void netsnmp_fsys_arch_load( void ) { @@ -171,15 +236,16 @@ netsnmp_fsys_arch_load( void ) #endif struct NSFS_STATFS stat_buf; netsnmp_fsys_info *entry; - char tmpbuf[1024]; + char *tmpbuf = NULL; /* * Retrieve information about the currently mounted filesystems... */ fp = fopen( ETC_MNTTAB, "r" ); /* OR setmntent()?? */ if ( !fp ) { - snprintf( tmpbuf, sizeof(tmpbuf), "Cannot open %s", ETC_MNTTAB ); - snmp_log_perror( tmpbuf ); + if (asprintf(&tmpbuf, "Cannot open %s", ETC_MNTTAB) >= 0) + snmp_log_perror(tmpbuf); + free(tmpbuf); return; } @@ -206,9 +272,11 @@ netsnmp_fsys_arch_load( void ) if ( _fsys_remote( entry->device, entry->type )) entry->flags |= NETSNMP_FS_FLAG_REMOTE; -#if HAVE_HASMNTOPT - if (hasmntopt( m, "ro" )) +#ifdef HAVE_HASMNTOPT + if (hasmntopt( m, NETSNMP_REMOVE_CONST(char *, "ro") )) entry->flags |= NETSNMP_FS_FLAG_RONLY; + else + entry->flags &= ~NETSNMP_FS_FLAG_RONLY; #endif /* * The root device is presumably bootable. @@ -224,6 +292,12 @@ netsnmp_fsys_arch_load( void ) * XXX - identify removeable disks */ + /* + * Skip ignored mount points + */ + if (ignore_mount_point(entry->path)) + continue; + /* * Optionally skip retrieving statistics for remote mounts */ @@ -232,31 +306,33 @@ netsnmp_fsys_arch_load( void ) NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES)) continue; + /* Skip AUTOFS entries */ + if (entry->type == NETSNMP_FS_TYPE_AUTOFS) + continue; + #ifdef irix6 if ( NSFS_STATFS( entry->path, &stat_buf, sizeof(struct statfs), 0) < 0 ) #else if ( NSFS_STATFS( entry->path, &stat_buf ) < 0 ) #endif { - snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path ); - snmp_log_perror( tmpbuf ); - continue; + static char logged = 0; + + if (!logged && + asprintf(&tmpbuf, "Cannot statfs %s", entry->path) >= 0) { + snmp_log_perror(tmpbuf); + free(tmpbuf); + logged = 1; + } + memset(&stat_buf, 0, sizeof(stat_buf)); } entry->units = stat_buf.NSFS_SIZE; entry->size = stat_buf.f_blocks; entry->used = (stat_buf.f_blocks - stat_buf.f_bfree); - /* entry->avail is currently unsigned, so protect against negative - * values! - * This should be changed to a signed field. - */ - if (stat_buf.f_bavail < 0) - entry->avail = 0; - else - entry->avail = stat_buf.f_bavail; + entry->avail = stat_buf.f_bavail; entry->inums_total = stat_buf.f_files; entry->inums_avail = stat_buf.f_ffree; netsnmp_fsys_calculate32(entry); } fclose( fp ); } - diff --git a/agent/mibgroup/hardware/fsys/hw_fsys.c b/agent/mibgroup/hardware/fsys/hw_fsys.c index a6cd94d..d9c8c14 100644 --- a/agent/mibgroup/hardware/fsys/hw_fsys.c +++ b/agent/mibgroup/hardware/fsys/hw_fsys.c @@ -1,26 +1,68 @@ +#define __USE_MINGW_ANSI_STDIO 0 #include #include #include #include #include +#include "hw_fsys.h" +#include "hardware/fsys/hw_fsys_private.h" #ifdef HAVE_INTTYPES_H #include #endif +#if defined(HAVE_PCRE_H) +#include +#elif defined(HAVE_REGEX_H) +#include +#include +#endif -netsnmp_feature_child_of(hw_fsys_get_container, netsnmp_unused) - -extern void netsnmp_fsys_arch_load( void ); -extern void netsnmp_fsys_arch_init( void ); -static int _fsys_load( void ); -static void _fsys_free( void ); +netsnmp_feature_child_of(hw_fsys_get_container, netsnmp_unused); static int _fsysAutoUpdate = 0; /* 0 means on-demand caching */ -static void _fsys_update_stats( unsigned int, void* ); -netsnmp_cache *_fsys_cache = NULL; -netsnmp_container *_fsys_container = NULL; -static int _fsys_idx = 0; -static netsnmp_fsys_info * _fsys_create_entry( void ); +static netsnmp_cache *_fsys_cache; +static netsnmp_container *_fsys_container; +static int _fsys_idx; + +static void _parse_mount_config(const char *, char *); +static void _free_mount_config(void); + +conf_mount_list *ignoremount_list; + +/* + * Architecture-independent processing of loading filesystem statistics + */ +static int +_fsys_load(void) +{ + netsnmp_fsys_arch_load(); + /* XXX - update cache timestamp */ + return 0; +} + +/* + * Architecture-independent release of filesystem statistics + */ +static void +_fsys_free(void) +{ + netsnmp_fsys_info *sp; + + for (sp = CONTAINER_FIRST(_fsys_container); sp; + sp = CONTAINER_NEXT(_fsys_container, sp)) { + sp->flags &= ~NETSNMP_FS_FLAG_ACTIVE; + } +} + +/* + * Wrapper routine for automatically updating fsys information + */ +void +_fsys_update_stats(unsigned int clientreg, void *data) +{ + _fsys_free(); + _fsys_load(); +} void init_hw_fsys( void ) { @@ -58,6 +100,9 @@ void init_hw_fsys( void ) { DEBUGMSGTL(("fsys", "Reloading Hardware FileSystems on-demand (%p)\n", _fsys_cache)); } + + snmpd_register_config_handler("ignoremount", _parse_mount_config, + _free_mount_config, "name"); } void shutdown_hw_fsys( void ) { @@ -77,16 +122,6 @@ netsnmp_container *netsnmp_fsys_get_container( void ) { return _fsys_container; netsnmp_cache *netsnmp_fsys_get_cache( void ) { return _fsys_cache; } -/* - * Wrapper routine for automatically updating fsys information - */ -void -_fsys_update_stats( unsigned int clientreg, void *data ) -{ - _fsys_free(); - _fsys_load(); -} - /* * Wrapper routine for re-loading filesystem statistics on demand */ @@ -107,39 +142,36 @@ netsnmp_fsys_free( netsnmp_cache *cache, void *data ) } -/* - * Architecture-independent processing of loading filesystem statistics - */ -static int -_fsys_load( void ) -{ - netsnmp_fsys_arch_load(); - /* XXX - update cache timestamp */ - return 0; +netsnmp_fsys_info *netsnmp_fsys_get_first(void) { + return CONTAINER_FIRST(_fsys_container); } -/* - * Architecture-independent release of filesystem statistics - */ -static void -_fsys_free( void ) +netsnmp_fsys_info *netsnmp_fsys_get_next(const netsnmp_fsys_info *this_ptr) { + return CONTAINER_NEXT(_fsys_container, this_ptr); +} + +netsnmp_fsys_info * +_fsys_create_entry(void) { netsnmp_fsys_info *sp; - for (sp = CONTAINER_FIRST( _fsys_container ); - sp; - sp = CONTAINER_NEXT( _fsys_container, sp )) { - - sp->flags &= ~NETSNMP_FS_FLAG_ACTIVE; - } -} + sp = SNMP_MALLOC_TYPEDEF(netsnmp_fsys_info); + if (!sp) + return NULL; + /* + * Set up the index value. + * + * All this trouble, just for a simple integer. + * Surely there must be a better way? + */ + sp->idx.len = 1; + sp->idx.oids = SNMP_MALLOC_TYPEDEF( oid ); + sp->idx.oids[0] = ++_fsys_idx; -netsnmp_fsys_info *netsnmp_fsys_get_first( void ) { - return CONTAINER_FIRST( _fsys_container ); -} -netsnmp_fsys_info *netsnmp_fsys_get_next( netsnmp_fsys_info *this_ptr ) { - return CONTAINER_NEXT( _fsys_container, this_ptr ); + DEBUGMSGTL(("fsys:new", "Create filesystem entry (index = %d)\n", _fsys_idx)); + CONTAINER_INSERT(_fsys_container, sp); + return sp; } /* @@ -225,30 +257,6 @@ netsnmp_fsys_by_device( char *device, int create_type ) } -netsnmp_fsys_info * -_fsys_create_entry( void ) -{ - netsnmp_fsys_info *sp; - - sp = SNMP_MALLOC_TYPEDEF( netsnmp_fsys_info ); - if ( sp ) { - /* - * Set up the index value. - * - * All this trouble, just for a simple integer. - * Surely there must be a better way? - */ - sp->idx.len = 1; - sp->idx.oids = SNMP_MALLOC_TYPEDEF( oid ); - sp->idx.oids[0] = ++_fsys_idx; - } - - DEBUGMSGTL(("fsys:new", "Create filesystem entry (index = %d)\n", _fsys_idx)); - CONTAINER_INSERT( _fsys_container, sp ); - return sp; -} - - /* * Convert fsys size information to 1K units * (attempting to avoid 32-bit overflow!) @@ -274,7 +282,8 @@ _fsys_to_K( unsigned long long size, unsigned long long units ) } unsigned long long -netsnmp_fsys_size_ull( netsnmp_fsys_info *f) { +netsnmp_fsys_size_ull(const netsnmp_fsys_info *f) +{ if ( !f ) { return 0; } @@ -282,7 +291,8 @@ netsnmp_fsys_size_ull( netsnmp_fsys_info *f) { } unsigned long long -netsnmp_fsys_used_ull( netsnmp_fsys_info *f) { +netsnmp_fsys_used_ull(const netsnmp_fsys_info *f) +{ if ( !f ) { return 0; } @@ -290,7 +300,8 @@ netsnmp_fsys_used_ull( netsnmp_fsys_info *f) { } unsigned long long -netsnmp_fsys_avail_ull( netsnmp_fsys_info *f) { +netsnmp_fsys_avail_ull(const netsnmp_fsys_info *f) +{ if ( !f ) { return 0; } @@ -299,19 +310,22 @@ netsnmp_fsys_avail_ull( netsnmp_fsys_info *f) { int -netsnmp_fsys_size( netsnmp_fsys_info *f) { +netsnmp_fsys_size(const netsnmp_fsys_info *f) +{ unsigned long long v = netsnmp_fsys_size_ull(f); return (int)v; } int -netsnmp_fsys_used( netsnmp_fsys_info *f) { +netsnmp_fsys_used(const netsnmp_fsys_info *f) +{ unsigned long long v = netsnmp_fsys_used_ull(f); return (int)v; } int -netsnmp_fsys_avail( netsnmp_fsys_info *f) { +netsnmp_fsys_avail(const netsnmp_fsys_info *f) +{ unsigned long long v = netsnmp_fsys_avail_ull(f); return (int)v; } @@ -347,3 +361,102 @@ netsnmp_fsys_calculate32(netsnmp_fsys_info *f) (uint64_t)f->size, f->size_32, (uint64_t)f->units, f->units_32, (uint64_t)f->avail, f->avail_32, (uint64_t)f->used, f->used_32)); } + +static void +_parse_mount_config(const char *token, char *cptr) +{ + conf_mount_list *m_new; + char *name, *st = NULL; +#if defined(HAVE_PCRE_H) + const char *pcre_error; + int pcre_error_offset; + int is_regex = 0; +#elif defined(HAVE_REGEX_H) + int r = 0; + int is_regex = 0; +#endif + + name = strtok_r(cptr, " \t", &st); + if (strcmp(name, "-r") == 0) { +#if defined(HAVE_PCRE_H) || defined(HAVE_REGEX_H) + is_regex = 1; + name = strtok_r(NULL, " \t", &st); +#else + config_perror("Missing regex support"); + return; +#endif + } + if (!name) { + config_perror("Missing mount parameter"); + return; + } + m_new = SNMP_MALLOC_TYPEDEF(conf_mount_list); + if (!m_new) { + config_perror("Out of memory"); + goto err; + } + m_new->name = strdup(name); + if (!m_new->name) { + config_perror("Out of memory"); + goto err; + } +#if defined(HAVE_PCRE_H) + if (is_regex) { + m_new->regex_ptr = pcre_compile(m_new->name, 0, &pcre_error, + &pcre_error_offset, NULL); + if (!m_new->regex_ptr) { + config_perror(pcre_error); + goto err; + } + } +#elif defined(HAVE_REGEX_H) + if (is_regex) { + m_new->regex_ptr = malloc(sizeof(regex_t)); + if (!m_new->regex_ptr) { + config_perror("Out of memory"); + goto err; + } + r = regcomp(m_new->regex_ptr, m_new->name, REG_NOSUB); + if (r) { + char buf[BUFSIZ]; + size_t regerror_len = 0; + + regerror_len = regerror(r, m_new->regex_ptr, buf, BUFSIZ); + if (regerror_len >= BUFSIZ) + buf[BUFSIZ - 1] = '\0'; + else + buf[regerror_len] = '\0'; + config_perror(buf); + goto err; + } + } +#endif + m_new->next = ignoremount_list; + ignoremount_list = m_new; + return; + +err: + if (m_new) { +#if defined(HAVE_PCRE_H) || defined(HAVE_REGEX_H) + free(m_new->regex_ptr); +#endif + free(m_new->name); + } + free (m_new); +} + +static void +_free_mount_config(void) +{ + conf_mount_list *m_ptr = ignoremount_list, *m_next; + while (m_ptr) { + m_next = m_ptr->next; +#if defined(HAVE_PCRE_H) || defined(HAVE_REGEX_H) + free(m_ptr->regex_ptr); +#endif + free(m_ptr->name); + free(m_ptr); + m_ptr = m_next; + } + ignoremount_list = NULL; +} diff --git a/agent/mibgroup/hardware/fsys/hw_fsys.h b/agent/mibgroup/hardware/fsys/hw_fsys.h index 31f90ef..a52e025 100644 --- a/agent/mibgroup/hardware/fsys/hw_fsys.h +++ b/agent/mibgroup/hardware/fsys/hw_fsys.h @@ -1,2 +1,23 @@ +#if defined(HAVE_PCRE_H) +#include +#elif defined(HAVE_REGEX_H) +#include +#include +#endif + +struct _conf_mount_list; + +extern struct _conf_mount_list *ignoremount_list; + void init_hw_fsys(void); void shutdown_hw_fsys( void ); + +typedef struct _conf_mount_list { +#if defined(HAVE_PCRE_H) + pcre *regex_ptr; +#elif defined(HAVE_REGEX_H) + regex_t *regex_ptr; +#endif + char *name; + struct _conf_mount_list *next; +} conf_mount_list; diff --git a/agent/mibgroup/hardware/fsys/hw_fsys_private.h b/agent/mibgroup/hardware/fsys/hw_fsys_private.h new file mode 100644 index 0000000..1e05d6e --- /dev/null +++ b/agent/mibgroup/hardware/fsys/hw_fsys_private.h @@ -0,0 +1,2 @@ +void netsnmp_fsys_arch_init(void); +void netsnmp_fsys_arch_load(void); diff --git a/agent/mibgroup/hardware/fsys/mnttypes.h b/agent/mibgroup/hardware/fsys/mnttypes.h index 37ed4fb..ea73d98 100644 --- a/agent/mibgroup/hardware/fsys/mnttypes.h +++ b/agent/mibgroup/hardware/fsys/mnttypes.h @@ -112,58 +112,12 @@ #ifndef MNTTYPE_MVFS #define MNTTYPE_MVFS "mvfs" #endif -#ifndef MNTTYPE_TMPFS -#define MNTTYPE_TMPFS "tmpfs" -#endif -#ifndef MNTTYPE_GFS -#define MNTTYPE_GFS "gfs" -#endif -#ifndef MNTTYPE_GFS2 -#define MNTTYPE_GFS2 "gfs2" -#endif -#ifndef MNTTYPE_XFS -#define MNTTYPE_XFS "xfs" -#endif -#ifndef MNTTYPE_JFS -#define MNTTYPE_JFS "jfs" -#endif -#ifndef MNTTYPE_VXFS -#define MNTTYPE_VXFS "vxfs" -#endif -#ifndef MNTTYPE_REISERFS -#define MNTTYPE_REISERFS "reiserfs" -#endif -#ifndef MNTTYPE_LOFS -#define MNTTYPE_LOFS "lofs" -#endif -#ifndef MNTTYPE_OCFS2 -#define MNTTYPE_OCFS2 "ocfs2" -#endif -#ifndef MNTTYPE_CVFS -#define MNTTYPE_CVFS "cvfs" -#endif -#ifndef MNTTYPE_SIMFS -#define MNTTYPE_SIMFS "simfs" -#endif -#ifndef MNTTYPE_BTRFS -#define MNTTYPE_BTRFS "btrfs" -#endif -#ifndef MNTTYPE_ZFS -#define MNTTYPE_ZFS "zfs" -#endif -#ifndef MNTTYPE_ACFS -#define MNTTYPE_ACFS "acfs" -#endif /* * File systems to skip - * (Probably not strictly needed) */ -#ifndef MNTTYPE_APP -#define MNTTYPE_APP "app" -#endif -#ifndef MNTTYPE_DEVPTS -#define MNTTYPE_DEVPTS "devpts" +#ifndef MNTTYPE_AUTOFS +#define MNTTYPE_AUTOFS "autofs" #endif #ifndef MNTTYPE_IGNORE #define MNTTYPE_IGNORE "ignore" @@ -171,17 +125,5 @@ #ifndef MNTTYPE_PROC #define MNTTYPE_PROC "proc" #endif -#ifndef MNTTYPE_SYSFS -#define MNTTYPE_SYSFS "sysfs" -#endif -#ifndef MNTTYPE_USBFS -#define MNTTYPE_USBFS "usbfs" -#endif -#ifndef MNTTYPE_BINFMT -#define MNTTYPE_BINFMT "binfmt_misc" -#endif -#ifndef MNTTYPE_RPCPIPE -#define MNTTYPE_RPCPIPE "rpc_pipefs" -#endif #endif /* _NETSNMP_FSYS_MNTTYPES_H */ diff --git a/agent/mibgroup/hardware/fsys/mounts.h b/agent/mibgroup/hardware/fsys/mounts.h index eab65da..1e02a0a 100644 --- a/agent/mibgroup/hardware/fsys/mounts.h +++ b/agent/mibgroup/hardware/fsys/mounts.h @@ -7,21 +7,6 @@ * type tokens which may be missing. */ -/* -#if (defined(BerkelyFS) && !defined(MNTTYPE_HFS)) || defined(solaris2) -#define _NETSNMP_FS_TYPE_UFS NETSNMP_FS_TYPE_BERKELEY -#else -#define _NETSNMP_FS_TYPE_UFS NETSNMP_FS_TYPE_SYSV -#endif - -#ifdef RockRidge -#define _NETSNMP_FS_TYPE_CDFS NETSNMP_FS_TYPE_ROCKRIDGE -#else -#define _NETSNMP_FS_TYPE_CDFS NETSNMP_FS_TYPE_ISO9660 -#endif - */ - - /* * Ensure all recognised filesystem mount type tokens are * available (even on systems where they're not used) @@ -59,107 +44,11 @@ #ifndef MOUNT_ZFS #define MOUNT_ZFS "zfs" #endif +#ifndef MOUNT_NVMFS +#define MOUNT_NVMFS "nvmfs" +#endif #ifndef MOUNT_ACFS #define MOUNT_ACFS "acfs" #endif -/* -#ifndef MNTTYPE_AFS -#define MNTTYPE_AFS "afs" -#endif -#ifndef MNTTYPE_CDFS -#define MNTTYPE_CDFS "cdfs" -#endif -#ifndef MNTTYPE_CD9660 -#define MNTTYPE_CD9660 "cd9660" -#endif -#ifndef MNTTYPE_EXT2 -#define MNTTYPE_EXT2 "ext2" -#endif -#ifndef MNTTYPE_EXT3 -#define MNTTYPE_EXT3 "ext3" -#endif -#ifndef MNTTYPE_EXT2FS -#define MNTTYPE_EXT2FS "ext2fs" -#endif -#ifndef MNTTYPE_EXT3FS -#define MNTTYPE_EXT3FS "ext3fs" -#endif -#ifndef MNTTYPE_FAT32 -#define MNTTYPE_FAT32 "fat32" -#endif -#ifndef MNTTYPE_FFS -#define MNTTYPE_FFS "ffs" -#endif -#ifndef MNTTYPE_HFS -#define MNTTYPE_HFS "hfs" -#endif -#ifndef MNTTYPE_HSFS -#define MNTTYPE_HSFS "hsfs" -#endif -#ifndef MNTTYPE_ISO9660 -#define MNTTYPE_ISO9660 "iso9660" -#endif -#ifndef MNTTYPE_MFS -#define MNTTYPE_MFS "mfs" -#endif -#ifndef MNTTYPE_MSDOS -#define MNTTYPE_MSDOS "msdos" -#endif -#ifndef MNTTYPE_NCPFS -#define MNTTYPE_NCPFS "ncpfs" -#endif -#ifndef MNTTYPE_NFS -#define MNTTYPE_NFS "nfs" -#endif -#ifndef MNTTYPE_NFS3 -#define MNTTYPE_NFS3 "nfs3" -#endif -#ifndef MNTTYPE_NTFS -#define MNTTYPE_NTFS "ntfs" -#endif -#ifndef MNTTYPE_PC -#define MNTTYPE_PC "pc" -#endif -#ifndef MNTTYPE_REISERFS -#define MNTTYPE_REISERFS "reiserfs" -#endif -#ifndef MNTTYPE_SMBFS -#define MNTTYPE_SMBFS "smbfs" -#endif -#ifndef MNTTYPE_SYSV -#define MNTTYPE_SYSV "sysv" -#endif -#ifndef MNTTYPE_UFS -#define MNTTYPE_UFS "ufs" -#endif -#ifndef MNTTYPE_VFAT -#define MNTTYPE_VFAT "vfat" -#endif -*/ - -/* - * File systems to skip - */ -/* -#ifndef MNTTYPE_DEVPTS -#define MNTTYPE_DEVPTS "devpts" -#endif -#ifndef MNTTYPE_IGNORE -#define MNTTYPE_IGNORE "ignore" -#endif -#ifndef MNTTYPE_PROC -#define MNTTYPE_PROC "proc" -#endif -#ifndef MNTTYPE_SYSFS -#define MNTTYPE_SYSFS "sysfs" -#endif -#ifndef MNTTYPE_TMPFS -#define MNTTYPE_TMPFS "tmpfs" -#endif -#ifndef MNTTYPE_USBFS -#define MNTTYPE_USBFS "usbfs" -#endif -*/ - #endif /* _NETSNMP_FSYS_MOUNTS_H */ diff --git a/agent/mibgroup/hardware/memory.h b/agent/mibgroup/hardware/memory.h index 7e4e88e..bb97667 100644 --- a/agent/mibgroup/hardware/memory.h +++ b/agent/mibgroup/hardware/memory.h @@ -1,32 +1,32 @@ -config_require(hardware/memory/hw_mem) +config_require(hardware/memory/hw_mem); #if defined(linux) -config_require(hardware/memory/memory_linux) +config_require(hardware/memory/memory_linux); #elif (defined(darwin)) -config_require(hardware/memory/memory_darwin) +config_require(hardware/memory/memory_darwin); #elif (defined(freebsd2) || defined(freebsd3) || defined(freebsd4) || defined(freebsd5)|| defined(freebsd6)) -config_require(hardware/memory/memory_freebsd) +config_require(hardware/memory/memory_freebsd); #elif (defined(netbsd) || defined(netbsd1) || defined(netbsdelf) || defined(netbsdelf2)|| defined(netbsdelf3) || defined(openbsd)) -config_require(hardware/memory/memory_netbsd) +config_require(hardware/memory/memory_netbsd); #elif (defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)) -config_require(hardware/memory/memory_aix) +config_require(hardware/memory/memory_aix); #elif (defined(solaris2)) -config_require(hardware/memory/memory_solaris) +config_require(hardware/memory/memory_solaris); #elif (defined(irix6)) -config_require(hardware/memory/memory_irix) +config_require(hardware/memory/memory_irix); #elif (defined(dynix)) -config_require(hardware/memory/memory_dynix) +config_require(hardware/memory/memory_dynix); #elif (defined(hpux10) || defined(hpux11)) -config_require(hardware/memory/memory_hpux) +config_require(hardware/memory/memory_hpux); #else -config_require(hardware/memory/memory_null) +config_require(hardware/memory/memory_null); #endif diff --git a/agent/mibgroup/hardware/memory/hw_mem.c b/agent/mibgroup/hardware/memory/hw_mem.c index 1f4474f..a2ca75b 100644 --- a/agent/mibgroup/hardware/memory/hw_mem.c +++ b/agent/mibgroup/hardware/memory/hw_mem.c @@ -2,48 +2,55 @@ #include #include #include - #include +#include "hw_mem.h" -netsnmp_feature_child_of(hardware_memory, netsnmp_unused) - -netsnmp_feature_child_of(memory_get_cache, hardware_memory) +netsnmp_feature_child_of(hardware_memory, netsnmp_unused); -extern NetsnmpCacheLoad netsnmp_mem_arch_load; +netsnmp_feature_child_of(memory_get_cache, hardware_memory); -netsnmp_memory_info *_mem_head = NULL; -netsnmp_cache *_mem_cache = NULL; +netsnmp_memory_info *_mem_head = NULL; +netsnmp_cache *_mem_cache = NULL; #ifdef darwin -/* the code in memory_darwin.c is *very* expensive */ +/* + * the code in memory_darwin.c is *very* expensive + */ #define MEMORY_CACHE_SECONDS 300 #else #define MEMORY_CACHE_SECONDS 5 #endif -void init_hw_mem( void ) { - oid nsMemory[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 31 }; - _mem_cache = netsnmp_cache_create( MEMORY_CACHE_SECONDS, netsnmp_mem_arch_load, NULL, - nsMemory, OID_LENGTH(nsMemory)); +void +init_hw_mem(void) +{ + oid nsMemory[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 31 }; + _mem_cache = + netsnmp_cache_create(MEMORY_CACHE_SECONDS, netsnmp_mem_arch_load, + NULL, nsMemory, OID_LENGTH(nsMemory)); } -netsnmp_memory_info *netsnmp_memory_get_first( int type ) { +netsnmp_memory_info * +netsnmp_memory_get_first(int type) +{ netsnmp_memory_info *mem; - for ( mem=_mem_head; mem; mem=mem->next ) - if (mem->type == type) /* Or treat as bits? */ + for (mem = _mem_head; mem; mem = mem->next) + if (mem->type == type) /* Or treat as bits? */ return mem; return NULL; } -netsnmp_memory_info *netsnmp_memory_get_next( netsnmp_memory_info *this_ptr, int type ) { +netsnmp_memory_info * +netsnmp_memory_get_next(netsnmp_memory_info * this_ptr, int type) +{ netsnmp_memory_info *mem; if (this_ptr) - for ( mem=this_ptr->next; mem; mem=mem->next ) - if (mem->type == type) /* Or treat as bits? */ + for (mem = this_ptr->next; mem; mem = mem->next) + if (mem->type == type) /* Or treat as bits? */ return mem; return NULL; } @@ -51,49 +58,57 @@ netsnmp_memory_info *netsnmp_memory_get_next( netsnmp_memory_info *this_ptr, int /* * Work with a list of Memory entries, indexed numerically */ -netsnmp_memory_info *netsnmp_memory_get_byIdx( int idx, int create ) { +netsnmp_memory_info * +netsnmp_memory_get_byIdx(int idx, int create) +{ netsnmp_memory_info *mem, *mem2; - /* - * Find the specified Memory entry - */ - for ( mem=_mem_head; mem; mem=mem->next ) { - if ( mem->idx == idx ) + /* + * Find the specified Memory entry + */ + for (mem = _mem_head; mem; mem = mem->next) { + if (mem->idx == idx) return mem; } if (!create) return NULL; - /* - * Create a new memory entry, and insert it into the list.... - */ - mem = SNMP_MALLOC_TYPEDEF( netsnmp_memory_info ); + /* + * Create a new memory entry, and insert it into the list.... + */ + mem = SNMP_MALLOC_TYPEDEF(netsnmp_memory_info); if (!mem) return NULL; mem->idx = idx; - /* ... either as the first (or only) entry.... */ - if ( !_mem_head || _mem_head->idx > idx ) { + /* + * ... either as the first (or only) entry.... + */ + if (!_mem_head || _mem_head->idx > idx) { mem->next = _mem_head; _mem_head = mem; return mem; } - /* ... or in the appropriate position */ - for ( mem2=_mem_head; mem2; mem2=mem2->next ) { - if ( !mem2->next || mem2->next->idx > idx ) { - mem->next = mem2->next; + /* + * ... or in the appropriate position + */ + for (mem2 = _mem_head; mem2; mem2 = mem2->next) { + if (!mem2->next || mem2->next->idx > idx) { + mem->next = mem2->next; mem2->next = mem; return mem; } } SNMP_FREE(mem); - return NULL; /* Shouldn't happen! */ + return NULL; /* Shouldn't happen! */ } -netsnmp_memory_info *netsnmp_memory_get_next_byIdx( int idx, int type ) { +netsnmp_memory_info * +netsnmp_memory_get_next_byIdx(int idx, int type) +{ netsnmp_memory_info *mem; - for ( mem=_mem_head; mem; mem=mem->next ) - if (mem->type == type && mem->idx > idx) /* Or treat as bits? */ + for (mem = _mem_head; mem; mem = mem->next) + if (mem->type == type && mem->idx > idx) /* Or treat as bits? */ return mem; return NULL; } @@ -101,11 +116,15 @@ netsnmp_memory_info *netsnmp_memory_get_next_byIdx( int idx, int type ) { #ifndef NETSNMP_FEATURE_REMOVE_MEMORY_GET_CACHE -netsnmp_cache *netsnmp_memory_get_cache( void ) { +netsnmp_cache * +netsnmp_memory_get_cache(void) +{ return _mem_cache; } -#endif /* NETSNMP_FEATURE_REMOVE_MEMORY_GET_CACHE */ +#endif /* NETSNMP_FEATURE_REMOVE_MEMORY_GET_CACHE */ -int netsnmp_memory_load( void ) { - return netsnmp_cache_check_and_reload( _mem_cache ); +int +netsnmp_memory_load(void) +{ + return netsnmp_cache_check_and_reload(_mem_cache); } diff --git a/agent/mibgroup/hardware/memory/memory_darwin.c b/agent/mibgroup/hardware/memory/memory_darwin.c index 4462c45..12e35e7 100644 --- a/agent/mibgroup/hardware/memory/memory_darwin.c +++ b/agent/mibgroup/hardware/memory/memory_darwin.c @@ -76,13 +76,22 @@ int pages_swapped(void) { swapped_pages = 0; for (address = 0;; address += size) { + kern_return_t ret = KERN_FAILURE; + /* Get memory region. */ count = VM_REGION_EXTENDED_INFO_COUNT; -#if defined(__ppc64__) || defined(__x86_64__) - if (vm_region_64(tasks[j], &address, &size, VM_REGION_EXTENDED_INFO, &info, &count, &object_name) != KERN_SUCCESS) { +#ifdef HAVE_VM_REGION_64 + ret = vm_region_64(tasks[j], &address, &size, + VM_REGION_EXTENDED_INFO, (void *)&info, &count, + &object_name); +#elif defined(HAVE_VM_REGION) + ret = vm_region(tasks[j], &address, &size, + VM_REGION_EXTENDED_INFO, (void *)&info, &count, + &object_name); #else - if (vm_region(tasks[j], &address, &size, VM_REGION_EXTENDED_INFO, &info, &count, &object_name) != KERN_SUCCESS) { +#error How to query memory protection information? #endif + if (ret != KERN_SUCCESS) { /* No more memory regions. */ break; } diff --git a/agent/mibgroup/hardware/memory/memory_freebsd.c b/agent/mibgroup/hardware/memory/memory_freebsd.c index 8d18698..f5edff3 100644 --- a/agent/mibgroup/hardware/memory/memory_freebsd.c +++ b/agent/mibgroup/hardware/memory/memory_freebsd.c @@ -3,6 +3,7 @@ #include #include #include +#include "../../../kernel.h" #include #include @@ -11,7 +12,7 @@ #include #include -#if HAVE_SYS_VMPARAM_H +#ifdef HAVE_SYS_VMPARAM_H #include #else #include @@ -238,8 +239,6 @@ swapmode(long pagesize) #include -extern kvm_t *kd; - static int swapmode(long pagesize) { diff --git a/agent/mibgroup/hardware/memory/memory_irix.c b/agent/mibgroup/hardware/memory/memory_irix.c index 377f007..a396e00 100644 --- a/agent/mibgroup/hardware/memory/memory_irix.c +++ b/agent/mibgroup/hardware/memory/memory_irix.c @@ -3,15 +3,15 @@ #include #include -#if HAVE_SYS_SWAP_H +#ifdef HAVE_SYS_SWAP_H #include #endif -#if HAVE_SYS_SYSGET_H +#ifdef HAVE_SYS_SYSGET_H #include #endif -#if HAVE_SYS_SYSMP_H +#ifdef HAVE_SYS_SYSMP_H #include #endif diff --git a/agent/mibgroup/hardware/memory/memory_linux.c b/agent/mibgroup/hardware/memory/memory_linux.c index 8c189c5..4ae235c 100644 --- a/agent/mibgroup/hardware/memory/memory_linux.c +++ b/agent/mibgroup/hardware/memory/memory_linux.c @@ -9,13 +9,9 @@ /* * Try to use an initial size that will cover default cases. We aren't talking * about huge files, so why fiddle about with reallocs? - * I checked /proc/meminfo sizes on 3 different systems: 598, 644, 654 - * - * On newer systems, the size is up to around 930 (2.6.27 kernel) - * or 1160 (2.6.28 kernel) */ -#define MEMINFO_INIT_SIZE 1279 -#define MEMINFO_STEP_SIZE 256 +#define MEMINFO_INIT_SIZE 4096 +#define MEMINFO_STEP_SIZE 4096 #define MEMINFO_FILE "/proc/meminfo" /* @@ -28,8 +24,9 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) { static int first = 1; ssize_t bytes_read; char *b; - unsigned long memtotal = 0, memfree = 0, memshared = 0, - buffers = 0, cached = 0, + int have_memavail = 0; + unsigned long memtotal = 0, memavail = 0, memfree = 0, memshared = 0, + buffers = 0, cached = 0, sreclaimable = 0, swaptotal = 0, swapfree = 0; netsnmp_memory_info *mem; @@ -70,6 +67,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) { close(statfd); if (bytes_read <= 0) { snmp_log_perror(MEMINFO_FILE); + buff[0] = '\0'; } else { buff[bytes_read] = '\0'; } @@ -84,6 +82,11 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) { if (first) snmp_log(LOG_ERR, "No MemTotal line in /proc/meminfo\n"); } + b = strstr(buff, "MemAvailable: "); + if (b) { + have_memavail = 1; + sscanf(b, "MemAvailable: %lu", &memavail); + } b = strstr(buff, "MemFree: "); if (b) sscanf(b, "MemFree: %lu", &memfree); @@ -133,6 +136,9 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) { if (first) snmp_log(LOG_ERR, "No SwapFree line in /proc/meminfo\n"); } + b = strstr(buff, "SReclaimable: "); + if (b) + sscanf(b, "SReclaimable: %lu", &sreclaimable); first = 0; @@ -151,6 +157,18 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) { mem->other = -1; } + if (have_memavail) { + mem = netsnmp_memory_get_byIdx(NETSNMP_MEM_TYPE_AVAILMEM, 1); + if (mem) { + if (!mem->descr) + mem->descr = strdup("Available memory"); + mem->units = 1024; + mem->size = memavail; + mem->free = memavail; + mem->other = -1; + } + } + mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_VIRTMEM, 1 ); if (!mem) { snmp_log_perror("No Virtual Memory info entry"); @@ -182,7 +200,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void *magic ) { if (!mem->descr) mem->descr = strdup("Cached memory"); mem->units = 1024; - mem->size = cached; + mem->size = cached + sreclaimable; mem->free = 0; /* Report cached size/used as equal */ mem->other = -1; } diff --git a/agent/mibgroup/hardware/memory/memory_linux.h b/agent/mibgroup/hardware/memory/memory_linux.h index 1b59cfb..a7b8d6a 100644 --- a/agent/mibgroup/hardware/memory/memory_linux.h +++ b/agent/mibgroup/hardware/memory/memory_linux.h @@ -1 +1 @@ -config_require(hardware/memory/hw_mem) +config_require(hardware/memory/hw_mem); diff --git a/agent/mibgroup/hardware/memory/memory_netbsd.c b/agent/mibgroup/hardware/memory/memory_netbsd.c index 68cd209..f6cb3f7 100644 --- a/agent/mibgroup/hardware/memory/memory_netbsd.c +++ b/agent/mibgroup/hardware/memory/memory_netbsd.c @@ -6,7 +6,7 @@ #include #include #include -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #include #endif #include diff --git a/agent/mibgroup/hardware/sensors.h b/agent/mibgroup/hardware/sensors.h index b88d915..e7a4ac7 100644 --- a/agent/mibgroup/hardware/sensors.h +++ b/agent/mibgroup/hardware/sensors.h @@ -1,16 +1,16 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); #if defined(solaris2) # if defined(HAVE_PICL_H) -config_require(hardware/sensors/picld_sensors) +config_require(hardware/sensors/picld_sensors); # else -config_require(hardware/sensors/kstat_sensors) +config_require(hardware/sensors/kstat_sensors); # endif #else # if defined(NETSNMP_USE_SENSORS_V3) -config_require(hardware/sensors/lmsensors_v3) +config_require(hardware/sensors/lmsensors_v3); # else -config_require(hardware/sensors/lmsensors_v2) +config_require(hardware/sensors/lmsensors_v2); # endif #endif diff --git a/agent/mibgroup/hardware/sensors/dummy_sensors.c b/agent/mibgroup/hardware/sensors/dummy_sensors.c index 8d2555d..3c18fd2 100644 --- a/agent/mibgroup/hardware/sensors/dummy_sensors.c +++ b/agent/mibgroup/hardware/sensors/dummy_sensors.c @@ -2,6 +2,7 @@ #include #include #include +#include "hw_sensors_private.h" void netsnmp_sensor_arch_init( void ) { diff --git a/agent/mibgroup/hardware/sensors/dummy_sensors.h b/agent/mibgroup/hardware/sensors/dummy_sensors.h index b5ffb4d..3167627 100644 --- a/agent/mibgroup/hardware/sensors/dummy_sensors.h +++ b/agent/mibgroup/hardware/sensors/dummy_sensors.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/agent/mibgroup/hardware/sensors/hw_sensors.c b/agent/mibgroup/hardware/sensors/hw_sensors.c index 1a01645..2b69948 100644 --- a/agent/mibgroup/hardware/sensors/hw_sensors.c +++ b/agent/mibgroup/hardware/sensors/hw_sensors.c @@ -2,10 +2,9 @@ #include #include #include +#include "hw_sensors_private.h" -extern NetsnmpCacheLoad netsnmp_sensor_arch_load; -extern void netsnmp_sensor_arch_init( void ); static int _sensor_load( void ); static void _sensor_free( void ); @@ -168,7 +167,7 @@ sensor_by_name( const char *name, int create_type ) free(sp); return NULL; } - strcpy( sp->name, name ); + strlcpy(sp->name, name, sizeof(sp->name)); sp->type = create_type; /* * Set up the index value. diff --git a/agent/mibgroup/hardware/sensors/hw_sensors_private.h b/agent/mibgroup/hardware/sensors/hw_sensors_private.h new file mode 100644 index 0000000..1c3b7f0 --- /dev/null +++ b/agent/mibgroup/hardware/sensors/hw_sensors_private.h @@ -0,0 +1,2 @@ +NetsnmpCacheLoad netsnmp_sensor_arch_load; +void netsnmp_sensor_arch_init(void); diff --git a/agent/mibgroup/hardware/sensors/kstat_sensors.c b/agent/mibgroup/hardware/sensors/kstat_sensors.c index 62bbb10..662ce86 100644 --- a/agent/mibgroup/hardware/sensors/kstat_sensors.c +++ b/agent/mibgroup/hardware/sensors/kstat_sensors.c @@ -2,6 +2,7 @@ #include #include #include +#include "hw_sensors_private.h" #include diff --git a/agent/mibgroup/hardware/sensors/kstat_sensors.h b/agent/mibgroup/hardware/sensors/kstat_sensors.h index b5ffb4d..3167627 100644 --- a/agent/mibgroup/hardware/sensors/kstat_sensors.h +++ b/agent/mibgroup/hardware/sensors/kstat_sensors.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/agent/mibgroup/hardware/sensors/lmsensors_v2.c b/agent/mibgroup/hardware/sensors/lmsensors_v2.c index a63f140..638855c 100644 --- a/agent/mibgroup/hardware/sensors/lmsensors_v2.c +++ b/agent/mibgroup/hardware/sensors/lmsensors_v2.c @@ -2,6 +2,7 @@ #include #include #include +#include "hw_sensors_private.h" #include #include diff --git a/agent/mibgroup/hardware/sensors/lmsensors_v2.h b/agent/mibgroup/hardware/sensors/lmsensors_v2.h index b5ffb4d..3167627 100644 --- a/agent/mibgroup/hardware/sensors/lmsensors_v2.h +++ b/agent/mibgroup/hardware/sensors/lmsensors_v2.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/agent/mibgroup/hardware/sensors/lmsensors_v3.c b/agent/mibgroup/hardware/sensors/lmsensors_v3.c index e34da19..02f7413 100644 --- a/agent/mibgroup/hardware/sensors/lmsensors_v3.c +++ b/agent/mibgroup/hardware/sensors/lmsensors_v3.c @@ -2,6 +2,7 @@ #include #include #include +#include "hw_sensors_private.h" #include #include @@ -86,7 +87,28 @@ netsnmp_sensor_arch_load(netsnmp_cache *cache, void *vp) { * (inserting it in the appropriate sub-containers) */ sp = sensor_by_name( label, type ); - if ( sp ) { + if ( sp && sp->flags & NETSNMP_SENSOR_FLAG_ACTIVE) { + /* + * Some HW does not have unique sensors labels. + * We already have a sensor with this label, thus + * try to create unique label by adding chip-name prefix + * and try again. + */ + char chip_name[64]; + char new_label[128]; + int ret; + DEBUGMSGTL(("sensors:arch:detail", "Already know label %s, adding prefix\n", label)); + ret = sensors_snprintf_chip_name(chip_name, sizeof(chip_name), chip); + if (ret < 0) { + DEBUGMSGTL(("sensors:arch:detail", "Can't get chip name for label %s\n", label)); + free(label); + continue; + } + snprintf(new_label, sizeof(new_label), "%s:%s", chip_name, label); + DEBUGMSGTL(("sensors:arch:detail", "New label: %s\n", new_label)); + sp = sensor_by_name( new_label, type ); + } + if (sp) { sp->value = val; sp->flags|= NETSNMP_SENSOR_FLAG_ACTIVE; } diff --git a/agent/mibgroup/hardware/sensors/lmsensors_v3.h b/agent/mibgroup/hardware/sensors/lmsensors_v3.h index b5ffb4d..3167627 100644 --- a/agent/mibgroup/hardware/sensors/lmsensors_v3.h +++ b/agent/mibgroup/hardware/sensors/lmsensors_v3.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/agent/mibgroup/hardware/sensors/picld_sensors.c b/agent/mibgroup/hardware/sensors/picld_sensors.c index a4617b2..82ca656 100644 --- a/agent/mibgroup/hardware/sensors/picld_sensors.c +++ b/agent/mibgroup/hardware/sensors/picld_sensors.c @@ -2,6 +2,7 @@ #include #include #include +#include "hw_sensors_private.h" #include diff --git a/agent/mibgroup/hardware/sensors/picld_sensors.h b/agent/mibgroup/hardware/sensors/picld_sensors.h index b5ffb4d..3167627 100644 --- a/agent/mibgroup/hardware/sensors/picld_sensors.h +++ b/agent/mibgroup/hardware/sensors/picld_sensors.h @@ -1 +1 @@ -config_require(hardware/sensors/hw_sensors) +config_require(hardware/sensors/hw_sensors); diff --git a/agent/mibgroup/header_complex.c b/agent/mibgroup/header_complex.c index d34d906..1e53b77 100644 --- a/agent/mibgroup/header_complex.c +++ b/agent/mibgroup/header_complex.c @@ -5,10 +5,10 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -20,10 +20,10 @@ #include -netsnmp_feature_child_of(header_complex_all, libnetsnmpmibs) +netsnmp_feature_child_of(header_complex_all, libnetsnmpmibs); -netsnmp_feature_child_of(header_complex_free_all, header_complex_all) -netsnmp_feature_child_of(header_complex_find_entry, header_complex_all) +netsnmp_feature_child_of(header_complex_free_all, header_complex_all); +netsnmp_feature_child_of(header_complex_find_entry, header_complex_all); int header_complex_generate_varoid(netsnmp_variable_list * var) @@ -569,7 +569,7 @@ header_complex_dump(struct header_complex_index *thestuff) } } -main() +int main(void) { oid oidsave[MAX_OID_LEN]; int len = MAX_OID_LEN, len2; diff --git a/agent/mibgroup/host.h b/agent/mibgroup/host.h index e8e6558..b28cad4 100644 --- a/agent/mibgroup/host.h +++ b/agent/mibgroup/host.h @@ -13,24 +13,24 @@ * distributed with the Net-SNMP package. */ - config_require(host/hr_system) - config_require(host/hr_device) - config_require(host/hr_other) - config_require(host/hr_proc) - config_require(host/hr_network) - config_require(host/hr_print) - config_require(host/hr_disk) - config_require(host/hr_partition) + config_require(host/hr_system); + config_require(host/hr_device); + config_require(host/hr_other); + config_require(host/hr_proc); + config_require(host/hr_network); + config_require(host/hr_print); + config_require(host/hr_disk); + config_require(host/hr_partition); - config_version_require((host/hr_storage, 5.7, host/hrh_storage)) - config_version_require((host/hr_filesys, 5.7, host/hrh_filesys)) + config_version_require((host/hr_storage, 5.7, host/hrh_storage)); + config_version_require((host/hr_filesys, 5.7, host/hrh_filesys)); - config_version_require((host/hr_swinst, 5.6, host/hrSWInstalledTable)) - config_version_require((host/hr_swrun, 5.6, host/hrSWRunTable)) + config_version_require((host/hr_swinst, 5.6, host/hrSWInstalledTable)); + config_version_require((host/hr_swrun, 5.6, host/hrSWRunTable)); /* add the host resources mib to the default mibs to load */ -config_add_mib(HOST-RESOURCES-MIB) -config_add_mib(HOST-RESOURCES-TYPES) +config_add_mib(HOST-RESOURCES-MIB); +config_add_mib(HOST-RESOURCES-TYPES); /********************************************* * diff --git a/agent/mibgroup/host/data_access/swinst.c b/agent/mibgroup/host/data_access/swinst.c index 3ef05e9..f6370a2 100644 --- a/agent/mibgroup/host/data_access/swinst.c +++ b/agent/mibgroup/host/data_access/swinst.c @@ -11,23 +11,20 @@ #include #include #include - #include #include +#include "swinst.h" +#include "swinst_private.h" -netsnmp_feature_child_of(software_installed, libnetsnmpmibs) +netsnmp_feature_child_of(software_installed, libnetsnmpmibs); -netsnmp_feature_child_of(swinst_entry_remove, netsnmp_unused) +netsnmp_feature_child_of(swinst_entry_remove, netsnmp_unused); /* --------------------------------------------------------------------- */ static void netsnmp_swinst_entry_free_cb(netsnmp_swinst_entry *, void *); -extern void netsnmp_swinst_arch_init(void); -extern void netsnmp_swinst_arch_shutdown(void); -extern int netsnmp_swinst_arch_load(netsnmp_container *, u_int); - void init_swinst( void ) { static int initialized = 0; diff --git a/agent/mibgroup/host/data_access/swinst.h b/agent/mibgroup/host/data_access/swinst.h index bda3e47..1b10d76 100644 --- a/agent/mibgroup/host/data_access/swinst.h +++ b/agent/mibgroup/host/data_access/swinst.h @@ -14,22 +14,22 @@ /* * all platforms use this generic code */ -config_exclude(host/hr_swinst) +config_exclude(host/hr_swinst); /* * select the appropriate architecture-specific interface code */ #if defined( darwin ) - config_require(host/data_access/swinst_darwin) + config_require(host/data_access/swinst_darwin); #elif defined( HAVE_DPKG_QUERY ) - config_require(host/data_access/swinst_apt) + config_require(host/data_access/swinst_apt); #elif defined( HAVE_LIBRPM ) && defined( linux ) - config_require(host/data_access/swinst_rpm) + config_require(host/data_access/swinst_rpm); #elif defined( HAVE_PKGLOCS_H ) || defined( hpux9 ) || defined( hpux10 ) || defined( hpux11 ) || defined( freebsd2 ) || defined( linux ) || defined( openbsd ) - config_require(host/data_access/swinst_pkginfo) + config_require(host/data_access/swinst_pkginfo); #else - config_warning(This platform does not yet support hrSWInstalledTable rewrites) - config_require(host/data_access/swinst_null) + config_warning(This platform does not yet support hrSWInstalledTable rewrites); + config_require(host/data_access/swinst_null); #endif void init_swinst( void ); diff --git a/agent/mibgroup/host/data_access/swinst_apt.c b/agent/mibgroup/host/data_access/swinst_apt.c index c7606d2..2a04206 100644 --- a/agent/mibgroup/host/data_access/swinst_apt.c +++ b/agent/mibgroup/host/data_access/swinst_apt.c @@ -22,15 +22,20 @@ #ifdef HAVE_FCNTL_H #include #endif +#include #include #include #include #include #include +#include "swinst_private.h" + +config_require(date_n_time); char pkg_directory[SNMP_MAXBUF]; static char apt_fmt[SNMP_MAXBUF]; +static char file[SNMP_MAXBUF]; /* --------------------------------------------------------------------- */ @@ -38,8 +43,8 @@ void netsnmp_swinst_arch_init(void) { strlcpy(pkg_directory, "/var/lib/dpkg/info", sizeof(pkg_directory)); - snprintf(apt_fmt, SNMP_MAXBUF, "%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%ds", - SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1, + snprintf(apt_fmt, SNMP_MAXBUF, "%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%d[^#]#%%%ds", + SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1, SNMP_MAXBUF-1); } @@ -55,16 +60,20 @@ netsnmp_swinst_arch_shutdown(void) int netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) { - FILE *p = popen("dpkg-query --show --showformat '${Package}#${Version}#${Section}#${Priority}#${Essential}#${Status}\n'", "r"); + FILE *p = popen("dpkg-query --show --showformat '${Package}#${Version}#${Section}#${Priority}#${Essential}#${Architecture}#${Status}\n'", "r"); char package[SNMP_MAXBUF]; char version[SNMP_MAXBUF]; char section[SNMP_MAXBUF]; char priority[SNMP_MAXBUF]; char essential[SNMP_MAXBUF]; + char arch[SNMP_MAXBUF]; char status[SNMP_MAXBUF]; char buf[BUFSIZ]; + struct stat stat_buf; netsnmp_swinst_entry *entry; - int i = 0; + u_char *date_buf; + size_t date_len; + int i = 1; if (p == NULL) { snmp_perror("dpkg-list"); @@ -78,20 +87,39 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) continue; /* error already logged by function */ CONTAINER_INSERT(container, entry); - sscanf(buf, apt_fmt, package, version, section, priority, essential, status); + sscanf(buf, apt_fmt, package, version, section, priority, essential, arch, status); if (strstr(status, "not-installed")) continue; entry->swName_len = snprintf( entry->swName, sizeof(entry->swName), - "%s-%s", package, version); + "%s_%s_%s", package, version, arch); if (entry->swName_len >= sizeof(entry->swName)) entry->swName_len = sizeof(entry->swName)-1; entry->swType = (strcmp(essential, "yes") == 0) ? 2 /* operatingSystem */ : 4; /* application */ + /* get the last mod date */ + snprintf(file, sizeof(file), "%s/%s.list", pkg_directory, package); + if(stat(file, &stat_buf) != -1) { + date_buf = date_n_time(&stat_buf.st_mtime, &date_len); + entry->swDate_len = date_len; + memcpy(entry->swDate, date_buf, entry->swDate_len); + } else { + /* somewhy some files include :arch in .list name */ + snprintf(file, sizeof(file), "%s/%s:%s.list", pkg_directory, package, arch); + if(stat(file, &stat_buf) != -1) { + date_buf = date_n_time(&stat_buf.st_mtime, &date_len); + entry->swDate_len = date_len; + memcpy(entry->swDate, date_buf, entry->swDate_len); + } + } + /* FIXME, or fallback to whatever nonsesnse was here before, or leave it uninitialied? + else { entry->swDate_len = 8; memcpy(entry->swDate, "\0\0\1\1\0\0\0\0", 8); + } + */ } pclose(p); DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n", diff --git a/agent/mibgroup/host/data_access/swinst_darwin.c b/agent/mibgroup/host/data_access/swinst_darwin.c index 7a47372..53bd3c8 100644 --- a/agent/mibgroup/host/data_access/swinst_darwin.c +++ b/agent/mibgroup/host/data_access/swinst_darwin.c @@ -14,6 +14,7 @@ #include #include #include +#include "swinst_private.h" #include #include @@ -27,8 +28,8 @@ #include #include -netsnmp_feature_require(container_directory) -netsnmp_feature_require(date_n_time) +netsnmp_feature_require(container_directory); +netsnmp_feature_require(date_n_time); /* --------------------------------------------------------------------- */ diff --git a/agent/mibgroup/host/data_access/swinst_null.c b/agent/mibgroup/host/data_access/swinst_null.c index e4f9158..fd1c922 100644 --- a/agent/mibgroup/host/data_access/swinst_null.c +++ b/agent/mibgroup/host/data_access/swinst_null.c @@ -21,6 +21,7 @@ #include #include #include +#include "swinst_private.h" /* --------------------------------------------------------------------- */ diff --git a/agent/mibgroup/host/data_access/swinst_pkginfo.c b/agent/mibgroup/host/data_access/swinst_pkginfo.c index a122cb1..ee961c4 100644 --- a/agent/mibgroup/host/data_access/swinst_pkginfo.c +++ b/agent/mibgroup/host/data_access/swinst_pkginfo.c @@ -42,8 +42,9 @@ #include #include #include +#include "swinst_private.h" -netsnmp_feature_require(date_n_time) +netsnmp_feature_require(date_n_time); /* * Location of package directory. @@ -181,18 +182,20 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) CONTAINER_INSERT(container, entry); #ifdef HAVE_PKGINFO - v = pkgparam( dp->d_name, "VERSION" ); - c = pkgparam( dp->d_name, "CATEGORY" ); + v = pkgparam( dp->d_name, NETSNMP_REMOVE_CONST(char *, "VERSION") ); + c = pkgparam( dp->d_name, NETSNMP_REMOVE_CONST(char *, "CATEGORY") ); entry->swName_len = snprintf( entry->swName, sizeof(entry->swName), "%s-%s", dp->d_name, v ); if (entry->swName_len >= sizeof(entry->swName)) entry->swName_len = sizeof(entry->swName)-1; - entry->swType = (NULL != strstr( c, "system")) + entry->swType = (c && (NULL != strstr( c, "system"))) ? 2 /* operatingSystem */ : 4; /* application */ - /* Do we need to free 'v' & 'c' ??? */ + /* pkgparam() return values must be freed. */ + free(c); + free(v); #else entry->swName_len = snprintf( entry->swName, sizeof(entry->swName), "%s", dp->d_name ); diff --git a/agent/mibgroup/host/data_access/swinst_private.h b/agent/mibgroup/host/data_access/swinst_private.h new file mode 100644 index 0000000..e0a372a --- /dev/null +++ b/agent/mibgroup/host/data_access/swinst_private.h @@ -0,0 +1,3 @@ +void netsnmp_swinst_arch_init(void); +void netsnmp_swinst_arch_shutdown(void); +int netsnmp_swinst_arch_load(struct netsnmp_container_s *, u_int); diff --git a/agent/mibgroup/host/data_access/swinst_rpm.c b/agent/mibgroup/host/data_access/swinst_rpm.c index 71595be..2125301 100644 --- a/agent/mibgroup/host/data_access/swinst_rpm.c +++ b/agent/mibgroup/host/data_access/swinst_rpm.c @@ -43,8 +43,9 @@ #include #include #include +#include "swinst_private.h" -netsnmp_feature_require(date_n_time) +netsnmp_feature_require(date_n_time); /* * Location of RPM package directory. @@ -75,7 +76,7 @@ netsnmp_swinst_arch_init(void) SNMP_FREE(rpmdbpath); dbpath = NULL; if (-1 == stat( pkg_directory, &stat_buf )) { - snmp_log(LOG_ERR, "Can't find directory of RPM packages"); + snmp_log(LOG_ERR, "Can't find directory of RPM packages\n"); pkg_directory[0] = '\0'; } } @@ -96,13 +97,25 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) rpmdbMatchIterator mi; Header h; +#ifdef HAVE_HEADERGET + const char *g; + rpmtd td_name, td_version, td_release, td_group, td_time; +#else char *n, *v, *r, *g; int32_t *t; +#endif time_t install_time; size_t date_len; int i = 1; netsnmp_swinst_entry *entry; +#ifdef HAVE_HEADERGET + td_name = rpmtdNew(); + td_version = rpmtdNew(); + td_release = rpmtdNew(); + td_group = rpmtdNew(); + td_time = rpmtdNew(); +#endif ts = rpmtsCreate(); rpmtsSetVSFlags( ts, (_RPMVSF_NOSIGNATURES|_RPMVSF_NODIGESTS)); @@ -113,27 +126,41 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) while (NULL != (h = rpmdbNextIterator( mi ))) { const u_char *dt; + entry = netsnmp_swinst_entry_create( i++ ); if (NULL == entry) continue; /* error already logged by function */ CONTAINER_INSERT(container, entry); h = headerLink( h ); +#ifdef HAVE_HEADERGET + headerGet(h, RPMTAG_NAME, td_name, HEADERGET_EXT); + headerGet(h, RPMTAG_VERSION, td_version, HEADERGET_EXT); + headerGet(h, RPMTAG_RELEASE, td_release, HEADERGET_EXT); + headerGet(h, RPMTAG_GROUP, td_group, HEADERGET_EXT); + headerGet(h, RPMTAG_INSTALLTIME, td_time, HEADERGET_EXT); + entry->swName_len = snprintf( entry->swName, sizeof(entry->swName), + "%s-%s-%s", rpmtdGetString(td_name), + rpmtdGetString(td_version), + rpmtdGetString(td_release)); + install_time = rpmtdGetNumber(td_time); + g = rpmtdGetString(td_group); +#else headerGetEntry( h, RPMTAG_NAME, NULL, (void**)&n, NULL); headerGetEntry( h, RPMTAG_VERSION, NULL, (void**)&v, NULL); headerGetEntry( h, RPMTAG_RELEASE, NULL, (void**)&r, NULL); headerGetEntry( h, RPMTAG_GROUP, NULL, (void**)&g, NULL); headerGetEntry( h, RPMTAG_INSTALLTIME, NULL, (void**)&t, NULL); - entry->swName_len = snprintf( entry->swName, sizeof(entry->swName), "%s-%s-%s", n, v, r); - if (entry->swName_len > sizeof(entry->swName)) - entry->swName_len = sizeof(entry->swName); - entry->swType = (NULL != strstr( g, "System Environment")) + install_time = *t; +#endif + entry->swType = (g && NULL != strstr( g, "System Environment")) ? 2 /* operatingSystem */ : 4; /* application */ + if (entry->swName_len > sizeof(entry->swName)) + entry->swName_len = sizeof(entry->swName); - install_time = *t; dt = date_n_time( &install_time, &date_len ); if (date_len != 8 && date_len != 11) { snmp_log(LOG_ERR, "Bogus length from date_n_time for %s", entry->swName); @@ -144,10 +171,24 @@ netsnmp_swinst_arch_load( netsnmp_container *container, u_int flags) memcpy(entry->swDate, dt, entry->swDate_len); } +#ifdef HAVE_HEADERGET + rpmtdFreeData(td_name); + rpmtdFreeData(td_version); + rpmtdFreeData(td_release); + rpmtdFreeData(td_group); + rpmtdFreeData(td_time); +#endif headerFree( h ); } rpmdbFreeIterator( mi ); rpmtsFree( ts ); +#ifdef HAVE_HEADERGET + rpmtdFree(td_name); + rpmtdFree(td_version); + rpmtdFree(td_release); + rpmtdFree(td_group); + rpmtdFree(td_time); +#endif DEBUGMSGTL(("swinst:load:arch", "loaded %d entries\n", (int)CONTAINER_SIZE(container))); diff --git a/agent/mibgroup/host/data_access/swrun.c b/agent/mibgroup/host/data_access/swrun.c index d18ea5f..f58143a 100644 --- a/agent/mibgroup/host/data_access/swrun.c +++ b/agent/mibgroup/host/data_access/swrun.c @@ -14,11 +14,18 @@ #include #include +#include "swrun.h" +#include "swrun_private.h" -netsnmp_feature_child_of(software_running, libnetsnmpmibs) +#ifdef HAVE_PCRE_H +#include +#endif + +netsnmp_feature_child_of(software_running, libnetsnmpmibs); -netsnmp_feature_child_of(swrun_max_processes, software_running) -netsnmp_feature_child_of(swrun_count_processes_by_name, software_running) +netsnmp_feature_child_of(swrun_max_processes, software_running); +netsnmp_feature_child_of(swrun_count_processes_by_name, software_running); +netsnmp_feature_child_of(swrun_count_processes_by_regex, software_running); /**---------------------------------------------------------------------*/ /* @@ -29,26 +36,12 @@ static int _swrun_init = 0; static netsnmp_cache *swrun_cache = NULL; static netsnmp_container *swrun_container = NULL; -netsnmp_container * netsnmp_swrun_container(void); -netsnmp_cache * netsnmp_swrun_cache (void); - /* * local static prototypes */ static void _swrun_entry_release(netsnmp_swrun_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern void netsnmp_arch_swrun_init(void); -extern int netsnmp_arch_swrun_container_load(netsnmp_container* container, - u_int load_flags); - /** * initialization */ @@ -75,10 +68,27 @@ shutdown_swrun(void) } int -swrun_count_processes( void ) +swrun_count_processes(int include_kthreads) { + netsnmp_swrun_entry *entry; + netsnmp_iterator *it; + int i = 0; + netsnmp_cache_check_and_reload(swrun_cache); - return ( swrun_container ? CONTAINER_SIZE(swrun_container) : 0 ); + if ( !swrun_container ) + return 0; /* or -1 */ + + if (include_kthreads) + return ( swrun_container ? CONTAINER_SIZE(swrun_container) : 0 ); + + it = CONTAINER_ITERATOR( swrun_container ); + while ((entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) != NULL) { + if (4 == entry->hrSWRunType) + i++; + } + ITERATOR_RELEASE( it ); + + return i; } #ifndef NETSNMP_FEATURE_REMOVE_SWRUN_MAX_PROCESSES @@ -89,6 +99,38 @@ swrun_max_processes( void ) } #endif /* NETSNMP_FEATURE_REMOVE_SWRUN_MAX_PROCESSES */ +#ifndef NETSNMP_FEATURE_REMOVE_SWRUN_COUNT_PROCESSES_BY_REGEX +#ifdef HAVE_PCRE_H +int +swrun_count_processes_by_regex( char *name, netsnmp_regex_ptr regexp ) +{ + netsnmp_swrun_entry *entry; + netsnmp_iterator *it; + int i = 0; + int found_ndx[30]; + int found; + char fullCommand[64 + 128 + 128 + 3]; + + netsnmp_cache_check_and_reload(swrun_cache); + if ( !swrun_container || !name || !regexp.regex_ptr ) + return 0; /* or -1 */ + + it = CONTAINER_ITERATOR( swrun_container ); + while ((entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) != NULL) { + /* need to assemble full command back so regexps can get full picture */ + sprintf(fullCommand, "%s %s", entry->hrSWRunPath, entry->hrSWRunParameters); + found = pcre_exec(regexp.regex_ptr, NULL, fullCommand, strlen(fullCommand), 0, 0, found_ndx, 30); + if (found > 0) { + i++; + } + } + ITERATOR_RELEASE( it ); + + return i; +} +#endif /* HAVE_PCRE_H */ +#endif /* NETSNMP_FEATURE_REMOVE_SWRUN_COUNT_PROCESSES_BY_REGEX */ + #ifndef NETSNMP_FEATURE_REMOVE_SWRUN_COUNT_PROCESSES_BY_NAME int swrun_count_processes_by_name( char *name ) diff --git a/agent/mibgroup/host/data_access/swrun.h b/agent/mibgroup/host/data_access/swrun.h index 2ae53f5..d048cf8 100644 --- a/agent/mibgroup/host/data_access/swrun.h +++ b/agent/mibgroup/host/data_access/swrun.h @@ -14,35 +14,35 @@ /* * all platforms use this generic code */ -config_require(host/data_access/swrun) -config_exclude(host/hr_swrun) +config_require(host/data_access/swrun); +config_exclude(host/hr_swrun); /* * select the appropriate architecture-specific interface code */ #if defined( darwin ) - config_require(host/data_access/swrun_darwin) + config_require(host/data_access/swrun_darwin); #elif defined( HAVE_SYS_PSTAT_H ) - config_require(host/data_access/swrun_pstat) + config_require(host/data_access/swrun_pstat); #elif defined( dynix ) - config_require(host/data_access/swrun_prpsinfo) + config_require(host/data_access/swrun_prpsinfo); #elif defined( solaris2 ) # if _SLASH_PROC_METHOD_ - config_require(host/data_access/swrun_procfs_psinfo) + config_require(host/data_access/swrun_procfs_psinfo); # else - config_require(host/data_access/swrun_kvm_proc) + config_require(host/data_access/swrun_kvm_proc); # endif #elif defined( aix4 ) || defined( aix5 ) || defined( aix6 ) || defined( aix7 ) - config_require(host/data_access/swrun_procinfo) -#elif HAVE_KVM_GETPROCS - config_require(host/data_access/swrun_kinfo) + config_require(host/data_access/swrun_procinfo); +#elif defined(HAVE_KVM_GETPROCS) + config_require(host/data_access/swrun_kinfo); #elif defined( linux ) - config_require(host/data_access/swrun_procfs_status) + config_require(host/data_access/swrun_procfs_status); #elif defined( cygwin ) - config_require(host/data_access/swrun_cygwin) + config_require(host/data_access/swrun_cygwin); #else - config_warning(This platform does not yet support hrSWRunTable rewrites) - config_require(host/data_access/swrun_null) + config_warning(This platform does not yet support hrSWRunTable rewrites); + config_require(host/data_access/swrun_null); #endif void init_swrun(void); diff --git a/agent/mibgroup/host/data_access/swrun_cygwin.c b/agent/mibgroup/host/data_access/swrun_cygwin.c index a1e1475..c4629c0 100644 --- a/agent/mibgroup/host/data_access/swrun_cygwin.c +++ b/agent/mibgroup/host/data_access/swrun_cygwin.c @@ -27,6 +27,7 @@ #include #include #include +#include "swrun_private.h" /* * a lot of this is "stolen" from cygwin ps.cc @@ -122,7 +123,6 @@ to_msec(PFILETIME ptr) return x; } -OSVERSIONINFO ver; HMODULE h; /* --------------------------------------------------------------------- @@ -130,27 +130,18 @@ HMODULE h; void netsnmp_arch_swrun_init(void) { - memset(&ver, 0, sizeof ver); - ver.dwOSVersionInfoSize = sizeof ver; - GetVersionEx(&ver); - - if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { - h = LoadLibrary("psapi.dll"); - if (h) { - myEnumProcessModules = (ENUMPROCESSMODULES) - GetProcAddress(h, "EnumProcessModules"); - myGetModuleFileNameEx = (GETMODULEFILENAME) - GetProcAddress(h, "GetModuleFileNameExA"); - myGetProcessMemoryInfo = (GETPROCESSMEMORYINFO) - GetProcAddress(h, "GetProcessMemoryInfo"); - if (myEnumProcessModules && myGetModuleFileNameEx) - query = CW_GETPINFO_FULL; - else - snmp_log(LOG_ERR, "hr_swrun failed NT init\n"); - } else - snmp_log(LOG_ERR, "hr_swrun failed to load psapi.dll\n"); - } else { - h = GetModuleHandle("KERNEL32.DLL"); + if ((h = LoadLibrary("psapi.dll")) != NULL) { + myEnumProcessModules = (ENUMPROCESSMODULES) + GetProcAddress(h, "EnumProcessModules"); + myGetModuleFileNameEx = (GETMODULEFILENAME) + GetProcAddress(h, "GetModuleFileNameExA"); + myGetProcessMemoryInfo = (GETPROCESSMEMORYINFO) + GetProcAddress(h, "GetProcessMemoryInfo"); + if (myEnumProcessModules && myGetModuleFileNameEx) + query = CW_GETPINFO_FULL; + else + snmp_log(LOG_ERR, "hr_swrun failed NT init\n"); + } elif ((h = GetModuleHandle("KERNEL32.DLL")) != NULL) { myCreateToolhelp32Snapshot = (CREATESNAPSHOT) GetProcAddress(h, "CreateToolhelp32Snapshot"); myProcess32First = (PROCESSWALK) GetProcAddress(h, "Process32First"); @@ -161,7 +152,7 @@ netsnmp_arch_swrun_init(void) && myProcess32Next) #if 0 /* - * This doesn't work after all on Win98 SE + * This doesn't work at all on Win98 SE */ query = CW_GETPINFO_FULL; #else @@ -170,7 +161,6 @@ netsnmp_arch_swrun_init(void) else snmp_log(LOG_ERR, "hr_swrun failed non-NT init\n"); } - return; } /* --------------------------------------------------------------------- diff --git a/agent/mibgroup/host/data_access/swrun_darwin.c b/agent/mibgroup/host/data_access/swrun_darwin.c index 3b00fe3..699c74b 100644 --- a/agent/mibgroup/host/data_access/swrun_darwin.c +++ b/agent/mibgroup/host/data_access/swrun_darwin.c @@ -14,6 +14,7 @@ #include #include #include +#include "swrun_private.h" #include #include diff --git a/agent/mibgroup/host/data_access/swrun_kinfo.c b/agent/mibgroup/host/data_access/swrun_kinfo.c index 7cce6e7..e0bba7c 100644 --- a/agent/mibgroup/host/data_access/swrun_kinfo.c +++ b/agent/mibgroup/host/data_access/swrun_kinfo.c @@ -47,9 +47,8 @@ #include #include #include - -extern kvm_t *kd; - +#include "swrun_private.h" +#include "../../../kernel.h" #if defined(freebsd5) && __FreeBSD_version >= 500014 /* @@ -64,7 +63,7 @@ extern kvm_t *kd; #define SWRUN_K_FLAG ki_flag #define SWRUN_K_CLASS ki_pri.pri_class -#elif HAVE_KVM_GETPROC2 || defined(openbsd5) +#elif defined(HAVE_KVM_GETPROC2) || defined(openbsd5) /* * newer NetBSD, OpenBSD kinfo_proc2 field names */ @@ -160,7 +159,7 @@ extern kvm_t *kd; void netsnmp_arch_swrun_init(void) { -#if NETSNMP_CAN_USE_SYSCTL && defined(CTL_KERN) && defined(KERN_MAXPROC) +#if defined(NETSNMP_CAN_USE_SYSCTL) && defined(CTL_KERN) && defined(KERN_MAXPROC) extern int _swrun_max; size_t max_size = sizeof(_swrun_max); int maxproc_mib[] = { CTL_KERN, KERN_MAXPROC }; @@ -188,8 +187,10 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) proc_table = kvm_getprocs(kd, KERN_PROC_KTHREAD, 0, sizeof(struct kinfo_proc), &nprocs ); #elif defined(HAVE_KVM_GETPROC2) proc_table = kvm_getproc2(kd, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc2), &nprocs ); +#elif defined(KERN_PROC_PROC) + proc_table = kvm_getprocs(kd, KERN_PROC_PROC, 0, &nprocs); #else - proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs ); + proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs); #endif for ( i=0 ; ihrSWRunStatus = HRSWRUNSTATUS_NOTRUNNABLE; break; +#ifdef LSDEAD case LSDEAD: +#endif case LSZOMB: entry->hrSWRunStatus = HRSWRUNSTATUS_INVALID; break; default: diff --git a/agent/mibgroup/host/data_access/swrun_kvm_proc.c b/agent/mibgroup/host/data_access/swrun_kvm_proc.c index 7156cf9..180c9ee 100644 --- a/agent/mibgroup/host/data_access/swrun_kvm_proc.c +++ b/agent/mibgroup/host/data_access/swrun_kvm_proc.c @@ -46,6 +46,7 @@ #include #include #include +#include "swrun_private.h" #include "kernel.h" #include "kernel_sunos5.h" @@ -104,7 +105,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) if (NULL == entry) continue; /* error already logged by function */ if (NULL == (proc_buf = kvm_getproc( kd, pid))) { - /* release entry */ + netsnmp_swrun_entry_free(entry); continue; } rc = CONTAINER_INSERT(container, entry); @@ -117,16 +118,18 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) * argv[0] is hrSWRunPath * argv[1..] is hrSWRunParameters */ - for ( cp = proc_buf->p_user.u_psargs; ' ' == *cp; cp++ ) - ; - *cp = '\0'; /* End of argv[0] */ + cp = strchr(proc_buf->p_user.u_psargs, ' '); + if (cp) + *cp = '\0'; /* End of argv[0] */ entry->hrSWRunPath_len = sprintf(entry->hrSWRunPath, "%.*s", (int)sizeof(entry->hrSWRunPath)-1, proc_buf->p_user.u_psargs); - entry->hrSWRunParameters_len = - sprintf(entry->hrSWRunParameters, "%.*s", - (int)sizeof(entry->hrSWRunParameters) - 1, cp + 1); - *cp = ' '; /* Restore u_psargs value */ + if (cp) { + entry->hrSWRunParameters_len = + sprintf(entry->hrSWRunParameters, "%.*s", + (int)sizeof(entry->hrSWRunParameters) - 1, cp + 1); + *cp = ' '; /* Restore u_psargs value */ + } /* * check for system processes diff --git a/agent/mibgroup/host/data_access/swrun_nlist.c b/agent/mibgroup/host/data_access/swrun_nlist.c index 5db6c9c..b727bbd 100644 --- a/agent/mibgroup/host/data_access/swrun_nlist.c +++ b/agent/mibgroup/host/data_access/swrun_nlist.c @@ -23,6 +23,7 @@ #include #include #include +#include "swrun_private.h" /* --------------------------------------------------------------------- */ diff --git a/agent/mibgroup/host/data_access/swrun_null.c b/agent/mibgroup/host/data_access/swrun_null.c index 343d40e..7a512ef 100644 --- a/agent/mibgroup/host/data_access/swrun_null.c +++ b/agent/mibgroup/host/data_access/swrun_null.c @@ -21,6 +21,7 @@ #include #include #include +#include "swrun_private.h" /* --------------------------------------------------------------------- */ @@ -37,7 +38,7 @@ int netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) { /* Nothing to do */ - DEBUGMSGTL(("swrun:load:arch"," loaded %d entries\n", + DEBUGMSGTL(("swrun:load:arch"," loaded %" NETSNMP_PRIz "u entries\n", CONTAINER_SIZE(container))); return 0; diff --git a/agent/mibgroup/host/data_access/swrun_private.h b/agent/mibgroup/host/data_access/swrun_private.h new file mode 100644 index 0000000..4558ae8 --- /dev/null +++ b/agent/mibgroup/host/data_access/swrun_private.h @@ -0,0 +1,3 @@ +extern void netsnmp_arch_swrun_init(void); +extern int netsnmp_arch_swrun_container_load(netsnmp_container* container, + u_int load_flags); diff --git a/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c b/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c index ed961ee..342bf56 100644 --- a/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c +++ b/agent/mibgroup/host/data_access/swrun_procfs_psinfo.c @@ -23,21 +23,21 @@ #include #endif -#define HAVE_SYS_PROCFS_H /* XXX - Needs a configure check! */ -#ifdef HAVE_SYS_PROCFS_H -#define _KERNEL /* For psinfo_t */ -#include -#undef _KERNEL -#endif +#include #ifdef HAVE_SYS_PROC_H #include #endif +#include +#include +#include + #include #include #include #include #include +#include "swrun_private.h" /* --------------------------------------------------------------------- */ @@ -56,7 +56,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) DIR *procdir = NULL; struct dirent *procentry_p; psinfo_t psinfo; - int pid, rc, fd; + int pid, fd; char *cp, buf[512]; netsnmp_swrun_entry *entry; @@ -77,7 +77,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) entry = netsnmp_swrun_entry_create(pid); if (NULL == entry) continue; /* error already logged by function */ - rc = CONTAINER_INSERT(container, entry); + CONTAINER_INSERT(container, entry); /* * Now extract the interesting information @@ -98,18 +98,16 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) * argv[0] is hrSWRunPath * argv[1..] is hrSWRunParameters */ - for ( cp = psinfo.pr_psargs; ' ' == *cp; cp++ ) - ; - *cp = '\0'; /* End of argv[0] */ - entry->hrSWRunPath_len - = sprintf(entry->hrSWRunPath, "%.*s", - (int)sizeof(entry->hrSWRunPath) - 1, - psinfo.pr_psargs); - - entry->hrSWRunParameters_len - = sprintf(entry->hrSWRunParameters, "%.*s", - (int)sizeof(entry->hrSWRunParameters) - 1, cp+1); - *cp = ' '; /* Restore pr_psargs value */ + cp = strchr(psinfo.pr_psargs, ' '); + if (cp) + *cp = '\0'; /* End of argv[0] */ + entry->hrSWRunPath_len = sprintf(entry->hrSWRunPath, "%.*s", + (int)sizeof(entry->hrSWRunPath) - 1, psinfo.pr_psargs); + if (cp) { + entry->hrSWRunParameters_len = sprintf(entry->hrSWRunParameters, + "%.*s", (int)sizeof(entry->hrSWRunParameters) - 1, cp+1); + *cp = ' '; /* Restore pr_psargs value */ + } /* * check for system processes diff --git a/agent/mibgroup/host/data_access/swrun_procfs_status.c b/agent/mibgroup/host/data_access/swrun_procfs_status.c index ef9e269..1667888 100644 --- a/agent/mibgroup/host/data_access/swrun_procfs_status.c +++ b/agent/mibgroup/host/data_access/swrun_procfs_status.c @@ -29,6 +29,7 @@ #include #include #include +#include "swrun_private.h" static long pagesize; static long sc_clk_tck; @@ -55,7 +56,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) DIR *procdir = NULL; struct dirent *procentry_p; FILE *fp; - int pid, i; + int pid, i, ret; unsigned long long cpu; char buf[BUFSIZ], buf2[BUFSIZ], *cp, *cp1; netsnmp_swrun_entry *entry; @@ -128,24 +129,26 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) if (cp != NULL) { /* * argv[0] is hrSWRunPath - */ - entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath, - sizeof(entry->hrSWRunPath)-1, "%s", buf); + */ + ret = snprintf(entry->hrSWRunPath, sizeof(entry->hrSWRunPath), + "%s", buf); + + if (ret < sizeof(entry->hrSWRunPath)) + entry->hrSWRunPath_len = ret; + else + entry->hrSWRunPath_len = sizeof(entry->hrSWRunPath) - 1; + /* * Stitch together argv[1..] to construct hrSWRunParameters */ - cp = buf + entry->hrSWRunPath_len+1; - while ( 1 ) { - while (*cp) - cp++; - if ( '\0' == *(cp+1)) - break; /* '\0''\0' => End of command line */ - *cp = ' '; - } + for (cp = buf + ret; ! (*cp == '\0' && *(cp + 1) == '\0'); cp++) + if (*cp == '\0') + *cp = ' '; + entry->hrSWRunParameters_len = sprintf(entry->hrSWRunParameters, "%.*s", (int)sizeof(entry->hrSWRunParameters) - 1, - buf + entry->hrSWRunPath_len + 1); + buf + ret + 1); } else { /* empty /proc/PID/cmdline, it's probably a kernel thread */ entry->hrSWRunPath_len = 0; diff --git a/agent/mibgroup/host/data_access/swrun_procinfo.c b/agent/mibgroup/host/data_access/swrun_procinfo.c index 14640e1..f14cea3 100644 --- a/agent/mibgroup/host/data_access/swrun_procinfo.c +++ b/agent/mibgroup/host/data_access/swrun_procinfo.c @@ -23,6 +23,7 @@ #include #include #include +#include "swrun_private.h" int avail = 1024; /* Size of table to allocate */ diff --git a/agent/mibgroup/host/data_access/swrun_prpsinfo.c b/agent/mibgroup/host/data_access/swrun_prpsinfo.c index 6cbbb23..9f9f0b4 100644 --- a/agent/mibgroup/host/data_access/swrun_prpsinfo.c +++ b/agent/mibgroup/host/data_access/swrun_prpsinfo.c @@ -25,6 +25,7 @@ #include #include #include +#include "swrun_private.h" /* --------------------------------------------------------------------- */ @@ -61,16 +62,18 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) * argv[0] is hrSWRunPath * argv[1..] is hrSWRunParameters */ - for ( cp = mypsinfo.pr_psargs; ' ' == *cp; cp++ ) - ; - *cp = '\0'; /* End of argv[0] */ + cp = strchr(mypsinfo.pr_psargs, ' '); + if (cp) + *cp = '\0'; /* End of argv[0] */ entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath, sizeof(entry->hrSWRunPath)-1, "%s", mypsinfo.pr_psargs); - entry->hrSWRunParameters_len = snprintf(entry->hrSWRunParameters, - sizeof(entry->hrSWRunParameters)-1, - "%s", cp+1); - *cp = ' '; /* Restore pr_psargs value */ + if (NULL != cp) { + entry->hrSWRunParameters_len = snprintf(entry->hrSWRunParameters, + sizeof(entry->hrSWRunParameters)-1, + "%s", cp+1); + *cp = ' '; /* Restore pr_psargs value */ + } /* * XXX - No information regarding system processes vs applications diff --git a/agent/mibgroup/host/data_access/swrun_pstat.c b/agent/mibgroup/host/data_access/swrun_pstat.c index b85ce77..505aa21 100644 --- a/agent/mibgroup/host/data_access/swrun_pstat.c +++ b/agent/mibgroup/host/data_access/swrun_pstat.c @@ -29,6 +29,7 @@ #include #include #include +#include "swrun_private.h" /* --------------------------------------------------------------------- */ @@ -51,7 +52,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) struct pst_status *proc_table; struct pst_dynamic pst_dyn; int nproc, i, rc; - char *cp1, *cp2; + char *cp; netsnmp_swrun_entry *entry; pstat_getdynamic( &pst_dyn, sizeof(struct pst_dynamic), 1, 0); @@ -73,16 +74,18 @@ netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) * argv[0] is hrSWRunPath * argv[1..] is hrSWRunParameters */ - for ( cp1 = proc_table[i].pst_cmd; ' ' == *cp1; cp1++ ) - ; - *cp1 = '\0'; /* End of argv[0] */ + cp = strchr(proc_table[i].pst_cmd, ' '); + if (cp) + *cp = '\0'; /* End of argv[0] */ entry->hrSWRunPath_len = snprintf(entry->hrSWRunPath, sizeof(entry->hrSWRunPath)-1, "%s", proc_table[i].pst_cmd); - entry->hrSWRunParameters_len = snprintf(entry->hrSWRunParameters, - sizeof(entry->hrSWRunParameters)-1, - "%s", cp1+1); - *cp1 = ' '; /* Restore pst_cmd value */ + if (cp) { + entry->hrSWRunParameters_len = + snprintf(entry->hrSWRunParameters, + sizeof(entry->hrSWRunParameters)-1, "%s", cp+1); + *cp = ' '; /* Restore pst_cmd value */ + } entry->hrSWRunType = (PS_SYS & proc_table[i].pst_flag) ? 2 /* kernel process */ diff --git a/agent/mibgroup/host/hrSWInstalledTable.h b/agent/mibgroup/host/hrSWInstalledTable.h index 48f17e8..4b617fd 100644 --- a/agent/mibgroup/host/hrSWInstalledTable.h +++ b/agent/mibgroup/host/hrSWInstalledTable.h @@ -5,7 +5,7 @@ #ifndef HRSWINSTALLEDTABLE_H #define HRSWINSTALLEDTABLE_H -config_require(host/data_access/swinst) +config_require(host/data_access/swinst); /* * function declarations diff --git a/agent/mibgroup/host/hrSWRunPerfTable.h b/agent/mibgroup/host/hrSWRunPerfTable.h index 453fda3..6bc3c11 100644 --- a/agent/mibgroup/host/hrSWRunPerfTable.h +++ b/agent/mibgroup/host/hrSWRunPerfTable.h @@ -15,7 +15,7 @@ #ifndef HRSWRUNPERFTABLE_H #define HRSWRUNPERFTABLE_H -config_require(host/hrSWRunTable) +config_require(host/hrSWRunTable); /* * function declarations diff --git a/agent/mibgroup/host/hrSWRunTable.h b/agent/mibgroup/host/hrSWRunTable.h index de80fc0..79f3b67 100644 --- a/agent/mibgroup/host/hrSWRunTable.h +++ b/agent/mibgroup/host/hrSWRunTable.h @@ -15,8 +15,8 @@ #ifndef HRSWRUNTABLE_H #define HRSWRUNTABLE_H -config_require(host/data_access/swrun) -config_require(host/hrSWRunPerfTable) +config_require(host/data_access/swrun); +config_require(host/hrSWRunPerfTable); /* * function declarations diff --git a/agent/mibgroup/host/hr_device.c b/agent/mibgroup/host/hr_device.c index 24031bf..ccb33e3 100644 --- a/agent/mibgroup/host/hr_device.c +++ b/agent/mibgroup/host/hr_device.c @@ -14,7 +14,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -252,7 +252,7 @@ var_hrdevice(struct variable *vp, (NULL!=(tmp_str=((*device_descr[type])(dev_idx))))) { strlcpy(string, tmp_str, sizeof(string)); } else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES goto try_next; #else sprintf(string, "a black box of some sort"); @@ -271,7 +271,7 @@ var_hrdevice(struct variable *vp, if (device_status[type] != NULL) long_return = ((*device_status[type]) (dev_idx)); else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES goto try_next; #else long_return = 2; /* Assume running */ @@ -283,7 +283,7 @@ var_hrdevice(struct variable *vp, if (device_errors[type] != NULL) long_return = (*device_errors[type]) (dev_idx); else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES goto try_next; #else long_return = 0; /* Assume OK */ diff --git a/agent/mibgroup/host/hr_disk.c b/agent/mibgroup/host/hr_disk.c index c4ac52f..f92320c 100644 --- a/agent/mibgroup/host/hr_disk.c +++ b/agent/mibgroup/host/hr_disk.c @@ -16,55 +16,58 @@ #include #include "host_res.h" #include "hr_disk.h" -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include #endif -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_SYS_DKIO_H +#ifdef HAVE_SYS_DKIO_H #include #endif -#if HAVE_SYS_DISKIO_H /* HP-UX only ? */ +#ifdef HAVE_SYS_DISKIO_H /* HP-UX only ? */ #include #endif -#if HAVE_LINUX_HDREG_H +#ifdef HAVE_LINUX_HDREG_H #include #endif -#if HAVE_SYS_DISKLABEL_H +#ifdef HAVE_SYS_DISKLABEL_H #define DKTYPENAMES #include +#ifndef dragonfly +#include +#endif #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -75,9 +78,12 @@ #include #endif -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif #ifdef darwin #include @@ -130,9 +136,6 @@ * *********************/ -void Init_HR_Disk(void); -int Get_Next_HR_Disk(void); -int Get_Next_HR_Disk_Partition(char *, size_t, int); #if !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)) static void Add_HR_Disk_entry(const char *, int, int, int, int, const char *, int, int); @@ -176,7 +179,7 @@ static int HRD_savedCtrl_type; static struct hd_driveid HRD_info; #endif -#ifdef DIOCGDINFO +#if defined(DIOCGDINFO) || defined(DIOCGMEDIASIZE) static struct disklabel HRD_info; #endif @@ -271,6 +274,9 @@ init_hr_disk(void) #elif defined(freebsd2) Add_HR_Disk_entry("/dev/wd%d%c", -1, -1, 0, 3, "/dev/wd%d", 'a', 'h'); Add_HR_Disk_entry("/dev/sd%d%c", -1, -1, 0, 3, "/dev/sd%d", 'a', 'h'); +#elif defined(netbsd6) + Add_HR_Disk_entry("/dev/wd%d%c", -1, -1, 0, 3, "/dev/rwd%da", 'a', 'h'); + Add_HR_Disk_entry("/dev/sd%d%c", -1, -1, 0, 3, "/dev/rsd%da", 'a', 'h'); #elif defined(netbsd1) Add_HR_Disk_entry("/dev/wd%d%c", -1, -1, 0, 3, "/dev/wd%dc", 'a', 'h'); Add_HR_Disk_entry("/dev/sd%d%c", -1, -1, 0, 3, "/dev/sd%dc", 'a', 'h'); @@ -407,7 +413,7 @@ parse_disk_config(const char *token, char *cptr) *p != '\0' && *p != '?' && *p != '*' && *p != '['; p++); c = *p; *p = '\0'; - d_str = (char *) malloc(strlen(name) + 1); + d_str = strdup(name); if (!d_str) { SNMP_FREE(d_new); SNMP_FREE(d_str); @@ -416,7 +422,6 @@ parse_disk_config(const char *token, char *cptr) config_perror("Out of memory"); return; } - strcpy(d_str, name); *p = c; di_curr->item_type = ITEM_STRING; di_curr->item_details = (void *) d_str; @@ -456,10 +461,10 @@ free_disk_config(void) di_next = di_ptr->item_next; if (di_ptr->item_details) free(di_ptr->item_details); - free((void *) di_ptr); + free(di_ptr); di_ptr = di_next; } - free((void *) d_ptr); + free(d_ptr); d_ptr = d_next; } conf_list = (conf_disk_list *) 0; @@ -707,7 +712,7 @@ Add_HR_Disk_entry(const char *devpart_string, first_partn; disk_devices[HR_number_disk_types].disk_partition_last = last_partn; -#if DEBUG_TEST +#ifdef DEBUG_TEST DEBUGMSGTL(("host/hr_disk", "Add_HR %02d '%s' first=%d last=%d\n", HR_number_disk_types, devpart_string, lodev, hidev)); @@ -722,7 +727,7 @@ Add_HR_Disk_entry(const char *devpart_string, "WARNING! Add_HR_Disk_entry '%s' incomplete, %d created\n", devpart_string, nbr_created)); } -#if DEBUG_TEST +#ifdef DEBUG_TEST else DEBUGMSGTL(("host/hr_disk", "Add_HR_Disk_entry '%s' completed, %d created\n", @@ -810,7 +815,7 @@ Get_Next_HR_Disk(void) */ DEBUGMSGTL(("host/hr_disk", "Get_Next_HR_Disk: %s ignored\n", string)); - HRD_history[iindex] = LONG_MAX; + HRD_history[iindex] = (time_t)LONG_MAX; HRD_index++; continue; } @@ -1054,7 +1059,14 @@ Query_Disk(int fd, const char *devfull) } #endif -#ifdef DIOCGDINFO +#if defined(DIOCGMEDIASIZE) + unsigned long long size64; + + if (ioctl(fd, DIOCGMEDIASIZE, &size64) < 0) + result = -1; + HRD_info.d_secperunit = size64 / 512; + result = 0; +#elif defined(DIOCGDINFO) result = ioctl(fd, DIOCGDINFO, &HRD_info); #endif diff --git a/agent/mibgroup/host/hr_disk.h b/agent/mibgroup/host/hr_disk.h index b3c439c..5021020 100644 --- a/agent/mibgroup/host/hr_disk.h +++ b/agent/mibgroup/host/hr_disk.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_HRDISK_H #define _MIBGROUP_HRDISK_H -config_require(host/hr_device) +config_require(host/hr_device); extern void init_hr_disk(void); extern void shutdown_hr_disk(void); diff --git a/agent/mibgroup/host/hr_filesys.c b/agent/mibgroup/host/hr_filesys.c index b23d322..06d5db0 100644 --- a/agent/mibgroup/host/hr_filesys.c +++ b/agent/mibgroup/host/hr_filesys.c @@ -24,19 +24,19 @@ #include "hr_disk.h" #include -#if HAVE_MNTENT_H +#ifdef HAVE_MNTENT_H #include #endif -#if HAVE_SYS_MNTENT_H +#ifdef HAVE_SYS_MNTENT_H #include #endif -#if HAVE_SYS_MNTTAB_H +#ifdef HAVE_SYS_MNTTAB_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -47,14 +47,14 @@ #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_NBUTIL_H +#ifdef HAVE_NBUTIL_H #include #endif @@ -64,12 +64,16 @@ #include #endif -netsnmp_feature_require(se_find_free_value_in_slist) -netsnmp_feature_require(date_n_time) -netsnmp_feature_require(ctime_to_timet) +netsnmp_feature_require(se_find_free_value_in_slist); +netsnmp_feature_require(date_n_time); +netsnmp_feature_require(ctime_to_timet); + +#ifndef MNTTYPE_AUTOFS +#define MNTTYPE_AUTOFS "autofs" +#endif #if defined(bsdi4) || defined(freebsd3) || defined(freebsd4) || defined(freebsd5) || defined(darwin) -#if HAVE_GETFSSTAT && defined(MFSNAMELEN) +#if defined(HAVE_GETFSSTAT) && defined(MFSNAMELEN) #define MOUNT_NFS "nfs" #define MNTTYPE_UFS "ufs" #define BerkelyFS @@ -201,12 +205,7 @@ struct mntent *HRFS_entry; #define FULL_DUMP 0 #define PART_DUMP 1 -extern void Init_HR_FileSys(void); -extern int Get_Next_HR_FileSys(void); -char *cook_device(char *); -static u_char *when_dumped(char *filesys, int level, size_t * length); -int header_hrfilesys(struct variable *, oid *, size_t *, int, - size_t *, WriteMethod **); +static u_char *when_dumped(const char *filesys, int level, size_t *length); /********************* * @@ -380,7 +379,7 @@ var_hrfilesys(struct variable *vp, * Not sufficient to identity the file * type precisely, but it's a start. */ -#if HAVE_GETFSSTAT && !defined(MFSNAMELEN) +#if defined(HAVE_GETFSSTAT) && !defined(MFSNAMELEN) switch (HRFS_entry->HRFS_type) { case MOUNT_UFS: fsys_type_id[fsys_type_len - 1] = 3; @@ -565,7 +564,7 @@ var_hrfilesys(struct variable *vp, #if defined(HAVE_STATVFS) && defined(__NetBSD__) long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1; #elif defined(HAVE_GETFSSTAT) -#if HAVE_STRUCT_STATFS_F_FLAGS +#ifdef HAVE_STRUCT_STATFS_F_FLAGS long_return = HRFS_entry->f_flags & MNT_RDONLY ? 2 : 1; #else long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1; @@ -575,7 +574,7 @@ var_hrfilesys(struct variable *vp, #elif defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return = (HRFS_entry->HRFS_flags & MNT_READONLY) == 0 ? 1 : 2; #else -#if HAVE_HASMNTOPT +#ifdef HAVE_HASMNTOPT if (hasmntopt(HRFS_entry, "ro") != NULL) long_return = 2; /* Read Only */ else @@ -619,20 +618,20 @@ static FILE *fp; void Init_HR_FileSys(void) { -#if HAVE_GETFSSTAT +#ifdef HAVE_GETFSSTAT #if defined(HAVE_STATVFS) && defined(__NetBSD__) fscount = getvfsstat(NULL, 0, ST_NOWAIT); #else - fscount = getfsstat(NULL, 0, MNT_NOWAIT); + fscount = getfsstat(NULL, 0, MNT_WAIT); #endif if (fsstats) - free((char *) fsstats); + free(fsstats); fsstats = NULL; fsstats = malloc(fscount * sizeof(*fsstats)); #if defined(HAVE_STATVFS) && defined(__NetBSD__) getvfsstat(fsstats, fscount * sizeof(*fsstats), ST_NOWAIT); #else - getfsstat(fsstats, fscount * sizeof(*fsstats), MNT_NOWAIT); + getfsstat(fsstats, fscount * sizeof(*fsstats), MNT_WAIT); #endif HRFS_index = 0; #elif defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) @@ -669,7 +668,7 @@ Init_HR_FileSys(void) #endif } -const char *HRFS_ignores[] = { +static const char *HRFS_ignores[] = { #ifdef MNTTYPE_IGNORE MNTTYPE_IGNORE, #endif @@ -682,13 +681,8 @@ const char *HRFS_ignores[] = { #ifdef MNTTYPE_PROCFS MNTTYPE_PROCFS, #endif -#ifdef MNTTYPE_AUTOFS MNTTYPE_AUTOFS, -#else - "autofs", -#endif #ifdef linux - "autofs", "bdev", "binfmt_misc", "cpuset", @@ -710,7 +704,6 @@ const char *HRFS_ignores[] = { "shm", "sockfs", "sysfs", - "tmpfs", "usbdevfs", "usbfs", #endif @@ -725,7 +718,8 @@ const char *HRFS_ignores[] = { int Get_Next_HR_FileSys(void) { -#if HAVE_GETFSSTAT +next: +#ifdef HAVE_GETFSSTAT if (HRFS_index >= fscount) return -1; HRFS_entry = fsstats + HRFS_index; @@ -751,8 +745,7 @@ Get_Next_HR_FileSys(void) case MNT_PROCFS: #endif case MNT_SFS: - return Get_Next_HR_FileSys(); - break; + goto next; } return HRFS_index++; #else @@ -772,7 +765,7 @@ Get_Next_HR_FileSys(void) for (cpp = HRFS_ignores; *cpp != NULL; ++cpp) if (!strcmp(HRFS_entry->HRFS_type, *cpp)) - return Get_Next_HR_FileSys(); + goto next; /* * Try and ensure that index values are persistent @@ -799,7 +792,7 @@ Get_Next_HR_FileSys(void) int Check_HR_FileSys_NFS (void) { -#if HAVE_GETFSSTAT && !defined(MFSNAMELEN) +#if defined(HAVE_GETFSSTAT) && !defined(MFSNAMELEN) if ((HRFS_entry->HRFS_type == MOUNT_NFS) || (HRFS_entry->HRFS_type == MOUNT_AFS)) #elif defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) @@ -839,12 +832,23 @@ Check_HR_FileSys_NFS (void) return 0; /* no NFS file system */ } +/* This function checks whether current file system is an AutoFs + * HRFS_entry must be valid prior to calling this function + * return 1 if AutoFs, 0 otherwise + */ +int +Check_HR_FileSys_AutoFs(void) +{ + return HRFS_entry->HRFS_type && + strcmp(HRFS_entry->HRFS_type, MNTTYPE_AUTOFS) == 0; +} + void End_HR_FileSys(void) { #ifdef HAVE_GETFSSTAT if (fsstats) - free((char *) fsstats); + free(fsstats); fsstats = NULL; #elif defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) if(aixmnt != NULL) { @@ -862,7 +866,7 @@ End_HR_FileSys(void) static u_char * -when_dumped(char *filesys, int level, size_t * length) +when_dumped(const char *filesys, int level, size_t *length) { time_t dumpdate = 0, tmp; FILE *dump_fp; diff --git a/agent/mibgroup/host/hr_filesys.h b/agent/mibgroup/host/hr_filesys.h index 2f00355..36cd7dd 100644 --- a/agent/mibgroup/host/hr_filesys.h +++ b/agent/mibgroup/host/hr_filesys.h @@ -10,6 +10,7 @@ extern void Init_HR_FileSys(void); extern FindVarMethod var_hrfilesys; extern int Get_Next_HR_FileSys(void); extern int Check_HR_FileSys_NFS(void); +extern int Check_HR_FileSys_AutoFs(void); extern int Get_FSIndex(char *); extern long Get_FSSize(char *); /* Temporary */ diff --git a/agent/mibgroup/host/hr_network.c b/agent/mibgroup/host/hr_network.c index 6cce58c..fb574c2 100644 --- a/agent/mibgroup/host/hr_network.c +++ b/agent/mibgroup/host/hr_network.c @@ -8,7 +8,7 @@ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -24,7 +24,7 @@ #include "hr_network.h" #if !defined( solaris2 ) -netsnmp_feature_require(interface_legacy) +netsnmp_feature_require(interface_legacy); #endif /* !solaris2 */ /********************* @@ -257,7 +257,7 @@ int HRN_index; void Save_HR_Network_Info(void) { - strcpy(HRN_savedName, HRN_name); + strlcpy(HRN_savedName, HRN_name, sizeof(HRN_savedName)); #if defined( USING_IF_MIB_IFTABLE_IFTABLE_DATA_ACCESS_MODULE ) HRN_savedFlags = HRN_ifnet->os_flags; HRN_savedErrors = HRN_ifnet->stats.ierrors + HRN_ifnet->stats.oerrors; @@ -299,8 +299,10 @@ network_status(int idx) return 2; /* running */ else return 5; /* down */ +#else + /* To do: implement network_status() for Windows. */ + return 2; /* running */ #endif /* WIN32 */ - } int diff --git a/agent/mibgroup/host/hr_network.h b/agent/mibgroup/host/hr_network.h index d7bcb48..60dd94d 100644 --- a/agent/mibgroup/host/hr_network.h +++ b/agent/mibgroup/host/hr_network.h @@ -5,10 +5,10 @@ #ifndef _MIBGROUP_HRNET_H #define _MIBGROUP_HRNET_H -config_require(host/hr_device) +config_require(host/hr_device); extern void init_hr_network(void); extern FindVarMethod var_hrnet; -config_require(host/hr_device mibII/ifTable) +config_require(host/hr_device mibII/ifTable); #endif /* _MIBGROUP_HRNET_H */ diff --git a/agent/mibgroup/host/hr_other.c b/agent/mibgroup/host/hr_other.c index 9e4b16a..265ccdd 100644 --- a/agent/mibgroup/host/hr_other.c +++ b/agent/mibgroup/host/hr_other.c @@ -8,7 +8,7 @@ #include "host_res.h" #include "hr_other.h" -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif diff --git a/agent/mibgroup/host/hr_other.h b/agent/mibgroup/host/hr_other.h index c1865d1..347ef53 100644 --- a/agent/mibgroup/host/hr_other.h +++ b/agent/mibgroup/host/hr_other.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_HROTHER_H #define _MIBGROUP_HROTHER_H -config_require(host/hr_device) +config_require(host/hr_device); void init_hr_other(void); diff --git a/agent/mibgroup/host/hr_partition.c b/agent/mibgroup/host/hr_partition.c index 3b9abd6..6761978 100644 --- a/agent/mibgroup/host/hr_partition.c +++ b/agent/mibgroup/host/hr_partition.c @@ -15,12 +15,12 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -65,8 +65,6 @@ static void Save_HR_Partition(int, int); static void Init_HR_Partition(void); static int Get_Next_HR_Partition(void); -int header_hrpartition(struct variable *, oid *, size_t *, int, - size_t *, WriteMethod **); #define HRPART_INDEX 1 diff --git a/agent/mibgroup/host/hr_partition.h b/agent/mibgroup/host/hr_partition.h index c4992dd..e42e071 100644 --- a/agent/mibgroup/host/hr_partition.h +++ b/agent/mibgroup/host/hr_partition.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_HRPART_H #define _MIBGROUP_HRPART_H -config_require(host/hr_disk) +config_require(host/hr_disk); extern void init_hr_partition(void); extern FindVarMethod var_hrpartition; diff --git a/agent/mibgroup/host/hr_print.c b/agent/mibgroup/host/hr_print.c index 4cfa25b..1c1ef7a 100644 --- a/agent/mibgroup/host/hr_print.c +++ b/agent/mibgroup/host/hr_print.c @@ -4,12 +4,12 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include "host_res.h" @@ -28,7 +28,6 @@ void Init_HR_Print(void); int Get_Next_HR_Print(void); -void Save_HR_Print(void); const char *describe_printer(int); int printer_status(int); int printer_detail_status(int); @@ -177,7 +176,7 @@ var_hrprint(struct variable * vp, long_return = printer_detail_status(print_idx); return (u_char *) & long_return; case HRPRINT_ERROR: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #else long_return = 0; /* Null string */ @@ -200,7 +199,7 @@ var_hrprint(struct variable * vp, static int HRP_index; static char **HRP_name; static int HRP_nbrnames; -#if HAVE_LPSTAT || HAVE_CGETNEXT || HAVE_PRINTCAP +#if defined(HAVE_LPSTAT) || defined(HAVE_CGETNEXT) || defined(HAVE_PRINTCAP) static int HRP_maxnames; #endif @@ -209,13 +208,13 @@ static int HRP_maxnames; void Init_HR_Print(void) { -#if HAVE_LPSTAT || HAVE_CGETNEXT || HAVE_PRINTCAP +#if defined(HAVE_LPSTAT) || defined(HAVE_CGETNEXT) || defined(HAVE_PRINTCAP) int i; -#if HAVE_PRINTCAP +#if defined(HAVE_PRINTCAP) FILE *p; -#elif HAVE_CGETNEXT +#elif defined(HAVE_CGETNEXT) const char *caps[] = { "/etc/printcap", NULL }; -#elif HAVE_LPSTAT +#elif defined(HAVE_LPSTAT) int fd; FILE *p; #endif @@ -230,7 +229,7 @@ Init_HR_Print(void) SNMP_FREE(HRP_name); } -#if HAVE_PRINTCAP +#ifdef HAVE_PRINTCAP if ((p = fopen("/etc/printcap", "r")) != NULL) { char buf[BUFSIZ], *ptr; while (fgets(buf, sizeof buf, p)) { @@ -245,7 +244,7 @@ Init_HR_Print(void) if ((ptr = strchr(buf, '|'))) *ptr = 0; ptr = buf; -#elif HAVE_CGETNEXT +#elif defined(HAVE_CGETNEXT) { char *buf = NULL, *ptr; while (cgetnext(&buf, caps) > 0) { @@ -254,7 +253,7 @@ Init_HR_Print(void) if ((ptr = strchr(buf, '|'))) *ptr = 0; ptr = buf; -#elif HAVE_LPSTAT +#elif defined(HAVE_LPSTAT) if ((p = run_lpstat(&fd)) != NULL) { char buf[BUFSIZ], ptr[BUFSIZ]; while (fgets(buf, sizeof buf, p)) { @@ -279,11 +278,11 @@ Init_HR_Print(void) #endif } finish: -#if HAVE_PRINTCAP +#if defined(HAVE_PRINTCAP) fclose(p); -#elif HAVE_CGETNEXT +#elif defined(HAVE_CGETNEXT) cgetclose(); -#elif HAVE_LPSTAT +#elif defined(HAVE_LPSTAT) fclose(p); close(fd); #endif @@ -362,10 +361,9 @@ run_lpstat(int *fd) struct extensible ex; memset(&ex, 0, sizeof(ex)); - strcpy(ex.command, LPSTAT_PATH " -v"); - if ((*fd = get_exec_output(&ex)) < 0) - return NULL; - - return fdopen(*fd, "r"); + ex.command = strdup(LPSTAT_PATH " -v"); + *fd = get_exec_output(&ex); + free(ex.command); + return *fd >= 0 ? fdopen(*fd, "r") : NULL; } #endif diff --git a/agent/mibgroup/host/hr_print.h b/agent/mibgroup/host/hr_print.h index 7acee8d..2378ebd 100644 --- a/agent/mibgroup/host/hr_print.h +++ b/agent/mibgroup/host/hr_print.h @@ -5,8 +5,8 @@ #ifndef _MIBGROUP_HRPRINT_H #define _MIBGROUP_HRPRINT_H -config_require(host/hr_device) -config_require(util_funcs) +config_require(host/hr_device); +config_require(util_funcs); extern void init_hr_print(void); extern FindVarMethod var_hrprint; diff --git a/agent/mibgroup/host/hr_proc.c b/agent/mibgroup/host/hr_proc.c index 6f93079..a5baccc 100644 --- a/agent/mibgroup/host/hr_proc.c +++ b/agent/mibgroup/host/hr_proc.c @@ -6,10 +6,10 @@ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/agent/mibgroup/host/hr_proc.h b/agent/mibgroup/host/hr_proc.h index 1e4a926..f146fb9 100644 --- a/agent/mibgroup/host/hr_proc.h +++ b/agent/mibgroup/host/hr_proc.h @@ -5,8 +5,8 @@ #ifndef _MIBGROUP_HRPROC_H #define _MIBGROUP_HRPROC_H -config_require(hardware/cpu) -config_require(host/hr_device) +config_require(hardware/cpu); +config_require(host/hr_device); extern void init_hr_proc(void); extern FindVarMethod var_hrproc; diff --git a/agent/mibgroup/host/hr_storage.c b/agent/mibgroup/host/hr_storage.c index 264fecc..6002648 100644 --- a/agent/mibgroup/host/hr_storage.c +++ b/agent/mibgroup/host/hr_storage.c @@ -12,17 +12,17 @@ #endif #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -30,41 +30,41 @@ #endif #if (!defined(mingw32) && !defined(WIN32)) -#if HAVE_UTMPX_H +#ifdef HAVE_UTMPX_H #include #else #include #endif #endif /* mingw32 */ #ifndef dynix -#if HAVE_SYS_VM_H +#ifdef HAVE_SYS_VM_H #include #if (!defined(KERNEL) || defined(MACH_USER_API)) && defined(HAVE_SYS_VMMETER_H) /*OS X does not #include if (defined(KERNEL) && !defined(MACH_USER_API)) */ #include #endif #else -#if HAVE_VM_VM_H +#ifdef HAVE_VM_VM_H #include -#if HAVE_MACHINE_TYPES_H +#ifdef HAVE_MACHINE_TYPES_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #include #endif -#if HAVE_VM_VM_PARAM_H +#ifdef HAVE_VM_VM_PARAM_H #include #endif #else -#if HAVE_SYS_VMPARAM_H +#ifdef HAVE_SYS_VMPARAM_H #include #endif -#if HAVE_SYS_VMMAC_H +#ifdef HAVE_SYS_VMMAC_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #include #endif -#if HAVE_SYS_VMSYSTM_H +#ifdef HAVE_SYS_VMSYSTM_H #include #endif #endif /* vm/vm.h */ @@ -76,13 +76,13 @@ #include #include #endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_SYS_POOL_H +#ifdef HAVE_SYS_POOL_H #if defined(MBPOOL_SYMBOL) && defined(MCLPOOL_SYMBOL) #define __POOL_EXPOSE #include @@ -90,15 +90,15 @@ #undef HAVE_SYS_POOL_H #endif #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #if defined(CTL_HW) && defined(HW_PAGESIZE) #define USE_SYSCTL #endif -#if USE_MACH_HOST_STATISTICS +#ifdef USE_MACH_HOST_STATISTICS #include #elif defined(CTL_VM) && (defined(VM_METER) || defined(VM_UVMEXP)) #define USE_SYSCTL_VM @@ -119,19 +119,19 @@ #include "hr_filesys.h" #include -#if HAVE_MNTENT_H +#ifdef HAVE_MNTENT_H #include #endif -#if HAVE_SYS_MNTTAB_H +#ifdef HAVE_SYS_MNTTAB_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #ifdef __osf__ #undef m_next #undef m_data @@ -147,17 +147,17 @@ #include #endif #if defined(solaris2) -#if HAVE_SYS_SWAP_H +#ifdef HAVE_SYS_SWAP_H #include #endif #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_NBUTIL_H +#ifdef HAVE_NBUTIL_H #include #endif @@ -259,10 +259,6 @@ void* header_hrstoreEntry(struct variable *, oid *, size_t *, int, size_t *, WriteMethod **); Netsnmp_Node_Handler handle_memsize; -#ifdef solaris2 -void sol_get_swapinfo(int *, int *); -#endif - #define HRSTORE_MEMSIZE 1 #define HRSTORE_INDEX 2 #define HRSTORE_TYPE 3 @@ -288,7 +284,6 @@ struct variable2 hrstore_variables[] = { {HRSTORE_FAILS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, var_hrstore, 1, {7}} }; -oid hrstore_variables_oid[] = { 1, 3, 6, 1, 2, 1, 25, 2 }; oid hrMemorySize_oid[] = { 1, 3, 6, 1, 2, 1, 25, 2, 2 }; oid hrStorageTable_oid[] = { 1, 3, 6, 1, 2, 1, 25, 2, 3, 1 }; @@ -549,6 +544,8 @@ var_hrstore(struct variable *vp, NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) && Check_HR_FileSys_NFS()) return NULL; /* or goto try_next; */ + if (Check_HR_FileSys_AutoFs()) + return NULL; if (HRFS_statfs(HRFS_entry->HRFS_mount, &stat_buf) < 0) { snmp_log_perror(HRFS_entry->HRFS_mount); goto try_next; @@ -567,7 +564,7 @@ var_hrstore(struct variable *vp, if (store_idx > NETSNMP_MEM_TYPE_MAX) if (storageUseNFS && Check_HR_FileSys_NFS()) storage_type_id[storage_type_len - 1] = 10; /* Network Disk */ -#if HAVE_HASMNTOPT && !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)) +#if defined(HAVE_HASMNTOPT) && !(defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)) /* * hasmntopt takes "const struct mntent*", but HRFS_entry has been * defined differently for AIX, so skip this for AIX @@ -606,7 +603,7 @@ var_hrstore(struct variable *vp, } case HRSTORE_UNITS: if (store_idx > NETSNMP_MEM_TYPE_MAX) -#if HRFS_HAS_FRSIZE +#ifdef HRFS_HAS_FRSIZE long_return = stat_buf.f_frsize; #else long_return = stat_buf.f_bsize; @@ -637,7 +634,7 @@ var_hrstore(struct variable *vp, return (u_char *) & long_return; case HRSTORE_FAILS: if (store_idx > NETSNMP_MEM_TYPE_MAX) -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES goto try_next; #else long_return = 0; @@ -688,7 +685,8 @@ Get_Next_HR_Store(void) if (HRS_index >= 0) { if (!(netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) && - Check_HR_FileSys_NFS())) { + Check_HR_FileSys_NFS()) && + !Check_HR_FileSys_AutoFs()) { return HRS_index + NETSNMP_MEM_TYPE_MAX; } } else { @@ -697,7 +695,7 @@ Get_Next_HR_Store(void) } } -#ifdef solaris2 +#if 0 void sol_get_swapinfo(int *totalP, int *usedP) { diff --git a/agent/mibgroup/host/hr_storage.h b/agent/mibgroup/host/hr_storage.h index 2007c32..f938ab8 100644 --- a/agent/mibgroup/host/hr_storage.h +++ b/agent/mibgroup/host/hr_storage.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_HRSTORAGE_H #define _MIBGROUP_HRSTORAGE_H -config_require(hardware/memory) +config_require(hardware/memory); /* config_require(host/hr_filesys) */ extern void init_hr_storage(void); diff --git a/agent/mibgroup/host/hr_swinst.c b/agent/mibgroup/host/hr_swinst.c index 25582bd..6b6c338 100644 --- a/agent/mibgroup/host/hr_swinst.c +++ b/agent/mibgroup/host/hr_swinst.c @@ -6,31 +6,31 @@ #include #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif @@ -60,7 +60,7 @@ #endif #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -72,7 +72,7 @@ #define HRSWINST_MONOTONICALLY_INCREASING -netsnmp_feature_require(date_n_time) +netsnmp_feature_require(date_n_time); /********************* * @@ -102,7 +102,7 @@ netsnmp_feature_require(date_n_time) * de_p swi->swi_dep */ typedef struct { -#if HAVE_LIBRPM +#ifdef HAVE_LIBRPM char *swi_directory; #else const char *swi_directory; @@ -110,7 +110,7 @@ typedef struct { char swi_name[SNMP_MAXPATH]; /* XXX longest file name */ int swi_index; -#if HAVE_LIBRPM +#ifdef HAVE_LIBRPM const char *swi_dbpath; time_t swi_timestamp; /* modify time on database */ @@ -141,18 +141,13 @@ int header_hrswInstEntry(struct variable *, oid *, size_t *, * Initialisation & common implementation functions * *********************/ -extern void Init_HR_SWInst(void); -extern int Get_Next_HR_SWInst(void); -extern void End_HR_SWInst(void); -extern int Save_HR_SW_info(int ix); +static void Init_HR_SWInst(void); +static int Get_Next_HR_SWInst(void); +static void End_HR_SWInst(void); +static int Save_HR_SW_info(int ix); -#ifdef HAVE_LIBRPM static void Mark_HRSW_token(void); static void Release_HRSW_token(void); -#else -#define Mark_HRSW_token() -#define Release_HRSW_token() -#endif #define HRSWINST_CHANGE 1 @@ -417,7 +412,7 @@ var_hrswinst(struct variable * vp, else long_return = 0; /* predates this agent */ } else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #else long_return = 363136200; @@ -521,7 +516,7 @@ var_hrswinst(struct variable * vp, goto err; } else { err: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES ret = NULL; #else sprintf(string, "back in the mists of time"); @@ -705,7 +700,6 @@ Save_HR_SW_info(int ix) return 0; } -#ifdef HAVE_LIBRPM void Mark_HRSW_token(void) { @@ -714,14 +708,15 @@ Mark_HRSW_token(void) void Release_HRSW_token(void) { +#ifdef HAVE_LIBRPM SWI_t *swi = &_myswi; /* XXX static for now */ if (swi != NULL && swi->swi_h) { headerFree(swi->swi_h); swi->swi_h = NULL; swi->swi_prevx = -1; } -} #endif /* HAVE_LIBRPM */ +} void End_HR_SWInst(void) diff --git a/agent/mibgroup/host/hr_swrun.c b/agent/mibgroup/host/hr_swrun.c index f40e997..85ab689 100644 --- a/agent/mibgroup/host/hr_swrun.c +++ b/agent/mibgroup/host/hr_swrun.c @@ -16,46 +16,46 @@ */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_SYS_PSTAT_H +#ifdef HAVE_SYS_PSTAT_H #include #endif -#if HAVE_SYS_USER_H +#ifdef HAVE_SYS_USER_H #ifdef solaris2 #include #define _KMEMUSER #endif #include #endif -#if HAVE_SYS_PROC_H +#ifdef HAVE_SYS_PROC_H #include #endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif -#if HAVE_DIRENT_H && !defined(cygwin) +#if defined(HAVE_DIRENT_H) && !defined(cygwin) #include #else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif @@ -70,7 +70,7 @@ #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -122,9 +122,9 @@ static int LowProcIndex; #if defined(hpux10) || defined(hpux11) struct pst_status *proc_table; struct pst_dynamic pst_dyn; -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) struct kinfo_proc2 *proc_table; -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) struct kinfo_proc *proc_table; #elif defined(solaris2) int *proc_table; @@ -283,33 +283,23 @@ void init_hr_swrun(void) { #ifdef cygwin - OSVERSIONINFO ver; HMODULE h; - memset(&ver, 0, sizeof ver); - ver.dwOSVersionInfoSize = sizeof ver; - GetVersionEx(&ver); - - if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { - h = LoadLibrary("psapi.dll"); - if (h) { - myEnumProcessModules = - (ENUMPROCESSMODULES) GetProcAddress(h, - "EnumProcessModules"); - myGetModuleFileNameEx = - (GETMODULEFILENAME) GetProcAddress(h, - "GetModuleFileNameExA"); - myGetProcessMemoryInfo = - (GETPROCESSMEMORYINFO) GetProcAddress(h, - "GetProcessMemoryInfo"); - if (myEnumProcessModules && myGetModuleFileNameEx) - query = CW_GETPINFO_FULL; - else - snmp_log(LOG_ERR, "hr_swrun failed NT init\n"); - } else - snmp_log(LOG_ERR, "hr_swrun failed to load psapi.dll\n"); - } else { - h = GetModuleHandle("KERNEL32.DLL"); + if ((h = LoadLibrary("psapi.dll")) != NULL) { + myEnumProcessModules = + (ENUMPROCESSMODULES) GetProcAddress(h, + "EnumProcessModules"); + myGetModuleFileNameEx = + (GETMODULEFILENAME) GetProcAddress(h, + "GetModuleFileNameExA"); + myGetProcessMemoryInfo = + (GETPROCESSMEMORYINFO) GetProcAddress(h, + "GetProcessMemoryInfo"); + if (myEnumProcessModules && myGetModuleFileNameEx) + query = CW_GETPINFO_FULL; + else + snmp_log(LOG_ERR, "hr_swrun failed NT init\n"); + } elif ((h = GetModuleHandle("KERNEL32.DLL")) != NULL) { myCreateToolhelp32Snapshot = (CREATESNAPSHOT) GetProcAddress(h, "CreateToolhelp32Snapshot"); myProcess32First = @@ -321,7 +311,7 @@ init_hr_swrun(void) && myProcess32Next) #if 0 /* - * This doesn't work after all on Win98 SE + * This doesn't work at all on Win98 SE */ query = CW_GETPINFO_FULL; #else @@ -644,7 +634,7 @@ var_hrswrun(struct variable * vp, switch (vp->magic) { case HRSWRUN_OSINDEX: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #else /* @@ -690,21 +680,21 @@ var_hrswrun(struct variable * vp, cp = strchr(string, ' '); if (cp != NULL) *cp = '\0'; -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) strlcpy(string, proc_table[LowProcIndex].p_comm, sizeof(string)); /* process name: truncate the string at the first space */ cp = strchr(string, ' '); if (cp != NULL) *cp = '\0'; -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) #if defined(freebsd5) && __FreeBSD_version >= 500014 - strcpy(string, proc_table[LowProcIndex].ki_comm); + strlcpy(string, proc_table[LowProcIndex].ki_comm, sizeof(string)); #elif defined(dragonfly) && __DragonFly_version >= 190000 - strcpy(string, proc_table[LowProcIndex].kp_comm); + strlcpy(string, proc_table[LowProcIndex].kp_comm, sizeof(string)); #elif defined(openbsd5) - strcpy(string, proc_table[LowProcIndex].p_comm); + strlcpy(string, proc_table[LowProcIndex].p_comm, sizeof(string)); #else - strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm); + strlcpy(string, proc_table[LowProcIndex].kp_proc.p_comm, sizeof(string)); #endif #elif defined(linux) if( (cp=get_proc_name_from_status(pid,buf,sizeof(buf))) == NULL ) { @@ -712,7 +702,7 @@ var_hrswrun(struct variable * vp, *var_len = strlen(string); return (u_char *) string; } - strcpy(string, cp); + strlcpy(string, cp, sizeof(string)); #elif defined(cygwin) /* if (lowproc.process_state & (PID_ZOMBIE | PID_EXITED)) */ if (lowproc.process_state & PID_EXITED || (lowproc.exitcode & ~0xffff)) @@ -721,7 +711,7 @@ var_hrswrun(struct variable * vp, cygwin_conv_to_posix_path(lowproc.progname, string); cp = strrchr(string, '/'); if (cp) - strcpy(string, cp + 1); + strlcpy(string, cp + 1, sizeof(string)); } else if (query == CW_GETPINFO_FULL) { DWORD n = lowproc.dwProcessId & 0xffff; HANDLE h = @@ -739,7 +729,7 @@ var_hrswrun(struct variable * vp, sizeof string)) { cp = strrchr(string, '\\'); if (cp) - strcpy(string, cp + 1); + strlcpy(string, cp + 1, sizeof(string)); } else strcpy(string, "*** unknown"); CloseHandle(h); @@ -753,7 +743,7 @@ var_hrswrun(struct variable * vp, if (cp > string && strcasecmp(cp, ".exe") == 0) *cp = '\0'; #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif sprintf(string, "process name"); @@ -795,7 +785,7 @@ var_hrswrun(struct variable * vp, #elif defined(solaris2) #ifdef _SLASH_PROC_METHOD_ if (proc_buf) - strcpy(string, proc_buf->pr_psargs); + strlcpy(string, proc_buf->pr_psargs, sizeof(string)); else sprintf(string, ""); cp = strchr(string, ' '); @@ -813,26 +803,26 @@ var_hrswrun(struct variable * vp, cp = strchr(string, ' '); if (cp != NULL) *cp = '\0'; -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) /* Should be path, but this is not available, just use argv[0] again */ strlcpy(string, proc_table[LowProcIndex].p_comm, sizeof(string)); cp = strchr(string, ' '); if (cp != NULL) *cp = '\0'; -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) #if defined(freebsd5) && __FreeBSD_version >= 500014 - strcpy(string, proc_table[LowProcIndex].ki_comm); + strlcpy(string, proc_table[LowProcIndex].ki_comm, sizeof(string)); #elif defined(dragonfly) && __DragonFly_version >= 190000 - strcpy(string, proc_table[LowProcIndex].kp_comm); + strlcpy(string, proc_table[LowProcIndex].kp_comm, sizeof(string)); #elif defined(openbsd5) - strcpy(string, proc_table[LowProcIndex].p_comm); + strlcpy(string, proc_table[LowProcIndex].p_comm, sizeof(string)); #else - strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm); + strlcpy(string, proc_table[LowProcIndex].kp_proc.p_comm, sizeof(string)); #endif #elif defined(linux) cp = get_proc_name_from_cmdline(pid,buf,sizeof(buf)-1); if (cp != NULL && *cp) /* argv[0] '\0' argv[1] '\0' .... */ - strcpy(string, cp); + strlcpy(string, cp, sizeof(string)); else { /* * swapped out - no cmdline @@ -842,7 +832,7 @@ var_hrswrun(struct variable * vp, *var_len = strlen(string); return (u_char *) string; } - strcpy(string, cp); + strlcpy(string, cp, sizeof(string)); } #elif defined(cygwin) /* if (lowproc.process_state & (PID_ZOMBIE | PID_EXITED)) */ @@ -869,7 +859,7 @@ var_hrswrun(struct variable * vp, } else strcpy(string, "* unknown"); #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif sprintf(string, "/bin/wombat"); @@ -900,7 +890,7 @@ var_hrswrun(struct variable * vp, if (proc_buf) { cp = strchr(proc_buf->pr_psargs, ' '); if (cp) - strcpy(string, cp + 1); + strlcpy(string, cp + 1, sizeof(string)); else string[0] = 0; } else @@ -911,7 +901,7 @@ var_hrswrun(struct variable * vp, cp++; if (*cp == ' ') cp++; - strcpy(string, cp); + strlcpy(string, cp, sizeof(string)); #endif #elif defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) cp = strchr(proc_table[LowProcIndex].pi_comm, ' '); @@ -920,7 +910,7 @@ var_hrswrun(struct variable * vp, sprintf(string, "%s", cp); } else string[0] = '\0'; -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) string[0] = 0; argv = kvm_getargv2(kd, proc_table + LowProcIndex, sizeof(string)); if (argv) @@ -931,7 +921,7 @@ var_hrswrun(struct variable * vp, strcat(string, *argv); argv++; } -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) string[0] = 0; argv = kvm_getargv(kd, proc_table + LowProcIndex, sizeof(string)); if (argv) @@ -972,11 +962,11 @@ var_hrswrun(struct variable * vp, while (*cp) ++cp; ++cp; - strcpy(string, cp); + strlcpy(string, cp, sizeof(string)); #elif defined(cygwin) string[0] = 0; #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif sprintf(string, "-h -q -v"); @@ -998,12 +988,12 @@ var_hrswrun(struct variable * vp, long_return = 2; /* kernel process */ } else long_return = 4; /* application */ -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) if (proc_table[LowProcIndex].p_flag & P_SYSTEM) long_return = 2; /* operatingSystem */ else long_return = 4; /* application */ -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) #if defined(freebsd5) && __FreeBSD_version >= 500014 if (proc_table[LowProcIndex].ki_flag & P_SYSTEM) { if (proc_table[LowProcIndex].ki_pri.pri_class == PRI_ITHD) @@ -1060,9 +1050,9 @@ var_hrswrun(struct variable * vp, break; } #else -#if HAVE_KVM_GETPROC2 +#ifdef HAVE_KVM_GETPROC2 switch (proc_table[LowProcIndex].p_stat) { -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) #if defined(freebsd5) && __FreeBSD_version >= 500014 switch (proc_table[LowProcIndex].ki_stat) { #elif defined(dragonfly) && __DragonFly_version >= 190000 @@ -1157,11 +1147,11 @@ var_hrswrun(struct variable * vp, #else long_return = proc_buf->p_utime * 100 + proc_buf->p_stime * 100; #endif -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) long_return = proc_table[LowProcIndex].p_uticks + proc_table[LowProcIndex].p_sticks + proc_table[LowProcIndex].p_iticks; -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) #if defined(NOT_DEFINED) && defined(freebsd5) && __FreeBSD_version >= 500014 /* XXX: Accessing ki_paddr causes sig10 ... long_return = proc_table[LowProcIndex].ki_paddr->p_uticks + @@ -1277,12 +1267,12 @@ var_hrswrun(struct variable * vp, #endif #elif defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return = proc_table[LowProcIndex].pi_size * getpagesize() / 1024; -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) long_return = proc_table[LowProcIndex].p_vm_tsize + proc_table[LowProcIndex].p_vm_ssize + proc_table[LowProcIndex].p_vm_dsize; long_return = long_return * (getpagesize() / 1024); -#elif HAVE_KVM_GETPROCS && !defined(darwin8) +#elif defined(HAVE_KVM_GETPROCS) && !defined(darwin8) #if defined(NOT_DEFINED) && defined(freebsd5) && __FreeBSD_version >= 500014 /* XXX long_return = proc_table[LowProcIndex].ki_vmspace->vm_tsize + @@ -1341,7 +1331,7 @@ var_hrswrun(struct variable * vp, } } #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 16 * 1024; /* XXX - 16M! */ @@ -1552,7 +1542,7 @@ Init_HR_SWRun(void) proc_table = realloc(proc_table, avail * sizeof(proc_table[0])); } } -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) { if (kd == NULL) { nproc = 0; @@ -1560,7 +1550,7 @@ Init_HR_SWRun(void) } proc_table = kvm_getproc2(kd, KERN_PROC_ALL, 0, sizeof (struct kinfo_proc2), &nproc); } -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) { if (kd == NULL) { nproc = 0; @@ -1586,7 +1576,7 @@ Init_HR_SWRun(void) bytes = nproc * sizeof(struct proc); if (proc_table) - free((char *) proc_table); + free(proc_table); if ((proc_table = (struct proc *) malloc(bytes)) == NULL) { nproc = 0; snmp_log_perror("Init_HR_SWRun-malloc"); @@ -1620,10 +1610,10 @@ Get_Next_HR_SWRun(void) return proc_table[current_proc_entry++].pst_pid; #elif defined(solaris2) return proc_table[current_proc_entry++]; -#elif HAVE_KVM_GETPROC2 +#elif defined(HAVE_KVM_GETPROC2) if (proc_table[current_proc_entry].p_stat != 0) return proc_table[current_proc_entry++].p_pid; -#elif HAVE_KVM_GETPROCS +#elif defined(HAVE_KVM_GETPROCS) #if defined(freebsd5) && __FreeBSD_version >= 500014 if (proc_table[current_proc_entry].ki_stat != 0) return proc_table[current_proc_entry++].ki_pid; diff --git a/agent/mibgroup/host/hr_system.c b/agent/mibgroup/host/hr_system.c index d99cc7d..59d6aae 100644 --- a/agent/mibgroup/host/hr_system.c +++ b/agent/mibgroup/host/hr_system.c @@ -16,7 +16,7 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -24,6 +24,7 @@ #include #include +#include #include "host.h" #include "host_res.h" @@ -35,7 +36,7 @@ #include "sys/proc.h" #endif #ifndef mingw32 -#if HAVE_UTMPX_H +#ifdef HAVE_UTMPX_H #include #else #include @@ -44,7 +45,7 @@ #include #include -#ifdef WIN32 +#ifdef HAVE_LM_H #include #endif @@ -78,13 +79,13 @@ #include #endif -netsnmp_feature_require(date_n_time) +netsnmp_feature_require(date_n_time); #if !defined(UTMP_FILE) && defined(_PATH_UTMP) #define UTMP_FILE _PATH_UTMP #endif -#if defined(UTMP_FILE) && !HAVE_UTMPX_H +#if defined(UTMP_FILE) && !defined(HAVE_UTMPX_H) void setutent(void); void endutent(void); struct utmp *getutent(void); @@ -114,7 +115,14 @@ static long get_max_solaris_processes(void); static int get_load_dev(void); static int count_users(void); extern int count_processes(void); -extern int swrun_count_processes(void); +#ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE +static int count_kthreads = 1; + +static void parse_count_kthreads(const char *token, const char *line) +{ + count_kthreads = atoi(line); +} +#endif /********************* * @@ -194,6 +202,11 @@ init_hr_system(void) #ifdef NPROC_SYMBOL auto_nlist(NPROC_SYMBOL, 0, 0); #endif +#ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE + snmpd_register_const_config_handler("count_kthreads", + parse_count_kthreads, NULL, + "0|1 0 to exclude kernel threads from hrSystemProcesses.0"); +#endif REGISTER_MIB("host/hr_system", hrsystem_variables, variable2, hrsystem_variables_oid); @@ -260,7 +273,7 @@ var_hrsys(struct variable * vp, #ifdef linux FILE *fp; #endif -#if NETSNMP_CAN_USE_SYSCTL && defined(CTL_KERN) && defined(KERN_MAXPROC) +#if defined(NETSNMP_CAN_USE_SYSCTL) && defined(CTL_KERN) && defined(KERN_MAXPROC) static int maxproc_mib[] = { CTL_KERN, KERN_MAXPROC }; size_t buf_size; #endif @@ -290,7 +303,7 @@ var_hrsys(struct variable * vp, case HRSYS_LOAD_PARAM: #ifdef linux if((fp = fopen("/proc/cmdline", "r")) != NULL) { - fgets(string, sizeof(string), fp); + NETSNMP_IGNORE_RESULT(fgets(string, sizeof(string), fp)); fclose(fp); } else { return NULL; @@ -305,7 +318,7 @@ var_hrsys(struct variable * vp, } strlcpy(string,bootparam,sizeof(string)); #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif sprintf(string, "ask Dave"); /* XXX */ @@ -316,12 +329,12 @@ var_hrsys(struct variable * vp, long_return = count_users(); return (u_char *) & long_return; case HRSYS_PROCS: -#if USING_HOST_DATA_ACCESS_SWRUN_MODULE - long_return = swrun_count_processes(); -#elif USING_HOST_HR_SWRUN_MODULE +#ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE + long_return = swrun_count_processes(count_kthreads); +#elif defined(USING_HOST_HR_SWRUN_MODULE) long_return = count_processes(); #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 0; @@ -330,7 +343,7 @@ var_hrsys(struct variable * vp, case HRSYS_MAXPROCS: #if defined(NR_TASKS) long_return = NR_TASKS; /* */ -#elif NETSNMP_CAN_USE_SYSCTL && defined(CTL_KERN) && defined(KERN_MAXPROC) +#elif defined(NETSNMP_CAN_USE_SYSCTL) && defined(CTL_KERN) && defined(KERN_MAXPROC) { int nproc = 0; @@ -354,7 +367,7 @@ var_hrsys(struct variable * vp, long_return = nproc; } #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 0; @@ -420,7 +433,7 @@ set_solaris_bootcommand_parameter(int action, case RESERVE2: { /* create copy of old value */ if(statP) { - int old_val_len=strlen(statP); + int old_val_len = strlen((const char *)statP); if(old_val_len >= sizeof(old_value)) { p_old_value=(char *)malloc(old_val_len+1); if(p_old_value==NULL) { @@ -428,7 +441,7 @@ set_solaris_bootcommand_parameter(int action, return SNMP_ERR_GENERR; } } - strlcpy(p_old_value,statP,old_val_len+1); + strlcpy(p_old_value, (const char *)statP, old_val_len+1); } else { p_old_value=NULL; } @@ -524,16 +537,16 @@ static long get_max_solaris_processes(void) { static long maxprocs=-1; /* assume only necessary to compute once, since /etc/system must be modified */ - if (maxprocs == -1) { - if ( (ksc=kstat_open()) != NULL && - (ks=kstat_lookup(ksc, "unix", 0, "var")) != NULL && - (kstat_read(ksc, ks, &v) != -1)) { - - maxprocs=v.v_proc; - } - if(ksc) { - kstat_close(ksc); - } + if (maxprocs >= 0) + return maxprocs; + + ksc = kstat_open(); + if (ksc) { + ks = kstat_lookup(ksc, NETSNMP_REMOVE_CONST(char *, "unix"), 0, + NETSNMP_REMOVE_CONST(char *, "var")); + if (ks && kstat_read(ksc, ks, &v) != -1) + maxprocs = v.v_proc; + kstat_close(ksc); } return maxprocs; @@ -585,7 +598,7 @@ ns_set_time(int action, minutes_from_utc=(int)var_val[10]; } - newtimetm.tm_sec=(int)var_val[6];; + newtimetm.tm_sec=(int)var_val[6]; newtimetm.tm_min=(int)var_val[5]; newtimetm.tm_hour=(int)var_val[4]; @@ -594,7 +607,8 @@ ns_set_time(int action, newtimetm.tm_mday=(int)var_val[3]; /* determine if day light savings time in effect DST */ - if ( ( hours_from_utc*60*60+minutes_from_utc*60 ) == abs(timezone) ) { + if (hours_from_utc*60*60+minutes_from_utc*60 == + (timezone >= 0 ? timezone : -timezone)) { newtimetm.tm_isdst=0; } else { newtimetm.tm_isdst=1; @@ -608,7 +622,11 @@ ns_set_time(int action, snmp_log(LOG_ERR, "Unable to convert time value\n"); return SNMP_ERR_GENERR; } +#ifdef HAVE_STIME status=stime(&seconds); +#else + status=-1; +#endif if(status!=0) { snmp_log(LOG_ERR, "Unable to set time\n"); return SNMP_ERR_GENERR; @@ -619,7 +637,11 @@ ns_set_time(int action, /* revert to old value */ int status=0; if(oldtime != 0) { +#ifdef HAVE_STIME status=stime(&oldtime); +#else + status=-1; +#endif oldtime=0; if(status!=0) { snmp_log(LOG_ERR, "Unable to set time\n"); @@ -654,7 +676,7 @@ count_users(void) { int total = 0; #ifndef WIN32 -#if HAVE_UTMPX_H +#ifdef HAVE_UTMPX_H #define setutent setutxent #define pututline pututxline #define getutent getutxent @@ -671,12 +693,11 @@ count_users(void) continue; #endif #ifndef UTMP_HAS_NO_PID - /* This block of code fixes zombie user PIDs in the + /* This block of code skips zombie user PIDs in the utmp/utmpx file that would otherwise be counted as a - current user */ + current user, but leaves updating the actual + utmp/utmpx file to the system. */ if (kill(utmp_p->ut_pid, 0) == -1 && errno == ESRCH) { - utmp_p->ut_type = DEAD_PROCESS; - pututline(utmp_p); continue; } #endif @@ -701,7 +722,7 @@ count_users(void) return total; } -#if defined(UTMP_FILE) && !HAVE_UTMPX_H +#if defined(UTMP_FILE) && !defined(HAVE_UTMPX_H) static FILE *utmp_file; static struct utmp utmp_rec; diff --git a/agent/mibgroup/host/hrh_filesys.c b/agent/mibgroup/host/hrh_filesys.c index 4aab6a0..fabeaa3 100644 --- a/agent/mibgroup/host/hrh_filesys.c +++ b/agent/mibgroup/host/hrh_filesys.c @@ -23,21 +23,22 @@ #include "hrh_filesys.h" #include "hrh_storage.h" #include "hr_disk.h" +#include "hr_filesys.h" #include -#if HAVE_MNTENT_H +#ifdef HAVE_MNTENT_H #include #endif -#if HAVE_SYS_MNTENT_H +#ifdef HAVE_SYS_MNTENT_H #include #endif -#if HAVE_SYS_MNTTAB_H +#ifdef HAVE_SYS_MNTTAB_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -48,10 +49,10 @@ #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif @@ -61,8 +62,8 @@ #include #endif -netsnmp_feature_require(date_n_time) -netsnmp_feature_require(ctime_to_timet) +netsnmp_feature_require(date_n_time); +netsnmp_feature_require(ctime_to_timet); #define HRFS_MONOTONICALLY_INCREASING @@ -72,17 +73,11 @@ netsnmp_feature_require(ctime_to_timet) * and internal forward declarations * *********************/ -netsnmp_fsys_info *HRFS_entry; #define FULL_DUMP 0 #define PART_DUMP 1 -extern void Init_HR_FileSys(void); -extern int Get_Next_HR_FileSys(void); -char *cook_device(char *); -static u_char *when_dumped(char *filesys, int level, size_t * length); -int header_hrhfilesys(struct variable *, oid *, size_t *, int, - size_t *, WriteMethod **); +static u_char *when_dumped(const char *filesys, int level, size_t *length); /********************* * @@ -141,11 +136,10 @@ init_hrh_filesys(void) * */ -int -header_hrhfilesys(struct variable *vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) +static int +header_hrhfilesys(struct variable *vp, oid *name, size_t *length, + int exact, size_t *var_len, WriteMethod **write_method, + const netsnmp_fsys_info **entry) { #define HRFSYS_ENTRY_NAME_LENGTH 11 oid newname[MAX_OID_LEN]; @@ -161,9 +155,10 @@ header_hrhfilesys(struct variable *vp, * Find "next" file system entry */ + *entry = NULL; Init_HR_FileSys(); for (;;) { - fsys_idx = Get_Next_HR_FileSys(); + fsys_idx = Get_Next_HR_FileSys(entry); if (fsys_idx == -1) break; newname[HRFSYS_ENTRY_NAME_LENGTH] = fsys_idx; @@ -189,7 +184,7 @@ header_hrhfilesys(struct variable *vp, memcpy((char *) name, (char *) newname, (vp->namelen + 1) * sizeof(oid)); *length = vp->namelen + 1; - *write_method = 0; + *write_method = NULL; *var_len = sizeof(long); /* default to 'long' results */ DEBUGMSGTL(("host/hr_filesys", "... get filesys stats ")); @@ -220,10 +215,12 @@ var_hrhfilesys(struct variable *vp, int exact, size_t * var_len, WriteMethod ** write_method) { int fsys_idx; - static char string[1024]; + static char *string; + static char empty_str[1]; + const netsnmp_fsys_info *entry = NULL; - fsys_idx = - header_hrhfilesys(vp, name, length, exact, var_len, write_method); + fsys_idx = header_hrhfilesys(vp, name, length, exact, var_len, write_method, + &entry); if (fsys_idx == MATCH_FAILED) return NULL; @@ -232,39 +229,43 @@ var_hrhfilesys(struct variable *vp, long_return = fsys_idx; return (u_char *) & long_return; case HRFSYS_MOUNT: - snprintf(string, sizeof(string), "%s", HRFS_entry->path); - string[ sizeof(string)-1 ] = 0; - *var_len = strlen(string); - return (u_char *) string; + free(string); + string = NULL; + *var_len = 0; + if (asprintf(&string, "%s", entry->path) >= 0) + *var_len = strlen(string); + return (u_char *)(string ? string : empty_str); case HRFSYS_RMOUNT: - if (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOTE) { - snprintf(string, sizeof(string), "%s", HRFS_entry->device); - string[ sizeof(string)-1 ] = 0; - } else - string[0] = '\0'; - *var_len = strlen(string); - return (u_char *) string; + free(string); + if (entry->flags & NETSNMP_FS_FLAG_REMOTE) { + if (asprintf(&string, "%s", entry->device) < 0) + string = NULL; + } else { + string = strdup(""); + } + *var_len = string ? strlen(string) : 0; + return (u_char *)(string ? string : empty_str); case HRFSYS_TYPE: - fsys_type_id[fsys_type_len - 1] = - (HRFS_entry->type > _NETSNMP_FS_TYPE_LOCAL ? - NETSNMP_FS_TYPE_OTHER : HRFS_entry->type); + fsys_type_id[fsys_type_len - 1] = + (entry->type > _NETSNMP_FS_TYPE_LOCAL ? + NETSNMP_FS_TYPE_OTHER : entry->type); *var_len = sizeof(fsys_type_id); return (u_char *) fsys_type_id; case HRFSYS_ACCESS: - long_return = HRFS_entry->flags & NETSNMP_FS_FLAG_RONLY ? 2 : 1; + long_return = entry->flags & NETSNMP_FS_FLAG_RONLY ? 2 : 1; return (u_char *) & long_return; case HRFSYS_BOOT: - long_return = HRFS_entry->flags & NETSNMP_FS_FLAG_BOOTABLE ? 1 : 2; + long_return = entry->flags & NETSNMP_FS_FLAG_BOOTABLE ? 1 : 2; return (u_char *) & long_return; case HRFSYS_STOREIDX: long_return = fsys_idx + NETSNMP_MEM_TYPE_MAX; return (u_char *) & long_return; case HRFSYS_FULLDUMP: - return when_dumped(HRFS_entry->path, FULL_DUMP, var_len); + return when_dumped(entry->path, FULL_DUMP, var_len); case HRFSYS_PARTDUMP: - return when_dumped(HRFS_entry->path, PART_DUMP, var_len); + return when_dumped(entry->path, PART_DUMP, var_len); default: DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_hrhfilesys\n", vp->magic)); @@ -278,43 +279,35 @@ var_hrhfilesys(struct variable *vp, * Internal implementation functions * *********************/ -static int HRFS_index; void Init_HR_FileSys(void) { netsnmp_cache *c = netsnmp_fsys_get_cache(); - netsnmp_cache_check_and_reload( c ); - - HRFS_entry = NULL; - HRFS_index = 0; + netsnmp_cache_check_and_reload(c); } int -Get_Next_HR_FileSys(void) +Get_Next_HR_FileSys(const netsnmp_fsys_info **entry) { - if ( HRFS_entry ) { - HRFS_entry = netsnmp_fsys_get_next( HRFS_entry ); - } else { - HRFS_entry = netsnmp_fsys_get_first(); - } + *entry = *entry ? netsnmp_fsys_get_next(*entry) : netsnmp_fsys_get_first(); /* Skip "inactive" entries */ - while ( HRFS_entry && !(HRFS_entry->flags & NETSNMP_FS_FLAG_ACTIVE)) - HRFS_entry = netsnmp_fsys_get_next( HRFS_entry ); + while (*entry && !((*entry)->flags & NETSNMP_FS_FLAG_ACTIVE)) + *entry = netsnmp_fsys_get_next(*entry); - HRFS_index = (HRFS_entry ? HRFS_entry->idx.oids[0] : -1 ); - return HRFS_index; + return *entry ? (*entry)->idx.oids[0] : -1; } static u_char * -when_dumped(char *filesys, int level, size_t * length) +when_dumped(const char *filesys, int level, size_t *length) { time_t dumpdate = 0, tmp; FILE *dump_fp; char line[1024]; - char *cp1, *cp2, *cp3; + const char *cp1; + char *cp2, *cp3; /* * Look for the relevent entries in /etc/dumpdates @@ -423,7 +416,13 @@ Get_FSSize(char *dev) } int -Check_HR_FileSys_NFS (void) +Check_HR_FileSys_NFS(const netsnmp_fsys_info *entry) +{ + return entry->flags & NETSNMP_FS_FLAG_REMOTE ? 1 : 0; +} + +int +Check_HR_FileSys_AutoFs(const netsnmp_fsys_info *entry) { - return (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOTE) ? 1 : 0; + return entry->type == NETSNMP_FS_TYPE_AUTOFS; } diff --git a/agent/mibgroup/host/hrh_filesys.h b/agent/mibgroup/host/hrh_filesys.h index 568917e..b440794 100644 --- a/agent/mibgroup/host/hrh_filesys.h +++ b/agent/mibgroup/host/hrh_filesys.h @@ -5,15 +5,18 @@ #ifndef _MIBGROUP_HRFSYS_H #define _MIBGROUP_HRFSYS_H +struct netsnmp_fsys_info_s; + extern void init_hrh_filesys(void); extern void Init_HR_FileSys(void); extern FindVarMethod var_hrhfilesys; -extern int Get_Next_HR_FileSys(void); -extern int Check_HR_FileSys_NFS(void); +extern int Get_Next_HR_FileSys(const struct netsnmp_fsys_info_s **entry); +extern int Check_HR_FileSys_NFS(const struct netsnmp_fsys_info_s *entry); +extern int Check_HR_FileSys_AutoFs(const struct netsnmp_fsys_info_s *entry); extern int Get_FSIndex(char *); extern long Get_FSSize(char *); /* Temporary */ -config_exclude( host/hr_filesys ) +config_exclude( host/hr_filesys ); #endif /* _MIBGROUP_HRFSYS_H */ diff --git a/agent/mibgroup/host/hrh_storage.c b/agent/mibgroup/host/hrh_storage.c index ca2f854..1f0b4e9 100644 --- a/agent/mibgroup/host/hrh_storage.c +++ b/agent/mibgroup/host/hrh_storage.c @@ -12,38 +12,38 @@ #include "hrh_filesys.h" #include "hrh_storage.h" #include "hr_disk.h" +#include "hr_filesys.h" #include #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # ifdef WIN32 # include # include -# include # else # include # endif # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -64,8 +64,6 @@ *********************/ -extern netsnmp_fsys_info *HRFS_entry; - static void parse_storage_config(const char *, char *); /********************* @@ -73,12 +71,9 @@ static void parse_storage_config(const char *, char *); * Initialisation & common implementation functions * *********************/ -int Get_Next_HR_Store(void); +int Get_Next_HR_Store(const struct netsnmp_fsys_info_s **entry); void Init_HR_Store(void); -int header_hrstore(struct variable *, oid *, size_t *, int, - size_t *, WriteMethod **); -void* header_hrstoreEntry(struct variable *, oid *, size_t *, - int, size_t *, WriteMethod **); + Netsnmp_Node_Handler handle_memsize; @@ -171,13 +166,10 @@ parse_storage_config(const char *token, char *cptr) * write_method * */ - -void * -header_hrstoreEntry(struct variable *vp, - oid * name, - size_t * length, - int exact, - size_t * var_len, WriteMethod ** write_method) +static void * +header_hrstoreEntry(struct variable *vp, oid *name, size_t *length, int exact, + size_t *var_len, WriteMethod **write_method, + const netsnmp_fsys_info **entry) { #define HRSTORE_ENTRY_NAME_LENGTH 11 oid newname[MAX_OID_LEN]; @@ -244,9 +236,10 @@ header_hrstoreEntry(struct variable *vp, * then consider the disk-based storage. */ else { + *entry = NULL; Init_HR_Store(); for (;;) { - storage_idx = Get_Next_HR_Store(); + storage_idx = Get_Next_HR_Store(entry); DEBUGMSG(("host/hr_storage", "(index %d ....", storage_idx)); if (storage_idx == -1) break; @@ -357,24 +350,27 @@ var_hrstore(struct variable *vp, int store_idx = 0; static char string[1024]; void *ptr; + const netsnmp_fsys_info *entry = NULL; netsnmp_memory_info *mem = NULL; really_try_next: - ptr = header_hrstoreEntry(vp, name, length, exact, var_len, - write_method); - if (ptr == NULL) - return NULL; - - store_idx = name[ HRSTORE_ENTRY_NAME_LENGTH ]; - if (HRFS_entry && - store_idx > NETSNMP_MEM_TYPE_MAX && - netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) && - Check_HR_FileSys_NFS()) - return NULL; - if (store_idx <= NETSNMP_MEM_TYPE_MAX ) { - mem = (netsnmp_memory_info*)ptr; - } + ptr = header_hrstoreEntry(vp, name, length, exact, var_len, write_method, + &entry); + if (ptr == NULL) + return NULL; + + store_idx = name[ HRSTORE_ENTRY_NAME_LENGTH ]; + if (entry && + store_idx > NETSNMP_MEM_TYPE_MAX && + netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) && + Check_HR_FileSys_NFS(entry)) + return NULL; + if (entry && Check_HR_FileSys_AutoFs(entry)) + return NULL; + if (store_idx <= NETSNMP_MEM_TYPE_MAX ) { + mem = (netsnmp_memory_info*)ptr; + } @@ -384,9 +380,9 @@ var_hrstore(struct variable *vp, return (u_char *) & long_return; case HRSTORE_TYPE: if (store_idx > NETSNMP_MEM_TYPE_MAX) - if (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOTE ) + if (entry->flags & NETSNMP_FS_FLAG_REMOTE && storageUseNFS) storage_type_id[storage_type_len - 1] = 10; /* Network Disk */ - else if (HRFS_entry->flags & NETSNMP_FS_FLAG_REMOVE ) + else if (entry->flags & NETSNMP_FS_FLAG_REMOVE ) storage_type_id[storage_type_len - 1] = 5; /* Removable Disk */ else storage_type_id[storage_type_len - 1] = 4; /* Assume fixed */ @@ -408,7 +404,7 @@ var_hrstore(struct variable *vp, return (u_char *) storage_type_id; case HRSTORE_DESCR: if (store_idx > NETSNMP_MEM_TYPE_MAX) { - strlcpy(string, HRFS_entry->path, sizeof(string)); + strlcpy(string, entry->path, sizeof(string)); *var_len = strlen(string); return (u_char *) string; } else { @@ -420,48 +416,48 @@ var_hrstore(struct variable *vp, case HRSTORE_UNITS: if (store_idx > NETSNMP_MEM_TYPE_MAX) { if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_REALSTORAGEUNITS)) - long_return = HRFS_entry->units & 0xffffffff; + NETSNMP_DS_AGENT_REALSTORAGEUNITS)) + long_return = entry->units & 0x7fffffff; else - long_return = HRFS_entry->units_32; + long_return = entry->units_32; } else { if ( !mem || mem->units == -1 ) goto try_next; - long_return = mem->units; + long_return = mem->units & 0x7fffffff; } return (u_char *) & long_return; case HRSTORE_SIZE: if (store_idx > NETSNMP_MEM_TYPE_MAX) { if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_REALSTORAGEUNITS)) - long_return = HRFS_entry->size & 0xffffffff; + NETSNMP_DS_AGENT_REALSTORAGEUNITS)) + long_return = entry->size & 0x7fffffff; else - long_return = HRFS_entry->size_32; + long_return = entry->size_32; } else { if ( !mem || mem->size == -1 ) goto try_next; - long_return = mem->size; + long_return = mem->size & 0x7fffffff; } return (u_char *) & long_return; case HRSTORE_USED: if (store_idx > NETSNMP_MEM_TYPE_MAX) { if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_REALSTORAGEUNITS)) - long_return = HRFS_entry->used & 0xffffffff; + NETSNMP_DS_AGENT_REALSTORAGEUNITS)) + long_return = entry->used & 0x7fffffff; else - long_return = HRFS_entry->used_32; + long_return = entry->used_32; } else { if ( !mem || mem->size == -1 || mem->free == -1 ) goto try_next; - long_return = mem->size - mem->free; + long_return = (mem->size - mem->free) & 0x7fffffff; } return (u_char *) & long_return; case HRSTORE_FAILS: if (store_idx > NETSNMP_MEM_TYPE_MAX) -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES goto try_next; #else - long_return = 0; + long_return = 0; #endif else { if ( !mem || mem->other == -1 ) @@ -475,7 +471,7 @@ var_hrstore(struct variable *vp, } return NULL; - try_next: +try_next: if (!exact) goto really_try_next; @@ -489,32 +485,28 @@ var_hrstore(struct variable *vp, * *********************/ -static int HRS_index; - void Init_HR_Store(void) { - HRS_index = 0; Init_HR_FileSys(); } int -Get_Next_HR_Store(void) +Get_Next_HR_Store(const struct netsnmp_fsys_info_s **entry) { /* * File-based storage */ - for (;;) { - HRS_index = Get_Next_HR_FileSys(); - if (HRS_index >= 0) { - if (!(netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) && - Check_HR_FileSys_NFS())) { - return HRS_index + NETSNMP_MEM_TYPE_MAX; - } - } else { - return -1; - } - } + for (;;) { + Get_Next_HR_FileSys(entry); + if (!*entry) + return -1; + if (!(netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) && + Check_HR_FileSys_NFS(*entry)) && + !Check_HR_FileSys_AutoFs(*entry)) { + return (*entry)->idx.oids[0] + NETSNMP_MEM_TYPE_MAX; + } + } } diff --git a/agent/mibgroup/host/hrh_storage.h b/agent/mibgroup/host/hrh_storage.h index e872345..a44f28b 100644 --- a/agent/mibgroup/host/hrh_storage.h +++ b/agent/mibgroup/host/hrh_storage.h @@ -5,11 +5,11 @@ #ifndef _MIBGROUP_HRSTORAGE_H #define _MIBGROUP_HRSTORAGE_H -config_require(hardware/memory) -config_require(hardware/fsys) -config_require(host/hrh_filesys) +config_require(hardware/memory); +config_require(hardware/fsys); +config_require(host/hrh_filesys); -config_exclude( host/hr_storage ) +config_exclude( host/hr_storage ); extern void init_hrh_storage(void); extern FindVarMethod var_hrstore; diff --git a/agent/mibgroup/host_res.h b/agent/mibgroup/host_res.h index 1dba388..5b163c5 100644 --- a/agent/mibgroup/host_res.h +++ b/agent/mibgroup/host_res.h @@ -7,7 +7,7 @@ #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -21,19 +21,19 @@ #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif -#if HAVE_NETINET_IN_VAR_H +#ifdef HAVE_NETINET_IN_VAR_H #ifdef HAVE_SYS_QUEUE_H #include #endif diff --git a/agent/mibgroup/if-mib.h b/agent/mibgroup/if-mib.h index 998a46b..fcfe351 100644 --- a/agent/mibgroup/if-mib.h +++ b/agent/mibgroup/if-mib.h @@ -4,4 +4,4 @@ config_require(if-mib/ifTable); config_require(if-mib/ifXTable); -config_add_mib(IF-MIB) +config_add_mib(IF-MIB); diff --git a/agent/mibgroup/if-mib/data_access/interface.c b/agent/mibgroup/if-mib/data_access/interface.c index 26e31fc..3f1b392 100644 --- a/agent/mibgroup/if-mib/data_access/interface.c +++ b/agent/mibgroup/if-mib/data_access/interface.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -14,14 +15,21 @@ #include "mibII/mibII_common.h" #include "if-mib/ifTable/ifTable.h" #include "if-mib/data_access/interface.h" +#include "interface_private.h" +#if defined(HAVE_PCRE_H) +#include +#elif defined(HAVE_REGEX_H) +#include +#include +#endif -netsnmp_feature_child_of(interface_all, libnetsnmpmibs) -netsnmp_feature_child_of(interface, interface_all) -netsnmp_feature_child_of(interface_access_entry_set_admin_status, interface_all) -netsnmp_feature_child_of(interface_legacy, interface_all) +netsnmp_feature_child_of(interface_all, libnetsnmpmibs); +netsnmp_feature_child_of(interface, interface_all); +netsnmp_feature_child_of(interface_access_entry_set_admin_status, interface_all); +netsnmp_feature_child_of(interface_legacy, interface_all); #ifdef NETSNMP_FEATURE_REQUIRE_INTERFACE_ACCESS_ENTRY_SET_ADMIN_STATUS -netsnmp_feature_require(interface_arch_set_admin_status) +netsnmp_feature_require(interface_arch_set_admin_status); #endif /* NETSNMP_FEATURE_REQUIRE_INTERFACE_ACCESS_ENTRY_SET_ADMIN_STATUS */ /**---------------------------------------------------------------------*/ @@ -31,38 +39,33 @@ netsnmp_feature_require(interface_arch_set_admin_status) static netsnmp_conf_if_list *conf_list = NULL; static int need_wrap_check = -1; static int _access_interface_init = 0; +static netsnmp_include_if_list *include_list; +static int ifmib_max_num_ifaces = 0; /* * local static prototypes */ static int _access_interface_entry_compare_name(const void *lhs, const void *rhs); -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH static void _access_interface_entry_release(netsnmp_interface_entry * entry, void *unused); -#endif static void _access_interface_entry_save_name(const char *name, oid index); static void _parse_interface_config(const char *token, char *cptr); +static void _parse_ifmib_max_num_ifaces(const char *token, char *cptr); static void _free_interface_config(void); +static void _parse_include_if_config(const char *token, char *cptr); +static void _free_include_if_config(void); -/**---------------------------------------------------------------------*/ /* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. + * This function is called after the snmpd configuration has been read + * and loads the interface list if it has not yet been loaded. */ -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH -extern void netsnmp_arch_interface_init(void); -extern int -netsnmp_arch_interface_container_load(netsnmp_container* container, - u_int load_flags); -extern int -netsnmp_arch_set_admin_status(netsnmp_interface_entry * entry, - int ifAdminStatus); -extern int netsnmp_arch_interface_index_find(const char*name); -#endif - +static int +_load_if_list(int majorID, int minorID, void *serverargs, void *clientarg) +{ + netsnmp_access_interface_init(); + return 0; +} /** * initialization @@ -73,20 +76,31 @@ init_interface(void) snmpd_register_config_handler("interface", _parse_interface_config, _free_interface_config, "name type speed"); -} + snmpd_register_config_handler("ifmib_max_num_ifaces", + _parse_ifmib_max_num_ifaces, + NULL, + "IF-MIB MAX Number of ifaces"); + + snmpd_register_config_handler("include_ifmib_iface_prefix", + _parse_include_if_config, + _free_include_if_config, + "IF-MIB iface names included"); + + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_POST_READ_CONFIG, + _load_if_list, NULL); +} +/* May be called multiple times. */ void netsnmp_access_interface_init(void) { - netsnmp_assert(0 == _access_interface_init); /* who is calling twice? */ - if (1 == _access_interface_init) return; _access_interface_init = 1; -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH { netsnmp_container * ifcontainer; @@ -99,7 +113,6 @@ netsnmp_access_interface_init(void) if(NULL != ifcontainer) netsnmp_access_interface_container_free(ifcontainer, 0); } -#endif } /**---------------------------------------------------------------------*/ @@ -150,7 +163,6 @@ netsnmp_access_interface_container_init(u_int flags) * @retval NULL error * @retval !NULL pointer to container */ -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH netsnmp_container* netsnmp_access_interface_container_load(netsnmp_container* container, u_int load_flags) { @@ -209,7 +221,6 @@ netsnmp_access_interface_index_find(const char *name) return netsnmp_arch_interface_index_find(name); } -#endif /**---------------------------------------------------------------------*/ /* @@ -296,15 +307,15 @@ netsnmp_access_interface_entry_create(const char *name, oid if_index) /* * get if index, and save name for reverse lookup */ -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH if (0 == if_index) entry->index = netsnmp_access_interface_index_find(name); else -#endif entry->index = if_index; + netsnmp_assert(entry->index != 0); _access_interface_entry_save_name(name, entry->index); - entry->descr = strdup(name); + if (name) + entry->descr = strdup(name); /* * make some assumptions @@ -312,7 +323,7 @@ netsnmp_access_interface_entry_create(const char *name, oid if_index) entry->connector_present = 1; entry->oid_index.len = 1; - entry->oid_index.oids = (oid *) & entry->index; + entry->oid_index.oids = &entry->index; return entry; } @@ -332,18 +343,10 @@ netsnmp_access_interface_entry_free(netsnmp_interface_entry * entry) * since the whole entry is about to be freed */ - if (NULL != entry->old_stats) - free(entry->old_stats); - - if (NULL != entry->name) - free(entry->name); - - if (NULL != entry->descr) - free(entry->descr); - - if (NULL != entry->paddr) - free(entry->paddr); - + free(entry->old_stats); + free(entry->name); + free(entry->descr); + free(entry->paddr); free(entry); } @@ -433,7 +436,6 @@ Interface_Scan_NextInt(int *index, char *name, netsnmp_interface_entry **entry, * @retval 0 : success * @retval < 0 : error */ -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH int netsnmp_access_interface_entry_set_admin_status(netsnmp_interface_entry * entry, int ifAdminStatus) @@ -455,7 +457,6 @@ netsnmp_access_interface_entry_set_admin_status(netsnmp_interface_entry * entry, return rc; } -#endif #endif /* NETSNMP_FEATURE_REMOVE_INTERFACE_ACCESS_ENTRY_SET_ADMIN_STATUS */ /**---------------------------------------------------------------------*/ @@ -472,7 +473,6 @@ _access_interface_entry_compare_name(const void *lhs, const void *rhs) ((const netsnmp_interface_entry *) rhs)->name); } -#ifndef NETSNMP_ACCESS_INTERFACE_NOARCH /** */ static void @@ -480,7 +480,6 @@ _access_interface_entry_release(netsnmp_interface_entry * entry, void *context) { netsnmp_access_interface_entry_free(entry); } -#endif /** */ @@ -671,7 +670,6 @@ netsnmp_access_interface_entry_calculate_stats(netsnmp_interface_entry *entry) * copy interface entry data (after checking for counter wraps) * * @retval -2 : malloc failed - * @retval -1 : interfaces not the same * @retval 0 : no error */ int @@ -679,11 +677,6 @@ netsnmp_access_interface_entry_copy(netsnmp_interface_entry * lhs, netsnmp_interface_entry * rhs) { DEBUGMSGTL(("access:interface", "copy\n")); - - if ((NULL == lhs) || (NULL == rhs) || - (NULL == lhs->name) || (NULL == rhs->name) || - (0 != strncmp(lhs->name, rhs->name, strlen(rhs->name)))) - return -1; /* * update stats @@ -695,14 +688,11 @@ netsnmp_access_interface_entry_copy(netsnmp_interface_entry * lhs, * update data */ lhs->ns_flags = rhs->ns_flags; - if((NULL != lhs->descr) && (NULL != rhs->descr) && - (0 == strcmp(lhs->descr, rhs->descr))) - ; - else { + if (!lhs->descr || !rhs->descr || strcmp(lhs->descr, rhs->descr) != 0) { SNMP_FREE(lhs->descr); if (rhs->descr) { lhs->descr = strdup(rhs->descr); - if(NULL == lhs->descr) + if (!lhs->descr) return -2; } } @@ -798,6 +788,74 @@ netsnmp_access_interface_entry_overrides(netsnmp_interface_entry *entry) } } +/* + * ifmib_max_num_ifaces config token + * + * Users may configure a maximum number if interfaces for + * the IF-MIB to include. This is useful in case there are + * a large number of interfaces (bridges, bonds, SVIs) that + * can slow things down. + */ +int netsnmp_access_interface_max_reached(const char *name) +{ + if (!name) + return FALSE; + + if (ifmib_max_num_ifaces == 0) + /* nothing was set as a max so we include it all */ + return FALSE; + + if (netsnmp_arch_interface_index_find(name) > ifmib_max_num_ifaces) + /* We have gone over the max configured iface count */ + return TRUE; + + return FALSE; +} + +/* + * include_ifmib_iface_prefix config token + * + * If and only if there is an iface prefix name match, we return TRUE. + * If there are no ifaces defined at all, return 1 so that the + * default behavior is to include all ifaces (include everything). + * (Note: including at least one iface prefix means we will only include + * those iface names that match the prefix and exclude all others.) + */ +int netsnmp_access_interface_include(const char *name) +{ + netsnmp_include_if_list *if_ptr; +#ifdef HAVE_PCRE_H + int found_ndx[3]; +#endif + + if (!name) + return TRUE; + + if (!include_list) + /* + * If include_ifmib_iface_prefix was not configured, we should include + * all interfaces (which is the default). + */ + return TRUE; + + + for (if_ptr = include_list; if_ptr; if_ptr = if_ptr->next) { +#if defined(HAVE_PCRE_H) + if (pcre_exec(if_ptr->regex_ptr, NULL, name, strlen(name), 0, 0, + found_ndx, 3) >= 0) + return TRUE; +#elif defined(HAVE_REGEX_H) + if (regexec(if_ptr->regex_ptr, name, 0, NULL, 0) == 0) + return TRUE; +#else + if (strncmp(name, if_ptr->name, strlen(if_ptr->name)) == 0) + return TRUE; +#endif + } + + return FALSE; +} + /**---------------------------------------------------------------------*/ /* * interface config token @@ -873,3 +931,131 @@ _free_interface_config(void) } conf_list = NULL; } + +/* + * Maximum number of interfaces to include in IF-MIB + */ +static void +_parse_ifmib_max_num_ifaces(const char *token, char *cptr) +{ + int temp_max; + char *name, *st; + + errno = 0; + name = strtok_r(cptr, " \t", &st); + if (!name) { + config_perror("Missing NUMBER parameter"); + return; + } + if (sscanf(cptr, "%d", &temp_max) != 1) { + config_perror("Error converting parameter"); + return; + } + + ifmib_max_num_ifaces = temp_max; +} + + +/* + * include interface config token + */ +static void +_parse_include_if_config(const char *token, char *cptr) +{ + netsnmp_include_if_list *if_ptr, *if_new; + char *name, *st; +#if defined(HAVE_PCRE_H) + const char *pcre_error; + int pcre_error_offset; +#elif defined(HAVE_REGEX_H) + int r = 0; +#endif + + name = strtok_r(cptr, " \t", &st); + if (!name) { + config_perror("Missing NAME parameter"); + return; + } + + /* check for duplicate prefix configuration */ + while (name != NULL) { + for (if_ptr = include_list; if_ptr; if_ptr = if_ptr->next) { + if (strncmp(name, if_ptr->name, strlen(if_ptr->name)) == 0) { + config_pwarn("Duplicate include interface prefix specification"); + return; + } + } + /* now save the prefixes */ + if_new = SNMP_MALLOC_TYPEDEF(netsnmp_include_if_list); + if (!if_new) { + config_perror("Out of memory"); + goto err; + } + if_new->name = strdup(name); + if (!if_new->name) { + config_perror("Out of memory"); + goto err; + } +#if defined(HAVE_PCRE_H) + if_new->regex_ptr = pcre_compile(if_new->name, 0, &pcre_error, + &pcre_error_offset, NULL); + if (!if_new->regex_ptr) { + config_perror(pcre_error); + goto err; + } +#elif defined(HAVE_REGEX_H) + if_new->regex_ptr = malloc(sizeof(regex_t)); + if (!if_new->regex_ptr) { + config_perror("Out of memory"); + goto err; + } + r = regcomp(if_new->regex_ptr, if_new->name, REG_NOSUB); + if (r) { + char buf[BUFSIZ]; + size_t regerror_len = 0; + + regerror_len = regerror(r, if_new->regex_ptr, buf, BUFSIZ); + if (regerror_len >= BUFSIZ) + buf[BUFSIZ - 1] = '\0'; + else + buf[regerror_len] = '\0'; + config_perror(buf); + goto err; + } +#endif + if_new->next = include_list; + include_list = if_new; + if_new = NULL; + name = strtok_r(NULL, " \t", &st); + } + return; + +err: + if (if_new) { +#if defined(HAVE_PCRE_H) || defined(HAVE_REGEX_H) + free(if_new->regex_ptr); +#endif + free(if_new->name); + } + free(if_new); +} + +static void +_free_include_if_config(void) +{ + netsnmp_include_if_list *if_ptr = include_list, *if_next; + + while (if_ptr) { + if_next = if_ptr->next; +#if defined(HAVE_PCRE_H) + free(if_ptr->regex_ptr); +#elif defined(HAVE_REGEX_H) + regfree(if_ptr->regex_ptr); + free(if_ptr->regex_ptr); +#endif + free(if_ptr->name); + free(if_ptr); + if_ptr = if_next; + } + include_list = NULL; +} diff --git a/agent/mibgroup/if-mib/data_access/interface.h b/agent/mibgroup/if-mib/data_access/interface.h index 353b254..d6e7dfe 100644 --- a/agent/mibgroup/if-mib/data_access/interface.h +++ b/agent/mibgroup/if-mib/data_access/interface.h @@ -9,7 +9,7 @@ /* * all platforms use this generic code */ -config_require(if-mib/data_access/interface) +config_require(if-mib/data_access/interface); /**---------------------------------------------------------------------*/ /* @@ -26,33 +26,23 @@ config_require(if-mib/data_access/interface) * be handled in the *_hpux.h header file. */ -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES - -config_exclude(mibII/interfaces) - -# if defined( linux ) - - config_require(util_funcs) - config_require(if-mib/data_access/interface_linux) - config_require(if-mib/data_access/interface_ioctl) - -# elif defined( openbsd3 ) || \ - defined( freebsd4 ) || defined( freebsd5 ) || defined( freebsd6 ) || \ - defined( darwin ) || defined( dragonfly ) || defined( netbsd1 ) - - config_require(if-mib/data_access/interface_sysctl) - -# elif defined( solaris2 ) - - config_require(if-mib/data_access/interface_solaris2) - -# else - - config_error(This platform does not yet support IF-MIB rewrites) - -# endif +config_exclude(mibII/interfaces); + +#if defined(linux) +config_require(util_funcs); +config_require(if-mib/data_access/interface_linux); +config_require(if-mib/data_access/interface_ioctl); +#elif defined( openbsd3 ) || \ + defined( freebsd4 ) || defined( freebsd5 ) || defined( freebsd6 ) || \ + defined( darwin ) || defined( dragonfly ) || defined( netbsd1 ) +config_require(if-mib/data_access/interface_sysctl); +#elif defined(solaris2) +config_require(if-mib/data_access/interface_solaris2); +#elif defined(HAVE_IPHLPAPI_H) && !defined(cygwin) +config_require(if-mib/data_access/interface_iphlpapi); #else -# define NETSNMP_ACCESS_INTERFACE_NOARCH 1 +config_warning(This platform does not yet support the IF-MIB); +config_require(if-mib/data_access/interface_unsup); #endif #endif /* NETSNMP_ACCESS_INTERFACE_CONFIG_H */ diff --git a/agent/mibgroup/if-mib/data_access/interface_ioctl.c b/agent/mibgroup/if-mib/data_access/interface_ioctl.c index db2c245..9ab1657 100644 --- a/agent/mibgroup/if-mib/data_access/interface_ioctl.c +++ b/agent/mibgroup/if-mib/data_access/interface_ioctl.c @@ -14,7 +14,7 @@ #include #include "if-mib/data_access/interface.h" -netsnmp_feature_child_of(interface_ioctl_flags_set, interface_all) +netsnmp_feature_child_of(interface_ioctl_flags_set, interface_all); #ifdef HAVE_NET_IF_H #include @@ -72,10 +72,8 @@ _ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name) strlcpy(ifrq->ifr_name, name, sizeof(ifrq->ifr_name)); rc = ioctl(fd, which, ifrq); - if (rc < 0) { - snmp_log(LOG_ERR,"ioctl %d returned %d\n", which, rc); + if (rc < 0) rc = -3; - } if(ourfd >= 0) close(ourfd); @@ -83,6 +81,78 @@ _ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name) return rc; } +int netsnmp_convert_arphrd_type(int arphrd_type) +{ + /* + * arphrd defines vary greatly. ETHER seems to be the only common one + */ +#ifdef ARPHRD_ETHER + switch (arphrd_type) { + case ARPHRD_ETHER: + return IANAIFTYPE_ETHERNETCSMACD; +#if defined(ARPHRD_TUNNEL) || defined(ARPHRD_IPGRE) || defined(ARPHRD_SIT) +#ifdef ARPHRD_TUNNEL + case ARPHRD_TUNNEL: + case ARPHRD_TUNNEL6: +#endif +#ifdef ARPHRD_IPGRE + case ARPHRD_IPGRE: +#endif +#ifdef ARPHRD_SIT + case ARPHRD_SIT: +#endif + return IANAIFTYPE_TUNNEL; +#endif +#ifdef ARPHRD_INFINIBAND + case ARPHRD_INFINIBAND: + return IANAIFTYPE_INFINIBAND; +#endif +#ifdef ARPHRD_SLIP + case ARPHRD_SLIP: + case ARPHRD_CSLIP: + case ARPHRD_SLIP6: + case ARPHRD_CSLIP6: + return IANAIFTYPE_SLIP; +#endif +#ifdef ARPHRD_PPP + case ARPHRD_PPP: + return IANAIFTYPE_PPP; +#endif +#ifdef ARPHRD_LOOPBACK + case ARPHRD_LOOPBACK: + return IANAIFTYPE_SOFTWARELOOPBACK; +#endif +#ifdef ARPHRD_FDDI + case ARPHRD_FDDI: + return IANAIFTYPE_FDDI; +#endif +#ifdef ARPHRD_ARCNET + case ARPHRD_ARCNET: + return IANAIFTYPE_ARCNET; +#endif +#ifdef ARPHRD_LOCALTLK + case ARPHRD_LOCALTLK: + return IANAIFTYPE_LOCALTALK; +#endif +#ifdef ARPHRD_HIPPI + case ARPHRD_HIPPI: + return IANAIFTYPE_HIPPI; +#endif +#ifdef ARPHRD_ATM + case ARPHRD_ATM: + return IANAIFTYPE_ATM; +#endif + /* + * XXX: more if_arp.h:ARPHRD_xxx to IANAifType mappings... + */ + default: + DEBUGMSGTL(("access:interface:ioctl", "unknown entry type %d\n", + arphrd_type)); + return IANAIFTYPE_OTHER; + } /* switch */ +#endif /* ARPHRD_LOOPBACK */ +} + #ifdef SIOCGIFHWADDR /** * interface entry physaddr ioctl wrapper @@ -129,91 +199,11 @@ netsnmp_access_interface_ioctl_physaddr_get(int fd, rc = _ioctl_get(fd, SIOCGIFHWADDR, &ifrq, ifentry->name); if (rc < 0) { memset(ifentry->paddr, (0), IFHWADDRLEN); - rc = -3; /* msg already logged */ - } - else { + rc = -3; + } else { memcpy(ifentry->paddr, ifrq.ifr_hwaddr.sa_data, IFHWADDRLEN); - - /* - * arphrd defines vary greatly. ETHER seems to be the only common one - */ -#ifdef ARPHRD_ETHER - switch (ifrq.ifr_hwaddr.sa_family) { - case ARPHRD_ETHER: - ifentry->type = IANAIFTYPE_ETHERNETCSMACD; - break; -#if defined(ARPHRD_TUNNEL) || defined(ARPHRD_IPGRE) || defined(ARPHRD_SIT) -#ifdef ARPHRD_TUNNEL - case ARPHRD_TUNNEL: - case ARPHRD_TUNNEL6: -#endif -#ifdef ARPHRD_IPGRE - case ARPHRD_IPGRE: -#endif -#ifdef ARPHRD_SIT - case ARPHRD_SIT: -#endif - ifentry->type = IANAIFTYPE_TUNNEL; - break; /* tunnel */ -#endif -#ifdef ARPHRD_INFINIBAND - case ARPHRD_INFINIBAND: - ifentry->type = IANAIFTYPE_INFINIBAND; - break; -#endif -#ifdef ARPHRD_SLIP - case ARPHRD_SLIP: - case ARPHRD_CSLIP: - case ARPHRD_SLIP6: - case ARPHRD_CSLIP6: - ifentry->type = IANAIFTYPE_SLIP; - break; /* slip */ -#endif -#ifdef ARPHRD_PPP - case ARPHRD_PPP: - ifentry->type = IANAIFTYPE_PPP; - break; /* ppp */ -#endif -#ifdef ARPHRD_LOOPBACK - case ARPHRD_LOOPBACK: - ifentry->type = IANAIFTYPE_SOFTWARELOOPBACK; - break; /* softwareLoopback */ -#endif -#ifdef ARPHRD_FDDI - case ARPHRD_FDDI: - ifentry->type = IANAIFTYPE_FDDI; - break; -#endif -#ifdef ARPHRD_ARCNET - case ARPHRD_ARCNET: - ifentry->type = IANAIFTYPE_ARCNET; - break; -#endif -#ifdef ARPHRD_LOCALTLK - case ARPHRD_LOCALTLK: - ifentry->type = IANAIFTYPE_LOCALTALK; - break; -#endif -#ifdef ARPHRD_HIPPI - case ARPHRD_HIPPI: - ifentry->type = IANAIFTYPE_HIPPI; - break; -#endif -#ifdef ARPHRD_ATM - case ARPHRD_ATM: - ifentry->type = IANAIFTYPE_ATM; - break; -#endif - /* - * XXX: more if_arp.h:ARPHRD_xxx to IANAifType mappings... - */ - default: - DEBUGMSGTL(("access:interface:ioctl", "unknown entry type %d\n", - ifrq.ifr_hwaddr.sa_family)); - ifentry->type = IANAIFTYPE_OTHER; - } /* switch */ -#endif /* ARPHRD_LOOPBACK */ - + ifentry->type = + netsnmp_convert_arphrd_type(ifrq.ifr_hwaddr.sa_family); } } @@ -221,6 +211,40 @@ netsnmp_access_interface_ioctl_physaddr_get(int fd, } #endif /* SIOCGIFHWADDR */ +void +netsnmp_process_link_flags(netsnmp_interface_entry *ifentry, + unsigned int os_flags) +{ + ifentry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_IF_FLAGS; + ifentry->os_flags = os_flags; + + /* + * ifOperStatus description: + * If ifAdminStatus is down(2) then ifOperStatus should be down(2). + */ + if (ifentry->os_flags & IFF_UP) { + ifentry->admin_status = IFADMINSTATUS_UP; + if (ifentry->os_flags & IFF_RUNNING) + ifentry->oper_status = IFOPERSTATUS_UP; + else + ifentry->oper_status = IFOPERSTATUS_DOWN; + } else { + ifentry->admin_status = IFADMINSTATUS_DOWN; + ifentry->oper_status = IFOPERSTATUS_DOWN; + } + + /* + * ifConnectorPresent description: + * This object has the value 'true(1)' if the interface sublayer has a + * physical connector and the value 'false(2)' otherwise." + * So, at very least, false(2) should be returned for loopback devices. + */ + if (ifentry->os_flags & IFF_LOOPBACK) { + ifentry->connector_present = 0; + } else { + ifentry->connector_present = 1; + } +} #ifdef SIOCGIFFLAGS /** @@ -246,40 +270,9 @@ netsnmp_access_interface_ioctl_flags_get(int fd, rc = _ioctl_get(fd, SIOCGIFFLAGS, &ifrq, ifentry->name); if (rc < 0) { ifentry->ns_flags &= ~NETSNMP_INTERFACE_FLAGS_HAS_IF_FLAGS; - return rc; /* msg already logged */ - } - else { - ifentry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_IF_FLAGS; - ifentry->os_flags = ifrq.ifr_flags; - - /* - * ifOperStatus description: - * If ifAdminStatus is down(2) then ifOperStatus should be down(2). - */ - if(ifentry->os_flags & IFF_UP) { - ifentry->admin_status = IFADMINSTATUS_UP; - if(ifentry->os_flags & IFF_RUNNING) - ifentry->oper_status = IFOPERSTATUS_UP; - else - ifentry->oper_status = IFOPERSTATUS_DOWN; - } - else { - ifentry->admin_status = IFADMINSTATUS_DOWN; - ifentry->oper_status = IFOPERSTATUS_DOWN; - } - - /* - * ifConnectorPresent description: - * This object has the value 'true(1)' if the interface sublayer has a - * physical connector and the value 'false(2)' otherwise." - * So, at very least, false(2) should be returned for loopback devices. - */ - if(ifentry->os_flags & IFF_LOOPBACK) { - ifentry->connector_present = 0; - } - else { - ifentry->connector_present = 1; - } + return rc; + } else { + netsnmp_process_link_flags(ifentry, ifrq.ifr_flags); } return rc; @@ -380,9 +373,8 @@ netsnmp_access_interface_ioctl_mtu_get(int fd, rc = _ioctl_get(fd, SIOCGIFMTU, &ifrq, ifentry->name); if (rc < 0) { ifentry->mtu = 0; - return rc; /* msg already logged */ - } - else { + return rc; + } else { ifentry->mtu = ifrq.ifr_mtu; } @@ -413,11 +405,11 @@ netsnmp_access_interface_ioctl_ifindex_get(int fd, const char *name) rc = _ioctl_get(fd, SIOCGIFINDEX, &ifrq, name); if (rc < 0) { DEBUGMSGTL(("access:interface:ioctl", - "ifindex_get error on inerface '%s'\n", name)); + "ifindex_get error on interface '%s'\n", name)); return 0; } -#if defined(__FreeBSD__) /* ? Should use HAVE_STRUCT_IFREQ_IFR_INDEX */ +#if defined(freebsd3) /* ? Should use HAVE_STRUCT_IFREQ_IFR_INDEX */ return ifrq.ifr_index; #else return ifrq.ifr_ifindex; @@ -432,6 +424,7 @@ netsnmp_access_interface_ioctl_ifindex_get(int fd, const char *name) * @param if_name : optional name. takes precedent over if_index. * @param if_index: optional if index. only used if no if_name specified * @param flags : + * @param pifc : ifconf structures returned by the SIOCGIFCONF ioctl * * @retval < 0 : error * @retval 0 : no ip v4 addresses @@ -439,30 +432,24 @@ netsnmp_access_interface_ioctl_ifindex_get(int fd, const char *name) */ int netsnmp_access_interface_ioctl_has_ipv4(int sd, const char *if_name, - int if_index, u_int *flags) + int if_index, u_int *flags, + const struct ifconf *pifc) { int i, interfaces = 0; - struct ifconf ifc; struct ifreq *ifrp; /* * one or the other */ - if ((NULL == flags) || + if (NULL == flags || NULL == pifc || ((0 == if_index) && (NULL == if_name))) { return -1; } - interfaces = netsnmp_access_ipaddress_ioctl_get_interface_count(sd, &ifc); - if(interfaces < 0) { - close(sd); - return -2; - } - netsnmp_assert(NULL != ifc.ifc_buf); - *flags &= ~NETSNMP_INTERFACE_FLAGS_HAS_IPV4; - ifrp = ifc.ifc_req; + ifrp = pifc->ifc_req; + interfaces = pifc->ifc_len / sizeof(struct ifreq); for(i=0; i < interfaces; ++i, ++ifrp) { DEBUGMSGTL(("access:ipaddress:container", @@ -497,10 +484,5 @@ netsnmp_access_interface_ioctl_has_ipv4(int sd, const char *if_name, } } - /* - * clean up - */ - free(ifc.ifc_buf); - return 0; } diff --git a/agent/mibgroup/if-mib/data_access/interface_ioctl.h b/agent/mibgroup/if-mib/data_access/interface_ioctl.h index d765876..5ef8a08 100644 --- a/agent/mibgroup/if-mib/data_access/interface_ioctl.h +++ b/agent/mibgroup/if-mib/data_access/interface_ioctl.h @@ -9,7 +9,7 @@ /* * need ipaddress functions to get ipversions of an interface */ -config_require(ip-mib/data_access/ipaddress) +config_require(ip-mib/data_access/ipaddress); #ifdef __cplusplus extern "C" { @@ -18,10 +18,17 @@ extern "C" { /**---------------------------------------------------------------------*/ /**/ +int +netsnmp_convert_arphrd_type(int arphrd_type); + int netsnmp_access_interface_ioctl_physaddr_get(int fd, netsnmp_interface_entry *ifentry); +void +netsnmp_process_link_flags(netsnmp_interface_entry *ifentry, + unsigned int os_flags); + int netsnmp_access_interface_ioctl_flags_get(int fd, netsnmp_interface_entry *ifentry); @@ -41,7 +48,8 @@ netsnmp_access_interface_ioctl_ifindex_get(int fd, const char *name); int netsnmp_access_interface_ioctl_has_ipv4(int sd, const char *if_name, - int if_index, u_int *flags); + int if_index, u_int *flags, + const struct ifconf *pifc); /**---------------------------------------------------------------------*/ diff --git a/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c b/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c new file mode 100644 index 0000000..b1e18e5 --- /dev/null +++ b/agent/mibgroup/if-mib/data_access/interface_iphlpapi.c @@ -0,0 +1,208 @@ +#include +#include +#include +#include +#include +#include +#include "interface_private.h" +#include "net-snmp/data_access/interface.h" +#include +#include + +/* For Cygwin, MinGW32 and MSYS */ +#ifndef NETIO_STATUS +#define NETIO_STATUS DWORD +#endif + +#ifdef HAVE_MIB_IF_TABLE2 +static void (*pFreeMibTable)(void *Table); +static NETIO_STATUS (*pGetIfEntry2)(MIB_IF_ROW2 *Row); +static NETIO_STATUS (*pGetIfTable2)(MIB_IF_TABLE2 **Table); +static NETIO_STATUS (*pSetIfEntry2)(MIB_IF_ROW2 *Row); +#endif + +void +netsnmp_arch_interface_init(void) +{ +#ifdef HAVE_MIB_IF_TABLE2 + HANDLE dll_handle = LoadLibrary("iphlpapi.dll"); + + pFreeMibTable = (void(*)(void*))(uintptr_t) + GetProcAddress(dll_handle, "FreeMibTable"); + pGetIfEntry2 = (NETIO_STATUS(*)(MIB_IF_ROW2*))(uintptr_t) + GetProcAddress(dll_handle, "GetIfEntry2"); + pGetIfTable2 = (NETIO_STATUS(*)(MIB_IF_TABLE2**))(uintptr_t) + GetProcAddress(dll_handle, "GetIfTable2"); + pSetIfEntry2 = (NETIO_STATUS(*)(MIB_IF_ROW2*))(uintptr_t) + GetProcAddress(dll_handle, "SetIfEntry2"); +#endif +} + +/* Load interface data using GetIfTable() (Windows 2000 and later). */ +static int netsnmp_arch_interface_load_old(netsnmp_container *container) +{ + DWORD status; + DWORD dwActualSize = 0; + MIB_IFTABLE *iftable = NULL; + MIB_IFROW *row, *end; + + status = GetIfTable(iftable, &dwActualSize, /*bOrder=*/FALSE); + if (status == NO_ERROR) + return 0; + if (status != ERROR_INSUFFICIENT_BUFFER) + return SNMP_ERR_GENERR; + iftable = malloc(dwActualSize); + if (!iftable) + return SNMP_ERR_GENERR; + status = GetIfTable(iftable, &dwActualSize, /*bOrder=*/FALSE); + if (status != NO_ERROR) + return SNMP_ERR_GENERR; + end = iftable->table + iftable->dwNumEntries; + for (row = iftable->table; row < end; row++) { + netsnmp_interface_entry *entry; + + entry = calloc(sizeof(*entry), 1); + if (!entry) + continue; + entry->name = strdup((const char *) row->wszName); + entry->oid_index.len = 1; + entry->oid_index.oids = &entry->index; + entry->index = row->dwIndex; + entry->descr = netsnmp_memdup(row->bDescr, row->dwDescrLen); + entry->type = row->dwType; + entry->mtu = row->dwMtu; + entry->speed = row->dwSpeed; + entry->paddr_len = row->dwPhysAddrLen; + entry->paddr = netsnmp_memdup(row->bPhysAddr, row->dwPhysAddrLen); + entry->admin_status = row->dwAdminStatus; + entry->oper_status = row->dwOperStatus == + MIB_IF_OPER_STATUS_OPERATIONAL ? 1/*up*/ : 2/*down*/; + entry->lastchange = 0; /* row->dwLastChange is not a Unix time */ + entry->stats.ibytes.low = row->dwInOctets; + entry->stats.iucast.low = row->dwInUcastPkts; + entry->stats.inucast = row->dwInNUcastPkts; + entry->stats.ierrors = row->dwInErrors; + entry->stats.idiscards = row->dwInDiscards; + entry->stats.iunknown_protos = row->dwInUnknownProtos; + entry->stats.obytes.low = row->dwOutOctets; + entry->stats.oucast.low = row->dwOutUcastPkts; + entry->stats.oerrors = row->dwOutErrors; + entry->stats.oqlen = row->dwOutQLen; + entry->stats.onucast = row->dwOutNUcastPkts; + CONTAINER_INSERT(container, entry); + } + + free(iftable); + return 0; +} + +#ifdef HAVE_MIB_IF_TABLE2 +/* + * Load interface data using GetIfTable2(). GetIfTable2() is available on + * Windows Vista, Windows Server 2008 and later. + */ +static int netsnmp_arch_interface_load_new(netsnmp_container *container) +{ + DWORD status; + MIB_IF_TABLE2 *iftable = NULL; + MIB_IF_ROW2 *row, *end; + char *descr; + unsigned descr_len; + + status = pGetIfTable2(&iftable); + if (status != NO_ERROR) + return SNMP_ERR_GENERR; + end = iftable->Table + iftable->NumEntries; + for (row = iftable->Table; row < end; row++) { + netsnmp_interface_entry *entry; + + entry = calloc(sizeof(*entry), 1); + if (!entry) + continue; + entry->name = strdup((const char *) row->Alias); + entry->oid_index.len = 1; + entry->oid_index.oids = &entry->index; + entry->index = row->InterfaceIndex; + descr_len = WideCharToMultiByte(CP_UTF8, 0, row->Description, -1, NULL, + 0, NULL, NULL); + descr = malloc(descr_len); + if (row && WideCharToMultiByte(CP_UTF8, 0, row->Description, -1, descr, + descr_len, NULL, NULL) > 0) { + entry->descr = descr; + } else { + free(row); + } + entry->type = row->Type; + entry->mtu = row->Mtu; + entry->speed = row->TransmitLinkSpeed; + entry->paddr_len = row->PhysicalAddressLength; + entry->paddr = netsnmp_memdup(row->PhysicalAddress, + row->PhysicalAddressLength); + entry->admin_status = row->AdminStatus; + entry->oper_status = row->OperStatus; + entry->lastchange = 0; /* row->dwLastChange is not a Unix time */ + entry->stats.ibytes.low = row->InOctets; + entry->stats.iucast.low = row->InUcastPkts; + entry->stats.inucast = row->InNUcastPkts; + entry->stats.ierrors = row->InErrors; + entry->stats.idiscards = row->InDiscards; + entry->stats.iunknown_protos = row->InUnknownProtos; + entry->stats.obytes.low = row->OutOctets; + entry->stats.oucast.low = row->OutUcastPkts; + entry->stats.oerrors = row->OutErrors; + entry->stats.oqlen = row->OutQLen; + entry->stats.onucast = row->OutNUcastPkts; + CONTAINER_INSERT(container, entry); + } + + pFreeMibTable(iftable); + return 0; +} +#else +static int netsnmp_arch_interface_load_new(netsnmp_container *container) +{ + return SNMP_ERR_GENERR; +} +#endif + +int +netsnmp_arch_interface_container_load(netsnmp_container *container, + u_int load_flags) +{ +#ifdef HAVE_MIB_IF_TABLE2 + return pGetIfTable2 ? netsnmp_arch_interface_load_new(container) : + netsnmp_arch_interface_load_old(container); +#else + return netsnmp_arch_interface_load_old(container); +#endif +} + +oid +netsnmp_arch_interface_index_find(const char *name) +{ + /* To do: implement this function. */ + return 0; +} + +int +netsnmp_arch_set_admin_status(struct netsnmp_interface_entry_s *entry, + int ifAdminStatus_val) +{ + MIB_IFROW row; + + memset(&row, 0, sizeof(row)); + row.dwIndex = entry->index; + if (GetIfEntry(&row) != NO_ERROR) { + snmp_log(LOG_ERR, "GetIfEntry() failed for index %" NETSNMP_PRIo "u", + entry->index); + return SNMP_ERR_GENERR; + } + row.dwAdminStatus = ifAdminStatus_val; + if (SetIfEntry(&row) != NO_ERROR) { + snmp_log(LOG_ERR, + "SetIfEntry() failed for index %" NETSNMP_PRIo "u and admin status %u\n", + entry->index, ifAdminStatus_val); + return SNMP_ERR_GENERR; + } + return 0; +} diff --git a/agent/mibgroup/if-mib/data_access/interface_linux.c b/agent/mibgroup/if-mib/data_access/interface_linux.c index f196fc8..18dc443 100644 --- a/agent/mibgroup/if-mib/data_access/interface_linux.c +++ b/agent/mibgroup/if-mib/data_access/interface_linux.c @@ -6,25 +6,35 @@ #include #include #include +#include +#include +#include "interface_private.h" -netsnmp_feature_require(fd_event_manager) -netsnmp_feature_require(delete_prefix_info) -netsnmp_feature_require(create_prefix_info) -netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all) +netsnmp_feature_require(fd_event_manager); +netsnmp_feature_require(delete_prefix_info); +netsnmp_feature_require(create_prefix_info); +netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all); #ifdef NETSNMP_FEATURE_REQUIRE_INTERFACE_ARCH_SET_ADMIN_STATUS -netsnmp_feature_require(interface_ioctl_flags_set) +netsnmp_feature_require(interface_ioctl_flags_set); #endif /* NETSNMP_FEATURE_REQUIRE_INTERFACE_ARCH_SET_ADMIN_STATUS */ +#ifdef HAVE_INTTYPES_H +#include +#endif + #ifdef HAVE_PCI_LOOKUP_NAME #include #include +#ifndef PCI_NONRET +#define PCI_NONRET +#endif static struct pci_access *pci_access; /* Avoid letting libpci call exit(1) when no PCI bus is available. */ static int do_longjmp =0; static jmp_buf err_buf; -static void +PCI_NONRET static void netsnmp_pci_error(char *msg, ...) { va_list args; @@ -46,23 +56,23 @@ netsnmp_pci_error(char *msg, ...) #endif #ifdef HAVE_LINUX_ETHTOOL_H +#ifdef HAVE_LINUX_ETHTOOL_NEEDS_U64 #include -#ifndef HAVE_PCI_LOOKUP_NAME typedef __u64 u64; /* hack, so we may include kernel's ethtool.h */ typedef __u32 u32; /* ditto */ typedef __u16 u16; /* ditto */ typedef __u8 u8; /* ditto */ #endif - #include #endif /* HAVE_LINUX_ETHTOOL_H */ #include "mibII/mibII_common.h" #include "if-mib/ifTable/ifTable_constants.h" +#include "ip-mib/data_access/ipaddress_ioctl.h" #include -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #else #error "linux should have sys/ioctl header" @@ -113,14 +123,8 @@ netsnmp_linux_interface_get_if_speed_mii(int fd, const char *name, #define PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS "/proc/sys/net/ipv%d/neigh/%s/retrans_time_ms" #define PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME "/proc/sys/net/ipv%d/neigh/%s/retrans_time" -static const char *proc_sys_retrans_time; -static unsigned short retrans_time_factor = 1; - - #define PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME_MS "/proc/sys/net/ipv%d/neigh/%s/base_reachable_time_ms" #define PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME "/proc/sys/net/ipv%d/neigh/%s/base_reachable_time" -static const char *proc_sys_basereachable_time; -static unsigned short basereachable_time_ms = 0; #ifdef SUPPORT_PREFIX_FLAGS prefix_cbx *prefix_head_list = NULL; netsnmp_prefix_listen_info list_info; @@ -130,46 +134,18 @@ netsnmp_prefix_listen_info list_info; int netsnmp_prefix_listen(void); #endif - -void -netsnmp_arch_interface_init(void) +#ifdef HAVE_PCI_LOOKUP_NAME +static void init_libpci(void) { + struct stat stbuf; + /* - * Check which retransmit time interface is available + * When snmpd is run inside an OpenVZ container or on a Raspberry Pi system + * /proc/bus/pci is not available. */ - char proc_path[ 64+IF_NAMESIZE]; - char proc_path2[64+IF_NAMESIZE]; - struct stat st; - - snprintf(proc_path, sizeof(proc_path), - PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 6, "default"); - snprintf(proc_path2, sizeof(proc_path2), - PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 4, "default"); - - if ((stat(proc_path, &st) == 0) || (stat(proc_path2, &st) == 0)) { - proc_sys_retrans_time = PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS; - } else { - proc_sys_retrans_time = PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME; - retrans_time_factor = 10; - } - - snprintf(proc_path, sizeof(proc_path), PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME_MS, 6, "default"); - snprintf(proc_path2, sizeof(proc_path), PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME, 4, "default"); - - if ((stat(proc_path, &st) == 0) || (stat(proc_path2, &st) == 0)) { - proc_sys_basereachable_time = PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME_MS; - basereachable_time_ms = 1; - } - else { - proc_sys_basereachable_time = PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME; - } - -#ifdef SUPPORT_PREFIX_FLAGS - list_info.list_head = &prefix_head_list; - netsnmp_prefix_listen(); -#endif + if (stat("/proc/bus/pci", &stbuf) == 0) + return; -#ifdef HAVE_PCI_LOOKUP_NAME pci_access = pci_alloc(); if (!pci_access) { snmp_log(LOG_ERR, "pcilib: pci_alloc failed\n"); @@ -187,7 +163,22 @@ netsnmp_arch_interface_init(void) else if (pci_access) pci_init(pci_access); do_longjmp = 0; +} +#else +static void init_libpci(void) +{ +} #endif + +void +netsnmp_arch_interface_init(void) +{ +#ifdef SUPPORT_PREFIX_FLAGS + list_info.list_head = &prefix_head_list; + netsnmp_prefix_listen(); +#endif + + init_libpci(); } /* @@ -298,17 +289,29 @@ _arch_interface_flags_v4_get(netsnmp_interface_entry *entry) { FILE *fin; char line[256]; + struct stat st; + unsigned short retrans_time_factor; /* - * get the retransmit time + * Check which retransmit time interface is available */ - snprintf(line,sizeof(line), proc_sys_retrans_time, 4, + snprintf(line, sizeof(line), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 4, entry->name); + if (stat(line, &st) == 0) { + retrans_time_factor = 1; + } else { + snprintf(line, sizeof(line), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME, 4, + entry->name); + retrans_time_factor = 10; + } + + /* + * get the retransmit time + */ if (!(fin = fopen(line, "r"))) { DEBUGMSGTL(("access:interface", "Failed to open %s\n", line)); - } - else { + } else { if (fgets(line, sizeof(line), fin)) { entry->retransmit_v4 = atoi(line) * retrans_time_factor; entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V4_RETRANSMIT; @@ -390,12 +393,26 @@ _arch_interface_flags_v6_get(netsnmp_interface_entry *entry) { FILE *fin; char line[256]; + struct stat st; + unsigned short retrans_time_factor; + unsigned short basereachable_time_ms; /* - * get the retransmit time + * Check which retransmit time interface is available */ - snprintf(line,sizeof(line), proc_sys_retrans_time, 6, + snprintf(line, sizeof(line), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 6, entry->name); + if (stat(line, &st) == 0) { + retrans_time_factor = 1; + } else { + snprintf(line, sizeof(line), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME, 6, + entry->name); + retrans_time_factor = 10; + } + + /* + * get the retransmit time + */ if (!(fin = fopen(line, "r"))) { DEBUGMSGTL(("access:interface", "Failed to open %s\n", line)); @@ -424,11 +441,24 @@ _arch_interface_flags_v6_get(netsnmp_interface_entry *entry) } fclose(fin); } + + /* + * Check which base reachable time interface is available. + */ + + snprintf(line, sizeof(line), PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME_MS, 6, + entry->name); + if (stat(line, &st) == 0) { + basereachable_time_ms = 1; + } else { + snprintf(line, sizeof(line), PROC_SYS_NET_IPVx_BASE_REACHABLE_TIME, 6, + entry->name); + basereachable_time_ms = 0; + } /* * get the reachable time */ - snprintf(line, sizeof(line), proc_sys_basereachable_time, 6, entry->name); if (!(fin = fopen(line, "r"))) { DEBUGMSGTL(("access:interface", "Failed to open %s\n", line)); @@ -461,7 +491,6 @@ _parse_stats(netsnmp_interface_entry *entry, char *stats, int expected) * [ OUT ] * byte pkts errs drop fifo colls carrier compressed */ -#ifdef SCNuMAX uintmax_t rec_pkt, rec_oct, rec_err, rec_drop, rec_mcast; uintmax_t snd_pkt, snd_oct, snd_err, snd_drop, coll; const char *scan_line_2_2 = @@ -473,14 +502,6 @@ _parse_stats(netsnmp_interface_entry *entry, char *stats, int expected) "%" SCNuMAX " %" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %" SCNuMAX " %" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %" SCNuMAX; -#else - unsigned long rec_pkt, rec_oct, rec_err, rec_drop, rec_mcast; - unsigned long snd_pkt, snd_oct, snd_err, snd_drop, coll; - const char *scan_line_2_2 = - "%lu %lu %lu %lu %*lu %*lu %*lu %lu %lu %lu %lu %lu %*lu %lu"; - const char *scan_line_2_0 = - "%lu %lu %*lu %*lu %*lu %lu %lu %*lu %*lu %lu"; -#endif static const char *scan_line_to_use = NULL; int scan_count; @@ -520,10 +541,8 @@ _parse_stats(netsnmp_interface_entry *entry, char *stats, int expected) */ entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_MCAST_PKTS; entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_HIGH_SPEED; -#ifdef SCNuMAX /* XXX - should be flag for 64-bit variables */ entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_HIGH_BYTES; entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_HIGH_PACKETS; -#endif } } else { scan_count = sscanf(stats, scan_line_to_use, @@ -559,13 +578,11 @@ _parse_stats(netsnmp_interface_entry *entry, char *stats, int expected) entry->stats.imcast.low = rec_mcast & 0xffffffff; entry->stats.obytes.low = snd_oct & 0xffffffff; entry->stats.oucast.low = snd_pkt & 0xffffffff; -#ifdef SCNuMAX /* XXX - should be flag for 64-bit variables */ entry->stats.ibytes.high = rec_oct >> 32; entry->stats.iall.high = rec_pkt >> 32; entry->stats.imcast.high = rec_mcast >> 32; entry->stats.obytes.high = snd_oct >> 32; entry->stats.oucast.high = snd_pkt >> 32; -#endif entry->stats.ierrors = rec_err; entry->stats.idiscards = rec_drop; entry->stats.oerrors = snd_err; @@ -585,7 +602,80 @@ _parse_stats(netsnmp_interface_entry *entry, char *stats, int expected) return 0; } -/* +/* Guess the IANA network interface type from the network interface name. */ +static int netsnmp_guess_interface_type(const netsnmp_interface_entry *entry) +{ + struct match_if { + int mi_type; + const char *mi_name; + }; + + static const struct match_if lmatch_if[] = { + {IANAIFTYPE_SOFTWARELOOPBACK, "lo"}, + {IANAIFTYPE_ETHERNETCSMACD, "eth"}, + {IANAIFTYPE_ETHERNETCSMACD, "vmnet"}, + {IANAIFTYPE_ISO88025TOKENRING, "tr"}, + {IANAIFTYPE_FASTETHER, "feth"}, + {IANAIFTYPE_GIGABITETHERNET,"gig"}, + {IANAIFTYPE_INFINIBAND,"ib"}, + {IANAIFTYPE_PPP, "ppp"}, + {IANAIFTYPE_SLIP, "sl"}, + {IANAIFTYPE_TUNNEL, "sit"}, + {IANAIFTYPE_BASICISDN, "ippp"}, + {IANAIFTYPE_PROPVIRTUAL, "bond"}, /* Bonding driver find fastest slave */ + {IANAIFTYPE_PROPVIRTUAL, "vad"}, /* ANS driver - ?speed? */ + {0, NULL} /* end of list */ + }; + + const struct match_if *pm; + + for (pm = lmatch_if; pm->mi_name; pm++) { + const int len = strlen(pm->mi_name); + + if (strncmp(entry->name, pm->mi_name, len) == 0) + return pm->mi_type; + } + return IANAIFTYPE_OTHER; +} + +static void netsnmp_derive_interface_id(netsnmp_interface_entry *entry) +{ + /* + * interface identifier is specified based on physaddr and type + */ + switch (entry->type) { + case IANAIFTYPE_ETHERNETCSMACD: + case IANAIFTYPE_ETHERNET3MBIT: + case IANAIFTYPE_FASTETHER: + case IANAIFTYPE_FASTETHERFX: + case IANAIFTYPE_GIGABITETHERNET: + case IANAIFTYPE_FDDI: + case IANAIFTYPE_ISO88025TOKENRING: + if (entry->paddr && entry->paddr_len != ETH_ALEN) + break; + + entry->v6_if_id_len = entry->paddr_len + 2; + memcpy(entry->v6_if_id, entry->paddr, 3); + memcpy(entry->v6_if_id + 5, entry->paddr + 3, 3); + entry->v6_if_id[0] ^= 2; + entry->v6_if_id[3] = 0xFF; + entry->v6_if_id[4] = 0xFE; + + entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V6_IFID; + break; + + case IANAIFTYPE_SOFTWARELOOPBACK: + entry->v6_if_id_len = 0; + entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V6_IFID; + break; + } +} + +/** + * Read network interface information from /proc/net/dev. + * + * @param container: Container to store network information in. + * @param load_flags: One or more NETSNMP_ACCESS_INTERFACE_LOAD_* flags. * * @retval 0 success * @retval -1 no container specified @@ -598,9 +688,10 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, { FILE *devin; char line[256]; - netsnmp_interface_entry *entry = NULL; static char scan_expected = 0; - int fd; + int fd, rc; + int interfaces = 0; + struct ifconf ifc; #ifdef NETSNMP_ENABLE_IPV6 netsnmp_container *addr_container; #endif @@ -616,7 +707,7 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, if (!(devin = fopen("/proc/net/dev", "r"))) { DEBUGMSGTL(("access:interface", "Failed to load Interface Table (linux1)\n")); - NETSNMP_LOGONCE((LOG_ERR, "cannot open /proc/net/dev ...\n")); + snmp_log_perror("interface_linux: cannot open /proc/net/dev"); return -2; } @@ -625,9 +716,9 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, */ fd = socket(AF_INET, SOCK_DGRAM, 0); if(fd < 0) { - snmp_log(LOG_ERR, "could not create socket\n"); - fclose(devin); - return -2; + snmp_log_perror("interface_linux: could not create socket"); + rc = -2; + goto close_devin; } #ifdef NETSNMP_ENABLE_IPV6 @@ -646,8 +737,8 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, * to detect the position of individual fields directly, * but I suspect this is probably more trouble than it's worth. */ - fgets(line, sizeof(line), devin); - fgets(line, sizeof(line), devin); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), devin)); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), devin)); if( 0 == scan_expected ) { if (strstr(line, "compressed")) { @@ -661,19 +752,31 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, } } + interfaces = netsnmp_access_ipaddress_ioctl_get_interface_count(fd, &ifc); + if (interfaces < 0) { + snmp_log(LOG_ERR,"get interface count failed\n"); + rc = -2; + goto free_addr_container; + } + netsnmp_assert(NULL != ifc.ifc_buf); + + /* * The rest of the file provides the statistics for each interface. * Read in each line in turn, isolate the interface name * and retrieve (or create) the corresponding data structure. */ while (fgets(line, sizeof(line), devin)) { + netsnmp_interface_entry *entry = NULL; char *stats, *ifstart = line; u_int flags; oid if_index; + size_t len; flags = 0; - if (line[strlen(line) - 1] == '\n') - line[strlen(line) - 1] = '\0'; + len = strlen(line); + if (len && line[len - 1] == '\n') + line[len - 1] = '\0'; while (*ifstart && *ifstart == ' ') ifstart++; @@ -698,7 +801,12 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, */ *stats++ = 0; /* null terminate name */ - if_index = netsnmp_arch_interface_index_find(ifstart); + if (!netsnmp_access_interface_include(ifstart)) + continue; + + /* we may need to stop tracking ifaces if a max was set */ + if (netsnmp_access_interface_max_reached(ifstart)) + continue; /* * set address type flags. @@ -706,10 +814,16 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, * ip version is to look for ip addresses. If anyone * knows a better way, put it here! */ + if_index = netsnmp_arch_interface_index_find(ifstart); + if (if_index == 0) { + DEBUGMSGTL(("access:interface", "network interface %s is gone", + ifstart)); + continue; + } #ifdef NETSNMP_ENABLE_IPV6 _arch_interface_has_ipv6(if_index, &flags, addr_container); #endif - netsnmp_access_interface_ioctl_has_ipv4(fd, ifstart, 0, &flags); + netsnmp_access_interface_ioctl_has_ipv4(fd, ifstart, 0, &flags, &ifc); /* * do we only want one address type? @@ -724,16 +838,13 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, continue; } - entry = netsnmp_access_interface_entry_create(ifstart, 0); + entry = netsnmp_access_interface_entry_create(ifstart, if_index); if(NULL == entry) { #ifdef NETSNMP_ENABLE_IPV6 netsnmp_access_ipaddress_container_free(addr_container, 0); #endif - netsnmp_access_interface_container_free(container, - NETSNMP_ACCESS_INTERFACE_FREE_NOFLAGS); - fclose(devin); - close(fd); - return -3; + rc = -3; + goto free_ifc; } entry->ns_flags = flags; /* initial flags; we'll set more later */ @@ -752,72 +863,10 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, * physaddr should have set type. make some guesses (based * on name) if not. */ - if(0 == entry->type) { - typedef struct _match_if { - int mi_type; - const char *mi_name; - } *pmatch_if, match_if; - - static match_if lmatch_if[] = { - {IANAIFTYPE_SOFTWARELOOPBACK, "lo"}, - {IANAIFTYPE_ETHERNETCSMACD, "eth"}, - {IANAIFTYPE_ETHERNETCSMACD, "vmnet"}, - {IANAIFTYPE_ISO88025TOKENRING, "tr"}, - {IANAIFTYPE_FASTETHER, "feth"}, - {IANAIFTYPE_GIGABITETHERNET,"gig"}, - {IANAIFTYPE_INFINIBAND,"ib"}, - {IANAIFTYPE_PPP, "ppp"}, - {IANAIFTYPE_SLIP, "sl"}, - {IANAIFTYPE_TUNNEL, "sit"}, - {IANAIFTYPE_BASICISDN, "ippp"}, - {IANAIFTYPE_PROPVIRTUAL, "bond"}, /* Bonding driver find fastest slave */ - {IANAIFTYPE_PROPVIRTUAL, "vad"}, /* ANS driver - ?speed? */ - {0, NULL} /* end of list */ - }; - - int len; - register pmatch_if pm; - - for (pm = lmatch_if; pm->mi_name; pm++) { - len = strlen(pm->mi_name); - if (0 == strncmp(entry->name, pm->mi_name, len)) { - entry->type = pm->mi_type; - break; - } - } - if(NULL == pm->mi_name) - entry->type = IANAIFTYPE_OTHER; - } - - /* - * interface identifier is specified based on physaddr and type - */ - switch (entry->type) { - case IANAIFTYPE_ETHERNETCSMACD: - case IANAIFTYPE_ETHERNET3MBIT: - case IANAIFTYPE_FASTETHER: - case IANAIFTYPE_FASTETHERFX: - case IANAIFTYPE_GIGABITETHERNET: - case IANAIFTYPE_FDDI: - case IANAIFTYPE_ISO88025TOKENRING: - if (NULL != entry->paddr && ETH_ALEN != entry->paddr_len) - break; - - entry->v6_if_id_len = entry->paddr_len + 2; - memcpy(entry->v6_if_id, entry->paddr, 3); - memcpy(entry->v6_if_id + 5, entry->paddr + 3, 3); - entry->v6_if_id[0] ^= 2; - entry->v6_if_id[3] = 0xFF; - entry->v6_if_id[4] = 0xFE; + if (entry->type == 0) + entry->type = netsnmp_guess_interface_type(entry); - entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V6_IFID; - break; - - case IANAIFTYPE_SOFTWARELOOPBACK: - entry->v6_if_id_len = 0; - entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V6_IFID; - break; - } + netsnmp_derive_interface_id(entry); if (IANAIFTYPE_ETHERNETCSMACD == entry->type) { unsigned long long speed; @@ -836,13 +885,9 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, } else entry->speed = speed; entry->speed_high = speed / 1000000LL; - } -#ifdef APPLIED_PATCH_836390 /* xxx-rks ifspeed fixes */ - else if (IANAIFTYPE_PROPVIRTUAL == entry->type) - entry->speed = _get_bonded_if_speed(entry); -#endif - else + } else { netsnmp_access_interface_entry_guess_speed(entry); + } netsnmp_access_interface_ioctl_flags_get(fd, entry); @@ -893,14 +938,33 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, /* * add to container */ - CONTAINER_INSERT(container, entry); + if (CONTAINER_INSERT(container, entry) != 0) { + netsnmp_interface_entry *existing = + CONTAINER_FIND(container, entry); + NETSNMP_LOGONCE((LOG_WARNING, + "Encountered interface with index %" NETSNMP_PRIz "u twice: %s <> %s\n", + entry->index, existing ? existing->name : "(?)", + entry->name)); + netsnmp_access_interface_entry_free(entry); + } } + + rc = 0; + +free_ifc: + free(ifc.ifc_buf); + +free_addr_container: #ifdef NETSNMP_ENABLE_IPV6 netsnmp_access_ipaddress_container_free(addr_container, 0); #endif - fclose(devin); + close(fd); - return 0; + +close_devin: + fclose(devin); + + return rc; } #ifndef NETSNMP_FEATURE_REMOVE_INTERFACE_ARCH_SET_ADMIN_STATUS @@ -924,43 +988,29 @@ netsnmp_arch_set_admin_status(netsnmp_interface_entry * entry, #ifdef HAVE_LINUX_ETHTOOL_H /** - * Determines network interface speed from ETHTOOL_GSET + * Determines network interface speed from ETHTOOL_GLINKSETTINGS + * In case of failure revert to obsolete ETHTOOL_GSET */ unsigned long long netsnmp_linux_interface_get_if_speed(int fd, const char *name, unsigned long long defaultspeed) { int ret; - struct ifreq ifr; - struct ethtool_cmd edata; - uint16_t speed_hi; - uint32_t speed; + struct netsnmp_linux_link_settings nlls; + uint32_t speed = -1; - memset(&ifr, 0, sizeof(ifr)); - memset(&edata, 0, sizeof(edata)); - edata.cmd = ETHTOOL_GSET; - - strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - ifr.ifr_data = (char *) &edata; - - ret = ioctl(fd, SIOCETHTOOL, &ifr); - if (ret == -1 || edata.speed == 0) { + ret = netsnmp_get_link_settings(&nlls, fd, name); + if (ret < 0) { DEBUGMSGTL(("mibII/interfaces", "ETHTOOL_GSET on %s failed (%d / %d)\n", - ifr.ifr_name, ret, edata.speed)); - return netsnmp_linux_interface_get_if_speed_mii(fd,name,defaultspeed); + name, ret, speed)); + return netsnmp_linux_interface_get_if_speed_mii(fd, name, defaultspeed); } - -#ifdef HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI - speed_hi = edata.speed_hi; -#else - speed_hi = 0; -#endif - speed = speed_hi << 16 | edata.speed; + speed = nlls.speed; if (speed == 0xffff || speed == 0xffffffffUL /*SPEED_UNKNOWN*/) speed = defaultspeed; /* return in bps */ - DEBUGMSGTL(("mibII/interfaces", "ETHTOOL_GSET on %s speed = %#x -> %d\n", - ifr.ifr_name, speed_hi << 16 | edata.speed, speed)); + DEBUGMSGTL(("mibII/interfaces", "ETHTOOL_GSET on %s speed = %#x = %d\n", + name, speed, speed)); return speed * 1000LL * 1000LL; } #endif @@ -1064,7 +1114,7 @@ netsnmp_linux_interface_get_if_speed(int fd, const char *name, void netsnmp_prefix_process(int fd, void *data); /* Open netlink socket to watch new ipv6 addresses and prefixes. */ -int netsnmp_prefix_listen() +int netsnmp_prefix_listen(void) { struct { struct nlmsghdr n; @@ -1240,9 +1290,9 @@ void netsnmp_prefix_process(int fd, void *data) iret = net_snmp_delete_prefix_info (list_info.list_head, in6pAddr); if(iret < 0) DEBUGMSGTL(("access:interface:prefix", "Unable to delete the prefix info\n")); - if(!iret) - DEBUGMSGTL(("access:interface:prefix", "Unable to find the node to delete\n")); - have_addr = 0; + if(!iret) + DEBUGMSGTL(("access:interface:prefix", "Unable to find the node to delete\n")); + have_addr = 0; } } #endif diff --git a/agent/mibgroup/if-mib/data_access/interface_openbsd.c b/agent/mibgroup/if-mib/data_access/interface_openbsd.c index 8340dc6..34e1d84 100644 --- a/agent/mibgroup/if-mib/data_access/interface_openbsd.c +++ b/agent/mibgroup/if-mib/data_access/interface_openbsd.c @@ -9,11 +9,11 @@ #include "mibII/mibII_common.h" #include "if-mib/ifTable/ifTable_constants.h" -netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all) +netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all); #include -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #else #error "linux should have sys/ioctl header" @@ -22,6 +22,7 @@ netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all) #include #include #include "if-mib/data_access/interface.h" +#include "interface_private.h" #include #include @@ -142,8 +143,6 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, entry = netsnmp_access_interface_entry_create(if_name, ifp->ifm_index); if(NULL == entry) { - netsnmp_access_interface_container_free(container, - NETSNMP_ACCESS_INTERFACE_FREE_NOFLAGS); free(if_list); return -3; } @@ -333,7 +332,8 @@ netsnmp_openbsd_interface_get_if_speed(char *name, u_int *speed, u_int *speed_hi { int s; struct ifmediareq ifmr; - int *media_list, i; + int i; + uint64_t *media_list; u_int t_speed, t_speed_high; u_int m_speed, m_speed_high; @@ -360,7 +360,7 @@ netsnmp_openbsd_interface_get_if_speed(char *name, u_int *speed, u_int *speed_hi _openbsd_interface_ifmedia_to_speed(ifmr.ifm_current, speed, speed_high); if (*speed == 0 && - (media_list = (int *) malloc(ifmr.ifm_count * sizeof(int))) != NULL ) { + (media_list = (uint64_t *) malloc(ifmr.ifm_count * sizeof(uint64_t))) != NULL ) { ifmr.ifm_ulist = media_list; diff --git a/agent/mibgroup/if-mib/data_access/interface_private.h b/agent/mibgroup/if-mib/data_access/interface_private.h new file mode 100644 index 0000000..914016a --- /dev/null +++ b/agent/mibgroup/if-mib/data_access/interface_private.h @@ -0,0 +1,12 @@ +struct prefix_info; +struct netsnmp_container_s; +struct netsnmp_interface_entry_s; + +extern struct prefix_info *prefix_head_list; + +void netsnmp_arch_interface_init(void); +int netsnmp_arch_interface_container_load(struct netsnmp_container_s* container, + u_int load_flags); +oid netsnmp_arch_interface_index_find(const char *name); +int netsnmp_arch_set_admin_status(struct netsnmp_interface_entry_s * entry, + int ifAdminStatus_val); diff --git a/agent/mibgroup/if-mib/data_access/interface_solaris2.c b/agent/mibgroup/if-mib/data_access/interface_solaris2.c index 8aa47f8..74dc411 100644 --- a/agent/mibgroup/if-mib/data_access/interface_solaris2.c +++ b/agent/mibgroup/if-mib/data_access/interface_solaris2.c @@ -12,12 +12,13 @@ #include #include "if-mib/data_access/interface.h" +#include "interface_private.h" #include #include #include #include -netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all) +netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all); static int _set_ip_flags_v4(netsnmp_interface_entry *, mib2_ifEntry_t *); static int _match_ifname_v4addr(void *ifname, void *ipaddr); @@ -120,7 +121,7 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, entry->type = ife.ifType; entry->mtu = ife.ifMtu; entry->speed = ife.ifSpeed; - entry->speed_high = entry->speed / 1000000; + entry->speed_high = ife.ifHighSpeed; entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_HIGH_SPEED; entry->oper_status = ife.ifOperStatus; entry->admin_status = ife.ifAdminStatus; @@ -210,8 +211,6 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, if (error) { DEBUGMSGTL(("access:interface:container:arch", "error %d, free container\n", error)); - netsnmp_access_interface_container_free(container, - NETSNMP_ACCESS_INTERFACE_FREE_NOFLAGS); return -2; } diff --git a/agent/mibgroup/if-mib/data_access/interface_sysctl.c b/agent/mibgroup/if-mib/data_access/interface_sysctl.c index 6076d19..ccfc683 100644 --- a/agent/mibgroup/if-mib/data_access/interface_sysctl.c +++ b/agent/mibgroup/if-mib/data_access/interface_sysctl.c @@ -13,7 +13,7 @@ #include -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #else #error "BSD should have sys/ioctl header" @@ -22,6 +22,7 @@ #include #include #include "if-mib/data_access/interface.h" +#include "interface_private.h" #include #include @@ -30,7 +31,7 @@ #include #include -netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all) +netsnmp_feature_child_of(interface_arch_set_admin_status, interface_all); /* * account for minor differences between FreeBSD and OpenBSD. @@ -105,12 +106,27 @@ netsnmp_sysctl_ifmedia_to_speed(int media, u_int *speed, case IFM_100_T4: case IFM_100_VG: case IFM_100_T2: +#ifdef IFM_100_T + case IFM_100_T: +#endif *speed = 100000000; *speed_high = 100; break; case IFM_1000_LX: case IFM_1000_CX: #ifdef IFM_1000_T case IFM_1000_T: +#endif +#ifdef IFM_1000_SX + case IFM_1000_SX: +#endif +#ifdef IFM_1000_KX + case IFM_1000_KX: +#endif +#ifdef IFM_1000_SGMII + case IFM_1000_SGMII: +#endif +#ifdef IFM_1000_CX_SGMII + case IFM_1000_CX_SGMII: #endif *speed = 1000000000; *speed_high = 1000; break; @@ -120,6 +136,119 @@ netsnmp_sysctl_ifmedia_to_speed(int media, u_int *speed, *speed = (u_int) -1; /* 4294967295; */ *speed_high = 10000; break; #endif +#if defined(freebsd3) +#ifdef IFM_10G_LR + case IFM_10G_LR: +#ifdef IFM_10G_SR + case IFM_10G_SR: +#endif +#ifdef IFM_10G_CX4 + case IFM_10G_CX4: +#endif +#ifdef IFM_10G_TWINAX + case IFM_10G_TWINAX: +#endif +#ifdef IFM_10G_TWINAX_LONG + case IFM_10G_TWINAX_LONG: +#endif +#ifdef IFM_10G_LRM + case IFM_10G_LRM: +#endif +#ifdef IFM_10G_T + case IFM_10G_T: +#endif +#ifdef IFM_10G_KX4 + case IFM_10G_KX4: +#endif +#ifdef IFM_10G_KR + case IFM_10G_KR: +#endif +#ifdef IFM_10G_CR1 + case IFM_10G_CR1: +#endif +#ifdef IFM_10G_SFI + case IFM_10G_SFI: +#endif +#ifdef IFM_10G_ER + case IFM_10G_ER: +#endif +#ifdef IFM_10G_AOC + case IFM_10G_AOC: +#endif + *speed = (u_int) -1; /* 4294967295; */ + *speed_high = 10000; break; +#endif /* IFM_10G_LR */ +#ifdef IFM_20G_KR2 + case IFM_20G_KR2: + *speed = (u_int) -1; /* 4294967295; */ + *speed_high = 20000; break; +#endif /* IFM_20G_KR2 */ +#ifdef IFM_25G_PCIE + case IFM_25G_PCIE: +#ifdef IFM_25G_CR + case IFM_25G_CR: +#endif +#ifdef IFM_25G_KR + case IFM_25G_KR: +#endif +#ifdef IFM_25G_SR + case IFM_25G_SR: +#endif +#ifdef IFM_25G_LR + case IFM_25G_LR: +#endif +#ifdef IFM_25G_ACC + case IFM_25G_ACC: +#endif +#ifdef IFM_25G_AOC + case IFM_25G_AOC: +#endif + *speed = (u_int) -1; /* 4294967295; */ + *speed_high = 25000; break; +#endif /* IFM_25G_PCIE */ +#ifdef IFM_40G_CR4 + case IFM_40G_CR4: +#ifdef IFM_40G_SR4 + case IFM_40G_SR4: +#endif +#ifdef IFM_40G_LR4 + case IFM_40G_LR4: +#endif +#ifdef IFM_40G_XLPPI + case IFM_40G_XLPPI: +#endif +#ifdef IFM_40G_KR4 + case IFM_40G_KR4: +#endif + *speed = (u_int) -1; /* 4294967295; */ + *speed_high = 40000; break; +#endif /* IFM_40G_CR4 */ +#ifdef IFM_50G_PCIE + case IFM_50G_PCIE: +#ifdef IFM_50G_CR2 + case IFM_50G_CR2: +#endif +#ifdef IFM_50G_KR2 + case IFM_50G_KR2: +#endif + *speed = (u_int) -1; /* 4294967295; */ + *speed_high = 50000; break; +#endif /* IFM_50G_PCIE */ +#ifdef IFM_100G_CR4 + case IFM_100G_CR4: +#ifdef IFM_100G_SR4 + case IFM_100G_SR4: +#endif +#ifdef IFM_100G_KR4 + case IFM_100G_KR4: +#endif +#ifdef IFM_100G_LR4 + case IFM_100G_LR4: +#endif + *speed = (u_int) -1; /* 4294967295; */ + *speed_high = 100000; break; +#endif /* IFM_100G_CR4 */ +#endif /* freebsd3 */ } break; case IFM_IEEE80211: @@ -241,7 +370,12 @@ netsnmp_sysctl_get_if_speed(char *name, u_int *speed, { int s; struct ifmediareq ifmr; - int *media_list, i; +#if defined(OpenBSD) && OpenBSD >= 201605 + uint64_t *media_list; +#else + int *media_list; +#endif + int i; u_int t_speed, t_speed_high; u_int m_speed, m_speed_high; @@ -272,7 +406,7 @@ netsnmp_sysctl_get_if_speed(char *name, u_int *speed, netsnmp_sysctl_ifmedia_to_speed(ifmr.ifm_current, speed, speed_high); if (*speed == 0 && - (media_list = (int *) malloc(ifmr.ifm_count * sizeof(int))) != NULL ) { + (media_list = malloc(ifmr.ifm_count * sizeof(*media_list))) != NULL ) { ifmr.ifm_ulist = media_list; @@ -331,7 +465,6 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, struct sockaddr_dl *adl; int amask; char *if_name; - int flags; #ifdef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC struct timespec startspec; @@ -375,7 +508,6 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, ifp = (struct if_msghdr *) cp; if_name = NULL; - flags = 0; adl = NULL; if (ifp->ifm_type != RTM_IFINFO) @@ -397,8 +529,11 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, } } adl = (struct sockaddr_dl *) a; - if_name = (char *) adl->sdl_data; - if_name[adl->sdl_nlen] = '\0'; + if_name = malloc(adl->sdl_nlen + 1); + if (if_name) { + memcpy(if_name, adl->sdl_data, adl->sdl_nlen); + if_name[adl->sdl_nlen] = '\0'; + } } if (!(ifp->ifm_addrs & RTA_IFP) || if_name == NULL) { snmp_log(LOG_ERR, "ifm_index %u: no interface name in message, " @@ -407,9 +542,8 @@ netsnmp_arch_interface_container_load(netsnmp_container* container, } entry = netsnmp_access_interface_entry_create(if_name, ifp->ifm_index); + free(if_name); if(NULL == entry) { - netsnmp_access_interface_container_free(container, - NETSNMP_ACCESS_INTERFACE_FREE_NOFLAGS); free(if_list); return -3; } diff --git a/agent/mibgroup/if-mib/data_access/interface_unsup.c b/agent/mibgroup/if-mib/data_access/interface_unsup.c new file mode 100644 index 0000000..fc22ba9 --- /dev/null +++ b/agent/mibgroup/if-mib/data_access/interface_unsup.c @@ -0,0 +1,25 @@ +#include +#include +#include "interface_private.h" + +void netsnmp_arch_interface_init(void) +{ +} + +int netsnmp_arch_interface_container_load(struct netsnmp_container_s* container, + u_int load_flags) +{ + return 0; +} + +oid netsnmp_arch_interface_index_find(const char *name) +{ + return 0; +} + +int netsnmp_arch_set_admin_status(struct netsnmp_interface_entry_s * entry, + int ifAdminStatus_val) +{ + return 0; +} + diff --git a/agent/mibgroup/if-mib/ifTable.h b/agent/mibgroup/if-mib/ifTable.h index 65fa09a..90ef33f 100644 --- a/agent/mibgroup/if-mib/ifTable.h +++ b/agent/mibgroup/if-mib/ifTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(if-mib/ifTable/ifTable) +config_require(if-mib/ifTable/ifTable); diff --git a/agent/mibgroup/if-mib/ifTable/ifTable.c b/agent/mibgroup/if-mib/ifTable/ifTable.c index d9b7252..9ec27e6 100644 --- a/agent/mibgroup/if-mib/ifTable/ifTable.c +++ b/agent/mibgroup/if-mib/ifTable/ifTable.c @@ -19,7 +19,7 @@ #include #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(interface_access_entry_set_admin_status) +netsnmp_feature_require(interface_access_entry_set_admin_status); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -59,21 +59,24 @@ _if_number_handler(netsnmp_mib_handler *handler, /** - * Initializes the ifTable module + * Initializes the ifTable module. Called before the snmpd configuration has + * been read. */ -void -init_ifTable(void) +static int +_init_ifTable(int majorID, int minorID, void *serverargs, void *clientarg) { static int ifTable_did_init = 0; DEBUGMSGTL(("verbose:ifTable:init_ifTable", "called\n")); + netsnmp_access_interface_init(); + /* * TODO:300:o: Perform ifTable one-time module initialization. */ if (++ifTable_did_init != 1) { DEBUGMSGTL(("ifTable:init_ifTable", "ignoring duplicate call\n")); - return; + return 0; } /* @@ -98,8 +101,18 @@ init_ifTable(void) initialize_table_ifXTable(); #endif } + + return 0; } /* init_ifTable */ +void +init_ifTable(void) +{ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_PRE_READ_CONFIG, + _init_ifTable, NULL); +} + /** * Shut-down the ifTable module (agent is exiting) */ @@ -180,56 +193,6 @@ shutdown_table_ifTable(void) ifTable_user_context_p = NULL; } -/** - * extra context initialization (eg default values) - * - * @param rowreq_ctx : row request context - * @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate) - * - * @retval MFD_SUCCESS : no errors - * @retval MFD_ERROR : error (context allocate will fail) - */ -int -ifTable_rowreq_ctx_init(ifTable_rowreq_ctx * rowreq_ctx, - void *user_init_ctx) -{ - DEBUGMSGTL(("verbose:ifTable:ifTable_rowreq_ctx_init", "called\n")); - - netsnmp_assert(NULL != rowreq_ctx); - - /* - * TODO:210:o: |-> Perform extra ifTable rowreq initialization. (eg DEFVALS) - */ - if (NULL == user_init_ctx) - rowreq_ctx->data.ifentry = - netsnmp_access_interface_entry_create(NULL, 0); - else - rowreq_ctx->data.ifentry = - (netsnmp_interface_entry *) user_init_ctx; - - return MFD_SUCCESS; -} /* ifTable_rowreq_ctx_init */ - -/** - * extra context cleanup - * @param rowreq_ctx - */ -void -ifTable_rowreq_ctx_cleanup(ifTable_rowreq_ctx * rowreq_ctx) -{ - DEBUGMSGTL(("verbose:ifTable:ifTable_rowreq_ctx_cleanup", "called\n")); - - netsnmp_assert(NULL != rowreq_ctx); - - /* - * TODO:211:o: |-> Perform extra ifTable rowreq cleanup. - */ - if (NULL != rowreq_ctx->data.ifentry) { - netsnmp_access_interface_entry_free(rowreq_ctx->data.ifentry); - rowreq_ctx->data.ifentry = NULL; - } -} /* ifTable_rowreq_ctx_cleanup */ - /** * pre-request callback * @param user_context @@ -314,36 +277,6 @@ ifTable_post_request(ifTable_registration * user_context, int rc) * * TODO:200:r: Implement ifTable data context functions. */ - -/** - * set mib index(es) - * - * @param tbl_idx mib index structure - * @param ifIndex_val - * - * @retval MFD_SUCCESS : success. - * @retval MFD_ERROR : other error. - * - * @remark - * This convenience function is useful for setting all the MIB index - * components with a single function call. It is assume that the C values - * have already been mapped from their native/rawformat to the MIB format. - */ -int -ifTable_indexes_set_tbl_idx(ifTable_mib_index * tbl_idx, long ifIndex_val) -{ - DEBUGMSGTL(("verbose:ifTable:ifTable_indexes_set_tbl_idx", - "called\n")); - - /* - * ifIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H - */ - tbl_idx->ifIndex = ifIndex_val; - - - return MFD_SUCCESS; -} /* ifTable_indexes_set_tbl_idx */ - /** * @internal * set row context indexes @@ -363,9 +296,7 @@ ifTable_indexes_set(ifTable_rowreq_ctx * rowreq_ctx, long ifIndex_val) { DEBUGMSGTL(("verbose:ifTable:ifTable_indexes_set", "called\n")); - if (MFD_SUCCESS != - ifTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx, ifIndex_val)) - return MFD_ERROR; + rowreq_ctx->tbl_idx.ifIndex = ifIndex_val; /* * convert mib index to oid index @@ -1879,10 +1810,7 @@ ifSpecific_get(ifTable_rowreq_ctx * rowreq_ctx, * functions are called. If you need to do any undo setup that is not * related to a specific column, you can do it here. * - * Note that the undo context has been allocated with - * ifTable_allocate_data(), but may need extra - * initialization similar to what you may have done in - * ifTable_rowreq_ctx_init(). + * Note that the undo context has been allocated with ifTable_allocate_data(). * Note that an individual node's undo_setup function will only be called * if that node is being set to a new value. * diff --git a/agent/mibgroup/if-mib/ifTable/ifTable.h b/agent/mibgroup/if-mib/ifTable/ifTable.h index e90634f..8478873 100644 --- a/agent/mibgroup/if-mib/ifTable/ifTable.h +++ b/agent/mibgroup/if-mib/ifTable/ifTable.h @@ -24,13 +24,13 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(if-mib/data_access/interface) -config_require(if-mib/ifTable/ifTable_interface) -config_require(if-mib/ifTable/ifTable_data_access) +config_require(if-mib/data_access/interface); +config_require(if-mib/ifTable/ifTable_interface); +config_require(if-mib/ifTable/ifTable_data_access); /* * conflicts with mibII/interfaces */ -config_exclude(mibII/interfaces) +config_exclude(mibII/interfaces); /* *INDENT-ON* */ /* @@ -351,12 +351,6 @@ config_exclude(mibII/interfaces) int ifTable_post_request(ifTable_registration * user_context, int rc); - int ifTable_rowreq_ctx_init(ifTable_rowreq_ctx * - rowreq_ctx, - void *user_init_ctx); - void ifTable_rowreq_ctx_cleanup(ifTable_rowreq_ctx * - rowreq_ctx); - int ifTable_check_dependencies(ifTable_rowreq_ctx * rowreq_ctx); int ifTable_commit(ifTable_rowreq_ctx * rowreq_ctx); @@ -444,8 +438,6 @@ config_exclude(mibII/interfaces) size_t * ifSpecific_val_ptr_len_ptr); - int ifTable_indexes_set_tbl_idx(ifTable_mib_index * - tbl_idx, long ifIndex_val); int ifTable_indexes_set(ifTable_rowreq_ctx * rowreq_ctx, long ifIndex_val); diff --git a/agent/mibgroup/if-mib/ifTable/ifTable_constants.h b/agent/mibgroup/if-mib/ifTable/ifTable_constants.h index 1f5d87a..5c81d0a 100644 --- a/agent/mibgroup/if-mib/ifTable/ifTable_constants.h +++ b/agent/mibgroup/if-mib/ifTable/ifTable_constants.h @@ -105,6 +105,9 @@ extern "C" { * * since a Textual Convention may be referenced more than once in a * MIB, protect againt redefinitions of the enum values. + * + * See also + * https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#smi-numbers-5 */ #ifndef IANAIFTYPE_ENUMS #define IANAIFTYPE_ENUMS diff --git a/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c b/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c index fb838ef..5ede7d8 100644 --- a/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c +++ b/agent/mibgroup/if-mib/ifTable/ifTable_data_access.c @@ -12,7 +12,7 @@ #include #include -netsnmp_feature_require(container_linked_list) +netsnmp_feature_require(container_linked_list); /* * include our parent header @@ -30,10 +30,10 @@ netsnmp_feature_require(container_linked_list) # include "mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h" #endif -typedef struct cd_container_s { +struct cd_container { netsnmp_container *current; netsnmp_container *deleted; -} cd_container; +}; /* * flag so we know not to set row/table last change times @@ -50,9 +50,7 @@ static int fadeout = IFTABLE_REMOVE_MISSING_AFTER; */ static int replace_old = 0; -static void -_delete_missing_interface(ifTable_rowreq_ctx *rowreq_ctx, - netsnmp_container *container); +static void __delete_missing_interface(void *rowreq_ctx, void *container); /** @ingroup interface * @defgroup data_access data_access: Routines to access data @@ -80,6 +78,7 @@ parse_interface_fadeout(const char *token, char *line) { fadeout = atoi(line); } + static void parse_interface_replace_old(const char *token, char *line) { @@ -306,12 +305,15 @@ send_linkUpDownNotifications(oid *notification_oid, size_t notification_oid_len, } /** - * check entry for update - * + * Update ifTable. + * @param rowreq_ctx ifTable row to examine. + * @param cdc Operating system interface information. @cdc->current [in] is the + * result of the latest interface scan. @cdc->deleted [out] are the rows that + * should be deleted by the caller from ifTable. */ static void -_check_interface_entry_for_updates(ifTable_rowreq_ctx * rowreq_ctx, - cd_container *cdc) +_check_interface_entry_for_updates(ifTable_rowreq_ctx *rowreq_ctx, + struct cd_container *cdc) { char oper_changed = 0; int lastchanged = rowreq_ctx->data.ifLastChange; @@ -321,8 +323,7 @@ _check_interface_entry_for_updates(ifTable_rowreq_ctx * rowreq_ctx, * check for matching entry. We can do this directly, since * both containers use the same index. */ - netsnmp_interface_entry *ifentry = - (netsnmp_interface_entry*)CONTAINER_FIND(ifcontainer, rowreq_ctx); + netsnmp_interface_entry *ifentry = CONTAINER_FIND(ifcontainer, rowreq_ctx); #ifdef USING_IP_MIB_IPV4INTERFACETABLE_IPV4INTERFACETABLE_MODULE /* @@ -438,10 +439,14 @@ _check_interface_entry_for_updates(ifTable_rowreq_ctx * rowreq_ctx, } } #endif + } else { + rowreq_ctx->data.ifLastChange = lastchanged; } +} - else - rowreq_ctx->data.ifLastChange = lastchanged; +static void __check_interface_entry_for_updates(void *rowreq_ctx, void *cdc) +{ + _check_interface_entry_for_updates(rowreq_ctx, cdc); } /** @@ -472,9 +477,7 @@ _check_and_replace_old(netsnmp_interface_entry *ifentry, } ITERATOR_RELEASE(it); - CONTAINER_FOR_EACH(to_delete, - (netsnmp_container_obj_func *) _delete_missing_interface, - container); + CONTAINER_FOR_EACH(to_delete, __delete_missing_interface, container); CONTAINER_FREE(to_delete); } @@ -486,6 +489,7 @@ _add_new_interface(netsnmp_interface_entry *ifentry, netsnmp_container *container) { ifTable_rowreq_ctx *rowreq_ctx; + int rc; DEBUGMSGTL(("ifTable:access", "creating new entry\n")); @@ -494,39 +498,44 @@ _add_new_interface(netsnmp_interface_entry *ifentry, * the container and set ifTableLastChanged. */ rowreq_ctx = ifTable_allocate_rowreq_ctx(ifentry); - if ((NULL != rowreq_ctx) && - (MFD_SUCCESS == ifTable_indexes_set(rowreq_ctx, ifentry->index))) { - if (replace_old) - _check_and_replace_old(ifentry, container); - - CONTAINER_INSERT(container, rowreq_ctx); - if (0 == _first_load) { - rowreq_ctx->data.ifLastChange = netsnmp_get_agent_uptime(); - ifTable_lastChange_set(rowreq_ctx->data.ifLastChange); - } + if (!rowreq_ctx) { + snmp_log(LOG_ERR, + "memory allocation failed while loading ifTable cache.\n"); + netsnmp_access_interface_entry_free(ifentry); + return; + } + if (ifTable_indexes_set(rowreq_ctx, ifentry->index) != MFD_SUCCESS) { + snmp_log(LOG_ERR, "error setting index while loading ifTable cache.\n"); + ifTable_release_rowreq_ctx(rowreq_ctx); + return; + } + + if (replace_old) + _check_and_replace_old(ifentry, container); + + rc = CONTAINER_INSERT(container, rowreq_ctx); + netsnmp_assert(rc == 0); + if (0 == _first_load) { + rowreq_ctx->data.ifLastChange = netsnmp_get_agent_uptime(); + ifTable_lastChange_set(rowreq_ctx->data.ifLastChange); + } #ifdef USING_IP_MIB_IPV4INTERFACETABLE_IPV4INTERFACETABLE_MODULE - /* - * give ipv4If table a crack at the entry - */ - ipv4InterfaceTable_check_entry_for_updates(rowreq_ctx, ifentry); + /* + * give ipv4If table a crack at the entry + */ + ipv4InterfaceTable_check_entry_for_updates(rowreq_ctx, ifentry); #endif #ifdef USING_IP_MIB_IPV6INTERFACETABLE_IPV6INTERFACETABLE_MODULE - /* - * give ipv6If table a crack at the entry - */ - ipv6InterfaceTable_check_entry_for_updates(rowreq_ctx, ifentry); + /* + * give ipv6If table a crack at the entry + */ + ipv6InterfaceTable_check_entry_for_updates(rowreq_ctx, ifentry); #endif - } else { - if (rowreq_ctx) { - snmp_log(LOG_ERR, "error setting index while loading " - "ifTable cache.\n"); - ifTable_release_rowreq_ctx(rowreq_ctx); - } else { - snmp_log(LOG_ERR, "memory allocation failed while loading " - "ifTable cache.\n"); - netsnmp_access_interface_entry_free(ifentry); - } - } +} + +static void __add_new_interface(void *ifentry, void *container) +{ + _add_new_interface(ifentry, container); } /** @@ -544,6 +553,11 @@ _delete_missing_interface(ifTable_rowreq_ctx *rowreq_ctx, ifTable_release_rowreq_ctx(rowreq_ctx); } +static void __delete_missing_interface(void *rowreq_ctx, void *container) +{ + _delete_missing_interface(rowreq_ctx, container); +} + /** * container shutdown * @@ -573,12 +587,7 @@ ifTable_container_shutdown(netsnmp_container *container_ptr) } /* ifTable_container_shutdown */ /** - * load initial data - * - * TODO:350:M: Implement ifTable data load - * This function will also be called by the cache helper to load - * the container again (after the container free function has been - * called to free the previous contents). + * Query the list of interfaces from the operating system and update ifTable. * * @param container container to which items should be inserted * @@ -593,7 +602,7 @@ ifTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -608,7 +617,7 @@ ifTable_container_shutdown(netsnmp_container *container_ptr) int ifTable_container_load(netsnmp_container *container) { - cd_container cdc; + struct cd_container cdc; DEBUGMSGTL(("verbose:ifTable:ifTable_container_load", "called\n")); @@ -633,25 +642,20 @@ ifTable_container_load(netsnmp_container *container) * we just got a fresh copy of interface data. compare it to * what we've already got, and make any adjustements... */ - CONTAINER_FOR_EACH(container, (netsnmp_container_obj_func *) - _check_interface_entry_for_updates, &cdc); + CONTAINER_FOR_EACH(container, __check_interface_entry_for_updates, &cdc); /* * now remove any missing interfaces */ if (NULL != cdc.deleted) { - CONTAINER_FOR_EACH(cdc.deleted, - (netsnmp_container_obj_func *) _delete_missing_interface, - container); + CONTAINER_FOR_EACH(cdc.deleted, __delete_missing_interface, container); CONTAINER_FREE(cdc.deleted); } /* * now add any new interfaces */ - CONTAINER_FOR_EACH(cdc.current, - (netsnmp_container_obj_func *) _add_new_interface, - container); + CONTAINER_FOR_EACH(cdc.current, __add_new_interface, container); /* * free the container. we've either claimed each ifentry, or released it, diff --git a/agent/mibgroup/if-mib/ifTable/ifTable_interface.c b/agent/mibgroup/if-mib/ifTable/ifTable_interface.c index 41d38ee..9120f31 100644 --- a/agent/mibgroup/if-mib/ifTable/ifTable_interface.c +++ b/agent/mibgroup/if-mib/ifTable/ifTable_interface.c @@ -48,20 +48,20 @@ #include -netsnmp_feature_child_of(ifTable_external_access, libnetsnmpmibs) - -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) -netsnmp_feature_child_of(iftable_container_get, ifTable_external_access) -netsnmp_feature_child_of(ifxtable_shutdown_interface, netsnmp_unused) -netsnmp_feature_child_of(ifXTable_container_size, ifXTable_external_access) -netsnmp_feature_child_of(ifXTable_registration_set, ifXTable_external_access) -netsnmp_feature_child_of(ifXTable_registration_get, ifXTable_external_access) -netsnmp_feature_child_of(ifXTable_container_get, ifXTable_external_access) -netsnmp_feature_child_of(iftable_container_size, ifTable_external_access) -netsnmp_feature_child_of(iftable_registration_set, ifTable_external_access) -netsnmp_feature_child_of(iftable_registration_get, ifTable_external_access) +netsnmp_feature_child_of(ifTable_external_access, libnetsnmpmibs); + +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); +netsnmp_feature_child_of(iftable_container_get, ifTable_external_access); +netsnmp_feature_child_of(ifxtable_shutdown_interface, netsnmp_unused); +netsnmp_feature_child_of(ifXTable_container_size, ifXTable_external_access); +netsnmp_feature_child_of(ifXTable_registration_set, ifXTable_external_access); +netsnmp_feature_child_of(ifXTable_registration_get, ifXTable_external_access); +netsnmp_feature_child_of(ifXTable_container_get, ifXTable_external_access); +netsnmp_feature_child_of(iftable_container_size, ifTable_external_access); +netsnmp_feature_child_of(iftable_registration_set, ifTable_external_access); +netsnmp_feature_child_of(iftable_registration_get, ifTable_external_access); /********************************************************************** ********************************************************************** @@ -398,19 +398,17 @@ _ifTable_initialize_interface(ifTable_registration * reg_ptr, u_long flags) * register ifTableLastChanged */ { - const oid iftlc_oid[] = { IFTABLE_LAST_CHANGE }; - netsnmp_register_watched_scalar2(netsnmp_create_handler_registration - ("ifTableLastChanged", NULL, - iftlc_oid, OID_LENGTH(iftlc_oid), - HANDLER_CAN_RONLY), - netsnmp_create_watcher_info((void - *) - &ifTable_if_ctx. - last_changed, - sizeof - (u_long), - ASN_TIMETICKS, - WATCHER_FIXED_SIZE)); + static const oid iftlc_oid[] = { IFTABLE_LAST_CHANGE }; + netsnmp_handler_registration *reginfo; + netsnmp_watcher_info *winfo; + + reginfo = netsnmp_create_handler_registration + ("ifTableLastChanged", NULL, + iftlc_oid, OID_LENGTH(iftlc_oid), HANDLER_CAN_RONLY); + winfo = netsnmp_create_watcher_info(&ifTable_if_ctx.last_changed, + sizeof(u_long), ASN_TIMETICKS, + WATCHER_FIXED_SIZE); + netsnmp_register_watched_scalar2(reginfo, winfo); } #endif /* USING_MIBII_INTERFACES_MODULE */ @@ -442,48 +440,13 @@ ifTable_valid_columns_set(netsnmp_column_info *vc) int ifTable_index_to_oid(netsnmp_index * oid_idx, ifTable_mib_index * mib_idx) { - int err = SNMP_ERR_NOERROR; - - /* - * temp storage for parsing indexes - */ - /* - * ifIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H - */ - netsnmp_variable_list var_ifIndex; - - /* - * set up varbinds - */ - memset(&var_ifIndex, 0x00, sizeof(var_ifIndex)); - var_ifIndex.type = ASN_INTEGER; - - /* - * chain temp index varbinds together - */ - var_ifIndex.next_variable = NULL; - - - DEBUGMSGTL(("verbose:ifTable:ifTable_index_to_oid", "called\n")); - - /* - * ifIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H - */ - snmp_set_var_value(&var_ifIndex, (u_char *) & mib_idx->ifIndex, - sizeof(mib_idx->ifIndex)); + if (oid_idx->len < 1) + return SNMP_ERR_GENERR; + oid_idx->oids[0] = mib_idx->ifIndex; + oid_idx->len = 1; - err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len, - NULL, 0, &var_ifIndex); - if (err) - snmp_log(LOG_ERR, "error %d converting index to oid\n", err); - - /* - * parsing may have allocated memory. free it. - */ - snmp_reset_var_buffers(&var_ifIndex); - - return err; + return SNMP_ERR_NOERROR; } /* ifTable_index_to_oid */ /** @@ -579,7 +542,7 @@ ifTable_release_data(ifTable_data * data) * allocate resources for a ifTable_rowreq_ctx */ ifTable_rowreq_ctx * -ifTable_allocate_rowreq_ctx(void *user_init_ctx) +ifTable_allocate_rowreq_ctx(netsnmp_interface_entry *ifentry) { ifTable_rowreq_ctx *rowreq_ctx = SNMP_MALLOC_TYPEDEF(ifTable_rowreq_ctx); @@ -600,13 +563,8 @@ ifTable_allocate_rowreq_ctx(void *user_init_ctx) /* * if we allocated data, call init routine */ - if (!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)) { - if (SNMPERR_SUCCESS != - ifTable_rowreq_ctx_init(rowreq_ctx, user_init_ctx)) { - ifTable_release_rowreq_ctx(rowreq_ctx); - rowreq_ctx = NULL; - } - } + if (!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)) + rowreq_ctx->data.ifentry = ifentry; return rowreq_ctx; } /* ifTable_allocate_rowreq_ctx */ @@ -623,7 +581,10 @@ ifTable_release_rowreq_ctx(ifTable_rowreq_ctx * rowreq_ctx) netsnmp_assert(NULL != rowreq_ctx); - ifTable_rowreq_ctx_cleanup(rowreq_ctx); + if (rowreq_ctx->data.ifentry) { + netsnmp_access_interface_entry_free(rowreq_ctx->data.ifentry); + rowreq_ctx->data.ifentry = NULL; + } if (rowreq_ctx->undo) { ifTable_release_data(rowreq_ctx->undo); @@ -1048,7 +1009,7 @@ _mfd_ifTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1909,6 +1870,11 @@ _container_item_free(ifTable_rowreq_ctx * rowreq_ctx, void *context) ifTable_release_rowreq_ctx(rowreq_ctx); } /* _container_item_free */ +static void __container_item_free(void *rowreq_ctx, void *context) +{ + _container_item_free(rowreq_ctx, context); +} + /** * @internal */ @@ -1930,9 +1896,7 @@ _container_free(netsnmp_container *container) /* * free all items. inefficient, but easy. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func *) _container_item_free, - NULL); + CONTAINER_CLEAR(container, __container_item_free, NULL); } /* _container_free */ /** @@ -1994,26 +1958,12 @@ _ifTable_container_shutdown(ifTable_interface_ctx * if_ctx) ifTable_rowreq_ctx * ifTable_row_find_by_mib_index(ifTable_mib_index * mib_idx) { - ifTable_rowreq_ctx *rowreq_ctx; oid oid_tmp[MAX_OID_LEN]; - netsnmp_index oid_idx; + netsnmp_index oid_idx = { MAX_OID_LEN, oid_tmp }; int rc; - /* - * set up storage for OID - */ - oid_idx.oids = oid_tmp; - oid_idx.len = sizeof(oid_tmp) / sizeof(oid); - - /* - * convert - */ rc = ifTable_index_to_oid(&oid_idx, mib_idx); - if (MFD_SUCCESS != rc) - return NULL; - - rowreq_ctx = (ifTable_rowreq_ctx*)CONTAINER_FIND(ifTable_if_ctx.container, &oid_idx); - - return rowreq_ctx; + return rc == MFD_SUCCESS ? + CONTAINER_FIND(ifTable_if_ctx.container, &oid_idx) : NULL; } #endif /* NETSNMP_FEATURE_REMOVE_IFTABLE_EXTERNAL_ACCESS */ diff --git a/agent/mibgroup/if-mib/ifTable/ifTable_interface.h b/agent/mibgroup/if-mib/ifTable/ifTable_interface.h index be2028a..516aba7 100644 --- a/agent/mibgroup/if-mib/ifTable/ifTable_interface.h +++ b/agent/mibgroup/if-mib/ifTable/ifTable_interface.h @@ -44,6 +44,7 @@ extern "C" { #include "ifTable.h" + struct netsnmp_interface_entry_s; /* ******************************************************************** @@ -69,7 +70,7 @@ extern "C" { u_int ifTable_dirty_get(void); void ifTable_dirty_set(u_int status); - ifTable_rowreq_ctx *ifTable_allocate_rowreq_ctx(void *); + ifTable_rowreq_ctx *ifTable_allocate_rowreq_ctx(struct netsnmp_interface_entry_s *); void ifTable_release_rowreq_ctx(ifTable_rowreq_ctx * rowreq_ctx); diff --git a/agent/mibgroup/if-mib/ifXTable.h b/agent/mibgroup/if-mib/ifXTable.h index 5e99c0a..4493f88 100644 --- a/agent/mibgroup/if-mib/ifXTable.h +++ b/agent/mibgroup/if-mib/ifXTable.h @@ -2,5 +2,5 @@ * module to include the modules */ -config_require(if-mib/ifXTable/ifXTable) +config_require(if-mib/ifXTable/ifXTable); diff --git a/agent/mibgroup/if-mib/ifXTable/ifXTable.c b/agent/mibgroup/if-mib/ifXTable/ifXTable.c index bb3e736..3cd1f5f 100644 --- a/agent/mibgroup/if-mib/ifXTable/ifXTable.c +++ b/agent/mibgroup/if-mib/ifXTable/ifXTable.c @@ -30,8 +30,8 @@ #include "ifXTable_interface.h" -netsnmp_feature_require(ifTable_container_get) -netsnmp_feature_require(ifTable_container_size) +netsnmp_feature_require(ifTable_container_get); +netsnmp_feature_require(ifTable_container_size); /* * not sure if we want to support set for promiscuous mode, because @@ -704,7 +704,7 @@ The total number of octets received on the interface, * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ifHCInOctets data. @@ -714,7 +714,7 @@ The total number of octets received on the interface, * @param rowreq_ctx * Pointer to the row request context. * @param ifHCInOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -722,7 +722,7 @@ The total number of octets received on the interface, */ int ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCInOctets_val_ptr) + struct counter64 *ifHCInOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCInOctets_val_ptr); @@ -761,7 +761,7 @@ The number of packets, delivered by this sub-layer to a * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64 */ /** * Extract the current value of the ifHCInUcastPkts data. @@ -771,7 +771,7 @@ The number of packets, delivered by this sub-layer to a * @param rowreq_ctx * Pointer to the row request context. * @param ifHCInUcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -779,7 +779,7 @@ The number of packets, delivered by this sub-layer to a */ int ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCInUcastPkts_val_ptr) + struct counter64 *ifHCInUcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCInUcastPkts_val_ptr); @@ -820,7 +820,7 @@ The number of packets, delivered by this sub-layer to a * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64 */ /** * Extract the current value of the ifHCInMulticastPkts data. @@ -830,7 +830,7 @@ The number of packets, delivered by this sub-layer to a * @param rowreq_ctx * Pointer to the row request context. * @param ifHCInMulticastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -838,7 +838,7 @@ The number of packets, delivered by this sub-layer to a */ int ifHCInMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCInMulticastPkts_val_ptr) + struct counter64 *ifHCInMulticastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCInMulticastPkts_val_ptr); @@ -879,7 +879,7 @@ The number of packets, delivered by this sub-layer to a * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ifHCInBroadcastPkts data. @@ -889,7 +889,7 @@ The number of packets, delivered by this sub-layer to a * @param rowreq_ctx * Pointer to the row request context. * @param ifHCInBroadcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -897,7 +897,7 @@ The number of packets, delivered by this sub-layer to a */ int ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCInBroadcastPkts_val_ptr) + struct counter64 *ifHCInBroadcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCInBroadcastPkts_val_ptr); @@ -937,7 +937,7 @@ The total number of octets transmitted out of the * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ifHCOutOctets data. @@ -947,7 +947,7 @@ The total number of octets transmitted out of the * @param rowreq_ctx * Pointer to the row request context. * @param ifHCOutOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -955,7 +955,7 @@ The total number of octets transmitted out of the */ int ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCOutOctets_val_ptr) + struct counter64 *ifHCOutOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCOutOctets_val_ptr); @@ -995,7 +995,7 @@ The total number of packets that higher-level protocols * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ifHCOutUcastPkts data. @@ -1005,7 +1005,7 @@ The total number of packets that higher-level protocols * @param rowreq_ctx * Pointer to the row request context. * @param ifHCOutUcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1013,7 +1013,7 @@ The total number of packets that higher-level protocols */ int ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCOutUcastPkts_val_ptr) + struct counter64 *ifHCOutUcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCOutUcastPkts_val_ptr); @@ -1056,7 +1056,7 @@ The total number of packets that higher-level protocols * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ifHCOutMulticastPkts data. @@ -1066,7 +1066,7 @@ The total number of packets that higher-level protocols * @param rowreq_ctx * Pointer to the row request context. * @param ifHCOutMulticastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1074,7 +1074,7 @@ The total number of packets that higher-level protocols */ int ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCOutMulticastPkts_val_ptr) + struct counter64 *ifHCOutMulticastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCOutMulticastPkts_val_ptr); @@ -1116,7 +1116,7 @@ The total number of packets that higher-level protocols * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ifHCOutBroadcastPkts data. @@ -1126,7 +1126,7 @@ The total number of packets that higher-level protocols * @param rowreq_ctx * Pointer to the row request context. * @param ifHCOutBroadcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1134,7 +1134,7 @@ The total number of packets that higher-level protocols */ int ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCOutBroadcastPkts_val_ptr) + struct counter64 *ifHCOutBroadcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ifHCOutBroadcastPkts_val_ptr); diff --git a/agent/mibgroup/if-mib/ifXTable/ifXTable.h b/agent/mibgroup/if-mib/ifXTable/ifXTable.h index ba22f97..06cbb5e 100644 --- a/agent/mibgroup/if-mib/ifXTable/ifXTable.h +++ b/agent/mibgroup/if-mib/ifXTable/ifXTable.h @@ -25,9 +25,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(if-mib/ifTable/ifTable) -config_require(if-mib/ifXTable/ifXTable_interface) -config_require(if-mib/ifXTable/ifXTable_data_access) +config_require(if-mib/ifTable/ifTable); +config_require(if-mib/ifXTable/ifXTable_interface); +config_require(if-mib/ifXTable/ifXTable_data_access); /* *INDENT-ON* */ /* @@ -143,28 +143,28 @@ config_require(if-mib/ifXTable/ifXTable_data_access) u_long * ifOutBroadcastPkts_val_ptr); int ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCInOctets_val_ptr); + struct counter64 *ifHCInOctets_val_ptr); int ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCInUcastPkts_val_ptr); + struct counter64 *ifHCInUcastPkts_val_ptr); int ifHCInMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ifHCInMulticastPkts_val_ptr); int ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ifHCInBroadcastPkts_val_ptr); int ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCOutOctets_val_ptr); + struct counter64 *ifHCOutOctets_val_ptr); int ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * ifHCOutUcastPkts_val_ptr); + struct counter64 *ifHCOutUcastPkts_val_ptr); int ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ifHCOutMulticastPkts_val_ptr); int ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ifHCOutBroadcastPkts_val_ptr); int ifLinkUpDownTrapEnable_get(ifXTable_rowreq_ctx * rowreq_ctx, @@ -284,86 +284,86 @@ config_require(if-mib/ifXTable/ifXTable_data_access) int ifHCInOctets_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCInOctets_val); + struct counter64 ifHCInOctets_val); int ifHCInOctets_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInOctets_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCInOctets_val); + struct counter64 ifHCInOctets_val); int ifHCInOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInUcastPkts_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCInUcastPkts_val); + struct counter64 ifHCInUcastPkts_val); int ifHCInUcastPkts_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCInUcastPkts_val); + struct counter64 ifHCInUcastPkts_val); int ifHCInUcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInMulticastPkts_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 + struct counter64 ifHCInMulticastPkts_val); int ifHCInMulticastPkts_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInMulticastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCInMulticastPkts_val); + struct counter64 ifHCInMulticastPkts_val); int ifHCInMulticastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInBroadcastPkts_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 + struct counter64 ifHCInBroadcastPkts_val); int ifHCInBroadcastPkts_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCInBroadcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCInBroadcastPkts_val); + struct counter64 ifHCInBroadcastPkts_val); int ifHCInBroadcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutOctets_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCOutOctets_val); + struct counter64 ifHCOutOctets_val); int ifHCOutOctets_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutOctets_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCOutOctets_val); + struct counter64 ifHCOutOctets_val); int ifHCOutOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutUcastPkts_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCOutUcastPkts_val); + struct counter64 ifHCOutUcastPkts_val); int ifHCOutUcastPkts_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCOutUcastPkts_val); + struct counter64 ifHCOutUcastPkts_val); int ifHCOutUcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutMulticastPkts_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 + struct counter64 ifHCOutMulticastPkts_val); int ifHCOutMulticastPkts_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutMulticastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCOutMulticastPkts_val); + struct counter64 ifHCOutMulticastPkts_val); int ifHCOutMulticastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutBroadcastPkts_check_value(ifXTable_rowreq_ctx * rowreq_ctx, - U64 + struct counter64 ifHCOutBroadcastPkts_val); int ifHCOutBroadcastPkts_undo_setup(ifXTable_rowreq_ctx * rowreq_ctx); int ifHCOutBroadcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx, - U64 ifHCOutBroadcastPkts_val); + struct counter64 ifHCOutBroadcastPkts_val); int ifHCOutBroadcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx); diff --git a/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c b/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c index 23b50d0..464ad2a 100644 --- a/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c +++ b/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c @@ -50,14 +50,14 @@ #include -netsnmp_feature_child_of(ifXTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(ifXTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(cache_find_by_oid) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(cache_find_by_oid); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) +netsnmp_feature_require(check_vb_type_and_max_size); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /********************************************************************** @@ -729,72 +729,72 @@ _ifXTable_get_column(ifXTable_rowreq_ctx * rowreq_ctx, * ifHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCINOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCInOctets_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCInUcastPkts(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCINUCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCInUcastPkts_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCInUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCInMulticastPkts(8)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCINMULTICASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCInMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCInMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCInBroadcastPkts(9)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCINBROADCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCInBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCInBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCOutOctets(10)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCOUTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCOutUcastPkts(11)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCOUTUCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCOutUcastPkts_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCOutUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCOutMulticastPkts(12)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCOUTMULTICASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCOutMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCOutMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* * ifHCOutBroadcastPkts(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IFHCOUTBROADCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string); + rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* @@ -921,7 +921,7 @@ _mfd_ifXTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1144,9 +1144,7 @@ _ifXTable_check_column(ifXTable_rowreq_ctx * rowreq_ctx, /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((var->val_len < 0) || (var->val_len > 64)) - ) { + if (rc == SNMPERR_SUCCESS && var->val_len > 64) { rc = SNMP_ERR_WRONGLENGTH; } if (SNMPERR_SUCCESS != rc) { @@ -1799,8 +1797,7 @@ static int _ifXTable_container_save_rows(int majorID, int minorID, void *clientarg); static void _ifXTable_container_row_restore(const char *token, char *buf); -static int _ifXTable_container_row_save(ifXTable_rowreq_ctx * - rowreq_ctx, void *type); +static void _ifXTable_container_row_save(void *data, void *type); static char *_ifXTable_container_col_restore(ifXTable_rowreq_ctx * rowreq_ctx, u_int col, char *buf); @@ -1856,7 +1853,6 @@ _ifXTable_container_save_rows(int majorID, int minorID, void *serverarg, * save all rows */ CONTAINER_FOR_EACH(*(netsnmp_container **)clientarg, - (netsnmp_container_obj_func *) _ifXTable_container_row_save, type); read_config_store((char *) type, sep); @@ -1873,9 +1869,10 @@ _ifXTable_container_save_rows(int majorID, int minorID, void *serverarg, /************************************************************ * _ifXTable_container_row_save */ -static int -_ifXTable_container_row_save(ifXTable_rowreq_ctx * rowreq_ctx, void *type) +static void _ifXTable_container_row_save(void *data, void *type) { + ifXTable_rowreq_ctx *rowreq_ctx = data; + /* * Allocate space for a line with all data for a row. An * attempt is made to come up with a default maximum size, but @@ -1918,7 +1915,7 @@ _ifXTable_container_row_save(ifXTable_rowreq_ctx * rowreq_ctx, void *type) int i; if (ifXTable_container_should_save(rowreq_ctx) == 0) { - return SNMP_ERR_NOERROR; + return; } /* @@ -1930,13 +1927,13 @@ _ifXTable_container_row_save(ifXTable_rowreq_ctx * rowreq_ctx, void *type) if (NULL == pos) { snmp_log(LOG_ERR, "error saving ifXTable row " "to persistent file\n"); - return SNMP_ERR_GENERR; + return; } *pos++ = ' '; if (pos > max) { snmp_log(LOG_ERR, "error saving ifXTable row " "to persistent file (too long)\n"); - return SNMP_ERR_GENERR; + return; } /* @@ -1956,7 +1953,7 @@ _ifXTable_container_row_save(ifXTable_rowreq_ctx * rowreq_ctx, void *type) if (pos > max) { snmp_log(LOG_ERR, "error saving ifXTable row " "to persistent file (too long)\n"); - return SNMP_ERR_GENERR; + return; } } @@ -1972,14 +1969,12 @@ _ifXTable_container_row_save(ifXTable_rowreq_ctx * rowreq_ctx, void *type) if (pos > max) { snmp_log(LOG_ERR, "error saving ifXTable row " "to persistent file (too long)\n"); - return SNMP_ERR_GENERR; + return; } read_config_store((char *) type, buf); DEBUGMSGTL(("internal:ifXTable:_ifXTable_container_row_save", "saving line '%s'\n", buf)); - - return SNMP_ERR_NOERROR; } static void diff --git a/agent/mibgroup/ip-forward-mib.h b/agent/mibgroup/ip-forward-mib.h index 969ba17..d698277 100644 --- a/agent/mibgroup/ip-forward-mib.h +++ b/agent/mibgroup/ip-forward-mib.h @@ -4,4 +4,4 @@ config_require(ip-forward-mib/ipCidrRouteTable); config_require(ip-forward-mib/inetCidrRouteTable); -config_add_mib(IP-FORWARD-MIB) +config_add_mib(IP-FORWARD-MIB); diff --git a/agent/mibgroup/ip-forward-mib/data_access/route.h b/agent/mibgroup/ip-forward-mib/data_access/route.h index 2c731a6..2ff65d7 100644 --- a/agent/mibgroup/ip-forward-mib/data_access/route.h +++ b/agent/mibgroup/ip-forward-mib/data_access/route.h @@ -17,19 +17,19 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-forward-mib/data_access/route_common) +config_require(ip-forward-mib/data_access/route_common); #if defined( linux ) -config_require(ip-forward-mib/data_access/route_linux) -config_require(ip-forward-mib/data_access/route_ioctl) +config_require(ip-forward-mib/data_access/route_linux); +config_require(ip-forward-mib/data_access/route_ioctl); #elif defined( freebsd7 ) || defined( netbsd5 ) || defined( openbsd4 ) || defined( dragonfly ) || defined( darwin ) -config_require(ip-forward-mib/data_access/route_sysctl) -#elif defined(solaris2) && defined( HAVE_MIB2_IPIFSTATSENTRY_T ) -config_require(ip-forward-mib/data_access/route_solaris) +config_require(ip-forward-mib/data_access/route_sysctl); +#elif defined(solaris2) +config_require(ip-forward-mib/data_access/route_solaris); #else -config_error(the route data access library is not available in this environment.) +config_error(the route data access library is not available in this environment.); #endif /** need interface for ifIndex */ -config_require(if-mib/data_access/interface) +config_require(if-mib/data_access/interface); diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_common.c b/agent/mibgroup/ip-forward-mib/data_access/route_common.c index 84c1810..a5b957c 100644 --- a/agent/mibgroup/ip-forward-mib/data_access/route_common.c +++ b/agent/mibgroup/ip-forward-mib/data_access/route_common.c @@ -9,6 +9,8 @@ #include #include +#include "route.h" +#include "route_private.h" /**---------------------------------------------------------------------*/ /* @@ -16,21 +18,6 @@ */ static void _access_route_entry_release(netsnmp_route_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern int netsnmp_access_route_container_arch_load(netsnmp_container* container, - u_int load_flags); -extern int -netsnmp_arch_route_create(netsnmp_route_entry *entry); -extern int -netsnmp_arch_route_delete(netsnmp_route_entry *entry); - - /**---------------------------------------------------------------------*/ /* * container functions @@ -84,6 +71,12 @@ netsnmp_access_route_container_free(netsnmp_container *container, u_int free_fla (netsnmp_container_obj_func*)_access_route_entry_release, NULL); } + else { + /* + * free the CONTAINER's sl_nodes, but not their data + */ + CONTAINER_CLEAR(container, NULL, NULL); + } if(! (free_flags & NETSNMP_ACCESS_ROUTE_FREE_KEEP_CONTAINER)) CONTAINER_FREE(container); diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c b/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c index ff89161..eeeecb9 100644 --- a/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c +++ b/agent/mibgroup/ip-forward-mib/data_access/route_ioctl.c @@ -5,52 +5,52 @@ #include #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_FILE_H +#ifdef HAVE_SYS_FILE_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif @@ -102,18 +102,19 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry) return -3; } - memset(&route, 0, sizeof(route)); - + memset(&dst, 0, sizeof(dst)); dst.sin_family = AF_INET; memcpy(&dst.sin_addr.s_addr, entry->rt_dest, 4); DEBUGSTR = inet_ntoa(dst.sin_addr); DEBUGMSGTL(("access:route","add route to %s\n", DEBUGSTR)); + memset(&gateway, 0, sizeof(gateway)); gateway.sin_family = AF_INET; memcpy(&gateway.sin_addr.s_addr, entry->rt_nexthop, 4); DEBUGSTR = inet_ntoa(gateway.sin_addr); DEBUGMSGTL(("access:route"," via %s\n", DEBUGSTR)); + memset(&mask, 0, sizeof(mask)); mask.sin_family = AF_INET; if (entry->rt_pfx_len != 0) mask.sin_addr.s_addr = netsnmp_ipaddress_ipv4_mask(entry->rt_pfx_len); @@ -122,6 +123,7 @@ int _netsnmp_ioctl_route_set_v4(netsnmp_route_entry * entry) DEBUGSTR = inet_ntoa(mask.sin_addr); DEBUGMSGTL(("access:route"," mask %s\n", DEBUGSTR)); + memset(&route, 0, sizeof(route)); memcpy(&route.rt_dst, &dst, sizeof(struct sockaddr_in)); memcpy(&route.rt_gateway, &gateway, sizeof(struct sockaddr_in)); memcpy(&route.rt_genmask, &mask, sizeof(struct sockaddr_in)); @@ -167,17 +169,20 @@ int _netsnmp_ioctl_route_delete_v4(netsnmp_route_entry * entry) memset(&route, 0, sizeof(route)); + memset(&dst, 0, sizeof(dst)); dst.sin_family = AF_INET; memcpy(&dst.sin_addr.s_addr, entry->rt_dest, 4); DEBUGSTR = inet_ntoa(dst.sin_addr); DEBUGMSGTL(("access:route","del route to %s\n", DEBUGSTR)); + memset(&mask, 0, sizeof(mask)); mask.sin_family = AF_INET; if (entry->rt_pfx_len != 0) mask.sin_addr.s_addr = netsnmp_ipaddress_ipv4_mask(entry->rt_pfx_len); else mask.sin_addr.s_addr = entry->rt_mask; + memset(&gateway, 0, sizeof(gateway)); gateway.sin_family = AF_INET; memcpy(&gateway.sin_addr.s_addr, entry->rt_nexthop, 4); diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_linux.c b/agent/mibgroup/ip-forward-mib/data_access/route_linux.c index 0f80fe8..9b6a63e 100644 --- a/agent/mibgroup/ip-forward-mib/data_access/route_linux.c +++ b/agent/mibgroup/ip-forward-mib/data_access/route_linux.c @@ -15,6 +15,8 @@ #include "ip-forward-mib/data_access/route_ioctl.h" #include "ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h" #include "if-mib/data_access/interface_ioctl.h" +#include "route.h" +#include "route_private.h" static int _type_from_flags(unsigned int flags) @@ -67,7 +69,7 @@ _load_ipv4(netsnmp_container* container, u_long *index ) return -2; } - fgets(line, sizeof(line), in); /* skip header */ + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), in)); /* skip header */ while (fgets(line, sizeof(line), in)) { char rtent_name[32]; @@ -95,9 +97,7 @@ _load_ipv4(netsnmp_container* container, u_long *index ) snmp_log(LOG_ERR, "/proc/net/route data format error (%d!=8), line ==|%s|", rc, line); - - netsnmp_access_route_entry_free(entry); - continue; + goto free_entry; } /* @@ -112,9 +112,12 @@ _load_ipv4(netsnmp_container* container, u_long *index ) * but since that will open/close a socket, and we might * have a lot of routes, call the ioctl routine directly. */ - if ('*' != name[0]) + if ('*' != name[0]) { entry->if_index = netsnmp_access_interface_ioctl_ifindex_get(fd,name); + if (entry->if_index == 0) + goto free_entry; + } /* * arbitrary index @@ -184,8 +187,8 @@ _load_ipv4(netsnmp_container* container, u_long *index ) if (CONTAINER_INSERT(container, entry) < 0) { DEBUGMSGTL(("access:route:container", "error with route_entry: insert into container failed.\n")); +free_entry: netsnmp_access_route_entry_free(entry); - continue; } } @@ -215,7 +218,6 @@ _load_ipv6(netsnmp_container* container, u_long *index ) return -2; } - fgets(line,sizeof(line),in); /* skip header */ while (fgets(line, sizeof(line), in)) { char c_name[IFNAMSIZ+1]; char c_dest[33], c_src[33], c_next[33]; diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_private.h b/agent/mibgroup/ip-forward-mib/data_access/route_private.h new file mode 100644 index 0000000..8cda4fe --- /dev/null +++ b/agent/mibgroup/ip-forward-mib/data_access/route_private.h @@ -0,0 +1,7 @@ +struct netsnmp_container_s; +struct netsnmp_route_s; + +int netsnmp_access_route_container_arch_load(struct netsnmp_container_s* container, + u_int load_flags); +int netsnmp_arch_route_create(struct netsnmp_route_s *entry); +int netsnmp_arch_route_delete(struct netsnmp_route_s *entry); diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c b/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c index 5d8ad22..d72830c 100644 --- a/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c +++ b/agent/mibgroup/ip-forward-mib/data_access/route_solaris.c @@ -18,9 +18,10 @@ #include "ip-forward-mib/data_access/route_ioctl.h" #include "ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h" #include "if-mib/data_access/interface_ioctl.h" +#include "route_private.h" -static int _load_v4(netsnmp_container *container, u_long *count); -static int _load_v6(netsnmp_container *container, u_long *count); +static int _load_v4(netsnmp_container *container); +static int _load_v6(netsnmp_container *container); /** arch specific load * @internal @@ -33,7 +34,6 @@ int netsnmp_access_route_container_arch_load(netsnmp_container* container, u_int load_flags) { - u_long count = 0; int rc; DEBUGMSGTL(("access:route:container", @@ -44,7 +44,7 @@ netsnmp_access_route_container_arch_load(netsnmp_container* container, return -1; } - rc = _load_v4(container, &count); + rc = _load_v4(container); #ifdef NETSNMP_ENABLE_IPV6 if((0 != rc) || (load_flags & NETSNMP_ACCESS_ROUTE_LOAD_IPV4_ONLY)) @@ -54,7 +54,7 @@ netsnmp_access_route_container_arch_load(netsnmp_container* container, * load ipv6. ipv6 module might not be loaded, * so ignore -2 err (file not found) */ - rc = _load_v6(container, &count); + rc = _load_v6(container); if (-2 == rc) rc = 0; #endif @@ -147,7 +147,7 @@ IP6_Cmp_Route(void *addr, void *ep) } -static int _load_v4(netsnmp_container *container, u_long *count) +static int _load_v4(netsnmp_container *container) { netsnmp_route_entry *entry; mib2_ipRouteEntry_t Curentry, Nextentry; @@ -196,13 +196,12 @@ static int _load_v4(netsnmp_container *container, u_long *count) netsnmp_access_route_entry_free(entry); continue; } - *count++; } return 0; } -static int _load_v6(netsnmp_container *container, u_long *count) +static int _load_v6(netsnmp_container *container) { netsnmp_route_entry *entry; mib2_ipv6RouteEntry_t Curentry, Nextentry; @@ -252,7 +251,6 @@ static int _load_v6(netsnmp_container *container, u_long *count) netsnmp_access_route_entry_free(entry); continue; } - *count++; } return 0; } diff --git a/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c b/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c index d4f926b..3f4f3eb 100644 --- a/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c +++ b/agent/mibgroup/ip-forward-mib/data_access/route_sysctl.c @@ -16,6 +16,7 @@ #include "ip-forward-mib/data_access/route_sysctl.h" #include "ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_constants.h" #include "if-mib/data_access/interface_ioctl.h" +#include "route_private.h" static int _load_ipv4(netsnmp_container*, int*); static int _load_ipv6(netsnmp_container*, int*); @@ -223,6 +224,14 @@ _load_routing_table_from_sysctl(netsnmp_container* container, int *index, */ if (rtm->rtm_addrs == RTA_DST) continue; +#ifdef RTF_CLONED + if (rtm->rtm_flags & RTF_CLONED) + continue; +#endif +#ifdef RTF_WASCLONED + if (rtm->rtm_flags & RTF_WASCLONED) + continue; +#endif entry = netsnmp_access_route_entry_create(); if (entry == NULL) diff --git a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h index 542d516..e20a269 100644 --- a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h +++ b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable) +config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable); diff --git a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c index 0f013ea..9474fba 100644 --- a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c +++ b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.c @@ -27,8 +27,8 @@ #include "inetCidrRouteTable_interface.h" -netsnmp_feature_require(inetCidrRouteTable_container_get) -netsnmp_feature_require(inetCidrRouteTable_container_size) +netsnmp_feature_require(inetCidrRouteTable_container_get); +netsnmp_feature_require(inetCidrRouteTable_container_size); const oid inetCidrRouteTable_oid[] = { INETCIDRROUTETABLE_OID }; const int inetCidrRouteTable_oid_size = @@ -394,9 +394,7 @@ inetCidrRouteTable_indexes_set_tbl_idx(inetCidrRouteTable_mib_index * /* * make sure there is enough space for inetCidrRouteDest data */ - if ((NULL == tbl_idx->inetCidrRouteDest) || - (tbl_idx->inetCidrRouteDest_len < - (inetCidrRouteDest_val_ptr_len))) { + if (tbl_idx->inetCidrRouteDest_len < (inetCidrRouteDest_val_ptr_len)) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } @@ -419,9 +417,8 @@ inetCidrRouteTable_indexes_set_tbl_idx(inetCidrRouteTable_mib_index * /* * make sure there is enough space for inetCidrRoutePolicy data */ - if ((NULL == tbl_idx->inetCidrRoutePolicy) || - (tbl_idx->inetCidrRoutePolicy_len < - (inetCidrRoutePolicy_val_ptr_len / sizeof(inetCidrRoutePolicy_val_ptr[0])))) { + if (inetCidrRoutePolicy_val_ptr_len > tbl_idx->inetCidrRoutePolicy_len * + sizeof(inetCidrRoutePolicy_val_ptr[0])) { snmp_log(LOG_ERR, "inetCidrRoutePolicy: Not enough space for value (%d < %d)\n", (int)tbl_idx->inetCidrRoutePolicy_len, @@ -450,9 +447,8 @@ inetCidrRouteTable_indexes_set_tbl_idx(inetCidrRouteTable_mib_index * /* * make sure there is enough space for inetCidrRouteNextHop data */ - if ((NULL == tbl_idx->inetCidrRouteNextHop) || - (tbl_idx->inetCidrRouteNextHop_len < - (inetCidrRouteNextHop_val_ptr_len / sizeof(inetCidrRouteNextHop_val_ptr[0])))) { + if (tbl_idx->inetCidrRouteNextHop_len < (inetCidrRouteNextHop_val_ptr_len / + sizeof(inetCidrRouteNextHop_val_ptr[0]))) { snmp_log(LOG_ERR, "inetCidrRouteNexthop: Not enough space for value (%d < %d)\n", (int)tbl_idx->inetCidrRouteNextHop_len, diff --git a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h index b8132e1..08b311d 100644 --- a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h +++ b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable.h @@ -23,9 +23,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-forward-mib/data_access/route) -config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface) -config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access) +config_require(ip-forward-mib/data_access/route); +config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface); +config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c index beebb2c..cc79ada 100644 --- a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c +++ b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access.c @@ -232,7 +232,7 @@ inetCidrRouteTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -262,12 +262,13 @@ inetCidrRouteTable_container_load(netsnmp_container *container) route_container = netsnmp_access_route_container_load(NULL, NETSNMP_ACCESS_ROUTE_LOAD_NOFLAGS); - DEBUGMSGT(("verbose:inetCidrRouteTable:inetCidrRouteTable_cache_load", - "%d records\n", (int)CONTAINER_SIZE(route_container))); if (NULL == route_container) return MFD_RESOURCE_UNAVAILABLE; /* msg already logged */ + DEBUGMSGT(("verbose:inetCidrRouteTable:inetCidrRouteTable_cache_load", + "%d records\n", (int)CONTAINER_SIZE(route_container))); + /* * we just got a fresh copy of route data. snarf data */ diff --git a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c index 5df46b6..7003f42 100644 --- a/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c +++ b/agent/mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.c @@ -47,16 +47,16 @@ #include -netsnmp_feature_child_of(inetCidrRouteTable_external_access, libnetsnmpmibs) -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) - -netsnmp_feature_child_of(inetCidrRouteTable_container_size, inetCidrRouteTable_external_access) -netsnmp_feature_child_of(inetCidrRouteTable_registration_set, inetCidrRouteTable_external_access) -netsnmp_feature_child_of(inetCidrRouteTable_registration_get, inetCidrRouteTable_external_access) -netsnmp_feature_child_of(inetCidrRouteTable_container_get, inetCidrRouteTable_external_access) +netsnmp_feature_child_of(inetCidrRouteTable_external_access, libnetsnmpmibs); +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); + +netsnmp_feature_child_of(inetCidrRouteTable_container_size, inetCidrRouteTable_external_access); +netsnmp_feature_child_of(inetCidrRouteTable_registration_set, inetCidrRouteTable_external_access); +netsnmp_feature_child_of(inetCidrRouteTable_registration_get, inetCidrRouteTable_external_access); +netsnmp_feature_child_of(inetCidrRouteTable_container_get, inetCidrRouteTable_external_access); /********************************************************************** ********************************************************************** *** @@ -294,10 +294,12 @@ _inetCidrRouteTable_initialize_interface(inetCidrRouteTable_registration * netsnmp_handler_registration_create("inetCidrRouteTable", handler, inetCidrRouteTable_oid, inetCidrRouteTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #ifndef NETSNMP_DISABLE_SET_SUPPORT - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table inetCidrRouteTable\n"); @@ -1174,7 +1176,7 @@ _mfd_inetCidrRouteTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1236,10 +1238,8 @@ _inetCidrRouteTable_check_indexes(inetCidrRouteTable_rowreq_ctx * /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((rowreq_ctx->tbl_idx.inetCidrRouteDest_len < 0) - || (rowreq_ctx->tbl_idx.inetCidrRouteDest_len > 255)) - ) { + if (rc == SNMPERR_SUCCESS && + rowreq_ctx->tbl_idx.inetCidrRouteDest_len > 255) { rc = SNMP_ERR_WRONGLENGTH; } if (MFD_SUCCESS != rc) @@ -1254,10 +1254,8 @@ _inetCidrRouteTable_check_indexes(inetCidrRouteTable_rowreq_ctx * /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((rowreq_ctx->tbl_idx.inetCidrRoutePfxLen < 0) - || (rowreq_ctx->tbl_idx.inetCidrRoutePfxLen > 2040)) - ) { + if (rc == SNMPERR_SUCCESS && + rowreq_ctx->tbl_idx.inetCidrRoutePfxLen > 2040) { rc = SNMP_ERR_WRONGVALUE; } if (MFD_SUCCESS != rc) @@ -1309,10 +1307,8 @@ _inetCidrRouteTable_check_indexes(inetCidrRouteTable_rowreq_ctx * /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((rowreq_ctx->tbl_idx.inetCidrRouteNextHop_len < 0) - || (rowreq_ctx->tbl_idx.inetCidrRouteNextHop_len > 255)) - ) { + if (rc == SNMPERR_SUCCESS && + rowreq_ctx->tbl_idx.inetCidrRouteNextHop_len > 255) { rc = SNMP_ERR_WRONGLENGTH; } if (MFD_SUCCESS != rc) diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h index 0214caf..1a07665 100644 --- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h +++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable) +config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable); diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h index 2ce30be..316164d 100644 --- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h +++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.h @@ -25,9 +25,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-forward-mib/data_access/route) -config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface) -config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access) +config_require(ip-forward-mib/data_access/route); +config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface); +config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c index bb27675..deaf53d 100644 --- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c +++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access.c @@ -222,7 +222,7 @@ ipCidrRouteTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c index 45f8483..c83d4f5 100644 --- a/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c +++ b/agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface.c @@ -47,17 +47,17 @@ #include -netsnmp_feature_child_of(ipCidrRouteTable_external_access, libnetsnmpmibs) -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_child_of(ipCidrRouteTable_external_access, libnetsnmpmibs); +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(ipCidrRouteTable_container_size, ipCidrRouteTable_external_access) -netsnmp_feature_child_of(ipCidrRouteTable_registration_set, ipCidrRouteTable_external_access) -netsnmp_feature_child_of(ipCidrRouteTable_registration_get, ipCidrRouteTable_external_access) -netsnmp_feature_child_of(ipCidrRouteTable_container_get, ipCidrRouteTable_external_access) +netsnmp_feature_child_of(ipCidrRouteTable_container_size, ipCidrRouteTable_external_access); +netsnmp_feature_child_of(ipCidrRouteTable_registration_set, ipCidrRouteTable_external_access); +netsnmp_feature_child_of(ipCidrRouteTable_registration_get, ipCidrRouteTable_external_access); +netsnmp_feature_child_of(ipCidrRouteTable_container_get, ipCidrRouteTable_external_access); /********************************************************************** ********************************************************************** *** @@ -1093,7 +1093,7 @@ _mfd_ipCidrRouteTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib.h b/agent/mibgroup/ip-mib.h index 4e8317f..4c52d01 100644 --- a/agent/mibgroup/ip-mib.h +++ b/agent/mibgroup/ip-mib.h @@ -12,4 +12,4 @@ config_require(ip-mib/ip_scalars); config_require(ip-mib/ipv6ScopeZoneIndexTable); config_require(ip-mib/ipIfStatsTable); #endif -config_add_mib(IP-MIB) +config_add_mib(IP-MIB); diff --git a/agent/mibgroup/ip-mib/data_access/arp.h b/agent/mibgroup/ip-mib/data_access/arp.h index 648cb28..5dfc627 100644 --- a/agent/mibgroup/ip-mib/data_access/arp.h +++ b/agent/mibgroup/ip-mib/data_access/arp.h @@ -17,17 +17,17 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-mib/data_access/arp_common) +config_require(ip-mib/data_access/arp_common); #if defined( HAVE_LINUX_RTNETLINK_H ) -config_require(ip-mib/data_access/arp_netlink) +config_require(ip-mib/data_access/arp_netlink); #elif defined( linux ) -config_require(ip-mib/data_access/arp_linux) +config_require(ip-mib/data_access/arp_linux); #elif defined( freebsd7 ) || defined ( netbsd5 ) || defined( openbsd4 ) || defined( dragonfly ) || defined( darwin ) -config_require(ip-mib/data_access/arp_sysctl) +config_require(ip-mib/data_access/arp_sysctl); #else /* * couldn't determine the correct file! */ -config_error(the arp data access library is not available in this environment.) +config_error(the arp data access library is not available in this environment.); #endif diff --git a/agent/mibgroup/ip-mib/data_access/arp_linux.c b/agent/mibgroup/ip-mib/data_access/arp_linux.c index a2fa49a..1d66bc5 100644 --- a/agent/mibgroup/ip-mib/data_access/arp_linux.c +++ b/agent/mibgroup/ip-mib/data_access/arp_linux.c @@ -95,7 +95,7 @@ _load_v4(netsnmp_arp_access *access) #define PROCFILE "/proc/net/arp" if (!(in = fopen(PROCFILE, "r"))) { - snmp_log(LOG_DEBUG,"could not open " PROCFILE "\n"); + snmp_log_perror("arp_linux: could not open " PROCFILE); return -2; } diff --git a/agent/mibgroup/ip-mib/data_access/arp_netlink.c b/agent/mibgroup/ip-mib/data_access/arp_netlink.c index 2059c23..8cab2ef 100644 --- a/agent/mibgroup/ip-mib/data_access/arp_netlink.c +++ b/agent/mibgroup/ip-mib/data_access/arp_netlink.c @@ -1,6 +1,7 @@ /* * Interface MIB architecture support */ + #include #include @@ -9,7 +10,11 @@ #include #include +#include #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include @@ -78,7 +83,7 @@ int netsnmp_access_arp_load(netsnmp_arp_access *access) fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); if (fd < 0) { - snmp_log(LOG_ERR,"netsnmp_access_arp_load: netlink socket create error\n"); + snmp_log_perror("netsnmp_access_arp_load: netlink socket create error"); return -1; } access->arch_magic = (void *)(uintptr_t)fd; @@ -87,7 +92,7 @@ int netsnmp_access_arp_load(netsnmp_arp_access *access) sa.nl_family = AF_NETLINK; sa.nl_groups = RTMGRP_NEIGH; if (bind(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0) { - snmp_log(LOG_ERR,"netsnmp_access_arp_load: netlink bind failed\n"); + snmp_log_perror("netsnmp_access_arp_load: netlink bind failed"); return -1; } @@ -109,7 +114,7 @@ int netsnmp_access_arp_load(netsnmp_arp_access *access) r = send(fd, &req, req.n.nlmsg_len, 0); if (r < 0) { - snmp_log(LOG_ERR,"netsnmp_access_arp_refresh: send failed\n"); + snmp_log_perror("netsnmp_access_arp_refresh: send failed"); return -1; } @@ -157,7 +162,7 @@ static void netsnmp_access_arp_read_netlink(int fd, void *data) *access->cache_expired = 1; return; } - } while (0); + } while (r < 0 && errno == EINTR); len = r; for (h = (struct nlmsghdr *) buf; NLMSG_OK(h, len); h = NLMSG_NEXT(h, len)) { @@ -212,6 +217,14 @@ fillup_entry_info(netsnmp_arp_entry *entry, struct nlmsghdr *nlmp) return -1; } + if (rtmp->ndm_family != AF_INET && rtmp->ndm_family != AF_INET6) { + /* Some address families, notably AF_BRIDGE, have RTM_NEWNEIGH + * and RTM_DELNEIGH messages that may not contain an IP address + * that we need later. So we drop everything that is not AF_INET or + * AF_INET6 silently.*/ + return 0; + } + if (rtmp->ndm_state == NUD_NOARP) { /* NUD_NOARP is for broadcast addresses and similar, * drop them silently */ diff --git a/agent/mibgroup/ip-mib/data_access/arp_sysctl.c b/agent/mibgroup/ip-mib/data_access/arp_sysctl.c index 24e9cda..3732a35 100644 --- a/agent/mibgroup/ip-mib/data_access/arp_sysctl.c +++ b/agent/mibgroup/ip-mib/data_access/arp_sysctl.c @@ -129,7 +129,13 @@ _load_arp_table_from_sysctl(netsnmp_arp_access *access) mib[2] = 0; mib[3] = AF_INET; mib[4] = NET_RT_FLAGS; +#ifdef RTF_LLINFO mib[5] = RTF_LLINFO; +#elif defined(RTF_LLDATA) + mib[5] = RTF_LLDATA; +#else + mib[5] = 0; +#endif err = 0; buf = newbuf = NULL; @@ -236,7 +242,13 @@ _load_ndp_table_from_sysctl(netsnmp_arp_access *access) mib[2] = 0; mib[3] = AF_INET6; mib[4] = NET_RT_FLAGS; +#ifdef RTF_LLINFO mib[5] = RTF_LLINFO; +#elif defined(RTF_LLDATA) + mib[5] = RTF_LLDATA; +#else + mib[5] = 0; +#endif err = 0; buf = newbuf = NULL; diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter.h b/agent/mibgroup/ip-mib/data_access/defaultrouter.h index 49b9927..4fd068b 100644 --- a/agent/mibgroup/ip-mib/data_access/defaultrouter.h +++ b/agent/mibgroup/ip-mib/data_access/defaultrouter.h @@ -17,14 +17,16 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-mib/data_access/defaultrouter_common) +config_require(ip-mib/data_access/defaultrouter_common); #if defined( linux ) -config_require(ip-mib/data_access/defaultrouter_linux) +config_require(ip-mib/data_access/defaultrouter_linux); #elif defined( freebsd4 ) || defined( netbsd5 ) || defined( openbsd ) || defined( dragonfly ) || defined( darwin ) -config_require(ip-mib/data_access/defaultrouter_sysctl) +config_require(ip-mib/data_access/defaultrouter_sysctl); +#elif defined( solaris2 ) +config_require(ip-mib/data_access/defaultrouter_solaris2); #else /* * couldn't determine the correct file! */ -config_error(the defaultrouter data access library is not available in this environment.) +config_error(the defaultrouter data access library is not available in this environment.); #endif diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c b/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c index ae85bfa..a65f98c 100644 --- a/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c +++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_common.c @@ -10,6 +10,8 @@ #include #include "ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h" +#include "defaultrouter.h" +#include "defaultrouter_private.h" /**---------------------------------------------------------------------*/ /* @@ -20,20 +22,6 @@ static int _access_defaultrouter_entry_compare_addr(const void *lhs, static void _access_defaultrouter_entry_release(netsnmp_defaultrouter_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern int -netsnmp_arch_defaultrouter_entry_init(netsnmp_defaultrouter_entry *entry); - -extern int -netsnmp_arch_defaultrouter_container_load(netsnmp_container* container, - u_int load_flags); - /**---------------------------------------------------------------------*/ /* * container functions diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c b/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c index 038016a..abe5ba8 100644 --- a/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c +++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_linux.c @@ -10,6 +10,7 @@ #include #include "ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h" +#include "defaultrouter_private.h" #include #ifdef HAVE_LINUX_RTNETLINK_H @@ -271,6 +272,11 @@ _load(netsnmp_container *container) rtap = RTA_NEXT(rtap, rtcount); } /* while RTA_OK(rtap) */ + /* clip the calculated lifetime if necessary */ + if (lifetime > IPDEFAULTROUTERLIFETIME_MAX) { + lifetime = IPDEFAULTROUTERLIFETIME_MAX; + } + if (address_len != 0 && if_index != -1 && lifetime != 0 && preference != -3 ) { DEBUGIF("access:defaultrouter") { diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_private.h b/agent/mibgroup/ip-mib/data_access/defaultrouter_private.h new file mode 100644 index 0000000..e8534b2 --- /dev/null +++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_private.h @@ -0,0 +1,6 @@ +struct netsnmp_defaultrouter_s; +struct netsnmp_container_s; + +int netsnmp_arch_defaultrouter_entry_init(struct netsnmp_defaultrouter_s *entry); +int netsnmp_arch_defaultrouter_container_load(struct netsnmp_container_s *container, + u_int load_flags); diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c b/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c new file mode 100644 index 0000000..3700383 --- /dev/null +++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_solaris2.c @@ -0,0 +1,142 @@ +/* + * Interface MIB architecture support + * + * $Id:$ + */ +#include +#include +#include "mibII/mibII_common.h" + +#include +#include +#include + +#include "ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h" +#include "defaultrouter_private.h" + +#include +#include + +#if !defined(SA_SIZE) && !defined(RT_ROUNDUP) +#define RT_ROUNDUP(a) \ + ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) +#endif + +/**---------------------------------------------------------------------*/ +/* + * local static prototypes + */ +static int _load_defaultrouter_from_mib2(netsnmp_container *, int); + +static int idx_offset; + +/* + * initialize arch specific storage + * + * @retval 0: success + * @retval <0: error + */ +int +netsnmp_arch_defaultrouter_entry_init(netsnmp_defaultrouter_entry *entry) +{ + /* + * init + */ + return 0; +} + +/** + * + * @retval 0 no errors + * @retval !0 errors + */ +int +netsnmp_arch_defaultrouter_container_load(netsnmp_container *container, + u_int load_flags) +{ + int err; + + err = 0; + idx_offset = 0; + + DEBUGMSGTL(("access:defaultrouter:entry:arch", "load\n")); + if (NULL == container) { + snmp_log(LOG_ERR, + "netsnmp_arch_defaultrouter_container_load: container invalid\n"); + return 1; + } + + err = _load_defaultrouter_from_mib2(container, AF_INET); + if (err != 0) { + u_int flags = NETSNMP_ACCESS_DEFAULTROUTER_FREE_KEEP_CONTAINER; + netsnmp_access_defaultrouter_container_free(container, flags); + goto out; + } + +#ifdef NETSNMP_ENABLE_IPV6 + err = _load_defaultrouter_from_mib2(container, AF_INET6); + if (err != 0) { + u_int flags = NETSNMP_ACCESS_DEFAULTROUTER_FREE_KEEP_CONTAINER; + netsnmp_access_defaultrouter_container_free(container, flags); + goto out; + } +#endif + +out: + return err; +} + + +static int +IP_Cmp_Route(void *addr, void *ep) +{ + return (0); /* found */ +} + + +/** + * + * @retval 0 no errors + * @retval !0 errors + */ +static int +_load_defaultrouter_from_mib2(netsnmp_container *container, int family) +{ + netsnmp_defaultrouter_entry *entry; + mib2_ipRouteEntry_t Curentry, Nextentry; + int req_type; + int err = 0; + int idx_offset = 0; + + for (Nextentry.ipRouteDest = (u_long) -2, req_type = GET_FIRST;; + Nextentry = Curentry, req_type = GET_NEXT) { + if (getMibstat(MIB_IP_ROUTE, &Curentry, sizeof(mib2_ipRouteEntry_t), + req_type, &IP_Cmp_Route, &Nextentry) != 0) + break; + DEBUGMSGTL(("access:defaultrouter", "nexthop %x type %x\n", Curentry.ipRouteNextHop, Curentry.ipRouteInfo.re_ire_type)); + if (!(Curentry.ipRouteInfo.re_ire_type & IRE_DEFAULT)) + continue; + entry = netsnmp_access_defaultrouter_entry_create(); + Curentry.ipRouteIfIndex.o_bytes[Curentry.ipRouteIfIndex.o_length] = '\0'; + entry->ns_dr_index = ++idx_offset; + entry->dr_if_index = netsnmp_access_interface_index_find( + Curentry.ipRouteIfIndex.o_bytes); + + entry->dr_addresstype = INETADDRESSTYPE_IPV4; + entry->dr_address_len = 4; + memcpy(entry->dr_address, &Curentry.ipRouteNextHop, 4); + + entry->dr_lifetime = Curentry.ipRouteAge; + entry->dr_preference = Curentry.ipRouteMetric1; + + if ((err = CONTAINER_INSERT(container, entry)) < 0) { + DEBUGMSGTL(("access:defaultrouter:container", + "error with defaultrouter_entry: " + "insert into container failed.\n")); + netsnmp_access_defaultrouter_entry_free(entry); + /* goto out; */ + } + } + + return 0; +} diff --git a/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c b/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c index dc46eb8..824ed50 100644 --- a/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c +++ b/agent/mibgroup/ip-mib/data_access/defaultrouter_sysctl.c @@ -10,6 +10,7 @@ #include #include "ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h" +#include "defaultrouter_private.h" #include #include @@ -162,7 +163,7 @@ _load_defaultrouter_from_sysctl(netsnmp_container *container, int family) lim = buf + needed; for (next = buf; next < lim; next += rtm->rtm_msglen) { #ifdef NETSNMP_ENABLE_IPV6 - struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; + struct in6_addr in6addr_any = { } /*IN6ADDR_ANY_INIT*/; #endif rtm = (struct rt_msghdr *)next; diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress.h b/agent/mibgroup/ip-mib/data_access/ipaddress.h index d79c7c2..0dc28ad 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress.h +++ b/agent/mibgroup/ip-mib/data_access/ipaddress.h @@ -17,14 +17,15 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-mib/data_access/ipaddress_common) +config_require(ip-mib/data_access/ipaddress_common); #if defined( linux ) -config_require(ip-mib/data_access/ipaddress_linux) +config_require(ip-mib/data_access/ipaddress_linux); #elif defined( solaris2 ) -config_require(ip-mib/data_access/ipaddress_solaris2) +config_require(ip-mib/data_access/ipaddress_solaris2); #elif defined( freebsd7 ) || defined( netbsd5 ) || defined( openbsd4 ) || defined( dragonfly ) || defined( darwin ) -config_require(ip-mib/data_access/ipaddress_sysctl) +config_require(ip-mib/data_access/ipaddress_sysctl); #else -config_error(the ipaddress data access library is not available in this environment.) +config_error(the ipaddress data access library is not available in this environment.); #endif +struct address_flag_info netsnmp_access_other_info_get(int index, int family); diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_common.c b/agent/mibgroup/ip-mib/data_access/ipaddress_common.c index a663985..9c5996d 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_common.c +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_common.c @@ -11,18 +11,20 @@ #include #include "ip-mib/ipAddressTable/ipAddressTable_constants.h" +#include "ipaddress.h" +#include "ipaddress_private.h" #include -netsnmp_feature_child_of(ipaddress_common, libnetsnmpmibs) +netsnmp_feature_child_of(ipaddress_common, libnetsnmpmibs); -netsnmp_feature_child_of(ipaddress_common_copy_utilities, ipaddress_common) -netsnmp_feature_child_of(ipaddress_entry_copy, ipaddress_common) -netsnmp_feature_child_of(ipaddress_entry_update, ipaddress_common) -netsnmp_feature_child_of(ipaddress_prefix_copy, ipaddress_common_copy_utilities) +netsnmp_feature_child_of(ipaddress_common_copy_utilities, ipaddress_common); +netsnmp_feature_child_of(ipaddress_entry_copy, ipaddress_common); +netsnmp_feature_child_of(ipaddress_entry_update, ipaddress_common); +netsnmp_feature_child_of(ipaddress_prefix_copy, ipaddress_common_copy_utilities); #ifdef NETSNMP_FEATURE_REQUIRE_IPADDRESS_ENTRY_COPY -netsnmp_feature_require(ipaddress_arch_entry_copy) +netsnmp_feature_require(ipaddress_arch_entry_copy); #endif /* NETSNMP_FEATURE_REQUIRE_IPADDRESS_ENTRY_COPY */ /**---------------------------------------------------------------------*/ @@ -34,29 +36,6 @@ static int _access_ipaddress_entry_compare_addr(const void *lhs, static void _access_ipaddress_entry_release(netsnmp_ipaddress_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern int -netsnmp_arch_ipaddress_container_load(netsnmp_container* container, - u_int load_flags); -extern int -netsnmp_arch_ipaddress_entry_init(netsnmp_ipaddress_entry *entry); -extern int -netsnmp_arch_ipaddress_entry_copy(netsnmp_ipaddress_entry *lhs, - netsnmp_ipaddress_entry *rhs); -extern void -netsnmp_arch_ipaddress_entry_cleanup(netsnmp_ipaddress_entry *entry); -extern int -netsnmp_arch_ipaddress_create(netsnmp_ipaddress_entry *entry); -extern int -netsnmp_arch_ipaddress_delete(netsnmp_ipaddress_entry *entry); - - /**---------------------------------------------------------------------*/ /* * container functions @@ -80,6 +59,7 @@ netsnmp_access_ipaddress_container_init(u_int flags) return NULL; } container1->container_name = strdup("ia_index"); + container1->flags = CONTAINER_KEY_ALLOW_DUPLICATES; if (flags & NETSNMP_ACCESS_IPADDRESS_INIT_ADDL_IDX_BY_ADDR) { netsnmp_container *container2 = @@ -92,6 +72,12 @@ netsnmp_access_ipaddress_container_init(u_int flags) container2->compare = _access_ipaddress_entry_compare_addr; container2->container_name = strdup("ia_addr"); + /* + * With allowed duplicates, CONTAINER_INSERT does not need to sort whole + * container and check for duplicates. We remove duplicates manually in + * netsnmp_access_ipaddress_container_load. + */ + container2->flags = CONTAINER_KEY_ALLOW_DUPLICATES; netsnmp_container_add_index(container1, container2); } @@ -99,6 +85,53 @@ netsnmp_access_ipaddress_container_init(u_int flags) return container1; } +/** + * Remove duplicate entries from the container. + * This function returns new copy of the container and destroys + * the original one. Use like this: + * c = _remove_duplicates(c, flags); + */ +static netsnmp_container * +_remove_duplicates(netsnmp_container *container, u_int container_flags) +{ + netsnmp_container *c; + netsnmp_iterator *it; + netsnmp_container *ret; + netsnmp_ipaddress_entry *entry, *prev_entry; + + if (! (container_flags & NETSNMP_ACCESS_IPADDRESS_INIT_ADDL_IDX_BY_ADDR)) { + /* We don't have address index, we can't detect duplicates */ + return container; + } + + ret = netsnmp_access_ipaddress_container_init(container_flags); + + /* use the IpAddress index */ + c = container->next; + it = CONTAINER_ITERATOR(c); + /* Sort the address index */ + CONTAINER_FIND(c, ITERATOR_FIRST(it)); + + + /* + * Sequentially iterate over sorted container and add only unique entries + * to 'ret' + */ + prev_entry = NULL; + for (entry = ITERATOR_FIRST(it); entry; entry = ITERATOR_NEXT(it)) { + if (prev_entry && _access_ipaddress_entry_compare_addr(prev_entry, entry) == 0) { + /* 'entry' is duplicate of the previous one -> delete it */ + netsnmp_access_ipaddress_entry_free(entry); + } else { + CONTAINER_INSERT(ret, entry); + prev_entry = entry; + } + } + CONTAINER_FREE(container); + free(it); + return ret; +} + /** * @retval NULL error * @retval !NULL pointer to container @@ -112,9 +145,10 @@ netsnmp_access_ipaddress_container_load(netsnmp_container* container, DEBUGMSGTL(("access:ipaddress:container", "load\n")); + if (load_flags & NETSNMP_ACCESS_IPADDRESS_LOAD_ADDL_IDX_BY_ADDR) + container_flags |= NETSNMP_ACCESS_IPADDRESS_INIT_ADDL_IDX_BY_ADDR; + if (NULL == container) { - if (load_flags & NETSNMP_ACCESS_IPADDRESS_LOAD_ADDL_IDX_BY_ADDR) - container_flags |= NETSNMP_ACCESS_IPADDRESS_INIT_ADDL_IDX_BY_ADDR; container = netsnmp_access_ipaddress_container_init(container_flags); } if (NULL == container) { @@ -129,6 +163,9 @@ netsnmp_access_ipaddress_container_load(netsnmp_container* container, container = NULL; } + if (container) + container = _remove_duplicates(container, container_flags); + return container; } diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c b/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c index 6025f05..485ce38 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c @@ -21,7 +21,7 @@ #include "ipaddress_ioctl.h" -netsnmp_feature_child_of(ipadress_ioctl_entry_copy, ipaddress_common) +netsnmp_feature_child_of(ipadress_ioctl_entry_copy, ipaddress_common); static void _print_flags(short flags); @@ -145,7 +145,7 @@ _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container, _ioctl_extras *extras; if ((sd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - snmp_log(LOG_ERR, "could not create socket\n"); + snmp_log_perror("_netsnmp_ioctl_ipaddress_container_load_v4: could not create socket"); return -1; } @@ -172,6 +172,12 @@ _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container, continue; } + if (!netsnmp_access_interface_include(ifrp->ifr_name)) + continue; + + if (netsnmp_access_interface_max_reached(ifrp->ifr_name)) + /* we may need to stop tracking ifaces if a max was set */ + continue; /* */ entry = netsnmp_access_ipaddress_entry_create(); @@ -238,7 +244,7 @@ _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container, * get broadcast */ memset(&addr_info, 0, sizeof(struct address_flag_info)); -#if defined (NETSNMP_ENABLE_IPV6) +#if defined (NETSNMP_ENABLE_IPV6) && defined(HAVE_LINUX_RTNETLINK_H) addr_info = netsnmp_access_other_info_get(entry->if_index, AF_INET); if(addr_info.bcastflg) { bcastentry = netsnmp_access_ipaddress_entry_create(); @@ -279,6 +285,7 @@ _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container, if (ioctl(sd, SIOCGIFFLAGS, ifrp) < 0) { snmp_log(LOG_ERR, "error getting if_flags for interface %d\n", i); + netsnmp_access_ipaddress_entry_free(bcastentry); netsnmp_access_ipaddress_entry_free(entry); continue; } @@ -322,8 +329,10 @@ _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container, " if %d: addr len %d, index 0x%" NETSNMP_PRIo "x\n", i, entry->ia_address_len, entry->if_index)); if (4 == entry->ia_address_len) - DEBUGMSGT_NC(("access:ipaddress:container", " address %p\n", - *((void**)entry->ia_address))); + DEBUGMSGT_NC(("access:ipaddress:container", + " address %d.%d.%d.%d\n", + entry->ia_address[0], entry->ia_address[1], + entry->ia_address[2], entry->ia_address[3])); DEBUGMSGT_NC(("access:ipaddress:container", "flags 0x%x\n", extras->flags)); _print_flags(extras->flags); @@ -383,7 +392,7 @@ _next_alias(const char *if_name) len = strlen(if_name); if ((sd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - snmp_log(LOG_ERR, "could not create socket\n"); + snmp_log_perror("_next_alias: could not create socket"); return -1; } @@ -469,7 +478,7 @@ _netsnmp_ioctl_ipaddress_set_v4(netsnmp_ipaddress_entry * entry) fd = socket(AF_INET, SOCK_DGRAM, 0); if(fd < 0) { - snmp_log(LOG_ERR,"couldn't create socket\n"); + snmp_log_perror("_netsnmp_ioctl_ipaddress_set_v4: couldn't create socket"); return -2; } memset(&ifrq, 0, sizeof(ifrq)); @@ -490,9 +499,8 @@ _netsnmp_ioctl_ipaddress_set_v4(netsnmp_ipaddress_entry * entry) * search for unused alias */ alias_idx = _next_alias(name); - snprintf(ifrq.ifr_name,sizeof(ifrq.ifr_name), "%s:%d", + snprintf(ifrq.ifr_name, sizeof(ifrq.ifr_name), "%s:%d", name, alias_idx); - ifrq.ifr_name[sizeof(ifrq.ifr_name) - 1] = 0; } else strlcpy(ifrq.ifr_name, (char *) extras->name, sizeof(ifrq.ifr_name)); @@ -537,7 +545,7 @@ _netsnmp_ioctl_ipaddress_delete_v4(netsnmp_ipaddress_entry * entry) fd = socket(AF_INET, SOCK_DGRAM, 0); if(fd < 0) { - snmp_log(LOG_ERR,"couldn't create socket\n"); + snmp_log_perror("_netsnmp_ioctl_ipaddress_delete_v4: couldn't create socket"); return -2; } @@ -591,7 +599,7 @@ _netsnmp_ioctl_ipaddress_v6(netsnmp_ipaddress_entry * entry, int operation) fd = socket(AF_INET6, SOCK_DGRAM, 0); if(fd < 0) { - snmp_log(LOG_ERR,"couldn't create socket\n"); + snmp_log_perror("_netsnmp_ioctl_ipaddress_v6: couldn't create socket"); return -2; } memset(&ifrq, 0, sizeof(ifrq)); diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.h b/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.h index f2b7847..d079417 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.h +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.h @@ -2,6 +2,8 @@ extern "C" { #endif +struct netsnmp_ipaddress_s; + /* * struct for netlink extras */ @@ -17,14 +19,14 @@ int _netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container, int idx_offset); int -_netsnmp_ioctl_ipaddress_set_v4(netsnmp_ipaddress_entry * entry); +_netsnmp_ioctl_ipaddress_set_v4(struct netsnmp_ipaddress_s * entry); int -_netsnmp_ioctl_ipaddress_remove_v4(netsnmp_ipaddress_entry * entry); +_netsnmp_ioctl_ipaddress_remove_v4(struct netsnmp_ipaddress_s * entry); int -_netsnmp_ioctl_ipaddress_set_v6(netsnmp_ipaddress_entry * entry); +_netsnmp_ioctl_ipaddress_set_v6(struct netsnmp_ipaddress_s * entry); int -_netsnmp_ioctl_ipaddress_remove_v6(netsnmp_ipaddress_entry * entry); +_netsnmp_ioctl_ipaddress_remove_v6(struct netsnmp_ipaddress_s * entry); int netsnmp_access_ipaddress_ioctl_get_interface_count(int sd, struct ifconf * ifc); @@ -43,20 +45,20 @@ typedef struct _ioctl_extras { _ioctl_extras * -netsnmp_ioctl_ipaddress_entry_init(netsnmp_ipaddress_entry *entry); +netsnmp_ioctl_ipaddress_entry_init(struct netsnmp_ipaddress_s *entry); void -netsnmp_ioctl_ipaddress_entry_cleanup(netsnmp_ipaddress_entry *entry); +netsnmp_ioctl_ipaddress_entry_cleanup(struct netsnmp_ipaddress_s *entry); int -netsnmp_ioctl_ipaddress_entry_copy(netsnmp_ipaddress_entry *lhs, - netsnmp_ipaddress_entry *rhs); +netsnmp_ioctl_ipaddress_entry_copy(struct netsnmp_ipaddress_s *lhs, + struct netsnmp_ipaddress_s *rhs); _ioctl_extras * -netsnmp_ioctl_ipaddress_extras_get(netsnmp_ipaddress_entry *entry); +netsnmp_ioctl_ipaddress_extras_get(struct netsnmp_ipaddress_s *entry); int -_netsnmp_ioctl_ipaddress_delete_v4(netsnmp_ipaddress_entry * entry); +_netsnmp_ioctl_ipaddress_delete_v4(struct netsnmp_ipaddress_s * entry); int -_netsnmp_ioctl_ipaddress_delete_v6(netsnmp_ipaddress_entry * entry); +_netsnmp_ioctl_ipaddress_delete_v6(struct netsnmp_ipaddress_s * entry); #ifdef __cplusplus } diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c index f1cef0a..b38beb5 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c @@ -15,20 +15,21 @@ #include "ip-mib/ipAddressTable/ipAddressTable_constants.h" #include "ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h" #include "mibgroup/util_funcs.h" +#include "../../if-mib/data_access/interface_private.h" #include #include +#include -netsnmp_feature_require(prefix_info) -netsnmp_feature_require(find_prefix_info) +netsnmp_feature_require(prefix_info); +netsnmp_feature_require(find_prefix_info); -netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common) +netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common); #ifdef NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY -netsnmp_feature_require(ipaddress_ioctl_entry_copy) +netsnmp_feature_require(ipaddress_ioctl_entry_copy); #endif /* NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY */ -#if defined (NETSNMP_ENABLE_IPV6) #include #include #if defined(HAVE_LINUX_RTNETLINK_H) @@ -38,13 +39,13 @@ netsnmp_feature_require(ipaddress_ioctl_entry_copy) #define SUPPORT_PREFIX_FLAGS 1 #endif /* RTMGRP_IPV6_PREFIX */ #endif /* HAVE_LINUX_RTNETLINK_H */ -#endif +#include "ipaddress.h" #include "ipaddress_ioctl.h" -#ifdef SUPPORT_PREFIX_FLAGS -extern prefix_cbx *prefix_head_list; -#endif +#include "ipaddress_private.h" + int _load_v6(netsnmp_container *container, int idx_offset); + #ifdef HAVE_LINUX_RTNETLINK_H int netsnmp_access_ipaddress_extra_prefix_info(int index, @@ -217,7 +218,7 @@ _load_v6(netsnmp_container *container, int idx_offset) "cannot get ip address information" "as netlink socket is not available\n")); return -1; -#else +#else /* HAVE_LINUX_RTNETLINK_H */ FILE *in; char line[80], addr[40]; char if_name[IFNAMSIZ+1];/* +1 for '\0' because of the ugly sscanf below */ @@ -232,7 +233,18 @@ _load_v6(netsnmp_container *container, int idx_offset) #define PROCFILE "/proc/net/if_inet6" if (!(in = fopen(PROCFILE, "r"))) { - DEBUGMSGTL(("access:ipaddress:container","could not open " PROCFILE "\n")); + /* + * If opening /proc/net/if_inet6 fails, only complain if that file + * does not exist. If it exists but if it is not readable, do not + * log an error message because this probably is the result of IPv6 + * support having been disabled intentionally. + */ + struct stat st; + + if (stat(PROCFILE, &st) == 0) { + NETSNMP_LOGONCE((LOG_ERR, + "ipaddress_linux: could not open " PROCFILE)); + } return -2; } @@ -260,6 +272,13 @@ _load_v6(netsnmp_container *container, int idx_offset) DEBUGMSGTL(("access:ipaddress:container", "addr %s, index %d, pfx %d, scope %d, flags 0x%X, name %s\n", addr, if_index, pfx_len, scope, flags, if_name)); + + if (!netsnmp_access_interface_include(if_name)) + continue; + + if (netsnmp_access_interface_max_reached(if_name)) + /* we may need to stop tracking ifaces if a max was set */ + continue; /* */ entry = netsnmp_access_ipaddress_entry_create(); @@ -275,8 +294,7 @@ _load_v6(netsnmp_container *container, int idx_offset) buf = entry->ia_address; if(1 != netsnmp_hex_to_binary(&buf, &in_len, &out_len, 0, addr, ":")) { - snmp_log(LOG_ERR,"error parsing '%s', skipping\n", - entry->ia_address); + snmp_log(LOG_ERR,"error parsing '%s', skipping\n", addr); netsnmp_access_ipaddress_entry_free(entry); continue; } @@ -410,8 +428,10 @@ _load_v6(netsnmp_container *container, int idx_offset) return rc; return idx_offset; +#endif /* HAVE_LINUX_RTNETLINK_H */ } +#ifdef HAVE_LINUX_RTNETLINK_H struct address_flag_info netsnmp_access_other_info_get(int index, int family) { @@ -433,7 +453,7 @@ netsnmp_access_other_info_get(int index, int family) memset(&addr, 0, sizeof(struct address_flag_info)); sd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); if(sd < 0) { - snmp_log(LOG_ERR, "could not open netlink socket\n"); + snmp_log_perror("ipaddress_linux: could not open netlink socket"); return addr; } @@ -450,19 +470,19 @@ netsnmp_access_other_info_get(int index, int family) status = send(sd, &req, req.n.nlmsg_len, 0); if (status < 0) { - snmp_log(LOG_ERR, "could not send netlink request\n"); - return addr; + snmp_log_perror("ipadress_linux: could not send netlink request"); + goto out; } status = recv(sd, buf, sizeof(buf), 0); if (status < 0) { - snmp_log (LOG_ERR, "could not recieve netlink request\n"); - return addr; + snmp_log_perror("ipadress_linux: could not receive netlink request"); + goto out; } if(status == 0) { - snmp_log (LOG_ERR, "nothing to read\n"); - return addr; + snmp_log (LOG_ERR, "ipadress_linux: nothing to read\n"); + goto out; } for(nlmp = (struct nlmsghdr *)buf; status > sizeof(*nlmp);) { @@ -471,12 +491,12 @@ netsnmp_access_other_info_get(int index, int family) if (req_len < 0 || len > status) { snmp_log (LOG_ERR, "invalid netlink message\n"); - return addr; + goto out; } if (!NLMSG_OK(nlmp, status)) { snmp_log (LOG_ERR, "invalid NLMSG message\n"); - return addr; + goto out; } rtmp = (struct ifaddrmsg *)NLMSG_DATA(nlmp); rtatp = (struct rtattr *)IFA_RTA(rtmp); @@ -496,12 +516,11 @@ netsnmp_access_other_info_get(int index, int family) status -= NLMSG_ALIGN(len); nlmp = (struct nlmsghdr*)((char*)nlmp + NLMSG_ALIGN(len)); } +out: close(sd); return addr; -#endif } -#ifdef HAVE_LINUX_RTNETLINK_H int netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, ulong *validlt, char *addr) @@ -525,6 +544,8 @@ netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, int rtattrlen; int sd; int reqaddr = 0; + int ret = -1; + sd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); if(sd < 0) { snmp_log(LOG_ERR, "could not open netlink socket\n"); @@ -541,16 +562,16 @@ netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, status = send (sd, &req, req.nlhdr.nlmsg_len, 0); if (status < 0) { snmp_log(LOG_ERR, "could not send netlink request\n"); - return -1; + goto out; } status = recv (sd, buf, sizeof(buf), 0); if (status < 0) { snmp_log (LOG_ERR, "could not recieve netlink request\n"); - return -1; + goto out; } if (status == 0) { snmp_log (LOG_ERR, "nothing to read\n"); - return -1; + goto out; } for (nlmp = (struct nlmsghdr *)buf; status > sizeof(*nlmp); ){ @@ -559,12 +580,12 @@ netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, if (req_len < 0 || len > status) { snmp_log (LOG_ERR, "invalid netlink message\n"); - return -1; + goto out; } if (!NLMSG_OK (nlmp, status)) { snmp_log (LOG_ERR, "invalid NLMSG message\n"); - return -1; + goto out; } rtmp = (struct ifaddrmsg *)NLMSG_DATA(nlmp); rtatp = (struct rtattr *)IFA_RTA(rtmp); @@ -592,9 +613,11 @@ netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt, status -= NLMSG_ALIGN(len); nlmp = (struct nlmsghdr*)((char*)nlmp + NLMSG_ALIGN(len)); } + ret = 0; + +out: close(sd); - return 0; + return ret; } -#endif -#endif - +#endif /* HAVE_LINUX_RTNETLINK_H */ +#endif /* defined(NETSNMP_ENABLE_IPV6) */ diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h index 600ceaf..5c2e91c 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.h @@ -17,5 +17,5 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-mib/data_access/ipaddress_ioctl) -config_require(util_funcs) +config_require(ip-mib/data_access/ipaddress_ioctl); +config_require(util_funcs); diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_private.h b/agent/mibgroup/ip-mib/data_access/ipaddress_private.h new file mode 100644 index 0000000..61107c7 --- /dev/null +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_private.h @@ -0,0 +1,10 @@ +int netsnmp_arch_ipaddress_container_load(netsnmp_container *container, + u_int load_flags); +int netsnmp_arch_ipaddress_entry_init(netsnmp_ipaddress_entry *entry); +void netsnmp_arch_ipaddress_entry_cleanup(netsnmp_ipaddress_entry *entry); +int netsnmp_arch_ipaddress_entry_copy(netsnmp_ipaddress_entry *lhs, + netsnmp_ipaddress_entry *rhs); +int netsnmp_arch_ipaddress_create(netsnmp_ipaddress_entry *entry); +int netsnmp_arch_ipaddress_delete(netsnmp_ipaddress_entry *entry); +int netsnmp_arch_ipaddress_container_load(netsnmp_container *container, + u_int load_flags); diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_solaris2.c b/agent/mibgroup/ip-mib/data_access/ipaddress_solaris2.c index e2485e3..ebd87ae 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_solaris2.c +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_solaris2.c @@ -11,11 +11,12 @@ #include #include "ip-mib/ipAddressTable/ipAddressTable_constants.h" +#include "ipaddress_private.h" #include "kernel_sunos5.h" #include "mibII/mibII_common.h" -netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common) +netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common); static int _load_v4(netsnmp_container *container, int idx_offset); #if defined( NETSNMP_ENABLE_IPV6 ) @@ -148,11 +149,11 @@ _load_v4(netsnmp_container *container, int idx_offset) while ((rc = getMibstat(MIB_IP_ADDR, &ipae, sizeof(ipae), req, &Get_everything, NULL)) == 0) { req = GET_NEXT; + if (ipae.ipAdEntAddr == INADDR_ANY) + continue; entry = netsnmp_access_ipaddress_entry_create(); if (entry == NULL) return (-1); - if (ipae.ipAdEntAddr == INADDR_ANY) - continue; ipae.ipAdEntIfIndex.o_bytes[ipae.ipAdEntIfIndex.o_length] = '\0'; DEBUGMSGTL(("access:ipaddress:container", "found if %s\n", @@ -224,13 +225,13 @@ _load_v6(netsnmp_container *container, int idx_offset) while ((rc = getMibstat(MIB_IP6_ADDR, &ip6ae, sizeof(ip6ae), req, &Get_everything, NULL)) == 0) { req = GET_NEXT; - entry = netsnmp_access_ipaddress_entry_create(); - if (entry == NULL) - return (-1); if (memcmp((const void *)&ip6ae.ipv6AddrAddress, (const void *)&in6addr_any, sizeof (ip6ae.ipv6AddrAddress)) == 0) continue; + entry = netsnmp_access_ipaddress_entry_create(); + if (entry == NULL) + return (-1); ip6ae.ipv6AddrIfIndex.o_bytes[ip6ae.ipv6AddrIfIndex.o_length] = '\0'; DEBUGMSGTL(("access:ipaddress:container", "found if %s\n", diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c b/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c index 0a6221b..a8b6c42 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_sysctl.c @@ -20,19 +20,18 @@ #include #include -netsnmp_feature_require(prefix_info) -netsnmp_feature_require(find_prefix_info) +netsnmp_feature_require(prefix_info); +netsnmp_feature_require(find_prefix_info); -netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common) +netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common); #ifdef NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY -netsnmp_feature_require(ipaddress_ioctl_entry_copy) +netsnmp_feature_require(ipaddress_ioctl_entry_copy); #endif /* NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY */ #include "ipaddress_ioctl.h" -#ifdef SUPPORT_PREFIX_FLAGS -extern prefix_cbx *prefix_head_list; -#endif +#include "ipaddress_private.h" +#include "if-mib/data_access/interface_private.h" #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) @@ -159,7 +158,6 @@ netsnmp_arch_ipaddress_container_load(netsnmp_container *container, struct ifa_msghdr *ifa; struct sockaddr *a; int amask; - int rc = 0; int idx_offset = 0; DEBUGMSGTL(("access:ipaddress:container:sysctl", @@ -179,11 +177,12 @@ netsnmp_arch_ipaddress_container_load(netsnmp_container *container, if_list = (u_char*)malloc(if_list_size); if (if_list == NULL) { snmp_log(LOG_ERR, "could not allocate memory for interface info " - "(%zu bytes)\n", if_list_size); + "(%u bytes)\n", (unsigned) if_list_size); return -3; } else { DEBUGMSGTL(("access:ipaddress:container:sysctl", - "allocated %zu bytes for if_list\n", if_list_size)); + "allocated %u bytes for if_list\n", + (unsigned) if_list_size)); } if (sysctl(sysctl_oid, sizeof(sysctl_oid)/sizeof(int), if_list, @@ -206,10 +205,8 @@ netsnmp_arch_ipaddress_container_load(netsnmp_container *container, ifa->ifam_addrs, ifa->ifam_index)); entry = netsnmp_access_ipaddress_entry_create(); - if (entry == NULL) { - rc = -3; - break; - } + if (entry == NULL) + return -3; a = (struct sockaddr *) (ifa + 1); entry->ia_status = IPADDRESSSTATUSTC_UNKNOWN; diff --git a/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h b/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h index 8d81b3f..6100aee 100644 --- a/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h +++ b/agent/mibgroup/ip-mib/data_access/ipv6scopezone.h @@ -17,9 +17,9 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-mib/data_access/ipv6scopezone_common) +config_require(ip-mib/data_access/ipv6scopezone_common); #if defined( linux ) -config_require(ip-mib/data_access/ipv6scopezone_linux) +config_require(ip-mib/data_access/ipv6scopezone_linux); #else /* * couldn't determine the correct file! diff --git a/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c b/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c index 7462ebe..ec9bf97 100644 --- a/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c +++ b/agent/mibgroup/ip-mib/data_access/ipv6scopezone_common.c @@ -8,25 +8,14 @@ #include #include +#include "ipv6scopezone_private.h" + /* * local static prototypes */ static void _entry_release(netsnmp_v6scopezone_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern int -netsnmp_access_scopezone_container_arch_load(netsnmp_container* container, - u_int load_flags); -extern void -netsnmp_access_scopezone_arch_init(void); - /** * initialize systemstats container */ diff --git a/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c b/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c index 7d60641..bfe5ce7 100644 --- a/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c +++ b/agent/mibgroup/ip-mib/data_access/ipv6scopezone_linux.c @@ -8,6 +8,7 @@ #include #include +#include "ipv6scopezone_private.h" #if defined (NETSNMP_ENABLE_IPV6) static int _scopezone_v6(netsnmp_container* container, int idx_offset); diff --git a/agent/mibgroup/ip-mib/data_access/ipv6scopezone_private.h b/agent/mibgroup/ip-mib/data_access/ipv6scopezone_private.h new file mode 100644 index 0000000..89aa9d3 --- /dev/null +++ b/agent/mibgroup/ip-mib/data_access/ipv6scopezone_private.h @@ -0,0 +1,2 @@ +int netsnmp_access_scopezone_container_arch_load(netsnmp_container* container, + u_int load_flags); diff --git a/agent/mibgroup/ip-mib/data_access/scalars_common.h b/agent/mibgroup/ip-mib/data_access/scalars_common.h index ebea21d..e748de3 100644 --- a/agent/mibgroup/ip-mib/data_access/scalars_common.h +++ b/agent/mibgroup/ip-mib/data_access/scalars_common.h @@ -18,13 +18,13 @@ * be handled in the *_hpux.h header file. */ #if defined( linux ) -config_require(ip-mib/data_access/scalars_linux) +config_require(ip-mib/data_access/scalars_linux); #elif defined( freebsd4 ) || defined( netbsd5 ) || defined( openbsd4 ) || defined( dragonfly ) || defined( darwin ) -config_require(ip-mib/data_access/scalars_sysctl) +config_require(ip-mib/data_access/scalars_sysctl); #else /* * couldn't determine the correct file! * require a bogus file to generate an error. */ -config_require(ip-mib/data_access/scalars-unknown-arch) +config_require(ip-mib/data_access/scalars-unknown-arch); #endif diff --git a/agent/mibgroup/ip-mib/data_access/scalars_linux.c b/agent/mibgroup/ip-mib/data_access/scalars_linux.c index 85e912a..6115655 100644 --- a/agent/mibgroup/ip-mib/data_access/scalars_linux.c +++ b/agent/mibgroup/ip-mib/data_access/scalars_linux.c @@ -9,7 +9,7 @@ #include -netsnmp_feature_require(register_num_file_instance) +netsnmp_feature_require(register_num_file_instance); static const char ipfw_name[] = "/proc/sys/net/ipv4/conf/all/forwarding"; static const char ipttl_name[] = "/proc/sys/net/ipv4/ip_default_ttl"; diff --git a/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c b/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c index 569c743..11dfdba 100644 --- a/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c +++ b/agent/mibgroup/ip-mib/data_access/scalars_sysctl.c @@ -267,13 +267,21 @@ netsnmp_arch_ip_scalars_ipv6IpForwarding_set(u_long value) return 0; } -static long ipReasmTimeout_val; - -void -netsnmp_arch_ip_scalars_register_handlers(void) +long netsnmp_arch_ip_scalars_ipReasmTimeout_get(void) { - static oid ipReasmTimeout_oid[] = { 1, 3, 6, 1, 2, 1, 4, 13, 0 }; - +#ifdef freebsd14 +#define FRAGTTL_CTL "net.inet.ip.fragttl" + int intval; + + if (sysctlbyname(FRAGTTL_CTL, &intval, &(size_t){sizeof(int)}, NULL, 0) < + 0) { + DEBUGMSGTL(("access::ipReasmTimeout", "sysctl %s failed - %s\n", + FRAGTTL_CTL, + strerror(errno))); + return -1; + } + return intval; +#else /* * This value is static at compile time on FreeBSD; it really should be a * probed via either sysctl or sysconf at runtime as the compiled value and @@ -282,10 +290,11 @@ netsnmp_arch_ip_scalars_register_handlers(void) * Please refer to sys/protosw.h for more details on what this value is (in * particular PR_SLOWHZ). */ - ipReasmTimeout_val = IPFRAGTTL / PR_SLOWHZ; + return IPFRAGTTL / PR_SLOWHZ; +#endif +} - netsnmp_register_long_instance("ipReasmTimeout", - ipReasmTimeout_oid, - OID_LENGTH(ipReasmTimeout_oid), - &ipReasmTimeout_val, NULL); +void +netsnmp_arch_ip_scalars_register_handlers(void) +{ } diff --git a/agent/mibgroup/ip-mib/data_access/systemstats.h b/agent/mibgroup/ip-mib/data_access/systemstats.h index 514807a..ef5b838 100644 --- a/agent/mibgroup/ip-mib/data_access/systemstats.h +++ b/agent/mibgroup/ip-mib/data_access/systemstats.h @@ -17,13 +17,13 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(ip-mib/data_access/systemstats_common) +config_require(ip-mib/data_access/systemstats_common); #if defined( linux ) -config_require(ip-mib/data_access/systemstats_linux) +config_require(ip-mib/data_access/systemstats_linux); #elif defined( solaris2 ) -config_require(ip-mib/data_access/systemstats_solaris2) +config_require(ip-mib/data_access/systemstats_solaris2); #elif defined( freebsd7 ) || defined( netbsd5 ) || defined( openbsd4 ) || defined( dragonfly ) || defined( darwin ) -config_require(ip-mib/data_access/systemstats_sysctl) +config_require(ip-mib/data_access/systemstats_sysctl); #else -config_error(the systemstats data access library is not available in this environment.) +config_error(the systemstats data access library is not available in this environment.); #endif diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_common.c b/agent/mibgroup/ip-mib/data_access/systemstats_common.c index 29109bd..7cb15b5 100644 --- a/agent/mibgroup/ip-mib/data_access/systemstats_common.c +++ b/agent/mibgroup/ip-mib/data_access/systemstats_common.c @@ -10,6 +10,8 @@ #include #include #include +#include "systemstats.h" +#include "systemstats_private.h" /**---------------------------------------------------------------------*/ /* @@ -22,19 +24,6 @@ static int need_wrap_check = -1; */ static void _entry_release(netsnmp_systemstats_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern int -netsnmp_access_systemstats_container_arch_load(netsnmp_container* container, - u_int load_flags); -extern void -netsnmp_access_systemstats_arch_init(void); - /**---------------------------------------------------------------------*/ /* * initialization @@ -264,7 +253,7 @@ _calculate_entries(netsnmp_systemstats_entry * entry) && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS]) { - U64 tmp, tmp2, tmp3; + struct counter64 tmp, tmp2, tmp3; tmp = entry->stats.HCOutRequests; u64Incr(&tmp, &entry->stats.HCOutForwDatagrams); u64Incr(&tmp, &entry->stats.HCOutFragCreates); diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c index 4a26e41..e0b4e68 100644 --- a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c +++ b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c @@ -11,7 +11,10 @@ #include #include "../ipSystemStatsTable/ipSystemStatsTable.h" +#include "systemstats.h" +#include "systemstats_private.h" +#include #include #include #include @@ -114,20 +117,18 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) } if (!(devin = fopen("/proc/net/snmp", "r"))) { - DEBUGMSGTL(("access:systemstats", - "Failed to load Systemstats Table (linux1)\n")); - NETSNMP_LOGONCE((LOG_ERR, "cannot open /proc/net/snmp ...\n")); + snmp_log_perror("systemstats_linux: cannot open /proc/net/snmp"); return -2; } /* * skip header, but make sure it's the length we expect... */ - fgets(line, sizeof(line), devin); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), devin)); len = strlen(line); if (224 != len) { fclose(devin); - snmp_log(LOG_ERR, "unexpected header length in /proc/net/snmp." + snmp_log(LOG_ERR, "systemstats_linux: unexpected header length in /proc/net/snmp." " %d != 224\n", len); return -4; } @@ -142,7 +143,7 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) if (start) { len = strlen(line); - if (line[len - 1] == '\n') + if (len && line[len - 1] == '\n') line[len - 1] = '\0'; while (*start && *start == ' ') @@ -163,8 +164,6 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) entry = netsnmp_access_systemstats_entry_create(1, 0, "ipSystemStatsTable.ipv4"); if(NULL == entry) { - netsnmp_access_systemstats_container_free(container, - NETSNMP_ACCESS_SYSTEMSTATS_FREE_NOFLAGS); return -3; } @@ -210,19 +209,19 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags) entry->stats.HCInDelivers.high = scan_vals[8] >> 32; entry->stats.HCOutRequests.low = scan_vals[9] & 0xffffffff; entry->stats.HCOutRequests.high = scan_vals[9] >> 32; - entry->stats.HCOutDiscards.low = scan_vals[10] & 0xffffffff;; + entry->stats.HCOutDiscards.low = scan_vals[10] & 0xffffffff; entry->stats.HCOutDiscards.high = scan_vals[10] >> 32; - entry->stats.HCOutNoRoutes.low = scan_vals[11] & 0xffffffff;; + entry->stats.HCOutNoRoutes.low = scan_vals[11] & 0xffffffff; entry->stats.HCOutNoRoutes.high = scan_vals[11] >> 32; /* entry->stats. = scan_vals[12]; / * ReasmTimeout */ entry->stats.ReasmReqds = scan_vals[13]; entry->stats.ReasmOKs = scan_vals[14]; entry->stats.ReasmFails = scan_vals[15]; - entry->stats.HCOutFragOKs.low = scan_vals[16] & 0xffffffff;; + entry->stats.HCOutFragOKs.low = scan_vals[16] & 0xffffffff; entry->stats.HCOutFragOKs.high = scan_vals[16] >> 32; - entry->stats.HCOutFragFails.low = scan_vals[17] & 0xffffffff;; + entry->stats.HCOutFragFails.low = scan_vals[17] & 0xffffffff; entry->stats.HCOutFragFails.high = scan_vals[17] >> 32; - entry->stats.HCOutFragCreates.low = scan_vals[18] & 0xffffffff;; + entry->stats.HCOutFragCreates.low = scan_vals[18] & 0xffffffff; entry->stats.HCOutFragCreates.high = scan_vals[18] >> 32; entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1; @@ -279,9 +278,7 @@ _additional_systemstats_v4(netsnmp_systemstats_entry* entry, "load addtional v4 (flags %u)\n", load_flags)); if (!(devin = fopen("/proc/net/netstat", "r"))) { - DEBUGMSGTL(("access:systemstats", - "cannot open /proc/net/netstat\n")); - NETSNMP_LOGONCE((LOG_ERR,"cannot open /proc/net/netstat\n")); + snmp_log_perror("systemstats_linux: cannot open /proc/net/netstat"); return -2; } @@ -386,7 +383,7 @@ _systemstats_v6_load_file(netsnmp_systemstats_entry *entry, FILE *devin) break; len = strlen(line); - if (line[len - 1] == '\n') + if (len && line[len - 1] == '\n') line[len - 1] = '\0'; if (('I' != line[0]) || ('6' != line[2])) @@ -439,7 +436,7 @@ _systemstats_v6_load_file(netsnmp_systemstats_entry *entry, FILE *devin) entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS] = 1; } else rc = 1; - } else if ('N' == line[5]) { + } else if ('N' == line[5] && 'R' == line[7]) { entry->stats.HCInNoRoutes.low = scan_val & 0xffffffff; entry->stats.HCInNoRoutes.high = scan_val >> 32; entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES] = 1; @@ -562,10 +559,12 @@ _systemstats_v6_load_systemstats(netsnmp_container* container, u_int load_flags) * try to open file. If we can't, that's ok - maybe the module hasn't * been loaded yet. */ - if (!(devin = fopen(filename, "r"))) { + devin = fopen(filename, "r"); + if (!devin) { DEBUGMSGTL(("access:systemstats", "Failed to load Systemstats Table (linux1), cannot open %s\n", filename)); + netsnmp_access_systemstats_entry_free(entry); return 0; } @@ -630,7 +629,9 @@ _systemstats_v6_load_ifstats(netsnmp_container* container, u_int load_flags) continue; } if (NULL == (devin = fopen(dev_filename, "r"))) { - snmp_log(LOG_ERR, "Failed to open %s\n", dev_filename); + char msg[128]; + snprintf(msg, sizeof(msg), "systemstats_linux: %s", dev_filename); + snmp_log_perror(dev_filename); continue; } diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_private.h b/agent/mibgroup/ip-mib/data_access/systemstats_private.h new file mode 100644 index 0000000..08cb6e6 --- /dev/null +++ b/agent/mibgroup/ip-mib/data_access/systemstats_private.h @@ -0,0 +1,3 @@ +void netsnmp_access_systemstats_arch_init(void); +int netsnmp_access_systemstats_container_arch_load(netsnmp_container* container, + u_int load_flags); diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_solaris2.c b/agent/mibgroup/ip-mib/data_access/systemstats_solaris2.c index f2ec497..c7d90de 100644 --- a/agent/mibgroup/ip-mib/data_access/systemstats_solaris2.c +++ b/agent/mibgroup/ip-mib/data_access/systemstats_solaris2.c @@ -5,11 +5,12 @@ #include #include +#include "systemstats_private.h" #include "kernel_sunos5.h" static int _systemstats(mibgroup_e, netsnmp_container *, u_int); static void _add_ipstats(mib2_ipIfStatsEntry_t *, mib2_ipIfStatsEntry_t *); -static int _insert_entry(netsnmp_container *, mib2_ipIfStatsEntry_t *); +static int _insert_entry(netsnmp_container *, mib2_ipIfStatsEntry_t *, int); void netsnmp_access_systemstats_arch_init(void) @@ -31,9 +32,6 @@ netsnmp_access_systemstats_container_arch_load(netsnmp_container* container, if (container == NULL) return (-1); - if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) - return 0; /* we do not support ipIfStatsTable yet */ - if ((rc = _systemstats(MIB_IP_TRAFFIC_STATS, container, load_flags)) < 0) return (rc); #if defined(NETSNMP_ENABLE_IPV6) @@ -63,10 +61,19 @@ _systemstats(mibgroup_e mib, netsnmp_container *container, u_int load_flags) &Get_everything, NULL) == 0) { req = GET_NEXT; netsnmp_assert(ipe.ipIfStatsIPVersion == ipversion); + if (ipe.ipIfStatsIfIndex == 0) + continue; + if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) { + if (_insert_entry(container, &ipe, ipe.ipIfStatsIfIndex) != 0) + return -1; + } + else _add_ipstats(&iptot, &ipe); } iptot.ipIfStatsIPVersion = ipversion; - return _insert_entry(container, &iptot); + if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) + return 0; + return _insert_entry(container, &iptot, 0); } static void @@ -124,18 +131,18 @@ _add_ipstats(mib2_ipIfStatsEntry_t *o1, mib2_ipIfStatsEntry_t *o2) * @retval -2 memory allocation error */ static int -_insert_entry(netsnmp_container *container, mib2_ipIfStatsEntry_t *ipe) +_insert_entry(netsnmp_container *container, mib2_ipIfStatsEntry_t *ipe, int index) { int i; netsnmp_systemstats_entry *ep = - netsnmp_access_systemstats_entry_create(ipe->ipIfStatsIPVersion, 0, + netsnmp_access_systemstats_entry_create(ipe->ipIfStatsIPVersion, index, "ipSystemStatsTable"); DEBUGMSGTL(("access:systemstats:arch", "insert entry for v%d\n", ipe->ipIfStatsIPVersion)); if (ep == NULL) { - DEBUGMSGT(("access:systemstats:arch", "insert failed (alloc)")); + DEBUGMSGT(("access:systemstats:arch", "insert failed (alloc)\n")); return (-2); } @@ -205,7 +212,7 @@ _insert_entry(netsnmp_container *container, mib2_ipIfStatsEntry_t *ipe) ep->stats.columnAvail[i] = 1; if (CONTAINER_INSERT(container, ep) < 0) { - DEBUGMSGT(("access:systemstats:arch", "unable to insert entry")); + DEBUGMSGT(("access:systemstats:arch", "unable to insert entry\n")); netsnmp_access_systemstats_entry_free(ep); return (-1); } diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c b/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c index a1ca16d..a6ad471 100644 --- a/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c +++ b/agent/mibgroup/ip-mib/data_access/systemstats_sysctl.c @@ -11,16 +11,10 @@ #include #include "../ipSystemStatsTable/ipSystemStatsTable.h" - -#if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) -#define _KERNEL 1 -#define _I_DEFINED_KERNEL -#endif -#if NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES -#define _KERNEL_STRUCTURES -#endif +#include "systemstats_private.h" #include +#include #include #include @@ -28,16 +22,30 @@ #include #include +#if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) +#define _KERNEL 1 +#define _I_DEFINED_KERNEL +#endif +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#define _KERNEL_STRUCTURES +#endif #include +#ifdef _I_DEFINED_KERNEL +#undef _KERNEL +#endif #include #include #include #include #include -#if HAVE_NETINET6_IP6_VAR_H +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif +#ifdef HAVE_NETINET6_IP6_VAR_H +#include #include #endif -#ifndef freebsd7 +#if !defined(freebsd7) && !defined(openbsd5) #include #endif @@ -579,7 +587,7 @@ _systemstats_v6_load_systemstats(netsnmp_container* container, u_int load_flags) entry->stats.InHdrErrors = ip6stat.ip6s_badoptions + ip6stat.ip6s_tooshort + ip6stat.ip6s_toosmall + ip6stat.ip6s_badvers + ip6stat.ip6s_toomanyhdr; -#if HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG +#ifdef HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG entry->stats.InHdrErrors += ip6stat.ip6s_exthdrtoolong; #endif entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1; @@ -686,7 +694,6 @@ _systemstats_v6_load_ifstats(netsnmp_container* container, u_int load_flags) FILE *devin; char line[1024]; char *start = line; - int rc; char *scan_str; uintmax_t scan_val; netsnmp_systemstats_entry *entry = NULL; @@ -704,7 +711,6 @@ _systemstats_v6_load_ifstats(netsnmp_container* container, u_int load_flags) /* * Read each per interface statistics proc file */ - rc = 0; while ((dev_snmp6_entry = readdir(dev_snmp6_dir)) != NULL) { if (dev_snmp6_entry->d_name[0] == '.') continue; diff --git a/agent/mibgroup/ip-mib/inetNetToMediaTable.h b/agent/mibgroup/ip-mib/inetNetToMediaTable.h index c2faab8..80b1c70 100644 --- a/agent/mibgroup/ip-mib/inetNetToMediaTable.h +++ b/agent/mibgroup/ip-mib/inetNetToMediaTable.h @@ -2,7 +2,7 @@ * module to include the modules */ -config_require(ip-mib/data_access/arp) -config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable) -config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface) -config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access) +config_require(ip-mib/data_access/arp); +config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable); +config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface); +config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access); diff --git a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h index 73afae6..2b0955c 100644 --- a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h +++ b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable.h @@ -23,9 +23,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-mib/data_access/arp) -config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface) -config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access) +config_require(ip-mib/data_access/arp); +config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface); +config_require(ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c index 1ec8cc6..7ac3b1a 100644 --- a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c +++ b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_data_access.c @@ -20,7 +20,7 @@ #include "inetNetToMediaTable_data_access.h" -netsnmp_feature_require(container_lifo) +netsnmp_feature_require(container_lifo); static netsnmp_arp_access * arp_access = NULL; /** @ingroup interface @@ -309,7 +309,7 @@ inetNetToMediaTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c index c18689a..4e6337c 100644 --- a/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c +++ b/agent/mibgroup/ip-mib/inetNetToMediaTable/inetNetToMediaTable_interface.c @@ -47,18 +47,18 @@ #include -netsnmp_feature_child_of(inetNetToMediaTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(inetNetToMediaTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(inetNetToMediaTable_container_size, inetNetToMediaTable_external_access) -netsnmp_feature_child_of(inetNetToMediaTable_registration_set, inetNetToMediaTable_external_access) -netsnmp_feature_child_of(inetNetToMediaTable_registration_get, inetNetToMediaTable_external_access) -netsnmp_feature_child_of(inetNetToMediaTable_container_get, inetNetToMediaTable_external_access) +netsnmp_feature_child_of(inetNetToMediaTable_container_size, inetNetToMediaTable_external_access); +netsnmp_feature_child_of(inetNetToMediaTable_registration_set, inetNetToMediaTable_external_access); +netsnmp_feature_child_of(inetNetToMediaTable_registration_get, inetNetToMediaTable_external_access); +netsnmp_feature_child_of(inetNetToMediaTable_container_get, inetNetToMediaTable_external_access); /********************************************************************** ********************************************************************** @@ -292,10 +292,12 @@ _inetNetToMediaTable_initialize_interface(inetNetToMediaTable_registration netsnmp_handler_registration_create("inetNetToMediaTable", handler, inetNetToMediaTable_oid, inetNetToMediaTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #ifndef NETSNMP_DISABLE_SET_SUPPORT - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table inetNetToMediaTable\n"); @@ -1021,7 +1023,7 @@ _mfd_inetNetToMediaTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1099,10 +1101,8 @@ _inetNetToMediaTable_check_indexes(inetNetToMediaTable_rowreq_ctx * /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((rowreq_ctx->tbl_idx.inetNetToMediaNetAddress_len < 0) - || (rowreq_ctx->tbl_idx.inetNetToMediaNetAddress_len > 255)) - ) { + if (rc == SNMPERR_SUCCESS && + rowreq_ctx->tbl_idx.inetNetToMediaNetAddress_len > 255) { rc = SNMP_ERR_WRONGLENGTH; } if (MFD_SUCCESS != rc) @@ -1173,9 +1173,7 @@ _inetNetToMediaTable_check_column(inetNetToMediaTable_rowreq_ctx * /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((var->val_len < 0) || (var->val_len > 65535)) - ) { + if (rc == SNMPERR_SUCCESS && var->val_len > 65535) { rc = SNMP_ERR_WRONGLENGTH; } if (SNMPERR_SUCCESS != rc) { diff --git a/agent/mibgroup/ip-mib/ipAddressPrefixTable.h b/agent/mibgroup/ip-mib/ipAddressPrefixTable.h index abfa100..95f2b7e 100644 --- a/agent/mibgroup/ip-mib/ipAddressPrefixTable.h +++ b/agent/mibgroup/ip-mib/ipAddressPrefixTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable) +config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable); diff --git a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.c b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.c index f4bb085..b305994 100644 --- a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.c +++ b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.c @@ -280,9 +280,8 @@ ipAddressPrefixTable_indexes_set_tbl_idx(ipAddressPrefixTable_mib_index * /* * make sure there is enough space for ipAddressPrefixPrefix data */ - if ((NULL == tbl_idx->ipAddressPrefixPrefix) || - (tbl_idx->ipAddressPrefixPrefix_len < - (ipAddressPrefixPrefix_val_ptr_len))) { + if (tbl_idx->ipAddressPrefixPrefix_len < + ipAddressPrefixPrefix_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h index 24b22a2..40a437e 100644 --- a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h +++ b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable.h @@ -22,9 +22,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-mib/ipAddressTable/ipAddressTable) -config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface) -config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access) +config_require(ip-mib/ipAddressTable/ipAddressTable); +config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface); +config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c index 4437829..4006de9 100644 --- a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access.c @@ -22,9 +22,9 @@ #include "ip-mib/ipAddressTable/ipAddressTable.h" -netsnmp_feature_require(ipAddressTable_container_get) -netsnmp_feature_require(ipaddress_common_copy_utilities) -netsnmp_feature_require(ipaddress_prefix_copy) +netsnmp_feature_require(ipAddressTable_container_get); +netsnmp_feature_require(ipaddress_common_copy_utilities); +netsnmp_feature_require(ipaddress_prefix_copy); /** @ingroup interface * @addtogroup data_access data_access: Routines to access data @@ -188,7 +188,7 @@ ipAddressPrefixTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -246,6 +246,7 @@ ipAddressPrefixTable_container_load(netsnmp_container *container) rowreq_ctx = ipAddressPrefixTable_allocate_rowreq_ctx(NULL); if (NULL == rowreq_ctx) { snmp_log(LOG_ERR, "memory allocation failed\n"); + ITERATOR_RELEASE(addr_it); return MFD_RESOURCE_UNAVAILABLE; } } @@ -300,7 +301,7 @@ ipAddressPrefixTable_container_load(netsnmp_container *container) * TODO:352:r: | |-> populate ipAddressPrefixTable data context. * Populate data context here. (optionally, delay until row prep) */ - netsnmp_ipaddress_prefix_origin_copy(&rowreq_ctx->data. + netsnmp_ipaddress_prefix_origin_copy(&rowreq_ctx->data. ipAddressPrefixOrigin, addr_rowreq_ctx->data-> ia_origin, @@ -314,12 +315,21 @@ ipAddressPrefixTable_container_load(netsnmp_container *container) /* * insert into table container, clear ptr so we reallocate */ - CONTAINER_INSERT(container, rowreq_ctx); - rowreq_ctx = NULL; - ++count; + if (CONTAINER_INSERT(container, rowreq_ctx) == 0) { + rowreq_ctx = NULL; + ++count; + } } ITERATOR_RELEASE(addr_it); + /* + * clean up if "do we already have this prefix?" was true and no + * CONTAINER_INSERT happened afterwards + */ + if (rowreq_ctx) { + ipAddressPrefixTable_release_rowreq_ctx(rowreq_ctx); + } + DEBUGMSGT(("verbose:ipAddressPrefixTable:ipAddressPrefixTable_container_load", "inserted %d records\n", count)); return MFD_SUCCESS; diff --git a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c index e14a337..bfd07bf 100644 --- a/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c +++ b/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface.c @@ -47,15 +47,15 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(ipaddressprefixtable_row_find_by_mib_index, ipaddressprefixtable_all) -netsnmp_feature_child_of(ipaddressprefixtable_container_get, ipaddressprefixtable_all) -netsnmp_feature_child_of(ipAddressPrefixTable_registration_get, ipaddressprefixtable_all) -netsnmp_feature_child_of(ipAddressPrefixTable_registration_set, ipaddressprefixtable_all) -netsnmp_feature_child_of(ipAddressPrefixTable_container_size, ipaddressprefixtable_all) +netsnmp_feature_child_of(ipaddressprefixtable_row_find_by_mib_index, ipaddressprefixtable_all); +netsnmp_feature_child_of(ipaddressprefixtable_container_get, ipaddressprefixtable_all); +netsnmp_feature_child_of(ipAddressPrefixTable_registration_get, ipaddressprefixtable_all); +netsnmp_feature_child_of(ipAddressPrefixTable_registration_set, ipaddressprefixtable_all); +netsnmp_feature_child_of(ipAddressPrefixTable_container_size, ipaddressprefixtable_all); /********************************************************************** ********************************************************************** @@ -853,7 +853,7 @@ _mfd_ipAddressPrefixTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib/ipAddressTable.h b/agent/mibgroup/ip-mib/ipAddressTable.h index 8d4d274..d14d944 100644 --- a/agent/mibgroup/ip-mib/ipAddressTable.h +++ b/agent/mibgroup/ip-mib/ipAddressTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-mib/ipAddressTable/ipAddressTable) +config_require(ip-mib/ipAddressTable/ipAddressTable); diff --git a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c index deff4e9..6093318 100644 --- a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c +++ b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c @@ -29,9 +29,9 @@ #include "ipAddressTable_interface.h" -netsnmp_feature_require(check_storage_transition) -netsnmp_feature_require(ipaddress_entry_copy) -netsnmp_feature_require(ipaddress_prefix_copy) +netsnmp_feature_require(check_storage_transition); +netsnmp_feature_require(ipaddress_entry_copy); +netsnmp_feature_require(ipaddress_prefix_copy); const oid ipAddressTable_oid[] = { IPADDRESSTABLE_OID }; const int ipAddressTable_oid_size = OID_LENGTH(ipAddressTable_oid); @@ -43,25 +43,38 @@ void initialize_table_ipAddressTable(void); void shutdown_table_ipAddressTable(void); -/** - * Initializes the ipAddressTable module - */ -void -init_ipAddressTable(void) +/* Called after the snmpd configuration has been read. */ +static int +_init_ipAddressTable(int majorID, int minorID, void *serverargs, + void *clientarg) { DEBUGMSGTL(("verbose:ipAddressTable:init_ipAddressTable", "called\n")); - /* - * TODO:300:o: Perform ipAddressTable one-time module initialization. - */ + netsnmp_access_interface_init(); /* - * here we initialize all the tables we're planning on supporting + * Since this function is invoked after the configuration has been read + * and since the configuration is reread after a SIGHUP, call the shutdown + * function before calling the initialization function. */ - if (should_init("ipAddressTable")) + if (should_init("ipAddressTable")) { + shutdown_table_ipAddressTable(); initialize_table_ipAddressTable(); + } -} /* init_ipAddressTable */ + return 0; +} + +/** + * Initializes the ipAddressTable module + */ +void +init_ipAddressTable(void) +{ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_POST_READ_CONFIG, + _init_ipAddressTable, NULL); +} /** * Shut-down the ipAddressTable module (agent is exiting) diff --git a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h index fe8f04a..0f68ffe 100644 --- a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h +++ b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h @@ -23,10 +23,10 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(if-mib/data_access/interface) -config_require(ip-mib/data_access/ipaddress) -config_require(ip-mib/ipAddressTable/ipAddressTable_interface) -config_require(ip-mib/ipAddressTable/ipAddressTable_data_access) +config_require(if-mib/data_access/interface); +config_require(ip-mib/data_access/ipaddress); +config_require(ip-mib/ipAddressTable/ipAddressTable_interface); +config_require(ip-mib/ipAddressTable/ipAddressTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c index d80b3e7..a6b78a4 100644 --- a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c @@ -23,8 +23,8 @@ #include #include -netsnmp_feature_require(container_lifo) -netsnmp_feature_require(ipaddress_entry_update) +netsnmp_feature_require(container_lifo); +netsnmp_feature_require(ipaddress_entry_update); /** @ingroup interface * @addtogroup data_access data_access: Routines to access data @@ -137,6 +137,12 @@ ipAddressTable_container_init(netsnmp_container **container_ptr_ptr, *container_ptr_ptr = netsnmp_container_find("ipAddressTable:table_container"); if (NULL != *container_ptr_ptr) { + /* + * The container has ALLOW_DUPLICATES flag to speed up CONTAINER_INSERT + * operations (it does not need to check for duplicates), however we + * (manually) ensure that we won't insert any duplicates there. + */ + (*container_ptr_ptr)->flags = CONTAINER_KEY_ALLOW_DUPLICATES; (*container_ptr_ptr)->container_name = strdup("ipAddressTable"); ipAddressTable_container_load(*container_ptr_ptr); CONTAINER_FOR_EACH(*container_ptr_ptr, @@ -189,13 +195,6 @@ ipAddressTable_container_shutdown(netsnmp_container *container_ptr) { DEBUGMSGTL(("verbose:ipAddressTable:ipAddressTable_container_shutdown", "called\n")); - - if (NULL == container_ptr) { - snmp_log(LOG_ERR, - "bad params to ipAddressTable_container_shutdown\n"); - return; - } - } /* ipAddressTable_container_shutdown */ /** @@ -207,6 +206,7 @@ _check_entry_for_updates(ipAddressTable_rowreq_ctx * rowreq_ctx, { netsnmp_container *ipaddress_container = (netsnmp_container*)magic[0]; netsnmp_container *to_delete = (netsnmp_container*)magic[1]; + netsnmp_container *to_ignore = (netsnmp_container*)magic[2]; /* * check for matching entry using secondary index. @@ -234,10 +234,20 @@ _check_entry_for_updates(ipAddressTable_rowreq_ctx * rowreq_ctx, rowreq_ctx->ipAddressLastChanged = netsnmp_get_agent_uptime(); /* - * remove entry from ifcontainer + * Remember not to add this entry from 'ipaddress_container' to 'container' later. + * Simple CONTAINER_REMOVE(ipaddress_container, ..) would be slow. */ - CONTAINER_REMOVE(ipaddress_container, ipaddress_entry); - netsnmp_access_ipaddress_entry_free(ipaddress_entry); + if (NULL == to_ignore) { + magic[2] = to_ignore = netsnmp_container_find("access_ipaddress:table_container"); + if (NULL == to_ignore) { + snmp_log(LOG_ERR, "couldn't create ignore container\n"); + } else { + /* to speed up insertion */ + to_ignore->flags = CONTAINER_KEY_ALLOW_DUPLICATES; + } + } + if (NULL != to_ignore) + CONTAINER_INSERT(to_ignore, ipaddress_entry); } } @@ -246,8 +256,11 @@ _check_entry_for_updates(ipAddressTable_rowreq_ctx * rowreq_ctx, */ static void _add_new_entry(netsnmp_ipaddress_entry *ipaddress_entry, - netsnmp_container *container) + void **magic) { + netsnmp_container *container = magic[0]; + netsnmp_container *to_ignore = magic[2]; + ipAddressTable_rowreq_ctx *rowreq_ctx; DEBUGMSGTL(("ipAddressTable:access", "creating new entry\n")); @@ -255,6 +268,10 @@ _add_new_entry(netsnmp_ipaddress_entry *ipaddress_entry, netsnmp_assert(NULL != ipaddress_entry); netsnmp_assert(NULL != container); + if (to_ignore && CONTAINER_FIND(to_ignore, ipaddress_entry)) { + /* this entry already is in 'container', skip it */ + return; + } /* * allocate an row context and set the index(es) */ @@ -313,7 +330,7 @@ _add_new_entry(netsnmp_ipaddress_entry *ipaddress_entry, * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -329,36 +346,43 @@ int ipAddressTable_container_load(netsnmp_container *container) { netsnmp_container *ipaddress_container; - void *tmp_ptr[2]; + void *tmp_ptr[3]; DEBUGMSGTL(("verbose:ipAddressTable:ipAddressTable_cache_load", "called\n")); /* - * TODO:351:M: |-> Load/update data in the ipAddressTable container. + * Load/update data in the ipAddressTable container. * loop over your ipAddressTable data, allocate a rowreq context, * set the index(es) [and data, optionally] and insert into * the container. */ + /* + * netsnmp_access_ipaddress_container_load makes sure that + * ipaddress_container does not contain any duplicate entries, + */ ipaddress_container = netsnmp_access_ipaddress_container_load(NULL, NETSNMP_ACCESS_IPADDRESS_LOAD_ADDL_IDX_BY_ADDR); /* * we just got a fresh copy of interface data. compare it to * what we've already got, and make any adjustments, saving - * missing addresses to be deleted. + * missing addresses to be deleted. Also, prune interfaces in + * ipaddress_container, so only the new interfaces remain. */ tmp_ptr[0] = ipaddress_container->next; - tmp_ptr[1] = NULL; + tmp_ptr[1] = NULL; /* list of interfaces to be removed from 'container' */ + tmp_ptr[2] = NULL; /* list of interfaces to be ignored in ipaddress_container */ CONTAINER_FOR_EACH(container, (netsnmp_container_obj_func *) _check_entry_for_updates, tmp_ptr); /* * now add any new interfaces */ + tmp_ptr[0] = container; CONTAINER_FOR_EACH(ipaddress_container, (netsnmp_container_obj_func *) _add_new_entry, - container); + tmp_ptr); /* * free the container. we've either claimed each entry, or released it, @@ -396,6 +420,19 @@ ipAddressTable_container_load(netsnmp_container *container) */ CONTAINER_REMOVE(tmp_container, NULL); } + CONTAINER_FREE(tmp_container); + } + + if (NULL != tmp_ptr[2]) { + /* list of interfaces to be ignored in ipaddress_container - free it */ + netsnmp_container *to_ignore = (netsnmp_container *) tmp_ptr[2]; + netsnmp_ipaddress_entry *ipaddress_entry; + while (CONTAINER_SIZE(to_ignore)) { + ipaddress_entry = (netsnmp_ipaddress_entry*)CONTAINER_FIRST(to_ignore); + CONTAINER_REMOVE(to_ignore, ipaddress_entry); + netsnmp_access_ipaddress_entry_free(ipaddress_entry); + } + CONTAINER_FREE(to_ignore); } DEBUGMSGT(("verbose:ipAddressTable:ipAddressTable_cache_load", diff --git a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c index 48770b0..8b148a0 100644 --- a/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c +++ b/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_interface.c @@ -47,18 +47,18 @@ #include -netsnmp_feature_child_of(ipAddressTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(ipAddressTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(ipAddressTable_container_size, ipAddressTable_external_access) -netsnmp_feature_child_of(ipAddressTable_registration_set, ipAddressTable_external_access) -netsnmp_feature_child_of(ipAddressTable_registration_get, ipAddressTable_external_access) -netsnmp_feature_child_of(ipAddressTable_container_get, ipAddressTable_external_access) +netsnmp_feature_child_of(ipAddressTable_container_size, ipAddressTable_external_access); +netsnmp_feature_child_of(ipAddressTable_registration_set, ipAddressTable_external_access); +netsnmp_feature_child_of(ipAddressTable_registration_get, ipAddressTable_external_access); +netsnmp_feature_child_of(ipAddressTable_container_get, ipAddressTable_external_access); /********************************************************************** ********************************************************************** @@ -281,10 +281,12 @@ _ipAddressTable_initialize_interface(ipAddressTable_registration * reg_ptr, netsnmp_handler_registration_create("ipAddressTable", handler, ipAddressTable_oid, ipAddressTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #ifndef NETSNMP_DISABLE_SET_SUPPORT - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table ipAddressTable\n"); @@ -1008,7 +1010,7 @@ _mfd_ipAddressTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1063,10 +1065,7 @@ _ipAddressTable_check_indexes(ipAddressTable_rowreq_ctx * rowreq_ctx) /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((rowreq_ctx->tbl_idx.ipAddressAddr_len < 0) - || (rowreq_ctx->tbl_idx.ipAddressAddr_len > 255)) - ) { + if (rc == SNMPERR_SUCCESS && rowreq_ctx->tbl_idx.ipAddressAddr_len > 255) { rc = SNMP_ERR_WRONGLENGTH; } if (MFD_SUCCESS != rc) @@ -1989,11 +1988,8 @@ _container_free(netsnmp_container *container) { DEBUGMSGTL(("internal:ipAddressTable:_container_free", "called\n")); - if (NULL == container) { - snmp_log(LOG_ERR, - "invalid container in ipAddressTable_container_free\n"); + if (!container) return; - } /* * call user code diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable.h b/agent/mibgroup/ip-mib/ipDefaultRouterTable.h index 28ed84b..5325062 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable.h +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable) +config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable); diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h index f2ef29a..67bcce3 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable.h @@ -23,10 +23,10 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-mib/data_access/defaultrouter) -config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface) -config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access) -config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get) +config_require(ip-mib/data_access/defaultrouter); +config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface); +config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access); +config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c index 7d7dcfe..99c3767 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access.c @@ -20,7 +20,7 @@ #include "ipDefaultRouterTable_data_access.h" -netsnmp_feature_require(container_lifo) +netsnmp_feature_require(container_lifo); /** @ingroup interface * @addtogroup data_access data_access: Routines to access data @@ -273,7 +273,7 @@ _add_new_entry(netsnmp_defaultrouter_entry *defaultrouter_entry, * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.c b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.c index 1177897..c6c8229 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.c +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get.c @@ -131,9 +131,8 @@ ipDefaultRouterTable_indexes_set_tbl_idx(ipDefaultRouterTable_mib_index * /* * make sure there is enough space for ipDefaultRouterAddress data */ - if ((NULL == tbl_idx->ipDefaultRouterAddress) || - (tbl_idx->ipDefaultRouterAddress_len < - (ipDefaultRouterAddress_val_ptr_len))) { + if (tbl_idx->ipDefaultRouterAddress_len < + ipDefaultRouterAddress_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h index bb46d10..ca9323c 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_enums.h @@ -42,7 +42,7 @@ extern "C" { #define IPDEFAULTROUTERLIFETIME_ENUMS #define IPDEFAULTROUTERLIFETIME_MIN 0 -#define IPDEFAULTROUTERLIFETIME_MAX 0xFFFFFFFFUL +#define IPDEFAULTROUTERLIFETIME_MAX 0xFFFFUL #endif /* IPDEFAULTROUTERLIFETIME_ENUMS */ diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c index 40ad72b..316e81f 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c @@ -47,9 +47,9 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); /********************************************************************** ********************************************************************** @@ -819,7 +819,7 @@ _mfd_ipDefaultRouterTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable.h b/agent/mibgroup/ip-mib/ipIfStatsTable.h index da1d85c..0461ec3 100644 --- a/agent/mibgroup/ip-mib/ipIfStatsTable.h +++ b/agent/mibgroup/ip-mib/ipIfStatsTable.h @@ -2,7 +2,7 @@ * module to include the modules */ -config_require(ip-mib/data_access/systemstats) -config_require(ip-mib/ipIfStatsTable/ipIfStatsTable) -config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface) -config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access) +config_require(ip-mib/data_access/systemstats); +config_require(ip-mib/ipIfStatsTable/ipIfStatsTable); +config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface); +config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access); diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h index bda956f..6f962b8 100644 --- a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h +++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h @@ -24,9 +24,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface) -config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access) -config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_get) +config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface); +config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access); +config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_get); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c index 7919dea..d20633a 100644 --- a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c @@ -293,7 +293,7 @@ ipIfStatsTable_container_shutdown(netsnmp_container * container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c index db673dc..5bc5419 100644 --- a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c +++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c @@ -252,7 +252,7 @@ The total number of input IP datagrams received, including * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInReceives data. @@ -262,7 +262,7 @@ The total number of input IP datagrams received, including * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInReceives_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -270,7 +270,7 @@ The total number of input IP datagrams received, including */ int ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInReceives_val_ptr) + struct counter64 *ipIfStatsHCInReceives_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInReceives_val_ptr); @@ -377,7 +377,7 @@ The total number of octets received in input IP datagrams, * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInOctets data. @@ -387,7 +387,7 @@ The total number of octets received in input IP datagrams, * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -395,7 +395,7 @@ The total number of octets received in input IP datagrams, */ int ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInOctets_val_ptr) + struct counter64 *ipIfStatsHCInOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInOctets_val_ptr); @@ -844,7 +844,7 @@ The number of input datagrams for which this entity was not * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInForwDatagrams data. @@ -854,7 +854,7 @@ The number of input datagrams for which this entity was not * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInForwDatagrams_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -862,7 +862,7 @@ The number of input datagrams for which this entity was not */ int ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInForwDatagrams_val_ptr) + struct counter64 *ipIfStatsHCInForwDatagrams_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInForwDatagrams_val_ptr); @@ -1249,7 +1249,7 @@ The total number of datagrams successfully delivered to IP * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInDelivers data. @@ -1259,7 +1259,7 @@ The total number of datagrams successfully delivered to IP * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInDelivers_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1267,7 +1267,7 @@ The total number of datagrams successfully delivered to IP */ int ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInDelivers_val_ptr) + struct counter64 *ipIfStatsHCInDelivers_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInDelivers_val_ptr); @@ -1378,7 +1378,7 @@ The total number of IP datagrams that local IP user- * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutRequests data. @@ -1388,7 +1388,7 @@ The total number of IP datagrams that local IP user- * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutRequests_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1396,7 +1396,7 @@ The total number of IP datagrams that local IP user- */ int ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutRequests_val_ptr) + struct counter64 *ipIfStatsHCOutRequests_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutRequests_val_ptr); @@ -1514,7 +1514,7 @@ The number of datagrams for which this entity was not their * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutForwDatagrams data. @@ -1524,7 +1524,7 @@ The number of datagrams for which this entity was not their * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutForwDatagrams_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1532,7 +1532,7 @@ The number of datagrams for which this entity was not their */ int ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutForwDatagrams_val_ptr) + struct counter64 *ipIfStatsHCOutForwDatagrams_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutForwDatagrams_val_ptr); @@ -1981,7 +1981,7 @@ The total number of IP datagrams that this entity supplied * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutTransmits data. @@ -1991,7 +1991,7 @@ The total number of IP datagrams that this entity supplied * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutTransmits_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1999,7 +1999,7 @@ The total number of IP datagrams that this entity supplied */ int ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutTransmits_val_ptr) + struct counter64 *ipIfStatsHCOutTransmits_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutTransmits_val_ptr); @@ -2105,7 +2105,7 @@ The total number of octets in IP datagrams delivered to the * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutOctets data. @@ -2115,7 +2115,7 @@ The total number of octets in IP datagrams delivered to the * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2123,7 +2123,7 @@ The total number of octets in IP datagrams delivered to the */ int ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutOctets_val_ptr) + struct counter64 *ipIfStatsHCOutOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutOctets_val_ptr); @@ -2227,7 +2227,7 @@ The number of IP multicast datagrams received. This object * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInMcastPkts data. @@ -2237,7 +2237,7 @@ The number of IP multicast datagrams received. This object * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInMcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2245,7 +2245,7 @@ The number of IP multicast datagrams received. This object */ int ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInMcastPkts_val_ptr) + struct counter64 *ipIfStatsHCInMcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInMcastPkts_val_ptr); @@ -2354,7 +2354,7 @@ The total number of octets received in IP multicast * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInMcastOctets data. @@ -2364,7 +2364,7 @@ The total number of octets received in IP multicast * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInMcastOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2372,7 +2372,7 @@ The total number of octets received in IP multicast */ int ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInMcastOctets_val_ptr) + struct counter64 *ipIfStatsHCInMcastOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInMcastOctets_val_ptr); @@ -2479,7 +2479,7 @@ The number of IP multicast datagrams transmitted. This * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutMcastPkts data. @@ -2489,7 +2489,7 @@ The number of IP multicast datagrams transmitted. This * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutMcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2497,7 +2497,7 @@ The number of IP multicast datagrams transmitted. This */ int ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutMcastPkts_val_ptr) + struct counter64 *ipIfStatsHCOutMcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutMcastPkts_val_ptr); @@ -2603,7 +2603,7 @@ The total number of octets transmitted in IP multicast * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutMcastOctets data. @@ -2613,7 +2613,7 @@ The total number of octets transmitted in IP multicast * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutMcastOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2621,7 +2621,7 @@ The total number of octets transmitted in IP multicast */ int ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutMcastOctets_val_ptr) + struct counter64 *ipIfStatsHCOutMcastOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutMcastOctets_val_ptr); @@ -2725,7 +2725,7 @@ The number of IP broadcast datagrams received. This object * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCInBcastPkts data. @@ -2735,7 +2735,7 @@ The number of IP broadcast datagrams received. This object * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCInBcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2743,7 +2743,7 @@ The number of IP broadcast datagrams received. This object */ int ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCInBcastPkts_val_ptr) + struct counter64 *ipIfStatsHCInBcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCInBcastPkts_val_ptr); @@ -2847,7 +2847,7 @@ The number of IP broadcast datagrams transmitted. This * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipIfStatsHCOutBcastPkts data. @@ -2857,7 +2857,7 @@ The number of IP broadcast datagrams transmitted. This * @param rowreq_ctx * Pointer to the row request context. * @param ipIfStatsHCOutBcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2865,7 +2865,7 @@ The number of IP broadcast datagrams transmitted. This */ int ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipIfStatsHCOutBcastPkts_val_ptr) + struct counter64 *ipIfStatsHCOutBcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipIfStatsHCOutBcastPkts_val_ptr); diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h index 0cc7e47..ad5d8a0 100644 --- a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h +++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h @@ -50,7 +50,7 @@ extern "C" { ipIfStatsInReceives_val_ptr); int ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInReceives_val_ptr); int ipIfStatsInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -58,7 +58,7 @@ extern "C" { ipIfStatsInOctets_val_ptr); int ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInOctets_val_ptr); int ipIfStatsInHdrErrors_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -87,7 +87,7 @@ extern "C" { int ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInForwDatagrams_val_ptr); int ipIfStatsReasmReqds_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -111,7 +111,7 @@ extern "C" { ipIfStatsInDelivers_val_ptr); int ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInDelivers_val_ptr); int ipIfStatsOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -119,7 +119,7 @@ extern "C" { ipIfStatsOutRequests_val_ptr); int ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutRequests_val_ptr); int ipIfStatsOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -128,7 +128,7 @@ extern "C" { int ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutForwDatagrams_val_ptr); int ipIfStatsOutDiscards_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -156,7 +156,7 @@ extern "C" { ipIfStatsOutTransmits_val_ptr); int ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutTransmits_val_ptr); int ipIfStatsOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -164,7 +164,7 @@ extern "C" { ipIfStatsOutOctets_val_ptr); int ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutOctets_val_ptr); int ipIfStatsInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -172,7 +172,7 @@ extern "C" { ipIfStatsInMcastPkts_val_ptr); int ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInMcastPkts_val_ptr); int ipIfStatsInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -180,7 +180,7 @@ extern "C" { ipIfStatsInMcastOctets_val_ptr); int ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInMcastOctets_val_ptr); int ipIfStatsOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -188,7 +188,7 @@ extern "C" { ipIfStatsOutMcastPkts_val_ptr); int ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutMcastPkts_val_ptr); int ipIfStatsOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -196,7 +196,7 @@ extern "C" { ipIfStatsOutMcastOctets_val_ptr); int ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutMcastOctets_val_ptr); int ipIfStatsInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -204,7 +204,7 @@ extern "C" { ipIfStatsInBcastPkts_val_ptr); int ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCInBcastPkts_val_ptr); int ipIfStatsOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, @@ -212,7 +212,7 @@ extern "C" { ipIfStatsOutBcastPkts_val_ptr); int ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipIfStatsHCOutBcastPkts_val_ptr); int ipIfStatsDiscontinuityTime_get(ipIfStatsTable_rowreq_ctx * diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c index 559d1c1..65efb59 100644 --- a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c +++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c @@ -47,17 +47,17 @@ #include -netsnmp_feature_child_of(ipIfStatsTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(ipIfStatsTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(ipIfStatsTable_container_size, ipIfStatsTable_external_access) -netsnmp_feature_child_of(ipIfStatsTable_registration_set, ipIfStatsTable_external_access) -netsnmp_feature_child_of(ipIfStatsTable_registration_get, ipIfStatsTable_external_access) -netsnmp_feature_child_of(ipIfStatsTable_container_get, ipIfStatsTable_external_access) +netsnmp_feature_child_of(ipIfStatsTable_container_size, ipIfStatsTable_external_access); +netsnmp_feature_child_of(ipIfStatsTable_registration_set, ipIfStatsTable_external_access); +netsnmp_feature_child_of(ipIfStatsTable_registration_get, ipIfStatsTable_external_access); +netsnmp_feature_child_of(ipIfStatsTable_container_get, ipIfStatsTable_external_access); /********************************************************************** ********************************************************************** @@ -722,10 +722,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINRECEIVES: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCInReceives_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -741,9 +741,9 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ipIfStatsHCInOctets_get(rowreq_ctx, (U64 *) var->val.string); + rc = ipIfStatsHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* @@ -810,10 +810,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINFORWDATAGRAMS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCInForwDatagrams_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -869,10 +869,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINDELIVERS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCInDelivers_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -889,10 +889,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTREQUESTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCOutRequests_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -909,10 +909,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTFORWDATAGRAMS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCOutForwDatagrams_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -979,10 +979,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTTRANSMITS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCOutTransmits_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -999,9 +999,9 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; - rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string); + rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string); break; /* @@ -1018,10 +1018,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINMCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCInMcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1038,10 +1038,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINMCASTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCInMcastOctets_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1058,10 +1058,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTMCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCOutMcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1078,10 +1078,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTMCASTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCOutMcastOctets_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1098,10 +1098,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCINBCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCInBcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1118,10 +1118,10 @@ _ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx, * ipIfStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPIFSTATSHCOUTBCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipIfStatsHCOutBcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1219,7 +1219,7 @@ _mfd_ipIfStatsTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable.h b/agent/mibgroup/ip-mib/ipSystemStatsTable.h index 047db74..515a2f0 100644 --- a/agent/mibgroup/ip-mib/ipSystemStatsTable.h +++ b/agent/mibgroup/ip-mib/ipSystemStatsTable.h @@ -2,7 +2,7 @@ * module to include the modules */ -config_require(ip-mib/data_access/systemstats) -config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable) -config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface) -config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access) +config_require(ip-mib/data_access/systemstats); +config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable); +config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface); +config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access); diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c index 10587e2..19d4c27 100644 --- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c +++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c @@ -434,7 +434,7 @@ The total number of input IP datagrams received, including * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInReceives data. @@ -444,7 +444,7 @@ The total number of input IP datagrams received, including * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInReceives_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -452,7 +452,7 @@ The total number of input IP datagrams received, including */ int ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCInReceives_val_ptr) + struct counter64 *ipSystemStatsHCInReceives_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCInReceives_val_ptr); @@ -561,7 +561,7 @@ The total number of octets received in input IP datagrams, * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInOctets data. @@ -571,7 +571,7 @@ The total number of octets received in input IP datagrams, * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -579,7 +579,7 @@ The total number of octets received in input IP datagrams, */ int ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCInOctets_val_ptr) + struct counter64 *ipSystemStatsHCInOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCInOctets_val_ptr); @@ -1039,7 +1039,7 @@ The number of input datagrams for which this entity was not * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInForwDatagrams data. @@ -1049,7 +1049,7 @@ The number of input datagrams for which this entity was not * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInForwDatagrams_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1058,7 +1058,7 @@ The number of input datagrams for which this entity was not int ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInForwDatagrams_val_ptr) { /** we should have a non-NULL pointer */ @@ -1456,7 +1456,7 @@ The total number of datagrams successfully delivered to IP * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInDelivers data. @@ -1466,7 +1466,7 @@ The total number of datagrams successfully delivered to IP * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInDelivers_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1474,7 +1474,7 @@ The total number of datagrams successfully delivered to IP */ int ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCInDelivers_val_ptr) + struct counter64 *ipSystemStatsHCInDelivers_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCInDelivers_val_ptr); @@ -1584,7 +1584,7 @@ The total number of IP datagrams which local IP user- * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutRequests data. @@ -1594,7 +1594,7 @@ The total number of IP datagrams which local IP user- * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutRequests_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1602,7 +1602,7 @@ The total number of IP datagrams which local IP user- */ int ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCOutRequests_val_ptr) + struct counter64 *ipSystemStatsHCOutRequests_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCOutRequests_val_ptr); @@ -1790,7 +1790,7 @@ The number of datagrams for which this entity was not their * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutForwDatagrams data. @@ -1800,7 +1800,7 @@ The number of datagrams for which this entity was not their * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutForwDatagrams_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -1809,7 +1809,7 @@ The number of datagrams for which this entity was not their int ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutForwDatagrams_val_ptr) { /** we should have a non-NULL pointer */ @@ -2270,7 +2270,7 @@ The total number of IP datagrams that this entity supplied * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutTransmits data. @@ -2280,7 +2280,7 @@ The total number of IP datagrams that this entity supplied * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutTransmits_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2288,7 +2288,7 @@ The total number of IP datagrams that this entity supplied */ int ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCOutTransmits_val_ptr) + struct counter64 *ipSystemStatsHCOutTransmits_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCOutTransmits_val_ptr); @@ -2397,7 +2397,7 @@ The total number of octets in IP datagrams delivered to the * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutOctets data. @@ -2407,7 +2407,7 @@ The total number of octets in IP datagrams delivered to the * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2415,7 +2415,7 @@ The total number of octets in IP datagrams delivered to the */ int ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCOutOctets_val_ptr) + struct counter64 *ipSystemStatsHCOutOctets_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCOutOctets_val_ptr); @@ -2521,7 +2521,7 @@ The number of IP multicast datagrams received. This object * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInMcastPkts data. @@ -2531,7 +2531,7 @@ The number of IP multicast datagrams received. This object * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInMcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2539,7 +2539,7 @@ The number of IP multicast datagrams received. This object */ int ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCInMcastPkts_val_ptr) + struct counter64 *ipSystemStatsHCInMcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCInMcastPkts_val_ptr); @@ -2646,7 +2646,7 @@ The total number of octets received in IP multicast * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInMcastOctets data. @@ -2656,7 +2656,7 @@ The total number of octets received in IP multicast * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInMcastOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2665,7 +2665,7 @@ The total number of octets received in IP multicast int ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInMcastOctets_val_ptr) { /** we should have a non-NULL pointer */ @@ -2772,7 +2772,7 @@ The number of IP multicast datagrams transmitted. This * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutMcastPkts data. @@ -2782,7 +2782,7 @@ The number of IP multicast datagrams transmitted. This * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutMcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2790,7 +2790,7 @@ The number of IP multicast datagrams transmitted. This */ int ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCOutMcastPkts_val_ptr) + struct counter64 *ipSystemStatsHCOutMcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCOutMcastPkts_val_ptr); @@ -2902,7 +2902,7 @@ The total number of octets transmitted in IP multicast * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutMcastOctets data. @@ -2912,7 +2912,7 @@ The total number of octets transmitted in IP multicast * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutMcastOctets_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -2921,7 +2921,7 @@ The total number of octets transmitted in IP multicast int ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutMcastOctets_val_ptr) { /** we should have a non-NULL pointer */ @@ -3028,7 +3028,7 @@ The number of IP broadcast datagrams received. This object * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCInBcastPkts data. @@ -3038,7 +3038,7 @@ The number of IP broadcast datagrams received. This object * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCInBcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -3046,7 +3046,7 @@ The number of IP broadcast datagrams received. This object */ int ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCInBcastPkts_val_ptr) + struct counter64 *ipSystemStatsHCInBcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCInBcastPkts_val_ptr); @@ -3152,7 +3152,7 @@ The number of IP broadcast datagrams transmitted. This * * * Its syntax is COUNTER64 (based on perltype COUNTER64) - * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64) + * The net-snmp type is ASN_COUNTER64. The C type is struct counter64. */ /** * Extract the current value of the ipSystemStatsHCOutBcastPkts data. @@ -3162,7 +3162,7 @@ The number of IP broadcast datagrams transmitted. This * @param rowreq_ctx * Pointer to the row request context. * @param ipSystemStatsHCOutBcastPkts_val_ptr - * Pointer to storage for a U64 variable + * Pointer to storage for a struct counter64 variable * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) @@ -3170,7 +3170,7 @@ The number of IP broadcast datagrams transmitted. This */ int ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCOutBcastPkts_val_ptr) + struct counter64 *ipSystemStatsHCOutBcastPkts_val_ptr) { /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipSystemStatsHCOutBcastPkts_val_ptr); diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h index ca1e1f3..9f309f9 100644 --- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h +++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h @@ -24,9 +24,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-mib/data_access/systemstats) -config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface) -config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access) +config_require(ip-mib/data_access/systemstats); +config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface); +config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access); /* *INDENT-ON* */ /* @@ -144,93 +144,22 @@ config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access) ********************************************************************* * function prototypes */ - int - - - - - - - - - - - - - - - - ipSystemStatsTable_pre_request(ipSystemStatsTable_registration * + int ipSystemStatsTable_pre_request(ipSystemStatsTable_registration * user_context); - int - - - - - - - - - - - - - - - - ipSystemStatsTable_post_request(ipSystemStatsTable_registration * + int ipSystemStatsTable_post_request(ipSystemStatsTable_registration * user_context, int rc); - int - - - - - - - - - - - - - - - - ipSystemStatsTable_rowreq_ctx_init(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsTable_rowreq_ctx_init(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, void *user_init_ctx); void - - - - - - - - - - - - - - - ipSystemStatsTable_rowreq_ctx_cleanup(ipSystemStatsTable_rowreq_ctx * rowreq_ctx); ipSystemStatsTable_data *ipSystemStatsTable_allocate_data(void); void ipSystemStatsTable_release_data(ipSystemStatsTable_data * data); - - - - - - - - - ipSystemStatsTable_rowreq_ctx + ipSystemStatsTable_rowreq_ctx * ipSystemStatsTable_row_find_by_mib_index (ipSystemStatsTable_mib_index * mib_idx); @@ -265,226 +194,50 @@ config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access) * indexes */ - int - - - - - - - - - - - - - - - - ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInReceives_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInReceives_val_ptr); int ipSystemStatsInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * ipSystemStatsHCInOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx * + struct counter64 *ipSystemStatsHCInOctets_val_ptr); + int ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInHdrErrors_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInNoRoutes_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInAddrErrors_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInUnknownProtos_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInTruncatedPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInForwDatagrams_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInForwDatagrams_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsReasmReqds_val_ptr); @@ -492,690 +245,142 @@ config_require(ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access) * rowreq_ctx, u_long * ipSystemStatsReasmOKs_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsReasmFails_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInDiscards_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInDelivers_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInDelivers_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutRequests_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutRequests_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutNoRoutes_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutForwDatagrams_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutForwDatagrams_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutDiscards_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutFragReqds_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutFragOKs_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutFragFails_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutFragCreates_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutTransmits_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutTransmits_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInMcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInMcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInMcastOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInMcastOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutMcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutMcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutMcastOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutMcastOctets_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsInBcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCInBcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsOutBcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, - U64 * + struct counter64 * ipSystemStatsHCOutBcastPkts_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsDiscontinuityTime_val_ptr); - int - - - - - - - - - - - - - - - - ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long * ipSystemStatsRefreshRate_val_ptr); - - - int - - - - - - - - - - - - - - - - ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index + int ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index * tbl_idx, u_long ipSystemStatsIPVersion_val); - int - - - - - - - - - - - - - - - - ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx * + int ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, u_long ipSystemStatsIPVersion_val); - - /* ********************************************************************* * SET function declarations diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c index 300ed7a..35a521c 100644 --- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c @@ -287,7 +287,7 @@ ipSystemStatsTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c index e1ca2cb..3220a55 100644 --- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c +++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c @@ -47,17 +47,17 @@ #include -netsnmp_feature_child_of(ipSystemStatsTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(ipSystemStatsTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(ipSystemStatsTable_container_size, ipSystemStatsTable_external_access) -netsnmp_feature_child_of(ipSystemStatsTable_registration_set, ipSystemStatsTable_external_access) -netsnmp_feature_child_of(ipSystemStatsTable_registration_get, ipSystemStatsTable_external_access) -netsnmp_feature_child_of(ipSystemStatsTable_container_get, ipSystemStatsTable_external_access) +netsnmp_feature_child_of(ipSystemStatsTable_container_size, ipSystemStatsTable_external_access); +netsnmp_feature_child_of(ipSystemStatsTable_registration_set, ipSystemStatsTable_external_access); +netsnmp_feature_child_of(ipSystemStatsTable_registration_get, ipSystemStatsTable_external_access); +netsnmp_feature_child_of(ipSystemStatsTable_container_get, ipSystemStatsTable_external_access); /********************************************************************** ********************************************************************** @@ -674,10 +674,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINRECEIVES: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInReceives_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -694,10 +694,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInOctets_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -764,10 +764,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINFORWDATAGRAMS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInForwDatagrams_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -824,10 +824,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINDELIVERS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInDelivers_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -844,10 +844,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTREQUESTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutRequests_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -874,10 +874,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTFORWDATAGRAMS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutForwDatagrams_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -944,10 +944,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTTRANSMITS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutTransmits_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -964,10 +964,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutOctets_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -984,10 +984,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINMCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInMcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1004,10 +1004,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINMCASTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInMcastOctets_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1024,10 +1024,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTMCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutMcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1044,10 +1044,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTMCASTOCTETS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutMcastOctets_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1064,10 +1064,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCINBCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCInBcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1084,10 +1084,10 @@ _ipSystemStatsTable_get_column(ipSystemStatsTable_rowreq_ctx * rowreq_ctx, * ipSystemStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */ case COLUMN_IPSYSTEMSTATSHCOUTBCASTPKTS: - var->val_len = sizeof(U64); + var->val_len = sizeof(struct counter64); var->type = ASN_COUNTER64; rc = ipSystemStatsHCOutBcastPkts_get(rowreq_ctx, - (U64 *) var->val.string); + (struct counter64 *) var->val.string); break; /* @@ -1180,7 +1180,7 @@ _mfd_ipSystemStatsTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib/ip_scalars.c b/agent/mibgroup/ip-mib/ip_scalars.c index 9096269..66cb73b 100644 --- a/agent/mibgroup/ip-mib/ip_scalars.c +++ b/agent/mibgroup/ip-mib/ip_scalars.c @@ -87,7 +87,7 @@ init_ip_scalars(void) HANDLER_CAN_RWRITE)); /* Initialize spin lock with random value */ - ipAddressSpinLockValue = (int) random(); + ipAddressSpinLockValue = netsnmp_random(); } diff --git a/agent/mibgroup/ip-mib/ip_scalars.h b/agent/mibgroup/ip-mib/ip_scalars.h index 7670a49..75713d7 100644 --- a/agent/mibgroup/ip-mib/ip_scalars.h +++ b/agent/mibgroup/ip-mib/ip_scalars.h @@ -4,4 +4,4 @@ void init_ip_scalars(void); -config_require(ip-mib/data_access/scalars_common) +config_require(ip-mib/data_access/scalars_common); diff --git a/agent/mibgroup/ip-mib/ipv4InterfaceTable.h b/agent/mibgroup/ip-mib/ipv4InterfaceTable.h index 2ebd768..8059a64 100644 --- a/agent/mibgroup/ip-mib/ipv4InterfaceTable.h +++ b/agent/mibgroup/ip-mib/ipv4InterfaceTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable) +config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable); diff --git a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c index 351ddd1..91646f7 100644 --- a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c +++ b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.c @@ -33,8 +33,7 @@ OID_LENGTH(ipv4InterfaceTable_oid); ipv4InterfaceTable_registration ipv4InterfaceTable_user_context; static ipv4InterfaceTable_registration *ipv4InterfaceTable_user_context_p; -void initialize_table_ipv4InterfaceTable(void); -void shutdown_table_ipv4InterfaceTable(void); +static void shutdown_table_ipv4InterfaceTable(void); /** diff --git a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h index 8123908..fba0c63 100644 --- a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h +++ b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable.h @@ -25,9 +25,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(if-mib/ifTable/ifTable) -config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface) -config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access) +config_require(if-mib/ifTable/ifTable); +config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface); +config_require(ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c index c9e14ff..2f56af8 100644 --- a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_data_access.c @@ -226,7 +226,7 @@ ipv4InterfaceTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c index a851a30..747df2c 100644 --- a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c +++ b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_interface.c @@ -49,9 +49,9 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); /********************************************************************** ********************************************************************** @@ -166,8 +166,6 @@ NETSNMP_STATIC_INLINE int var, int column); #endif -ipv4InterfaceTable_data *ipv4InterfaceTable_allocate_data(void); - /** * @internal * Initialize the table ipv4InterfaceTable @@ -274,10 +272,12 @@ _ipv4InterfaceTable_initialize_interface(ipv4InterfaceTable_registration * netsnmp_handler_registration_create("ipv4InterfaceTable", handler, ipv4InterfaceTable_oid, ipv4InterfaceTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #ifndef NETSNMP_DISABLE_SET_SUPPORT - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table ipv4InterfaceTable\n"); @@ -387,6 +387,7 @@ ipv4InterfaceTable_valid_columns_set(netsnmp_column_info *vc) ipv4InterfaceTable_if_ctx.tbl_info.valid_columns = vc; } /* ipv4InterfaceTable_valid_columns_set */ +#if 0 /* * ipv4InterfaceTable_allocate_data * @@ -407,6 +408,7 @@ ipv4InterfaceTable_allocate_data(void) return rtn; } /* ipv4InterfaceTable_allocate_data */ +#endif /** * @internal @@ -646,7 +648,7 @@ _mfd_ipv4InterfaceTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_subagent.c b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_subagent.c index 35b2e96..782743a 100644 --- a/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_subagent.c +++ b/agent/mibgroup/ip-mib/ipv4InterfaceTable/ipv4InterfaceTable_subagent.c @@ -10,9 +10,9 @@ #include #include -netsnmp_feature_require(agentx_enable_subagent) -netsnmp_feature_require(agent_check_and_process) -netsnmp_feature_require(enable_stderrlog) +netsnmp_feature_require(agentx_enable_subagent); +netsnmp_feature_require(agent_check_and_process); +netsnmp_feature_require(enable_stderrlog); /* * include our parent header diff --git a/agent/mibgroup/ip-mib/ipv6InterfaceTable.h b/agent/mibgroup/ip-mib/ipv6InterfaceTable.h index 471eaa0..42dda5b 100644 --- a/agent/mibgroup/ip-mib/ipv6InterfaceTable.h +++ b/agent/mibgroup/ip-mib/ipv6InterfaceTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable) +config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable); diff --git a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c index 92f0a5b..a69bcbb 100644 --- a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c +++ b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.c @@ -33,8 +33,7 @@ OID_LENGTH(ipv6InterfaceTable_oid); ipv6InterfaceTable_registration ipv6InterfaceTable_user_context; static ipv6InterfaceTable_registration *ipv6InterfaceTable_user_context_p; -void initialize_table_ipv6InterfaceTable(void); -void shutdown_table_ipv6InterfaceTable(void); +static void shutdown_table_ipv6InterfaceTable(void); /** diff --git a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h index e2a87a1..a8a2185 100644 --- a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h +++ b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable.h @@ -25,9 +25,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(if-mib/ifTable/ifTable) -config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface) -config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) +config_require(if-mib/ifTable/ifTable); +config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface); +config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access); /* *INDENT-ON* */ /* @@ -105,95 +105,27 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) * function prototypes */ int - - - - - - - - - - - - - - - ipv6InterfaceTable_pre_request(ipv6InterfaceTable_registration * user_context); int - - - - - - - - - - - - - - - ipv6InterfaceTable_post_request(ipv6InterfaceTable_registration * user_context, int rc); int - - - - - - - - - - - - - - - ipv6InterfaceTable_rowreq_ctx_init(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, void *user_init_ctx); void - - - - - - - - - - - - - - - ipv6InterfaceTable_rowreq_ctx_cleanup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int ipv6InterfaceTable_commit(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); - - - - - - - - ipv6InterfaceTable_rowreq_ctx - * ipv6InterfaceTable_row_find_by_mib_index + ipv6InterfaceTable_rowreq_ctx *ipv6InterfaceTable_row_find_by_mib_index (ipv6InterfaceTable_mib_index * mib_idx); - extern const oid ipv6InterfaceTable_oid[]; - extern const int ipv6InterfaceTable_oid_size; + extern const oid ipv6InterfaceTable_oid[]; + extern const int ipv6InterfaceTable_oid_size; #include "ipv6InterfaceTable_interface.h" @@ -224,123 +156,32 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) */ int - - - - - - - - - - - - - - - ipv6InterfaceReasmMaxSize_get(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long * ipv6InterfaceReasmMaxSize_val_ptr); int - - - - - - - - - - - - - - - ipv6InterfaceIdentifier_get(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, char **ipv6InterfaceIdentifier_val_ptr_ptr, - size_t - * + size_t * ipv6InterfaceIdentifier_val_ptr_len_ptr); int - - - - - - - - - - - - - - - ipv6InterfaceEnableStatus_get(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long * ipv6InterfaceEnableStatus_val_ptr); int - - - - - - - - - - - - - - - ipv6InterfaceReachableTime_get(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long * ipv6InterfaceReachableTime_val_ptr); int - - - - - - - - - - - - - - - ipv6InterfaceRetransmitTime_get(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long * ipv6InterfaceRetransmitTime_val_ptr); int - - - - - - - - - - - - - - - ipv6InterfaceForwarding_get(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long * @@ -348,40 +189,10 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) int - - - - - - - - - - - - - - - ipv6InterfaceTable_indexes_set_tbl_idx(ipv6InterfaceTable_mib_index * tbl_idx, long ipv6InterfaceIfIndex_val); int - - - - - - - - - - - - - - - ipv6InterfaceTable_indexes_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, long ipv6InterfaceIfIndex_val); @@ -412,39 +223,9 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) int - - - - - - - - - - - - - - - ipv6InterfaceTable_undo_setup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceTable_undo_cleanup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int ipv6InterfaceTable_undo(ipv6InterfaceTable_rowreq_ctx * @@ -452,503 +233,106 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) int ipv6InterfaceTable_commit(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceTable_undo_commit(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); - - int - - - - - - - - - - - - - - - ipv6InterfaceReasmMaxSize_check_value(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceReasmMaxSize_val); int - - - - - - - - - - - - - - - ipv6InterfaceReasmMaxSize_undo_setup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceReasmMaxSize_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceReasmMaxSize_val); int - - - - - - - - - - - - - - - ipv6InterfaceReasmMaxSize_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceIdentifier_check_value(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, char *ipv6InterfaceIdentifier_val_ptr, size_t ipv6InterfaceIdentifier_val_ptr_len); int - - - - - - - - - - - - - - - ipv6InterfaceIdentifier_undo_setup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceIdentifier_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, char *ipv6InterfaceIdentifier_val_ptr, size_t ipv6InterfaceIdentifier_val_ptr_len); int - - - - - - - - - - - - - - - ipv6InterfaceIdentifier_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceEnableStatus_check_value(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceEnableStatus_val); int - - - - - - - - - - - - - - - ipv6InterfaceEnableStatus_undo_setup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceEnableStatus_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceEnableStatus_val); int - - - - - - - - - - - - - - - ipv6InterfaceEnableStatus_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); - int - - - - - - - - - - - - - - - ipv6InterfaceReachableTime_check_value (ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceReachableTime_val); int - - - - - - - - - - - - - - - ipv6InterfaceReachableTime_undo_setup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceReachableTime_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceReachableTime_val); int - - - - - - - - - - - - - - - ipv6InterfaceReachableTime_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); - int - - - - - - - - - - - - - - - ipv6InterfaceRetransmitTime_check_value (ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceRetransmitTime_val); int - - - - - - - - - - - - - - - ipv6InterfaceRetransmitTime_undo_setup (ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceRetransmitTime_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceRetransmitTime_val); int - - - - - - - - - - - - - - - ipv6InterfaceRetransmitTime_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); - int - - - - - - - - - - - - - - - ipv6InterfaceForwarding_check_value(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceForwarding_val); int - - - - - - - - - - - - - - - ipv6InterfaceForwarding_undo_setup(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); int - - - - - - - - - - - - - - - ipv6InterfaceForwarding_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx, u_long ipv6InterfaceForwarding_val); int - - - - - - - - - - - - - - - ipv6InterfaceForwarding_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx); - - int - - - - - - - - - - - - - - - ipv6InterfaceTable_check_dependencies(ipv6InterfaceTable_rowreq_ctx * ctx); @@ -968,4 +352,3 @@ config_require(ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access) #endif #endif /* IPV6INTERFACETABLE_H */ /** @} */ - diff --git a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c index 33c65a9..db8aaac 100644 --- a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_data_access.c @@ -252,7 +252,7 @@ ipv6InterfaceTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c index cbd533c..79719e7 100644 --- a/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c +++ b/agent/mibgroup/ip-mib/ipv6InterfaceTable/ipv6InterfaceTable_interface.c @@ -49,9 +49,9 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); /********************************************************************** ********************************************************************** @@ -272,10 +272,12 @@ _ipv6InterfaceTable_initialize_interface(ipv6InterfaceTable_registration * netsnmp_handler_registration_create("ipv6InterfaceTable", handler, ipv6InterfaceTable_oid, ipv6InterfaceTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #ifndef NETSNMP_DISABLE_SET_SUPPORT - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table ipv6InterfaceTable\n"); @@ -659,7 +661,7 @@ _mfd_ipv6InterfaceTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h index 779bd75..090e762 100644 --- a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h +++ b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable) +config_require(ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable); diff --git a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h index 2974fee..885a002 100644 --- a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h +++ b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable.h @@ -22,9 +22,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(ip-mib/data_access/ipv6scopezone) -config_require(ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface) -config_require(ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access) +config_require(ip-mib/data_access/ipv6scopezone); +config_require(ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface); +config_require(ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c index 0025dd3..178cbf5 100644 --- a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c +++ b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_data_access.c @@ -196,7 +196,7 @@ _snarf_zoneindex_entry(netsnmp_v6scopezone_entry *scopezone_entry, * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c index ef2088b..0cd78c0 100644 --- a/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c +++ b/agent/mibgroup/ip-mib/ipv6ScopeZoneIndexTable/ipv6ScopeZoneIndexTable_interface.c @@ -47,18 +47,18 @@ #include -netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_container_size, ipv6ScopeZoneIndexTable_external_access) -netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_registration_set, ipv6ScopeZoneIndexTable_external_access) -netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_registration_get, ipv6ScopeZoneIndexTable_external_access) -netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_container_get, ipv6ScopeZoneIndexTable_external_access) +netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_container_size, ipv6ScopeZoneIndexTable_external_access); +netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_registration_set, ipv6ScopeZoneIndexTable_external_access); +netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_registration_get, ipv6ScopeZoneIndexTable_external_access); +netsnmp_feature_child_of(ipv6ScopeZoneIndexTable_container_get, ipv6ScopeZoneIndexTable_external_access); /********************************************************************** ********************************************************************** @@ -945,7 +945,7 @@ _mfd_ipv6ScopeZoneIndexTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/kernel_sunos5.c b/agent/mibgroup/kernel_sunos5.c index 331ee6d..91c973e 100644 --- a/agent/mibgroup/kernel_sunos5.c +++ b/agent/mibgroup/kernel_sunos5.c @@ -4,7 +4,7 @@ */ /* * Portions of this file are copyrighted by: - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * 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. */ @@ -82,7 +82,7 @@ kstat_ctl_t *kstat_fd = 0; static mibcache Mibcache[MIBCACHE_SIZE+1] = { {MIB_SYSTEM, 0, (void *) -1, 0, 0, 0, 0}, - {MIB_INTERFACES, 50 * sizeof(mib2_ifEntry_t), (void *) -1, 0, 30, 0, + {MIB_INTERFACES, 50 * sizeof(mib2_ifEntry_t), (void *) -1, 0, 3, 0, 0}, {MIB_AT, 0, (void *) -1, 0, 0, 0, 0}, {MIB_IP, sizeof(mib2_ip_t), (void *) -1, 0, 60, 0, 0}, @@ -191,19 +191,17 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags, int mtu); static int get_if_stats(mib2_ifEntry_t *ifp); -#if defined(HAVE_IF_NAMEINDEX) && defined(NETSNMP_INCLUDE_IFTABLE_REWRITES) +#if defined(HAVE_IF_NAMEINDEX) static int _dlpi_open(const char *devname); static int _dlpi_get_phys_address(int fd, char *paddr, int maxlen, int *paddrlen); static int _dlpi_get_iftype(int fd, unsigned int *iftype); static int _dlpi_attach(int fd, int ppa); static int _dlpi_parse_devname(char *devname, int *ppap); -#endif - - - +#else static int Name_cmp(void *, void *); +#endif static void init_mibcache_element(mibcache * cp); @@ -257,14 +255,10 @@ void init_kernel_sunos5(void) { static int creg = 0; - const int period = 30; + const int period = 3; int alarm_id = 0; if (creg == 0) { - alarm_id = snmp_alarm_register(5, NULL, kernel_sunos5_cache_age, - NULL); - DEBUGMSGTL(("kernel_sunos5", "registered alarm %d with period 5s\n", - alarm_id)); alarm_id = snmp_alarm_register(period, SA_REPEAT, kernel_sunos5_cache_age, (void *)period); @@ -309,7 +303,8 @@ getKstatInt(const char *classname, const char *statname, if ((ksc = kstat_fd) == NULL) { goto Return; } - ks = kstat_lookup(ksc, classname, -1, statname); + ks = kstat_lookup(ksc, NETSNMP_REMOVE_CONST(char *, classname), + -1, NETSNMP_REMOVE_CONST(char *, statname)); if (ks == NULL) { DEBUGMSGTL(("kernel_sunos5", "class %s, stat %s not found\n", classname ? classname : "NULL", @@ -322,7 +317,7 @@ getKstatInt(const char *classname, const char *statname, classname ? classname : "NULL", statname ? statname : "NULL")); goto Return; } - named = kstat_data_lookup(ks, varname); + named = kstat_data_lookup(ks, NETSNMP_REMOVE_CONST(char *, varname)); if (named == NULL) { DEBUGMSGTL(("kernel_sunos5", "no var %s for class %s stat %s\n", varname, classname ? classname : "NULL", @@ -412,7 +407,8 @@ getKstat(const char *statname, const char *varname, void *value) * contain all available modules. */ - if ((ks = kstat_lookup(ksc, "unix", 0, "kstat_headers")) == NULL) { + if ((ks = kstat_lookup(ksc, NETSNMP_REMOVE_CONST(char *, "unix"), + 0, NETSNMP_REMOVE_CONST(char *, "kstat_headers"))) == NULL) { ret = -10; goto Return; /* kstat errors */ } @@ -446,7 +442,8 @@ getKstat(const char *statname, const char *varname, void *value) /* * Get the named statistics */ - if ((ks = kstat_lookup(ksc, module_name, instance, statname)) == NULL) { + if ((ks = kstat_lookup(ksc, module_name, instance, + NETSNMP_REMOVE_CONST(char *, statname))) == NULL) { ret = -10; goto Return; /* kstat errors */ } @@ -567,7 +564,8 @@ getKstatString(const char *statname, const char *varname, * contain all available modules. */ - if ((ks = kstat_lookup(ksc, "unix", 0, "kstat_headers")) == NULL) { + if ((ks = kstat_lookup(ksc, NETSNMP_REMOVE_CONST(char *, "unix"), + 0, NETSNMP_REMOVE_CONST(char *, "kstat_headers"))) == NULL) { ret = -10; goto Return; /* kstat errors */ } @@ -601,7 +599,8 @@ getKstatString(const char *statname, const char *varname, /* * Get the named statistics */ - if ((ks = kstat_lookup(ksc, module_name, instance, statname)) == NULL) { + if ((ks = kstat_lookup(ksc, module_name, instance, + NETSNMP_REMOVE_CONST(char *, statname))) == NULL) { ret = -10; goto Return; /* kstat errors */ } @@ -1028,6 +1027,7 @@ getmib(int groupname, int subgroupname, void **statbuf, size_t *size, break; } strbuf.buf = (char *)*statbuf + (oldsize - strbuf.len); + /* fallthrough */ case 0: /* fix buffer to real size & position */ strbuf.len += strbuf.buf - (char*)*statbuf; @@ -1072,11 +1072,10 @@ getmib(int groupname, int subgroupname, void **statbuf, size_t *size, * to be substituted later if SunSoft decides to extend its mib2 interface. */ -#if defined(HAVE_IF_NAMEINDEX) && defined(NETSNMP_INCLUDE_IFTABLE_REWRITES) +#if defined(HAVE_IF_NAMEINDEX) /* - * If IFTABLE_REWRITES is enabled, then we will also rely on DLPI to obtain - * information from the NIC. + * Use DLPI to obtain information from the NIC. */ /* @@ -1405,7 +1404,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type, ifnp->if_index != 0 && (i < nentries); ifnp++) { DEBUGMSGTL(("kernel_sunos5", "...... getif %s\n", ifnp->if_name)); - memcpy(lifrp->lifr_name, ifnp->if_name, LIFNAMSIZ); + strlcpy(lifrp->lifr_name, ifnp->if_name, LIFNAMSIZ); if_isv6 = B_FALSE; if (ioctl(ifsd, SIOCGLIFFLAGS, lifrp) < 0) { @@ -1620,13 +1619,14 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type, close(ifsd); return ret; } -#endif /*defined(HAVE_IF_NAMEINDEX)&&defined(NETSNMP_INCLUDE_IFTABLE_REWRITES)*/ +#endif /*defined(HAVE_IF_NAMEINDEX)*/ static void set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags, int mtu) { boolean_t havespeed = B_FALSE; + uint64_t ifspeed = 0; /* * Set basic information @@ -1640,27 +1640,33 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags, ifp->flags = flags; ifp->ifMtu = mtu; ifp->ifSpeed = 0; + ifp->ifHighSpeed = 0; /* * Get link speed */ - if ((getKstatInt(NULL, name, "ifspeed", &ifp->ifSpeed) == 0)) { + if ((getKstat(name, "ifspeed", &ifspeed) == 0)) { /* * check for SunOS patch with half implemented ifSpeed */ - if (ifp->ifSpeed > 0 && ifp->ifSpeed < 10000) { - ifp->ifSpeed *= 1000000; + if (ifspeed > 0 && ifspeed < 10000) { + ifspeed *= 1000000; } havespeed = B_TRUE; - } else if (getKstatInt(NULL, name, "ifSpeed", &ifp->ifSpeed) == 0) { + } else if (getKstat(name, "ifSpeed", &ifspeed) == 0) { /* * this is good */ havespeed = B_TRUE; - } else if (getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0) { - havespeed = B_TRUE; } + if (ifspeed > 0xffffffff) { + ifp->ifSpeed = 0xffffffff; + } else { + ifp->ifSpeed = ifspeed; + } + ifp->ifHighSpeed = ifspeed / 1000000; + /* make ifOperStatus depend on link status if available */ if (ifp->ifAdminStatus == 1) { int i_tmp; @@ -1763,7 +1769,7 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags, static int get_if_stats(mib2_ifEntry_t *ifp) { - Counter l_tmp; + int l_tmp; char *name = ifp->ifDescr.o_bytes; if (strchr(name, ':')) @@ -1850,6 +1856,7 @@ Get_everything(void *x, void *y) return 0; /* Always TRUE */ } +#if !defined(HAVE_IF_NAMEINDEX) /* * Compare name and IP address of the interface to ARP table entry. * Needed to obtain the physical address of the interface in getif. @@ -1870,6 +1877,7 @@ Name_cmp(void *ifrp, void *ep) return 1; } } +#endif /* * Try to determine the index of a particular interface. If mfd-rewrites is @@ -2070,20 +2078,3 @@ main(int argc, char **argv) } #endif /*_GETMIBSTAT_TEST */ #endif /* SUNOS5 */ - - -/*- - * These variables describe the formatting of this file. If you don't like the - * template defaults, feel free to change them here (not in your .emacs file). - * - * Local Variables: - * comment-column: 32 - * c-indent-level: 4 - * c-continued-statement-offset: 4 - * c-brace-offset: -4 - * c-argdecl-indent: 0 - * c-label-offset: -4 - * fill-column: 79 - * fill-prefix: " * " - * End: - */ diff --git a/agent/mibgroup/kernel_sunos5.h b/agent/mibgroup/kernel_sunos5.h index bf337ae..ed05314 100644 --- a/agent/mibgroup/kernel_sunos5.h +++ b/agent/mibgroup/kernel_sunos5.h @@ -126,28 +126,28 @@ typedef struct mibmap { typedef unsigned long TimeTicks; typedef struct mib2_ifEntry { - int ifIndex; /* ifEntry 1 */ + unsigned int ifIndex; /* ifEntry 1 */ DeviceName ifDescr; /* ifEntry 2 */ - int ifType; /* ifEntry 3 */ - int ifMtu; /* ifEntry 4 */ - Gauge ifSpeed; /* ifEntry 5 */ + unsigned int ifType; /* ifEntry 3 */ + unsigned int ifMtu; /* ifEntry 4 */ + int ifSpeed; /* ifEntry 5 */ PhysAddress ifPhysAddress; /* ifEntry 6 */ - int ifAdminStatus; /* ifEntry 7 */ - int ifOperStatus; /* ifEntry 8 */ + unsigned int ifAdminStatus; /* ifEntry 7 */ + unsigned int ifOperStatus; /* ifEntry 8 */ TimeTicks ifLastChange; /* ifEntry 9 */ - Counter ifInOctets; /* ifEntry 10 */ - Counter ifInUcastPkts; /* ifEntry 11 */ - Counter ifInNUcastPkts; /* ifEntry 12 */ - Counter ifInDiscards; /* ifEntry 13 */ - Counter ifInErrors; /* ifEntry 14 */ - Counter ifInUnknownProtos; /* ifEntry 15 */ - Counter ifOutOctets; /* ifEntry 16 */ - Counter ifOutUcastPkts; /* ifEntry 17 */ - Counter ifOutNUcastPkts; /* ifEntry 18 */ - Counter ifOutDiscards; /* ifEntry 19 */ - Counter ifOutErrors; /* ifEntry 20 */ + int ifInOctets; /* ifEntry 10 */ + int ifInUcastPkts; /* ifEntry 11 */ + int ifInNUcastPkts; /* ifEntry 12 */ + int ifInDiscards; /* ifEntry 13 */ + int ifInErrors; /* ifEntry 14 */ + int ifInUnknownProtos; /* ifEntry 15 */ + int ifOutOctets; /* ifEntry 16 */ + int ifOutUcastPkts; /* ifEntry 17 */ + int ifOutNUcastPkts; /* ifEntry 18 */ + int ifOutDiscards; /* ifEntry 19 */ + int ifOutErrors; /* ifEntry 20 */ Gauge ifOutQLen; /* ifEntry 21 */ - int ifSpecific; /* ifEntry 22 */ + unsigned int ifSpecific; /* ifEntry 22 */ /* * Support ifXTable. @@ -164,8 +164,10 @@ typedef struct mib2_ifEntry { /* * Counters not part of ifTable or ifXTable */ - Counter ifCollisions; + int ifCollisions; int flags; /* interface flags (IFF_*) */ + + Gauge ifHighSpeed; } mib2_ifEntry_t; /*- @@ -208,19 +210,4 @@ extern "C" { } #endif #endif -/*- - * These variables describe the formatting of this file. If you don't like the - * template defaults, feel free to change them here (not in your .emacs file). - * - * Local Variables: - * comment-column: 32 - * c-indent-level: 4 - * c-continued-statement-offset: 4 - * c-brace-offset: -4 - * c-argdecl-indent: 0 - * c-label-offset: -4 - * fill-column: 79 - * fill-prefix: " * " - * End: - */ #endif diff --git a/agent/mibgroup/mibII.h b/agent/mibgroup/mibII.h index 35cb544..f0558c2 100644 --- a/agent/mibgroup/mibII.h +++ b/agent/mibgroup/mibII.h @@ -2,50 +2,57 @@ * module to include the modules relavent to the mib-II mib(s) */ -config_require(mibII/system_mib) -config_require(mibII/sysORTable) -config_version_require((mibII/snmp_mib, 5.5, mibII/snmp_mib_5_5)) -config_require(mibII/vacm_vars) -config_require(mibII/setSerialNo) +config_require(mibII/system_mib); +config_require(mibII/sysORTable); +config_require(mibII/snmp_mib); +config_require(mibII/vacm_vars); +config_require(mibII/setSerialNo); #if !defined(cygwin) || defined(HAVE_IPHLPAPI_H) -config_require(mibII/at) -config_require(mibII/ifTable) -config_require(mibII/ip) -config_require(mibII/tcp) -config_require(mibII/icmp) -config_require(mibII/udp) -#endif +config_require(mibII/at); +config_require(mibII/ifTable); +#if !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) +config_require(mibII/ip); +config_require(mibII/tcp); +config_require(mibII/udp); /* mibII/ipv6 is activated via --enable-ipv6 and only builds on Linux+*BSD */ #if defined(NETSNMP_ENABLE_IPV6) && (defined(linux) || defined(freebsd3) || defined(netbsd1) || defined(openbsd4)) -config_require(mibII/ipv6) -#endif +config_require(mibII/ipv6); +#endif /* defined(NETSNMP_ENABLE_IPV6) */ -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES -config_require(if-mib) -#endif +#endif /* !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) */ +config_require(mibII/icmp); +#endif /* !defined(cygwin) || defined(HAVE_IPHLPAPI_H) */ + +config_require(if-mib); /* * these new module re-rewrites have only been implemented for * Linux and *BSD. */ #if defined(linux) -config_require(ip-mib ip-forward-mib tcp-mib udp-mib) +config_require(ip-mib ip-forward-mib tcp-mib udp-mib); #elif defined(dragonfly) || defined(freebsd7) || \ defined(netbsd5) || defined(openbsd4) || defined( darwin ) -config_require(ip-mib ip-forward-mib tcp-mib udp-mib) +config_require(ip-mib ip-forward-mib tcp-mib udp-mib); #elif defined(solaris2) -config_require(tcp-mib udp-mib) +config_require(tcp-mib udp-mib); +config_require(ip-forward-mib); +config_require(ip-mib/ipAddressTable ip-mib/ipAddressPrefixTable); +config_require(ip-mib/ipDefaultRouterTable); #elif defined(freebsd4) -config_require(tcp-mib udp-mib) +config_require(tcp-mib udp-mib); #elif defined(netbsd1) -config_require(tcp-mib udp-mib) +config_require(tcp-mib udp-mib); #endif /* * For Solaris, enable additional tables when it has extended MIB support. */ #if defined( solaris2 ) && defined( HAVE_MIB2_IPIFSTATSENTRY_T ) -config_require(ip-mib/ipSystemStatsTable ip-mib/ipAddressTable) -config_require(ip-forward-mib) +config_require(ip-mib/ipSystemStatsTable ip-mib/ipIfStatsTable); +/* Still missing: + * ip-mib/inetNetToMediaTable + * ip-mib/ipv6ScopeZoneIndexTable + */ #endif diff --git a/agent/mibgroup/mibII/at.c b/agent/mibgroup/mibII/at.c index f57ba2a..9f1631e 100644 --- a/agent/mibgroup/mibII/at.c +++ b/agent/mibgroup/mibII/at.c @@ -15,128 +15,16 @@ */ #include -#include "mibII_common.h" /* for NETSNMP_KLOOKUP */ - -#if HAVE_STRING_H -#include -#else -#include -#endif -#if HAVE_STDLIB_H -#include -#endif -#if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) -#define _KERNEL 1 -#define _I_DEFINED_KERNEL -#endif -#include -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif - -#if HAVE_NETINET_IN_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -#if HAVE_NET_IF_VAR_H -#include -#endif -#ifdef _I_DEFINED_KERNEL -#undef _KERNEL -#endif - -#if HAVE_NETINET_IF_ETHER_H -#include -#endif -#if HAVE_INET_MIB2_H -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_SYS_SYSCTL_H -#include -#endif -#if HAVE_NET_IF_DL_H -#ifndef dynix -#include -#else -#include -#endif -#endif -#if HAVE_SYS_STREAM_H -#include -#endif -#if HAVE_NET_ROUTE_H -#include -#endif -#ifdef solaris2 -#include "kernel_sunos5.h" -#endif - -#ifdef hpux11 -#include -#include -#endif /* hpux11 */ - #include #include -#include - #include "at.h" -#include "interfaces.h" - -#include - -#if defined(HAVE_SYS_SYSCTL_H) && !defined(NETSNMP_CAN_USE_SYSCTL) -# if defined(RTF_LLINFO) -# define NETSNMP_CAN_USE_SYSCTL 1 -# endif -#endif - -#ifdef cygwin -#include -#endif - - /********************* - * - * Kernel & interface information, - * and internal forward declarations - * - *********************/ - -#if !defined (WIN32) && !defined (cygwin) -#ifndef solaris2 -static void ARP_Scan_Init(void); -#ifdef ARP_SCAN_FOUR_ARGUMENTS -static int ARP_Scan_Next(in_addr_t *, char *, int *, u_long *, u_short *); -#else -static int ARP_Scan_Next(in_addr_t *, char *, int *, u_long *); -#endif -#endif +#ifdef solaris2 +#include "kernel_sunos5.h" #endif - /********************* - * - * Public interface functions - * - *********************/ - /* * define the structure we're going to ask the agent to register our - * information at + * information at */ struct variable1 at_variables[] = { {ATIFINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, @@ -149,7 +37,7 @@ struct variable1 at_variables[] = { /* * Define the OID pointer to the top of the mib tree that we're - * registering underneath + * registering underneath */ oid at_variables_oid[] = { SNMP_OID_MIB2, 3, 1, 1 }; @@ -157,7 +45,7 @@ void init_at(void) { /* - * register ourselves with the agent to handle our mib tree + * register ourselves with the agent to handle our mib tree */ REGISTER_MIB("mibII/at", at_variables, variable1, at_variables_oid); #ifdef solaris2 @@ -165,1116 +53,3 @@ init_at(void) #endif } -#if !defined (WIN32) && !defined (cygwin) -#ifndef solaris2 - -/* - * var_atEntry(... - * Arguments: - * vp IN - pointer to variable entry that points here - * name IN/OUT - IN/name requested, OUT/name found - * length IN/OUT - length of IN/OUT oid's - * exact IN - TRUE if an exact match was requested - * var_len OUT - length of variable or 0 if function returned - * write_method - * - */ - -u_char * -var_atEntry(struct variable *vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) -{ - /* - * Address Translation table object identifier is of form: - * 1.3.6.1.2.1.3.1.1.1.interface.1.A.B.C.D, where A.B.C.D is IP address. - * Interface is at offset 10, - * IPADDR starts at offset 12. - * - * IP Net to Media table object identifier is of form: - * 1.3.6.1.2.1.4.22.1.1.1.interface.A.B.C.D, where A.B.C.D is IP address. - * Interface is at offset 10, - * IPADDR starts at offset 11. - */ - u_char *cp; - oid *op; - oid lowest[16]; - oid current[16]; - static char PhysAddr[MAX_MAC_ADDR_LEN], LowPhysAddr[MAX_MAC_ADDR_LEN]; - static int PhysAddrLen, LowPhysAddrLen; - in_addr_t Addr, LowAddr; - int foundone; - static in_addr_t addr_ret; -#ifdef ARP_SCAN_FOUR_ARGUMENTS - u_short ifIndex, lowIfIndex = 0; -#endif /* ARP_SCAN_FOUR_ARGUMENTS */ - u_long ifType, lowIfType = 0; - - int oid_length; - - /* - * fill in object part of name for current (less sizeof instance part) - */ - memcpy((char *) current, (char *) vp->name, - (int) vp->namelen * sizeof(oid)); - - if (current[6] == 3) { /* AT group oid */ - oid_length = 16; - } else { /* IP NetToMedia group oid */ - oid_length = 15; - } - - LowAddr = 0; /* Don't have one yet */ - foundone = 0; - ARP_Scan_Init(); - for (;;) { -#ifdef ARP_SCAN_FOUR_ARGUMENTS - if (ARP_Scan_Next(&Addr, PhysAddr, &PhysAddrLen, &ifType, &ifIndex) == 0) - break; - current[10] = ifIndex; - - if (current[6] == 3) { /* AT group oid */ - current[11] = 1; - op = current + 12; - } else { /* IP NetToMedia group oid */ - op = current + 11; - } -#else /* ARP_SCAN_FOUR_ARGUMENTS */ - if (ARP_Scan_Next(&Addr, PhysAddr, &PhysAddrLen, &ifType) == 0) - break; - current[10] = 1; - - if (current[6] == 3) { /* AT group oid */ - current[11] = 1; - op = current + 12; - } else { /* IP NetToMedia group oid */ - op = current + 11; - } -#endif /* ARP_SCAN_FOUR_ARGUMENTS */ - cp = (u_char *) & Addr; - *op++ = *cp++; - *op++ = *cp++; - *op++ = *cp++; - *op++ = *cp++; - - if (exact) { - if (snmp_oid_compare(current, oid_length, name, *length) == 0) { - memcpy((char *) lowest, (char *) current, - oid_length * sizeof(oid)); - LowAddr = Addr; - foundone = 1; -#ifdef ARP_SCAN_FOUR_ARGUMENTS - lowIfIndex = ifIndex; -#endif /* ARP_SCAN_FOUR_ARGUMENTS */ - memcpy(LowPhysAddr, PhysAddr, sizeof(PhysAddr)); - LowPhysAddrLen = PhysAddrLen; - lowIfType = ifType; - break; /* no need to search further */ - } - } else { - if ((snmp_oid_compare(current, oid_length, name, *length) > 0) - && ((foundone == 0) - || - (snmp_oid_compare - (current, oid_length, lowest, oid_length) < 0))) { - /* - * if new one is greater than input and closer to input than - * previous lowest, save this one as the "next" one. - */ - memcpy((char *) lowest, (char *) current, - oid_length * sizeof(oid)); - LowAddr = Addr; - foundone = 1; -#ifdef ARP_SCAN_FOUR_ARGUMENTS - lowIfIndex = ifIndex; -#endif /* ARP_SCAN_FOUR_ARGUMENTS */ - memcpy(LowPhysAddr, PhysAddr, sizeof(PhysAddr)); - LowPhysAddrLen = PhysAddrLen; - lowIfType = ifType; - } - } - } - if (foundone == 0) - return (NULL); - - memcpy((char *) name, (char *) lowest, oid_length * sizeof(oid)); - *length = oid_length; - *write_method = (WriteMethod*)0; - switch (vp->magic) { - case IPMEDIAIFINDEX: /* also ATIFINDEX */ - *var_len = sizeof long_return; -#ifdef ARP_SCAN_FOUR_ARGUMENTS - long_return = lowIfIndex; -#else /* ARP_SCAN_FOUR_ARGUMENTS */ -#if NETSNMP_NO_DUMMY_VALUES - return NULL; -#endif - long_return = 1; /* XXX */ -#endif /* ARP_SCAN_FOUR_ARGUMENTS */ - return (u_char *) & long_return; - case IPMEDIAPHYSADDRESS: /* also ATPHYSADDRESS */ - *var_len = LowPhysAddrLen; - return (u_char *) LowPhysAddr; - case IPMEDIANETADDRESS: /* also ATNETADDRESS */ - *var_len = sizeof(addr_ret); - addr_ret = LowAddr; - return (u_char *) & addr_ret; - case IPMEDIATYPE: - *var_len = sizeof long_return; - long_return = lowIfType; - return (u_char *) & long_return; - default: - DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_atEntry\n", - vp->magic)); - } - return NULL; -} -#else /* solaris2 */ - -typedef struct if_ip { - int ifIdx; - IpAddress ipAddr; -} if_ip_t; - -static int -AT_Cmp(void *addr, void *ep) -{ - mib2_ipNetToMediaEntry_t *mp = (mib2_ipNetToMediaEntry_t *) ep; - int ret = -1; - oid index; - -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES - mp->ipNetToMediaIfIndex.o_bytes[mp->ipNetToMediaIfIndex.o_length] = '\0'; - index = netsnmp_access_interface_index_find( - mp->ipNetToMediaIfIndex.o_bytes); -#else - index = Interface_Index_By_Name(mp->ipNetToMediaIfIndex.o_bytes, - mp->ipNetToMediaIfIndex.o_length); -#endif - DEBUGMSGTL(("mibII/at", "......... AT_Cmp %lx<>%lx %d<>%d (%.5s)\n", - (unsigned long)mp->ipNetToMediaNetAddress, - (unsigned long)((if_ip_t *) addr)->ipAddr, - ((if_ip_t *) addr)->ifIdx, index, - mp->ipNetToMediaIfIndex.o_bytes)); - if (mp->ipNetToMediaNetAddress != ((if_ip_t *) addr)->ipAddr) - ret = 1; - else if (((if_ip_t *) addr)->ifIdx != index) - ret = 1; - else - ret = 0; - DEBUGMSGTL(("mibII/at", "......... AT_Cmp returns %d\n", ret)); - return ret; -} - -u_char * -var_atEntry(struct variable * vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) -{ - /* - * object identifier is of form: - * 1.3.6.1.2.1.3.1.1.1.interface.1.A.B.C.D, where A.B.C.D is IP address. - * Interface is at offset 10, - * IPADDR starts at offset 12. - */ -#define AT_MAX_NAME_LENGTH 16 -#define AT_IFINDEX_OFF 10 - u_char *cp; - oid *op; - oid lowest[AT_MAX_NAME_LENGTH]; - oid current[AT_MAX_NAME_LENGTH]; - if_ip_t NextAddr; - mib2_ipNetToMediaEntry_t entry; - static mib2_ipNetToMediaEntry_t Lowentry; - int Found = 0; - req_e req_type; - int offset, olength = 0; - static in_addr_t addr_ret; - - /* - * fill in object part of name for current (less sizeof instance part) - */ - - DEBUGMSGTL(("mibII/at", "var_atEntry: ")); - DEBUGMSGOID(("mibII/at", vp->name, vp->namelen)); - DEBUGMSG(("mibII/at", " %d\n", exact)); - - memset(&Lowentry, 0, sizeof(Lowentry)); - memcpy((char *) current, (char *) vp->name, vp->namelen * sizeof(oid)); - lowest[0] = 1024; - for (NextAddr.ipAddr = (u_long) - 1, NextAddr.ifIdx = 255, req_type = - GET_FIRST;; - NextAddr.ipAddr = entry.ipNetToMediaNetAddress, NextAddr.ifIdx = - current[AT_IFINDEX_OFF], req_type = GET_NEXT) { - if (getMibstat - (MIB_IP_NET, &entry, sizeof(mib2_ipNetToMediaEntry_t), - req_type, &AT_Cmp, &NextAddr) != 0) - break; -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES - entry.ipNetToMediaIfIndex.o_bytes[entry.ipNetToMediaIfIndex.o_length] = '\0'; - current[AT_IFINDEX_OFF] = netsnmp_access_interface_index_find( - entry.ipNetToMediaIfIndex.o_bytes); -#else - current[AT_IFINDEX_OFF] = - Interface_Index_By_Name(entry.ipNetToMediaIfIndex.o_bytes, - entry.ipNetToMediaIfIndex.o_length); -#endif - if (current[6] == 3) { /* AT group oid */ - current[AT_IFINDEX_OFF + 1] = 1; - offset = AT_IFINDEX_OFF + 2; - olength = AT_IFINDEX_OFF + 6; - } else { - offset = AT_IFINDEX_OFF + 1; - olength = AT_IFINDEX_OFF + 5; - } - COPY_IPADDR(cp, (u_char *) & entry.ipNetToMediaNetAddress, op, - current + offset); - if (exact) { - if (snmp_oid_compare(current, olength, name, *length) == 0) { - memcpy((char *) lowest, (char *) current, - olength * sizeof(oid)); - Lowentry = entry; - Found++; - break; /* no need to search further */ - } - } else { - if (snmp_oid_compare(current, olength, name, *length) > 0 - && snmp_oid_compare(current, olength, lowest, - *length) < 0) { - /* - * if new one is greater than input and closer to input than - * previous lowest, and is not equal to it, save this one as the "next" one. - */ - memcpy((char *) lowest, (char *) current, - olength * sizeof(oid)); - Lowentry = entry; - Found++; - } - } - } - DEBUGMSGTL(("mibII/at", "... Found = %d\n", Found)); - if (Found == 0) - return (NULL); - memcpy((char *) name, (char *) lowest, olength * sizeof(oid)); - *length = olength; - *write_method = 0; - switch (vp->magic) { - case IPMEDIAIFINDEX: - *var_len = sizeof long_return; -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES - Lowentry.ipNetToMediaIfIndex.o_bytes[ - Lowentry.ipNetToMediaIfIndex.o_length] = '\0'; - long_return = netsnmp_access_interface_index_find( - Lowentry.ipNetToMediaIfIndex.o_bytes); -#else - long_return = Interface_Index_By_Name( - Lowentry.ipNetToMediaIfIndex.o_bytes, - Lowentry.ipNetToMediaIfIndex.o_length); -#endif - return (u_char *) & long_return; - case IPMEDIAPHYSADDRESS: - *var_len = Lowentry.ipNetToMediaPhysAddress.o_length; - return Lowentry.ipNetToMediaPhysAddress.o_bytes; - case IPMEDIANETADDRESS: - *var_len = sizeof(addr_ret); - addr_ret = Lowentry.ipNetToMediaNetAddress; - return (u_char *) &addr_ret; - case IPMEDIATYPE: - *var_len = sizeof long_return; - long_return = Lowentry.ipNetToMediaType; - return (u_char *) & long_return; - default: - DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_atEntry\n", - vp->magic)); - } - return NULL; -} -#endif /* solaris2 */ - - - /********************* - * - * Internal implementation functions - * - *********************/ - -#ifndef solaris2 - -static int arptab_size, arptab_current; -#if NETSNMP_CAN_USE_SYSCTL -static char *lim, *rtnext; -static char *at = 0; -#else -#ifdef HAVE_STRUCT_ARPHD_AT_NEXT -static struct arphd *at = 0; -static struct arptab *at_ptr, at_entry; -static struct arpcom at_com; -#elif defined(hpux11) -static mib_ipNetToMediaEnt *at = (mib_ipNetToMediaEnt *) 0; -#else - -/* - * at used to be allocated every time we needed to look at the arp cache. - * This cause us to parse /proc/net/arp twice for each request and didn't - * allow us to filter things like we'd like to. So now we use it - * semi-statically. We initialize it to size 0 and if we need more room - * we realloc room for ARP_CACHE_INCR more entries in the table. - * We never release what we've taken . . . - */ -#define ARP_CACHE_INCR 1024 -static struct arptab *at = NULL; - -#endif -#endif /* NETSNMP_CAN_USE_SYSCTL */ - -static void -ARP_Scan_Init(void) -{ -#ifndef NETSNMP_CAN_USE_SYSCTL -#ifndef linux -#ifdef hpux11 - - int fd; - struct nmparms p; - int val; - unsigned int ulen; - int ret; - - if (at) - free(at); - at = (mib_ipNetToMediaEnt *) 0; - arptab_size = 0; - - if ((fd = open_mib("/dev/ip", O_RDONLY, 0, NM_ASYNC_OFF)) >= 0) { - p.objid = ID_ipNetToMediaTableNum; - p.buffer = (void *) &val; - ulen = sizeof(int); - p.len = &ulen; - if ((ret = get_mib_info(fd, &p)) == 0) - arptab_size = val; - - if (arptab_size > 0) { - ulen = (unsigned) arptab_size *sizeof(mib_ipNetToMediaEnt); - at = (mib_ipNetToMediaEnt *) malloc(ulen); - memset(at, 0, ulen); - p.objid = ID_ipNetToMediaTable; - p.buffer = (void *) at; - p.len = &ulen; - if ((ret = get_mib_info(fd, &p)) < 0) - arptab_size = 0; - else - arptab_size = *p.len / sizeof(mib_ipNetToMediaEnt); - } - - close_mib(fd); - } - - arptab_current = 0; - -#else /* hpux11 */ - - if (!at) { -#ifdef ARPTAB_SIZE_SYMBOL - auto_nlist(ARPTAB_SIZE_SYMBOL, (char *) &arptab_size, - sizeof arptab_size); -#ifdef HAVE_STRUCT_ARPHD_AT_NEXT - at = (struct arphd *) malloc(arptab_size * sizeof(struct arphd)); -#else - at = (struct arptab *) malloc(arptab_size * sizeof(struct arptab)); -#endif -#else - return; -#endif - } -#ifdef HAVE_STRUCT_ARPHD_AT_NEXT - auto_nlist(ARPTAB_SYMBOL, (char *) at, - arptab_size * sizeof(struct arphd)); - at_ptr = at[0].at_next; -#else - auto_nlist(ARPTAB_SYMBOL, (char *) at, - arptab_size * sizeof(struct arptab)); -#endif - arptab_current = 0; - -#endif /* hpux11 */ -#else /* linux */ - - static time_t tm = 0; /* Time of last scan */ - FILE *in; - int i, j; - char line[128]; - int za, zb, zc, zd; - char ifname[21]; - char mac[3*MAX_MAC_ADDR_LEN+1]; - char *tok; - - arptab_current = 0; /* Anytime this is called we need to reset 'current' */ - - if (time(NULL) < tm + 1) { /*Our cool one second cache implementation :-) */ - return; - } - - in = fopen("/proc/net/arp", "r"); - if (!in) { - snmp_log(LOG_ERR, "snmpd: Cannot open /proc/net/arp\n"); - arptab_size = 0; - return; - } - - /* - * Get rid of the header line - */ - fgets(line, sizeof(line), in); - - i = 0; - while (fgets(line, sizeof(line), in)) { - static int arptab_curr_max_size; - u_long tmp_a; - unsigned int tmp_flags; - - if (i >= arptab_curr_max_size) { - struct arptab *newtab = (struct arptab *) - realloc(at, (sizeof(struct arptab) * - (arptab_curr_max_size + ARP_CACHE_INCR))); - if (newtab == at) { - snmp_log(LOG_ERR, - "Error allocating more space for arpcache. " - "Cache will continue to be limited to %d entries", - arptab_curr_max_size); - break; - } else { - arptab_curr_max_size += ARP_CACHE_INCR; - at = newtab; - } - } - if (7 != - sscanf(line, - "%d.%d.%d.%d 0x%*x 0x%x %s %*[^ ] %20s\n", - &za, &zb, &zc, &zd, &tmp_flags, mac, ifname)) { - snmp_log(LOG_ERR, "Bad line in /proc/net/arp: %s", line); - continue; - } - /* - * Invalidated entries have their flag set to 0. - * * We want to ignore them - */ - if (tmp_flags == 0) { - continue; - } - ifname[sizeof(ifname)-1] = 0; /* make sure name is null terminated */ - at[i].at_flags = tmp_flags; - tmp_a = ((u_long) za << 24) | - ((u_long) zb << 16) | ((u_long) zc << 8) | ((u_long) zd); - at[i].at_iaddr.s_addr = htonl(tmp_a); - at[i].if_index = netsnmp_access_interface_index_find(ifname); - - for (j=0,tok=strtok(mac, ":"); tok != NULL; tok=strtok(NULL, ":"),j++) { - at[i].at_enaddr[j] = strtol(tok, NULL, 16); - } - at[i].at_enaddr_len = j; - i++; - } - arptab_size = i; - - fclose(in); - time(&tm); -#endif /* linux */ -#else /* NETSNMP_CAN_USE_SYSCTL */ - - int mib[6]; - size_t needed; - - mib[0] = CTL_NET; - mib[1] = PF_ROUTE; - mib[2] = 0; - mib[3] = AF_INET; - mib[4] = NET_RT_FLAGS; -#if defined RTF_LLINFO - mib[5] = RTF_LLINFO; -#else - mib[5] = 0; -#endif - - if (at) - free(at); - rtnext = lim = at = 0; - - if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) - snmp_log_perror("route-sysctl-estimate"); - else { - if ((at = malloc(needed ? needed : 1)) == NULL) - snmp_log_perror("malloc"); - else { - if (sysctl(mib, 6, at, &needed, NULL, 0) < 0) - snmp_log_perror("actual retrieval of routing table"); - else { - lim = at + needed; - rtnext = at; - } - } - } - -#endif /* NETSNMP_CAN_USE_SYSCTL */ -} - -#ifdef ARP_SCAN_FOUR_ARGUMENTS -static int -ARP_Scan_Next(in_addr_t * IPAddr, char *PhysAddr, int *PhysAddrLen, - u_long * ifType, u_short * ifIndex) -#else -static int -ARP_Scan_Next(in_addr_t * IPAddr, char *PhysAddr, int *PhysAddrLen, - u_long * ifType) -#endif -{ -#ifndef NETSNMP_CAN_USE_SYSCTL -#ifdef linux - if (arptab_current < arptab_size) { - /* - * copy values - */ - *IPAddr = at[arptab_current].at_iaddr.s_addr; - *ifType = - (at[arptab_current]. - at_flags & ATF_PERM) ? 4 /*static */ : 3 /*dynamic */ ; - *ifIndex = at[arptab_current].if_index; - memcpy(PhysAddr, &at[arptab_current].at_enaddr, - sizeof(at[arptab_current].at_enaddr)); - *PhysAddrLen = at[arptab_current].at_enaddr_len; - - /* - * increment to point next entry - */ - arptab_current++; - /* - * return success - */ - return (1); - } -#elif defined(hpux11) - if (arptab_current < arptab_size) { - /* - * copy values - */ - *IPAddr = at[arptab_current].NetAddr; - memcpy(PhysAddr, at[arptab_current].PhysAddr.o_bytes, - at[arptab_current].PhysAddr.o_length); - *ifType = at[arptab_current].Type; - *ifIndex = at[arptab_current].IfIndex; - *PhysAddrLen = at[arptab_current].PhysAddr.o_length; - /* - * increment to point next entry - */ - arptab_current++; - /* - * return success - */ - return (1); - } -#elif !defined(ARP_SCAN_FOUR_ARGUMENTS) || defined(hpux) - register struct arptab *atab; - - while (arptab_current < arptab_size) { -#ifdef HAVE_STRUCT_ARPHD_AT_NEXT - /* - * The arp table is an array of linked lists of arptab entries. - * Unused slots have pointers back to the array entry itself - */ - - if (at_ptr == (auto_nlist_value(ARPTAB_SYMBOL) + - arptab_current * sizeof(struct arphd))) { - /* - * Usused - */ - arptab_current++; - at_ptr = at[arptab_current].at_next; - continue; - } - - if (!NETSNMP_KLOOKUP(at_ptr, (char *) &at_entry, sizeof(struct arptab))) { - DEBUGMSGTL(("mibII/at:ARP_Scan_Next", "klookup failed\n")); - break; - } - - if (!NETSNMP_KLOOKUP(at_entry.at_ac, (char *) &at_com, sizeof(struct arpcom))) { - DEBUGMSGTL(("mibII/at:ARP_Scan_Next", "klookup failed\n")); - break; - } - - at_ptr = at_entry.at_next; - atab = &at_entry; - *ifIndex = at_com.ac_if.if_index; /* not strictly ARPHD */ -#else /* HAVE_STRUCT_ARPHD_AT_NEXT */ - atab = &at[arptab_current++]; -#endif /* HAVE_STRUCT_ARPHD_AT_NEXT */ - if (!(atab->at_flags & ATF_COM)) - continue; - *ifType = (atab->at_flags & ATF_PERM) ? 4 : 3; - *IPAddr = atab->at_iaddr.s_addr; -#if defined (sunV3) || defined(sparc) || defined(hpux) - memcpy(PhysAddr, (char *) &atab->at_enaddr, - sizeof(atab->at_enaddr)); - *PhysAddrLen = sizeof(atab->at_enaddr); -#endif -#if defined(mips) || defined(ibm032) - memcpy(PhysAddr, (char *) atab->at_enaddr, - sizeof(atab->at_enaddr)); - *PhysAddrLen = sizeof(atab->at_enaddr); -#endif - return (1); - } -#endif /* linux || hpux11 || !ARP_SCAN_FOUR_ARGUMENTS || hpux */ - - return 0; /* we need someone with an irix box to fix this section */ - -#else /* !NETSNMP_CAN_USE_SYSCTL */ - struct rt_msghdr *rtm; - struct sockaddr_inarp *sin; - struct sockaddr_dl *sdl; - - while (rtnext < lim) { - rtm = (struct rt_msghdr *) rtnext; - sin = (struct sockaddr_inarp *) (rtm + 1); - sdl = (struct sockaddr_dl *) (sin + 1); - rtnext += rtm->rtm_msglen; - if (sdl->sdl_alen) { -#ifdef irix6 - *IPAddr = sin->sarp_addr.s_addr; -#else - *IPAddr = sin->sin_addr.s_addr; -#endif - memcpy(PhysAddr, (char *) LLADDR(sdl), sdl->sdl_alen); - *PhysAddrLen = sdl->sdl_alen; - *ifIndex = sdl->sdl_index; - *ifType = 1; /* XXX */ - return (1); - } - } - return (0); /* "EOF" */ -#endif /* !NETSNMP_CAN_USE_SYSCTL */ -} -#endif /* solaris2 */ - -#elif defined(HAVE_IPHLPAPI_H) /* WIN32 cygwin */ -#include - -extern WriteMethod write_arp; -MIB_IPNETROW *arp_row = NULL; -int create_flag = 0; - -u_char * -var_atEntry(struct variable *vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) -{ - /* - * Address Translation table object identifier is of form: - * 1.3.6.1.2.1.3.1.?.interface.1.A.B.C.D, where A.B.C.D is IP address. - * Interface is at offset 10, - * IPADDR starts at offset 12. - * - * IP Net to Media table object identifier is of form: - * 1.3.6.1.2.1.4.22.1.?.interface.A.B.C.D, where A.B.C.D is IP address. - * Interface is at offset 10, - * IPADDR starts at offset 11. - */ - u_char *cp; - oid *op; - oid lowest[16]; - oid current[16]; - int oid_length; - int lowState = -1; /* Don't have one yet */ - PMIB_IPNETTABLE pIpNetTable = NULL; - DWORD status = NO_ERROR; - DWORD dwActualSize = 0; - UINT i; - int j; - u_char dest_addr[4]; - void *result = NULL; - static in_addr_t addr_ret; - - /* - * fill in object part of name for current (less sizeof instance part) - */ - memcpy((char *) current, (char *) vp->name, - (int) vp->namelen * sizeof(oid)); - - if (current[6] == 3) { /* AT group oid */ - oid_length = 16; - } else { /* IP NetToMedia group oid */ - oid_length = 15; - } - - status = GetIpNetTable(pIpNetTable, &dwActualSize, TRUE); - if (status == ERROR_INSUFFICIENT_BUFFER) { - pIpNetTable = malloc(dwActualSize); - if (pIpNetTable) - status = GetIpNetTable(pIpNetTable, &dwActualSize, TRUE); - } - - i = -1; - - if (status == NO_ERROR) { - for (i = 0; i < pIpNetTable->dwNumEntries; ++i) { - current[10] = pIpNetTable->table[i].dwIndex; - - - if (current[6] == 3) { /* AT group oid */ - current[11] = 1; - op = current + 12; - } else { /* IP NetToMedia group oid */ - op = current + 11; - } - cp = (u_char *) & pIpNetTable->table[i].dwAddr; - *op++ = *cp++; - *op++ = *cp++; - *op++ = *cp++; - *op++ = *cp++; - - if (exact) { - if (snmp_oid_compare(current, oid_length, name, *length) == - 0) { - memcpy((char *) lowest, (char *) current, - oid_length * sizeof(oid)); - lowState = 0; - break; /* no need to search further */ - } - } else { - if (snmp_oid_compare(current, oid_length, name, *length) > - 0) { - memcpy((char *) lowest, (char *) current, - oid_length * sizeof(oid)); - lowState = 0; - break; /* As the table is sorted, no need to search further */ - } - } - } - } - if (arp_row == NULL) { - /* - * Free allocated memory in case of SET request's FREE phase - */ - arp_row = (PMIB_IPNETROW) malloc(sizeof(MIB_IPNETROW)); - } - - if (lowState < 0 || status != NO_ERROR) { - /* - * for creation of new row, only ipNetToMediaTable case is considered - */ - if (*length == 15 || *length == 16) { - create_flag = 1; - *write_method = write_arp; - arp_row->dwIndex = name[10]; - - if (*length == 15) { /* ipNetToMediaTable */ - j = 11; - } else { /* at Table */ - - j = 12; - } - - dest_addr[0] = (u_char) name[j]; - dest_addr[1] = (u_char) name[j + 1]; - dest_addr[2] = (u_char) name[j + 2]; - dest_addr[3] = (u_char) name[j + 3]; - arp_row->dwAddr = *((DWORD *) dest_addr); - - arp_row->dwType = 4; /* Static */ - arp_row->dwPhysAddrLen = 0; - } - goto out; - } - - create_flag = 0; - memcpy((char *) name, (char *) lowest, oid_length * sizeof(oid)); - *length = oid_length; - *write_method = write_arp; - netsnmp_assert(0 <= i && i < pIpNetTable->dwNumEntries); - *arp_row = pIpNetTable->table[i]; - - switch (vp->magic) { - case IPMEDIAIFINDEX: /* also ATIFINDEX */ - *var_len = sizeof long_return; - long_return = pIpNetTable->table[i].dwIndex; - result = &long_return; - break; - case IPMEDIAPHYSADDRESS: /* also ATPHYSADDRESS */ - *var_len = pIpNetTable->table[i].dwPhysAddrLen; - memcpy(return_buf, pIpNetTable->table[i].bPhysAddr, *var_len); - result = return_buf; - break; - case IPMEDIANETADDRESS: /* also ATNETADDRESS */ - *var_len = sizeof(addr_ret); - addr_ret = pIpNetTable->table[i].dwAddr; - result = &addr_ret; - break; - case IPMEDIATYPE: - *var_len = sizeof long_return; - long_return = pIpNetTable->table[i].dwType; - result = &long_return; - break; - default: - DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_atEntry\n", - vp->magic)); - break; - } -out: - free(pIpNetTable); - return result; -} - -int -write_arp(int action, - u_char * var_val, - u_char var_val_type, - size_t var_val_len, u_char * statP, oid * name, size_t length) -{ - int var, retval = SNMP_ERR_NOERROR; - static PMIB_IPNETROW oldarp_row = NULL; - MIB_IPNETROW temp_row; - DWORD status = NO_ERROR; - - /* - * IP Net to Media table object identifier is of form: - * 1.3.6.1.2.1.4.22.1.?.interface.A.B.C.D, where A.B.C.D is IP address. - * Interface is at offset 10, - * IPADDR starts at offset 11. - */ - - if (name[6] == 3) { /* AT group oid */ - if (length != 16) { - snmp_log(LOG_ERR, "length error\n"); - return SNMP_ERR_NOCREATION; - } - } else { /* IP NetToMedia group oid */ - if (length != 15) { - snmp_log(LOG_ERR, "length error\n"); - return SNMP_ERR_NOCREATION; - } - } - - - /* - * #define for ipNetToMediaTable entries are 1 less than corresponding sub-id in MIB - * * i.e. IPMEDIAIFINDEX defined as 0, but ipNetToMediaIfIndex registered as 1 - */ - var = name[9] - 1; - switch (action) { - case RESERVE1: - switch (var) { - case IPMEDIAIFINDEX: - if (var_val_type != ASN_INTEGER) { - snmp_log(LOG_ERR, "not integer\n"); - return SNMP_ERR_WRONGTYPE; - } - if ((*((int *) var_val)) < 0) { - snmp_log(LOG_ERR, "invalid media ifIndex"); - return SNMP_ERR_WRONGVALUE; - } - if (var_val_len > sizeof(int)) { - snmp_log(LOG_ERR, "bad length\n"); - return SNMP_ERR_WRONGLENGTH; - } - break; - case IPMEDIANETADDRESS: - if (var_val_type != ASN_IPADDRESS) { - snmp_log(LOG_ERR, "not IP Address\n"); - return SNMP_ERR_WRONGTYPE; - } - if ((*((int *) var_val)) < 0) { - snmp_log(LOG_ERR, "invalid media net address"); - return SNMP_ERR_WRONGVALUE; - } - if (var_val_len > sizeof(DWORD)) { - snmp_log(LOG_ERR, "bad length\n"); - return SNMP_ERR_WRONGLENGTH; - } - break; - case IPMEDIATYPE: - if (var_val_type != ASN_INTEGER) { - snmp_log(LOG_ERR, "not integer\n"); - return SNMP_ERR_WRONGTYPE; - } - if ((*((int *) var_val)) < 1 || (*((int *) var_val)) > 4) { - snmp_log(LOG_ERR, "invalid media type"); - return SNMP_ERR_WRONGVALUE; - } - if (var_val_len > sizeof(int)) { - snmp_log(LOG_ERR, "bad length\n"); - return SNMP_ERR_WRONGLENGTH; - } - break; - case IPMEDIAPHYSADDRESS: - if (var_val_type != ASN_OCTET_STR) { - snmp_log(LOG_ERR, "not octet str"); - return SNMP_ERR_WRONGTYPE; - } - if (var_val_len != 6) { - snmp_log(LOG_ERR, "not correct ipAddress length: %d", - var_val_len); - return SNMP_ERR_WRONGLENGTH; - } - break; - default: - DEBUGMSGTL(("snmpd", "unknown sub-id %d in write_rte\n", - var + 1)); - return SNMP_ERR_NOTWRITABLE; - } - break; - case RESERVE2: - /* - * Save the old value, in case of UNDO - */ - if (oldarp_row == NULL) { - oldarp_row = (PMIB_IPNETROW) malloc(sizeof(MIB_IPNETROW)); - *oldarp_row = *arp_row; - } - break; - case ACTION: /* Perform the SET action (if reversible) */ - switch (var) { - - case IPMEDIAIFINDEX: - temp_row = *arp_row; - arp_row->dwIndex = *((int *) var_val); - /* - * In case of new entry, physical address is mandatory. - * * SetIpNetEntry will be done in COMMIT case - */ - if (!create_flag) { - if (SetIpNetEntry(arp_row) != NO_ERROR) { - arp_row->dwIndex = temp_row.dwIndex; - retval = SNMP_ERR_COMMITFAILED; - } - /* - * Don't know yet, whether change in ifIndex creates new row or not - */ - /* - * else{ - */ - /* - * temp_row.dwType = 2; - */ - /* - * if(SetIpNetEntry(&temp_row) != NO_ERROR) - */ - /* - * retval = SNMP_ERR_COMMITFAILED; - */ - /* - * } - */ - } - break; - case IPMEDIANETADDRESS: - temp_row = *arp_row; - arp_row->dwAddr = *((int *) var_val); - if (!create_flag) { - if (SetIpNetEntry(arp_row) != NO_ERROR) { - arp_row->dwAddr = oldarp_row->dwAddr; - retval = SNMP_ERR_COMMITFAILED; - } else { - temp_row.dwType = 2; - if (SetIpNetEntry(&temp_row) != NO_ERROR) { - snmp_log(LOG_ERR, - "Failed in ACTION, while deleting old row \n"); - retval = SNMP_ERR_COMMITFAILED; - } - } - } - break; - case IPMEDIATYPE: - arp_row->dwType = *((int *) var_val); - if (!create_flag) { - if (SetIpNetEntry(arp_row) != NO_ERROR) - retval = SNMP_ERR_COMMITFAILED; - } - break; - case IPMEDIAPHYSADDRESS: - memcpy(arp_row->bPhysAddr, var_val, var_val_len); - arp_row->dwPhysAddrLen = var_val_len; - if (!create_flag) { - if (SetIpNetEntry(arp_row) != NO_ERROR) - retval = SNMP_ERR_COMMITFAILED; - } - break; - default: - DEBUGMSGTL(("snmpd", "unknown sub-id %d in write_arp\n", - var + 1)); - retval = SNMP_ERR_NOTWRITABLE; - } - return retval; - case UNDO: - /* - * Reverse the SET action and free resources - */ - if (oldarp_row != NULL) { - /* - * UNDO the changes done for existing entry. - */ - if (!create_flag) { - if ((status = SetIpNetEntry(oldarp_row)) != NO_ERROR) { - snmp_log(LOG_ERR, "Error in case UNDO, status : %lu\n", - status); - retval = SNMP_ERR_UNDOFAILED; - } - } - - if (oldarp_row->dwAddr != arp_row->dwAddr) { - arp_row->dwType = 2; /*If row was added/created delete that row */ - - if ((status = SetIpNetEntry(arp_row)) != NO_ERROR) { - snmp_log(LOG_ERR, - "Error while deleting added row, status : %lu\n", - status); - retval = SNMP_ERR_UNDOFAILED; - } - } - free(oldarp_row); - oldarp_row = NULL; - free(arp_row); - arp_row = NULL; - return retval; - } - break; - case COMMIT: - /* - * if new entry and physical address specified, create new entry - */ - if (create_flag) { - if (arp_row->dwPhysAddrLen != 0) { - if ((status = CreateIpNetEntry(arp_row)) != NO_ERROR) { - snmp_log(LOG_ERR, - "Inside COMMIT: CreateIpNetEntry failed, status %lu\n", - status); - retval = SNMP_ERR_COMMITFAILED; - } - } else { - /* - * For new entry, physical address must be set. - */ - snmp_log(LOG_ERR, - "Can't create new entry without physical address\n"); - retval = SNMP_ERR_WRONGVALUE; - } - /* - * unset the create_flag, so that CreateIpNetEntry called only once - */ - create_flag = 0; - } - - case FREE: - /* - * Free any resources allocated - */ - free(oldarp_row); - oldarp_row = NULL; - free(arp_row); - arp_row = NULL; - break; - } - return retval; -} -#endif /* WIN32 cygwin */ diff --git a/agent/mibgroup/mibII/at.h b/agent/mibgroup/mibII/at.h index 5bee2eb..51ae349 100644 --- a/agent/mibgroup/mibII/at.h +++ b/agent/mibgroup/mibII/at.h @@ -6,7 +6,9 @@ #ifndef _MIBGROUP_AT_H #define _MIBGROUP_AT_H -config_arch_require(solaris2, kernel_sunos5) +#ifdef HAVE_NET_ROUTE_H +#include +#endif extern void init_at(void); extern FindVarMethod var_atEntry; @@ -21,18 +23,8 @@ config_arch_require(solaris2, kernel_sunos5) #define IPMEDIANETADDRESS 2 #define IPMEDIATYPE 3 -/* - * in case its missing: - */ -#ifndef ATF_PERM -# define ATF_PERM 0x04 -#endif /* ATF_PERM */ -#ifndef ATF_COM -# define ATF_COM 0x02 -#endif /* ATF_COM */ - /* InfiniBand uses HW addr > 6 */ -#define MAX_MAC_ADDR_LEN 32 +#define MAX_MAC_ADDR_LEN 32 #if defined(linux) || defined(irix6) /* @@ -46,4 +38,26 @@ config_arch_require(solaris2, kernel_sunos5) int if_index; }; #endif + +#if !defined(WIN32) && !defined(cygwin) && !defined(solaris2) +void ARP_Scan_Init(void); +int ARP_Scan_Next(in_addr_t *, char *, int *, u_long *, u_short *); +#endif + +#if defined(WIN32) || defined(cygwin) +config_require(mibII/data_access/at_iphlpapi); +#elif defined(solaris2) +config_require(kernel_sunos5); +config_require(mibII/data_access/at_solaris); +#elif defined(linux) +config_require(mibII/data_access/at_linux); +config_require(mibII/data_access/at_unix); +#elif defined(HAVE_SYS_SYSCTL_H) && (defined(RTF_LLINFO) || defined(RTF_LLDATA)) +config_require(mibII/data_access/at_sysctl); +config_require(mibII/data_access/at_unix); +#elif defined(HAVE_NLIST_H) +config_require(mibII/data_access/at_nlist); +config_require(mibII/data_access/at_unix); +#endif + #endif /* _MIBGROUP_AT_H */ diff --git a/agent/mibgroup/mibII/data_access/at_hpux.c b/agent/mibgroup/mibII/data_access/at_hpux.c new file mode 100644 index 0000000..5ece8e3 --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_hpux.c @@ -0,0 +1,165 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include "../at.h" +#ifdef HAVE_STRING_H +#include +#else +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) +#define _KERNEL 1 +#define _I_DEFINED_KERNEL +#endif +#include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef _I_DEFINED_KERNEL +#undef _KERNEL +#endif + +#ifdef HAVE_NETINET_IF_ETHER_H +#include +#endif +#ifdef HAVE_INET_MIB2_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_SYSCTL_H +#include +#endif +#ifdef HAVE_NET_IF_DL_H +#ifndef dynix +#include +#else +#include +#endif +#endif +#ifdef HAVE_SYS_STREAM_H +#include +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif +#ifdef solaris2 +#include "kernel_sunos5.h" +#endif + +#ifdef hpux11 +#include +#include +#endif /* hpux11 */ + +static int arptab_size, arptab_current; +static mib_ipNetToMediaEnt *at; + +void +ARP_Scan_Init(void) +{ + int fd; + struct nmparms p; + int val; + unsigned int ulen; + int ret; + + if (at) + free(at); + at = (mib_ipNetToMediaEnt *) 0; + arptab_size = 0; + + if ((fd = open_mib("/dev/ip", O_RDONLY, 0, NM_ASYNC_OFF)) >= 0) { + p.objid = ID_ipNetToMediaTableNum; + p.buffer = (void *) &val; + ulen = sizeof(int); + p.len = &ulen; + if ((ret = get_mib_info(fd, &p)) == 0) + arptab_size = val; + + if (arptab_size > 0) { + ulen = (unsigned) arptab_size *sizeof(mib_ipNetToMediaEnt); + at = (mib_ipNetToMediaEnt *) malloc(ulen); + memset(at, 0, ulen); + p.objid = ID_ipNetToMediaTable; + p.buffer = (void *) at; + p.len = &ulen; + if ((ret = get_mib_info(fd, &p)) < 0) + arptab_size = 0; + else + arptab_size = *p.len / sizeof(mib_ipNetToMediaEnt); + } + + close_mib(fd); + } + + arptab_current = 0; +} + +int +ARP_Scan_Next(in_addr_t * IPAddr, char *PhysAddr, int *PhysAddrLen, + u_long * ifType, u_short * ifIndex) +{ + *ifIndex = 0; + + if (arptab_current < arptab_size) { + /* + * copy values + */ + *IPAddr = at[arptab_current].NetAddr; + memcpy(PhysAddr, at[arptab_current].PhysAddr.o_bytes, + at[arptab_current].PhysAddr.o_length); + *ifType = at[arptab_current].Type; + *ifIndex = at[arptab_current].IfIndex; + *PhysAddrLen = at[arptab_current].PhysAddr.o_length; + /* + * increment to point next entry + */ + arptab_current++; + /* + * return success + */ + return (1); + } +} diff --git a/agent/mibgroup/mibII/data_access/at_iphlpapi.c b/agent/mibgroup/mibII/data_access/at_iphlpapi.c new file mode 100644 index 0000000..3fe0060 --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_iphlpapi.c @@ -0,0 +1,448 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include "../at.h" +#if defined(cygwin) +#include +#endif +#if defined(cygwin) || defined(mingw32) +#include +#endif +#include + +static WriteMethod write_arp; +MIB_IPNETROW *arp_row = NULL; +static int create_flag; + +u_char * +var_atEntry(struct variable *vp, + oid * name, + size_t * length, + int exact, size_t * var_len, WriteMethod ** write_method) +{ + /* + * Address Translation table object identifier is of form: + * 1.3.6.1.2.1.3.1.?.interface.1.A.B.C.D, where A.B.C.D is IP address. + * Interface is at offset 10, + * IPADDR starts at offset 12. + * + * IP Net to Media table object identifier is of form: + * 1.3.6.1.2.1.4.22.1.?.interface.A.B.C.D, where A.B.C.D is IP address. + * Interface is at offset 10, + * IPADDR starts at offset 11. + */ + u_char *cp; + oid *op; + oid lowest[16]; + oid current[16]; + int oid_length; + int lowState = -1; /* Don't have one yet */ + PMIB_IPNETTABLE pIpNetTable = NULL; + DWORD status = NO_ERROR; + DWORD dwActualSize = 0; + UINT i; + int j; + u_char dest_addr[4]; + void *result = NULL; + static in_addr_t addr_ret; + + /* + * fill in object part of name for current (less sizeof instance part) + */ + memcpy((char *) current, (char *) vp->name, + (int) vp->namelen * sizeof(oid)); + + if (current[6] == 3) { /* AT group oid */ + oid_length = 16; + } else { /* IP NetToMedia group oid */ + oid_length = 15; + } + + status = GetIpNetTable(pIpNetTable, &dwActualSize, TRUE); + if (status == ERROR_INSUFFICIENT_BUFFER) { + pIpNetTable = malloc(dwActualSize); + if (pIpNetTable) + status = GetIpNetTable(pIpNetTable, &dwActualSize, TRUE); + } + + i = -1; + + if (status == NO_ERROR) { + for (i = 0; i < pIpNetTable->dwNumEntries; ++i) { + current[10] = pIpNetTable->table[i].dwIndex; + + + if (current[6] == 3) { /* AT group oid */ + current[11] = 1; + op = current + 12; + } else { /* IP NetToMedia group oid */ + op = current + 11; + } + cp = (u_char *) & pIpNetTable->table[i].dwAddr; + *op++ = *cp++; + *op++ = *cp++; + *op++ = *cp++; + *op++ = *cp++; + + if (exact) { + if (snmp_oid_compare(current, oid_length, name, *length) == + 0) { + memcpy((char *) lowest, (char *) current, + oid_length * sizeof(oid)); + lowState = 0; + break; /* no need to search further */ + } + } else { + if (snmp_oid_compare(current, oid_length, name, *length) > + 0) { + memcpy((char *) lowest, (char *) current, + oid_length * sizeof(oid)); + lowState = 0; + break; /* As the table is sorted, no need to search further */ + } + } + } + } + if (arp_row == NULL) { + /* + * Free allocated memory in case of SET request's FREE phase + */ + arp_row = (PMIB_IPNETROW) malloc(sizeof(MIB_IPNETROW)); + } + + if (lowState < 0 || status != NO_ERROR) { + /* + * for creation of new row, only ipNetToMediaTable case is considered + */ + if (*length == 15 || *length == 16) { + create_flag = 1; + *write_method = write_arp; + arp_row->dwIndex = name[10]; + + if (*length == 15) { /* ipNetToMediaTable */ + j = 11; + } else { /* at Table */ + + j = 12; + } + + dest_addr[0] = (u_char) name[j]; + dest_addr[1] = (u_char) name[j + 1]; + dest_addr[2] = (u_char) name[j + 2]; + dest_addr[3] = (u_char) name[j + 3]; + arp_row->dwAddr = *((DWORD *) dest_addr); + + arp_row->dwType = 4; /* Static */ + arp_row->dwPhysAddrLen = 0; + } + goto out; + } + + create_flag = 0; + memcpy((char *) name, (char *) lowest, oid_length * sizeof(oid)); + *length = oid_length; + *write_method = write_arp; + netsnmp_assert(i < pIpNetTable->dwNumEntries); + *arp_row = pIpNetTable->table[i]; + + switch (vp->magic) { + case IPMEDIAIFINDEX: /* also ATIFINDEX */ + *var_len = sizeof long_return; + long_return = pIpNetTable->table[i].dwIndex; + result = &long_return; + break; + case IPMEDIAPHYSADDRESS: /* also ATPHYSADDRESS */ + *var_len = pIpNetTable->table[i].dwPhysAddrLen; + memcpy(return_buf, pIpNetTable->table[i].bPhysAddr, *var_len); + result = return_buf; + break; + case IPMEDIANETADDRESS: /* also ATNETADDRESS */ + *var_len = sizeof(addr_ret); + addr_ret = pIpNetTable->table[i].dwAddr; + result = &addr_ret; + break; + case IPMEDIATYPE: + *var_len = sizeof long_return; + long_return = pIpNetTable->table[i].dwType; + result = &long_return; + break; + default: + DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_atEntry\n", + vp->magic)); + break; + } +out: + free(pIpNetTable); + return result; +} + +int +write_arp(int action, + u_char * var_val, + u_char var_val_type, + size_t var_val_len, u_char * statP, oid * name, size_t length) +{ + int var, retval = SNMP_ERR_NOERROR; + static PMIB_IPNETROW oldarp_row = NULL; + MIB_IPNETROW temp_row; + DWORD status = NO_ERROR; + + /* + * IP Net to Media table object identifier is of form: + * 1.3.6.1.2.1.4.22.1.?.interface.A.B.C.D, where A.B.C.D is IP address. + * Interface is at offset 10, + * IPADDR starts at offset 11. + */ + + if (name[6] == 3) { /* AT group oid */ + if (length != 16) { + snmp_log(LOG_ERR, "length error\n"); + return SNMP_ERR_NOCREATION; + } + } else { /* IP NetToMedia group oid */ + if (length != 15) { + snmp_log(LOG_ERR, "length error\n"); + return SNMP_ERR_NOCREATION; + } + } + + + /* + * #define for ipNetToMediaTable entries are 1 less than corresponding sub-id in MIB + * * i.e. IPMEDIAIFINDEX defined as 0, but ipNetToMediaIfIndex registered as 1 + */ + var = name[9] - 1; + switch (action) { + case RESERVE1: + switch (var) { + case IPMEDIAIFINDEX: + if (var_val_type != ASN_INTEGER) { + snmp_log(LOG_ERR, "not integer\n"); + return SNMP_ERR_WRONGTYPE; + } + if ((*((int *) var_val)) < 0) { + snmp_log(LOG_ERR, "invalid media ifIndex"); + return SNMP_ERR_WRONGVALUE; + } + if (var_val_len > sizeof(int)) { + snmp_log(LOG_ERR, "bad length\n"); + return SNMP_ERR_WRONGLENGTH; + } + break; + case IPMEDIANETADDRESS: + if (var_val_type != ASN_IPADDRESS) { + snmp_log(LOG_ERR, "not IP Address\n"); + return SNMP_ERR_WRONGTYPE; + } + if ((*((int *) var_val)) < 0) { + snmp_log(LOG_ERR, "invalid media net address"); + return SNMP_ERR_WRONGVALUE; + } + if (var_val_len > sizeof(DWORD)) { + snmp_log(LOG_ERR, "bad length\n"); + return SNMP_ERR_WRONGLENGTH; + } + break; + case IPMEDIATYPE: + if (var_val_type != ASN_INTEGER) { + snmp_log(LOG_ERR, "not integer\n"); + return SNMP_ERR_WRONGTYPE; + } + if ((*((int *) var_val)) < 1 || (*((int *) var_val)) > 4) { + snmp_log(LOG_ERR, "invalid media type"); + return SNMP_ERR_WRONGVALUE; + } + if (var_val_len > sizeof(int)) { + snmp_log(LOG_ERR, "bad length\n"); + return SNMP_ERR_WRONGLENGTH; + } + break; + case IPMEDIAPHYSADDRESS: + if (var_val_type != ASN_OCTET_STR) { + snmp_log(LOG_ERR, "not octet str"); + return SNMP_ERR_WRONGTYPE; + } + if (var_val_len != 6) { + snmp_log(LOG_ERR, + "incorrect ipAddress length %" NETSNMP_PRIz "d", + var_val_len); + return SNMP_ERR_WRONGLENGTH; + } + break; + default: + DEBUGMSGTL(("snmpd", "unknown sub-id %d in write_rte\n", + var + 1)); + return SNMP_ERR_NOTWRITABLE; + } + break; + case RESERVE2: + /* + * Save the old value, in case of UNDO + */ + if (oldarp_row == NULL) { + oldarp_row = (PMIB_IPNETROW) malloc(sizeof(MIB_IPNETROW)); + *oldarp_row = *arp_row; + } + break; + case ACTION: /* Perform the SET action (if reversible) */ + switch (var) { + + case IPMEDIAIFINDEX: + temp_row = *arp_row; + arp_row->dwIndex = *((int *) var_val); + /* + * In case of new entry, physical address is mandatory. + * * SetIpNetEntry will be done in COMMIT case + */ + if (!create_flag) { + if (SetIpNetEntry(arp_row) != NO_ERROR) { + arp_row->dwIndex = temp_row.dwIndex; + retval = SNMP_ERR_COMMITFAILED; + } + /* + * Don't know yet, whether change in ifIndex creates new row or not + */ + /* + * else{ + */ + /* + * temp_row.dwType = 2; + */ + /* + * if(SetIpNetEntry(&temp_row) != NO_ERROR) + */ + /* + * retval = SNMP_ERR_COMMITFAILED; + */ + /* + * } + */ + } + break; + case IPMEDIANETADDRESS: + temp_row = *arp_row; + arp_row->dwAddr = *((int *) var_val); + if (!create_flag) { + if (SetIpNetEntry(arp_row) != NO_ERROR) { + arp_row->dwAddr = oldarp_row->dwAddr; + retval = SNMP_ERR_COMMITFAILED; + } else { + temp_row.dwType = 2; + if (SetIpNetEntry(&temp_row) != NO_ERROR) { + snmp_log(LOG_ERR, + "Failed in ACTION, while deleting old row \n"); + retval = SNMP_ERR_COMMITFAILED; + } + } + } + break; + case IPMEDIATYPE: + arp_row->dwType = *((int *) var_val); + if (!create_flag) { + if (SetIpNetEntry(arp_row) != NO_ERROR) + retval = SNMP_ERR_COMMITFAILED; + } + break; + case IPMEDIAPHYSADDRESS: + memcpy(arp_row->bPhysAddr, var_val, var_val_len); + arp_row->dwPhysAddrLen = var_val_len; + if (!create_flag) { + if (SetIpNetEntry(arp_row) != NO_ERROR) + retval = SNMP_ERR_COMMITFAILED; + } + break; + default: + DEBUGMSGTL(("snmpd", "unknown sub-id %d in write_arp\n", + var + 1)); + retval = SNMP_ERR_NOTWRITABLE; + } + return retval; + case UNDO: + /* + * Reverse the SET action and free resources + */ + if (oldarp_row != NULL) { + /* + * UNDO the changes done for existing entry. + */ + if (!create_flag) { + if ((status = SetIpNetEntry(oldarp_row)) != NO_ERROR) { + snmp_log(LOG_ERR, "Error in case UNDO, status : %u\n", + (unsigned int)status); + retval = SNMP_ERR_UNDOFAILED; + } + } + + if (oldarp_row->dwAddr != arp_row->dwAddr) { + arp_row->dwType = 2; /*If row was added/created delete that row */ + + if ((status = SetIpNetEntry(arp_row)) != NO_ERROR) { + snmp_log(LOG_ERR, + "Error while deleting added row, status : %u\n", + (unsigned int)status); + retval = SNMP_ERR_UNDOFAILED; + } + } + free(oldarp_row); + oldarp_row = NULL; + free(arp_row); + arp_row = NULL; + return retval; + } + break; + case COMMIT: + /* + * if new entry and physical address specified, create new entry + */ + if (create_flag) { + if (arp_row->dwPhysAddrLen != 0) { + if ((status = CreateIpNetEntry(arp_row)) != NO_ERROR) { + snmp_log(LOG_ERR, + "Inside COMMIT: CreateIpNetEntry failed, status %u\n", + (unsigned int)status); + retval = SNMP_ERR_COMMITFAILED; + } + } else { + /* + * For new entry, physical address must be set. + */ + snmp_log(LOG_ERR, + "Can't create new entry without physical address\n"); + retval = SNMP_ERR_WRONGVALUE; + } + /* + * unset the create_flag, so that CreateIpNetEntry called only once + */ + create_flag = 0; + } + /* FALL THROUGH */ + + case FREE: + /* + * Free any resources allocated + */ + free(oldarp_row); + oldarp_row = NULL; + free(arp_row); + arp_row = NULL; + break; + } + return retval; +} diff --git a/agent/mibgroup/mibII/data_access/at_linux.c b/agent/mibgroup/mibII/data_access/at_linux.c new file mode 100644 index 0000000..82462dc --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_linux.c @@ -0,0 +1,146 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include "../at.h" +#include + +/* + * at used to be allocated every time we needed to look at the arp cache. + * This cause us to parse /proc/net/arp twice for each request and didn't + * allow us to filter things like we'd like to. So now we use it + * semi-statically. We initialize it to size 0 and if we need more room + * we realloc room for ARP_CACHE_INCR more entries in the table. + * We never release what we've taken . . . + */ +#define ARP_CACHE_INCR 1024 + +static int arptab_size, arptab_current; +static struct arptab *at; + +void +ARP_Scan_Init(void) +{ + static time_t tm = 0; /* Time of last scan */ + FILE *in; + int i, j; + char line[128]; + int za, zb, zc, zd; + char ifname[21]; + char mac[3*MAX_MAC_ADDR_LEN+1]; + char *tok; + + arptab_current = 0; /* Anytime this is called we need to reset 'current' */ + + if (time(NULL) < tm + 1) { /*Our cool one second cache implementation :-) */ + return; + } + + in = fopen("/proc/net/arp", "r"); + if (!in) { + snmp_log_perror("mibII/at: Cannot open /proc/net/arp"); + arptab_size = 0; + return; + } + + /* + * Get rid of the header line + */ + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), in)); + + i = 0; + while (fgets(line, sizeof(line), in)) { + static int arptab_curr_max_size; + u_long tmp_a; + unsigned int tmp_flags; + + if (i >= arptab_curr_max_size) { + struct arptab *newtab = (struct arptab *) + realloc(at, (sizeof(struct arptab) * + (arptab_curr_max_size + ARP_CACHE_INCR))); + if (newtab == NULL) { + snmp_log(LOG_ERR, + "Error allocating more space for arpcache. " + "Cache will continue to be limited to %d entries", + arptab_curr_max_size); + newtab = at; + break; + } else { + arptab_curr_max_size += ARP_CACHE_INCR; + at = newtab; + } + } + if (7 != sscanf(line, "%d.%d.%d.%d 0x%*x 0x%x %s %*[^ ] %20s\n", + &za, &zb, &zc, &zd, &tmp_flags, mac, ifname)) { + snmp_log(LOG_ERR, "Bad line in /proc/net/arp: %s", line); + continue; + } + /* + * Invalidated entries have their flag set to 0. + * * We want to ignore them + */ + if (tmp_flags == 0) { + continue; + } + ifname[sizeof(ifname)-1] = 0; /* make sure name is null terminated */ + at[i].at_flags = tmp_flags; + tmp_a = ((u_long) za << 24) | + ((u_long) zb << 16) | ((u_long) zc << 8) | ((u_long) zd); + at[i].at_iaddr.s_addr = htonl(tmp_a); + at[i].if_index = netsnmp_access_interface_index_find(ifname); + + for (j=0,tok=strtok(mac, ":"); tok != NULL; tok=strtok(NULL, ":"),j++) { + at[i].at_enaddr[j] = strtol(tok, NULL, 16); + } + at[i].at_enaddr_len = j; + i++; + } + arptab_size = i; + + fclose(in); + time(&tm); +} + +int +ARP_Scan_Next(in_addr_t * IPAddr, char *PhysAddr, int *PhysAddrLen, + u_long * ifType, u_short * ifIndex) +{ + if (arptab_current >= arptab_size) + return 0; + + /* + * copy values + */ + *IPAddr = at[arptab_current].at_iaddr.s_addr; + *ifType = at[arptab_current].at_flags & ATF_PERM ? + 4 /*static */ : 3 /*dynamic */; + *ifIndex = at[arptab_current].if_index; + memcpy(PhysAddr, &at[arptab_current].at_enaddr, + sizeof(at[arptab_current].at_enaddr)); + *PhysAddrLen = at[arptab_current].at_enaddr_len; + + /* + * increment to point next entry + */ + arptab_current++; + /* + * return success + */ + return 1; +} diff --git a/agent/mibgroup/mibII/data_access/at_nlist.c b/agent/mibgroup/mibII/data_access/at_nlist.c new file mode 100644 index 0000000..47a4e2a --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_nlist.c @@ -0,0 +1,128 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include +#include +#include "../at.h" + +#if defined(_AIX) +#define ARPTAB_SIZE_SYMBOL "arptabsize" +#define ARPTAB_SYMBOL "arptabnb" +#endif +#if defined(hpux) && !defined(hpux11) +#define ARPTAB_SYMBOL "arphd" +#define ARPTAB_SIZE_SYMBOL "arptab_nb" +#endif +#if defined(solaris) +#define ARPTAB_SYMBOL "arptab_nb" +#define ARPTAB_SIZE_SYMBOL "arphd" +#endif + +static int arptab_size, arptab_current; + +#ifdef HAVE_STRUCT_ARPHD_AT_NEXT +static struct arphd *at; +#else +static struct arptab *at; +#endif + +void +ARP_Scan_Init(void) +{ + if (!at) { +#ifdef ARPTAB_SIZE_SYMBOL + auto_nlist(ARPTAB_SIZE_SYMBOL, (char *) &arptab_size, + sizeof arptab_size); + at = malloc(arptab_size * sizeof(*at)); +#else + return; +#endif + } +#ifdef HAVE_STRUCT_ARPHD_AT_NEXT + auto_nlist(ARPTAB_SYMBOL, (char *) at, + arptab_size * sizeof(struct arphd)); + at_ptr = at[0].at_next; +#else + auto_nlist(ARPTAB_SYMBOL, (char *) at, + arptab_size * sizeof(struct arptab)); +#endif + arptab_current = 0; +} + +int +ARP_Scan_Next(in_addr_t * IPAddr, char *PhysAddr, int *PhysAddrLen, + u_long * ifType, u_short * ifIndex) +{ + register struct arptab *atab; + + *ifIndex = 0; + + while (arptab_current < arptab_size) { +#ifdef HAVE_STRUCT_ARPHD_AT_NEXT + /* + * The arp table is an array of linked lists of arptab entries. + * Unused slots have pointers back to the array entry itself + */ + + if (at_ptr == (auto_nlist_value(ARPTAB_SYMBOL) + + arptab_current * sizeof(struct arphd))) { + /* + * Usused + */ + arptab_current++; + at_ptr = at[arptab_current].at_next; + continue; + } + + if (!NETSNMP_KLOOKUP(at_ptr, (char *) &at_entry, sizeof(struct arptab))) { + DEBUGMSGTL(("mibII/at:ARP_Scan_Next", "klookup failed\n")); + break; + } + + if (!NETSNMP_KLOOKUP(at_entry.at_ac, (char *) &at_com, sizeof(struct arpcom))) { + DEBUGMSGTL(("mibII/at:ARP_Scan_Next", "klookup failed\n")); + break; + } + + at_ptr = at_entry.at_next; + atab = &at_entry; + *ifIndex = at_com.ac_if.if_index; /* not strictly ARPHD */ +#else /* HAVE_STRUCT_ARPHD_AT_NEXT */ + atab = &at[arptab_current++]; +#endif /* HAVE_STRUCT_ARPHD_AT_NEXT */ + if (!(atab->at_flags & ATF_COM)) + continue; + *ifType = (atab->at_flags & ATF_PERM) ? 4 : 3; + *IPAddr = atab->at_iaddr.s_addr; +#if defined (sunV3) || defined(sparc) || defined(hpux) + memcpy(PhysAddr, (char *) &atab->at_enaddr, + sizeof(atab->at_enaddr)); + *PhysAddrLen = sizeof(atab->at_enaddr); +#endif +#if defined(mips) || defined(ibm032) + memcpy(PhysAddr, (char *) atab->at_enaddr, + sizeof(atab->at_enaddr)); + *PhysAddrLen = sizeof(atab->at_enaddr); +#endif + return (1); + } + + return 0; +} diff --git a/agent/mibgroup/mibII/data_access/at_solaris.c b/agent/mibgroup/mibII/data_access/at_solaris.c new file mode 100644 index 0000000..a007acd --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_solaris.c @@ -0,0 +1,165 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include "kernel_sunos5.h" +#include "../at.h" + +typedef struct if_ip { + int ifIdx; + IpAddress ipAddr; +} if_ip_t; + +static int +AT_Cmp(void *addr, void *ep) +{ + mib2_ipNetToMediaEntry_t *mp = (mib2_ipNetToMediaEntry_t *) ep; + int ret = -1; + oid index; + + mp->ipNetToMediaIfIndex.o_bytes[mp->ipNetToMediaIfIndex.o_length] = '\0'; + index = netsnmp_access_interface_index_find( + mp->ipNetToMediaIfIndex.o_bytes); + DEBUGMSGTL(("mibII/at", "......... AT_Cmp %lx<>%lx %d<>%" NETSNMP_PRIo "d (%.5s)\n", + (unsigned long)mp->ipNetToMediaNetAddress, + (unsigned long)((if_ip_t *) addr)->ipAddr, + ((if_ip_t *) addr)->ifIdx, index, + mp->ipNetToMediaIfIndex.o_bytes)); + if (mp->ipNetToMediaNetAddress != ((if_ip_t *) addr)->ipAddr) + ret = 1; + else if (((if_ip_t *) addr)->ifIdx != index) + ret = 1; + else + ret = 0; + DEBUGMSGTL(("mibII/at", "......... AT_Cmp returns %d\n", ret)); + return ret; +} + +u_char * +var_atEntry(struct variable * vp, + oid * name, + size_t * length, + int exact, size_t * var_len, WriteMethod ** write_method) +{ + /* + * object identifier is of form: + * 1.3.6.1.2.1.3.1.1.1.interface.1.A.B.C.D, where A.B.C.D is IP address. + * Interface is at offset 10, + * IPADDR starts at offset 12. + */ +#define AT_MAX_NAME_LENGTH 16 +#define AT_IFINDEX_OFF 10 + u_char *cp; + oid *op; + oid lowest[AT_MAX_NAME_LENGTH]; + oid current[AT_MAX_NAME_LENGTH]; + if_ip_t NextAddr; + mib2_ipNetToMediaEntry_t entry; + static mib2_ipNetToMediaEntry_t Lowentry; + int Found = 0; + req_e req_type; + int offset, olength = 0; + static in_addr_t addr_ret; + + /* + * fill in object part of name for current (less sizeof instance part) + */ + + DEBUGMSGTL(("mibII/at", "var_atEntry: ")); + DEBUGMSGOID(("mibII/at", vp->name, vp->namelen)); + DEBUGMSG(("mibII/at", " %d\n", exact)); + + memset(&Lowentry, 0, sizeof(Lowentry)); + memcpy((char *) current, (char *) vp->name, vp->namelen * sizeof(oid)); + lowest[0] = 1024; + for (NextAddr.ipAddr = (u_long) - 1, NextAddr.ifIdx = 255, req_type = + GET_FIRST;; + NextAddr.ipAddr = entry.ipNetToMediaNetAddress, NextAddr.ifIdx = + current[AT_IFINDEX_OFF], req_type = GET_NEXT) { + if (getMibstat + (MIB_IP_NET, &entry, sizeof(mib2_ipNetToMediaEntry_t), + req_type, &AT_Cmp, &NextAddr) != 0) + break; + entry.ipNetToMediaIfIndex.o_bytes[entry.ipNetToMediaIfIndex.o_length] = '\0'; + current[AT_IFINDEX_OFF] = netsnmp_access_interface_index_find( + entry.ipNetToMediaIfIndex.o_bytes); + if (current[6] == 3) { /* AT group oid */ + current[AT_IFINDEX_OFF + 1] = 1; + offset = AT_IFINDEX_OFF + 2; + olength = AT_IFINDEX_OFF + 6; + } else { + offset = AT_IFINDEX_OFF + 1; + olength = AT_IFINDEX_OFF + 5; + } + COPY_IPADDR(cp, (u_char *) & entry.ipNetToMediaNetAddress, op, + current + offset); + if (exact) { + if (snmp_oid_compare(current, olength, name, *length) == 0) { + memcpy((char *) lowest, (char *) current, + olength * sizeof(oid)); + Lowentry = entry; + Found++; + break; /* no need to search further */ + } + } else { + if (snmp_oid_compare(current, olength, name, *length) > 0 && + (Found == 0 || + snmp_oid_compare(current, olength, lowest, olength) < 0)) { + /* + * if new one is greater than input and closer to input than + * previous lowest, and is not equal to it, save this one as the "next" one. + */ + memcpy((char *) lowest, (char *) current, + olength * sizeof(oid)); + Lowentry = entry; + Found++; + } + } + } + DEBUGMSGTL(("mibII/at", "... Found = %d\n", Found)); + if (Found == 0) + return (NULL); + memcpy((char *) name, (char *) lowest, olength * sizeof(oid)); + *length = olength; + *write_method = 0; + switch (vp->magic) { + case IPMEDIAIFINDEX: + *var_len = sizeof long_return; + Lowentry.ipNetToMediaIfIndex.o_bytes[ + Lowentry.ipNetToMediaIfIndex.o_length] = '\0'; + long_return = netsnmp_access_interface_index_find( + Lowentry.ipNetToMediaIfIndex.o_bytes); + return (u_char *) & long_return; + case IPMEDIAPHYSADDRESS: + *var_len = Lowentry.ipNetToMediaPhysAddress.o_length; + return (u_char *) Lowentry.ipNetToMediaPhysAddress.o_bytes; + case IPMEDIANETADDRESS: + *var_len = sizeof(addr_ret); + addr_ret = Lowentry.ipNetToMediaNetAddress; + return (u_char *) &addr_ret; + case IPMEDIATYPE: + *var_len = sizeof long_return; + long_return = Lowentry.ipNetToMediaType; + return (u_char *) & long_return; + default: + DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_atEntry\n", + vp->magic)); + } + return NULL; +} diff --git a/agent/mibgroup/mibII/data_access/at_sysctl.c b/agent/mibgroup/mibII/data_access/at_sysctl.c new file mode 100644 index 0000000..c9b5ad4 --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_sysctl.c @@ -0,0 +1,110 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include "../at.h" +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_DL_H +#include +#endif +#ifdef HAVE_NETINET_IF_ETHER_H +#include +#endif +#ifdef HAVE_NET_ROUTE_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_SYS_SYSCTL_H +#include +#endif + +static char *lim, *rtnext; +static char *at; + +void +ARP_Scan_Init(void) +{ + int mib[6]; + size_t needed; + + mib[0] = CTL_NET; + mib[1] = PF_ROUTE; + mib[2] = 0; + mib[3] = AF_INET; + mib[4] = NET_RT_FLAGS; +#if defined RTF_LLINFO + mib[5] = RTF_LLINFO; +#elif defined(RTF_LLDATA) + mib[5] = RTF_LLDATA; +#else + mib[5] = 0; +#endif + + if (at) + free(at); + rtnext = lim = at = 0; + + if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) + snmp_log_perror("route-sysctl-estimate"); + else { + if ((at = malloc(needed ? needed : 1)) == NULL) + snmp_log_perror("malloc"); + else { + if (sysctl(mib, 6, at, &needed, NULL, 0) < 0) + snmp_log_perror("actual retrieval of routing table"); + else { + lim = at + needed; + rtnext = at; + } + } + } +} + +int +ARP_Scan_Next(in_addr_t * IPAddr, char *PhysAddr, int *PhysAddrLen, + u_long * ifType, u_short * ifIndex) +{ + struct rt_msghdr *rtm; + struct sockaddr_inarp *sin; + struct sockaddr_dl *sdl; + + while (rtnext < lim) { + rtm = (struct rt_msghdr *) rtnext; + sin = (struct sockaddr_inarp *) (rtm + 1); + sdl = (struct sockaddr_dl *) (sin + 1); + rtnext += rtm->rtm_msglen; + if (sdl->sdl_alen) { +#ifdef irix6 + *IPAddr = sin->sarp_addr.s_addr; +#else + *IPAddr = sin->sin_addr.s_addr; +#endif + memcpy(PhysAddr, (char *) LLADDR(sdl), sdl->sdl_alen); + *PhysAddrLen = sdl->sdl_alen; + *ifIndex = sdl->sdl_index; + *ifType = 1; /* XXX */ + return 1; + } + } + return 0; /* "EOF" */ +} diff --git a/agent/mibgroup/mibII/data_access/at_unix.c b/agent/mibgroup/mibII/data_access/at_unix.c new file mode 100644 index 0000000..39c3375 --- /dev/null +++ b/agent/mibgroup/mibII/data_access/at_unix.c @@ -0,0 +1,160 @@ +/* + * Template MIB group implementation - at.c + * + */ + +/* 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. + */ + +#include +#include +#include +#include +#include "../at.h" + +/* + * var_atEntry(... + * Arguments: + * vp IN - pointer to variable entry that points here + * name IN/OUT - IN/name requested, OUT/name found + * length IN/OUT - length of IN/OUT oid's + * exact IN - TRUE if an exact match was requested + * var_len OUT - length of variable or 0 if function returned + * write_method + * + */ + +u_char * +var_atEntry(struct variable *vp, + oid * name, + size_t * length, + int exact, size_t * var_len, WriteMethod ** write_method) +{ + /* + * Address Translation table object identifier is of form: + * 1.3.6.1.2.1.3.1.1.1.interface.1.A.B.C.D, where A.B.C.D is IP address. + * Interface is at offset 10, + * IPADDR starts at offset 12. + * + * IP Net to Media table object identifier is of form: + * 1.3.6.1.2.1.4.22.1.1.1.interface.A.B.C.D, where A.B.C.D is IP address. + * Interface is at offset 10, + * IPADDR starts at offset 11. + */ + u_char *cp; + oid *op; + oid lowest[16]; + oid current[16]; + static char PhysAddr[MAX_MAC_ADDR_LEN], LowPhysAddr[MAX_MAC_ADDR_LEN]; + static int PhysAddrLen, LowPhysAddrLen; + in_addr_t Addr, LowAddr; + int foundone; + static in_addr_t addr_ret; + u_short ifIndex, lowIfIndex = 0; + u_long ifType, lowIfType = 0; + + int oid_length; + + /* + * fill in object part of name for current (less sizeof instance part) + */ + memcpy(current, vp->name, vp->namelen * sizeof(oid)); + + if (current[6] == 3) { /* AT group oid */ + oid_length = 16; + } else { /* IP NetToMedia group oid */ + oid_length = 15; + } + + LowAddr = 0; /* Don't have one yet */ + foundone = 0; + ARP_Scan_Init(); + for (;;) { + if (ARP_Scan_Next(&Addr, PhysAddr, &PhysAddrLen, &ifType, &ifIndex) == 0) + break; + current[10] = ifIndex; + + if (current[6] == 3) { /* AT group oid */ + current[11] = 1; + op = current + 12; + } else { /* IP NetToMedia group oid */ + op = current + 11; + } + cp = (u_char *) & Addr; + *op++ = *cp++; + *op++ = *cp++; + *op++ = *cp++; + *op++ = *cp++; + + if (exact) { + if (snmp_oid_compare(current, oid_length, name, *length) == 0) { + memcpy((char *) lowest, (char *) current, + oid_length * sizeof(oid)); + LowAddr = Addr; + foundone = 1; + lowIfIndex = ifIndex; + memcpy(LowPhysAddr, PhysAddr, sizeof(PhysAddr)); + LowPhysAddrLen = PhysAddrLen; + lowIfType = ifType; + break; /* no need to search further */ + } + } else { + if ((snmp_oid_compare(current, oid_length, name, *length) > 0) + && ((foundone == 0) + || + (snmp_oid_compare + (current, oid_length, lowest, oid_length) < 0))) { + /* + * if new one is greater than input and closer to input than + * previous lowest, save this one as the "next" one. + */ + memcpy(lowest, current, oid_length * sizeof(oid)); + LowAddr = Addr; + foundone = 1; + lowIfIndex = ifIndex; + memcpy(LowPhysAddr, PhysAddr, sizeof(PhysAddr)); + LowPhysAddrLen = PhysAddrLen; + lowIfType = ifType; + } + } + } + if (foundone == 0) + return NULL; + + memcpy(name, lowest, oid_length * sizeof(oid)); + *length = oid_length; + *write_method = NULL; + switch (vp->magic) { + case IPMEDIAIFINDEX: /* also ATIFINDEX */ + *var_len = sizeof long_return; + long_return = lowIfIndex ? lowIfIndex : 1; +#ifdef NETSNMP_NO_DUMMY_VALUES + if (lowIfIndex == 0) + return NULL; +#endif + return (u_char *) & long_return; + case IPMEDIAPHYSADDRESS: /* also ATPHYSADDRESS */ + *var_len = LowPhysAddrLen; + return (u_char *) LowPhysAddr; + case IPMEDIANETADDRESS: /* also ATNETADDRESS */ + *var_len = sizeof(addr_ret); + addr_ret = LowAddr; + return (u_char *) & addr_ret; + case IPMEDIATYPE: + *var_len = sizeof long_return; + long_return = lowIfType; + return (u_char *) & long_return; + default: + DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_atEntry\n", + vp->magic)); + } + return NULL; +} diff --git a/agent/mibgroup/mibII/icmp.c b/agent/mibgroup/mibII/icmp.c index be803ee..edfecf9 100644 --- a/agent/mibgroup/mibII/icmp.c +++ b/agent/mibgroup/mibII/icmp.c @@ -5,17 +5,17 @@ #include #include "mibII_common.h" -#if HAVE_NETINET_IP_ICMP_H +#ifdef HAVE_NETINET_IP_ICMP_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETINET_ICMP6_H +#ifdef HAVE_NETINET_ICMP6_H #include #endif #endif /* NETSNMP_ENABLE_IPV6 */ -#if HAVE_NETINET_ICMP_VAR_H +#ifdef HAVE_NETINET_ICMP_VAR_H #include #endif @@ -29,6 +29,7 @@ #include "util_funcs/MIB_STATS_CACHE_TIMEOUT.h" #include "icmp.h" +#include "ip.h" #ifndef MIB_STATS_CACHE_TIMEOUT #define MIB_STATS_CACHE_TIMEOUT 5 @@ -167,11 +168,6 @@ static struct icmp6_mib icmp6stat; static const oid icmp_oid[] = { SNMP_OID_MIB2, 5 }; static const oid icmp_stats_tbl_oid[] = { SNMP_OID_MIB2, 5, 29 }; static const oid icmp_msg_stats_tbl_oid[] = { SNMP_OID_MIB2, 5, 30 }; -#ifdef USING_MIBII_IP_MODULE -extern oid ip_module_oid[]; -extern int ip_module_oid_len; -extern int ip_module_count; -#endif #ifdef USES_SNMP_DESIGNED_ICMPSTAT struct icmp_stats_table_entry { @@ -641,7 +637,7 @@ init_icmp(void) netsnmp_handler_registration *table_reginfo = NULL; netsnmp_iterator_info *iinfo; netsnmp_iterator_info *msg_stats_iinfo; - netsnmp_table_registration_info *table_info; + netsnmp_table_registration_info *table_info = NULL; netsnmp_table_registration_info *msg_stats_table_info; #endif netsnmp_handler_registration *scalar_reginfo = NULL; diff --git a/agent/mibgroup/mibII/icmp.h b/agent/mibgroup/mibII/icmp.h index d07841a..6214e5d 100644 --- a/agent/mibgroup/mibII/icmp.h +++ b/agent/mibgroup/mibII/icmp.h @@ -5,25 +5,16 @@ #ifndef _MIBGROUP_ICMP_H #define _MIBGROUP_ICMP_H -config_arch_require(solaris2, kernel_sunos5) -config_arch_require(linux, mibII/kernel_linux) -config_arch_require(freebsd4, mibII/kernel_sysctl) -config_arch_require(freebsd5, mibII/kernel_sysctl) -config_arch_require(freebsd6, mibII/kernel_sysctl) -config_arch_require(freebsd7, mibII/kernel_sysctl) -config_arch_require(freebsd8, mibII/kernel_sysctl) -config_arch_require(freebsd9, mibII/kernel_sysctl) -config_arch_require(freebsd10, mibII/kernel_sysctl) -config_arch_require(netbsd, mibII/kernel_netbsd) -config_arch_require(netbsdelf, mibII/kernel_netbsd) -config_arch_require(openbsd4, mibII/kernel_sysctl) -config_arch_require(openbsd5, mibII/kernel_sysctl) -config_arch_require(dragonfly2, mibII/kernel_sysctl) -config_arch_require(dragonfly3, mibII/kernel_sysctl) -config_arch_require(darwin10, mibII/kernel_sysctl) -config_arch_require(darwin11, mibII/kernel_sysctl) -config_arch_require(darwin12, mibII/kernel_sysctl) -config_arch_require(darwin13, mibII/kernel_sysctl) +#if defined(solaris2) +config_require(kernel_sunos5); +#elif defined(linux) +config_require(mibII/kernel_linux); +#elif defined(freebsd4) || defined(openbsd4) || defined(dragonfly2) || \ + defined(darwin) +config_require(mibII/kernel_sysctl); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); +#endif #include diff --git a/agent/mibgroup/mibII/ifTable.h b/agent/mibgroup/mibII/ifTable.h index 65d155e..dcdb26b 100644 --- a/agent/mibgroup/mibII/ifTable.h +++ b/agent/mibgroup/mibII/ifTable.h @@ -3,8 +3,4 @@ * */ -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES -config_require(if-mib/ifTable) -#else -config_require(mibII/interfaces) -#endif +config_require(if-mib/ifTable); diff --git a/agent/mibgroup/mibII/interfaces.c b/agent/mibgroup/mibII/interfaces.c index 26ffebb..d0cd681 100644 --- a/agent/mibgroup/mibII/interfaces.c +++ b/agent/mibgroup/mibII/interfaces.c @@ -12,31 +12,36 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include -netsnmp_feature_provide(interface_legacy) +netsnmp_feature_provide(interface_legacy); #if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) && !defined(NETSNMP_IFNET_NEEDS_KERNEL_LATE) #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif #include @@ -44,108 +49,108 @@ netsnmp_feature_provide(interface_legacy) #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #ifndef STREAM_NEEDS_KERNEL_ISLANDS -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif #endif -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NETINET_IN_VAR_H +#ifdef HAVE_NETINET_IN_VAR_H #include #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif #ifdef STREAM_NEEDS_KERNEL_ISLANDS -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_SYS_HASHING_H +#ifdef HAVE_SYS_HASHING_H #include #endif -#if HAVE_NETINET_IN_VAR_H +#ifdef HAVE_NETINET_IN_VAR_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETINET_IP6_H +#ifdef HAVE_NETINET_IP6_H #include #endif #endif -#if HAVE_SYS_QUEUE_H +#ifdef HAVE_SYS_QUEUE_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H +#ifdef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H #include #endif #endif -#if HAVE_NETINET_IN_PCB_H +#ifdef HAVE_NETINET_IN_PCB_H #include #endif -#if HAVE_NETINET_IF_ETHER_H +#ifdef HAVE_NETINET_IF_ETHER_H #include #endif -#if HAVE_NET_IF_TYPES_H +#ifdef HAVE_NET_IF_TYPES_H #include #endif -#if HAVE_NET_IF_DL_H +#ifdef HAVE_NET_IF_DL_H #ifndef dynix #include #else #include #endif #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif -#if HAVE_IOCTLS_H +#ifdef HAVE_IOCTLS_H #include #endif @@ -161,11 +166,11 @@ netsnmp_feature_provide(interface_legacy) #include #endif /* hpux */ -#ifdef cygwin +#if defined(cygwin) || defined(mingw32) #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #if defined(freebsd3) || defined(freebsd4) || defined(freebsd5) @@ -183,7 +188,7 @@ netsnmp_feature_provide(interface_legacy) #endif /* defined(freebsd3) */ #endif /* HAVE_SYS_SYSCTL_H */ -#if HAVE_OSRELDATE_H +#ifdef HAVE_OSRELDATE_H #include #endif #ifdef NETSNMP_CAN_USE_SYSCTL @@ -287,7 +292,7 @@ init_interfaces(void) "The MIB module to describe generic objects for network interface sub-layers"); #ifndef USE_SYSCTL_IFLIST -#if HAVE_NET_IF_MIB_H +#ifdef HAVE_NET_IF_MIB_H init_interfaces_setup(); #endif #endif @@ -319,10 +324,10 @@ if_type_from_name(const char *pcch) {0, 0} /* end of list */ }; - int ii, len; + int len; register pmatch_if pm; - for (ii = 0, pm = lmatch_if; pm->mi_name; pm++) { + for (pm = lmatch_if; pm->mi_name; pm++) { len = strlen(pm->mi_name); if (0 == strncmp(pcch, pm->mi_name, len)) { return (pm->mi_type); @@ -433,8 +438,6 @@ struct small_ifaddr { struct in_addr sifa_broadcast; }; -extern const struct sockaddr *get_address(const void *, int, int); -extern const struct in_addr *get_in_address(const void *, int, int); static int Interface_Scan_By_Index(int, struct if_msghdr *, char *, struct small_ifaddr *); static int Interface_Get_Ether_By_Index(int, u_char *); @@ -618,7 +621,7 @@ var_ifEntry(struct variable *vp, if (if_ptr) long_return = if_ptr->speed; else { -#if HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE +#ifdef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE long_return = (u_long) if_msg.ifm_data.ifi_baudrate.ifs_value << if_msg.ifm_data.ifi_baudrate.ifs_log2; #else @@ -675,7 +678,7 @@ var_ifEntry(struct variable *vp, #ifdef if_odrops long_return = (u_long) if_msg.ifm_data.ifi_odrops; #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 0; @@ -689,7 +692,7 @@ var_ifEntry(struct variable *vp, long_return = 0; #else if (if_msg.ifm_data.ifi_lastchange.tv_sec == 0 && -#if STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC +#ifdef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC if_msg.ifm_data.ifi_lastchange.tv_nsec == 0 #else if_msg.ifm_data.ifi_lastchange.tv_usec == 0 @@ -703,7 +706,7 @@ var_ifEntry(struct variable *vp, ((if_msg.ifm_data.ifi_lastchange.tv_sec - starttime.tv_sec) * 100 + ( -#if STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC +#ifdef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC if_msg.ifm_data.ifi_lastchange.tv_nsec / 1000 #else if_msg.ifm_data.ifi_lastchange.tv_usec @@ -799,7 +802,7 @@ var_ifEntry(struct variable *vp, if (if_ptr) long_return = if_ptr->type; else { -#if HAVE_STRUCT_IFNET_IF_TYPE +#ifdef HAVE_STRUCT_IFNET_IF_TYPE long_return = ifnet.if_type; #else long_return = 1; /* OTHER */ @@ -814,11 +817,11 @@ var_ifEntry(struct variable *vp, if (if_ptr) long_return = if_ptr->speed; else { -#if HAVE_STRUCT_IFNET_IF_BAUDRATE +#ifdef HAVE_STRUCT_IFNET_IF_BAUDRATE long_return = ifnet.if_baudrate; -#elif HAVE_STRUCT_IFNET_IF_SPEED +#elif defined(HAVE_STRUCT_IFNET_IF_SPEED) long_return = ifnet.if_speed; -#elif HAVE_STRUCT_IFNET_IF_TYPE && defined(IFT_ETHER) +#elif defined(HAVE_STRUCT_IFNET_IF_TYPE) && defined(IFT_ETHER) if (ifnet.if_type == IFT_ETHER) long_return = 10000000; if (ifnet.if_type == IFT_P10) @@ -830,7 +833,7 @@ var_ifEntry(struct variable *vp, if (ifnet.if_type == IFT_ISDNPRIMARY) long_return = 64000 * 30; #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) 10000000; @@ -860,27 +863,33 @@ var_ifEntry(struct variable *vp, #if defined(HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC) && !(defined(freebsd2) && __FreeBSD_version < 199607) /* * XXX - SNMP's ifLastchange is time when op. status changed - * * FreeBSD's if_lastchange is time when packet was input or output - * * (at least in 2.1.0-RELEASE. Changed in later versions of the kernel?) - */ - /* * FreeBSD's if_lastchange before the 2.1.5 release is the time when - * * a packet was last input or output. In the 2.1.5 and later releases, - * * this is fixed, thus the 199607 comparison. + * a packet was last input or output. In the 2.1.5 and later releases, + * this is fixed, thus the 199607 comparison. */ if (ifnet.if_lastchange.tv_sec == 0 && - ifnet.if_lastchange.tv_usec == 0) +#ifdef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC + ifnet.if_lastchange.tv_nsec == 0 +#else + ifnet.if_lastchange.tv_usec == 0 +#endif + ) long_return = 0; else if (ifnet.if_lastchange.tv_sec < starttime.tv_sec) long_return = 0; else { long_return = (u_long) ((ifnet.if_lastchange.tv_sec - starttime.tv_sec) * 100 - + (ifnet.if_lastchange.tv_usec - - starttime.tv_usec) / 10000); + + ( +#ifdef STRUCT_IFNET_HAS_IF_LASTCHANGE_TV_NSEC + ifnet.if_lastchange.tv_nsec / 1000 +#else + ifnet.if_lastchange.tv_usec +#endif + - starttime.tv_usec) / 10000); } #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 0; /* XXX */ @@ -894,7 +903,7 @@ var_ifEntry(struct variable *vp, long_return = (u_long) ifnet.if_ibytes; #endif #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) ifnet.if_ipackets * 308; /* XXX */ @@ -907,7 +916,7 @@ var_ifEntry(struct variable *vp, #else long_return = (u_long) ifnet.if_ipackets; #endif -#if HAVE_STRUCT_IFNET_IF_IMCASTS +#ifdef HAVE_STRUCT_IFNET_IF_IMCASTS #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return -= (u_long) ifnet.if_imcasts & 0xffffffff; #else @@ -917,28 +926,28 @@ var_ifEntry(struct variable *vp, } return (u_char *) & long_return; case NETSNMP_IFINNUCASTPKTS: -#if HAVE_STRUCT_IFNET_IF_IMCASTS +#ifdef HAVE_STRUCT_IFNET_IF_IMCASTS #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return = (u_long) ifnet.if_imcasts & 0xffffffff; #else long_return = (u_long) ifnet.if_imcasts; #endif #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) 0; /* XXX */ #endif return (u_char *) & long_return; case NETSNMP_IFINDISCARDS: -#if HAVE_STRUCT_IFNET_IF_IQDROPS +#ifdef HAVE_STRUCT_IFNET_IF_IQDROPS #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return = (u_long) ifnet.if_iqdrops & 0xffffffff; #else long_return = (u_long) ifnet.if_iqdrops; #endif #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) 0; /* XXX */ @@ -952,14 +961,14 @@ var_ifEntry(struct variable *vp, #endif return (u_char *) & long_return; case NETSNMP_IFINUNKNOWNPROTOS: -#if HAVE_STRUCT_IFNET_IF_NOPROTO +#ifdef HAVE_STRUCT_IFNET_IF_NOPROTO #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return = (u_long) ifnet.if_noproto & 0xffffffff; #else long_return = (u_long) ifnet.if_noproto; #endif #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) 0; /* XXX */ @@ -973,7 +982,7 @@ var_ifEntry(struct variable *vp, long_return = (u_long) ifnet.if_obytes; #endif #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) ifnet.if_opackets * 308; /* XXX */ @@ -986,7 +995,7 @@ var_ifEntry(struct variable *vp, #else long_return = (u_long) ifnet.if_opackets; #endif -#if HAVE_STRUCT_IFNET_IF_OMCASTS +#ifdef HAVE_STRUCT_IFNET_IF_OMCASTS #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return -= (u_long) ifnet.if_omcasts & 0xffffffff; #else @@ -996,14 +1005,14 @@ var_ifEntry(struct variable *vp, } return (u_char *) & long_return; case NETSNMP_IFOUTNUCASTPKTS: -#if HAVE_STRUCT_IFNET_IF_OMCASTS +#ifdef HAVE_STRUCT_IFNET_IF_OMCASTS #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7) long_return = (u_long) ifnet.if_omcasts & 0xffffffff; #else long_return = (u_long) ifnet.if_omcasts; #endif #else -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = (u_long) 0; /* XXX */ @@ -1063,7 +1072,7 @@ var_ifEntry(struct variable *vp, static char Name[16]; #endif register char *cp; -#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC +#ifdef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC struct timeval now; #endif #if !defined(hpux11) @@ -1464,11 +1473,6 @@ static int saveIndex = 0; unsigned int getIfSpeed(int fd, struct ifreq ifr, unsigned int defaultspeed) { #ifdef linux - /** temporary expose internal until this module can be re-written */ - extern unsigned int - netsnmp_linux_interface_get_if_speed(int fd, const char *name, - unsigned long long defaultspeed); - return netsnmp_linux_interface_get_if_speed(fd, ifr.ifr_name, defaultspeed); #else /*!linux*/ return defaultspeed; @@ -1492,7 +1496,6 @@ Interface_Scan_Init(void) * [ OUT ] * byte pkts errs drop fifo colls carrier compressed */ -#ifdef SCNuMAX uintmax_t rec_pkt, rec_oct, rec_err, rec_drop; uintmax_t snd_pkt, snd_oct, snd_err, snd_drop, coll; const char *scan_line_2_2 = @@ -1504,14 +1507,6 @@ Interface_Scan_Init(void) "%" SCNuMAX " %" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %" SCNuMAX " %" SCNuMAX " %*" SCNuMAX " %*" SCNuMAX " %" SCNuMAX; -#else - unsigned long rec_pkt, rec_oct, rec_err, rec_drop; - unsigned long snd_pkt, snd_oct, snd_err, snd_drop, coll; - const char *scan_line_2_2 = - "%lu %lu %lu %lu %*lu %*lu %*lu %*lu %lu %lu %lu %lu %*lu %lu"; - const char *scan_line_2_0 = - "%lu %lu %*lu %*lu %*lu %lu %lu %*lu %*lu %lu"; -#endif const char *scan_line_to_use; struct timeval et; /* elapsed time */ @@ -1589,9 +1584,11 @@ Interface_Scan_Init(void) while (fgets(line, sizeof(line), devin)) { struct ifnet *nnew; char *stats, *ifstart = line; + size_t len; - if (line[strlen(line) - 1] == '\n') - line[strlen(line) - 1] = '\0'; + len = strlen(line); + if (len && line[len - 1] == '\n') + line[len - 1] = '\0'; while (*ifstart && *ifstart == ' ') ifstart++; @@ -1864,7 +1861,9 @@ Interface_Scan_NextInt(int *Index, struct ifnet *Retifnet, struct in_ifaddr *dummy) { struct ifnet ifnet; +#if !defined(linux) register char *cp; +#endif while (ifnetaddr) { /* @@ -1898,7 +1897,6 @@ Interface_Scan_NextInt(int *Index, #endif saveName[sizeof(saveName) - 1] = '\0'; - cp = (char *) strchr(saveName, '\0'); #ifdef linux strlcat(saveName, ifnet.if_unit, sizeof(saveName)); #else @@ -1906,6 +1904,7 @@ Interface_Scan_NextInt(int *Index, /* this exists here just so we don't copy ifdef logic elsewhere */ netsnmp_feature_require(string_append_int); #endif + cp = (char *) strchr(saveName, '\0'); string_append_int(cp, ifnet.if_unit); #endif if (1 || strcmp(saveName, "lo0") != 0) { /* XXX */ @@ -2039,7 +2038,7 @@ Interface_Scan_NextInt(int *Index, DEBUGMSGTL(("mibII/interfaces:Interface_Scan_Next", "klookup failed\n")); break; } -#if HAVE_STRUCT_IFNET_IF_XNAME +#ifdef HAVE_STRUCT_IFNET_IF_XNAME #if defined(netbsd1) || defined(openbsd2) strlcpy(saveName, ifnet.if_xname, sizeof(saveName)); #else @@ -2374,8 +2373,6 @@ static int header_interfaces(struct variable *, oid *, size_t *, int, size_t *, WriteMethod ** write); static int header_ifEntry(struct variable *, oid *, size_t *, int, size_t *, WriteMethod ** write); -u_char *var_ifEntry(struct variable *, oid *, size_t *, int, - size_t *, WriteMethod ** write); static char *physaddrbuf; static int nphysaddrs; @@ -2673,6 +2670,11 @@ WriteMethod writeIfEntry; long admin_status = 0; long oldadmin_status = 0; +void +Interface_Scan_Init(void) +{ +} + static int header_ifEntry(struct variable *vp, oid * name, diff --git a/agent/mibgroup/mibII/interfaces.h b/agent/mibgroup/mibII/interfaces.h index c19b7a6..93281cd 100644 --- a/agent/mibgroup/mibII/interfaces.h +++ b/agent/mibgroup/mibII/interfaces.h @@ -8,24 +8,27 @@ /*********************************************************************** * configure macros */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); /* * conflicts with the new MFD rewrite */ -config_exclude(if-mib/ifTable/ifTable) +config_exclude(if-mib/ifTable/ifTable); #if !defined(WIN32) && !defined(cygwin) -config_require(if-mib/data_access/interface) +config_require(if-mib/data_access/interface); +#endif + +#if defined(solaris2) +config_require(kernel_sunos5); #endif -config_arch_require(solaris2, kernel_sunos5) /* * need get_address in var_route for some platforms (USE_SYSCTL_IFLIST). * Not sure if that can be translated into a config_arch_require, so be * indiscriminate for now. */ -config_require(mibII/var_route) +config_require(mibII/var_route); /*********************************************************************** */ diff --git a/agent/mibgroup/mibII/ip.c b/agent/mibgroup/mibII/ip.c index f39d322..8daa462 100644 --- a/agent/mibgroup/mibII/ip.c +++ b/agent/mibgroup/mibII/ip.c @@ -6,13 +6,13 @@ #include #include "mibII_common.h" -#if HAVE_SYS_HASHING_H +#ifdef HAVE_SYS_HASHING_H #include #endif -#if HAVE_NETINET_IN_VAR_H +#ifdef HAVE_NETINET_IN_VAR_H #include #endif -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif @@ -20,6 +20,7 @@ #include #include #include +#include #include "util_funcs/MIB_STATS_CACHE_TIMEOUT.h" #include "ip.h" @@ -59,9 +60,6 @@ perfstat_id_t ps_name; * *********************/ -extern void init_routes(void); - - /* * define the structure we're going to ask the agent to register our * information at @@ -250,6 +248,13 @@ long ipTTL, oldipTTL; #define USES_TRADITIONAL_IPSTAT #endif +#ifdef IP_NSTATS +typedef struct ipstat { + uint64_t st[IP_NSTATS]; +}; +#define IP_STAT_STRUCTURE struct ipstat +#endif + #ifdef dragonfly #define IP_STAT_STRUCTURE struct ip_stats #define USES_TRADITIONAL_IPSTAT @@ -410,7 +415,7 @@ ip_handler(netsnmp_mib_handler *handler, ret_value = ipstat.ips_forward; break; case IPINUNKNOWNPROTOS: -#if HAVE_STRUCT_IPSTAT_IPS_NOPROTO +#ifdef HAVE_STRUCT_IPSTAT_IPS_NOPROTO ret_value = ipstat.ips_noproto; break; #else @@ -418,7 +423,7 @@ ip_handler(netsnmp_mib_handler *handler, continue; #endif case IPINDISCARDS: -#if HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED +#ifdef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED ret_value = ipstat.ips_fragdropped; /* ?? */ break; #else @@ -426,7 +431,7 @@ ip_handler(netsnmp_mib_handler *handler, continue; #endif case IPINDELIVERS: -#if HAVE_STRUCT_IPSTAT_IPS_DELIVERED +#ifdef HAVE_STRUCT_IPSTAT_IPS_DELIVERED ret_value = ipstat.ips_delivered & 0xffffffff; break; #else @@ -434,7 +439,7 @@ ip_handler(netsnmp_mib_handler *handler, continue; #endif case IPOUTREQUESTS: -#if HAVE_STRUCT_IPSTAT_IPS_LOCALOUT +#ifdef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT ret_value = ipstat.ips_localout & 0xffffffff; break; #else @@ -442,7 +447,7 @@ ip_handler(netsnmp_mib_handler *handler, continue; #endif case IPOUTDISCARDS: -#if HAVE_STRUCT_IPSTAT_IPS_ODROPPED +#ifdef HAVE_STRUCT_IPSTAT_IPS_ODROPPED ret_value = ipstat.ips_odropped; break; #else @@ -458,14 +463,14 @@ ip_handler(netsnmp_mib_handler *handler, netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); continue; case IPREASMTIMEOUT: - ret_value = IPFRAGTTL; + ret_value = netsnmp_arch_ip_scalars_ipReasmTimeout_get(); type = ASN_INTEGER; break; case IPREASMREQDS: ret_value = ipstat.ips_fragments; break; case IPREASMOKS: -#if HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED +#ifdef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED ret_value = ipstat.ips_reassembled; break; #else @@ -476,7 +481,7 @@ ip_handler(netsnmp_mib_handler *handler, ret_value = ipstat.ips_fragdropped + ipstat.ips_fragtimeout; break; case IPFRAGOKS: -#if HAVE_STRUCT_IPSTAT_IPS_FRAGMENTED +#ifdef HAVE_STRUCT_IPSTAT_IPS_FRAGMENTED ret_value = ipstat.ips_fragments; break; #else /* XXX */ @@ -485,7 +490,7 @@ ip_handler(netsnmp_mib_handler *handler, break; #endif case IPFRAGFAILS: -#if HAVE_STRUCT_IPSTAT_IPS_CANTFRAG +#ifdef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG ret_value = ipstat.ips_cantfrag; break; #else @@ -493,7 +498,7 @@ ip_handler(netsnmp_mib_handler *handler, continue; #endif case IPFRAGCREATES: -#if HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS +#ifdef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS ret_value = ipstat.ips_ofragments; break; #else @@ -501,7 +506,7 @@ ip_handler(netsnmp_mib_handler *handler, continue; #endif case IPROUTEDISCARDS: -#if HAVE_STRUCT_IPSTAT_IPS_NOROUTE +#ifdef HAVE_STRUCT_IPSTAT_IPS_NOROUTE ret_value = ipstat.ips_noroute; break; #else @@ -886,7 +891,7 @@ ip_load(netsnmp_cache *cache, void *vmagic) int i; static int sname[4] = { CTL_NET, PF_INET, IPPROTO_IP, 0 }; size_t len; - int magic = (int) vmagic; + int magic = (uintptr_t) vmagic; switch (magic) { case IPFORWARDING: diff --git a/agent/mibgroup/mibII/ip.h b/agent/mibgroup/mibII/ip.h index 04c5651..5537d9f 100644 --- a/agent/mibgroup/mibII/ip.h +++ b/agent/mibgroup/mibII/ip.h @@ -7,22 +7,32 @@ #define _MIBGROUP_IP_H -config_require(mibII/ifTable) -config_require(mibII/ipAddr) -config_require(mibII/at) -config_require(mibII/var_route mibII/route_write) +config_require(mibII/ifTable); +#if !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) +/* + * To do: port mibII/ipAddr and mibII/var_route to Darwin versions that do not + * export struct in_ifaddr. + */ +config_require(mibII/ipAddr); +config_require(mibII/var_route mibII/route_write); +#endif /* !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) */ +config_require(mibII/at); -config_arch_require(solaris2, kernel_sunos5) -config_arch_require(linux, mibII/kernel_linux) -config_arch_require(netbsd, mibII/kernel_netbsd) -config_arch_require(netbsd5, mibII/kernel_netbsd) -config_arch_require(netbsd6, mibII/kernel_netbsd) -config_arch_require(netbsdelf, mibII/kernel_netbsd) -config_arch_require(netbsdelf5, mibII/kernel_netbsd) +#ifdef solaris2 +config_require(kernel_sunos5); +#elif defined(linux) +config_require(mibII/kernel_linux); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); +#endif #include "var_route.h" #include "route_write.h" +extern oid ip_module_oid[]; +extern int ip_module_oid_len; +extern int ip_module_count; + extern void init_ip(void); extern Netsnmp_Node_Handler ip_handler; extern NetsnmpCacheLoad ip_load; diff --git a/agent/mibgroup/mibII/ipAddr.c b/agent/mibgroup/mibII/ipAddr.c index a4d577e..82d2b8d 100644 --- a/agent/mibgroup/mibII/ipAddr.c +++ b/agent/mibgroup/mibII/ipAddr.c @@ -21,26 +21,26 @@ #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #ifdef irix6 #define _STANDALONE 1 #endif #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif @@ -49,52 +49,52 @@ #define _KERNEL 1 #endif #endif -#if HAVE_SYS_SYSMP_H +#ifdef HAVE_SYS_SYSMP_H #include #endif -#if HAVE_SYS_TCPIPSTATS_H +#ifdef HAVE_SYS_TCPIPSTATS_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_SYS_HASHING_H +#ifdef HAVE_SYS_HASHING_H #include #endif -#if HAVE_NETINET_IN_VAR_H +#ifdef HAVE_NETINET_IN_VAR_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif @@ -115,13 +115,15 @@ #include #include "ip.h" +#include "ipAddr.h" #include "interfaces.h" -#ifdef cygwin +#if defined(cygwin) || defined(mingw32) #include +#include #endif -netsnmp_feature_require(interface_legacy) +netsnmp_feature_require(interface_legacy); /********************* * @@ -531,7 +533,6 @@ Address_Scan_Init(void) while (ifc.ifc_len >= (sizeof(struct ifreq) * num_interfaces)); ifr = ifc.ifc_req; - close(fd); } /* @@ -699,16 +700,10 @@ var_ipAddrEntry(struct variable * vp, addr_ret = Lowentry.ipAdEntAddr; return (u_char *) & addr_ret; case IPADIFINDEX: -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES Lowentry.ipAdEntIfIndex.o_bytes[Lowentry.ipAdEntIfIndex.o_length] = '\0'; long_return = netsnmp_access_interface_index_find(Lowentry. ipAdEntIfIndex.o_bytes); -#else - long_return = - Interface_Index_By_Name(Lowentry.ipAdEntIfIndex.o_bytes, - Lowentry.ipAdEntIfIndex.o_length); -#endif return (u_char *) & long_return; case IPADNETMASK: *var_len = sizeof(addr_ret); @@ -943,7 +938,7 @@ var_ipAddrEntry(struct variable *vp, return (u_char *) & long_return; case IPADREASMMAX: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #else long_return = -1; diff --git a/agent/mibgroup/mibII/ipAddr.h b/agent/mibgroup/mibII/ipAddr.h index ec69cf3..d9cbf74 100644 --- a/agent/mibgroup/mibII/ipAddr.h +++ b/agent/mibgroup/mibII/ipAddr.h @@ -6,7 +6,7 @@ #define _MIBGROUP_IPADDR_H #if !defined(NETSNMP_ENABLE_MFD_REWRITES) -config_require(mibII/ip) +config_require(mibII/ip); #endif extern FindVarMethod var_ipAddrEntry; diff --git a/agent/mibgroup/mibII/ipCidrRouteTable.c b/agent/mibgroup/mibII/ipCidrRouteTable.c index 8609bb0..9eaaecc 100644 --- a/agent/mibgroup/mibII/ipCidrRouteTable.c +++ b/agent/mibgroup/mibII/ipCidrRouteTable.c @@ -14,10 +14,10 @@ #include "var_route.h" -netsnmp_feature_require(oid_stash) -netsnmp_feature_require(get_routes) -netsnmp_feature_require(oid_stash_get_data) -netsnmp_feature_require(oid_stash_add_data) +netsnmp_feature_require(oid_stash); +netsnmp_feature_require(get_routes); +netsnmp_feature_require(oid_stash_get_data); +netsnmp_feature_require(oid_stash_add_data); static netsnmp_oid_stash_node *undoStorage; diff --git a/agent/mibgroup/mibII/ipCidrRouteTable.h b/agent/mibgroup/mibII/ipCidrRouteTable.h index 3c508af..8ce040b 100644 --- a/agent/mibgroup/mibII/ipCidrRouteTable.h +++ b/agent/mibgroup/mibII/ipCidrRouteTable.h @@ -6,10 +6,10 @@ #define IPCIDRROUTETABLE_H /** other required module components */ -config_require(mibII/ipCidrRouteTable_access) -config_require(mibII/ipCidrRouteTable_checkfns) -config_add_mib(IP-FORWARD-MIB) -config_add_mib(IANA-RTPROTO-MIB) +config_require(mibII/ipCidrRouteTable_access); +config_require(mibII/ipCidrRouteTable_checkfns); +config_add_mib(IP-FORWARD-MIB); +config_add_mib(IANA-RTPROTO-MIB); /* * function declarations diff --git a/agent/mibgroup/mibII/ipCidrRouteTable_access.c b/agent/mibgroup/mibII/ipCidrRouteTable_access.c index c905c4b..058c3ae 100644 --- a/agent/mibgroup/mibII/ipCidrRouteTable_access.c +++ b/agent/mibgroup/mibII/ipCidrRouteTable_access.c @@ -69,7 +69,7 @@ get_ipCidrRouteIfIndex(void *data_context, size_t * ret_len) { RTENTRY *ourroute = (RTENTRY *) data_context; long_ret = ourroute->rt_unit; - *ret_len = sizeof(long_ret);; + *ret_len = sizeof(long_ret); return &long_ret; } diff --git a/agent/mibgroup/mibII/ipv6.c b/agent/mibgroup/mibII/ipv6.c index 99d50e8..f44568c 100644 --- a/agent/mibgroup/mibII/ipv6.c +++ b/agent/mibgroup/mibII/ipv6.c @@ -5,40 +5,44 @@ #include #include +/* For FreeBSD */ +#define _WANT_INPCB 1 +#define _WANT_TCPCB 1 +#include +#include +#ifdef HAVE_SYS_IOCTL_H +#include +#endif #if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif -#if NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +#ifdef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES #define _KERNEL_STRUCTURES #endif -#include #include -#include -#if defined(freebsd3) || defined(darwin) -# if HAVE_SYS_SOCKETVAR_H -# include -# endif +#ifdef _I_DEFINED_KERNEL +#undef _KERNEL +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +# include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS #include #include #else -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_IOCTL_H -#include -#endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif @@ -47,17 +51,23 @@ #define _KERNEL 1 #endif #endif -#if HAVE_SYS_SYSMP_H +#ifdef HAVE_SYS_SYSMP_H #include #endif -#if HAVE_SYS_TCPIPSTATS_H +#ifdef HAVE_SYS_TCPIPSTATS_H #include #endif +#ifdef _I_DEFINED_KERNEL +#undef _KERNEL +#endif #include -#if HAVE_NET_IF_VAR_H +#ifdef _I_DEFINED_KERNEL +#define _KERNEL 1 +#endif +#ifdef HAVE_NET_IF_VAR_H #include #endif -#if HAVE_NET_IF_DL_H +#ifdef HAVE_NET_IF_DL_H #include #endif #ifdef HAVE_NET_IF_MIB_H @@ -67,70 +77,86 @@ #undef _KERNEL #endif #include -#if HAVE_SYS_HASHING_H +#ifdef HAVE_SYS_HASHING_H #include #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_NETINET6_IN6_VAR_H +#ifdef HAVE_NETINET6_IN6_VAR_H #include #endif #include -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H # include #endif -#if HAVE_NETINET6_IP6_VAR_H +#ifdef HAVE_NETINET_ICMP6_H +# include +#endif +#ifdef HAVE_NETINET6_IP6_VAR_H +# include # include #endif #include -#if defined(freebsd3) || defined(darwin) || defined(openbsd4) -# if HAVE_NETINET_IP_H -# include -# endif -# if HAVE_NETINET_IN_PCB_H -# include -# endif +#ifdef HAVE_NETINET_IP_H +# include +#endif +#ifdef HAVE_NETINET_IN_PCB_H +# include #endif -#if HAVE_NETINET6_IN6_PCB_H +#ifdef HAVE_NETINET6_IN6_PCB_H # include #endif -#if HAVE_NETINET6_TCP6_H +#ifdef HAVE_NETINET6_TCP6_H # define TCP6 #endif #ifndef TCP6 -# if HAVE_NETINET_TCP_H +# ifdef HAVE_NETINET_TCP_H # include # endif -# if HAVE_NETINET_TCP_TIMER_H +# ifdef HAVE_NETINET_TCP_TIMER_H # include # endif -# if HAVE_NETINET_TCP_VAR_H +# ifdef HAVE_NETINET_TCP_VAR_H # include # endif -# if HAVE_NETINET_TCP_FSM_H +# ifdef HAVE_NETINET_TCP_FSM_H # include # endif #endif -#if HAVE_NETINET6_TCP6_H +#ifdef HAVE_NETINET6_TCP6_H # include #endif -#if HAVE_NETINET6_TCP6_TIMER_H +#ifdef HAVE_NETINET6_TCP6_TIMER_H #include #endif -#if HAVE_NETINET6_TCP6_VAR_H +#ifdef HAVE_NETINET6_TCP6_VAR_H #include #endif -#if HAVE_NETINET6_TCP6_FSM_H +#ifdef HAVE_NETINET6_TCP6_FSM_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif #ifdef HAVE_SYSLOG_H #include #endif +#ifdef HAVE_KVM_GETFILES +#if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) +#undef HAVE_KVM_GETFILES +#endif +#endif + +#ifdef HAVE_KVM_GETFILES +#include +#include +#define _KERNEL +#include +#undef _KERNEL +#endif + #ifdef MIB_IPCOUNTER_SYMBOL #include #include @@ -144,9 +170,13 @@ #include "ipv6.h" #include "interfaces.h" -netsnmp_feature_require(linux_read_ip6_stat) +#ifdef freebsd3 +#undef in6pcb +#endif + +netsnmp_feature_require(linux_read_ip6_stat); -#if defined(netbsd1) && !defined(openbsd4) +#if defined(netbsd1) && !defined(openbsd4) && __NetBSD_Version__ < 999010400 #define inp_lport in6p_lport #define inp_fport in6p_fport #define inp_ppcb in6p_ppcb @@ -295,8 +325,8 @@ struct variable3 ipv6_variables[] = { oid ipv6_variables_oid[] = { SNMP_OID_MIB2, 55, 1 }; #if 0 config_load_mib(MIB .55 .1, 8, ipv6_variables) - config_add_mib(IPV6 - TC) - config_add_mib(IPV6 - MIB) + config_add_mib(IPV6 - TC); + config_add_mib(IPV6 - MIB); #endif struct variable3 ipv6icmp_variables[] = { {IPV6IFICMPINMSG, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, @@ -371,7 +401,7 @@ config_load_mib(MIB .55 .1, 8, ipv6_variables) oid ipv6icmp_variables_oid[] = { 1, 3, 6, 1, 2, 1, 56, 1 }; #if 0 config_load_mib(MIB .56 .1, 8, ipv6icmp_variables) - config_add_mib(IPV6 - ICMP - MIB) + config_add_mib(IPV6 - ICMP - MIB); #endif struct variable2 ipv6udp_variables[] = { {IPV6UDPIFINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, @@ -380,7 +410,7 @@ config_load_mib(MIB .56 .1, 8, ipv6icmp_variables) oid ipv6udp_variables_oid[] = { 1, 3, 6, 1, 2, 1, 7, 6 }; #if 0 config_load_mib(1.3 .6 .1 .3 .87 .1, 7, ipv6udp_variables) - config_add_mib(IPV6 - UDP - MIB) + config_add_mib(IPV6 - UDP - MIB); #endif struct variable2 ipv6tcp_variables[] = { {IPV6TCPCONNSTATE, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, @@ -389,7 +419,7 @@ config_load_mib(1.3 .6 .1 .3 .87 .1, 7, ipv6udp_variables) oid ipv6tcp_variables_oid[] = { 1, 3, 6, 1, 2, 1, 6, 16 }; #if 0 config_load_mib(1.3 .6 .1 .3 .86 .1, 7, ipv6tcp_variables) - config_add_mib(IPV6 - TCP - MIB) + config_add_mib(IPV6 - TCP - MIB); #endif void @@ -597,6 +627,43 @@ if_getindex(const char *name) /*------------------------------------------------------------*/ #ifndef linux + +#if defined(__OpenBSD__) || defined(freebsd3) + + /* + * It is not possible to use struct ifnet anymore on OpenBSD, get + * interface flags and L2 address through getifaddrs(3). + */ + +#include + +static int +if_getifflags(int ifindex, int *ifflags) +{ + const char *ifname; + struct ifaddrs *ifa0, *ifa; + int ret = -1; + + ifname = if_getname(ifindex); + if (ifname == NULL) + return ret; + + if (getifaddrs(&ifa0) != -1) { + for (ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next) { + if (strcmp(ifa->ifa_name, ifname) == 0) { + *ifflags = ifa->ifa_flags; + ret = 0; + break; + } + } + freeifaddrs(ifa0); + } + + return ret; +} + +#else + /* * KAME dependent part */ @@ -630,7 +697,9 @@ if_getifnet(int idx, struct ifnet *result) return -1; } -#if TRUST_IFLASTCHANGE /*untrustable value returned... */ +#endif /* !__OpenBSD__ */ + +#ifdef TRUST_IFLASTCHANGE /*untrustable value returned... */ #ifdef HAVE_NET_IF_MIB_H #if defined(HAVE_SYS_SYSCTL_H) && defined(CTL_NET) static int @@ -803,7 +872,7 @@ var_ifv6Entry(register struct variable * vp, p = if_getname(interface); if (p) { *var_len = strlen(p); - return p; + return (u_char *)p; } break; case IPV6IFLOWLAYER: @@ -844,6 +913,37 @@ var_ifv6Entry(register struct variable * vp, #endif case IPV6IFPHYSADDRESS: { +#if defined(__OpenBSD__) || defined(freebsd3) + struct ifaddrs *ifa0, *ifa; + static struct sockaddr_dl sdl; + char ifnam[IF_NAMESIZE]; + + if (if_indextoname(interface, ifnam) == NULL) { + *var_len = 0; + return NULL; + } + + if (getifaddrs(&ifa0) != -1) { + for (ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next) { + + if (strcmp(ifnam, ifa->ifa_name) != 0) + continue; + + if (ifa->ifa_addr == NULL) + continue; + + memcpy(&sdl, ifa->ifa_addr, sizeof(sdl)); + if (sdl.sdl_family != AF_LINK) + continue; + + freeifaddrs(ifa0); + *var_len = sdl.sdl_alen; + return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); + } + } + freeifaddrs(ifa0); + return NULL; +#else struct ifnet ifnet; struct ifaddr ifaddr; #if defined(__DragonFly__) && __DragonFly_version >= 197700 @@ -929,26 +1029,41 @@ var_ifv6Entry(register struct variable * vp, */ *var_len = 0; return NULL; +#endif /* !__OpenBSD__ */ } case IPV6IFADMSTATUS: { +#if defined(__OpenBSD__) || defined(freebsd3) + int if_flags; + if (if_getifflags(interface, &if_flags) < 0) + break; + long_return = (if_flags & IFF_RUNNING) ? 1 : 2; +#else struct ifnet ifnet; if (if_getifnet(interface, &ifnet) < 0) break; long_return = (ifnet.if_flags & IFF_RUNNING) ? 1 : 2; +#endif return (u_char *) & long_return; } case IPV6IFOPERSTATUS: { +#if defined(__OpenBSD__) || defined(freebsd3) + int if_flags; + if (if_getifflags(interface, &if_flags) < 0) + break; + long_return = (if_flags & IFF_UP) ? 1 : 2; +#else struct ifnet ifnet; if (if_getifnet(interface, &ifnet) < 0) break; long_return = (ifnet.if_flags & IFF_UP) ? 1 : 2; +#endif return (u_char *) & long_return; } -#if TRUST_IFLASTCHANGE /*untrustable value returned... */ +#ifdef TRUST_IFLASTCHANGE /*untrustable value returned... */ case IPV6IFLASTCHANGE: { struct timeval lastchange; @@ -1302,6 +1417,91 @@ var_icmpv6Entry(register struct variable * vp, #endif } +#ifdef HAVE_KVM_GETFILES + +u_char * +var_udp6(register struct variable * vp, + oid * name, + size_t * length, + int exact, size_t * var_len, WriteMethod ** write_method) +{ + oid newname[MAX_OID_LEN]; + oid savname[MAX_OID_LEN]; + int result, count, found, savnameLen; + int p, i, j; + u_char *sa, *savsa; + struct kinfo_file *udp; + + udp = kvm_getfiles(kd, KERN_FILE_BYFILE, DTYPE_SOCKET, sizeof(struct kinfo_file), &count); + found = savnameLen = 0; + memcpy(newname, vp->name, (int) vp->namelen * sizeof(oid)); + for (p = 0; p < count; p++) { + if (udp[p].so_protocol != IPPROTO_UDP || udp[p].so_family != AF_INET6) + continue; + j = vp->namelen; + sa = (u_char *)&udp[p].inp_laddru[0]; + for (i = 0; i < sizeof(struct in6_addr); i++) + newname[j++] = sa[i]; + newname[j++] = ntohs(udp[p].inp_lport); + if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)sa)) + newname[j++] = ntohs(sa[2]); + else + newname[j++] = 0; + DEBUGMSGTL(("mibII/ipv6", "var_udp6 new: %d %d ", + (int) vp->namelen, j)); + DEBUGMSGOID(("mibII/ipv6", newname, j)); + DEBUGMSG(("mibII/ipv6", " %d\n", exact)); + + result = snmp_oid_compare(name, *length, newname, j); + if (exact && result == 0) { + savnameLen = j; + memcpy(savname, newname, j * sizeof(oid)); + savsa = sa; + found++; + break; + } else if (!exact && result < 0) { + /* + * take the least greater one + */ + if (savnameLen == 0 || snmp_oid_compare(savname, savnameLen, newname, j) > 0) { + savnameLen = j; + savsa = sa; + memcpy(savname, newname, j * sizeof(oid)); + found++; + } + } + } + DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); + if (!found) + return NULL; + *length = savnameLen; + memcpy((char *) name, (char *) savname, *length * sizeof(oid)); + *write_method = 0; + *var_len = sizeof(long); /* default to 'long' results */ + +/* + * DEBUGMSGTL(("mibII/ipv6", "var_udp6 found: ")); + * DEBUGMSGOID(("mibII/ipv6", name, *length)); + * DEBUGMSG(("mibII/ipv6", " %d\n", exact)); + */ + DEBUGMSGTL(("mibII/ipv6", "magic=%d\n", vp->magic)); + switch (vp->magic) { + case IPV6UDPIFINDEX: + if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)savsa)) + long_return = ntohs(savsa[2]); + else + long_return = 0; + return (u_char *) &long_return; + default: + break; + } + ERROR_MSG(""); + + return NULL; +} + +#else + u_char * var_udp6(register struct variable * vp, oid * name, @@ -1313,7 +1513,7 @@ var_udp6(register struct variable * vp, int result; int i, j; caddr_t p; -#if defined(openbsd4) +#if defined(openbsd4) || defined(freebsd3) static struct inpcb in6pcb, savpcb; #else static struct in6pcb in6pcb, savpcb; @@ -1329,21 +1529,24 @@ var_udp6(register struct variable * vp, #elif defined(freebsd3) || defined(darwin) char *sysctl_buf; struct xinpgen *xig, *oxig; - static struct in6pcb udb6; #endif DEBUGMSGTL(("mibII/ipv6", "var_udp6: ")); DEBUGMSGOID(("mibII/ipv6", name, *length)); DEBUGMSG(("mibII/ipv6", " %d\n", exact)); -#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ +#if defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable))) return NULL; - first = p = (caddr_t)udbtable.inpt_queue.cqh_first; -#elif !defined(freebsd3) && !defined(darwin) - if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) + first = p = (caddr_t)udbtable.inpt_queue.tqh_first; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ + if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable))) return NULL; - p = (caddr_t) udb6.in6p_next; +#if defined(openbsd5) + first = p = (caddr_t)TAILQ_FIRST(&udbtable.inpt_queue); +#else + first = p = (caddr_t)udbtable.inpt_queue.cqh_first; +#endif #elif defined(dragonfly) { const char *udblist = "net.inet.udp.pcblist"; @@ -1365,6 +1568,14 @@ var_udp6(register struct variable * vp, } p = (caddr_t) ((char *) xig); /* silence compiler warning */ } +#elif !defined(freebsd3) && !defined(darwin) + { + static struct in6pcb udb6; + + if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) + return NULL; + p = (caddr_t) udb6.in6p_next; + } #else { const char *udblist = "net.inet.udp.pcblist"; @@ -1402,19 +1613,30 @@ var_udp6(register struct variable * vp, ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%p\n", p)); -#if !defined(freebsd3) && !defined(darwin) +#if defined(freebsd3) + /* To do: fill in in6pcb properly. */ + memset(&in6pcb, 0, sizeof(in6pcb)); +#elif defined(darwin) + in6pcb = ((struct xinpcb *) xig)->xi_inp; +#else if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for udb6 at %p\n", p)); found = 0; break; } -#else - in6pcb = ((struct xinpcb *) xig)->xi_inp; #endif #if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ +# if __NetBSD_Version__ < 999010400 if (in6pcb.in6p_af != AF_INET6) goto skip; +# else + if (in6pcb.in6p_pcb.inp_af != AF_INET6) + goto skip; +# endif +#elif defined(INP_ISIPV6) + if (!INP_ISIPV6(&in6pcb)) + goto skip; #elif defined(freebsd3) || defined(darwin) if (0 == (in6pcb.inp_vflag & INP_IPV6)) goto skip; @@ -1433,6 +1655,15 @@ var_udp6(register struct variable * vp, ntohs(*(uint16_t *) &in6pcb.inp_laddr6.s6_addr[2]); else newname[j++] = 0; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + for (i = 0; i < sizeof(struct in6_addr); i++) + newname[j++] = in6pcb.in6p_ip6.ip6_src.s6_addr[i]; + newname[j++] = ntohs(in6pcb.in6p_pcb.inp_lport); + if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_ip6.ip6_src)) + newname[j++] = + ntohs(*(uint16_t *) &in6pcb.in6p_ip6.ip6_src.s6_addr[2]); + else + newname[j++] = 0; #else for (i = 0; i < sizeof(struct in6_addr); i++) newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; @@ -1470,16 +1701,25 @@ var_udp6(register struct variable * vp, } skip: -#if defined(openbsd4) +#ifdef openbsd5 + p = (caddr_t)TAILQ_NEXT(&in6pcb, inp_queue); + if (p == NULL) break; +#elif defined(openbsd4) p = (caddr_t)in6pcb.inp_queue.cqe_next; if (p == first) break; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + p = (caddr_t)in6pcb.in6p_pcb.inp_queue.tqe_next; + if (p == first) break; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 + p = (caddr_t)in6pcb.in6p_queue.tqe_next; + if (p == first) break; #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ p = (caddr_t)in6pcb.in6p_queue.cqe_next; if (p == first) break; -#elif !defined(freebsd3) && !defined(darwin) - p = (caddr_t)in6pcb.in6p_next; #elif defined(__DragonFly__) xig = (struct xinpcb *) ((char *) xig + xig->xi_len); +#elif !defined(freebsd3) && !defined(darwin) + p = (caddr_t)in6pcb.in6p_next; #else xig = (struct xinpgen *) ((char *) xig + xig->xig_len); #endif @@ -1510,6 +1750,12 @@ var_udp6(register struct variable * vp, ntohs(*(uint16_t *) & in6pcb.inp_laddr6.s6_addr[2]); else long_return = 0; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_ip6.ip6_src)) + long_return = + ntohs(*(uint16_t *) & in6pcb.in6p_ip6.ip6_src.s6_addr[2]); + else + long_return = 0; #else if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) long_return = @@ -1524,6 +1770,7 @@ var_udp6(register struct variable * vp, ERROR_MSG(""); return NULL; } +#endif /* KVM_GETFILES */ #ifdef TCP6 u_char * @@ -1548,8 +1795,6 @@ var_tcp6(register struct variable * vp, #elif defined(freebsd3) || defined(darwin) char *sysctl_buf; struct xinpgen *xig, *oxig; -#else - static struct in6pcb tcb6; #endif if (!initialized) { @@ -1576,9 +1821,13 @@ var_tcp6(register struct variable * vp, return NULL; first = p = (caddr_t)tcbtable.inpt_queue.cqh_first; #elif !defined(freebsd3) && !defined(darwin) + { + static struct in6pcb tcb6; + if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) return NULL; p = (caddr_t) tcb6.in6p_next; + } #else { const char *tcblist = "net.inet.tcp.pcblist"; @@ -1627,6 +1876,9 @@ var_tcp6(register struct variable * vp, #if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ if (in6pcb.in6p_af != AF_INET6) goto skip; +#elif defined(INP_ISIPV6) + if (!INP_ISIPV6(&in6pcb)) + goto skip; #elif defined(freebsd3) || defined(darwin) if (0 == (in6pcb.inp_vflag & INP_IPV6)) goto skip; @@ -1718,6 +1970,106 @@ var_tcp6(register struct variable * vp, return NULL; } +#elif defined(HAVE_KVM_GETFILES) + +u_char * +var_tcp6(register struct variable * vp, + oid * name, + size_t * length, + int exact, size_t * var_len, WriteMethod ** write_method) +{ + oid newname[MAX_OID_LEN]; + oid savname[MAX_OID_LEN]; + int result, count, found, savnameLen, savstate; + int p, i, j; + u_char *lsa, *fsa; + struct kinfo_file *tcp; + static int tcp6statemap[16]; + static int initialized = 0; + + if (!initialized) { + tcp6statemap[TCPS_CLOSED] = 1; + tcp6statemap[TCPS_LISTEN] = 2; + tcp6statemap[TCPS_SYN_SENT] = 3; + tcp6statemap[TCPS_SYN_RECEIVED] = 4; + tcp6statemap[TCPS_ESTABLISHED] = 5; + tcp6statemap[TCPS_CLOSE_WAIT] = 8; + tcp6statemap[TCPS_FIN_WAIT_1] = 6; + tcp6statemap[TCPS_CLOSING] = 10; + tcp6statemap[TCPS_LAST_ACK] = 9; + tcp6statemap[TCPS_FIN_WAIT_2] = 7; + tcp6statemap[TCPS_TIME_WAIT] = 11; + initialized++; + } + + tcp = kvm_getfiles(kd, KERN_FILE_BYFILE, DTYPE_SOCKET, sizeof(struct kinfo_file), &count); + found = savnameLen = 0; + memcpy(newname, vp->name, (int) vp->namelen * sizeof(oid)); + for (p = 0; p < count; p++) { + if (tcp[p].so_protocol != IPPROTO_TCP || tcp[p].so_family != AF_INET6) + continue; + j = vp->namelen; + lsa = (u_char *)&tcp[p].inp_laddru[0]; + for (i = 0; i < sizeof(struct in6_addr); i++) + newname[j++] = lsa[i]; + newname[j++] = ntohs(tcp[p].inp_lport); + fsa = (u_char *)&tcp[p].inp_faddru[0]; + for (i = 0; i < sizeof(struct in6_addr); i++) + newname[j++] = fsa[i]; + newname[j++] = ntohs(tcp[p].inp_fport); + if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)lsa)) + newname[j++] = ntohs(lsa[2]); + else + newname[j++] = 0; + DEBUGMSGTL(("mibII/ipv6", "var_udp6 new: %d %d ", + (int) vp->namelen, j)); + DEBUGMSGOID(("mibII/ipv6", newname, j)); + DEBUGMSG(("mibII/ipv6", " %d\n", exact)); + + result = snmp_oid_compare(name, *length, newname, j); + if (exact && result == 0) { + savnameLen = j; + memcpy(savname, newname, j * sizeof(oid)); + savstate = tcp[p].t_state; + found++; + break; + } else if (!exact && result < 0) { + /* + * take the least greater one + */ + if (savnameLen == 0 || snmp_oid_compare(savname, savnameLen, newname, j) > 0) { + savnameLen = j; + memcpy(savname, newname, j * sizeof(oid)); + savstate = tcp[p].t_state; + found++; + } + } + } + DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); + if (!found) + return NULL; + *length = savnameLen; + memcpy((char *) name, (char *) savname, *length * sizeof(oid)); + *write_method = 0; + *var_len = sizeof(long); /* default to 'long' results */ + +/* + * DEBUGMSGTL(("mibII/ipv6", "var_udp6 found: ")); + * DEBUGMSGOID(("mibII/ipv6", name, *length)); + * DEBUGMSG(("mibII/ipv6", " %d\n", exact)); + */ + DEBUGMSGTL(("mibII/ipv6", "magic=%d\n", vp->magic)); + switch (vp->magic) { + case IPV6TCPCONNSTATE: + long_return = tcp6statemap[savstate & 0x0F]; + return (u_char *) &long_return; + default: + break; + } + ERROR_MSG(""); + return NULL; +} + #else /* ! TCP6 */ static int mapTcpState( int val) @@ -1756,7 +2108,7 @@ var_tcp6(register struct variable * vp, int result; int i, j; caddr_t p; -#if defined(openbsd4) +#if defined(openbsd4) || defined(freebsd3) static struct inpcb in6pcb, savpcb; #else static struct in6pcb in6pcb, savpcb; @@ -1773,7 +2125,6 @@ var_tcp6(register struct variable * vp, #elif defined(freebsd3) || defined(darwin) char *sysctl_buf; struct xinpgen *xig, *oxig; - static struct in6pcb tcb6; #endif DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); @@ -1783,11 +2134,13 @@ var_tcp6(register struct variable * vp, #if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable))) return NULL; +#ifdef openbsd5 + first = p = (caddr_t)TAILQ_FIRST(&tcbtable.inpt_queue); +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 + first = p = (caddr_t)tcbtable.inpt_queue.tqh_first; +#else first = p = (caddr_t)tcbtable.inpt_queue.cqh_first; -#elif !defined(freebsd3) && !defined(darwin) - if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) - return NULL; - p = (caddr_t) tcb6.in6p_next; +#endif #elif defined(dragonfly) { const char *tcblist = "net.inet.tcp.pcblist"; @@ -1809,6 +2162,14 @@ var_tcp6(register struct variable * vp, } p = (caddr_t) ((char *) xtp); /* silence compiler warning */ } +#elif !defined(freebsd3) && !defined(darwin) + { + static struct in6pcb tcb6; + + if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) + return NULL; + p = (caddr_t) tcb6.in6p_next; + } #else { const char *tcblist = "net.inet.tcp.pcblist"; @@ -1846,21 +2207,32 @@ var_tcp6(register struct variable * vp, ) { DEBUGMSGTL(("mibII/ipv6", "looping: p=%p\n", p)); -#if !defined(freebsd3) && !defined(darwin) +#if defined(freebsd3) + /* To do: fill in in6pcb properly. */ + memset(&in6pcb, 0, sizeof(in6pcb)); +#elif defined(dragonfly) + in6pcb = xtp->xt_inp; +#elif defined(darwin) + in6pcb = ((struct xinpcb *) xig)->xi_inp; +#else if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %p\n", p)); found = 0; break; } -#elif defined(dragonfly) - in6pcb = xtp->xt_inp; -#else - in6pcb = ((struct xinpcb *) xig)->xi_inp; #endif #if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ +# if __NetBSD_Version__ < 999010400 if (in6pcb.in6p_af != AF_INET6) goto skip; +# else + if (in6pcb.in6p_pcb.inp_af != AF_INET6) + goto skip; +# endif +#elif defined(INP_ISIPV6) + if (!INP_ISIPV6(&in6pcb)) + goto skip; #elif defined(freebsd3) || defined(darwin) if (0 == (in6pcb.inp_vflag & INP_IPV6)) goto skip; @@ -1881,6 +2253,18 @@ var_tcp6(register struct variable * vp, ntohs(*(uint16_t *) &in6pcb.inp_laddr6.s6_addr[2]); else newname[j++] = 0; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + for (i = 0; i < sizeof(struct in6_addr); i++) + newname[j++] = in6pcb.in6p_ip6.ip6_src.s6_addr[i]; + newname[j++] = ntohs(in6pcb.in6p_pcb.inp_lport); + for (i = 0; i < sizeof(struct in6_addr); i++) + newname[j++] = in6pcb.in6p_ip6.ip6_dst.s6_addr[i]; + newname[j++] = ntohs(in6pcb.in6p_pcb.inp_fport); + if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_ip6.ip6_src)) + newname[j++] = + ntohs(*(uint16_t *) &in6pcb.in6p_ip6.ip6_src.s6_addr[2]); + else + newname[j++] = 0; #else for (i = 0; i < sizeof(struct in6_addr); i++) newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; @@ -1901,7 +2285,11 @@ var_tcp6(register struct variable * vp, DEBUGMSG(("mibII/ipv6", " %d\n", exact)); #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ +#if defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + if (ntohs(in6pcb.in6p_pcb.inp_lport) == 0) +#else if (ntohs(in6pcb.inp_lport) == 0) +#endif goto skip; #endif result = snmp_oid_compare(name, *length, newname, j); @@ -1925,16 +2313,25 @@ var_tcp6(register struct variable * vp, } skip: -#if defined(openbsd4) +#ifdef openbsd5 + p = (caddr_t)TAILQ_NEXT(&in6pcb, inp_queue); + if (p == NULL) break; +#elif defined(openbsd4) p = (caddr_t)in6pcb.inp_queue.cqe_next; if (p == first) break; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + p = (caddr_t)in6pcb.in6p_pcb.inp_queue.tqe_next; + if (p == first) break; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 700000001 + p = (caddr_t)in6pcb.in6p_queue.tqe_next; + if (p == first) break; #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ p = (caddr_t)in6pcb.in6p_queue.cqe_next; if (p == first) break; -#elif !defined(freebsd3) && !defined(darwin) - p = (caddr_t) in6pcb.in6p_next; #elif defined(dragonfly) xtp = (struct xtcpcb *) ((char *)xtp + xtp->xt_len); +#elif !defined(freebsd3) && !defined(darwin) + p = (caddr_t) in6pcb.in6p_next; #else xig = (struct xinpgen *) ((char *) xig + xig->xig_len); #endif @@ -1948,9 +2345,15 @@ var_tcp6(register struct variable * vp, *length = savnameLen; memcpy((char *) name, (char *) savname, *length * sizeof(oid)); memcpy(&in6pcb, &savpcb, sizeof(savpcb)); +#if defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + if (!NETSNMP_KLOOKUP(in6pcb.in6p_pcb.inp_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { + DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %p\n", + in6pcb.in6p_pcb.inp_ppcb)); +#else if (!NETSNMP_KLOOKUP(in6pcb.inp_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %p\n", in6pcb.inp_ppcb)); +#endif found = 0; return NULL; } @@ -2242,12 +2645,18 @@ linux_if_nameindex(void) if_count = 0; maxidx = -1; while (!feof(f)) { - if (fscanf(f, "%*s %lx %*x %*x %*x %s", + if (fscanf(f, "%*s %lx %*x %*x %*x %255s", &if_index, if_name) != 2) continue; if (if_index == 0) continue; if_name[sizeof(if_name) - 1] = '\0'; + /* + * Large if_index values can cause the multiplication in the + * realloc() statement to overflow. Hence check if_index. + */ + if (if_index > 65536) + break; if (maxidx < 0 || maxidx < if_index) { if (last_if_count < if_index) last_if_count = if_index; diff --git a/agent/mibgroup/mibII/ipv6.h b/agent/mibgroup/mibII/ipv6.h index a377153..392b7f1 100644 --- a/agent/mibgroup/mibII/ipv6.h +++ b/agent/mibgroup/mibII/ipv6.h @@ -13,9 +13,18 @@ struct ip6_mib { }; #endif -config_require(mibII/ifTable mibII/at mibII/var_route mibII/route_write) -config_add_mib(IPV6-ICMP-MIB:IPV6-MIB:IPV6-TCP-MIB:IPV6-UDP-MIB) -config_arch_require(solaris2, kernel_sunos5) +config_require(mibII/ifTable mibII/at); +#if !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) +/* + * To do: port mibII/ipAddr and mibII/var_route to Darwin versions that do not + * export struct in_ifaddr. + */ +config_require(mibII/var_route mibII/route_write); +#endif /* !defined(darwin) || defined(HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK) */ +config_add_mib(IPV6-ICMP-MIB:IPV6-MIB:IPV6-TCP-MIB:IPV6-UDP-MIB); +#ifdef solaris2 +config_require(kernel_sunos5); +#endif #include "var_route.h" #include "route_write.h" extern void init_ipv6(void); diff --git a/agent/mibgroup/mibII/kernel_linux.c b/agent/mibgroup/mibII/kernel_linux.c index 99314df..7587ad6 100644 --- a/agent/mibgroup/mibII/kernel_linux.c +++ b/agent/mibgroup/mibII/kernel_linux.c @@ -8,14 +8,15 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif #include +#include #include "kernel_linux.h" @@ -28,27 +29,159 @@ struct tcp_mib cached_tcp_mib; struct udp_mib cached_udp_mib; struct udp6_mib cached_udp6_mib; -#define IP_STATS_LINE "Ip: %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu" -#define ICMP_STATS_LINE "Icmp: %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu" -#define ICMP_MSG_STATS_LINE "IcmpMsg: " -#define TCP_STATS_LINE "Tcp: %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu" -#define UDP_STATS_LINE "Udp: %lu %lu %lu %lu" +struct stats_descr { + const char *prefix; + const char *col_name; + void *var; + unsigned int offset; + unsigned int validity_offset; +}; + +static const struct stats_descr ipv4_snmp_stats[] = { + { "Ip:", "Forwarding", &cached_ip_mib, + offsetof(struct ip_mib, ipForwarding) }, + { "Ip:", "DefaultTTL", &cached_ip_mib, + offsetof(struct ip_mib, ipDefaultTTL) }, + { "Ip:", "InReceives", &cached_ip_mib, + offsetof(struct ip_mib, ipInReceives) }, + { "Ip:", "InHdrErrors", &cached_ip_mib, + offsetof(struct ip_mib, ipInHdrErrors) }, + { "Ip:", "InAddrErrors", &cached_ip_mib, + offsetof(struct ip_mib, ipInAddrErrors) }, + { "Ip:", "ForwDatagrams", &cached_ip_mib, + offsetof(struct ip_mib, ipForwDatagrams) }, + { "Ip:", "InUnknownProtos", &cached_ip_mib, + offsetof(struct ip_mib, ipInUnknownProtos) }, + { "Ip:", "InDiscards", &cached_ip_mib, + offsetof(struct ip_mib, ipInDiscards) }, + { "Ip:", "InDelivers", &cached_ip_mib, + offsetof(struct ip_mib, ipInDelivers) }, + { "Ip:", "OutRequests", &cached_ip_mib, + offsetof(struct ip_mib, ipOutRequests) }, + { "Ip:", "OutDiscards", &cached_ip_mib, + offsetof(struct ip_mib, ipOutDiscards) }, + { "Ip:", "OutNoRoutes", &cached_ip_mib, + offsetof(struct ip_mib, ipOutNoRoutes) }, + { "Ip:", "ReasmTimeout", &cached_ip_mib, + offsetof(struct ip_mib, ipReasmTimeout) }, + { "Ip:", "ReasmReqds", &cached_ip_mib, + offsetof(struct ip_mib, ipReasmReqds) }, + { "Ip:", "ReasmOKs", &cached_ip_mib, + offsetof(struct ip_mib, ipReasmOKs) }, + { "Ip:", "ReasmFails", &cached_ip_mib, + offsetof(struct ip_mib, ipReasmFails) }, + { "Ip:", "FragOKs", &cached_ip_mib, + offsetof(struct ip_mib, ipFragOKs) }, + { "Ip:", "FragFails", &cached_ip_mib, + offsetof(struct ip_mib, ipFragFails) }, + { "Ip:", "FragCreates", &cached_ip_mib, + offsetof(struct ip_mib, ipFragCreates) }, + + { "Icmp:", "InMsgs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInMsgs) }, + { "Icmp:", "InErrors", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInErrors) }, + { "Icmp:", "InDestUnreachs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInDestUnreachs) }, + { "Icmp:", "InTimeExcds", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInTimeExcds) }, + { "Icmp:", "InParmProbs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInParmProbs) }, + { "Icmp:", "InSrcQuenchs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInSrcQuenchs) }, + { "Icmp:", "InRedirects", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInRedirects) }, + { "Icmp:", "InEchos", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInEchos) }, + { "Icmp:", "InEchoReps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInEchoReps) }, + { "Icmp:", "InTimestamps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInTimestamps) }, + { "Icmp:", "InTimestampReps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInTimestampReps) }, + { "Icmp:", "InAddrMasks", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInAddrMasks) }, + { "Icmp:", "InAddrMaskReps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpInAddrMaskReps) }, + { "Icmp:", "OutMsgs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutMsgs) }, + { "Icmp:", "OutErrors", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutErrors) }, + { "Icmp:", "OutDestUnreachs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutDestUnreachs) }, + { "Icmp:", "OutTimeExcds", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutTimeExcds) }, + { "Icmp:", "OutParmProbs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutParmProbs) }, + { "Icmp:", "OutSrcQuenchs", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutSrcQuenchs) }, + { "Icmp:", "OutRedirects", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutRedirects) }, + { "Icmp:", "OutEchos", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutEchos) }, + { "Icmp:", "OutEchoReps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutEchoReps) }, + { "Icmp:", "OutTimestamps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutTimestamps) }, + { "Icmp:", "OutTimestampReps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutTimestampReps) }, + { "Icmp:", "OutAddrMasks", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutAddrMasks) }, + { "Icmp:", "OutAddrMaskReps", &cached_icmp_mib, + offsetof(struct icmp_mib, icmpOutAddrMaskReps) }, + + { "Tcp:", "RtoAlgorithm", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpRtoAlgorithm) }, + { "Tcp:", "RtoMin", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpRtoMin) }, + { "Tcp:", "RtoMax", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpRtoMax) }, + { "Tcp:", "MaxConn", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpMaxConn) }, + { "Tcp:", "ActiveOpens", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpActiveOpens) }, + { "Tcp:", "PassiveOpens", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpPassiveOpens) }, + { "Tcp:", "AttemptFails", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpAttemptFails) }, + { "Tcp:", "EstabResets", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpEstabResets) }, + { "Tcp:", "CurrEstab", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpCurrEstab) }, + { "Tcp:", "InSegs", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpInSegs) }, + { "Tcp:", "OutSegs", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpOutSegs) }, + { "Tcp:", "RetransSegs", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpRetransSegs) }, + { "Tcp:", "InErrs", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpInErrs), + offsetof(struct tcp_mib, tcpInErrsValid) }, + { "Tcp:", "OutRsts", &cached_tcp_mib, + offsetof(struct tcp_mib, tcpOutRsts), + offsetof(struct tcp_mib, tcpOutRstsValid) }, + + { "Udp:", "InDatagrams", &cached_udp_mib, + offsetof(struct udp_mib, udpInDatagrams) }, + { "Udp:", "NoPorts", &cached_udp_mib, + offsetof(struct udp_mib, udpNoPorts) }, + { "Udp:", "InErrors", &cached_udp_mib, + offsetof(struct udp_mib, udpInErrors) }, + { "Udp:", "OutDatagrams", &cached_udp_mib, + offsetof(struct udp_mib, udpOutDatagrams) }, +}; + #define IP6_STATS_LINE "Ip6" #define ICMP6_STATS_LINE "Icmp6" #define UDP6_STATS_LINE "Udp6" -#define IP_STATS_PREFIX_LEN 4 -#define ICMP_STATS_PREFIX_LEN 6 -#define ICMP_MSG_STATS_PREFIX_LEN 9 -#define TCP_STATS_PREFIX_LEN 5 -#define UDP_STATS_PREFIX_LEN 5 #define IP6_STATS_PREFIX_LEN 3 #define ICMP6_STATS_PREFIX_LEN 5 #define UDP6_STATS_PREFIX_LEN 4 -netsnmp_feature_child_of(linux_ip6_stat_all, libnetsnmpmibs) +netsnmp_feature_child_of(linux_ip6_stat_all, libnetsnmpmibs); -netsnmp_feature_child_of(linux_read_ip6_stat, linux_ip6_stat_all) +netsnmp_feature_child_of(linux_read_ip6_stat, linux_ip6_stat_all); static int decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg) @@ -71,7 +204,7 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg) lineptr = line_cpy; dataptr = data_cpy; - saveptr1 = NULL; + saveptr1 = saveptr = NULL; while (1) { if(NULL == (token = strtok_r(lineptr, " ", &saveptr))) break; @@ -111,105 +244,43 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg) static int linux_read_mibII_stats(void) { - FILE *in = fopen("/proc/net/snmp", "r"); - char line[1024], data[1024]; - int ret = 0; + FILE *in; + char line[1024], data[1024], *linepos, *datapos, *pfx, *hdr, *v; + const struct stats_descr *d; + const struct stats_descr *const end = ipv4_snmp_stats + + sizeof(ipv4_snmp_stats) / sizeof(ipv4_snmp_stats[0]); + int ret = 0; + + in = fopen("/proc/net/snmp", "r"); if (!in) { DEBUGMSGTL(("mibII/kernel_linux","Unable to open /proc/net/snmp")); return -1; } - - memset(line, '\0', sizeof(line)); - memset(data, '\0', sizeof(data)); - while (line == fgets(line, sizeof(line), in)) { - if (!strncmp(line, IP_STATS_LINE, IP_STATS_PREFIX_LEN)) { - sscanf(line, IP_STATS_LINE, - &cached_ip_mib.ipForwarding, - &cached_ip_mib.ipDefaultTTL, - &cached_ip_mib.ipInReceives, - &cached_ip_mib.ipInHdrErrors, - &cached_ip_mib.ipInAddrErrors, - &cached_ip_mib.ipForwDatagrams, - &cached_ip_mib.ipInUnknownProtos, - &cached_ip_mib.ipInDiscards, - &cached_ip_mib.ipInDelivers, - &cached_ip_mib.ipOutRequests, - &cached_ip_mib.ipOutDiscards, - &cached_ip_mib.ipOutNoRoutes, - &cached_ip_mib.ipReasmTimeout, - &cached_ip_mib.ipReasmReqds, - &cached_ip_mib.ipReasmOKs, - &cached_ip_mib.ipReasmFails, - &cached_ip_mib.ipFragOKs, - &cached_ip_mib.ipFragFails, - &cached_ip_mib.ipFragCreates); - cached_ip_mib.ipRoutingDiscards = 0; /* XXX */ - } else if (!strncmp(line, ICMP_STATS_LINE, ICMP_STATS_PREFIX_LEN)) { - sscanf(line, ICMP_STATS_LINE, - &cached_icmp_mib.icmpInMsgs, - &cached_icmp_mib.icmpInErrors, - &cached_icmp_mib.icmpInDestUnreachs, - &cached_icmp_mib.icmpInTimeExcds, - &cached_icmp_mib.icmpInParmProbs, - &cached_icmp_mib.icmpInSrcQuenchs, - &cached_icmp_mib.icmpInRedirects, - &cached_icmp_mib.icmpInEchos, - &cached_icmp_mib.icmpInEchoReps, - &cached_icmp_mib.icmpInTimestamps, - &cached_icmp_mib.icmpInTimestampReps, - &cached_icmp_mib.icmpInAddrMasks, - &cached_icmp_mib.icmpInAddrMaskReps, - &cached_icmp_mib.icmpOutMsgs, - &cached_icmp_mib.icmpOutErrors, - &cached_icmp_mib.icmpOutDestUnreachs, - &cached_icmp_mib.icmpOutTimeExcds, - &cached_icmp_mib.icmpOutParmProbs, - &cached_icmp_mib.icmpOutSrcQuenchs, - &cached_icmp_mib.icmpOutRedirects, - &cached_icmp_mib.icmpOutEchos, - &cached_icmp_mib.icmpOutEchoReps, - &cached_icmp_mib.icmpOutTimestamps, - &cached_icmp_mib.icmpOutTimestampReps, - &cached_icmp_mib.icmpOutAddrMasks, - &cached_icmp_mib.icmpOutAddrMaskReps); - } else if (!strncmp(line, ICMP_MSG_STATS_LINE, ICMP_MSG_STATS_PREFIX_LEN)) { - /* - * Note: We have to do this differently from other stats as the - * counters to this stats are dynamic. So we will not know the - * number of counters at a given time. - */ - fgets(data, sizeof(data), in); - if(decode_icmp_msg(line + ICMP_MSG_STATS_PREFIX_LEN, - data + ICMP_MSG_STATS_PREFIX_LEN, - &cached_icmp4_msg_mib) < 0) { - continue; + while (fgets(line, sizeof(line), in) && fgets(data, sizeof(data), in)) { + if (!(pfx = strtok_r(line, " ", &linepos))) + continue; + if (!strtok_r(data, " ", &datapos)) + continue; + if (strcmp(pfx, "IcmpMsg:") == 0) { + decode_icmp_msg(linepos, datapos, &cached_icmp4_msg_mib); + } else { + while ((hdr = strtok_r(linepos, " \n", &linepos)) && + (v = strtok_r(datapos, " \n", &datapos))) { + for (d = ipv4_snmp_stats; d < end; d++) { + if (strcmp(d->prefix, pfx) == 0 && + strcmp(d->col_name, hdr) == 0) { + *(unsigned long *)(d->var + d->offset) = atol(v); + if (d->validity_offset != 0) { + *(short *)(d->var + d->validity_offset) = 1; + } + break; + } + } + if (d == end) + DEBUGMSGTL(("mibII/kernel_linux", "Skipped %s %s %s\n", pfx, + hdr, v)); } - ret = 1; - } else if (!strncmp(line, TCP_STATS_LINE, TCP_STATS_PREFIX_LEN)) { - int ret = sscanf(line, TCP_STATS_LINE, - &cached_tcp_mib.tcpRtoAlgorithm, - &cached_tcp_mib.tcpRtoMin, - &cached_tcp_mib.tcpRtoMax, - &cached_tcp_mib.tcpMaxConn, - &cached_tcp_mib.tcpActiveOpens, - &cached_tcp_mib.tcpPassiveOpens, - &cached_tcp_mib.tcpAttemptFails, - &cached_tcp_mib.tcpEstabResets, - &cached_tcp_mib.tcpCurrEstab, - &cached_tcp_mib.tcpInSegs, - &cached_tcp_mib.tcpOutSegs, - &cached_tcp_mib.tcpRetransSegs, - &cached_tcp_mib.tcpInErrs, - &cached_tcp_mib.tcpOutRsts); - cached_tcp_mib.tcpInErrsValid = (ret > 12) ? 1 : 0; - cached_tcp_mib.tcpOutRstsValid = (ret > 13) ? 1 : 0; - } else if (!strncmp(line, UDP_STATS_LINE, UDP_STATS_PREFIX_LEN)) { - sscanf(line, UDP_STATS_LINE, - &cached_udp_mib.udpInDatagrams, - &cached_udp_mib.udpNoPorts, - &cached_udp_mib.udpInErrors, - &cached_udp_mib.udpOutDatagrams); } } fclose(in); @@ -273,7 +344,8 @@ int linux_read_ip6_stat( struct ip6_mib *ip6stat) continue; endp = strchr(line, ' '); - *endp = '\0'; + if (endp) + *endp = '\0'; DEBUGMSGTL(("mibII/kernel_linux/ip6stats", "Find tag: %s\n", line)); match = 1; @@ -421,7 +493,8 @@ linux_read_icmp6_parse(struct icmp6_mib *icmp6stat, continue; endp = strchr(line, ' '); - *endp = '\0'; + if (endp) + *endp = '\0'; DEBUGMSGTL(("mibII/kernel_linux/icmp6stats", "Find tag: %s\n", line)); vals = name; @@ -612,7 +685,8 @@ linux_read_udp6_stat(struct udp6_mib *udp6stat) continue; endp = strchr(line, ' '); - *endp = '\0'; + if (endp) + *endp = '\0'; DEBUGMSGTL(("mibII/kernel_linux/udp6stats", "Find tag: %s\n", line)); if (0 == strcmp(line + 4, "OutDatagrams")) { diff --git a/agent/mibgroup/mibII/mibII_common.h b/agent/mibgroup/mibII/mibII_common.h index 87ef9d1..dedf399 100644 --- a/agent/mibgroup/mibII/mibII_common.h +++ b/agent/mibgroup/mibII/mibII_common.h @@ -1,92 +1,95 @@ -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_SYSMP_H +#ifdef HAVE_SYS_SYSMP_H #include #endif -#if HAVE_SYS_TCPIPSTATS_H +#ifdef HAVE_SYS_TCPIPSTATS_H #include #endif #if defined(NETSNMP_IFNET_NEEDS_KERNEL) && !defined(_KERNEL) #define _KERNEL 1 #define _I_DEFINED_KERNEL #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H +#ifdef _I_DEFINED_KERNEL +#undef _KERNEL +#endif #include +#ifdef _I_DEFINED_KERNEL +#define _KERNEL 1 +#endif #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif #ifdef _I_DEFINED_KERNEL #undef _KERNEL #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif -#if HAVE_SYS_QUEUE_H +#ifdef HAVE_SYS_QUEUE_H #include #endif /* IRIX 6.5 build breaks on sys/socketvar.h because _KMEMUSER brings in sys/pda.h which doesn't compile */ #ifndef irix6 -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #include #endif #endif /* irix6 */ -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H +#ifdef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H #include #endif #endif -#if HAVE_NETINET_IN_PCB_H +#ifdef HAVE_NETINET_IN_PCB_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif #ifdef HAVE_STDINT_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #ifdef solaris2 #include "kernel_sunos5.h" diff --git a/agent/mibgroup/mibII/mta_sendmail.c b/agent/mibgroup/mibII/mta_sendmail.c index c1edd07..3d63d15 100644 --- a/agent/mibgroup/mibII/mta_sendmail.c +++ b/agent/mibgroup/mibII/mta_sendmail.c @@ -59,7 +59,7 @@ # include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif @@ -71,17 +71,17 @@ # include #endif -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif @@ -90,11 +90,11 @@ # include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -273,8 +273,8 @@ struct statisticsV8_8 { /* * queue groups (strictly a sendmail 8.12+ thing */ - struct QDir { - char dir[FILENAMELEN + 1]; +struct QDir { + char *dir; struct QDir *next; }; @@ -539,7 +539,7 @@ count_queuegroup(struct QGrp *qg) qg->last = current_time; - chdir(cwd); + NETSNMP_IGNORE_RESULT(chdir(cwd)); } /** static void add_queuegroup(const char *name, const char *path) @@ -586,7 +586,7 @@ add_queuegroup(const char *name, char *path) */ *p = '\0'; - strcpy(parentdir, path); + strlcpy(parentdir, path, sizeof(parentdir)); /* * remove last directory component from parentdir */ @@ -629,11 +629,14 @@ add_queuegroup(const char *name, char *path) /* * single queue directory */ - subdir = (struct QDir *) malloc(sizeof(struct QDir)); - snprintf(subdir->dir, FILENAMELEN - 5, "%s/%s", parentdir, - dirp->d_name); - subdir->next = new; - new = subdir; + if ((subdir = calloc(1, sizeof(*subdir))) != NULL && + asprintf(&subdir->dir, "%s/%s", parentdir, dirp->d_name) >= + 0) { + subdir->next = new; + new = subdir; + } else { + free(subdir); + } } } @@ -642,8 +645,8 @@ add_queuegroup(const char *name, char *path) /* * single queue directory */ - new = (struct QDir *) malloc(sizeof(struct QDir)); - strcpy(new->dir, path); + new = malloc(sizeof(*new)); + new->dir = strdup(path); new->next = NULL; } @@ -651,16 +654,19 @@ add_queuegroup(const char *name, char *path) * check 'new' for /qf directories */ for (subdir = new; subdir != NULL; subdir = subdir->next) { - char qf[FILENAMELEN + 1]; + char *qf = NULL; - snprintf(qf, FILENAMELEN, "%s/qf", subdir->dir); - if ((dp = opendir(qf)) != NULL) { + if (asprintf(&qf, "%s/qf", subdir->dir) >= 0 && + (dp = opendir(qf)) != NULL) { /* * it exists ! */ - strcpy(subdir->dir, qf); + free(subdir->dir); + subdir->dir = qf; + qf = NULL; closedir(dp); } + free(qf); } /* @@ -877,7 +883,7 @@ read_sendmailcf(BOOL config) linenr, sendmailcf_fn); break; } - strcpy(sendmailst_fn, line + 2); + strlcpy(sendmailst_fn, line + 2, sizeof(sendmailst_fn)); found_sendmailst = TRUE; DEBUGMSGTL(("mibII/mta_sendmail.c:read_sendmailcf", "found statatistics file \"%s\"\n", @@ -1396,7 +1402,7 @@ var_mtaGroupEntry(struct variable *vp, *length = vp->namelen + 2; } - *write_method = 0; + *write_method = NULL; *var_len = sizeof(long); /* default to 'long' results */ if (vp->magic & NEEDS_STATS) { diff --git a/agent/mibgroup/mibII/mta_sendmail.h b/agent/mibgroup/mibII/mta_sendmail.h index 8368ca9..834a4b9 100644 --- a/agent/mibgroup/mibII/mta_sendmail.h +++ b/agent/mibgroup/mibII/mta_sendmail.h @@ -1,8 +1,8 @@ #ifndef _MIBGROUP_MTA_H #define _MIBGROUP_MTA_H -config_add_mib(MTA-MIB) -config_add_mib(NETWORK-SERVICES-MIB) +config_add_mib(MTA-MIB); +config_add_mib(NETWORK-SERVICES-MIB); void init_mta_sendmail(void); diff --git a/agent/mibgroup/mibII/route_headers.h b/agent/mibgroup/mibII/route_headers.h index eace2e2..2cce38f 100644 --- a/agent/mibgroup/mibII/route_headers.h +++ b/agent/mibgroup/mibII/route_headers.h @@ -10,12 +10,12 @@ #include #include #include -#if HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H #include #endif #include -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif #include @@ -33,57 +33,57 @@ #define GATEWAY /* MultiNet is always configured this way! */ #include #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif -#if HAVE_MACHINE_PARAM_H +#ifdef HAVE_MACHINE_PARAM_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif #ifdef HAVE_NET_IF_VAR_H #include #endif -#if HAVE_SYS_HASHING_H +#ifdef HAVE_SYS_HASHING_H #include #endif -#if HAVE_NETINET_IN_VAR_H +#ifdef HAVE_NETINET_IN_VAR_H #include #endif #define KERNEL /* to get routehash and RTHASHSIZ */ -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif #undef KERNEL @@ -116,28 +116,28 @@ #ifndef NULL #define NULL 0 #endif -#if HAVE_KVM_OPENFILES +#ifdef HAVE_KVM_OPENFILES #include #endif -#if HAVE_KVM_H +#ifdef HAVE_KVM_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif -#if HAVE_NET_IF_DL_H +#ifdef HAVE_NET_IF_DL_H #ifndef dynix #include #else @@ -145,7 +145,7 @@ #endif #endif -#if HAVE_NLIST_H +#ifdef HAVE_NLIST_H #include #endif diff --git a/agent/mibgroup/mibII/route_write.c b/agent/mibgroup/mibII/route_write.c index 5820ee1..a308eb3 100644 --- a/agent/mibgroup/mibII/route_write.c +++ b/agent/mibgroup/mibII/route_write.c @@ -11,52 +11,52 @@ #include #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_FILE_H +#ifdef HAVE_SYS_FILE_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif @@ -65,9 +65,11 @@ #include "ip.h" #include "route_write.h" +#include "var_route.h" -#ifdef cygwin +#if defined(cygwin) || defined(mingw32) #include +#include #endif #if !defined (WIN32) && !defined (cygwin) @@ -108,13 +110,15 @@ addRoute(u_long dstip, u_long gwip, u_long iff, u_short flags) flags |= RTF_UP; + memset(&dst, 0, sizeof(dst)); dst.sin_family = AF_INET; dst.sin_addr.s_addr = htonl(dstip); - + memset(&gateway, 0, sizeof(gateway)); gateway.sin_family = AF_INET; gateway.sin_addr.s_addr = htonl(gwip); + memset(&route, 0, sizeof(route)); memcpy(&route.rt_dst, &dst, sizeof(struct sockaddr_in)); memcpy(&route.rt_gateway, &gateway, sizeof(struct sockaddr_in)); @@ -198,10 +202,11 @@ delRoute(u_long dstip, u_long gwip, u_long iff, u_short flags) flags |= RTF_UP; + memset(&dst, 0, sizeof(dst)); dst.sin_family = AF_INET; dst.sin_addr.s_addr = htonl(dstip); - + memset(&gateway, 0, sizeof(gateway)); gateway.sin_family = AF_INET; gateway.sin_addr.s_addr = htonl(gwip); @@ -596,9 +601,6 @@ write_rte(int action, #elif defined(HAVE_IPHLPAPI_H) /* WIN32 cygwin */ #include -extern PMIB_IPFORWARDROW route_row; -extern int create_flag; - int write_rte(int action, u_char * var_val, @@ -798,8 +800,8 @@ write_rte(int action, if ((status = CreateIpForwardEntry(route_row)) != NO_ERROR) { snmp_log(LOG_ERR, - "Inside COMMIT: CreateIpNetEntry failed, status %lu\n", - status); + "Inside COMMIT: CreateIpNetEntry failed, status %u\n", + (unsigned int)status); retval = SNMP_ERR_COMMITFAILED; } } else { @@ -812,6 +814,7 @@ write_rte(int action, } } } + /* FALL THROUGH */ case FREE: /* diff --git a/agent/mibgroup/mibII/route_write.h b/agent/mibgroup/mibII/route_write.h index 4d6b912..296bbde 100644 --- a/agent/mibgroup/mibII/route_write.h +++ b/agent/mibgroup/mibII/route_write.h @@ -6,7 +6,7 @@ #define _MIBGROUP_ROUTE_WRITE_H #if !defined(NETSNMP_ENABLE_MFD_REWRITES) -config_require(mibII/ip) +config_require(mibII/ip); #endif int addRoute(u_long, u_long, u_long, u_short); diff --git a/agent/mibgroup/mibII/setSerialNo.c b/agent/mibgroup/mibII/setSerialNo.c index 85a4098..b6de052 100644 --- a/agent/mibgroup/mibII/setSerialNo.c +++ b/agent/mibgroup/mibII/setSerialNo.c @@ -6,22 +6,22 @@ #include #include -netsnmp_feature_require(watcher_spinlock) +netsnmp_feature_require(watcher_spinlock); #include "setSerialNo.h" /* * A watched spinlock can be fully implemented by the spinlock helper, - * but we still need a suitable variable to hold the value. + * but we still need a suitable variable to hold the value. */ static int setserialno; - /* - * TestAndIncr values should persist across agent restarts, - * so we need config handling routines to load and save the - * current value (incrementing this whenever it's loaded). - */ +/* + * TestAndIncr values should persist across agent restarts, + * so we need config handling routines to load and save the + * current value (incrementing this whenever it's loaded). + */ static void setserial_parse_config( const char *token, char *cptr ) { @@ -42,18 +42,15 @@ setserial_store_config( int a, int b, void *c, void *d ) void init_setSerialNo(void) { - oid set_serial_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 6, 1 }; + static const oid set_serial_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 6, 1 }; + int mode; /* * If we can't retain the TestAndIncr value across an agent restart, * then it should be initialised to a pseudo-random value. So set it * as such, before registering the config handlers to override this. */ -#ifdef SVR4 - setserialno = lrand48(); -#else - setserialno = random(); -#endif + setserialno = netsnmp_random(); DEBUGMSGTL(("snmpSetSerialNo", "Initalizing SnmpSetSerialNo to %d\n", setserialno)); snmpd_register_config_handler("setserialno", setserial_parse_config, @@ -65,20 +62,14 @@ init_setSerialNo(void) * Register 'setserialno' as a watched spinlock object */ #ifndef NETSNMP_NO_WRITE_SUPPORT - netsnmp_register_watched_spinlock( - netsnmp_create_handler_registration("snmpSetSerialNo", NULL, - set_serial_oid, - OID_LENGTH(set_serial_oid), - HANDLER_CAN_RWRITE), - &setserialno ); + mode = HANDLER_CAN_RWRITE; #else /* !NETSNMP_NO_WRITE_SUPPORT */ + mode = HANDLER_CAN_RONLY; +#endif /* !NETSNMP_NO_WRITE_SUPPORT */ netsnmp_register_watched_spinlock( netsnmp_create_handler_registration("snmpSetSerialNo", NULL, - set_serial_oid, - OID_LENGTH(set_serial_oid), - HANDLER_CAN_RONLY), - &setserialno ); -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ + set_serial_oid, OID_LENGTH(set_serial_oid), + mode), &setserialno); DEBUGMSGTL(("scalar_int", "Done initalizing example scalar int\n")); } diff --git a/agent/mibgroup/mibII/snmp_mib.c b/agent/mibgroup/mibII/snmp_mib.c index 1ebe64c..d239e8a 100644 --- a/agent/mibgroup/mibII/snmp_mib.c +++ b/agent/mibgroup/mibII/snmp_mib.c @@ -1,20 +1,35 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include #include #include #include +#include + #include "snmp_mib.h" +#include "system_mib.h" #include "updates.h" +#include "agent_global_vars.h" +netsnmp_feature_require(helper_statistics); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_truthvalue) +netsnmp_feature_require(check_vb_truthvalue); #endif /* NETSNMP_NO_WRITE_SUPPORT */ -static const oid snmp_oid[] = { 1, 3, 6, 1, 2, 1, 11 }; +#define SNMP_OID 1, 3, 6, 1, 2, 1, 11 -extern long snmp_enableauthentraps; -extern int snmp_enableauthentrapsset; +static const oid snmp_oid[] = { SNMP_OID }; static int snmp_enableauthentraps_store(int a, int b, void *c, void *d) @@ -41,7 +56,7 @@ handle_truthvalue(netsnmp_mib_handler *handler, if (res != SNMP_ERR_NOERROR) netsnmp_request_set_error(requests, res); } -#endif /* NETSNMP_NO_WRITE_SUPPORT */ +#endif /* !NETSNMP_NO_WRITE_SUPPORT */ return SNMP_ERR_NOERROR; } @@ -61,64 +76,54 @@ handle_snmp(netsnmp_mib_handler *handler, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { - switch (reqinfo->mode) { - case MODE_GET: - { - oid idx = requests->requestvb->name[OID_LENGTH(snmp_oid)]; - switch(idx) { - case 7: - case 23: - case 30: - netsnmp_set_request_error(reqinfo, requests, - SNMP_NOSUCHOBJECT); - break; - default: - { - u_int value = - snmp_get_statistic(idx - 1 + STAT_SNMPINPKTS); - snmp_set_var_typed_value(requests->requestvb, ASN_COUNTER, - (u_char *)&value, sizeof(value)); - } - break; - } - } - break; - + switch(requests->requestvb->name[OID_LENGTH(snmp_oid)]) { + case 7: + case 23: + case 30: + netsnmp_set_request_error(reqinfo, requests, SNMP_NOSUCHOBJECT); + break; default: - snmp_log(LOG_ERR, - "unknown mode (%d) in handle_snmp\n", reqinfo->mode); - return SNMP_ERR_GENERR; + break; } - return SNMP_ERR_NOERROR; } -#ifdef USING_MIBII_SYSTEM_MIB_MODULE -extern oid system_module_oid[]; -extern int system_module_oid_len; -extern int system_module_count; -#endif - /** Initializes the snmp module */ void init_snmp_mib(void) { DEBUGMSGTL(("snmp", "Initializing\n")); - netsnmp_register_scalar_group( - netsnmp_create_handler_registration( - "mibII/snmp", handle_snmp, snmp_oid, OID_LENGTH(snmp_oid), - HANDLER_CAN_RONLY), 1, 32); + NETSNMP_REGISTER_STATISTIC_HANDLER( + netsnmp_create_handler_registration( + "mibII/snmp", handle_snmp, snmp_oid, OID_LENGTH(snmp_oid), + HANDLER_CAN_RONLY), + 1, SNMP); { - const oid snmpEnableAuthenTraps_oid[] = { 1, 3, 6, 1, 2, 1, 11, 30, 0 }; + oid snmpEnableAuthenTraps_oid[] = { SNMP_OID, 30, 0 }; static netsnmp_watcher_info enableauthen_info; + netsnmp_mib_handler *handler; netsnmp_handler_registration *reg = netsnmp_create_update_handler_registration( "mibII/snmpEnableAuthenTraps", snmpEnableAuthenTraps_oid, OID_LENGTH(snmpEnableAuthenTraps_oid), - HANDLER_CAN_RWRITE, &snmp_enableauthentrapsset); - netsnmp_inject_handler(reg, netsnmp_get_truthvalue()); +#ifndef NETSNMP_NO_WRITE_SUPPORT + HANDLER_CAN_RWRITE, +#else + HANDLER_CAN_RONLY, +#endif /* !NETSNMP_NO_WRITE_SUPPORT */ + &snmp_enableauthentrapsset); + handler = netsnmp_get_truthvalue(); + if (!handler || + (netsnmp_inject_handler(reg, handler) != SNMPERR_SUCCESS)) { + snmp_log(LOG_ERR, + "could not create mibII/snmpEnableAuthenTraps handler\n"); + if (handler) + netsnmp_handler_free(handler); + netsnmp_handler_registration_free(reg); + return; + } netsnmp_register_watched_instance( reg, netsnmp_init_watcher_info( diff --git a/agent/mibgroup/mibII/snmp_mib.h b/agent/mibgroup/mibII/snmp_mib.h index 39e0a3c..78a5cad 100644 --- a/agent/mibgroup/mibII/snmp_mib.h +++ b/agent/mibgroup/mibII/snmp_mib.h @@ -1,9 +1,3 @@ -#ifndef _MIBGROUP_SNMP_H -#define _MIBGROUP_SNMP_H - -config_require(mibII/updates) -config_exclude(mibII/snmp_mib_5_5) +config_require(mibII/updates); void init_snmp_mib(void); - -#endif /* _MIBGROUP_SNMP_H */ diff --git a/agent/mibgroup/mibII/snmp_mib_5_5.c b/agent/mibgroup/mibII/snmp_mib_5_5.c deleted file mode 100644 index c63efb6..0000000 --- a/agent/mibgroup/mibII/snmp_mib_5_5.c +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include "snmp_mib_5_5.h" -#include "updates.h" - -netsnmp_feature_require(helper_statistics) -#ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_truthvalue) -#endif /* NETSNMP_NO_WRITE_SUPPORT */ - -#define SNMP_OID 1, 3, 6, 1, 2, 1, 11 - -static oid snmp_oid[] = { SNMP_OID }; - -extern long snmp_enableauthentraps; -extern int snmp_enableauthentrapsset; - -static int -snmp_enableauthentraps_store(int a, int b, void *c, void *d) -{ - char line[SNMP_MAXBUF_SMALL]; - - if (snmp_enableauthentrapsset > 0) { - snprintf(line, SNMP_MAXBUF_SMALL, "pauthtrapenable %ld", - snmp_enableauthentraps); - snmpd_store_config(line); - } - return 0; -} - -static int -handle_truthvalue(netsnmp_mib_handler *handler, - netsnmp_handler_registration *reginfo, - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests) -{ -#ifndef NETSNMP_NO_WRITE_SUPPORT - if (reqinfo->mode == MODE_SET_RESERVE1) { - int res = netsnmp_check_vb_truthvalue(requests->requestvb); - if (res != SNMP_ERR_NOERROR) - netsnmp_request_set_error(requests, res); - } -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ - return SNMP_ERR_NOERROR; -} - -static netsnmp_mib_handler* -netsnmp_get_truthvalue(void) -{ - netsnmp_mib_handler* hnd = - netsnmp_create_handler("truthvalue", handle_truthvalue); - if (hnd) - hnd->flags |= MIB_HANDLER_AUTO_NEXT; - return hnd; -} - -static int -handle_snmp(netsnmp_mib_handler *handler, - netsnmp_handler_registration *reginfo, - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests) -{ - switch(requests->requestvb->name[OID_LENGTH(snmp_oid)]) { - case 7: - case 23: - case 30: - netsnmp_set_request_error(reqinfo, requests, SNMP_NOSUCHOBJECT); - break; - default: - break; - } - return SNMP_ERR_NOERROR; -} - -#ifdef USING_MIBII_SYSTEM_MIB_MODULE -extern oid system_module_oid[]; -extern int system_module_oid_len; -extern int system_module_count; -#endif - -/** Initializes the snmp module */ -void -init_snmp_mib_5_5(void) -{ - DEBUGMSGTL(("snmp", "Initializing\n")); - - NETSNMP_REGISTER_STATISTIC_HANDLER( - netsnmp_create_handler_registration( - "mibII/snmp", handle_snmp, snmp_oid, OID_LENGTH(snmp_oid), - HANDLER_CAN_RONLY), - 1, SNMP); - { - oid snmpEnableAuthenTraps_oid[] = { SNMP_OID, 30, 0 }; - static netsnmp_watcher_info enableauthen_info; - netsnmp_handler_registration *reg = -#ifndef NETSNMP_NO_WRITE_SUPPORT - netsnmp_create_update_handler_registration( - "mibII/snmpEnableAuthenTraps", - snmpEnableAuthenTraps_oid, - OID_LENGTH(snmpEnableAuthenTraps_oid), - HANDLER_CAN_RWRITE, &snmp_enableauthentrapsset); -#else /* !NETSNMP_NO_WRITE_SUPPORT */ - netsnmp_create_update_handler_registration( - "mibII/snmpEnableAuthenTraps", - snmpEnableAuthenTraps_oid, - OID_LENGTH(snmpEnableAuthenTraps_oid), - HANDLER_CAN_RONLY, &snmp_enableauthentrapsset); -#endif /* !NETSNMP_NO_WRITE_SUPPORT */ - - netsnmp_inject_handler(reg, netsnmp_get_truthvalue()); - netsnmp_register_watched_instance( - reg, - netsnmp_init_watcher_info( - &enableauthen_info, - &snmp_enableauthentraps, sizeof(snmp_enableauthentraps), - ASN_INTEGER, WATCHER_FIXED_SIZE)); - } - -#ifdef USING_MIBII_SYSTEM_MIB_MODULE - if (++system_module_count == 3) - REGISTER_SYSOR_TABLE(system_module_oid, system_module_oid_len, - "The MIB module for SNMPv2 entities"); -#endif - snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - snmp_enableauthentraps_store, NULL); -} diff --git a/agent/mibgroup/mibII/snmp_mib_5_5.h b/agent/mibgroup/mibII/snmp_mib_5_5.h deleted file mode 100644 index 2e56103..0000000 --- a/agent/mibgroup/mibII/snmp_mib_5_5.h +++ /dev/null @@ -1,4 +0,0 @@ -config_require(mibII/updates) -config_exclude(mibII/snmp_mib) - -void init_snmp_mib_5_5(void); diff --git a/agent/mibgroup/mibII/sysORTable.c b/agent/mibgroup/mibII/sysORTable.c index ed26919..4bfb07c 100644 --- a/agent/mibgroup/mibII/sysORTable.c +++ b/agent/mibgroup/mibII/sysORTable.c @@ -7,10 +7,11 @@ #include #include "sysORTable.h" +#include "system_mib.h" #include -netsnmp_feature_require(table_container) +netsnmp_feature_require(table_container); /** Typical data structure for a row entry */ @@ -192,12 +193,6 @@ sysORTable_handler(netsnmp_mib_handler *handler, return SNMP_ERR_NOERROR; } -#ifdef USING_MIBII_SYSTEM_MIB_MODULE -extern oid system_module_oid[]; -extern int system_module_oid_len; -extern int system_module_count; -#endif - static netsnmp_handler_registration *sysORLastChange_reg; static netsnmp_watcher_info sysORLastChange_winfo; static netsnmp_handler_registration *sysORTable_reg; diff --git a/agent/mibgroup/mibII/system_mib.c b/agent/mibgroup/mibII/system_mib.c index 65b0b7c..a6caac5 100644 --- a/agent/mibgroup/mibII/system_mib.c +++ b/agent/mibgroup/mibII/system_mib.c @@ -16,27 +16,31 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_UTSNAME_H +#ifdef HAVE_UTSNAME_H #include #else -#if HAVE_SYS_UTSNAME_H +#ifdef HAVE_SYS_UTSNAME_H #include #endif #endif +#if defined(cygwin) || defined(mingw32) +#include +#endif + #include #include #include @@ -44,8 +48,9 @@ #include "util_funcs.h" #include "system_mib.h" #include "updates.h" +#include "agent_global_vars.h" -netsnmp_feature_require(watcher_read_only_int_scalar) +netsnmp_feature_require(watcher_read_only_int_scalar); /********************* * @@ -62,15 +67,9 @@ static char sysLocation[SYS_STRING_LEN] = NETSNMP_SYS_LOC; static oid sysObjectID[MAX_OID_LEN]; static size_t sysObjectIDByteLength; -extern oid version_sysoid[]; -extern int version_sysoid_len; - static int sysServices = 72; static int sysServicesConfiged = 0; -extern oid version_id[]; -extern int version_id_len; - static int sysContactSet = 0, sysLocationSet = 0, sysNameSet = 0; #if (defined (WIN32) && defined (HAVE_WIN32_PLATFORM_SDK)) || defined (mingw32) @@ -217,7 +216,7 @@ handle_sysServices(netsnmp_mib_handler *handler, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES if (reqinfo->mode == MODE_GET && !sysServicesConfiged) netsnmp_request_set_error(requests, SNMP_NOSUCHINSTANCE); #endif @@ -249,13 +248,14 @@ init_system_mib(void) utsName.machine); version_descr[ sizeof(version_descr)-1 ] = 0; #else -#if HAVE_EXECV +#ifdef HAVE_EXECV struct extensible extmp; /* * set default values of system stuff */ - sprintf(extmp.command, "%s -a", UNAMEPROG); + if (asprintf(&extmp.command, "%s -a", UNAMEPROG) < 0) + extmp.command = NULL; /* * setup defaults */ @@ -281,7 +281,8 @@ init_system_mib(void) strlcpy(sysName, utsName.nodename, sizeof(sysName)); #else #if defined (HAVE_EXECV) && !defined (mingw32) - sprintf(extmp.command, "%s -n", UNAMEPROG); + if (asprintf(&extmp.command, "%s -n", UNAMEPROG) < 0) + extmp.command = NULL; /* * setup defaults */ @@ -309,7 +310,7 @@ init_system_mib(void) if (RegQueryValueEx(hKey, "RegisteredOwner", NULL, NULL, (LPBYTE)registeredOwner, ®isteredOwnerSz) == ERROR_SUCCESS) { - strcpy(sysContact, registeredOwner); + strlcpy(sysContact, registeredOwner, sizeof(sysContact)); } RegCloseKey(hKey); } @@ -464,122 +465,82 @@ init_system_mib(void) *********************/ #if (defined (WIN32) && defined (HAVE_WIN32_PLATFORM_SDK)) || defined (mingw32) +static DWORD RegReadDword(HKEY hKey, LPCTSTR lpSubkey, LPCTSTR lpValueName) +{ + HKEY hSubkey; + LONG qres; + DWORD key_type; + DWORD result = 0; + DWORD result_len = sizeof(result); + + if (RegOpenKeyEx(hKey, lpSubkey, 0, KEY_READ, &hSubkey) != ERROR_SUCCESS) + goto out; + qres = RegQueryValueEx(hSubkey, lpValueName, NULL, &key_type, + (void *)&result, &result_len); + if (qres != ERROR_SUCCESS || key_type != REG_DWORD || + result_len != sizeof(DWORD)) + result = 0; + RegCloseKey(hKey); + +out: + return result; +} + +static BOOL RegReadString(HKEY hKey, LPCTSTR lpSubkey, LPCTSTR lpValueName, + char *str, DWORD *str_len) +{ + HKEY hSubkey; + LONG qres; + DWORD key_type; + BOOL result = FALSE; + + if (RegOpenKeyEx(hKey, lpSubkey, 0, KEY_READ, &hSubkey) != ERROR_SUCCESS) + goto out; + qres = RegQueryValueEx(hSubkey, lpValueName, NULL, &key_type, (void *)str, + str_len); + if (qres == ERROR_SUCCESS && key_type == REG_SZ) + result = TRUE; + RegCloseKey(hKey); + +out: + return result; +} + static void windowsOSVersionString(char stringbuf[], size_t stringbuflen) { /* copy OS version to string buffer in 'uname -a' format */ - OSVERSIONINFOEX osVersionInfo; - BOOL gotOsVersionInfoEx; - char windowsVersion[256] = ""; - char hostname[256] = ""; - char identifier[256] = ""; - DWORD identifierSz = 256; - HKEY hKey; - - ZeroMemory(&osVersionInfo, sizeof(OSVERSIONINFOEX)); - osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - gotOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *)&osVersionInfo); - if (gotOsVersionInfoEx == FALSE) { - GetVersionEx((OSVERSIONINFO *)&osVersionInfo); - } - - switch (osVersionInfo.dwPlatformId) { - case VER_PLATFORM_WIN32_NT: - if ((osVersionInfo.dwMajorVersion == 5) && (osVersionInfo.dwMinorVersion == 2)) { - strcat(windowsVersion, "Server 2003"); - } else if ((osVersionInfo.dwMajorVersion == 5) && (osVersionInfo.dwMinorVersion == 1)) { - strcat(windowsVersion, "XP"); - } else if ((osVersionInfo.dwMajorVersion == 5) && (osVersionInfo.dwMinorVersion == 0)) { - strcat(windowsVersion, "2000"); - } else if (osVersionInfo.dwMajorVersion <= 4) { - strcat(windowsVersion, "NT"); - } - if (gotOsVersionInfoEx == TRUE) { - if (osVersionInfo.wProductType == VER_NT_WORKSTATION) { - if (osVersionInfo.dwMajorVersion == 4) { - strcat(windowsVersion, " Workstation 4.0"); - } else if (osVersionInfo.wSuiteMask & VER_SUITE_PERSONAL) { - strcat(windowsVersion, " Home Edition"); - } else { - strcat(windowsVersion, " Professional"); - } - } else if (osVersionInfo.wProductType == VER_NT_SERVER) { - if ((osVersionInfo.dwMajorVersion == 5) && (osVersionInfo.dwMinorVersion == 2)) { - if (osVersionInfo.wSuiteMask & VER_SUITE_DATACENTER) { - strcat(windowsVersion, " Datacenter Edition"); - } else if (osVersionInfo.wSuiteMask & VER_SUITE_ENTERPRISE) { - strcat(windowsVersion, " Enterprise Edition"); - } else if (osVersionInfo.wSuiteMask == VER_SUITE_BLADE) { - strcat(windowsVersion, " Web Edition"); - } else { - strcat(windowsVersion, " Standard Edition"); - } - } else if ((osVersionInfo.dwMajorVersion == 5) && (osVersionInfo.dwMinorVersion == 0)) { - if (osVersionInfo.wSuiteMask & VER_SUITE_DATACENTER) { - strcat(windowsVersion, " Datacenter Server"); - } else if (osVersionInfo.wSuiteMask & VER_SUITE_ENTERPRISE) { - strcat(windowsVersion, " Advanced Server"); - } else { - strcat(windowsVersion, " Server"); - } - } else { - if (osVersionInfo.wSuiteMask & VER_SUITE_ENTERPRISE) { - strcat(windowsVersion, " Server 4.0, Enterprise Edition"); - } else { - strcat(windowsVersion, " Server 4.0"); - } - } - } - } else { - char productType[80]; - DWORD productTypeSz = 80; - - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { - if (RegQueryValueEx(hKey, "ProductType", NULL, NULL, (LPBYTE) productType, &productTypeSz) == ERROR_SUCCESS) { - char versionStr[10]; - if (strcmpi("WINNT", productType) == 0) { - strcat(windowsVersion, " Workstation"); - } else if (strcmpi("LANMANNT", productType) == 0) { - strcat(windowsVersion, " Server"); - } else if (strcmpi("SERVERNT", productType) == 0) { - strcat(windowsVersion, " Advanced Server"); - } - sprintf(versionStr, " %d.%d", (int)osVersionInfo.dwMajorVersion, (int)osVersionInfo.dwMinorVersion); - strcat(windowsVersion, versionStr); - } - RegCloseKey(hKey); - } - } - break; - case VER_PLATFORM_WIN32_WINDOWS: - if ((osVersionInfo.dwMajorVersion == 4) && (osVersionInfo.dwMinorVersion == 90)) { - strcat(windowsVersion, "ME"); - } else if ((osVersionInfo.dwMajorVersion == 4) && (osVersionInfo.dwMinorVersion == 10)) { - strcat(windowsVersion, "98"); - if (osVersionInfo.szCSDVersion[1] == 'A') { - strcat(windowsVersion, " SE"); - } - } else if ((osVersionInfo.dwMajorVersion == 4) && (osVersionInfo.dwMinorVersion == 0)) { - strcat(windowsVersion, "95"); - if ((osVersionInfo.szCSDVersion[1] == 'C') || (osVersionInfo.szCSDVersion[1] == 'B')) { - strcat(windowsVersion, " OSR2"); - } - } - break; - } + static const char wcv[] = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"; + char windowsVersion[256] = "?"; + DWORD windowsVersionSz = sizeof(windowsVersion); + char build[256] = "?"; + DWORD buildSz = sizeof(256); + DWORD dwMajorVersion; + DWORD dwMinorVersion; + char hostname[256] = "?"; + char identifier[256] = "?"; + DWORD identifierSz = sizeof(identifier); + + dwMajorVersion = RegReadDword(HKEY_LOCAL_MACHINE, wcv, + "CurrentMajorVersionNumber"); + dwMinorVersion = RegReadDword(HKEY_LOCAL_MACHINE, wcv, + "CurrentMinorVersionNumber"); + if (!RegReadString(HKEY_LOCAL_MACHINE, wcv, "CurrentBuildNumber", + build, &buildSz)) + RegReadString(HKEY_LOCAL_MACHINE, wcv, "CurrentBuild", + build, &buildSz); gethostname(hostname, sizeof(hostname)); - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) { - RegQueryValueEx(hKey, "Identifier", NULL, NULL, (LPBYTE)&identifier, &identifierSz); - RegCloseKey(hKey); - } + RegReadString(HKEY_LOCAL_MACHINE, wcv, "ProductName", windowsVersion, + &windowsVersionSz); + RegReadString(HKEY_LOCAL_MACHINE, + "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", + "Identifier", identifier, &identifierSz); /* Output is made to look like results from uname -a */ - snprintf(stringbuf, stringbuflen, - "Windows %s %d.%d.%d %s %s %s", hostname, - (int)osVersionInfo.dwMajorVersion, (int)osVersionInfo.dwMinorVersion, - (int)osVersionInfo.dwBuildNumber, osVersionInfo.szCSDVersion, + snprintf(stringbuf, stringbuflen, "Windows %s %d.%d.%s %s %s", + hostname, (int)dwMajorVersion, (int)dwMinorVersion, build, windowsVersion, identifier); } #endif /* WIN32 and HAVE_WIN32_PLATFORM_SDK or mingw32 */ diff --git a/agent/mibgroup/mibII/system_mib.h b/agent/mibgroup/mibII/system_mib.h index dd16f08..a274933 100644 --- a/agent/mibgroup/mibII/system_mib.h +++ b/agent/mibgroup/mibII/system_mib.h @@ -5,7 +5,11 @@ extern "C" { #endif -config_require(util_funcs mibII/updates) +config_require(util_funcs mibII/updates); + +extern oid system_module_oid[]; +extern int system_module_oid_len; +extern int system_module_count; void init_system_mib(void); diff --git a/agent/mibgroup/mibII/tcp.c b/agent/mibgroup/mibII/tcp.c index 3c79fad..87761ce 100644 --- a/agent/mibgroup/mibII/tcp.c +++ b/agent/mibgroup/mibII/tcp.c @@ -8,17 +8,17 @@ #include #include "mibII_common.h" -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_PROTOSW_H +#ifdef HAVE_SYS_PROTOSW_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -31,19 +31,25 @@ #undef TCP_NODELAY #undef TCP_MAXSEG #endif -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_TCPIP_H +#ifdef HAVE_NETINET_TCPIP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_TCP_VAR_H +#ifdef HAVE_NETINET_TCP_VAR_H +#ifdef openbsd7 +#define _KERNEL /* OpenBSD 7.3 */ +#endif #include +#ifdef openbsd7 +#undef _KERNEL +#endif #endif -#if HAVE_NETINET_TCP_FSM_H +#ifdef HAVE_NETINET_TCP_FSM_H #include #endif @@ -92,9 +98,6 @@ perfstat_id_t ps_name; int hz = 1000; #endif -#ifndef NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS -extern int TCP_Count_Connections( void ); -#endif /* NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS */ /********************* * * Initialisation & common implementation functions @@ -192,6 +195,11 @@ init_tcp(void) #define USES_TRADITIONAL_TCPSTAT #endif +#ifdef TCP_NSTATS +typedef uint32_t tcp_stats[TCP_NSTATS]; +#define TCP_STAT_STRUCTURE tcp_stats +#endif + #ifdef dragonfly #define TCP_STAT_STRUCTURE struct tcp_stats #define USES_TRADITIONAL_TCPSTAT @@ -321,9 +329,81 @@ tcp_handler(netsnmp_mib_handler *handler, ret_value = tcpstat.tcpOutRsts; break; } +#elif defined(solaris2) + ret_value = tcpstat.tcpOutRsts; + break; #endif /* linux */ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); continue; +#elif defined(TCP_NSTAT) + case TCPRTOALGORITHM: /* Assume Van Jacobsen's algorithm */ + ret_value = 4; + type = ASN_INTEGER; + break; + case TCPRTOMIN: +#ifdef TCPTV_NEEDS_HZ + ret_value = TCPTV_MIN; +#else + ret_value = TCPTV_MIN / PR_SLOWHZ * 1000; +#endif + type = ASN_INTEGER; + break; + case TCPRTOMAX: +#ifdef TCPTV_NEEDS_HZ + ret_value = TCPTV_REXMTMAX; +#else + ret_value = TCPTV_REXMTMAX / PR_SLOWHZ * 1000; +#endif + type = ASN_INTEGER; + break; + case TCPMAXCONN: + ret_value = -1; /* Dynamic maximum */ + type = ASN_INTEGER; + break; + case TCPACTIVEOPENS: + ret_value = tcpstat[TCP_STAT_CONNATTEMPT]; + break; + case TCPPASSIVEOPENS: + ret_value = tcpstat[TCP_STAT_ACCEPTS]; + break; + /* + * NB: tcps_drops is actually the sum of the two MIB + * counters tcpAttemptFails and tcpEstabResets. + */ + case TCPATTEMPTFAILS: + ret_value = tcpstat[TCP_STAT_CONNDROPS]; + break; + case TCPESTABRESETS: + ret_value = tcpstat[TCP_STAT_DROPS]; + break; + case TCPCURRESTAB: +#ifdef USING_MIBII_TCPTABLE_MODULE + ret_value = TCP_Count_Connections(); +#else + ret_value = 0; +#endif + type = ASN_GAUGE; + break; + case TCPINSEGS: + ret_value = tcpstat[TCP_STAT_RCVTOTAL]; + break; + case TCPOUTSEGS: + /* + * RFC 1213 defines this as the number of segments sent + * "excluding those containing only retransmitted octets" + */ + ret_value = tcpstat[TCP_STAT_SNDTOTAL] - tcpstat[TCP_STAT_SNDREXMITPACK]; + break; + case TCPRETRANSSEGS: + ret_value = tcpstat[TCP_STAT_SNDREXMITPACK]; + break; + case TCPINERRS: + ret_value = tcpstat[TCP_STAT_RCVBADSUM] + tcpstat[TCP_STAT_RCVBADOFF] + + tcpstat[TCP_STAT_RCVMEMDROP] + tcpstat[TCP_STAT_RCVSHORT]; + break; + case TCPOUTRSTS: + ret_value = tcpstat[TCP_STAT_SNDCTRL] - tcpstat[TCP_STAT_CLOSED]; + break; #elif defined(USES_TRADITIONAL_TCPSTAT) && !defined(_USE_FIRST_PROTOCOL) #ifdef HAVE_SYS_TCPIPSTATS_H /* diff --git a/agent/mibgroup/mibII/tcp.h b/agent/mibgroup/mibII/tcp.h index 049ddd1..e867c20 100644 --- a/agent/mibgroup/mibII/tcp.h +++ b/agent/mibgroup/mibII/tcp.h @@ -6,12 +6,15 @@ #define _MIBGROUP_TCP_H -config_require(mibII/tcpTable) - -config_arch_require(solaris2, kernel_sunos5) -config_arch_require(linux, mibII/kernel_linux) -config_arch_require(netbsd, mibII/kernel_netbsd) -config_arch_require(netbsdelf, mibII/kernel_netbsd) +config_require(mibII/tcpTable); + +#ifdef solaris2 +config_require(kernel_sunos5); +#elif defined(linux) +config_require(mibII/kernel_linux); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); +#endif extern void init_tcp(void); extern Netsnmp_Node_Handler tcp_handler; diff --git a/agent/mibgroup/mibII/tcpTable.c b/agent/mibgroup/mibII/tcpTable.c index 03c85e5..772b16a 100644 --- a/agent/mibgroup/mibII/tcpTable.c +++ b/agent/mibgroup/mibII/tcpTable.c @@ -18,24 +18,42 @@ #include #include "mibII_common.h" -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_TCPIP_H +#ifdef HAVE_NETINET_TCPIP_H #include #endif -#if HAVE_NETINET_TCP_VAR_H +#ifdef HAVE_NETINET_TCP_VAR_H #include #endif -#if HAVE_NETLINK_NETLINK_H +#ifdef HAVE_NETLINK_NETLINK_H #include #include #include #endif +#ifdef HAVE_KVM_GETFILES +#if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) +#undef HAVE_KVM_GETFILES +#endif +#endif + +#ifdef HAVE_KVM_GETFILES +#include +#include +#define _KERNEL +#include +#undef _KERNEL +#endif + +#if defined(cygwin) || defined(mingw32) +#include +#endif + #include #include #include @@ -43,9 +61,9 @@ #include "tcp.h" #include "tcpTable.h" -netsnmp_feature_child_of(tcptable_all, libnetsnmpmibs) +netsnmp_feature_child_of(tcptable_all, libnetsnmpmibs); -netsnmp_feature_child_of(tcp_count_connections, tcptable_all) +netsnmp_feature_child_of(tcp_count_connections, tcptable_all); #ifdef hpux11 #define TCPTABLE_ENTRY_TYPE mib_tcpConnEnt @@ -55,9 +73,8 @@ netsnmp_feature_child_of(tcp_count_connections, tcptable_all) #define TCPTABLE_REMOTEADDRESS RemAddress #define TCPTABLE_REMOTEPORT RemPort #define TCPTABLE_IS_TABLE -#else -#ifdef solaris2 +#elif defined(solaris2) typedef struct netsnmp_tcpConnEntry_s netsnmp_tcpConnEntry; struct netsnmp_tcpConnEntry_s { mib2_tcpConnEntry_t entry; @@ -70,9 +87,8 @@ struct netsnmp_tcpConnEntry_s { #define TCPTABLE_REMOTEADDRESS entry.tcpConnRemAddress #define TCPTABLE_REMOTEPORT entry.tcpConnRemPort #define TCPTABLE_IS_LINKED_LIST -#else -#ifdef HAVE_IPHLPAPI_H +#elif defined(HAVE_IPHLPAPI_H) #include #define TCPTABLE_ENTRY_TYPE MIB_TCPROW #define TCPTABLE_STATE dwState @@ -81,9 +97,8 @@ struct netsnmp_tcpConnEntry_s { #define TCPTABLE_REMOTEADDRESS dwRemoteAddr #define TCPTABLE_REMOTEPORT dwRemotePort #define TCPTABLE_IS_TABLE -#else -#ifdef linux +#elif defined(linux) #define TCPTABLE_ENTRY_TYPE struct inpcb #define TCPTABLE_STATE inp_state #define TCPTABLE_LOCALADDRESS inp_laddr.s_addr @@ -92,11 +107,26 @@ struct netsnmp_tcpConnEntry_s { #define TCPTABLE_REMOTEPORT inp_fport #define TCPTABLE_IS_LINKED_LIST +#elif defined(HAVE_KVM_GETFILES) +#define TCPTABLE_ENTRY_TYPE struct kinfo_file +#define TCPTABLE_STATE t_state +#define TCPTABLE_LOCALADDRESS inp_laddru[0] +#define TCPTABLE_LOCALPORT inp_lport +#define TCPTABLE_REMOTEADDRESS inp_faddru[0] +#define TCPTABLE_REMOTEPORT inp_fport +#define TCPTABLE_IS_TABLE + #else /* everything else */ typedef struct netsnmp_inpcb_s netsnmp_inpcb; struct netsnmp_inpcb_s { +#if __FreeBSD_version >= 1200026 + struct xinpcb pcb; +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + struct in4pcb pcb; +#else struct inpcb pcb; +#endif int state; netsnmp_inpcb *inp_next; }; @@ -104,15 +134,22 @@ struct netsnmp_inpcb_s { #define INP_NEXT_SYMBOL inp_next #define TCPTABLE_ENTRY_TYPE netsnmp_inpcb #define TCPTABLE_STATE state +#define TCPTABLE_IS_LINKED_LIST +#define INP_NEXT_SYMBOL inp_next +#if defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 +#define TCPTABLE_LOCALADDRESS pcb.in4p_ip.ip_src.s_addr +#define TCPTABLE_LOCALPORT pcb.in4p_pcb.inp_lport +#define TCPTABLE_REMOTEADDRESS pcb.in4p_ip.ip_dst.s_addr +#define TCPTABLE_REMOTEPORT pcb.in4p_pcb.inp_fport +#define TCPTABLE_TCPCB pcb.in4p_pcb.inp_ppcb +#else #define TCPTABLE_LOCALADDRESS pcb.inp_laddr.s_addr #define TCPTABLE_LOCALPORT pcb.inp_lport #define TCPTABLE_REMOTEADDRESS pcb.inp_faddr.s_addr #define TCPTABLE_REMOTEPORT pcb.inp_fport -#define TCPTABLE_IS_LINKED_LIST +#define TCPTABLE_TCPCB pcb.inp_ppcb +#endif -#endif /* linux */ -#endif /* WIN32 cygwin */ -#endif /* solaris2 */ #endif /* hpux11 */ /* Head of linked list, or root of table */ @@ -170,6 +207,7 @@ init_tcpTable(void) */ iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info); if (!iinfo) { + SNMP_FREE(table_info); return; } iinfo->get_first_data_point = tcpTable_first_entry; @@ -213,6 +251,9 @@ tcpTable_handler(netsnmp_mib_handler *handler, netsnmp_variable_list *requestvb; netsnmp_table_request_info *table_info; TCPTABLE_ENTRY_TYPE *entry; +#ifdef HAVE_KVM_GETFILES + int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; +#endif oid subid; long port; long state; @@ -236,7 +277,11 @@ tcpTable_handler(netsnmp_mib_handler *handler, switch (subid) { case TCPCONNSTATE: +#ifdef HAVE_KVM_GETFILES + state = StateMap[entry->TCPTABLE_STATE]; +#else state = entry->TCPTABLE_STATE; +#endif snmp_set_var_typed_value(requestvb, ASN_INTEGER, (u_char *)&state, sizeof(state)); break; @@ -301,7 +346,9 @@ tcpTable_handler(netsnmp_mib_handler *handler, #ifndef NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS int TCP_Count_Connections( void ) { +#if (defined(CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) tcpTable_load(NULL, NULL); +#endif return tcp_estab; } #endif /* NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS */ @@ -342,10 +389,15 @@ tcpTable_next_entry( void **loop_context, netsnmp_variable_list *index, netsnmp_iterator_info *data) { - int i = (int)*loop_context; + int i = (intptr_t)*loop_context; netsnmp_variable_list *idx; long port; +#ifdef HAVE_KVM_GETFILES + while (i < tcp_size && (tcp_head[i].so_protocol != IPPROTO_TCP + || tcp_head[i].so_family != AF_INET)) + i++; +#endif if (tcp_size < i) return NULL; @@ -353,7 +405,7 @@ tcpTable_next_entry( void **loop_context, * Set up the indexing for the specified row... */ idx = index; -#if defined (WIN32) || defined (cygwin) +#if defined (WIN32) || defined (cygwin) || defined(openbsd5) port = ntohl((u_long)tcp_head[i].TCPTABLE_LOCALADDRESS); snmp_set_var_value(idx, (u_char *)&port, sizeof(tcp_head[i].TCPTABLE_LOCALADDRESS)); @@ -367,7 +419,7 @@ tcpTable_next_entry( void **loop_context, snmp_set_var_value(idx, (u_char*)&port, sizeof(port)); idx = idx->next_variable; -#if defined (WIN32) || defined (cygwin) +#if defined (WIN32) || defined (cygwin) || defined(openbsd5) port = ntohl((u_long)tcp_head[i].TCPTABLE_REMOTEADDRESS); snmp_set_var_value(idx, (u_char *)&port, sizeof(tcp_head[i].TCPTABLE_REMOTEADDRESS)); @@ -385,7 +437,7 @@ tcpTable_next_entry( void **loop_context, * and update the loop context ready for the next one. */ *data_context = (void*)&tcp_head[i]; - *loop_context = (void*)++i; + *loop_context = (void*)(intptr_t)++i; return index; } @@ -398,8 +450,9 @@ tcpTable_free(netsnmp_cache *cache, void *magic) /* the allocated structure is a count followed by table entries */ free((char *)(tcp_head) - sizeof(DWORD)); } +#elif defined(openbsd5) #else - if (tcp_head) + if (tcp_head) free(tcp_head); #endif tcp_head = NULL; @@ -558,16 +611,15 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/tcpTable", "Failed to load TCP Table (hpux11)\n")); return -1; } -#else /* hpux11 */ -#ifdef linux +#elif defined(linux) /* see */ #define TCP_ALL ((1 << (TCP_CLOSING + 1)) - 1) -const static int linux_states[12] = { 1, 5, 3, 4, 6, 7, 11, 1, 8, 9, 2, 10 }; +static const int linux_states[12] = { 1, 5, 3, 4, 6, 7, 11, 1, 8, 9, 2, 10 }; -#if HAVE_NETLINK_NETLINK_H +#ifdef HAVE_NETLINK_NETLINK_H #if !defined(HAVE_LIBNL3) /* libnl3 API implemented on top of the libnl1 API */ @@ -654,13 +706,23 @@ tcpTable_load_netlink(void) break; } - r = nlmsg_data(h); + /** handle the case where the kernel doesn't have netlink socket + * diagnostics enabled */ + if ((h->nlmsg_type == NLMSG_ERROR) && + (((struct nlmsgerr *)r)->error != 0)) { + int nlerr = ((struct nlmsgerr *)r)->error; + running = 0; + DEBUGMSGTL(("mibII/tcpTable", "netlink error: %d\n", nlerr)); + snmp_log(LOG_ERR, "snmpd: netlink error: %d\n", nlerr); + break; + } if (r->idiag_family != AF_INET) { h = nlmsg_next(h, &len); continue; } + memset(&pcb, 0, sizeof(pcb)); memcpy(&pcb.inp_laddr.s_addr, r->id.idiag_src, r->idiag_family == AF_INET ? 4 : 6); memcpy(&pcb.inp_faddr.s_addr, r->id.idiag_dst, r->idiag_family == AF_INET ? 4 : 6); @@ -707,7 +769,7 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) tcpTable_free(cache, NULL); -#if HAVE_NETLINK_NETLINK_H +#ifdef HAVE_NETLINK_NETLINK_H if (tcpTable_load_netlink() == 0) { return 0; } @@ -729,6 +791,7 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) unsigned int lp, fp; int state, uid; + memset(&pcb, 0, sizeof(pcb)); if (6 != sscanf(line, "%*d: %x:%x %x:%x %x %*X:%*X %*X:%*X %*X %d", &pcb.inp_laddr.s_addr, &lp, @@ -757,9 +820,9 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table (linux)\n")); return 0; } -#else /* linux */ -#ifdef solaris2 +#elif defined(solaris2) + static int TCP_Cmp(void *addr, void *ep) { @@ -816,9 +879,30 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/tcpTable", "Failed to load TCP Table (solaris)\n")); return -1; } -#else /* solaris2 */ -#if defined (WIN32) || defined (cygwin) +#elif defined(HAVE_KVM_GETFILES) + +int +tcpTable_load(netsnmp_cache *cache, void *vmagic) +{ + int i, count; + int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; + + tcp_head = kvm_getfiles(kd, KERN_FILE_BYFILE, DTYPE_SOCKET, sizeof(struct kinfo_file), &count); + tcp_size = count; + for (i = 0; i < tcp_size; i++) { + if (tcp_head[i].so_protocol != IPPROTO_TCP || tcp_head[i].so_family != AF_INET) + continue; + if (StateMap[tcp_head[i].TCPTABLE_STATE] == 5 /* established */ || + StateMap[tcp_head[i].TCPTABLE_STATE] == 8 /* closeWait */ ) + tcp_estab++; + } + + return 0; +} + +#elif defined (WIN32) || defined (cygwin) + int tcpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -864,9 +948,8 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) free(pTcpTable); return -1; } -#else /* WIN32 cygwin */ -#if (defined(NETSNMP_CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) +#elif (defined(NETSNMP_CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) #if defined(freebsd4) || defined(darwin) #define NS_ELEM struct xtcpcb @@ -923,14 +1006,26 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb); if (!nnew) break; +#if __FreeBSD_version >= 1200026 + nnew->state = StateMap[((NS_ELEM *) xig)->t_state]; +#else nnew->state = StateMap[((NS_ELEM *) xig)->xt_tp.t_state]; +#endif if (nnew->state == 5 /* established */ || nnew->state == 8 /* closeWait */ ) tcp_estab++; memcpy(&(nnew->pcb), &(((NS_ELEM *) xig)->xt_inp), +#if __FreeBSD_version >= 1200026 + sizeof(struct xinpcb)); +#else sizeof(struct inpcb)); +#endif +#ifdef INP_ISIPV6 + if (INP_ISIPV6(&nnew->pcb)) +#else if (nnew->pcb.inp_vflag & INP_IPV6) +#endif free(nnew); else { nnew->inp_next = tcp_head; @@ -953,8 +1048,8 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) } #undef NS_ELEM -#else /* (defined(NETSNMP_CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) */ -#ifdef PCB_TABLE +#elif defined(PCB_TABLE) + int tcpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -974,18 +1069,22 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) /* * Set up a linked list */ - entry = table.inpt_queue.cqh_first; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + entry = TAILQ_FIRST(&table.inpt_queue); +#else + entry = table.INP_FIRST_SYMBOL; +#endif while (entry) { nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb); if (!nnew) break; - if (!NETSNMP_KLOOKUP(entry, (char *)&(nnew->pcb), sizeof(struct inpcb))) { + if (!NETSNMP_KLOOKUP(entry, (char *)&(nnew->pcb), sizeof(nnew->pcb))) { DEBUGMSGTL(("mibII/tcpTable:TcpTable_load", "klookup failed\n")); break; } - if (!NETSNMP_KLOOKUP(nnew->pcb.inp_ppcb, (char *)&tcpcb, sizeof(struct tcpcb))) { + if (!NETSNMP_KLOOKUP(nnew->TCPTABLE_TCPCB, (char *)&tcpcb, sizeof(struct tcpcb))) { DEBUGMSGTL(("mibII/tcpTable:TcpTable_load", "klookup failed\n")); break; } @@ -998,7 +1097,11 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) nnew->inp_next = tcp_head; tcp_head = nnew; - if (entry == table.inpt_queue.cqh_first) +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + if (entry == TAILQ_FIRST(&table.inpt_queue)) +#else + if (entry == table.INP_FIRST_SYMBOL) +#endif break; } @@ -1010,8 +1113,8 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) return -1; } -#else /* PCB_TABLE */ -#ifdef TCP_SYMBOL +#elif defined(TCP_SYMBOL) + int tcpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -1070,17 +1173,11 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic) return -1; } -#else /* UDB_SYMBOL */ +#else /* TCP_SYMBOL */ int tcpTable_load(netsnmp_cache *cache, void *vmagic) { DEBUGMSGTL(("mibII/tcpTable", "Loading TCP Table not implemented\n")); return -1; } -#endif /* UDB_SYMBOL */ -#endif /* PCB_TABLE */ -#endif /* (defined(NETSNMP_CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) */ -#endif /* WIN32 cygwin */ -#endif /* linux */ -#endif /* solaris2 */ -#endif /* hpux11 */ +#endif /* TCP_SYMBOL */ diff --git a/agent/mibgroup/mibII/tcpTable.h b/agent/mibgroup/mibII/tcpTable.h index 55fe97b..dc152ec 100644 --- a/agent/mibgroup/mibII/tcpTable.h +++ b/agent/mibgroup/mibII/tcpTable.h @@ -5,9 +5,11 @@ #ifndef _MIBGROUP_TCPTABLE_H #define _MIBGROUP_TCPTABLE_H -config_arch_require(solaris2, kernel_sunos5) +#ifdef solaris2 +config_require(kernel_sunos5); +#endif #if !defined(NETSNMP_ENABLE_MFD_REWRITES) -config_require(mibII/ip) +config_require(mibII/ip); #endif #ifdef linux @@ -35,4 +37,8 @@ extern Netsnmp_Next_Data_Point tcpTable_next_entry; #define TCPCONNREMOTEADDRESS 4 #define TCPCONNREMOTEPORT 5 +#ifndef NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS +int TCP_Count_Connections(void); +#endif /* NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS */ + #endif /* _MIBGROUP_TCPTABLE_H */ diff --git a/agent/mibgroup/mibII/udp.c b/agent/mibgroup/mibII/udp.c index 1ddcbc5..7b0f40f 100644 --- a/agent/mibgroup/mibII/udp.c +++ b/agent/mibgroup/mibII/udp.c @@ -9,7 +9,7 @@ #ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif @@ -151,6 +151,12 @@ init_udp(void) #define USES_TRADITIONAL_UDPSTAT #endif +#ifdef UDP_NSTATS +typedef struct udpstat { + uint64_t st[UDP_NSTATS]; +}; +#define UDP_STAT_STRUCTURE struct udpstat +#endif #if !defined(UDP_STAT_STRUCTURE) #define UDP_STAT_STRUCTURE struct udpstat @@ -238,7 +244,7 @@ udp_handler(netsnmp_mib_handler *handler, #define udpstat udpstat.udpstat #endif case UDPINDATAGRAMS: -#if HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS +#ifdef HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS ret_value = udpstat.udps_ipackets; break; #else @@ -247,7 +253,7 @@ udp_handler(netsnmp_mib_handler *handler, #endif case UDPNOPORTS: -#if HAVE_STRUCT_UDPSTAT_UDPS_NOPORT +#ifdef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT ret_value = udpstat.udps_noport; break; #else @@ -256,7 +262,7 @@ udp_handler(netsnmp_mib_handler *handler, #endif case UDPOUTDATAGRAMS: -#if HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS +#ifdef HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS ret_value = udpstat.udps_opackets; break; #else diff --git a/agent/mibgroup/mibII/udp.h b/agent/mibgroup/mibII/udp.h index 9d4671b..c9624eb 100644 --- a/agent/mibgroup/mibII/udp.h +++ b/agent/mibgroup/mibII/udp.h @@ -6,12 +6,15 @@ #define _MIBGROUP_UDP_H -config_require(mibII/udpTable) +config_require(mibII/udpTable); -config_arch_require(solaris2, kernel_sunos5) -config_arch_require(linux, mibII/kernel_linux) -config_arch_require(netbsd, mibII/kernel_netbsd) -config_arch_require(netbsdelf, mibII/kernel_netbsd) +#ifdef solaris2 +config_require(kernel_sunos5); +#elif defined(linux) +config_require(mibII/kernel_linux); +#elif defined(netbsd5) || defined(netbsdelf5) +config_require(mibII/kernel_netbsd); +#endif extern void init_udp(void); extern Netsnmp_Node_Handler udp_handler; diff --git a/agent/mibgroup/mibII/udpTable.c b/agent/mibgroup/mibII/udpTable.c index 2c88749..e60f7c5 100644 --- a/agent/mibgroup/mibII/udpTable.c +++ b/agent/mibgroup/mibII/udpTable.c @@ -17,13 +17,31 @@ #include #include "mibII_common.h" -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif +#ifdef HAVE_KVM_GETFILES +#if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) +#undef HAVE_KVM_GETFILES +#endif +#endif + +#ifdef HAVE_KVM_GETFILES +#include +#include +#define _KERNEL +#include +#undef _KERNEL +#endif + +#if defined(cygwin) || defined(mingw32) +#include +#endif + #include #include #include @@ -39,9 +57,8 @@ #define UDPTABLE_LOCALADDRESS LocalAddress #define UDPTABLE_LOCALPORT LocalPort #define UDPTABLE_IS_TABLE -#else -#ifdef solaris2 +#elif defined(solaris2) typedef struct netsnmp_udpEntry_s netsnmp_udpEntry; struct netsnmp_udpEntry_s { mib2_udpEntry_t entry; @@ -51,19 +68,28 @@ struct netsnmp_udpEntry_s { #define UDPTABLE_LOCALADDRESS entry.udpLocalAddress #define UDPTABLE_LOCALPORT entry.udpLocalPort #define UDPTABLE_IS_LINKED_LIST -#else -#ifdef HAVE_IPHLPAPI_H +#elif defined(HAVE_IPHLPAPI_H) #include #define UDPTABLE_ENTRY_TYPE MIB_UDPROW /* ??? */ #define UDPTABLE_LOCALADDRESS dwLocalAddr #define UDPTABLE_LOCALPORT dwLocalPort #define UDPTABLE_IS_TABLE -#else /* everything else */ -#ifdef linux +#elif defined(HAVE_KVM_GETFILES) +#define UDPTABLE_ENTRY_TYPE struct kinfo_file +#define UDPTABLE_LOCALADDRESS inp_laddru[0] +#define UDPTABLE_LOCALPORT inp_lport +#define UDPTABLE_IS_TABLE + +#elif defined(linux) #define INP_NEXT_SYMBOL inp_next -#endif +#define UDPTABLE_ENTRY_TYPE struct inpcb +#define UDPTABLE_LOCALADDRESS inp_laddr.s_addr +#define UDPTABLE_LOCALPORT inp_lport +#define UDPTABLE_IS_LINKED_LIST + +#else #ifdef openbsd4 #define INP_NEXT_SYMBOL inp_queue.cqe_next /* or set via */ #endif @@ -71,13 +97,21 @@ struct netsnmp_udpEntry_s { #if defined(freebsd4) || defined(darwin) || defined(osf5) typedef struct netsnmp_inpcb_s netsnmp_inpcb; struct netsnmp_inpcb_s { +#if __FreeBSD_version >= 1200026 + struct xinpcb pcb; +#else struct inpcb pcb; +#endif int state; netsnmp_inpcb *inp_next; }; #define UDPTABLE_ENTRY_TYPE netsnmp_inpcb #define UDPTABLE_LOCALADDRESS pcb.inp_laddr.s_addr #define UDPTABLE_LOCALPORT pcb.inp_lport +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 +#define UDPTABLE_ENTRY_TYPE struct in4pcb +#define UDPTABLE_LOCALADDRESS in4p_ip.ip_src.s_addr +#define UDPTABLE_LOCALPORT in4p_pcb.inp_lport #else #define UDPTABLE_ENTRY_TYPE struct inpcb #define UDPTABLE_LOCALADDRESS inp_laddr.s_addr @@ -85,8 +119,6 @@ struct netsnmp_inpcb_s { #endif #define UDPTABLE_IS_LINKED_LIST -#endif /* WIN32 cygwin */ -#endif /* solaris2 */ #endif /* hpux11 */ /* Head of linked list, or root of table */ @@ -295,16 +327,21 @@ udpTable_next_entry( void **loop_context, netsnmp_variable_list *index, netsnmp_iterator_info *data) { - int i = (int)*loop_context; + int i = (intptr_t)*loop_context; long port; +#ifdef HAVE_KVM_GETFILES + while (i < udp_size && (udp_head[i].so_protocol != IPPROTO_UDP + || udp_head[i].so_family != AF_INET)) + i++; +#endif if (udp_size < i) return NULL; /* * Set up the indexing for the specified row... */ -#if defined (WIN32) || defined (cygwin) +#if defined (WIN32) || defined (cygwin) || defined(openbsd5) port = ntohl((u_long)udp_head[i].UDPTABLE_LOCALADDRESS); snmp_set_var_value(index, (u_char *)&port, sizeof(udp_head[i].UDPTABLE_LOCALADDRESS)); @@ -320,7 +357,7 @@ udpTable_next_entry( void **loop_context, * and update the loop context ready for the next one. */ *data_context = (void*)&udp_head[i]; - *loop_context = (void*)++i; + *loop_context = (void*)(intptr_t)++i; return index; } @@ -332,6 +369,7 @@ udpTable_free(netsnmp_cache *cache, void *magic) /* the allocated structure is a count followed by table entries */ free((char *)(udp_head) - sizeof(DWORD)); } +#elif defined(openbsd5) #else if (udp_head) free(udp_head); @@ -370,7 +408,7 @@ udpTable_next_entry( void **loop_context, { UDPTABLE_ENTRY_TYPE *entry = (UDPTABLE_ENTRY_TYPE *)*loop_context; long port; - long addr; + in_addr_t addr; if (!entry) return NULL; @@ -396,7 +434,13 @@ udpTable_next_entry( void **loop_context, * and update the loop context ready for the next one. */ *data_context = (void*)entry; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + *loop_context = (void*)TAILQ_NEXT(entry, in4p_pcb.inp_queue); +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + *loop_context = (void*)TAILQ_NEXT(entry, inp_queue); +#else *loop_context = (void*)entry->INP_NEXT_SYMBOL; +#endif return index; } @@ -406,7 +450,13 @@ udpTable_free(netsnmp_cache *cache, void *magic) UDPTABLE_ENTRY_TYPE *p; while (udp_head) { p = udp_head; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 999010400 + udp_head = TAILQ_NEXT(udp_head, in4p_pcb.inp_queue); +#elif defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + udp_head = TAILQ_NEXT(udp_head, inp_queue); +#else udp_head = udp_head->INP_NEXT_SYMBOL; +#endif free(p); } @@ -467,9 +517,8 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/udpTable", "Failed to load UDP Table (hpux11)\n")); return -1; } -#else /* hpux11 */ -#ifdef linux +#elif defined(linux) int udpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -519,9 +568,20 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/udpTable", "Loaded UDP Table (linux)\n")); return 0; } -#else /* linux */ -#ifdef solaris2 +#elif defined(HAVE_KVM_GETFILES) + +int +udpTable_load(netsnmp_cache *cache, void *vmagic) +{ + int count; + udp_head = kvm_getfiles(kd, KERN_FILE_BYFILE, DTYPE_SOCKET, sizeof(struct kinfo_file), &count); + udp_size = count; + DEBUGMSGTL(("mibII/udpTable", "Loaded UDP Table (kvm_getfiles)\n")); + return 0; +} + +#elif defined(solaris2) static int UDP_Cmp(void *addr, void *ep) { @@ -586,9 +646,8 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/udpTable", "Failed to load UDP Table (solaris)\n")); return -1; } -#else /* solaris2 */ -#if defined (WIN32) || defined (cygwin) +#elif defined (WIN32) || defined (cygwin) int udpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -620,9 +679,8 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) free(pUdpTable); return -1; } -#else /* WIN32 cygwin*/ -#if (defined(NETSNMP_CAN_USE_SYSCTL) && defined(UDPCTL_PCBLIST)) +#elif (defined(NETSNMP_CAN_USE_SYSCTL) && defined(UDPCTL_PCBLIST)) int udpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -670,7 +728,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) nnew = SNMP_MALLOC_TYPEDEF(UDPTABLE_ENTRY_TYPE); if (!nnew) break; +#if __FreeBSD_version >= 1200026 + memcpy(&nnew->pcb, xig, sizeof(struct xinpcb)); +#else memcpy(&nnew->pcb, &((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb)); +#endif nnew->inp_next = udp_head; udp_head = nnew; #if defined(dragonfly) @@ -688,8 +750,8 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) DEBUGMSGTL(("mibII/udpTable", "Failed to load UDP Table (sysctl)\n")); return -1; } -#else /* (defined(NETSNMP_CAN_USE_SYSCTL) && defined(UDPCTL_PCBLIST)) */ -#ifdef PCB_TABLE + +#elif defined(PCB_TABLE) int udpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -706,7 +768,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) /* * Set up a linked list */ - entry = table.inpt_queue.cqh_first; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + entry = TAILQ_FIRST(&table.inpt_queue); +#else + entry = table.INP_FIRST_SYMBOL; +#endif while (entry) { nnew = SNMP_MALLOC_TYPEDEF(struct inpcb); @@ -718,11 +784,15 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) break; } - entry = nnew->inp_queue.cqe_next; /* Next kernel entry */ - nnew->inp_queue.cqe_next = udp_head; + entry = nnew->INP_NEXT_SYMBOL; /* Next kernel entry */ + nnew->INP_NEXT_SYMBOL = udp_head; udp_head = nnew; - if (entry == table.inpt_queue.cqh_first) +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + if (entry == TAILQ_FIRST(&table.inpt_queue)) +#else + if (entry == table.INP_FIRST_SYMBOL) +#endif break; } @@ -734,8 +804,7 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) return -1; } -#else /* PCB_TABLE */ -#ifdef UDB_SYMBOL +#elif defined(UDB_SYMBOL) int udpTable_load(netsnmp_cache *cache, void *vmagic) { @@ -764,11 +833,20 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) break; } +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + entry = TAILQ_NEXT(nnew, inp_queue); /* Next kernel entry */ + TAILQ_NEXT(nnew, inp_queue) = udp_head; +#else entry = nnew->INP_NEXT_SYMBOL; /* Next kernel entry */ nnew->INP_NEXT_SYMBOL = udp_head; +#endif udp_head = nnew; +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + if (entry == TAILQ_FIRST(&table.inpt_queue)) +#else if (entry == udp_inpcb.INP_NEXT_SYMBOL) +#endif break; } @@ -788,9 +866,3 @@ udpTable_load(netsnmp_cache *cache, void *vmagic) return -1; } #endif /* UDB_SYMBOL */ -#endif /* PCB_TABLE */ -#endif /* (defined(NETSNMP_CAN_USE_SYSCTL) && defined(UDPCTL_PCBLIST)) */ -#endif /* WIN32 cygwin*/ -#endif /* linux */ -#endif /* solaris2 */ -#endif /* hpux11 */ diff --git a/agent/mibgroup/mibII/udpTable.h b/agent/mibgroup/mibII/udpTable.h index f9afd5a..4eeddde 100644 --- a/agent/mibgroup/mibII/udpTable.h +++ b/agent/mibgroup/mibII/udpTable.h @@ -5,8 +5,10 @@ #ifndef _MIBGROUP_UDPTABLE_H #define _MIBGROUP_UDPTABLE_H -config_arch_require(solaris2, kernel_sunos5) -config_require(mibII/ip) +#ifdef solaris2 +config_require(kernel_sunos5); +#endif +config_require(mibII/ip); extern void init_udpTable(void); extern Netsnmp_Node_Handler udpTable_handler; diff --git a/agent/mibgroup/mibII/updates.c b/agent/mibgroup/mibII/updates.c index 938ea29..7fc99e3 100644 --- a/agent/mibgroup/mibII/updates.c +++ b/agent/mibgroup/mibII/updates.c @@ -1,6 +1,7 @@ #include #include #include +#include "updates.h" static int handle_updates(netsnmp_mib_handler *handler, diff --git a/agent/mibgroup/mibII/vacm_conf.c b/agent/mibgroup/mibII/vacm_conf.c index f2faf86..30911d9 100644 --- a/agent/mibgroup/mibII/vacm_conf.c +++ b/agent/mibgroup/mibII/vacm_conf.c @@ -10,34 +10,39 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -478,9 +483,9 @@ vacm_parse_authaccess(const char *token, char *confline) return; } - for (i = 0; i <= VACM_MAX_VIEWS; i++) { + for (i = 0; i < VACM_MAX_VIEWS; i++) { if (viewtypes & (1 << i)) { - strcpy(ap->views[i], view); + strlcpy(ap->views[i], view, sizeof(ap->views[i])); } } ap->contextMatch = prefix; @@ -542,7 +547,7 @@ vacm_parse_setaccess(const char *token, char *param) return; } - strcpy(ap->views[viewnum], viewval); + strlcpy(ap->views[viewnum], viewval, sizeof(ap->views[viewnum])); ap->contextMatch = iprefix; ap->storageType = SNMP_STORAGE_PERMANENT; ap->status = SNMP_ROW_ACTIVE; @@ -598,9 +603,12 @@ vacm_parse_access(const char *token, char *param) config_perror("failed to create access entry"); return; } - strcpy(ap->views[VACM_VIEW_READ], readView); - strcpy(ap->views[VACM_VIEW_WRITE], writeView); - strcpy(ap->views[VACM_VIEW_NOTIFY], notify); + strlcpy(ap->views[VACM_VIEW_READ], readView, + sizeof(ap->views[VACM_VIEW_READ])); + strlcpy(ap->views[VACM_VIEW_WRITE], writeView, + sizeof(ap->views[VACM_VIEW_WRITE])); + strlcpy(ap->views[VACM_VIEW_NOTIFY], notify, + sizeof(ap->views[VACM_VIEW_NOTIFY])); ap->contextMatch = iprefix; ap->storageType = SNMP_STORAGE_PERMANENT; ap->status = SNMP_ROW_ACTIVE; @@ -806,6 +814,10 @@ vacm_create_simple(const char *token, char *confline, char *view_ptr = viewname; #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) char addressname[SPRINT_MAX_LEN]; + /* Conveniently, the community-based security + model values can also be used as bit flags */ + int commversion = SNMP_SEC_MODEL_SNMPv1 | + SNMP_SEC_MODEL_SNMPv2c; #endif const char *rw = "none"; char model[SPRINT_MAX_LEN]; @@ -816,10 +828,6 @@ vacm_create_simple(const char *token, char *confline, char context[SPRINT_MAX_LEN]; int ctxprefix = 1; /* Default to matching all contexts */ static int commcount = 0; - /* Conveniently, the community-based security - model values can also be used as bit flags */ - int commversion = SNMP_SEC_MODEL_SNMPv1 | - SNMP_SEC_MODEL_SNMPv2c; /* * init @@ -1258,11 +1266,13 @@ vacm_check_view_contents(netsnmp_pdu *pdu, oid * name, size_t namelen, struct vacm_accessEntry *ap; struct vacm_groupEntry *gp; struct vacm_viewEntry *vp; +#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) char vacm_default_context[1] = ""; const char *contextName = vacm_default_context; + const char *pdu_community; +#endif const char *sn = NULL; char *vn; - const char *pdu_community; /* * len defined by the vacmContextName object @@ -1379,7 +1389,7 @@ vacm_check_view_contents(netsnmp_pdu *pdu, oid * name, size_t namelen, } } else -#endif /* support for community based SNMP */ +#endif /* !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) */ if (find_sec_mod(pdu->securityModel)) { /* * any legal defined v3 security model @@ -1388,7 +1398,6 @@ vacm_check_view_contents(netsnmp_pdu *pdu, oid * name, size_t namelen, "vacm_in_view: ver=%ld, model=%d, secName=%s\n", pdu->version, pdu->securityModel, pdu->securityName)); sn = pdu->securityName; - contextName = pdu->contextName; } else { sn = NULL; } diff --git a/agent/mibgroup/mibII/vacm_conf.h b/agent/mibgroup/mibII/vacm_conf.h index 7864ce1..a05bb4c 100644 --- a/agent/mibgroup/mibII/vacm_conf.h +++ b/agent/mibgroup/mibII/vacm_conf.h @@ -7,7 +7,7 @@ #include -config_belongs_in(agent_module) +config_belongs_in(agent_module); #define VACM_CREATE_SIMPLE_V3 1 #define VACM_CREATE_SIMPLE_COM 2 diff --git a/agent/mibgroup/mibII/vacm_context.c b/agent/mibgroup/mibII/vacm_context.c index 8f43cd3..09d2bf0 100644 --- a/agent/mibgroup/mibII/vacm_context.c +++ b/agent/mibgroup/mibII/vacm_context.c @@ -1,6 +1,17 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -95,7 +106,7 @@ init_vacm_context(void) if (!table_info || !iinfo) { SNMP_FREE(table_info); SNMP_FREE(iinfo); - SNMP_FREE(my_handler); + netsnmp_handler_registration_free(my_handler); return; } diff --git a/agent/mibgroup/mibII/vacm_vars.c b/agent/mibgroup/mibII/vacm_vars.c index 85cef94..0b71920 100644 --- a/agent/mibgroup/mibII/vacm_vars.c +++ b/agent/mibgroup/mibII/vacm_vars.c @@ -10,34 +10,39 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -49,11 +54,11 @@ #include "vacm_vars.h" #include "util_funcs/header_generic.h" -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -103,7 +108,7 @@ init_vacm_vars(void) var_vacm_view, 3, {2, 1, 4}}, {VIEWSTORAGE, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE, var_vacm_view, 3, {2, 1, 5}}, - {VIEWSTATUS, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE, + {VACMVIEWSTATUS, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE, var_vacm_view, 3, {2, 1, 6}}, }; @@ -145,7 +150,7 @@ var_vacm_sec2group(struct variable * vp, struct vacm_groupEntry *gp; oid *groupSubtree; ssize_t groupSubtreeLen; - int secmodel; + oid secmodel; char secname[VACMSTRINGLEN], *cp; /* @@ -267,7 +272,7 @@ var_vacm_access(struct variable * vp, int exact, size_t * var_len, WriteMethod ** write_method) { struct vacm_accessEntry *gp; - int secmodel, seclevel; + oid secmodel, seclevel; char groupName[VACMSTRINGLEN] = { 0 }; char contextPrefix[VACMSTRINGLEN] = { 0 }; oid *op; @@ -372,11 +377,12 @@ var_vacm_access(struct variable * vp, if (len > VACM_MAX_STRING) return NULL; cp = groupName; - for (i = 0; i <= len; i++) { + for (i = 0; i <= len && op < name + *length; i++) { if (*op > 255) { - return NULL; /* illegal value */ - } - *cp++ = (char) *op++; + *cp++ = (char) 255; + ++op; + } else + *cp++ = (char) *op++; } *cp = 0; } @@ -386,11 +392,12 @@ var_vacm_access(struct variable * vp, if (len > VACM_MAX_STRING) return NULL; cp = contextPrefix; - for (i = 0; i <= len; i++) { + for (i = 0; i <= len && op < name + *length; i++) { if (*op > 255) { - return NULL; /* illegal value */ - } - *cp++ = (char) *op++; + *cp++ = (char) 255; + ++op; + } else + *cp++ = (char) *op++; } *cp = 0; } @@ -515,7 +522,7 @@ var_vacm_view(struct variable * vp, case VIEWSTORAGE: *write_method = write_vacmViewStorageType; break; - case VIEWSTATUS: + case VACMVIEWSTATUS: *write_method = write_vacmViewStatus; break; #endif /* !NETSNMP_NO_WRITE_SUPPORT */ @@ -583,9 +590,10 @@ var_vacm_view(struct variable * vp, cp = viewName; for (i = 0; i <= len && op < name + *length; i++) { if (*op > 255) { - return NULL; - } - *cp++ = (char) *op++; + *cp++ = (char) 255; + ++op; + } else + *cp++ = (char) *op++; } *cp = 0; } @@ -662,7 +670,7 @@ var_vacm_view(struct variable * vp, long_return = gp->viewStorageType; return (u_char *) & long_return; - case VIEWSTATUS: + case VACMVIEWSTATUS: long_return = gp->viewStatus; return (u_char *) & long_return; } @@ -989,6 +997,9 @@ access_parse_oid(oid * oidIndex, size_t oidLen, return 1; } groupNameL = oidIndex[0]; + if ((groupNameL + 1) > (int) oidLen) { + return 1; + } contextPrefixL = oidIndex[groupNameL + 1]; /* the initial name length */ if ((int) oidLen != groupNameL + contextPrefixL + 4) { return 1; diff --git a/agent/mibgroup/mibII/vacm_vars.h b/agent/mibgroup/mibII/vacm_vars.h index 471f759..d9cc1de 100644 --- a/agent/mibgroup/mibII/vacm_vars.h +++ b/agent/mibgroup/mibII/vacm_vars.h @@ -7,11 +7,11 @@ #include -config_require(util_funcs/header_generic) -config_require(mibII/vacm_context) -config_require(mibII/vacm_conf) -config_add_mib(SNMP-VIEW-BASED-ACM-MIB) -config_add_mib(SNMP-COMMUNITY-MIB) +config_require(util_funcs/header_generic); +config_require(mibII/vacm_context); +config_require(mibII/vacm_conf); +config_add_mib(SNMP-VIEW-BASED-ACM-MIB); +config_add_mib(SNMP-COMMUNITY-MIB); void init_vacm_vars(void); diff --git a/agent/mibgroup/mibII/var_route.c b/agent/mibgroup/mibII/var_route.c index 72a503f..54e6075 100644 --- a/agent/mibgroup/mibII/var_route.c +++ b/agent/mibgroup/mibII/var_route.c @@ -45,6 +45,7 @@ PERFORMANCE OF THIS SOFTWARE. * (simon@switch.ch) 1997 */ + #include #include @@ -64,7 +65,11 @@ PERFORMANCE OF THIS SOFTWARE. #include "struct.h" #include "util_funcs.h" -netsnmp_feature_child_of(get_routes, libnetsnmpmibs) +#if defined(cygwin) || defined(mingw32) +#include +#endif + +netsnmp_feature_child_of(get_routes, libnetsnmpmibs); #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) @@ -75,8 +80,6 @@ netsnmp_feature_child_of(get_routes, libnetsnmpmibs) #include #endif /* hpux */ -extern WriteMethod write_rte; - #if !defined (WIN32) && !defined (cygwin) #ifdef USE_SYSCTL_ROUTE_DUMP @@ -87,9 +90,6 @@ static unsigned char *all_routes = 0; static unsigned char *all_routes_end; static size_t all_routes_size; -extern const struct sockaddr *get_address(const void *, int, int); -extern const struct in_addr *get_in_address(const void *, int, int); - /* * var_ipRouteEntry(... * Arguments: @@ -111,10 +111,14 @@ var_ipRouteEntry(struct variable *vp, * 1.3.6.1.2.1.4.21.1.1.A.B.C.D, where A.B.C.D is IP address. * IPADDR starts at offset 10. */ - struct rt_msghdr *rtp, *saveRtp = 0; + struct rt_msghdr *rtp; register int Save_Valid, result; +#if 0 + struct rt_msghdr *saveRtp = 0; static int saveNameLen = 0, saveExact = 0; - static oid saveName[MAX_OID_LEN], Current[MAX_OID_LEN]; + static oid saveName[MAX_OID_LEN]; +#endif + static oid Current[MAX_OID_LEN]; u_char *cp; u_char *ap; oid *op; @@ -209,6 +213,7 @@ var_ipRouteEntry(struct variable *vp, } if (ap >= all_routes_end || rtp->rtm_type == 0) return 0; +#if 0 /* * Save in the 'cache' */ @@ -218,6 +223,7 @@ var_ipRouteEntry(struct variable *vp, saveNameLen = *length; saveExact = exact; saveRtp = rtp; +#endif /* * Return the name */ @@ -241,25 +247,25 @@ var_ipRouteEntry(struct variable *vp, long_return = (rtp->rtm_flags & RTF_UP) ? 1 : 0; return (u_char *) & long_return; case IPROUTEMETRIC2: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = -1; return (u_char *) & long_return; case IPROUTEMETRIC3: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = -1; return (u_char *) & long_return; case IPROUTEMETRIC4: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = -1; return (u_char *) & long_return; case IPROUTEMETRIC5: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = -1; @@ -285,7 +291,7 @@ var_ipRouteEntry(struct variable *vp, ? 2 : (rtp->rtm_flags & RTF_DYNAMIC) ? 4 : 1; return (u_char *) & long_return; case IPROUTEAGE: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 0; @@ -402,13 +408,13 @@ init_var_route(void) #ifndef solaris2 -#if NEED_KLGETSA +#ifdef NEED_KLGETSA static union { struct sockaddr_in sin; u_short data[128]; } klgetsatmp; -struct sockaddr_in * +static struct sockaddr_in * klgetsa(struct sockaddr_in *dst) { if (!NETSNMP_KLOOKUP(dst, (char *) &klgetsatmp.sin, sizeof klgetsatmp.sin)) { @@ -443,7 +449,7 @@ var_ipRouteEntry(struct variable * vp, u_char *cp; oid *op; static in_addr_t addr_ret; -#if NEED_KLGETSA +#ifdef NEED_KLGETSA struct sockaddr_in *sa; #endif #if !defined(linux) && !defined(hpux11) @@ -457,7 +463,7 @@ var_ipRouteEntry(struct variable * vp, ** this optimisation fails, if there is only a single route avail. ** it is a very special case, but better leave it out ... **/ -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES saveNameLen = 0; #endif if (rtsize <= 1) @@ -505,7 +511,7 @@ var_ipRouteEntry(struct variable * vp, Route_Scan_Reload(); #endif for (RtIndex = 0; RtIndex < rtsize; RtIndex++) { -#if NEED_KLGETSA +#ifdef NEED_KLGETSA sa = klgetsa((struct sockaddr_in *) rthead[RtIndex]->rt_dst); cp = (u_char *) & (sa->sin_addr.s_addr); #elif defined(hpux11) @@ -548,7 +554,7 @@ var_ipRouteEntry(struct variable * vp, switch (vp->magic) { case IPROUTEDEST: *var_len = sizeof(addr_ret); -#if NEED_KLGETSA +#ifdef NEED_KLGETSA sa = klgetsa((struct sockaddr_in *) rthead[RtIndex]->rt_dst); return (u_char *) & (sa->sin_addr.s_addr); #elif defined(hpux11) @@ -600,14 +606,14 @@ var_ipRouteEntry(struct variable * vp, long_return = -1; return (u_char *) & long_return; case IPROUTEMETRIC5: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = -1; return (u_char *) & long_return; case IPROUTENEXTHOP: *var_len = sizeof(addr_ret); -#if NEED_KLGETSA +#ifdef NEED_KLGETSA sa = klgetsa((struct sockaddr_in *) rthead[RtIndex]->rt_gateway); return (u_char *) & (sa->sin_addr.s_addr); #elif defined(hpux11) @@ -650,12 +656,12 @@ var_ipRouteEntry(struct variable * vp, return (u_char *) & long_return; case IPROUTEMASK: *var_len = sizeof(addr_ret); -#if NEED_KLGETSA +#ifdef NEED_KLGETSA /* * XXX - Almost certainly not right * but I don't have a suitable system to test this on */ -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif addr_ret = 0; @@ -772,6 +778,8 @@ var_ipRouteEntry(struct variable * vp, if(entry.ipRouteInfo.re_ire_type&IRE_CACHE) continue; #endif /* HAVE_DEFINED_IRE_CACHE */ + if(entry.ipRouteInfo.re_ire_type & IRE_BROADCAST) + continue; COPY_IPADDR(cp, (u_char *) & entry.ipRouteDest, op, current + IP_ROUTEADDR_OFF); if (exact) { @@ -820,16 +828,10 @@ var_ipRouteEntry(struct variable * vp, addr_ret = Lowentry.ipRouteDest; return (u_char *) & addr_ret; case IPROUTEIFINDEX: -#ifdef NETSNMP_INCLUDE_IFTABLE_REWRITES Lowentry.ipRouteIfIndex.o_bytes[Lowentry.ipRouteIfIndex.o_length] = '\0'; long_return = netsnmp_access_interface_index_find( Lowentry.ipRouteIfIndex.o_bytes); -#else - long_return = - Interface_Index_By_Name(Lowentry.ipRouteIfIndex.o_bytes, - Lowentry.ipRouteIfIndex.o_length); -#endif return (u_char *) & long_return; case IPROUTEMETRIC1: long_return = Lowentry.ipRouteMetric1; @@ -878,7 +880,7 @@ static int qsort_compare(const void *, const void *); #if defined(RTENTRY_4_4) || defined(RTENTRY_RT_NEXT) || defined (hpux11) #if defined(RTENTRY_4_4) && !defined(hpux11) -void +static void load_rtentries(struct radix_node *pt) { struct radix_node node; @@ -918,7 +920,7 @@ load_rtentries(struct radix_node *pt) DEBUGMSGTL(("mibII/var_route", "klookup failed\n")); return; } -#if HAVE_STRUCT_IFNET_IF_XNAME +#ifdef HAVE_STRUCT_IFNET_IF_XNAME #if defined(netbsd1) || defined(openbsd2) strlcpy(name, ifnet.if_xname, sizeof(name)); #else @@ -952,7 +954,7 @@ load_rtentries(struct radix_node *pt) break; } } -#if CHECK_RT_FLAGS +#ifdef CHECK_RT_FLAGS if (((rt.rt_flags & RTF_CLONING) != RTF_CLONING) && ((rt.rt_flags & RTF_LLINFO) != RTF_LLINFO)) { #endif @@ -976,7 +978,7 @@ load_rtentries(struct radix_node *pt) */ memcpy((char *) rthead[rtsize], (char *) &rt, sizeof(RTENTRY)); rtsize++; -#if CHECK_RT_FLAGS +#ifdef CHECK_RT_FLAGS } #endif @@ -1181,9 +1183,9 @@ Route_Scan_Reload(void) #else -#if HAVE_SYS_MBUF_H -netsnmp_feature_require(string_append_int) -netsnmp_feature_require(interface_legacy) +#ifdef HAVE_SYS_MBUF_H +netsnmp_feature_require(string_append_int); +netsnmp_feature_require(interface_legacy); static void Route_Scan_Reload(void) { @@ -1433,7 +1435,7 @@ qsort_compare(const void *v1, const void *v2) { RTENTRY * const *r1 = (RTENTRY * const *) v1; RTENTRY * const *r2 = (RTENTRY * const *) v2; -#if NEED_KLGETSA +#ifdef NEED_KLGETSA register u_long dst1 = ntohl(klgetsa((const struct sockaddr_in *) (*r1)->rt_dst)-> sin_addr.s_addr); @@ -1505,7 +1507,7 @@ var_ipRouteEntry(struct variable *vp, ** this optimisation fails, if there is only a single route avail. ** it is a very special case, but better leave it out ... **/ -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES saveNameLen = 0; #endif if (route_row == NULL) { @@ -1854,8 +1856,11 @@ var_ipRouteEntry(struct variable * vp, oid *op; struct snmprt *rt; static struct snmprt *savert; +#if 0 static int saveNameLen, saveExact; - static oid saveName[14], Current[14]; + static oid saveName[14]; +#endif + static oid Current[14]; static in_addr_t addr_ret; *write_method = NULL; /* write_rte; XXX: SET support not really implemented */ @@ -1913,6 +1918,7 @@ var_ipRouteEntry(struct variable * vp, if (rt == NULL) return NULL; +#if 0 /* * Save in the 'cache' */ @@ -1921,6 +1927,7 @@ var_ipRouteEntry(struct variable * vp, saveNameLen = *length; saveExact = exact; savert = rt; +#endif /* * Return the name @@ -1984,7 +1991,7 @@ var_ipRouteEntry(struct variable * vp, return (u_char *) & long_return; case IPROUTEAGE: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_return = 0; @@ -2051,7 +2058,7 @@ snmp_socket_length(int family) case AF_LINK: #ifdef _MAX_SA_LEN length = _MAX_SA_LEN; -#elif SOCK_MAXADDRLEN +#elif defined(SOCK_MAXADDRLEN) length = SOCK_MAXADDRLEN; #else length = sizeof(struct sockaddr_dl); diff --git a/agent/mibgroup/mibII/var_route.h b/agent/mibgroup/mibII/var_route.h index 7862c43..0a2c3a3 100644 --- a/agent/mibgroup/mibII/var_route.h +++ b/agent/mibgroup/mibII/var_route.h @@ -5,17 +5,18 @@ #ifndef _MIBGROUP_VAR_ROUTE_H #define _MIBGROUP_VAR_ROUTE_H -config_require(mibII/ip) -config_arch_require(solaris2, kernel_sunos5) - - void init_var_route(void); -#if defined(RTENTRY_4_4) && !defined(hpux11) - struct radix_node; - void load_rtentries(struct radix_node *); +config_require(mibII/ip); +#ifdef solaris2 +config_require(kernel_sunos5); #endif -#if defined(freebsd2) || defined(netbsd1) || defined(bsdi2) || defined(openbsd2) - struct sockaddr_in *klgetsa(struct sockaddr_in *); + +#if defined(HAVE_IPHLPAPI_H) +#include + extern PMIB_IPFORWARDROW route_row; #endif + extern int create_flag; + + void init_var_route(void); extern FindVarMethod var_ipRouteEntry; diff --git a/agent/mibgroup/mibincl.h b/agent/mibgroup/mibincl.h index 3d48768..cbcfba3 100644 --- a/agent/mibgroup/mibincl.h +++ b/agent/mibgroup/mibincl.h @@ -5,17 +5,17 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include diff --git a/agent/mibgroup/misc/ipfwacc.c b/agent/mibgroup/misc/ipfwacc.c index cca9871..23568cc 100644 --- a/agent/mibgroup/misc/ipfwacc.c +++ b/agent/mibgroup/misc/ipfwacc.c @@ -8,11 +8,11 @@ #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -101,7 +101,7 @@ static unsigned long ret_val; /* Used by var_ipfwacc to return ulongs */ * * this because stol returns a signed long. */ -static inline void +NETSNMP_STATIC_INLINE void atoip(int pos) { int i; @@ -256,7 +256,7 @@ var_ipfwacc(struct variable *vp, size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { - *write_method = 0; /* assume it isnt writable for the time being */ + *write_method = NULL; /* assume it isnt writable for the time being */ *var_len = sizeof(ret_val); /* assume an integer and change later if not */ if (header_simple_table diff --git a/agent/mibgroup/misc/ipfwacc.h b/agent/mibgroup/misc/ipfwacc.h index 639c739..b83494e 100644 --- a/agent/mibgroup/misc/ipfwacc.h +++ b/agent/mibgroup/misc/ipfwacc.h @@ -9,12 +9,12 @@ * we use header_simple_table from the util_funcs module */ -config_require(util_funcs/header_simple_table) +config_require(util_funcs/header_simple_table); /* * add the mib we implement to the list of default mibs to load */ -config_add_mib(UCD-IPFWACC-MIB) +config_add_mib(UCD-IPFWACC-MIB); /* * Magic number definitions: diff --git a/agent/mibgroup/notification-log-mib.h b/agent/mibgroup/notification-log-mib.h index 925190d..2495f6a 100644 --- a/agent/mibgroup/notification-log-mib.h +++ b/agent/mibgroup/notification-log-mib.h @@ -1,2 +1,2 @@ -config_require(notification-log-mib/notification_log) -config_require(notification/snmpNotifyTable) +config_require(notification-log-mib/notification_log); +config_require(notification/snmpNotifyTable); diff --git a/agent/mibgroup/notification-log-mib/notification_log.c b/agent/mibgroup/notification-log-mib/notification_log.c index a12a338..04d3935 100644 --- a/agent/mibgroup/notification-log-mib/notification_log.c +++ b/agent/mibgroup/notification-log-mib/notification_log.c @@ -2,10 +2,10 @@ #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -20,11 +20,11 @@ #include "net-snmp/agent/sysORTable.h" #include "notification_log.h" -netsnmp_feature_require(register_ulong_instance_context) -netsnmp_feature_require(register_read_only_counter32_instance_context) -netsnmp_feature_require(delete_table_data_set) -netsnmp_feature_require(table_dataset) -netsnmp_feature_require(date_n_time) +netsnmp_feature_require(register_ulong_instance_context); +netsnmp_feature_require(register_read_only_counter32_instance_context); +netsnmp_feature_require(delete_table_data_set); +netsnmp_feature_require(table_dataset); +netsnmp_feature_require(date_n_time); /* * column number definitions for table nlmLogTable diff --git a/agent/mibgroup/notification.h b/agent/mibgroup/notification.h index ff3a3ea..b748d02 100644 --- a/agent/mibgroup/notification.h +++ b/agent/mibgroup/notification.h @@ -1,4 +1,4 @@ -config_require(notification/snmpNotifyTable) -config_require(snmp-notification-mib/snmpNotifyFilterTable) -config_require(notification/snmpNotifyFilterProfileTable) +config_require(notification/snmpNotifyTable); +config_require(snmp-notification-mib/snmpNotifyFilterTable); +config_require(notification/snmpNotifyFilterProfileTable); diff --git a/agent/mibgroup/notification/notification_data.h b/agent/mibgroup/notification/notification_data.h new file mode 100644 index 0000000..caff9c0 --- /dev/null +++ b/agent/mibgroup/notification/notification_data.h @@ -0,0 +1,4 @@ + +config_require(notification/snmpNotifyTable_data); +config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage); +config_require(notification/snmpNotifyFilterProfileTable_data); diff --git a/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c b/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c index e9b11d3..65e668c 100644 --- a/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c +++ b/agent/mibgroup/notification/snmpNotifyFilterProfileTable.c @@ -1,6 +1,11 @@ /* * This file was generated by mib2c and is intended for use as * a mib module for the ucd-snmp snmpd agent. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ @@ -10,10 +15,10 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -28,10 +33,11 @@ #include #include "header_complex.h" +#include "snmpNotifyTable_data.h" #include "snmpNotifyFilterProfileTable.h" #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /* @@ -44,6 +50,8 @@ netsnmp_feature_require(header_complex_find_entry) oid snmpNotifyFilterProfileTable_variables_oid[] = { 1, 3, 6, 1, 6, 3, 13, 1, 2 }; +static const size_t table_offset = + sizeof(snmpNotifyFilterProfileTable_variables_oid)/sizeof(oid) + 3 - 1; /* @@ -76,9 +84,6 @@ struct variable2 snmpNotifyFilterProfileTable_variables[] = { /* * global storage of our data, saved in and configured by header_complex() */ -static struct header_complex_index *snmpNotifyFilterProfileTableStorage = - NULL; - @@ -92,6 +97,7 @@ init_snmpNotifyFilterProfileTable(void) { DEBUGMSGTL(("snmpNotifyFilterProfileTable", "initializing... ")); + init_snmpNotifyFilterProfileTable_data(); /* * register ourselves with the agent to handle our mib tree @@ -101,23 +107,6 @@ init_snmpNotifyFilterProfileTable(void) snmpNotifyFilterProfileTable_variables_oid); - /* - * register our config handler(s) to deal with registrations - */ - snmpd_register_config_handler("snmpNotifyFilterProfileTable", - parse_snmpNotifyFilterProfileTable, NULL, - NULL); - - - - - /* - * we need to be called back later to store our data - */ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - store_snmpNotifyFilterProfileTable, NULL); - - /* * place any other initialization junk you need here */ @@ -126,160 +115,13 @@ init_snmpNotifyFilterProfileTable(void) DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); } - -/* - * snmpNotifyFilterProfileTable_add(): adds a structure node to our data set - */ -int -snmpNotifyFilterProfileTable_add(struct snmpNotifyFilterProfileTable_data - *thedata) -{ - netsnmp_variable_list *vars = NULL; - int retVal; - - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "adding data... ")); - /* - * add the index variables to the varbind list, which is - * used by header_complex to index the data - */ - - snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OCTET_STR, - (u_char *) thedata->snmpTargetParamsName, - thedata->snmpTargetParamsNameLen); - - if (header_complex_maybe_add_data(&snmpNotifyFilterProfileTableStorage, vars, - thedata, 1) != NULL){ - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "registered an entry\n")); - retVal = SNMPERR_SUCCESS; - }else{ - retVal = SNMPERR_GENERR; - } - - - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); - return retVal; -} - - -/* - * parse_snmpNotifyFilterProfileTable(): - * parses .conf file entries needed to configure the mib. - */ void -parse_snmpNotifyFilterProfileTable(const char *token, char *line) -{ - size_t tmpint; - struct snmpNotifyFilterProfileTable_data *StorageTmp = - SNMP_MALLOC_STRUCT(snmpNotifyFilterProfileTable_data); - - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "parsing config... ")); - - if (StorageTmp == NULL) { - config_perror("malloc failure"); - return; - } - - line = - read_config_read_data(ASN_OCTET_STR, line, - &StorageTmp->snmpTargetParamsName, - &StorageTmp->snmpTargetParamsNameLen); - if (StorageTmp->snmpTargetParamsName == NULL) { - config_perror("invalid specification for snmpTargetParamsName"); - return; - } - - line = - read_config_read_data(ASN_OCTET_STR, line, - &StorageTmp->snmpNotifyFilterProfileName, - &StorageTmp->snmpNotifyFilterProfileNameLen); - if (StorageTmp->snmpNotifyFilterProfileName == NULL) { - config_perror("invalid specification for snmpNotifyFilterProfileName"); - SNMP_FREE(StorageTmp); - return; - } - - line = - read_config_read_data(ASN_INTEGER, line, - &StorageTmp->snmpNotifyFilterProfileStorType, - &tmpint); - - line = - read_config_read_data(ASN_INTEGER, line, - &StorageTmp-> - snmpNotifyFilterProfileRowStatus, &tmpint); - - if (snmpNotifyFilterProfileTable_add(StorageTmp) != SNMPERR_SUCCESS){ - SNMP_FREE(StorageTmp->snmpTargetParamsName); - SNMP_FREE(StorageTmp->snmpNotifyFilterProfileName); - SNMP_FREE(StorageTmp); - } - - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); -} - - - - -/* - * store_snmpNotifyFilterProfileTable(): - * stores .conf file entries needed to configure the mib. - */ -int -store_snmpNotifyFilterProfileTable(int majorID, int minorID, - void *serverarg, void *clientarg) +shutdown_snmpNotifyFilterProfileTable(void) { - char line[SNMP_MAXBUF]; - char *cptr; - struct snmpNotifyFilterProfileTable_data *StorageTmp; - struct header_complex_index *hcindex; - - - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "storing data... ")); - - for (hcindex = snmpNotifyFilterProfileTableStorage; hcindex != NULL; - hcindex = hcindex->next) { - StorageTmp = - (struct snmpNotifyFilterProfileTable_data *) hcindex->data; - - if ((StorageTmp->snmpNotifyFilterProfileStorType == ST_NONVOLATILE) || - (StorageTmp->snmpNotifyFilterProfileStorType == ST_PERMANENT)) { - - memset(line, 0, sizeof(line)); - strcat(line, "snmpNotifyFilterProfileTable "); - cptr = line + strlen(line); - - cptr = - read_config_store_data(ASN_OCTET_STR, cptr, - &StorageTmp->snmpTargetParamsName, - &StorageTmp-> - snmpTargetParamsNameLen); - cptr = - read_config_store_data(ASN_OCTET_STR, cptr, - &StorageTmp-> - snmpNotifyFilterProfileName, - &StorageTmp-> - snmpNotifyFilterProfileNameLen); - cptr = - read_config_store_data(ASN_INTEGER, cptr, - &StorageTmp-> - snmpNotifyFilterProfileStorType, - NULL); - cptr = - read_config_store_data(ASN_INTEGER, cptr, - &StorageTmp-> - snmpNotifyFilterProfileRowStatus, - NULL); - - snmpd_store_config(line); - } - } - DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); - return 0; + shutdown_snmpNotifyFilterProfileTable_data(); } - - /* * var_snmpNotifyFilterProfileTable(): * Handle this table separately from the scalar value case. @@ -304,12 +146,11 @@ var_snmpNotifyFilterProfileTable(struct variable *vp, /* * this assumes you have registered all your data properly */ - if ((StorageTmp = (struct snmpNotifyFilterProfileTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyFilterProfileTableStorage, vp, name, - length, exact, var_len, write_method)) == NULL) { + StorageTmp = snmpNotifyFilterProfileTable_oldapi_find(vp, name, length, + exact, var_len, + write_method); + if (StorageTmp == NULL) found = 0; - } switch (vp->magic) { #ifndef NETSNMP_NO_WRITE_SUPPORT @@ -375,23 +216,15 @@ write_snmpNotifyFilterProfileName(int action, static char *tmpvar; struct snmpNotifyFilterProfileTable_data *StorageTmp = NULL; static size_t tmplen; - size_t newlen = - name_len - - (sizeof(snmpNotifyFilterProfileTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - table_offset; DEBUGMSGTL(("snmpNotifyFilterProfileTable", "write_snmpNotifyFilterProfileName entering action=%d... \n", action)); if (action != RESERVE1 && - (StorageTmp = (struct snmpNotifyFilterProfileTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyFilterProfileTableStorage, NULL, - &name[sizeof - (snmpNotifyFilterProfileTable_variables_oid) - / sizeof(oid) + 3 - 1], &newlen, 1, NULL, - NULL)) == NULL) { + (StorageTmp = snmpNotifyFilterProfileTable_oldapi_find( + NULL, &name[table_offset], &newlen, 1, NULL, NULL)) == NULL) { if ((StorageTmp = StorageNew) == NULL) return SNMP_ERR_NOSUCHNAME; /* remove if you support creation here */ } @@ -402,7 +235,7 @@ write_snmpNotifyFilterProfileName(int action, if (var_val_type != ASN_OCTET_STR) { return SNMP_ERR_WRONGTYPE; } - if (var_val_len < 1 || var_val_len > 32) { + if (var_val_len < 1 || var_val_len > NOTIFY_NAME_MAX) { return SNMP_ERR_WRONGLENGTH; } break; @@ -473,23 +306,15 @@ write_snmpNotifyFilterProfileStorType(int action, static int tmpvar; long value = *((long *) var_val); struct snmpNotifyFilterProfileTable_data *StorageTmp = NULL; - size_t newlen = - name_len - - (sizeof(snmpNotifyFilterProfileTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - table_offset; DEBUGMSGTL(("snmpNotifyFilterProfileTable", "write_snmpNotifyFilterProfileStorType entering action=%d... \n", action)); if (action != RESERVE1 && - (StorageTmp = (struct snmpNotifyFilterProfileTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyFilterProfileTableStorage, NULL, - &name[sizeof - (snmpNotifyFilterProfileTable_variables_oid) - / sizeof(oid) + 3 - 1], &newlen, 1, NULL, - NULL)) == NULL) { + (StorageTmp = snmpNotifyFilterProfileTable_oldapi_find( + NULL, &name[table_offset], &newlen, 1, NULL, NULL)) == NULL) { if ((StorageTmp = StorageNew) == NULL) return SNMP_ERR_NOSUCHNAME; /* remove if you support creation here */ } @@ -568,25 +393,17 @@ write_snmpNotifyFilterProfileRowStatus(int action, { struct snmpNotifyFilterProfileTable_data *StorageTmp = NULL; static struct snmpNotifyFilterProfileTable_data *StorageDel; - size_t newlen = - name_len - - (sizeof(snmpNotifyFilterProfileTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - table_offset; static int old_value; int set_value = *((long *) var_val); netsnmp_variable_list *vars; - struct header_complex_index *hciptr; DEBUGMSGTL(("snmpNotifyFilterProfileTable", "write_snmpNotifyFilterProfileRowStatus entering action=%d... \n", action)); - StorageTmp = (struct snmpNotifyFilterProfileTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyFilterProfileTableStorage, NULL, - &name[sizeof - (snmpNotifyFilterProfileTable_variables_oid) / - sizeof(oid) + 3 - 1], &newlen, 1, NULL, NULL); + StorageTmp = snmpNotifyFilterProfileTable_oldapi_find( + NULL, &name[table_offset], &newlen, 1, NULL, NULL); switch (action) { case RESERVE1: @@ -687,9 +504,7 @@ write_snmpNotifyFilterProfileRowStatus(int action, * Release any resources that have been allocated */ if (StorageNew != NULL) { - SNMP_FREE(StorageNew->snmpTargetParamsName); - SNMP_FREE(StorageNew->snmpNotifyFilterProfileName); - free(StorageNew); + snmpNotifyFilterProfileTable_free(StorageNew); StorageNew = NULL; } break; @@ -731,14 +546,8 @@ write_snmpNotifyFilterProfileRowStatus(int action, * destroy... extract it for now */ if (StorageTmp) { - hciptr = - header_complex_find_entry - (snmpNotifyFilterProfileTableStorage, StorageTmp); - StorageDel = (struct snmpNotifyFilterProfileTable_data *) - header_complex_extract_entry((struct - header_complex_index **) - &snmpNotifyFilterProfileTableStorage, - hciptr); + StorageDel = + snmpNotifyFilterProfileTable_extract(StorageTmp); } } @@ -754,14 +563,8 @@ write_snmpNotifyFilterProfileRowStatus(int action, /* * row creation, so remove it again */ - hciptr = - header_complex_find_entry - (snmpNotifyFilterProfileTableStorage, StorageNew); - StorageDel = (struct snmpNotifyFilterProfileTable_data *) - header_complex_extract_entry((struct header_complex_index - **) - &snmpNotifyFilterProfileTableStorage, - hciptr); + StorageDel = + snmpNotifyFilterProfileTable_extract(StorageNew); /* * XXX: free it */ @@ -786,9 +589,7 @@ write_snmpNotifyFilterProfileRowStatus(int action, * permanently. Make sure that anything done here can't fail! */ if (StorageDel != NULL) { - SNMP_FREE(StorageDel->snmpTargetParamsName); - SNMP_FREE(StorageDel->snmpNotifyFilterProfileName); - free(StorageDel); + snmpNotifyFilterProfileTable_free(StorageDel); StorageDel = NULL; } if (StorageTmp && set_value == RS_CREATEANDGO) { @@ -808,40 +609,3 @@ write_snmpNotifyFilterProfileRowStatus(int action, #endif /* !NETSNMP_NO_WRITE_SUPPORT */ - - -char * -get_FilterProfileName(const char *paramName, size_t paramName_len, - size_t * profileName_len) -{ - netsnmp_variable_list *vars = NULL; - struct snmpNotifyFilterProfileTable_data *data; - - /* - * put requested info into var structure - */ - snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OCTET_STR, - (const u_char *) paramName, paramName_len); - - /* - * get the data from the header_complex storage - */ - data = (struct snmpNotifyFilterProfileTable_data *) - header_complex_get(snmpNotifyFilterProfileTableStorage, vars); - - /* - * free search index - */ - snmp_free_var(vars); - - /* - * return the requested information (if this row is active) - */ - if (data && data->snmpNotifyFilterProfileRowStatus == RS_ACTIVE) { - *profileName_len = data->snmpNotifyFilterProfileNameLen; - return data->snmpNotifyFilterProfileName; - } - - *profileName_len = 0; - return NULL; -} diff --git a/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h b/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h index 616bcdc..e7e3f75 100644 --- a/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h +++ b/agent/mibgroup/notification/snmpNotifyFilterProfileTable.h @@ -1,6 +1,11 @@ /* * This file was generated by mib2c and is intended for use as a mib module * for the ucd-snmp snmpd agent. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ @@ -11,45 +16,16 @@ /* * we may use header_complex from the header_complex module */ +config_require(notification/snmpNotifyFilterProfileTable_data); - -config_require(header_complex) - - - /* - * our storage structure(s) - */ - struct snmpNotifyFilterProfileTable_data { - - char *snmpTargetParamsName; - size_t snmpTargetParamsNameLen; - char *snmpNotifyFilterProfileName; - size_t snmpNotifyFilterProfileNameLen; - long snmpNotifyFilterProfileStorType; - long snmpNotifyFilterProfileRowStatus; - - }; - - - - -/* - * enum definitions from the covered mib sections - */ - - - - - - +#include "snmpNotifyFilterProfileTable_data.h" /* * function prototypes */ - - void init_snmpNotifyFilterProfileTable(void); + void shutdown_snmpNotifyFilterProfileTable(void); FindVarMethod var_snmpNotifyFilterProfileTable; void parse_snmpNotifyFilterProfileTable(const char *, char *); @@ -61,9 +37,4 @@ config_require(header_complex) WriteMethod write_snmpNotifyFilterProfileRowStatus; #endif /* !NETSNMP_NO_WRITE_SUPPORT */ - char *get_FilterProfileName(const char *paramName, - size_t paramName_len, - size_t * profileName_len); - - #endif /* _MIBGROUP_SNMPNOTIFYFILTERPROFILETABLE_H */ diff --git a/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c b/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c new file mode 100644 index 0000000..0532312 --- /dev/null +++ b/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.c @@ -0,0 +1,410 @@ +/* + * This file was generated by mib2c and is intended for use as + * a mib module for the ucd-snmp snmpd agent. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + + +/* + * This should always be included first before anything else + */ +#include + +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#else +#include +#endif + + +/* + * minimal include directives + */ +#include +#include +#include + +#include "header_complex.h" +#include "snmpNotifyTable_data.h" +#include "snmpNotifyFilterProfileTable_data.h" + + +/* + * global storage of our data, saved in and configured by header_complex() + */ +static struct header_complex_index *snmpNotifyFilterProfileTableStorage = + NULL; +static int _active = 0; + +void parse_snmpNotifyFilterProfileTable(const char *token, char *line); +int store_snmpNotifyFilterProfileTable(int majorID, int minorID, + void *serverarg, void *clientarg); + +/* + * init_snmpNotifyFilterProfileTable(): + * Initialization routine. This is called when the agent starts up. + * At a minimum, registration of your variables should take place here. + */ +void +init_snmpNotifyFilterProfileTable_data(void) +{ + int done = 0; + + if (++done != 1) + return; + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "initializing... ")); + + /* + * register our config handler(s) to deal with registrations + */ + snmpd_register_config_handler("snmpNotifyFilterProfileTable", + parse_snmpNotifyFilterProfileTable, NULL, + NULL); + + /* + * we need to be called back later to store our data + */ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + store_snmpNotifyFilterProfileTable, NULL); +} + +void +shutdown_snmpNotifyFilterProfileTable_data(void) +{ + struct header_complex_index *hptr, *nhptr; + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "shutdown... ")); + + for (hptr = snmpNotifyFilterProfileTableStorage; hptr; hptr = nhptr) { + struct snmpNotifyFilterProfileTable_data *nptr = hptr->data; + nhptr = hptr->next; + if (nptr->snmpNotifyFilterProfileStorType == ST_READONLY) { + header_complex_extract_entry(&snmpNotifyFilterProfileTableStorage, + hptr); + snmpNotifyFilterProfileTable_free(nptr); + } + } + snmpNotifyFilterProfileTableStorage = NULL; + + DEBUGMSGTL(("trap:notifyFilterProfile:shutdown", + "active count %d\n", _active)); + if (_active != 0) { + DEBUGMSGTL(("trap:notifyFilterProfile:shutdown", + "unexpected count %d after cleanup!\n", _active)); + snmp_log(LOG_WARNING, + "notifyFilterProfile count %d, not 0, after shutdown.\n", + _active); + } + +} + +void +snmpNotifyFilterProfileTable_free(struct snmpNotifyFilterProfileTable_data + *data) +{ + if (NULL == data) + return; + + SNMP_FREE(data->snmpTargetParamsName); + SNMP_FREE(data->snmpNotifyFilterProfileName); + free(data); + --_active; +} + +/* + * + */ +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_create(const char *paramsName, + size_t paramsName_len, + const char *profileName, + size_t profileName_len) +{ + struct snmpNotifyFilterProfileTable_data *profile = NULL; + + if ((paramsName_len > NOTIFY_NAME_MAX) || (0 == paramsName_len) || + (profileName_len > NOTIFY_NAME_MAX)|| (0 == profileName_len)) { + DEBUGMSGTL(("snmpNotifyFilterProfileTable", + "bad params or profile name\n")); + return NULL; + } + + profile = SNMP_MALLOC_STRUCT(snmpNotifyFilterProfileTable_data); + if (NULL == profile) { + snmp_log(LOG_ERR, + "could not allocate snmpNotifyFilterProfileTable_data\n"); + return NULL; + } + ++_active; + + profile->snmpTargetParamsName = malloc(paramsName_len+1); + profile->snmpNotifyFilterProfileName = malloc(profileName_len+1); + if (NULL == profile->snmpTargetParamsName || + NULL == profile->snmpNotifyFilterProfileName) { + snmp_log(LOG_ERR, + "could not allocate snmpNotifyFilterProfileTable_data data\n"); + snmpNotifyFilterProfileTable_free(profile); + return NULL; + } + + memcpy(profile->snmpTargetParamsName, paramsName, paramsName_len); + profile->snmpTargetParamsNameLen = paramsName_len; + profile->snmpTargetParamsName[paramsName_len] = 0; + + memcpy(profile->snmpNotifyFilterProfileName, profileName, profileName_len); + profile->snmpNotifyFilterProfileNameLen = profileName_len; + profile->snmpNotifyFilterProfileName[profileName_len] = 0; + + profile->snmpNotifyFilterProfileRowStatus = RS_NOTREADY; + profile->snmpNotifyFilterProfileStorType = ST_READONLY; + + return profile; +} + +/* + * snmpNotifyFilterProfileTable_add(): adds a structure node to our data set + */ +int +snmpNotifyFilterProfileTable_add(struct snmpNotifyFilterProfileTable_data + *thedata) +{ + netsnmp_variable_list *vars = NULL; + int retVal; + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "adding data... ")); + /* + * add the index variables to the varbind list, which is + * used by header_complex to index the data + */ + + snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OCTET_STR, + (u_char *) thedata->snmpTargetParamsName, + thedata->snmpTargetParamsNameLen); + + if (header_complex_maybe_add_data(&snmpNotifyFilterProfileTableStorage, vars, + thedata, 1) != NULL){ + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "registered an entry\n")); + retVal = SNMPERR_SUCCESS; + }else{ + retVal = SNMPERR_GENERR; + } + + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); + return retVal; +} + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_extract(struct snmpNotifyFilterProfileTable_data * + thedata) +{ + struct header_complex_index *hptr; + + for (hptr = snmpNotifyFilterProfileTableStorage; hptr; hptr = hptr->next) { + if (hptr->data == thedata) + break; + } + if (NULL != hptr) { + struct snmpNotifyFilterProfileTable_data *nptr = hptr->data; + header_complex_extract_entry(&snmpNotifyFilterProfileTableStorage, + hptr); + return nptr; + } + return NULL; +} + + +int +snmpNotifyFilterProfileTable_remove(struct snmpNotifyFilterProfileTable_data * + thedata) +{ + struct snmpNotifyFilterProfileTable_data * found = + snmpNotifyFilterProfileTable_extract(thedata); + if (NULL != found) { + snmpNotifyFilterProfileTable_free(found); + return 1; + } + return 0; +} + + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_find(const char *name, size_t len) +{ + netsnmp_variable_list *vars = NULL; + struct snmpNotifyFilterProfileTable_data *data; + + /* + * put requested info into var structure + */ + snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OCTET_STR, + (const u_char *) name, len); + + /* + * get the data from the header_complex storage + */ + data = (struct snmpNotifyFilterProfileTable_data *) + header_complex_get(snmpNotifyFilterProfileTableStorage, vars); + + /* + * free search index + */ + snmp_free_var(vars); + + return data; +} + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_oldapi_find(struct variable *vp, + oid *name, size_t *nameLen, int exact, + size_t *var_len, + WriteMethod ** write_method) +{ + return header_complex((struct header_complex_index *) + snmpNotifyFilterProfileTableStorage, vp, name, + nameLen, exact, var_len, write_method); +} + + +char * +get_FilterProfileName(const char *paramName, size_t paramName_len, + size_t * profileName_len) +{ + struct snmpNotifyFilterProfileTable_data *data = + snmpNotifyFilterProfileTable_find(paramName, paramName_len); + + /* + * return the requested information (if this row is active) + */ + if (data && data->snmpNotifyFilterProfileRowStatus == RS_ACTIVE) { + *profileName_len = data->snmpNotifyFilterProfileNameLen; + return data->snmpNotifyFilterProfileName; + } + + *profileName_len = 0; + return NULL; +} + +/* + * parse_snmpNotifyFilterProfileTable(): + * parses .conf file entries needed to configure the mib. + */ +void +parse_snmpNotifyFilterProfileTable(const char *token, char *line) +{ + size_t tmpint; + struct snmpNotifyFilterProfileTable_data *StorageTmp = + SNMP_MALLOC_STRUCT(snmpNotifyFilterProfileTable_data); + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "parsing config... ")); + + if (StorageTmp == NULL) { + config_perror("malloc failure"); + return; + } + + line = + read_config_read_data(ASN_OCTET_STR, line, + &StorageTmp->snmpTargetParamsName, + &StorageTmp->snmpTargetParamsNameLen); + if (StorageTmp->snmpTargetParamsName == NULL) { + config_perror("invalid specification for snmpTargetParamsName"); + return; + } + + line = + read_config_read_data(ASN_OCTET_STR, line, + &StorageTmp->snmpNotifyFilterProfileName, + &StorageTmp->snmpNotifyFilterProfileNameLen); + if (StorageTmp->snmpNotifyFilterProfileName == NULL) { + config_perror("invalid specification for snmpNotifyFilterProfileName"); + snmpNotifyFilterProfileTable_free(StorageTmp); + return; + } + + line = + read_config_read_data(ASN_INTEGER, line, + &StorageTmp->snmpNotifyFilterProfileStorType, + &tmpint); + + line = + read_config_read_data(ASN_INTEGER, line, + &StorageTmp-> + snmpNotifyFilterProfileRowStatus, &tmpint); + + if (snmpNotifyFilterProfileTable_add(StorageTmp) != SNMPERR_SUCCESS){ + snmpNotifyFilterProfileTable_free(StorageTmp); + StorageTmp = NULL; + } + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); +} + + + + +/* + * store_snmpNotifyFilterProfileTable(): + * stores .conf file entries needed to configure the mib. + */ +int +store_snmpNotifyFilterProfileTable(int majorID, int minorID, + void *serverarg, void *clientarg) +{ + char line[SNMP_MAXBUF]; + char *cptr; + struct snmpNotifyFilterProfileTable_data *StorageTmp; + struct header_complex_index *hcindex; + + + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "storing data... ")); + + for (hcindex = snmpNotifyFilterProfileTableStorage; hcindex != NULL; + hcindex = hcindex->next) { + StorageTmp = + (struct snmpNotifyFilterProfileTable_data *) hcindex->data; + + if ((StorageTmp->snmpNotifyFilterProfileStorType == ST_NONVOLATILE) || + (StorageTmp->snmpNotifyFilterProfileStorType == ST_PERMANENT)) { + + memset(line, 0, sizeof(line)); + strcat(line, "snmpNotifyFilterProfileTable "); + cptr = line + strlen(line); + + cptr = + read_config_store_data(ASN_OCTET_STR, cptr, + &StorageTmp->snmpTargetParamsName, + &StorageTmp-> + snmpTargetParamsNameLen); + cptr = + read_config_store_data(ASN_OCTET_STR, cptr, + &StorageTmp-> + snmpNotifyFilterProfileName, + &StorageTmp-> + snmpNotifyFilterProfileNameLen); + cptr = + read_config_store_data(ASN_INTEGER, cptr, + &StorageTmp-> + snmpNotifyFilterProfileStorType, + NULL); + cptr = + read_config_store_data(ASN_INTEGER, cptr, + &StorageTmp-> + snmpNotifyFilterProfileRowStatus, + NULL); + + snmpd_store_config(line); + } + } + DEBUGMSGTL(("snmpNotifyFilterProfileTable", "done.\n")); + return 0; +} diff --git a/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h b/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h new file mode 100644 index 0000000..f170072 --- /dev/null +++ b/agent/mibgroup/notification/snmpNotifyFilterProfileTable_data.h @@ -0,0 +1,66 @@ +/* + * This file was created to separate data storage from MIB implementation. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + + +#ifndef _MIBGROUP_SNMPNOTIFYFILTERPROFILETABLE_DATA_H +#define _MIBGROUP_SNMPNOTIFYFILTERPROFILETABLE_DATA_H + +config_require(header_complex); + +/* + * our storage structure(s) + */ +struct snmpNotifyFilterProfileTable_data { + char *snmpTargetParamsName; + size_t snmpTargetParamsNameLen; + char *snmpNotifyFilterProfileName; + size_t snmpNotifyFilterProfileNameLen; + long snmpNotifyFilterProfileStorType; + long snmpNotifyFilterProfileRowStatus; +}; + + +/* + * function prototypes + */ + +void init_snmpNotifyFilterProfileTable_data(void); +void shutdown_snmpNotifyFilterProfileTable_data(void); + +int +snmpNotifyFilterProfileTable_add(struct snmpNotifyFilterProfileTable_data *); + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_create(const char *params, size_t param_len, + const char *profile, size_t profile_len); + +void +snmpNotifyFilterProfileTable_free(struct snmpNotifyFilterProfileTable_data *); + +int +snmpNotifyFilterProfileTable_remove(struct snmpNotifyFilterProfileTable_data *); + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_extract(struct snmpNotifyFilterProfileTable_data *); + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_oldapi_find(struct variable *vp, + oid *name, size_t *length, int exact, + size_t *var_len, + WriteMethod ** write_method); + +struct snmpNotifyFilterProfileTable_data * +snmpNotifyFilterProfileTable_find(const char *name, size_t len); + +char *get_FilterProfileName(const char *paramName, + size_t paramName_len, + size_t * profileName_len); + + +#endif /* _MIBGROUP_SNMPNOTIFYFILTERPROFILETABLE_DATA_H */ diff --git a/agent/mibgroup/notification/snmpNotifyTable.c b/agent/mibgroup/notification/snmpNotifyTable.c index 91adb2f..c23f3d3 100644 --- a/agent/mibgroup/notification/snmpNotifyTable.c +++ b/agent/mibgroup/notification/snmpNotifyTable.c @@ -1,6 +1,11 @@ /* * This file was generated by mib2c and is intended for use as * a mib module for the ucd-snmp snmpd agent. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ @@ -11,10 +16,10 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -26,6 +31,7 @@ #include #include +#include "agent_global_vars.h" #include "header_complex.h" #include "snmpNotifyTable.h" #include "snmpNotifyFilterProfileTable.h" @@ -43,11 +49,9 @@ #endif #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(header_complex_find_entry) +netsnmp_feature_require(header_complex_find_entry); #endif /* NETSNMP_NO_WRITE_SUPPORT */ -SNMPCallback store_snmpNotifyTable; - /* * snmpNotifyTable_variables_oid: * this is the top level oid that we want to register under. This @@ -93,350 +97,6 @@ struct variable2 snmpNotifyTable_variables[] = { */ -/* - * global storage of our data, saved in and configured by header_complex() - */ -static struct header_complex_index *snmpNotifyTableStorage = NULL; - -static int -_checkFilter(const char* paramName, netsnmp_pdu *pdu) -{ - /* - * find appropriate filterProfileEntry - */ - netsnmp_variable_list *var, *trap_var; - char *profileName; - size_t profileNameLen; - struct vacm_viewEntry *vp, *head; - int vb_oid_excluded = 0; - extern const oid snmptrap_oid[]; - extern const size_t snmptrap_oid_len; - - netsnmp_assert(NULL != paramName); - netsnmp_assert(NULL != pdu); - - DEBUGMSGTL(("send_notifications", "checking filters...\n")); - - /* - A notification originator uses the snmpNotifyFilterTable to filter - notifications. A notification filter profile may be associated with - a particular entry in the snmpTargetParamsTable. The associated - filter profile is identified by an entry in the - snmpNotifyFilterProfileTable whose index is equal to the index of the - entry in the snmpTargetParamsTable. If no such entry exists in the - snmpNotifyFilterProfileTable, no filtering is performed for that - management target. - */ - profileName = get_FilterProfileName(paramName, strlen(paramName), - &profileNameLen); - if (NULL == profileName) { - DEBUGMSGTL(("send_notifications", " no matching profile\n")); - return 0; - } - - /* - If such an entry does exist, the value of snmpNotifyFilterProfileName - of the entry is compared with the corresponding portion of the index - of all active entries in the snmpNotifyFilterTable. All such entries - for which this comparison results in an exact match are used for - filtering a notification generated using the associated - snmpTargetParamsEntry. If no such entries exist, no filtering is - performed, and a notification may be sent to the management target. - */ - head = snmpNotifyFilterTable_vacm_view_subtree(profileName); - if (NULL == head) { - DEBUGMSGTL(("send_notifications", " no matching filters\n")); - return 0; - } - - /* - Otherwise, if matching entries do exist, a notification may be sent - if the NOTIFICATION-TYPE OBJECT IDENTIFIER of the notification (this - is the value of the element of the variable bindings whose name is - snmpTrapOID.0, i.e., the second variable binding) is specifically - included, and none of the object instances to be included in the - variable-bindings of the notification are specifically excluded by - the matching entries. - */ - trap_var = find_varbind_in_list( pdu->variables, - snmptrap_oid, - snmptrap_oid_len); - if (NULL != trap_var) { - /* - For a notification name, if none match, - then the notification name is considered excluded, and the - notification should not be sent to this management target. - */ - vp = netsnmp_view_get(head, profileName, trap_var->val.objid, - trap_var->val_len / sizeof(oid), VACM_MODE_FIND); - if ((NULL == vp) || (SNMP_VIEW_INCLUDED != vp->viewType)) { - DEBUGMSGTL(("send_notifications", " filtered (snmpTrapOID.0 ")); - DEBUGMSGOID(("send_notifications",trap_var->val.objid, - trap_var->val_len / sizeof(oid))); - DEBUGMSG(("send_notifications", " not included)\n")); - free(head); - return 1; - } - } - - /* - * check varbinds - */ - for(var = pdu->variables; var; var = var->next_variable) { - /* - For an - object instance, if none match, the object instance is considered - included, and the notification may be sent to this management target. - */ - - if (var == trap_var) { - continue; - } - - vp = netsnmp_view_get(head, profileName, var->name, - var->name_length, VACM_MODE_FIND); - if ((NULL != vp) && (SNMP_VIEW_EXCLUDED == vp->viewType)) { - DEBUGMSGTL(("send_notifications"," filtered (varbind ")); - DEBUGMSGOID(("send_notifications",var->name, var->name_length)); - DEBUGMSG(("send_notifications", " excluded)\n")); - vb_oid_excluded = 1; - break; - } - } - - free(head); - - return vb_oid_excluded; -} - -int -send_notifications(int major, int minor, void *serverarg, void *clientarg) -{ - struct header_complex_index *hptr; - struct snmpNotifyTable_data *nptr; - netsnmp_session *sess, *sptr; - netsnmp_pdu *template_pdu = (netsnmp_pdu *) serverarg; - int count = 0, send = 0; - - DEBUGMSGTL(("send_notifications", "starting: pdu=%p, vars=%p\n", - template_pdu, template_pdu->variables)); - - for (hptr = snmpNotifyTableStorage; hptr; hptr = hptr->next) { - nptr = (struct snmpNotifyTable_data *) hptr->data; - if (nptr->snmpNotifyRowStatus != RS_ACTIVE) - continue; - if (!nptr->snmpNotifyTag) - continue; - - sess = get_target_sessions(nptr->snmpNotifyTag, NULL, NULL); - - /* - * filter appropriately, per section 6 of RFC 3413 - */ - - for (sptr = sess; sptr; sptr = sptr->next) { - send = 0; -#ifndef NETSNMP_DISABLE_SNMPV1 - if (sptr->version == SNMP_VERSION_1 && - minor == SNMPD_CALLBACK_SEND_TRAP1) { - send = 1; - } else -#endif - if ((sptr->version == SNMP_VERSION_3 -#ifndef NETSNMP_DISABLE_SNMPV2C - || sptr->version == SNMP_VERSION_2c -#endif - ) && minor == SNMPD_CALLBACK_SEND_TRAP2) { - if (nptr->snmpNotifyType == SNMPNOTIFYTYPE_INFORM) { - template_pdu->command = SNMP_MSG_INFORM; - } else { - template_pdu->command = SNMP_MSG_TRAP2; - } - send = 1; - } - if (send && sess->paramName) { - int filter = _checkFilter(sess->paramName, template_pdu); - if (filter) - send = 0; - } - if (send) { - send_trap_to_sess(sptr, template_pdu); - ++count; - } /* session to send to */ - } /* for(sptr) */ - } /* for(hptr) */ - - DEBUGMSGTL(("send_notifications", "sent %d notifications\n", count)); - -#ifdef USING_NOTIFICATION_LOG_MIB_NOTIFICATION_LOG_MODULE - if (count) - log_notification(template_pdu, NULL); -#endif - - return 0; -} - -#define MAX_ENTRIES 1024 - -int -notifyTable_register_notifications(int major, int minor, - void *serverarg, void *clientarg) -{ - struct targetAddrTable_struct *ptr; - struct targetParamTable_struct *pptr; - struct snmpNotifyTable_data *nptr; - int confirm, i, bufLen; - char buf[SNMP_MAXBUF_SMALL]; - netsnmp_transport *t = NULL; - struct agent_add_trap_args *args = - (struct agent_add_trap_args *) serverarg; - netsnmp_session *ss; - - if (!args || !(args->ss)) { - return (0); - } - confirm = args->confirm; - ss = args->ss; - - /* - * XXX: START move target creation to target code - */ - for (i = 0; i < MAX_ENTRIES; i++) { - bufLen = sprintf(buf, "internal%d", i); - if (get_addrForName2(buf, bufLen) == NULL && - get_paramEntry(buf) == NULL) - break; - } - if (i == MAX_ENTRIES) { - snmp_log(LOG_ERR, - "Can't register new trap destination: max limit reached: %d", - MAX_ENTRIES); - snmp_sess_close(ss); - return (0); - } - - /* - * address - */ - t = snmp_sess_transport(snmp_sess_pointer(ss)); - if (!t) { - snmp_log(LOG_ERR, - "Cannot add new trap destination, transport is closed."); - snmp_sess_close(ss); - return 0; - } - ptr = snmpTargetAddrTable_create(); - ptr->nameData = netsnmp_memdup(buf, bufLen); - ptr->nameLen = bufLen; - memcpy(ptr->tDomain, t->domain, t->domain_length * sizeof(oid)); - ptr->tDomainLen = t->domain_length; - ptr->tAddressLen = t->remote_length; - ptr->tAddress = t->remote; - - ptr->timeout = ss->timeout / 10000; - ptr->retryCount = ss->retries; - SNMP_FREE(ptr->tagList); - ptr->tagList = strdup(buf); /* strdup ok since buf contains 'internal%d' */ - ptr->params = strdup(buf); - ptr->storageType = ST_READONLY; - ptr->rowStatus = RS_ACTIVE; - ptr->sess = ss; - DEBUGMSGTL(("trapsess", "adding to trap table\n")); - snmpTargetAddrTable_add(ptr); - - /* - * param - */ - pptr = snmpTargetParamTable_create(); - pptr->paramName = strdup(buf); - pptr->mpModel = ss->version; - if (ss->version == SNMP_VERSION_3) { - pptr->secModel = ss->securityModel; - pptr->secLevel = ss->securityLevel; - pptr->secName = (char *) malloc(ss->securityNameLen + 1); - if (pptr->secName == NULL) { - snmpTargetParamTable_dispose(pptr); - return 0; - } - memcpy((void *) pptr->secName, (void *) ss->securityName, - ss->securityNameLen); - pptr->secName[ss->securityNameLen] = 0; - } -#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) - else { - pptr->secModel = -#ifndef NETSNMP_DISABLE_SNMPV1 - ss->version == SNMP_VERSION_1 ? SNMP_SEC_MODEL_SNMPv1 : -#endif - SNMP_SEC_MODEL_SNMPv2c; - pptr->secLevel = SNMP_SEC_LEVEL_NOAUTH; - pptr->secName = NULL; - if (ss->community && (ss->community_len > 0)) { - pptr->secName = (char *) malloc(ss->community_len + 1); - if (pptr->secName == NULL) { - snmpTargetParamTable_dispose(pptr); - return 0; - } - memcpy((void *) pptr->secName, (void *) ss->community, - ss->community_len); - pptr->secName[ss->community_len] = 0; - } - } -#endif - pptr->storageType = ST_READONLY; - pptr->rowStatus = RS_ACTIVE; - snmpTargetParamTable_add(pptr); - /* - * XXX: END move target creation to target code - */ - - /* - * notify table - */ - nptr = SNMP_MALLOC_STRUCT(snmpNotifyTable_data); - if (nptr == NULL) - return 0; - nptr->snmpNotifyName = strdup(buf); - nptr->snmpNotifyNameLen = strlen(buf); - nptr->snmpNotifyTag = strdup(buf); - nptr->snmpNotifyTagLen = strlen(buf); - nptr->snmpNotifyType = confirm ? - SNMPNOTIFYTYPE_INFORM : SNMPNOTIFYTYPE_TRAP; - nptr->snmpNotifyStorageType = ST_READONLY; - nptr->snmpNotifyRowStatus = RS_ACTIVE; - - snmpNotifyTable_add(nptr); - return 0; -} - - -/* - * XXX: this really needs to be done for the target mib entries too. - * But we can only trust that we've added stuff here and we don't want - * to destroy other valid entries in the target tables, so... Don't - * do too many kill -HUPs to your agent as re reading the config file - * will be a slow memory leak in the target mib. - */ -int -notifyTable_unregister_notifications(int major, int minor, - void *serverarg, void *clientarg) -{ - struct header_complex_index *hptr, *nhptr; - - for (hptr = snmpNotifyTableStorage; hptr; hptr = nhptr) { - struct snmpNotifyTable_data *nptr = hptr->data; - nhptr = hptr->next; - if (nptr->snmpNotifyStorageType == ST_READONLY) { - header_complex_extract_entry(&snmpNotifyTableStorage, hptr); - free(nptr->snmpNotifyName); - free(nptr->snmpNotifyTag); - free(nptr); - } - } - snmpNotifyTableStorage = NULL; - return (0); -} - /* * init_snmpNotifyTable(): * Initialization routine. This is called when the agent starts up. @@ -447,6 +107,7 @@ init_snmpNotifyTable(void) { DEBUGMSGTL(("snmpNotifyTable", "initializing... ")); + init_snmpNotifyTable_data(); /* * register ourselves with the agent to handle our mib tree @@ -462,27 +123,6 @@ init_snmpNotifyTable(void) NULL, NULL); - /* - * we need to be called back later to store our data - */ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - store_snmpNotifyTable, NULL); - -#ifndef DISABLE_SNMPV1 - snmp_register_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_SEND_TRAP1, send_notifications, - NULL); -#endif - snmp_register_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_SEND_TRAP2, send_notifications, - NULL); - snmp_register_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, - notifyTable_register_notifications, NULL); - snmp_register_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_PRE_UPDATE_CONFIG, - notifyTable_unregister_notifications, NULL); - /* * place any other initialization junk you need here */ @@ -498,66 +138,13 @@ shutdown_snmpNotifyTable(void) { DEBUGMSGTL(("snmpNotifyTable", "shutting down ... ")); - notifyTable_unregister_notifications(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_PRE_UPDATE_CONFIG, - NULL, - NULL); - - snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_PRE_UPDATE_CONFIG, - notifyTable_unregister_notifications, NULL, FALSE); - snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, - notifyTable_register_notifications, NULL, FALSE); - snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_SEND_TRAP2, send_notifications, - NULL, FALSE); -#ifndef DISABLE_SNMPV1 - snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, - SNMPD_CALLBACK_SEND_TRAP1, send_notifications, - NULL, FALSE); -#endif - snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - store_snmpNotifyTable, NULL, FALSE); + shutdown_snmpNotifyTable_data(); UNREGISTER_SYSOR_ENTRY(snmpNotifyFullCompliance); DEBUGMSGTL(("snmpNotifyTable", "done.\n")); } -/* - * snmpNotifyTable_add(): adds a structure node to our data set - */ -int -snmpNotifyTable_add(struct snmpNotifyTable_data *thedata) -{ - netsnmp_variable_list *vars = NULL; - int retVal; - - DEBUGMSGTL(("snmpNotifyTable", "adding data... ")); - /* - * add the index variables to the varbind list, which is - * used by header_complex to index the data - */ - - - snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OCTET_STR, (u_char *) thedata->snmpNotifyName, thedata->snmpNotifyNameLen); /* snmpNotifyName */ - - - - if (header_complex_maybe_add_data(&snmpNotifyTableStorage, vars, thedata, 1) - != NULL){ - DEBUGMSGTL(("snmpNotifyTable", "registered an entry\n")); - retVal = SNMPERR_SUCCESS; - }else{ - retVal = SNMPERR_GENERR; - } - - - DEBUGMSGTL(("snmpNotifyTable", "done.\n")); - return retVal; -} - /* * parse_snmpNotifyTable(): @@ -629,70 +216,6 @@ parse_snmpNotifyTable(const char *token, char *line) -/* - * store_snmpNotifyTable(): - * stores .conf file entries needed to configure the mib. - */ -int -store_snmpNotifyTable(int majorID, int minorID, void *serverarg, - void *clientarg) -{ - char line[SNMP_MAXBUF]; - char *cptr; - size_t tmpint; - struct snmpNotifyTable_data *StorageTmp; - struct header_complex_index *hcindex; - - - DEBUGMSGTL(("snmpNotifyTable", "storing data... ")); - - - for (hcindex = snmpNotifyTableStorage; hcindex != NULL; - hcindex = hcindex->next) { - StorageTmp = (struct snmpNotifyTable_data *) hcindex->data; - - /* - * store permanent and nonvolatile rows. - * XXX should there be a qualification on RowStatus?? - */ - if ((StorageTmp->snmpNotifyStorageType == ST_NONVOLATILE) || - (StorageTmp->snmpNotifyStorageType == ST_PERMANENT) ){ - - memset(line, 0, sizeof(line)); - strcat(line, "snmpNotifyTable "); - cptr = line + strlen(line); - - cptr = - read_config_store_data(ASN_OCTET_STR, cptr, - &StorageTmp->snmpNotifyName, - &StorageTmp->snmpNotifyNameLen); - cptr = - read_config_store_data(ASN_OCTET_STR, cptr, - &StorageTmp->snmpNotifyTag, - &StorageTmp->snmpNotifyTagLen); - cptr = - read_config_store_data(ASN_INTEGER, cptr, - &StorageTmp->snmpNotifyType, - &tmpint); - cptr = - read_config_store_data(ASN_INTEGER, cptr, - &StorageTmp->snmpNotifyStorageType, - &tmpint); - cptr = - read_config_store_data(ASN_INTEGER, cptr, - &StorageTmp->snmpNotifyRowStatus, - &tmpint); - - snmpd_store_config(line); - } - } - DEBUGMSGTL(("snmpNotifyTable", "done.\n")); - return 0; -} - - - - /* * var_snmpNotifyTable(): * Handle this table separately from the scalar value case. @@ -713,10 +236,8 @@ var_snmpNotifyTable(struct variable *vp, /* * this assumes you have registered all your data properly */ - if ((StorageTmp = (struct snmpNotifyTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyTableStorage, vp, name, length, exact, - var_len, write_method)) == NULL) { + if ((StorageTmp = find_row_notifyTable(vp, name, length, exact, + var_len, write_method)) == NULL) { found = 0; } @@ -795,6 +316,9 @@ static struct snmpNotifyTable_data *StorageNew; #ifndef NETSNMP_NO_WRITE_SUPPORT +static const int snmpNotifyTable_offset = + sizeof(snmpNotifyTable_variables_oid) / sizeof(oid) + 3 - 1; + int write_snmpNotifyTag(int action, u_char * var_val, @@ -805,20 +329,14 @@ write_snmpNotifyTag(int action, static char *tmpvar; struct snmpNotifyTable_data *StorageTmp = NULL; static size_t tmplen; - size_t newlen = - name_len - (sizeof(snmpNotifyTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - snmpNotifyTable_offset; DEBUGMSGTL(("snmpNotifyTable", "write_snmpNotifyTag entering action=%d... \n", action)); if (action != RESERVE1 && - (StorageTmp = (struct snmpNotifyTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyTableStorage, NULL, - &name[sizeof(snmpNotifyTable_variables_oid) / - sizeof(oid) + 3 - 1], &newlen, 1, NULL, - NULL)) == NULL) { + (StorageTmp = find_row_notifyTable(NULL, &name[snmpNotifyTable_offset], + &newlen, 1, NULL, NULL)) == NULL) { if ((StorageTmp = StorageNew) == NULL) return SNMP_ERR_NOSUCHNAME; /* remove if you support creation here */ } @@ -899,20 +417,14 @@ write_snmpNotifyType(int action, static int tmpvar; struct snmpNotifyTable_data *StorageTmp = NULL; long value = *((long *) var_val); - size_t newlen = - name_len - (sizeof(snmpNotifyTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - snmpNotifyTable_offset; DEBUGMSGTL(("snmpNotifyTable", "write_snmpNotifyType entering action=%d... \n", action)); if (action != RESERVE1 && - (StorageTmp = (struct snmpNotifyTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyTableStorage, NULL, - &name[sizeof(snmpNotifyTable_variables_oid) / - sizeof(oid) + 3 - 1], &newlen, 1, NULL, - NULL)) == NULL) { + (StorageTmp = find_row_notifyTable(NULL, &name[snmpNotifyTable_offset], + &newlen, 1, NULL, NULL)) == NULL) { if ((StorageTmp = StorageNew) == NULL) return SNMP_ERR_NOSUCHNAME; } @@ -958,21 +470,15 @@ write_snmpNotifyStorageType(int action, static int tmpvar; long value = *((long *) var_val); struct snmpNotifyTable_data *StorageTmp = NULL; - size_t newlen = - name_len - (sizeof(snmpNotifyTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - snmpNotifyTable_offset; DEBUGMSGTL(("snmpNotifyTable", "write_snmpNotifyStorageType entering action=%d... \n", action)); if (action != RESERVE1 && - (StorageTmp = (struct snmpNotifyTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyTableStorage, NULL, - &name[sizeof(snmpNotifyTable_variables_oid) / - sizeof(oid) + 3 - 1], &newlen, 1, NULL, - NULL)) == NULL) { + (StorageTmp = find_row_notifyTable(NULL, &name[snmpNotifyTable_offset], + &newlen, 1, NULL, NULL)) == NULL) { if ((StorageTmp = StorageNew) == NULL) return SNMP_ERR_NOSUCHNAME; } @@ -1015,23 +521,16 @@ write_snmpNotifyRowStatus(int action, { struct snmpNotifyTable_data *StorageTmp = NULL; static struct snmpNotifyTable_data *StorageDel; - size_t newlen = - name_len - (sizeof(snmpNotifyTable_variables_oid) / sizeof(oid) + - 3 - 1); + size_t newlen = name_len - snmpNotifyTable_offset; static int old_value; int set_value = *((long *) var_val); static netsnmp_variable_list *vars, *vp; - struct header_complex_index *hciptr; - DEBUGMSGTL(("snmpNotifyTable", "write_snmpNotifyRowStatus entering action=%d... \n", action)); - StorageTmp = (struct snmpNotifyTable_data *) - header_complex((struct header_complex_index *) - snmpNotifyTableStorage, NULL, - &name[sizeof(snmpNotifyTable_variables_oid) / - sizeof(oid) + 3 - 1], &newlen, 1, NULL, NULL); + StorageTmp = find_row_notifyTable(NULL, &name[snmpNotifyTable_offset], + &newlen, 1, NULL, NULL); switch (action) { case RESERVE1: @@ -1159,15 +658,8 @@ write_snmpNotifyRowStatus(int action, /* * destroy... extract it for now */ - if (StorageTmp) { - hciptr = header_complex_find_entry(snmpNotifyTableStorage, - StorageTmp); - StorageDel = (struct snmpNotifyTable_data *) - header_complex_extract_entry((struct - header_complex_index **) - &snmpNotifyTableStorage, - hciptr); - } + if (StorageTmp) + StorageDel = snmpNotifyTable_extract(StorageTmp); } break; @@ -1180,12 +672,7 @@ write_snmpNotifyRowStatus(int action, /* * row creation, so remove it again */ - hciptr = header_complex_find_entry(snmpNotifyTableStorage, - StorageNew); - StorageDel = (struct snmpNotifyTable_data *) - header_complex_extract_entry((struct header_complex_index - **) &snmpNotifyTableStorage, - hciptr); + StorageDel = snmpNotifyTable_extract(StorageNew); /* * XXX: free it */ @@ -1202,9 +689,7 @@ write_snmpNotifyRowStatus(int action, case COMMIT: if (StorageDel != NULL) { - SNMP_FREE(StorageDel->snmpNotifyTag); - SNMP_FREE(StorageDel->snmpNotifyName); - free(StorageDel); + snmpNotifyTable_dispose(StorageDel); StorageDel = NULL; } if (StorageTmp diff --git a/agent/mibgroup/notification/snmpNotifyTable.h b/agent/mibgroup/notification/snmpNotifyTable.h index 18bf1bd..43d2347 100644 --- a/agent/mibgroup/notification/snmpNotifyTable.h +++ b/agent/mibgroup/notification/snmpNotifyTable.h @@ -1,6 +1,11 @@ /* * This file was generated by mib2c and is intended for use as a mib module * for the ucd-snmp snmpd agent. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ @@ -13,57 +18,21 @@ */ -config_require(header_complex) -config_require(target) -config_add_mib(SNMP-NOTIFICATION-MIB) - - - /* - * our storage structure(s) - */ - struct snmpNotifyTable_data { - - char *snmpNotifyName; - size_t snmpNotifyNameLen; - char *snmpNotifyTag; - size_t snmpNotifyTagLen; - long snmpNotifyType; - long snmpNotifyStorageType; - long snmpNotifyRowStatus; - - }; - - - - -/* - * enum definitions from the covered mib sections - */ - - - - - - -#define SNMPNOTIFYTYPE_TRAP 1 -#define SNMPNOTIFYTYPE_INFORM 2 - +config_require(notification/snmpNotifyTable_data); +config_require(target); +config_add_mib(SNMP-NOTIFICATION-MIB); +#include "snmpNotifyTable_data.h" /* * function prototypes */ - - void init_snmpNotifyTable(void); void shutdown_snmpNotifyTable(void); FindVarMethod var_snmpNotifyTable; void parse_snmpNotifyTable(const char *, char *); - int snmpNotifyTable_add(struct snmpNotifyTable_data - *thedata); - #ifndef NETSNMP_NO_WRITE_SUPPORT WriteMethod write_snmpNotifyTag; WriteMethod write_snmpNotifyType; diff --git a/agent/mibgroup/notification/snmpNotifyTable_data.c b/agent/mibgroup/notification/snmpNotifyTable_data.c new file mode 100644 index 0000000..5a42a96 --- /dev/null +++ b/agent/mibgroup/notification/snmpNotifyTable_data.c @@ -0,0 +1,799 @@ +/* + * This file was created to separate data storage from MIB implementation. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + + +/* + * This should always be included first before anything else + */ +#include +#include + +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#else +#include +#endif + +/* + * minimal include directives + */ +#include +#include + +#include "agent_global_vars.h" +#include "header_complex.h" +#include "snmpNotifyTable_data.h" +#include "notification/snmpNotifyFilterProfileTable_data.h" +#include "target/snmpTargetParamsEntry_data.h" +#include "target/snmpTargetAddrEntry_data.h" +#include "target/target.h" +#include "agentx/subagent.h" +#include "snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h" +#include +#include +#include +#include "net-snmp/agent/sysORTable.h" + +#ifdef USING_NOTIFICATION_LOG_MIB_NOTIFICATION_LOG_MODULE +# include "notification-log-mib/notification_log.h" +#endif + +SNMPCallback store_snmpNotifyTable; + +static int +_unregister_notification_cb(int major, int minor, + void *serverarg, void *clientarg); + +/* + * global storage of our data, saved in and configured by header_complex() + */ +static struct header_complex_index *snmpNotifyTableStorage = NULL; +static int _active = 0; + +static int +_checkFilter(const char* paramName, netsnmp_pdu *pdu) +{ + /* + * find appropriate filterProfileEntry + */ + netsnmp_variable_list *var, *trap_var = NULL; + char *profileName; + size_t profileNameLen; + struct vacm_viewEntry *vp, *head; + int vb_oid_excluded = 0, free_trapvar = 0; + + netsnmp_assert(NULL != paramName); + netsnmp_assert(NULL != pdu); + + DEBUGMSGTL(("send_notifications", "checking filters for '%s'...\n", + paramName)); + + /* + A notification originator uses the snmpNotifyFilterTable to filter + notifications. A notification filter profile may be associated with + a particular entry in the snmpTargetParamsTable. The associated + filter profile is identified by an entry in the + snmpNotifyFilterProfileTable whose index is equal to the index of the + entry in the snmpTargetParamsTable. If no such entry exists in the + snmpNotifyFilterProfileTable, no filtering is performed for that + management target. + */ + /** xxx paramName from session doesn't have length. will be + * trouble with paramNames with embedded NULL */ + profileName = get_FilterProfileName(paramName, strlen(paramName), + &profileNameLen); + if (NULL == profileName) /* try default */ + profileName = get_FilterProfileName("default", 7, &profileNameLen); + if (NULL == profileName) { + DEBUGMSGTL(("send_notifications", " no matching profile\n")); + return 0; + } + + /* + If such an entry does exist, the value of snmpNotifyFilterProfileName + of the entry is compared with the corresponding portion of the index + of all active entries in the snmpNotifyFilterTable. All such entries + for which this comparison results in an exact match are used for + filtering a notification generated using the associated + snmpTargetParamsEntry. If no such entries exist, no filtering is + performed, and a notification may be sent to the management target. + */ + head = snmpNotifyFilter_vacm_view_subtree(profileName); + if (NULL == head) { + DEBUGMSGTL(("send_notifications", " no matching filters\n")); + return 0; + } + + /* + Otherwise, if matching entries do exist, a notification may be sent + if the NOTIFICATION-TYPE OBJECT IDENTIFIER of the notification (this + is the value of the element of the variable bindings whose name is + snmpTrapOID.0, i.e., the second variable binding) is specifically + included, and none of the object instances to be included in the + variable-bindings of the notification are specifically excluded by + the matching entries. + */ + if (NULL != pdu->variables) { + trap_var = find_varbind_in_list( pdu->variables, + snmptrap_oid, snmptrap_oid_len); + } +#if !defined(NETSNMP_DISABLE_SNMPV1) + else { + /** snmpv1 pdus have no varbinds. build trapoid */ + oid enterprise[MAX_OID_LEN]; + size_t enterprise_len; + enterprise_len = OID_LENGTH(enterprise); + if ((netsnmp_build_trap_oid(pdu, enterprise, &enterprise_len) + != SNMPERR_SUCCESS) || + !snmp_varlist_add_variable(&trap_var, snmptrap_oid, + snmptrap_oid_len, + ASN_OBJECT_ID, (u_char*)enterprise, + enterprise_len*sizeof(oid))) { + snmp_log(LOG_WARNING, + "checkFilter: failed to build snmpTrapOID varbind\n"); + } else + free_trapvar = 1; + } +#endif /* NETSNMP_DISABLE_SNMPV1 */ + + if (NULL != trap_var) { + /* + For a notification name, if none match, + then the notification name is considered excluded, and the + notification should not be sent to this management target. + */ + vp = netsnmp_view_get(head, profileName, trap_var->val.objid, + trap_var->val_len / sizeof(oid), VACM_MODE_FIND); + if ((NULL == vp) || (SNMP_VIEW_INCLUDED != vp->viewType)) { + DEBUGMSGTL(("send_notifications", " filtered (snmpTrapOID.0 ")); + DEBUGMSGOID(("send_notifications",trap_var->val.objid, + trap_var->val_len / sizeof(oid))); + DEBUGMSG(("send_notifications", " not included)\n")); + free(head); + if (free_trapvar) + snmp_free_varbind(trap_var); + return 1; + } + } + if (free_trapvar) { + snmp_free_varbind(trap_var); + trap_var = NULL; + } + + /* + * check varbinds + */ + for(var = pdu->variables; var; var = var->next_variable) { + /* + For an + object instance, if none match, the object instance is considered + included, and the notification may be sent to this management target. + */ + + if (var == trap_var) { + continue; + } + + vp = netsnmp_view_get(head, profileName, var->name, + var->name_length, VACM_MODE_FIND); + if ((NULL != vp) && (SNMP_VIEW_EXCLUDED == vp->viewType)) { + DEBUGMSGTL(("send_notifications"," filtered (varbind ")); + DEBUGMSGOID(("send_notifications",var->name, var->name_length)); + DEBUGMSG(("send_notifications", " excluded)\n")); + vb_oid_excluded = 1; + break; + } + } + + free(head); + + return vb_oid_excluded; +} + +int +send_notifications(int major, int minor, void *serverarg, void *clientarg) +{ + struct header_complex_index *hptr; + struct snmpNotifyTable_data *nptr; + netsnmp_session *sess, *sptr; + netsnmp_pdu *template_pdu = (netsnmp_pdu *) serverarg; + int count = 0; + + DEBUGMSGTL(("send_notifications", "starting: pdu=%p, vars=%p\n", + template_pdu, template_pdu->variables)); + + for (hptr = snmpNotifyTableStorage; hptr; hptr = hptr->next) { + nptr = (struct snmpNotifyTable_data *) hptr->data; + if (nptr->snmpNotifyRowStatus != RS_ACTIVE) + continue; + if (!nptr->snmpNotifyTag) + continue; + + sess = get_target_sessions(nptr->snmpNotifyTag, NULL, NULL); + + /* + * filter appropriately, per section 6 of RFC 3413 + */ + + for (sptr = sess; sptr; sptr = sptr->next) { +#ifndef NETSNMP_DISABLE_SNMPV1 + if (sptr->version == SNMP_VERSION_1 && + minor != SNMPD_CALLBACK_SEND_TRAP1) { + continue; + } else +#endif + if (sptr->version == SNMP_VERSION_3 +#ifndef NETSNMP_DISABLE_SNMPV2C + || sptr->version == SNMP_VERSION_2c +#endif + ) { + if(minor != SNMPD_CALLBACK_SEND_TRAP2) + continue; + if (nptr->snmpNotifyType == SNMPNOTIFYTYPE_INFORM) { + template_pdu->command = SNMP_MSG_INFORM; + } else { + template_pdu->command = SNMP_MSG_TRAP2; + } + } + if (sess->paramName) { + int filter = _checkFilter(sess->paramName, template_pdu); + if (filter) + continue; + } + send_trap_to_sess(sptr, template_pdu); + ++count; + } /* for(sptr) */ + } /* for(hptr) */ + + DEBUGMSGTL(("send_notifications", "sent %d notifications\n", count)); + +#ifdef USING_NOTIFICATION_LOG_MIB_NOTIFICATION_LOG_MODULE + if (count) + log_notification(template_pdu, NULL); +#endif + + return 0; +} + +#define MAX_ENTRIES 1024 + +int +notifyTable_register_notifications(int major, int minor, + void *serverarg, void *clientarg) +{ + struct targetAddrTable_struct *ptr = NULL; + struct targetParamTable_struct *pptr = NULL; + struct snmpNotifyTable_data *nptr = NULL; + int confirm, i; + char buf[SNMP_MAXBUF_SMALL]; + netsnmp_transport *t = NULL; + struct agent_add_trap_args *args = + (struct agent_add_trap_args *) serverarg; + netsnmp_session *ss; + const char *name, *tag, *notifyProfile; + int nameLen, tagLen, notifyProfileLen; + + if (!args || !(args->ss)) { + return (0); + } + args->rc = SNMPERR_GENERR; + confirm = args->confirm; + ss = args->ss; + name = args->nameData; + nameLen = args->nameLen; + tag = args->tagData; + tagLen = args->tagLen; + notifyProfile = args->profileData; + notifyProfileLen = args->profileLen; + + /* + * XXX: START move target creation to target code + */ + if (NULL == name) { + int len; + for (i = 0; i < MAX_ENTRIES; i++) { + sprintf(buf, "internal%d", i); + len = strlen(buf); + if ((get_addrForName2(buf,len) == NULL) && + (get_paramEntry2(buf,len) == NULL)) + break; + } + if (i == MAX_ENTRIES) { + snmp_log(LOG_ERR, + "Can't register new trap destination: max limit reached: %d", + MAX_ENTRIES); + snmp_close(ss); + return (0); + } + name = buf; + nameLen = len; + if (NULL == tag) { + tag = buf; + tagLen = len; + } + } else { + if (NULL == tag) { + tag = name; + tagLen = nameLen; + } + } + + /* + * address + */ + t = snmp_sess_transport(snmp_sess_pointer(ss)); + if (!t) { + snmp_log(LOG_ERR, + "Cannot add new trap destination, transport is closed."); + snmp_close(ss); + return 0; + } + ptr = snmpTargetAddrTable_create(); + if (!ptr) + goto bail; + ptr->nameData = netsnmp_memdup_nt(name, nameLen, &ptr->nameLen); + memcpy(ptr->tDomain, t->domain, t->domain_length * sizeof(oid)); + ptr->tDomainLen = t->domain_length; + if (t->f_get_taddr) + t->f_get_taddr(t, &ptr->tAddress, &ptr->tAddressLen); + else + netsnmp_assert(0); + + ptr->timeout = ss->timeout / 1000; + ptr->retryCount = ss->retries; + SNMP_FREE(ptr->tagListData); + ptr->tagListData = netsnmp_memdup_nt(tag, tagLen, &ptr->tagListLen); + /** link to target param table */ + ptr->paramsData = netsnmp_memdup_nt(name, nameLen, &ptr->paramsLen); + if (!ptr->paramsData || !ptr->tagListData || !ptr->nameData) + goto bail; + ptr->storageType = ST_READONLY; + ptr->rowStatus = RS_ACTIVE; + ptr->sess = ss; + DEBUGMSGTL(("trapsess", "adding %s to trap table\n", ptr->nameData)); + snmpTargetAddrTable_add(ptr); + + /* + * param + */ + pptr = snmpTargetParamTable_create(); + if (NULL == pptr) + goto bail; + /** link from target addr table */ + pptr->paramNameData = netsnmp_memdup_nt(ptr->paramsData, ptr->paramsLen, + &pptr->paramNameLen); + if (!pptr->paramNameData) + goto bail; + pptr->mpModel = ss->version; + if (ss->version == SNMP_VERSION_3) { + pptr->secModel = ss->securityModel; + pptr->secLevel = ss->securityLevel; + if (!ss->securityName) { + snmp_log(LOG_ERR, "Security name is missing."); + goto bail; + } + pptr->secNameData = netsnmp_memdup_nt(ss->securityName, + ss->securityNameLen, + &pptr->secNameLen); + if (pptr->secNameData == NULL) + goto bail; + } +#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) + else { + pptr->secModel = +#ifndef NETSNMP_DISABLE_SNMPV1 + ss->version == SNMP_VERSION_1 ? SNMP_SEC_MODEL_SNMPv1 : +#endif + SNMP_SEC_MODEL_SNMPv2c; + pptr->secLevel = SNMP_SEC_LEVEL_NOAUTH; + pptr->secNameData = NULL; + if (ss->community && (ss->community_len > 0)) { + pptr->secNameData = netsnmp_memdup_nt(ss->community, + ss->community_len, + &pptr->secNameLen); + if (pptr->secNameData == NULL) + goto bail; + } + } +#endif + pptr->storageType = ST_READONLY; + pptr->rowStatus = RS_ACTIVE; + snmpTargetParamTable_add(pptr); + /* + * XXX: END move target creation to target code + */ + + /* + * notify table + */ + nptr = SNMP_MALLOC_STRUCT(snmpNotifyTable_data); + if (nptr == NULL) + goto bail; + ++_active; + nptr->snmpNotifyName = netsnmp_memdup_nt(name, nameLen, + &nptr->snmpNotifyNameLen); + /** selects target addr */ + nptr->snmpNotifyTag = netsnmp_memdup_nt(tag, tagLen, + &nptr->snmpNotifyTagLen); + if (!nptr->snmpNotifyName || !nptr->snmpNotifyTag) + goto bail; + nptr->snmpNotifyType = confirm ? + SNMPNOTIFYTYPE_INFORM : SNMPNOTIFYTYPE_TRAP; + nptr->snmpNotifyStorageType = ST_READONLY; + nptr->snmpNotifyRowStatus = RS_ACTIVE; + + if (snmpNotifyTable_add(nptr) == SNMPERR_GENERR) { + snmpNotifyTable_dispose(nptr); + nptr = NULL; + goto bail; + } + + /* + * filter profile + */ + if (NULL != notifyProfile) { + struct snmpNotifyFilterProfileTable_data *profile; + profile = snmpNotifyFilterProfileTable_create(ptr->paramsData, + ptr->paramsLen, + notifyProfile, + notifyProfileLen); + if (NULL == profile) { + snmp_log(LOG_ERR, "couldn't create notify filter profile\n"); + goto bail; + } else { + profile->snmpNotifyFilterProfileRowStatus = RS_ACTIVE; + profile->snmpNotifyFilterProfileStorType = ST_READONLY; + + if (snmpNotifyFilterProfileTable_add(profile) != SNMPERR_SUCCESS) { + snmp_log(LOG_ERR, "couldn't add notify filter profile\n"); + snmpNotifyFilterProfileTable_free(profile); + } + } + } + + args->rc = SNMPERR_SUCCESS; + return 0; + + bail: + snmp_log(LOG_ERR, "Cannot add new trap destination %s\n", name); + + if (NULL != nptr) + snmpNotifyTable_remove(nptr); + + if (NULL != pptr) + snmpTargetParamTable_remove(pptr); + + if (NULL != ptr) + snmpTargetAddrTable_remove(ptr); + + snmp_close(ss); + + return 0; +} + +void +snmpNotifyTable_dispose(struct snmpNotifyTable_data *thedata) +{ + if (NULL == thedata) + return; + + SNMP_FREE(thedata->snmpNotifyName); + SNMP_FREE(thedata->snmpNotifyTag); + free(thedata); + --_active; +} + +/* + * XXX: this really needs to be done for the target mib entries too. + * But we can only trust that we've added stuff here and we don't want + * to destroy other valid entries in the target tables, so... Don't + * do too many kill -HUPs to your agent as re reading the config file + * will be a slow memory leak in the target mib. + */ +int +notifyTable_unregister_all_notifications(int major, int minor, + void *serverarg, void *clientarg) +{ + struct header_complex_index *hptr, *nhptr; + + for (hptr = snmpNotifyTableStorage; hptr; hptr = nhptr) { + struct snmpNotifyTable_data *nptr = hptr->data; + nhptr = hptr->next; + if (nptr->snmpNotifyStorageType == ST_READONLY) { + header_complex_extract_entry(&snmpNotifyTableStorage, hptr); + snmpNotifyTable_dispose(nptr); + } + } + snmpNotifyTableStorage = NULL; + return (0); +} + +/* + * init_snmpNotifyTable_data(): + * Initialization routine. This is called when the agent starts up. + */ +void +init_snmpNotifyTable_data(void) +{ + static int done = 0; + + if (++done != 1) { + DEBUGMSGTL(("snmpNotifyTable_data", "multiple init calls")); + return; + } + + DEBUGMSGTL(("snmpNotifyTable_data", "initializing... ")); + + /* + * we need to be called back later to store our data + */ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + store_snmpNotifyTable, NULL); + + +#ifndef DISABLE_SNMPV1 + snmp_register_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_SEND_TRAP1, send_notifications, + NULL); +#endif + snmp_register_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_SEND_TRAP2, send_notifications, + NULL); + snmp_register_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, + notifyTable_register_notifications, NULL); + snmp_register_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_UNREGISTER_NOTIFICATIONS, + _unregister_notification_cb, NULL); + snmp_register_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_PRE_UPDATE_CONFIG, + notifyTable_unregister_all_notifications, NULL); + + DEBUGMSGTL(("snmpNotifyTable_data", "done.\n")); +} + +void +shutdown_snmpNotifyTable_data(void) +{ + DEBUGMSGTL(("snmpNotifyTable_data", "shutting down ... ")); + + snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + store_snmpNotifyTable, NULL, FALSE); + + notifyTable_unregister_all_notifications(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_PRE_UPDATE_CONFIG, + NULL, NULL); + + snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_PRE_UPDATE_CONFIG, + notifyTable_unregister_all_notifications, NULL, + FALSE); + snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, + notifyTable_register_notifications, NULL, FALSE); + snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_UNREGISTER_NOTIFICATIONS, + _unregister_notification_cb, NULL, FALSE); + snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_SEND_TRAP2, send_notifications, + NULL, FALSE); +#ifndef DISABLE_SNMPV1 + snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_SEND_TRAP1, send_notifications, + NULL, FALSE); +#endif + DEBUGMSGTL(("trap:notify:shutdown", "active count %d\n", _active)); + if (_active != 0) { + DEBUGMSGTL(("trap:notify:shutdown", + "unexpected count %d after cleanup!\n",_active)); + snmp_log(LOG_WARNING, + "notify count %d, not 0, after shutdown.\n", _active); + } + + DEBUGMSGTL(("snmpNotifyTable_data", "done.\n")); +} + +/* + * snmpNotifyTable_add(): adds a structure node to our data set + */ +int +snmpNotifyTable_add(struct snmpNotifyTable_data *thedata) +{ + netsnmp_variable_list *vars = NULL; + int retVal; + + if (NULL == thedata) + return SNMPERR_GENERR; + + DEBUGMSGTL(("snmpNotifyTable_data", "adding data... ")); + /* + * add the index variables to the varbind list, which is + * used by header_complex to index the data. the allocated + * variable will be freed by header_complex_maybe_add_data(). + */ + snmp_varlist_add_variable(&vars, NULL, 0, ASN_PRIV_IMPLIED_OCTET_STR, (u_char *) thedata->snmpNotifyName, thedata->snmpNotifyNameLen); /* snmpNotifyName */ + + if (header_complex_maybe_add_data(&snmpNotifyTableStorage, vars, thedata, 1) + != NULL){ + DEBUGMSGTL(("snmpNotifyTable", "registered an entry\n")); + retVal = SNMPERR_SUCCESS; + }else{ + retVal = SNMPERR_GENERR; + } + + + DEBUGMSGTL(("snmpNotifyTable", "done.\n")); + return retVal; +} + +struct snmpNotifyTable_data * +snmpNotifyTable_extract(struct snmpNotifyTable_data *thedata) +{ + struct header_complex_index *hptr; + + hptr = header_complex_find_entry(snmpNotifyTableStorage, thedata); + if (NULL == hptr) + return NULL; + + return header_complex_extract_entry((struct header_complex_index**) + &snmpNotifyTableStorage, hptr); +} + +int +snmpNotifyTable_remove(struct snmpNotifyTable_data *thedata) +{ + struct snmpNotifyTable_data *nptr = snmpNotifyTable_extract(thedata); + if (nptr) { + snmpNotifyTable_dispose(nptr); + return 1; + } + return 0; +} + +struct snmpNotifyTable_data * +get_notifyTable2(const char *name, size_t nameLen) +{ + struct header_complex_index *hptr; + + for (hptr = snmpNotifyTableStorage; hptr; hptr = hptr->next) { + struct snmpNotifyTable_data *nptr = hptr->data; + if (nptr->snmpNotifyNameLen == nameLen && nptr->snmpNotifyName && + memcmp(nptr->snmpNotifyName, name, nameLen) == 0) + return nptr; + } + return NULL; +} + +struct snmpNotifyTable_data * +find_row_notifyTable(struct variable *vp, oid * name, size_t * len, int exact, + size_t * var_len, WriteMethod ** write_method) +{ + struct snmpNotifyTable_data *result = + header_complex((struct header_complex_index *) + snmpNotifyTableStorage, vp, name, len, exact, + var_len, write_method); + return result; +} + +void +snmpNotifyTable_unregister_notification(const char *name, unsigned char nameLen) +{ + struct targetAddrTable_struct *ta = get_addrForName2(name,nameLen); + struct targetParamTable_struct *tp = get_paramEntry2(name,nameLen); + struct snmpNotifyTable_data *nt = get_notifyTable2(name,nameLen); + struct snmpNotifyFilterProfileTable_data *fp = + snmpNotifyFilterProfileTable_find(name, nameLen); + + DEBUGMSGTL(("trapsess", "removing %s from trap tables\n", name)); + + if (NULL != nt) + snmpNotifyTable_remove(nt); + else + DEBUGMSGTL(("snmpNotifyTable:unregister", + "No NotifyTable entry for %s\n", name)); + + if (NULL != tp) + snmpTargetParamTable_remove(tp); + else + DEBUGMSGTL(("snmpNotifyTable:unregister", + "No TargetParamTable entry for %s\n", name)); + + if (NULL != ta) + snmpTargetAddrTable_remove(ta); + else + DEBUGMSGTL(("snmpNotifyTable:unregister", + "No TargetAddrTable entry for %s\n", name)); + + if (NULL != fp) + snmpNotifyFilterProfileTable_remove(fp); + else + DEBUGMSGTL(("snmpNotifyTable:unregister", + "No FilterProfileTable entry for %s\n", name)); + +} + +static int +_unregister_notification_cb(int major, int minor, + void *serverarg, void *clientarg) +{ + struct agent_add_trap_args *args = + (struct agent_add_trap_args *) serverarg; + + if (!args || !(args->nameData)) + return 0; + + snmpNotifyTable_unregister_notification(args->nameData, args->nameLen); + return 1; +} + +/* + * store_snmpNotifyTable(): + * stores .conf file entries needed to configure the mib. + */ +int +store_snmpNotifyTable(int majorID, int minorID, void *serverarg, + void *clientarg) +{ + char line[SNMP_MAXBUF]; + char *cptr; + size_t tmpint; + struct snmpNotifyTable_data *StorageTmp; + struct header_complex_index *hcindex; + + + DEBUGMSGTL(("snmpNotifyTable", "storing data... ")); + + + for (hcindex = snmpNotifyTableStorage; hcindex != NULL; + hcindex = hcindex->next) { + StorageTmp = (struct snmpNotifyTable_data *) hcindex->data; + + /* + * store permanent and nonvolatile rows. + * XXX should there be a qualification on RowStatus?? + */ + if ((StorageTmp->snmpNotifyStorageType == ST_NONVOLATILE) || + (StorageTmp->snmpNotifyStorageType == ST_PERMANENT) ){ + + memset(line, 0, sizeof(line)); + strcat(line, "snmpNotifyTable "); + cptr = line + strlen(line); + + cptr = + read_config_store_data(ASN_OCTET_STR, cptr, + &StorageTmp->snmpNotifyName, + &StorageTmp->snmpNotifyNameLen); + cptr = + read_config_store_data(ASN_OCTET_STR, cptr, + &StorageTmp->snmpNotifyTag, + &StorageTmp->snmpNotifyTagLen); + cptr = + read_config_store_data(ASN_INTEGER, cptr, + &StorageTmp->snmpNotifyType, + &tmpint); + cptr = + read_config_store_data(ASN_INTEGER, cptr, + &StorageTmp->snmpNotifyStorageType, + &tmpint); + cptr = + read_config_store_data(ASN_INTEGER, cptr, + &StorageTmp->snmpNotifyRowStatus, + &tmpint); + + snmpd_store_config(line); + } + } + DEBUGMSGTL(("snmpNotifyTable", "done.\n")); + return 0; +} + diff --git a/agent/mibgroup/notification/snmpNotifyTable_data.h b/agent/mibgroup/notification/snmpNotifyTable_data.h new file mode 100644 index 0000000..73510fb --- /dev/null +++ b/agent/mibgroup/notification/snmpNotifyTable_data.h @@ -0,0 +1,68 @@ +/* + * This file was created to separate data storage from MIB implementation. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + + +#ifndef _MIBGROUP_SNMPNOTIFYTABLE_DATA_H +#define _MIBGROUP_SNMPNOTIFYTABLE_DATA_H + + +/* + * we may use header_complex from the header_complex module + */ +config_require(header_complex); +config_require(target/target); +config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage); + +#define NOTIFY_NAME_MAX 32 +#define NOTIFY_TAG_MAX 255 + +/* + * our storage structure(s) + */ +struct snmpNotifyTable_data { + char *snmpNotifyName; + size_t snmpNotifyNameLen; + char *snmpNotifyTag; + size_t snmpNotifyTagLen; + long snmpNotifyType; + long snmpNotifyStorageType; + long snmpNotifyRowStatus; +}; + + +/* + * enum definitions from the covered mib sections + */ + +#define SNMPNOTIFYTYPE_TRAP 1 +#define SNMPNOTIFYTYPE_INFORM 2 + + +/* + * function prototypes + */ +void init_snmpNotifyTable_data(void); +void shutdown_snmpNotifyTable_data(void); + +int snmpNotifyTable_add(struct snmpNotifyTable_data *thedata); +int snmpNotifyTable_remove(struct snmpNotifyTable_data *thedata); +struct snmpNotifyTable_data * + snmpNotifyTable_extract(struct snmpNotifyTable_data *thedata); +void snmpNotifyTable_dispose(struct snmpNotifyTable_data *thedata); + +void snmpNotifyTable_unregister_notification(const char *, u_char); + +struct snmpNotifyTable_data *get_notifyTable2(const char *name, size_t len); +struct snmpNotifyTable_data *find_row_notifyTable(struct variable *vp, + oid * name, size_t * length, + int exact, size_t * var_len, + WriteMethod ** write_method); + + +#endif /* _MIBGROUP_SNMPNOTIFYTABLE_DATA_H */ diff --git a/agent/mibgroup/rmon-mib.h b/agent/mibgroup/rmon-mib.h index 6f09df7..e660b66 100644 --- a/agent/mibgroup/rmon-mib.h +++ b/agent/mibgroup/rmon-mib.h @@ -2,7 +2,7 @@ * module to include the modules */ -config_require(rmon-mib/etherStatsTable) -config_add_mib(RMON-MIB) +config_require(rmon-mib/etherStatsTable); +config_add_mib(RMON-MIB); diff --git a/agent/mibgroup/rmon-mib/data_access/etherstats.h b/agent/mibgroup/rmon-mib/data_access/etherstats.h index e35dd61..dd66078 100644 --- a/agent/mibgroup/rmon-mib/data_access/etherstats.h +++ b/agent/mibgroup/rmon-mib/data_access/etherstats.h @@ -3,5 +3,5 @@ */ #if defined(linux) -config_require(rmon-mib/data_access/etherstats_linux) +config_require(rmon-mib/data_access/etherstats_linux); #endif diff --git a/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c b/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c index a6a42c3..ebad8ab 100644 --- a/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c +++ b/agent/mibgroup/rmon-mib/data_access/etherstats_linux.c @@ -5,6 +5,10 @@ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif + /* * include our parent header */ @@ -242,10 +246,70 @@ interface_ioctl_etherstats_get (etherStatsTable_rowreq_ctx *rowreq_ctx , int fd, strlcpy(s, (const char *) ð_strings->data[i * ETH_GSTRING_LEN], sizeof(s)); + if (ETHERSTATSOCTETS(s)) { + data->etherStatsOctets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSOCTETS_FLAG; + } + if (ETHERSTATSPKTS(s)) { + data->etherStatsPkts += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS_FLAG; + } + if (ETHERSTATSBROADCASTPKTS(s)) { + data->etherStatsBroadcastPkts += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSBROADCASTPKTS_FLAG; + } + if (ETHERSTATSMULTICASTPKTS(s)) { + data->etherStatsMulticastPkts = (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSMULTICASTPKTS_FLAG; + } + if (ETHERSTATSCRCALIGNERRORS(s)) { + data->etherStatsCRCAlignErrors += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSCRCALIGNERRORS_FLAG; + } + if (ETHERSTATSUNDERSIZEPKTS(s)) { + data->etherStatsUndersizePkts += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSUNDERSIZEPKTS_FLAG; + } + if (ETHERSTATSOVERSIZEPKTS(s)) { + data->etherStatsOversizePkts += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSOVERSIZEPKTS_FLAG; + } + if (ETHERSTATSFRAGMENTS(s)) { + data->etherStatsFragments += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSFRAGMENTS_FLAG; + } if (ETHERSTATSJABBERS(s)) { - data->etherStatsJabbers = (u_long)eth_stats->data[i]; + data->etherStatsJabbers += (u_long)eth_stats->data[i]; rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSJABBERS_FLAG; } + if (ETHERSTATSCOLLISIONS(s)) { + data->etherStatsCollisions += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSCOLLISIONS_FLAG; + } + if (ETHERSTATSPKTS64OCTETS(s)) { + data->etherStatsPkts64Octets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS64OCTETS_FLAG; + } + if (ETHERSTATSPKTS65TO127OCTETS(s)) { + data->etherStatsPkts65to127Octets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS65TO127OCTETS_FLAG; + } + if (ETHERSTATSPKTS128TO255OCTETS(s)) { + data->etherStatsPkts128to255Octets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS128TO255OCTETS_FLAG; + } + if (ETHERSTATSPKTS256TO511OCTETS(s)) { + data->etherStatsPkts256to511Octets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS256TO511OCTETS_FLAG; + } + if (ETHERSTATSPKTS512TO1023OCTETS(s)) { + data->etherStatsPkts512to1023Octets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS512TO1023OCTETS_FLAG; + } + if (ETHERSTATSPKTS1024TO1518OCTETS(s)) { + data->etherStatsPkts1024to1518Octets += (u_long)eth_stats->data[i]; + rowreq_ctx->column_exists_flags |= COLUMN_ETHERSTATSPKTS1024TO1518OCTETS_FLAG; + } } free(eth_strings); free(eth_stats); @@ -282,8 +346,8 @@ _etherStats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name) */ if(NULL == name) { DEBUGMSGTL(("access:etherStatsTable:ioctl", - "_etherStats_ioctl_get invalid ifname '%s'\n", name)); - snmp_log (LOG_ERR, "access:etherStatsTable:ioctl, _etherStats_ioctl_get error on inerface '%s'\n", name); + "_etherStats_ioctl_get interface name is NULL")); + snmp_log (LOG_ERR, "access:etherStatsTable:ioctl, _etherStats_ioctl_get interface name is NULL"); return -1; } diff --git a/agent/mibgroup/rmon-mib/etherStatsTable.h b/agent/mibgroup/rmon-mib/etherStatsTable.h index 772845e..7d2da79 100644 --- a/agent/mibgroup/rmon-mib/etherStatsTable.h +++ b/agent/mibgroup/rmon-mib/etherStatsTable.h @@ -2,10 +2,10 @@ * module to include the modules */ -config_require(rmon-mib/data_access/etherstats) -config_require(rmon-mib/etherStatsTable/etherStatsTable) -config_require(rmon-mib/etherStatsTable/etherStatsTable_data_get) -config_require(rmon-mib/etherStatsTable/etherStatsTable_data_set) -config_require(rmon-mib/etherStatsTable/etherStatsTable_data_access) -config_require(rmon-mib/etherStatsTable/etherStatsTable_interface) +config_require(rmon-mib/data_access/etherstats); +config_require(rmon-mib/etherStatsTable/etherStatsTable); +config_require(rmon-mib/etherStatsTable/etherStatsTable_data_get); +config_require(rmon-mib/etherStatsTable/etherStatsTable_data_set); +config_require(rmon-mib/etherStatsTable/etherStatsTable_data_access); +config_require(rmon-mib/etherStatsTable/etherStatsTable_interface); diff --git a/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c b/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c index 48d4aca..7e41523 100644 --- a/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c +++ b/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_data_access.c @@ -11,6 +11,10 @@ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif + /* * include our parent header */ @@ -185,7 +189,7 @@ etherStatsTable_container_shutdown(netsnmp_container * container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -202,9 +206,6 @@ etherStatsTable_container_load(netsnmp_container * container) { size_t count = 0; - DEBUGMSGTL(("verbose:etherStatsTable:etherStatsTable_container_load", - "called\n")); - /* * TODO:352:M: | |-> set indexes in new etherStatsTable rowreq context. * data context will be set from the param (unless NULL, @@ -224,6 +225,10 @@ etherStatsTable_container_load(netsnmp_container * container) #if defined(linux) struct ifname *list_head = NULL, *p = NULL; #endif + + DEBUGMSGTL(("verbose:etherStatsTable:etherStatsTable_container_load", + "called\n")); + /* * create socket for ioctls @@ -279,6 +284,7 @@ etherStatsTable_container_load(netsnmp_container * container) if (NULL == rowreq_ctx) { snmp_log(LOG_ERR, "memory allocation failed\n"); close(fd); + etherstats_interface_name_list_free(list_head); return MFD_RESOURCE_UNAVAILABLE; } diff --git a/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c b/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c index 221c608..afb8673 100644 --- a/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c +++ b/agent/mibgroup/rmon-mib/etherStatsTable/etherStatsTable_interface.c @@ -47,12 +47,12 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) +netsnmp_feature_require(check_vb_type_and_max_size); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /********************************************************************** @@ -1221,7 +1221,7 @@ _mfd_etherStatsTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1459,7 +1459,7 @@ _etherStatsTable_check_column(etherStatsTable_rowreq_ctx * rowreq_ctx, * check defined range(s). */ if ((SNMPERR_SUCCESS == rc) - && ((var->val_len < 0) || (var->val_len > 127)) + && (var->val_len > 127) ) { rc = SNMP_ERR_WRONGLENGTH; } diff --git a/agent/mibgroup/rmon-mib/etherStatsTable/ioctl_imp_common.h b/agent/mibgroup/rmon-mib/etherStatsTable/ioctl_imp_common.h index 9819895..7598f9f 100644 --- a/agent/mibgroup/rmon-mib/etherStatsTable/ioctl_imp_common.h +++ b/agent/mibgroup/rmon-mib/etherStatsTable/ioctl_imp_common.h @@ -7,11 +7,13 @@ /* use kernel's ethtool.h */ +#ifdef HAVE_LINUX_ETHTOOL_NEEDS_U64 #include typedef __u64 u64; typedef __u32 u32; typedef __u16 u16; typedef __u8 u8; +#endif #include /* structure for storing the interface names in the system */ @@ -29,7 +31,77 @@ int interface_ioctl_etherstats_get(etherStatsTable_rowreq_ctx *rowreq_ctx, int f /* for maintainability */ +#define GENERIC_INCOMING_OCTETS "rx_octets" +#define GENERIC_INCOMING_PACKETS "rx_packets" +#define DSA_INCOMING_GOOD_OCTETS "in_good_octets" +#define DSA_INCOMING_BAD_OCTETS "in_bad_octets" +#define GENERIC_INCOMING_UNICAST "rx_unicast" +#define DSA_INCOMING_UNICAST "in_unicast" +#define GENERIC_INCOMING_BROADCAST "rx_broadcast" +#define DSA_INCOMING_BROADCAST "in_broadcast" +#define GENERIC_INCOMING_MULTICAST "rx_multicast" +#define DSA_INCOMING_MULTICAST "in_multicast" +#define DSA_INCOMING_FCS_ERROR "in_fcs_error" +#define FEC_INCOMING_CRC_ERROR "rx_crc_errors" +#define DSA_INCOMING_UNDERSIZE "in_undersize" +#define FEC_INCOMING_UNDERSIZE "rx_undersize" +#define DSA_INCOMING_OVERSIZE "in_oversize" +#define FEC_INCOMING_OVERSIZE "rx_oversize" +#define DSA_INCOMING_FRAGMENTS "in_fragments" +#define FEC_INCOMING_FRAGMENT "rx_fragment" +#define DSA_INCOMING_JABBER "in_jabber" +#define FEC_INCOMING_JABBER "rx_jabber" #define BROADCOM_RECEIVE_JABBERS "rx_jabbers" +#define DSA_COLLISIONS "collisions" +#define FEC_OUTGOING_COLLISION "tx_collision" +#define DSA_64BYTES "hist_64bytes" +#define FEC_64BYTES "rx_64byte" +#define DSA_65_127BYTES "hist_65_127bytes" +#define FEC_65_127BYTES "rx_65to127byte" +#define DSA_128_255BYTES "hist_128_255bytes" +#define FEC_128_255BYTES "rx_128to255byte" +#define DSA_256_511BYTES "hist_256_511bytes" +#define FEC_256_511BYTES "rx_256to511byte" +#define DSA_512_1023BYTES "hist_512_1023bytes" +#define FEC_512_1023BYTES "rx_512to1023byte" +#define DSA_1024_MAXBYTES "hist_1024_max_bytes" +#define FEC_1024_2047BYTES "rx_1024to2047byte" +#define FEC_GTE2048BYTES "rx_GTE2048byte" -#define ETHERSTATSJABBERS(x) strstr(x, BROADCOM_RECEIVE_JABBERS) - +#define ETHERSTATSOCTETS(x) (!strcmp(x, DSA_INCOMING_GOOD_OCTETS) || \ + !strcmp(x, DSA_INCOMING_BAD_OCTETS) || \ + !strcmp(x, GENERIC_INCOMING_OCTETS)) +#define ETHERSTATSPKTS(x) (!strcmp(x, DSA_INCOMING_UNICAST) || \ + !strcmp(x, DSA_INCOMING_BROADCAST) || \ + !strcmp(x, DSA_INCOMING_MULTICAST) || \ + !strcmp(x, GENERIC_INCOMING_PACKETS)) +#define ETHERSTATSBROADCASTPKTS(x) (!strcmp(x, DSA_INCOMING_BROADCAST) || \ + !strcmp(x, GENERIC_INCOMING_BROADCAST)) +#define ETHERSTATSMULTICASTPKTS(x) (!strcmp(x, DSA_INCOMING_MULTICAST) || \ + !strcmp(x, GENERIC_INCOMING_MULTICAST)) +#define ETHERSTATSCRCALIGNERRORS(x) (!strcmp(x, DSA_INCOMING_FCS_ERROR) || \ + !strcmp(x, FEC_INCOMING_CRC_ERROR)) +#define ETHERSTATSUNDERSIZEPKTS(x) (!strcmp(x, DSA_INCOMING_UNDERSIZE) || \ + !strcmp(x, FEC_INCOMING_UNDERSIZE)) +#define ETHERSTATSOVERSIZEPKTS(x) (!strcmp(x, DSA_INCOMING_OVERSIZE) || \ + !strcmp(x, FEC_INCOMING_OVERSIZE)) +#define ETHERSTATSFRAGMENTS(x) (!strcmp(x, DSA_INCOMING_FRAGMENTS) || \ + !strcmp(x, FEC_INCOMING_FRAGMENT)) +#define ETHERSTATSJABBERS(x) (!strcmp(x, BROADCOM_RECEIVE_JABBERS) || \ + !strcmp(x, FEC_INCOMING_JABBER) || \ + !strcmp(x, DSA_INCOMING_JABBER)) +#define ETHERSTATSCOLLISIONS(x) (!strcmp(x, DSA_COLLISIONS) || \ + !strcmp(x, FEC_OUTGOING_COLLISION)) +#define ETHERSTATSPKTS64OCTETS(x) (!strcmp(x, DSA_64BYTES) || \ + !strcmp(x, FEC_64BYTES)) +#define ETHERSTATSPKTS65TO127OCTETS(x) (!strcmp(x, DSA_65_127BYTES) || \ + !strcmp(x, FEC_65_127BYTES)) +#define ETHERSTATSPKTS128TO255OCTETS(x) (!strcmp(x, DSA_128_255BYTES) || \ + !strcmp(x, FEC_128_255BYTES)) +#define ETHERSTATSPKTS256TO511OCTETS(x) (!strcmp(x, DSA_256_511BYTES) || \ + !strcmp(x, FEC_256_511BYTES)) +#define ETHERSTATSPKTS512TO1023OCTETS(x) (!strcmp(x, DSA_512_1023BYTES) || \ + !strcmp(x, FEC_512_1023BYTES)) +#define ETHERSTATSPKTS1024TO1518OCTETS(x) (!strcmp(x, DSA_1024_MAXBYTES) || \ + !strcmp(x, FEC_1024_2047BYTES) || \ + !strcmp(x, FEC_GTE2048BYTES)) diff --git a/agent/mibgroup/sctp-mib.h b/agent/mibgroup/sctp-mib.h index d2844fb..0511069 100644 --- a/agent/mibgroup/sctp-mib.h +++ b/agent/mibgroup/sctp-mib.h @@ -1,3 +1,3 @@ -config_require(sctp-mib/sctpScalars) -config_require(sctp-mib/sctpTables) -config_add_mib(SCTP-MIB) +config_require(sctp-mib/sctpScalars); +config_require(sctp-mib/sctpTables); +config_add_mib(SCTP-MIB); diff --git a/agent/mibgroup/sctp-mib/sctpScalars.h b/agent/mibgroup/sctp-mib/sctpScalars.h index 8dbb8b5..ef0c452 100644 --- a/agent/mibgroup/sctp-mib/sctpScalars.h +++ b/agent/mibgroup/sctp-mib/sctpScalars.h @@ -4,19 +4,19 @@ */ #ifndef SCTP_SCALARS_H #define SCTP_SCALARS_H -config_require(sctp-mib/sctpScalars_common) +config_require(sctp-mib/sctpScalars_common); #if defined( linux ) -config_require(sctp-mib/sctpScalars_linux) +config_require(sctp-mib/sctpScalars_linux); #elif defined( freebsd8 ) || defined ( freebsd7 ) -config_require(sctp-mib/sctpScalars_freebsd) +config_require(sctp-mib/sctpScalars_freebsd); #elif defined( solaris2 ) -config_require(sctp-mib/sctpScalars_solaris2) +config_require(sctp-mib/sctpScalars_solaris2); #else /* * couldn't determine the correct file! * require a bogus file to generate an error. */ -config_require(sctp-mib/scalars-unknown-arch) +config_require(sctp-mib/scalars-unknown-arch); #endif /* * Initialize and register the sctpStats and sctpParams handlers. diff --git a/agent/mibgroup/sctp-mib/sctpScalars_common.c b/agent/mibgroup/sctp-mib/sctpScalars_common.c index 2a895a8..f0a10a3 100644 --- a/agent/mibgroup/sctp-mib/sctpScalars_common.c +++ b/agent/mibgroup/sctp-mib/sctpScalars_common.c @@ -12,7 +12,7 @@ netsnmp_sctp_params sctp_params; static int need_wrap_check = 1; void -netsnmp_access_sctp_stats_init() +netsnmp_access_sctp_stats_init(void) { netsnmp_access_sctp_stats_arch_init(); } @@ -140,7 +140,7 @@ netsnmp_access_sctp_stats_free(netsnmp_cache * cache, void *magic) } void -netsnmp_access_sctp_params_init() +netsnmp_access_sctp_params_init(void) { netsnmp_access_sctp_params_arch_init(); } diff --git a/agent/mibgroup/sctp-mib/sctpScalars_linux.c b/agent/mibgroup/sctp-mib/sctpScalars_linux.c index 6da5a6b..95621a2 100644 --- a/agent/mibgroup/sctp-mib/sctpScalars_linux.c +++ b/agent/mibgroup/sctp-mib/sctpScalars_linux.c @@ -44,7 +44,7 @@ load_uint_file(const char *filename, u_int * value) } void -netsnmp_access_sctp_stats_arch_init() +netsnmp_access_sctp_stats_arch_init(void) { } @@ -143,8 +143,6 @@ netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats) if (ret < 0) { DEBUGMSGTL(("sctp:scalars:stats:arch_load", "Unknown entry: %s\n", line)); - /* fclose(f); */ - /* return ret; */ ret = 0; } } @@ -155,7 +153,7 @@ netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats) } void -netsnmp_access_sctp_params_arch_init() +netsnmp_access_sctp_params_arch_init(void) { } diff --git a/agent/mibgroup/sctp-mib/sctpTables.h b/agent/mibgroup/sctp-mib/sctpTables.h index d22aea0..311ef37 100644 --- a/agent/mibgroup/sctp-mib/sctpTables.h +++ b/agent/mibgroup/sctp-mib/sctpTables.h @@ -1,25 +1,25 @@ #ifndef SCTP_TABLES_H #define SCTP_TABLES_H -config_require(sctp-mib/sctpTables_common) -config_require(sctp-mib/sctpAssocRemAddrTable) -config_require(sctp-mib/sctpAssocLocalAddrTable) -config_require(sctp-mib/sctpLookupLocalPortTable) -config_require(sctp-mib/sctpLookupRemPortTable) -config_require(sctp-mib/sctpLookupRemHostNameTable) -config_require(sctp-mib/sctpLookupRemPrimIPAddrTable) -config_require(sctp-mib/sctpLookupRemIPAddrTable) +config_require(sctp-mib/sctpTables_common); +config_require(sctp-mib/sctpAssocRemAddrTable); +config_require(sctp-mib/sctpAssocLocalAddrTable); +config_require(sctp-mib/sctpLookupLocalPortTable); +config_require(sctp-mib/sctpLookupRemPortTable); +config_require(sctp-mib/sctpLookupRemHostNameTable); +config_require(sctp-mib/sctpLookupRemPrimIPAddrTable); +config_require(sctp-mib/sctpLookupRemIPAddrTable); /* * this one must be last to ensure proper initialization ordering */ -config_require(sctp-mib/sctpAssocTable) +config_require(sctp-mib/sctpAssocTable); #if defined( linux ) -config_require(sctp-mib/sctpTables_linux) -config_require(util_funcs/get_pid_from_inode) +config_require(sctp-mib/sctpTables_linux); +config_require(util_funcs/get_pid_from_inode); #elif defined( freebsd7 ) || defined( freebsd8 ) -config_require(sctp-mib/sctpTables_freebsd) +config_require(sctp-mib/sctpTables_freebsd); #elif defined( solaris2 ) -config_require(sctp-mib/sctpTables_solaris2) +config_require(sctp-mib/sctpTables_solaris2); #else -config_error(SCTP-MIB is not available in tihs environment) +config_error(SCTP-MIB is not available in tihs environment); #endif #endif /* SCTP_TABLES_H */ diff --git a/agent/mibgroup/sctp-mib/sctpTables_common.c b/agent/mibgroup/sctp-mib/sctpTables_common.c index b28ea03..776e3b0 100644 --- a/agent/mibgroup/sctp-mib/sctpTables_common.c +++ b/agent/mibgroup/sctp-mib/sctpTables_common.c @@ -13,7 +13,7 @@ #include "sctpLookupRemPrimIPAddrTable.h" #include "sctpLookupRemIPAddrTable.h" -netsnmp_feature_require(container_lifo) +netsnmp_feature_require(container_lifo); static void sctpAssocTable_collect_invalid(void *what, void *magic) diff --git a/agent/mibgroup/sctp-mib/sctpTables_freebsd.c b/agent/mibgroup/sctp-mib/sctpTables_freebsd.c index 516e9f5..d17ec90 100644 --- a/agent/mibgroup/sctp-mib/sctpTables_freebsd.c +++ b/agent/mibgroup/sctp-mib/sctpTables_freebsd.c @@ -239,6 +239,6 @@ sctpTables_arch_load(sctpTables_containers * containers, u_long * flags) offset += sizeof(struct xsctp_tcb); xinp = (struct xsctp_inpcb *)(buf + offset); } - free((void *)buf); + free(buf); return ret; } diff --git a/agent/mibgroup/sctp-mib/sctpTables_linux.c b/agent/mibgroup/sctp-mib/sctpTables_linux.c index 8e62860..a5b9578 100644 --- a/agent/mibgroup/sctp-mib/sctpTables_linux.c +++ b/agent/mibgroup/sctp-mib/sctpTables_linux.c @@ -286,7 +286,7 @@ load_assoc(sctpTables_containers * containers) /* * ignore the header. */ - fgets(line, sizeof(line), f); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), f)); while (fgets(line, sizeof(line), f) != NULL) { DEBUGMSGTL(("sctp:tables:load:assoc", "processing line: %s\n", @@ -406,7 +406,7 @@ load_remaddr(sctpTables_containers * containers) /* * ignore the header. */ - fgets(line, sizeof(line), f); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), f)); while (fgets(line, sizeof(line), f) != NULL) { DEBUGMSGTL(("sctp:load:remaddr", "processing line: %s\n", line)); diff --git a/agent/mibgroup/smux.h b/agent/mibgroup/smux.h index bc76929..3f42d61 100644 --- a/agent/mibgroup/smux.h +++ b/agent/mibgroup/smux.h @@ -1,4 +1,4 @@ /* * smux.h: top level .h file to merely include the sub-module. */ -config_require(smux/smux) +config_require(smux/smux); diff --git a/agent/mibgroup/smux/smux.c b/agent/mibgroup/smux/smux.c index 4598c2b..747b6a8 100644 --- a/agent/mibgroup/smux/smux.c +++ b/agent/mibgroup/smux/smux.c @@ -8,56 +8,56 @@ #include #include -#if HAVE_IO_H /* win32 */ +#ifdef HAVE_IO_H #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_ERR_H +#ifdef HAVE_ERR_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif #include -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_FILIO_H +#ifdef HAVE_SYS_FILIO_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif @@ -66,10 +66,9 @@ #include #include "smux.h" -#include "mibdefs.h" #include "snmpd.h" -netsnmp_feature_require(snprint_objid) +netsnmp_feature_require(snprint_objid); long smux_long; u_long smux_ulong; @@ -103,10 +102,9 @@ static int smux_pdu_process(int, u_char *, size_t); static int smux_send_rrsp(int, int); static smux_reg *smux_find_match(smux_reg *, int, oid *, size_t, long); static smux_reg *smux_find_replacement(oid *, size_t); -u_char *var_smux(struct variable *, oid *, size_t *, int, size_t *, - WriteMethod ** write_method); -int var_smux_write(int, u_char *, u_char, size_t, u_char *, - oid *, size_t); +u_char *var_smux_get(oid *, size_t, oid *, size_t *, int, size_t *, + u_char *); +int var_smux_write(int, u_char *, u_char, size_t, oid *, size_t); static smux_reg *ActiveRegs; /* Active registrations */ static smux_reg *PassiveRegs; /* Currently unused registrations */ @@ -114,14 +112,6 @@ static smux_reg *PassiveRegs; /* Currently unused registrations */ static smux_peer_auth *Auths[SMUX_MAX_PEERS]; /* Configured peers */ static int nauths, npeers = 0; -struct variable2 smux_variables[] = { - /* - * bogus entry, as in pass.c - */ - {MIBINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE, - var_smux, 0, {MIBINDEX}}, -}; - void @@ -244,7 +234,7 @@ real_init_smux(void) #endif netsnmp_sockaddr_in( &lo_socket, smux_socket, SMUXPORT ); - if ((smux_listen_sd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + if ((smux_listen_sd = (int) socket(AF_INET, SOCK_STREAM, 0)) < 0) { snmp_log_perror("[init_smux] socket failed"); return; } @@ -291,21 +281,89 @@ real_init_smux(void) smux_listen_sd, ntohs(lo_socket.sin_port))); } +static int +smux_handler(netsnmp_mib_handler *handler, + netsnmp_handler_registration *reginfo, + netsnmp_agent_request_info *reqinfo, + netsnmp_request_info *requests) +{ + u_char *access = NULL; + size_t var_len; + int exact = 1; + int status = 0; + u_char var_type; + static long old_reqid = -1; + static long old_sessid = -1; + long new_reqid, new_sessid; + + /* Increment the reqid of outgoing SMUX messages only when processing + * new incoming SNMP message, i.e. when reqid or session id chamges */ + new_reqid = reqinfo->asp->pdu->reqid; + new_sessid = reqinfo->asp->session->sessid; + DEBUGMSGTL(("smux", "smux_handler: incoming reqid=%ld, sessid=%ld\n", + new_reqid, new_sessid)); + if (old_reqid != new_reqid || old_sessid != new_sessid) { + smux_reqid++; + old_reqid = new_reqid; + old_sessid = new_sessid; + } + + switch (reqinfo->mode) { + case MODE_GETNEXT: + case MODE_GETBULK: + exact = 0; + } + + for (; requests; requests = requests->next) { + switch(reqinfo->mode) { + case MODE_GET: + case MODE_GETNEXT: + case MODE_SET_RESERVE1: + access = var_smux_get(reginfo->rootoid, + reginfo->rootoid_len, + requests->requestvb->name, + &requests->requestvb->name_length, + exact, + &var_len, + &var_type); + if (access) + if (reqinfo->mode != MODE_SET_RESERVE1) + snmp_set_var_typed_value(requests->requestvb, + var_type, access, var_len); + if (reqinfo->mode != MODE_SET_RESERVE1) + break; + /* fall through if MODE_SET_RESERVE1 */ + /* FALL THROUGH */ + + default: + /* SET processing */ + status = var_smux_write(reqinfo->mode, + requests->requestvb->val.string, + requests->requestvb->type, + requests->requestvb->val_len, + requests->requestvb->name, + requests->requestvb->name_length); + if (status != SNMP_ERR_NOERROR) { + netsnmp_set_request_error(reqinfo, requests, status); + } + } + } + return SNMP_ERR_NOERROR; +} + u_char * -var_smux(struct variable * vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) +var_smux_get(oid *root, size_t root_len, + oid * name, size_t * length, + int exact, size_t * var_len, u_char *var_type) { - u_char *valptr, val_type; + u_char *valptr; smux_reg *rptr; - *write_method = var_smux_write; /* * search the active registration list */ for (rptr = ActiveRegs; rptr; rptr = rptr->sr_next) { - if (0 >= snmp_oidtree_compare(vp->name, vp->namelen, rptr->sr_name, + if (0 >= snmp_oidtree_compare(root, root_len, rptr->sr_name, rptr->sr_name_len)) break; } @@ -315,7 +373,7 @@ var_smux(struct variable * vp, return NULL; valptr = smux_snmp_process(exact, name, length, - var_len, &val_type, rptr->sr_fd); + var_len, var_type, rptr->sr_fd); if (valptr == NULL) return NULL; @@ -328,10 +386,6 @@ var_smux(struct variable * vp, */ return NULL; } else { - /* - * set the type and return the value - */ - vp->type = val_type; return valptr; } } @@ -341,7 +395,7 @@ var_smux_write(int action, u_char * var_val, u_char var_val_type, size_t var_val_len, - u_char * statP, oid * name, size_t name_len) + oid * name, size_t name_len) { smux_reg *rptr; u_char buf[SMUXMAXPKTSIZE], *ptr, sout[3], type; @@ -451,6 +505,8 @@ var_smux_write(int action, */ packet_len = len; ptr = asn_parse_header(buf, &packet_len, &type); + if (ptr == NULL) + return SNMP_ERR_GENERR; packet_len += (ptr - buf); if (len > (ssize_t)packet_len) { /* @@ -483,9 +539,11 @@ var_smux_write(int action, if (buf[0] == SMUX_TRAP) { DEBUGMSGTL(("smux", "[var_smux_write] Received trap\n")); - snmp_log(LOG_INFO, "Got trap from peer on fd %d\n", - rptr->sr_fd); + DEBUGMSGTL(("smux", "Got trap from peer on fd %d\n", + rptr->sr_fd)); ptr = asn_parse_header(buf, &len, &type); + if (ptr == NULL) + return SNMP_ERR_GENERR; smux_trap_process(ptr, &len); @@ -589,18 +647,18 @@ smux_accept(int sd) */ DEBUGMSGTL(("smux", "[smux_accept] Calling accept()\n")); errno = 0; - if ((fd = accept(sd, (struct sockaddr *) &in_socket, &alen)) < 0) { + if ((fd = (int) accept(sd, (struct sockaddr *) &in_socket, &alen)) < 0) { snmp_log_perror("[smux_accept] accept failed"); return -1; } else { - snmp_log(LOG_INFO, "[smux_accept] accepted fd %d from %s:%d\n", + DEBUGMSGTL(("smux", "[smux_accept] accepted fd %d from %s:%d\n", fd, inet_ntoa(in_socket.sin_addr), - ntohs(in_socket.sin_port)); + ntohs(in_socket.sin_port))); if (npeers + 1 == SMUXMAXPEERS) { snmp_log(LOG_ERR, "[smux_accept] denied peer on fd %d, limit %d reached", fd, SMUXMAXPEERS); - close(sd); + close(fd); return -1; } @@ -694,7 +752,8 @@ smux_process(int fd) if (length <= 0) { - snmp_log_perror("[smux_process] peek failed"); + if (length < 0) + snmp_log_perror("[smux_process] peek failed"); smux_peer_cleanup(fd); return -1; } @@ -704,6 +763,8 @@ smux_process(int fd) */ packet_len = length; ptr = asn_parse_header(data, &packet_len, &type); + if (ptr == NULL) + return -1; packet_len += (ptr - data); if (length > packet_len) { /* @@ -750,6 +811,10 @@ smux_pdu_process(int fd, u_char * data, size_t length) while (error == 0 && ptr != NULL && ptr < data + length) { len = length - (ptr - data); ptr = asn_parse_header(ptr, &len, &type); + if (ptr == NULL) { + DEBUGMSGTL(("smux", "[smux_pdu_process] cannot parse header\n")); + break; + } DEBUGMSGTL(("smux", "[smux_pdu_process] type is %d\n", (int) type)); switch (type) { @@ -784,7 +849,7 @@ smux_pdu_process(int fd, u_char * data, size_t length) DEBUGMSGTL(("smux", "This shouldn't have happened!\n")); break; case SMUX_TRAP: - snmp_log(LOG_INFO, "Got trap from peer on fd %d\n", fd); + DEBUGMSGTL(("smux", "Got trap from peer on fd %d\n", fd)); if (ptr) { DEBUGMSGTL(("smux", "[smux_pdu_process] call smux_trap_process.\n")); @@ -890,9 +955,9 @@ smux_open_process(int fd, u_char * ptr, size_t * len, int *fail) *fail = TRUE; return ptr; } - snmp_log(LOG_INFO, + DEBUGMSGTL(("smux", "accepted smux peer: oid %s, descr %s\n", - oid_print, descr); + oid_print, descr)); *fail = FALSE; return ptr; } @@ -1000,6 +1065,7 @@ smux_rreq_process(int sd, u_char * ptr, size_t * len) int i, result; u_char type; smux_reg *rptr, *nrptr; + netsnmp_handler_registration *reg; oid_name_len = MAX_OID_LEN; ptr = asn_parse_objid(ptr, len, &type, oid_name, &oid_name_len); @@ -1157,17 +1223,27 @@ smux_rreq_process(int sd, u_char * ptr, size_t * len) */ if (nrptr->sr_priority == -1) nrptr->sr_priority = 0; + + reg = netsnmp_create_handler_registration("smux", + smux_handler, + nrptr->sr_name, + nrptr->sr_name_len, + HANDLER_CAN_RWRITE); + if (reg == NULL) { + snmp_log(LOG_ERR, "SMUX: cannot create new smux peer " + "registration\n"); + smux_send_rrsp(sd, -1); + free(nrptr); + return NULL; + } + if (netsnmp_register_handler(reg) != MIB_REGISTERED_OK) { + snmp_log(LOG_ERR, "SMUX: cannot register new smux peer\n"); + smux_send_rrsp(sd, -1); + free(nrptr); + return NULL; + } + nrptr->reginfo = reg; smux_list_add(&ActiveRegs, nrptr); - if (register_mib("smux", (struct variable *) - smux_variables, sizeof(struct variable2), - 1, nrptr->sr_name, nrptr->sr_name_len) - != SNMPERR_SUCCESS) { - DEBUGMSGTL(("smux", "[smux_rreq_process] Failed to register subtree\n")); - smux_list_detach(&ActiveRegs, nrptr); - free(nrptr); - smux_send_rrsp(sd, -1); - return NULL; - } done: smux_send_rrsp(sd, nrptr->sr_priority); @@ -1214,16 +1290,35 @@ smux_find_match(smux_reg * regs, int sd, oid * oid_name, static void smux_replace_active(smux_reg * actptr, smux_reg * pasptr) { + netsnmp_handler_registration *reg; + smux_list_detach(&ActiveRegs, actptr); - unregister_mib(actptr->sr_name, actptr->sr_name_len); + if (actptr->reginfo) { + netsnmp_unregister_handler(actptr->reginfo); + actptr->reginfo = NULL; + } smux_list_detach(&PassiveRegs, pasptr); - (void) smux_list_add(&ActiveRegs, pasptr); - register_mib("smux", (struct variable *) smux_variables, - sizeof(struct variable2), 1, pasptr->sr_name, - pasptr->sr_name_len); + (void) smux_list_add(&ActiveRegs, pasptr); free(actptr); + + reg = netsnmp_create_handler_registration("smux", + smux_handler, + pasptr->sr_name, + pasptr->sr_name_len, + HANDLER_CAN_RWRITE); + if (reg == NULL) { + snmp_log(LOG_ERR, "SMUX: cannot create new smux peer registration\n"); + pasptr->reginfo = NULL; + return; + } + if (netsnmp_register_handler(reg) != MIB_REGISTERED_OK) { + snmp_log(LOG_ERR, "SMUX: cannot register new smux peer\n"); + pasptr->reginfo = NULL; + return; + } + pasptr->reginfo = reg; } static void @@ -1373,8 +1468,6 @@ smux_snmp_process(int exact, /* * Send the query to the peer */ - smux_reqid++; - if (exact) type = SMUX_GET; else @@ -1426,6 +1519,8 @@ smux_snmp_process(int exact, */ packet_len = length; ptr = asn_parse_header(result, &packet_len, &type); + if (ptr == NULL) + return NULL; packet_len += (ptr - result); if (length > packet_len) { /* @@ -1457,8 +1552,10 @@ smux_snmp_process(int exact, if (result[0] == SMUX_TRAP) { DEBUGMSGTL(("smux", "[smux_snmp_process] Received trap\n")); - snmp_log(LOG_INFO, "Got trap from peer on fd %d\n", sd); + DEBUGMSGTL(("smux", "Got trap from peer on fd %d\n", sd)); ptr = asn_parse_header(result, (size_t *) &length, &type); + if (ptr == NULL) + return NULL; smux_trap_process(ptr, (size_t *) &length); /* @@ -1757,6 +1854,7 @@ smux_peer_cleanup(int sd) { smux_reg *nrptr, *rptr, *rptr2; int i; + netsnmp_handler_registration *reg; /* * close the descriptor @@ -1781,15 +1879,30 @@ smux_peer_cleanup(int sd) rptr2 = rptr->sr_next; if (rptr->sr_fd == sd) { smux_list_detach(&ActiveRegs, rptr); - unregister_mib(rptr->sr_name, rptr->sr_name_len); + if (rptr->reginfo) { + netsnmp_unregister_handler(rptr->reginfo); + rptr->reginfo = NULL; + } if ((nrptr = smux_find_replacement(rptr->sr_name, rptr->sr_name_len)) != - NULL) { + NULL) { smux_list_detach(&PassiveRegs, nrptr); + reg = netsnmp_create_handler_registration("smux", + smux_handler, + nrptr->sr_name, + nrptr->sr_name_len, + HANDLER_CAN_RWRITE); + if (reg == NULL) { + snmp_log(LOG_ERR, "SMUX: cannot create new smux peer " + "registration\n"); + continue; + } + if (netsnmp_register_handler(reg) != MIB_REGISTERED_OK) { + snmp_log(LOG_ERR, "SMUX: cannot register new smux peer\n"); + continue; + } + nrptr->reginfo = reg; smux_list_add(&ActiveRegs, nrptr); - register_mib("smux", (struct variable *) - smux_variables, sizeof(struct variable2), - 1, nrptr->sr_name, nrptr->sr_name_len); } free(rptr); } @@ -1809,7 +1922,7 @@ smux_peer_cleanup(int sd) Auths[i]->sa_active_fd = -1; snprint_objid(oid_name, sizeof(oid_name), Auths[i]->sa_oid, Auths[i]->sa_oid_len); - snmp_log(LOG_INFO, "peer disconnected: %s\n", oid_name); + DEBUGMSGTL(("smux", "peer disconnected: %s\n", oid_name)); } } } @@ -1945,9 +2058,8 @@ smux_trap_process(u_char * rsp, size_t * len) ptr = snmp_parse_var_op(ptr, var_name, &var_name_len, &vartype, &var_val_len, (u_char **) & var_val, len); - if (ptr == NULL) { - return NULL; - } + if (ptr == NULL) + goto err; maxlen = SMUXMAXPKTSIZE; switch ((short) vartype) { @@ -1981,7 +2093,7 @@ smux_trap_process(u_char * rsp, size_t * len) */ if ((var_val = asn_parse_header(var_val, &maxlen, &vartype)) == NULL) - return NULL; + goto err; memcpy((u_char *) & (smux_sa.sin_addr.s_addr), var_val, var_val_len); var_val = (u_char *) & (smux_sa.sin_addr.s_addr); @@ -1991,8 +2103,6 @@ smux_trap_process(u_char * rsp, size_t * len) /* * XXX */ - if (len == NULL) - return NULL; var_val_len = SMUXMAXSTRLEN; asn_parse_string(var_val, &maxlen, &vartype, smux_str, &var_val_len); @@ -2015,8 +2125,6 @@ smux_trap_process(u_char * rsp, size_t * len) /* * XXX */ - if (len == NULL) - return NULL; var_val_len = SMUXMAXSTRLEN; asn_parse_bitstring(var_val, &maxlen, &vartype, smux_str, &var_val_len); @@ -2029,12 +2137,9 @@ smux_trap_process(u_char * rsp, size_t * len) break; } - snmptrap_tmp = - (netsnmp_variable_list *) - malloc(sizeof(netsnmp_variable_list)); + snmptrap_tmp = calloc(1, sizeof(netsnmp_variable_list)); if (snmptrap_tmp == NULL) - return NULL; - memset(snmptrap_tmp, 0, sizeof(netsnmp_variable_list)); + goto err; if (snmptrap_head == NULL) { snmptrap_head = snmptrap_tmp; snmptrap_ptr = snmptrap_head; @@ -2063,6 +2168,9 @@ smux_trap_process(u_char * rsp, size_t * len) return ptr; +err: + snmp_free_varbind(snmptrap_head); + return NULL; } #define NUM_SOCKETS 32 diff --git a/agent/mibgroup/smux/smux.h b/agent/mibgroup/smux/smux.h index 88b8a3d..f8f0822 100644 --- a/agent/mibgroup/smux/smux.h +++ b/agent/mibgroup/smux/smux.h @@ -4,10 +4,10 @@ */ #ifndef NETSNMP_TRANSPORT_IPV4BASE_DOMAIN -config_error(smux/smux depends on the IPv4Base transport domain) +config_error(smux/smux depends on the IPv4Base transport domain); #endif -config_belongs_in(agent_module) +config_belongs_in(agent_module); #define SMUXPORT 199 @@ -60,6 +60,7 @@ typedef struct _smux_reg { int sr_priority; /* priority of registration */ int sr_fd; /* descriptor of owner */ struct _smux_reg *sr_next; /* next one */ + netsnmp_handler_registration *reginfo; } smux_reg; extern void init_smux(void); diff --git a/agent/mibgroup/smux/snmp_bgp.c b/agent/mibgroup/smux/snmp_bgp.c index 16b0185..9d64f52 100644 --- a/agent/mibgroup/smux/snmp_bgp.c +++ b/agent/mibgroup/smux/snmp_bgp.c @@ -9,25 +9,25 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_ERR_H +#ifdef HAVE_ERR_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -38,11 +38,11 @@ #include #include -#if HAVE_SYS_FILIO_H +#ifdef HAVE_SYS_FILIO_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -112,7 +112,6 @@ init_snmp_bdp(void) static oid max_bgp_mib[] = { 1, 3, 6, 1, 2, 1, 15, 5, 1, 6, 255, 255, 255, 255 }; static oid min_bgp_mib[] = { 1, 3, 6, 1, 2, 1, 15, 1, 0 }; -extern u_char smux_type; u_char * var_bgp(struct variable *vp, diff --git a/agent/mibgroup/smux/snmp_bgp.h b/agent/mibgroup/smux/snmp_bgp.h index 74ee6ec..3046630 100644 --- a/agent/mibgroup/smux/snmp_bgp.h +++ b/agent/mibgroup/smux/snmp_bgp.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_SNMP_BGP_H #define _MIBGROUP_SNMP_BGP_H -config_require(smux/smux) +config_require(smux/smux); extern FindVarMethod var_bgp; extern void init_snmp_bgp(void); diff --git a/agent/mibgroup/smux/snmp_ospf.c b/agent/mibgroup/smux/snmp_ospf.c index 73f0e43..0e440ad 100644 --- a/agent/mibgroup/smux/snmp_ospf.c +++ b/agent/mibgroup/smux/snmp_ospf.c @@ -9,25 +9,25 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_ERR_H +#ifdef HAVE_ERR_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -38,11 +38,11 @@ #include #include -#if HAVE_SYS_FILIO_H +#ifdef HAVE_SYS_FILIO_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -54,7 +54,6 @@ static oid max_ospf_mib[] = { 1, 3, 6, 1, 2, 1, 14, 14, 1, 6, 0 }; static oid min_ospf_mib[] = { 1, 3, 6, 1, 2, 1, 14, 1, 1, 0, 0, 0, 0 }; -extern u_char smux_type; struct variable13 ospf_variables[] = { {ospfRouterId, ASN_IPADDRESS, NETSNMP_OLDAPI_RWRITE, diff --git a/agent/mibgroup/smux/snmp_ospf.h b/agent/mibgroup/smux/snmp_ospf.h index 4cb50f6..45d58d8 100644 --- a/agent/mibgroup/smux/snmp_ospf.h +++ b/agent/mibgroup/smux/snmp_ospf.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_SNMP_OSPF_H #define _MIBGROUP_SNMP_OSPF_H -config_require(smux/smux) +config_require(smux/smux); extern FindVarMethod var_ospf; extern void init_snmp_ospf(void); diff --git a/agent/mibgroup/smux/snmp_rip2.c b/agent/mibgroup/smux/snmp_rip2.c index b987a09..976648c 100644 --- a/agent/mibgroup/smux/snmp_rip2.c +++ b/agent/mibgroup/smux/snmp_rip2.c @@ -9,25 +9,25 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_ERR_H +#ifdef HAVE_ERR_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -38,11 +38,11 @@ #include #include -#if HAVE_SYS_FILIO_H +#ifdef HAVE_SYS_FILIO_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -54,7 +54,6 @@ static oid max_rip_mib[] = { 1, 3, 6, 1, 2, 1, 23, 3, 1, 9, 255, 255, 255, 255 }; static oid min_rip_mib[] = { 1, 3, 6, 1, 2, 1, 23, 1, 1, 0 }; -extern u_char smux_type; struct variable13 rip2_variables[] = { {RIP2GLOBALROUTECHANGES, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, diff --git a/agent/mibgroup/smux/snmp_rip2.h b/agent/mibgroup/smux/snmp_rip2.h index 99652a0..918fa82 100644 --- a/agent/mibgroup/smux/snmp_rip2.h +++ b/agent/mibgroup/smux/snmp_rip2.h @@ -5,9 +5,9 @@ #ifndef _MIBGROUP_SNMP_RIP2_H #define _MIBGROUP_SNMP_RIP2_H -config_require(smux/smux) +config_require(smux/smux); - extern FindVarMethod var_rip2;; + extern FindVarMethod var_rip2; void init_snmp_rip2(void); diff --git a/agent/mibgroup/smux_gated.h b/agent/mibgroup/smux_gated.h index 60de796..412c521 100644 --- a/agent/mibgroup/smux_gated.h +++ b/agent/mibgroup/smux_gated.h @@ -1,6 +1,6 @@ /* * dummy module to load parts needed for smux/gated interaction */ -config_require(smux/snmp_ospf) -config_require(smux/snmp_rip2) -config_require(smux/snmp_bgp) +config_require(smux/snmp_ospf); +config_require(smux/snmp_rip2); +config_require(smux/snmp_bgp); diff --git a/agent/mibgroup/snmp-notification-mib.h b/agent/mibgroup/snmp-notification-mib.h index 1fb84f7..8c21360 100644 --- a/agent/mibgroup/snmp-notification-mib.h +++ b/agent/mibgroup/snmp-notification-mib.h @@ -1,2 +1,2 @@ -config_require(notification/snmpNotifyTable) -config_require(snmp-notification-mib/snmpNotifyFilterTable) +config_require(notification/snmpNotifyTable); +config_require(snmp-notification-mib/snmpNotifyFilterTable); diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h index f9b6173..3ccc16a 100644 --- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable.h @@ -1 +1 @@ -config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable) +config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable); diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c index d1c575f..251712e 100644 --- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.c @@ -27,7 +27,7 @@ #include "snmpNotifyFilterTable_interface.h" -netsnmp_feature_require(check_storage_transition) +netsnmp_feature_require(check_storage_transition); const oid snmpNotifyFilterTable_oid[] = { SNMPNOTIFYFILTERTABLE_OID }; @@ -339,9 +339,8 @@ snmpNotifyFilterTable_indexes_set_tbl_idx(snmpNotifyFilterTable_mib_index * /* * make sure there is enough space for snmpNotifyFilterProfileName data */ - if ((NULL == tbl_idx->snmpNotifyFilterProfileName) || - (tbl_idx->snmpNotifyFilterProfileName_len < - (snmpNotifyFilterProfileName_val_ptr_len))) { + if (tbl_idx->snmpNotifyFilterProfileName_len < + snmpNotifyFilterProfileName_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } @@ -359,9 +358,8 @@ snmpNotifyFilterTable_indexes_set_tbl_idx(snmpNotifyFilterTable_mib_index * /* * make sure there is enough space for snmpNotifyFilterSubtree data */ - if ((NULL == tbl_idx->snmpNotifyFilterSubtree) || - (tbl_idx->snmpNotifyFilterSubtree_len < - (snmpNotifyFilterSubtree_val_ptr_len))) { + if (tbl_idx->snmpNotifyFilterSubtree_len < + snmpNotifyFilterSubtree_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h index 3ff2f94..7d16d8b 100644 --- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h @@ -2,7 +2,10 @@ * Note: this file originally auto-generated by mib2c using * version : 1.48 $ of : mfd-top.m2c,v $ * - * $Id$ + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef SNMPNOTIFYFILTERTABLE_H #define SNMPNOTIFYFILTERTABLE_H @@ -17,13 +20,14 @@ extern "C" { * @{ */ #include +#include "snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h" /* * other required module components */ /* *INDENT-OFF* */ -config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface) -config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access) +config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface); +config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access); /* *INDENT-ON* */ /* @@ -133,16 +137,6 @@ config_require(snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable } snmpNotifyFilterTable_mib_index; - /* - * TODO:121:r: | |-> Review snmpNotifyFilterTable max index length. - * If you KNOW that your indexes will never exceed a certain - * length, update this macro to that length. - * - * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM - * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX! - * Guessing 128 - col/entry(2) - oid len(9) - */ -#define MAX_snmpNotifyFilterTable_IDX_LEN 117 /* diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h index f0c0e60..c91ebda 100644 --- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h @@ -2,7 +2,10 @@ * Note: this file originally auto-generated by mib2c using * : generic-table-constants.m2c,v 1.5 2005/07/15 22:41:16 rstory Exp $ * - * $Id$ + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef SNMPNOTIFYFILTERTABLE_CONSTANTS_H #define SNMPNOTIFYFILTERTABLE_CONSTANTS_H @@ -11,6 +14,7 @@ extern "C" { #endif +#include /* * column number definitions for table snmpNotifyFilterTable @@ -75,13 +79,6 @@ extern "C" { * since a Textual Convention may be referenced more than once in a * MIB, protect againt redefinitions of the enum values. */ -#ifndef SNMPNOTIFYFILTERTYPE_ENUMS -#define SNMPNOTIFYFILTERTYPE_ENUMS - -#define SNMPNOTIFYFILTERTYPE_INCLUDED 1 -#define SNMPNOTIFYFILTERTYPE_EXCLUDED 2 - -#endif /* SNMPNOTIFYFILTERTYPE_ENUMS */ /************************************************************* diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c index 942a865..f699346 100644 --- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c @@ -2,7 +2,10 @@ * Note: this file originally auto-generated by mib2c using * version : 1.17 $ of : mfd-data-access.m2c,v $ * - * $Id$ + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* * standard Net-SNMP includes @@ -18,10 +21,10 @@ */ #include "snmpNotifyFilterTable.h" - +#include "snmpNotifyFilterTable_data_storage.h" #include "snmpNotifyFilterTable_data_access.h" -netsnmp_feature_require(snmpNotifyFilterTable_container_get) +netsnmp_feature_require(snmpNotifyFilterTable_container_get); /** @ingroup interface * @addtogroup data_access data_access: Routines to access data @@ -107,7 +110,7 @@ snmpNotifyFilterTable_container_init(netsnmp_container **container_ptr_ptr) * For advanced users, you can use a custom container. If you * do not create one, one will be created for you. */ - *container_ptr_ptr = NULL; + *container_ptr_ptr = snmpNotifyFilter_storage_container_create(); } /* snmpNotifyFilterTable_container_init */ @@ -158,7 +161,7 @@ snmpNotifyFilterTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -488,104 +491,3 @@ snmpNotifyFilterTable_validate_index(snmpNotifyFilterTable_registration * } /* snmpNotifyFilterTable_validate_index */ /** @} */ - -/* - * ugly, inefficient hack: create a dummy viewEntry list from the filter table - * entries matching a profile name. This lets us use the existing vacm - * routines for matching oids to views. - */ -struct vacm_viewEntry * -snmpNotifyFilterTable_vacm_view_subtree(const char *profile) -{ - oid tmp_oid[MAX_OID_LEN]; - netsnmp_index tmp_idx; - size_t i, j; - netsnmp_void_array *s; - struct vacm_viewEntry *tmp; - snmpNotifyFilterTable_rowreq_ctx *rowreq; - netsnmp_container *c; - - tmp_idx.len = 0; - tmp_idx.oids = tmp_oid; - - /* - * get the container - */ - c = snmpNotifyFilterTable_container_get(); - if ((NULL == profile) || (NULL == c)) - return NULL; - - /* - * get the profile subset - */ - tmp_idx.oids[0] = strlen(profile); - tmp_idx.len = tmp_idx.oids[0] + 1; - for (i = 0; i < tmp_idx.len; ++i) - tmp_idx.oids[i + 1] = profile[i]; - s = c->get_subset(c, &tmp_idx); - if (NULL == s) - return NULL; - - /* - * allocate temporary storage - */ - tmp = (struct vacm_viewEntry*)calloc(sizeof(struct vacm_viewEntry), s->size + 1); - if (NULL == tmp) { - free(s->array); - free(s); - return NULL; - } - - /* - * copy data - */ - for (i = 0, j = 0; i < s->size; ++i) { - rowreq = (snmpNotifyFilterTable_rowreq_ctx *) s->array[i]; - - /* - * must match profile name exactly, and subset will return - * longer matches, if they exist. - */ - if (tmp_idx.oids[0] != - rowreq->tbl_idx.snmpNotifyFilterProfileName_len) - continue; - - /* - * exact match, copy data - * vacm_viewEntry viewName and viewSubtree are prefixed with length - */ - - tmp[j].viewName[0] = - rowreq->tbl_idx.snmpNotifyFilterProfileName_len; - memcpy(&tmp[j].viewName[1], - rowreq->tbl_idx.snmpNotifyFilterProfileName, - tmp[j].viewName[0]); - - tmp[j].viewSubtree[0] = - rowreq->tbl_idx.snmpNotifyFilterSubtree_len; - memcpy(&tmp[j].viewSubtree[1], - rowreq->tbl_idx.snmpNotifyFilterSubtree, - tmp[j].viewSubtree[0] * sizeof(oid)); - tmp[j].viewSubtreeLen = tmp[j].viewSubtree[0] + 1; - - tmp[j].viewMaskLen = rowreq->data.snmpNotifyFilterMask_len; - memcpy(tmp[j].viewMask, rowreq->data.snmpNotifyFilterMask, - tmp[j].viewMaskLen * sizeof(oid)); - - - tmp[j].viewType = rowreq->data.snmpNotifyFilterType; - - tmp[j].next = &tmp[j + 1]; - ++j; - } - if (j) - tmp[j - 1].next = NULL; - else { - SNMP_FREE(tmp); - } - - free(s->array); - free(s); - - return tmp; -} diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c new file mode 100644 index 0000000..8afbd33 --- /dev/null +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.c @@ -0,0 +1,406 @@ +/* + * Note: this file was created to separate data storage from MIB implementation + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + +/* + * standard Net-SNMP includes + */ +#include +#include +#include +#include + +/* + * include our parent header + */ +#include "snmpNotifyFilterTable_data_storage.h" +#include "notification/snmpNotifyTable_data.h" +#include "notification/snmpNotifyFilterProfileTable_data.h" + +#include +#include + +#include + + +netsnmp_feature_require(CONTAINER_FREE_ALL); + + +/********************************************************************** + ********************************************************************** + *** + *** Table snmpNotifyFilter + *** + ********************************************************************** + **********************************************************************/ +static netsnmp_container *_container = NULL; +static int _active = 0; + +static void +_snmpNotifyFilter_parse(const char *token, char *buf); + +static void +_nf_free_item(void *data, void *dontcare) +{ + snmpNotifyFilter_storage_dispose((snmpNotifyFilter_data_storage *)data); +} + +netsnmp_container * +snmpNotifyFilter_storage_container_create(void) +{ + if (NULL == _container) { + _container = + netsnmp_container_find("snmpNotifyFilter:table_container"); + if (NULL == _container) { + snmp_log(LOG_ERR, "error creating container in " + "snmpNotifyFilter_storage_container_create\n"); + return NULL; + } + _container->container_name = + strdup("snmpNotifyFilterTable_data_storage"); + _container->free_item = _nf_free_item; + } + return _container; +} + +void +init_snmpNotifyFilterTable_data_storage(void) +{ + if (NULL == _container) + (void) snmpNotifyFilter_storage_container_create(); + + register_config_handler(NULL, "notificationFilter", + _snmpNotifyFilter_parse, NULL, NULL); + +} + +void +shutdown_snmpNotifyFilterTable_data_storage(void) +{ + if (NULL == _container) + return; + + CONTAINER_FREE_ALL(_container, NULL); + CONTAINER_FREE(_container); + _container = NULL; + DEBUGMSGTL(("trap:notifyFilter:storage:shutdown", + "active count %d\n", _active)); + if (_active != 0) { + DEBUGMSGTL(("trap:notifyFilter:storage:shutdown", + "unexpected count %d after cleanup!\n",_active)); + snmp_log(LOG_WARNING, + "notifyFilter count %d, not 0, after shutdown.\n", _active); + } + + + +} + +snmpNotifyFilter_data_storage * +snmpNotifyFilter_storage_create(const u_char *name, size_t name_len, + const oid *subtree, size_t subtree_len) +{ + snmpNotifyFilter_data_storage *data; + int subtree_bytes = subtree_len * sizeof(oid); + + DEBUGMSGTL(("verbose:snmpNotifyFilter:storage:create", "called\n")); + + /* + * check that neither Name or Subtree are larger that maximun sizes + * and that their combined length doesn't exceed the table max index len. + * (+ 1 is for name length) + */ + if ((name_len > sizeof(data->snmpNotifyFilterProfileName)) || + ((subtree_bytes > sizeof(data->snmpNotifyFilterSubtree)) || + ((name_len + subtree_len + 1) > MAX_snmpNotifyFilterTable_IDX_LEN))) { + DEBUGMSGTL(("snmpNotifyFilter:storage:create", + "index(es) too long\n")); + return NULL; + } + + /** allocate memory */ + data = SNMP_MALLOC_TYPEDEF(snmpNotifyFilter_data_storage); + if (NULL == data) { + snmp_log(LOG_ERR, "memory allocation failed\n"); + return NULL; + } + ++_active; + + /** copy data */ + data->snmpNotifyFilterProfileName_len = name_len; + memcpy(data->snmpNotifyFilterProfileName, name, name_len); + + data->snmpNotifyFilterSubtree_len = subtree_len; + memcpy(data->snmpNotifyFilterSubtree, subtree, subtree_bytes); + + return data; +} + +void +snmpNotifyFilter_storage_dispose(snmpNotifyFilter_data_storage *data) +{ + free(data); + --_active; +} + +int +snmpNotifyFilter_storage_insert(snmpNotifyFilter_data_storage *data) +{ + int rc, i; + oid *pos; + + if (NULL == data) + return SNMPERR_GENERR; + + /* + * copy oid index and insert row + */ + pos = data->oid_idx.oids = data->oid_tmp; + *pos++ = data->snmpNotifyFilterProfileName_len; + data->oid_idx.len = 1; + + /** index: name */ + for( i=0; i < data->snmpNotifyFilterProfileName_len; + ++i, ++data->oid_idx.len) + *pos++ = data->snmpNotifyFilterProfileName[i]; + + /** index: subtree */ + memcpy(pos, data->snmpNotifyFilterSubtree, + data->snmpNotifyFilterSubtree_len * sizeof(oid)); + data->oid_idx.len += data->snmpNotifyFilterSubtree_len; + + DEBUGMSGTL(("internal:snmpNotifyFilter", "inserting row\n")); + rc = CONTAINER_INSERT(_container, data); + if (0 != rc) + return SNMPERR_GENERR; + + return SNMPERR_SUCCESS; +} + +int +snmpNotifyFilter_storage_remove(snmpNotifyFilter_data_storage *data) +{ + int rc; + + if (NULL == data) + return SNMPERR_GENERR; + + DEBUGMSGTL(("internal:snmpNotifyFilter", "removing row\n")); + rc = CONTAINER_REMOVE(_container, data); + if (0 != rc) + return SNMPERR_GENERR; + + return SNMPERR_SUCCESS; +} + +snmpNotifyFilter_data_storage * +snmpNotifyFilter_storage_add(const u_char *profileName, size_t profileName_len, + const oid *filterSubtree, + size_t filterSubtree_len, u_char *filterMask, + size_t filterMask_len, u_long filterType) +{ + snmpNotifyFilter_data_storage *data; + + data = snmpNotifyFilter_storage_create(profileName, profileName_len, + filterSubtree, filterSubtree_len); + if (NULL == data) + return NULL; + + memcpy(data->snmpNotifyFilterMask, filterMask, filterMask_len); + + data->snmpNotifyFilterType = filterType; + + if (snmpNotifyFilter_storage_insert(data) != SNMPERR_SUCCESS) { + snmpNotifyFilter_storage_dispose(data); + return NULL; + } + + return data; +} + +/* + * ugly, inefficient hack: create a dummy viewEntry list from the filter table + * entries matching a profile name. This lets us use the existing vacm + * routines for matching oids to views. + */ +struct vacm_viewEntry * +snmpNotifyFilter_vacm_view_subtree(const char *profile) +{ + oid tmp_oid[MAX_OID_LEN]; + netsnmp_index tmp_idx; + size_t i, j; + netsnmp_void_array *s; + struct vacm_viewEntry *tmp; + snmpNotifyFilter_data_storage *data; + + if ((NULL == profile) || (NULL == _container)) + return NULL; + + tmp_idx.len = 0; + tmp_idx.oids = tmp_oid; + + /* + * get the profile subset + */ + tmp_idx.oids[0] = strlen(profile); + tmp_idx.len = tmp_idx.oids[0] + 1; + for (i = 0; i < tmp_idx.len; ++i) + tmp_idx.oids[i + 1] = profile[i]; + s = _container->get_subset(_container, &tmp_idx); + if (NULL == s) + return NULL; + + /* + * allocate temporary storage + */ + tmp = (struct vacm_viewEntry*)calloc(sizeof(struct vacm_viewEntry), + s->size + 1); + if (NULL == tmp) { + free(s->array); + free(s); + return NULL; + } + + /* + * copy data + */ + for (i = 0, j = 0; i < s->size; ++i) { + data = (snmpNotifyFilter_data_storage *) s->array[i]; + + /* + * must match profile name exactly, and subset will return + * longer matches, if they exist. + */ + if (tmp_idx.oids[0] != data->snmpNotifyFilterProfileName_len) + continue; + + /* + * exact match, copy data + * vacm_viewEntry viewName and viewSubtree are prefixed with length + */ + tmp[j].viewName[0] = data->snmpNotifyFilterProfileName_len; + memcpy(&tmp[j].viewName[1], data->snmpNotifyFilterProfileName, + tmp[j].viewName[0]); + + tmp[j].viewSubtree[0] = data->snmpNotifyFilterSubtree_len; + memcpy(&tmp[j].viewSubtree[1], data->snmpNotifyFilterSubtree, + tmp[j].viewSubtree[0] * sizeof(oid)); + tmp[j].viewSubtreeLen = tmp[j].viewSubtree[0] + 1; + + tmp[j].viewMaskLen = data->snmpNotifyFilterMask_len; + memcpy(tmp[j].viewMask, data->snmpNotifyFilterMask, + tmp[j].viewMaskLen * sizeof(oid)); + + tmp[j].viewType = data->snmpNotifyFilterType; + + tmp[j].next = &tmp[j + 1]; + ++j; + } + if (j) + tmp[j - 1].next = NULL; + else { + SNMP_FREE(tmp); + } + + free(s->array); + free(s); + + return tmp; +} + + +/* + * parse values from configuration file + */ +static void +_snmpNotifyFilter_parse(const char *token, char *buf) +{ + snmpNotifyFilter_data_storage data, *row; + size_t len, tmp_len; + char type_buf[9]; /* include/excluded */ + + if (strcmp(token, "notificationFilter") != 0) { + snmp_log(LOG_ERR, + "unknown token in _snmpNotifyFilter_parse\n"); + return; + } + + DEBUGMSGTL(("internal:snmpNotifyFilter:parse", "line '%s'\n", buf)); + + if (NULL == buf) + goto bail; + + /* + * profile name + */ + data.snmpNotifyFilterProfileName_len = + sizeof(data.snmpNotifyFilterProfileName); + buf = read_config_read_memory(ASN_OCTET_STR, buf, + (char *) &data.snmpNotifyFilterProfileName, + (size_t *) &data.snmpNotifyFilterProfileName_len); + if (NULL == buf) + goto bail; + + /* + * subtree + */ + tmp_len = sizeof(data.snmpNotifyFilterSubtree); + buf = read_config_read_memory(ASN_OBJECT_ID, buf, + (char *) &data.snmpNotifyFilterSubtree, + (size_t *) &tmp_len); + if (NULL == buf) + goto bail; + data.snmpNotifyFilterSubtree_len = tmp_len / sizeof(oid); + + /* + * mask + */ + data.snmpNotifyFilterMask_len = sizeof(data.snmpNotifyFilterMask); + buf = read_config_read_memory(ASN_OCTET_STR, buf, + (char *) &data.snmpNotifyFilterMask, + (size_t *) &data.snmpNotifyFilterMask_len); + if (buf == NULL) + goto bail; + + /* + * type + */ + type_buf[0] = 0; /* empty string, in case read_config_read_memory fails */ + len = sizeof(type_buf); + buf = read_config_read_memory(ASN_OCTET_STR, buf, type_buf, + (size_t *) &len); + if (strcasecmp(type_buf, "included") == 0) + data.snmpNotifyFilterType = 1; + else if (strcasecmp(type_buf, "excluded") == 0) + data.snmpNotifyFilterType = 2; + else { + config_perror("type must be 'excluded' or 'included'"); + goto bail; + } + + /** ignore any other data */ + if (NULL != buf) + snmp_log(LOG_WARNING, "ignoring data after notificationFilter\n"); + + row = snmpNotifyFilter_storage_add(data.snmpNotifyFilterProfileName, + data.snmpNotifyFilterProfileName_len, + data.snmpNotifyFilterSubtree, + data.snmpNotifyFilterSubtree_len, + data.snmpNotifyFilterMask, + data.snmpNotifyFilterMask_len, + data.snmpNotifyFilterType); + if (NULL == row) + snmp_log(LOG_ERR,"couldn't add notification filter\n"); + + return; + + bail: + config_perror("error parsing notificationFilter\n"); + + return; +} diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h new file mode 100644 index 0000000..a09de34 --- /dev/null +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h @@ -0,0 +1,106 @@ +/* + * Note: this file was created to separate storage from MIB implementation + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ +#ifndef SNMPNOTIFYFILTERTABLE_DATA_STORAGE_H +#define SNMPNOTIFYFILTERTABLE_DATA_STORAGE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#include + +#ifndef SNMPNOTIFYFILTERTYPE_ENUMS +#define SNMPNOTIFYFILTERTYPE_ENUMS +#define SNMPNOTIFYFILTERTYPE_INCLUDED 1 +#define SNMPNOTIFYFILTERTYPE_EXCLUDED 2 +#endif /* SNMPNOTIFYFILTERTYPE_ENUMS */ + + /* + * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM + * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX! + * Guessing 128 - col/entry(2) - oid len(9) + */ +#define MAX_snmpNotifyFilterTable_IDX_LEN 117 + + typedef struct snmpNotifyFilterTable_data_storage_s { + + /** this must be first for container compare to work */ + netsnmp_index oid_idx; + oid oid_tmp[MAX_snmpNotifyFilterTable_IDX_LEN]; + + /* + * snmpNotifyFilterProfileName(1) + * SnmpAdminString/ASN_OCTET_STR/u_char(u_char)//L/A/W/e/R/d/H + */ + u_char snmpNotifyFilterProfileName[32]; + size_t snmpNotifyFilterProfileName_len; + + /* + * snmpNotifyFilterSubtree(1) + * OBJECTID/ASN_OBJECT_ID/oid(oid)//L/a/w/e/r/d/h + */ + /** 128 - 1(other indexes) - oid length(11) = 115 */ + oid snmpNotifyFilterSubtree[115]; + size_t snmpNotifyFilterSubtree_len; + + /** END OF INDEXES */ + + /* + * snmpNotifyFilterMask(2) + * OCTETSTR/ASN_OCTET_STR/char(u_char)//L/A/W/e/R/D/h + */ + u_char snmpNotifyFilterMask[16]; + size_t snmpNotifyFilterMask_len; + + /* + * snmpNotifyFilterType(3) + * INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h + */ + u_long snmpNotifyFilterType; + + } snmpNotifyFilter_data_storage; + + /* + ********************************************************************* + * function declarations + */ + netsnmp_container *snmpNotifyFilter_storage_container_create(void); + void init_snmpNotifyFilterTable_data_storage(void); + void shutdown_snmpNotifyFilterTable_data_storage(void); + + snmpNotifyFilter_data_storage* + snmpNotifyFilter_storage_create(const u_char *snmpNotifyFilterProfileName, + size_t snmpNotifyFilterProfileName_len, + const oid *snmpNotifyFilterSubtree, + size_t snmpNotifyFilterSubtree_len); + + void + snmpNotifyFilter_storage_dispose(snmpNotifyFilter_data_storage *data); + + int + snmpNotifyFilter_storage_insert(snmpNotifyFilter_data_storage *data); + + snmpNotifyFilter_data_storage * + snmpNotifyFilter_storage_add(const u_char *profile, size_t profile_len, + const oid *filterSubtree, + size_t filterSubtree_len, u_char *filterMask, + size_t filterMask_len, u_long filterType); + int + snmpNotifyFilter_storage_remove(snmpNotifyFilter_data_storage *data); + + struct vacm_viewEntry * + snmpNotifyFilter_vacm_view_subtree(const char *profile); + +#ifdef __cplusplus +} +#endif +#endif /* SNMPNOTIFYFILTERTABLE_DATA_STORAGE_H */ +/** @} */ + diff --git a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c index 4040e3f..5a31470 100644 --- a/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c +++ b/agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c @@ -47,21 +47,21 @@ #include -netsnmp_feature_child_of(snmpNotifyFilterTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(snmpNotifyFilterTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(table_container_row_insert) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(table_container_row_insert); +netsnmp_feature_require(check_all_requests_error); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_type_and_max_size) +netsnmp_feature_require(check_vb_type_and_max_size); #endif /* NETSNMP_NO_WRITE_SUPPORT */ -netsnmp_feature_child_of(snmpNotifyFilterTable_container_size, snmpNotifyFilterTable_external_access) -netsnmp_feature_child_of(snmpNotifyFilterTable_registration_set, snmpNotifyFilterTable_external_access) -netsnmp_feature_child_of(snmpNotifyFilterTable_registration_get, snmpNotifyFilterTable_external_access) -netsnmp_feature_child_of(snmpNotifyFilterTable_container_get, snmpNotifyFilterTable_external_access) +netsnmp_feature_child_of(snmpNotifyFilterTable_container_size, snmpNotifyFilterTable_external_access); +netsnmp_feature_child_of(snmpNotifyFilterTable_registration_set, snmpNotifyFilterTable_external_access); +netsnmp_feature_child_of(snmpNotifyFilterTable_registration_get, snmpNotifyFilterTable_external_access); +netsnmp_feature_child_of(snmpNotifyFilterTable_container_get, snmpNotifyFilterTable_external_access); /********************************************************************** ********************************************************************** @@ -201,23 +201,9 @@ snmpNotifyFilterTable_data *snmpNotifyFilterTable_allocate_data(void); * (Define its contents and how it's structured) */ void - - - - - - - - - - - - - - - - _snmpNotifyFilterTable_initialize_interface - (snmpNotifyFilterTable_registration * reg_ptr, u_long flags) { +_snmpNotifyFilterTable_initialize_interface + (snmpNotifyFilterTable_registration *reg_ptr, u_long flags) +{ netsnmp_baby_steps_access_methods *access_multiplexer = &snmpNotifyFilterTable_if_ctx.access_multiplexer; netsnmp_table_registration_info *tbl_info = @@ -326,10 +312,12 @@ void handler, snmpNotifyFilterTable_oid, snmpNotifyFilterTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #if !(defined(NETSNMP_NO_WRITE_SUPPORT) || defined(NETSNMP_DISABLE_SET_SUPPORT)) - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_NO_WRITE_SUPPORT || NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, @@ -413,23 +401,9 @@ void * Shutdown the table snmpNotifyFilterTable */ void - - - - - - - - - - - - - - - - _snmpNotifyFilterTable_shutdown_interface - (snmpNotifyFilterTable_registration * reg_ptr) { +_snmpNotifyFilterTable_shutdown_interface + (snmpNotifyFilterTable_registration *reg_ptr) +{ /* * shutdown the container */ @@ -448,9 +422,8 @@ snmpNotifyFilterTable_valid_columns_set(netsnmp_column_info *vc) * convert the index component stored in the context to an oid */ int -snmpNotifyFilterTable_index_to_oid(netsnmp_index * oid_idx, - snmpNotifyFilterTable_mib_index * - mib_idx) +snmpNotifyFilterTable_index_to_oid(netsnmp_index *oid_idx, + snmpNotifyFilterTable_mib_index *mib_idx) { int err = SNMP_ERR_NOERROR; @@ -523,9 +496,8 @@ snmpNotifyFilterTable_index_to_oid(netsnmp_index * oid_idx, * @retval SNMP_ERR_GENERR : error */ int -snmpNotifyFilterTable_index_from_oid(netsnmp_index * oid_idx, - snmpNotifyFilterTable_mib_index * - mib_idx) +snmpNotifyFilterTable_index_from_oid(netsnmp_index *oid_idx, + snmpNotifyFilterTable_mib_index *mib_idx) { int err = SNMP_ERR_NOERROR; @@ -1052,7 +1024,7 @@ _mfd_snmpNotifyFilterTable_get_values(netsnmp_mib_handler *handler, netsnmp_hand /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && @@ -1153,9 +1125,7 @@ _snmpNotifyFilterTable_check_column(snmpNotifyFilterTable_rowreq_ctx * /* * check defined range(s). */ - if ((SNMPERR_SUCCESS == rc) - && ((var->val_len < 0) || (var->val_len > 16)) - ) { + if (rc == SNMPERR_SUCCESS && var->val_len > 16) { rc = SNMP_ERR_WRONGLENGTH; } if (SNMPERR_SUCCESS != rc) { @@ -1870,6 +1840,7 @@ _mfd_snmpNotifyFilterTable_irreversible_commit(netsnmp_mib_handler * DATA ACCESS * ***********************************************************************/ +#if 0 /** * @internal */ @@ -1913,6 +1884,7 @@ _container_free(netsnmp_container *container) (netsnmp_container_obj_func *) _container_item_free, NULL); } /* _container_free */ +#endif /** * @internal @@ -1945,29 +1917,20 @@ _snmpNotifyFilterTable_container_init(snmpNotifyFilterTable_interface_ctx * * shutdown the container with functions or wrappers */ void - - - - - - - - - - - - - - - - _snmpNotifyFilterTable_container_shutdown - (snmpNotifyFilterTable_interface_ctx * if_ctx) { +_snmpNotifyFilterTable_container_shutdown + (snmpNotifyFilterTable_interface_ctx *if_ctx) +{ DEBUGMSGTL(("internal:snmpNotifyFilterTable:_snmpNotifyFilterTable_container_shutdown", "called\n")); snmpNotifyFilterTable_container_shutdown(if_ctx->container); - _container_free(if_ctx->container); - + /* + * Do not free the container here since + * shutdown_snmpNotifyFilterTable_data_storage() will free this container + * anyway. + */ + /* _container_free(if_ctx->container); */ + if_ctx->container = NULL; } /* _snmpNotifyFilterTable_container_shutdown */ /*********************************************************************** @@ -1984,9 +1947,7 @@ static int _snmpNotifyFilterTable_container_save_rows(int majorID, static void _snmpNotifyFilterTable_container_row_restore(const char *token, char *buf); -static int - _snmpNotifyFilterTable_container_row_save(snmpNotifyFilterTable_rowreq_ctx - * rowreq_ctx, +static void _snmpNotifyFilterTable_container_row_save(void *data, void *type); static char @@ -2079,8 +2040,7 @@ _snmpNotifyFilterTable_container_save_rows(int majorID, int minorID, /* * save all rows */ - CONTAINER_FOR_EACH(c, (netsnmp_container_obj_func *) - _snmpNotifyFilterTable_container_row_save, type); + CONTAINER_FOR_EACH(c, _snmpNotifyFilterTable_container_row_save, type); read_config_store((char *) type, sep); read_config_store((char *) type, "\n"); @@ -2096,10 +2056,11 @@ _snmpNotifyFilterTable_container_save_rows(int majorID, int minorID, /************************************************************ * _snmpNotifyFilterTable_container_row_save */ -static int -_snmpNotifyFilterTable_container_row_save(snmpNotifyFilterTable_rowreq_ctx - * rowreq_ctx, void *type) +static void +_snmpNotifyFilterTable_container_row_save(void *data, void *type) { + snmpNotifyFilterTable_rowreq_ctx *rowreq_ctx = data; + /* * Allocate space for a line with all data for a row. An * attempt is made to come up with a default maximum size, but @@ -2145,7 +2106,7 @@ _snmpNotifyFilterTable_container_row_save(snmpNotifyFilterTable_rowreq_ctx int i; if (snmpNotifyFilterTable_container_should_save(rowreq_ctx) == 0) { - return SNMP_ERR_NOERROR; + return; } /* @@ -2157,13 +2118,13 @@ _snmpNotifyFilterTable_container_row_save(snmpNotifyFilterTable_rowreq_ctx if (NULL == pos) { snmp_log(LOG_ERR, "error saving snmpNotifyFilterTable row " "to persistent file\n"); - return SNMP_ERR_GENERR; + return; } *pos++ = ' '; if (pos > max) { snmp_log(LOG_ERR, "error saving snmpNotifyFilterTable row " "to persistent file (too long)\n"); - return SNMP_ERR_GENERR; + return; } /* @@ -2185,7 +2146,7 @@ _snmpNotifyFilterTable_container_row_save(snmpNotifyFilterTable_rowreq_ctx if (pos > max) { snmp_log(LOG_ERR, "error saving snmpNotifyFilterTable row " "to persistent file (too long)\n"); - return SNMP_ERR_GENERR; + return; } } @@ -2201,13 +2162,11 @@ _snmpNotifyFilterTable_container_row_save(snmpNotifyFilterTable_rowreq_ctx if (pos > max) { snmp_log(LOG_ERR, "error saving snmpNotifyFilterTable row " "to persistent file (too long)\n"); - return SNMP_ERR_GENERR; + return; } read_config_store((char *) type, buf); DEBUGMSGTL(("internal:snmpNotifyFilterTable:_snmpNotifyFilterTable_container_row_save", "saving line '%s'\n", buf)); - - return SNMP_ERR_NOERROR; } static void diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib.h b/agent/mibgroup/snmp-usm-dh-objects-mib.h index 3aacf43..f0de819 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib.h +++ b/agent/mibgroup/snmp-usm-dh-objects-mib.h @@ -2,7 +2,7 @@ #define SNMP_USM_DH_OBJECTS_MIB_H config_add_mib(SNMP-USM-DH-OBJECTS-MIB); -config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable) -config_require(snmp-usm-dh-objects-mib/usmDHParameters) +config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable); +config_require(snmp-usm-dh-objects-mib/usmDHParameters); #endif /* SNMP_USM_DH_OBJECTS_MIB_H */ diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h index c277ab0..35b0365 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters.h @@ -1,6 +1,6 @@ #ifndef USMDHPARAMETERS_H #define USMDHPARAMETERS_H -config_require(snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters) +config_require(snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters); #endif /* USMDHPARAMETERS_H */ diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c index d28225d..94287dd 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c @@ -4,7 +4,9 @@ */ #include +#include #include +#include #include #include "usmDHParameters.h" @@ -22,6 +24,7 @@ get_dh_params(void) void init_usmDHParameters(void) { + BIGNUM *p = NULL, *g = NULL; static oid usmDHParameters_oid[] = { 1, 3, 6, 1, 3, 101, 1, 1, 1 }; @@ -38,9 +41,9 @@ init_usmDHParameters(void) management apps though */ if (!dh_params) { dh_params = DH_new(); - dh_params->g = BN_new(); - BN_hex2bn(&dh_params->g, "02"); - BN_hex2bn(&dh_params->p, "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"); + BN_hex2bn(&g, "02"); + BN_hex2bn(&p, "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"); + DH_set0_pqg(dh_params, p, NULL, g); } } diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h index 84f2169..9eb1b31 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable.h @@ -1,6 +1,6 @@ #ifndef SNMP_USM_DH_OBJECTS_MIB_H #define SNMP_USM_DH_OBJECTS_MIB_H -config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable) +config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable); #endif /* SNMP_USM_DH_OBJECTS_MIB_H */ diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h index b343d78..28743fc 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable.h @@ -22,10 +22,10 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface) -config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access) -config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get) -config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set) +config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface); +config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access); +config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get); +config_require(snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c index a139c9f..44d1965 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_access.c @@ -188,7 +188,7 @@ usmDHUserKeyTable_container_shutdown(netsnmp_container * container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c index 427d26f..f98076c 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c @@ -8,11 +8,11 @@ * standard Net-SNMP includes */ #include +#include #include +#include #include -#include - /* * include our parent header */ @@ -20,10 +20,12 @@ #include "usmDHUserKeyTable.h" #include "snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.h" + DH * usmDHGetUserDHptr(struct usmUser *user, int for_auth_key) { DH *dh, *dh_params; + const BIGNUM *g, *p; void **theptr; if (user == NULL) @@ -44,9 +46,10 @@ usmDHGetUserDHptr(struct usmUser *user, int for_auth_key) dh_params = get_dh_params(); if (!dh_params) return NULL; - dh->g = BN_dup(dh_params->g); - dh->p = BN_dup(dh_params->p); - if (!dh->g || !dh->p) + DH_get0_pqg(dh_params, &p, NULL, &g); + DH_set0_pqg(dh, BN_dup(p), NULL, BN_dup(g)); + DH_get0_pqg(dh, &p, NULL, &g); + if (!g || !p) return NULL; DH_generate_key(dh); *theptr = dh; @@ -60,7 +63,8 @@ int usmDHGetUserKeyChange(struct usmUser *user, int for_auth_key, u_char **keyobj, size_t *keyobj_len) { - DH *dh; + DH *dh = NULL; + const BIGNUM *pub_key = NULL; dh = usmDHGetUserDHptr(user, for_auth_key); @@ -70,9 +74,10 @@ usmDHGetUserKeyChange(struct usmUser *user, int for_auth_key, return MFD_ERROR; } - *keyobj_len = BN_num_bytes(dh->pub_key); + DH_get0_key(dh, &pub_key, NULL); + *keyobj_len = BN_num_bytes(pub_key); *keyobj = malloc(*keyobj_len); - BN_bn2bin(dh->pub_key, *keyobj); + BN_bn2bin(pub_key, *keyobj); return MFD_SUCCESS; } @@ -125,13 +130,13 @@ usmDHUserKeyTable_allocate_data(void) if (NULL == rtn) { snmp_log(LOG_ERR, "unable to malloc memory for new " "usmDHUserKeyTable_data.\n"); + } else { + /* + * not real user, not in a list. mark for testing + */ + rtn->next = (struct usmUser *) -1; + rtn->prev = (struct usmUser *) -1; } - /* - * not real user, not in a list. mark for testing - */ - rtn->next = (struct usmUser *) -1; - rtn->prev = (struct usmUser *) -1; - return rtn; } /* usmDHUserKeyTable_allocate_data */ @@ -151,15 +156,7 @@ usmDHUserKeyTable_release_data(usmDHUserKeyTable_data * data) netsnmp_assert(user->next == (struct usmUser *) -1); netsnmp_assert(user->prev == (struct usmUser *) -1); - /* - * TODO:202:r: |-> release memory for the usmDHUserKeyTable data context. - */ - if (user) { - SNMP_FREE(user->authKey); - SNMP_FREE(user->privKey); - } - - free(data); + usm_free_user(user); } /* usmDHUserKeyTable_release_data */ @@ -199,8 +196,7 @@ usmDHUserKeyTable_indexes_set_tbl_idx(usmDHUserKeyTable_mib_index * /* * make sure there is enough space for usmUserEngineID data */ - if ((NULL == tbl_idx->usmUserEngineID) || - (tbl_idx->usmUserEngineID_len < (usmUserEngineID_val_ptr_len))) { + if (tbl_idx->usmUserEngineID_len < usmUserEngineID_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } @@ -218,8 +214,7 @@ usmDHUserKeyTable_indexes_set_tbl_idx(usmDHUserKeyTable_mib_index * /* * make sure there is enough space for usmUserName data */ - if ((NULL == tbl_idx->usmUserName) || - (tbl_idx->usmUserName_len < (usmUserName_val_ptr_len))) { + if (tbl_idx->usmUserName_len < usmUserName_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c index 567d20e..0186194 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_set.c @@ -9,6 +9,7 @@ * standard Net-SNMP includes */ #include +#include #include #include @@ -28,8 +29,9 @@ usmDHUserCheckValue(struct usmUser *user, int for_auth_key, * The set value must be composed of 2 parts, the first being the * current value */ - u_char *current_value; - size_t current_value_len; + u_char *current_value = NULL; + size_t current_value_len = 0; + int ret = MFD_SUCCESS; DEBUGMSGTL(("verbose:usmDHUserKeyTable:usmDHUserCheckValue", "called\n")); @@ -40,22 +42,23 @@ usmDHUserCheckValue(struct usmUser *user, int for_auth_key, return MFD_ERROR; if (val_len != current_value_len * 2) - return MFD_NOT_VALID_NOW; + ret = MFD_NOT_VALID_NOW; - if (memcmp(current_value, val, current_value_len) != 0) - return SNMP_ERR_WRONGVALUE; /* mandated error string */ + else if (memcmp(current_value, val, current_value_len) != 0) + ret = SNMP_ERR_WRONGVALUE; /* mandated error string */ - return MFD_SUCCESS; + SNMP_FREE(current_value); + return ret; } int usmDHSetKey(struct usmUser *user, int for_auth_key, u_char *val, size_t val_len) { - DH *dh; - BIGNUM *other_pub; - u_char *key; - size_t key_len; + DH *dh = NULL; + BIGNUM *other_pub = NULL; + u_char *key = NULL; + size_t key_len = 0; DEBUGMSGTL(("verbose:usmDHUserKeyTable:usmDHSetKey", "called\n")); /* @@ -76,12 +79,17 @@ usmDHSetKey(struct usmUser *user, int for_auth_key, key_len = DH_size(dh); key = malloc(DH_size(dh)); if (!key) + { + BN_clear_free(other_pub); return MFD_ERROR; + } if (DH_compute_key(key, other_pub, dh)) { u_char **replkey; size_t replkey_size; + BN_clear_free(other_pub); + if (for_auth_key) { replkey_size = user->authKeyLen; replkey = &user->authKey; @@ -94,16 +102,22 @@ usmDHSetKey(struct usmUser *user, int for_auth_key, * is it large enough? */ if (key_len < replkey_size) + { + SNMP_FREE(key); return MFD_ERROR; + } /* * copy right most bits, per the object requirements */ SNMP_FREE(*replkey); *replkey = netsnmp_memdup(key + key_len - replkey_size, replkey_size); + SNMP_FREE(key); return MFD_SUCCESS; } + SNMP_FREE(other_pub); + SNMP_FREE(key); return MFD_ERROR; } diff --git a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c index 04231f9..b0e79f6 100644 --- a/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c +++ b/agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_interface.c @@ -47,9 +47,9 @@ #include -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); /********************************************************************** ********************************************************************** @@ -266,10 +266,12 @@ _usmDHUserKeyTable_initialize_interface(usmDHUserKeyTable_registration * netsnmp_handler_registration_create("usmDHUserKeyTable", handler, usmDHUserKeyTable_oid, usmDHUserKeyTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #ifndef NETSNMP_DISABLE_SET_SUPPORT - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table usmDHUserKeyTable\n"); @@ -871,7 +873,7 @@ _mfd_usmDHUserKeyTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/snmpv3/snmpEngine.c b/agent/mibgroup/snmpv3/snmpEngine.c index e756788..03efd52 100644 --- a/agent/mibgroup/snmpv3/snmpEngine.c +++ b/agent/mibgroup/snmpv3/snmpEngine.c @@ -11,9 +11,9 @@ #include "util_funcs/header_generic.h" #include "snmpEngine.h" -netsnmp_feature_child_of(snmpengine_all, libnetsnmpmibs) +netsnmp_feature_child_of(snmpengine_all, libnetsnmpmibs); -netsnmp_feature_child_of(register_snmpEngine_scalars_context, snmpengine_all) +netsnmp_feature_child_of(register_snmpEngine_scalars_context, snmpengine_all); struct variable2 snmpEngine_variables[] = { {SNMPENGINEID, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, @@ -46,6 +46,15 @@ struct variable2 snmpEngine_variables[] = { oid snmpEngine_variables_oid[] = { 1, 3, 6, 1, 6, 3, 10, 2, 1 }; +#if !defined(NETSNMP_NO_WRITE_SUPPORT) && defined(NETSNMP_ENABLE_TESTING_CODE) +int write_engineBoots(int action, u_char * var_val, u_char var_val_type, + size_t var_val_len, u_char * statP, oid * name, + size_t name_len); +int write_engineTime(int action, u_char * var_val, u_char var_val_type, + size_t var_val_len, u_char * statP, oid * name, + size_t name_len); +#endif + void register_snmpEngine_scalars(void) { @@ -76,15 +85,6 @@ init_snmpEngine(void) register_snmpEngine_scalars(); } -#ifndef NETSNMP_NO_WRITE_SUPPORT -#ifdef NETSNMP_ENABLE_TESTING_CODE -int write_engineBoots(int, u_char *, u_char, size_t, u_char *, - oid *, size_t); -int write_engineTime(int, u_char *, u_char, size_t, u_char *, - oid *, size_t); -#endif /* NETSNMP_ENABLE_TESTING_CODE */ -#endif /* NETSNMP_NO_WRITE_SUPPORT */ - u_char * var_snmpEngine(struct variable *vp, oid * name, @@ -146,8 +146,7 @@ var_snmpEngine(struct variable *vp, } -#ifndef NETSNMP_NO_WRITE_SUPPORT -#ifdef NETSNMP_ENABLE_TESTING_CODE +#if !defined(NETSNMP_NO_WRITE_SUPPORT) && defined(NETSNMP_ENABLE_TESTING_CODE) /* * write_engineBoots(): * @@ -165,8 +164,6 @@ write_engineBoots(int action, * variables we may use later */ static long long_ret; - size_t size; - int bigsize = SNMP_MAXBUF_MEDIUM; u_char engineIDBuf[SNMP_MAXBUF_MEDIUM]; int engineIDBufLen = 0; @@ -212,8 +209,6 @@ write_engineTime(int action, * variables we may use later */ static long long_ret; - size_t size; - int bigsize = SNMP_MAXBUF_MEDIUM; u_char engineIDBuf[SNMP_MAXBUF_MEDIUM]; int engineIDBufLen = 0; @@ -242,5 +237,4 @@ write_engineTime(int action, return SNMP_ERR_NOERROR; } -#endif /* NETSNMP_ENABLE_TESTING_CODE */ -#endif /* NETSNMP_NO_WRITE_SUPPORT */ +#endif /* ! NETSNMP_NO_WRITE_SUPPORT && NETSNMP_ENABLE_TESTING_CODE */ diff --git a/agent/mibgroup/snmpv3/snmpEngine.h b/agent/mibgroup/snmpv3/snmpEngine.h index b62a220..a233c90 100644 --- a/agent/mibgroup/snmpv3/snmpEngine.h +++ b/agent/mibgroup/snmpv3/snmpEngine.h @@ -13,8 +13,8 @@ * we use header_generic from the util_funcs module */ -config_require(util_funcs/header_generic) -config_add_mib(SNMP-FRAMEWORK-MIB) +config_require(util_funcs/header_generic); +config_add_mib(SNMP-FRAMEWORK-MIB); /* * Magic number definitions: diff --git a/agent/mibgroup/snmpv3/snmpMPDStats.c b/agent/mibgroup/snmpv3/snmpMPDStats.c index ae792df..1e688b7 100644 --- a/agent/mibgroup/snmpv3/snmpMPDStats.c +++ b/agent/mibgroup/snmpv3/snmpMPDStats.c @@ -1,69 +1,63 @@ /* - * snmpMPDStats.c: tallies errors for SNMPv3 message processing. + * snmpMPDStats.c: tallies errors for SNMPv3 message processing. + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include + +#include + #include #include #include #include "snmpMPDStats.h" -#include "util_funcs/header_generic.h" +#include -struct variable2 snmpMPDStats_variables[] = { - {SNMPUNKNOWNSECURITYMODELS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_snmpMPDStats, 1, {1}}, - {SNMPINVALIDMSGS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_snmpMPDStats, 1, {2}}, - {SNMPUNKNOWNPDUHANDLERS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_snmpMPDStats, 1, {3}}, -}; +#define snmpMPDMIB 1, 3, 6, 1, 6, 3, 11 +#define snmpMPDMIBObjects snmpMPDMIB, 2 +#define snmpMPDMIBCompliances snmpMPDMIB, 3, 1 -/* - * now load this mib into the agents mib table - */ -oid snmpMPDStats_variables_oid[] = - { 1, 3, 6, 1, 6, 3, 11, 2, 1 }; +netsnmp_feature_require(helper_statistics); + +static oid snmpMPDStats[] = { snmpMPDMIBObjects, 1 }; + +static netsnmp_handler_registration* snmpMPDStats_reg = NULL; +static oid snmpMPDCompliance[] = { snmpMPDMIBCompliances, 1 }; void init_snmpMPDStats(void) { - static oid reg[] = { 1, 3, 6, 1, 6, 3, 11, 3, 1, 1 }; - REGISTER_SYSOR_ENTRY(reg, + netsnmp_handler_registration* s = + netsnmp_create_handler_registration( + "snmpMPDStats", NULL, snmpMPDStats, OID_LENGTH(snmpMPDStats), + HANDLER_CAN_RONLY); + if (!s) + return; + + if (NETSNMP_REGISTER_STATISTIC_HANDLER(s, 1, MPD) != MIB_REGISTERED_OK) + return; + + REGISTER_SYSOR_ENTRY(snmpMPDCompliance, "The MIB for Message Processing and Dispatching."); - REGISTER_MIB("snmpv3/snmpMPDStats", snmpMPDStats_variables, variable2, - snmpMPDStats_variables_oid); + snmpMPDStats_reg = s; } -u_char * -var_snmpMPDStats(struct variable *vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) +void +shutdown_snmpMPDStats(void) { - - /* - * variables we may use later - */ - static long long_ret; - int tmagic; - - - *write_method = 0; /* assume it isnt writable for the time being */ - *var_len = sizeof(long_ret); /* assume an integer and change later if not */ - - if (header_generic(vp, name, length, exact, var_len, write_method)) - return 0; - - /* - * this is where we do the value assignments for the mib results. - */ - tmagic = vp->magic; - if ((tmagic >= 0) - && (tmagic <= (STAT_MPD_STATS_END - STAT_MPD_STATS_START))) { - long_ret = snmp_get_statistic(tmagic + STAT_MPD_STATS_START); - return (unsigned char *) &long_ret; + UNREGISTER_SYSOR_ENTRY(snmpMPDCompliance); + if (snmpMPDStats_reg) { + netsnmp_unregister_handler(snmpMPDStats_reg); + snmpMPDStats_reg = NULL; } - return 0; } diff --git a/agent/mibgroup/snmpv3/snmpMPDStats.h b/agent/mibgroup/snmpv3/snmpMPDStats.h index 41eab1d..50add5e 100644 --- a/agent/mibgroup/snmpv3/snmpMPDStats.h +++ b/agent/mibgroup/snmpv3/snmpMPDStats.h @@ -1,30 +1,9 @@ - -/* - * This file was generated by mib2c and is intended for use as a mib module - * for the ucd-snmp snmpd agent. - */ - #ifndef _MIBGROUP_SNMPMPDSTATS_H #define _MIBGROUP_SNMPMPDSTATS_H -/* - * we use header_generic from the util_funcs module - */ - -config_require(util_funcs/header_generic) -config_exclude(snmpv3/snmpMPDStats_5_5) -config_add_mib(SNMP-MPD-MIB) +config_add_mib(SNMP-MPD-MIB); - /* - * Magic number definitions: - */ -#define SNMPUNKNOWNSECURITYMODELS 0 -#define SNMPINVALIDMSGS 1 -#define SNMPUNKNOWNPDUHANDLERS 2 - /* - * function definitions - */ - void init_snmpMPDStats(void); - extern FindVarMethod var_snmpMPDStats; +void init_snmpMPDStats(void); +void shutdown_snmpMPDStats(void); -#endif /* _MIBGROUP_SNMPMPDSTATS_H */ +#endif /* _MIBGROUP_SNMPMPDSTATS_H */ diff --git a/agent/mibgroup/snmpv3/snmpMPDStats_5_5.c b/agent/mibgroup/snmpv3/snmpMPDStats_5_5.c deleted file mode 100644 index a7fc2ce..0000000 --- a/agent/mibgroup/snmpv3/snmpMPDStats_5_5.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * snmpMPDStats.c: tallies errors for SNMPv3 message processing. - */ - -#include - -#include - -#include -#include -#include - -#include "snmpMPDStats_5_5.h" - -#include - -#define snmpMPDMIB 1, 3, 6, 1, 6, 3, 11 -#define snmpMPDMIBObjects snmpMPDMIB, 2 -#define snmpMPDMIBCompliances snmpMPDMIB, 3, 1 - -netsnmp_feature_require(helper_statistics) - -static oid snmpMPDStats[] = { snmpMPDMIBObjects, 1 }; - -static netsnmp_handler_registration* snmpMPDStats_reg = NULL; -static oid snmpMPDCompliance[] = { snmpMPDMIBCompliances, 1 }; - -void -init_snmpMPDStats_5_5(void) -{ - netsnmp_handler_registration* s = - netsnmp_create_handler_registration( - "snmpMPDStats", NULL, snmpMPDStats, OID_LENGTH(snmpMPDStats), - HANDLER_CAN_RONLY); - if (s && - NETSNMP_REGISTER_STATISTIC_HANDLER(s, 1, MPD) == MIB_REGISTERED_OK) { - REGISTER_SYSOR_ENTRY(snmpMPDCompliance, - "The MIB for Message Processing and Dispatching."); - snmpMPDStats_reg = s; - } -} - -void -shutdown_snmpMPDStats_5_5(void) -{ - UNREGISTER_SYSOR_ENTRY(snmpMPDCompliance); - if (snmpMPDStats_reg) { - netsnmp_unregister_handler(snmpMPDStats_reg); - snmpMPDStats_reg = NULL; - } -} diff --git a/agent/mibgroup/snmpv3/snmpMPDStats_5_5.h b/agent/mibgroup/snmpv3/snmpMPDStats_5_5.h deleted file mode 100644 index 78f3dff..0000000 --- a/agent/mibgroup/snmpv3/snmpMPDStats_5_5.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _MIBGROUP_SNMPMPDSTATS_H -#define _MIBGROUP_SNMPMPDSTATS_H - -config_exclude(snmpv3/snmpMPDStats) -config_add_mib(SNMP-MPD-MIB) - -void init_snmpMPDStats_5_5(void); -void shutdown_snmpMPDStats_5_5(void); - -#endif /* _MIBGROUP_SNMPMPDSTATS_H */ diff --git a/agent/mibgroup/snmpv3/usmConf.h b/agent/mibgroup/snmpv3/usmConf.h index d27f12e..e30ae97 100644 --- a/agent/mibgroup/snmpv3/usmConf.h +++ b/agent/mibgroup/snmpv3/usmConf.h @@ -2,7 +2,7 @@ #define _MIBGROUP_USMCONF_H #include -config_belongs_in(agent_module) +config_belongs_in(agent_module); extern void init_usmConf(void); #endif /* _MIBGROUP_USMCONF_H */ diff --git a/agent/mibgroup/snmpv3/usmStats.c b/agent/mibgroup/snmpv3/usmStats.c index 718e071..07e29c6 100644 --- a/agent/mibgroup/snmpv3/usmStats.c +++ b/agent/mibgroup/snmpv3/usmStats.c @@ -1,76 +1,51 @@ - /* - * usmStats.c: implements the usmStats portion of the SNMP-USER-BASED-SM-MIB + * usmStats.c: implements the usmStats portion of the SNMP-USER-BASED-SM-MIB */ #include + +#include + #include #include #include -#include "util_funcs/header_generic.h" #include "usmStats.h" -struct variable2 usmStats_variables[] = { - {USMSTATSUNSUPPORTEDSECLEVELS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_usmStats, 1, {1}}, - {USMSTATSNOTINTIMEWINDOWS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_usmStats, 1, {2}}, - {USMSTATSUNKNOWNUSERNAMES, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_usmStats, 1, {3}}, - {USMSTATSUNKNOWNENGINEIDS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_usmStats, 1, {4}}, - {USMSTATSWRONGDIGESTS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_usmStats, 1, {5}}, - {USMSTATSDECRYPTIONERRORS, ASN_COUNTER, NETSNMP_OLDAPI_RONLY, - var_usmStats, 1, {6}}, -}; +#include -/* - * now load this mib into the agents mib table - */ -oid usmStats_variables_oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 1 }; +#define snmpUsmMIB 1, 3, 6, 1, 6, 3, 15 +#define usmMIBCompliances snmpUsmMIB, 2, 1 + +static oid usmStats[] = { snmpUsmMIB, 1, 1 }; + +static netsnmp_handler_registration* usmStats_reg = NULL; +static oid usmMIBCompliance[] = { usmMIBCompliances, 1 }; +netsnmp_feature_require(helper_statistics); void init_usmStats(void) { - static oid reg[] = { 1, 3, 6, 1, 6, 3, 15, 2, 1, 1 }; - REGISTER_SYSOR_ENTRY(reg, - "The management information definitions for the " - "SNMP User-based Security Model."); - REGISTER_MIB("snmpv3/usmStats", usmStats_variables, variable2, - usmStats_variables_oid); + netsnmp_handler_registration* s = + netsnmp_create_handler_registration( + "usmStats", NULL, usmStats, OID_LENGTH(usmStats), + HANDLER_CAN_RONLY); + if (s && + NETSNMP_REGISTER_STATISTIC_HANDLER(s, 1, USM) == MIB_REGISTERED_OK) { + REGISTER_SYSOR_ENTRY(usmMIBCompliance, + "The management information definitions for the " + "SNMP User-based Security Model."); + usmStats_reg = s; + } } -u_char * -var_usmStats(struct variable *vp, - oid * name, - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) +void +shutdown_usmStats(void) { - - /* - * variables we may use later - */ - static long long_ret; - int tmagic; - - *write_method = 0; /* assume it isnt writable for the time being */ - *var_len = sizeof(long_ret); /* assume an integer and change later if not */ - - if (header_generic(vp, name, length, exact, var_len, write_method)) - return 0; - - /* - * this is where we do the value assignments for the mib results. - */ - tmagic = vp->magic; - if ((tmagic >= 0) - && (tmagic <= (STAT_USM_STATS_END - STAT_USM_STATS_START))) { - long_ret = snmp_get_statistic(tmagic + STAT_USM_STATS_START); - return (unsigned char *) &long_ret; + UNREGISTER_SYSOR_ENTRY(usmMIBCompliance); + if (usmStats_reg) { + netsnmp_unregister_handler(usmStats_reg); + usmStats_reg = NULL; } - - return 0; } diff --git a/agent/mibgroup/snmpv3/usmStats.h b/agent/mibgroup/snmpv3/usmStats.h index 5685381..ed3206d 100644 --- a/agent/mibgroup/snmpv3/usmStats.h +++ b/agent/mibgroup/snmpv3/usmStats.h @@ -1,35 +1,9 @@ -/* - * usmStats.h - * - * This file was generated by mib2c and is intended for use as a mib module - * for the ucd-snmp snmpd agent. - */ - #ifndef _MIBGROUP_USMSTATS_H #define _MIBGROUP_USMSTATS_H -/* - * we use header_generic from the util_funcs module - */ - -config_require(util_funcs/header_generic) -config_exclude(snmpv3/usmStats_5_5) -config_add_mib(SNMP-USER-BASED-SM-MIB) - - /* - * Magic number definitions: - */ -#define USMSTATSUNSUPPORTEDSECLEVELS 0 -#define USMSTATSNOTINTIMEWINDOWS 1 -#define USMSTATSUNKNOWNUSERNAMES 2 -#define USMSTATSUNKNOWNENGINEIDS 3 -#define USMSTATSWRONGDIGESTS 4 -#define USMSTATSDECRYPTIONERRORS 5 - /* - * function definitions - */ - extern void init_usmStats(void); - extern FindVarMethod var_usmStats; +config_add_mib(SNMP-USER-BASED-SM-MIB); +void init_usmStats(void); +void shutdown_usmStats(void); -#endif /* _MIBGROUP_USMSTATS_H */ +#endif /* _MIBGROUP_USMSTATS_H */ diff --git a/agent/mibgroup/snmpv3/usmStats_5_5.c b/agent/mibgroup/snmpv3/usmStats_5_5.c deleted file mode 100644 index bcd04e1..0000000 --- a/agent/mibgroup/snmpv3/usmStats_5_5.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * usmStats.c: implements the usmStats portion of the SNMP-USER-BASED-SM-MIB - */ - -#include - -#include - -#include -#include -#include - -#include "usmStats_5_5.h" - -#include - -#define snmpUsmMIB 1, 3, 6, 1, 6, 3, 15 -#define usmMIBCompliances snmpUsmMIB, 2, 1 - -static oid usmStats[] = { snmpUsmMIB, 1, 1 }; - -static netsnmp_handler_registration* usmStats_reg = NULL; -static oid usmMIBCompliance[] = { usmMIBCompliances, 1 }; - -netsnmp_feature_require(helper_statistics) - -void -init_usmStats_5_5(void) -{ - netsnmp_handler_registration* s = - netsnmp_create_handler_registration( - "usmStats", NULL, usmStats, OID_LENGTH(usmStats), - HANDLER_CAN_RONLY); - if (s && - NETSNMP_REGISTER_STATISTIC_HANDLER(s, 1, USM) == MIB_REGISTERED_OK) { - REGISTER_SYSOR_ENTRY(usmMIBCompliance, - "The management information definitions for the " - "SNMP User-based Security Model."); - usmStats_reg = s; - } -} - -void -shutdown_usmStats_5_5(void) -{ - UNREGISTER_SYSOR_ENTRY(usmMIBCompliance); - if (usmStats_reg) { - netsnmp_unregister_handler(usmStats_reg); - usmStats_reg = NULL; - } -} diff --git a/agent/mibgroup/snmpv3/usmStats_5_5.h b/agent/mibgroup/snmpv3/usmStats_5_5.h deleted file mode 100644 index d30719e..0000000 --- a/agent/mibgroup/snmpv3/usmStats_5_5.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _MIBGROUP_USMSTATS_H -#define _MIBGROUP_USMSTATS_H - -config_exclude(snmpv3/usmStats) -config_add_mib(SNMP-USER-BASED-SM-MIB) - -void init_usmStats_5_5(void); -void shutdown_usmStats_5_5(void); - -#endif /* _MIBGROUP_USMSTATS_H */ diff --git a/agent/mibgroup/snmpv3/usmUser.c b/agent/mibgroup/snmpv3/usmUser.c index 9f0503d..608637e 100644 --- a/agent/mibgroup/snmpv3/usmUser.c +++ b/agent/mibgroup/snmpv3/usmUser.c @@ -1,12 +1,21 @@ /* * usmUser.c + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -22,8 +31,10 @@ int usmStatusCheck(struct usmUser *uptr); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ -netsnmp_feature_child_of(usmuser_all, libnetsnmpmibs) -netsnmp_feature_child_of(init_register_usmuser_context, usmuser_all) +netsnmp_feature_child_of(usmuser_all, libnetsnmpmibs); +netsnmp_feature_child_of(init_register_usmuser_context, usmuser_all); + +netsnmp_feature_require(scapi_get_proper_priv_length); struct variable4 usmUser_variables[] = { {USMUSERSPINLOCK, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE, @@ -61,7 +72,9 @@ oid usmUser_variables_oid[] = { 1, 3, 6, 1, 6, 3, 15, 1, 2 }; */ #define USM_MIB_LENGTH 12 +#ifndef NETSNMP_NO_WRITE_SUPPORT static unsigned int usmUserSpinLock = 0; +#endif void init_usmUser(void) @@ -305,8 +318,10 @@ var_usmUser(struct variable * vp, * variables we may use later */ static long long_ret; +#ifndef NETSNMP_NO_WRITE_SUPPORT static u_char string[1]; static oid objid[2]; /* for .0.0 */ +#endif if (!vp || !name || !length || !var_len) return NULL; @@ -346,14 +361,14 @@ var_usmUser(struct variable * vp, indexOid = usm_generate_OID(vp->name, vp->namelen, nptr, &len); result = snmp_oid_compare(name, *length, indexOid, len); - DEBUGMSGTL(("usmUser", "Checking user: %s - ", + DEBUGMSGTL(("9:usmUser", "Checking user: %s - ", nptr->name)); for (i = 0; i < (int) nptr->engineIDLen; i++) { - DEBUGMSG(("usmUser", " %x", nptr->engineID[i])); + DEBUGMSG(("9:usmUser", " %x", nptr->engineID[i])); } - DEBUGMSG(("usmUser", " - %d \n -> OID: ", result)); - DEBUGMSGOID(("usmUser", indexOid, len)); - DEBUGMSG(("usmUser", "\n")); + DEBUGMSG(("9:usmUser", " - %d \n -> OID: ", result)); + DEBUGMSGOID(("9:usmUser", indexOid, len)); + DEBUGMSG(("9:usmUser", "\n")); free(indexOid); @@ -946,6 +961,7 @@ write_usmUserPrivProtocol(int action, } } else if (action == RESERVE2) { if ((uptr = usm_parse_user(name, name_len)) == NULL) { + DEBUGMSGTL(("usmUser", "usm_parse_user() error\n")); return SNMP_ERR_INCONSISTENTNAME; } @@ -967,6 +983,7 @@ write_usmUserPrivProtocol(int action, var_val_len / sizeof(oid)); if (uptr->privProtocol == NULL) { + DEBUGMSGTL(("usmUser", "snmp_duplicate_objid() error\n")); return SNMP_ERR_RESOURCEUNAVAILABLE; } uptr->privProtocolLen = var_val_len / sizeof(oid); @@ -980,6 +997,7 @@ write_usmUserPrivProtocol(int action, */ return SNMP_ERR_NOERROR; } else { + DEBUGMSGTL(("usmUser", "inconsistent value error\n")); return SNMP_ERR_INCONSISTENTVALUE; } } else { @@ -999,6 +1017,7 @@ write_usmUserPrivProtocol(int action, ((oid *) var_val, var_val_len / sizeof(oid), usmNoPrivProtocol, sizeof(usmNoPrivProtocol) / sizeof(oid)) != 0) { + DEBUGMSGTL(("usmUser", "inconsistent value error\n")); return SNMP_ERR_INCONSISTENTVALUE; } } else { @@ -1016,6 +1035,7 @@ write_usmUserPrivProtocol(int action, ((oid *) var_val, var_val_len / sizeof(oid), usmAESPrivProtocol, sizeof(usmAESPrivProtocol) / sizeof(oid)) != 0) { + DEBUGMSGTL(("usmUser", "wrong value error\n")); return SNMP_ERR_WRONGVALUE; } } @@ -1026,6 +1046,7 @@ write_usmUserPrivProtocol(int action, var_val_len / sizeof(oid)); if (uptr->privProtocol == NULL) { + DEBUGMSGTL(("usmUser", "resource unavailable error\n")); return SNMP_ERR_RESOURCEUNAVAILABLE; } uptr->privProtocolLen = var_val_len / sizeof(oid); @@ -1062,14 +1083,15 @@ write_usmUserPrivKeyChange(int action, u_char * statP, oid * name, size_t name_len) { struct usmUser *uptr; - unsigned char buf[SNMP_MAXBUF_SMALL]; - size_t buflen = SNMP_MAXBUF_SMALL; + unsigned char buf[SNMP_MAXBUF_SMALL], buf2[SNMP_MAXBUF_SMALL]; + size_t buflen = sizeof(buf); const char fnPrivKey[] = "write_usmUserPrivKeyChange"; const char fnOwnPrivKey[] = "write_usmUserOwnPrivKeyChange"; const char *fname; static unsigned char *oldkey; static size_t oldkeylen; static int resetOnFail; + int plen; if (name[USM_MIB_LENGTH - 1] == 9) { fname = fnPrivKey; @@ -1091,32 +1113,39 @@ write_usmUserPrivKeyChange(int action, if ((uptr = usm_parse_user(name, name_len)) == NULL) { return SNMP_ERR_INCONSISTENTNAME; } else { -#ifndef NETSNMP_DISABLE_DES - if (snmp_oid_compare(uptr->privProtocol, uptr->privProtocolLen, - usmDESPrivProtocol, - sizeof(usmDESPrivProtocol) / - sizeof(oid)) == 0) { - if (var_val_len != 0 && var_val_len != 32) { - return SNMP_ERR_WRONGLENGTH; - } + const netsnmp_priv_alg_info *pai = + sc_get_priv_alg_byoid(uptr->privProtocol, + uptr->privProtocolLen); + if (NULL == pai) { + DEBUGMSGTL(("usmUser", "%s: unknown privProtocol\n", + fname)); + return SNMP_ERR_GENERR; } -#endif - if (snmp_oid_compare(uptr->privProtocol, uptr->privProtocolLen, - usmAESPrivProtocol, - sizeof(usmAESPrivProtocol) / - sizeof(oid)) == 0) { - if (var_val_len != 0 && var_val_len != 32) { - return SNMP_ERR_WRONGLENGTH; - } + plen = pai->proper_length; + DEBUGMSGTL(("usmUser", "plen %d\n", plen)); + /* + * ?? we store salt with key. See also the corresponding statement + * in apps/snmpusm.c. + */ + if (USM_CREATE_USER_PRIV_DES == pai->type) + plen *= 2; + if (var_val_len != 0 && var_val_len != (2 * plen)) { + DEBUGMSGTL(("usmUser", "%s: bad len. %" NETSNMP_PRIz "d != %d\n", + fname, var_val_len, 2 * plen)); + return SNMP_ERR_WRONGLENGTH; } } } else if (action == ACTION) { + if ((uptr = usm_parse_user(name, name_len)) == NULL) { return SNMP_ERR_INCONSISTENTNAME; } if (uptr->cloneFrom == NULL) { return SNMP_ERR_INCONSISTENTNAME; } + plen = sc_get_proper_priv_length(uptr->privProtocol, + uptr->privProtocolLen); + DEBUGMSGTL(("usmUser", "plen %d\n", plen)); if (snmp_oid_compare(uptr->privProtocol, uptr->privProtocolLen, usmNoPrivProtocol, sizeof(usmNoPrivProtocol) / sizeof(oid)) == @@ -1132,6 +1161,35 @@ write_usmUserPrivKeyChange(int action, return SNMP_ERR_NOERROR; } + /* + * extend key as needed + */ + DEBUGMSGTL(("9:usmUser", "%s: var_val_len %" NETSNMP_PRIz "d\n", fname, var_val_len)); + if (var_val_len < ( 2 * plen )) { + struct usmUser dummy; + memset(&dummy, 0x0, sizeof(dummy)); + dummy.engineID = uptr->engineID; + dummy.engineIDLen = uptr->engineIDLen; + dummy.authProtocol = uptr->authProtocol; + dummy.authProtocolLen = uptr->authProtocolLen; + dummy.privProtocol = uptr->privProtocol; + dummy.privProtocolLen = uptr->privProtocolLen; + memcpy(buf2, var_val, var_val_len); + dummy.privKey = buf2; + dummy.privKeyLen = var_val_len; + if (SNMP_ERR_NOERROR != usm_extend_user_kul(&dummy, sizeof(buf2))) { + DEBUGMSGTL(("usmUser", "%s: extend kul failed\n", fname)); + return SNMP_ERR_GENERR; + } + DEBUGMSGTL(("9:usmUser", "%s: extend kul OK\n", fname)); + var_val = dummy.privKey; + var_val_len = dummy.privKeyLen; + /* + * make sure no reallocation happened; buf2 must be large enoungh + */ + netsnmp_assert( dummy.privKey == buf2 ); + } + /* * Change the key. */ @@ -1447,8 +1505,6 @@ write_usmUserStatus(int action, if (usmStatusCheck(uptr)) { uptr->userStatus = RS_ACTIVE; } else { - SNMP_FREE(engineID); - SNMP_FREE(newName); return SNMP_ERR_INCONSISTENTVALUE; } } else if (long_ret == RS_CREATEANDWAIT) { diff --git a/agent/mibgroup/snmpv3/usmUser.h b/agent/mibgroup/snmpv3/usmUser.h index 53d1412..2d9b9af 100644 --- a/agent/mibgroup/snmpv3/usmUser.h +++ b/agent/mibgroup/snmpv3/usmUser.h @@ -18,8 +18,8 @@ * we use header_generic from the util_funcs module */ -config_require(util_funcs/header_generic) -config_add_mib(SNMP-USER-BASED-SM-MIB) +config_require(util_funcs/header_generic); +config_add_mib(SNMP-USER-BASED-SM-MIB); /* * Magic number definitions: diff --git a/agent/mibgroup/snmpv3mibs.h b/agent/mibgroup/snmpv3mibs.h index 0cca9a3..36d6035 100644 --- a/agent/mibgroup/snmpv3mibs.h +++ b/agent/mibgroup/snmpv3mibs.h @@ -6,11 +6,11 @@ * snmpv3 mib(s) */ -config_require(snmpv3/snmpEngine) -config_version_require((snmpv3/snmpMPDStats, 5.5, snmpv3/snmpMPDStats_5_5)) +config_require(snmpv3/snmpEngine); +config_require(snmpv3/snmpMPDStats); #ifdef NETSNMP_SECMOD_USM -config_version_require((snmpv3/usmStats, 5.5, snmpv3/usmStats_5_5)) -config_require(snmpv3/usmConf) -config_require(snmpv3/usmUser) +config_require(snmpv3/usmStats); +config_require(snmpv3/usmConf); +config_require(snmpv3/usmUser); #endif /* NETSNMP_SECMOD_USM */ #endif /* SNMPV3MIBS_H */ diff --git a/agent/mibgroup/struct.h b/agent/mibgroup/struct.h index d025ed0..d6c69c0 100644 --- a/agent/mibgroup/struct.h +++ b/agent/mibgroup/struct.h @@ -10,7 +10,7 @@ struct extensible { char name[STRMAX]; - char command[STRMAX]; + char *command; char fixcmd[STRMAX]; int type; int result; @@ -23,10 +23,16 @@ struct extensible { #if defined(WIN32) HANDLE tid; /* WIN32 thread */ #endif +#ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE + struct extensible *passpersist_inst; +#endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */ }; struct myproc { char name[STRMAX]; +#ifdef HAVE_PCRE_H + netsnmp_regex_ptr regexp; +#endif char fixcmd[STRMAX]; int min; int max; diff --git a/agent/mibgroup/target.h b/agent/mibgroup/target.h index 58c5b4b..d9096ee 100644 --- a/agent/mibgroup/target.h +++ b/agent/mibgroup/target.h @@ -1,5 +1,5 @@ -config_require(target/snmpTargetAddrEntry) -config_require(target/snmpTargetParamsEntry) -config_require(target/target) -config_version_require((target/target_counters, 5.5, target/target_counters_5_5)) -config_add_mib(SNMP-TARGET-MIB) +config_require(target/snmpTargetAddrEntry); +config_require(target/snmpTargetParamsEntry); +config_require(target/target); +config_require(target/target_counters); +config_add_mib(SNMP-TARGET-MIB); diff --git a/agent/mibgroup/target/snmpTargetAddrEntry.c b/agent/mibgroup/target/snmpTargetAddrEntry.c index b1eb00a..bd87260 100644 --- a/agent/mibgroup/target/snmpTargetAddrEntry.c +++ b/agent/mibgroup/target/snmpTargetAddrEntry.c @@ -4,11 +4,14 @@ * This file was generated by mib2c and is intended for use as a mib module * for the ucd-snmp snmpd agent. Edited by Michael Baer * - * last changed 2/2/99. + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -20,6 +23,7 @@ #include #include "snmpTargetAddrEntry.h" +#include "snmpTargetAddrEntry_data.h" #include "util_funcs/header_generic.h" #define snmpTargetAddrOIDLen 11 /*This is base+column, @@ -29,239 +33,17 @@ static oid snmpTargetAddrOID[snmpTargetAddrOIDLen] = { 1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 0 }; static unsigned long snmpTargetSpinLock = 0; -static struct targetAddrTable_struct *aAddrTable = NULL; -static int -store_snmpTargetAddrEntry(int majorID, int minorID, void *serverarg, - void *clientarg); - -/* - * Utility routines - */ -struct targetAddrTable_struct * -get_addrTable(void) -{ - return aAddrTable; -} - -struct targetAddrTable_struct * -get_addrForName2(const char *name, unsigned char nameLen) -{ - struct targetAddrTable_struct *ptr; - for (ptr = aAddrTable; ptr != NULL; ptr = ptr->next) { - if (ptr->nameLen == nameLen && - memcmp(ptr->nameData, name, nameLen) == 0) - return ptr; - } - return NULL; -} - - -/* - * TargetAddrTable_create creates and returns a pointer - * to a targetAddrTable_struct with default values set - */ -struct targetAddrTable_struct *snmpTargetAddrTable_create(void) -{ - struct targetAddrTable_struct *newEntry; - - newEntry = malloc(sizeof(*newEntry)); - - if (newEntry) { - newEntry->nameData = NULL; - newEntry->nameLen = 0; - - newEntry->tDomainLen = 0; - newEntry->tAddress = NULL; - - newEntry->timeout = 1500; - newEntry->retryCount = 3; - - newEntry->tagList = strdup(""); - newEntry->params = NULL; - - newEntry->storageType = SNMP_STORAGE_NONVOLATILE; - newEntry->rowStatus = SNMP_ROW_NONEXISTENT; - newEntry->sess = NULL; - newEntry->next = NULL; - } - - return newEntry; -} /* snmpTargetAddrTable_create */ - - -/* - * TargetAddrTable_dispose frees the space allocated to a - * targetAddrTable_struct - */ -void -snmpTargetAddrTable_dispose(struct targetAddrTable_struct *reaped) -{ - if (reaped->sess) - snmp_close(reaped->sess); - else - SNMP_FREE(reaped->tAddress); - SNMP_FREE(reaped->nameData); - SNMP_FREE(reaped->tagList); - SNMP_FREE(reaped->params); - - SNMP_FREE(reaped); -} /* snmpTargetAddrTable_dispose */ - /* - * snmpTargetAddrTable_addToList adds a targetAddrTable_struct - * to a list passed in. The list is assumed to be in a sorted order, - * low to high and this procedure inserts a new struct in the proper - * location. Sorting uses OID values based on name. A new equal value - * overwrites a current one. - */ -void -snmpTargetAddrTable_addToList(struct targetAddrTable_struct *newEntry, - struct targetAddrTable_struct **listPtr) -{ - static struct targetAddrTable_struct *curr_struct, *prev_struct; - int i; - - /* - * if the list is empty, add the new entry to the top - */ - if ((prev_struct = curr_struct = *listPtr) == NULL) { - *listPtr = newEntry; - return; - } else { - /* - * search through the list for an equal or greater OID value - */ - while (curr_struct != NULL) { - i = memcmp(newEntry->nameData, curr_struct->nameData, - newEntry->nameLen < curr_struct->nameLen ? - newEntry->nameLen : curr_struct->nameLen); - if (i == 0) { - if (newEntry->nameLen < curr_struct->nameLen) - i = -1; - else if (newEntry->nameLen > curr_struct->nameLen) - i = 1; - } - - if (i == 0) { /* Exact match, overwrite with new struct */ - newEntry->next = curr_struct->next; - /* - * if curr_struct is the top of the list - */ - if (*listPtr == curr_struct) - *listPtr = newEntry; - else - prev_struct->next = newEntry; - snmpTargetAddrTable_dispose(curr_struct); - return; - } else if (i < 0) { /* Found a greater OID, insert struct in front of it. */ - newEntry->next = curr_struct; - /* - * if curr_struct is the top of the list - */ - if (*listPtr == curr_struct) - *listPtr = newEntry; - else - prev_struct->next = newEntry; - return; - } - prev_struct = curr_struct; - curr_struct = curr_struct->next; - } - } - /* - * if we're here, no larger OID was ever found, insert on end of list - */ - prev_struct->next = newEntry; -} /* snmpTargeAddrTable_addToList */ - - -void -snmpTargetAddrTable_add(struct targetAddrTable_struct *newEntry) -{ - snmpTargetAddrTable_addToList(newEntry, &aAddrTable); -} - - -/* - * snmpTargetAddrTable_remFromList removes a targetAddrTable_struct - * from the list passed in - */ -void -snmpTargetAddrTable_remFromList(struct targetAddrTable_struct *oldEntry, - struct targetAddrTable_struct **listPtr) -{ - struct targetAddrTable_struct *tptr; - - if ((tptr = *listPtr) == NULL) - return; - else if (tptr == oldEntry) { - *listPtr = (*listPtr)->next; - snmpTargetAddrTable_dispose(tptr); - return; - } else { - while (tptr->next != NULL) { - if (tptr->next == oldEntry) { - tptr->next = tptr->next->next; - snmpTargetAddrTable_dispose(oldEntry); - return; - } - tptr = tptr->next; - } - } -} /* snmpTargetAddrTable_remFromList */ - - -/* - * lookup OID in the link list of Addr Table Entries - */ -struct targetAddrTable_struct * -search_snmpTargetAddrTable(oid * baseName, - size_t baseNameLen, - oid * name, size_t * length, int exact) -{ - static struct targetAddrTable_struct *temp_struct; - int i; - size_t myOIDLen = 0; - oid newNum[128]; - - /* - * lookup entry in addrTable linked list, Get Current MIB ID - */ - memcpy(newNum, baseName, baseNameLen * sizeof(oid)); - - for (temp_struct = aAddrTable; temp_struct != NULL; - temp_struct = temp_struct->next) { - for (i = 0; i < temp_struct->nameLen; i++) { - newNum[baseNameLen + i] = (unsigned char)temp_struct->nameData[i]; - } - myOIDLen = baseNameLen + temp_struct->nameLen; - i = snmp_oid_compare(name, *length, newNum, myOIDLen); - /* - * Assumes that the linked list sorted by OID, low to high - */ - if ((i == 0 && exact != 0) || (i < 0 && exact == 0)) { - if (exact == 0) { - memcpy(name, newNum, myOIDLen * sizeof(oid)); - *length = myOIDLen; - } - return temp_struct; - } - } - return NULL; -} /* search_snmpTargetAddrTable */ - - -/* - * snmpTargetAddr_rowStatusCheck is boolean function that checks + * snmpTargetAddr_rowStatusCheck is boolean funciton that checks * the status of a row's values in order to determine whether * the row should be notReady or notInService. */ static int snmpTargetAddr_rowStatusCheck(const struct targetAddrTable_struct *entry) { - return entry->tDomainLen && entry->tAddress && entry->params; + return entry->tDomainLen && entry->tAddress && entry->paramsData; } /* snmtpTargetAddrTable_rowStatusCheck */ @@ -311,7 +93,8 @@ static const oid snmpTargetAddrEntry_variables_oid[] = void init_snmpTargetAddrEntry(void) { - aAddrTable = NULL; + init_snmpTargetAddrEntry_data(); + DEBUGMSGTL(("snmpTargetAddrEntry", "init\n")); REGISTER_MIB("target/snmpTargetAddrEntry", snmpTargetAddrEntry_variables, variable2, @@ -319,416 +102,19 @@ init_snmpTargetAddrEntry(void) REGISTER_MIB("target/snmpTargetSpinLock", snmpTargetSpinLock_var, variable2, snmpTargetSpinLock_oid); - snmpd_register_config_handler("targetAddr", - snmpd_parse_config_targetAddr, - (void (*)(void))0, NULL); - - /* - * we need to be called back later - */ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - store_snmpTargetAddrEntry, NULL); - } /* init_snmpTargetAddrEntry */ void shutdown_snmpTargetAddrEntry(void) { - struct targetAddrTable_struct *ptr; - struct targetAddrTable_struct *next; - - for (ptr = aAddrTable; ptr; ptr = next) { - next = ptr->next; - snmpTargetAddrTable_dispose(ptr); - } - aAddrTable = NULL; - - snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - store_snmpTargetAddrEntry, NULL, FALSE); + shutdown_snmpTargetAddrEntry_data(); } -int -snmpTargetAddr_addTDomain(struct targetAddrTable_struct *entry, char *cptr) -{ - size_t len = 128; - - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no tDomain in config string\n")); - return (0); - } - - if (!read_objid(cptr, entry->tDomain, &len)) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: tDomain unreadable in config string\n")); - return (0); - } - - /* - * spec check for oid 1-128 - */ - if (len < 1 || len > 128) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: tDomain out of range in config string\n")); - return (0); - } - - entry->tDomainLen = len; - return (1); -} /* snmpTargetAddr_addTDomain */ - - -int -snmpTargetAddr_addTAddress(struct targetAddrTable_struct *entry, - char *cptr, size_t len) -{ - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no tAddress in config string\n")); - return (0); - } else { - /* - * spec check for string 1-32 - */ - /* - * if (len < 1 || len > 32) { - * DEBUGMSGTL(("snmpTargetAddrEntry","ERROR snmpTargetAddrEntry: name out of range in config string\n")); - * return(0); - * } - */ - SNMP_FREE(entry->tAddress); - entry->tAddress = (u_char *) malloc(len); - entry->tAddressLen = len; - memcpy(entry->tAddress, cptr, len); - } - return (1); -} /* snmpTargetAddr_addTAddress */ - - -int -snmpTargetAddr_addTimeout(struct targetAddrTable_struct *entry, char *cptr) -{ - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetParamsEntry: no Timeout in config string\n")); - return (0); - } else if (!(isdigit((unsigned char)(*cptr)))) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargeParamsEntry: Timeout is not a digit in config string\n")); - return (0); - } - /* - * check Timeout >= 0 - */ - else if ((entry->timeout = (int) strtol(cptr, (char **) NULL, 0)) < 0) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargeParamsEntry: Timeout out of range in config string\n")); - return (0); - } - return (1); -} /* snmpTargetAddr_addTimeout */ - - -int -snmpTargetAddr_addRetryCount(struct targetAddrTable_struct *entry, - char *cptr) -{ - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetParamsEntry: no Retry Count in config string\n")); - return (0); - } else if (!(isdigit((unsigned char)(*cptr)))) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargeParamsEntry: Retry Count is not a digit in config string\n")); - return (0); - } - /* - * spec check 0..255 - */ - else { - entry->retryCount = (int) strtol(cptr, (char **) NULL, 0); - if ((entry->retryCount < 0) || (entry->retryCount > 255)) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargeParamsEntry: Retry Count is out of range in config string\n")); - return (0); - } - } - return (1); -} /* snmpTargetAddr_addRetryCount */ - - -int -snmpTargetAddr_addTagList(struct targetAddrTable_struct *entry, char *cptr) -{ - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no tag list in config string\n")); - return (0); - } else { - size_t len = strlen(cptr); - /* - * spec check for string 0-255 - */ - if (len > 255) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: tag list out of range in config string\n")); - return (0); - } - SNMP_FREE(entry->tagList); - entry->tagList = strdup(cptr); - } - return (1); -} /* snmpTargetAddr_addTagList */ - - -int -snmpTargetAddr_addParams(struct targetAddrTable_struct *entry, char *cptr) -{ - size_t len; - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no params in config string\n")); - return (0); - } else { - len = strlen(cptr); - /* - * spec check for string 1-32 - */ - if (len < 1 || len > 32) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: params out of range in config string\n")); - return (0); - } - entry->params = strdup(cptr); - } - return (1); -} /* snmpTargetAddr_addParams */ - - -int -snmpTargetAddr_addStorageType(struct targetAddrTable_struct *entry, - char *cptr) -{ - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no storage type in config " - "string\n")); - return (0); - } else if (!(isdigit((unsigned char)(*cptr)))) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: storage type is not a digit " - "in config string\n")); - return (0); - } - /* - * check that storage type is a possible value - */ - else if (((entry->storageType = (int) strtol(cptr, (char **) NULL, 0)) - != SNMP_STORAGE_OTHER) && - (entry->storageType != SNMP_STORAGE_VOLATILE) && - (entry->storageType != SNMP_STORAGE_NONVOLATILE) && - (entry->storageType != SNMP_STORAGE_PERMANENT) && - (entry->storageType != SNMP_STORAGE_READONLY)) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: storage type not a valid " - "value of other(%d), volatile(%d), nonvolatile(%d), " - "permanent(%d), or readonly(%d) in config string.\n", - SNMP_STORAGE_OTHER, SNMP_STORAGE_VOLATILE, - SNMP_STORAGE_NONVOLATILE, SNMP_STORAGE_PERMANENT, - SNMP_STORAGE_READONLY)); - return (0); - } - return (1); -} /* snmpTargetAddr_addStorageType */ - - -int -snmpTargetAddr_addRowStatus(struct targetAddrTable_struct *entry, - char *cptr) -{ - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no Row Status in config " - "string\n")); - return (0); - } else if (!(isdigit((unsigned char)(*cptr)))) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: Row Status is not a digit in " - "config string\n")); - return (0); - } - /* - * check that row status is a valid value - */ - else if (((entry->rowStatus = (int) strtol(cptr, (char **) NULL, 0)) - != SNMP_ROW_ACTIVE) && - (entry->rowStatus != SNMP_ROW_NOTINSERVICE) && - (entry->rowStatus != SNMP_ROW_NOTREADY)) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: Row Status is not a valid " - "value of active(%d), notinservice(%d), or notready(%d) " - "in config string.\n", - SNMP_ROW_ACTIVE, SNMP_ROW_NOTINSERVICE, SNMP_ROW_NOTREADY)); - return (0); - } - return (1); -} /* snmpTargetAddr_addRowStatus */ - - -void -snmpd_parse_config_targetAddr(const char *token, char *char_ptr) -{ - const char *cptr = char_ptr; - char buff[1024], *bptr; - struct targetAddrTable_struct *newEntry; - int i; - size_t bufl; - - newEntry = snmpTargetAddrTable_create(); - - cptr = skip_white_const(cptr); - if (cptr == NULL) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no name in config string\n")); - snmpTargetAddrTable_dispose(newEntry); - return; - } - - bufl = 0; - cptr = read_config_read_octet_string_const(cptr, - (u_char**)&newEntry->nameData, - &bufl); - if (bufl < 1 || bufl > 32) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: name out of range in config " - "string\n")); - snmpTargetAddrTable_dispose(newEntry); - return; - } - newEntry->nameLen = bufl; - - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addTDomain(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = - read_config_read_octet_string_const(cptr, - (u_char **) & newEntry->tAddress, - &newEntry->tAddressLen); - if (!cptr || !(newEntry->tAddress)) { - DEBUGMSGTL(("snmpTargetAddrEntry", - "ERROR snmpTargetAddrEntry: no TAddress in config string\n")); - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addTimeout(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addRetryCount(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addTagList(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addParams(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addStorageType(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - cptr = copy_nword_const(cptr, buff, sizeof(buff)); - if (snmpTargetAddr_addRowStatus(newEntry, buff) == 0) { - snmpTargetAddrTable_dispose(newEntry); - return; - } - bptr = buff; - bptr += sprintf(bptr, "snmp_parse_config_targetAddr, read: "); - bptr = read_config_save_octet_string(bptr, (u_char*)newEntry->nameData, - newEntry->nameLen); - *bptr++ = '\n'; - for (i = 0; i < newEntry->tDomainLen; i++) { - bptr += snprintf(bptr, buff + sizeof(buff) - bptr, - ".%d", (int) newEntry->tDomain[i]); - } - bptr += snprintf(bptr, buff + sizeof(buff) - bptr, - " %s %d %d %s %s %d %d\n", - newEntry->tAddress, newEntry->timeout, - newEntry->retryCount, newEntry->tagList, - newEntry->params, newEntry->storageType, - newEntry->rowStatus); - buff[ sizeof(buff) - 1 ] = 0; - DEBUGMSGTL(("snmpTargetAddrEntry", "%s", buff)); - - snmpTargetAddrTable_addToList(newEntry, &aAddrTable); -} /* snmpd_parse_config_target */ - - /* * Shutdown routines */ -/* - * store_snmpTargetAddrEntry handles the persistent storage proccess - * for this MIB table. It writes out all the non-volatile rows - * to permanent storage on a shutdown - */ -static int -store_snmpTargetAddrEntry(int majorID, int minorID, void *serverarg, - void *clientarg) -{ - const struct targetAddrTable_struct *curr_struct; - char line[1024], *cur, *ep = line + sizeof(line); - int i; - - curr_struct = aAddrTable; - while (curr_struct != NULL) { - if ((curr_struct->storageType == SNMP_STORAGE_NONVOLATILE || - curr_struct->storageType == SNMP_STORAGE_PERMANENT) && - (curr_struct->rowStatus == SNMP_ROW_ACTIVE || - curr_struct->rowStatus == SNMP_ROW_NOTINSERVICE)) { - cur = line + snprintf(line, sizeof(line), "targetAddr "); - cur = read_config_save_octet_string( - cur, (u_char*)curr_struct->nameData, curr_struct->nameLen); - *cur++ = ' '; - for (i = 0; i < curr_struct->tDomainLen; i++) { - cur += snprintf(cur, ep - cur, ".%i", - (int) curr_struct->tDomain[i]); - } - *cur++ = ' '; - cur = read_config_save_octet_string( - cur, curr_struct->tAddress, curr_struct->tAddressLen); - cur += snprintf(cur, ep - cur, " %i %i \"%s\" %s %i %i", - curr_struct->timeout, - curr_struct->retryCount, curr_struct->tagList, - curr_struct->params, curr_struct->storageType, - curr_struct->rowStatus); - line[ sizeof(line)-1 ] = 0; - - /* - * store to file - */ - snmpd_store_config(line); - } - - curr_struct = curr_struct->next; - } - - return SNMPERR_SUCCESS; -} /* store_snmpTargetAddrEntry */ - - /* * MIB table access routines */ @@ -834,19 +220,17 @@ var_snmpTargetAddrEntry(struct variable * vp, return (unsigned char *) &long_ret; case SNMPTARGETADDRTAGLIST: - if (temp_struct->tagList != NULL) { - strlcpy(string, temp_struct->tagList, sizeof(string)); - *var_len = strlen(string); - return (unsigned char *) string; - } else { + if (temp_struct->tagListData == NULL) return NULL; - } + memcpy(string, temp_struct->tagListData, temp_struct->tagListLen); + *var_len = temp_struct->tagListLen; + return (unsigned char *) string; case SNMPTARGETADDRPARAMS: - if (temp_struct->params == NULL) + if (temp_struct->paramsData == NULL) return NULL; - strlcpy(string, temp_struct->params, sizeof(string)); - *var_len = strlen(string); + memcpy(string, temp_struct->paramsData, temp_struct->paramsLen); + *var_len = temp_struct->paramsLen; return (unsigned char *) string; case SNMPTARGETADDRSTORAGETYPE: @@ -1001,9 +385,9 @@ write_snmpTargetAddrTAddress(int action, return SNMP_ERR_INCONSISTENTVALUE; } - old_addr = (char *) target->tAddress; + old_addr = target->tAddress; old_len = target->tAddressLen; - target->tAddress = (u_char *) malloc(var_val_len); + target->tAddress = malloc(var_val_len); if (target->tAddress == NULL) { return SNMP_ERR_RESOURCEUNAVAILABLE; } @@ -1035,7 +419,7 @@ write_snmpTargetAddrTAddress(int action, if (target->storageType != SNMP_STORAGE_READONLY && target->rowStatus != SNMP_ROW_ACTIVE) { SNMP_FREE(target->tAddress); - target->tAddress = (u_char *) old_addr; + target->tAddress = old_addr; target->tAddressLen = old_len; if (target->rowStatus == SNMP_ROW_NOTINSERVICE && snmpTargetAddr_rowStatusCheck(target) == 0) { @@ -1223,7 +607,8 @@ write_snmpTargetAddrTagList(int action, u_char * statP, oid * name, size_t name_len) { struct targetAddrTable_struct *target = NULL; - static char *old_tlist; + static char *old_tlist = NULL; + static int old_tlist_len; if (action == RESERVE1) { if (var_val_type != ASN_OCTET_STR) { @@ -1255,19 +640,25 @@ write_snmpTargetAddrTagList(int action, "write to snmpTargetAddrTagList: row is read only\n")); return SNMP_ERR_NOTWRITABLE; } - old_tlist = target->tagList; - target->tagList = (char *) malloc(var_val_len + 1); - if (target->tagList == NULL) { + if (old_tlist != NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "writing multiple rows/values not supported\n")); + return SNMP_ERR_GENERR; + } + old_tlist = target->tagListData; + old_tlist_len = target->tagListLen; + target->tagListData = netsnmp_memdup_nt(var_val, var_val_len, + &target->tagListLen); + if (target->tagListData == NULL) { return SNMP_ERR_RESOURCEUNAVAILABLE; } - memcpy(target->tagList, var_val, var_val_len); - target->tagList[var_val_len] = '\0'; } } else if (action == COMMIT) { SNMP_FREE(old_tlist); old_tlist = NULL; snmp_store_needed(NULL); } else if (action == FREE || action == UNDO) { + old_tlist = NULL; snmpTargetAddrOID[snmpTargetAddrOIDLen - 1] = SNMPTARGETADDRTAGLISTCOLUMN; if ((target = @@ -1275,8 +666,9 @@ write_snmpTargetAddrTagList(int action, snmpTargetAddrOIDLen, name, &name_len, 1)) != NULL) { if (target->storageType != SNMP_STORAGE_READONLY) { - SNMP_FREE(target->tagList); - target->tagList = old_tlist; + SNMP_FREE(target->tagListData); + target->tagListData = old_tlist; + target->tagListLen = old_tlist_len; } } } @@ -1294,6 +686,7 @@ write_snmpTargetAddrParams(int action, { struct targetAddrTable_struct *target = NULL; static char *old_params = NULL; + static size_t old_params_len; if (action == RESERVE1) { if (var_val_type != ASN_OCTET_STR) { @@ -1324,14 +717,19 @@ write_snmpTargetAddrParams(int action, "write to snmpTargetAddrParams: not allowed in active row.\n")); return SNMP_ERR_INCONSISTENTVALUE; } + if (old_params != NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "writing multiple rows/values not supported\n")); + return SNMP_ERR_GENERR; + } - old_params = target->params; - target->params = malloc(var_val_len + 1); - if (target->params == NULL) { + old_params = target->paramsData; + old_params_len = target->paramsLen; + target->paramsData = netsnmp_memdup_nt(var_val, var_val_len, + &target->paramsLen); + if (target->paramsData == NULL) { return SNMP_ERR_RESOURCEUNAVAILABLE; } - memcpy(target->params, var_val, var_val_len); - target->params[var_val_len] = '\0'; /* * If row is new, check if its status can be updated. @@ -1357,8 +755,10 @@ write_snmpTargetAddrParams(int action, &name_len, 1)) != NULL) { if (target->storageType != SNMP_STORAGE_READONLY && target->rowStatus != SNMP_ROW_ACTIVE) { - SNMP_FREE(target->params); - target->params = old_params; + SNMP_FREE(target->paramsData); + target->paramsData = old_params; + target->paramsLen = old_params_len; + old_params = NULL; if (target->rowStatus == SNMP_ROW_NOTINSERVICE && snmpTargetAddr_rowStatusCheck(target) == 0) { target->rowStatus = SNMP_ROW_NOTREADY; @@ -1460,10 +860,9 @@ snmpTargetAddr_createNewRow(oid * name, size_t name_len) temp_struct = snmpTargetAddrTable_create(); if (!temp_struct) return SNMP_ERR_GENERR; - temp_struct->nameData = (char *) malloc(newNameLen); + temp_struct->nameData = (char *) malloc(newNameLen+1); if (temp_struct->nameData == NULL) { - SNMP_FREE(temp_struct->tagList); - SNMP_FREE(temp_struct); + snmpTargetAddrTable_dispose(temp_struct); return 0; } @@ -1471,10 +870,11 @@ snmpTargetAddr_createNewRow(oid * name, size_t name_len) for (i = 0; i < (int) newNameLen; i++) { temp_struct->nameData[i] = (char) name[i + snmpTargetAddrOIDLen]; } + temp_struct->nameData[i] = 0; /* just-in-case null term */ temp_struct->rowStatus = SNMP_ROW_NOTREADY; - snmpTargetAddrTable_addToList(temp_struct, &aAddrTable); + snmpTargetAddrTable_add(temp_struct); return 1; } @@ -1612,7 +1012,7 @@ write_snmpTargetAddrRowStatus(int action, &name_len, 1); if (target != NULL) { if (value == RS_DESTROY) { - snmpTargetAddrTable_remFromList(target, &aAddrTable); + snmpTargetAddrTable_remove(target); } if (value == RS_NOTINSERVICE) { if (target->sess != NULL) { @@ -1631,7 +1031,7 @@ write_snmpTargetAddrRowStatus(int action, &name_len, 1); if (value == RS_CREATEANDGO || value == RS_CREATEANDWAIT) { if (target != NULL) { - snmpTargetAddrTable_remFromList(target, &aAddrTable); + snmpTargetAddrTable_remove(target); } } } diff --git a/agent/mibgroup/target/snmpTargetAddrEntry.h b/agent/mibgroup/target/snmpTargetAddrEntry.h index 0b70af5..a9379fd 100644 --- a/agent/mibgroup/target/snmpTargetAddrEntry.h +++ b/agent/mibgroup/target/snmpTargetAddrEntry.h @@ -3,7 +3,10 @@ * This file was generated by mib2c and is intended for use as a mib module * for the ucd-snmp snmpd agent. Edited by Michael Baer * - * last changed 2/2/99. + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef _MIBGROUP_SNMPTARGETADDRENTRY_H @@ -13,55 +16,16 @@ * we use header_generic from the util_funcs module */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); +#include "snmpTargetAddrEntry_data.h" /* * add the SNMPv2-TM mib into the default list of mibs to load, since * it contains the Domain definitions (EG, netsnmpUDPDomain) */ -config_add_mib(SNMPv2-TM) +config_add_mib(SNMPv2-TM); - /* - * Magic number definitions: - */ -#define SNMPTARGETADDRTDOMAIN 1 -#define SNMPTARGETADDRTADDRESS 2 -#define SNMPTARGETADDRTIMEOUT 3 -#define SNMPTARGETADDRRETRYCOUNT 4 -#define SNMPTARGETADDRTAGLIST 5 -#define SNMPTARGETADDRPARAMS 6 -#define SNMPTARGETADDRSTORAGETYPE 7 -#define SNMPTARGETADDRROWSTATUS 8 -#define SNMPTARGETSPINLOCK 99 -#define SNMPTARGETADDRTDOMAINCOLUMN 2 -#define SNMPTARGETADDRTADDRESSCOLUMN 3 -#define SNMPTARGETADDRTIMEOUTCOLUMN 4 -#define SNMPTARGETADDRRETRYCOUNTCOLUMN 5 -#define SNMPTARGETADDRTAGLISTCOLUMN 6 -#define SNMPTARGETADDRPARAMSCOLUMN 7 -#define SNMPTARGETADDRSTORAGETYPECOLUMN 8 -#define SNMPTARGETADDRROWSTATUSCOLUMN 9 - /* - * structure definitions - */ - struct targetAddrTable_struct { - char *nameData; - unsigned char nameLen; - oid tDomain[MAX_OID_LEN]; - int tDomainLen; - unsigned char *tAddress; - size_t tAddressLen; - int timeout; /* Timeout in centiseconds */ - int retryCount; - char *tagList; - char *params; - int storageType; - int rowStatus; - struct targetAddrTable_struct *next; - netsnmp_session *sess; /* a snmp session to the target host */ - time_t sessionCreationTime; - }; /* * function definitions @@ -71,13 +35,6 @@ config_add_mib(SNMPv2-TM) void shutdown_snmpTargetAddrEntry(void); FindVarMethod var_snmpTargetAddrEntry; - struct targetAddrTable_struct *get_addrTable(void); - struct targetAddrTable_struct *get_addrForName2(const char *name, - unsigned char nameLen); - struct targetAddrTable_struct *snmpTargetAddrTable_create(void); - void snmpTargetAddrTable_add(struct targetAddrTable_struct - *newEntry); - void snmpd_parse_config_targetAddr(const char *, char *); #ifndef NETSNMP_NO_WRITE_SUPPORT diff --git a/agent/mibgroup/target/snmpTargetAddrEntry_data.c b/agent/mibgroup/target/snmpTargetAddrEntry_data.c new file mode 100644 index 0000000..58a99a2 --- /dev/null +++ b/agent/mibgroup/target/snmpTargetAddrEntry_data.c @@ -0,0 +1,661 @@ +/* + * snmpTargetAddrEntry MIB + * + * This file was created to separate notification data storage from + * the MIB implementation. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + +#include +#ifdef HAVE_STRING_H +#include +#else +#include +#endif +#include +#include + +#include +#include + +#include "snmpTargetAddrEntry_data.h" +#include "util_funcs/header_generic.h" + +netsnmp_feature_require(container_compare_mem); + +static struct targetAddrTable_struct *aAddrTable = NULL; +static int _active = 0; + +/* + * Utility routines + */ +static int store_snmpTargetAddrEntry(int majorID, int minorID, void *serverarg, + void *clientarg); +static void snmpd_parse_config_targetAddr(const char *token, char *char_ptr); + +struct targetAddrTable_struct * +get_addrTable(void) +{ + return aAddrTable; +} + +struct targetAddrTable_struct * +get_addrForName2(const char *name, size_t nameLen) +{ + struct targetAddrTable_struct *ptr; + for (ptr = aAddrTable; ptr != NULL; ptr = ptr->next) { + if (ptr->nameLen == nameLen && ptr->nameData && + memcmp(ptr->nameData, name, nameLen) == 0) + return ptr; + } + return NULL; +} + + +/* + * TargetAddrTable_create creates and returns a pointer + * to a targetAddrTable_struct with default values set + */ +struct targetAddrTable_struct * +snmpTargetAddrTable_create(void) +{ + struct targetAddrTable_struct *newEntry; + + newEntry = (struct targetAddrTable_struct *) + calloc(1, sizeof(struct targetAddrTable_struct)); + + if (newEntry) { + ++_active; + newEntry->timeout = 1500; + newEntry->retryCount = 3; + + newEntry->tagListData = strdup(""); + newEntry->tagListLen = 0; + + newEntry->storageType = SNMP_STORAGE_NONVOLATILE; + newEntry->rowStatus = SNMP_ROW_NONEXISTENT; + } + + return newEntry; +} /* snmpTargetAddrTable_create */ + + +/* + * TargetAddrTable_dispose frees the space allocated to a + * targetAddrTable_struct + */ +void +snmpTargetAddrTable_dispose(struct targetAddrTable_struct *reaped) +{ + if (NULL == reaped) + return; + + if (reaped->sess) + snmp_close(reaped->sess); + SNMP_FREE(reaped->tAddress); + SNMP_FREE(reaped->nameData); + SNMP_FREE(reaped->tagListData); + SNMP_FREE(reaped->paramsData); + + SNMP_FREE(reaped); + --_active; +} /* snmpTargetAddrTable_dispose */ + +/* + * snmpTargetAddrTable_addToList adds a targetAddrTable_struct + * to a list passed in. The list is assumed to be in a sorted order, + * low to high and this procedure inserts a new struct in the proper + * location. Sorting uses OID values based on name. A new equal value + * overwrites a current one. + */ +void +snmpTargetAddrTable_addToList(struct targetAddrTable_struct *newEntry, + struct targetAddrTable_struct **listPtr) +{ + static struct targetAddrTable_struct *curr_struct, *prev_struct; + int i; + + /* + * if the list is empty, add the new entry to the top + */ + if ((prev_struct = curr_struct = *listPtr) == NULL) { + *listPtr = newEntry; + return; + } else { + /* + * search through the list for an equal or greater OID value + */ + while (curr_struct != NULL) { + i = netsnmp_compare_mem(newEntry->nameData, + newEntry->nameLen, + curr_struct->nameData, + curr_struct->nameLen); + if (i == 0) { /* Exact match, overwrite with new struct */ + newEntry->next = curr_struct->next; + /* + * if curr_struct is the top of the list + */ + if (*listPtr == curr_struct) + *listPtr = newEntry; + else + prev_struct->next = newEntry; + snmpTargetAddrTable_dispose(curr_struct); + return; + } else if (i < 0) { /* Found a greater OID, insert struct in front of it. */ + newEntry->next = curr_struct; + /* + * if curr_struct is the top of the list + */ + if (*listPtr == curr_struct) + *listPtr = newEntry; + else + prev_struct->next = newEntry; + return; + } + prev_struct = curr_struct; + curr_struct = curr_struct->next; + } + } + /* + * if we're here, no larger OID was ever found, insert on end of list + */ + prev_struct->next = newEntry; +} /* snmpTargeAddrTable_addToList */ + + +void +snmpTargetAddrTable_add(struct targetAddrTable_struct *newEntry) +{ + snmpTargetAddrTable_addToList(newEntry, &aAddrTable); +} + + +/* + * snmpTargetAddrTable_remFromList removes a targetAddrTable_struct + * from the list passed in + */ +void +snmpTargetAddrTable_remFromList(struct targetAddrTable_struct *oldEntry, + struct targetAddrTable_struct **listPtr) +{ + struct targetAddrTable_struct *tptr; + + if ((tptr = *listPtr) == NULL) + return; + else if (tptr == oldEntry) { + *listPtr = (*listPtr)->next; + snmpTargetAddrTable_dispose(tptr); + return; + } else { + while (tptr->next != NULL) { + if (tptr->next == oldEntry) { + tptr->next = tptr->next->next; + snmpTargetAddrTable_dispose(oldEntry); + return; + } + tptr = tptr->next; + } + } +} /* snmpTargetAddrTable_remFromList */ + +void +snmpTargetAddrTable_remove(struct targetAddrTable_struct *entry) +{ + snmpTargetAddrTable_remFromList(entry, &aAddrTable); +} + +/* + * lookup OID in the link list of Addr Table Entries + */ +struct targetAddrTable_struct * +search_snmpTargetAddrTable(oid * baseName, + size_t baseNameLen, + oid * name, size_t * length, int exact) +{ + static struct targetAddrTable_struct *temp_struct; + int i; + size_t myOIDLen = 0; + oid newNum[128]; + + /* + * lookup entry in addrTable linked list, Get Current MIB ID + */ + memcpy(newNum, baseName, baseNameLen * sizeof(oid)); + + for (temp_struct = aAddrTable; temp_struct != NULL; + temp_struct = temp_struct->next) { + for (i = 0; i < temp_struct->nameLen; i++) { + newNum[baseNameLen + i] = temp_struct->nameData[i]; + } + myOIDLen = baseNameLen + i; + i = snmp_oid_compare(name, *length, newNum, myOIDLen); + /* + * Assumes that the linked list sorted by OID, low to high + */ + if ((i == 0 && exact != 0) || (i < 0 && exact == 0)) { + if (exact == 0) { + memcpy(name, newNum, myOIDLen * sizeof(oid)); + *length = myOIDLen; + } + return temp_struct; + } + } + return NULL; +} /* search_snmpTargetAddrTable */ + + +/* + * Init routines + */ + +void +init_snmpTargetAddrEntry_data(void) +{ + static int done = 0; + + if (++done != 1) + return; + + snmpd_register_config_handler("targetAddr", + snmpd_parse_config_targetAddr, + (void (*)(void))0, NULL); + + /* + * we need to be called back later + */ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + store_snmpTargetAddrEntry, NULL); + +} /* init_snmpTargetAddrEntry */ + + +/* + * Shutdown routines + */ + +void +shutdown_snmpTargetAddrEntry_data(void) +{ + struct targetAddrTable_struct *ptr; + struct targetAddrTable_struct *next; + + snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + store_snmpTargetAddrEntry, NULL, FALSE); + + DEBUGMSGTL(("trap:targetAddr:shutdown", "clearing %d object(s)\n", + _active)); + for (ptr = aAddrTable; ptr; ptr = next) { + next = ptr->next; + snmpTargetAddrTable_dispose(ptr); + } + aAddrTable = NULL; + + DEBUGMSGTL(("trap:targetAddr:shutdown", "active count %d\n",_active)); + if (_active != 0) { + DEBUGMSGTL(("trap:targetAddr:shutdown", + "unexpected count %d after cleanup!\n", _active)); + snmp_log(LOG_WARNING, "targetAddr count %d, not 0, after shutdown.\n", + _active); + } +} + +/* + * store_snmpTargetAddrEntry handles the persistent storage proccess + * for this MIB table. It writes out all the non-volatile rows + * to permanent storage on a shutdown + */ +static int +store_snmpTargetAddrEntry(int majorID, int minorID, void *serverarg, + void *clientarg) +{ + const struct targetAddrTable_struct *curr_struct; + char line[1024], *ep = line + sizeof(line); + int i; + + curr_struct = aAddrTable; + while (curr_struct != NULL) { + if ((curr_struct->storageType == SNMP_STORAGE_NONVOLATILE || + curr_struct->storageType == SNMP_STORAGE_PERMANENT) && + (curr_struct->rowStatus == SNMP_ROW_ACTIVE || + curr_struct->rowStatus == SNMP_ROW_NOTINSERVICE)) { + char *cur; + + cur = line + snprintf(line, sizeof(line), "targetAddr "); + cur = read_config_save_octet_string( + cur, (const u_char*)curr_struct->nameData, + curr_struct->nameLen); + *cur++ = ' '; + for (i = 0; i < curr_struct->tDomainLen; i++) { + cur += snprintf(cur, ep - cur, ".%i", + (int) curr_struct->tDomain[i]); + } + *cur++ = ' '; + cur = read_config_save_octet_string( + cur, curr_struct->tAddress, curr_struct->tAddressLen); + snprintf(cur, ep - cur, " %i %i \"%s\" %s %i %i", + curr_struct->timeout, + curr_struct->retryCount, curr_struct->tagListData, + curr_struct->paramsData, curr_struct->storageType, + curr_struct->rowStatus); + + /* + * store to file + */ + snmpd_store_config(line); + } + + curr_struct = curr_struct->next; + } + + return SNMPERR_SUCCESS; +} /* store_snmpTargetAddrEntry */ + +static int +snmpTargetAddr_addTDomain(struct targetAddrTable_struct *entry, char *cptr) +{ + size_t len = 128; + + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no tDomain in config string\n")); + return (0); + } + + if (!read_objid(cptr, entry->tDomain, &len)) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: tDomain unreadable in config string\n")); + return (0); + } + + /* + * spec check for oid 1-128 + */ + if (len < 1 || len > 128) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: tDomain out of range in config string\n")); + return (0); + } + + entry->tDomainLen = len; + return (1); +} /* snmpTargetAddr_addTDomain */ + + +static int +snmpTargetAddr_addTimeout(struct targetAddrTable_struct *entry, char *cptr) +{ + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetParamsEntry: no Timeout in config string\n")); + return (0); + } else if (!(isdigit((unsigned char)(*cptr)))) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargeParamsEntry: Timeout is not a digit in config string\n")); + return (0); + } + /* + * check Timeout >= 0 + */ + else if ((entry->timeout = (int) strtol(cptr, (char **) NULL, 0)) < 0) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargeParamsEntry: Timeout out of range in config string\n")); + return (0); + } + return (1); +} /* snmpTargetAddr_addTimeout */ + + +static int +snmpTargetAddr_addRetryCount(struct targetAddrTable_struct *entry, + char *cptr) +{ + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetParamsEntry: no Retry Count in config string\n")); + return (0); + } else if (!(isdigit((unsigned char)(*cptr)))) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargeParamsEntry: Retry Count is not a digit in config string\n")); + return (0); + } + /* + * spec check 0..255 + */ + else { + entry->retryCount = (int) strtol(cptr, (char **) NULL, 0); + if ((entry->retryCount < 0) || (entry->retryCount > 255)) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargeParamsEntry: Retry Count is out of range in config string\n")); + return (0); + } + } + return (1); +} /* snmpTargetAddr_addRetryCount */ + + +static int +snmpTargetAddr_addTagList(struct targetAddrTable_struct *entry, char *cptr) +{ + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no tag list in config string\n")); + return (0); + } else { + size_t len = strlen(cptr); + /* + * spec check for string 0-255 + */ + if (len > 255) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: tag list out of range in config string\n")); + return (0); + } + SNMP_FREE(entry->tagListData); + entry->tagListData = strdup(cptr); + entry->tagListLen = strlen(cptr); + } + return (1); +} /* snmpTargetAddr_addTagList */ + + +static int +snmpTargetAddr_addParams(struct targetAddrTable_struct *entry, char *cptr) +{ + size_t len; + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no params in config string\n")); + return (0); + } else { + len = strlen(cptr); + /* + * spec check for string 1-32 + */ + if (len < 1 || len > 32) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: params out of range in config string\n")); + return (0); + } + entry->paramsData = strdup(cptr); + entry->paramsLen = strlen(cptr); + } + return (1); +} /* snmpTargetAddr_addParams */ + + +static int +snmpTargetAddr_addStorageType(struct targetAddrTable_struct *entry, + char *cptr) +{ + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no storage type in config " + "string\n")); + return (0); + } else if (!(isdigit((unsigned char)(*cptr)))) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: storage type is not a digit " + "in config string\n")); + return (0); + } + /* + * check that storage type is a possible value + */ + else if (((entry->storageType = (int) strtol(cptr, (char **) NULL, 0)) + != SNMP_STORAGE_OTHER) && + (entry->storageType != SNMP_STORAGE_VOLATILE) && + (entry->storageType != SNMP_STORAGE_NONVOLATILE) && + (entry->storageType != SNMP_STORAGE_PERMANENT) && + (entry->storageType != SNMP_STORAGE_READONLY)) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: storage type not a valid " + "value of other(%d), volatile(%d), nonvolatile(%d), " + "permanent(%d), or readonly(%d) in config string.\n", + SNMP_STORAGE_OTHER, SNMP_STORAGE_VOLATILE, + SNMP_STORAGE_NONVOLATILE, SNMP_STORAGE_PERMANENT, + SNMP_STORAGE_READONLY)); + return (0); + } + return (1); +} /* snmpTargetAddr_addStorageType */ + + +static int +snmpTargetAddr_addRowStatus(struct targetAddrTable_struct *entry, + char *cptr) +{ + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no Row Status in config " + "string\n")); + return (0); + } else if (!(isdigit((unsigned char)(*cptr)))) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: Row Status is not a digit in " + "config string\n")); + return (0); + } + /* + * check that row status is a valid value + */ + else if (((entry->rowStatus = (int) strtol(cptr, (char **) NULL, 0)) + != SNMP_ROW_ACTIVE) && + (entry->rowStatus != SNMP_ROW_NOTINSERVICE) && + (entry->rowStatus != SNMP_ROW_NOTREADY)) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: Row Status is not a valid " + "value of active(%d), notinservice(%d), or notready(%d) " + "in config string.\n", + SNMP_ROW_ACTIVE, SNMP_ROW_NOTINSERVICE, SNMP_ROW_NOTREADY)); + return (0); + } + return (1); +} /* snmpTargetAddr_addRowStatus */ + + + +static void +snmpd_parse_config_targetAddr(const char *token, char *char_ptr) +{ + const char *cptr = char_ptr; + char buff[1024], *bptr; + struct targetAddrTable_struct *newEntry; + int i; + size_t bufl; + + newEntry = snmpTargetAddrTable_create(); + + cptr = skip_white_const(cptr); + if (cptr == NULL) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no name in config string\n")); + snmpTargetAddrTable_dispose(newEntry); + return; + } + + bufl = 0; + cptr = read_config_read_octet_string_const(cptr, + (u_char**)&newEntry->nameData, + &bufl); + if (bufl < 1 || bufl > 32) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: name out of range in config " + "string\n")); + snmpTargetAddrTable_dispose(newEntry); + return; + } + newEntry->nameLen = bufl; + + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addTDomain(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = + read_config_read_octet_string_const(cptr, + (u_char **) & newEntry->tAddress, + &newEntry->tAddressLen); + if (!cptr || !newEntry->tAddress || (newEntry->tAddressLen < 1) || + (newEntry->tAddressLen > 32)) { + DEBUGMSGTL(("snmpTargetAddrEntry", + "ERROR snmpTargetAddrEntry: no/bd TAddress in config string\n")); + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addTimeout(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addRetryCount(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addTagList(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addParams(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addStorageType(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + cptr = copy_nword_const(cptr, buff, sizeof(buff)); + if (snmpTargetAddr_addRowStatus(newEntry, buff) == 0) { + snmpTargetAddrTable_dispose(newEntry); + return; + } + bptr = buff; + bptr += sprintf(bptr, "snmp_parse_config_targetAddr, read: "); + bptr = read_config_save_octet_string(bptr, (u_char*)newEntry->nameData, + newEntry->nameLen); + *bptr++ = '\n'; + for (i = 0; i < newEntry->tDomainLen; i++) { + bptr += snprintf(bptr, buff + sizeof(buff) - bptr, + ".%d", (int) newEntry->tDomain[i]); + } + for (i = 0; i < newEntry->tAddressLen; i++) + bptr += snprintf(bptr, buff + sizeof(buff) - bptr, " %02x", + ((u_char *)newEntry->tAddress)[i]); + bptr += snprintf(bptr, buff + sizeof(buff) - bptr, + " %d %d %s %s %d %d\n", newEntry->timeout, + newEntry->retryCount, newEntry->tagListData, + newEntry->paramsData, newEntry->storageType, + newEntry->rowStatus); + buff[ sizeof(buff) - 1 ] = 0; + DEBUGMSGTL(("snmpTargetAddrEntry", "%s", buff)); + + snmpTargetAddrTable_addToList(newEntry, &aAddrTable); +} /* snmpd_parse_config_target */ + diff --git a/agent/mibgroup/target/snmpTargetAddrEntry_data.h b/agent/mibgroup/target/snmpTargetAddrEntry_data.h new file mode 100644 index 0000000..0af434e --- /dev/null +++ b/agent/mibgroup/target/snmpTargetAddrEntry_data.h @@ -0,0 +1,82 @@ +/* + * This file was created to separate notification data storage from + * the MIB implementation. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + +#ifndef _MIBGROUP_SNMPTARGETADDRENTRY_DATA_H +#define _MIBGROUP_SNMPTARGETADDRENTRY_DATA_H + +/* + * we use header_generic from the util_funcs module + */ + + /* + * Magic number definitions: + */ +#define SNMPTARGETADDRTDOMAIN 1 +#define SNMPTARGETADDRTADDRESS 2 +#define SNMPTARGETADDRTIMEOUT 3 +#define SNMPTARGETADDRRETRYCOUNT 4 +#define SNMPTARGETADDRTAGLIST 5 +#define SNMPTARGETADDRPARAMS 6 +#define SNMPTARGETADDRSTORAGETYPE 7 +#define SNMPTARGETADDRROWSTATUS 8 +#define SNMPTARGETSPINLOCK 99 +#define SNMPTARGETADDRTDOMAINCOLUMN 2 +#define SNMPTARGETADDRTADDRESSCOLUMN 3 +#define SNMPTARGETADDRTIMEOUTCOLUMN 4 +#define SNMPTARGETADDRRETRYCOUNTCOLUMN 5 +#define SNMPTARGETADDRTAGLISTCOLUMN 6 +#define SNMPTARGETADDRPARAMSCOLUMN 7 +#define SNMPTARGETADDRSTORAGETYPECOLUMN 8 +#define SNMPTARGETADDRROWSTATUSCOLUMN 9 + + /* + * structure definitions + */ + struct targetAddrTable_struct { + char *nameData; + size_t nameLen; + oid tDomain[MAX_OID_LEN]; + int tDomainLen; + void *tAddress; + size_t tAddressLen; + int timeout; /* Timeout in centiseconds */ + int retryCount; + char *tagListData; + size_t tagListLen; + char *paramsData; + size_t paramsLen; + int storageType; + int rowStatus; + struct targetAddrTable_struct *next; + netsnmp_session *sess; /* a snmp session to the target host */ + time_t sessionCreationTime; + }; + +/* + * function definitions + */ + + void init_snmpTargetAddrEntry_data(void); + void shutdown_snmpTargetAddrEntry_data(void); + + struct targetAddrTable_struct *get_addrTable(void); + struct targetAddrTable_struct *get_addrForName2(const char *name, + size_t nameLen); + struct targetAddrTable_struct *snmpTargetAddrTable_create(void); + struct targetAddrTable_struct *search_snmpTargetAddrTable(oid * baseName, + size_t nameLen, + oid * name, + size_t * length, + int exact); + void snmpTargetAddrTable_add(struct targetAddrTable_struct *); + void snmpTargetAddrTable_remove(struct targetAddrTable_struct *); + void snmpTargetAddrTable_dispose(struct targetAddrTable_struct *); + +#endif /* _MIBGROUP_SNMPTARGETADDRENTRY_DATA_H */ diff --git a/agent/mibgroup/target/snmpTargetParamsEntry.c b/agent/mibgroup/target/snmpTargetParamsEntry.c index 4e1f4e2..84c3e51 100644 --- a/agent/mibgroup/target/snmpTargetParamsEntry.c +++ b/agent/mibgroup/target/snmpTargetParamsEntry.c @@ -4,11 +4,14 @@ * This file was generated by mib2c and is intended for use as a mib module * for the ucd-snmp snmpd agent. Edited by Michael Baer * - * last changed 2/2/99. + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -20,6 +23,7 @@ #include #include "snmpTargetParamsEntry.h" +#include "snmpTargetParamsEntry_data.h" #define snmpTargetParamsOIDLen 11 /*This is base+column, * i.e. everything but index */ @@ -27,203 +31,12 @@ oid snmpTargetParamsOID[snmpTargetParamsOIDLen] = { 1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 0 }; -static struct targetParamTable_struct *aPTable = NULL; - /* * Utility routines */ -/* - * TargetParamTable_create creates and returns a pointer - * to a targetParamTable_struct with default values set - */ -struct targetParamTable_struct - * -snmpTargetParamTable_create(void) -{ - struct targetParamTable_struct *newEntry; - - newEntry = (struct targetParamTable_struct *) - malloc(sizeof(struct targetParamTable_struct)); - - newEntry->paramName = NULL; - newEntry->mpModel = -1; - - newEntry->secModel = -1; - newEntry->secName = NULL; - newEntry->secLevel = -1; - - newEntry->storageType = SNMP_STORAGE_NONVOLATILE; - newEntry->rowStatus = SNMP_ROW_NONEXISTENT; - newEntry->next = NULL; - return newEntry; -} - - -/* - * TargetParamTable_dispose frees the space allocated to a - * targetParamTable_struct - */ -void -snmpTargetParamTable_dispose(struct targetParamTable_struct *reaped) -{ - free(reaped->paramName); - free(reaped->secName); - - free(reaped); -} /* snmpTargetParamTable_dispose */ - - -/* - * snmpTargetParamTable_addToList adds a targetParamTable_struct - * to a list passed in. The list is assumed to be in a sorted order, - * low to high and this procedure inserts a new struct in the proper - * location. Sorting uses OID values based on paramName. A new equal value - * overwrites a current one. - */ -void -snmpTargetParamTable_addToList(struct targetParamTable_struct *newEntry, - struct targetParamTable_struct **listPtr) -{ - static struct targetParamTable_struct *curr_struct, *prev_struct; - int i; - size_t newOIDLen = 0, currOIDLen = 0; - oid newOID[128], currOID[128]; - - /* - * if the list is empty, add the new entry to the top - */ - if ((prev_struct = curr_struct = *listPtr) == NULL) { - *listPtr = newEntry; - return; - } else { - /* - * get the 'OID' value of the new entry - */ - newOIDLen = strlen(newEntry->paramName); - for (i = 0; i < (int) newOIDLen; i++) { - newOID[i] = newEntry->paramName[i]; - } - - /* - * search through the list for an equal or greater OID value - */ - while (curr_struct != NULL) { - currOIDLen = strlen(curr_struct->paramName); - for (i = 0; i < (int) currOIDLen; i++) { - currOID[i] = curr_struct->paramName[i]; - } - - i = snmp_oid_compare(newOID, newOIDLen, currOID, currOIDLen); - if (i == 0) { /* Exact match, overwrite with new struct */ - newEntry->next = curr_struct->next; - /* - * if curr_struct is the top of the list - */ - if (*listPtr == curr_struct) - *listPtr = newEntry; - else - prev_struct->next = newEntry; - snmpTargetParamTable_dispose(curr_struct); - return; - } else if (i < 0) { /* Found a greater OID, insert struct in front of it. */ - newEntry->next = curr_struct; - /* - * if curr_struct is the top of the list - */ - if (*listPtr == curr_struct) - *listPtr = newEntry; - else - prev_struct->next = newEntry; - return; - } - prev_struct = curr_struct; - curr_struct = curr_struct->next; - } - } - /* - * if we're here, no larger OID was ever found, insert on end of list - */ - prev_struct->next = newEntry; -} /* snmpTargeParamTable_addToList */ - -void -snmpTargetParamTable_add(struct targetParamTable_struct *newEntry) -{ - snmpTargetParamTable_addToList(newEntry, &aPTable); -} - -/* - * snmpTargetParamTable_remFromList removes a targetParamTable_struct - * from the list passed in - */ -void -snmpTargetParamTable_remFromList(struct targetParamTable_struct *oldEntry, - struct targetParamTable_struct **listPtr) -{ - struct targetParamTable_struct *tptr; - - if ((tptr = *listPtr) == NULL) - return; - else if (tptr == oldEntry) { - *listPtr = (*listPtr)->next; - snmpTargetParamTable_dispose(tptr); - return; - } else { - while (tptr->next != NULL) { - if (tptr->next == oldEntry) { - tptr->next = tptr->next->next; - snmpTargetParamTable_dispose(oldEntry); - return; - } - tptr = tptr->next; - } - } -} /* snmpTargetParamTable_remFromList */ - - -/* - * lookup OID in the link list of Table Entries - */ -struct targetParamTable_struct * -search_snmpTargetParamsTable(oid * baseName, - size_t baseNameLen, - oid * name, size_t * length, int exact) -{ - static struct targetParamTable_struct *temp_struct; - int i; - size_t myOIDLen = 0; - oid newNum[128]; - - /* - * lookup entry in p / * Get Current MIB ID - */ - memcpy(newNum, baseName, baseNameLen * sizeof(oid)); - - for (temp_struct = aPTable; temp_struct != NULL; - temp_struct = temp_struct->next) { - for (i = 0; i < (int) strlen(temp_struct->paramName); i++) { - newNum[baseNameLen + i] = temp_struct->paramName[i]; - } - myOIDLen = baseNameLen + strlen(temp_struct->paramName); - i = snmp_oid_compare(name, *length, newNum, myOIDLen); - /* - * Assumes that the linked list sorted by OID, low to high - */ - if ((i == 0 && exact != 0) || (i < 0 && exact == 0)) { - if (exact == 0) { - memcpy(name, newNum, myOIDLen * sizeof(oid)); - *length = myOIDLen; - } - return temp_struct; - } - } - return NULL; -} /* search_snmpTargetParamsTable */ - - /* * snmpTargetParams_rowStatusCheck is boolean funciton that checks * the status of a row's values in order to determine whether @@ -233,7 +46,7 @@ int snmpTargetParams_rowStatusCheck(struct targetParamTable_struct *entry) { if ((entry->mpModel < 0) || (entry->secModel < 0) || - (entry->secLevel < 0) || (entry->secName == NULL)) + (entry->secLevel < 0) || (entry->secNameData == NULL)) return 0; else return 1; @@ -275,7 +88,7 @@ oid snmpTargetParamsEntry_variables_oid[] = void init_snmpTargetParamsEntry(void) { - aPTable = NULL; + init_snmpTargetParamsEntry_data(); REGISTER_MIB("target/snmpTargetParamsEntry", snmpTargetParamsEntry_variables, variable2, @@ -285,18 +98,12 @@ init_snmpTargetParamsEntry(void) snmpd_parse_config_targetParams, (void (*)(void))0, NULL); - /* - * we need to be called back later - */ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - store_snmpTargetParamsEntry, NULL); } /* init_snmpTargetParmsEntry */ void shutdown_snmpTargetParamsEntry(void) { - while (aPTable) - snmpTargetParamTable_remFromList(aPTable, &aPTable); + shutdown_snmpTargetParamsEntry_data(); } @@ -319,7 +126,8 @@ snmpTargetParams_addParamName(struct targetParamTable_struct *entry, "ERROR snmpTargetParamsEntry: param name out of range in config string\n")); return (0); } - entry->paramName = strdup(cptr); + entry->paramNameData = strdup(cptr); + entry->paramNameLen = strlen(cptr); } return (1); } @@ -385,7 +193,8 @@ snmpTargetParams_addSecName(struct targetParamTable_struct *entry, "ERROR snmpTargetParamsEntry: no security name in config string\n")); return (0); } else { - entry->secName = strdup(cptr); + entry->secNameData = strdup(cptr); + entry->secNameLen = strlen(cptr); } return (1); } /* snmpTargetParams_addSecName */ @@ -541,12 +350,12 @@ snmpd_parse_config_targetParams(const char *token, char *char_ptr) } DEBUGMSGTL(("snmpTargetParamsEntry", "snmp_parse_config_targetParams, read: %s %d %d %s %d %d %d\n", - newEntry->paramName, newEntry->mpModel, newEntry->secModel, - newEntry->secName, newEntry->secLevel, newEntry->storageType, - newEntry->rowStatus)); + newEntry->paramNameData, newEntry->mpModel, newEntry->secModel, + newEntry->secNameData, newEntry->secLevel, + newEntry->storageType, newEntry->rowStatus)); update_timestamp(newEntry); - snmpTargetParamTable_addToList(newEntry, &aPTable); + snmpTargetParamTable_add(newEntry); } /* snmpd_parse_config_target */ @@ -555,46 +364,6 @@ snmpd_parse_config_targetParams(const char *token, char *char_ptr) */ -/* - * store_snmpTargetParamsEntry handles the presistent storage proccess - * for this MIB table. It writes out all the non-volatile rows - * to permanent storage on a shutdown - */ -int -store_snmpTargetParamsEntry(int majorID, int minorID, void *serverarg, - void *clientarg) -{ - struct targetParamTable_struct *curr_struct; - char line[1024]; - - strcpy(line, ""); - if ((curr_struct = aPTable) != NULL) { - while (curr_struct != NULL) { - if ((curr_struct->storageType == SNMP_STORAGE_NONVOLATILE || - curr_struct->storageType == SNMP_STORAGE_PERMANENT) - && - (curr_struct->rowStatus == SNMP_ROW_ACTIVE || - curr_struct->rowStatus == SNMP_ROW_NOTINSERVICE)) { - snprintf(line, sizeof(line), - "targetParams %s %i %i %s %i %i %i\n", - curr_struct->paramName, curr_struct->mpModel, - curr_struct->secModel, curr_struct->secName, - curr_struct->secLevel, curr_struct->storageType, - curr_struct->rowStatus); - line[ sizeof(line)-1 ] = 0; - - /* - * store to file - */ - snmpd_store_config(line); - } - curr_struct = curr_struct->next; - } - } - return SNMPERR_SUCCESS; -} /* store_snmpTargetParmsEntry */ - - /* * MIB table access routines */ @@ -681,14 +450,13 @@ var_snmpTargetParamsEntry(struct variable * vp, /* * if unset value, (i.e. new row) */ - if (temp_struct->secName == NULL) + if (temp_struct->secNameData == NULL) return NULL; /* * including null character. */ - memcpy(string, temp_struct->secName, strlen(temp_struct->secName)); - string[strlen(temp_struct->secName)] = '\0'; - *var_len = strlen(temp_struct->secName); + strlcpy((char *)string, temp_struct->secNameData, sizeof(string)); + *var_len = strlen(temp_struct->secNameData); return (unsigned char *) string; case SNMPTARGETPARAMSSECURITYLEVEL: @@ -1115,7 +883,8 @@ write_snmpTargetParamsSecName(int action, size_t var_val_len, u_char * statP, oid * name, size_t name_len) { - static char *old_name; + static char *old_name = NULL; + static size_t old_name_len; struct targetParamTable_struct *params = NULL; if (action == RESERVE1) { @@ -1156,14 +925,19 @@ write_snmpTargetParamsSecName(int action, "write to snmpTargetParamsSecName: this change not allowed in active row.\n")); return SNMP_ERR_INCONSISTENTVALUE; } + if (old_name != NULL) { + DEBUGMSGTL(("snmpTargetParamsEntry", + "multiple rows/sets no supported.\n")); + return SNMP_ERR_GENERR; + } - old_name = params->secName; - params->secName = (char *) malloc(var_val_len + 1); - if (params->secName == NULL) { + old_name = params->secNameData; + old_name_len = params->secNameLen; + params->secNameData = netsnmp_memdup_nt(var_val, var_val_len, + ¶ms->secNameLen); + if (params->secNameData == NULL) { return SNMP_ERR_RESOURCEUNAVAILABLE; } - memcpy(params->secName, var_val, var_val_len); - params->secName[var_val_len] = '\0'; if (params->rowStatus == SNMP_ROW_NOTREADY && snmpTargetParams_rowStatusCheck(params)) { @@ -1193,14 +967,16 @@ write_snmpTargetParamsSecName(int action, 1)) != NULL) { if (params->storageType != SNMP_STORAGE_READONLY && params->rowStatus != SNMP_ROW_ACTIVE) { - SNMP_FREE(params->secName); - params->secName = old_name; + SNMP_FREE(params->secNameData); + params->secNameData = old_name; + params->secNameLen = old_name_len; if (params->rowStatus == SNMP_ROW_NOTINSERVICE && !snmpTargetParams_rowStatusCheck(params)) { params->rowStatus = SNMP_ROW_NOTREADY; } } } + old_name = NULL; } return SNMP_ERR_NOERROR; @@ -1225,18 +1001,21 @@ snmpTargetParams_createNewRow(oid * name, size_t name_len) pNameLen = name_len - snmpTargetParamsOIDLen; if (pNameLen > 0) { temp_struct = snmpTargetParamTable_create(); - temp_struct->paramName = (char *) malloc(pNameLen + 1); + if (NULL == temp_struct) + return 0; + temp_struct->paramNameData = (char *) malloc(pNameLen + 1); for (i = 0; i < pNameLen; i++) { - temp_struct->paramName[i] = + temp_struct->paramNameData[i] = (char) name[i + snmpTargetParamsOIDLen]; } - temp_struct->paramName[pNameLen] = '\0'; + temp_struct->paramNameData[pNameLen] = '\0'; + temp_struct->paramNameLen = pNameLen; temp_struct->rowStatus = SNMP_ROW_NOTREADY; update_timestamp(temp_struct); - snmpTargetParamTable_addToList(temp_struct, &aPTable); + snmpTargetParamTable_add(temp_struct); return 1; } @@ -1368,13 +1147,12 @@ write_snmpTargetParamsRowStatus(int action, name, &name_len, 1); if (params != NULL) { if (value == SNMP_ROW_DESTROY) { - snmpTargetParamTable_remFromList(params, &aPTable); + snmpTargetParamTable_remove(params); } if (value == SNMP_ROW_ACTIVE || value == SNMP_ROW_NOTINSERVICE) { update_timestamp(params); } } - snmp_store_needed(NULL); } else if (action == UNDO || action == FREE) { snmpTargetParamsOID[snmpTargetParamsOIDLen - 1] = SNMPTARGETPARAMSROWSTATUSCOLUMN; @@ -1384,7 +1162,7 @@ write_snmpTargetParamsRowStatus(int action, if (value == SNMP_ROW_CREATEANDGO || value == SNMP_ROW_CREATEANDWAIT) { if (params != NULL) { - snmpTargetParamTable_remFromList(params, &aPTable); + snmpTargetParamTable_remove(params); } } } @@ -1392,16 +1170,3 @@ write_snmpTargetParamsRowStatus(int action, } #endif /* !NETSNMP_NO_WRITE_SUPPORT */ - - -struct targetParamTable_struct * -get_paramEntry(char *name) -{ - static struct targetParamTable_struct *ptr; - for (ptr = aPTable; ptr; ptr = ptr->next) { - if (strcmp(ptr->paramName, name) == 0) { - return ptr; - } - } - return NULL; -} diff --git a/agent/mibgroup/target/snmpTargetParamsEntry.h b/agent/mibgroup/target/snmpTargetParamsEntry.h index bd30582..114974d 100644 --- a/agent/mibgroup/target/snmpTargetParamsEntry.h +++ b/agent/mibgroup/target/snmpTargetParamsEntry.h @@ -3,52 +3,17 @@ * This file was generated by mib2c and is intended for use as a mib module * for the ucd-snmp snmpd agent. Edited by Michael Baer * - * last changed 2/2/99. + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef _MIBGROUP_SNMPTARGETPARAMSENTRY_H #define _MIBGROUP_SNMPTARGETPARAMSENTRY_H - /* - * Magic number definitions: - */ - #define SNMPTARGETPARAMSMPMODEL 1 - #define SNMPTARGETPARAMSSECURITYMODEL 2 - #define SNMPTARGETPARAMSSECURITYNAME 3 - #define SNMPTARGETPARAMSSECURITYLEVEL 4 - #define SNMPTARGETPARAMSSTORAGETYPE 5 - #define SNMPTARGETPARAMSROWSTATUS 6 - #define SNMPTARGETPARAMSMPMODELCOLUMN 2 - #define SNMPTARGETPARAMSSECURITYMODELCOLUMN 3 - #define SNMPTARGETPARAMSSECURITYNAMECOLUMN 4 - #define SNMPTARGETPARAMSSECURITYLEVELCOLUMN 5 - #define SNMPTARGETPARAMSSTORAGETYPECOLUMN 6 - #define SNMPTARGETPARAMSROWSTATUSCOLUMN 7 - /* - * structure definitions - */ - struct targetParamTable_struct { - char *paramName; - int mpModel; - int secModel; - char *secName; - int secLevel; - int storageType; - int rowStatus; - struct targetParamTable_struct *next; - time_t updateTime; - }; - - /* - * utility functions - */ - struct targetParamTable_struct *get_paramEntry(char *name); - void snmpTargetParamTable_add(struct - targetParamTable_struct - *newEntry); - struct targetParamTable_struct *snmpTargetParamTable_create(void); - void snmpTargetParamTable_dispose(struct targetParamTable_struct *); - +#include "snmpTargetParamsEntry_data.h" + /* * function definitions */ diff --git a/agent/mibgroup/target/snmpTargetParamsEntry_data.c b/agent/mibgroup/target/snmpTargetParamsEntry_data.c new file mode 100644 index 0000000..54aecf3 --- /dev/null +++ b/agent/mibgroup/target/snmpTargetParamsEntry_data.c @@ -0,0 +1,323 @@ +/* + * TargetParamTable data storage + * + * This file was created to separate data storage from the MIB implementation + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + +#include +#ifdef HAVE_STRING_H +#include +#else +#include +#endif +#include +#include + +#include +#include + +#include "snmpTargetParamsEntry_data.h" + +netsnmp_feature_require(container_compare_mem); + +static struct targetParamTable_struct *aPTable = NULL; +static int _active = 0; + +/* + * Utility routines + */ +static int +store_snmpTargetParamsEntry(int majorID, int minorID, void *serverarg, + void *clientarg); + +/* + * TargetParamTable_create creates and returns a pointer + * to a targetParamTable_struct with default values set + */ +struct targetParamTable_struct + * +snmpTargetParamTable_create(void) +{ + struct targetParamTable_struct *newEntry; + + newEntry = (struct targetParamTable_struct *) + calloc(1, sizeof(struct targetParamTable_struct)); + + if (NULL == newEntry) + return NULL; + + ++_active; + + newEntry->mpModel = -1; + + newEntry->secModel = -1; + newEntry->secLevel = -1; + + newEntry->storageType = SNMP_STORAGE_NONVOLATILE; + newEntry->rowStatus = SNMP_ROW_NONEXISTENT; + + return newEntry; +} + + +/* + * TargetParamTable_dispose frees the space allocated to a + * targetParamTable_struct + */ +void +snmpTargetParamTable_dispose(struct targetParamTable_struct *reaped) +{ + SNMP_FREE(reaped->paramNameData); + SNMP_FREE(reaped->secNameData); + + free(reaped); + --_active; +} /* snmpTargetParamTable_dispose */ + + +/* + * snmpTargetParamTable_addToList adds a targetParamTable_struct + * to a list passed in. The list is assumed to be in a sorted order, + * low to high and this procedure inserts a new struct in the proper + * location. Sorting uses OID values based on paramName. A new equal value + * overwrites a current one. + */ +void +snmpTargetParamTable_addToList(struct targetParamTable_struct *newEntry, + struct targetParamTable_struct **listPtr) +{ + static struct targetParamTable_struct *curr_struct, *prev_struct; + int i; + + snmp_store_needed(NULL); + + /* + * if the list is empty, add the new entry to the top + */ + if ((prev_struct = curr_struct = *listPtr) == NULL) { + *listPtr = newEntry; + return; + } else { + /* + * search through the list for an equal or greater OID value + */ + while (curr_struct != NULL) { + i = netsnmp_compare_mem(newEntry->paramNameData, + newEntry->paramNameLen, + curr_struct->paramNameData, + curr_struct->paramNameLen); + if (i == 0) { /* Exact match, overwrite with new struct */ + newEntry->next = curr_struct->next; + /* + * if curr_struct is the top of the list + */ + if (*listPtr == curr_struct) + *listPtr = newEntry; + else + prev_struct->next = newEntry; + snmpTargetParamTable_dispose(curr_struct); + return; + } else if (i < 0) { /* Found a greater OID, insert struct in front of it. */ + newEntry->next = curr_struct; + /* + * if curr_struct is the top of the list + */ + if (*listPtr == curr_struct) + *listPtr = newEntry; + else + prev_struct->next = newEntry; + return; + } + prev_struct = curr_struct; + curr_struct = curr_struct->next; + } + } + /* + * if we're here, no larger OID was ever found, insert on end of list + */ + prev_struct->next = newEntry; +} /* snmpTargeParamTable_addToList */ + +void +snmpTargetParamTable_add(struct targetParamTable_struct *newEntry) +{ + snmpTargetParamTable_addToList(newEntry, &aPTable); +} + +/* + * snmpTargetParamTable_remFromList removes a targetParamTable_struct + * from the list passed in + */ +void +snmpTargetParamTable_remFromList(struct targetParamTable_struct *oldEntry, + struct targetParamTable_struct **listPtr) +{ + struct targetParamTable_struct *tptr; + + if ((tptr = *listPtr) == NULL) + return; + else if (tptr == oldEntry) { + *listPtr = (*listPtr)->next; + snmpTargetParamTable_dispose(tptr); + snmp_store_needed(NULL); + } else { + while (tptr->next != NULL) { + if (tptr->next == oldEntry) { + tptr->next = tptr->next->next; + snmpTargetParamTable_dispose(oldEntry); + snmp_store_needed(NULL); + break; + } + tptr = tptr->next; + } + } +} /* snmpTargetParamTable_remFromList */ + +void +snmpTargetParamTable_remove(struct targetParamTable_struct *entry) +{ + snmpTargetParamTable_remFromList(entry, &aPTable); +} + +/* + * lookup OID in the link list of Table Entries + */ +struct targetParamTable_struct * +search_snmpTargetParamsTable(oid * baseName, + size_t baseNameLen, + oid * name, size_t * length, int exact) +{ + static struct targetParamTable_struct *temp_struct; + int i; + size_t myOIDLen = 0; + oid newNum[128]; + + /* + * lookup entry in p / * Get Current MIB ID + */ + memcpy(newNum, baseName, baseNameLen * sizeof(oid)); + + for (temp_struct = aPTable; temp_struct != NULL; + temp_struct = temp_struct->next) { + for (i = 0; i < temp_struct->paramNameLen; i++) { + newNum[baseNameLen + i] = temp_struct->paramNameData[i]; + } + myOIDLen = baseNameLen + temp_struct->paramNameLen; + i = snmp_oid_compare(name, *length, newNum, myOIDLen); + /* + * Assumes that the linked list sorted by OID, low to high + */ + if ((i == 0 && exact != 0) || (i < 0 && exact == 0)) { + if (exact == 0) { + memcpy(name, newNum, myOIDLen * sizeof(oid)); + *length = myOIDLen; + } + return temp_struct; + } + } + return NULL; +} /* search_snmpTargetParamsTable */ + + +struct targetParamTable_struct * +get_paramEntry2(const char *name, size_t nameLen) +{ + static struct targetParamTable_struct *ptr; + for (ptr = aPTable; ptr; ptr = ptr->next) { + if (nameLen == ptr->paramNameLen && + memcmp(ptr->paramNameData, name, nameLen) == 0) { + return ptr; + } + } + return NULL; +} + + +/* + * initialization routines + */ + +void +init_snmpTargetParamsEntry_data(void) +{ + static int done = 0; + + if (++done != 1) + return; + + /* + * we need to be called back later + */ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + store_snmpTargetParamsEntry, NULL); + +} /* init_snmpTargetParmsEntry */ + + +/* + * shutdown routines + */ + +void +shutdown_snmpTargetParamsEntry_data(void) +{ + DEBUGMSGTL(("trap:targetParam:shutdown", "clearing %d object(s)\n", + _active)); + + while (aPTable) + snmpTargetParamTable_remFromList(aPTable, &aPTable); + + DEBUGMSGTL(("trap:targetParam:shutdown", "active count %d\n", _active)); + if (_active != 0) { + DEBUGMSGTL(("trap:targetParam:shutdown", + "unexpected count %d after cleanup!\n", _active)); + snmp_log(LOG_WARNING, "targetAddr count %d, not 0, after shutdown.\n", + _active); + } + +} + +/* + * store_snmpTargetParamsEntry handles the presistent storage proccess + * for this MIB table. It writes out all the non-volatile rows + * to permanent storage on a shutdown + */ +static int +store_snmpTargetParamsEntry(int majorID, int minorID, void *serverarg, + void *clientarg) +{ + struct targetParamTable_struct *curr_struct; + char line[1024]; + + strcpy(line, ""); + if ((curr_struct = aPTable) != NULL) { + while (curr_struct != NULL) { + if ((curr_struct->storageType == SNMP_STORAGE_NONVOLATILE || + curr_struct->storageType == SNMP_STORAGE_PERMANENT) + && + (curr_struct->rowStatus == SNMP_ROW_ACTIVE || + curr_struct->rowStatus == SNMP_ROW_NOTINSERVICE)) { + snprintf(line, sizeof(line), + "targetParams %s %i %i %s %i %i %i\n", + curr_struct->paramNameData, curr_struct->mpModel, + curr_struct->secModel, curr_struct->secNameData, + curr_struct->secLevel, curr_struct->storageType, + curr_struct->rowStatus); + line[ sizeof(line)-1 ] = 0; + + /* + * store to file + */ + snmpd_store_config(line); + } + curr_struct = curr_struct->next; + } + } + return SNMPERR_SUCCESS; +} /* store_snmpTargetParmsEntry */ + diff --git a/agent/mibgroup/target/snmpTargetParamsEntry_data.h b/agent/mibgroup/target/snmpTargetParamsEntry_data.h new file mode 100644 index 0000000..7d0f9c4 --- /dev/null +++ b/agent/mibgroup/target/snmpTargetParamsEntry_data.h @@ -0,0 +1,72 @@ +/* + * This file was created to separate notification data storage from + * the MIB implementation. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + +#ifndef _MIBGROUP_SNMPTARGETPARAMSENTRY_DATA_H +#define _MIBGROUP_SNMPTARGETPARAMSENTRY_DATA_H + +/* + * Magic number definitions: + */ +#define SNMPTARGETPARAMSMPMODEL 1 +#define SNMPTARGETPARAMSSECURITYMODEL 2 +#define SNMPTARGETPARAMSSECURITYNAME 3 +#define SNMPTARGETPARAMSSECURITYLEVEL 4 +#define SNMPTARGETPARAMSSTORAGETYPE 5 +#define SNMPTARGETPARAMSROWSTATUS 6 +#define SNMPTARGETPARAMSMPMODELCOLUMN 2 +#define SNMPTARGETPARAMSSECURITYMODELCOLUMN 3 +#define SNMPTARGETPARAMSSECURITYNAMECOLUMN 4 +#define SNMPTARGETPARAMSSECURITYLEVELCOLUMN 5 +#define SNMPTARGETPARAMSSTORAGETYPECOLUMN 6 +#define SNMPTARGETPARAMSROWSTATUSCOLUMN 7 + +/* + * structure definitions + */ +struct targetParamTable_struct { + char *paramNameData; + size_t paramNameLen; + int mpModel; + int secModel; + char *secNameData; + size_t secNameLen; + int secLevel; + int storageType; + int rowStatus; + struct targetParamTable_struct *next; + time_t updateTime; +}; + +/* + * utility functions + */ +struct targetParamTable_struct *get_paramEntry2(const char *name, + size_t nameLen); + +void snmpTargetParamTable_add(struct targetParamTable_struct *newEntry); +void snmpTargetParamTable_remove(struct targetParamTable_struct *entry); +struct targetParamTable_struct *search_snmpTargetParamsTable(oid * baseName, + size_t nameLen, + oid * name, + size_t * length, + int exact); + +struct targetParamTable_struct *snmpTargetParamTable_create(void); + +void snmpTargetParamTable_dispose(struct targetParamTable_struct *); + +/* + * function definitions + */ + +void init_snmpTargetParamsEntry_data(void); +void shutdown_snmpTargetParamsEntry_data(void); + +#endif /* _MIBGROUP_SNMPTARGETPARAMSENTRY_DATA_H */ diff --git a/agent/mibgroup/target/target.c b/agent/mibgroup/target/target.c index 5619e35..239b35a 100644 --- a/agent/mibgroup/target/target.c +++ b/agent/mibgroup/target/target.c @@ -1,7 +1,13 @@ +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -26,9 +32,9 @@ #include "snmpTargetParamsEntry.h" #include "target.h" -netsnmp_feature_require(tdomain_support) -netsnmp_feature_require(tdomain_transport_oid) -netsnmp_feature_want(netsnmp_tlstmAddr_get_serverId) +netsnmp_feature_require(tdomain_support); +netsnmp_feature_require(tdomain_transport_oid); +netsnmp_feature_want(netsnmp_tlstmAddr_get_serverId); #define MAX_TAGS 128 @@ -60,8 +66,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, /* * legal row? */ - if (targaddrs->tDomain == NULL || - targaddrs->tAddress == NULL || + if (targaddrs->tAddress == NULL || targaddrs->rowStatus != SNMP_ROW_ACTIVE) { DEBUGMSGTL(("target_sessions", " which is not ready yet\n")); continue; @@ -77,13 +82,13 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, /* * check tag list to see if we match */ - if (targaddrs->tagList) { + if (targaddrs->tagListData) { int matched = 0; /* * loop through tag list looking for requested tags */ - for (cp = targaddrs->tagList; cp && !matched;) { + for (cp = targaddrs->tagListData; cp && !matched;) { cp = copy_nword(cp, buf, sizeof(buf)); for (i = 0; i < numtags && !matched; i++) { if (strcmp(buf, tags[i]) == 0) { @@ -93,8 +98,9 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, DEBUGMSGTL(("target_sessions", "found one: %s\n", tags[i])); - if (targaddrs->params) { - param = get_paramEntry(targaddrs->params); + if (targaddrs->paramsData) { + param = get_paramEntry2(targaddrs->paramsData, + targaddrs->paramsLen); if (!param || param->rowStatus != SNMP_ROW_ACTIVE) { /* @@ -198,14 +204,15 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, netsnmp_cert *cert; char *server_id = NULL; char buf[33]; + int len; DEBUGMSGTL(("target_sessions", " looking up our id: %s\n", - targaddrs->params)); + targaddrs->paramsData)); cert = netsnmp_cert_find(NS_CERT_IDENTITY, NS_CERTKEY_TARGET_PARAM, - targaddrs->params); + targaddrs->paramsData); netsnmp_assert(t->f_config); if (cert) { DEBUGMSGTL(("target_sessions", @@ -214,9 +221,10 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, t->f_config(t, "localCert", cert->fingerprint); } - memcpy(buf, targaddrs->nameData, - targaddrs->nameLen); - buf[targaddrs->nameLen] = '\0'; + len = targaddrs->nameLen >= sizeof(buf) ? + sizeof(buf) - 1 : targaddrs->nameLen; + memcpy(buf, targaddrs->nameData, len); + buf[len] = '\0'; DEBUGMSGTL(("target_sessions", " looking up their id: %s\n", buf)); @@ -242,7 +250,7 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, } } #endif - memset(&thissess, 0, sizeof(thissess)); + snmp_sess_init(&thissess); thissess.timeout = (targaddrs->timeout) * 10000; thissess.retries = targaddrs->retryCount; DEBUGMSGTL(("target_sessions", @@ -263,20 +271,23 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, netsnmp_transport_free(t); continue; } - thissess.paramName = strdup(param->paramName); + thissess.paramName = + netsnmp_memdup_nt(param->paramNameData, + param->paramNameLen, NULL); thissess.version = param->mpModel; if (param->mpModel == SNMP_VERSION_3) { - thissess.securityName = strdup(param->secName); - thissess.securityNameLen = - strlen(thissess.securityName); + thissess.securityName = + netsnmp_memdup_nt(param->secNameData, + param->secNameLen, + &thissess.securityNameLen); thissess.securityLevel = param->secLevel; thissess.securityModel = param->secModel; #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) } else { thissess.community = - (u_char *) strdup(param->secName); - thissess.community_len = - strlen((char *) thissess.community); + netsnmp_memdup_nt(param->secNameData, + param->secNameLen, + &thissess.community_len); #endif } @@ -289,7 +300,9 @@ get_target_sessions(char *taglist, TargetFilterFunction * filterfunct, if (targaddrs->sess) { if (NULL == targaddrs->sess->paramName) targaddrs->sess->paramName = - strdup(param->paramName); + netsnmp_memdup_nt(param->paramNameData, + param->paramNameLen, + NULL); targaddrs->sess->next = ret; ret = targaddrs->sess; diff --git a/agent/mibgroup/target/target.h b/agent/mibgroup/target/target.h index a528b23..994eea6 100644 --- a/agent/mibgroup/target/target.h +++ b/agent/mibgroup/target/target.h @@ -1,3 +1,9 @@ +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #ifndef SNMP_TARGET_H #define SNMP_TARGET_H @@ -19,6 +25,7 @@ typedef int (TargetFilterFunction) (struct targetAddrTable_struct * netsnmp_session *get_target_sessions(char *taglist, TargetFilterFunction *, void *filterArg); -config_require(target/snmpTargetAddrEntry target/snmpTargetParamsEntry) +config_require(target/snmpTargetAddrEntry_data); +config_require(target/snmpTargetParamsEntry_data); #endif /* SNMP_TARGET_H */ diff --git a/agent/mibgroup/target/target_counters.c b/agent/mibgroup/target/target_counters.c index 0109974..7c48052 100644 --- a/agent/mibgroup/target/target_counters.c +++ b/agent/mibgroup/target/target_counters.c @@ -1,6 +1,8 @@ #include -#if HAVE_STRING_H +#include + +#ifdef HAVE_STRING_H #include #else #include @@ -10,72 +12,20 @@ #include #include "target_counters.h" -#include + +#include + +netsnmp_feature_require(helper_statistics); void init_target_counters(void) { - const oid unavailable_context_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1, 4 }; - const oid unknown_context_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1, 5 }; + oid target_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1 }; DEBUGMSGTL(("target_counters", "initializing\n")); - /* - * unknown contexts - */ - - netsnmp_register_scalar( - netsnmp_create_handler_registration("snmpUnknownContexts", - get_unknown_context_count, - unknown_context_oid, - OID_LENGTH(unknown_context_oid), - HANDLER_CAN_RONLY)); - - /* - * unavailable contexts - */ - - netsnmp_register_scalar( - netsnmp_create_handler_registration("snmpUnavailableContexts", - get_unavailable_context_count, - unavailable_context_oid, - OID_LENGTH(unavailable_context_oid), - HANDLER_CAN_RONLY)); - -} - - -int -get_unknown_context_count(netsnmp_mib_handler *handler, - netsnmp_handler_registration *reginfo, - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests) -{ - /* - * we're only called for GETs of the right node, so this is easy: - */ - - u_long long_ret = - snmp_get_statistic(STAT_SNMPUNKNOWNCONTEXTS); - snmp_set_var_typed_value(requests->requestvb, ASN_COUNTER, - (u_char *) & long_ret, sizeof(long_ret)); - return SNMP_ERR_NOERROR; -} - - -int -get_unavailable_context_count(netsnmp_mib_handler *handler, - netsnmp_handler_registration *reginfo, - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests) -{ - /* - * we're only called for GETs of the right node, so this is easy: - */ - - u_long long_ret = - snmp_get_statistic(STAT_SNMPUNAVAILABLECONTEXTS); - snmp_set_var_typed_value(requests->requestvb, ASN_COUNTER, - (u_char *) & long_ret, sizeof(long_ret)); - return SNMP_ERR_NOERROR; + NETSNMP_REGISTER_STATISTIC_HANDLER( + netsnmp_create_handler_registration( + "target_counters", NULL, target_oid, OID_LENGTH(target_oid), + HANDLER_CAN_RONLY), 4, TARGET); } diff --git a/agent/mibgroup/target/target_counters.h b/agent/mibgroup/target/target_counters.h index 355f391..41185b2 100644 --- a/agent/mibgroup/target/target_counters.h +++ b/agent/mibgroup/target/target_counters.h @@ -1,10 +1 @@ -/* - * testhandler.h - */ - -config_exclude(target/target_counters) - void init_target_counters(void); - -Netsnmp_Node_Handler get_unavailable_context_count; -Netsnmp_Node_Handler get_unknown_context_count; diff --git a/agent/mibgroup/target/target_counters_5_5.c b/agent/mibgroup/target/target_counters_5_5.c deleted file mode 100644 index a32207b..0000000 --- a/agent/mibgroup/target/target_counters_5_5.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#include - -#if HAVE_STRING_H -#include -#else -#include -#endif - -#include -#include - -#include "target_counters_5_5.h" - -#include - -netsnmp_feature_require(helper_statistics) - -void -init_target_counters_5_5(void) -{ - oid target_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1 }; - - DEBUGMSGTL(("target_counters", "initializing\n")); - - NETSNMP_REGISTER_STATISTIC_HANDLER( - netsnmp_create_handler_registration( - "target_counters", NULL, target_oid, OID_LENGTH(target_oid), - HANDLER_CAN_RONLY), 4, TARGET); -} diff --git a/agent/mibgroup/target/target_counters_5_5.h b/agent/mibgroup/target/target_counters_5_5.h deleted file mode 100644 index 4960bf1..0000000 --- a/agent/mibgroup/target/target_counters_5_5.h +++ /dev/null @@ -1,3 +0,0 @@ -config_exclude(target/target_counters) - -void init_target_counters_5_5(void); diff --git a/agent/mibgroup/tcp-mib.h b/agent/mibgroup/tcp-mib.h index 866d1b4..ed94ce5 100644 --- a/agent/mibgroup/tcp-mib.h +++ b/agent/mibgroup/tcp-mib.h @@ -2,6 +2,6 @@ * module to include the modules */ /*config_require(tcp-mib/tcpConnTable)*/ -config_require(tcp-mib/tcpConnectionTable) -config_require(tcp-mib/tcpListenerTable) -config_add_mib(TCP-MIB) +config_require(tcp-mib/tcpConnectionTable); +config_require(tcp-mib/tcpListenerTable); +config_add_mib(TCP-MIB); diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn.h b/agent/mibgroup/tcp-mib/data_access/tcpConn.h index 0c13a0f..18c7018 100644 --- a/agent/mibgroup/tcp-mib/data_access/tcpConn.h +++ b/agent/mibgroup/tcp-mib/data_access/tcpConn.h @@ -17,19 +17,19 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(tcp-mib/data_access/tcpConn_common) +config_require(tcp-mib/data_access/tcpConn_common); #if defined( linux ) -config_require(tcp-mib/data_access/tcpConn_linux) -config_require(util_funcs/get_pid_from_inode) +config_require(tcp-mib/data_access/tcpConn_linux); +config_require(util_funcs/get_pid_from_inode); #elif defined( solaris2 ) -config_require(tcp-mib/data_access/tcpConn_solaris2) +config_require(tcp-mib/data_access/tcpConn_solaris2); #elif defined(freebsd4) || defined(dragonfly) || defined(darwin) -config_require(tcp-mib/data_access/tcpConn_freebsd4) +config_require(tcp-mib/data_access/tcpConn_freebsd4); #elif defined(openbsd4) -config_require(tcp-mib/data_access/tcpConn_openbsd) +config_require(tcp-mib/data_access/tcpConn_openbsd); #elif defined(netbsd1) -config_require(tcp-mib/data_access/tcpConn_netbsd) +config_require(tcp-mib/data_access/tcpConn_netbsd); #else -config_require(tcp-mib/data_access/tcpConn_unsup) +config_require(tcp-mib/data_access/tcpConn_unsup); #endif diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c index bba01fe..19b6680 100644 --- a/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c +++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_common.c @@ -19,26 +19,6 @@ static void _access_tcpconn_entry_release(netsnmp_tcpconn_entry * entry, void *unused); -/**---------------------------------------------------------------------*/ -/* - * external per-architecture functions prototypes - * - * These shouldn't be called by the general public, so they aren't in - * the header file. - */ -extern int -netsnmp_arch_tcpconn_container_load(netsnmp_container* container, - u_int load_flags); -extern int -netsnmp_arch_tcpconn_entry_init(netsnmp_tcpconn_entry *entry); -extern int -netsnmp_arch_tcpconn_entry_copy(netsnmp_tcpconn_entry *lhs, - netsnmp_tcpconn_entry *rhs); -extern void -netsnmp_arch_tcpconn_entry_cleanup(netsnmp_tcpconn_entry *entry); - - - /**---------------------------------------------------------------------*/ /* * container functions diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c index fed1e84..89e4f5c 100644 --- a/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c +++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c @@ -12,16 +12,16 @@ #include "mibII/mibII_common.h" -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_TCPIP_H +#ifdef HAVE_NETINET_TCPIP_H #include #endif -#if HAVE_NETINET_TCP_VAR_H +#ifdef HAVE_NETINET_TCP_VAR_H #include #endif @@ -120,6 +120,7 @@ _load(netsnmp_container *container, u_int load_flags) #if defined(dragonfly) struct xinpcb *xig = NULL; int StateMap[] = { 1, 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; + int i, count; #else struct xinpgen *xig = NULL; int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; @@ -146,13 +147,14 @@ _load(netsnmp_container *container, u_int load_flags) */ #if defined(dragonfly) xig = (struct xinpcb *) tcpcb_buf; + count = len/sizeof(NS_ELEM); #else xig = (struct xinpgen *) tcpcb_buf; xig = (struct xinpgen *) ((char *) xig + xig->xig_len); #endif #if defined(dragonfly) - while (xig && (xig->xi_len > sizeof(struct xinpcb))) + for (i = 0; i < count; i++) #else while (xig && (xig->xig_len > sizeof(struct xinpgen))) #endif @@ -163,7 +165,11 @@ _load(netsnmp_container *container, u_int load_flags) #else xig = (struct xinpgen *) ((char *) xig + xig->xig_len); #endif +#if __FreeBSD_version >= 1200026 + state = StateMap[pcb.t_state]; +#else state = StateMap[pcb.xt_tp.t_state]; +#endif if (load_flags) { if (state == TCPCONNECTIONSTATE_LISTEN) { @@ -181,7 +187,11 @@ _load(netsnmp_container *container, u_int load_flags) } #if !defined(NETSNMP_ENABLE_IPV6) +#ifdef INP_ISIPV6 + if (INP_ISIPV6(&pcb.xt_inp)) +#else if (pcb.xt_inp.inp_vflag & INP_IPV6) +#endif continue; #endif @@ -198,7 +208,11 @@ _load(netsnmp_container *container, u_int load_flags) entry->pid = 0; /** the addr string may need work */ +#ifdef INP_ISIPV6 + if (INP_ISIPV6(&pcb.xt_inp)) { +#else if (pcb.xt_inp.inp_vflag & INP_IPV6) { +#endif entry->loc_addr_len = entry->rmt_addr_len = 16; memcpy(entry->loc_addr, &pcb.xt_inp.in6p_laddr, 16); memcpy(entry->rmt_addr, &pcb.xt_inp.in6p_faddr, 16); @@ -216,6 +230,8 @@ _load(netsnmp_container *container, u_int load_flags) CONTAINER_INSERT(container, entry); } + free(tcpcb_buf); + if(rc<0) return rc; diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c index 5f93be0..6954f7b 100644 --- a/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c +++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c @@ -121,6 +121,8 @@ _load4(netsnmp_container *container, u_int load_flags) int rc = 0; FILE *in; char line[160]; + enum { rbufsize = 65536 }; + void *rbuf = alloca(rbufsize); netsnmp_assert(NULL != container); @@ -130,7 +132,8 @@ _load4(netsnmp_container *container, u_int load_flags) return -2; } - fgets(line, sizeof(line), in); /* skip header */ + setvbuf(in, rbuf, _IOFBF, rbufsize); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), in)); /* skip header */ /* * sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode @@ -239,7 +242,9 @@ _load4(netsnmp_container *container, u_int load_flags) * add entry to container */ entry->arbitrary_index = CONTAINER_SIZE(container) + 1; - CONTAINER_INSERT(container, entry); + if (CONTAINER_INSERT(container, entry) < 0) { + netsnmp_access_tcpconn_entry_free(entry); + } } fclose(in); @@ -262,6 +267,8 @@ _load6(netsnmp_container *container, u_int load_flags) int rc = 0; FILE *in; char line[360]; + enum { rbufsize = 65536 }; + void *rbuf = alloca(rbufsize); netsnmp_assert(NULL != container); @@ -272,7 +279,8 @@ _load6(netsnmp_container *container, u_int load_flags) return -2; } - fgets(line, sizeof(line), in); /* skip header */ + setvbuf(in, rbuf, _IOFBF, rbufsize); + NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), in)); /* skip header */ /* * Note: PPC (big endian) @@ -383,7 +391,9 @@ _load6(netsnmp_container *container, u_int load_flags) * add entry to container */ entry->arbitrary_index = CONTAINER_SIZE(container) + 1; - CONTAINER_INSERT(container, entry); + if (CONTAINER_INSERT(container, entry) < 0) { + netsnmp_access_tcpconn_entry_free(entry); + } } fclose(in); diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c index b4229ff..9a80192 100644 --- a/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c +++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_netbsd.c @@ -12,16 +12,16 @@ #include "mibII/mibII_common.h" -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_TCPIP_H +#ifdef HAVE_NETINET_TCPIP_H #include #endif -#if HAVE_NETINET_TCP_VAR_H +#ifdef HAVE_NETINET_TCP_VAR_H #include #endif diff --git a/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c b/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c index 001064f..56e2c3d 100644 --- a/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c +++ b/agent/mibgroup/tcp-mib/data_access/tcpConn_openbsd.c @@ -13,20 +13,38 @@ #include "mibII/mibII_common.h" -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_TCPIP_H +#ifdef HAVE_NETINET_TCPIP_H #include #endif -#if HAVE_NETINET_TCP_VAR_H +#ifdef HAVE_NETINET_TCP_VAR_H #include #endif +#ifdef HAVE_KVM_GETFILES +#if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) +#undef HAVE_KVM_GETFILES +#endif +#endif + +#ifdef HAVE_KVM_GETFILES +#include +#include +#define _KERNEL /* for DTYPE_SOCKET */ +#include +#undef _KERNEL +#endif + +#ifdef HAVE_KVM_GETFILES +static int _kvmload(netsnmp_container *container, u_int flags); +#else static int _load(netsnmp_container *container, u_int flags); +#endif /* * initialize arch specific storage @@ -96,11 +114,100 @@ netsnmp_arch_tcpconn_container_load(netsnmp_container *container, return -1; } +#ifdef HAVE_KVM_GETFILES + rc = _kvmload(container, load_flags); +#else rc = _load(container, load_flags); +#endif return rc; } +#ifdef HAVE_KVM_GETFILES +/** + * + * @retval 0 no errors + * @retval !0 errors + */ +static int +_kvmload(netsnmp_container *container, u_int load_flags) +{ + int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; + netsnmp_tcpconn_entry *entry; + struct kinfo_file *kf; + int count; + int state; + int rc = 0; + + kf = kvm_getfiles(kd, KERN_FILE_BYFILE, DTYPE_SOCKET, sizeof(struct kinfo_file), &count); + + while (count--) { + if (kf->so_protocol != IPPROTO_TCP) + goto skip; + + state = StateMap[kf->t_state]; + + if (load_flags) { + if (state == TCPCONNECTIONSTATE_LISTEN) { + if (load_flags & NETSNMP_ACCESS_TCPCONN_LOAD_NOLISTEN) { + DEBUGMSGT(("verbose:access:tcpconn:container", + " skipping listen\n")); + goto skip; + } + } + else if (load_flags & NETSNMP_ACCESS_TCPCONN_LOAD_ONLYLISTEN) { + DEBUGMSGT(("verbose:access:tcpconn:container", + " skipping non-listen\n")); + goto skip; + } + } + +#if !defined(NETSNMP_ENABLE_IPV6) + if (kf->so_family == AF_INET6) + goto skip; +#endif + + entry = netsnmp_access_tcpconn_entry_create(); + if(NULL == entry) { + rc = -3; + break; + } + + /** oddly enough, these appear to already be in network order */ + entry->loc_port = ntohs(kf->inp_lport); + entry->rmt_port = ntohs(kf->inp_fport); + entry->tcpConnState = StateMap[kf->t_state]; + entry->pid = kf->p_pid; + + /** the addr string may need work */ + if (kf->so_family == AF_INET6) { + entry->loc_addr_len = entry->rmt_addr_len = 16; + memcpy(entry->loc_addr, &kf->inp_laddru, 16); + memcpy(entry->rmt_addr, &kf->inp_faddru, 16); + } + else { + entry->loc_addr_len = entry->rmt_addr_len = 4; + memcpy(entry->loc_addr, &kf->inp_laddru, 4); + memcpy(entry->rmt_addr, &kf->inp_faddru, 4); + } + DEBUGMSGTL(("tcp-mib/data_access", "tcp %d %d %d\n", + entry->loc_addr_len, entry->loc_port, entry->rmt_port)); + + /* + * add entry to container + */ + entry->arbitrary_index = CONTAINER_SIZE(container) + 1; + CONTAINER_INSERT(container, entry); +skip: + kf++; + } + + if (rc < 0) + return rc; + return 0; +} + +#else /* HAVE_KVM_GETFILES */ /** * @@ -111,8 +218,8 @@ static int _load(netsnmp_container *container, u_int load_flags) { struct inpcbtable table; - struct inpcb *head, *next, *prev; - struct inpcb inpcb; + struct inpcb *next, *prev; + struct inpcb inpcb, previnpcb; struct tcpcb tcpcb; int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 }; netsnmp_tcpconn_entry *entry; @@ -127,21 +234,28 @@ _load(netsnmp_container *container, u_int load_flags) return -1; } - prev = (struct inpcb *)&CIRCLEQ_FIRST(&table.inpt_queue); + next = (struct inpcb *)&TAILQ_FIRST(&table.inpt_queue); prev = NULL; - head = next = CIRCLEQ_FIRST(&table.inpt_queue); while (next) { if (!NETSNMP_KLOOKUP(next, (char *)&inpcb, sizeof(inpcb))) { DEBUGMSGTL(("tcp-mib/data_access/tcpConn", "klookup inpcb failed\n")); break; } - if (prev && CIRCLEQ_PREV(&inpcb, inp_queue) != prev) { - snmp_log(LOG_ERR,"tcbtable link error\n"); - break; + if (prev != NULL) { + if (!NETSNMP_KLOOKUP(prev, (char *)&previnpcb, + sizeof(previnpcb))) { + DEBUGMSGTL(("tcp-mib/data_access/tcpConn", + "klookup previnpcb failed\n")); + break; + } + if (TAILQ_NEXT(&previnpcb, inp_queue) != next) { + snmp_log(LOG_ERR,"tcbtable link error\n"); + break; + } } prev = next; - next = CIRCLEQ_NEXT(&inpcb, inp_queue); + next = TAILQ_NEXT(&inpcb, inp_queue); if (!NETSNMP_KLOOKUP(inpcb.inp_ppcb, (char *)&tcpcb, sizeof(tcpcb))) { DEBUGMSGTL(("tcp-mib/data_access/tcpConn", "klookup tcpcb failed\n")); break; @@ -153,19 +267,19 @@ _load(netsnmp_container *container, u_int load_flags) if (load_flags & NETSNMP_ACCESS_TCPCONN_LOAD_NOLISTEN) { DEBUGMSGT(("verbose:access:tcpconn:container", " skipping listen\n")); - goto skip; + continue; } } else if (load_flags & NETSNMP_ACCESS_TCPCONN_LOAD_ONLYLISTEN) { DEBUGMSGT(("verbose:access:tcpconn:container", " skipping non-listen\n")); - goto skip; + continue; } } #if !defined(NETSNMP_ENABLE_IPV6) if (inpcb.inp_flags & INP_IPV6) - goto skip; + continue; #endif entry = netsnmp_access_tcpconn_entry_create(); @@ -199,9 +313,6 @@ _load(netsnmp_container *container, u_int load_flags) */ entry->arbitrary_index = CONTAINER_SIZE(container) + 1; CONTAINER_INSERT(container, entry); -skip: - if (head == next) - break; } if(rc<0) @@ -209,3 +320,4 @@ _load(netsnmp_container *container, u_int load_flags) return 0; } +#endif /* HAVE_KVM_GETFILES */ diff --git a/agent/mibgroup/tcp-mib/tcpConnTable.h b/agent/mibgroup/tcp-mib/tcpConnTable.h index f588c1c..da7af70 100644 --- a/agent/mibgroup/tcp-mib/tcpConnTable.h +++ b/agent/mibgroup/tcp-mib/tcpConnTable.h @@ -2,7 +2,7 @@ * module to include the modules */ -config_require(tcp-mib/data_access/tcpConn) -config_require(tcp-mib/tcpConnTable/tcpConnTable) -config_require(tcp-mib/tcpConnTable/tcpConnTable_interface) -config_require(tcp-mib/tcpConnTable/tcpConnTable_data_access) +config_require(tcp-mib/data_access/tcpConn); +config_require(tcp-mib/tcpConnTable/tcpConnTable); +config_require(tcp-mib/tcpConnTable/tcpConnTable_interface); +config_require(tcp-mib/tcpConnTable/tcpConnTable_data_access); diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable.h b/agent/mibgroup/tcp-mib/tcpConnectionTable.h index c697aaa..9de6c0f 100644 --- a/agent/mibgroup/tcp-mib/tcpConnectionTable.h +++ b/agent/mibgroup/tcp-mib/tcpConnectionTable.h @@ -2,5 +2,5 @@ * module to include the modules */ -config_require(tcp-mib/data_access/tcpConn) -config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable) +config_require(tcp-mib/data_access/tcpConn); +config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable); diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c index c999a0e..c2c288f 100644 --- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c +++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c @@ -345,9 +345,8 @@ tcpConnectionTable_indexes_set_tbl_idx(tcpConnectionTable_mib_index * /* * make sure there is enough space for tcpConnectionLocalAddress data */ - if ((NULL == tbl_idx->tcpConnectionLocalAddress) || - (tbl_idx->tcpConnectionLocalAddress_len < - (tcpConnectionLocalAddress_val_ptr_len))) { + if (tbl_idx->tcpConnectionLocalAddress_len < + tcpConnectionLocalAddress_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } @@ -378,9 +377,8 @@ tcpConnectionTable_indexes_set_tbl_idx(tcpConnectionTable_mib_index * /* * make sure there is enough space for tcpConnectionRemAddress data */ - if ((NULL == tbl_idx->tcpConnectionRemAddress) || - (tbl_idx->tcpConnectionRemAddress_len < - (tcpConnectionRemAddress_val_ptr_len))) { + if (tbl_idx->tcpConnectionRemAddress_len < + tcpConnectionRemAddress_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h index 17d3105..5464e67 100644 --- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h +++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.h @@ -23,9 +23,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(tcp-mib/data_access/tcpConn) -config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_interface) -config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access) +config_require(tcp-mib/data_access/tcpConn); +config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_interface); +config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c index dfb9649..9db7951 100644 --- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c +++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c @@ -227,7 +227,7 @@ _add_connection(netsnmp_tcpconn_entry *entry, netsnmp_container *container) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c index d0b27e5..4e373a9 100644 --- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c +++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_interface.c @@ -47,17 +47,17 @@ #include -netsnmp_feature_child_of(tcpConnectionTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(tcpConnectionTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(tcpConnectionTable_container_size, tcpConnectionTable_external_access) -netsnmp_feature_child_of(tcpConnectionTable_registration_set, tcpConnectionTable_external_access) -netsnmp_feature_child_of(tcpConnectionTable_registration_get, tcpConnectionTable_external_access) -netsnmp_feature_child_of(tcpConnectionTable_container_get, tcpConnectionTable_external_access) +netsnmp_feature_child_of(tcpConnectionTable_container_size, tcpConnectionTable_external_access); +netsnmp_feature_child_of(tcpConnectionTable_registration_set, tcpConnectionTable_external_access); +netsnmp_feature_child_of(tcpConnectionTable_registration_get, tcpConnectionTable_external_access); +netsnmp_feature_child_of(tcpConnectionTable_container_get, tcpConnectionTable_external_access); /********************************************************************** ********************************************************************** @@ -291,10 +291,12 @@ _tcpConnectionTable_initialize_interface(tcpConnectionTable_registration * netsnmp_handler_registration_create("tcpConnectionTable", handler, tcpConnectionTable_oid, tcpConnectionTable_oid_size, - HANDLER_CAN_BABY_STEP + HANDLER_CAN_BABY_STEP | #if !(defined(NETSNMP_NO_WRITE_SUPPORT) || defined(NETSNMP_DISABLE_SET_SUPPORT)) - | HANDLER_CAN_RWRITE -#endif + HANDLER_CAN_RWRITE +#else + HANDLER_CAN_RONLY +#endif /* NETSNMP_NO_WRITE_SUPPORT || NETSNMP_DISABLE_SET_SUPPORT */ ); if (NULL == reginfo) { snmp_log(LOG_ERR, "error registering table tcpConnectionTable\n"); @@ -993,7 +995,7 @@ _mfd_tcpConnectionTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable.h b/agent/mibgroup/tcp-mib/tcpListenerTable.h index 7024f79..8336221 100644 --- a/agent/mibgroup/tcp-mib/tcpListenerTable.h +++ b/agent/mibgroup/tcp-mib/tcpListenerTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(tcp-mib/tcpListenerTable/tcpListenerTable) +config_require(tcp-mib/tcpListenerTable/tcpListenerTable); diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c index ebd672b..06b31eb 100644 --- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c +++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c @@ -314,9 +314,8 @@ tcpListenerTable_indexes_set_tbl_idx(tcpListenerTable_mib_index * tbl_idx, /* * make sure there is enough space for tcpListenerLocalAddress data */ - if ((NULL == tbl_idx->tcpListenerLocalAddress) || - (tbl_idx->tcpListenerLocalAddress_len < - (tcpListenerLocalAddress_val_ptr_len))) { + if (tbl_idx->tcpListenerLocalAddress_len < + tcpListenerLocalAddress_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h index 08a741a..fecd46c 100644 --- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h +++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.h @@ -23,9 +23,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(tcp-mib/data_access/tcpConn) -config_require(tcp-mib/tcpListenerTable/tcpListenerTable_interface) -config_require(tcp-mib/tcpListenerTable/tcpListenerTable_data_access) +config_require(tcp-mib/data_access/tcpConn); +config_require(tcp-mib/tcpListenerTable/tcpListenerTable_interface); +config_require(tcp-mib/tcpListenerTable/tcpListenerTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c index 4aa14ff..830acf5 100644 --- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c +++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c @@ -178,23 +178,23 @@ _add_connection(netsnmp_tcpconn_entry *entry, netsnmp_container *container) * the container */ rowreq_ctx = tcpListenerTable_allocate_rowreq_ctx(entry, NULL); - if ((NULL != rowreq_ctx) && - (MFD_SUCCESS == tcpListenerTable_indexes_set(rowreq_ctx, - entry->loc_addr_len, - (char *) entry->loc_addr, - entry->loc_addr_len, - entry->loc_port))) { - CONTAINER_INSERT(container, rowreq_ctx); - } else { - if (rowreq_ctx) { - snmp_log(LOG_ERR, "error setting index while loading " - "tcpListenerTable cache.\n"); - tcpListenerTable_release_rowreq_ctx(rowreq_ctx); - } else { - snmp_log(LOG_ERR, "memory allocation failed while loading " - "tcpListenerTable cache.\n"); - netsnmp_access_tcpconn_entry_free(entry); - } + if (!rowreq_ctx) { + snmp_log(LOG_ERR, + "memory allocation failed while loading tcpListenerTable cache.\n"); + netsnmp_access_tcpconn_entry_free(entry); + return; + } + if (tcpListenerTable_indexes_set(rowreq_ctx, entry->loc_addr_len, + (char *)entry->loc_addr, entry->loc_addr_len, entry->loc_port) != + MFD_SUCCESS) { + snmp_log(LOG_ERR, + "error setting index while loading tcpListenerTable cache.\n"); + tcpListenerTable_release_rowreq_ctx(rowreq_ctx); + return; + } + if (CONTAINER_INSERT(container, rowreq_ctx) < 0) { + snmp_log(LOG_ERR, "tcpListenerTable insert failed.\n"); + tcpListenerTable_release_rowreq_ctx(rowreq_ctx); } } @@ -219,7 +219,7 @@ _add_connection(netsnmp_tcpconn_entry *entry, netsnmp_container *container) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c index 2e41380..eaf6c2a 100644 --- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c +++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_interface.c @@ -47,17 +47,17 @@ #include -netsnmp_feature_child_of(tcpListenerTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(tcpListenerTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(tcpListenerTable_container_size, tcpListenerTable_external_access) -netsnmp_feature_child_of(tcpListenerTable_registration_set, tcpListenerTable_external_access) -netsnmp_feature_child_of(tcpListenerTable_registration_get, tcpListenerTable_external_access) -netsnmp_feature_child_of(tcpListenerTable_container_get, tcpListenerTable_external_access) +netsnmp_feature_child_of(tcpListenerTable_container_size, tcpListenerTable_external_access); +netsnmp_feature_child_of(tcpListenerTable_registration_set, tcpListenerTable_external_access); +netsnmp_feature_child_of(tcpListenerTable_registration_get, tcpListenerTable_external_access); +netsnmp_feature_child_of(tcpListenerTable_container_get, tcpListenerTable_external_access); /********************************************************************** ********************************************************************** @@ -800,7 +800,7 @@ _mfd_tcpListenerTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/testhandler.c b/agent/mibgroup/testhandler.c index f7468f0..6d97ed7 100644 --- a/agent/mibgroup/testhandler.c +++ b/agent/mibgroup/testhandler.c @@ -4,16 +4,16 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -netsnmp_feature_require(ulong_instance) -netsnmp_feature_require(register_read_only_table_data) -netsnmp_feature_require(table_build_result) -netsnmp_feature_require(table_dataset) +netsnmp_feature_require(ulong_instance); +netsnmp_feature_require(register_read_only_table_data); +netsnmp_feature_require(table_build_result); +netsnmp_feature_require(table_dataset); #include #include @@ -29,10 +29,20 @@ static oid my_test_oid[4] = { 1, 2, 3, 4 }; static oid my_table_oid[4] = { 1, 2, 3, 5 }; static oid my_instance_oid[5] = { 1, 2, 3, 6, 1 }; static oid my_data_table_oid[4] = { 1, 2, 3, 7 }; -static oid my_data_table_set_oid[4] = { 1, 2, 3, 8 }; static oid my_data_ulong_instance[4] = { 1, 2, 3, 9 }; -u_long my_ulong = 0; +static netsnmp_handler_registration *ro_scalar_h, *rw_scalar_h, *table_h; +static netsnmp_handler_registration *my_test, *table_h; +static netsnmp_table_registration_info *table_info1; +static netsnmp_table_registration_info *table_info2; +static netsnmp_table_data *table; + +static u_long my_ulong = 0; + +static Netsnmp_Node_Handler my_test_handler; +static Netsnmp_Node_Handler my_test_table_handler; +static Netsnmp_Node_Handler my_data_table_handler; +static Netsnmp_Node_Handler my_test_instance_handler; void init_testhandler(void) @@ -40,11 +50,7 @@ init_testhandler(void) /* * we're registering at .1.2.3.4 */ - netsnmp_handler_registration *my_test; - netsnmp_table_registration_info *table_info; u_long ind1; - netsnmp_table_data *table; - netsnmp_table_data_set *table_set; netsnmp_table_row *row; DEBUGMSGTL(("testhandler", "initializing\n")); @@ -52,17 +58,16 @@ init_testhandler(void) /* * basic handler test */ - netsnmp_register_handler(netsnmp_create_handler_registration - ("myTest", my_test_handler, my_test_oid, 4, - HANDLER_CAN_RONLY)); + ro_scalar_h = netsnmp_create_handler_registration("myTest", my_test_handler, + my_test_oid, 4, HANDLER_CAN_RONLY); + netsnmp_register_handler(ro_scalar_h); /* * instance handler test */ - - netsnmp_register_instance(netsnmp_create_handler_registration - ("myInstance", my_test_instance_handler, - my_instance_oid, 5, HANDLER_CAN_RWRITE)); + rw_scalar_h = netsnmp_create_handler_registration("myInstance", + my_test_instance_handler, my_instance_oid, 5, HANDLER_CAN_RWRITE); + netsnmp_register_instance(rw_scalar_h); netsnmp_register_ulong_instance("myulong", my_data_ulong_instance, 4, @@ -79,15 +84,15 @@ init_testhandler(void) if (!my_test) return; - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - if (table_info == NULL) + table_info1 = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + if (!table_info1) return; - netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER, ASN_INTEGER, + netsnmp_table_helper_add_indexes(table_info1, ASN_INTEGER, ASN_INTEGER, 0); - table_info->min_column = 3; - table_info->max_column = 3; - netsnmp_register_table(my_test, table_info); + table_info1->min_column = 3; + table_info1->max_column = 3; + netsnmp_register_table(my_test, table_info1); /* * data table helper test @@ -112,7 +117,7 @@ init_testhandler(void) netsnmp_table_row_add_index(row, ASN_INTEGER, &ind1, sizeof(ind1)); netsnmp_table_row_add_index(row, ASN_OCTET_STR, "partridge", strlen("partridge")); - row->data = (void *) "pear tree"; + row->data = NETSNMP_REMOVE_CONST(void *, "pear tree"); netsnmp_table_data_add_row(table, row); /* @@ -123,29 +128,39 @@ init_testhandler(void) netsnmp_table_row_add_index(row, ASN_INTEGER, &ind1, sizeof(ind1)); netsnmp_table_row_add_index(row, ASN_OCTET_STR, "turtle", strlen("turtle")); - row->data = (void *) "doves"; + row->data = NETSNMP_REMOVE_CONST(void *, "doves"); netsnmp_table_data_add_row(table, row); /* * we're going to register it as a normal table too, so we get the * automatically parsed column and index information */ - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - if (table_info == NULL) + table_info2 = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + if (table_info2 == NULL) return; - netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER, + netsnmp_table_helper_add_indexes(table_info2, ASN_INTEGER, ASN_OCTET_STR, 0); - table_info->min_column = 3; - table_info->max_column = 3; + table_info2->min_column = 3; + table_info2->max_column = 3; - netsnmp_register_read_only_table_data - (netsnmp_create_handler_registration - ("12days", my_data_table_handler, my_data_table_oid, 4, - HANDLER_CAN_RONLY), table, table_info); + table_h = netsnmp_create_handler_registration("12days", + my_data_table_handler, my_data_table_oid, 4, HANDLER_CAN_RONLY); + netsnmp_register_read_only_table_data(table_h, table, table_info2); } +void +shutdown_testhandler(void) +{ + netsnmp_unregister_handler(my_test); + netsnmp_table_registration_info_free(table_info1); + netsnmp_unregister_handler(table_h); + netsnmp_table_registration_info_free(table_info2); + netsnmp_unregister_handler(rw_scalar_h); + netsnmp_unregister_handler(ro_scalar_h); +} + int my_test_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, @@ -253,7 +268,7 @@ my_test_table_handler(netsnmp_mib_handler *handler, /* * or no index specified */ - table_info->indexes->val.integer == 0) { + table_info->indexes->val.integer == NULL) { table_info->colnum = RESULT_COLUMN; x = 0; y = 0; @@ -363,7 +378,7 @@ my_test_instance_handler(netsnmp_mib_handler *handler, * update current */ accesses = *(requests->requestvb->val.integer); - DEBUGMSGTL(("testhandler", "updated accesses -> %d\n", accesses)); + DEBUGMSGTL(("testhandler", "updated accesses -> %lu\n", accesses)); break; case MODE_SET_UNDO: @@ -406,17 +421,16 @@ my_data_table_handler(netsnmp_mib_handler *handler, */ row = netsnmp_extract_table_row(requests); table_info = netsnmp_extract_table_info(requests); - if (row) - column3 = (char *) row->data; - if (!row || !table_info || !column3) + if (!table_info || !row || !row->data) continue; + column3 = (char *) row->data; /* * there's only one column, we don't need to check if it's right */ netsnmp_table_data_build_result(reginfo, reqinfo, requests, row, table_info->colnum, - ASN_OCTET_STR, column3, + ASN_OCTET_STR, (u_char*)column3, strlen(column3)); requests = requests->next; } diff --git a/agent/mibgroup/testhandler.h b/agent/mibgroup/testhandler.h index 20806ab..6c5995b 100644 --- a/agent/mibgroup/testhandler.h +++ b/agent/mibgroup/testhandler.h @@ -3,7 +3,4 @@ */ void init_testhandler(void); -Netsnmp_Node_Handler my_test_handler; -Netsnmp_Node_Handler my_test_table_handler; -Netsnmp_Node_Handler my_data_table_handler; -Netsnmp_Node_Handler my_test_instance_handler; +void shutdown_testhandler(void); diff --git a/agent/mibgroup/tlstm-mib.h b/agent/mibgroup/tlstm-mib.h index 50e6985..c4be721 100644 --- a/agent/mibgroup/tlstm-mib.h +++ b/agent/mibgroup/tlstm-mib.h @@ -1,11 +1,11 @@ /* * module to include the modules */ -config_require(tlstm-mib/snmpTlstmSession) -config_require(tlstm-mib/snmpTlstmAddrTable) -config_require(tlstm-mib/snmpTlstmCertToTSNTable) -config_require(tlstm-mib/snmpTlstmParamsTable) -config_add_mib(SNMP-TLS-TM-MIB) -config_add_mib(SNMP-TSM-MIB) +config_require(tlstm-mib/snmpTlstmSession); +config_require(tlstm-mib/snmpTlstmAddrTable); +config_require(tlstm-mib/snmpTlstmCertToTSNTable); +config_require(tlstm-mib/snmpTlstmParamsTable); +config_add_mib(SNMP-TLS-TM-MIB); +config_add_mib(SNMP-TSM-MIB); #define SNMP_TLS_TM_BASE 1, 3, 6, 1, 2, 1, 198 diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h b/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h index 7b10905..fd9b6b0 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable.h @@ -1,7 +1,7 @@ #ifndef SNMPTLSTMADDRTABLE_H #define SNMPTLSTMADDRTABLE_H -config_require(tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable) +config_require(tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable); #endif /* SNMPTLSTMADDRTABLE_H */ diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c b/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c index 5493ff9..ccc3fdd 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c +++ b/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.c @@ -13,15 +13,15 @@ #include "tlstm-mib.h" #include "snmpTlstmAddrTable.h" -netsnmp_feature_require(table_tdata) -netsnmp_feature_require(tlstmaddr_container) -netsnmp_feature_require(table_tdata_delete_table) -netsnmp_feature_require(table_tdata_extract_table) -netsnmp_feature_require(table_tdata_remove_row) +netsnmp_feature_require(table_tdata); +netsnmp_feature_require(tlstmaddr_container); +netsnmp_feature_require(table_tdata_delete_table); +netsnmp_feature_require(table_tdata_extract_table); +netsnmp_feature_require(table_tdata_remove_row); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_storagetype) -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(check_vb_storagetype); +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /** XXX - move these to table_data header? */ @@ -83,16 +83,14 @@ typedef struct tlstmAddrTable_entry_s { /* * user data */ - struct netsnmp_cert_s *cert; char addr_flags; } tlstmAddrTable_entry; -netsnmp_tdata_row *tlstmAddrTable_createEntry(netsnmp_tdata * table_data, - char *snmpTargetAddrName, - size_t snmpTargetAddrName_len); -void tlstmAddrTable_removeEntry(netsnmp_tdata * table_data, - netsnmp_tdata_row * row); +static netsnmp_handler_registration *addr_table_reg; +static netsnmp_table_registration_info *addr_table_info; +static netsnmp_handler_registration *addr_count_reg; +static netsnmp_handler_registration *last_changed_reg; static Netsnmp_Node_Handler tlstmAddrTable_handler; static int _cache_load(netsnmp_cache *cache, netsnmp_tdata *table); @@ -102,6 +100,8 @@ static int _count_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests); +static int _tlstmAddrTable_save_rows(int majorID, int minorID, + void *serverarg, void *clientarg); static void _tlstmAddr_init_persistence(void); static void _addrs_add(tlstmAddrTable_entry *entry); @@ -120,31 +120,28 @@ init_snmpTlstmAddrTable(void) { oid reg_oid[] = { SNMP_TLS_TM_ADDR_TABLE }; const size_t reg_oid_len = OID_LENGTH(reg_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *table_info; netsnmp_cache *cache; - netsnmp_watcher_info *watcher; + netsnmp_watcher_info *last_changed_watcher; + int rc; DEBUGMSGTL(("tlstmAddrTable:init", "initializing table tlstmAddrTable\n")); - reg = + addr_table_reg = netsnmp_create_handler_registration("tlstmAddrTable", tlstmAddrTable_handler, reg_oid, reg_oid_len, HANDLER_CAN_RWRITE); _table_data = netsnmp_tdata_create_table("tlstmAddrTable", 0); - if (NULL == _table_data) { + if (!_table_data) { snmp_log(LOG_ERR, "error creating tdata table for tlstmAddrTable\n"); - return; + goto unreg_addr_table; } - table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - if (NULL == table_info) { + addr_table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + if (!addr_table_info) { snmp_log(LOG_ERR, "error creating table info for tlstmAddrTable\n"); - netsnmp_tdata_delete_table(_table_data); - _table_data = NULL; - return; + goto delete_table_data; } /* @@ -153,11 +150,9 @@ init_snmpTlstmAddrTable(void) cache = netsnmp_cache_create(30, (NetsnmpCacheLoad*)_cache_load, (NetsnmpCacheFree*)_cache_free, reg_oid, reg_oid_len); - if (NULL == cache) { + if (!cache) { snmp_log(LOG_ERR,"error creating cache for tlstmCertToTSNTable\n"); - netsnmp_tdata_delete_table(_table_data); - _table_data = NULL; - return; + goto free_addr_table_info; } cache->magic = (void *)_table_data; cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET; @@ -165,57 +160,107 @@ init_snmpTlstmAddrTable(void) /* * populate index types */ - netsnmp_table_helper_add_indexes(table_info, + netsnmp_table_helper_add_indexes(addr_table_info, /* index: snmpTargetAddrName */ ASN_PRIV_IMPLIED_OCTET_STR, 0); - table_info->min_column = TLSTMADDRTABLE_MIN_COLUMN; - table_info->max_column = TLSTMADDRTABLE_MAX_COLUMN; + addr_table_info->min_column = TLSTMADDRTABLE_MIN_COLUMN; + addr_table_info->max_column = TLSTMADDRTABLE_MAX_COLUMN; - netsnmp_tdata_register(reg, _table_data, table_info); - - if (cache) - netsnmp_inject_handler_before( reg, netsnmp_cache_handler_get(cache), - "table_container"); + rc = netsnmp_tdata_register(addr_table_reg, _table_data, addr_table_info); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_tdata_register() returned %d\n", + __func__, rc); + goto free_cache; + } + netsnmp_inject_handler_before(addr_table_reg, + netsnmp_cache_handler_get(cache), + "table_container"); /* * register scalars */ reg_oid[10] = 7; - reg = netsnmp_create_handler_registration("snmpTlstmAddrCount", + addr_count_reg = netsnmp_create_handler_registration("snmpTlstmAddrCount", _count_handler, reg_oid, OID_LENGTH(reg_oid), HANDLER_CAN_RONLY); - if (NULL == reg) + if (!addr_count_reg) { snmp_log(LOG_ERR, "could not create handler for snmpTlstmAddrCount\n"); - else { - netsnmp_register_scalar(reg); - if (cache) - netsnmp_inject_handler_before(reg, - netsnmp_cache_handler_get(cache), - "snmpTlstmAddrCount"); + goto free_cache; + } + + { + const int rc = netsnmp_register_scalar(addr_count_reg); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_register_scalar() returned %d\n", + __func__, rc); + goto unreg_addr_count; + } + netsnmp_inject_handler_before(addr_count_reg, + netsnmp_cache_handler_get(cache), + "snmpTlstmAddrCount"); } reg_oid[10] = 8; - reg = netsnmp_create_handler_registration( + last_changed_reg = netsnmp_create_handler_registration( "snmpTlstmAddrTableLastChanged", NULL, reg_oid, OID_LENGTH(reg_oid), HANDLER_CAN_RONLY); - watcher = netsnmp_create_watcher_info((void*)&_last_changed, + if (!last_changed_reg) { + snmp_log(LOG_ERR, + "could not create handler for snmpTlstmAddrTableLastChanged\n"); + goto unreg_addr_count; + } + last_changed_watcher = netsnmp_create_watcher_info((void*)&_last_changed, sizeof(_last_changed), ASN_TIMETICKS, WATCHER_FIXED_SIZE); - if ((NULL == reg) || (NULL == watcher)) + if (!last_changed_watcher) { snmp_log(LOG_ERR, "could not create handler for snmpTlstmAddrTableLastChanged\n"); - else - netsnmp_register_watched_scalar2(reg, watcher); + goto unreg_last_changed; + } + + netsnmp_register_watched_scalar2(last_changed_reg, last_changed_watcher); /* * Initialise the contents of the table here */ _tlstmAddr_init_persistence(); + return; + +unreg_last_changed: + netsnmp_tdata_unregister(last_changed_reg); + +unreg_addr_count: + netsnmp_tdata_unregister(addr_count_reg); + +free_cache: + netsnmp_cache_free(cache); + +free_addr_table_info: + netsnmp_table_registration_info_free(addr_table_info); + +delete_table_data: + netsnmp_tdata_delete_table(_table_data); + _table_data = NULL; + +unreg_addr_table: + netsnmp_tdata_unregister(addr_table_reg); +} + +void +shutdown_snmpTlstmAddrTable(void) +{ + snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + _tlstmAddrTable_save_rows, _table_data->container, + 1); + netsnmp_tdata_unregister(last_changed_reg); + netsnmp_tdata_unregister(addr_count_reg); + netsnmp_tdata_unregister(addr_table_reg); + netsnmp_table_registration_info_free(addr_table_info); } /*********************************************************************** @@ -337,8 +382,8 @@ tlstmAddrTable_removeEntry(netsnmp_tdata * table_data, DEBUGIF("tlstmAddrTable:entry:delete") { char name[sizeof(entry->snmpTargetAddrName)+1]; snprintf(name, sizeof(name), "%s", entry->snmpTargetAddrName); - DEBUGMSGT(("tlstmAddrTable:entry:delete", "entry %s %p / row %p\n", - name, entry, row)); + DEBUGMSGT(("tlstmAddrTable:entry:delete", "entry %s %p\n", name, + entry)); } if (entry && entry->undo) _freeUndo(entry); @@ -850,7 +895,7 @@ tlstmAddrTable_handler(netsnmp_mib_handler *handler, /** release undo data for requests with no rowstatus */ if (table_entry->undo && - !table_entry->undo->req[COLUMN_SNMPTLSTMADDRROWSTATUS] != 0) { + table_entry->undo->req[COLUMN_SNMPTLSTMADDRROWSTATUS] == NULL) { _freeUndo(table_entry); @@ -1198,9 +1243,6 @@ _cache_free(netsnmp_cache *cache, netsnmp_tdata *table) * ***********************************************************************/ -static int _tlstmAddrTable_save_rows(int majorID, int minorID, - void *serverarg, - void *clientarg); static void _tlstmAddrTable_row_restore_mib(const char *token, char *buf); static const char mib_token[] = "snmpTlstmAddrEntry"; @@ -1240,7 +1282,7 @@ _tlstmAddr_init_persistence(void) static int _save_entry(tlstmAddrTable_entry *entry, void *type) { - char buf[SNMP_MAXBUF_SMALL], *hashType; + char *buf = NULL, *hashType; hashType = se_find_label_in_slist("cert_hash_alg", entry->hashType); if (NULL == hashType) { @@ -1256,15 +1298,17 @@ _save_entry(tlstmAddrTable_entry *entry, void *type) entry->snmpTargetAddrName_len]); netsnmp_assert(0 == entry->tlstmAddrServerFingerprint[ entry->tlstmAddrServerFingerprint_len]); - snprintf(buf, sizeof(buf), "%s %s --%s %s %s %d", mib_token, - entry->snmpTargetAddrName, hashType, - entry->tlstmAddrServerFingerprint, - entry->tlstmAddrServerIdentity, - entry->tlstmAddrRowStatus); - buf[sizeof(buf)-1] = 0; + if (asprintf(&buf, "%s %s --%s %s %s %d", mib_token, + entry->snmpTargetAddrName, hashType, + entry->tlstmAddrServerFingerprint, + entry->tlstmAddrServerIdentity, + entry->tlstmAddrRowStatus) < 0) { + return SNMP_ERR_GENERR; + } read_config_store(type, buf); DEBUGMSGTL(("tlstmAddrTable:row:save", "saving entry '%s'\n", buf)); + free(buf); return SNMP_ERR_NOERROR; } diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h b/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h index 8c0b80a..54ee179 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmAddrTable/snmpTlstmAddrTable.h @@ -13,6 +13,7 @@ * function declarations */ void init_snmpTlstmAddrTable(void); +void shutdown_snmpTlstmAddrTable(void); /* * index definitions for table tlstmAddrTable diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h index ebfa0ec..a484710 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable.h @@ -1,6 +1,6 @@ #ifndef SNMPTLSTMCERTTOTSNTABLE_H #define SNMPTLSTMCERTTOTSNTABLE_H -config_require(tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable) +config_require(tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable); #endif /* SNMPTLSTMCERTTOTSNTABLE_H */ diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c index 84d1afb..16cb133 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c +++ b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c @@ -13,17 +13,17 @@ #include "tlstm-mib.h" #include "snmpTlstmCertToTSNTable.h" -netsnmp_feature_require(table_tdata) -netsnmp_feature_require(cert_fingerprints) -netsnmp_feature_require(table_tdata_delete_table) -netsnmp_feature_require(table_tdata_extract_table) -netsnmp_feature_require(table_tdata_remove_row) -netsnmp_feature_require(tls_fingerprint_build) +netsnmp_feature_require(table_tdata); +netsnmp_feature_require(cert_fingerprints); +netsnmp_feature_require(table_tdata_delete_table); +netsnmp_feature_require(table_tdata_extract_table); +netsnmp_feature_require(table_tdata_remove_row); +netsnmp_feature_require(tls_fingerprint_build); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_storagetype) -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_rowstatus_with_storagetype) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(check_vb_storagetype); +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_rowstatus_with_storagetype); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /** XXX - move these to table_data header? */ @@ -33,9 +33,6 @@ netsnmp_feature_require(table_tdata_insert_row) #define MAP_MIB_CONFIG_TOKEN "snmpTlstmCertToTSNEntry" -extern netsnmp_cert_map *netsnmp_certToTSN_parse_common(char **line); - - /* * structure for undo storage and other vars for set processing */ @@ -86,154 +83,14 @@ typedef struct certToTSN_entry_s { certToTSN_undo *undo; } certToTSN_entry; -static Netsnmp_Node_Handler tlstmCertToTSNTable_handler; -static oid _oid2type(oid *val, int val_len); -/** static int _type2oid(int type, oid *val, int *val_len); */ -static int _cache_load(netsnmp_cache *cache, netsnmp_tdata *table); -static void _cache_free(netsnmp_cache *cache, netsnmp_tdata *table); -static void _cert_map_add(certToTSN_entry *entry); -static void _cert_map_remove(certToTSN_entry *entry); -static int _count_handler(netsnmp_mib_handler *handler, - netsnmp_handler_registration *reginfo, - netsnmp_agent_request_info *reqinfo, - netsnmp_request_info *requests); -static void _parse_mib_maps(const char *token, char *line); -static int _save_maps(int majorID, int minorID, void *server, void *client); -static int _save_map(netsnmp_cert_map *map, int row_status, void *type); -static void _cert_map_tweak_storage(certToTSN_entry *entry); +static netsnmp_handler_registration *to_tsn_reg; +static netsnmp_handler_registration *to_tsn_count_reg; +static netsnmp_handler_registration *to_tsn_last_changed_reg; +static netsnmp_table_registration_info *to_tsn_table; static netsnmp_tdata *_table = NULL; static uint32_t _last_changed = 0; - -/** Initializes the tlstmCertToTSNTable module */ -void -init_snmpTlstmCertToTSNTable(void) -{ - init_snmpTlstmCertToTSNTable_context(NULL); -} - -void -init_snmpTlstmCertToTSNTable_context(const char *contextName) -{ - oid reg_oid[] = { SNMP_TLS_TM_CERT_TABLE }; - const size_t reg_oid_len = OID_LENGTH(reg_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *info; - netsnmp_cache *cache; - netsnmp_watcher_info *watcher; - const char *mib_map_help = - MAP_MIB_CONFIG_TOKEN " table persistence (internal use)"; - - DEBUGMSGTL(("tlstmCertToSN:init", - "initializing table tlstmCertToTSNTable\n")); - - reg = netsnmp_create_handler_registration - ("tlstmCertToTSNTable", tlstmCertToTSNTable_handler, - reg_oid, reg_oid_len, - HANDLER_CAN_RWRITE); - if (NULL == reg) { - snmp_log(LOG_ERR, - "error creating handler registration for tlstmCertToSN\n"); - return; - } - - if (NULL != contextName) - reg->contextName = strdup(contextName); - - _table = netsnmp_tdata_create_table("tlstmCertToTSNTable", 0); - if (NULL == _table) { - snmp_log(LOG_ERR, - "error creating tdata table for tlstmCertToTSNTable\n"); - return; - } - info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); - if (NULL == info) { - snmp_log(LOG_ERR, - "error creating table info for tlstmCertToTSNTable\n"); - netsnmp_tdata_delete_table(_table); - _table = NULL; - return; - } - netsnmp_table_helper_add_indexes(info, - /* index: tlstmCertToTSNID */ - ASN_UNSIGNED, 0); - - info->min_column = SNMPTLSTMCERTTOTSN_TABLE_MIN_COL; - info->max_column = SNMPTLSTMCERTTOTSN_TABLE_MAX_COL; - - /* - * cache init - */ - cache = netsnmp_cache_create(30, (NetsnmpCacheLoad*)_cache_load, - (NetsnmpCacheFree*)_cache_free, - reg_oid, - reg_oid_len); - if (NULL == cache) { - snmp_log(LOG_ERR,"error creating cache for tlstmCertToTSNTable\n"); - netsnmp_tdata_delete_table(_table); - _table = NULL; - return; - } - cache->magic = (void *)_table; - cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET; - - netsnmp_tdata_register(reg, _table, info); - - if (cache) - netsnmp_inject_handler_before( reg, netsnmp_cache_handler_get(cache), - "table_container"); - - /* - * register scalars - */ - reg_oid[10] = 1; - reg = netsnmp_create_handler_registration("snmpTlstmCertToTSNCount", - _count_handler, reg_oid, - OID_LENGTH(reg_oid), - HANDLER_CAN_RONLY); - if (NULL == reg) - snmp_log(LOG_ERR, - "could not create handler for snmpTlstmCertToTSNCount\n"); - else { - if (NULL != contextName) - reg->contextName = strdup(contextName); - - netsnmp_register_scalar(reg); - if (cache) - netsnmp_inject_handler_before(reg, netsnmp_cache_handler_get(cache), - "table_container"); - } - - reg_oid[10] = 2; - reg = netsnmp_create_handler_registration( - "snmpTlstmCertToTSNTableLastChanged", NULL, reg_oid, - OID_LENGTH(reg_oid), HANDLER_CAN_RONLY); - watcher = netsnmp_create_watcher_info((void*)&_last_changed, - sizeof(_last_changed), - ASN_TIMETICKS, - WATCHER_FIXED_SIZE); - if ((NULL == reg) || (NULL == watcher)) - snmp_log(LOG_ERR, - "could not create handler for snmpTlstmCertToTSNCount\n"); - else { - if (NULL != contextName) - reg->contextName = strdup(contextName); - netsnmp_register_watched_scalar2(reg, watcher); - } - - /* - * persistence - */ - register_config_handler(NULL, MAP_MIB_CONFIG_TOKEN, _parse_mib_maps, NULL, - mib_map_help); - if (snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - _save_maps, NULL) != SNMP_ERR_NOERROR) - snmp_log(LOG_ERR, "error registering for STORE_DATA callback " - "for certToTSN\n"); - -} - /* * create a new row in the table */ @@ -341,6 +198,110 @@ tlstmCertToTSNTable_removeEntry(netsnmp_tdata * table, netsnmp_tdata_delete_row(row); } +static oid +_oid2type(const oid *val, int val_len) +{ + static const oid _tsnm_base[] = { SNMP_TLS_TM_BASE, 1, 1 }; + static const int _tsnm_base_len = sizeof(_tsnm_base); + + netsnmp_assert(val); + + if (val_len != (_tsnm_base_len + sizeof(oid))) + return -1; + + if (memcmp(_tsnm_base,val,_tsnm_base_len) != 0) + return -2; + + if ((val[OID_LENGTH(_tsnm_base)] > TSNM_tlstmCert_MAX) || + (0 == val[OID_LENGTH(_tsnm_base)])) + return -3; + + return val[OID_LENGTH(_tsnm_base)]; +} + +static void +_cert_map_add(certToTSN_entry *entry) +{ + netsnmp_cert_map *map; + + if (NULL == entry) + return; + + DEBUGMSGTL(("tlstmCertToTSNTable:map:add", "pri %ld, fp %s\n", + entry->tlstmCertToTSNID, entry->fingerprint)); + + map = netsnmp_cert_map_alloc(entry->fingerprint, NULL); + if (NULL == map) + return; + + map->priority = entry->tlstmCertToTSNID; + map->mapType = entry->mapType; + map->data = strdup(entry->data); + map->hashType = entry->hashType; + + map->flags = NSCM_FROM_MIB; + if (entry->storageType == ST_NONVOLATILE) + map->flags |= NSCM_NONVOLATILE; + + if (netsnmp_cert_map_add(map) != 0) + netsnmp_cert_map_free(map); +} + +static void +_cert_map_remove(certToTSN_entry *entry) +{ + netsnmp_container *maps; + netsnmp_cert_map map; + + if (NULL == entry) + return; + + DEBUGMSGTL(("tlstmCertToTSNTable:map:remove", "pri %ld, fp %s\n", + entry->tlstmCertToTSNID, entry->fingerprint)); + + /** get current active maps */ + maps = netsnmp_cert_map_container(); + if (NULL == maps) + return; + + map.priority = entry->tlstmCertToTSNID; + map.fingerprint = entry->fingerprint; + + if (CONTAINER_REMOVE(maps, &map) != 0) { + snmp_log(LOG_ERR, "could not remove certificate map"); + } + entry->map_flags = 0; +} + +static void +_cert_map_tweak_storage(certToTSN_entry *entry) +{ + netsnmp_container *maps; + netsnmp_cert_map *map, index; + + if (NULL == entry) + return; + + DEBUGMSGTL(("tlstmCertToTSNTable:map:tweak", "pri %ld, st %d\n", + entry->tlstmCertToTSNID, entry->storageType)); + + /** get current active maps */ + maps = netsnmp_cert_map_container(); + if (NULL == maps) + return; + + index.priority = entry->tlstmCertToTSNID; + map = CONTAINER_FIND(maps, &index); + if (NULL == map) { + DEBUGMSGTL(("tlstmCertToTSNTable:map:tweak", "couldn't find map!\n")); + return; + } + + if (entry->storageType == ST_NONVOLATILE) + map->flags |= NSCM_NONVOLATILE; + else + map->flags &= ~NSCM_NONVOLATILE; +} /** handles requests for the tlstmCertToTSNTable table */ static int @@ -382,7 +343,7 @@ tlstmCertToTSNTable_handler(netsnmp_mib_handler *handler, /* * build SnmpTLSFingerprint */ - u_char bin[42], *ptr = bin; + u_char bin[EVP_MAX_MD_SIZE+1], *ptr = bin; size_t len = sizeof(bin); int rc; rc = netsnmp_tls_fingerprint_build(entry->hashType, @@ -942,91 +903,6 @@ _count_handler(netsnmp_mib_handler *handler, return SNMP_ERR_NOERROR; } -static void -_cert_map_add(certToTSN_entry *entry) -{ - netsnmp_cert_map *map; - - if (NULL == entry) - return; - - DEBUGMSGTL(("tlstmCertToTSNTable:map:add", "pri %ld, fp %s\n", - entry->tlstmCertToTSNID, entry->fingerprint)); - - map = netsnmp_cert_map_alloc(entry->fingerprint, NULL); - if (NULL == map) - return; - - map->priority = entry->tlstmCertToTSNID; - map->mapType = entry->mapType; - if (entry->data) - map->data = strdup(entry->data); - map->hashType = entry->hashType; - - map->flags = NSCM_FROM_MIB; - if (entry->storageType == ST_NONVOLATILE) - map->flags |= NSCM_NONVOLATILE; - - if (netsnmp_cert_map_add(map) != 0) - netsnmp_cert_map_free(map); -} - -static void -_cert_map_tweak_storage(certToTSN_entry *entry) -{ - netsnmp_container *maps; - netsnmp_cert_map *map, index; - - if (NULL == entry) - return; - - DEBUGMSGTL(("tlstmCertToTSNTable:map:tweak", "pri %ld, st %d\n", - entry->tlstmCertToTSNID, entry->storageType)); - - /** get current active maps */ - maps = netsnmp_cert_map_container(); - if (NULL == maps) - return; - - index.priority = entry->tlstmCertToTSNID; - map = CONTAINER_FIND(maps, &index); - if (NULL == map) { - DEBUGMSGTL(("tlstmCertToTSNTable:map:tweak", "couldn't find map!\n")); - return; - } - - if (entry->storageType == ST_NONVOLATILE) - map->flags |= NSCM_NONVOLATILE; - else - map->flags &= ~NSCM_NONVOLATILE; -} - -static void -_cert_map_remove(certToTSN_entry *entry) -{ - netsnmp_container *maps; - netsnmp_cert_map map; - - if (NULL == entry) - return; - - DEBUGMSGTL(("tlstmCertToTSNTable:map:remove", "pri %ld, fp %s\n", - entry->tlstmCertToTSNID, entry->fingerprint)); - - /** get current active maps */ - maps = netsnmp_cert_map_container(); - if (NULL == maps) - return; - - map.priority = entry->tlstmCertToTSNID; - map.fingerprint = entry->fingerprint; - - if (CONTAINER_REMOVE(maps, &map) != 0) { - snmp_log(LOG_ERR, "could not remove certificate map"); - } - entry->map_flags = 0; -} - static netsnmp_tdata_row * _entry_from_map(netsnmp_cert_map *map) { @@ -1203,7 +1079,7 @@ _parse_mib_maps(const char *token, char *line) static int _save_entry(certToTSN_entry *entry, void *app_type) { - char buf[SNMP_MAXBUF_SMALL], *hashType, *mapType, *data = NULL; + char *buf = NULL, *hashType, *mapType, *data = NULL; if (NULL == entry) return SNMP_ERR_GENERR; @@ -1217,12 +1093,15 @@ _save_entry(certToTSN_entry *entry, void *app_type) mapType = se_find_label_in_slist("cert_map_type", entry->mapType); if (TSNM_tlstmCertSpecified == entry->mapType) data = entry->data; - snprintf(buf, sizeof(buf), "%s %ld --%s %s --%s %s %d", - MAP_MIB_CONFIG_TOKEN, entry->tlstmCertToTSNID, hashType, - entry->fingerprint, mapType, data ? data : "", entry->rowStatus); + if (asprintf(&buf, "%s %ld --%s %s --%s %s %d", MAP_MIB_CONFIG_TOKEN, + entry->tlstmCertToTSNID, hashType, entry->fingerprint, + mapType, data ? data : "", entry->rowStatus) < 0) { + return SNMP_ERR_GENERR; + } DEBUGMSGTL(("tlstmCertToTSNTable:save", "saving '%s'\n", buf)); read_config_store(app_type, buf); + free(buf); return SNMP_ERR_NOERROR; } @@ -1302,8 +1181,8 @@ _save_maps(int majorID, int minorID, void *serverarg, void *clientarg) continue; _save_map(map, RS_ACTIVE, type); } + ITERATOR_RELEASE(map_itr); } - ITERATOR_RELEASE(map_itr); /* * save inactive rows from mib @@ -1338,40 +1217,152 @@ _save_maps(int majorID, int minorID, void *serverarg, void *clientarg) return SNMPERR_SUCCESS; } +void +init_snmpTlstmCertToTSNTable_context(const char *contextName) +{ + oid reg_oid[] = { SNMP_TLS_TM_CERT_TABLE }; + const size_t reg_oid_len = OID_LENGTH(reg_oid); + netsnmp_cache *cache; + netsnmp_watcher_info *watcher; + static const char mib_map_help[] = + MAP_MIB_CONFIG_TOKEN " table persistence (internal use)"; + int rc; -static const oid _tsnm_base[] = { SNMP_TLS_TM_BASE, 1, 1 }; -static const int _tsnm_base_len = sizeof(_tsnm_base); + DEBUGMSGTL(("tlstmCertToSN:init", + "initializing table tlstmCertToTSNTable\n")); -static oid -_oid2type(oid *val, int val_len) -{ - netsnmp_assert(val); + to_tsn_reg = netsnmp_create_handler_registration + ("tlstmCertToTSNTable", tlstmCertToTSNTable_handler, + reg_oid, reg_oid_len, + HANDLER_CAN_RWRITE); + if (!to_tsn_reg) { + snmp_log(LOG_ERR, + "error creating handler registration for tlstmCertToSN\n"); + return; + } - if (val_len != (_tsnm_base_len + sizeof(oid))) - return -1; + if (NULL != contextName) + to_tsn_reg->contextName = strdup(contextName); - if (memcmp(_tsnm_base,val,_tsnm_base_len) != 0) - return -2; + _table = netsnmp_tdata_create_table("tlstmCertToTSNTable", 0); + if (NULL == _table) { + snmp_log(LOG_ERR, + "error creating tdata table for tlstmCertToTSNTable\n"); + return; + } + to_tsn_table = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); + if (!to_tsn_table) { + snmp_log(LOG_ERR, + "error creating table info for tlstmCertToTSNTable\n"); + netsnmp_tdata_delete_table(_table); + _table = NULL; + return; + } + netsnmp_table_helper_add_indexes(to_tsn_table, + /* index: tlstmCertToTSNID */ + ASN_UNSIGNED, 0); - if ((val[OID_LENGTH(_tsnm_base)] > TSNM_tlstmCert_MAX) || - (0 == val[OID_LENGTH(_tsnm_base)])) - return -3; + to_tsn_table->min_column = SNMPTLSTMCERTTOTSN_TABLE_MIN_COL; + to_tsn_table->max_column = SNMPTLSTMCERTTOTSN_TABLE_MAX_COL; - return val[OID_LENGTH(_tsnm_base)]; -} + /* + * cache init + */ + cache = netsnmp_cache_create(30, (NetsnmpCacheLoad*)_cache_load, + (NetsnmpCacheFree*)_cache_free, + reg_oid, + reg_oid_len); + if (NULL == cache) { + snmp_log(LOG_ERR,"error creating cache for tlstmCertToTSNTable\n"); + netsnmp_tdata_delete_table(_table); + _table = NULL; + return; + } + cache->magic = (void *)_table; + cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET; -#if 0 -static int -_type2oid(int type, oid *val, int *val_len) -{ - netsnmp_assert( val && val_len ); + rc = netsnmp_tdata_register(to_tsn_reg, _table, to_tsn_table); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_tdata_register() returned %d\n", + __func__, rc); + return; + } + if (cache) + netsnmp_inject_handler_before(to_tsn_reg, + netsnmp_cache_handler_get(cache), + "table_container"); - if (*val_len < _tsnm_base_len + sizeof(oid)) - return -1; + /* + * register scalars + */ + reg_oid[10] = 1; + to_tsn_count_reg = + netsnmp_create_handler_registration("snmpTlstmCertToTSNCount", + _count_handler, reg_oid, + OID_LENGTH(reg_oid), + HANDLER_CAN_RONLY); + if (!to_tsn_count_reg) + snmp_log(LOG_ERR, + "could not create handler for snmpTlstmCertToTSNCount\n"); + else { + int rc; - memcpy(val, _tsnm_base, _tsnm_base_len + sizeof(oid)); - val[_tsnm_base_len + sizeof(oid)] = type; + if (NULL != contextName) + to_tsn_count_reg->contextName = strdup(contextName); - return 0; + rc = netsnmp_register_scalar(to_tsn_count_reg); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_register_scalar() returned %d\n", + __func__, rc); + return; + } + if (cache) + netsnmp_inject_handler_before(to_tsn_count_reg, + netsnmp_cache_handler_get(cache), + "snmpTlstmCertToTSNCount"); + } + + reg_oid[10] = 2; + to_tsn_last_changed_reg = netsnmp_create_handler_registration( + "snmpTlstmCertToTSNTableLastChanged", NULL, reg_oid, + OID_LENGTH(reg_oid), HANDLER_CAN_RONLY); + watcher = netsnmp_create_watcher_info((void*)&_last_changed, + sizeof(_last_changed), + ASN_TIMETICKS, + WATCHER_FIXED_SIZE); + if (!to_tsn_last_changed_reg || !watcher) + snmp_log(LOG_ERR, + "could not create handler for snmpTlstmCertToTSNCount\n"); + else { + if (NULL != contextName) + to_tsn_last_changed_reg->contextName = strdup(contextName); + netsnmp_register_watched_scalar2(to_tsn_last_changed_reg, watcher); + } + + /* + * persistence + */ + register_config_handler(NULL, MAP_MIB_CONFIG_TOKEN, _parse_mib_maps, NULL, + mib_map_help); + if (snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + _save_maps, NULL) != SNMP_ERR_NOERROR) + snmp_log(LOG_ERR, "error registering for STORE_DATA callback " + "for certToTSN\n"); + +} + +/** Initializes the tlstmCertToTSNTable module */ +void +init_snmpTlstmCertToTSNTable(void) +{ + init_snmpTlstmCertToTSNTable_context(NULL); +} + +void +shutdown_snmpTlstmCertToTSNTable(void) +{ + netsnmp_tdata_unregister(to_tsn_last_changed_reg); + netsnmp_tdata_unregister(to_tsn_count_reg); + netsnmp_tdata_unregister(to_tsn_reg); + netsnmp_table_registration_info_free(to_tsn_table); } -#endif diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h index 42b8097..985cdfb 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h @@ -14,6 +14,7 @@ */ void init_snmpTlstmCertToTSNTable(void); void init_snmpTlstmCertToTSNTable_context(const char *); +void shutdown_snmpTlstmCertToTSNTable(void); /* * index definitions for table tlstmCertToTSNTable diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h b/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h index d814be2..451fea1 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable.h @@ -1,6 +1,6 @@ #ifndef SNMPTLSTMPARAMSTABLE_H #define SNMPTLSTMPARAMSTABLE_H -config_require(tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable) +config_require(tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable); #endif /* SNMPTLSTMPARAMSTABLE_H */ diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c b/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c index cd54452..2dd37f9 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c +++ b/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.c @@ -15,18 +15,18 @@ #include "snmpTlstmParamsTable.h" -netsnmp_feature_require(table_tdata) -netsnmp_feature_require(tlstmparams_find) -netsnmp_feature_require(tlstmparams_external) -netsnmp_feature_require(cert_fingerprints) -netsnmp_feature_require(table_tdata_delete_table) -netsnmp_feature_require(table_tdata_extract_table) -netsnmp_feature_require(table_tdata_remove_row) +netsnmp_feature_require(table_tdata); +netsnmp_feature_require(tlstmparams_find); +netsnmp_feature_require(tlstmparams_external); +netsnmp_feature_require(cert_fingerprints); +netsnmp_feature_require(table_tdata_delete_table); +netsnmp_feature_require(table_tdata_extract_table); +netsnmp_feature_require(table_tdata_remove_row); #ifndef NETSNMP_NO_WRITE_SUPPORT -netsnmp_feature_require(check_vb_storagetype) -netsnmp_feature_require(check_vb_type_and_max_size) -netsnmp_feature_require(check_vb_rowstatus_with_storagetype) -netsnmp_feature_require(table_tdata_insert_row) +netsnmp_feature_require(check_vb_storagetype); +netsnmp_feature_require(check_vb_type_and_max_size); +netsnmp_feature_require(check_vb_rowstatus_with_storagetype); +netsnmp_feature_require(table_tdata_insert_row); #endif /* NETSNMP_NO_WRITE_SUPPORT */ /** XXX - move these to table_data header? */ @@ -79,6 +79,8 @@ static Netsnmp_Node_Handler snmpTlstmParamsTable_handler; static NetsnmpCacheLoad snmpTlstmParamsTable_load; static NetsnmpCacheFree snmpTlstmParamsTable_free; +static int _tlstmParamsTable_save(int majorID, int minorID, + void *serverarg, void *clientarg); static int _count_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, @@ -88,6 +90,11 @@ static void _params_add(snmpTlstmParamsTable_entry *entry); static void _params_remove(snmpTlstmParamsTable_entry *entry); static void _params_tweak_storage(snmpTlstmParamsTable_entry *entry); +static netsnmp_handler_registration *params_table_reg; +static netsnmp_handler_registration *params_count_reg; +static netsnmp_handler_registration *last_changed_reg; +static netsnmp_table_registration_info *params_table; + static uint32_t _last_changed = 0; static netsnmp_tdata *_table_data = NULL; @@ -100,94 +107,143 @@ init_snmpTlstmParamsTable(void) { oid reg_oid[] = {SNMP_TLS_TM_BASE,2,2,1,6}; const size_t reg_oid_len = OID_LENGTH(reg_oid); - netsnmp_handler_registration *reg; - netsnmp_table_registration_info *table_info; netsnmp_cache *cache; - netsnmp_watcher_info *watcher; + netsnmp_watcher_info *last_changed_watcher; + int rc; DEBUGMSGTL(("tlstmParamsTable:init", "initializing table snmpTlstmParamsTable\n")); - reg = netsnmp_create_handler_registration + params_table_reg = netsnmp_create_handler_registration ("snmpTlstmParamsTable", snmpTlstmParamsTable_handler, reg_oid, reg_oid_len, HANDLER_CAN_RWRITE); - + if (!params_table_reg) { + snmp_log(LOG_ERR, "snmpTlstmParamsTable registration failed"); + return; + } _table_data = netsnmp_tdata_create_table( "snmpTlstmParamsTable", 0 ); - if (NULL == _table_data) { + if (!_table_data) { snmp_log(LOG_ERR,"error creating tdata table for snmpTlstmParamsTable\n"); - return; + goto unregister_params_table; } cache = netsnmp_cache_create(SNMPTLSTMPARAMSTABLE_TIMEOUT, - snmpTlstmParamsTable_load, + snmpTlstmParamsTable_load, snmpTlstmParamsTable_free, - reg_oid, reg_oid_len); + reg_oid, reg_oid_len); if (NULL == cache) { snmp_log(LOG_ERR,"error creating cache for snmpTlstmParamsTable\n"); - netsnmp_tdata_delete_table(_table_data); - _table_data = NULL; - return; + goto delete_table_data; } cache->magic = (void *)_table_data; cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET; - table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); - if (NULL == table_info) { + params_table = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); + if (!params_table) { snmp_log(LOG_ERR,"error creating table info for snmpTlstmParamsTable\n"); - netsnmp_tdata_delete_table(_table_data); - _table_data = NULL; - netsnmp_cache_free(cache); - return; + goto free_cache; } /* * populate index types */ - netsnmp_table_helper_add_indexes(table_info, + netsnmp_table_helper_add_indexes(params_table, /* index: snmpTargetParamsName */ ASN_PRIV_IMPLIED_OCTET_STR, 0); - table_info->min_column = SNMPTLSTMPARAMSTABLE_MIN_COLUMN; - table_info->max_column = SNMPTLSTMPARAMSTABLE_MAX_COLUMN; + params_table->min_column = SNMPTLSTMPARAMSTABLE_MIN_COLUMN; + params_table->max_column = SNMPTLSTMPARAMSTABLE_MAX_COLUMN; - netsnmp_tdata_register( reg, _table_data, table_info ); - netsnmp_inject_handler_before( reg, netsnmp_cache_handler_get(cache), - "table_container"); + rc = netsnmp_tdata_register(params_table_reg, _table_data, + params_table); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_tdata_register() returned %d\n", + __func__, rc); + goto free_params_table; + } + netsnmp_inject_handler_before(params_table_reg, + netsnmp_cache_handler_get(cache), + "table_container"); /* * register scalars */ reg_oid[10] = 4; - reg = netsnmp_create_handler_registration("snmpTlstmParamsCount", - _count_handler, reg_oid, - OID_LENGTH(reg_oid), - HANDLER_CAN_RONLY); - if (NULL == reg) + params_count_reg = + netsnmp_create_handler_registration("snmpTlstmParamsCount", + _count_handler, reg_oid, + OID_LENGTH(reg_oid), + HANDLER_CAN_RONLY); + if (!params_count_reg) { snmp_log(LOG_ERR, "could not create handler for snmpTlstmParamsCount\n"); - else { - netsnmp_register_scalar(reg); - if (cache) - netsnmp_inject_handler_before(reg, - netsnmp_cache_handler_get(cache), - "snmpTlstmParamsCount"); + goto free_params_table; + } + { + const int rc = netsnmp_register_scalar(params_count_reg); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_register_scalar() returned %d\n", + __func__, rc); + goto unreg_params_count; + } + netsnmp_inject_handler_before(params_count_reg, + netsnmp_cache_handler_get(cache), + "snmpTlstmParamsCount"); } reg_oid[10] = 5; - reg = netsnmp_create_handler_registration( + last_changed_reg = netsnmp_create_handler_registration( "snmpTlstmParamsTableLastChanged", NULL, reg_oid, OID_LENGTH(reg_oid), HANDLER_CAN_RONLY); - watcher = netsnmp_create_watcher_info((void*)&_last_changed, + if (!last_changed_reg) { + snmp_log(LOG_ERR, + "could not create handler for snmpTlstmParamsTableLastChanged\n"); + goto unreg_params_count; + } + last_changed_watcher = netsnmp_create_watcher_info((void*)&_last_changed, sizeof(_last_changed), ASN_TIMETICKS, WATCHER_FIXED_SIZE); - if ((NULL == reg) || (NULL == watcher)) + if (!last_changed_watcher) { snmp_log(LOG_ERR, "could not create handler for snmpTlstmParamsTableLastChanged\n"); - else - netsnmp_register_watched_scalar2(reg, watcher); + goto unreg_last_changed; + } + + netsnmp_register_watched_scalar2(last_changed_reg, last_changed_watcher); /* * Initialise the contents of the table here */ _tlstmParams_init_persistence(); + return; + +unreg_last_changed: + netsnmp_tdata_unregister(last_changed_reg); + +unreg_params_count: + netsnmp_tdata_unregister(params_count_reg); + +free_params_table: + netsnmp_table_registration_info_free(params_table); + +free_cache: + netsnmp_cache_free(cache); + +delete_table_data: + netsnmp_tdata_delete_table(_table_data); + _table_data = NULL; + +unregister_params_table: + netsnmp_tdata_unregister(params_table_reg); +} + +void +shutdown_snmpTlstmParamsTable(void) +{ + snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + _tlstmParamsTable_save, _table_data->container, 1); + netsnmp_tdata_unregister(last_changed_reg); + netsnmp_tdata_unregister(params_count_reg); + netsnmp_tdata_unregister(params_table_reg); + netsnmp_table_registration_info_free(params_table); } /** ************************************************************************** @@ -336,9 +392,7 @@ _params_add(snmpTlstmParamsTable_entry *entry) if (entry->snmpTlstmParamsStorageType == ST_NONVOLATILE) params->flags |= TLSTM_PARAMS_NONVOLATILE; - if (netsnmp_tlstmParams_add(params) != 0) { - netsnmp_tlstmParams_free(params); - } + netsnmp_tlstmParams_add(params); } static void @@ -953,7 +1007,7 @@ snmpTlstmParamsTable_handler( /** release undo data for requests with no rowstatus */ if (table_entry->undo && - !table_entry->undo->req[COLUMN_SNMPTLSTMPARAMSROWSTATUS] != 0) { + table_entry->undo->req[COLUMN_SNMPTLSTMPARAMSROWSTATUS] == NULL) { _freeUndo(table_entry); /** update active addrs */ @@ -1062,8 +1116,6 @@ _count_handler(netsnmp_mib_handler *handler, * ***********************************************************************/ -static int _tlstmParamsTable_save(int majorID, int minorID, - void *serverarg, void *clientarg); static int _save_params(snmpTlstmParams *params, void *app_type); static int _save_entry(snmpTlstmParamsTable_entry *entry, void *type); static void _tlstmParamsTable_row_restore_mib(const char *token, char *buf); @@ -1139,8 +1191,8 @@ _tlstmParamsTable_save(int majorID, int minorID, void *serverarg, continue; _save_params(params, type); } + ITERATOR_RELEASE(params_itr); } - ITERATOR_RELEASE(params_itr); /* * save inactive rows from mib @@ -1260,17 +1312,17 @@ _tlstmParamsTable_row_restore_mib(const char *token, char *buf) if (RS_ACTIVE == rowStatus) { params->flags = TLSTM_PARAMS_FROM_MIB | TLSTM_PARAMS_NONVOLATILE; - if (netsnmp_tlstmParams_add(params) != 0) - netsnmp_tlstmParams_free(params); - } - else { + netsnmp_tlstmParams_add(params); + } else { netsnmp_tdata_row *row; snmpTlstmParamsTable_entry *entry; row = snmpTlstmParamsTable_createEntry(_table_data, params->name, strlen(params->name)); - if (!row) + if (!row) { + netsnmp_tlstmParams_free(params); return; + } entry = row->data; diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h b/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h index ae33cac..2427f8a 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmParamsTable/snmpTlstmParamsTable.h @@ -12,6 +12,8 @@ /* function declarations */ void init_snmpTlstmParamsTable(void); void initialize_table_snmpTlstmParamsTable(void); +void shutdown_snmpTlstmParamsTable(void); + #define SNMPTLSTMPARAMSTABLE_TIMEOUT 60 /* index definitions for table snmpTlstmParamsTable */ diff --git a/agent/mibgroup/tlstm-mib/snmpTlstmSession.h b/agent/mibgroup/tlstm-mib/snmpTlstmSession.h index 9bf4ef8..5b3b93a 100644 --- a/agent/mibgroup/tlstm-mib/snmpTlstmSession.h +++ b/agent/mibgroup/tlstm-mib/snmpTlstmSession.h @@ -1,6 +1,6 @@ #ifndef SNMPTLSTMSESSION_H #define SNMPTLSTMSESSION_H -config_require(tlstm-mib/snmpTlstmSession/snmpTlstmSession) +config_require(tlstm-mib/snmpTlstmSession/snmpTlstmSession); #endif /* SNMPTLSTMSESSION_H */ diff --git a/agent/mibgroup/tsm-mib.h b/agent/mibgroup/tsm-mib.h index aec01fe..ffcef9b 100644 --- a/agent/mibgroup/tsm-mib.h +++ b/agent/mibgroup/tsm-mib.h @@ -1,6 +1,6 @@ /* * module to include the modules */ -config_require(tsm-mib/snmpTsmStats) -config_require(tsm-mib/snmpTsmConfigurationUsePrefix) -config_add_mib(SNMP-TSM-MIB) +config_require(tsm-mib/snmpTsmStats); +config_require(tsm-mib/snmpTsmConfigurationUsePrefix); +config_add_mib(SNMP-TSM-MIB); diff --git a/agent/mibgroup/tsm-mib/snmpTsmStats.h b/agent/mibgroup/tsm-mib/snmpTsmStats.h index d1c4101..1a31c32 100644 --- a/agent/mibgroup/tsm-mib/snmpTsmStats.h +++ b/agent/mibgroup/tsm-mib/snmpTsmStats.h @@ -1,6 +1,6 @@ #ifndef SNMPTSMSTATS_H #define SNMPTSMSTATS_H -config_require(tsm-mib/snmpTsmStats/snmpTsmStats) +config_require(tsm-mib/snmpTsmStats/snmpTsmStats); #endif /* SNMPTSMSTATS_H */ diff --git a/agent/mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.c b/agent/mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.c index a567d2e..9207b63 100644 --- a/agent/mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.c +++ b/agent/mibgroup/tsm-mib/snmpTsmStats/snmpTsmStats.c @@ -11,9 +11,9 @@ static netsnmp_handler_registration* _myreg = NULL; -netsnmp_feature_require(helper_statistics) +netsnmp_feature_require(helper_statistics); -netsnmp_feature_child_of(shutdown_snmptsmsession, netsnmp_unused) +netsnmp_feature_child_of(shutdown_snmptsmsession, netsnmp_unused); /** Initializes the snmpTsmStats module */ void diff --git a/agent/mibgroup/tunnel.h b/agent/mibgroup/tunnel.h index 232ddb3..1f369f3 100644 --- a/agent/mibgroup/tunnel.h +++ b/agent/mibgroup/tunnel.h @@ -1,6 +1,6 @@ /* * tunnel.h: top level .h file to merely include the sub-module. */ -config_require(tunnel/tunnel) -config_add_mib(TUNNEL-MIB) -config_add_mib(IPV6-FLOW-LABEL-MIB) +config_require(tunnel/tunnel); +config_add_mib(TUNNEL-MIB); +config_add_mib(IPV6-FLOW-LABEL-MIB); diff --git a/agent/mibgroup/tunnel/tunnel.c b/agent/mibgroup/tunnel/tunnel.c index f9649ef..8ed70cd 100644 --- a/agent/mibgroup/tunnel/tunnel.c +++ b/agent/mibgroup/tunnel/tunnel.c @@ -78,13 +78,6 @@ #ifdef USING_IF_MIB_IFTABLE_IFTABLE_MODULE #include "if-mib/ifTable/ifTable.h" #include "if-mib/ifTable/ifTable_defs.h" -#else -/* - * This is used, because the TUNNEL-MIB augments ifTable. - */ -extern unsigned char *var_ifEntry(struct variable *, - oid *, size_t *, - int, size_t *, WriteMethod **); #endif @@ -98,10 +91,6 @@ oid tunnel_variables_oid[] = { 1, 3, 6, 1, 2, 1, 10, 131, 1, 1 }; const int tunnel_len = 10; -oid tunnel_ifEntry_oid[] = - { 1, 3, 6, 1, 2, 1, 10, 131, 1, 1, 1, 1 }; -const int tunnel_ifEntry_len = 12; - oid tunnel_configEntry_oid[] = { 1, 3, 6, 1, 2, 1, 10, 131, 1, 1, 2, 1 }; const int tunnel_configEntry_len = 12; @@ -291,7 +280,7 @@ getTunnelParm(char *ifname) } memset(&parm, 0, sizeof(struct ip_tunnel_parm)); - strcpy(ifrq.ifr_name, ifname); + strlcpy(ifrq.ifr_name, ifname, sizeof(ifrq.ifr_name)); ifrq.ifr_ifru.ifru_data = (void *) &parm; if (ioctl(fd, SIOCGETTUNNEL, &ifrq) < 0) { /* @@ -324,7 +313,7 @@ setTunnelParm(char *ifname, struct ip_tunnel_parm *parm) return -1; } - strcpy(ifrq.ifr_name, ifname); + strlcpy(ifrq.ifr_name, ifname, sizeof(ifrq.ifr_name)); ifrq.ifr_ifru.ifru_data = (void *) parm; err = ioctl(fd, SIOCCHGTUNNEL, &ifrq); close(fd); @@ -371,21 +360,21 @@ updateTunnel(struct tunnel *tunnel) * 4 bytes of sa_data. We don't use sa_data here, or we'd * need to memset it to 0 before the ioct. */ - strcpy(ifrq.ifr_name, tunnel->ifname); + strlcpy(ifrq.ifr_name, tunnel->ifname, sizeof(ifrq.ifr_name)); if (ioctl(fd, SIOCGIFHWADDR, &ifrq) == 0) switch (ifrq.ifr_hwaddr.sa_family) { case ARPHRD_TUNNEL: tunnel->encaps = 2; - break;; /* direct */ + break; /* direct */ case ARPHRD_TUNNEL6: tunnel->encaps = 2; - break;; /* direct */ + break; /* direct */ case ARPHRD_IPGRE: tunnel->encaps = 3; - break;; /* gre */ + break; /* gre */ case ARPHRD_SIT: tunnel->encaps = 2; - break;; /* direct */ + break; /* direct */ default: tunnel->encaps = 1; /* other */ } @@ -623,6 +612,7 @@ writeLocalAddress(int action, unsigned char *var_val, if (var_val_len != 4) { return SNMP_ERR_WRONGLENGTH; } + /* FALL THROUGH */ case RESERVE2: tunnel = getTunnelByIfIndex((int) name[name_len - 1]); if (!tunnel) { @@ -668,11 +658,13 @@ writeRemoteAddress(int action, unsigned char *var_val, if (var_val_len != 4) { return SNMP_ERR_WRONGLENGTH; } + /* FALL THROUGH */ case RESERVE2: tunnel = getTunnelByIfIndex((int) name[name_len - 1]); if (!tunnel) { return SNMP_ERR_NOSUCHNAME; } + break; case FREE: break; case ACTION: @@ -713,11 +705,13 @@ writeHopLimit(int action, unsigned char *var_val, if (var_val_len > sizeof(long)) { return SNMP_ERR_WRONGLENGTH; } + /* FALL THROUGH */ case RESERVE2: tunnel = getTunnelByIfIndex((int) name[name_len - 1]); if (!tunnel) { return SNMP_ERR_NOSUCHNAME; } + break; case FREE: break; case ACTION: @@ -758,11 +752,13 @@ writeTOS(int action, unsigned char *var_val, if (var_val_len > sizeof(long)) { return SNMP_ERR_WRONGLENGTH; } + /* FALL THROUGH */ case RESERVE2: tunnel = getTunnelByIfIndex((int) name[name_len - 1]); if (!tunnel) { return SNMP_ERR_NOSUCHNAME; } + break; case FREE: break; case ACTION: @@ -897,7 +893,7 @@ var_tunnelIfEntry(struct variable *vp, *write_method = writeTOS; return (u_char *) & ret_int; default: - return 0; + return NULL; } return NULL; @@ -994,7 +990,7 @@ var_tunnelConfigEntry(struct variable *vp, vp->type = ASN_INTEGER; return (u_char *) & ret_int; default: - return 0; + return NULL; } return NULL; diff --git a/agent/mibgroup/ucd-snmp/disk.c b/agent/mibgroup/ucd-snmp/disk.c deleted file mode 100644 index 1147eef..0000000 --- a/agent/mibgroup/ucd-snmp/disk.c +++ /dev/null @@ -1,932 +0,0 @@ -/* - * disk.c - */ - -#include - -/* workaround for bug in autoconf 2.60b and 2.61 */ -#ifdef HAVE_GETMNTENT -#undef HAVE_GETMNTENT -#define HAVE_GETMNTENT 1 /* previously might be only "#define HAVE_GETMNTENT" */ -#endif - -#include - -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_UNISTD_H -#include -#endif -#if HAVE_FCNTL_H -#include -#endif -#include -#if HAVE_MACHINE_PARAM_H -#include -#endif -#if HAVE_SYS_VMMETER_H -#if !(defined(bsdi2) || defined(netbsd1)) -#include -#endif -#endif -#if HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_SYS_CONF_H -#include -#endif -#if HAVE_ASM_PAGE_H -#include -#endif -#if HAVE_SYS_SWAP_H -#include -#endif -#if HAVE_SYS_FS_H -#include -#else -#if HAVE_UFS_FS_H -#include -#else -#ifdef HAVE_SYS_STAT_H -#include -#endif -#if !defined(dragonfly) -#ifdef HAVE_SYS_VNODE_H -#include -#endif -#endif -#ifdef HAVE_UFS_UFS_QUOTA_H -#include -#endif -#ifdef HAVE_UFS_UFS_INODE_H -#include -#endif -#if HAVE_UFS_FFS_FS_H -#include -#endif -#endif -#endif -#if HAVE_MTAB_H -#include -#endif -#include -#include -#if HAVE_SYS_STATFS_H -#include -#endif -#if HAVE_SYS_STATVFS_H -#include -#endif -#if HAVE_SYS_VFS_H -#include -#endif -#if defined(__FreeBSD__) && __FreeBSD_version >= 700055 /* Or HAVE_SYS_UCRED_H */ -#include -#endif -#if defined(HAVE_STATFS) -#if HAVE_SYS_MOUNT_H -#include -#endif -#if HAVE_SYS_SYSCTL_H -#include -#endif -#if !defined(HAVE_STATVFS) -#define statvfs statfs -#endif -#endif -#if HAVE_VM_VM_H -#include -#endif -#if HAVE_VM_SWAP_PAGER_H -#include -#endif -#if HAVE_SYS_FIXPOINT_H -#include -#endif -#if HAVE_MALLOC_H -#include -#endif -#if HAVE_STRING_H -#include -#endif -#if HAVE_FSTAB_H -#include -#endif -#if HAVE_MNTENT_H -#include -#endif -#if HAVE_SYS_MNTTAB_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#include -#include -#include - -#include "struct.h" -#include "disk.h" -#include "util_funcs/header_simple_table.h" -#if USING_UCD_SNMP_ERRORMIB_MODULE -#include "errormib.h" -#else -#define setPerrorstatus(x) snmp_log_perror(x) -#endif - -/* - * * config file parsing routines - * */ -static void disk_free_config(void); -static void disk_parse_config(const char *, char *); -static void disk_parse_config_all(const char *, char *); -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS -static void find_and_add_allDisks(int minpercent); -static void add_device(char *path, char *device, - int minspace, int minpercent, int override); -static void modify_disk_parameters(int index, int minspace, - int minpercent); -static int disk_exists(char *path); -static char *find_device(char *path); -#endif - -struct diskpart { - char device[STRMAX]; - char path[STRMAX]; - int minimumspace; - int minpercent; -}; - -#define MAX_INT_32 0x7fffffff -#define MAX_UINT_32 0xffffffff - -unsigned int numdisks; -int allDisksIncluded = 0; -unsigned int maxdisks = 0; -struct diskpart *disks; - -struct variable2 extensible_disk_variables[] = { - {MIBINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {MIBINDEX}}, - {ERRORNAME, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {ERRORNAME}}, - {DISKDEVICE, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKDEVICE}}, - {DISKMINIMUM, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKMINIMUM}}, - {DISKMINPERCENT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKMINPERCENT}}, - {DISKTOTAL, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKTOTAL}}, - {DISKAVAIL, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKAVAIL}}, - {DISKUSED, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKUSED}}, - {DISKPERCENT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKPERCENT}}, - {DISKPERCENTNODE, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKPERCENTNODE}}, - {ERRORFLAG, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {ERRORFLAG}}, - {ERRORMSG, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {ERRORMSG}}, - {DISKTOTALLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKTOTALLOW}}, - {DISKTOTALHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKTOTALHIGH}}, - {DISKAVAILLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKAVAILLOW}}, - {DISKAVAILHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKAVAILHIGH}}, - {DISKUSEDLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKUSEDLOW}}, - {DISKUSEDHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKUSEDHIGH}}, -}; - -/* - * Define the OID pointer to the top of the mib tree that we're - * registering underneath - */ -oid disk_variables_oid[] = { NETSNMP_UCDAVIS_MIB, NETSNMP_DISKMIBNUM, 1 }; - -void -init_disk(void) -{ - /* - * register ourselves with the agent to handle our mib tree - */ - REGISTER_MIB("ucd-snmp/disk", extensible_disk_variables, variable2, - disk_variables_oid); - - snmpd_register_config_handler("disk", disk_parse_config, - disk_free_config, - "path [ minspace | minpercent% ]"); - snmpd_register_config_handler("includeAllDisks", disk_parse_config_all, - disk_free_config, - "minpercent%"); - allDisksIncluded = 0; -} - -static void -disk_free_config(void) -{ - unsigned int i; - - numdisks = 0; - for (i = 0; i < maxdisks; i++) { /* init/erase disk db */ - disks[i].device[0] = 0; - disks[i].path[0] = 0; - disks[i].minimumspace = -1; - disks[i].minpercent = -1; - } - allDisksIncluded = 0; -} - -static void -disk_parse_config(const char *token, char *cptr) -{ -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS - char path[STRMAX]; - int minpercent; - int minspace; - - if (numdisks == maxdisks) { - if (maxdisks == 0) { - maxdisks = 50; - disks = (struct diskpart *)malloc(maxdisks * sizeof(struct diskpart)); - if (!disks) { - config_perror("malloc failed for new disk allocation."); - netsnmp_config_error("\tignoring: %s", cptr); - return; - } - memset(disks, 0, maxdisks * sizeof(struct diskpart)); - } else { - maxdisks *= 2; - disks = (struct diskpart *)realloc(disks, maxdisks * sizeof(struct diskpart)); - if (!disks) { - config_perror("malloc failed for new disk allocation."); - netsnmp_config_error("\tignoring: %s", cptr); - return; - } - memset(disks + maxdisks/2, 0, maxdisks/2 * sizeof(struct diskpart)); - } - } - - /* - * read disk path (eg, /1 or /usr) - */ - copy_nword(cptr, path, sizeof(path)); - cptr = skip_not_white(cptr); - cptr = skip_white(cptr); - - /* - * read optional minimum disk usage spec - */ - if(cptr != NULL) { - if(strchr(cptr, '%') == NULL) { - minspace = atoi(cptr); - minpercent = -1; - } - else { - minspace = -1; - minpercent = atoi(cptr); - } - } else { - minspace = NETSNMP_DEFDISKMINIMUMSPACE; - minpercent = -1; - } - - /* - * check if the disk already exists, if so then modify its - * parameters. if it does not exist then add it - */ - add_device(path, find_device(path), minspace, minpercent, 1); -#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */ -} - -static void -disk_parse_config_all(const char *token, char *cptr) -{ -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS - int minpercent = DISKMINPERCENT; - - if (numdisks == maxdisks) { - if (maxdisks == 0) { - maxdisks = 50; - disks = (struct diskpart *)malloc(maxdisks * sizeof(struct diskpart)); - if (!disks) { - config_perror("malloc failed for new disk allocation."); - netsnmp_config_error("\tignoring: %s", cptr); - return; - } - memset(disks, 0, maxdisks * sizeof(struct diskpart)); - } else { - maxdisks *= 2; - disks = (struct diskpart *)realloc(disks, maxdisks * sizeof(struct diskpart)); - if (!disks) { - config_perror("malloc failed for new disk allocation."); - netsnmp_config_error("\tignoring: %s", cptr); - return; - } - memset(disks + maxdisks/2, 0, maxdisks/2 * sizeof(struct diskpart)); - } - } - /* - * read the minimum disk usage percent - */ - if(cptr != NULL) { - if(strchr(cptr, '%') != NULL) { - minpercent = atoi(cptr); - } - } - /* - * if we have already seen the "includeAllDisks" directive - * then search for the disk in the "disks" array and modify - * the values. if we havent seen the "includeAllDisks" - * directive then include this disk - */ - if(allDisksIncluded) { - config_perror("includeAllDisks already specified."); - netsnmp_config_error("\tignoring: includeAllDisks %s", cptr); - } - else { - allDisksIncluded = 1; - find_and_add_allDisks(minpercent); - } -#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */ -} - - -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS -static void -add_device(char *path, char *device, int minspace, int minpercent, int override) -{ - int index; - - if (!path || !strcmp(path, "none")) { - DEBUGMSGTL(("ucd-snmp/disk", "Skipping null path device (%s)\n", device)); - return; - } - if (numdisks == maxdisks) { - if (maxdisks == 0) { - maxdisks = 50; - disks = (struct diskpart *)malloc(maxdisks * sizeof(struct diskpart)); - if (!disks) { - netsnmp_config_error("\tignoring: %s", device); - return; - } - memset(disks, 0, maxdisks * sizeof(struct diskpart)); - } else { - maxdisks *= 2; - disks = (struct diskpart *)realloc(disks, maxdisks * sizeof(struct diskpart)); - if (!disks) { - config_perror("malloc failed for new disk allocation."); - netsnmp_config_error("\tignoring: %s", device); - return; - } - memset(disks + maxdisks/2, 0, maxdisks/2 * sizeof(struct diskpart)); - } - } - - index = disk_exists(path); - if((index != -1) && (index < maxdisks) && (override==1)) { - modify_disk_parameters(index, minspace, minpercent); - } - else if(index == -1){ - /* add if and only if the device was found */ - if(device[0] != 0) { - /* The following buffers are cleared above, no need to add '\0' */ - strlcpy(disks[numdisks].path, path, sizeof(disks[numdisks].path)); - strlcpy(disks[numdisks].device, device, sizeof(disks[numdisks].device)); - disks[numdisks].minimumspace = minspace; - disks[numdisks].minpercent = minpercent; - numdisks++; - } - else { - disks[numdisks].minimumspace = -1; - disks[numdisks].minpercent = -1; - disks[numdisks].path[0] = 0; - disks[numdisks].device[0] = 0; - } - } -} - -void -modify_disk_parameters(int index, int minspace, int minpercent) -{ - disks[index].minimumspace = minspace; - disks[index].minpercent = minpercent; -} - -int disk_exists(char *path) -{ - unsigned int index; - for(index = 0; index < numdisks; index++) { - DEBUGMSGTL(("ucd-snmp/disk", "Checking for %s. Found %s at %d\n", path, disks[index].path, index)); - if(strcmp(path, disks[index].path) == 0) { - return index; - } - } - return -1; -} - -static void -find_and_add_allDisks(int minpercent) -{ -#if HAVE_GETMNTENT -#if HAVE_SYS_MNTTAB_H - struct mnttab mnttab; -#else - struct mntent *mntent; -#endif - FILE *mntfp; -#elif HAVE_FSTAB_H - struct fstab *fstab1; -#elif HAVE_STATFS - struct statfs statf; -#endif -#if defined(HAVE_GETMNTENT) && !defined(HAVE_SETMNTENT) - int i; -#endif - -#if defined(HAVE_GETMNTENT) || defined(HAVE_FSTAB_H) - int dummy = 0; -#endif - - /* - * find the device for the path and copy the device into the - * string declared above and at the end of the routine return it - * to the caller - */ -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS -#if HAVE_GETMNTENT -#if HAVE_SETMNTENT - mntfp = setmntent(ETC_MNTTAB, "r"); - if (!mntfp) { - netsnmp_config_error("Can't open %s (setmntent)\n", ETC_MNTTAB); - return; - } - while (mntfp && NULL != (mntent = getmntent(mntfp))) { - add_device(mntent->mnt_dir, mntent->mnt_fsname, -1, minpercent, 0); - dummy = 1; - } - if (mntfp) - endmntent(mntfp); - if(dummy != 0) { - /* - * dummy clause for else below - */ - } -#else /* getmentent but not setmntent */ - mntfp = fopen(ETC_MNTTAB, "r"); - if (!mntfp) { - netsnmp_config_error("Can't open %s (fopen)\n", ETC_MNTTAB); - return; - } - while ((i = getmntent(mntfp, &mnttab)) == 0) { - add_device(mnttab.mnt_mountp, mnttab.mnt_special, -1, minpercent, 0); - dummy = 1; - } - fclose(mntfp); - if(dummy != 0) { - /* - * dummy clause for else below - */ - } -#endif /* HAVE_SETMNTENT */ -#elif HAVE_FSTAB_H - setfsent(); /* open /etc/fstab */ - while((fstab1 = getfsent()) != NULL) { - add_device(fstab1->fs_file, fstab1->fs_spec, -1, minpercent, 0); - dummy = 1; - } - endfsent(); /* close /etc/fstab */ -#if defined(__FreeBSD__) && __FreeBSD_version >= 700055 - { - struct statfs *mntbuf; - size_t i, mntsize; - mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); - for (i = 0; i < mntsize; i++) { - if (strncmp(mntbuf[i].f_fstypename, "zfs", 3) == 0) { - add_device(mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname, -1, minpercent, 0); - } - } - } -#endif - if(dummy != 0) { - /* - * dummy clause for else below - */ - } -#elif HAVE_STATFS - /* - * since there is no way to get all the mounted systems with just - * statfs we default to the root partition "/" - */ - if (statfs("/", &statf) == 0) { - add_device("/", statf.f_mntfromname, -1, minpercent, 0); - } -#endif - else { - if (numdisks == maxdisks) { - return; - } - netsnmp_config_warn("Couldn't find device for disk %s", - disks[numdisks].path); - disks[numdisks].minimumspace = -1; - disks[numdisks].minpercent = -1; - disks[numdisks].path[0] = 0; - } -#else - config_perror("'disk' checks not supported on this architecture."); -#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */ - -} - -static char * -find_device(char *path) -{ -#if HAVE_GETMNTENT -#if HAVE_SYS_MNTTAB_H - struct mnttab mnttab; -#else - struct mntent *mntent; -#endif - FILE *mntfp; -#elif HAVE_FSTAB_H - struct fstab *fstab; -#elif HAVE_STATFS - struct statfs statf; -#endif - static char device[STRMAX]; -#if defined(HAVE_GETMNTENT) && !defined(HAVE_SETMNTENT) - int i; -#endif - - device[0] = '\0'; /* null terminate the device */ - - - /* find the device for the path and copy the device into the - * string declared above and at the end of the routine return it - * to the caller - */ -#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS -#if HAVE_GETMNTENT -#if HAVE_SETMNTENT - mntfp = setmntent(ETC_MNTTAB, "r"); - if (!mntfp) { - netsnmp_config_error("Can't open %s (setmntent)\n", ETC_MNTTAB); - return NULL; - } - while (mntfp && NULL != (mntent = getmntent(mntfp))) - if (strcmp(path, mntent->mnt_dir) == 0) { - strlcpy(device, mntent->mnt_fsname, sizeof(device)); - DEBUGMSGTL(("ucd-snmp/disk", "Disk: %s\n", - mntent->mnt_fsname)); - break; - } else { - DEBUGMSGTL(("ucd-snmp/disk", " %s != %s\n", - path, mntent->mnt_dir)); - } - if (mntfp) - endmntent(mntfp); -#else /* getmentent but not setmntent */ - mntfp = fopen(ETC_MNTTAB, "r"); - if (!mntfp) { - netsnmp_config_error("Can't open %s (fopen)\n", ETC_MNTTAB); - return NULL; - } - while ((i = getmntent(mntfp, &mnttab)) == 0) - if (strcmp(path, mnttab.mnt_mountp) == 0) - break; - else { - DEBUGMSGTL(("ucd-snmp/disk", " %s != %s\n", - path, mnttab.mnt_mountp)); - } - fclose(mntfp); - if (i == 0) - strlcpy(device, mnttab.mnt_special, sizeof(device)); -#endif /* HAVE_SETMNTENT */ -#elif HAVE_FSTAB_H - setfsent(); - if ((fstab = getfsfile(path))) - strlcpy(device, fstab->fs_spec, sizeof(device)); - endfsent(); - if (device[0] != '\0') { - /* - * dummy clause for else below - */ - } - -#elif HAVE_STATFS - if (statfs(path, &statf) == 0) { - strlcpy(device, statf.f_mntfromname, sizeof(device)); - DEBUGMSGTL(("ucd-snmp/disk", "Disk: %s\n", - statf.f_mntfromname)); - } -#endif - else { - netsnmp_config_warn("Couldn't find device for disk %s", path); - } -#else - config_perror("'disk' checks not supported on this architecture."); -#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */ - return device; -} -#endif - -/* - * Part of UCD-SNMP-MIB::dskEntry, which is so hard to fill - * (i.e. platform dependent parts). - */ -struct dsk_entry { - unsigned long long dskTotal; - unsigned long long dskUsed; - unsigned long long dskAvail; - unsigned long dskPercent; - unsigned long dskPercentInode; - unsigned long dskErrorFlag; -}; - -/** - * Fill in the provided dsk_entry structure. - * Returns -1 on error, 0 on success. - */ - -static int -fill_dsk_entry(int disknum, struct dsk_entry *entry) -{ -#if defined(HAVE_STATVFS) || defined(HAVE_STATFS) - float multiplier; -#endif -#if defined(HAVE_FSTAB_H) && !defined(HAVE_SYS_STATVFS_H) && !defined(HAVE_STATFS) - double totalblks, free, used, avail, availblks; -#endif - -#if defined(HAVE_STATVFS) || defined(HAVE_STATFS) -#ifdef STAT_STATFS_FS_DATA - struct fs_data fsd; - struct { - u_int f_blocks, f_bfree, f_bavail, f_bsize; - } vfs; -#else - struct statvfs vfs; -#endif -#else -#if HAVE_FSTAB_H - int file; - union { - struct fs iu_fs; - char dummy[SBSIZE]; - } sb; -#define filesys sb.iu_fs -#endif -#endif - - entry->dskPercentInode = -1; - -#if defined(HAVE_STATVFS) || defined(HAVE_STATFS) -#ifdef STAT_STATFS_FS_DATA - if (statvfs(disks[disknum].path, &fsd) == -1) -#else - if (statvfs(disks[disknum].path, &vfs) == -1) -#endif - { - snmp_log(LOG_ERR, "Couldn't open device %s\n", - disks[disknum].device); - setPerrorstatus("statvfs dev/disk"); - return -1; - } -#ifdef STAT_STATFS_FS_DATA - vfs.f_blocks = fsd.fd_btot; - vfs.f_bfree = fsd.fd_bfree; - vfs.f_bavail = fsd.fd_bfreen; - vfs.f_bsize = 1024; /* Ultrix f_bsize is a VM parameter apparently. */ -#endif -#if defined(HAVE_ODS) - vfs.f_blocks = vfs.f_spare[0]; - vfs.f_bfree = vfs.f_spare[1]; - vfs.f_bavail = vfs.f_spare[2]; -#endif - - multiplier = (float)vfs.f_bsize / (float)1024.0; -#ifdef HAVE_STRUCT_STATVFS_F_FRSIZE - if (vfs.f_frsize > 255) - multiplier = (float)vfs.f_frsize / (float)1024.0; -#endif - - entry->dskTotal = (unsigned long long)(vfs.f_blocks * multiplier); - entry->dskAvail = (unsigned long long)(vfs.f_bavail * multiplier); - entry->dskUsed = (unsigned long long)((vfs.f_blocks - vfs.f_bfree) * multiplier); - - entry->dskPercent = - vfs.f_blocks == 0 ? 0 : - vfs.f_bavail <= 0 ? 100 : - (int) ((double) (vfs.f_blocks - vfs.f_bfree) / - (double) (vfs.f_blocks - - (vfs.f_bfree - vfs.f_bavail)) * 100.0 + 0.5); - -#if defined(HAVE_STRUCT_STATVFS_F_FILES) || defined HAVE_STRUCT_STATFS_F_FAVAIL - entry->dskPercentInode = vfs.f_favail <= 0 ? 100 : - (int) ((double) (vfs.f_files - vfs.f_ffree) / - (double) (vfs.f_files - - (vfs.f_ffree - vfs.f_favail)) * 100.0 + 0.5); -#else -#if defined(HAVE_STRUCT_STATFS_F_FILES) && defined(HAVE_STRUCT_STATFS_F_FFREE) - entry->dskPercentInode = vfs.f_files == 0 ? 100.0 : - (int) ((double) (vfs.f_files - vfs.f_ffree) / - (double) (vfs.f_files) * 100.0 + 0.5); -#endif -#endif /* defined(HAVE_STRUCT_STATVFS_F_FILES) */ - -#elif HAVE_FSTAB_H - /* - * read the disk information - */ - if ((file = open(disks[disknum].device, 0)) < 0) { - snmp_log(LOG_ERR, "Couldn't open device %s\n", - disks[disknum].device); - setPerrorstatus("open dev/disk"); - return -1; - } - lseek(file, (long) (SBLOCK * DEV_BSIZE), 0); - if (read(file, (char *) &filesys, SBSIZE) != SBSIZE) { - setPerrorstatus("open dev/disk"); - snmp_log(LOG_ERR, "Error reading device %s\n", - disks[disknum].device); - close(file); - return -1; - } - close(file); - - totalblks = filesys.fs_dsize; - free = filesys.fs_cstotal.cs_nbfree * filesys.fs_frag + - filesys.fs_cstotal.cs_nffree; - used = totalblks - free; - availblks = totalblks * (100 - filesys.fs_minfree) / 100; - avail = availblks > used ? availblks - used : 0; - entry->dskPercent = - totalblks == 0 ? 0 : - availblks == 0 ? 100 : - (int) ((double) used / (double) totalblks * 100.0 + 0.5); - multiplier = (float)filesys.fs_fsize / (float)1024.0; - entry->dskTotal = (unsigned long long)(totalblks * multiplier); - entry->dskAvail = (unsigned long long)(avail * multiplier); - entry->dskUsed = (unsigned long long)(used * multiplier); -#else - /* MinGW */ - entry->dskPercent = 0; - entry->dskTotal = 0; - entry->dskAvail = 0; - entry->dskUsed = 0; -#endif - - entry->dskErrorFlag = - (disks[disknum].minimumspace >= 0 - ? entry->dskAvail < (unsigned long long)disks[disknum].minimumspace - : 100 - entry->dskPercent <= (unsigned int)disks[disknum].minpercent) ? 1 : 0; - - return 0; -} - -/* - * var_extensible_disk(... - * Arguments: - * vp IN - pointer to variable entry that points here - * name IN/OUT - IN/name requested, OUT/name found - * length IN/OUT - length of IN/OUT oid's - * exact IN - TRUE if an exact match was requested - * var_len OUT - length of variable or 0 if function returned - * write_method - * - */ -u_char * -var_extensible_disk(struct variable *vp, - oid * name, - size_t * length, - int exact, - size_t * var_len, WriteMethod ** write_method) -{ - int ret; - unsigned int disknum = 0; - struct dsk_entry entry; - static long long_ret; - static char errmsg[300]; - -tryAgain: - if (header_simple_table - (vp, name, length, exact, var_len, write_method, numdisks)) - return (NULL); - disknum = name[*length - 1] - 1; - if (disknum > maxdisks) - return NULL; - switch (vp->magic) { - case MIBINDEX: - long_ret = disknum + 1; - return ((u_char *) (&long_ret)); - case ERRORNAME: /* DISKPATH */ - *var_len = strlen(disks[disknum].path); - return ((u_char *) disks[disknum].path); - case DISKDEVICE: - *var_len = strlen(disks[disknum].device); - return ((u_char *) disks[disknum].device); - case DISKMINIMUM: - long_ret = disks[disknum].minimumspace; - return ((u_char *) (&long_ret)); - case DISKMINPERCENT: - long_ret = disks[disknum].minpercent; - return ((u_char *) (&long_ret)); - } - - ret = fill_dsk_entry(disknum, &entry); - if (ret < 0) { - if (!exact) - goto tryAgain; - return NULL; - } - - switch (vp->magic) { - case DISKTOTAL: - if (entry.dskTotal > MAX_INT_32) - long_ret = MAX_INT_32; - else - long_ret = (long)(entry.dskTotal); - return ((u_char *) (&long_ret)); - case DISKTOTALLOW: - long_ret = entry.dskTotal & MAX_UINT_32; - return ((u_char *) (&long_ret)); - case DISKTOTALHIGH: - long_ret = entry.dskTotal >> 32; - return ((u_char *) (&long_ret)); - - case DISKAVAIL: - if (entry.dskAvail > MAX_INT_32) - long_ret = MAX_INT_32; - else - long_ret = (long)(entry.dskAvail); - return ((u_char *) (&long_ret)); - case DISKAVAILLOW: - long_ret = entry.dskAvail & MAX_UINT_32; - return ((u_char *) (&long_ret)); - case DISKAVAILHIGH: - long_ret = entry.dskAvail >> 32; - return ((u_char *) (&long_ret)); - - case DISKUSED: - if (entry.dskUsed > MAX_INT_32) - long_ret = MAX_INT_32; - else - long_ret = (long)(entry.dskUsed); - return ((u_char *) (&long_ret)); - case DISKUSEDLOW: - long_ret = entry.dskUsed & MAX_UINT_32; - return ((u_char *) (&long_ret)); - case DISKUSEDHIGH: - long_ret = entry.dskUsed >> 32; - return ((u_char *) (&long_ret)); - - case DISKPERCENT: - long_ret = entry.dskPercent; - return ((u_char *) (&long_ret)); - - case DISKPERCENTNODE: - long_ret = entry.dskPercentInode; - return ((u_char *) (&long_ret)); - - case ERRORFLAG: - long_ret = entry.dskErrorFlag; - return ((u_char *) (&long_ret)); - - case ERRORMSG: - if (entry.dskErrorFlag) { - if (disks[disknum].minimumspace >= 0) - snprintf(errmsg, sizeof(errmsg), - "%s: less than %d free (= %d)", - disks[disknum].path, disks[disknum].minimumspace, - (int) entry.dskAvail); - else - snprintf(errmsg, sizeof(errmsg), - "%s: less than %d%% free (= %d%%)", - disks[disknum].path, disks[disknum].minpercent, - (int)entry.dskPercent); - errmsg[ sizeof(errmsg)-1 ] = 0; - } else - errmsg[0] = 0; - *var_len = strlen(errmsg); - return ((u_char *) (errmsg)); - } - return NULL; -} diff --git a/agent/mibgroup/ucd-snmp/disk.h b/agent/mibgroup/ucd-snmp/disk.h deleted file mode 100644 index 20e9332..0000000 --- a/agent/mibgroup/ucd-snmp/disk.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Template MIB group interface - disk.h - * - */ -#ifndef _MIBGROUP_DISK_H -#define _MIBGROUP_DISK_H - -void init_disk(void); - -config_require(util_funcs/header_simple_table) - - extern FindVarMethod var_extensible_disk; - -#include "mibdefs.h" - -#define DISKDEVICE 3 -#define DISKMINIMUM 4 -#define DISKMINPERCENT 5 -#define DISKTOTAL 6 -#define DISKAVAIL 7 -#define DISKUSED 8 -#define DISKPERCENT 9 -#define DISKPERCENTNODE 10 -#define DISKTOTALLOW 11 -#define DISKTOTALHIGH 12 -#define DISKAVAILLOW 13 -#define DISKAVAILHIGH 14 -#define DISKUSEDLOW 15 -#define DISKUSEDHIGH 16 - -#endif /* _MIBGROUP_DISK_H */ diff --git a/agent/mibgroup/ucd-snmp/disk_hw.c b/agent/mibgroup/ucd-snmp/disk_hw.c index ea37610..95ca19c 100644 --- a/agent/mibgroup/ucd-snmp/disk_hw.c +++ b/agent/mibgroup/ucd-snmp/disk_hw.c @@ -7,25 +7,25 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif #include -#if TIME_WITH_SYS_TIME -# include -# include +#ifdef TIME_WITH_SYS_TIME +#include +#include #else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif #endif #include @@ -33,254 +33,258 @@ #include #include "struct.h" -#include "disk.h" +#include "disk_hw.h" #include "util_funcs/header_simple_table.h" -#if USING_UCD_SNMP_ERRORMIB_MODULE +#ifdef USING_UCD_SNMP_ERRORMIB_MODULE #include "errormib.h" #else #define setPerrorstatus(x) snmp_log_perror(x) #endif -/* - * * config file parsing routines - * */ -static void disk_free_config(void); -static void disk_parse_config(const char *, char *); -static void disk_parse_config_all(const char *, char *); - -static netsnmp_fsys_info ** _expand_disk_array( char *cptr ); - #define MAX_INT_32 0x7fffffff #define MAX_UINT_32 0xffffffff -int numdisks; -int allDisksIncluded = 0; -int maxdisks = 0; -netsnmp_fsys_info **disks = NULL; - -struct variable2 extensible_disk_variables[] = { - {MIBINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {MIBINDEX}}, - {ERRORNAME, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {ERRORNAME}}, - {DISKDEVICE, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKDEVICE}}, - {DISKMINIMUM, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKMINIMUM}}, - {DISKMINPERCENT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKMINPERCENT}}, - {DISKTOTAL, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKTOTAL}}, - {DISKAVAIL, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKAVAIL}}, - {DISKUSED, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKUSED}}, - {DISKPERCENT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKPERCENT}}, - {DISKPERCENTNODE, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKPERCENTNODE}}, - {ERRORFLAG, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {ERRORFLAG}}, - {ERRORMSG, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {ERRORMSG}}, - {DISKTOTALLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKTOTALLOW}}, - {DISKTOTALHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKTOTALHIGH}}, - {DISKAVAILLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKAVAILLOW}}, - {DISKAVAILHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKAVAILHIGH}}, - {DISKUSEDLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKUSEDLOW}}, - {DISKUSEDHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, - var_extensible_disk, 1, {DISKUSEDHIGH}}, +static int numdisks; +static int allDisksIncluded; +static int allDisksMinPercent; +static int maxdisks; +static netsnmp_fsys_info **disks; + +static const struct variable2 extensible_disk_variables[] = { + {MIBINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {MIBINDEX}}, + {ERRORNAME, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {ERRORNAME}}, + {DISKDEVICE, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKDEVICE}}, + {DISKMINIMUM, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKMINIMUM}}, + {DISKMINPERCENT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKMINPERCENT}}, + {DISKTOTAL, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKTOTAL}}, + {DISKAVAIL, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKAVAIL}}, + {DISKUSED, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKUSED}}, + {DISKPERCENT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKPERCENT}}, + {DISKPERCENTNODE, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKPERCENTNODE}}, + {ERRORFLAG, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {ERRORFLAG}}, + {ERRORMSG, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {ERRORMSG}}, + {DISKTOTALLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKTOTALLOW}}, + {DISKTOTALHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKTOTALHIGH}}, + {DISKAVAILLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKAVAILLOW}}, + {DISKAVAILHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKAVAILHIGH}}, + {DISKUSEDLOW, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKUSEDLOW}}, + {DISKUSEDHIGH, ASN_UNSIGNED, NETSNMP_OLDAPI_RONLY, + var_extensible_disk, 1, {DISKUSEDHIGH}}, }; -/* - * Define the OID pointer to the top of the mib tree that we're - * registering underneath - */ -oid disk_variables_oid[] = { NETSNMP_UCDAVIS_MIB, NETSNMP_DISKMIBNUM, 1 }; - -void -init_disk_hw(void) +static netsnmp_fsys_info ** +_expand_disk_array(char *cptr) { - /* - * register ourselves with the agent to handle our mib tree - */ - REGISTER_MIB("ucd-snmp/disk", extensible_disk_variables, variable2, - disk_variables_oid); - - snmpd_register_config_handler("disk", disk_parse_config, - disk_free_config, - "path [ minspace | minpercent% ]"); - snmpd_register_config_handler("includeAllDisks", disk_parse_config_all, - disk_free_config, - "minpercent%"); - allDisksIncluded = 0; -} + int prev_max = maxdisks; -static void -disk_free_config(void) -{ - netsnmp_fsys_info *entry; - - for ( entry = netsnmp_fsys_get_first(); - entry != NULL; - entry = netsnmp_fsys_get_next( entry )) { - - entry->minspace = -1; - entry->minpercent = -1; - entry->flags &= ~NETSNMP_FS_FLAG_UCD; - } - if (disks) { - free( disks ); - disks = NULL; - maxdisks = numdisks = 0; - } - allDisksIncluded = 0; + if (maxdisks == 0) + maxdisks = 50; + else + maxdisks *= 2; + + disks = realloc(disks, maxdisks * sizeof(netsnmp_fsys_info *)); + if (!disks) { + config_perror("malloc failed for new disk allocation."); + netsnmp_config_error("\tignoring: %s", cptr); + return NULL; + } + + memset(disks + prev_max, 0, (maxdisks - prev_max) * + sizeof(netsnmp_fsys_info *)); + + return disks; } -static void +static void disk_parse_config(const char *token, char *cptr) { - char path[STRMAX]; - int minpercent; - int minspace; - netsnmp_fsys_info *entry; - - /* - * Ensure there is space for the new entry - */ - if (numdisks == maxdisks) { - if (!_expand_disk_array( cptr )) - return; - } - - /* - * read disk path (eg, /1 or /usr) - */ - copy_nword(cptr, path, sizeof(path)); - cptr = skip_not_white(cptr); - cptr = skip_white(cptr); - - /* - * read optional minimum disk usage spec - */ - if(cptr != NULL) { - if(strchr(cptr, '%') == NULL) { - minspace = atoi(cptr); - minpercent = -1; - } - else { - minspace = -1; - minpercent = atoi(cptr); - } - } else { - minspace = NETSNMP_DEFDISKMINIMUMSPACE; - minpercent = -1; - } - - /* - * check if the disk already exists, if so then modify its - * parameters. if it does not exist then add it - */ - entry = netsnmp_fsys_by_path( path, NETSNMP_FS_FIND_CREATE ); - if ( entry ) { - entry->minspace = minspace; - entry->minpercent = minpercent; - entry->flags |= NETSNMP_FS_FLAG_UCD; - disks[numdisks++] = entry; - } + char path[STRMAX]; + int minpercent; + int minspace; + netsnmp_fsys_info *entry; + + /* + * Ensure there is space for the new entry + */ + if (numdisks == maxdisks) { + if (!_expand_disk_array(cptr)) + return; + } + + /* + * read disk path (eg, /1 or /usr) + */ + copy_nword(cptr, path, sizeof(path)); + cptr = skip_not_white(cptr); + cptr = skip_white(cptr); + + /* + * read optional minimum disk usage spec + */ + if (cptr != NULL) { + if (strchr(cptr, '%') == NULL) { + minspace = atoi(cptr); + minpercent = -1; + } else { + minspace = -1; + minpercent = atoi(cptr); + } + } else { + minspace = NETSNMP_DEFDISKMINIMUMSPACE; + minpercent = -1; + } + + /* + * check if the disk already exists, if so then modify its + * parameters. if it does not exist then add it + */ + entry = netsnmp_fsys_by_path(path, NETSNMP_FS_FIND_CREATE); + if (entry) { + entry->minspace = minspace; + entry->minpercent = minpercent; + entry->flags |= NETSNMP_FS_FLAG_UCD; + disks[numdisks++] = entry; + } } -static void +static void disk_parse_config_all(const char *token, char *cptr) { - int minpercent = DISKMINPERCENT; - netsnmp_fsys_info *entry; - - /* - * read the minimum disk usage percent - */ - if(cptr != NULL) { - if(strchr(cptr, '%') != NULL) { - minpercent = atoi(cptr); - } - } - /* - * if we have already seen the "includeAllDisks" directive - * then search for the disk in the "disks" array and modify - * the values. if we havent seen the "includeAllDisks" - * directive then include this disk - */ - if(allDisksIncluded) { - config_perror("includeAllDisks already specified."); - netsnmp_config_error("\tignoring: includeAllDisks %s", cptr); - } - else { - - netsnmp_fsys_load( NULL, NULL ); /* Prime the fsys H/W module */ - for ( entry = netsnmp_fsys_get_first(); - entry != NULL; - entry = netsnmp_fsys_get_next( entry )) { - - if ( !(entry->flags & NETSNMP_FS_FLAG_ACTIVE )) - continue; - entry->minspace = -1; - entry->minpercent = minpercent; - entry->flags |= NETSNMP_FS_FLAG_UCD; - /* - * Ensure there is space for the new entry - */ - if (numdisks == maxdisks) { - if (!_expand_disk_array( entry->device )) - return; - } - disks[numdisks++] = entry; - } - allDisksIncluded = 1; - } + int minpercent = DISKMINPERCENT; + + /* + * read the minimum disk usage percent + */ + if (cptr != NULL) { + if (strchr(cptr, '%') != NULL) { + minpercent = atoi(cptr); + } + } + /* + * if we have already seen the "includeAllDisks" directive + * then search for the disk in the "disks" array and modify + * the values. if we havent seen the "includeAllDisks" + * directive then include this disk + */ + if (allDisksIncluded) { + config_perror("includeAllDisks already specified."); + netsnmp_config_error("\tignoring: includeAllDisks %s", cptr); + } else { + allDisksIncluded = 1; + allDisksMinPercent = minpercent; + } } +static void +disk_free_config(void) +{ + netsnmp_fsys_info *entry; -static int _percent( unsigned long long value, unsigned long long total ) { - float v=value, t=total, pct; - - /* avoid division by zero */ - if (total == 0) - return 0; + for (entry = netsnmp_fsys_get_first(); + entry != NULL; entry = netsnmp_fsys_get_next(entry)) { - pct = (v*100)/t; /* Calculate percentage using floating point - arithmetic, to avoid overflow errors */ - pct += 0.5; /* rounding */ - return (int)pct; + entry->minspace = -1; + entry->minpercent = -1; + entry->flags &= ~NETSNMP_FS_FLAG_UCD; + } + if (disks) { + free(disks); + disks = NULL; + maxdisks = numdisks = 0; + } + allDisksIncluded = 0; + allDisksMinPercent = 0; } -static netsnmp_fsys_info ** -_expand_disk_array( char *cptr ) { +/* + * Define the OID pointer to the top of the mib tree that we're + * registering underneath + */ +static const oid disk_variables_oid[] = { + NETSNMP_UCDAVIS_MIB, NETSNMP_DISKMIBNUM, 1 +}; - if ( maxdisks == 0 ) - maxdisks = 50; - else - maxdisks *= 2; +void +init_disk_hw(void) +{ + /* + * register ourselves with the agent to handle our mib tree + */ + REGISTER_MIB("ucd-snmp/disk", extensible_disk_variables, variable2, + disk_variables_oid); + + snmpd_register_config_handler("disk", disk_parse_config, + disk_free_config, + "path [ minspace | minpercent% ]"); + snmpd_register_config_handler("includeAllDisks", disk_parse_config_all, + disk_free_config, "minpercent%"); + allDisksIncluded = 0; + allDisksMinPercent = 0; +} - disks = realloc( disks, maxdisks * sizeof( netsnmp_fsys_info*)); - if (!disks) { - config_perror("malloc failed for new disk allocation."); - netsnmp_config_error("\tignoring: %s", cptr); - return NULL; +/* + * add new entries to dskTable dynamically + */ +static void +_refresh_disks(int minpercent) +{ + netsnmp_fsys_info *entry; + + for (entry = netsnmp_fsys_get_first(); + entry != NULL; entry = netsnmp_fsys_get_next(entry)) { + + if (!(entry->flags & NETSNMP_FS_FLAG_UCD)) { + /* + * this is new disk, add it to the table + */ + entry->minspace = -1; + entry->minpercent = minpercent; + entry->flags |= NETSNMP_FS_FLAG_UCD; + /* + * Ensure there is space for the new entry + */ + if (numdisks == maxdisks) { + if (!_expand_disk_array(entry->device)) + return; + } + disks[numdisks++] = entry; + } } +} - if ( maxdisks == 50 ) - memset(disks, 0, maxdisks * sizeof( netsnmp_fsys_info*)); - else - memset(disks + maxdisks/2, 0, maxdisks/2 * sizeof( netsnmp_fsys_info*)); +static int +_percent(unsigned long long value, unsigned long long total) +{ + float v = value, t = total, pct; - return disks; -} + /* + * avoid division by zero + */ + if (total == 0) + return 0; + pct = (v * 100) / t; /* Calculate percentage using floating point + * arithmetic, to avoid overflow errors */ + pct += 0.5; /* rounding */ + return (int) pct; +} /* * var_extensible_disk(... @@ -296,31 +300,42 @@ _expand_disk_array( char *cptr ) { u_char * var_extensible_disk(struct variable *vp, oid * name, - size_t * length, + size_t *length, int exact, - size_t * var_len, WriteMethod ** write_method) + size_t *var_len, WriteMethod ** write_method) { int disknum = 0; - netsnmp_fsys_info *entry; + const netsnmp_fsys_info *entry; unsigned long long val; static long long_ret; - static char errmsg[300]; + static char *errmsg; + static char empty_str[1]; netsnmp_cache *cache; - /* Update the fsys H/W module */ + /* + * Update the fsys H/W module + */ cache = netsnmp_fsys_get_cache(); netsnmp_cache_check_and_reload(cache); + if (allDisksIncluded) + _refresh_disks(allDisksMinPercent); -tryAgain: + tryAgain: if (header_simple_table (vp, name, length, exact, var_len, write_method, numdisks)) return (NULL); disknum = name[*length - 1] - 1; entry = disks[disknum]; - if ( !entry ) { - if (!exact || !(entry->flags & NETSNMP_FS_FLAG_UCD)) - goto tryAgain; - return NULL; + if (!entry) { + if (exact) + return NULL; + goto tryAgain; + } + if (!(entry->flags & NETSNMP_FS_FLAG_ACTIVE) + || !(entry->flags & NETSNMP_FS_FLAG_UCD)) { + if (exact) + return NULL; + goto tryAgain; } switch (vp->magic) { @@ -329,10 +344,10 @@ var_extensible_disk(struct variable *vp, return ((u_char *) (&long_ret)); case ERRORNAME: /* DISKPATH */ *var_len = strlen(entry->path); - return ((u_char *)entry->path); + return (u_char *)NETSNMP_REMOVE_CONST(char *, entry->path); case DISKDEVICE: *var_len = strlen(entry->device); - return ((u_char *)entry->device); + return (u_char *)NETSNMP_REMOVE_CONST(char *, entry->device); case DISKMINIMUM: long_ret = entry->minspace; return ((u_char *) (&long_ret)); @@ -345,7 +360,7 @@ var_extensible_disk(struct variable *vp, if (val > MAX_INT_32) long_ret = MAX_INT_32; else - long_ret = (long)val; + long_ret = (long) val; return ((u_char *) (&long_ret)); case DISKTOTALLOW: long_ret = netsnmp_fsys_size_ull(entry) & MAX_UINT_32; @@ -353,13 +368,13 @@ var_extensible_disk(struct variable *vp, case DISKTOTALHIGH: long_ret = netsnmp_fsys_size_ull(entry) >> 32; return ((u_char *) (&long_ret)); - + case DISKAVAIL: val = netsnmp_fsys_avail_ull(entry); if (val > MAX_INT_32) long_ret = MAX_INT_32; else - long_ret = (long)val; + long_ret = (long) val; return ((u_char *) (&long_ret)); case DISKAVAILLOW: long_ret = netsnmp_fsys_avail_ull(entry) & MAX_UINT_32; @@ -373,7 +388,7 @@ var_extensible_disk(struct variable *vp, if (val > MAX_INT_32) long_ret = MAX_INT_32; else - long_ret = (long)val; + long_ret = (long) val; return ((u_char *) (&long_ret)); case DISKUSEDLOW: long_ret = netsnmp_fsys_used_ull(entry) & MAX_UINT_32; @@ -383,42 +398,42 @@ var_extensible_disk(struct variable *vp, return ((u_char *) (&long_ret)); case DISKPERCENT: - long_ret = _percent( entry->used, entry->size ); + long_ret = _percent(entry->used, entry->size); return ((u_char *) (&long_ret)); case DISKPERCENTNODE: - long_ret = _percent( entry->inums_total - entry->inums_avail, entry->inums_total ); + long_ret = + _percent(entry->inums_total - entry->inums_avail, + entry->inums_total); return ((u_char *) (&long_ret)); case ERRORFLAG: long_ret = 0; val = netsnmp_fsys_avail_ull(entry); - if (( entry->minspace >= 0 ) && - ( val < entry->minspace )) + if ((entry->minspace >= 0) && (val < entry->minspace)) long_ret = 1; - else if (( entry->minpercent >= 0 ) && - (_percent( entry->avail, entry->size ) < entry->minpercent )) + else if ((entry->minpercent >= 0) && + (_percent(entry->avail, entry->size) < entry->minpercent)) long_ret = 1; return ((u_char *) (&long_ret)); case ERRORMSG: - errmsg[0] = 0; + free(errmsg); + errmsg = NULL; + *var_len = 0; val = netsnmp_fsys_avail_ull(entry); - if (( entry->minspace >= 0 ) && - ( val < entry->minspace )) - snprintf(errmsg, sizeof(errmsg), - "%s: less than %d free (= %d)", - entry->path, entry->minspace, - (int) val); - else if (( entry->minpercent >= 0 ) && - (_percent( entry->avail, entry->size ) < entry->minpercent )) - snprintf(errmsg, sizeof(errmsg), - "%s: less than %d%% free (= %d%%)", - entry->path, entry->minpercent, - _percent( entry->avail, entry->size )); - errmsg[ sizeof(errmsg)-1 ] = 0; - *var_len = strlen(errmsg); - return ((u_char *) (errmsg)); + if ((entry->minspace >= 0 && val < entry->minspace && + asprintf(&errmsg, "%s: less than %d free (= %d)", entry->path, + entry->minspace, (int) val) >= 0) || + (entry->minpercent >= 0 && + _percent(entry->avail, entry->size) < entry->minpercent && + asprintf(&errmsg, "%s: less than %d%% free (= %d%%)", + entry->path, entry->minpercent, + _percent(entry->avail, entry->size)) + >= 0)) { + *var_len = strlen(errmsg); + } + return (u_char *) (errmsg ? errmsg : empty_str); } return NULL; } diff --git a/agent/mibgroup/ucd-snmp/disk_hw.h b/agent/mibgroup/ucd-snmp/disk_hw.h index ff42ed9..85c96de 100644 --- a/agent/mibgroup/ucd-snmp/disk_hw.h +++ b/agent/mibgroup/ucd-snmp/disk_hw.h @@ -7,8 +7,8 @@ void init_disk_hw(void); -config_require(util_funcs/header_simple_table) -config_require(hardware/fsys) +config_require(util_funcs/header_simple_table); +config_require(hardware/fsys); extern FindVarMethod var_extensible_disk; diff --git a/agent/mibgroup/ucd-snmp/diskio.c b/agent/mibgroup/ucd-snmp/diskio.c index 4ea8987..36beb12 100644 --- a/agent/mibgroup/ucd-snmp/diskio.c +++ b/agent/mibgroup/ucd-snmp/diskio.c @@ -14,11 +14,11 @@ /* * needed by util_funcs.h */ -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -27,12 +27,23 @@ #include +#if defined (linux) +/* for stat() */ +#include +#include +#endif + +#ifdef HAVE_SYS_SYSMACROS_H +#include /* major() */ +#endif + #include #include #include #include "util_funcs/header_simple_table.h" +#include "struct.h" /* * include our .h file */ @@ -77,9 +88,9 @@ static int ps_numdisks; /* number of disks in system, may change while running #if defined(HAVE_GETDEVS) || defined(HAVE_DEVSTAT_GETDEVS) #include -#if HAVE_DEVSTAT_GETDEVS +#ifdef HAVE_DEVSTAT_GETDEVS #include /* for CPUSTATES in devstat.h */ -#elif HAVE_SYS_DKSTAT_H +#elif defined(HAVE_SYS_DKSTAT_H) #include #endif #include @@ -91,7 +102,7 @@ static int ps_numdisks; /* number of disks in system, may change while running #endif /* freebsd */ -#if HAVE_DEVSTAT_GETDEVS +#ifdef HAVE_DEVSTAT_GETDEVS #define GETDEVS(x) devstat_getdevs(NULL, (x)) #else #define GETDEVS(x) getdevs((x)) @@ -100,6 +111,54 @@ static int ps_numdisks; /* number of disks in system, may change while running #if defined (linux) #define DISKIO_SAMPLE_INTERVAL 5 void devla_getstats(unsigned int regno, void * dummy); +static void diskio_parse_config_disks(const char *token, char *cptr); +static int diskio_pre_update_config(int, int, void *, void *); +static void diskio_free_config(void); + +#define DISK_INCR 2 + +typedef struct linux_diskio +{ + int major; + int minor; + unsigned long blocks; + char name[256]; + unsigned long rio; + unsigned long rmerge; + unsigned long rsect; + unsigned long ruse; + unsigned long wio; + unsigned long wmerge; + unsigned long wsect; + unsigned long wuse; + unsigned long running; + unsigned long use; + unsigned long aveq; +} linux_diskio; + +/* disk load averages */ +typedef struct linux_diskio_la +{ + unsigned long use_prev; + double la1, la5, la15; +} linux_diskio_la; + +typedef struct linux_diskio_header +{ + linux_diskio* indices; + int length; + int alloc; +} linux_diskio_header; + +typedef struct linux_diskio_la_header +{ + linux_diskio_la * indices; + int length; +} linux_diskio_la_header; + +static linux_diskio_header head; +static linux_diskio_la_header la_head; + #endif /* linux */ #if defined (darwin) @@ -120,10 +179,18 @@ static int getstats(void); void devla_getstats(unsigned int regno, void *dummy); #endif -FILE *file; - #ifdef linux -static int diskio_free_config(int, int, void *, void *); +struct diskiopart { + char syspath[STRMAX]; /* full stat path */ + char name[STRMAX]; /* name as provided */ + char shortname[STRMAX]; /* short name for output */ + int major; + int minor; +}; + +static int numdisks; +static int maxdisks = 0; +static struct diskiopart *disks; #endif /********************* @@ -184,6 +251,8 @@ init_diskio(void) var_diskio, 1, {12}}, {DISKIO_NWRITTENX, ASN_COUNTER64, NETSNMP_OLDAPI_RONLY, var_diskio, 1, {13}}, + {DISKIO_BUSYTIME, ASN_COUNTER64, NETSNMP_OLDAPI_RONLY, + var_diskio, 1, {14}}, }; /* @@ -249,11 +318,13 @@ init_diskio(void) NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_DISKIO_NO_RAM); - /* or possible an exclusion pattern? */ + snmpd_register_config_handler("diskio", diskio_parse_config_disks, + diskio_free_config, "path | device"); + snmp_register_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, - diskio_free_config, NULL); + diskio_pre_update_config, NULL); #endif } @@ -261,8 +332,17 @@ init_diskio(void) #ifdef linux /* to do: make sure diskio_free_config() gets invoked upon SIGHUP. */ static int -diskio_free_config(int major, int minor, void *serverarg, void *clientarg) +diskio_pre_update_config(int major, int minor, void *serverarg, void *clientarg) { + diskio_free_config(); + return 0; +} + +static void +diskio_free_config(void) +{ + int i; + DEBUGMSGTL(("diskio", "free config %d\n", netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_DISKIO_NO_RAM))); @@ -272,9 +352,138 @@ diskio_free_config(int major, int minor, void *serverarg, void *clientarg) NETSNMP_DS_AGENT_DISKIO_NO_LOOP, 0); netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_DISKIO_NO_RAM, 0); - return 0; + + if (la_head.length) { + /* reset any usage stats, we may get different list of devices from config */ + free(la_head.indices); + la_head.length = 0; + la_head.indices = NULL; + } + if (numdisks > 0) { + head.length = 0; + numdisks = 0; + for (i = 0; i < maxdisks; i++) { /* init/erase disk db */ + disks[i].syspath[0] = 0; + disks[i].name[0] = 0; + disks[i].shortname[0] = 0; + disks[i].major = -1; + disks[i].minor = -1; + } + } } -#endif + +static int +disk_exists(char *path) +{ + int index; + for(index = 0; index < numdisks; index++) { + DEBUGMSGTL(("ucd-snmp/disk", "Checking for %s. Found %s at %d\n", path, disks[index].syspath, index)); + if(strcmp(path, disks[index].syspath) == 0) { + return index; + } + } + return -1; +} + +static void +add_device(char *path, int addNewDisks ) +{ + int index; + char device[STRMAX]; + char syspath[STRMAX]; + char *basename; + struct stat stbuf; + + if (!path || !strcmp(path, "none")) { + DEBUGMSGTL(("ucd-snmp/diskio", "Skipping null path device (%s)\n", path)); + return; + } + if (numdisks == maxdisks) { + if (maxdisks == 0) { + maxdisks = 50; + disks = malloc(maxdisks * sizeof(struct diskiopart)); + if (!disks) { + config_perror("malloc failed for new disko allocation."); + netsnmp_config_error("\tignoring: %s", path); + return; + } + memset(disks, 0, maxdisks * sizeof(struct diskiopart)); + } else { + struct diskiopart *newdisks; + maxdisks *= 2; + newdisks = realloc(disks, maxdisks * sizeof(struct diskiopart)); + if (!newdisks) { + free(disks); + disks = NULL; + config_perror("malloc failed for new disko allocation."); + netsnmp_config_error("\tignoring: %s", path); + return; + } + disks = newdisks; + memset(disks + maxdisks/2, 0, maxdisks/2 * sizeof(struct diskiopart)); + } + } + + /* first find the path for this device */ + device[0]='\0'; + if ( *path != '/' ) { + strlcpy(device, "/dev/", STRMAX - 1 ); + } + strncat(device, path, STRMAX - 1 ); + + /* check for /dev existence */ + if ( stat(device,&stbuf)!=0 ) { /* ENOENT */ + config_perror("diskio path does not exist."); + netsnmp_config_error("\tignoring: %s", path); + return; + } + else if ( ! S_ISBLK(stbuf.st_mode) ) { /* ENODEV */ + config_perror("diskio path is not a device."); + netsnmp_config_error("\tignoring: %s", path); + return; + } + + /* either came with a slash or we just put one there, so the following always works */ + basename = strrchr(device, '/' )+1; + /* construct a sys path using the device numbers to avoid having to disambiguate the various text forms */ + snprintf( syspath, STRMAX - 1, "/sys/dev/block/%d:%d/stat", major(stbuf.st_rdev), minor(stbuf.st_rdev) ); + DEBUGMSGTL(("ucd-snmp/diskio", " monitoring sys path (%s)\n", syspath)); + + index = disk_exists(syspath); + + if(index == -1 && addNewDisks){ + /* The following buffers are cleared above, no need to add '\0' */ + strlcpy(disks[numdisks].syspath, syspath, sizeof(disks[numdisks].syspath) - 1); + strlcpy(disks[numdisks].name, path, sizeof(disks[numdisks].name) - 1); + strlcpy(disks[numdisks].shortname, basename, sizeof(disks[numdisks].shortname) - 1); + disks[numdisks].major = major(stbuf.st_rdev); + disks[numdisks].minor = minor(stbuf.st_rdev); + numdisks++; + } +} + +static void +diskio_parse_config_disks(const char *token, char *cptr) +{ +#if defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS) + char path[STRMAX]; + + + /* + * read disk path (eg, /1 or /usr) + */ + copy_nword(cptr, path, sizeof(path)); + + /* TODO: we may include regular expressions in future */ + /* + * check if the disk already exists, if so then modify its + * parameters. if it does not exist then add it + */ + add_device(path, 1); +#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */ +} + +#endif /* linux */ #ifdef solaris2 @@ -354,12 +563,12 @@ var_diskio(struct variable * vp, return (u_char *) & long_ret; case DISKIO_NREADX: *var_len = sizeof(struct counter64); - c64_ret.low = kio.nread & 0xffffffff;; + c64_ret.low = kio.nread & 0xffffffff; c64_ret.high = kio.nread >> 32; return (u_char *) & c64_ret; case DISKIO_NWRITTENX: *var_len = sizeof(struct counter64); - c64_ret.low = kio.nwritten & 0xffffffff;; + c64_ret.low = kio.nwritten & 0xffffffff; c64_ret.high = kio.nwritten >> 32; return (u_char *) & c64_ret; case DISKIO_READS: @@ -566,6 +775,7 @@ var_diskio(struct variable * vp, int exact, size_t * var_len, WriteMethod ** write_method) { static long long_ret; + static long long longlong_ret; static struct counter64 c64_ret; unsigned int indx; @@ -609,7 +819,12 @@ var_diskio(struct variable * vp, c64_ret.low = dk[indx].ds_rbytes & 0xffffffff; c64_ret.high = dk[indx].ds_rbytes >> 32; return (u_char *) & c64_ret; - + case DISKIO_BUSYTIME: + *var_len = sizeof(struct counter64); + longlong_ret = dk[indx].ds_time.tv_sec*1000000 + dk[indx].ds_time.tv_usec; + c64_ret.low = longlong_ret & 0xffffffff; + c64_ret.high = longlong_ret >> 32; + return (u_char *) &c64_ret; default: ERROR_MSG("diskio.c: don't know how to handle this request."); } @@ -699,6 +914,8 @@ var_diskio(struct variable * vp, int exact, size_t * var_len, WriteMethod ** write_method) { static long long_ret; + static long long longlong_ret; + static struct counter64 c64_ret; unsigned int indx; if (getstats() == 0) @@ -741,6 +958,20 @@ var_diskio(struct variable * vp, #endif return (u_char *) & long_ret; + case DISKIO_NREADX: + *var_len = sizeof(struct counter64); + longlong_ret = dk[indx].rbytes; + c64_ret.low = longlong_ret & 0xffffffff; + c64_ret.high = longlong_ret >> 32; + return (u_char *) & c64_ret; + + case DISKIO_NWRITTENX: + *var_len = sizeof(struct counter64); + longlong_ret = dk[indx].wbytes; + c64_ret.low = longlong_ret & 0xffffffff; + c64_ret.high = longlong_ret >> 32; + return (u_char *) & c64_ret; + case DISKIO_READS: #ifdef HW_DISKSTATS long_ret = dk[indx].dk_rxfer; @@ -761,6 +992,21 @@ var_diskio(struct variable * vp, #endif return (u_char *) & long_ret; + case DISKIO_BUSYTIME: +#ifdef HW_IOSTATS + *var_len = sizeof(struct counter64); + if (dk[indx].type == IOSTAT_DISK) { + longlong_ret = dk[indx].time_sec*1000 + dk[indx].time_usec/1000; + c64_ret.low = longlong_ret & 0xffffffff; + c64_ret.high = longlong_ret >> 32; + return (u_char *) & c64_ret; + } + else + return NULL; +#else + return NULL; +#endif + default: ERROR_MSG("diskio.c: don't know how to handle this request."); } @@ -773,7 +1019,7 @@ var_diskio(struct variable * vp, /* disk load average patch by Rojer */ struct dev_la { -#if HAVE_DEVSTAT_GETDEVS +#ifdef HAVE_DEVSTAT_GETDEVS struct bintime prev; #else struct timeval prev; @@ -785,7 +1031,7 @@ struct dev_la { static struct dev_la *devloads = NULL; static int ndevs = 0; -#if ! HAVE_DEVSTAT_GETDEVS +#ifndef HAVE_DEVSTAT_GETDEVS double devla_timeval_diff(struct timeval *t1, struct timeval *t2) { double dt1 = (double) t1->tv_sec + (double) t1->tv_usec * 0.000001; @@ -847,7 +1093,7 @@ void devla_getstats(unsigned int regno, void *dummy) { } for (i=0; idinfo->devices[i].busy_time, &devloads[i].prev); #else busy_time = devla_timeval_diff(&devloads[i].prev, &lastat->dinfo->devices[i].busy_time); @@ -937,28 +1183,28 @@ var_diskio(struct variable * vp, switch (vp->magic) { case DISKIO_INDEX: - long_ret = (long) indx + 1;; + long_ret = (long) indx + 1; return (u_char *) & long_ret; case DISKIO_DEVICE: *var_len = strlen(stat->dinfo->devices[indx].device_name); return (u_char *) stat->dinfo->devices[indx].device_name; case DISKIO_NREAD: -#if HAVE_DEVSTAT_GETDEVS - long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ]; +#ifdef HAVE_DEVSTAT_GETDEVS + long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ] & 0xFFFFFFFF; #else long_ret = (signed long) stat->dinfo->devices[indx].bytes_read; #endif return (u_char *) & long_ret; case DISKIO_NWRITTEN: -#if HAVE_DEVSTAT_GETDEVS - long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE]; +#ifdef HAVE_DEVSTAT_GETDEVS + long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE] & 0xFFFFFFFF; #else long_ret = (signed long) stat->dinfo->devices[indx].bytes_written; #endif return (u_char *) & long_ret; case DISKIO_NREADX: *var_len = sizeof(struct counter64); -#if HAVE_DEVSTAT_GETDEVS +#ifdef HAVE_DEVSTAT_GETDEVS longlong_ret = stat->dinfo->devices[indx].bytes[DEVSTAT_READ]; #else longlong_ret = stat->dinfo->devices[indx].bytes_read; @@ -968,7 +1214,7 @@ var_diskio(struct variable * vp, return (u_char *) & c64_ret; case DISKIO_NWRITTENX: *var_len = sizeof(struct counter64); -#if HAVE_DEVSTAT_GETDEVS +#ifdef HAVE_DEVSTAT_GETDEVS longlong_ret = stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE]; #else longlong_ret = stat->dinfo->devices[indx].bytes_written; @@ -977,15 +1223,15 @@ var_diskio(struct variable * vp, c64_ret.high = longlong_ret >> 32; return (u_char *) & c64_ret; case DISKIO_READS: -#if HAVE_DEVSTAT_GETDEVS - long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_READ]; +#ifdef HAVE_DEVSTAT_GETDEVS + long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_READ] & 0xFFFFFFFF; #else long_ret = (signed long) stat->dinfo->devices[indx].num_reads; #endif return (u_char *) & long_ret; case DISKIO_WRITES: -#if HAVE_DEVSTAT_GETDEVS - long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_WRITE]; +#ifdef HAVE_DEVSTAT_GETDEVS + long_ret = (signed long) stat->dinfo->devices[indx].operations[DEVSTAT_WRITE] & 0xFFFFFFFF; #else long_ret = (signed long) stat->dinfo->devices[indx].num_writes; #endif @@ -1010,49 +1256,6 @@ var_diskio(struct variable * vp, #ifdef linux -#define DISK_INCR 2 - -typedef struct linux_diskio -{ - int major; - int minor; - unsigned long blocks; - char name[256]; - unsigned long rio; - unsigned long rmerge; - unsigned long rsect; - unsigned long ruse; - unsigned long wio; - unsigned long wmerge; - unsigned long wsect; - unsigned long wuse; - unsigned long running; - unsigned long use; - unsigned long aveq; -} linux_diskio; - -/* disk load averages */ -typedef struct linux_diskio_la -{ - unsigned long use_prev; - double la1, la5, la15; -} linux_diskio_la; - -typedef struct linux_diskio_header -{ - linux_diskio* indices; - int length; - int alloc; -} linux_diskio_header; - -typedef struct linux_diskio_la_header -{ - linux_diskio_la * indices; - int length; -} linux_diskio_la_header; - -static linux_diskio_header head; -static linux_diskio_la_header la_head; void devla_getstats(unsigned int regno, void * dummy) { @@ -1116,9 +1319,52 @@ int is_excluded(const char *name) return 0; } +static int get_sysfs_stats(void) +{ + int i; + char buffer[1024]; + + head.length = 0; + + for(i = 0; i < numdisks; i++) { + FILE *f = fopen(disks[i].syspath, "r"); + if ( f == NULL ) { + DEBUGMSGTL(("ucd-snmp/diskio", "Can't open %s, skipping", disks[i].syspath)); + continue; + } + + if (fgets(buffer, sizeof(buffer), f) == NULL) { + DEBUGMSGTL(("ucd-snmp/diskio", "Can't read %s, skipping", disks[i].syspath)); + fclose(f); + continue; + } + + linux_diskio* pTemp; + if (head.length == head.alloc) { + head.alloc += DISK_INCR; + head.indices = (linux_diskio *) realloc(head.indices, head.alloc*sizeof(linux_diskio)); + } + pTemp = &head.indices[head.length]; + pTemp->major = disks[i].major; + pTemp->minor = disks[i].minor; + strlcpy( pTemp->name, disks[i].shortname, sizeof(pTemp->name) - 1 ); + if (sscanf (buffer, "%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu\n", + &pTemp->rio, &pTemp->rmerge, &pTemp->rsect, &pTemp->ruse, + &pTemp->wio, &pTemp->wmerge, &pTemp->wsect, &pTemp->wuse, + &pTemp->running, &pTemp->use, &pTemp->aveq) != 11) + sscanf (buffer, "%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu%*[ \n\t]%lu\n", + &pTemp->rio, &pTemp->rsect, + &pTemp->wio, &pTemp->wsect); + head.length++; + fclose(f); + } + return 0; +} + static int getstats(void) { + struct stat stbuf; FILE* parts; time_t now; @@ -1135,6 +1381,13 @@ getstats(void) memset(head.indices, 0, head.alloc*sizeof(linux_diskio)); + if (numdisks>0) { + /* 'diskio' configuration is used - go through the whitelist only and + * read /sys/dev/block/xxx */ + cache_time = now; + return get_sysfs_stats(); + } + /* 'diskio' configuration is not used - report all devices */ /* Is this a 2.6 kernel? */ parts = fopen("/proc/diskstats", "r"); if (parts) { @@ -1160,6 +1413,10 @@ getstats(void) head.length++; } } + else if (stat("/proc/vz", &stbuf) == 0) { + /* OpenVZ / Virtuozzo containers do not have /proc/diskstats */ + goto update_cache_time; + } else { /* See if a 2.4 kernel */ char buffer[1024]; @@ -1173,8 +1430,8 @@ getstats(void) /* * first few fscanfs are garbage we don't care about. skip it. */ - fgets(buffer, sizeof(buffer), parts); - fgets(buffer, sizeof(buffer), parts); + NETSNMP_IGNORE_RESULT(fgets(buffer, sizeof(buffer), parts)); + NETSNMP_IGNORE_RESULT(fgets(buffer, sizeof(buffer), parts)); while (! feof(parts)) { linux_diskio* pTemp; @@ -1185,7 +1442,7 @@ getstats(void) } pTemp = &head.indices[head.length]; - rc = fscanf (parts, "%d %d %lu %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n", + rc = fscanf(parts, "%d %d %lu %255s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n", &pTemp->major, &pTemp->minor, &pTemp->blocks, pTemp->name, &pTemp->rio, &pTemp->rmerge, &pTemp->rsect, &pTemp->ruse, &pTemp->wio, &pTemp->wmerge, &pTemp->wsect, &pTemp->wuse, @@ -1201,6 +1458,8 @@ getstats(void) } fclose(parts); + +update_cache_time: cache_time = now; return 0; } @@ -1251,14 +1510,28 @@ var_diskio(struct variable * vp, long_ret = head.indices[indx].wio & 0xffffffff; return (u_char *) & long_ret; case DISKIO_LA1: - long_ret = la_head.indices[indx].la1; + if (la_head.length > indx) + long_ret = la_head.indices[indx].la1; + else + long_ret = 0; /* we don't have the load yet */ return (u_char *) & long_ret; case DISKIO_LA5: - long_ret = la_head.indices[indx].la5; + if (la_head.length > indx) + long_ret = la_head.indices[indx].la5; + else + long_ret = 0; /* we don't have the load yet */ return (u_char *) & long_ret; case DISKIO_LA15: - long_ret = la_head.indices[indx].la15; + if (la_head.length > indx) + long_ret = la_head.indices[indx].la15; + else + long_ret = 0; return (u_char *) & long_ret; + case DISKIO_BUSYTIME: + *var_len = sizeof(struct counter64); + c64_ret.low = head.indices[indx].use*1000 & 0xffffffff; + c64_ret.high = head.indices[indx].use*1000 >> 32; + return (u_char *) & c64_ret; case DISKIO_NREADX: *var_len = sizeof(struct counter64); c64_ret.low = head.indices[indx].rsect * 512 & 0xffffffff; @@ -1617,12 +1890,12 @@ var_diskio(struct variable * vp, return (u_char *) & long_ret; case DISKIO_NREADX: *var_len = sizeof(struct counter64); - c64_ret.low = (ps_disk[indx].rblks * ps_disk[indx].bsize) & 0xffffffff;; + c64_ret.low = (ps_disk[indx].rblks * ps_disk[indx].bsize) & 0xffffffff; c64_ret.high = (ps_disk[indx].rblks * ps_disk[indx].bsize) >> 32; return (u_char *) & c64_ret; case DISKIO_NWRITTENX: *var_len = sizeof(struct counter64); - c64_ret.low = (ps_disk[indx].wblks * ps_disk[indx].bsize) & 0xffffffff;; + c64_ret.low = (ps_disk[indx].wblks * ps_disk[indx].bsize) & 0xffffffff; c64_ret.high = (ps_disk[indx].wblks * ps_disk[indx].bsize) >> 32; return (u_char *) & c64_ret; diff --git a/agent/mibgroup/ucd-snmp/diskio.h b/agent/mibgroup/ucd-snmp/diskio.h index 8cd206b..8d45122 100644 --- a/agent/mibgroup/ucd-snmp/diskio.h +++ b/agent/mibgroup/ucd-snmp/diskio.h @@ -1,8 +1,8 @@ #ifndef _MIBGROUP_DISKIO_H #define _MIBGROUP_DISKIO_H -config_require(util_funcs/header_simple_table) -config_add_mib(UCD-DISKIO-MIB) +config_require(util_funcs/header_simple_table); +config_add_mib(UCD-DISKIO-MIB); /* * Define all our functions using prototyping for ANSI compilers @@ -34,5 +34,6 @@ config_add_mib(UCD-DISKIO-MIB) #define DISKIO_LA15 11 #define DISKIO_NREADX 12 #define DISKIO_NWRITTENX 13 +#define DISKIO_BUSYTIME 14 #endif /* _MIBGROUP_DISKIO_H */ diff --git a/agent/mibgroup/ucd-snmp/dlmod.c b/agent/mibgroup/ucd-snmp/dlmod.c index 0b711fb..2cc8739 100644 --- a/agent/mibgroup/ucd-snmp/dlmod.c +++ b/agent/mibgroup/ucd-snmp/dlmod.c @@ -6,11 +6,11 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -35,7 +35,7 @@ struct dlmod { int index; char name[64 + 1]; char path[255 + 1]; - char error[255 + 1]; + char *error; void *handle; int status; }; @@ -84,6 +84,7 @@ dlmod_delete_module(struct dlmod *dlm) for (pdlmod = &dlmods; *pdlmod; pdlmod = &((*pdlmod)->next)) if (*pdlmod == dlm) { *pdlmod = dlm->next; + free(dlm->error); free(dlm); return; } @@ -185,34 +186,44 @@ dlmod_load_module(struct dlmod *dlm) DEBUGMSGTL(("dlmod", "dlmod_load_module %s: %s\n", dlm->name, dlm->path)); - if (!dlm || !dlm->path || !dlm->name || - (dlm->status != DLMOD_UNLOADED && dlm->status != DLMOD_ERROR)) + if (!dlm || (dlm->status != DLMOD_UNLOADED && dlm->status != DLMOD_ERROR)) return; + free(dlm->error); + dlm->error = NULL; + if (dlmod_is_abs_path(dlm->path)) { dlm->handle = dlmod_dlopen(dlm->path); if (dlm->handle == NULL) { - snprintf(dlm->error, sizeof(dlm->error), - "dlopen(%s) failed: %s", dlm->path, dlmod_dlerror()); + if (asprintf(&dlm->error, "dlopen(%s) failed: %s", dlm->path, + dlmod_dlerror()) < 0) + dlm->error = NULL; dlm->status = DLMOD_ERROR; return; } } else { - char *st, *p, tmp_path[255]; + char *st, *p, *tmp_path = NULL; for (p = strtok_r(dlmod_path, ENV_SEPARATOR, &st); p; p = strtok_r(NULL, ENV_SEPARATOR, &st)) { - snprintf(tmp_path, sizeof(tmp_path), "%s/%s.%s", p, dlm->path, - dlmod_dl_suffix); + free(tmp_path); + if (asprintf(&tmp_path, "%s/%s.%s", p, dlm->path, dlmod_dl_suffix) + < 0) { + dlm->status = DLMOD_ERROR; + return; + } DEBUGMSGTL(("dlmod", "p: %s tmp_path: %s\n", p, tmp_path)); - dlm->handle = dlmod_dlopen(tmp_path); + dlm->handle = tmp_path ? dlmod_dlopen(tmp_path) : NULL; if (dlm->handle == NULL) { - snprintf(dlm->error, sizeof(dlm->error), - "dlopen(%s) failed: %s", tmp_path, dlmod_dlerror()); + free(dlm->error); + if (asprintf(&dlm->error, "dlopen(%s) failed: %s", tmp_path, + dlmod_dlerror()) < 0) + dlm->error = NULL; dlm->status = DLMOD_ERROR; } } strlcpy(dlm->path, tmp_path, sizeof(dlm->path)); + free(tmp_path); if (dlm->status == DLMOD_ERROR) return; } @@ -224,15 +235,17 @@ dlmod_load_module(struct dlmod *dlm) dl_init = dlmod_dlsym(dlm->handle, sym_init); if (dl_init == NULL) { dlmod_dlclose(dlm->handle); - snprintf(dlm->error, sizeof(dlm->error), - "dlsym failed: can't find \'%s\'", sym_init); + free(dlm->error); + if (asprintf(&dlm->error, "dlsym failed: can't find \'%s\'", + sym_init) < 0) + dlm->error = NULL; dlm->status = DLMOD_ERROR; return; } dl_init(); } - dlm->error[0] = '\0'; + dlm->error = NULL; dlm->status = DLMOD_LOADED; } @@ -333,6 +346,7 @@ dlmod_free_config(void) dtmp2 = dtmp; dtmp = dtmp->next; dlmod_unload_module(dtmp2); + free(dtmp2->error); free(dtmp2); } dlmods = NULL; @@ -380,7 +394,7 @@ header_dlmod(struct variable *vp, memcpy(name, newname, (vp->namelen + 1) * sizeof(oid)); *length = vp->namelen + 1; - *write_method = 0; + *write_method = NULL; *var_len = sizeof(long); /* default to 'long' results */ return MATCH_SUCCEEDED; } @@ -397,7 +411,7 @@ var_dlmod(struct variable * vp, * variables we may use later */ - *write_method = 0; /* assume it isn't writable for the time being */ + *write_method = NULL; /* assume it isn't writable for the time being */ *var_len = sizeof(int); /* assume an integer and change later if not */ if (header_dlmod(vp, name, length, exact, @@ -556,7 +570,7 @@ header_dlmodEntry(struct variable *vp, unsigned int dlmod_index; memcpy(newname, vp->name, vp->namelen * sizeof(oid)); - *write_method = 0; + *write_method = NULL; for (dlmod_index = 1; dlmod_index < dlmod_next_index; dlmod_index++) { dlm = dlmod_get_by_index(dlmod_index); @@ -618,7 +632,7 @@ var_dlmodEntry(struct variable * vp, *var_len = strlen(dlm->path); return (unsigned char *) dlm->path; case DLMODERROR: - *var_len = strlen(dlm->error); + *var_len = dlm->error ? strlen(dlm->error) : 0; return (unsigned char *) dlm->error; case DLMODSTATUS: *write_method = write_dlmodStatus; @@ -686,7 +700,7 @@ init_dlmod(void) DEBUGMSGTL(("dlmod", "dlmod_path: %s\n", dlmod_path)); } -netsnmp_feature_require(snmpd_unregister_config_handler) +netsnmp_feature_require(snmpd_unregister_config_handler); void shutdown_dlmod(void) diff --git a/agent/mibgroup/ucd-snmp/dlmod.h b/agent/mibgroup/ucd-snmp/dlmod.h index 9592bdd..b5dfa8b 100644 --- a/agent/mibgroup/ucd-snmp/dlmod.h +++ b/agent/mibgroup/ucd-snmp/dlmod.h @@ -7,10 +7,10 @@ #define MIBGROUP_DLMOD_H #if (!defined(HAVE_DLFCN_H) || !defined(HAVE_DLOPEN)) && !defined(WIN32) -config_error(Dynamic modules not supported on this platform) +config_error(Dynamic modules not supported on this platform); #endif -config_add_mib(UCD-DLMOD-MIB) +config_add_mib(UCD-DLMOD-MIB); void init_dlmod(void); void shutdown_dlmod(void); diff --git a/agent/mibgroup/ucd-snmp/errormib.c b/agent/mibgroup/ucd-snmp/errormib.c index 7f3bcb1..53f4ea9 100644 --- a/agent/mibgroup/ucd-snmp/errormib.c +++ b/agent/mibgroup/ucd-snmp/errormib.c @@ -1,49 +1,49 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_MACHINE_PARAM_H +#ifdef HAVE_MACHINE_PARAM_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #if !(defined(bsdi2) || defined(netbsd1)) #include #endif #endif -#if HAVE_SYS_CONF_H +#ifdef HAVE_SYS_CONF_H #include #endif -#if HAVE_ASM_PAGE_H +#ifdef HAVE_ASM_PAGE_H #include #endif -#if HAVE_SYS_SWAP_H +#ifdef HAVE_SYS_SWAP_H #include #endif -#if HAVE_SYS_FS_H +#ifdef HAVE_SYS_FS_H #include #else -#if HAVE_UFS_FS_H +#ifdef HAVE_UFS_FS_H #include #else #ifdef HAVE_SYS_STAT_H @@ -60,52 +60,52 @@ #ifdef HAVE_UFS_UFS_INODE_H #include #endif -#if HAVE_UFS_FFS_FS_H +#ifdef HAVE_UFS_FFS_FS_H #include #endif #endif #endif -#if HAVE_MTAB_H +#ifdef HAVE_MTAB_H #include #endif #include -#if HAVE_FSTAB_H +#ifdef HAVE_FSTAB_H #include #endif -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif #if (!defined(HAVE_STATVFS)) && defined(HAVE_STATFS) -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif #define statvfs statfs #endif -#if HAVE_VM_VM_H +#ifdef HAVE_VM_VM_H #include #endif -#if HAVE_VM_SWAP_PAGER_H +#ifdef HAVE_VM_SWAP_PAGER_H #include #endif -#if HAVE_SYS_FIXPOINT_H +#ifdef HAVE_SYS_FIXPOINT_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif diff --git a/agent/mibgroup/ucd-snmp/errormib.h b/agent/mibgroup/ucd-snmp/errormib.h index 501642c..ef4c2d0 100644 --- a/agent/mibgroup/ucd-snmp/errormib.h +++ b/agent/mibgroup/ucd-snmp/errormib.h @@ -6,7 +6,7 @@ void init_errormib(void); -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); void setPerrorstatus(const char *); void seterrorstatus(const char *, int); diff --git a/agent/mibgroup/ucd-snmp/extensible.c b/agent/mibgroup/ucd-snmp/extensible.c index 14b084a..6158498 100644 --- a/agent/mibgroup/ucd-snmp/extensible.c +++ b/agent/mibgroup/ucd-snmp/extensible.c @@ -1,99 +1,99 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include -#if HAVE_MACHINE_PARAM_H +#ifdef HAVE_MACHINE_PARAM_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #if !(defined(bsdi2) || defined(netbsd1)) #include #endif #endif -#if HAVE_SYS_CONF_H +#ifdef HAVE_SYS_CONF_H #include #endif -#if HAVE_ASM_PAGE_H +#ifdef HAVE_ASM_PAGE_H #include #endif -#if HAVE_SYS_SWAP_H +#ifdef HAVE_SYS_SWAP_H #include #endif -#if HAVE_SYS_FS_H +#ifdef HAVE_SYS_FS_H #include #else -#if HAVE_UFS_FS_H +#ifdef HAVE_UFS_FS_H #include #else -#if HAVE_UFS_UFS_DINODE_H +#ifdef HAVE_UFS_UFS_DINODE_H #include #endif -#if HAVE_UFS_FFS_FS_H +#ifdef HAVE_UFS_FFS_FS_H #include #endif #endif #endif -#if HAVE_MTAB_H +#ifdef HAVE_MTAB_H #include #endif #include #include -#if HAVE_FSTAB_H +#ifdef HAVE_FSTAB_H #include #endif -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif #if (!defined(HAVE_STATVFS)) && defined(HAVE_STATFS) -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif #define statvfs statfs #endif -#if HAVE_VM_VM_H +#ifdef HAVE_VM_VM_H #include #endif -#if HAVE_VM_SWAP_PAGER_H +#ifdef HAVE_VM_SWAP_PAGER_H #include #endif -#if HAVE_SYS_FIXPOINT_H +#ifdef HAVE_SYS_FIXPOINT_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif #include @@ -106,24 +106,13 @@ #include "struct.h" #include "extensible.h" +#include "pass.h" #include "mibgroup/util_funcs.h" #include "utilities/execute.h" #include "util_funcs/header_simple_table.h" -netsnmp_feature_require(get_exten_instance) -netsnmp_feature_require(parse_miboid) - -extern struct myproc *procwatch; /* moved to proc.c */ -extern int numprocs; /* ditto */ -extern struct extensible *extens; /* In exec.c */ -extern struct extensible *relocs; /* In exec.c */ -extern int numextens; /* ditto */ -extern int numrelocs; /* ditto */ -extern struct extensible *passthrus; /* In pass.c */ -extern int numpassthrus; /* ditto */ -extern netsnmp_subtree *subtrees; -extern struct variable2 extensible_relocatable_variables[]; -extern struct variable2 extensible_passthru_variables[]; +netsnmp_feature_require(get_exten_instance); +netsnmp_feature_require(parse_miboid); /* * the relocatable extensible commands variables @@ -193,8 +182,6 @@ init_extensible(void) extensible_unregister, NULL); } -extern int pass_compare(const void *a, const void *b); - void extensible_parse_config(const char *token, char *cptr) { @@ -262,7 +249,9 @@ extensible_parse_config(const char *token, char *cptr) for (tcptr = cptr; *tcptr != 0 && *tcptr != '#'; tcptr++) if (*tcptr == ';' && ptmp->type == EXECPROC) break; - sprintf(ptmp->command, "%.*s", (int) (tcptr - cptr), cptr); + free(ptmp->command); + if (asprintf(&ptmp->command, "%.*s", (int) (tcptr - cptr), cptr) < 0) + ptmp->command = NULL; } #ifdef NETSNMP_EXECFIXCMD sprintf(ptmp->fixcmd, NETSNMP_EXECFIXCMD, ptmp->name); @@ -291,7 +280,7 @@ extensible_parse_config(const char *token, char *cptr) if (etmp == NULL) return; /* XXX memory alloc error */ for (i = 0, ptmp = *pp; - i < scount && ptmp != 0; i++, ptmp = ptmp->next) + i < scount && ptmp != NULL; i++, ptmp = ptmp->next) etmp[i] = ptmp; qsort(etmp, scount, sizeof(struct extensible *), pass_compare); @@ -429,7 +418,7 @@ var_extensible_shell(struct variable * vp, size_t * var_len, WriteMethod ** write_method) { - static struct extensible *exten = 0; + static struct extensible *exten = NULL; static long long_ret; int len; @@ -469,7 +458,7 @@ var_extensible_shell(struct variable * vp, exten->output, &len); } *var_len = strlen(exten->output); - if (exten->output[*var_len - 1] == '\n') + if (*var_len && exten->output[*var_len - 1] == '\n') exten->output[--(*var_len)] = '\0'; return ((u_char *) (exten->output)); case ERRORFIX: @@ -507,13 +496,14 @@ fixExecError(int action, } tmp = *((long *) var_val); if ((tmp == 1) && (action == COMMIT) && (exten->fixcmd[0] != 0)) { - strlcpy(ex.command, exten->fixcmd, sizeof(ex.command)); + ex.command = strdup(exten->fixcmd); if ((fd = get_exec_output(&ex)) != -1) { file = fdopen(fd, "r"); while (fgets(ex.output, sizeof(ex.output), file) != NULL); fclose(file); wait_on_exec(&ex); } + free(ex.command); } return SNMP_ERR_NOERROR; } @@ -530,7 +520,7 @@ var_extensible_relocatable(struct variable *vp, int i; int len; - struct extensible *exten = 0; + struct extensible *exten = NULL; static long long_ret; static char errmsg[STRMAX]; char *cp, *cp1; @@ -623,7 +613,7 @@ var_extensible_relocatable(struct variable *vp, *cp = 0; strlcpy(errmsg, cp1, sizeof(errmsg)); *var_len = strlen(errmsg); - if (errmsg[*var_len - 1] == '\n') + if (*var_len && errmsg[*var_len - 1] == '\n') errmsg[--(*var_len)] = '\0'; return ((u_char *) (errmsg)); case ERRORFIX: @@ -643,7 +633,7 @@ find_extensible(netsnmp_subtree *tp, oid *tname, size_t tnamelen, int exact) { size_t tmp; int i; - struct extensible *exten = 0; + struct extensible *exten = NULL; struct variable myvp; oid name[MAX_OID_LEN]; static netsnmp_subtree mysubtree[2] = diff --git a/agent/mibgroup/ucd-snmp/extensible.h b/agent/mibgroup/ucd-snmp/extensible.h index 24bd16d..3a83d6f 100644 --- a/agent/mibgroup/ucd-snmp/extensible.h +++ b/agent/mibgroup/ucd-snmp/extensible.h @@ -7,9 +7,14 @@ void init_extensible(void); -config_require(util_funcs/header_simple_table) -config_require(util_funcs) -config_require(utilities/execute) +config_require(ucd-snmp/pass); +config_require(util_funcs/header_simple_table); +config_require(util_funcs); +config_require(utilities/execute); + + extern struct extensible *extens; + extern struct extensible *relocs; + extern int numextens, numrelocs; extern FindVarMethod var_extensible_shell; extern WriteMethod fixExecError; diff --git a/agent/mibgroup/ucd-snmp/file.c b/agent/mibgroup/ucd-snmp/file.c index 9e345d8..21bc313 100644 --- a/agent/mibgroup/ucd-snmp/file.c +++ b/agent/mibgroup/ucd-snmp/file.c @@ -11,21 +11,21 @@ #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif diff --git a/agent/mibgroup/ucd-snmp/file.h b/agent/mibgroup/ucd-snmp/file.h index 455086f..71577f4 100644 --- a/agent/mibgroup/ucd-snmp/file.h +++ b/agent/mibgroup/ucd-snmp/file.h @@ -7,7 +7,7 @@ #include "mibdefs.h" -config_require(util_funcs/header_simple_table) +config_require(util_funcs/header_simple_table); void init_file(void); diff --git a/agent/mibgroup/ucd-snmp/hpux.c b/agent/mibgroup/ucd-snmp/hpux.c index 9c5f9f9..64e6dd1 100644 --- a/agent/mibgroup/ucd-snmp/hpux.c +++ b/agent/mibgroup/ucd-snmp/hpux.c @@ -5,13 +5,13 @@ #include #include -#if HAVE_MACHINE_PARAM_H +#ifdef HAVE_MACHINE_PARAM_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif diff --git a/agent/mibgroup/ucd-snmp/lmSensors.c b/agent/mibgroup/ucd-snmp/lmSensors.c index 05c60b7..5ff7078 100644 --- a/agent/mibgroup/ucd-snmp/lmSensors.c +++ b/agent/mibgroup/ucd-snmp/lmSensors.c @@ -77,7 +77,7 @@ #include "util_funcs/header_simple_table.h" #include -netsnmp_feature_require(table_container) +netsnmp_feature_require(table_container); /* diff --git a/agent/mibgroup/ucd-snmp/lmSensors.h b/agent/mibgroup/ucd-snmp/lmSensors.h index 92098a6..12ca5bf 100644 --- a/agent/mibgroup/ucd-snmp/lmSensors.h +++ b/agent/mibgroup/ucd-snmp/lmSensors.h @@ -6,8 +6,8 @@ #ifndef _MIBGROUP_LMSENSORS_H #define _MIBGROUP_LMSENSORS_H -config_require(util_funcs/header_simple_table) -config_add_mib(LM-SENSORS-MIB) +config_require(util_funcs/header_simple_table); +config_add_mib(LM-SENSORS-MIB); void init_lmSensors(void); void shutdown_lmSensors(void); diff --git a/agent/mibgroup/ucd-snmp/lmsensorsMib.c b/agent/mibgroup/ucd-snmp/lmsensorsMib.c index 2557796..c9fb267 100644 --- a/agent/mibgroup/ucd-snmp/lmsensorsMib.c +++ b/agent/mibgroup/ucd-snmp/lmsensorsMib.c @@ -1,3 +1,7 @@ +#ifdef HAVE_INTTYPES_H +#include +#endif + #include #include #include @@ -5,15 +9,16 @@ #include "hardware/sensors/hw_sensors.h" #include "ucd-snmp/lmsensorsMib.h" -netsnmp_container *sensorContainer = NULL; - -void initialize_lmSensorsTable(const char *tableName, const oid *tableOID, - netsnmp_container_op *filter, int mult ); +struct reg_and_table { + netsnmp_handler_registration *reg; + netsnmp_table_registration_info *table; +}; -int _sensor_filter_temp( netsnmp_container *c, const void *v ); -int _sensor_filter_fan( netsnmp_container *c, const void *v ); -int _sensor_filter_volt( netsnmp_container *c, const void *v ); -int _sensor_filter_misc( netsnmp_container *c, const void *v ); +static netsnmp_container *sensorContainer; +static struct reg_and_table temp_reg; +static struct reg_and_table fan_reg; +static struct reg_and_table volt_reg; +static struct reg_and_table misc_reg; static const oid lmTempSensorsTable_oid[] = {1,3,6,1,4,1,2021,13,16,2}; static const oid lmFanSensorsTable_oid[] = {1,3,6,1,4,1,2021,13,16,3}; @@ -23,31 +28,10 @@ static const oid lmMiscSensorsTable_oid[] = {1,3,6,1,4,1,2021,13,16,5}; const size_t lmSensorsTables_oid_len = OID_LENGTH(lmMiscSensorsTable_oid); -/* Initialise the LM Sensors MIB module */ -void -init_lmsensorsMib(void) -{ - DEBUGMSGTL(("ucd-snmp/lmsensorsMib","Initializing LM-SENSORS-MIB tables\n")); - - /* - * Initialise the four LM-SENSORS-MIB tables - * - * They are almost identical, so we can use the same registration code. - */ - initialize_lmSensorsTable( "lmTempSensorsTable", lmTempSensorsTable_oid, - _sensor_filter_temp, 1000 ); /* MIB asks for mC */ - initialize_lmSensorsTable( "lmFanSensorsTable", lmFanSensorsTable_oid, - _sensor_filter_fan, 1); - initialize_lmSensorsTable( "lmVoltSensorsTable", lmVoltSensorsTable_oid, - _sensor_filter_volt, 1000 ); /* MIB asks for mV */ - initialize_lmSensorsTable( "lmMiscSensorsTable", lmMiscSensorsTable_oid, - _sensor_filter_misc, 1 ); -} - /* * Common initialisation code, used for setting up all four tables */ -void +static struct reg_and_table initialize_lmSensorsTable(const char *tableName, const oid *tableOID, netsnmp_container_op *filter, int mult ) { @@ -55,6 +39,9 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID, netsnmp_table_registration_info *table_info; netsnmp_cache *cache; netsnmp_container *container; + struct reg_and_table res; + + memset(&res, 0, sizeof(res)); /* * Ensure the HAL sensors module has been initialised, @@ -88,7 +75,11 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID, netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER, 0); table_info->min_column = COLUMN_LMSENSORS_INDEX; table_info->max_column = COLUMN_LMSENSORS_VALUE; - netsnmp_container_table_register( reg, table_info, container, 0 ); + if (netsnmp_container_table_register(reg, table_info, container, 0) != + SNMPERR_SUCCESS) { + snmp_log(LOG_ERR, "Failed to register the sensors container table\n"); + return res; + } /* * If the HAL sensors module was configured as an on-demand caching @@ -101,6 +92,9 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID, "table_container"); } + res.reg = reg; + res.table = table_info; + return res; } @@ -109,26 +103,30 @@ initialize_lmSensorsTable(const char *tableName, const oid *tableOID, * * Used to ensure that sensor entries appear in the appropriate table. */ -int _sensor_filter_temp( netsnmp_container *c, const void *v ) { +static int _sensor_filter_temp( netsnmp_container *c, const void *v ) +{ const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v; /* Only matches temperature sensors */ return (( sp->type == NETSNMP_SENSOR_TYPE_TEMPERATURE ) ? 0 : 1 ); } -int _sensor_filter_fan( netsnmp_container *c, const void *v ) { +static int _sensor_filter_fan( netsnmp_container *c, const void *v ) +{ const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v; /* Only matches fan sensors */ return (( sp->type == NETSNMP_SENSOR_TYPE_RPM ) ? 0 : 1 ); } -int _sensor_filter_volt( netsnmp_container *c, const void *v ) { +static int _sensor_filter_volt( netsnmp_container *c, const void *v ) +{ const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v; /* Only matches voltage sensors (AC or DC) */ return ((( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_DC ) || ( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_AC )) ? 0 : 1 ); } -int _sensor_filter_misc( netsnmp_container *c, const void *v ) { +static int _sensor_filter_misc( netsnmp_container *c, const void *v ) +{ const netsnmp_sensor_info *sp = (const netsnmp_sensor_info *)v; /* Matches everything except temperature, fan or voltage sensors */ return ((( sp->type == NETSNMP_SENSOR_TYPE_TEMPERATURE ) || @@ -137,6 +135,41 @@ int _sensor_filter_misc( netsnmp_container *c, const void *v ) { ( sp->type == NETSNMP_SENSOR_TYPE_VOLTAGE_AC )) ? 1 : 0 ); } +/* Initialize the LM Sensors MIB module */ +void +init_lmsensorsMib(void) +{ + DEBUGMSGTL(("ucd-snmp/lmsensorsMib","Initializing LM-SENSORS-MIB tables\n")); + + /* + * Initialize the four LM-SENSORS-MIB tables + * + * They are almost identical, so we can use the same registration code. + */ + temp_reg = initialize_lmSensorsTable("lmTempSensorsTable", + lmTempSensorsTable_oid, _sensor_filter_temp, + 1000); /* MIB asks for mC */ + fan_reg = initialize_lmSensorsTable("lmFanSensorsTable", + lmFanSensorsTable_oid, _sensor_filter_fan, 1); + volt_reg = initialize_lmSensorsTable("lmVoltSensorsTable", + lmVoltSensorsTable_oid, _sensor_filter_volt, + 1000); /* MIB asks for mV */ + misc_reg = initialize_lmSensorsTable("lmMiscSensorsTable", + lmMiscSensorsTable_oid, _sensor_filter_misc, 1); +} + +void +shutdown_lmsensorsMib(void) +{ + netsnmp_table_registration_info_free(misc_reg.table); + netsnmp_unregister_table(misc_reg.reg); + netsnmp_table_registration_info_free(volt_reg.table); + netsnmp_unregister_table(volt_reg.reg); + netsnmp_table_registration_info_free(fan_reg.table); + netsnmp_unregister_table(fan_reg.reg); + netsnmp_table_registration_info_free(temp_reg.table); + netsnmp_unregister_table(temp_reg.reg); +} /* * Handle requests for any of the four lmXxxxSensorsTables diff --git a/agent/mibgroup/ucd-snmp/lmsensorsMib.h b/agent/mibgroup/ucd-snmp/lmsensorsMib.h index 9d85dd1..fe9b230 100644 --- a/agent/mibgroup/ucd-snmp/lmsensorsMib.h +++ b/agent/mibgroup/ucd-snmp/lmsensorsMib.h @@ -1,11 +1,12 @@ #ifndef LM_SENSORS_MIB_H #define LM_SENSORS_MIB_H -config_require(hardware/sensors) -config_add_mib(LM-SENSORS-MIB) +config_require(hardware/sensors); +config_add_mib(LM-SENSORS-MIB); /* function declarations */ void init_lmsensorsMib(void); +void shutdown_lmsensorsMib(void); /* * Handler and Column definitions for lmXxxxSensorsTable diff --git a/agent/mibgroup/ucd-snmp/loadave.c b/agent/mibgroup/ucd-snmp/loadave.c index 3178330..c6ada85 100644 --- a/agent/mibgroup/ucd-snmp/loadave.c +++ b/agent/mibgroup/ucd-snmp/loadave.c @@ -1,39 +1,39 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif #include -#if HAVE_MACHINE_PARAM_H +#ifdef HAVE_MACHINE_PARAM_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #if !(defined(bsdi2) || defined(netbsd1)) #include #endif #endif -#if HAVE_SYS_CONF_H +#ifdef HAVE_SYS_CONF_H #include #endif -#if HAVE_ASM_PAGE_H +#ifdef HAVE_ASM_PAGE_H #include #endif -#if HAVE_SYS_SWAP_H +#ifdef HAVE_SYS_SWAP_H #include #endif -#if HAVE_SYS_FS_H +#ifdef HAVE_SYS_FS_H #include #else -#if HAVE_UFS_FS_H +#ifdef HAVE_UFS_FS_H #include #else #ifdef HAVE_SYS_STAT_H @@ -50,59 +50,59 @@ #ifdef HAVE_UFS_UFS_INODE_H #include #endif -#if HAVE_UFS_FFS_FS_H +#ifdef HAVE_UFS_FFS_FS_H #include #endif #endif #endif -#if HAVE_MTAB_H +#ifdef HAVE_MTAB_H #include #endif #include -#if HAVE_FSTAB_H +#ifdef HAVE_FSTAB_H #include #endif -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif #if (!defined(HAVE_STATVFS)) && defined(HAVE_STATFS) -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif #define statvfs statfs #endif -#if HAVE_VM_VM_H +#ifdef HAVE_VM_VM_H #include #endif -#if HAVE_VM_SWAP_PAGER_H +#ifdef HAVE_VM_SWAP_PAGER_H #include #endif -#if HAVE_SYS_FIXPOINT_H +#ifdef HAVE_SYS_FIXPOINT_H #include #endif -#if HAVE_SYS_LOADAVG_H +#ifdef HAVE_SYS_LOADAVG_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -120,7 +120,7 @@ #endif #include #endif -#if HAVE_SYS_SYSGET_H +#ifdef HAVE_SYS_SYSGET_H #include #endif @@ -475,10 +475,9 @@ var_extensible_loadave(struct variable * vp, maxload[name[*length - 1] - 1]) { snprintf(errmsg, sizeof(errmsg), "%d min Load Average too high (= %.2f)", - (name[*length - 1] == - 1) ? 1 : ((name[*length - 1] == 2) ? 5 : 15), - avenrun[name[*length - 1] - 1]); - errmsg[sizeof(errmsg) - 1] = '\0'; + name[*length - 1] == 1 ? 1 : + name[*length - 1] == 2 ? 5 : 15, + avenrun[name[*length - 1] - 1]); } else { errmsg[0] = 0; } diff --git a/agent/mibgroup/ucd-snmp/loadave.h b/agent/mibgroup/ucd-snmp/loadave.h index 4f5e7a5..c848d07 100644 --- a/agent/mibgroup/ucd-snmp/loadave.h +++ b/agent/mibgroup/ucd-snmp/loadave.h @@ -4,7 +4,7 @@ #ifndef _MIBGROUP_LOADAVE_H #define _MIBGROUP_LOADAVE_H -config_require(util_funcs/header_simple_table) +config_require(util_funcs/header_simple_table); void init_loadave(void); extern FindVarMethod var_extensible_loadave; diff --git a/agent/mibgroup/ucd-snmp/logmatch.c b/agent/mibgroup/ucd-snmp/logmatch.c index 83b4e4a..a1082b6 100644 --- a/agent/mibgroup/ucd-snmp/logmatch.c +++ b/agent/mibgroup/ucd-snmp/logmatch.c @@ -121,6 +121,9 @@ updateLogmatch(int iindex) struct stat sb; char lastFilename[256]; + if (iindex >= MAXLOGMATCH) + return; + /* * ------------------------------------ * we can never be sure if this is the @@ -157,7 +160,7 @@ updateLogmatch(int iindex) pos = counter = ccounter = 0; - if (fscanf(perfile, "%lu %lu %lu %s", + if (fscanf(perfile, "%lu %lu %lu %255s", &pos, &ccounter, &counter, lastFilename)) { @@ -393,8 +396,9 @@ logmatch_parse_config(const char *token, char *cptr) logmatchTable[logmatchCount].regEx); /* fill in filename with initial data */ - strcpy(logmatchTable[logmatchCount].filename, - logmatchTable[logmatchCount].filenamePattern); + strlcpy(logmatchTable[logmatchCount].filename, + logmatchTable[logmatchCount].filenamePattern, + sizeof(logmatchTable[logmatchCount].filename)); logmatch_update_filename(logmatchTable[logmatchCount].filenamePattern, logmatchTable[logmatchCount].filename); @@ -511,8 +515,8 @@ var_logmatch_table(struct variable *vp, { static long long_ret; static char message[1024]; - int iindex; - struct logmatchstat *logmatch; + int iindex = 0; + struct logmatchstat *logmatch = NULL; if (vp->magic == LOGMATCH_INFO) { if (header_generic(vp, name, length, exact, var_len, write_method) @@ -525,6 +529,8 @@ var_logmatch_table(struct variable *vp, return (NULL); iindex = name[*length - 1] - 1; + if (iindex >= MAXLOGMATCH) + return NULL; logmatch = &logmatchTable[iindex]; if (logmatch->myRegexError == 0) @@ -654,4 +660,11 @@ init_logmatch(void) } +#else /* HAVE_REGEX_H */ + +void +init_logmatch(void) +{ +} + #endif /* HAVE_REGEX_H */ diff --git a/agent/mibgroup/ucd-snmp/logmatch.h b/agent/mibgroup/ucd-snmp/logmatch.h index b94ad3a..76c7515 100644 --- a/agent/mibgroup/ucd-snmp/logmatch.h +++ b/agent/mibgroup/ucd-snmp/logmatch.h @@ -5,8 +5,8 @@ #ifndef _MIBGROUP_LOGMATCH_H #define _MIBGROUP_LOGMATCH_H -config_require(util_funcs/header_generic) -config_require(util_funcs/header_simple_table) +config_require(util_funcs/header_generic); +config_require(util_funcs/header_simple_table); void init_logmatch(void); diff --git a/agent/mibgroup/ucd-snmp/memory.c b/agent/mibgroup/ucd-snmp/memory.c index 742186f..158b28e 100644 --- a/agent/mibgroup/ucd-snmp/memory.c +++ b/agent/mibgroup/ucd-snmp/memory.c @@ -26,7 +26,7 @@ init_memory(void) netsnmp_create_handler_registration("memory", handle_memory, memory_oid, OID_LENGTH(memory_oid), HANDLER_CAN_RONLY), - 1, 17); + 1, 27); netsnmp_register_scalar( netsnmp_create_handler_registration("memSwapError", handle_memory, memSwapError_oid, OID_LENGTH(memSwapError_oid), @@ -59,7 +59,9 @@ handle_memory(netsnmp_mib_handler *handler, netsnmp_request_info *requests) { netsnmp_memory_info *mem_info; - int val; + unsigned long long val; + struct counter64 c64; + int type = ASN_INTEGER; char buf[1024]; /* @@ -184,6 +186,102 @@ handle_memory(netsnmp_mib_handler *handler, val = (mem_info->size - mem_info->free); /* cached */ val *= (mem_info->units/1024); break; + case MEMORY_SWAP_TOTAL_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->size; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_SWAP_AVAIL_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->free; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_REAL_TOTAL_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_PHYSMEM, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->size; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_REAL_AVAIL_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_PHYSMEM, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->free; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_SWAP_MIN_X: + type = ASN_COUNTER64; + val = minimum_swap; + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_FREE_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_VIRTMEM, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->free; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_SHARED_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SHARED, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->size; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_BUFFER_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->size - mem_info->free; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_CACHED_X: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_CACHED, 0 ); + if (!mem_info) + goto NOSUCH; + val = mem_info->size - mem_info->free; + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >>32; + break; + case MEMORY_SYS_AVAIL: + type = ASN_COUNTER64; + mem_info = netsnmp_memory_get_byIdx(NETSNMP_MEM_TYPE_AVAILMEM, 0); + if (!mem_info) + goto NOSUCH; + val = mem_info->size; /* memavail */ + val *= (mem_info->units/1024); + c64.low = val & 0xFFFFFFFF; + c64.high = val >> 32; + break; case MEMORY_SWAP_ERROR: mem_info = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 0 ); if (!mem_info) @@ -213,8 +311,12 @@ handle_memory(netsnmp_mib_handler *handler, * All non-integer objects (and errors) have already been * processed. So return the integer value. */ - snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER, - (u_char *)&val, sizeof(val)); + if (type == ASN_INTEGER) + snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER, + (u_char *)&val, sizeof(val)); + else + snmp_set_var_typed_value(requests->requestvb, ASN_COUNTER64, + (u_char *)&c64, sizeof(c64)); break; default: diff --git a/agent/mibgroup/ucd-snmp/memory.h b/agent/mibgroup/ucd-snmp/memory.h index a44d82e..03303ca 100644 --- a/agent/mibgroup/ucd-snmp/memory.h +++ b/agent/mibgroup/ucd-snmp/memory.h @@ -5,7 +5,7 @@ #ifndef MEMORY_H #define MEMORY_H -config_require(hardware/memory) +config_require(hardware/memory); /* * function declarations @@ -32,6 +32,16 @@ Netsnmp_Node_Handler handle_memory; #define MEMORY_CACHED 15 #define MEMORY_STXT_USED 16 #define MEMORY_RTXT_USED 17 +#define MEMORY_SWAP_TOTAL_X 18 +#define MEMORY_SWAP_AVAIL_X 19 +#define MEMORY_REAL_TOTAL_X 20 +#define MEMORY_REAL_AVAIL_X 21 +#define MEMORY_FREE_X 22 +#define MEMORY_SWAP_MIN_X 23 +#define MEMORY_SHARED_X 24 +#define MEMORY_BUFFER_X 25 +#define MEMORY_CACHED_X 26 +#define MEMORY_SYS_AVAIL 27 #define MEMORY_SWAP_ERROR 100 #define MEMORY_SWAP_ERRMSG 101 #endif /* MEMORY_H */ diff --git a/agent/mibgroup/ucd-snmp/memory_aix4.c b/agent/mibgroup/ucd-snmp/memory_aix4.c index 786e5eb..7c74cfd 100644 --- a/agent/mibgroup/ucd-snmp/memory_aix4.c +++ b/agent/mibgroup/ucd-snmp/memory_aix4.c @@ -17,10 +17,10 @@ */ #include /* local SNMP configuration details */ -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/agent/mibgroup/ucd-snmp/memory_aix4.h b/agent/mibgroup/ucd-snmp/memory_aix4.h index c39596c..e1cb6bb 100644 --- a/agent/mibgroup/ucd-snmp/memory_aix4.h +++ b/agent/mibgroup/ucd-snmp/memory_aix4.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_MEMORY_AIX4_H #define _MIBGROUP_MEMORY_AIX4_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/memory_darwin7.c b/agent/mibgroup/ucd-snmp/memory_darwin7.c index 74d5365..1578d33 100644 --- a/agent/mibgroup/ucd-snmp/memory_darwin7.c +++ b/agent/mibgroup/ucd-snmp/memory_darwin7.c @@ -36,10 +36,6 @@ #include #include -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -307,7 +303,7 @@ var_extensible_mem(struct variable *vp, case MEMSHARED: case MEMBUFFER: case MEMCACHED: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; @@ -385,9 +381,23 @@ int pages_swapped(void) { swapped_pages = 0; for (address = 0;; address += size) { + kern_return_t ret = KERN_FAILURE; + /* Get memory region. */ - count = VM_REGION_EXTENDED_INFO_COUNT; - if (vm_region(tasks[j], &address, &size, VM_REGION_EXTENDED_INFO, (vm_region_extended_info_t)&info, &count, &object_name) != KERN_SUCCESS) { + count = VM_REGION_EXTENDED_INFO_COUNT; +#ifdef HAVE_VM_REGION_64 + ret = vm_region64(tasks[j], &address, &size, + VM_REGION_EXTENDED_INFO, + (vm_region_extended_info_t)&info, &count, + &object_name); +#elif defined(HAVE_VM_REGION) + ret = vm_region(tasks[j], &address, &size, + VM_REGION_EXTENDED_INFO, + (vm_region_extended_info_t)&info, &count, + &object_name); +#error How to query memory protection information? +#endif + if (ret != KERN_SUCCESS) { /* No more memory regions. */ break; } diff --git a/agent/mibgroup/ucd-snmp/memory_darwin7.h b/agent/mibgroup/ucd-snmp/memory_darwin7.h index ab5d264..fb3f59b 100644 --- a/agent/mibgroup/ucd-snmp/memory_darwin7.h +++ b/agent/mibgroup/ucd-snmp/memory_darwin7.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_MEMORY_DARWIN7_H #define _MIBGROUP_MEMORY_DARWIN7_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/memory_dynix.h b/agent/mibgroup/ucd-snmp/memory_dynix.h index 4fb5294..aff3092 100644 --- a/agent/mibgroup/ucd-snmp/memory_dynix.h +++ b/agent/mibgroup/ucd-snmp/memory_dynix.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_MEMORY_DYNIX_H #define _MIBGROUP_MEMORY_DYNIX_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/memory_freebsd2.c b/agent/mibgroup/ucd-snmp/memory_freebsd2.c index 22dde4c..927adcb 100644 --- a/agent/mibgroup/ucd-snmp/memory_freebsd2.c +++ b/agent/mibgroup/ucd-snmp/memory_freebsd2.c @@ -29,7 +29,7 @@ #include #include -#if HAVE_SYS_VMPARAM_H +#ifdef HAVE_SYS_VMPARAM_H #include #else #include @@ -342,7 +342,7 @@ var_extensible_mem(struct variable *vp, case MEMUSEDSWAPTXT: case MEMTOTALREALTXT: case MEMUSEDREALTXT: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; diff --git a/agent/mibgroup/ucd-snmp/memory_hpux.c b/agent/mibgroup/ucd-snmp/memory_hpux.c index c2b2478..cbad70c 100644 --- a/agent/mibgroup/ucd-snmp/memory_hpux.c +++ b/agent/mibgroup/ucd-snmp/memory_hpux.c @@ -1,8 +1,8 @@ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/agent/mibgroup/ucd-snmp/memory_netbsd1.c b/agent/mibgroup/ucd-snmp/memory_netbsd1.c index 3d26a44..6a8dddc 100644 --- a/agent/mibgroup/ucd-snmp/memory_netbsd1.c +++ b/agent/mibgroup/ucd-snmp/memory_netbsd1.c @@ -165,7 +165,7 @@ var_extensible_mem(struct variable *vp, static char errmsg[1024]; static struct uvmexp uvmexp; - int uvmexp_size = sizeof(uvmexp); + size_t uvmexp_size = sizeof(uvmexp); int uvmexp_mib[] = { CTL_VM, VM_UVMEXP }; static struct vmtotal total; size_t total_size = sizeof(total); @@ -181,13 +181,22 @@ var_extensible_mem(struct variable *vp, /* * Memory info */ - sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0); - sysctl(total_mib, 2, &total, &total_size, NULL, 0); + if (sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl VM_UVMEXP failed (errno %d)\n", errno); + return NULL; + } + if (sysctl(total_mib, 2, &total, &total_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl VM_METER failed (errno %d)\n", errno); + return NULL; + } /* * Physical memory */ - sysctl(phys_mem_mib, 2, &phys_mem, &phys_mem_size, NULL, 0); + if (sysctl(phys_mem_mib, 2, &phys_mem, &phys_mem_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl HW_USERMEM failed (errno %d)\n", errno); + return NULL; + } long_ret = 0; /* set to 0 as default */ @@ -224,7 +233,7 @@ var_extensible_mem(struct variable *vp, case MEMUSEDSWAPTXT: case MEMTOTALREALTXT: case MEMUSEDREALTXT: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; diff --git a/agent/mibgroup/ucd-snmp/memory_netbsd1.h b/agent/mibgroup/ucd-snmp/memory_netbsd1.h index a195f85..2d23a4f 100644 --- a/agent/mibgroup/ucd-snmp/memory_netbsd1.h +++ b/agent/mibgroup/ucd-snmp/memory_netbsd1.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_MEMORY_NETBSD1_H #define _MIBGROUP_MEMORY_NETBSD1_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/memory_solaris2.c b/agent/mibgroup/ucd-snmp/memory_solaris2.c index 2d36278..8caa238 100644 --- a/agent/mibgroup/ucd-snmp/memory_solaris2.c +++ b/agent/mibgroup/ucd-snmp/memory_solaris2.c @@ -1,8 +1,8 @@ #include /* local SNMP configuration details */ -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/agent/mibgroup/ucd-snmp/memory_solaris2.h b/agent/mibgroup/ucd-snmp/memory_solaris2.h index fff5f79..44f5ea9 100644 --- a/agent/mibgroup/ucd-snmp/memory_solaris2.h +++ b/agent/mibgroup/ucd-snmp/memory_solaris2.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_MEMORY_SOLARIS2_H #define _MIBGROUP_MEMORY_SOLARIS2_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/pass.c b/agent/mibgroup/ucd-snmp/pass.c index 8d602c1..88e95d3 100644 --- a/agent/mibgroup/ucd-snmp/pass.c +++ b/agent/mibgroup/ucd-snmp/pass.c @@ -1,24 +1,24 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H # include #endif #ifdef HAVE_LIMITS_H @@ -37,8 +37,8 @@ #include "extensible.h" #include "util_funcs.h" -netsnmp_feature_require(get_exten_instance) -netsnmp_feature_require(parse_miboid) +netsnmp_feature_require(get_exten_instance); +netsnmp_feature_require(parse_miboid); struct extensible *passthrus = NULL; int numpassthrus = 0; @@ -113,7 +113,7 @@ pass_parse_config(const char *token, char *cptr) while (*ppass != NULL) ppass = &((*ppass)->next); - (*ppass) = (struct extensible *) malloc(sizeof(struct extensible)); + *ppass = calloc(1, sizeof(**ppass)); if (*ppass == NULL) return; (*ppass)->type = PASSTHRU; @@ -125,14 +125,19 @@ pass_parse_config(const char *token, char *cptr) /* * path */ + free((*ppass)->command); + (*ppass)->command = NULL; cptr = skip_white(cptr); if (cptr == NULL) { config_perror("No command specified on pass line"); - (*ppass)->command[0] = 0; + if (asprintf(&(*ppass)->command, "%s", "") < 0) { + } } else { for (tcptr = cptr; *tcptr != 0 && *tcptr != '#' && *tcptr != ';'; tcptr++); - sprintf((*ppass)->command, "%.*s", (int) (tcptr - cptr), cptr); + if (asprintf(&(*ppass)->command, "%.*s", (int) (tcptr - cptr), cptr) + < 0) { + } } strlcpy((*ppass)->name, (*ppass)->command, sizeof((*ppass)->name)); (*ppass)->next = NULL; @@ -177,6 +182,7 @@ pass_free_config(void) etmp2 = etmp; etmp = etmp->next; unregister_mib_priority(etmp2->miboid, etmp2->miblen, etmp2->mibpriority); + free(etmp2->command); free(etmp2); } passthrus = NULL; @@ -209,13 +215,11 @@ var_extensible_pass(struct variable *vp, sprint_mib_oid(buf, passthru->miboid, passthru->miblen); else sprint_mib_oid(buf, name, *length); - if (exact) - snprintf(passthru->command, sizeof(passthru->command), - "%s -g %s", passthru->name, buf); - else - snprintf(passthru->command, sizeof(passthru->command), - "%s -n %s", passthru->name, buf); - passthru->command[ sizeof(passthru->command)-1 ] = 0; + free(passthru->command); + passthru->command = NULL; + if (asprintf(&passthru->command, "%s %s %s", passthru->name, + exact ? "-g" : "-n", buf) < 0) { + } DEBUGMSGTL(("ucd-snmp/pass", "pass-running: %s\n", passthru->command)); /* @@ -290,15 +294,17 @@ setPass(int action, u_char * var_val, u_char var_val_type, /* * setup args */ + free(passthru->command); + passthru->command = NULL; if (passthru->miblen >= name_len || rtest < 0) sprint_mib_oid(buf, passthru->miboid, passthru->miblen); else sprint_mib_oid(buf, name, name_len); - snprintf(passthru->command, sizeof(passthru->command), - "%s -s %s ", passthru->name, buf); - passthru->command[ sizeof(passthru->command)-1 ] = 0; - netsnmp_internal_pass_set_format(buf, var_val, var_val_type, var_val_len); - strlcat(passthru->command, buf, sizeof(passthru->command)); + netsnmp_internal_pass_set_format(buf2, var_val, var_val_type, + var_val_len); + if (asprintf(&passthru->command, "%s -s %s %s", passthru->name, buf, + buf2) < 0) { + } DEBUGMSGTL(("ucd-snmp/pass", "pass-running: %s", passthru->command)); exec_command(passthru); @@ -317,9 +323,9 @@ setPass(int action, u_char * var_val, u_char var_val_type, int pass_compare(const void *a, const void *b) { - const struct extensible *const *ap, *const *bp; - ap = (const struct extensible * const *) a; - bp = (const struct extensible * const *) b; + const struct extensible *const *ap = a; + const struct extensible *const *bp = b; + return snmp_oid_compare((*ap)->miboid, (*ap)->miblen, (*bp)->miboid, (*bp)->miblen); } diff --git a/agent/mibgroup/ucd-snmp/pass.h b/agent/mibgroup/ucd-snmp/pass.h index 51c0689..a3c57f3 100644 --- a/agent/mibgroup/ucd-snmp/pass.h +++ b/agent/mibgroup/ucd-snmp/pass.h @@ -6,10 +6,10 @@ void init_pass(void); -config_require(ucd-snmp/pass_common) -config_require(util_funcs) -config_require(utilities/execute) -config_add_mib(NET-SNMP-PASS-MIB) +config_require(ucd-snmp/pass_common); +config_require(util_funcs); +config_require(utilities/execute); +config_add_mib(NET-SNMP-PASS-MIB); extern FindVarMethod var_extensible_pass; WriteMethod setPass; diff --git a/agent/mibgroup/ucd-snmp/pass_common.c b/agent/mibgroup/ucd-snmp/pass_common.c index e3d9a01..4c3d40e 100644 --- a/agent/mibgroup/ucd-snmp/pass_common.c +++ b/agent/mibgroup/ucd-snmp/pass_common.c @@ -1,11 +1,9 @@ #include #include -#if HAVE_STDDEF_H #include -#endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -135,7 +133,7 @@ netsnmp_internal_pass_parse(char * buf, c64.high = (unsigned long)(v64 >> 32); c64.low = (unsigned long)(v64 & 0xffffffff); *var_len = sizeof(c64); - vp->type = ASN_INTEGER64; + vp->type = ASN_OPAQUE_I64; return ((unsigned char *) &c64); } #endif diff --git a/agent/mibgroup/ucd-snmp/pass_persist.c b/agent/mibgroup/ucd-snmp/pass_persist.c index 8467e19..15272d4 100644 --- a/agent/mibgroup/ucd-snmp/pass_persist.c +++ b/agent/mibgroup/ucd-snmp/pass_persist.c @@ -1,26 +1,26 @@ #include #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H # include #endif #ifdef HAVE_LIMITS_H @@ -42,14 +42,14 @@ #include "extensible.h" #include "util_funcs.h" -netsnmp_feature_require(get_exten_instance) -netsnmp_feature_require(parse_miboid) +netsnmp_feature_require(get_exten_instance); +netsnmp_feature_require(parse_miboid); struct extensible *persistpassthrus = NULL; int numpersistpassthrus = 0; struct persist_pipe_type { - FILE *fIn, *fOut; - int fdIn, fdOut; + FILE *fIn; + int fdOut; netsnmp_pid_t pid; } *persist_pipes = (struct persist_pipe_type *) NULL; static unsigned pipe_check_alarm_id; @@ -93,6 +93,41 @@ shutdown_pass_persist(void) destruct_persist_pipes(); } + +#ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE +void +pass_persist_group(struct extensible *persistpassthrus) +{ + struct extensible *ptmp, *ptmp1; + + /* + * reset groupping + */ + for (ptmp = persistpassthrus; ptmp != NULL; ptmp = ptmp->next) { + ptmp->passpersist_inst = NULL; + } + + /* + * group + */ + for (ptmp = persistpassthrus; ptmp != NULL; ptmp = ptmp->next) { + /* skip already groupped items */ + if (ptmp->passpersist_inst != NULL) { + continue; + } + for (ptmp1 = persistpassthrus; ptmp1 != NULL; ptmp1 = ptmp1->next) { + if (ptmp1 == ptmp) { + continue; + } + + if (strcmp(ptmp->command, ptmp1->command) == 0) { + ptmp1->passpersist_inst = ptmp; + } + } + } +} +#endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */ + void pass_persist_parse_config(const char *token, char *cptr) { @@ -143,7 +178,7 @@ pass_persist_parse_config(const char *token, char *cptr) while (*ppass != NULL) ppass = &((*ppass)->next); - (*ppass) = (struct extensible *) malloc(sizeof(struct extensible)); + *ppass = calloc(1, sizeof(**ppass)); if (*ppass == NULL) return; (*ppass)->type = PASSTHRU_PERSIST; @@ -155,14 +190,19 @@ pass_persist_parse_config(const char *token, char *cptr) /* * path */ + free((*ppass)->command); + (*ppass)->command = NULL; cptr = skip_white(cptr); if (cptr == NULL) { config_perror("No command specified on pass_persist line"); - (*ppass)->command[0] = 0; + if (asprintf(&(*ppass)->command, "%s", "") < 0) { + } } else { for (tcptr = cptr; *tcptr != 0 && *tcptr != '#' && *tcptr != ';'; tcptr++); - sprintf((*ppass)->command, "%.*s", (int) (tcptr - cptr), cptr); + if (asprintf(&(*ppass)->command, "%.*s", (int)(tcptr - cptr), cptr) + < 0) { + } } strlcpy((*ppass)->name, (*ppass)->command, sizeof((*ppass)->name)); (*ppass)->next = NULL; @@ -195,6 +235,10 @@ pass_persist_parse_config(const char *token, char *cptr) ptmp->next = NULL; free(etmp); } + +#ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE + pass_persist_group(persistpassthrus); +#endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */ } void @@ -218,6 +262,28 @@ pass_persist_free_config(void) numpersistpassthrus = 0; } +#ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE +int get_exten_group_id(struct extensible *persistpassthru, + int current_id) +{ + struct extensible *ptmp; + int idx; + + if (persistpassthru == NULL) + return current_id; + + for (idx = 1, ptmp = persistpassthrus; + ptmp != NULL; ptmp = ptmp->next, idx++) { + if (ptmp == persistpassthru) { + return idx; + } + } + + /* should never really come here, but safety doesn't hurt */ + return current_id; +} +#endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */ + u_char * var_extensible_pass_persist(struct variable *vp, oid * name, @@ -231,6 +297,7 @@ var_extensible_pass_persist(struct variable *vp, static char buf2[SNMP_MAXBUF]; struct extensible *persistpassthru; FILE *file; + int pipe_idx; /* * Make sure that our basic pipe structure is malloced @@ -252,25 +319,34 @@ var_extensible_pass_persist(struct variable *vp, else sprint_mib_oid(buf, name, *length); + pipe_idx = i; +#ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE + pipe_idx = + get_exten_group_id(persistpassthru->passpersist_inst, i); + + if (pipe_idx != i) { + persistpassthru = persistpassthru->passpersist_inst; + } +#endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */ /* * Open our pipe if necessary */ - if (!open_persist_pipe(i, persistpassthru->name)) { + if (!open_persist_pipe(pipe_idx, persistpassthru->name)) { return (NULL); } - if (exact) - snprintf(persistpassthru->command, - sizeof(persistpassthru->command), "get\n%s\n", buf); - else - snprintf(persistpassthru->command, - sizeof(persistpassthru->command), "getnext\n%s\n", buf); - persistpassthru->command[ sizeof(persistpassthru->command)-1 ] = 0; + free(persistpassthru->command); + if (asprintf(&persistpassthru->command, "%s\n%s\n", + exact ? "get" : "getnext", buf) < 0) { + persistpassthru->command = NULL; + *var_len = 0; + return NULL; + } DEBUGMSGTL(("ucd-snmp/pass_persist", "persistpass-sending:\n%s", persistpassthru->command)); - if (!write_persist_pipe(i, persistpassthru->command)) { + if (!write_persist_pipe(pipe_idx, persistpassthru->command)) { *var_len = 0; /* * close_persist_pipes is called in write_persist_pipe @@ -282,10 +358,10 @@ var_extensible_pass_persist(struct variable *vp, * valid call. Exec and get output */ - if ((file = persist_pipes[i].fIn)) { + if ((file = persist_pipes[pipe_idx].fIn)) { if (fgets(buf, sizeof(buf), file) == NULL) { *var_len = 0; - close_persist_pipe(i); + close_persist_pipe(pipe_idx); return (NULL); } /* @@ -315,7 +391,7 @@ var_extensible_pass_persist(struct variable *vp, if (newlen == 0 || fgets(buf, sizeof(buf), file) == NULL || fgets(buf2, sizeof(buf2), file) == NULL) { *var_len = 0; - close_persist_pipe(i); + close_persist_pipe(pipe_idx); return (NULL); } return netsnmp_internal_pass_parse(buf, buf2, var_len, vp); @@ -341,6 +417,7 @@ setPassPersist(int action, struct extensible *persistpassthru; char buf[SNMP_MAXBUF], buf2[SNMP_MAXBUF]; + int pipe_idx; /* * Make sure that our basic pipe structure is malloced @@ -352,6 +429,15 @@ setPassPersist(int action, rtest = snmp_oidtree_compare(name, name_len, persistpassthru->miboid, persistpassthru->miblen); + pipe_idx = i; +#ifdef USING_SINGLE_COMMON_PASSPERSIST_INSTANCE + pipe_idx = + get_exten_group_id(persistpassthru->passpersist_inst, i); + + if (pipe_idx != i) { + persistpassthru = persistpassthru->passpersist_inst; + } +#endif /* USING_SINGLE_COMMON_PASSPERSIST_INSTANCE */ if (rtest <= 0) { if (action != ACTION) return SNMP_ERR_NOERROR; @@ -363,29 +449,29 @@ setPassPersist(int action, persistpassthru->miblen); else sprint_mib_oid(buf, name, name_len); - snprintf(persistpassthru->command, - sizeof(persistpassthru->command), "set\n%s\n", buf); - persistpassthru->command[ sizeof(persistpassthru->command)-1 ] = 0; - netsnmp_internal_pass_set_format(buf, var_val, var_val_type, var_val_len); - strlcat(persistpassthru->command, buf, - sizeof(persistpassthru->command)); - persistpassthru->command[ sizeof(persistpassthru->command)-2 ] = '\n'; - persistpassthru->command[ sizeof(persistpassthru->command)-1 ] = 0; - - if (!open_persist_pipe(i, persistpassthru->name)) { + netsnmp_internal_pass_set_format(buf2, var_val, var_val_type, + var_val_len); + free(persistpassthru->command); + if (asprintf(&persistpassthru->command, "set\n%s\n%s", buf, + buf2) < 0) { + persistpassthru->command = NULL; + return SNMP_ERR_GENERR; + } + + if (!open_persist_pipe(pipe_idx, persistpassthru->name)) { return SNMP_ERR_NOTWRITABLE; } DEBUGMSGTL(("ucd-snmp/pass_persist", "persistpass-writing: %s\n", persistpassthru->command)); - if (!write_persist_pipe(i, persistpassthru->command)) { - close_persist_pipe(i); + if (!write_persist_pipe(pipe_idx, persistpassthru->command)) { + close_persist_pipe(pipe_idx); return SNMP_ERR_NOTWRITABLE; } - if (fgets(buf, sizeof(buf), persist_pipes[i].fIn) == NULL) { - close_persist_pipe(i); + if (fgets(buf, sizeof(buf), persist_pipes[pipe_idx].fIn) == NULL) { + close_persist_pipe(pipe_idx); return SNMP_ERR_NOTWRITABLE; } @@ -423,24 +509,22 @@ init_persist_pipes(void) /* * if we are already taken care of, just return */ - if (persist_pipes) { - return persist_pipes ? 1 : 0; - } + if (persist_pipes) + return 1; /* * Otherwise malloc and initialize */ - persist_pipes = (struct persist_pipe_type *) - malloc(sizeof(struct persist_pipe_type) * - (numpersistpassthrus + 1)); - if (persist_pipes) { - for (i = 0; i <= numpersistpassthrus; i++) { - persist_pipes[i].fIn = persist_pipes[i].fOut = (FILE *) 0; - persist_pipes[i].fdIn = persist_pipes[i].fdOut = -1; - persist_pipes[i].pid = NETSNMP_NO_SUCH_PROCESS; - } + persist_pipes = malloc(sizeof(persist_pipes[0]) * + (numpersistpassthrus + 1)); + if (!persist_pipes) + return 0; + for (i = 0; i <= numpersistpassthrus; i++) { + persist_pipes[i].fIn = NULL; + persist_pipes[i].fdOut = -1; + persist_pipes[i].pid = NETSNMP_NO_SUCH_PROCESS; } - return persist_pipes ? 1 : 0; + return 1; } /** @@ -452,10 +536,9 @@ init_persist_pipes(void) static int process_stopped(int idx) { if (persist_pipes[idx].pid != NETSNMP_NO_SUCH_PROCESS) { -#if HAVE_SYS_WAIT_H +#ifdef HAVE_WAITPID return waitpid(persist_pipes[idx].pid, NULL, WNOHANG) > 0; -#endif -#if defined(WIN32) && !defined (mingw32) && !defined(HAVE_SIGNAL) +#elif defined(WIN32) && !defined (mingw32) && !defined(HAVE_SIGNAL) return WaitForSingleObject(persist_pipes[idx].pid, 0) == WAIT_OBJECT_0; #endif } @@ -537,15 +620,9 @@ open_persist_pipe(int iindex, char *command) * If not, fill out our structure */ persist_pipes[iindex].pid = pid; - persist_pipes[iindex].fdIn = fdIn; persist_pipes[iindex].fdOut = fdOut; persist_pipes[iindex].fIn = fdopen(fdIn, "r"); - persist_pipes[iindex].fOut = fdopen(fdOut, "w"); - /* - * Setup our -non-buffered-io- - */ - setbuf(persist_pipes[iindex].fOut, (char *) 0); DEBUGMSGTL(("ucd-snmp/pass_persist", "open_persist_pipe: opened the pipes\n")); } @@ -580,6 +657,7 @@ open_persist_pipe(int iindex, char *command) recurse = 0; return 0; } + if (strncmp(buf, "PONG", 4)) { DEBUGMSGTL(("ucd-snmp/pass_persist", "open_persist_pipe: Got %s instead of PONG!\n", buf)); @@ -596,12 +674,10 @@ open_persist_pipe(int iindex, char *command) static int write_persist_pipe(int iindex, const char *data) { -#if HAVE_SIGNAL - struct sigaction sa, osa; - int wret = 0, werrno = 0; + int len, wret; /* - * Don't write to a non-existant process + * Don't write to a non-existent process */ if (persist_pipes[iindex].pid == NETSNMP_NO_SUCH_PROCESS) { DEBUGMSGTL(("ucd-snmp/pass_persist", @@ -610,116 +686,43 @@ write_persist_pipe(int iindex, const char *data) return 0; } - /* - * Setup our signal action to ignore SIGPIPEs - */ - sa.sa_handler = SIG_IGN; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - if (sigaction(SIGPIPE, &sa, &osa)) { - DEBUGMSGTL(("ucd-snmp/pass_persist", - "write_persist_pipe: sigaction failed: %d", errno)); - } - /* * Do the write */ - wret = write(persist_pipes[iindex].fdOut, data, strlen(data)); - werrno = errno; - - /* - * Reset the signal handler - */ - sigaction(SIGPIPE, &osa, (struct sigaction *) 0); - + len = strlen(data); + wret = write(persist_pipes[iindex].fdOut, data, len); + if (wret == len) + return 1; if (wret < 0) { + int werrno = errno; + if (werrno != EPIPE) { DEBUGMSGTL(("ucd-snmp/pass_persist", - "write_persist_pipe: write returned unknown error %d (%s)\n", + "write_persist_pipe: write returned unexpected error %d (%s)\n", werrno, strerror(werrno))); } close_persist_pipe(iindex); - return 0; - } -#endif /* HAVE_SIGNAL */ -#if defined(WIN32) && !defined (mingw32) && !defined (HAVE_SIGNAL) -/* We have no signal here (maybe we can make a Thread?) so write may block, - * but probably never will. - */ - int wret = 0, werrno = 0; - - /* - * Do the write - */ - wret = write(persist_pipes[iindex].fdOut, data,strlen(data)); - werrno = errno; - - if (wret < 0) { - if (werrno != EINTR) { - DEBUGMSGTL(("ucd-snmp/pass_persist", "write_persist_pipe: write returned unknown error %d\n",errno)); - } - close_persist_pipe(iindex); - return 0; + } else { + DEBUGMSGTL(("ucd-snmp/pass_persist", + "write_persist_pipe: short write (%d < %d)\n", wret, len)); } -#endif /* WIN32 */ - return 1; + return 0; } static void close_persist_pipe(int iindex) { -/* Alexander Prömel, alexander@proemel.de 08/24/2006 - The hard coded pathnames, are temporary. - I'll fix it soon. - If you changed them here, you have to do it in ../util_funcs.c too. -*/ -#ifdef __uClinux__ - char fifo_in_path[256]; - char fifo_out_path[256]; - - snprintf(fifo_in_path, 256, "/flash/cp_%d", persist_pipes[iindex].pid); - snprintf(fifo_out_path, 256, "/flash/pc_%d", persist_pipes[iindex].pid); -#endif - /* * Check and nix every item */ - if (persist_pipes[iindex].fOut) { - fclose(persist_pipes[iindex].fOut); - persist_pipes[iindex].fOut = (FILE *) 0; - } if (persist_pipes[iindex].fdOut != -1) { -#ifndef WIN32 - /* - * The sequence open()/fdopen()/fclose()/close() triggers an access - * violation with the MSVC runtime. Hence skip the close() call when - * using the MSVC runtime. - */ close(persist_pipes[iindex].fdOut); -#endif persist_pipes[iindex].fdOut = -1; } if (persist_pipes[iindex].fIn) { fclose(persist_pipes[iindex].fIn); persist_pipes[iindex].fIn = (FILE *) 0; } - if (persist_pipes[iindex].fdIn != -1) { -#ifndef WIN32 - /* - * The sequence open()/fdopen()/fclose()/close() triggers an access - * violation with the MSVC runtime. Hence skip the close() call when - * using the MSVC runtime. - */ - close(persist_pipes[iindex].fdIn); -#endif - persist_pipes[iindex].fdIn = -1; - } - -#ifdef __uClinux__ - /*remove the pipes*/ - unlink(fifo_in_path); - unlink(fifo_out_path); -#endif if (persist_pipes[iindex].pid != NETSNMP_NO_SUCH_PROCESS) { /* @@ -729,12 +732,12 @@ close_persist_pipe(int iindex) #ifdef HAVE_SIGNAL (void)kill(persist_pipes[iindex].pid, SIGKILL); #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_WAITPID waitpid(persist_pipes[iindex].pid, NULL, 0); -#endif -#if defined(WIN32) && !defined (mingw32) && !defined (HAVE_SIGNAL) +#elif defined(WIN32) && !defined (mingw32) && !defined (HAVE_SIGNAL) if (!CloseHandle(persist_pipes[iindex].pid)) { - DEBUGMSGTL(("ucd-snmp/pass_persist","close_persist_pipe pid: close error\n")); + DEBUGMSGTL(("ucd-snmp/pass_persist", + "close_persist_pipe pid: close error\n")); } #endif persist_pipes[iindex].pid = NETSNMP_NO_SUCH_PROCESS; diff --git a/agent/mibgroup/ucd-snmp/pass_persist.h b/agent/mibgroup/ucd-snmp/pass_persist.h index 0537abc..42845e4 100644 --- a/agent/mibgroup/ucd-snmp/pass_persist.h +++ b/agent/mibgroup/ucd-snmp/pass_persist.h @@ -4,9 +4,9 @@ #ifndef _MIBGROUP_PASS_PERSIST_H #define _MIBGROUP_PASS_PERSIST_H -config_require(ucd-snmp/pass_common) -config_require(util_funcs) -config_require(utilities/execute) +config_require(ucd-snmp/pass_common); +config_require(util_funcs); +config_require(utilities/execute); void init_pass_persist(void); void shutdown_pass_persist(void); diff --git a/agent/mibgroup/ucd-snmp/proc.c b/agent/mibgroup/ucd-snmp/proc.c index e90c2e8..00e2a38 100644 --- a/agent/mibgroup/ucd-snmp/proc.c +++ b/agent/mibgroup/ucd-snmp/proc.c @@ -6,46 +6,47 @@ #include /* helps define struct rlimit */ #endif -#if HAVE_IO_H /* win32 */ +#ifdef HAVE_IO_H /* win32 */ #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_KVM_H -#include +#ifdef HAVE_PCRE_H +#include #endif #include #include +#include "mibdefs.h" #include "struct.h" #include "proc.h" #ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE @@ -57,7 +58,10 @@ #define setPerrorstatus(x) snmp_log_perror(x) #endif #include "util_funcs.h" -#include "kernel.h" + +#define PROCMIN 3 +#define PROCMAX 4 +#define PROCCOUNT 5 static struct myproc *get_proc_instance(struct myproc *, oid); struct myproc *procwatch = NULL; @@ -67,7 +71,6 @@ int numprocs = 0; void init_proc(void) { - /* * define the structure we're going to ask the agent to register our * information at @@ -105,9 +108,14 @@ init_proc(void) REGISTER_MIB("ucd-snmp/proc", extensible_proc_variables, variable2, proc_variables_oid); +#ifdef HAVE_PCRE_H +#define proc_parse_usage "process-name [max-num] [min-num] [regexp]" +#else +#define proc_parse_usage "process-name [max-num] [min-num]" +#endif + snmpd_register_config_handler("proc", proc_parse_config, - proc_free_config, - "process-name [max-num] [min-num]"); + proc_free_config, proc_parse_usage); snmpd_register_config_handler("procfix", procfix_parse_config, NULL, "process-name program [arguments...]"); } @@ -126,6 +134,9 @@ proc_free_config(void) for (ptmp = procwatch; ptmp != NULL;) { ptmp2 = ptmp; ptmp = ptmp->next; +#ifdef HAVE_PCRE_H + free(ptmp2->regexp.regex_ptr); +#endif free(ptmp2); } procwatch = NULL; @@ -168,7 +179,7 @@ procfix_parse_config(const char *token, char *cptr) return; } - strcpy(procp->fixcmd, cptr); + strlcpy(procp->fixcmd, cptr, sizeof(procp->fixcmd)); } @@ -181,7 +192,7 @@ proc_parse_config(const char *token, char *cptr) /* * don't allow two entries with the same name */ - copy_nword(cptr, tmpname, sizeof(tmpname)); + cptr = copy_nword(cptr, tmpname, sizeof(tmpname)); if (get_proc_by_name(tmpname) != NULL) { config_perror("Already have an entry for this process."); return; @@ -197,17 +208,33 @@ proc_parse_config(const char *token, char *cptr) if (*procp == NULL) return; /* memory alloc error */ numprocs++; +#ifdef HAVE_PCRE_H + (*procp)->regexp.regex_ptr = NULL; +#endif /* * not blank and not a comment */ - copy_nword(cptr, (*procp)->name, sizeof((*procp)->name)); - cptr = skip_not_white(cptr); - if ((cptr = skip_white(cptr))) { + strlcpy((*procp)->name, tmpname, sizeof((*procp)->name)); + if (cptr) { (*procp)->max = atoi(cptr); cptr = skip_not_white(cptr); - if ((cptr = skip_white(cptr))) + if ((cptr = skip_white(cptr))) { (*procp)->min = atoi(cptr); - else +#ifdef HAVE_PCRE_H + cptr = skip_not_white(cptr); + if ((cptr = skip_white(cptr))) { + const char *pcre_error; + int pcre_error_offset; + + DEBUGMSGTL(("ucd-snmp/regexp_proc", "Loading regex %s\n", cptr)); + (*procp)->regexp.regex_ptr = + pcre_compile(cptr, 0, &pcre_error, &pcre_error_offset, NULL); + if ((*procp)->regexp.regex_ptr == NULL) { + config_perror(pcre_error); + } + } +#endif + } else (*procp)->min = 0; } else { /* Default to asssume that we require at least one @@ -238,8 +265,8 @@ var_extensible_proc(struct variable *vp, struct myproc *proc; static long long_ret; - static char errmsg[300]; - + static char *errmsg; + static char empty_str[1]; if (header_simple_table (vp, name, length, exact, var_len, write_method, numprocs)) @@ -260,10 +287,10 @@ var_extensible_proc(struct variable *vp, long_ret = proc->max; return ((u_char *) (&long_ret)); case PROCCOUNT: - long_ret = sh_count_procs(proc->name); + long_ret = sh_count_myprocs(proc); return ((u_char *) (&long_ret)); case ERRORFLAG: - long_ret = sh_count_procs(proc->name); + long_ret = sh_count_myprocs(proc); if (long_ret >= 0 && /* Too few processes running */ ((proc->min && long_ret < proc->min) || @@ -277,42 +304,39 @@ var_extensible_proc(struct variable *vp, } return ((u_char *) (&long_ret)); case ERRORMSG: - long_ret = sh_count_procs(proc->name); + free(errmsg); + errmsg = NULL; + long_ret = sh_count_myprocs(proc); if (long_ret < 0) { - errmsg[0] = 0; /* catch out of mem errors return 0 count */ + /* catch out of mem errors return 0 count */ } else if (proc->min && long_ret < proc->min) { - if ( long_ret > 0 ) - snprintf(errmsg, sizeof(errmsg), - "Too few %s running (# = %d)", - proc->name, (int) long_ret); - else - snprintf(errmsg, sizeof(errmsg), - "No %s process running", proc->name); + if (long_ret > 0) { + if (asprintf(&errmsg, "Too few %s running (# = %d)", + proc->name, (int) long_ret) < 0) { + } + } else { + if (asprintf(&errmsg, "No %s process running", proc->name) + < 0) { + } + } } else if (proc->max && long_ret > proc->max) { - snprintf(errmsg, sizeof(errmsg), - "Too many %s running (# = %d)", - proc->name, (int) long_ret); + if (asprintf(&errmsg, "Too many %s running (# = %d)", + proc->name, (int) long_ret) < 0) { + } } else if (proc->min == 0 && proc->max == 0 && long_ret > 0) { - snprintf(errmsg, sizeof(errmsg), - "%s process should not be running.", proc->name); - } else { - errmsg[0] = 0; + if (asprintf(&errmsg, "%s process should not be running.", + proc->name) < 0) { + } } - errmsg[ sizeof(errmsg)-1 ] = 0; - *var_len = strlen(errmsg); - return ((u_char *) errmsg); + *var_len = errmsg ? strlen(errmsg) : 0; + return (u_char *)(errmsg ? errmsg : empty_str); case ERRORFIX: *write_method = fixProcError; long_return = fixproc.result; return ((u_char *) & long_return); case ERRORFIXCMD: - if (proc->fixcmd) { - *var_len = strlen(proc->fixcmd); - return (u_char *) proc->fixcmd; - } - errmsg[0] = 0; - *var_len = 0; - return ((u_char *) errmsg); + *var_len = strlen(proc->fixcmd); + return (u_char *) proc->fixcmd; } return NULL; } @@ -338,7 +362,8 @@ fixProcError(int action, tmp = *((long *) var_val); if (tmp == 1 && action == COMMIT) { if (proc->fixcmd[0]) { - strcpy(fixproc.command, proc->fixcmd); + free(fixproc.command); + fixproc.command = strdup(proc->fixcmd); exec_command(&fixproc); } } @@ -359,13 +384,37 @@ get_proc_instance(struct myproc *proc, oid inst) return (proc); } +int +sh_count_myprocs(struct myproc *proc) +{ + if (proc == NULL) + return 0; + +#if defined(USING_HOST_DATA_ACCESS_SWRUN_MODULE) && defined(HAVE_PCRE_H) + if (proc->regexp.regex_ptr != NULL) + return sh_count_procs_by_regex(proc->name, proc->regexp); +#endif + + return sh_count_procs(proc->name); +} + #ifdef USING_HOST_DATA_ACCESS_SWRUN_MODULE -netsnmp_feature_require(swrun_count_processes_by_name) +netsnmp_feature_require(swrun_count_processes_by_name); int sh_count_procs(char *procname) { - return swrun_count_processes_by_name( procname ); + return swrun_count_processes_by_name( procname ); } + +#ifdef HAVE_PCRE_H +netsnmp_feature_require(swrun_count_processes_by_regex); +int +sh_count_procs_by_regex(char *procname, netsnmp_regex_ptr regexp) +{ + return swrun_count_processes_by_regex( procname, regexp ); +} +#endif + #else #ifdef bsdi2 @@ -794,17 +843,13 @@ sh_count_procs(char *procname) if (kvm_setproc(kd) < 0) { return (-1); } - kvm_setproc(kd); total = 0; while ((p = kvm_nextproc(kd)) != NULL) { - if (!p) { - return (-1); - } u = kvm_getu(kd, p); /* * Skip this entry if u or u->u_comm is a NULL pointer */ - if (!u) { + if (!u || !u->u_comm) { continue; } if (strcmp(procname, u->u_comm) == 0) @@ -814,7 +859,7 @@ sh_count_procs(char *procname) } #endif /* _SLASH_PROC_METHOD_ */ #else -netsnmp_feature_require(find_field) +netsnmp_feature_require(find_field); int sh_count_procs(char *procname) { @@ -826,7 +871,7 @@ sh_count_procs(char *procname) struct extensible ex; int slow = strstr(PSCMD, "ax") != NULL; - strcpy(ex.command, PSCMD); + ex.command = strdup(PSCMD); if ((fd = get_exec_output(&ex)) >= 0) { if ((file = fdopen(fd, "r")) == NULL) { setPerrorstatus("fdopen"); diff --git a/agent/mibgroup/ucd-snmp/proc.h b/agent/mibgroup/ucd-snmp/proc.h index ff97cec..ea6d5ab 100644 --- a/agent/mibgroup/ucd-snmp/proc.h +++ b/agent/mibgroup/ucd-snmp/proc.h @@ -4,13 +4,17 @@ #ifndef _MIBGROUP_PROC_H #define _MIBGROUP_PROC_H -config_require(util_funcs) +config_require(util_funcs); void init_proc(void); extern FindVarMethod var_extensible_proc; extern WriteMethod fixProcError; + int sh_count_myprocs(struct myproc *); int sh_count_procs(char *); +#ifdef HAVE_PCRE_H + int sh_count_procs_by_regex(char *, netsnmp_regex_ptr); +#endif /* * config file parsing routines @@ -19,10 +23,4 @@ config_require(util_funcs) void proc_parse_config(const char *, char *); void procfix_parse_config(const char *, char *); -#include "mibdefs.h" - -#define PROCMIN 3 -#define PROCMAX 4 -#define PROCCOUNT 5 - #endif /* _MIBGROUP_PROC_H */ diff --git a/agent/mibgroup/ucd-snmp/proxy.c b/agent/mibgroup/ucd-snmp/proxy.c index 017fd5c..9ab7eff 100644 --- a/agent/mibgroup/ucd-snmp/proxy.c +++ b/agent/mibgroup/ucd-snmp/proxy.c @@ -7,14 +7,22 @@ * Copyright @ 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -24,13 +32,11 @@ #include "proxy.h" -netsnmp_feature_require(handler_mark_requests_as_delegated) -netsnmp_feature_require(request_set_error_idx) +netsnmp_feature_require(handler_mark_requests_as_delegated); +netsnmp_feature_require(request_set_error_idx); static struct simple_proxy *proxies = NULL; -oid testoid[] = { 1, 3, 6, 1, 4, 1, 2021, 8888, 1 }; - /* * this must be standardized somewhere, right? */ @@ -80,24 +86,46 @@ proxy_parse_config(const char *token, char *line) netsnmp_session session, *ss; struct simple_proxy *newp, **listpp; - char args[MAX_ARGS][SPRINT_MAX_LEN], *argv[MAX_ARGS]; + char *argv[MAX_ARGS]; int argn, arg; char *cp; + char *buff; netsnmp_handler_registration *reg; context_string = NULL; DEBUGMSGTL(("proxy_config", "entering\n")); + /* Put the first string into the array */ + argv[0] = strdup("snmpd-proxy"); + if (!argv[0]) { + config_perror("could not allocate memory for argv[0]"); + return; + } /* * create the argv[] like array */ - strcpy(argv[0] = args[0], "snmpd-proxy"); /* bogus entry for getopt() */ + /* Allocates memory to store the parameters value */ + buff = (char *) malloc (strlen(line)+1); + if (!buff) { + config_perror("could not allocate memory for buff"); + /* Free the memory allocated */ + SNMP_FREE(argv[0]); + return; + } + for (argn = 1, cp = line; cp && argn < MAX_ARGS;) { - argv[argn] = args[argn]; - cp = copy_nword(cp, argv[argn], SPRINT_MAX_LEN); + /* Copy a parameter into the buff */ + cp = copy_nword(cp, buff, strlen(cp)+1); + argv[argn] = strdup(buff); + if (!argv[argn]) { + config_perror("could not allocate memory for argv[n]"); + SNMP_FREE(buff); + goto out; + } argn++; } + SNMP_FREE(buff); for (arg = 0; arg < argn; arg++) { DEBUGMSGTL(("proxy_args", "final args: %d = %s\n", arg, @@ -116,13 +144,13 @@ proxy_parse_config(const char *token, char *line) if (arg < 0) { config_perror("failed to parse proxy args"); - return; + goto out; } DEBUGMSGTL(("proxy_config", "done parsing args\n")); if (arg >= argn) { config_perror("missing base oid"); - return; + goto out; } /* @@ -137,6 +165,7 @@ proxy_parse_config(const char *token, char *line) * so this isn't needed. */ ss = snmp_open(&session); + SNMP_FREE(session.community); /* * usm_set_reportErrorOnUnknownID(1); */ @@ -145,28 +174,30 @@ proxy_parse_config(const char *token, char *line) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpget", &session); - SOCK_CLEANUP; - return; + goto out; } newp = (struct simple_proxy *) calloc(1, sizeof(struct simple_proxy)); newp->sess = ss; - DEBUGMSGTL(("proxy_init", "name = %s\n", args[arg])); + DEBUGMSGTL(("proxy_init", "name = %s\n", argv[arg])); newp->name_len = MAX_OID_LEN; - if (!snmp_parse_oid(args[arg++], newp->name, &newp->name_len)) { + if (!snmp_parse_oid(argv[arg++], newp->name, &newp->name_len)) { snmp_perror("proxy"); config_perror("illegal proxy oid specified\n"); - return; + /*deallocate the memory previously allocated*/ + SNMP_FREE(newp); + goto out; } if (arg < argn) { - DEBUGMSGTL(("proxy_init", "base = %s\n", args[arg])); + DEBUGMSGTL(("proxy_init", "base = %s\n", argv[arg])); newp->base_len = MAX_OID_LEN; - if (!snmp_parse_oid(args[arg++], newp->base, &newp->base_len)) { + if (!snmp_parse_oid(argv[arg++], newp->base, &newp->base_len)) { snmp_perror("proxy"); config_perror("illegal variable name specified (base oid)\n"); - return; + SNMP_FREE(newp); + goto out; } } if ( context_string ) @@ -213,6 +244,11 @@ proxy_parse_config(const char *token, char *line) reg->contextName = strdup(context_string); netsnmp_register_handler(reg); + +out: + /* Free the memory allocated */ + while(argn--) + SNMP_FREE(argv[argn]); } void @@ -231,7 +267,6 @@ proxy_free_config(void) unregister_mib_context(rm->name, rm->name_len, DEFAULT_MIB_PRIORITY, 0, 0, rm->context); - SNMP_FREE(rm->variables); SNMP_FREE(rm->context); snmp_close(rm->sess); SNMP_FREE(rm); @@ -262,16 +297,18 @@ proxy_fill_in_session(netsnmp_mib_handler *handler, } #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) -#if defined(NETSNMP_DISABLE_SNMPV1) - if (session->version == SNMP_VERSION_2c) { -#else -#if defined(NETSNMP_DISABLE_SNMPV2C) - if (session->version == SNMP_VERSION_1) { -#else - if (session->version == SNMP_VERSION_1 || - session->version == SNMP_VERSION_2c) { + if ( +#ifndef NETSNMP_DISABLE_SNMPV1 + ((session->version == SNMP_VERSION_1) && + !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V1)) || #endif +#ifndef NETSNMP_DISABLE_SNMPV2C + ((session->version == SNMP_VERSION_2c) && + !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V2c)) || #endif + 0 ) { /* 0 to terminate '||' above */ /* * Check if session has community string defined for it. @@ -288,10 +325,10 @@ proxy_fill_in_session(netsnmp_mib_handler *handler, *configured = strdup("-c"); DEBUGMSGTL(("proxy", "pdu has community string\n")); session->community_len = reqinfo->asp->pdu->community_len; - session->community = malloc(session->community_len + 1); - sprintf((char *)session->community, "%.*s", - (int) session->community_len, - (const char *)reqinfo->asp->pdu->community); + if (asprintf((char **)&session->community, "%.*s", + (int)session->community_len, + (const char *)reqinfo->asp->pdu->community) < 0) + session->community = NULL; } } #endif @@ -318,7 +355,7 @@ proxy_free_filled_in_session_args(netsnmp_session *session, void **configured) session->community_len = 0; } - free((u_char *)(*configured)); + free(*configured); *configured = NULL; } @@ -412,7 +449,7 @@ proxy_handler(netsnmp_mib_handler *handler, if (sp->base_len && reqinfo->mode == MODE_GETNEXT && (snmp_oid_compare(ourname, ourlength, - sp->base, sp->base_len) < 0)) { + sp->name, sp->name_len) < 0)) { DEBUGMSGTL(( "proxy", "request is out of registered range\n")); /* * Create GETNEXT request with an OID so the @@ -521,6 +558,17 @@ proxy_got_response(int operation, netsnmp_session * sess, int reqid, } switch (operation) { + case NETSNMP_CALLBACK_OP_RESEND: + /* + * Issue#147: Net-SNMP not responding when proxy requests times out + * + * When snmp_api issue a resend, the default case was hit and the + * delagated cache was freed. + * As a result, the NETSNMP_CALLBACK_OP_TIMED_OUT never came in. + */ + DEBUGMSGTL(("proxy", "pdu has been resent for request = %8p\n", requests)); + return SNMP_ERR_NOERROR; + case NETSNMP_CALLBACK_OP_TIMED_OUT: /* * WWWXXX: don't leave requests delayed if operation is @@ -650,8 +698,6 @@ proxy_got_response(int operation, netsnmp_session * sess, int reqid, "proxy OID return length too long.\n"); netsnmp_set_request_error(cache->reqinfo, requests, SNMP_ERR_GENERR); - if (pdu) - snmp_free_pdu(pdu); netsnmp_free_delegated_cache(cache); return 1; } @@ -675,8 +721,6 @@ proxy_got_response(int operation, netsnmp_session * sess, int reqid, * ack, this is bad. The # of varbinds don't match and * there is no way to fix the problem */ - if (pdu) - snmp_free_pdu(pdu); snmp_log(LOG_ERR, "response to proxy request illegal. We're screwed.\n"); netsnmp_set_request_error(cache->reqinfo, requests, @@ -687,11 +731,6 @@ proxy_got_response(int operation, netsnmp_session * sess, int reqid, if (cache->reqinfo->mode == MODE_GETBULK) netsnmp_bulk_to_next_fix_requests(requests); - /* - * free the response - */ - if (pdu && 0) - snmp_free_pdu(pdu); break; default: diff --git a/agent/mibgroup/ucd-snmp/proxy.h b/agent/mibgroup/ucd-snmp/proxy.h index b715d43..af770cc 100644 --- a/agent/mibgroup/ucd-snmp/proxy.h +++ b/agent/mibgroup/ucd-snmp/proxy.h @@ -1,8 +1,19 @@ #ifndef UCD_SNMP_PROXY_H #define UCD_SNMP_PROXY_H +/* + * @name: OID of the tree that is being proxied. + * @name_len: Length of @name. + * @base: Optional. If specified, the OID that @name is replaced with before + * an SNMP request is forwarded. + * @base_len: Length of @base. + * @context: Context string specified via <-Cn [contextname]>. + * @sess: Session associated with this proxy. + * @next: Next proxy in the single-linked proxy list. + * + * See also the Proxy Support section in the snmpd.conf(5) man page. + */ struct simple_proxy { - struct variable2 *variables; oid name[MAX_OID_LEN]; size_t name_len; oid base[MAX_OID_LEN]; diff --git a/agent/mibgroup/ucd-snmp/versioninfo.c b/agent/mibgroup/ucd-snmp/versioninfo.c index f7a8c63..b49b81b 100644 --- a/agent/mibgroup/ucd-snmp/versioninfo.c +++ b/agent/mibgroup/ucd-snmp/versioninfo.c @@ -2,20 +2,20 @@ #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif @@ -28,7 +28,7 @@ #include "util_funcs/restart.h" #include "util_funcs.h" /* clear_cache */ -netsnmp_feature_require(clear_cache) +netsnmp_feature_require(clear_cache); void @@ -132,7 +132,7 @@ var_extensible_version(struct variable *vp, *var_len = 1024; /* mib imposed restriction */ return (u_char *) config_opts; #else - strlcpy(errmsg, "", sizeof(errmsg))); + strlcpy(errmsg, "", sizeof(errmsg)); *var_len = strlen(errmsg); return ((u_char *) errmsg); #endif diff --git a/agent/mibgroup/ucd-snmp/versioninfo.h b/agent/mibgroup/ucd-snmp/versioninfo.h index 007424e..81e79a2 100644 --- a/agent/mibgroup/ucd-snmp/versioninfo.h +++ b/agent/mibgroup/ucd-snmp/versioninfo.h @@ -28,8 +28,8 @@ extern WriteMethod save_persistent; #define VERSAVEPERSISTENT 13 #define VERDEBUGGING 20 -config_require(util_funcs/header_generic) -config_require(util_funcs/restart) -config_require(util_funcs) +config_require(util_funcs/header_generic); +config_require(util_funcs/restart); +config_require(util_funcs); #endif /* _MIBGROUP_VERSIONINFO_H */ diff --git a/agent/mibgroup/ucd-snmp/vmstat.h b/agent/mibgroup/ucd-snmp/vmstat.h index 9fdf4f0..3ac5f4a 100644 --- a/agent/mibgroup/ucd-snmp/vmstat.h +++ b/agent/mibgroup/ucd-snmp/vmstat.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_VMSTAT_H #define _MIBGROUP_VMSTAT_H -config_require(hardware/cpu) +config_require(hardware/cpu); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/vmstat_aix4.h b/agent/mibgroup/ucd-snmp/vmstat_aix4.h index a13fcce..56e209a 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_aix4.h +++ b/agent/mibgroup/ucd-snmp/vmstat_aix4.h @@ -15,7 +15,7 @@ /* * Directive to include utility module */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); /* * we have to define the index ourselves, because perfstat structures diff --git a/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c b/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c index e35b6cd..4abccb2 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c +++ b/agent/mibgroup/ucd-snmp/vmstat_bsdi4.c @@ -224,13 +224,13 @@ var_extensible_vmstat(struct variable *vp, long_ret = rate(long_ret); return ((u_char *) (&long_ret)); case IOSENT: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; return ((u_char *) (&long_ret)); case IORECEIVE: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; diff --git a/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h b/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h index 74bf31b..8f2adc1 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h +++ b/agent/mibgroup/ucd-snmp/vmstat_bsdi4.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_VMSTAT_BSDI4_H #define _MIBGROUP_VMSTAT_BSDI4_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/vmstat_darwin7.c b/agent/mibgroup/ucd-snmp/vmstat_darwin7.c index d96c55c..87f7798 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_darwin7.c +++ b/agent/mibgroup/ucd-snmp/vmstat_darwin7.c @@ -20,7 +20,7 @@ #include #include -#if HAVE_SYS_VMPARAM_H +#ifdef HAVE_SYS_VMPARAM_H #include #else #include @@ -254,13 +254,13 @@ var_extensible_vmstat(struct variable *vp, long_ret = rate(long_ret); return ((u_char *) (&long_ret)); case IOSENT: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; return ((u_char *) (&long_ret)); case IORECEIVE: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; diff --git a/agent/mibgroup/ucd-snmp/vmstat_darwin7.h b/agent/mibgroup/ucd-snmp/vmstat_darwin7.h index b1a301d..31a40c0 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_darwin7.h +++ b/agent/mibgroup/ucd-snmp/vmstat_darwin7.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_VMSTAT_DARWIN7_H #define _MIBGROUP_VMSTAT_DARWIN7_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/vmstat_dynix.c b/agent/mibgroup/ucd-snmp/vmstat_dynix.c index 33f5412..798fff3 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_dynix.c +++ b/agent/mibgroup/ucd-snmp/vmstat_dynix.c @@ -407,7 +407,7 @@ take_snapshot(struct cpu_stat_snapshot *css) } /* end while */ } - free((void *) origcs); + free(origcs); /* * All engines running at warp speed, no problems (if there are any engines, that is) diff --git a/agent/mibgroup/ucd-snmp/vmstat_dynix.h b/agent/mibgroup/ucd-snmp/vmstat_dynix.h index 8954e35..0d97983 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_dynix.h +++ b/agent/mibgroup/ucd-snmp/vmstat_dynix.h @@ -14,7 +14,7 @@ /* * Directive to include utility module */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); /* * MIB wants V_CPU_SYSTEM which is sysinfo V_CPU_KERNEL + V_CPU_WAIT diff --git a/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c b/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c index 3de89b2..f8d9c0a 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c +++ b/agent/mibgroup/ucd-snmp/vmstat_freebsd2.c @@ -34,7 +34,7 @@ #include #include -#if HAVE_SYS_VMPARAM_H +#ifdef HAVE_SYS_VMPARAM_H #include #else #include @@ -294,13 +294,13 @@ var_extensible_vmstat(struct variable *vp, long_ret = rate(long_ret); return ((u_char *) (&long_ret)); case IOSENT: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; return ((u_char *) (&long_ret)); case IORECEIVE: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; diff --git a/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h b/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h index 26b44b6..30ad6d3 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h +++ b/agent/mibgroup/ucd-snmp/vmstat_freebsd2.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_VMSTAT_FREEBSD2_H #define _MIBGROUP_VMSTAT_FREEBSD2_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/vmstat_hpux.h b/agent/mibgroup/ucd-snmp/vmstat_hpux.h index 8f26594..c5132ed 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_hpux.h +++ b/agent/mibgroup/ucd-snmp/vmstat_hpux.h @@ -14,7 +14,7 @@ /* * Directive to include utility module */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); /* * Make 64-bit pstat calls diff --git a/agent/mibgroup/ucd-snmp/vmstat_linux.c b/agent/mibgroup/ucd-snmp/vmstat_linux.c index d6eff50..02c5869 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_linux.c +++ b/agent/mibgroup/ucd-snmp/vmstat_linux.c @@ -1,35 +1,35 @@ #include #include -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif #include #include -#if HAVE_MACHINE_PARAM_H +#ifdef HAVE_MACHINE_PARAM_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #if !defined(bsdi2) && !defined(netbsd1) #include #endif #endif -#if HAVE_SYS_CONF_H +#ifdef HAVE_SYS_CONF_H #include #endif -#if HAVE_SYS_FS_H +#ifdef HAVE_SYS_FS_H #include #else -#if HAVE_UFS_FS_H +#ifdef HAVE_UFS_FS_H #include #else #ifdef HAVE_SYS_STAT_H @@ -44,56 +44,56 @@ #ifdef HAVE_UFS_UFS_INODE_H #include #endif -#if HAVE_UFS_FFS_FS_H +#ifdef HAVE_UFS_FFS_FS_H #include #endif #endif #endif -#if HAVE_MTAB_H +#ifdef HAVE_MTAB_H #include #endif #include #include -#if HAVE_FSTAB_H +#ifdef HAVE_FSTAB_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H #include #endif #if (!defined(HAVE_STATVFS)) && defined(HAVE_STATFS) -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif #define statvfs statfs #endif -#if HAVE_VM_SWAP_PAGER_H +#ifdef HAVE_VM_SWAP_PAGER_H #include #endif -#if HAVE_SYS_FIXPOINT_H +#ifdef HAVE_SYS_FIXPOINT_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -112,7 +112,7 @@ #include "util_funcs/header_generic.h" #include "vmstat.h" -netsnmp_feature_require(hardware_cpu_load) +netsnmp_feature_require(hardware_cpu_load); FindVarMethod var_extensible_vmstat; diff --git a/agent/mibgroup/ucd-snmp/vmstat_linux.h b/agent/mibgroup/ucd-snmp/vmstat_linux.h index 6f7c50f..fdd4a36 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_linux.h +++ b/agent/mibgroup/ucd-snmp/vmstat_linux.h @@ -5,8 +5,8 @@ #ifndef _MIBGROUP_VMSTAT_H #define _MIBGROUP_VMSTAT_H -config_require(util_funcs/header_generic) -config_require(hardware/cpu) +config_require(util_funcs/header_generic); +config_require(hardware/cpu); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c b/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c index 9706c42..c06300f 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c +++ b/agent/mibgroup/ucd-snmp/vmstat_netbsd1.c @@ -258,13 +258,13 @@ var_extensible_vmstat(struct variable *vp, long_ret = rate(long_ret); return ((u_char *) (&long_ret)); case IOSENT: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; return ((u_char *) (&long_ret)); case IORECEIVE: -#if NETSNMP_NO_DUMMY_VALUES +#ifdef NETSNMP_NO_DUMMY_VALUES return NULL; #endif long_ret = -1; diff --git a/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h b/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h index adf5d46..5f7d59f 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h +++ b/agent/mibgroup/ucd-snmp/vmstat_netbsd1.h @@ -5,7 +5,7 @@ #ifndef _MIBGROUP_VMSTAT_NETBSD1_H #define _MIBGROUP_VMSTAT_NETBSD1_H -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); #include "mibdefs.h" diff --git a/agent/mibgroup/ucd-snmp/vmstat_solaris2.h b/agent/mibgroup/ucd-snmp/vmstat_solaris2.h index 77fbb3b..894f107 100644 --- a/agent/mibgroup/ucd-snmp/vmstat_solaris2.h +++ b/agent/mibgroup/ucd-snmp/vmstat_solaris2.h @@ -18,12 +18,14 @@ /* * Dependency requirements */ -config_arch_require(solaris2, kernel_sunos5) +#ifdef solaris2 +config_require(kernel_sunos5); +#endif /* * Directive to include utility module */ -config_require(util_funcs/header_generic) +config_require(util_funcs/header_generic); /* * MIB wants CPU_SYSTEM which is sysinfo CPU_KERNEL + CPU_WAIT diff --git a/agent/mibgroup/ucd_snmp.h b/agent/mibgroup/ucd_snmp.h index 0d87ec1..c490f76 100644 --- a/agent/mibgroup/ucd_snmp.h +++ b/agent/mibgroup/ucd_snmp.h @@ -1,19 +1,21 @@ /* module to include the various ucd-snmp specific extension modules. */ -config_require(ucd-snmp/proc) -config_require(ucd-snmp/versioninfo) -config_require(ucd-snmp/pass) -config_require(ucd-snmp/pass_persist) -config_version_require((ucd-snmp/disk, 5.7, ucd-snmp/disk_hw)) -config_require(ucd-snmp/loadave) -config_require(agent/extend) -config_require(ucd-snmp/errormib) -config_require(ucd-snmp/file) +config_require(ucd-snmp/proc); +config_require(ucd-snmp/versioninfo); +config_require(ucd-snmp/pass); +config_require(ucd-snmp/pass_persist); +config_require(ucd-snmp/disk_hw); +config_require(ucd-snmp/loadave); +config_require(agent/extend); +config_require(ucd-snmp/errormib); +config_require(ucd-snmp/file); #if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN) -config_require(ucd-snmp/dlmod) +config_require(ucd-snmp/dlmod); #endif -config_require(ucd-snmp/proxy) -config_require(ucd-snmp/logmatch) -config_require(ucd-snmp/memory) -config_require(ucd-snmp/vmstat) -config_add_mib(UCD-SNMP-MIB) -config_add_mib(UCD-DEMO-MIB) +config_require(ucd-snmp/proxy); +#ifdef HAVE_REGEX_H +config_require(ucd-snmp/logmatch); +#endif +config_require(ucd-snmp/memory); +config_require(ucd-snmp/vmstat); +config_add_mib(UCD-SNMP-MIB); +config_add_mib(UCD-DEMO-MIB); diff --git a/agent/mibgroup/udp-mib.h b/agent/mibgroup/udp-mib.h index 754e506..4d89aeb 100644 --- a/agent/mibgroup/udp-mib.h +++ b/agent/mibgroup/udp-mib.h @@ -1,5 +1,5 @@ /* * module to include the modules */ -config_require(udp-mib/udpEndpointTable) -config_add_mib(UDP-MIB) +config_require(udp-mib/udpEndpointTable); +config_add_mib(UDP-MIB); diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint.h b/agent/mibgroup/udp-mib/data_access/udp_endpoint.h index d9dec1d..e31c82b 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint.h +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint.h @@ -17,18 +17,18 @@ * HPUX11 had different reuirements than other HPUX, that should * be handled in the *_hpux.h header file. */ -config_require(udp-mib/data_access/udp_endpoint_common) +config_require(udp-mib/data_access/udp_endpoint_common); #if defined( linux ) -config_require(udp-mib/data_access/udp_endpoint_linux) -config_require(util_funcs/get_pid_from_inode) +config_require(udp-mib/data_access/udp_endpoint_linux); +config_require(util_funcs/get_pid_from_inode); #elif defined( solaris2 ) -config_require(udp-mib/data_access/udp_endpoint_solaris2) +config_require(udp-mib/data_access/udp_endpoint_solaris2); #elif defined(freebsd4) || defined(dragonfly) || defined(darwin) -config_require(udp-mib/data_access/udp_endpoint_freebsd4) +config_require(udp-mib/data_access/udp_endpoint_freebsd4); #elif defined(openbsd4) -config_require(udp-mib/data_access/udp_endpoint_openbsd) +config_require(udp-mib/data_access/udp_endpoint_openbsd); #elif defined(netbsd1) -config_require(udp-mib/data_access/udp_endpoint_netbsd) +config_require(udp-mib/data_access/udp_endpoint_netbsd); #else -config_require(udp-mib/data_access/udp_endpoint_unsup) +config_require(udp-mib/data_access/udp_endpoint_unsup); #endif diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_common.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_common.c index 63f8549..3f61ddc 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_common.c +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_common.c @@ -14,9 +14,9 @@ #include "udp_endpoint_private.h" -netsnmp_feature_child_of(udp_endpoint_common, libnetsnmpmibs) +netsnmp_feature_child_of(udp_endpoint_common, libnetsnmpmibs); -netsnmp_feature_child_of(udp_endpoint_entry_create, udp_endpoint_common) +netsnmp_feature_child_of(udp_endpoint_entry_create, udp_endpoint_common); /**---------------------------------------------------------------------*/ /* @@ -88,6 +88,11 @@ netsnmp_access_udp_endpoint_container_load(netsnmp_container* container, return container; } +static void _netsnmp_access_udp_endpoint_entry_free(void *data, void *context) +{ + netsnmp_access_udp_endpoint_entry_free(data); +} + void netsnmp_access_udp_endpoint_container_free(netsnmp_container *container, u_int free_flags) @@ -104,9 +109,7 @@ netsnmp_access_udp_endpoint_container_free(netsnmp_container *container, /* * free all items. */ - CONTAINER_CLEAR(container, - (netsnmp_container_obj_func*) - netsnmp_access_udp_endpoint_entry_free, + CONTAINER_CLEAR(container, _netsnmp_access_udp_endpoint_entry_free, NULL); } diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c index efb8bb6..b548d30 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c @@ -13,10 +13,10 @@ #include "mibII/mibII_common.h" -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif @@ -110,6 +110,7 @@ _load(netsnmp_container *container, u_int load_flags) char *udpcb_buf = NULL; #if defined(dragonfly) struct xinpcb *xig = NULL; + int i, count; #else struct xinpgen *xig = NULL; #endif @@ -134,13 +135,14 @@ _load(netsnmp_container *container, u_int load_flags) */ #if defined(dragonfly) xig = (struct xinpcb *) udpcb_buf; + count = len / sizeof(NS_ELEM); #else xig = (struct xinpgen *) udpcb_buf; xig = (struct xinpgen *) ((char *) xig + xig->xig_len); #endif #if defined(dragonfly) - while (xig && (xig->xi_len >= sizeof(struct xinpcb))) + for (i = 0; i < count; i++) #else while (xig && (xig->xig_len > sizeof(struct xinpgen))) #endif @@ -153,7 +155,11 @@ _load(netsnmp_container *container, u_int load_flags) #endif #if !defined(NETSNMP_ENABLE_IPV6) +#ifdef INP_ISIPV6 + if (INP_ISIPV6(&pcb.xi_inp)) +#else if (pcb.xi_inp.inp_vflag & INP_IPV6) +#endif continue; #endif @@ -164,12 +170,31 @@ _load(netsnmp_container *container, u_int load_flags) } /** oddly enough, these appear to already be in network order */ +#if __FreeBSD_version >= 1200026 + entry->loc_port = htons(pcb.inp_lport); + entry->rmt_port = htons(pcb.inp_fport); + + /** the addr string may need work */ + if (pcb.inp_vflag & INP_IPV6) { + entry->loc_addr_len = entry->rmt_addr_len = 16; + memcpy(entry->loc_addr, &pcb.in6p_laddr, 16); + memcpy(entry->rmt_addr, &pcb.in6p_faddr, 16); + } + else { + entry->loc_addr_len = entry->rmt_addr_len = 4; + memcpy(entry->loc_addr, &pcb.inp_laddr, 4); + memcpy(entry->rmt_addr, &pcb.inp_faddr, 4); + } +#else entry->loc_port = htons(pcb.xi_inp.inp_lport); entry->rmt_port = htons(pcb.xi_inp.inp_fport); - entry->pid = 0; /** the addr string may need work */ +#ifdef INP_ISIPV6 + if (INP_ISIPV6(&pcb.xi_inp)) { +#else if (pcb.xi_inp.inp_vflag & INP_IPV6) { +#endif entry->loc_addr_len = entry->rmt_addr_len = 16; memcpy(entry->loc_addr, &pcb.xi_inp.in6p_laddr, 16); memcpy(entry->rmt_addr, &pcb.xi_inp.in6p_faddr, 16); @@ -179,6 +204,8 @@ _load(netsnmp_container *container, u_int load_flags) memcpy(entry->loc_addr, &pcb.xi_inp.inp_laddr, 4); memcpy(entry->rmt_addr, &pcb.xi_inp.inp_faddr, 4); } +#endif + entry->pid = 0; /* * add entry to container @@ -187,6 +214,8 @@ _load(netsnmp_container *container, u_int load_flags) CONTAINER_INSERT(container, entry); } + free(udpcb_buf); + if(rc<0) return rc; diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c index 6edbdc1..f0c92d8 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c @@ -1,8 +1,7 @@ /* * udpEndpointTable MIB architecture support - * - * $Id$ */ + #include #include #include @@ -19,10 +18,11 @@ #include "udp_endpoint_private.h" #include +#include -netsnmp_feature_require(text_utils) -netsnmp_feature_child_of(udp_endpoint_all, libnetsnmpmibs) -netsnmp_feature_child_of(udp_endpoint_writable, udp_endpoint_all) +netsnmp_feature_require(text_utils); +netsnmp_feature_child_of(udp_endpoint_all, libnetsnmpmibs); +netsnmp_feature_child_of(udp_endpoint_writable, udp_endpoint_all); static int _load4(netsnmp_container *container, u_int flags); #if defined (NETSNMP_ENABLE_IPV6) diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c index f68314b..62891e8 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_netbsd.c @@ -15,10 +15,10 @@ #include "mibII/mibII_common.h" -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c index 99b67dc..ae1da66 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_openbsd.c @@ -14,14 +14,32 @@ #include "mibII/mibII_common.h" -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif +#ifdef HAVE_KVM_GETFILES +#if defined(HAVE_KVM_GETFILE2) || !defined(openbsd5) +#undef HAVE_KVM_GETFILES +#endif +#endif + +#ifdef HAVE_KVM_GETFILES +#include +#include +#define _KERNEL /* for DTYPE_SOCKET */ +#include +#undef _KERNEL +#endif + +#ifdef HAVE_KVM_GETFILES +static int _kvmload(netsnmp_container *container, u_int flags); +#else static int _load(netsnmp_container *container, u_int flags); +#endif /* * initialize arch specific storage @@ -91,11 +109,80 @@ netsnmp_arch_udp_endpoint_container_load(netsnmp_container *container, return -1; } +#ifdef HAVE_KVM_GETFILES + rc = _kvmload(container, load_flags); +#else rc = _load(container, load_flags); +#endif + + return rc; +} + +#ifdef HAVE_KVM_GETFILES +/** + * + * @retval 0 no errors + * @retval !0 errors + */ +static int +_kvmload(netsnmp_container *container, u_int load_flags) +{ + netsnmp_udp_endpoint_entry *entry; + struct kinfo_file *kf; + int count; + int rc = 0; + + kf = kvm_getfiles(kd, KERN_FILE_BYFILE, DTYPE_SOCKET, sizeof(struct kinfo_file), &count); + + while (count--) { + if (kf->so_protocol != IPPROTO_UDP) + goto skip; +#if !defined(NETSNMP_ENABLE_IPV6) + if (kf->so_family == AF_INET6) + goto skip; +#endif + + entry = netsnmp_access_udp_endpoint_entry_create(); + if(NULL == entry) { + rc = -3; + break; + } + + /** oddly enough, these appear to already be in network order */ + entry->loc_port = ntohs(kf->inp_lport); + entry->rmt_port = ntohs(kf->inp_fport); + entry->pid = kf->p_pid; + + /** the addr string may need work */ + if (kf->so_family == AF_INET6) { + entry->loc_addr_len = entry->rmt_addr_len = 16; + memcpy(entry->loc_addr, &kf->inp_laddru, 16); + memcpy(entry->rmt_addr, &kf->inp_faddru, 16); + } + else { + entry->loc_addr_len = entry->rmt_addr_len = 4; + memcpy(entry->loc_addr, &kf->inp_laddru[0], 4); + memcpy(entry->rmt_addr, &kf->inp_faddru[0], 4); + } + DEBUGMSGTL(("udp-mib/data_access", "udp %d %d %d\n", + entry->loc_addr_len, entry->loc_port, entry->rmt_port)); + /* + * add entry to container + */ + entry->index = CONTAINER_SIZE(container) + 1; + CONTAINER_INSERT(container, entry); +skip: + kf++; + } + + if (rc < 0) return rc; + return 0; } +#else /* HAVE_KVM_GETFILES */ + /** * * @retval 0 no errors @@ -105,8 +192,8 @@ static int _load(netsnmp_container *container, u_int load_flags) { struct inpcbtable table; - struct inpcb *head, *next, *prev; - struct inpcb inpcb; + struct inpcb *next, *prev; + struct inpcb inpcb, previnpcb; netsnmp_udp_endpoint_entry *entry; int rc = 0; @@ -118,22 +205,29 @@ _load(netsnmp_container *container, u_int load_flags) return -1; } - prev = (struct inpcb *)&CIRCLEQ_FIRST(&table.inpt_queue); + next = (struct inpcb *)&TAILQ_FIRST(&table.inpt_queue); prev = NULL; - head = next = CIRCLEQ_FIRST(&table.inpt_queue); while (next) { NETSNMP_KLOOKUP(next, (char *)&inpcb, sizeof(inpcb)); - if (prev && CIRCLEQ_PREV(&inpcb, inp_queue) != prev) { - snmp_log(LOG_ERR,"udbtable link error\n"); - break; + if (prev != NULL) { + if (!NETSNMP_KLOOKUP(prev, (char *)&previnpcb, + sizeof(previnpcb))) { + DEBUGMSGTL(("udp-mib/data_access/udpConn", + "klookup previnpcb failed\n")); + break; + } + if (TAILQ_NEXT(&previnpcb, inp_queue) != next) { + snmp_log(LOG_ERR,"udptable link error\n"); + break; + } } prev = next; - next = CIRCLEQ_NEXT(&inpcb, inp_queue); + next = TAILQ_NEXT(&inpcb, inp_queue); #if !defined(NETSNMP_ENABLE_IPV6) if (inpcb.inp_flags & INP_IPV6) - goto skip; + continue; #endif entry = netsnmp_access_udp_endpoint_entry_create(); if (NULL == entry) { @@ -163,11 +257,6 @@ _load(netsnmp_container *container, u_int load_flags) */ entry->index = CONTAINER_SIZE(container) + 1; CONTAINER_INSERT(container, entry); -#if !defined(NETSNMP_ENABLE_IPV6) - skip: -#endif - if (next == head) - break; } if (rc < 0) @@ -175,3 +264,4 @@ _load(netsnmp_container *container, u_int load_flags) return 0; } +#endif /* HAVE_KVM_GETFILES */ diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_private.h b/agent/mibgroup/udp-mib/data_access/udp_endpoint_private.h index 3ca9b2a..81ac0e1 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_private.h +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_private.h @@ -5,3 +5,4 @@ void netsnmp_arch_udp_endpoint_entry_cleanup(netsnmp_udp_endpoint_entry *); int netsnmp_arch_udp_endpoint_entry_delete(netsnmp_udp_endpoint_entry *); int netsnmp_arch_udp_endpoint_entry_copy(netsnmp_udp_endpoint_entry *, netsnmp_udp_endpoint_entry *); +int netsnmp_arch_udp_endpoint_delete(netsnmp_udp_endpoint_entry *entry); diff --git a/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c b/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c index f52244a..505f1c4 100644 --- a/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c +++ b/agent/mibgroup/udp-mib/data_access/udp_endpoint_solaris2.c @@ -11,9 +11,9 @@ #include "kernel_sunos5.h" -netsnmp_feature_require(netsnmp_access_udp_endpoint_entry_create) -netsnmp_feature_child_of(udp_endpoint_all, libnetsnmpmibs) -netsnmp_feature_child_of(udp_endpoint_writable, udp_endpoint_all) +netsnmp_feature_require(netsnmp_access_udp_endpoint_entry_create); +netsnmp_feature_child_of(udp_endpoint_all, libnetsnmpmibs); +netsnmp_feature_child_of(udp_endpoint_writable, udp_endpoint_all); static int _load_udp_endpoint_table_v4(netsnmp_container *, int); #if defined(NETSNMP_ENABLE_IPV6) && defined(SOLARIS_HAVE_IPV6_MIB_SUPPORT) diff --git a/agent/mibgroup/udp-mib/udpEndpointTable.h b/agent/mibgroup/udp-mib/udpEndpointTable.h index 95f49fd..d964b5b 100644 --- a/agent/mibgroup/udp-mib/udpEndpointTable.h +++ b/agent/mibgroup/udp-mib/udpEndpointTable.h @@ -2,4 +2,4 @@ * module to include the modules */ -config_require(udp-mib/udpEndpointTable/udpEndpointTable) +config_require(udp-mib/udpEndpointTable/udpEndpointTable); diff --git a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.c b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.c index 145f4ce..7e2a9b4 100644 --- a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.c +++ b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.c @@ -243,9 +243,8 @@ udpEndpointTable_indexes_set_tbl_idx(udpEndpointTable_mib_index * tbl_idx, /* * make sure there is enough space for udpEndpointLocalAddress data */ - if ((NULL == tbl_idx->udpEndpointLocalAddress) || - (tbl_idx->udpEndpointLocalAddress_len < - (udpEndpointLocalAddress_val_ptr_len))) { + if (tbl_idx->udpEndpointLocalAddress_len < + udpEndpointLocalAddress_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } @@ -274,9 +273,8 @@ udpEndpointTable_indexes_set_tbl_idx(udpEndpointTable_mib_index * tbl_idx, /* * make sure there is enough space for udpEndpointRemoteAddress data */ - if ((NULL == tbl_idx->udpEndpointRemoteAddress) || - (tbl_idx->udpEndpointRemoteAddress_len < - (udpEndpointRemoteAddress_val_ptr_len))) { + if (tbl_idx->udpEndpointRemoteAddress_len < + udpEndpointRemoteAddress_val_ptr_len) { snmp_log(LOG_ERR, "not enough space for value\n"); return MFD_ERROR; } diff --git a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h index 0deda03..e36a7d8 100644 --- a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h +++ b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable.h @@ -22,9 +22,9 @@ extern "C" { * other required module components */ /* *INDENT-OFF* */ -config_require(udp-mib/data_access/udp_endpoint) -config_require(udp-mib/udpEndpointTable/udpEndpointTable_interface) -config_require(udp-mib/udpEndpointTable/udpEndpointTable_data_access) +config_require(udp-mib/data_access/udp_endpoint); +config_require(udp-mib/udpEndpointTable/udpEndpointTable_interface); +config_require(udp-mib/udpEndpointTable/udpEndpointTable_data_access); /* *INDENT-ON* */ /* diff --git a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c index 0e25c21..e06f981 100644 --- a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c +++ b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_data_access.c @@ -185,7 +185,7 @@ udpEndpointTable_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -286,7 +286,8 @@ udpEndpointTable_container_load(netsnmp_container *container) /* * insert into table container */ - CONTAINER_INSERT(container, rowreq_ctx); + if (CONTAINER_INSERT(container, rowreq_ctx)) + udpEndpointTable_release_rowreq_ctx(rowreq_ctx); } ITERATOR_RELEASE(ep_it); diff --git a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c index 60d37e9..d6ca418 100644 --- a/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c +++ b/agent/mibgroup/udp-mib/udpEndpointTable/udpEndpointTable_interface.c @@ -47,17 +47,17 @@ #include -netsnmp_feature_child_of(udpEndpointTable_external_access, libnetsnmpmibs) +netsnmp_feature_child_of(udpEndpointTable_external_access, libnetsnmpmibs); -netsnmp_feature_require(row_merge) -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(row_merge); +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(check_all_requests_error); -netsnmp_feature_child_of(udpEndpointTable_container_size, udpEndpointTable_external_access) -netsnmp_feature_child_of(udpEndpointTable_registration_set, udpEndpointTable_external_access) -netsnmp_feature_child_of(udpEndpointTable_registration_get, udpEndpointTable_external_access) -netsnmp_feature_child_of(udpEndpointTable_container_get, udpEndpointTable_external_access) +netsnmp_feature_child_of(udpEndpointTable_container_size, udpEndpointTable_external_access); +netsnmp_feature_child_of(udpEndpointTable_registration_set, udpEndpointTable_external_access); +netsnmp_feature_child_of(udpEndpointTable_registration_get, udpEndpointTable_external_access); +netsnmp_feature_child_of(udpEndpointTable_container_get, udpEndpointTable_external_access); /********************************************************************** ********************************************************************** @@ -892,7 +892,7 @@ _mfd_udpEndpointTable_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if (old_string && (old_string != requests->requestvb->buf) && diff --git a/agent/mibgroup/util_funcs.c b/agent/mibgroup/util_funcs.c index 54068c6..444c8e5 100644 --- a/agent/mibgroup/util_funcs.c +++ b/agent/mibgroup/util_funcs.c @@ -6,20 +6,28 @@ * Copyright 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif +#ifdef HAVE_SPAWN_H +#include +#endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #ifdef __alpha @@ -28,7 +36,7 @@ #define _myBSD #endif #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H # include #endif #ifdef __alpha @@ -43,52 +51,66 @@ #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_BASETSD_H +#ifdef HAVE_BASETSD_H #include #define ssize_t SSIZE_T #endif -#if HAVE_RAISE +#ifdef HAVE_RAISE #define alarm raise #endif #ifdef HAVE_SYS_STAT_H #include #endif +#ifdef HAVE_LINUX_ETHTOOL_H +#include +#include +#include +#ifdef HAVE_LINUX_ETHTOOL_NEEDS_U64 +#include +typedef __u64 u64; /* hack, so we may include kernel's ethtool.h */ +typedef __u32 u32; /* ditto */ +typedef __u16 u16; /* ditto */ +typedef __u8 u8; /* ditto */ +#endif +#include +#endif /* HAVE_LINUX_ETHTOOL_H */ #include #include #include +#include #include "struct.h" #include "util_funcs.h" #include "utilities/execute.h" -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include "limits.h" #endif #ifdef USING_UCD_SNMP_ERRORMIB_MODULE @@ -97,31 +119,29 @@ #define setPerrorstatus(x) snmp_log_perror(x) #endif -netsnmp_feature_child_of(util_funcs, libnetsnmpmibs) +netsnmp_feature_child_of(util_funcs, libnetsnmpmibs); -netsnmp_feature_child_of(shell_command, util_funcs) -netsnmp_feature_child_of(get_exten_instance, util_funcs) -netsnmp_feature_child_of(clear_cache, util_funcs) -netsnmp_feature_child_of(find_field, util_funcs) -netsnmp_feature_child_of(parse_miboid, util_funcs) -netsnmp_feature_child_of(string_append_int, util_funcs) -netsnmp_feature_child_of(internal_mib_table, util_funcs) +netsnmp_feature_child_of(shell_command, util_funcs); +netsnmp_feature_child_of(get_exten_instance, util_funcs); +netsnmp_feature_child_of(clear_cache, util_funcs); +netsnmp_feature_child_of(find_field, util_funcs); +netsnmp_feature_child_of(parse_miboid, util_funcs); +netsnmp_feature_child_of(string_append_int, util_funcs); +netsnmp_feature_child_of(internal_mib_table, util_funcs); #if defined(HAVE_LINUX_RTNETLINK_H) -netsnmp_feature_child_of(prefix_info_all, util_funcs) -netsnmp_feature_child_of(prefix_info, prefix_info_all) -netsnmp_feature_child_of(update_prefix_info, prefix_info_all) -netsnmp_feature_child_of(delete_prefix_info, prefix_info_all) -netsnmp_feature_child_of(find_prefix_info, prefix_info_all) -netsnmp_feature_child_of(create_prefix_info, prefix_info_all) +netsnmp_feature_child_of(prefix_info_all, util_funcs); +netsnmp_feature_child_of(prefix_info, prefix_info_all); +netsnmp_feature_child_of(update_prefix_info, prefix_info_all); +netsnmp_feature_child_of(delete_prefix_info, prefix_info_all); +netsnmp_feature_child_of(find_prefix_info, prefix_info_all); +netsnmp_feature_child_of(create_prefix_info, prefix_info_all); #endif /* HAVE_LINUX_RTNETLINK_H */ -#ifdef NETSNMP_EXCACHETIME +#if defined(NETSNMP_EXCACHETIME) && defined(USING_UTILITIES_EXECUTE_MODULE) && defined(HAVE_EXECV) static long cachetime; #endif -extern int numprocs, numextens; - /** deprecated, use netsnmp_mktemp instead */ const char * make_tempfile(void) @@ -133,9 +153,9 @@ make_tempfile(void) int shell_command(struct extensible *ex) { -#if HAVE_SYSTEM +#ifdef HAVE_SYSTEM const char *ofname; - char shellline[STRMAX]; + char *shellline = NULL; FILE *shellout; ofname = make_tempfile(); @@ -145,10 +165,11 @@ shell_command(struct extensible *ex) return ex->result; } - snprintf(shellline, sizeof(shellline), "%s > %s", ex->command, ofname); - shellline[ sizeof(shellline)-1 ] = 0; - ex->result = system(shellline); - ex->result = WEXITSTATUS(ex->result); + if (asprintf(&shellline, "%s > %s", ex->command, ofname) >= 0) { + ex->result = system(shellline); + ex->result = WEXITSTATUS(ex->result); + free(shellline); + } shellout = fopen(ofname, "r"); if (shellout != NULL) { if (fgets(ex->output, sizeof(ex->output), shellout) == NULL) { @@ -240,7 +261,7 @@ get_exec_output(struct extensible *ex) ex->result = -1; NETSNMP_LOGONCE((LOG_WARNING, "support for run_exec_command not available\n")); #else -#if HAVE_EXECV +#ifdef HAVE_EXECV char cachefile[STRMAX]; char cache[NETSNMP_MAXCACHESIZE]; int cachebytes; @@ -258,7 +279,7 @@ get_exec_output(struct extensible *ex) curtime = time(NULL); if (curtime > (cachetime + NETSNMP_EXCACHETIME) || strcmp(ex->command, lastcmd) != 0) { - strcpy(lastcmd, ex->command); + strlcpy(lastcmd, ex->command, sizeof(lastcmd)); cachetime = curtime; #endif @@ -278,7 +299,7 @@ get_exec_output(struct extensible *ex) return -1; } if (cachebytes > 0) - write(cfd, (void *) cache, cachebytes); + NETSNMP_IGNORE_RESULT(write(cfd, cache, cachebytes)); close(cfd); #ifdef NETSNMP_EXCACHETIME lastresult = ex->result; @@ -293,9 +314,8 @@ get_exec_output(struct extensible *ex) return -1; } return (cfd); -#else /* !HAVE_EXECV */ -#if defined(WIN32) && !defined(HAVE_EXECV) -/* MSVC and MinGW. Cygwin already works as it has execv and fork */ +#elif defined(HAVE__GET_OSFHANDLE) && defined(HAVE__OPEN_OSFHANDLE) + /* MSVC and MinGW32. Cygwin has execv() and fork(). */ int fd; /* Reference: MS tech note: 190351 */ @@ -346,7 +366,7 @@ get_exec_output(struct extensible *ex) } /* Associates a C run-time file descriptor with an existing operating-system file handle. */ - fd = _open_osfhandle((long) hOutputRead, 0); + fd = _open_osfhandle((intptr_t) hOutputRead, 0); /* Set up STARTUPINFO for CreateProcess with the handles and have it hide the window * for the new process. */ @@ -388,73 +408,63 @@ get_exec_output(struct extensible *ex) return -1; } return fd; -#endif /* WIN32 */ -#endif +#endif /* HAVE_EXECV */ #endif /* !defined(USING_UTILITIES_EXECUTE_MODULE) */ return -1; } -int -get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) + +/* + * Split @cmd into words and return an array with pointers to these words. + * Store a pointer to the split command string into *@args. The caller must + * free both *@args and the returned pointer. + */ +static NETSNMP_ATTRIBUTE_UNUSED char ** +parse_cmd(char **args, const char *cmd) { -/* Alexander Prömel, alexander@proemel.de 08/24/2006 - The following code, is tested on picotux rev. 1.01. - I think, it will be better to put the named pipes, into /var/run or make it selectable via CONFIG file. - If the pipe file already exist, the creation will fail. - I put the pipes into /flash, the pipepath has to change in ucd-snmp/pass_persist.c too, if you change it here. -*/ -#if HAVE_EXECV -#ifdef __uClinux__ /* HAVE uClinux */ - int in,out; - char fifo_in_path[256]; - char fifo_out_path[256]; - pid_t tpid; - - if ((tpid = vfork()) == 0) { /*temp child*/ - execve(cmd, NULL,NULL); - perror(cmd); - exit(1); - } else { - if(tpid > 0) { - /*initialize workspace*/ - snprintf(fifo_in_path, 256, "/flash/cp_%d", tpid); - snprintf(fifo_out_path, 256, "/flash/pc_%d", tpid); - - in = mkfifo(fifo_in_path, S_IRWXU); /*Create Input Pipe, 700*/ - if ( in ) { - perror("parent: inpipe"); - exit(0); - } - out = mkfifo(fifo_out_path, S_IRWXU); /*Create Output Pipe, 700*/ - if ( out ) { - perror("parent: outpipe"); - exit(0); - } - - in = open(fifo_in_path,O_RDONLY); /*open the Input Pipe read Only*/ - if(in < 0) { - perror("parent: input"); - exit(0); - } - out = open(fifo_out_path,O_WRONLY); /*open the Output Pipe write Only*/ - if(out < 0) { - perror("parent: output"); - exit(0); - } - - *fdIn = in; /*read*/ - *fdOut = out; /*write*/ - *pid = tpid; - return (1); /* We are returning 0 for error... */ - } else { /*pid < 0*/ - setPerrorstatus("vfork"); - return 0; - } + int i, cnt; + const char *cptr1; + char *cptr2, **argv, **aptr; + *args = strdup(cmd); + if (!*args) + return NULL; + for (cnt = 1, cptr1 = cmd, cptr2 = *args; *cptr1 != '\0'; + cptr2++, cptr1++) { + *cptr2 = *cptr1; + if (*cptr1 == ' ') { + *cptr2++ = '\0'; + cptr1 = skip_white_const(cptr1); + if (!cptr1) + break; + *cptr2 = *cptr1; + if (*cptr1) + cnt++; + } } -#else /*HAVE x86*/ - int fd[2][2], i, cnt; - char ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv, - **aptr; + argv = malloc((cnt + 1) * sizeof(argv[0])); + if (argv == NULL) { + free(*args); + return NULL; + } + aptr = argv; + *aptr++ = *args; + for (cptr2 = *args, i = 1; i != cnt; cptr2++) { + if (*cptr2 == '\0') { + *aptr++ = cptr2 + 1; + i++; + } + } + *aptr++ = NULL; + return argv; +} + +#if defined(HAVE_EXECV) +static int +get_exec_pipes_fork(const char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) +{ + int fd[2][2]; + char **argv, *args; + /* * Setup our pipes */ @@ -463,16 +473,18 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) return 0; } if ((*pid = fork()) == 0) { /* First handle for the child */ - close(0); - if (dup(fd[0][0]) != 0) { - setPerrorstatus("dup 0"); + close(fd[0][1]); + close(fd[1][0]); + if (dup2(fd[0][0], STDIN_FILENO) < 0) { + setPerrorstatus("dup stdin"); return 0; } - close(1); - if (dup(fd[1][1]) != 1) { - setPerrorstatus("dup 1"); + close(fd[0][0]); + if (dup2(fd[1][1], STDOUT_FILENO) < 0) { + setPerrorstatus("dup stdout"); return 0; } + close(fd[1][1]); /* * write standard output and standard error to pipe. @@ -480,40 +492,19 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) /* * close all non-standard open file descriptors */ - for (cnt = getdtablesize() - 1; cnt >= 2; --cnt) - (void) close(cnt); - (void) dup(1); /* stderr */ + netsnmp_close_fds(STDOUT_FILENO); + NETSNMP_IGNORE_RESULT(dup2(STDOUT_FILENO, STDERR_FILENO)); - for (cnt = 1, cptr1 = cmd, cptr2 = argvs; *cptr1 != 0; - cptr2++, cptr1++) { - *cptr2 = *cptr1; - if (*cptr1 == ' ') { - *(cptr2++) = 0; - if ((cptr1 = skip_white(cptr1)) == NULL) - break; - *cptr2 = *cptr1; - if (*cptr1 != 0) - cnt++; - } + argv = parse_cmd(&args, cmd); + if (!argv) { + DEBUGMSGTL(("util_funcs", "get_exec_pipes(): argv == NULL\n")); + return 0; } - *cptr2 = 0; - *(cptr2 + 1) = 0; - argv = (char **) malloc((cnt + 2) * sizeof(char *)); - if (argv == NULL) - return 0; /* memory alloc error */ - aptr = argv; - *(aptr++) = argvs; - for (cptr2 = argvs, i = 1; i != cnt; cptr2++) - if (*cptr2 == 0) { - *(aptr++) = cptr2 + 1; - i++; - } - while (*cptr2 != 0) - cptr2++; - *(aptr++) = NULL; - copy_nword(cmd, ctmp, sizeof(ctmp)); - execv(ctmp, argv); - perror(ctmp); + DEBUGMSGTL(("util_funcs", "get_exec_pipes(): argv[0] = %s\n", argv[0])); + execv(argv[0], argv); + perror(argv[0]); + free(argv); + free(args); exit(1); } else { close(fd[0][0]); @@ -528,10 +519,76 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) *fdOut = fd[0][1]; return (1); /* We are returning 0 for error... */ } -#endif /* uClinux or x86 */ -#endif /* !HAVE_EXECV */ -#if defined(WIN32) && !defined (mingw32) && !defined(HAVE_EXECV) -/* MSVC (MinGW not working but should use this code). Cygwin already works as it has execv and fork */ +} +#endif + +#if defined(HAVE_POSIX_SPAWN) +static int +NETSNMP_ATTRIBUTE_UNUSED +get_exec_pipes_spawn(const char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) +{ + int fd[2][2], spawn_res; + char **argv, *args; + posix_spawnattr_t attr; + posix_spawn_file_actions_t file_actions; + + argv = parse_cmd(&args, cmd); + if (!argv) { + DEBUGMSGTL(("util_funcs", "get_exec_pipes(): argv == NULL\n")); + goto err; + } + if (pipe(fd[0])) { + setPerrorstatus("pipe 0"); + goto free_argv; + } + if (pipe(fd[1])) { + setPerrorstatus("pipe 1"); + goto close_pipe_0; + } + posix_spawnattr_init(&attr); + posix_spawn_file_actions_init(&file_actions); + posix_spawn_file_actions_addclose(&file_actions, fd[0][1]); + posix_spawn_file_actions_addclose(&file_actions, fd[1][0]); + posix_spawn_file_actions_adddup2(&file_actions, fd[0][0], STDIN_FILENO); + posix_spawn_file_actions_addclose(&file_actions, fd[0][0]); + posix_spawn_file_actions_adddup2(&file_actions, fd[1][1], STDOUT_FILENO); + posix_spawn_file_actions_addclose(&file_actions, fd[1][1]); + posix_spawn_file_actions_adddup2(&file_actions, STDOUT_FILENO, + STDERR_FILENO); + spawn_res = posix_spawn(pid, argv[0], &file_actions, &attr, argv, NULL); + posix_spawn_file_actions_destroy(&file_actions); + posix_spawnattr_destroy(&attr); + if (spawn_res != 0) { + setPerrorstatus("posix_spawn"); + goto close_pipe_1; + } + close(fd[0][0]); + close(fd[1][1]); + *fdIn = fd[1][0]; + *fdOut = fd[0][1]; + return 1; + +close_pipe_1: + close(fd[1][0]); + close(fd[1][1]); + +close_pipe_0: + close(fd[0][0]); + close(fd[0][1]); + +free_argv: + free(argv); + +err: + return 0; +} +#endif + +#if defined(HAVE__GET_OSFHANDLE) && defined(HAVE__OPEN_OSFHANDLE) +static int +get_exec_pipes_win32(const char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) +{ + /* MSVC and MinGW32. Cygwin has execv() and fork(). */ /* Reference: MS tech note: 190351 */ HANDLE hInputWriteTmp, hInputRead, hInputWrite = NULL; HANDLE hOutputReadTmp, hOutputRead, hOutputWrite = NULL; @@ -548,12 +605,13 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) /* Child temporary output pipe with Inheritance on (sa.bInheritHandle is true) */ if (!CreatePipe(&hOutputReadTmp,&hOutputWrite,&sa,0)) { DEBUGMSGTL(("util_funcs", "get_exec_pipes CreatePipe ChildOut: %d\n", - GetLastError())); + (unsigned int)GetLastError())); return 0; } /* Child temporary input pipe with Inheritance on (sa.bInheritHandle is true) */ if (!CreatePipe(&hInputRead,&hInputWriteTmp,&sa,0)) { - DEBUGMSGTL(("util_funcs", "get_exec_pipes CreatePipe ChildIn: %d\n", GetLastError())); + DEBUGMSGTL(("util_funcs", "get_exec_pipes CreatePipe ChildIn: %d\n", + (unsigned int)GetLastError())); return 0; } @@ -561,46 +619,55 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) * its stdout handles. */ if (!DuplicateHandle(GetCurrentProcess(),hOutputWrite, GetCurrentProcess(), &hErrorWrite,0, TRUE,DUPLICATE_SAME_ACCESS)) { - DEBUGMSGTL(("util_funcs", "get_exec_pipes DuplicateHandle: %d\n", GetLastError())); - return 0; + DEBUGMSGTL(("util_funcs", "get_exec_pipes DuplicateHandle: %d\n", + (unsigned int)GetLastError())); + return 0; } /* Create new copies of the input and output handles but set bInheritHandle to * FALSE so the new handle can not be inherited. Otherwise the handles can not * be closed. */ - if (!DuplicateHandle(GetCurrentProcess(), hOutputReadTmp, GetCurrentProcess(), - &hOutputRead, 0, FALSE, DUPLICATE_SAME_ACCESS)) { - DEBUGMSGTL(("util_funcs", "get_exec_pipes DupliateHandle ChildOut: %d\n", GetLastError())); - CloseHandle(hErrorWrite); - return 0; + if (!DuplicateHandle(GetCurrentProcess(), hOutputReadTmp, + GetCurrentProcess(), &hOutputRead, 0, FALSE, + DUPLICATE_SAME_ACCESS)) { + DEBUGMSGTL(("util_funcs", + "get_exec_pipes DupliateHandle ChildOut: %d\n", + (unsigned int)GetLastError())); + CloseHandle(hErrorWrite); + return 0; } if (!DuplicateHandle(GetCurrentProcess(),hInputWriteTmp, GetCurrentProcess(), &hInputWrite, 0, FALSE, DUPLICATE_SAME_ACCESS)) { - DEBUGMSGTL(("util_funcs","get_exec_pipes DupliateHandle ChildIn: %d\n", GetLastError())); - CloseHandle(hErrorWrite); - CloseHandle(hOutputRead); - return 0; + DEBUGMSGTL(("util_funcs","get_exec_pipes DupliateHandle ChildIn: %d\n", + (unsigned int)GetLastError())); + CloseHandle(hErrorWrite); + CloseHandle(hOutputRead); + return 0; } /* Close the temporary output and input handles */ if (!CloseHandle(hOutputReadTmp)) { - DEBUGMSGTL(("util_funcs", "get_exec_pipes CloseHandle (hOutputReadTmp): %d\n", GetLastError())); - CloseHandle(hErrorWrite); - CloseHandle(hOutputRead); - CloseHandle(hInputWrite); - return 0; + DEBUGMSGTL(("util_funcs", + "get_exec_pipes CloseHandle (hOutputReadTmp): %d\n", + (unsigned int)GetLastError())); + CloseHandle(hErrorWrite); + CloseHandle(hOutputRead); + CloseHandle(hInputWrite); + return 0; } if (!CloseHandle(hInputWriteTmp)) { - DEBUGMSGTL(("util_funcs", "get_exec_pipes CloseHandle (hInputWriteTmp): %d\n", GetLastError())); - CloseHandle(hErrorWrite); - CloseHandle(hOutputRead); - CloseHandle(hInputWrite); - return 0; + DEBUGMSGTL(("util_funcs", + "get_exec_pipes CloseHandle (hInputWriteTmp): %d\n", + (unsigned int)GetLastError())); + CloseHandle(hErrorWrite); + CloseHandle(hOutputRead); + CloseHandle(hInputWrite); + return 0; } /* Associates a C run-time file descriptor with an existing operating-system file handle. */ - *fdIn = _open_osfhandle((long) hOutputRead, 0); - *fdOut = _open_osfhandle((long) hInputWrite, 0); + *fdIn = _open_osfhandle((intptr_t) hOutputRead, 0); + *fdOut = _open_osfhandle((intptr_t) hInputWrite, 0); /* Set up STARTUPINFO for CreateProcess with the handles and have it hide the window * for the new process. */ @@ -615,15 +682,17 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) /* Launch the process that you want to redirect. Example snmpd.conf pass_persist: * pass_persist .1.3.6.1.4.1.2021.255 c:/perl/bin/perl c:/temp/pass_persisttest */ - if (!CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)) { - DEBUGMSGTL(("util_funcs","get_exec_pipes CreateProcess:'%s' %d\n",cmd, GetLastError())); - CloseHandle(hErrorWrite); - CloseHandle(hOutputRead); - CloseHandle(hInputWrite); - return 0; + if (!CreateProcess(NULL, NETSNMP_REMOVE_CONST(char *, cmd), NULL, NULL, + TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)) { + DEBUGMSGTL(("util_funcs","get_exec_pipes CreateProcess:'%s' %d\n", cmd, + (unsigned int)GetLastError())); + CloseHandle(hErrorWrite); + CloseHandle(hOutputRead); + CloseHandle(hInputWrite); + return 0; } - DEBUGMSGTL(("util_funcs","child hProcess (stored in pid): %d\n",(int)pi.hProcess)); + DEBUGMSGTL(("util_funcs","child hProcess (stored in pid): %p\n", pi.hProcess)); DEBUGMSGTL(("util_funcs","child dwProcessId (task manager): %d\n",(int)pi.dwProcessId)); /* Set global child process handle */ @@ -631,7 +700,9 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) /* Cleanup */ if (!CloseHandle(pi.hThread)) - DEBUGMSGTL(("util_funcs","get_exec_pipes CloseHandle pi.hThread: %d\n",cmd)); + DEBUGMSGTL(("util_funcs", + "get_exec_pipes(%s) CloseHandle pi.hThread: %d\n", + cmd, (unsigned int)GetLastError())); /* Close pipe handles to make sure that no handles to the write end of the * output pipe are maintained in this process or else the pipe will @@ -640,19 +711,39 @@ get_exec_pipes(char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) */ if (!CloseHandle(hOutputWrite)){ - DEBUGMSGTL(("util_funcs","get_exec_pipes CloseHandle hOutputWrite: %d\n",cmd, GetLastError())); + DEBUGMSGTL(("util_funcs", + "get_exec_pipes(%s) CloseHandle hOutputWrite: %d\n", + cmd, (unsigned int)GetLastError())); return 0; } if (!CloseHandle(hInputRead)) { - DEBUGMSGTL(("util_funcs","get_exec_pipes CloseHandle hInputRead: %d\n",cmd, GetLastError())); + DEBUGMSGTL(("util_funcs", + "get_exec_pipes(%s) CloseHandle hInputRead: %d\n", + cmd, (unsigned int)GetLastError())); return 0; } if (!CloseHandle(hErrorWrite)) { - DEBUGMSGTL(("util_funcs","get_exec_pipes CloseHandle hErrorWrite: %d\n",cmd, GetLastError())); + DEBUGMSGTL(("util_funcs", + "get_exec_pipes(%s) CloseHandle hErrorWrite: %d\n", + cmd, (unsigned int)GetLastError())); return 0; } return 1; +} #endif /* WIN32 */ + +int +get_exec_pipes(const char *cmd, int *fdIn, int *fdOut, netsnmp_pid_t *pid) +{ +#if defined(HAVE_EXECV) + return get_exec_pipes_fork(cmd, fdIn, fdOut, pid); +#elif defined(HAVE_POSIX_SPAWN) + return get_exec_pipes_fork(cmd, fdIn, fdOut, pid); +#elif defined(HAVE__GET_OSFHANDLE) && defined(HAVE__OPEN_OSFHANDLE) + return get_exec_pipes_win32(cmd, fdIn, fdOut, pid); +#endif + DEBUGMSGTL(("util_funcs", + "get_exec_pipes() has not yet been implemented for this platform")); return 0; } @@ -664,19 +755,19 @@ clear_cache(int action, size_t var_val_len, u_char * statP, oid * name, size_t name_len) { - - long tmp = 0; - if (var_val_type != ASN_INTEGER) { snmp_log(LOG_NOTICE, "Wrong type != int\n"); return SNMP_ERR_WRONGTYPE; } - tmp = *((long *) var_val); - if (tmp == 1 && action == COMMIT) { -#ifdef NETSNMP_EXCACHETIME - cachetime = 0; /* reset the cache next read */ -#endif +#if defined(NETSNMP_EXCACHETIME) && defined(USING_UTILITIES_EXECUTE_MODULE) && defined(HAVE_EXECV) + else { + long tmp = 0; + tmp = *((long *) var_val); + if (tmp == 1 && action == COMMIT) { + cachetime = 0; /* reset the cache next read */ + } } +#endif return SNMP_ERR_NOERROR; } #endif /* NETSNMP_FEATURE_REMOVE_CLEAR_CACHE */ @@ -1111,7 +1202,7 @@ int net_snmp_delete_prefix_info(prefix_cbx **head, for (temp_node = *head, prev_node = NULL; temp_node; prev_node = temp_node, temp_node = temp_node->next_info) { - if (temp_node->in6p && strcmp(temp_node->in6p, address) == 0) { + if (strcmp(temp_node->in6p, address) == 0) { if (prev_node) prev_node->next_info = temp_node->next_info; else @@ -1127,3 +1218,78 @@ int net_snmp_delete_prefix_info(prefix_cbx **head, #endif /* HAVE_LINUX_RTNETLINK_H */ +/** + * netsnmp_get_link_settings + * @name + * + * @returns 0 success + * @returns -1 Both ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET failed + * @returns -2 HAVE_LINUX_ETHTOOL_H is not defined + */ +int netsnmp_get_link_settings(struct netsnmp_linux_link_settings *nlls, + int fd, const char *name) +{ + int err = -2; + +#ifdef HAVE_LINUX_ETHTOOL_H + struct ifreq ifr; + + err = -1; + memset(&ifr, 0, sizeof(ifr)); + strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + +#ifdef ETHTOOL_GLINKSETTINGS + { + /* + * For Linux kernel v6.3 __ETHTOOL_LINK_MODE_MASK_NBITS == 101 or + * 4 32-bit words. Increase the 'nwords' constant if necessary. + */ + enum { mask_nwords = 8 }; + union { + struct ethtool_link_settings elinkset; + uint8_t _data[sizeof(struct ethtool_link_settings) + + mask_nwords * 3 * 4]; + } data; + + memset(&data, 0, sizeof(data)); + data.elinkset.cmd = ETHTOOL_GLINKSETTINGS; + ifr.ifr_data = &data.elinkset; + err = ioctl(fd, SIOCETHTOOL, &ifr, name); + /* + * See also the struct ethtool_link_settings documentation in + * Linux kernel header file include/uapi/linux/ethtool.h. + */ + if (data.elinkset.link_mode_masks_nwords < 0 && + -data.elinkset.link_mode_masks_nwords <= mask_nwords) { + data.elinkset.link_mode_masks_nwords = + -data.elinkset.link_mode_masks_nwords; + err = ioctl(fd, SIOCETHTOOL, &ifr); + } + if (err >= 0) { + nlls->duplex = data.elinkset.duplex; + nlls->speed = data.elinkset.speed; + } + } +#endif /* ETHTOOL_GLINKSETTINGS */ + + if (err < 0) { + struct ethtool_cmd edata; + + memset(&edata, 0, sizeof(edata)); + edata.cmd = ETHTOOL_GSET; + ifr.ifr_data = (char *)&edata; + err = ioctl(fd, SIOCETHTOOL, &ifr, name); + if (err >= 0) { + nlls->duplex = edata.duplex; + nlls->speed = edata.speed; +#ifdef HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI + nlls->speed |= edata.speed_hi << 16; +#endif + } else { + err = -1; + } + } +#endif /* HAVE_LINUX_ETHTOOL_H */ + + return err; +} diff --git a/agent/mibgroup/util_funcs.h b/agent/mibgroup/util_funcs.h index 7f59780..62eca55 100644 --- a/agent/mibgroup/util_funcs.h +++ b/agent/mibgroup/util_funcs.h @@ -4,8 +4,8 @@ #ifndef _MIBGROUP_UTIL_FUNCS_H #define _MIBGROUP_UTIL_FUNCS_H -config_require(util_funcs/header_generic) -config_require(util_funcs/header_simple_table) +config_require(util_funcs/header_generic); +config_require(util_funcs/header_simple_table); #ifdef HAVE_SYS_TYPES_H #include @@ -37,9 +37,11 @@ int exec_command(struct extensible *); struct extensible *get_exten_instance(struct extensible *, size_t); int get_exec_output(struct extensible *); #if defined(WIN32) && !defined(cygwin) -int get_exec_pipes(char *cmd, int *fdIn, int *fdOut, HANDLE *pid); +int get_exec_pipes(const char *cmd, int *fdIn, int *fdOut, + HANDLE *pid); #else -int get_exec_pipes(char *cmd, int *fdIn, int *fdOut, pid_t *pid); +int get_exec_pipes(const char *cmd, int *fdIn, int *fdOut, + pid_t *pid); #endif WriteMethod clear_cache; void print_mib_oid(oid *, size_t); @@ -67,6 +69,15 @@ int net_snmp_search_update_prefix_info(prefix_cbx **head, int net_snmp_delete_prefix_info(prefix_cbx **head, char *address); #endif + +struct netsnmp_linux_link_settings { + uint32_t speed; + uint8_t duplex; +}; + +int netsnmp_get_link_settings(struct netsnmp_linux_link_settings *nlls, + int fd, const char *name); + #define NIP6(addr) \ ntohs((addr).s6_addr16[0]), \ ntohs((addr).s6_addr16[1]), \ diff --git a/agent/mibgroup/util_funcs/Exit.c b/agent/mibgroup/util_funcs/Exit.c index c848fd8..540453b 100644 --- a/agent/mibgroup/util_funcs/Exit.c +++ b/agent/mibgroup/util_funcs/Exit.c @@ -7,7 +7,7 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/agent/mibgroup/util_funcs/get_pid_from_inode.c b/agent/mibgroup/util_funcs/get_pid_from_inode.c index 8e157ae..5788e1d 100644 --- a/agent/mibgroup/util_funcs/get_pid_from_inode.c +++ b/agent/mibgroup/util_funcs/get_pid_from_inode.c @@ -2,21 +2,25 @@ #include "get_pid_from_inode.h" +#include /* strlcpy() */ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif # define PROC_PATH "/proc" # define SOCKET_TYPE_1 "socket:[" @@ -144,7 +148,8 @@ netsnmp_get_pid_from_inode_init(void) if (filelen + strlen(pidinfo->d_name) > PATH_MAX) continue; - strcpy(path_name + filelen, pidinfo->d_name); + strlcpy(path_name + filelen, pidinfo->d_name, + sizeof(path_name) - filelen); /* The file discriptor is a symbolic link to a socket or a file.*/ /* Thus read the symbolic link.*/ diff --git a/agent/mibgroup/util_funcs/get_pid_from_inode.h b/agent/mibgroup/util_funcs/get_pid_from_inode.h index ad887a7..4f95210 100644 --- a/agent/mibgroup/util_funcs/get_pid_from_inode.h +++ b/agent/mibgroup/util_funcs/get_pid_from_inode.h @@ -6,22 +6,22 @@ #define NETSNMP_MIBGROUP_UTIL_FUNCS_GET_PID_FROM_INODE_H #ifndef linux -config_error(get_pid_from_inode is only suppored on linux) +config_error(get_pid_from_inode is only suppored on linux); #endif #define _LARGEFILE64_SOURCE 1 -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #else # define dirent direct -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif diff --git a/agent/mibgroup/util_funcs/header_simple_table.c b/agent/mibgroup/util_funcs/header_simple_table.c index 81fe160..f99b7fc 100644 --- a/agent/mibgroup/util_funcs/header_simple_table.c +++ b/agent/mibgroup/util_funcs/header_simple_table.c @@ -34,9 +34,9 @@ * */ int -header_simple_table(struct variable *vp, oid * name, size_t * length, - int exact, size_t * var_len, - WriteMethod ** write_method, int max) +header_simple_table(struct variable *vp, oid *name, size_t *length, + int exact, size_t *var_len, WriteMethod **write_method, + int max) { int i, rtest; /* Set to: -1 If name < vp->name, * 1 If name > vp->name, @@ -44,8 +44,7 @@ header_simple_table(struct variable *vp, oid * name, size_t * length, */ oid newname[MAX_OID_LEN]; - for (i = 0, rtest = 0; - i < (int) vp->namelen && i < (int) (*length) && !rtest; i++) { + for (i = 0, rtest = 0; i < vp->namelen && i < *length && !rtest; i++) { if (name[i] != vp->name[i]) { if (name[i] < vp->name[i]) rtest = -1; @@ -53,9 +52,7 @@ header_simple_table(struct variable *vp, oid * name, size_t * length, rtest = 1; } } - if (rtest > 0 || - (exact == 1 - && (rtest || (int) *length != (int) (vp->namelen + 1)))) { + if (rtest > 0 || (exact == 1 && (rtest || *length != vp->namelen + 1))) { if (var_len) *var_len = 0; return MATCH_FAILED; @@ -63,13 +60,13 @@ header_simple_table(struct variable *vp, oid * name, size_t * length, memset(newname, 0, sizeof(newname)); - if (((int) *length) <= (int) vp->namelen || rtest == -1) { - memmove(newname, vp->name, (int) vp->namelen * sizeof(oid)); + if (*length <= vp->namelen || rtest == -1) { + memmove(newname, vp->name, vp->namelen * sizeof(oid)); newname[vp->namelen] = 1; *length = vp->namelen + 1; - } else if (((int) *length) > (int) vp->namelen + 1) { /* exact case checked earlier */ + } else if (*length > vp->namelen + 1) { /* exact case checked earlier */ *length = vp->namelen + 1; - memmove(newname, name, (*length) * sizeof(oid)); + memmove(newname, name, *length * sizeof(oid)); if (name[*length - 1] < MAX_SUBID) { newname[*length - 1] = name[*length - 1] + 1; } else { @@ -80,7 +77,7 @@ header_simple_table(struct variable *vp, oid * name, size_t * length, } } else { *length = vp->namelen + 1; - memmove(newname, name, (*length) * sizeof(oid)); + memmove(newname, name, *length * sizeof(oid)); if (!exact) { if (name[*length - 1] < MAX_SUBID) { newname[*length - 1] = name[*length - 1] + 1; @@ -94,16 +91,16 @@ header_simple_table(struct variable *vp, oid * name, size_t * length, newname[*length - 1] = name[*length - 1]; } } - if ((max >= 0 && ((int)newname[*length - 1] > max)) || - ( 0 == newname[*length - 1] )) { + if (*length && ((max >= 0 && newname[*length - 1] > (unsigned int)max) || + newname[*length - 1] == 0)) { if (var_len) *var_len = 0; return MATCH_FAILED; } - memmove(name, newname, (*length) * sizeof(oid)); + memmove(name, newname, *length * sizeof(oid)); if (write_method) - *write_method = (WriteMethod*)0; + *write_method = NULL; if (var_len) *var_len = sizeof(long); /* default */ return (MATCH_SUCCEEDED); diff --git a/agent/mibgroup/util_funcs/restart.c b/agent/mibgroup/util_funcs/restart.c index 5cad737..a8f9d4d 100644 --- a/agent/mibgroup/util_funcs/restart.c +++ b/agent/mibgroup/util_funcs/restart.c @@ -10,17 +10,15 @@ #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_RAISE -#define alarm raise -#endif - #include #include +#include +#include "restart.h" #ifdef USING_UCD_SNMP_ERRORMIB_MODULE #include "ucd-snmp/errormib.h" @@ -30,7 +28,8 @@ char **argvrestartp, *argvrestartname, *argvrestart; -RETSIGTYPE +#ifdef SIGALRM +static RETSIGTYPE restart_doit(int a) { char * name = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, @@ -48,25 +47,26 @@ restart_doit(int a) * The use of sigprocmask() is unspecified in a multithreaded process; see * pthread_sigmask(3). */ -#if HAVE_SIGPROCMASK +#ifdef HAVE_SIGPROCMASK { sigset_t empty_set; sigemptyset(&empty_set); sigprocmask(SIG_SETMASK, &empty_set, NULL); } -#elif HAVE_SIGBLOCK +#elif defined(HAVE_SIGBLOCK) sigsetmask(0); #endif /* * do the exec */ -#if HAVE_EXECV +#ifdef HAVE_EXECV execv(argvrestartname, argvrestartp); setPerrorstatus(argvrestartname); #endif } +#endif int restart_hook(int action, @@ -86,8 +86,8 @@ restart_hook(int action, if (tmp == 1 && action == COMMIT) { #ifdef SIGALRM signal(SIGALRM, restart_doit); -#endif alarm(NETSNMP_RESTARTSLEEP); +#endif } return SNMP_ERR_NOERROR; } diff --git a/agent/mibgroup/util_funcs/restart.h b/agent/mibgroup/util_funcs/restart.h index 82760a1..aef8c13 100644 --- a/agent/mibgroup/util_funcs/restart.h +++ b/agent/mibgroup/util_funcs/restart.h @@ -5,7 +5,8 @@ extern "C" { #endif -RETSIGTYPE restart_doit(int); +extern char **argvrestartp, *argvrestartname, *argvrestart; + WriteMethod restart_hook; #ifdef __cplusplus diff --git a/agent/mibgroup/utilities.h b/agent/mibgroup/utilities.h index ffb9240..1175832 100644 --- a/agent/mibgroup/utilities.h +++ b/agent/mibgroup/utilities.h @@ -1,3 +1,3 @@ -config_require(utilities/override) -config_require(utilities/execute) -config_require(utilities/iquery) +config_require(utilities/override); +config_require(utilities/execute); +config_require(utilities/iquery); diff --git a/agent/mibgroup/utilities/execute.c b/agent/mibgroup/utilities/execute.c index 68f3654..98c0484 100644 --- a/agent/mibgroup/utilities/execute.c +++ b/agent/mibgroup/utilities/execute.c @@ -4,28 +4,28 @@ #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include #include -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H #include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif @@ -35,22 +35,34 @@ #include #include +#include + #include "execute.h" #include "struct.h" -#define setPerrorstatus(x) snmp_log_perror(x) - #ifdef _MSC_VER #define popen _popen #define pclose _pclose #endif +/** + * Run a shell command by calling system() or popen(). + * + * @command: Shell command to run. + * @input: Data to send to stdin. May be NULL. + * @output: Buffer in which to store the output written to stdout. May be NULL. + * @out_len: Size of the output buffer. The actual number of bytes written is + * stored in *@out_len. + * + * @return >= 0 if the command has been executed; -1 if the command could not + * be executed. + */ int -run_shell_command( char *command, char *input, - char *output, int *out_len) /* Or realloc style ? */ +run_shell_command(const char *command, const char *input, + char *output, int *out_len) { -#if HAVE_SYSTEM +#ifdef HAVE_SYSTEM int result; /* and the return value of the command */ if (!command) @@ -65,12 +77,11 @@ run_shell_command( char *command, char *input, * Set up the command and run it. */ if (input) { - FILE *file; - if (output) { const char *ifname; const char *ofname; /* Filename for output redirection */ char shellline[STRMAX]; /* The full command to run */ + FILE *file; ifname = netsnmp_mktemp(); if(NULL == ifname) @@ -100,17 +111,23 @@ run_shell_command( char *command, char *input, if (out_len && *out_len != 0) { int fd; /* For processing any output */ int len = 0; + fd = open(ofname, O_RDONLY); if(fd >= 0) - len = read( fd, output, *out_len-1 ); + len = read(fd, output, *out_len - 1); *out_len = len; - if (len >= 0) output[len] = 0; - else output[0] = 0; - if (fd >= 0) close(fd); + if (len >= 0) + output[len] = 0; + else + output[0] = 0; + if (fd >= 0) + close(fd); } unlink(ofname); unlink(ifname); } else { + FILE *file; + file = popen(command, "w"); if (file) { fwrite(input, 1, strlen(input), file); @@ -130,8 +147,9 @@ run_shell_command( char *command, char *input, output[0] = 0; result = pclose(file); } - } else + } else { result = system(command); + } } return result; @@ -140,44 +158,53 @@ run_shell_command( char *command, char *input, #endif } - +#ifdef HAVE_EXECV /* * Split the given command up into separate tokens, * ready to be passed to 'execv' */ -char ** -tokenize_exec_command( char *command, int *argc ) +static char ** +tokenize_exec_command(const char *command, int *argc) { char ctmp[STRMAX]; - char *cp; + const char *cp = command; char **argv; int i; - argv = (char **) calloc(100, sizeof(char *)); - cp = command; + argv = calloc(100, sizeof(char *)); + if (!argv) + return argv; - for ( i=0; cp; i++ ) { - memset( ctmp, 0, STRMAX ); - cp = copy_nword( cp, ctmp, STRMAX ); - argv[i] = strdup( ctmp ); - if (i == 99) - break; - } - if (cp) { - argv[i++] = strdup( cp ); + for (i = 0; cp && i + 2 < 100; i++) { + cp = copy_nword_const(cp, ctmp, sizeof(ctmp)); + argv[i] = strdup(ctmp); } + if (cp) + argv[i++] = strdup(cp); argv[i] = NULL; *argc = i; return argv; } +#endif - +/** + * Run a command by calling execv(). + * + * @command: Shell command to run. + * @input: Data to send to stdin. May be NULL. + * @output: Buffer in which to store the output written to stdout. May be NULL. + * @out_len: Size of the output buffer. The actual number of bytes written is + * stored in *@out_len. + * + * @return >= 0 if the command has been executed; -1 if the command could not + * be executed. + */ int -run_exec_command( char *command, char *input, - char *output, int *out_len) /* Or realloc style ? */ +run_exec_command(const char *command, const char *input, + char *output, int *out_len) { -#if HAVE_EXECV +#ifdef HAVE_EXECV int ipipe[2]; int opipe[2]; int i; @@ -187,8 +214,16 @@ run_exec_command( char *command, char *input, int argc; DEBUGMSGTL(("run:exec", "running '%s'\n", command)); - pipe(ipipe); - pipe(opipe); + if (pipe(ipipe) < 0) { + snmp_log_perror("pipe"); + return -1; + } + if (pipe(opipe) < 0) { + snmp_log_perror("pipe"); + close(ipipe[0]); + close(ipipe[1]); + return -1; + } if ((pid = fork()) == 0) { /* * Child process @@ -198,27 +233,41 @@ run_exec_command( char *command, char *input, * Set stdin/out/err to use the pipe * and close everything else */ - close(0); - dup( ipipe[0]); - close(ipipe[1]); + if (dup2(ipipe[0], STDIN_FILENO) < 0) { + snmp_log_perror("dup2(STDIN_FILENO)"); + exit(1); + } + close(ipipe[0]); + close(ipipe[1]); - close(1); - dup( opipe[1]); + if (dup2(opipe[1], STDOUT_FILENO) < 0) { + snmp_log_perror("dup2(STDOUT_FILENO)"); + exit(1); + } close(opipe[0]); - close(2); - dup(1); - for (i = getdtablesize()-1; i>2; i--) - close(i); + close(opipe[1]); + + if (dup2(STDOUT_FILENO, STDERR_FILENO) < 0) { + snmp_log_perror("dup2(STDERR_FILENO)"); + exit(1); + } + + netsnmp_close_fds(2); /* * Set up the argv array and execute it * This is being run in the child process, * so will release resources when it terminates. */ - argv = tokenize_exec_command( command, &argc ); - execv( argv[0], argv ); - perror( argv[0] ); - exit(1); /* End of child */ + argv = tokenize_exec_command(command, &argc); + if (!argv) + exit(1); + execv(argv[0], argv); + snmp_log_perror(argv[0]); + for (i = 0; i < argc; i++) + free(argv[i]); + free(argv); + exit(1); /* End of child */ } else if (pid > 0) { char cache[NETSNMP_MAXCACHESIZE]; @@ -233,17 +282,15 @@ run_exec_command( char *command, char *input, */ /* - * Pass the input message (if any) to the child, + * Pass the input message (if any) to the child, * wait for the child to finish executing, and read * any output into the output buffer (if provided) */ - close(ipipe[0]); - close(opipe[1]); - if (input) { - write(ipipe[1], input, strlen(input)); - close(ipipe[1]); /* or flush? */ - } - else close(ipipe[1]); + close(ipipe[0]); + close(opipe[1]); + if (input && write(ipipe[1], input, strlen(input)) < 0) + snmp_log_perror("write() to input pipe"); + close(ipipe[1]); /* * child will block if it writes a lot of data and @@ -276,19 +323,19 @@ run_exec_command( char *command, char *input, * set up data for select */ FD_ZERO(&readfds); - FD_SET(opipe[0],&readfds); + FD_SET(opipe[0], &readfds); timeout.tv_sec = 1; timeout.tv_usec = 0; DEBUGMSGTL(("verbose:run:exec", " calling select\n")); count = select(numfds, &readfds, NULL, NULL, &timeout); if (count == -1) { - if (EAGAIN == errno) + if (EAGAIN == errno) { continue; - else { + } else { DEBUGMSGTL(("verbose:run:exec", " errno %d\n", errno)); - setPerrorstatus("read"); + snmp_log_perror("read"); break; } } else if (0 == count) { @@ -296,7 +343,7 @@ run_exec_command( char *command, char *input, continue; } - if (! FD_ISSET(opipe[0], &readfds)) { + if (!FD_ISSET(opipe[0], &readfds)) { DEBUGMSGTL(("verbose:run:exec", " fd not ready!\n")); continue; } @@ -321,14 +368,13 @@ run_exec_command( char *command, char *input, break; } else DEBUGMSGTL(("verbose:run:exec", - " child not done!?!\n"));; + " child not done!?!\n")); } else { DEBUGMSGTL(("verbose:run:exec", " child done\n")); waited = 1; /* don't wait again */ break; } - } - else if (count > 0) { + } else if (count > 0) { /* * got some data. fix up offset, if needed. */ @@ -343,14 +389,13 @@ run_exec_command( char *command, char *input, DEBUGMSGTL(("verbose:run:exec", " %d left in buffer\n", (int)cache_size)); } - } - else if ((count == -1) && (EAGAIN != errno)) { + } else if (count == -1 && EAGAIN != errno) { /* * if error, break */ DEBUGMSGTL(("verbose:run:exec", " errno %d\n", errno)); - setPerrorstatus("read"); + snmp_log_perror("read"); break; } } @@ -369,7 +414,7 @@ run_exec_command( char *command, char *input, * time. maybe start a time to wait(WNOHANG) once a second, * and late the agent continue? */ - if ((!waited) && (waitpid(pid, &result, 0) < 0 )) { + if (!waited && waitpid(pid, &result, 0) < 0) { snmp_log_perror("waitpid"); return -1; } @@ -378,24 +423,24 @@ run_exec_command( char *command, char *input, * null terminate any output */ if (output) { - output[offset] = 0; - *out_len = offset; + output[offset] = 0; + *out_len = offset; } DEBUGMSGTL(("run:exec"," child %d finished. result=%d\n", pid,result)); - return WEXITSTATUS(result); + return WEXITSTATUS(result); } else { /* * Parent process - fork failed */ snmp_log_perror("fork"); - close(ipipe[0]); - close(ipipe[1]); - close(opipe[0]); - close(opipe[1]); - return -1; + close(ipipe[0]); + close(ipipe[1]); + close(opipe[0]); + close(opipe[1]); + return -1; } #else diff --git a/agent/mibgroup/utilities/execute.h b/agent/mibgroup/utilities/execute.h index 3c9e84b..4954856 100644 --- a/agent/mibgroup/utilities/execute.h +++ b/agent/mibgroup/utilities/execute.h @@ -1,11 +1,11 @@ #ifndef _MIBGROUP_EXECUTE_H #define _MIBGROUP_EXECUTE_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); -int run_shell_command(char *command, char *input, - char *output, int *out_len); -int run_exec_command( char *command, char *input, - char *output, int *out_len); +int run_shell_command(const char *command, const char *input, + char *output, int *out_len); +int run_exec_command(const char *command, const char *input, + char *output, int *out_len); #endif /* _MIBGROUP_EXECUTE_H */ diff --git a/agent/mibgroup/utilities/iquery.c b/agent/mibgroup/utilities/iquery.c index 860590f..eff55cc 100644 --- a/agent/mibgroup/utilities/iquery.c +++ b/agent/mibgroup/utilities/iquery.c @@ -1,16 +1,24 @@ +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include #include #include #include +#include "agent_global_vars.h" +#include "agentx/subagent.h" #include "utilities/iquery.h" -netsnmp_feature_child_of(iquery_all, libnetsnmpmibs) -netsnmp_feature_child_of(iquery, iquery_all) -netsnmp_feature_child_of(iquery_community_session, iquery_all) -netsnmp_feature_child_of(iquery_pdu_session, iquery_all) +netsnmp_feature_child_of(iquery_all, libnetsnmpmibs); +netsnmp_feature_child_of(iquery, iquery_all); +netsnmp_feature_child_of(iquery_community_session, iquery_all); +netsnmp_feature_child_of(iquery_pdu_session, iquery_all); -netsnmp_feature_require(query_set_default_session) +netsnmp_feature_require(query_set_default_session); #ifndef NETSNMP_FEATURE_REMOVE_IQUERY @@ -19,6 +27,12 @@ netsnmp_parse_iquerySecLevel(const char *token, char *line) { int secLevel; +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V3)) { + netsnmp_config_error("SNMPv3 disabled"); + } else +#endif if ((secLevel = parse_secLevel_conf( token, line )) >= 0 ) { netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_INTERNAL_SECLEVEL, secLevel); @@ -31,22 +45,37 @@ void netsnmp_parse_iqueryVersion(const char *token, char *line) { #ifndef NETSNMP_DISABLE_SNMPV1 - if (!strcmp( line, "1" )) + if (!strcmp( line, "1" ) +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + && !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V1) +#endif + ) netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_INTERNAL_VERSION, SNMP_VERSION_1); else #endif #ifndef NETSNMP_DISABLE_SNMPV2C - if (!strcmp( line, "2" ) || !strcasecmp( line, "2c" )) + if ((!strcmp( line, "2" ) || !strcasecmp( line, "2c" )) +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + && !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V2c) +#endif + ) netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_INTERNAL_VERSION, SNMP_VERSION_2c); else #endif - if (!strcmp( line, "3" )) + if (!strcmp( line, "3" ) +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + && !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V3) +#endif + ) netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_INTERNAL_VERSION, SNMP_VERSION_3); else { - netsnmp_config_error("Unknown version: %s", line); + netsnmp_config_error("Unknown/disabled version: %s", line); } } @@ -132,7 +161,7 @@ void init_iquery(void){ #ifndef NETSNMP_FEATURE_REMOVE_IQUERY_PDU_SESSION netsnmp_session *netsnmp_iquery_pdu_session(netsnmp_pdu* pdu) { - if (!pdu) + if (!pdu || NETSNMP_RUNTIME_PROTOCOL_SKIP(pdu->version)) return NULL; if (pdu->version == SNMP_VERSION_3) return netsnmp_iquery_session( pdu->securityName, @@ -143,6 +172,7 @@ netsnmp_session *netsnmp_iquery_pdu_session(netsnmp_pdu* pdu) { pdu->securityEngineIDLen); else return netsnmp_iquery_session((char *) pdu->community, + pdu->version, pdu->version+1, SNMP_SEC_LEVEL_NOAUTH, @@ -180,9 +210,10 @@ netsnmp_session *netsnmp_iquery_session(char* secName, int version, * It might be worth keeping track of which 'secNames' already * have iquery sessions created, and re-using the appropriate one. */ - extern int callback_master_num; netsnmp_session *ss = NULL; + NETSNMP_RUNTIME_PROTOCOL_CHECK(version, unsupported_version); + #ifdef NETSNMP_TRANSPORT_CALLBACK_DOMAIN ss = netsnmp_callback_open( callback_master_num, NULL, NULL, NULL); if (ss) { @@ -203,6 +234,7 @@ netsnmp_session *netsnmp_iquery_session(char* secName, int version, } #endif + unsupported_version: return ss; } diff --git a/agent/mibgroup/utilities/iquery.h b/agent/mibgroup/utilities/iquery.h index f98bd91..c234fa2 100644 --- a/agent/mibgroup/utilities/iquery.h +++ b/agent/mibgroup/utilities/iquery.h @@ -1,10 +1,10 @@ #ifndef IQUERY_H #define IQUERY_H -config_belongs_in(agent_module) +config_belongs_in(agent_module); #ifndef NETSNMP_TRANSPORT_CALLBACK_DOMAIN -config_error(utilities/iquery depends on the Callback transport) +config_error(utilities/iquery depends on the Callback transport); #endif void init_iquery(void); diff --git a/agent/mibgroup/utilities/override.c b/agent/mibgroup/utilities/override.c index 48ac281..14cc92c 100644 --- a/agent/mibgroup/utilities/override.c +++ b/agent/mibgroup/utilities/override.c @@ -14,6 +14,7 @@ #include #include #include +#include "override.h" typedef struct override_data_s { int type; diff --git a/agent/mibgroup/winExtDLL.c b/agent/mibgroup/winExtDLL.c index e421412..788abdd 100644 --- a/agent/mibgroup/winExtDLL.c +++ b/agent/mibgroup/winExtDLL.c @@ -2,7 +2,7 @@ * @brief winExtDLL Net-SNMP agent extension module. * * Copyright (c) 2006-2009 Alex Burger. - * Copyright (c) 2009-2010 Bart Van Assche . + * Copyright (c) 2009-2021 Bart Van Assche . * * This Net-SNMP agent extension module loads Windows SNMP Extension Agent * DLLs in the Net-SNMP agent. Not only extension DLLs provided with Windows @@ -94,6 +94,7 @@ #include #include #include +#include #include "../../win32/Snmp-winExtDLL.h" #include @@ -102,7 +103,7 @@ #include "util_funcs.h" #include "winExtDLL.h" -netsnmp_feature_require(oid_is_subtree) +netsnmp_feature_require(oid_is_subtree); #define MAX_VALUE_NAME 16383 @@ -290,6 +291,7 @@ static void *xarray_reserve(xarray * a, int reserved); #define TRAPEVENT(i) ((HANDLE*)s_trapevent.p)[i] #define TRAPEVENT_TO_DLLINFO(i) ((winextdll**)s_trapevent_to_dllinfo.p)[i] static const oid mibii_system_mib[] = { 1, 3, 6, 1, 2, 1, 1 }; +static const oid lmmib2_mib[] = { 1, 3, 6, 1, 4, 1, 77 }; static OSVERSIONINFO s_versioninfo = { sizeof(s_versioninfo) }; static xarray s_winextdll = { 0, sizeof(winextdll) }; static xarray s_winextdll_view = { 0, sizeof(winextdll_view) }; @@ -315,9 +317,8 @@ init_winExtDLL(void) GetVersionEx(&s_versioninfo); - IsWow64Process = - (pfIsWow64Process)GetProcAddress(GetModuleHandle("kernel32"), - "IsWow64Process"); + IsWow64Process = (pfIsWow64Process)(uintptr_t) + GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process"); if (IsWow64Process) (*IsWow64Process)(GetCurrentProcess(), &is_wow64_process); @@ -338,11 +339,29 @@ init_winExtDLL(void) winextdll *const ext_dll_info = &WINEXTDLL(i); AsnObjectIdentifier view; winextdll_view ext_dll_view_info; + const char *dll_basename, *last_slash, *last_backslash; netsnmp_assert(ext_dll_info); if (!ext_dll_info->dll_name) continue; + last_slash = strrchr(ext_dll_info->dll_name, '/'); + last_backslash = strrchr(ext_dll_info->dll_name, '\\'); + if (last_slash && last_backslash) + dll_basename = last_slash > last_backslash ? last_slash + 1: + last_backslash + 1; + else if (last_slash) + dll_basename = last_slash + 1; + else if (last_backslash) + dll_basename = last_backslash + 1; + else + dll_basename = ext_dll_info->dll_name; + DEBUGMSG(("winExtDLL", "dll_basename = %s\n", dll_basename)); + if (!should_init(dll_basename)) { + DEBUGMSG(("winExtDLL", "Skipping DLL %s.\n", + ext_dll_info->dll_name)); + continue; + } DEBUGMSG(("winExtDLL", "loading DLL %s.\n", ext_dll_info->dll_name)); ext_dll_info->dll_handle = LoadLibrary(ext_dll_info->dll_name); @@ -366,8 +385,7 @@ init_winExtDLL(void) *p = '\0'; } snmp_log(LOG_ERR, - "init_winExtDLL: could not load SNMP extension" - " DLL %s: %s\n", + "init_winExtDLL: could not load SNMP extension DLL %s: %s\n", ext_dll_info->dll_name, lpMsgBuf ? lpMsgBuf : "(?)"); if (lpMsgBuf) LocalFree(lpMsgBuf); @@ -377,19 +395,19 @@ init_winExtDLL(void) /* * Store DLL name and functions in s_extension_dll_info array. */ - ext_dll_info->pfSnmpExtensionInit = (PFNSNMPEXTENSIONINIT) + ext_dll_info->pfSnmpExtensionInit = (PFNSNMPEXTENSIONINIT)(uintptr_t) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionInit"); - ext_dll_info->pfSnmpExtensionInitEx = (PFNSNMPEXTENSIONINITEX) - GetProcAddress(ext_dll_info->dll_handle, - "SnmpExtensionInitEx"); + ext_dll_info->pfSnmpExtensionInitEx = + (PFNSNMPEXTENSIONINITEX)(uintptr_t) + GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionInitEx"); ext_dll_info->pfSnmpExtensionClose = (PFNSNMPEXTENSIONCLOSE) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionClose"); - ext_dll_info->pfSnmpExtensionQuery = (PFNSNMPEXTENSIONQUERY) + ext_dll_info->pfSnmpExtensionQuery = (PFNSNMPEXTENSIONQUERY)(uintptr_t) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionQuery"); - ext_dll_info->pfSnmpExtensionQueryEx = (PFNSNMPEXTENSIONQUERYEX) - GetProcAddress(ext_dll_info->dll_handle, - "SnmpExtensionQueryEx"); - ext_dll_info->pfSnmpExtensionTrap = (PFNSNMPEXTENSIONTRAP) + ext_dll_info->pfSnmpExtensionQueryEx = + (PFNSNMPEXTENSIONQUERYEX)(uintptr_t) + GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionQueryEx"); + ext_dll_info->pfSnmpExtensionTrap = (PFNSNMPEXTENSIONTRAP)(uintptr_t) GetProcAddress(ext_dll_info->dll_handle, "SnmpExtensionTrap"); @@ -400,21 +418,6 @@ init_winExtDLL(void) ext_dll_info->dll_name); } - /* - * At least on a 64-bit Windows 7 system invoking SnmpExtensionInit() - * in the 32-bit version of evntagnt.dll hangs. Also, all queries in - * lmmib2.dll fail with "generic error" on a 64-bit Windows 7 system. - * So skip these two DLLs. - */ - if (s_versioninfo.dwMajorVersion >= 6 - && ((is_wow64_process - && basename_equals(ext_dll_info->dll_name, "evntagnt.dll")) - || basename_equals(ext_dll_info->dll_name, "lmmib2.dll"))) { - DEBUGMSG(("winExtDLL", "init_winExtDLL: skipped DLL %s.\n", - ext_dll_info->dll_name)); - continue; - } - /* * Init and get first supported view from Windows SNMP extension DLL. * Note: although according to the documentation of SnmpExtensionInit() @@ -436,26 +439,9 @@ init_winExtDLL(void) ext_dll_info->pfSnmpExtensionInit(uptime_reference, &ext_dll_info-> subagentTrapEvent, &view); - - if (!result) { - DEBUGMSG(("winExtDLL", - "init_winExtDLL: initialization of DLL %s failed.\n", - ext_dll_info->dll_name)); - /* - * At least on Windows 7 SnmpExtensionInit() in some extension - * agent DLLs returns "FALSE" although initialization - * succeeded. Hence ignore the SnmpExtensionInit() return value on - * Windows Vista and later. - */ - if (s_versioninfo.dwMajorVersion < 6) { - snmp_log(LOG_ERR, - "init_winExtDLL: initialization of DLL %s failed.\n", - ext_dll_info->dll_name); - FreeLibrary(ext_dll_info->dll_handle); - ext_dll_info->dll_handle = 0; - continue; - } - } + DEBUGMSG(("winExtDLL", + "init_winExtDLL: DLL %s initialization result %d\n", + ext_dll_info->dll_name, result)); if (ext_dll_info->subagentTrapEvent != NULL) { xarray_push_back(&s_trapevent, @@ -465,35 +451,24 @@ init_winExtDLL(void) memset(&ext_dll_view_info, 0, sizeof(ext_dll_view_info)); ext_dll_view_info.winextdll_info = ext_dll_info; - if (view.idLength == 0) { - DEBUGMSG(("winExtDLL", - "init_winExtDLL: DLL %s did not register an OID range.\n", - ext_dll_info->dll_name)); - continue; - } - /* - * Skip the mib-2 system section on Windows Vista and later because - * at least on a 64-bit Windows 7 system all queries in that section - * fail with status "generic error". - */ - if (s_versioninfo.dwMajorVersion >= 6 - && snmp_oid_compare_w_n(view.ids, view.idLength, mibii_system_mib, - sizeof(mibii_system_mib) / - sizeof(mibii_system_mib[0])) == 0) { - DEBUGMSG(("winExtDLL", - "init_winExtDLL: skipping system section of DLL %s.\n", - ext_dll_info->dll_name)); - continue; + DEBUGMSG(("winExtDLL", + "init_winExtDLL: DLL %s view length %d\n", + ext_dll_info->dll_name, view.idLength)); + if (view.idLength) { + copy_oid_n_w(ext_dll_view_info.name, + &ext_dll_view_info.name_length, + view.ids, view.idLength); + xarray_push_back(&s_winextdll_view, &ext_dll_view_info); } - copy_oid_n_w(ext_dll_view_info.name, &ext_dll_view_info.name_length, - view.ids, view.idLength); - xarray_push_back(&s_winextdll_view, &ext_dll_view_info); /* * Loop looking for more supported views. */ while (ext_dll_info->pfSnmpExtensionInitEx && ext_dll_info->pfSnmpExtensionInitEx(&view)) { + DEBUGMSG(("winExtDLL", + "init_winExtDLL: DLL %s view length %d\n", + ext_dll_info->dll_name, view.idLength)); memset(&ext_dll_view_info, 0, sizeof(ext_dll_view_info)); ext_dll_view_info.winextdll_info = ext_dll_info; copy_oid_n_w(ext_dll_view_info.name, @@ -642,7 +617,7 @@ register_netsnmp_handler(winextdll_view * const ext_dll_view_info) memset(ext_dll_view_info, 0, sizeof(*ext_dll_view_info)); return 1; } else { - // Create handler registration + /* Create handler registration */ ext_dll_view_info->my_handler = netsnmp_create_handler_registration(ext_dll_info->dll_name, var_winExtDLL, @@ -669,7 +644,9 @@ register_netsnmp_handler(winextdll_view * const ext_dll_view_info) } return 1; } else { - snmp_log(LOG_ERR, "handler registration failed.\n"); + snmp_log(LOG_ERR, + "winExtDLL: handler registration failed for %s.\n", + ext_dll_info->dll_name); ext_dll_view_info->my_handler = 0; } } else { @@ -881,14 +858,15 @@ var_winExtDLL(netsnmp_mib_handler *handler, varbind = request->requestvb; netsnmp_assert(varbind); +retry: /* * Convert the Net-SNMP varbind to a Windows SNMP varbind list. */ rc = convert_to_windows_varbind_list(&win_varbinds, varbind); if (rc != SNMP_ERR_NOERROR) { DEBUGMSG(("winExtDLL", - "converting varbind list to Windows format failed with" - " error code %d.\n", request->status)); + "converting varbind list to Windows format failed with error code %d.\n", + request->status)); netsnmp_request_set_error(requests, rc); goto free_win_varbinds; } @@ -967,6 +945,10 @@ var_winExtDLL(netsnmp_mib_handler *handler, rc = convert_win_snmp_err(ErrorStatus); if (rc != SNMP_ERR_NOERROR) { + copy_oid_n_w(varbind->name, &varbind->name_length, + win_varbinds.list[0].name.ids, + win_varbinds.list[0].name.idLength); + DEBUGIF("winExtDLL") { size_t oid_namelen = 0, outlen = 0; char *oid_name = NULL; @@ -975,24 +957,40 @@ var_winExtDLL(netsnmp_mib_handler *handler, netsnmp_sprint_realloc_objid((u_char **) & oid_name, &oid_namelen, &outlen, 1, &overflow, - ext_dll_view_info->name, - ext_dll_view_info->name_length); - DEBUGMSG(("winExtDLL", "extension DLL %s: SNMP query function" - " returned error code %lu (Windows) / %d (Net-SNMP)" - " for request type %d, OID %s%s, ASN type %d and" - " value %ld.\n", - ext_dll_info->dll_name, ErrorStatus, rc, nRequestType, - oid_name, overflow ? " [TRUNCATED]" : "", + varbind->name, + varbind->name_length); + DEBUGMSG(("winExtDLL", + "extension DLL %s: SNMP query function returned error code %u (Windows) / %d (Net-SNMP) for request type %d, OID %s%s, ASN type %d and value %d.\n", + ext_dll_info->dll_name, (unsigned int)ErrorStatus, rc, + nRequestType, oid_name, + overflow ? " [TRUNCATED]" : "", win_varbinds.list[0].value.asnType, - win_varbinds.list[0].value.asnValue.number)); + (unsigned int)win_varbinds.list[0].value.asnValue.number)); free(oid_name); } netsnmp_assert(ErrorIndex == 1); - netsnmp_request_set_error(requests, rc); - if (rc == SNMP_NOSUCHOBJECT || rc == SNMP_NOSUCHINSTANCE - || rc == SNMP_ERR_NOSUCHNAME) - rc = SNMP_ERR_NOERROR; - goto free_win_varbinds; + if (rc == SNMP_ERR_GENERR && + reqinfo->mode == MODE_GETNEXT && + varbind->name_length > 0 && + (snmp_oid_compare(varbind->name, varbind->name_length, + mibii_system_mib, + sizeof(mibii_system_mib) / + sizeof(mibii_system_mib[0])) == 0 || + snmp_oidtree_compare(varbind->name, varbind->name_length, + lmmib2_mib, + sizeof(lmmib2_mib) / + sizeof(lmmib2_mib[0])) == 0)) { + // Quirk: ignore 'generic error' for the MIB-II system MIB OID. + DEBUGMSG(("winExtDLL", "Ignoring the above error\n")); + varbind->name[varbind->name_length - 1]++; + goto retry; + } else { + netsnmp_request_set_error(requests, rc); + if (rc == SNMP_NOSUCHOBJECT || rc == SNMP_NOSUCHINSTANCE || + rc == SNMP_ERR_NOSUCHNAME) + rc = SNMP_ERR_NOERROR; + goto free_win_varbinds; + } } copy_value = FALSE; @@ -1152,10 +1150,7 @@ read_extension_dll_path_from_registry(const TCHAR * keyName) if (retCode != ERROR_SUCCESS) return 0; - retCode = RegQueryValueExA(hKey, - "Pathname", - NULL, - &key_value_type, + retCode = RegQueryValueExA(hKey, "Pathname", NULL, &key_value_type, (BYTE *) valueName, &key_value_size); if (retCode != ERROR_SUCCESS) { @@ -1215,8 +1210,7 @@ subagentTrapCheck(unsigned int clientreg, void *clientarg) if (!ext_dll_info->pfSnmpExtensionTrap) { snmp_log(LOG_ERR, - "internal error in SNMP extension DLL %s: a trap is ready" - " but the function SnmpExtensionTrap() is missing.\n", + "internal error in SNMP extension DLL %s: a trap is ready but the function SnmpExtensionTrap() is missing.\n", ext_dll_info->dll_name); return; } @@ -1466,7 +1460,7 @@ append_windows_varbind(netsnmp_variable_list ** const net_snmp_varbinds, sizeof(win_varbind->value.asnValue. ticks)); break; - case MS_ASN_OPAQUE: // AsnOctetString + case MS_ASN_OPAQUE: /* AsnOctetString */ snmp_varlist_add_variable_w(net_snmp_varbinds, win_varbind->name.ids, win_varbind->name.idLength, ASN_OPAQUE, @@ -1552,7 +1546,7 @@ convert_to_windows_varbind_list(SnmpVarBindList * pVarBindList, switch (varbind->type) { case ASN_BOOLEAN: - // There is no equivalent type in Microsoft's . + /* There is no equivalent type in Microsoft's . */ netsnmp_assert(0); win_varbind->value.asnType = MS_ASN_INTEGER; win_varbind->value.asnValue.number = *(varbind->val.integer); @@ -1597,7 +1591,7 @@ convert_to_windows_varbind_list(SnmpVarBindList * pVarBindList, win_varbind->value.asnValue.string.dynamic = TRUE; break; case ASN_SET: - // There is no equivalent type in Microsoft's . + /* There is no equivalent type in Microsoft's . */ netsnmp_assert(0); win_varbind->value.asnType = MS_ASN_INTEGER; win_varbind->value.asnValue.number = *(varbind->val.integer); diff --git a/agent/netsnmp_close_fds.c b/agent/netsnmp_close_fds.c new file mode 100644 index 0000000..2e2f46e --- /dev/null +++ b/agent/netsnmp_close_fds.c @@ -0,0 +1,58 @@ +#include + +#include +#ifdef HAVE_DIRENT_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#include + +/** + * Close all file descriptors larger than @fd. + */ +void netsnmp_close_fds(int fd) +{ +#if defined(HAVE_FORK) + DIR *dir NETSNMP_ATTRIBUTE_UNUSED; + struct dirent *ent NETSNMP_ATTRIBUTE_UNUSED; + int i, largest_fd = -1; + + if (fd < -1) + fd = -1; + +#ifdef __linux__ + if ((dir = opendir("/proc/self/fd"))) { + while ((ent = readdir(dir))) { + if (sscanf(ent->d_name, "%d", &i) == 1) { + if (i > largest_fd) + largest_fd = i; + } + } + closedir(dir); + } +#elif defined(__FreeBSD__) || defined(__OpenBSD__) + if ((dir = opendir("/dev/fd"))) { + while ((ent = readdir(dir))) { + if (sscanf(ent->d_name, "%d", &i) == 1) { + if (i > largest_fd) + largest_fd = i; + } + } + closedir(dir); + } +#endif + if (largest_fd < 0) { +#ifdef HAVE_GETDTABLESIZE + largest_fd = getdtablesize() - 1; +#else + largest_fd = sysconf(_SC_OPEN_MAX); +#endif + } + + for (i = largest_fd; i > fd && i >= 0; i--) + close(i); +#endif +} diff --git a/agent/snmp_agent.c b/agent/snmp_agent.c index b96d650..b744743 100644 --- a/agent/snmp_agent.c +++ b/agent/snmp_agent.c @@ -3,10 +3,6 @@ * * Simple Network Management Protocol (RFC 1067). */ -/* 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 subject to the following copyrights. See * the Net-SNMP's COPYING file for more details and other copyrights * that may apply: @@ -37,6 +33,11 @@ SOFTWARE. * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup snmp_agent net-snmp agent related processing * @ingroup agent @@ -53,26 +54,26 @@ SOFTWARE. #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include @@ -80,9 +81,11 @@ SOFTWARE. #define SNMP_NEED_REQUEST_LIST #include #include +#include #include +#include "agent_global_vars.h" -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif @@ -108,23 +111,162 @@ int deny_severity = LOG_WARNING; #include "smux/smux.h" #endif -netsnmp_feature_child_of(snmp_agent, libnetsnmpagent) -netsnmp_feature_child_of(agent_debugging_utilities, libnetsnmpagent) +netsnmp_feature_child_of(snmp_agent, libnetsnmpagent); +netsnmp_feature_child_of(agent_debugging_utilities, libnetsnmpagent); + +netsnmp_feature_child_of(allocate_globalcacheid, snmp_agent); +netsnmp_feature_child_of(free_agent_snmp_session_by_session, snmp_agent); +netsnmp_feature_child_of(check_all_requests_error, snmp_agent); +netsnmp_feature_child_of(check_requests_error, snmp_agent); +netsnmp_feature_child_of(request_set_error_idx, snmp_agent); +netsnmp_feature_child_of(set_agent_uptime, snmp_agent); +netsnmp_feature_child_of(agent_check_and_process, snmp_agent); + +netsnmp_feature_child_of(dump_sess_list, agent_debugging_utilities); + +netsnmp_feature_child_of(agent_remove_list_data, netsnmp_unused); +netsnmp_feature_child_of(set_all_requests_error, netsnmp_unused); +netsnmp_feature_child_of(addrcache_age, netsnmp_unused); +netsnmp_feature_child_of(delete_subtree_cache, netsnmp_unused); + +#ifndef NETSNMP_NO_PDU_STATS + +static netsnmp_container *_pdu_stats = NULL; +static int _pdu_stats_max = 0; +static u_long _pdu_stats_threshold = 0; +static u_long _pdu_stats_current_lowest = 0; + +netsnmp_container * +netsnmp_get_pdu_stats(void) +{ + return _pdu_stats; +} + +int _pdu_stats_compare(const netsnmp_pdu_stats * lhs, + const netsnmp_pdu_stats * rhs) +{ + if (NULL == lhs || NULL == rhs) { + snmp_log(LOG_WARNING, + "WARNING: results undefined for compares with NULL\n"); + return 0; + } + + /** we want list sorted in reverse order, so invert tests */ + if (lhs->processing_time > rhs->processing_time) + return -1; + else if (lhs->processing_time < rhs->processing_time) + return 1; + + if (lhs->timestamp > rhs->timestamp) + return -1; + else if (lhs->timestamp < rhs->timestamp) + return 1; + + return 0; +} + + +static void +_pdu_stats_init(void) { + static int done = 0; + if ((NULL != _pdu_stats) || (++done != 1)) + return; + + _pdu_stats = netsnmp_container_find("netsnmp_pdustats:binary_array"); + if (NULL == _pdu_stats) { + done = 0; + return; + } + + _pdu_stats->compare = (netsnmp_container_compare*)_pdu_stats_compare; + _pdu_stats->get_subset = NULL; /** subsets not supported */ + + _pdu_stats_max = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_PDU_STATS_MAX); + _pdu_stats_threshold = + netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_PDU_STATS_THRESHOLD); + if (_pdu_stats_threshold < 100) + _pdu_stats_threshold = 100; + DEBUGMSGTL(("stats:pdu", "max: %d, threshold %ld ms\n", _pdu_stats_max, + _pdu_stats_threshold)); +} -netsnmp_feature_child_of(allocate_globalcacheid, snmp_agent) -netsnmp_feature_child_of(free_agent_snmp_session_by_session, snmp_agent) -netsnmp_feature_child_of(check_all_requests_error, snmp_agent) -netsnmp_feature_child_of(check_requests_error, snmp_agent) -netsnmp_feature_child_of(request_set_error_idx, snmp_agent) -netsnmp_feature_child_of(set_agent_uptime, snmp_agent) -netsnmp_feature_child_of(agent_check_and_process, snmp_agent) -netsnmp_feature_child_of(dump_sess_list, agent_debugging_utilities) +static void +_pdu_stats_shutdown(void) +{ + netsnmp_pdu_stats *entry; + int x = 0; + + if (NULL == _pdu_stats) + return; -netsnmp_feature_child_of(agent_remove_list_data, netsnmp_unused) -netsnmp_feature_child_of(set_all_requests_error, netsnmp_unused) -netsnmp_feature_child_of(addrcache_age, netsnmp_unused) -netsnmp_feature_child_of(delete_subtree_cache, netsnmp_unused) + for( ; x < CONTAINER_SIZE(_pdu_stats); ++x) { + CONTAINER_GET_AT(_pdu_stats, x, (void**)&entry); + if (NULL == entry) + continue; + snmp_free_pdu(entry->pdu); + free(entry); + } + CONTAINER_FREE(_pdu_stats); + _pdu_stats = NULL; +} + + +static void +_dump_pdu_stats(void) +{ + int x = 0; + struct tm *tm; + char timestr[40]; + netsnmp_pdu_stats *entry; + + for( ; x < CONTAINER_SIZE(_pdu_stats); ++x) { + netsnmp_pdu *response; + netsnmp_variable_list *vars; + CONTAINER_GET_AT(_pdu_stats, x, (void**)&entry); + if (NULL == entry) { + DEBUGMSGT_NC(("9:stats:pdu", "[%d] ERROR\n", x)); + continue; + } + tm = localtime(&entry->timestamp); + if (NULL == tm) + sprintf(timestr, "UNKNOWN"); + else if (strftime(timestr, sizeof(timestr), "%m/%d/%Y %H:%M:%S", + tm) == 0) + sprintf(timestr, "UNKNOWN"); + + DEBUGMSGT_NC(("9:stats:pdu", "[%d] %ld ms, %s\n", + x, entry->processing_time, timestr)); + response = entry->pdu; + if (response->errstat == SNMP_ERR_NOERROR) { + for (vars = response->variables; vars; + vars = vars->next_variable) { + DEBUGMSGT_NC(("9:stats:pdu", " vb ")); + DEBUGMSGVAR(("9:stats:pdu", vars)); + DEBUGMSG_NC(("9:stats:pdu", "\n")); + } + } else { + DEBUGMSGT_NC(("9:stats:pdu", "Error in packet: Reason: %s\n", + snmp_errstring(response->errstat))); + if (response->errindex != 0) { + int count; + DEBUGMSGT_NC(("9:stats:pdu", "Failed object: ")); + for (count = 1, vars = response->variables; + vars && count != response->errindex; + vars = vars->next_variable, count++) + /*EMPTY*/; + if (vars) { + DEBUGMSGOID(("9:stats:pdu", vars->name, + vars->name_length)); + } + DEBUGMSG_NC(("9:stats:pdu", "\n")); + } + } + } +} +#endif /* NETSNMP_NO_PDU_STATS */ NETSNMP_INLINE void @@ -189,8 +331,8 @@ netsnmp_free_agent_request_info(netsnmp_agent_request_info *ari) } } -oid version_sysoid[] = { NETSNMP_SYSTEM_MIB }; -int version_sysoid_len = OID_LENGTH(version_sysoid); +const oid version_sysoid[] = { NETSNMP_SYSTEM_MIB }; +const int version_sysoid_len = OID_LENGTH(version_sysoid); #define SNMP_ADDRCACHE_SIZE 10 #define SNMP_ADDRCACHE_MAXAGE 300 /* in seconds */ @@ -225,31 +367,21 @@ netsnmp_agent_session *agent_delegated_list = NULL; netsnmp_agent_session *netsnmp_agent_queued_list = NULL; -int netsnmp_agent_check_packet(netsnmp_session *, - struct netsnmp_transport_s *, - void *, int); -int netsnmp_agent_check_parse(netsnmp_session *, netsnmp_pdu *, - int); -void delete_subnetsnmp_tree_cache(netsnmp_agent_session *asp); int handle_pdu(netsnmp_agent_session *asp); int netsnmp_handle_request(netsnmp_agent_session *asp, int status); -int netsnmp_wrap_up_request(netsnmp_agent_session *asp, - int status); int check_delayed_request(netsnmp_agent_session *asp); int handle_getnext_loop(netsnmp_agent_session *asp); int handle_set_loop(netsnmp_agent_session *asp); -int netsnmp_check_queued_chain_for(netsnmp_agent_session *asp); -int netsnmp_add_queued(netsnmp_agent_session *asp); int netsnmp_remove_from_delegated(netsnmp_agent_session *asp); -static int current_globalid = 0; - int netsnmp_running = 1; #ifndef NETSNMP_FEATURE_REMOVE_ALLOCATE_GLOBALCACHEID +static int current_globalid = 0; + int netsnmp_allocate_globalcacheid(void) { @@ -484,12 +616,12 @@ NETSNMP_STATIC_INLINE void _reorder_getbulk(netsnmp_agent_session *asp) { int i, n = 0, r = 0; - int repeats = asp->pdu->errindex; + int repeats; int j, k; int all_eoMib; netsnmp_variable_list *prev = NULL, *curr; - - if (asp->vbcount == 0) /* Nothing to do! */ + + if (NULL == asp || NULL == asp->pdu || asp->vbcount == 0) return; if (asp->pdu->errstat < asp->vbcount) { @@ -501,10 +633,13 @@ _reorder_getbulk(netsnmp_agent_session *asp) r = 0; } + DEBUGMSGTL(("snmp_agent:bulk", "reorder n=%d, r=%d\n", n, r)); + /* we do nothing if there is nothing repeated */ if (r == 0) return; - + + repeats = asp->pdu->errindex; /* Fix endOfMibView entries. */ for (i = 0; i < r; i++) { prev = NULL; @@ -634,15 +769,22 @@ _fix_endofmibview(netsnmp_agent_session *asp) int agent_check_and_process(int block) { - int numfds; - fd_set fdset; - struct timeval timeout = { LONG_MAX, 0 }, *tvp = &timeout; - int count; - int fakeblock = 0; + int numfds; + netsnmp_large_fd_set readfds; + netsnmp_large_fd_set writefds; + netsnmp_large_fd_set exceptfds; + struct timeval timeout = { LONG_MAX, 0 }, *tvp = &timeout; + int count; + int fakeblock = 0; numfds = 0; - FD_ZERO(&fdset); - snmp_select_info(&numfds, &fdset, tvp, &fakeblock); + netsnmp_large_fd_set_init(&readfds, FD_SETSIZE); + netsnmp_large_fd_set_init(&writefds, FD_SETSIZE); + netsnmp_large_fd_set_init(&exceptfds, FD_SETSIZE); + NETSNMP_LARGE_FD_ZERO(&readfds); + NETSNMP_LARGE_FD_ZERO(&writefds); + NETSNMP_LARGE_FD_ZERO(&exceptfds); + snmp_select_info2(&numfds, &readfds, tvp, &fakeblock); if (block != 0 && fakeblock != 0) { /* * There are no alarms registered, and the caller asked for blocking, so @@ -665,13 +807,21 @@ agent_check_and_process(int block) timerclear(tvp); } - count = select(numfds, &fdset, NULL, NULL, tvp); +#ifndef NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER + netsnmp_external_event_info2(&numfds, &readfds, &writefds, &exceptfds); +#endif /* NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER */ + + count = netsnmp_large_fd_set_select(numfds, &readfds, &writefds, &exceptfds, tvp); if (count > 0) { /* * packets found, process them */ - snmp_read(&fdset); +#ifndef NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER + netsnmp_dispatch_external_events2(&count, &readfds, &writefds, &exceptfds); +#endif /* NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER */ + + snmp_read2(&readfds); } else switch (count) { case 0: @@ -681,10 +831,12 @@ agent_check_and_process(int block) if (errno != EINTR) { snmp_log_perror("select"); } - return -1; + count = -1; + goto exit; default: snmp_log(LOG_ERR, "select returned %d\n", count); - return -1; + count = -1; + goto exit; } /* endif -- count>0 */ /* @@ -699,6 +851,10 @@ agent_check_and_process(int block) netsnmp_check_outstanding_agent_requests(); + exit: + netsnmp_large_fd_set_cleanup(&readfds); + netsnmp_large_fd_set_cleanup(&writefds); + netsnmp_large_fd_set_cleanup(&exceptfds); return count; } #endif /* NETSNMP_FEATURE_REMOVE_AGENT_CHECK_AND_PROCESS */ @@ -1113,7 +1269,6 @@ netsnmp_register_agent_nsap(netsnmp_transport *t) SNMP_FREE(n); return -1; } - memset(s, 0, sizeof(netsnmp_session)); snmp_sess_init(s); /* @@ -1181,6 +1336,7 @@ netsnmp_register_agent_nsap(netsnmp_transport *t) n->next = a; *prevNext = n; SNMP_FREE(s); + DEBUGMSGTL(("netsnmp_register_agent_nsap", "handle %d\n", n->handle)); return n->handle; } else { SNMP_FREE(s); @@ -1238,7 +1394,34 @@ netsnmp_deregister_agent_nsap(int handle) } } +int +netsnmp_agent_listen_on(const char *port) +{ + netsnmp_transport *transport; + int handle; + + if (NULL == port) + return -1; + + transport = netsnmp_transport_open_server("snmp", port); + if (transport == NULL) { + snmp_log(LOG_ERR, "Error opening specified endpoint \"%s\"\n", port); + return -1; + } + + handle = netsnmp_register_agent_nsap(transport); + if (handle < 0) { + snmp_log(LOG_ERR, "Error registering specified transport \"%s\" as an " + "agent NSAP\n", port); + return -1; + } else { + DEBUGMSGTL(("snmp_agent", + "init_master_agent; \"%s\" registered as an agent NSAP\n", + port)); + } + return handle; +} /* * @@ -1266,7 +1449,6 @@ netsnmp_deregister_agent_nsap(int handle) int init_master_agent(void) { - netsnmp_transport *transport; char *cptr; char *buf = NULL; char *st; @@ -1334,24 +1516,10 @@ init_master_agent(void) "requested\n")); break; } - transport = netsnmp_transport_open_server("snmp", cptr); - - if (transport == NULL) { - snmp_log(LOG_ERR, "Error opening specified endpoint \"%s\"\n", - cptr); + if (-1 == netsnmp_agent_listen_on(cptr)) { + SNMP_FREE(buf); return 1; } - - if (netsnmp_register_agent_nsap(transport) == 0) { - snmp_log(LOG_ERR, - "Error registering specified transport \"%s\" as an " - "agent NSAP\n", cptr); - return 1; - } else { - DEBUGMSGTL(("snmp_agent", - "init_master_agent; \"%s\" registered as an agent " - "NSAP\n", cptr)); - } } while(st && *st != '\0'); SNMP_FREE(buf); #endif /* NETSNMP_NO_LISTEN_SUPPORT */ @@ -1366,6 +1534,10 @@ init_master_agent(void) real_init_smux(); #endif +#ifndef NETSNMP_NO_PDU_STATS + _pdu_stats_init(); +#endif /* NETSNMP_NO_PDU_STATS */ + return 0; } @@ -1382,6 +1554,10 @@ void shutdown_master_agent(void) { clear_nsap_list(); + +#ifndef NETSNMP_NO_PDU_STATS + _pdu_stats_shutdown(); +#endif /* NETSNMP_NO_PDU_STATS */ } @@ -1398,7 +1574,11 @@ init_agent_snmp_session(netsnmp_session * session, netsnmp_pdu *pdu) DEBUGMSGTL(("snmp_agent","agent_sesion %8p created\n", asp)); asp->session = session; asp->pdu = snmp_clone_pdu(pdu); + if (!asp->pdu) + goto err; asp->orig_pdu = snmp_clone_pdu(pdu); + if (!asp->orig_pdu) + goto err; asp->rw = READ; asp->exact = TRUE; asp->next = NULL; @@ -1409,10 +1589,17 @@ init_agent_snmp_session(netsnmp_session * session, netsnmp_pdu *pdu) asp->treecache_num = -1; asp->treecache_len = 0; asp->reqinfo = SNMP_MALLOC_TYPEDEF(netsnmp_agent_request_info); + asp->flags = SNMP_AGENT_FLAGS_NONE; DEBUGMSGTL(("verbose:asp", "asp %p reqinfo %p created\n", asp, asp->reqinfo)); return asp; + +err: + snmp_free_pdu(asp->orig_pdu); + snmp_free_pdu(asp->pdu); + free(asp); + return NULL; } void @@ -1427,6 +1614,7 @@ free_agent_snmp_session(netsnmp_agent_session *asp) DEBUGMSGTL(("verbose:asp", "asp %p reqinfo %p freed\n", asp, asp->reqinfo)); + if (asp->orig_pdu) snmp_free_pdu(asp->orig_pdu); if (asp->pdu) @@ -1457,6 +1645,9 @@ netsnmp_check_for_delegated(netsnmp_agent_session *asp) if (NULL == asp->treecache) return 0; + + if (asp->flags & SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS) + return 0; for (i = 0; i <= asp->treecache_num; i++) { for (request = asp->treecache[i].requests_begin; request; @@ -1535,41 +1726,51 @@ int netsnmp_remove_delegated_requests_for_session(netsnmp_session *sess) { netsnmp_agent_session *asp; - int count = 0; + int total_count = 0; for (asp = agent_delegated_list; asp; asp = asp->next) { /* * check each request */ + int i; + int count = 0; netsnmp_request_info *request; - for(request = asp->requests; request; request = request->next) { - /* - * check session - */ - netsnmp_assert(NULL!=request->subtree); - if(request->subtree->session != sess) - continue; + for (i = 0; i <= asp->treecache_num; i++) { + for (request = asp->treecache[i].requests_begin; request; + request = request->next) { + /* + * check session + */ + netsnmp_assert(NULL!=request->subtree); + if(request->subtree->session != sess) + continue; - /* - * matched! mark request as done - */ - netsnmp_request_set_error(request, SNMP_ERR_GENERR); - ++count; + /* + * matched! mark request as done + */ + netsnmp_request_set_error(request, SNMP_ERR_GENERR); + ++count; + } + } + if (count) { + asp->flags |= SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS; + total_count += count; } } /* * if we found any, that request may be finished now */ - if(count) { + if(total_count) { DEBUGMSGTL(("snmp_agent", "removed %d delegated request(s) for session " - "%8p\n", count, sess)); - netsnmp_check_outstanding_agent_requests(); + "%8p\n", total_count, sess)); + netsnmp_check_delegated_requests(); } - return count; + return total_count; } +#if 0 int netsnmp_check_queued_chain_for(netsnmp_agent_session *asp) { @@ -1580,6 +1781,7 @@ netsnmp_check_queued_chain_for(netsnmp_agent_session *asp) } return 0; } +#endif int netsnmp_add_queued(netsnmp_agent_session *asp) @@ -1615,10 +1817,89 @@ netsnmp_add_queued(netsnmp_agent_session *asp) return 1; } +#ifndef NETSNMP_NO_PDU_STATS +/* + * netsnmp_pdu_stats_process: record time for pdu processing + */ +int +netsnmp_pdu_stats_process(netsnmp_agent_session *asp) +{ + netsnmp_pdu_stats *new_entry, *old = NULL; + struct timeval tv_end; + marker_t start, end = &tv_end; + u_long msec; + + if (NULL == asp) { + DEBUGMSGTL(("stats:pdu", "netsnmp_pdu_stats_process bad params\n")); + return -1; + } + + /** get start/end time */ + netsnmp_set_monotonic_marker(&end); + start = (marker_t)netsnmp_agent_get_list_data(asp->reqinfo, + "netsnmp_pdu_stats"); + if (NULL == start) { + DEBUGMSGTL(("stats:pdu:stop", "start time not found!\n")); + return -1; + } + + msec = uatime_diff(start, end); + DEBUGMSGTL(("stats:pdu:stop", "pdu processing took %ld msec\n", msec)); + + /** bail if below threshold or less than current low time */ + if (msec <= _pdu_stats_threshold || msec < _pdu_stats_current_lowest) { + DEBUGMSGTL(("9:stats:pdu", + "time below thresholds (%ld/%ld); ignoring\n", + _pdu_stats_threshold, _pdu_stats_current_lowest)); + return 0; + } + + /** insert in list. if list goes over max size, truncate last entry. */ + new_entry = SNMP_MALLOC_TYPEDEF(netsnmp_pdu_stats); + if (NULL == new_entry) { + snmp_log(LOG_ERR, "malloc failed for pdu stats entry\n"); + return -1; + } + new_entry->processing_time = msec; + time(&new_entry->timestamp); + new_entry->pdu = snmp_clone_pdu(asp->pdu); + + CONTAINER_INSERT(_pdu_stats, new_entry); + + if (CONTAINER_SIZE(_pdu_stats) > _pdu_stats_max) { + DEBUGMSGTL(("9:stats:pdu", "dropping old/low stat\n")); + CONTAINER_REMOVE_AT(_pdu_stats, _pdu_stats_max, (void**)&old); + if (old) { + snmp_free_pdu(old->pdu); + free(old); + } + } + + if (CONTAINER_SIZE(_pdu_stats) < _pdu_stats_max) + _pdu_stats_current_lowest = 0; /* take anything over threshold */ + else { + CONTAINER_GET_AT(_pdu_stats, _pdu_stats_max - 1, (void**)&old); + if (old) + _pdu_stats_current_lowest = old->processing_time; + } + + DEBUGIF("9:stats:pdu") { + _dump_pdu_stats(); + } + + return 1; + +} +#endif /* NETSNMP_NO_PDU_STATS */ int netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status) { +#ifndef NETSNMP_NO_PDU_STATS + if (_pdu_stats_max > 0) + netsnmp_pdu_stats_process(asp); +#endif /* NETSNMP_NO_PDU_STATS */ + /* * if this request was a set, clear the global now that we are * done. @@ -1695,12 +1976,16 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status) break; } } +#endif /* NETSNMP_NO_WRITE_SUPPORT */ /* * Similarly we may need to "dumb down" v2 exception * types to throw an error for a v1 query. * See RFC2576 - section 4.1.2.3 */ - if ((asp->pdu->command != SNMP_MSG_SET) && + if ( +#ifndef NETSNMP_NO_WRITE_SUPPORT + (asp->pdu->command != SNMP_MSG_SET) && +#endif /* NETSNMP_NO_WRITE_SUPPORT */ (asp->pdu->version == SNMP_VERSION_1)) { netsnmp_variable_list *var_ptr = asp->pdu->variables; int i = 1; @@ -1720,8 +2005,35 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status) ++i; } } -#endif /* NETSNMP_NO_WRITE_SUPPORT */ #endif /* snmpv1 support */ + + /** so far so good? try and build packet */ + if (status == SNMP_ERR_NOERROR) { + struct session_list *slp = snmp_sess_pointer(asp->session); + + /** build packet to send */ + asp->pdu->command = SNMP_MSG_RESPONSE; + asp->pdu->errstat = asp->status; + asp->pdu->errindex = asp->index; + status = _build_initial_pdu_packet(slp, asp->pdu, + SNMP_MSG_GETBULK == asp->orig_pdu->command); + if (SNMPERR_SUCCESS != status){ + if (SNMPERR_TOO_LONG == asp->session->s_snmp_errno) + status = asp->status = SNMP_ERR_TOOBIG; + else + status = asp->status = SNMP_ERR_GENERR; + } + } + + if (status == SNMP_ERR_NOERROR) + snmp_increment_statistic_by( +#ifndef NETSNMP_NO_WRITE_SUPPORT + (asp->pdu->command == SNMP_MSG_SET ? + STAT_SNMPINTOTALSETVARS : STAT_SNMPINTOTALREQVARS), +#else + STAT_SNMPINTOTALREQVARS, +#endif + count_varbinds(asp->pdu->variables)); } /** if asp->pdu */ /* @@ -1765,22 +2077,8 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status) break; } - if ((status == SNMP_ERR_NOERROR) && (asp->pdu)) { -#ifndef NETSNMP_NO_WRITE_SUPPORT - snmp_increment_statistic_by((asp->pdu->command == SNMP_MSG_SET ? - STAT_SNMPINTOTALSETVARS : - STAT_SNMPINTOTALREQVARS), - count_varbinds(asp->pdu->variables)); -#else /* NETSNMP_NO_WRITE_SUPPORT */ - snmp_increment_statistic_by(STAT_SNMPINTOTALREQVARS, - count_varbinds(asp->pdu->variables)); -#endif /* NETSNMP_NO_WRITE_SUPPORT */ - - } else { - /* - * Use a copy of the original request - * to report failures. - */ + if ((status != SNMP_ERR_NOERROR) || (NULL == asp->pdu)) { + /** Use a copy of the original request to report failures. */ snmp_free_pdu(asp->pdu); asp->pdu = asp->orig_pdu; asp->orig_pdu = NULL; @@ -1800,7 +2098,7 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status) if (c_oid) { if (!sprint_realloc_objid (&c_oid, &c_oidlen, &c_outlen, 1, - var_ptr->name, + var_ptr->name, var_ptr->name_length)) { snmp_log(LOG_ERR, " -- %s [TRUNCATED]\n", c_oid); } else { @@ -1810,11 +2108,10 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status) } } snmp_free_pdu(asp->pdu); - asp->pdu = NULL; } snmp_increment_statistic(STAT_SNMPOUTPKTS); snmp_increment_statistic(STAT_SNMPOUTGETRESPONSES); - asp->pdu = NULL; /* yyy-rks: redundant, no? */ + asp->pdu = NULL; netsnmp_remove_and_free_agent_snmp_session(asp); } return 1; @@ -1929,6 +2226,16 @@ handle_snmp_packet(int op, netsnmp_session * session, int reqid, status = asp->status; } +#if defined(NETSNMP_DISABLE_SET_SUPPORT) && !defined(NETSNMP_NO_WRITE_SUPPORT) + if (pdu->command == SNMP_MSG_SET) { + /** Silvercreek protocol tests send set with 0 varbinds */ + if (NULL == pdu->variables) + return netsnmp_wrap_up_request(asp, SNMP_ERR_NOERROR); + asp->index = 1; + return netsnmp_wrap_up_request(asp, SNMP_ERR_NOTWRITABLE); + } +#endif /* NETSNMP_DISABLE_SET_SUPPORT && !NETSNMP_NO_WRITE_SUPPORT */ + if ((access_ret = check_access(asp->pdu)) != 0) { if (access_ret == VACM_NOSUCHCONTEXT) { /* @@ -2162,7 +2469,7 @@ netsnmp_add_varbind_to_cache(netsnmp_agent_session *asp, int vbcount, asp->treecache_len); if (asp->treecache == NULL) return NULL; - memset(&(asp->treecache[cacheid]), 0x00, + memset(asp->treecache + cacheid, 0, sizeof(netsnmp_tree_cache) * (CACHE_GROW_SIZE)); } asp->treecache[cacheid].subtree = tp; @@ -2262,6 +2569,8 @@ check_acm(netsnmp_agent_session *asp, u_char type) } } snmp_set_var_typed_value(vb, type, NULL, 0); + if (ASN_PRIV_RETRY == type) + request->inclusive = 0; } } } @@ -2282,6 +2591,13 @@ netsnmp_create_subtree_cache(netsnmp_agent_session *asp) int i = 0, n = 0, r = 0; netsnmp_request_info *request; + if (NULL == asp || NULL == asp->pdu) + return SNMP_ERR_GENERR; + + if (asp->pdu->msgMaxSize == 0) + asp->pdu->msgMaxSize = netsnmp_max_send_msg_size(); + DEBUGMSGTL(("msgMaxSize", "pdu max size %lu\n", asp->pdu->msgMaxSize)); + if (asp->treecache == NULL && asp->treecache_len == 0) { asp->treecache_len = SNMP_MAX(1 + asp->vbcount / 4, 16); asp->treecache = @@ -2318,6 +2634,9 @@ netsnmp_create_subtree_cache(netsnmp_agent_session *asp) int maxresponses = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES); + int avgvarbind = + netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_AVG_BULKVARBINDSIZE); if (maxresponses == 0) maxresponses = 100; /* more than reasonable default */ @@ -2328,8 +2647,25 @@ netsnmp_create_subtree_cache(netsnmp_agent_session *asp) if (maxresponses < 0 || maxresponses > (int)(INT_MAX / sizeof(struct varbind_list *))) maxresponses = (int)(INT_MAX / sizeof(struct varbind_list *)); + DEBUGMSGTL(("snmp_agent:bulk", "maxresponse %d\n", maxresponses)); - /* ensure that the maximum number of repetitions will fit in the + /* reduce maxresponses by dividing the sessions max size by a + * (very) rough aproximation of the size of an average + * varbind. 15 seems to be a reasonable balance between getting + * enough varbinds to fill the packet vs retrieving varbinds + * that will be discarded to make the response fit the packet size. + */ + if (avgvarbind == 0) + avgvarbind = 15; + + if (maxresponses > (asp->pdu->msgMaxSize / avgvarbind)) { + maxresponses = asp->pdu->msgMaxSize / avgvarbind; + DEBUGMSGTL(("snmp_agent:bulk", + "lowering maxresponse to %d based pdusession msgMaxSize %ld and avgBulkVarbindSize %d\n", + maxresponses, asp->pdu->msgMaxSize, avgvarbind)); + } + + /* ensure that the maximum number of repetitions will fit in the * result vector */ if (maxbulk <= 0 || maxbulk > maxresponses / r) @@ -2338,8 +2674,8 @@ netsnmp_create_subtree_cache(netsnmp_agent_session *asp) /* limit getbulk number of repeats to a configured size */ if (asp->pdu->errindex > maxbulk) { asp->pdu->errindex = maxbulk; - DEBUGMSGTL(("snmp_agent", - "truncating number of getbulk repeats to %ld\n", + DEBUGMSGTL(("snmp_agent:bulk", + "lowering requested getbulk repeats to %ld\n", asp->pdu->errindex)); } @@ -2348,11 +2684,11 @@ netsnmp_create_subtree_cache(netsnmp_agent_session *asp) (n + asp->pdu->errindex * r) * sizeof(struct varbind_list *)); if (!asp->bulkcache) { - DEBUGMSGTL(("snmp_agent", "Bulkcache malloc failed\n")); + DEBUGMSGTL(("snmp_agent:bulk", "Bulkcache malloc failed\n")); return SNMP_ERR_GENERR; } } - DEBUGMSGTL(("snmp_agent", "GETBULK N = %d, M = %ld, R = %d\n", + DEBUGMSGTL(("snmp_agent:bulk", "GETBULK N = %d, M = %ld, R = %d\n", n, asp->pdu->errindex, r)); } @@ -2629,7 +2965,7 @@ netsnmp_check_requests_status(netsnmp_agent_session *asp, if (requests->status != SNMP_ERR_NOERROR && (!look_for_specific || requests->status == look_for_specific) && (look_for_specific || asp->index == 0 - || requests->index < asp->index)) { + || requests->index <= asp->index)) { asp->index = requests->index; asp->status = requests->status; } @@ -2739,19 +3075,11 @@ handle_var_requests(netsnmp_agent_session *asp) return final_status; } -/* - * loop through our sessions known delegated sessions and check to see - * if they've completed yet. If there are no more delegated sessions, - * check for and process any queued requests - */ void -netsnmp_check_outstanding_agent_requests(void) +netsnmp_check_delegated_requests(void) { netsnmp_agent_session *asp, *prev_asp = NULL, *next_asp = NULL; - /* - * deal with delegated requests - */ for (asp = agent_delegated_list; asp; asp = next_asp) { next_asp = asp->next; /* save in case we clean up asp */ if (!netsnmp_check_for_delegated(asp)) { @@ -2790,6 +3118,22 @@ netsnmp_check_outstanding_agent_requests(void) prev_asp = asp; } } +} + +/* + * loop through our sessions known delegated sessions and check to see + * if they've completed yet. If there are no more delegated sessions, + * check for and process any queued requests + */ +void +netsnmp_check_outstanding_agent_requests(void) +{ + netsnmp_agent_session *asp; + + /* + * deal with delegated requests + */ + netsnmp_check_delegated_requests(); /* * if we are processing a set and there are more delegated @@ -2819,7 +3163,8 @@ netsnmp_check_outstanding_agent_requests(void) netsnmp_processing_set = netsnmp_agent_queued_list; DEBUGMSGTL(("snmp_agent", "SET request remains queued while " - "delegated requests finish, asp = %8p\n", asp)); + "delegated requests finish, asp = %8p\n", + agent_delegated_list)); break; } #endif /* NETSNMP_NO_WRITE_SUPPORT */ @@ -2880,6 +3225,10 @@ check_delayed_request(netsnmp_agent_session *asp) case SNMP_MSG_GETBULK: case SNMP_MSG_GETNEXT: netsnmp_check_all_requests_status(asp, 0); + if (asp->flags & SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS) { + DEBUGMSGTL(("snmp_agent","canceling next walk for asp %p\n", asp)); + break; + } handle_getnext_loop(asp); if (netsnmp_check_for_delegated(asp) && netsnmp_check_transaction_id(asp->pdu->transid) != @@ -3066,8 +3415,13 @@ check_getnext_results(netsnmp_agent_session *asp) int handle_getnext_loop(netsnmp_agent_session *asp) { - int status; - netsnmp_variable_list *var_ptr; + int status, rough_size, count = 0, total, val_len; + netsnmp_variable_list *var_ptr, *last_var = NULL; + + if (NULL == asp || NULL == asp->pdu) + return SNMP_ERR_GENERR; + + total = count_varbinds(asp->pdu->variables); /* * loop @@ -3095,28 +3449,56 @@ handle_getnext_loop(netsnmp_agent_session *asp) */ break; - /* - * never had a request (empty pdu), quit now - */ - /* - * XXXWWW: huh? this would be too late, no? shouldn't we - * catch this earlier? - */ - /* - * if (count == 0) - * break; - */ - - DEBUGIF("results") { - DEBUGMSGTL(("results", - "getnext results, before next pass:\n")); - for (var_ptr = asp->pdu->variables; var_ptr; - var_ptr = var_ptr->next_variable) { - DEBUGMSGTL(("results", "\t")); - DEBUGMSGVAR(("results", var_ptr)); - DEBUGMSG(("results", "\n")); + count = rough_size = 0; + DEBUGMSGTL(("results:intermediate", + "getnext results, before next pass:\n")); + for (var_ptr = asp->pdu->variables; var_ptr; + var_ptr = var_ptr->next_variable) { + if ((var_ptr->type == ASN_NULL && 0 == var_ptr->name_length) || + (var_ptr->type == ASN_PRIV_RETRY)) { + continue; + } + ++count; + DEBUGIF("results:intermediate") { + DEBUGMSGTL(("results:intermediate", "\t")); + DEBUGMSGVAR(("results:intermediate", var_ptr)); + DEBUGMSG(("results:intermediate", "\n")); + } + /* + * make a very rough guesstimate of the encoded varbind size by + * adding the name and val lengths. If these rough sizes add up + * to more than the msgMaxSize, stop gathing new varbinds. + * + * [Increasing the accuracy of this estimate would allow us to + * do better at filling packets and collecting fewer varbinds that + * we'll later have to trim. This is left as an exercise for the + * reader.] + */ + rough_size += var_ptr->name_length; +#if (SIZEOF_LONG == 8) + /** sizeof(oid) is 8 on 64bit systems :-( Hardcode for 4 */ + if (ASN_OBJECT_ID == var_ptr->type) + val_len = (var_ptr->val_len / 2); + else +#endif + val_len = var_ptr->val_len; + + DEBUGMSGTL(("results:intermediate", "\t+ %" NETSNMP_PRIz "d %d = %d\n", + var_ptr->name_length, val_len, rough_size)); + if (rough_size > asp->pdu->msgMaxSize) { + DEBUGMSGTL(("results", + "estimating packet too big; stop gathering\n")); + asp->pdu->flags |= UCD_MSG_FLAG_BULK_TOOBIG | + UCD_MSG_FLAG_FORWARD_ENCODE; + var_ptr->type = ASN_PRIV_STOP; + if (NULL != last_var) + last_var->next_variable = NULL; + break; } + last_var = var_ptr; } + if (rough_size > asp->pdu->msgMaxSize) + break; netsnmp_reassign_requests(asp); status = handle_var_requests(asp); @@ -3124,6 +3506,8 @@ handle_getnext_loop(netsnmp_agent_session *asp) return status; /* should never really happen */ } } + DEBUGMSGTL(("results:summary", "gathered %d/%d varbinds\n", count, + total)); if (!netsnmp_running) { return SNMP_ERR_GENERR; } @@ -3233,6 +3617,28 @@ handle_set_loop(netsnmp_agent_session *asp) int netsnmp_handle_request(netsnmp_agent_session *asp, int status) { +#ifndef NETSNMP_NO_PDU_STATS + if (_pdu_stats_max > 0) { + /** tag new pdus with a start time */ + marker_t start; + start = (marker_t)netsnmp_agent_get_list_data(asp->reqinfo, + "netsnmp_pdu_stats"); + if (NULL == start) { + netsnmp_data_list *data_list; + DEBUGMSGTL(("stats:pdu:start", "starting pdu processing\n")); + + netsnmp_set_monotonic_marker(&start); /* will alloc space */ + data_list = netsnmp_create_data_list("netsnmp_pdu_stats", start, + free); + if (NULL == data_list) { + free(start); + snmp_log(LOG_WARNING, "error creating data list for stats\n"); + } else + netsnmp_agent_add_list_data(asp->reqinfo, data_list); + } + } +#endif /* NETSNMP_NO_PDU_STATS */ + /* * if this isn't a delegated request trying to finish, * processing of a set request should not start until all @@ -3313,12 +3719,44 @@ netsnmp_handle_request(netsnmp_agent_session *asp, int status) return 1; } +static int +check_set_pdu_for_null_varbind(netsnmp_agent_session *asp) +{ + int i; + netsnmp_variable_list *v = NULL; + + for (i = 1, v = asp->pdu->variables; v != NULL; i++, v = v->next_variable) { + if (v->type == ASN_NULL) { + /* + * Protect SET implementations that do not protect themselves + * against wrong type. + */ + DEBUGMSGTL(("snmp_agent", "disallowing SET with NULL var for varbind %d\n", i)); + asp->index = i; + return SNMP_ERR_WRONGTYPE; + } + } + return SNMP_ERR_NOERROR; +} + int handle_pdu(netsnmp_agent_session *asp) { int status, inclusives = 0; netsnmp_variable_list *v = NULL; +#ifndef NETSNMP_NO_WRITE_SUPPORT + /* + * Check for ASN_NULL in SET request + */ + if (asp->pdu->command == SNMP_MSG_SET) { + status = check_set_pdu_for_null_varbind(asp); + if (status != SNMP_ERR_NOERROR) { + return status; + } + } +#endif /* NETSNMP_NO_WRITE_SUPPORT */ + /* * for illegal requests, mark all nodes as ASN_NULL */ @@ -3344,7 +3782,7 @@ handle_pdu(netsnmp_agent_session *asp) /* * Leave the type for now (it gets set to * ASN_NULL in netsnmp_add_varbind_to_cache, - * called by create_subnetsnmp_tree_cache below). + * called by netsnmp_create_subtree_cache below). * If we set it to ASN_NULL now, we wouldn't be * able to distinguish INCLUSIVE search * ranges. @@ -3354,19 +3792,17 @@ handle_pdu(netsnmp_agent_session *asp) snmp_set_var_typed_value(v, ASN_NULL, NULL, 0); } } - /* - * fall through - */ + /* FALL THROUGH */ + default: #ifndef NETSNMP_NO_WRITE_SUPPORT case SNMP_MSG_INTERNAL_SET_BEGIN: case SNMP_MSG_INTERNAL_SET_RESERVE1: #endif /* NETSNMP_NO_WRITE_SUPPORT */ - default: asp->vbcount = count_varbinds(asp->pdu->variables); - if (asp->vbcount) /* efence doesn't like 0 size allocs */ - asp->requests = (netsnmp_request_info *) - calloc(asp->vbcount, sizeof(netsnmp_request_info)); + asp->requests = + calloc(asp->vbcount ? asp->vbcount : 1, + sizeof(netsnmp_request_info)); /* * collect varbinds */ @@ -3406,9 +3842,7 @@ handle_pdu(netsnmp_agent_session *asp) case SNMP_MSG_GETNEXT: snmp_increment_statistic(STAT_SNMPINGETNEXTS); - /* - * fall through - */ + /* FALL THROUGH */ case SNMP_MSG_GETBULK: /* note: there is no getbulk stat */ /* @@ -3716,7 +4150,7 @@ netsnmp_get_agent_runtime(void) netsnmp_get_monotonic_clock(&now); NETSNMP_TIMERSUB(&now, &starttimeM, &delta); - return delta.tv_sec * (uint64_t)100 + delta.tv_usec / 10000; + return (uint64_t)(delta.tv_sec * (uint64_t)100 + delta.tv_usec / 10000); } /** @@ -3753,7 +4187,7 @@ netsnmp_get_agent_uptime(void) netsnmp_get_monotonic_clock(&now); NETSNMP_TIMERSUB(&now, &starttimeM, &delta); - return delta.tv_sec * 100UL + delta.tv_usec / 10000; + return (u_long)(delta.tv_sec * 100UL + delta.tv_usec / 10000); } #ifndef NETSNMP_FEATURE_REMOVE_SET_AGENT_UPTIME diff --git a/agent/snmp_perl.c b/agent/snmp_perl.c index 48d9695..cfa57c4 100644 --- a/agent/snmp_perl.c +++ b/agent/snmp_perl.c @@ -1,9 +1,8 @@ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" #include #include "perl.h" +#pragma GCC diagnostic pop #include #include diff --git a/agent/snmp_vars.c b/agent/snmp_vars.c index 2f9e6ef..9da66b2 100644 --- a/agent/snmp_vars.c +++ b/agent/snmp_vars.c @@ -41,6 +41,11 @@ PERFORMANCE OF THIS SOFTWARE. * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* @@ -49,12 +54,6 @@ PERFORMANCE OF THIS SOFTWARE. * Linux additions taken from CMU to UCD stack by Jennifer Bray of Origin * (jbray@origin-at.co.uk) 1997 */ -/* - * 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. - */ /* * XXXWWW merge todo: incl/excl range changes in differences between @@ -62,13 +61,13 @@ PERFORMANCE OF THIS SOFTWARE. */ #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include @@ -76,60 +75,60 @@ PERFORMANCE OF THIS SOFTWARE. #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H # include #endif -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H # ifdef sysv5UnixWare7 # define _KMEMUSER 1 /* needs this for queue_t */ # endif #include #endif -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H # include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETINET_IP6_H +#ifdef HAVE_NETINET_IP6_H #include #endif #endif -#if HAVE_SYS_QUEUE_H +#ifdef HAVE_SYS_QUEUE_H #include #endif -#if HAVE_NET_ROUTE_H +#ifdef HAVE_NET_ROUTE_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif #ifdef NETSNMP_ENABLE_IPV6 -#if HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H +#ifdef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H #include #endif #endif -#if HAVE_NETINET_IN_PCB_H +#ifdef HAVE_NETINET_IN_PCB_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif @@ -137,6 +136,7 @@ PERFORMANCE OF THIS SOFTWARE. #include #include #include +#include "agent_global_vars.h" #include "kernel.h" #include "mibgroup/struct.h" @@ -164,21 +164,6 @@ static char done_init_agent = 0; struct module_init_list *initlist = NULL; struct module_init_list *noinitlist = NULL; -/* - * mib clients are passed a pointer to a oid buffer. Some mib clients - * * (namely, those first noticed in mibII/vacm.c) modify this oid buffer - * * before they determine if they really need to send results back out - * * using it. If the master agent determined that the client was not the - * * right one to talk with, it will use the same oid buffer to pass to the - * * rest of the clients, which may not longer be valid. This should be - * * fixed in all clients rather than the master. However, its not a - * * particularily easy bug to track down so this saves debugging time at - * * the expense of a few memcpy's. - */ -#define MIB_CLIENTS_ARE_EVIL 1 - -extern netsnmp_subtree *subtrees; - /* * Each variable name is placed in the variable table, without the * terminating substring that determines the instance of the variable. When @@ -236,6 +221,9 @@ u_char return_buf[258]; u_char return_buf[256]; /* nee 64 */ #endif +static int +_warn_if_all_disabled(int maj, int min, void *serverarg, void *clientarg); + int callback_master_num = -1; #ifdef NETSNMP_TRANSPORT_CALLBACK_DOMAIN @@ -291,9 +279,7 @@ init_agent(const char *app) netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_ALARM_DONT_USE_SIG, 1); -#ifdef NETSNMP_CAN_USE_NLIST r = init_kmem("/dev/kmem") ? 0 : -EACCES; -#endif setup_tree(); @@ -304,7 +290,13 @@ init_agent(const char *app) #endif _init_agent_callback_transport(); - + +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_POST_READ_CONFIG, + _warn_if_all_disabled, NULL); +#endif /* NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION */ + netsnmp_init_helpers(); init_traps(); netsnmp_container_init_list(); @@ -339,7 +331,7 @@ init_agent(const char *app) init_perl(); #endif -#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && NETSNMP_TRANSPORT_TLSBASE_DOMAIN /** init secname mapping */ netsnmp_certs_agent_init(); #endif @@ -377,9 +369,7 @@ shutdown_agent(void) { clear_callback(); shutdown_secmod(); netsnmp_addrcache_destroy(); -#ifdef NETSNMP_CAN_USE_NLIST free_kmem(); -#endif done_init_agent = 0; } @@ -458,5 +448,48 @@ should_init(const char *module_name) */ return DO_INITIALIZE; } + +static int +_warn_if_all_disabled(int maj, int min, void *serverarg, void *clientarg) +{ + const char * name = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_APPTYPE); + const int agent_mode = netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_ROLE); + int enabled = 0; + if (NULL==name) + name = "snmpd"; + + if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V3)) + ++enabled; +#ifndef NETSNMP_DISABLE_SNMPV2C + if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V2c)) + ++enabled; +#endif /* NETSNMP_DISABLE_SNMPV2C */ +#ifndef NETSNMP_DISABLE_SNMPV1 + if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DISABLE_V1)) + ++enabled; +#endif /* NETSNMP_DISABLE_SNMPV1 */ + + if (0 == enabled) { + if ((MASTER_AGENT == agent_mode) && (strcmp(name, "snmptrapd") != 0)) { + snmp_log(LOG_WARNING, + "Warning: all protocol versions are runtime disabled.\n" + " It's unlikely this agent can serve any useful purpose in this state.\n" + " Check %s.conf file(s) for this agent.\n", name); + } else if (!strcmp(name, "snmptrapd") && + !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_APP_NO_AUTHORIZATION)) { + snmp_log(LOG_WARNING, + "Warning: all protocol versions are runtime disabled.\n" + "This receiver will *NOT* accept any incoming notifications.\n"); + } + } + return SNMP_ERR_NOERROR; +} + /** @} */ diff --git a/agent/snmpd.c b/agent/snmpd.c index cfc7bce..fe31c87 100644 --- a/agent/snmpd.c +++ b/agent/snmpd.c @@ -39,77 +39,77 @@ #include #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_SYS_FILE_H +#ifdef HAVE_SYS_FILE_H #include #endif #ifdef HAVE_FCNTL_H #include #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H #include #endif #include #ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_PROCESS_H /* Win32-getpid */ +#ifdef HAVE_PROCESS_H #include #endif -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif -#if HAVE_PWD_H +#ifdef HAVE_PWD_H #include #endif -#if HAVE_GRP_H +#ifdef HAVE_GRP_H #include #endif #ifdef HAVE_CRTDBG_H @@ -124,17 +124,9 @@ # endif #endif -#ifndef FD_SET -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((p), 0, sizeof(*(p))) -#endif - #include #include +#include "agent_global_vars.h" #include #include @@ -149,9 +141,14 @@ typedef long fd_mask; #include +#include #include #include +#include "../snmplib/snmp_syslog.h" + +#include "mibgroup/util_funcs/restart.h" + /* * Include winservice.h to support Windows Service */ @@ -164,9 +161,13 @@ typedef long fd_mask; #endif -netsnmp_feature_want(logging_file) -netsnmp_feature_want(logging_stdio) -netsnmp_feature_want(logging_syslog) +#ifndef NETSNMP_NO_SYSTEMD +#include +#endif + +netsnmp_feature_want(logging_file); +netsnmp_feature_want(logging_stdio); +netsnmp_feature_want(logging_syslog); /* * Globals. @@ -194,13 +195,6 @@ LPCTSTR app_name_long = _T("Net-SNMP Agent"); /* Application Name */ const char *app_name = "snmpd"; -extern int netsnmp_running; -#ifdef USING_UTIL_FUNCS_RESTART_MODULE -extern char **argvrestartp; -extern char *argvrestart; -extern char *argvrestartname; -#endif /* USING_UTIL_FUNCS_RESTART_MODULE */ - #ifdef USING_SMUX_MODULE #include #endif /* USING_SMUX_MODULE */ @@ -208,58 +202,13 @@ extern char *argvrestartname; /* * Prototypes. */ -int snmp_read_packet(int); -int snmp_input(int, netsnmp_session *, int, netsnmp_pdu *, - void *); static void usage(char *); static void SnmpTrapNodeDown(void); static int receive(void); #ifdef WIN32SERVICE -void StopSnmpAgent(void); -int SnmpDaemonMain(int argc, TCHAR * argv[]); -int __cdecl _tmain(int argc, TCHAR * argv[]); -#else -int main(int, char **); -#endif - -/* - * These definitions handle 4.2 systems without additional syslog facilities. - */ -#ifndef LOG_CONS -#define LOG_CONS 0 /* Don't bother if not defined... */ -#endif -#ifndef LOG_PID -#define LOG_PID 0 /* Don't bother if not defined... */ -#endif -#ifndef LOG_LOCAL0 -#define LOG_LOCAL0 0 -#endif -#ifndef LOG_LOCAL1 -#define LOG_LOCAL1 0 -#endif -#ifndef LOG_LOCAL2 -#define LOG_LOCAL2 0 -#endif -#ifndef LOG_LOCAL3 -#define LOG_LOCAL3 0 -#endif -#ifndef LOG_LOCAL4 -#define LOG_LOCAL4 0 -#endif -#ifndef LOG_LOCAL5 -#define LOG_LOCAL5 0 -#endif -#ifndef LOG_LOCAL6 -#define LOG_LOCAL6 0 -#endif -#ifndef LOG_LOCAL7 -#define LOG_LOCAL7 0 -#endif -#ifndef LOG_DAEMON -#define LOG_DAEMON 0 +static void StopSnmpAgent(void); #endif - static void usage(char *prog) { @@ -287,7 +236,7 @@ usage(char *prog) "\t\t\t Don't put space(s) between -D and TOKEN(s).\n" #endif " -f\t\t\tdo not fork from the shell\n", -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H " -g GID\t\tchange to this numeric gid after opening\n" "\t\t\t transport endpoints\n" #endif @@ -315,7 +264,7 @@ usage(char *prog) " \t\t\t (followed by the startup parameter list)\n" " \t\t\t Note that some parameters are not relevant when running as a service\n" #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H " -u UID\t\tchange to this uid (numeric or textual) after\n" "\t\t\t opening transport endpoints\n" #endif @@ -340,6 +289,7 @@ usage(char *prog) " -S d|i|0-7\t\tuse -Ls instead\n" "\n" ); + SOCK_CLEANUP; exit(1); } @@ -350,15 +300,11 @@ version(void) "Web: http://www.net-snmp.org/\n" "Email: net-snmp-coders@lists.sourceforge.net\n\n", netsnmp_get_version()); - exit(0); } RETSIGTYPE SnmpdShutDown(int a) { -#ifdef WIN32SERVICE - extern netsnmp_session *main_session; -#endif netsnmp_running = 0; #ifdef WIN32SERVICE /* @@ -380,7 +326,6 @@ SnmpdReconfig(int a) #endif #ifdef SIGUSR1 -extern void dump_registry(void); RETSIGTYPE SnmpdDump(int a) { @@ -429,34 +374,53 @@ SnmpTrapNodeDown(void) * * Also successfully EXITs with zero for some options. */ -int #ifdef WIN32SERVICE +static int SnmpDaemonMain(int argc, TCHAR * argv[]) #else +int main(int argc, char *argv[]) #endif { - char options[128] = "aAc:CdD::fhHI:l:L:m:M:n:p:P:qrsS:UvV-:Y:"; - int arg, i, ret; + static const char options[] = "aAc:CdD::fhHI:l:L:m:M:n:p:P:qrsS:UvV-:Y:" +#ifdef HAVE_UNISTD_H + "g:u:" +#endif +#if defined(USING_AGENTX_SUBAGENT_MODULE)|| defined(USING_AGENTX_MASTER_MODULE) + "x:" +#endif +#ifdef USING_AGENTX_SUBAGENT_MODULE + "X" +#endif + ; + int arg, i, ret, exit_code = 1; int dont_fork = 0, do_help = 0; int log_set = 0; int agent_mode = -1; char *pid_file = NULL; char option_compatability[] = "-Le"; -#if HAVE_GETPID +#ifndef WIN32 + int prepared_sockets = 0; +#endif +#ifdef HAVE_GETPID int fd; FILE *PID; #endif + SOCK_STARTUP; + +#ifndef NETSNMP_NO_SYSTEMD + /* check if systemd has sockets for us and don't close them */ + prepared_sockets = netsnmp_sd_listen_fds(0); +#endif /* NETSNMP_NO_SYSTEMD */ #ifndef WIN32 /* * close all non-standard file descriptors we may have * inherited from the shell. */ - for (i = getdtablesize() - 1; i > 2; --i) { - (void) close(i); - } -#endif /* #WIN32 */ + if (!prepared_sockets) + netsnmp_close_fds(2); +#endif /* * register signals ASAP to prevent default action (usually core) @@ -504,18 +468,6 @@ main(int argc, char *argv[]) netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_CACHE_TIMEOUT, 5); - /* - * Add some options if they are available. - */ -#if HAVE_UNISTD_H - strcat(options, "g:u:"); -#endif -#if defined(USING_AGENTX_SUBAGENT_MODULE)|| defined(USING_AGENTX_MASTER_MODULE) - strcat(options, "x:"); -#endif -#ifdef USING_AGENTX_SUBAGENT_MODULE - strcat(options, "X"); -#endif /* * This is incredibly ugly, but it's probably the simplest way @@ -547,6 +499,8 @@ main(int argc, char *argv[]) } if (strcasecmp(optarg, "version") == 0) { version(); + exit_code = 0; + goto out; } handle_long_opt(optarg); @@ -584,7 +538,7 @@ main(int argc, char *argv[]) case 'D': #ifdef NETSNMP_DISABLE_DEBUGGING fprintf(stderr, "Debugging not configured\n"); - exit(1); + goto out; #else debug_register_tokens(optarg); snmp_set_do_debugging(1); @@ -595,14 +549,14 @@ main(int argc, char *argv[]) dont_fork = 1; break; -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H case 'g': if (optarg != NULL) { char *ecp; int gid; gid = strtoul(optarg, &ecp, 10); -#if HAVE_GETGRNAM && HAVE_PWD_H +#if defined(HAVE_GETGRNAM) && defined(HAVE_PWD_H) if (*ecp) { struct group *info; @@ -613,10 +567,9 @@ main(int argc, char *argv[]) #endif if (gid < 0) { fprintf(stderr, "Bad group id: %s\n", optarg); - exit(1); + goto out; } - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID, gid); + netsnmp_set_agent_group_id(gid); } else { usage(argv[0]); } @@ -647,7 +600,7 @@ main(int argc, char *argv[]) fprintf(stderr, "%s: logfile path too long (limit %d chars)\n", argv[0], PATH_MAX); - exit(1); + goto out; } snmp_enable_filelog(optarg, netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, @@ -694,6 +647,7 @@ main(int argc, char *argv[]) case 'P': printf("Warning: -P option is deprecated, use -p instead\n"); + /* FALL THROUGH */ case 'p': if (optarg != NULL) { pid_file = optarg; @@ -773,14 +727,14 @@ main(int argc, char *argv[]) NETSNMP_DS_AGENT_LEAVE_PIDFILE); break; -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H case 'u': if (optarg != NULL) { char *ecp; int uid; uid = strtoul(optarg, &ecp, 10); -#if HAVE_GETPWNAM && HAVE_PWD_H +#if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) if (*ecp) { struct passwd *info; @@ -791,10 +745,9 @@ main(int argc, char *argv[]) #endif if (uid < 0) { fprintf(stderr, "Bad user id: %s\n", optarg); - exit(1); + goto out; } - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID, uid); + netsnmp_set_agent_user_id(uid); } else { usage(argv[0]); } @@ -803,6 +756,8 @@ main(int argc, char *argv[]) case 'v': version(); + exit_code = 0; + goto out; case 'V': netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, @@ -829,7 +784,6 @@ main(int argc, char *argv[]) fprintf(stderr, "%s: Illegal argument -X:" "AgentX support not compiled in.\n", argv[0]); usage(argv[0]); - exit(1); #endif break; @@ -851,7 +805,8 @@ main(int argc, char *argv[]) init_snmp(app_name); fprintf(stderr, "Configuration directives understood:\n"); read_config_print_usage(" "); - exit(0); + exit_code = 0; + goto out; } if (optind < argc) { @@ -867,7 +822,7 @@ main(int argc, char *argv[]) astring = (char*)malloc(strlen(c) + 2 + strlen(argv[i])); if (astring == NULL) { fprintf(stderr, "malloc failure processing argv[%d]\n", i); - exit(1); + goto out; } sprintf(astring, "%s,%s", c, argv[i]); netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, @@ -883,10 +838,14 @@ main(int argc, char *argv[]) NETSNMP_DS_AGENT_PORTS))); #else /* NETSNMP_NO_LISTEN_SUPPORT */ fprintf(stderr, "You specified ports to open; this agent was built to only send notifications\n"); - exit(1); + goto out; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ } +#if defined(NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG) + if (0 == log_set) + snmp_enable_syslog(); +#else #ifdef NETSNMP_LOGFILE #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_FILE if (0 == log_set) @@ -894,7 +853,8 @@ main(int argc, char *argv[]) netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_APPEND_LOGFILES)); #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_FILE */ -#endif +#endif /* NETSNMP_LOGFILE */ +#endif /* ! NETSNMP_DEFAULT_LOG_SYSLOG */ #ifdef USING_UTIL_FUNCS_RESTART_MODULE { @@ -912,7 +872,7 @@ main(int argc, char *argv[]) argvrestartname = (char *) malloc(strlen(argv[0]) + 1); if (!argvrestartp || !argvrestart || !argvrestartname) { fprintf(stderr, "malloc failure processing argvrestart\n"); - exit(1); + goto out; } strcpy(argvrestartname, argv[0]); @@ -937,10 +897,9 @@ main(int argc, char *argv[]) NETSNMP_DS_AGENT_ROLE, agent_mode); } - SOCK_STARTUP; if (init_agent(app_name) != 0) { snmp_log(LOG_ERR, "Agent initialization failed\n"); - exit(1); + goto out; } init_mib_modules(); @@ -954,7 +913,7 @@ main(int argc, char *argv[]) * Some error opening one of the specified agent transports. */ snmp_log(LOG_ERR, "Server Exiting with code 1\n"); - exit(1); + goto out; } /* @@ -975,11 +934,11 @@ main(int argc, char *argv[]) */ if(ret != 0) { snmp_log(LOG_ERR, "Server Exiting with code 1\n"); - exit(1); + goto out; } } -#if HAVE_GETPID +#ifdef HAVE_GETPID if (pid_file != NULL) { /* * unlink the pid_file, if it exists, prior to open. Without @@ -992,21 +951,17 @@ main(int argc, char *argv[]) snmp_log_perror(pid_file); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { - exit(1); + goto out; } } else { if ((PID = fdopen(fd, "w")) == NULL) { + close(fd); snmp_log_perror(pid_file); - exit(1); + goto out; } else { fprintf(PID, "%d\n", (int) getpid()); fclose(PID); } -#ifndef _MSC_VER - /* The sequence open()/fdopen()/fclose()/close() makes MSVC crash, - hence skip the close() call when using the MSVC runtime. */ - close(fd); -#endif } } #endif @@ -1026,7 +981,7 @@ main(int argc, char *argv[]) #ifdef HAVE_CHOWN if ( uid != 0 || gid != 0 ) - chown( persistent_dir, uid, gid ); + NETSNMP_IGNORE_RESULT(chown(persistent_dir, uid, gid)); #endif #ifdef HAVE_SETGID @@ -1041,7 +996,7 @@ main(int argc, char *argv[]) snmp_log_perror("setgid failed"); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { - exit(1); + goto out; } } } @@ -1049,7 +1004,7 @@ main(int argc, char *argv[]) #ifdef HAVE_SETUID if ((uid = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_USERID)) > 0) { -#if HAVE_GETPWNAM && HAVE_PWD_H && HAVE_INITGROUPS +#if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) && defined(HAVE_INITGROUPS) struct passwd *info; /* @@ -1063,7 +1018,7 @@ main(int argc, char *argv[]) snmp_log_perror("initgroups failed"); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { - exit(1); + goto out; } } } @@ -1074,7 +1029,7 @@ main(int argc, char *argv[]) snmp_log_perror("setuid failed"); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { - exit(1); + goto out; } } } @@ -1106,6 +1061,19 @@ main(int argc, char *argv[]) #endif netsnmp_addrcache_initialise(); + /* + * Let systemd know we're up. + */ +#ifndef NETSNMP_NO_SYSTEMD + netsnmp_sd_notify(1, "READY=1\n"); + if (prepared_sockets) + /* + * Clear the environment variable, we already processed all the sockets + * by now. + */ + netsnmp_sd_listen_fds(1); +#endif + /* * Forever monitor the dest_port for incoming PDUs. */ @@ -1135,8 +1103,11 @@ main(int argc, char *argv[]) SNMP_FREE(argvrestartp); #endif /* USING_UTIL_FUNCS_RESTART_MODULE */ + exit_code = 0; + +out: SOCK_CLEANUP; - return 0; + return exit_code; } /* End main() -- snmpd */ #if defined(WIN32) @@ -1157,7 +1128,13 @@ static unsigned __stdcall wait_for_stdin(void* arg) static void create_stdin_waiter_thread(void) { netsnmp_assert(s_thread_handle == 0); - s_thread_handle = (HANDLE)_beginthreadex(0, 0, wait_for_stdin, 0, 0, &s_threadid); +#ifdef HAVE__BEGINTHREADEX + s_thread_handle = (HANDLE)_beginthreadex(0, 0, wait_for_stdin, 0, 0, + &s_threadid); +#else + s_thread_handle = (HANDLE)CreateThread(NULL, 0, wait_for_stdin, 0, 0, + &s_threadid); +#endif netsnmp_assert(s_thread_handle != 0); } @@ -1173,6 +1150,32 @@ static void join_stdin_waiter_thread(void) } #endif +static void +snmpd_reconfig(void) +{ +#ifdef HAVE_SIGPROCMASK + sigset_t set; + int ret; + + sigemptyset(&set); + sigaddset(&set, SIGHUP); + ret = sigprocmask(SIG_BLOCK, &set, NULL); + netsnmp_assert(ret == 0); +#endif + reconfig = 0; + snmp_log(LOG_INFO, "Reconfiguring daemon\n"); + /* Stop and restart logging. This allows logfiles to be rotated etc. */ + netsnmp_logging_restart(); + snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n", + netsnmp_get_version()); + update_config(); + send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3); +#ifdef HAVE_SIGPROCMASK + ret = sigprocmask(SIG_UNBLOCK, &set, NULL); + netsnmp_assert(ret == 0); +#endif +} + /*******************************************************************-o-****** * receive * @@ -1214,23 +1217,8 @@ receive(void) * Loop-forever: execute message handlers for sockets with data */ while (netsnmp_running) { - if (reconfig) { -#if HAVE_SIGHOLD - sighold(SIGHUP); -#endif - reconfig = 0; - snmp_log(LOG_INFO, "Reconfiguring daemon\n"); - /* Stop and restart logging. This allows logfiles to be - rotated etc. */ - netsnmp_logging_restart(); - snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n", - netsnmp_get_version()); - update_config(); - send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3); -#if HAVE_SIGHOLD - sigrelse(SIGHUP); -#endif - } + if (reconfig) + snmpd_reconfig(); /* * default to sleeping for a really long time. INT_MAX @@ -1439,9 +1427,8 @@ snmp_input(int op, * Invokes appropriate startup functions depending on the * parameters passed *************************************************************/ -int - __cdecl -_tmain(int argc, TCHAR * argv[]) +int __cdecl +main(int argc, TCHAR * argv[]) { /* * Define Service Name and Description, which appears in windows SCM @@ -1457,7 +1444,7 @@ _tmain(int argc, TCHAR * argv[]) InputParams InputOptions; - int nRunType = RUN_AS_CONSOLE; + enum net_snmp_cmd_line_action nRunType = RUN_AS_CONSOLE; int quiet = 0; #if 0 @@ -1473,16 +1460,14 @@ _tmain(int argc, TCHAR * argv[]) */ InputOptions.Argc = argc; InputOptions.Argv = argv; - exit (RegisterService(lpszServiceName, + return RegisterService(lpszServiceName, lpszServiceDisplayName, - lpszServiceDescription, &InputOptions, quiet)); - break; + lpszServiceDescription, &InputOptions, quiet); case UN_REGISTER_SERVICE: /* * Unregister service */ - exit (UnregisterService(lpszServiceName, quiet)); - break; + return UnregisterService(lpszServiceName, quiet); case RUN_AS_SERVICE: /* * Run as service @@ -1492,13 +1477,11 @@ _tmain(int argc, TCHAR * argv[]) */ RegisterStopFunction(StopSnmpAgent); return RunAsService(SnmpDaemonMain); - break; default: /* * Run in console mode */ return SnmpDaemonMain(argc, argv); - break; } } diff --git a/apps/Makefile.depend b/apps/Makefile.depend index d8057dc..1cee711 100644 --- a/apps/Makefile.depend +++ b/apps/Makefile.depend @@ -4,6 +4,7 @@ ./agentxtrap.lo: ../include/net-snmp/system/linux.h ./agentxtrap.lo: ../include/net-snmp/system/sysv.h ./agentxtrap.lo: ../include/net-snmp/system/generic.h +./agentxtrap.lo: ../include/net-snmp/machine/generic.h ./agentxtrap.lo: ../include/net-snmp/net-snmp-features.h ./agentxtrap.lo: ../include/net-snmp/net-snmp-includes.h ./agentxtrap.lo: ../include/net-snmp/definitions.h @@ -16,6 +17,7 @@ ./agentxtrap.lo: ../include/net-snmp/pdu_api.h ./agentxtrap.lo: ../include/net-snmp/library/asn1.h ./agentxtrap.lo: ../include/net-snmp/output_api.h +./agentxtrap.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./agentxtrap.lo: ../include/net-snmp/library/snmp_debug.h ./agentxtrap.lo: ../include/net-snmp/library/snmp_logging.h ./agentxtrap.lo: ../include/net-snmp/session_api.h @@ -33,6 +35,7 @@ ./agentxtrap.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./agentxtrap.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./agentxtrap.lo: ../include/net-snmp/library/snmpIPXDomain.h +./agentxtrap.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./agentxtrap.lo: ../include/net-snmp/library/ucd_compat.h ./agentxtrap.lo: ../include/net-snmp/library/mib.h ./agentxtrap.lo: ../include/net-snmp/mib_api.h @@ -51,7 +54,6 @@ ./agentxtrap.lo: ../include/net-snmp/library/data_list.h ./agentxtrap.lo: ../include/net-snmp/library/check_varbind.h ./agentxtrap.lo: ../include/net-snmp/library/container.h -./agentxtrap.lo: ../include/net-snmp/library/factory.h ./agentxtrap.lo: ../include/net-snmp/library/container_binary_array.h ./agentxtrap.lo: ../include/net-snmp/library/container_list_ssll.h ./agentxtrap.lo: ../include/net-snmp/library/container_iterator.h @@ -73,12 +75,14 @@ ./agentxtrap.lo: ../include/net-snmp/library/lcd_time.h ./agentxtrap.lo: ../include/net-snmp/library/snmp_secmod.h ./agentxtrap.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./agentxtrap.lo: ../include/net-snmp/library/snmptsm.h ./agentxtrap.lo: ../include/net-snmp/library/snmpusm.h +./agentxtrap.lo: ../include/net-snmp/library/snmptsm.h ./agentxtrap.lo: ../include/net-snmp/agent/ds_agent.h +./agentxtrap.lo: ../agent/agent_global_vars.h ./agentxtrap.lo: ../agent/mibgroup/agentx/agentx_config.h ./agentxtrap.lo: ../agent/mibgroup/agentx/client.h ./agentxtrap.lo: ../agent/mibgroup/agentx/protocol.h +./agentxtrap.lo: ../agent/mibgroup/agentx/subagent.h ./encode_keychange.lo: ../include/net-snmp/net-snmp-config.h ./encode_keychange.lo: ../include/net-snmp/net-snmp-includes.h ./encode_keychange.lo: ../include/net-snmp/definitions.h @@ -91,6 +95,7 @@ ./encode_keychange.lo: ../include/net-snmp/pdu_api.h ./encode_keychange.lo: ../include/net-snmp/library/asn1.h ./encode_keychange.lo: ../include/net-snmp/output_api.h +./encode_keychange.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./encode_keychange.lo: ../include/net-snmp/library/snmp_debug.h ./encode_keychange.lo: ../include/net-snmp/library/snmp_logging.h ./encode_keychange.lo: ../include/net-snmp/session_api.h @@ -108,6 +113,7 @@ ./encode_keychange.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./encode_keychange.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./encode_keychange.lo: ../include/net-snmp/library/snmpIPXDomain.h +./encode_keychange.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./encode_keychange.lo: ../include/net-snmp/library/ucd_compat.h ./encode_keychange.lo: ../include/net-snmp/library/mib.h ./encode_keychange.lo: ../include/net-snmp/mib_api.h @@ -127,7 +133,6 @@ ./encode_keychange.lo: ../include/net-snmp/library/data_list.h ./encode_keychange.lo: ../include/net-snmp/library/check_varbind.h ./encode_keychange.lo: ../include/net-snmp/library/container.h -./encode_keychange.lo: ../include/net-snmp/library/factory.h ./encode_keychange.lo: ../include/net-snmp/library/container_binary_array.h ./encode_keychange.lo: ../include/net-snmp/library/container_list_ssll.h ./encode_keychange.lo: ../include/net-snmp/library/container_iterator.h @@ -148,11 +153,10 @@ ./encode_keychange.lo: ../include/net-snmp/library/lcd_time.h ./encode_keychange.lo: ../include/net-snmp/library/snmp_secmod.h ./encode_keychange.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./encode_keychange.lo: ../include/net-snmp/library/snmptsm.h ./encode_keychange.lo: ../include/net-snmp/library/snmpusm.h +./encode_keychange.lo: ../include/net-snmp/library/snmptsm.h ./snmpbulkget.lo: ../include/net-snmp/net-snmp-config.h -./snmpbulkget.lo: ../include/net-snmp/utilities.h -./snmpbulkget.lo: ../include/net-snmp/types.h +./snmpbulkget.lo: ../include/net-snmp/utilities.h ../include/net-snmp/types.h ./snmpbulkget.lo: ../include/net-snmp/library/oid.h ./snmpbulkget.lo: ../include/net-snmp/library/types.h ./snmpbulkget.lo: ../include/net-snmp/definitions.h @@ -162,6 +166,7 @@ ./snmpbulkget.lo: ../include/net-snmp/pdu_api.h ./snmpbulkget.lo: ../include/net-snmp/library/asn1.h ./snmpbulkget.lo: ../include/net-snmp/output_api.h +./snmpbulkget.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpbulkget.lo: ../include/net-snmp/library/snmp_debug.h ./snmpbulkget.lo: ../include/net-snmp/library/snmp_logging.h ./snmpbulkget.lo: ../include/net-snmp/session_api.h @@ -179,6 +184,7 @@ ./snmpbulkget.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpbulkget.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpbulkget.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpbulkget.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpbulkget.lo: ../include/net-snmp/library/ucd_compat.h ./snmpbulkget.lo: ../include/net-snmp/library/mib.h ./snmpbulkget.lo: ../include/net-snmp/mib_api.h @@ -196,7 +202,6 @@ ./snmpbulkget.lo: ../include/net-snmp/library/data_list.h ./snmpbulkget.lo: ../include/net-snmp/library/check_varbind.h ./snmpbulkget.lo: ../include/net-snmp/library/container.h -./snmpbulkget.lo: ../include/net-snmp/library/factory.h ./snmpbulkget.lo: ../include/net-snmp/library/container_binary_array.h ./snmpbulkget.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpbulkget.lo: ../include/net-snmp/library/container_iterator.h @@ -219,8 +224,8 @@ ./snmpbulkget.lo: ../include/net-snmp/library/lcd_time.h ./snmpbulkget.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpbulkget.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpbulkget.lo: ../include/net-snmp/library/snmptsm.h ./snmpbulkget.lo: ../include/net-snmp/library/snmpusm.h +./snmpbulkget.lo: ../include/net-snmp/library/snmptsm.h ./snmpbulkwalk.lo: ../include/net-snmp/net-snmp-config.h ./snmpbulkwalk.lo: ../include/net-snmp/net-snmp-includes.h ./snmpbulkwalk.lo: ../include/net-snmp/definitions.h @@ -233,6 +238,7 @@ ./snmpbulkwalk.lo: ../include/net-snmp/pdu_api.h ./snmpbulkwalk.lo: ../include/net-snmp/library/asn1.h ./snmpbulkwalk.lo: ../include/net-snmp/output_api.h +./snmpbulkwalk.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmp_debug.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmp_logging.h ./snmpbulkwalk.lo: ../include/net-snmp/session_api.h @@ -250,6 +256,7 @@ ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpbulkwalk.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpbulkwalk.lo: ../include/net-snmp/library/ucd_compat.h ./snmpbulkwalk.lo: ../include/net-snmp/library/mib.h ./snmpbulkwalk.lo: ../include/net-snmp/mib_api.h @@ -269,7 +276,6 @@ ./snmpbulkwalk.lo: ../include/net-snmp/library/data_list.h ./snmpbulkwalk.lo: ../include/net-snmp/library/check_varbind.h ./snmpbulkwalk.lo: ../include/net-snmp/library/container.h -./snmpbulkwalk.lo: ../include/net-snmp/library/factory.h ./snmpbulkwalk.lo: ../include/net-snmp/library/container_binary_array.h ./snmpbulkwalk.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpbulkwalk.lo: ../include/net-snmp/library/container_iterator.h @@ -290,8 +296,8 @@ ./snmpbulkwalk.lo: ../include/net-snmp/library/lcd_time.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpbulkwalk.lo: ../include/net-snmp/library/snmptsm.h ./snmpbulkwalk.lo: ../include/net-snmp/library/snmpusm.h +./snmpbulkwalk.lo: ../include/net-snmp/library/snmptsm.h ./snmpdelta.lo: ../include/net-snmp/net-snmp-config.h ./snmpdelta.lo: ../include/net-snmp/net-snmp-includes.h ./snmpdelta.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -303,6 +309,7 @@ ./snmpdelta.lo: ../include/net-snmp/pdu_api.h ./snmpdelta.lo: ../include/net-snmp/library/asn1.h ./snmpdelta.lo: ../include/net-snmp/output_api.h +./snmpdelta.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpdelta.lo: ../include/net-snmp/library/snmp_debug.h ./snmpdelta.lo: ../include/net-snmp/library/snmp_logging.h ./snmpdelta.lo: ../include/net-snmp/session_api.h @@ -320,6 +327,7 @@ ./snmpdelta.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpdelta.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpdelta.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpdelta.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpdelta.lo: ../include/net-snmp/library/ucd_compat.h ./snmpdelta.lo: ../include/net-snmp/library/mib.h ./snmpdelta.lo: ../include/net-snmp/mib_api.h @@ -339,7 +347,6 @@ ./snmpdelta.lo: ../include/net-snmp/library/data_list.h ./snmpdelta.lo: ../include/net-snmp/library/check_varbind.h ./snmpdelta.lo: ../include/net-snmp/library/container.h -./snmpdelta.lo: ../include/net-snmp/library/factory.h ./snmpdelta.lo: ../include/net-snmp/library/container_binary_array.h ./snmpdelta.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpdelta.lo: ../include/net-snmp/library/container_iterator.h @@ -360,8 +367,8 @@ ./snmpdelta.lo: ../include/net-snmp/library/lcd_time.h ./snmpdelta.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpdelta.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpdelta.lo: ../include/net-snmp/library/snmptsm.h ./snmpdelta.lo: ../include/net-snmp/library/snmpusm.h +./snmpdelta.lo: ../include/net-snmp/library/snmptsm.h ./snmpdf.lo: ../include/net-snmp/net-snmp-config.h ./snmpdf.lo: ../include/net-snmp/net-snmp-includes.h ./snmpdf.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -372,6 +379,7 @@ ./snmpdf.lo: ../include/net-snmp/library/snmp_client.h ./snmpdf.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./snmpdf.lo: ../include/net-snmp/output_api.h +./snmpdf.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpdf.lo: ../include/net-snmp/library/snmp_debug.h ./snmpdf.lo: ../include/net-snmp/library/snmp_logging.h ./snmpdf.lo: ../include/net-snmp/session_api.h @@ -389,6 +397,7 @@ ./snmpdf.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpdf.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpdf.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpdf.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpdf.lo: ../include/net-snmp/library/ucd_compat.h ./snmpdf.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmpdf.lo: ../include/net-snmp/library/parse.h @@ -407,7 +416,6 @@ ./snmpdf.lo: ../include/net-snmp/library/data_list.h ./snmpdf.lo: ../include/net-snmp/library/check_varbind.h ./snmpdf.lo: ../include/net-snmp/library/container.h -./snmpdf.lo: ../include/net-snmp/library/factory.h ./snmpdf.lo: ../include/net-snmp/library/container_binary_array.h ./snmpdf.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpdf.lo: ../include/net-snmp/library/container_iterator.h @@ -427,11 +435,10 @@ ./snmpdf.lo: ../include/net-snmp/library/lcd_time.h ./snmpdf.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpdf.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpdf.lo: ../include/net-snmp/library/snmptsm.h ./snmpdf.lo: ../include/net-snmp/library/snmpusm.h +./snmpdf.lo: ../include/net-snmp/library/snmptsm.h ./snmpget.lo: ../include/net-snmp/net-snmp-config.h -./snmpget.lo: ../include/net-snmp/utilities.h -./snmpget.lo: ../include/net-snmp/types.h +./snmpget.lo: ../include/net-snmp/utilities.h ../include/net-snmp/types.h ./snmpget.lo: ../include/net-snmp/library/oid.h ./snmpget.lo: ../include/net-snmp/library/types.h ./snmpget.lo: ../include/net-snmp/definitions.h @@ -441,6 +448,7 @@ ./snmpget.lo: ../include/net-snmp/pdu_api.h ./snmpget.lo: ../include/net-snmp/library/asn1.h ./snmpget.lo: ../include/net-snmp/output_api.h +./snmpget.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpget.lo: ../include/net-snmp/library/snmp_debug.h ./snmpget.lo: ../include/net-snmp/library/snmp_logging.h ./snmpget.lo: ../include/net-snmp/session_api.h @@ -458,6 +466,7 @@ ./snmpget.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpget.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpget.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpget.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpget.lo: ../include/net-snmp/library/ucd_compat.h ./snmpget.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmpget.lo: ../include/net-snmp/library/parse.h @@ -474,7 +483,6 @@ ./snmpget.lo: ../include/net-snmp/library/data_list.h ./snmpget.lo: ../include/net-snmp/library/check_varbind.h ./snmpget.lo: ../include/net-snmp/library/container.h -./snmpget.lo: ../include/net-snmp/library/factory.h ./snmpget.lo: ../include/net-snmp/library/container_binary_array.h ./snmpget.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpget.lo: ../include/net-snmp/library/container_iterator.h @@ -497,8 +505,8 @@ ./snmpget.lo: ../include/net-snmp/library/lcd_time.h ./snmpget.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpget.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpget.lo: ../include/net-snmp/library/snmptsm.h ./snmpget.lo: ../include/net-snmp/library/snmpusm.h +./snmpget.lo: ../include/net-snmp/library/snmptsm.h ./snmpgetnext.lo: ../include/net-snmp/net-snmp-config.h ./snmpgetnext.lo: ../include/net-snmp/net-snmp-includes.h ./snmpgetnext.lo: ../include/net-snmp/definitions.h @@ -511,6 +519,7 @@ ./snmpgetnext.lo: ../include/net-snmp/pdu_api.h ./snmpgetnext.lo: ../include/net-snmp/library/asn1.h ./snmpgetnext.lo: ../include/net-snmp/output_api.h +./snmpgetnext.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpgetnext.lo: ../include/net-snmp/library/snmp_debug.h ./snmpgetnext.lo: ../include/net-snmp/library/snmp_logging.h ./snmpgetnext.lo: ../include/net-snmp/session_api.h @@ -528,6 +537,7 @@ ./snmpgetnext.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpgetnext.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpgetnext.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpgetnext.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpgetnext.lo: ../include/net-snmp/library/ucd_compat.h ./snmpgetnext.lo: ../include/net-snmp/library/mib.h ./snmpgetnext.lo: ../include/net-snmp/mib_api.h @@ -547,7 +557,6 @@ ./snmpgetnext.lo: ../include/net-snmp/library/data_list.h ./snmpgetnext.lo: ../include/net-snmp/library/check_varbind.h ./snmpgetnext.lo: ../include/net-snmp/library/container.h -./snmpgetnext.lo: ../include/net-snmp/library/factory.h ./snmpgetnext.lo: ../include/net-snmp/library/container_binary_array.h ./snmpgetnext.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpgetnext.lo: ../include/net-snmp/library/container_iterator.h @@ -568,8 +577,220 @@ ./snmpgetnext.lo: ../include/net-snmp/library/lcd_time.h ./snmpgetnext.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpgetnext.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpgetnext.lo: ../include/net-snmp/library/snmptsm.h ./snmpgetnext.lo: ../include/net-snmp/library/snmpusm.h +./snmpgetnext.lo: ../include/net-snmp/library/snmptsm.h +./snmppcap.lo: ../include/net-snmp/net-snmp-config.h +./snmppcap.lo: ../include/net-snmp/net-snmp-includes.h +./snmppcap.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h +./snmppcap.lo: ../include/net-snmp/library/oid.h +./snmppcap.lo: ../include/net-snmp/library/types.h +./snmppcap.lo: ../include/net-snmp/library/snmp_api.h +./snmppcap.lo: ../include/net-snmp/varbind_api.h +./snmppcap.lo: ../include/net-snmp/library/snmp_client.h +./snmppcap.lo: ../include/net-snmp/pdu_api.h +./snmppcap.lo: ../include/net-snmp/library/asn1.h +./snmppcap.lo: ../include/net-snmp/output_api.h +./snmppcap.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmppcap.lo: ../include/net-snmp/library/snmp_debug.h +./snmppcap.lo: ../include/net-snmp/library/snmp_logging.h +./snmppcap.lo: ../include/net-snmp/session_api.h +./snmppcap.lo: ../include/net-snmp/library/callback.h +./snmppcap.lo: ../include/net-snmp/library/snmp_transport.h +./snmppcap.lo: ../include/net-snmp/library/snmp_service.h +./snmppcap.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmppcap.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmppcap.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmppcap.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmppcap.lo: ../include/net-snmp/library/ucd_compat.h +./snmppcap.lo: ../include/net-snmp/library/mib.h +./snmppcap.lo: ../include/net-snmp/mib_api.h +./snmppcap.lo: ../include/net-snmp/library/parse.h +./snmppcap.lo: ../include/net-snmp/library/oid_stash.h +./snmppcap.lo: ../include/net-snmp/net-snmp-features.h +./snmppcap.lo: ../include/net-snmp/library/snmp_impl.h +./snmppcap.lo: ../include/net-snmp/library/snmp.h +./snmppcap.lo: ../include/net-snmp/library/snmp-tc.h +./snmppcap.lo: ../include/net-snmp/library/getopt.h +./snmppcap.lo: ../include/net-snmp/utilities.h +./snmppcap.lo: ../include/net-snmp/library/system.h +./snmppcap.lo: ../include/net-snmp/library/tools.h +./snmppcap.lo: ../include/net-snmp/library/int64.h +./snmppcap.lo: ../include/net-snmp/library/mt_support.h +./snmppcap.lo: ../include/net-snmp/library/snmp_alarm.h +./snmppcap.lo: ../include/net-snmp/library/data_list.h +./snmppcap.lo: ../include/net-snmp/library/check_varbind.h +./snmppcap.lo: ../include/net-snmp/library/container.h +./snmppcap.lo: ../include/net-snmp/library/container_binary_array.h +./snmppcap.lo: ../include/net-snmp/library/container_list_ssll.h +./snmppcap.lo: ../include/net-snmp/library/container_iterator.h +./snmppcap.lo: ../include/net-snmp/library/container.h +./snmppcap.lo: ../include/net-snmp/library/snmp_assert.h +./snmppcap.lo: ../include/net-snmp/version.h +./snmppcap.lo: ../include/net-snmp/config_api.h +./snmppcap.lo: ../include/net-snmp/library/read_config.h +./snmppcap.lo: ../include/net-snmp/library/default_store.h +./snmppcap.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmppcap.lo: ../include/net-snmp/library/snmp_enum.h +./snmppcap.lo: ../include/net-snmp/library/vacm.h +./snmppcap.lo: ../include/net-snmp/snmpv3_api.h +./snmppcap.lo: ../include/net-snmp/library/snmpv3.h +./snmppcap.lo: ../include/net-snmp/library/transform_oids.h +./snmppcap.lo: ../include/net-snmp/library/keytools.h +./snmppcap.lo: ../include/net-snmp/library/scapi.h +./snmppcap.lo: ../include/net-snmp/library/lcd_time.h +./snmppcap.lo: ../include/net-snmp/library/snmp_secmod.h +./snmppcap.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmppcap.lo: ../include/net-snmp/library/snmpusm.h +./snmppcap.lo: ../include/net-snmp/library/snmptsm.h +./snmppcap.lo: ../include/net-snmp/library/large_fd_set.h +./snmpping.lo: ../include/net-snmp/net-snmp-config.h +./snmpping.lo: ../include/net-snmp/net-snmp-includes.h +./snmpping.lo: ../include/net-snmp/definitions.h +./snmpping.lo: ../include/net-snmp/types.h +./snmpping.lo: ../include/net-snmp/library/oid.h +./snmpping.lo: ../include/net-snmp/library/types.h +./snmpping.lo: ../include/net-snmp/library/snmp_api.h +./snmpping.lo: ../include/net-snmp/varbind_api.h +./snmpping.lo: ../include/net-snmp/library/snmp_client.h +./snmpping.lo: ../include/net-snmp/pdu_api.h +./snmpping.lo: ../include/net-snmp/library/asn1.h +./snmpping.lo: ../include/net-snmp/output_api.h +./snmpping.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmpping.lo: ../include/net-snmp/library/snmp_debug.h +./snmpping.lo: ../include/net-snmp/library/snmp_logging.h +./snmpping.lo: ../include/net-snmp/session_api.h +./snmpping.lo: ../include/net-snmp/library/callback.h +./snmpping.lo: ../include/net-snmp/library/snmp_transport.h +./snmpping.lo: ../include/net-snmp/library/snmp_service.h +./snmpping.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmpping.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmpping.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpping.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmpping.lo: ../include/net-snmp/library/ucd_compat.h +./snmpping.lo: ../include/net-snmp/library/mib.h +./snmpping.lo: ../include/net-snmp/mib_api.h +./snmpping.lo: ../include/net-snmp/library/parse.h +./snmpping.lo: ../include/net-snmp/library/oid_stash.h +./snmpping.lo: ../include/net-snmp/net-snmp-features.h +./snmpping.lo: ../include/net-snmp/library/snmp_impl.h +./snmpping.lo: ../include/net-snmp/library/snmp.h +./snmpping.lo: ../include/net-snmp/library/snmp-tc.h +./snmpping.lo: ../include/net-snmp/library/getopt.h +./snmpping.lo: ../include/net-snmp/utilities.h +./snmpping.lo: ../include/net-snmp/library/system.h +./snmpping.lo: ../include/net-snmp/library/tools.h +./snmpping.lo: ../include/net-snmp/library/int64.h +./snmpping.lo: ../include/net-snmp/library/mt_support.h +./snmpping.lo: ../include/net-snmp/library/snmp_alarm.h +./snmpping.lo: ../include/net-snmp/library/data_list.h +./snmpping.lo: ../include/net-snmp/library/check_varbind.h +./snmpping.lo: ../include/net-snmp/library/container.h +./snmpping.lo: ../include/net-snmp/library/container_binary_array.h +./snmpping.lo: ../include/net-snmp/library/container_list_ssll.h +./snmpping.lo: ../include/net-snmp/library/container_iterator.h +./snmpping.lo: ../include/net-snmp/library/container.h +./snmpping.lo: ../include/net-snmp/library/snmp_assert.h +./snmpping.lo: ../include/net-snmp/version.h +./snmpping.lo: ../include/net-snmp/config_api.h +./snmpping.lo: ../include/net-snmp/library/read_config.h +./snmpping.lo: ../include/net-snmp/library/default_store.h +./snmpping.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmpping.lo: ../include/net-snmp/library/snmp_enum.h +./snmpping.lo: ../include/net-snmp/library/vacm.h +./snmpping.lo: ../include/net-snmp/snmpv3_api.h +./snmpping.lo: ../include/net-snmp/library/snmpv3.h +./snmpping.lo: ../include/net-snmp/library/transform_oids.h +./snmpping.lo: ../include/net-snmp/library/keytools.h +./snmpping.lo: ../include/net-snmp/library/scapi.h +./snmpping.lo: ../include/net-snmp/library/lcd_time.h +./snmpping.lo: ../include/net-snmp/library/snmp_secmod.h +./snmpping.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmpping.lo: ../include/net-snmp/library/snmpusm.h +./snmpping.lo: ../include/net-snmp/library/snmptsm.h ../snmplib/inet_ntop.h +./snmpps.lo: ../include/net-snmp/net-snmp-config.h +./snmpps.lo: ../include/net-snmp/net-snmp-includes.h +./snmpps.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h +./snmpps.lo: ../include/net-snmp/library/oid.h +./snmpps.lo: ../include/net-snmp/library/types.h +./snmpps.lo: ../include/net-snmp/library/snmp_api.h +./snmpps.lo: ../include/net-snmp/varbind_api.h +./snmpps.lo: ../include/net-snmp/library/snmp_client.h +./snmpps.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h +./snmpps.lo: ../include/net-snmp/output_api.h +./snmpps.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmpps.lo: ../include/net-snmp/library/snmp_debug.h +./snmpps.lo: ../include/net-snmp/library/snmp_logging.h +./snmpps.lo: ../include/net-snmp/session_api.h +./snmpps.lo: ../include/net-snmp/library/callback.h +./snmpps.lo: ../include/net-snmp/library/snmp_transport.h +./snmpps.lo: ../include/net-snmp/library/snmp_service.h +./snmpps.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmpps.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmpps.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpps.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmpps.lo: ../include/net-snmp/library/ucd_compat.h +./snmpps.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h +./snmpps.lo: ../include/net-snmp/library/parse.h +./snmpps.lo: ../include/net-snmp/library/oid_stash.h +./snmpps.lo: ../include/net-snmp/net-snmp-features.h +./snmpps.lo: ../include/net-snmp/library/snmp_impl.h +./snmpps.lo: ../include/net-snmp/library/snmp.h +./snmpps.lo: ../include/net-snmp/library/snmp-tc.h +./snmpps.lo: ../include/net-snmp/library/getopt.h +./snmpps.lo: ../include/net-snmp/utilities.h +./snmpps.lo: ../include/net-snmp/library/system.h +./snmpps.lo: ../include/net-snmp/library/tools.h +./snmpps.lo: ../include/net-snmp/library/int64.h +./snmpps.lo: ../include/net-snmp/library/mt_support.h +./snmpps.lo: ../include/net-snmp/library/snmp_alarm.h +./snmpps.lo: ../include/net-snmp/library/data_list.h +./snmpps.lo: ../include/net-snmp/library/check_varbind.h +./snmpps.lo: ../include/net-snmp/library/container.h +./snmpps.lo: ../include/net-snmp/library/container_binary_array.h +./snmpps.lo: ../include/net-snmp/library/container_list_ssll.h +./snmpps.lo: ../include/net-snmp/library/container_iterator.h +./snmpps.lo: ../include/net-snmp/library/container.h +./snmpps.lo: ../include/net-snmp/library/snmp_assert.h +./snmpps.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./snmpps.lo: ../include/net-snmp/library/read_config.h +./snmpps.lo: ../include/net-snmp/library/default_store.h +./snmpps.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmpps.lo: ../include/net-snmp/library/snmp_enum.h +./snmpps.lo: ../include/net-snmp/library/vacm.h +./snmpps.lo: ../include/net-snmp/snmpv3_api.h +./snmpps.lo: ../include/net-snmp/library/snmpv3.h +./snmpps.lo: ../include/net-snmp/library/transform_oids.h +./snmpps.lo: ../include/net-snmp/library/keytools.h +./snmpps.lo: ../include/net-snmp/library/scapi.h +./snmpps.lo: ../include/net-snmp/library/lcd_time.h +./snmpps.lo: ../include/net-snmp/library/snmp_secmod.h +./snmpps.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmpps.lo: ../include/net-snmp/library/snmpusm.h +./snmpps.lo: ../include/net-snmp/library/snmptsm.h ./snmpset.lo: ../include/net-snmp/net-snmp-config.h ./snmpset.lo: ../include/net-snmp/net-snmp-includes.h ./snmpset.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -581,6 +802,7 @@ ./snmpset.lo: ../include/net-snmp/pdu_api.h ./snmpset.lo: ../include/net-snmp/library/asn1.h ./snmpset.lo: ../include/net-snmp/output_api.h +./snmpset.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpset.lo: ../include/net-snmp/library/snmp_debug.h ./snmpset.lo: ../include/net-snmp/library/snmp_logging.h ./snmpset.lo: ../include/net-snmp/session_api.h @@ -598,6 +820,7 @@ ./snmpset.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpset.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpset.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpset.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpset.lo: ../include/net-snmp/library/ucd_compat.h ./snmpset.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmpset.lo: ../include/net-snmp/library/parse.h @@ -616,7 +839,6 @@ ./snmpset.lo: ../include/net-snmp/library/data_list.h ./snmpset.lo: ../include/net-snmp/library/check_varbind.h ./snmpset.lo: ../include/net-snmp/library/container.h -./snmpset.lo: ../include/net-snmp/library/factory.h ./snmpset.lo: ../include/net-snmp/library/container_binary_array.h ./snmpset.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpset.lo: ../include/net-snmp/library/container_iterator.h @@ -636,8 +858,8 @@ ./snmpset.lo: ../include/net-snmp/library/lcd_time.h ./snmpset.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpset.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpset.lo: ../include/net-snmp/library/snmptsm.h ./snmpset.lo: ../include/net-snmp/library/snmpusm.h +./snmpset.lo: ../include/net-snmp/library/snmptsm.h ./snmpstatus.lo: ../include/net-snmp/net-snmp-config.h ./snmpstatus.lo: ../include/net-snmp/utilities.h ../include/net-snmp/types.h ./snmpstatus.lo: ../include/net-snmp/library/oid.h @@ -649,6 +871,7 @@ ./snmpstatus.lo: ../include/net-snmp/pdu_api.h ./snmpstatus.lo: ../include/net-snmp/library/asn1.h ./snmpstatus.lo: ../include/net-snmp/output_api.h +./snmpstatus.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpstatus.lo: ../include/net-snmp/library/snmp_debug.h ./snmpstatus.lo: ../include/net-snmp/library/snmp_logging.h ./snmpstatus.lo: ../include/net-snmp/session_api.h @@ -666,6 +889,7 @@ ./snmpstatus.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpstatus.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpstatus.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpstatus.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpstatus.lo: ../include/net-snmp/library/ucd_compat.h ./snmpstatus.lo: ../include/net-snmp/library/mib.h ./snmpstatus.lo: ../include/net-snmp/mib_api.h @@ -683,7 +907,6 @@ ./snmpstatus.lo: ../include/net-snmp/library/data_list.h ./snmpstatus.lo: ../include/net-snmp/library/check_varbind.h ./snmpstatus.lo: ../include/net-snmp/library/container.h -./snmpstatus.lo: ../include/net-snmp/library/factory.h ./snmpstatus.lo: ../include/net-snmp/library/container_binary_array.h ./snmpstatus.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpstatus.lo: ../include/net-snmp/library/container_iterator.h @@ -706,8 +929,8 @@ ./snmpstatus.lo: ../include/net-snmp/library/lcd_time.h ./snmpstatus.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpstatus.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpstatus.lo: ../include/net-snmp/library/snmptsm.h ./snmpstatus.lo: ../include/net-snmp/library/snmpusm.h +./snmpstatus.lo: ../include/net-snmp/library/snmptsm.h ./snmptable.lo: ../include/net-snmp/net-snmp-config.h ./snmptable.lo: ../include/net-snmp/net-snmp-includes.h ./snmptable.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -719,6 +942,7 @@ ./snmptable.lo: ../include/net-snmp/pdu_api.h ./snmptable.lo: ../include/net-snmp/library/asn1.h ./snmptable.lo: ../include/net-snmp/output_api.h +./snmptable.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptable.lo: ../include/net-snmp/library/snmp_debug.h ./snmptable.lo: ../include/net-snmp/library/snmp_logging.h ./snmptable.lo: ../include/net-snmp/session_api.h @@ -736,6 +960,7 @@ ./snmptable.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptable.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptable.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptable.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptable.lo: ../include/net-snmp/library/ucd_compat.h ./snmptable.lo: ../include/net-snmp/library/mib.h ./snmptable.lo: ../include/net-snmp/mib_api.h @@ -755,7 +980,6 @@ ./snmptable.lo: ../include/net-snmp/library/data_list.h ./snmptable.lo: ../include/net-snmp/library/check_varbind.h ./snmptable.lo: ../include/net-snmp/library/container.h -./snmptable.lo: ../include/net-snmp/library/factory.h ./snmptable.lo: ../include/net-snmp/library/container_binary_array.h ./snmptable.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptable.lo: ../include/net-snmp/library/container_iterator.h @@ -776,8 +1000,8 @@ ./snmptable.lo: ../include/net-snmp/library/lcd_time.h ./snmptable.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptable.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptable.lo: ../include/net-snmp/library/snmptsm.h ./snmptable.lo: ../include/net-snmp/library/snmpusm.h +./snmptable.lo: ../include/net-snmp/library/snmptsm.h ./snmptest.lo: ../include/net-snmp/net-snmp-config.h ./snmptest.lo: ../include/net-snmp/net-snmp-includes.h ./snmptest.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -789,6 +1013,7 @@ ./snmptest.lo: ../include/net-snmp/pdu_api.h ./snmptest.lo: ../include/net-snmp/library/asn1.h ./snmptest.lo: ../include/net-snmp/output_api.h +./snmptest.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptest.lo: ../include/net-snmp/library/snmp_debug.h ./snmptest.lo: ../include/net-snmp/library/snmp_logging.h ./snmptest.lo: ../include/net-snmp/session_api.h @@ -806,6 +1031,7 @@ ./snmptest.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptest.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptest.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptest.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptest.lo: ../include/net-snmp/library/ucd_compat.h ./snmptest.lo: ../include/net-snmp/library/mib.h ./snmptest.lo: ../include/net-snmp/mib_api.h @@ -825,13 +1051,13 @@ ./snmptest.lo: ../include/net-snmp/library/data_list.h ./snmptest.lo: ../include/net-snmp/library/check_varbind.h ./snmptest.lo: ../include/net-snmp/library/container.h -./snmptest.lo: ../include/net-snmp/library/factory.h ./snmptest.lo: ../include/net-snmp/library/container_binary_array.h ./snmptest.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptest.lo: ../include/net-snmp/library/container_iterator.h ./snmptest.lo: ../include/net-snmp/library/container.h ./snmptest.lo: ../include/net-snmp/library/snmp_assert.h -./snmptest.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./snmptest.lo: ../include/net-snmp/version.h +./snmptest.lo: ../include/net-snmp/config_api.h ./snmptest.lo: ../include/net-snmp/library/read_config.h ./snmptest.lo: ../include/net-snmp/library/default_store.h ./snmptest.lo: ../include/net-snmp/library/snmp_parse_args.h @@ -845,13 +1071,12 @@ ./snmptest.lo: ../include/net-snmp/library/lcd_time.h ./snmptest.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptest.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptest.lo: ../include/net-snmp/library/snmptsm.h ./snmptest.lo: ../include/net-snmp/library/snmpusm.h +./snmptest.lo: ../include/net-snmp/library/snmptsm.h ./snmptls.lo: ../include/net-snmp/net-snmp-config.h ./snmptls.lo: ../include/net-snmp/net-snmp-features.h ./snmptls.lo: ../include/net-snmp/net-snmp-includes.h -./snmptls.lo: ../include/net-snmp/definitions.h -./snmptls.lo: ../include/net-snmp/types.h +./snmptls.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h ./snmptls.lo: ../include/net-snmp/library/oid.h ./snmptls.lo: ../include/net-snmp/library/types.h ./snmptls.lo: ../include/net-snmp/library/snmp_api.h @@ -860,6 +1085,7 @@ ./snmptls.lo: ../include/net-snmp/pdu_api.h ./snmptls.lo: ../include/net-snmp/library/asn1.h ./snmptls.lo: ../include/net-snmp/output_api.h +./snmptls.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptls.lo: ../include/net-snmp/library/snmp_debug.h ./snmptls.lo: ../include/net-snmp/library/snmp_logging.h ./snmptls.lo: ../include/net-snmp/session_api.h @@ -877,6 +1103,7 @@ ./snmptls.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptls.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptls.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptls.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptls.lo: ../include/net-snmp/library/ucd_compat.h ./snmptls.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmptls.lo: ../include/net-snmp/library/parse.h @@ -894,7 +1121,6 @@ ./snmptls.lo: ../include/net-snmp/library/data_list.h ./snmptls.lo: ../include/net-snmp/library/check_varbind.h ./snmptls.lo: ../include/net-snmp/library/container.h -./snmptls.lo: ../include/net-snmp/library/factory.h ./snmptls.lo: ../include/net-snmp/library/container_binary_array.h ./snmptls.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptls.lo: ../include/net-snmp/library/container_iterator.h @@ -914,8 +1140,8 @@ ./snmptls.lo: ../include/net-snmp/library/lcd_time.h ./snmptls.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptls.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptls.lo: ../include/net-snmp/library/snmptsm.h ./snmptls.lo: ../include/net-snmp/library/snmpusm.h +./snmptls.lo: ../include/net-snmp/library/snmptsm.h ./snmptls.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./snmptls.lo: ../include/net-snmp/agent/mib_module_config.h ./snmptls.lo: ../include/net-snmp/agent/agent_module_config.h @@ -970,6 +1196,7 @@ ./snmptranslate.lo: ../include/net-snmp/pdu_api.h ./snmptranslate.lo: ../include/net-snmp/library/asn1.h ./snmptranslate.lo: ../include/net-snmp/output_api.h +./snmptranslate.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptranslate.lo: ../include/net-snmp/library/snmp_debug.h ./snmptranslate.lo: ../include/net-snmp/library/snmp_logging.h ./snmptranslate.lo: ../include/net-snmp/session_api.h @@ -987,6 +1214,7 @@ ./snmptranslate.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptranslate.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptranslate.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptranslate.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptranslate.lo: ../include/net-snmp/library/ucd_compat.h ./snmptranslate.lo: ../include/net-snmp/library/mib.h ./snmptranslate.lo: ../include/net-snmp/mib_api.h @@ -1004,7 +1232,6 @@ ./snmptranslate.lo: ../include/net-snmp/library/data_list.h ./snmptranslate.lo: ../include/net-snmp/library/check_varbind.h ./snmptranslate.lo: ../include/net-snmp/library/container.h -./snmptranslate.lo: ../include/net-snmp/library/factory.h ./snmptranslate.lo: ../include/net-snmp/library/container_binary_array.h ./snmptranslate.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptranslate.lo: ../include/net-snmp/library/container_iterator.h @@ -1019,8 +1246,7 @@ ./snmptranslate.lo: ../include/net-snmp/library/vacm.h ./snmptrap.lo: ../include/net-snmp/net-snmp-config.h ./snmptrap.lo: ../include/net-snmp/net-snmp-includes.h -./snmptrap.lo: ../include/net-snmp/definitions.h -./snmptrap.lo: ../include/net-snmp/types.h +./snmptrap.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h ./snmptrap.lo: ../include/net-snmp/library/oid.h ./snmptrap.lo: ../include/net-snmp/library/types.h ./snmptrap.lo: ../include/net-snmp/library/snmp_api.h @@ -1029,6 +1255,7 @@ ./snmptrap.lo: ../include/net-snmp/pdu_api.h ./snmptrap.lo: ../include/net-snmp/library/asn1.h ./snmptrap.lo: ../include/net-snmp/output_api.h +./snmptrap.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptrap.lo: ../include/net-snmp/library/snmp_debug.h ./snmptrap.lo: ../include/net-snmp/library/snmp_logging.h ./snmptrap.lo: ../include/net-snmp/session_api.h @@ -1046,6 +1273,7 @@ ./snmptrap.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptrap.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptrap.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptrap.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptrap.lo: ../include/net-snmp/library/ucd_compat.h ./snmptrap.lo: ../include/net-snmp/library/mib.h ./snmptrap.lo: ../include/net-snmp/mib_api.h @@ -1065,13 +1293,13 @@ ./snmptrap.lo: ../include/net-snmp/library/data_list.h ./snmptrap.lo: ../include/net-snmp/library/check_varbind.h ./snmptrap.lo: ../include/net-snmp/library/container.h -./snmptrap.lo: ../include/net-snmp/library/factory.h ./snmptrap.lo: ../include/net-snmp/library/container_binary_array.h ./snmptrap.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptrap.lo: ../include/net-snmp/library/container_iterator.h ./snmptrap.lo: ../include/net-snmp/library/container.h ./snmptrap.lo: ../include/net-snmp/library/snmp_assert.h -./snmptrap.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./snmptrap.lo: ../include/net-snmp/version.h +./snmptrap.lo: ../include/net-snmp/config_api.h ./snmptrap.lo: ../include/net-snmp/library/read_config.h ./snmptrap.lo: ../include/net-snmp/library/default_store.h ./snmptrap.lo: ../include/net-snmp/library/snmp_parse_args.h @@ -1085,84 +1313,8 @@ ./snmptrap.lo: ../include/net-snmp/library/lcd_time.h ./snmptrap.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptrap.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptrap.lo: ../include/net-snmp/library/snmptsm.h ./snmptrap.lo: ../include/net-snmp/library/snmpusm.h -./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-config.h -./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-includes.h -./snmptrapd_auth.lo: ../include/net-snmp/definitions.h -./snmptrapd_auth.lo: ../include/net-snmp/types.h -./snmptrapd_auth.lo: ../include/net-snmp/library/oid.h -./snmptrapd_auth.lo: ../include/net-snmp/library/types.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_api.h -./snmptrapd_auth.lo: ../include/net-snmp/varbind_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_client.h -./snmptrapd_auth.lo: ../include/net-snmp/pdu_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/asn1.h -./snmptrapd_auth.lo: ../include/net-snmp/output_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_debug.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_logging.h -./snmptrapd_auth.lo: ../include/net-snmp/session_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/callback.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_transport.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_service.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUnixDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpTCPDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPXDomain.h -./snmptrapd_auth.lo: ../include/net-snmp/library/ucd_compat.h -./snmptrapd_auth.lo: ../include/net-snmp/library/mib.h -./snmptrapd_auth.lo: ../include/net-snmp/mib_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/parse.h -./snmptrapd_auth.lo: ../include/net-snmp/library/oid_stash.h -./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-features.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_impl.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp-tc.h -./snmptrapd_auth.lo: ../include/net-snmp/library/getopt.h -./snmptrapd_auth.lo: ../include/net-snmp/utilities.h -./snmptrapd_auth.lo: ../include/net-snmp/library/system.h -./snmptrapd_auth.lo: ../include/net-snmp/library/tools.h -./snmptrapd_auth.lo: ../include/net-snmp/library/int64.h -./snmptrapd_auth.lo: ../include/net-snmp/library/mt_support.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_alarm.h -./snmptrapd_auth.lo: ../include/net-snmp/library/data_list.h -./snmptrapd_auth.lo: ../include/net-snmp/library/check_varbind.h -./snmptrapd_auth.lo: ../include/net-snmp/library/container.h -./snmptrapd_auth.lo: ../include/net-snmp/library/factory.h -./snmptrapd_auth.lo: ../include/net-snmp/library/container_binary_array.h -./snmptrapd_auth.lo: ../include/net-snmp/library/container_list_ssll.h -./snmptrapd_auth.lo: ../include/net-snmp/library/container_iterator.h -./snmptrapd_auth.lo: ../include/net-snmp/library/container.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_assert.h -./snmptrapd_auth.lo: ../include/net-snmp/version.h -./snmptrapd_auth.lo: ../include/net-snmp/config_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/read_config.h -./snmptrapd_auth.lo: ../include/net-snmp/library/default_store.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_parse_args.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_enum.h -./snmptrapd_auth.lo: ../include/net-snmp/library/vacm.h -./snmptrapd_auth.lo: ../include/net-snmp/snmpv3_api.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpv3.h -./snmptrapd_auth.lo: ../include/net-snmp/library/transform_oids.h -./snmptrapd_auth.lo: ../include/net-snmp/library/keytools.h -./snmptrapd_auth.lo: ../include/net-snmp/library/scapi.h -./snmptrapd_auth.lo: ../include/net-snmp/library/lcd_time.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_secmod.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmptsm.h -./snmptrapd_auth.lo: ../include/net-snmp/library/snmpusm.h -./snmptrapd_auth.lo: snmptrapd_handlers.h snmptrapd_auth.h snmptrapd_ds.h -./snmptrapd_auth.lo: ../include/net-snmp/agent/agent_module_config.h -./snmptrapd_auth.lo: ../include/net-snmp/agent/mib_module_config.h -./snmptrapd_auth.lo: ../agent/mibgroup/mibII/vacm_conf.h -./snmptrapd_auth.lo: ../include/net-snmp/agent/agent_trap.h +./snmptrap.lo: ../include/net-snmp/library/snmptsm.h ./snmptrapd.lo: ../include/net-snmp/net-snmp-config.h ./snmptrapd.lo: ../include/net-snmp/net-snmp-includes.h ./snmptrapd.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -1174,6 +1326,7 @@ ./snmptrapd.lo: ../include/net-snmp/pdu_api.h ./snmptrapd.lo: ../include/net-snmp/library/asn1.h ./snmptrapd.lo: ../include/net-snmp/output_api.h +./snmptrapd.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptrapd.lo: ../include/net-snmp/library/snmp_debug.h ./snmptrapd.lo: ../include/net-snmp/library/snmp_logging.h ./snmptrapd.lo: ../include/net-snmp/session_api.h @@ -1191,6 +1344,7 @@ ./snmptrapd.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptrapd.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptrapd.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptrapd.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptrapd.lo: ../include/net-snmp/library/ucd_compat.h ./snmptrapd.lo: ../include/net-snmp/library/mib.h ./snmptrapd.lo: ../include/net-snmp/mib_api.h @@ -1210,7 +1364,6 @@ ./snmptrapd.lo: ../include/net-snmp/library/data_list.h ./snmptrapd.lo: ../include/net-snmp/library/check_varbind.h ./snmptrapd.lo: ../include/net-snmp/library/container.h -./snmptrapd.lo: ../include/net-snmp/library/factory.h ./snmptrapd.lo: ../include/net-snmp/library/container_binary_array.h ./snmptrapd.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptrapd.lo: ../include/net-snmp/library/container_iterator.h @@ -1231,8 +1384,8 @@ ./snmptrapd.lo: ../include/net-snmp/library/lcd_time.h ./snmptrapd.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptrapd.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptrapd.lo: ../include/net-snmp/library/snmptsm.h ./snmptrapd.lo: ../include/net-snmp/library/snmpusm.h +./snmptrapd.lo: ../include/net-snmp/library/snmptsm.h ./snmptrapd.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./snmptrapd.lo: ../include/net-snmp/agent/mib_module_config.h ./snmptrapd.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1270,11 +1423,95 @@ ./snmptrapd.lo: ../include/net-snmp/agent/table_array.h ./snmptrapd.lo: ../include/net-snmp/agent/mfd.h ./snmptrapd.lo: ../include/net-snmp/agent/snmp_get_statistic.h -./snmptrapd.lo: snmptrapd_handlers.h snmptrapd_log.h snmptrapd_ds.h -./snmptrapd.lo: snmptrapd_auth.h +./snmptrapd.lo: ../include/net-snmp/agent/netsnmp_close_fds.h +./snmptrapd.lo: ../snmplib/snmp_syslog.h ../agent/agent_global_vars.h +./snmptrapd.lo: ../agent/mibgroup/snmpv3/snmpEngine.h +./snmptrapd.lo: ../agent/mibgroup/snmpv3/usmUser.h +./snmptrapd.lo: ../agent/mibgroup/agent/nsVacmAccessTable.h +./snmptrapd.lo: ../agent/mibgroup/agentx/subagent.h snmptrapd_handlers.h +./snmptrapd.lo: snmptrapd_log.h snmptrapd_ds.h snmptrapd_auth.h +./snmptrapd.lo: snmptrapd_sql.h ./snmptrapd.lo: ../agent/mibgroup/notification-log-mib/notification_log.h ./snmptrapd.lo: ../agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h ./snmptrapd.lo: ../agent/mibgroup/mibII/vacm_conf.h +./snmptrapd.lo: ../include/net-snmp/library/sd-daemon.h +./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-config.h +./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-includes.h +./snmptrapd_auth.lo: ../include/net-snmp/definitions.h +./snmptrapd_auth.lo: ../include/net-snmp/types.h +./snmptrapd_auth.lo: ../include/net-snmp/library/oid.h +./snmptrapd_auth.lo: ../include/net-snmp/library/types.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_api.h +./snmptrapd_auth.lo: ../include/net-snmp/varbind_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_client.h +./snmptrapd_auth.lo: ../include/net-snmp/pdu_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/asn1.h +./snmptrapd_auth.lo: ../include/net-snmp/output_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_debug.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_logging.h +./snmptrapd_auth.lo: ../include/net-snmp/session_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/callback.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_transport.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_service.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmptrapd_auth.lo: ../include/net-snmp/library/ucd_compat.h +./snmptrapd_auth.lo: ../include/net-snmp/library/mib.h +./snmptrapd_auth.lo: ../include/net-snmp/mib_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/parse.h +./snmptrapd_auth.lo: ../include/net-snmp/library/oid_stash.h +./snmptrapd_auth.lo: ../include/net-snmp/net-snmp-features.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_impl.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp-tc.h +./snmptrapd_auth.lo: ../include/net-snmp/library/getopt.h +./snmptrapd_auth.lo: ../include/net-snmp/utilities.h +./snmptrapd_auth.lo: ../include/net-snmp/library/system.h +./snmptrapd_auth.lo: ../include/net-snmp/library/tools.h +./snmptrapd_auth.lo: ../include/net-snmp/library/int64.h +./snmptrapd_auth.lo: ../include/net-snmp/library/mt_support.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_alarm.h +./snmptrapd_auth.lo: ../include/net-snmp/library/data_list.h +./snmptrapd_auth.lo: ../include/net-snmp/library/check_varbind.h +./snmptrapd_auth.lo: ../include/net-snmp/library/container.h +./snmptrapd_auth.lo: ../include/net-snmp/library/container_binary_array.h +./snmptrapd_auth.lo: ../include/net-snmp/library/container_list_ssll.h +./snmptrapd_auth.lo: ../include/net-snmp/library/container_iterator.h +./snmptrapd_auth.lo: ../include/net-snmp/library/container.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_assert.h +./snmptrapd_auth.lo: ../include/net-snmp/version.h +./snmptrapd_auth.lo: ../include/net-snmp/config_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/read_config.h +./snmptrapd_auth.lo: ../include/net-snmp/library/default_store.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_enum.h +./snmptrapd_auth.lo: ../include/net-snmp/library/vacm.h +./snmptrapd_auth.lo: ../include/net-snmp/snmpv3_api.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpv3.h +./snmptrapd_auth.lo: ../include/net-snmp/library/transform_oids.h +./snmptrapd_auth.lo: ../include/net-snmp/library/keytools.h +./snmptrapd_auth.lo: ../include/net-snmp/library/scapi.h +./snmptrapd_auth.lo: ../include/net-snmp/library/lcd_time.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmp_secmod.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmpusm.h +./snmptrapd_auth.lo: ../include/net-snmp/library/snmptsm.h +./snmptrapd_auth.lo: snmptrapd_handlers.h snmptrapd_auth.h snmptrapd_ds.h +./snmptrapd_auth.lo: ../include/net-snmp/agent/agent_module_config.h +./snmptrapd_auth.lo: ../include/net-snmp/agent/mib_module_config.h +./snmptrapd_auth.lo: ../agent/mibgroup/mibII/vacm_conf.h +./snmptrapd_auth.lo: ../include/net-snmp/agent/agent_trap.h ./snmptrapd_handlers.lo: ../include/net-snmp/net-snmp-config.h ./snmptrapd_handlers.lo: ../include/net-snmp/net-snmp-features.h ./snmptrapd_handlers.lo: ../include/net-snmp/config_api.h @@ -1288,6 +1525,7 @@ ./snmptrapd_handlers.lo: ../include/net-snmp/pdu_api.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/asn1.h ./snmptrapd_handlers.lo: ../include/net-snmp/output_api.h +./snmptrapd_handlers.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmp_debug.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmp_logging.h ./snmptrapd_handlers.lo: ../include/net-snmp/session_api.h @@ -1305,6 +1543,7 @@ ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/ucd_compat.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/mib.h ./snmptrapd_handlers.lo: ../include/net-snmp/mib_api.h @@ -1327,7 +1566,6 @@ ./snmptrapd_handlers.lo: ../include/net-snmp/library/data_list.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/check_varbind.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/container.h -./snmptrapd_handlers.lo: ../include/net-snmp/library/factory.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/container_binary_array.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/container_iterator.h @@ -1344,8 +1582,8 @@ ./snmptrapd_handlers.lo: ../include/net-snmp/library/lcd_time.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptrapd_handlers.lo: ../include/net-snmp/library/snmptsm.h ./snmptrapd_handlers.lo: ../include/net-snmp/library/snmpusm.h +./snmptrapd_handlers.lo: ../include/net-snmp/library/snmptsm.h ./snmptrapd_handlers.lo: ../include/net-snmp/agent/net-snmp-agent-includes.h ./snmptrapd_handlers.lo: ../include/net-snmp/agent/mib_module_config.h ./snmptrapd_handlers.lo: ../include/net-snmp/agent/agent_module_config.h @@ -1399,6 +1637,7 @@ ./snmptrapd_log.lo: ../include/net-snmp/pdu_api.h ./snmptrapd_log.lo: ../include/net-snmp/library/asn1.h ./snmptrapd_log.lo: ../include/net-snmp/output_api.h +./snmptrapd_log.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmp_debug.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmp_logging.h ./snmptrapd_log.lo: ../include/net-snmp/session_api.h @@ -1416,6 +1655,7 @@ ./snmptrapd_log.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptrapd_log.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptrapd_log.lo: ../include/net-snmp/library/ucd_compat.h ./snmptrapd_log.lo: ../include/net-snmp/library/mib.h ./snmptrapd_log.lo: ../include/net-snmp/mib_api.h @@ -1435,7 +1675,6 @@ ./snmptrapd_log.lo: ../include/net-snmp/library/data_list.h ./snmptrapd_log.lo: ../include/net-snmp/library/check_varbind.h ./snmptrapd_log.lo: ../include/net-snmp/library/container.h -./snmptrapd_log.lo: ../include/net-snmp/library/factory.h ./snmptrapd_log.lo: ../include/net-snmp/library/container_binary_array.h ./snmptrapd_log.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptrapd_log.lo: ../include/net-snmp/library/container_iterator.h @@ -1456,9 +1695,9 @@ ./snmptrapd_log.lo: ../include/net-snmp/library/lcd_time.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmptrapd_log.lo: ../include/net-snmp/library/snmpusm.h ./snmptrapd_log.lo: ../include/net-snmp/library/snmptsm.h -./snmptrapd_log.lo: ../include/net-snmp/library/snmpusm.h snmptrapd_log.h -./snmptrapd_log.lo: snmptrapd_ds.h +./snmptrapd_log.lo: snmptrapd_handlers.h snmptrapd_log.h snmptrapd_ds.h ./snmptrapd_sql.lo: ../include/net-snmp/net-snmp-config.h ./snmptrapd_sql.lo: ../include/net-snmp/net-snmp-features.h ./snmpusm.lo: ../include/net-snmp/net-snmp-config.h @@ -1472,6 +1711,7 @@ ./snmpusm.lo: ../include/net-snmp/pdu_api.h ./snmpusm.lo: ../include/net-snmp/library/asn1.h ./snmpusm.lo: ../include/net-snmp/output_api.h +./snmpusm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpusm.lo: ../include/net-snmp/library/snmp_debug.h ./snmpusm.lo: ../include/net-snmp/library/snmp_logging.h ./snmpusm.lo: ../include/net-snmp/session_api.h @@ -1489,6 +1729,7 @@ ./snmpusm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpusm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpusm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpusm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpusm.lo: ../include/net-snmp/library/ucd_compat.h ./snmpusm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmpusm.lo: ../include/net-snmp/library/parse.h @@ -1507,7 +1748,6 @@ ./snmpusm.lo: ../include/net-snmp/library/data_list.h ./snmpusm.lo: ../include/net-snmp/library/check_varbind.h ./snmpusm.lo: ../include/net-snmp/library/container.h -./snmpusm.lo: ../include/net-snmp/library/factory.h ./snmpusm.lo: ../include/net-snmp/library/container_binary_array.h ./snmpusm.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpusm.lo: ../include/net-snmp/library/container_iterator.h @@ -1527,8 +1767,9 @@ ./snmpusm.lo: ../include/net-snmp/library/lcd_time.h ./snmpusm.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpusm.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpusm.lo: ../include/net-snmp/library/snmptsm.h ./snmpusm.lo: ../include/net-snmp/library/snmpusm.h +./snmpusm.lo: ../include/net-snmp/library/snmptsm.h +./snmpusm.lo: ../include/net-snmp/library/snmp_openssl.h ./snmpvacm.lo: ../include/net-snmp/net-snmp-config.h ./snmpvacm.lo: ../include/net-snmp/net-snmp-includes.h ./snmpvacm.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h @@ -1540,6 +1781,7 @@ ./snmpvacm.lo: ../include/net-snmp/pdu_api.h ./snmpvacm.lo: ../include/net-snmp/library/asn1.h ./snmpvacm.lo: ../include/net-snmp/output_api.h +./snmpvacm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpvacm.lo: ../include/net-snmp/library/snmp_debug.h ./snmpvacm.lo: ../include/net-snmp/library/snmp_logging.h ./snmpvacm.lo: ../include/net-snmp/session_api.h @@ -1557,6 +1799,7 @@ ./snmpvacm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpvacm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpvacm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpvacm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpvacm.lo: ../include/net-snmp/library/ucd_compat.h ./snmpvacm.lo: ../include/net-snmp/library/mib.h ./snmpvacm.lo: ../include/net-snmp/mib_api.h @@ -1576,13 +1819,13 @@ ./snmpvacm.lo: ../include/net-snmp/library/data_list.h ./snmpvacm.lo: ../include/net-snmp/library/check_varbind.h ./snmpvacm.lo: ../include/net-snmp/library/container.h -./snmpvacm.lo: ../include/net-snmp/library/factory.h ./snmpvacm.lo: ../include/net-snmp/library/container_binary_array.h ./snmpvacm.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpvacm.lo: ../include/net-snmp/library/container_iterator.h ./snmpvacm.lo: ../include/net-snmp/library/container.h ./snmpvacm.lo: ../include/net-snmp/library/snmp_assert.h -./snmpvacm.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./snmpvacm.lo: ../include/net-snmp/version.h +./snmpvacm.lo: ../include/net-snmp/config_api.h ./snmpvacm.lo: ../include/net-snmp/library/read_config.h ./snmpvacm.lo: ../include/net-snmp/library/default_store.h ./snmpvacm.lo: ../include/net-snmp/library/snmp_parse_args.h @@ -1596,12 +1839,11 @@ ./snmpvacm.lo: ../include/net-snmp/library/lcd_time.h ./snmpvacm.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpvacm.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpvacm.lo: ../include/net-snmp/library/snmptsm.h ./snmpvacm.lo: ../include/net-snmp/library/snmpusm.h +./snmpvacm.lo: ../include/net-snmp/library/snmptsm.h ./snmpwalk.lo: ../include/net-snmp/net-snmp-config.h ./snmpwalk.lo: ../include/net-snmp/net-snmp-includes.h -./snmpwalk.lo: ../include/net-snmp/definitions.h -./snmpwalk.lo: ../include/net-snmp/types.h +./snmpwalk.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h ./snmpwalk.lo: ../include/net-snmp/library/oid.h ./snmpwalk.lo: ../include/net-snmp/library/types.h ./snmpwalk.lo: ../include/net-snmp/library/snmp_api.h @@ -1610,6 +1852,7 @@ ./snmpwalk.lo: ../include/net-snmp/pdu_api.h ./snmpwalk.lo: ../include/net-snmp/library/asn1.h ./snmpwalk.lo: ../include/net-snmp/output_api.h +./snmpwalk.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpwalk.lo: ../include/net-snmp/library/snmp_debug.h ./snmpwalk.lo: ../include/net-snmp/library/snmp_logging.h ./snmpwalk.lo: ../include/net-snmp/session_api.h @@ -1627,6 +1870,7 @@ ./snmpwalk.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpwalk.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpwalk.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpwalk.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpwalk.lo: ../include/net-snmp/library/ucd_compat.h ./snmpwalk.lo: ../include/net-snmp/library/mib.h ./snmpwalk.lo: ../include/net-snmp/mib_api.h @@ -1646,13 +1890,13 @@ ./snmpwalk.lo: ../include/net-snmp/library/data_list.h ./snmpwalk.lo: ../include/net-snmp/library/check_varbind.h ./snmpwalk.lo: ../include/net-snmp/library/container.h -./snmpwalk.lo: ../include/net-snmp/library/factory.h ./snmpwalk.lo: ../include/net-snmp/library/container_binary_array.h ./snmpwalk.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpwalk.lo: ../include/net-snmp/library/container_iterator.h ./snmpwalk.lo: ../include/net-snmp/library/container.h ./snmpwalk.lo: ../include/net-snmp/library/snmp_assert.h -./snmpwalk.lo: ../include/net-snmp/version.h ../include/net-snmp/config_api.h +./snmpwalk.lo: ../include/net-snmp/version.h +./snmpwalk.lo: ../include/net-snmp/config_api.h ./snmpwalk.lo: ../include/net-snmp/library/read_config.h ./snmpwalk.lo: ../include/net-snmp/library/default_store.h ./snmpwalk.lo: ../include/net-snmp/library/snmp_parse_args.h @@ -1666,9 +1910,10 @@ ./snmpwalk.lo: ../include/net-snmp/library/lcd_time.h ./snmpwalk.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpwalk.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpwalk.lo: ../include/net-snmp/library/snmptsm.h ./snmpwalk.lo: ../include/net-snmp/library/snmpusm.h +./snmpwalk.lo: ../include/net-snmp/library/snmptsm.h ./sshtosnmp.lo: ../include/net-snmp/net-snmp-config.h +./snmpnetstat/ffs.lo: ./snmpnetstat/ffs.h ./snmpnetstat/if.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/if.lo: ../include/net-snmp/net-snmp-includes.h ./snmpnetstat/if.lo: ../include/net-snmp/definitions.h @@ -1681,6 +1926,7 @@ ./snmpnetstat/if.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/if.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/if.lo: ../include/net-snmp/output_api.h +./snmpnetstat/if.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/if.lo: ../include/net-snmp/session_api.h @@ -1698,6 +1944,7 @@ ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/if.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/if.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/if.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/if.lo: ../include/net-snmp/mib_api.h @@ -1717,7 +1964,6 @@ ./snmpnetstat/if.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/if.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/if.lo: ../include/net-snmp/library/container.h -./snmpnetstat/if.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/if.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/if.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/if.lo: ../include/net-snmp/library/container_iterator.h @@ -1738,82 +1984,10 @@ ./snmpnetstat/if.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/if.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/if.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/if.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/if.lo: ./snmpnetstat/main.h ./snmpnetstat/if.lo: ./snmpnetstat/netstat.h -./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-config.h -./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-includes.h -./snmpnetstat/inet6.lo: ../include/net-snmp/definitions.h -./snmpnetstat/inet6.lo: ../include/net-snmp/types.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/oid.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/types.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/varbind_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_client.h -./snmpnetstat/inet6.lo: ../include/net-snmp/pdu_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/asn1.h -./snmpnetstat/inet6.lo: ../include/net-snmp/output_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_debug.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_logging.h -./snmpnetstat/inet6.lo: ../include/net-snmp/session_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/callback.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_transport.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_service.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUnixDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpTCPDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPXDomain.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/ucd_compat.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/mib.h -./snmpnetstat/inet6.lo: ../include/net-snmp/mib_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/parse.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/oid_stash.h -./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-features.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_impl.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp-tc.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/getopt.h -./snmpnetstat/inet6.lo: ../include/net-snmp/utilities.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/system.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/tools.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/int64.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/mt_support.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_alarm.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/data_list.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/check_varbind.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/container.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/factory.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/container_binary_array.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/container_list_ssll.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/container_iterator.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/container.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_assert.h -./snmpnetstat/inet6.lo: ../include/net-snmp/version.h -./snmpnetstat/inet6.lo: ../include/net-snmp/config_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/read_config.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/default_store.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_parse_args.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_enum.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/vacm.h -./snmpnetstat/inet6.lo: ../include/net-snmp/snmpv3_api.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpv3.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/transform_oids.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/keytools.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/scapi.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/lcd_time.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_secmod.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmptsm.h -./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpusm.h -./snmpnetstat/inet6.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h ./snmpnetstat/inet.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/inet.lo: ../include/net-snmp/net-snmp-includes.h ./snmpnetstat/inet.lo: ../include/net-snmp/definitions.h @@ -1826,6 +2000,7 @@ ./snmpnetstat/inet.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/inet.lo: ../include/net-snmp/output_api.h +./snmpnetstat/inet.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/inet.lo: ../include/net-snmp/session_api.h @@ -1843,6 +2018,7 @@ ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/inet.lo: ../include/net-snmp/mib_api.h @@ -1862,7 +2038,6 @@ ./snmpnetstat/inet.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/container.h -./snmpnetstat/inet.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/container_iterator.h @@ -1883,9 +2058,82 @@ ./snmpnetstat/inet.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/inet.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/inet.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/inet.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/inet.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h +./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-config.h +./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-includes.h +./snmpnetstat/inet6.lo: ../include/net-snmp/definitions.h +./snmpnetstat/inet6.lo: ../include/net-snmp/types.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/oid.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/types.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/varbind_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_client.h +./snmpnetstat/inet6.lo: ../include/net-snmp/pdu_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/asn1.h +./snmpnetstat/inet6.lo: ../include/net-snmp/output_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_debug.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_logging.h +./snmpnetstat/inet6.lo: ../include/net-snmp/session_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/callback.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_transport.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_service.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/ucd_compat.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/mib.h +./snmpnetstat/inet6.lo: ../include/net-snmp/mib_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/parse.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/oid_stash.h +./snmpnetstat/inet6.lo: ../include/net-snmp/net-snmp-features.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_impl.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp-tc.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/getopt.h +./snmpnetstat/inet6.lo: ../include/net-snmp/utilities.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/system.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/tools.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/int64.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/mt_support.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_alarm.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/data_list.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/check_varbind.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/container.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/container_binary_array.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/container_list_ssll.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/container_iterator.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/container.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_assert.h +./snmpnetstat/inet6.lo: ../include/net-snmp/version.h +./snmpnetstat/inet6.lo: ../include/net-snmp/config_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/read_config.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/default_store.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_enum.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/vacm.h +./snmpnetstat/inet6.lo: ../include/net-snmp/snmpv3_api.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpv3.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/transform_oids.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/keytools.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/scapi.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/lcd_time.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmp_secmod.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/inet6.lo: ../include/net-snmp/library/snmptsm.h +./snmpnetstat/inet6.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h ./snmpnetstat/inetx.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/inetx.lo: ../include/net-snmp/net-snmp-includes.h ./snmpnetstat/inetx.lo: ../include/net-snmp/definitions.h @@ -1898,6 +2146,7 @@ ./snmpnetstat/inetx.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/inetx.lo: ../include/net-snmp/output_api.h +./snmpnetstat/inetx.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/inetx.lo: ../include/net-snmp/session_api.h @@ -1915,6 +2164,7 @@ ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/inetx.lo: ../include/net-snmp/mib_api.h @@ -1934,7 +2184,6 @@ ./snmpnetstat/inetx.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/container.h -./snmpnetstat/inetx.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/container_iterator.h @@ -1955,8 +2204,8 @@ ./snmpnetstat/inetx.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/inetx.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/inetx.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h ./snmpnetstat/main.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/main.lo: ../include/net-snmp/net-snmp-includes.h @@ -1970,6 +2219,7 @@ ./snmpnetstat/main.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/main.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/main.lo: ../include/net-snmp/output_api.h +./snmpnetstat/main.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/main.lo: ../include/net-snmp/session_api.h @@ -1987,6 +2237,7 @@ ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/main.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/main.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/main.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/main.lo: ../include/net-snmp/mib_api.h @@ -2006,7 +2257,6 @@ ./snmpnetstat/main.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/main.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/main.lo: ../include/net-snmp/library/container.h -./snmpnetstat/main.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/main.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/main.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/main.lo: ../include/net-snmp/library/container_iterator.h @@ -2027,8 +2277,8 @@ ./snmpnetstat/main.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/main.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/main.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/main.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/main.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h ./snmpnetstat/route.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/route.lo: ../include/net-snmp/net-snmp-includes.h @@ -2042,6 +2292,7 @@ ./snmpnetstat/route.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/route.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/route.lo: ../include/net-snmp/output_api.h +./snmpnetstat/route.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/route.lo: ../include/net-snmp/session_api.h @@ -2059,6 +2310,7 @@ ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/route.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/route.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/route.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/route.lo: ../include/net-snmp/mib_api.h @@ -2078,7 +2330,6 @@ ./snmpnetstat/route.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/route.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/route.lo: ../include/net-snmp/library/container.h -./snmpnetstat/route.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/route.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/route.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/route.lo: ../include/net-snmp/library/container_iterator.h @@ -2099,9 +2350,10 @@ ./snmpnetstat/route.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/route.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/route.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/route.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/route.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h +./snmpnetstat/route.lo: ./snmpnetstat/ffs.h ./snmpnetstat/routex.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/routex.lo: ../include/net-snmp/net-snmp-includes.h ./snmpnetstat/routex.lo: ../include/net-snmp/definitions.h @@ -2114,6 +2366,7 @@ ./snmpnetstat/routex.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/routex.lo: ../include/net-snmp/output_api.h +./snmpnetstat/routex.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/routex.lo: ../include/net-snmp/session_api.h @@ -2131,6 +2384,7 @@ ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/routex.lo: ../include/net-snmp/mib_api.h @@ -2150,7 +2404,6 @@ ./snmpnetstat/routex.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/container.h -./snmpnetstat/routex.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/container_iterator.h @@ -2171,8 +2424,8 @@ ./snmpnetstat/routex.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/routex.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/routex.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/routex.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/routex.lo: ./snmpnetstat/main.h ./snmpnetstat/netstat.h ./snmpnetstat/winstub.lo: ../include/net-snmp/net-snmp-config.h ./snmpnetstat/winstub.lo: ../include/net-snmp/net-snmp-includes.h @@ -2186,6 +2439,7 @@ ./snmpnetstat/winstub.lo: ../include/net-snmp/pdu_api.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/asn1.h ./snmpnetstat/winstub.lo: ../include/net-snmp/output_api.h +./snmpnetstat/winstub.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmp_debug.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmp_logging.h ./snmpnetstat/winstub.lo: ../include/net-snmp/session_api.h @@ -2203,6 +2457,7 @@ ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/ucd_compat.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/mib.h ./snmpnetstat/winstub.lo: ../include/net-snmp/mib_api.h @@ -2222,7 +2477,6 @@ ./snmpnetstat/winstub.lo: ../include/net-snmp/library/data_list.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/check_varbind.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/container.h -./snmpnetstat/winstub.lo: ../include/net-snmp/library/factory.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/container_binary_array.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/container_iterator.h @@ -2243,5 +2497,5 @@ ./snmpnetstat/winstub.lo: ../include/net-snmp/library/lcd_time.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmptsm.h ./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmpusm.h +./snmpnetstat/winstub.lo: ../include/net-snmp/library/snmptsm.h diff --git a/apps/Makefile.in b/apps/Makefile.in index 77404dd..57b8524 100644 --- a/apps/Makefile.in +++ b/apps/Makefile.in @@ -3,7 +3,6 @@ # snmptrapd, snmptable, snmpset, snmpgetnext, and other utilities. # -top_builddir=.. mysubdir=apps # use GNU vpath, if available, to only set a path for source and headers @@ -42,6 +41,14 @@ mysubdir=apps @NETSNMP_BUILD_SET_PROG_FALSE@SNMPVACMINSTALLBINPROG = @NETSNMP_BUILD_SET_PROG_TRUE@SNMPVACMFEATUREPROG = snmpvacm.ft @NETSNMP_BUILD_SET_PROG_FALSE@SNMPVACMFEATUREPROG = +@NETSNMP_BUILD_SET_PROG_TRUE@SNMPPINGINSTALLBINPROG = snmpping$(EXEEXT) +@NETSNMP_BUILD_SET_PROG_FALSE@SNMPPINGINSTALLBINPROG = +@NETSNMP_BUILD_SET_PROG_TRUE@SNMPPINGFEATUREPROG = snmpping.ft +@NETSNMP_BUILD_SET_PROG_FALSE@SNMPPINGFEATUREPROG = +@NETSNMP_BUILD_PCAP_PROG_TRUE@SNMPPCAPINSTALLBINPROG = snmppcap$(EXEEXT) +@NETSNMP_BUILD_PCAP_PROG_FALSE@SNMPPCAPINSTALLBINPROG = +@NETSNMP_BUILD_PCAP_PROG_TRUE@SNMPPCAPFEATUREPROG = snmppcap.ft +@NETSNMP_BUILD_PCAP_PROG_FALSE@SNMPPCAPFEATUREPROG = @NETSNMP_HAVE_AGENTX_LIBS_TRUE@AGENTXTRAP = agentxtrap$(EXEEXT) @NETSNMP_HAVE_AGENTX_LIBS_FALSE@AGENTXTRAP = @@ -59,10 +66,13 @@ INSTALLBINPROGS = snmpget$(EXEEXT) \ snmpdelta$(EXEEXT) \ snmptest$(EXEEXT) \ snmpdf$(EXEEXT) \ + snmpps$(EXEEXT) \ + $(SNMPPINGINSTALLBINPROG) \ $(AGENTXTRAP) \ $(SNMPVACMINSTALLBINPROG) \ $(SSHINSTALLBINPROG) $(TLSINSTALLBINPROG) \ - $(USMINSTALLBINPROG) $(EKCSTALLBINPROG) + $(USMINSTALLBINPROG) $(EKCSTALLBINPROG) \ + $(SNMPPCAPINSTALLBINPROG) INSTALLSBINPROGS = snmptrapd$(EXEEXT) @@ -126,18 +136,26 @@ FTOBJS=$(LIBTRAPD_FTS) \ snmptrap.ft \ $(SNMPSETFEATUREPROG) \ $(SNMPVACMFEATUREPROG) \ + $(SNMPPINGFEATUREPROG) \ + $(SNMPPCAPFEATUREPROG) \ $(USMFEATUREPROG) \ $(TLSFEATUREPROG) \ agentxtrap.ft \ snmpgetnext.ft \ $(EKCFEATUREPROG) \ snmpdf.ft \ + snmpps.ft \ $(SSHFEATUREPROG) all: standardall -OTHERINSTALL=snmpinforminstall snmptrapdperlinstall -OTHERUNINSTALL=snmpinformuninstall snmptrapdperluninstall +OTHERINSTALL_LIBCURSES_TRUE=snmptopinstall +OTHERUNINSTALL_LIBCURSES_TRUE=snmptopuninstall + +OTHERINSTALL=snmpinforminstall snmptrapdperlinstall \ + $(OTHERINSTALL_LIBCURSES_@HAVE_LIBCURSES@) +OTHERUNINSTALL=snmpinformuninstall snmptrapdperluninstall \ + $(OTHERUNINSTALL_LIBCURSES_@HAVE_LIBCURSES@) # # build rules @@ -179,6 +197,10 @@ snmpinform$(EXEEXT): snmptrap$(EXEEXT) rm -f snmpinform $(LN_S) snmptrap$(EXEEXT) snmpinform$(EXEEXT) +snmptop$(EXEEXT): snmpps$(EXEEXT) + rm -f snmptop + $(LN_S) snmpps$(EXEEXT) snmptop$(EXEEXT) + snmpset$(EXEEXT): snmpset.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpset.$(OSUFFIX) ${LDFLAGS} ${LIBS} @@ -203,8 +225,17 @@ encode_keychange$(EXEEXT): encode_keychange.$(OSUFFIX) $(USELIBS) snmpdf$(EXEEXT): snmpdf.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpdf.$(OSUFFIX) ${LDFLAGS} ${LIBS} +snmpps$(EXEEXT): snmpps.$(OSUFFIX) $(USELIBS) + $(LINK) ${CFLAGS} -o $@ snmpps.$(OSUFFIX) ${LDFLAGS} @LIBCURSES@ ${LIBS} + +snmpping$(EXEEXT): snmpping.$(OSUFFIX) $(USELIBS) + $(LINK) ${CFLAGS} -o $@ snmpping.$(OSUFFIX) ${LDFLAGS} ${LIBS} -lm + +snmppcap$(EXEEXT): snmppcap.$(OSUFFIX) $(USEAGENTLIBS) + $(LINK) ${CFLAGS} -o $@ snmppcap.$(OSUFFIX) ${LDFLAGS} ${USEAGENTLIBS} ${LIBS} -lpcap + libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS) - $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) + $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(MYSQL_LIBS) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LDFLAGS) $(RANLIB) $@ snmpinforminstall: @@ -214,6 +245,13 @@ snmpinforminstall: snmpinformuninstall: rm -f $(INSTALL_PREFIX)$(bindir)/snmpinform$(EXEEXT) +snmptopinstall: + rm -f $(INSTALL_PREFIX)$(bindir)/snmptop$(EXEEXT) + $(LN_S) snmpps$(EXEEXT) $(INSTALL_PREFIX)$(bindir)/snmptop$(EXEEXT) + +snmptopuninstall: + rm -f $(INSTALL_PREFIX)$(bindir)/snmptop$(EXEEXT) + snmptrapdperlinstall: installdirs @$(INSTALL_DATA) $(srcdir)/snmp_perl_trapd.pl $(INSTALL_PREFIX)$(snmplibdir)/snmp_perl_trapd.pl @echo "install: installed snmp_perl_trapd.pl in $(INSTALL_PREFIX)$(snmplibdir)" diff --git a/apps/agentxtrap.c b/apps/agentxtrap.c index 4df423c..2367a24 100644 --- a/apps/agentxtrap.c +++ b/apps/agentxtrap.c @@ -5,33 +5,24 @@ #include #include #ifdef HAVE_UNISTD_H -#include /* optind, optarg and optopt */ +#include /* optind, optarg and optopt */ #endif #include #include +#include "../agent_global_vars.h" #include "../agent/mibgroup/agentx/agentx_config.h" #include "../agent/mibgroup/agentx/client.h" #include "../agent/mibgroup/agentx/protocol.h" +#include "../agent/mibgroup/agentx/subagent.h" -netsnmp_feature_require(snmp_split_pdu) -netsnmp_feature_require(snmp_reset_var_types) +netsnmp_feature_require(snmp_split_pdu); +netsnmp_feature_require(snmp_reset_var_types); -#ifdef __GNUC__ -#define UNUSED __attribute__((unused)) -#else -#define UNUSED -#endif - -extern const oid sysuptime_oid[]; -extern const size_t sysuptime_oid_len; -extern const oid snmptrap_oid[]; -extern const size_t snmptrap_oid_len; - static void -usage(const char* progname) +usage(const char *progname) { fprintf(stderr, "USAGE: %s [OPTIONS] TRAP-PARAMETERS\n" @@ -45,8 +36,7 @@ usage(const char* progname) fprintf(stderr, " -h\t\t\tdisplay this help message\n" " -V\t\t\tdisplay package version number\n" - " -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads " - "everything)\n" + " -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads everything)\n" " -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n" " -D[TOKEN[,...]]\tturn on debugging output for the specified " "TOKENs\n" @@ -57,7 +47,7 @@ usage(const char* progname) " -P MIBOPTS\t\tToggle various defaults controlling mib " "parsing:\n"); snmp_mib_toggle_options_usage("\t\t\t ", stderr); -#endif /* NETSNMP_DISABLE_MIB_LOADING */ +#endif /* NETSNMP_DISABLE_MIB_LOADING */ fprintf(stderr, " -L LOGOPTS\t\tToggle various defaults controlling logging:\n"); snmp_log_options_usage("\t\t\t ", stderr); @@ -72,36 +62,38 @@ usage(const char* progname) } struct tState_s; -typedef const struct tState_s* tState; +typedef const struct tState_s *tState; struct tState_s { - void (*entry)(tState self); /**<< State entry action */ - void (*exit)(tState self); /**<< State exit action */ + void (*entry)(tState self); + /**<< State entry action */ + void (*exit)(tState self); + /**<< State exit action */ /** Handler for AgentX-Response-PDU's */ - void (*response)(tState self, netsnmp_pdu *res); + void (*response)(tState self, netsnmp_pdu *res); /** State to change to if an AgentX timeout occurs or the timer runs out */ - tState timeout; - void (*disconnect)(tState self); /**<< Handler for disconnect indications */ + tState timeout; + void (*disconnect)(tState self); + /**<< Handler for disconnect indications */ /** Handler for Close-PDU indications */ - void (*close)(tState self, netsnmp_pdu *res); - const char* name; /**<< Name of the current state */ - int is_open; /**<< If the connection is open in this state */ + void (*close)(tState self, netsnmp_pdu *res); + const char *name; /**<< Name of the current state */ + int is_open; /**<< If the connection is open in this state */ }; -static tState state; /**<< Current state of the state machine */ -static tState next_state; /**<< Next state of the state machine */ - -static const char *context = NULL; /**<< Context that delivers the trap */ -static size_t contextLen; /**<< Length of eventual context */ -static int result = 1; /**<< Program return value */ -static netsnmp_pdu *pdu = NULL; /**<< The trap pdu that is to be sent */ +static tState state; /**<< Current state of the state machine */ +static tState next_state; /**<< Next state of the state machine */ +static const char *context; /**<< Context that delivers the trap */ +static size_t contextLen; /**<< Length of eventual context */ +static int result = 1; /**<< Program return value */ +static netsnmp_pdu *pdu; /**<< The trap pdu that is to be sent */ /** The reference number of the next packet */ -static long packetid = 0; +static long packetid; /** The session id of the session to the master */ -static long session; -static void *sessp = NULL; /**<< The current communication session */ +static long session; +static void *sessp; /**<< The current communication session */ #define STATE_CALL(method) \ - if(!state->method) { \ + if (!state->method) { \ snmp_log(LOG_ERR, "No " #method " method in %s, terminating\n", \ state->name); \ abort(); \ @@ -112,36 +104,39 @@ static void change_state(tState new_state) { if (next_state && next_state != new_state) - DEBUGMSGTL(("process", "Ignore transition to %s\n", next_state->name)); + DEBUGMSGTL(("process", "Ignore transition to %s\n", + next_state->name)); next_state = new_state; } static int -handle_agentx_response(int operation, netsnmp_session *sp, UNUSED int reqid, - netsnmp_pdu *act, UNUSED void *magic) +handle_agentx_response(int operation, netsnmp_session *sp, int reqid, + netsnmp_pdu *act, void *magic) { - switch(operation) { + switch (operation) { case NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE: - if(act->command == AGENTX_MSG_CLEANUPSET) { + if (act->command == AGENTX_MSG_CLEANUPSET) { /* Do nothing - no response and no action as nothing get * allocated in any handler here */ - } else if(act->command != AGENTX_MSG_RESPONSE) { + } else if (act->command != AGENTX_MSG_RESPONSE) { /* Copy the head to a response */ - netsnmp_pdu* res = snmp_split_pdu(act, 0, 0); + netsnmp_pdu *res = snmp_split_pdu(act, 0, 0); res->command = AGENTX_MSG_RESPONSE; if (act->sessid != session || !state->is_open) res->errstat = AGENTX_ERR_NOT_OPEN; - if(res->errstat == AGENTX_ERR_NOERROR) - switch(act->command) { + if (res->errstat == AGENTX_ERR_NOERROR) + switch (act->command) { case AGENTX_MSG_GET: res->variables = snmp_clone_varbind(act->variables); - snmp_reset_var_types(res->variables, SNMP_NOSUCHOBJECT); + snmp_reset_var_types(res->variables, + SNMP_NOSUCHOBJECT); break; case AGENTX_MSG_GETNEXT: case AGENTX_MSG_GETBULK: res->variables = snmp_clone_varbind(act->variables); - snmp_reset_var_types(res->variables, SNMP_ENDOFMIBVIEW); + snmp_reset_var_types(res->variables, + SNMP_ENDOFMIBVIEW); break; case AGENTX_MSG_TESTSET: res->errstat = SNMP_ERR_NOTWRITABLE; @@ -162,9 +157,9 @@ handle_agentx_response(int operation, netsnmp_session *sp, UNUSED int reqid, res->errstat = AGENTX_ERR_PARSE_FAILED; break; } - if(snmp_send(sp, res) == 0) + if (snmp_send(sp, res) == 0) snmp_free_pdu(res); - switch(act->command) { + switch (act->command) { case AGENTX_MSG_CLOSE: /* Take action once the answer is sent! */ STATE_CALL(close)(state, act); @@ -187,57 +182,59 @@ handle_agentx_response(int operation, netsnmp_session *sp, UNUSED int reqid, return 0; } -extern const struct tState_s Connecting; -extern const struct tState_s Opening; -extern const struct tState_s Notifying; -extern const struct tState_s Closing; -extern const struct tState_s Disconnecting; -extern const struct tState_s Exit; +static const struct tState_s Connecting; +static const struct tState_s Opening; +static const struct tState_s Notifying; +static const struct tState_s Closing; +static const struct tState_s Disconnecting; +static const struct tState_s Exit; static void -StateDisconnect(UNUSED tState self) +StateDisconnect(tState self) { snmp_log(LOG_ERR, "Unexpected disconnect in state %s\n", self->name); change_state(&Disconnecting); } static void -StateClose(UNUSED tState self, netsnmp_pdu *act) +StateClose(tState self, netsnmp_pdu *act) { - snmp_log(LOG_ERR, "Unexpected close with reason code %ld in state %s\n", + snmp_log(LOG_ERR, + "Unexpected close with reason code %ld in state %s\n", act->errstat, self->name); change_state(&Disconnecting); } static void -ConnectingEntry(UNUSED tState self) +ConnectingEntry(tState self) { netsnmp_session init; - netsnmp_transport* t; - void* sess; + netsnmp_transport *t; + void *sess; - if(sessp) { + if (sessp) { snmp_sess_close(sessp); sessp = NULL; } snmp_sess_init(&init); init.version = AGENTX_VERSION_1; - init.retries = 0; /* Retries are handled by the state machine */ + init.retries = 0; /* Retries are handled by the state machine */ init.timeout = SNMP_DEFAULT_TIMEOUT; init.flags |= SNMP_FLAGS_STREAM_SOCKET; init.callback = handle_agentx_response; init.authenticator = NULL; - if(!(t = netsnmp_transport_open_client( - "agentx", netsnmp_ds_get_string( - NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET)))) { + if (!(t = netsnmp_transport_open_client("agentx", + netsnmp_ds_get_string + (NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_X_SOCKET)))) { snmp_log(LOG_ERR, "Failed to connect to AgentX server\n"); change_state(&Exit); - } else if(!(sess = snmp_sess_add_ex( - &init, t, NULL, agentx_parse, NULL, NULL, - agentx_realloc_build, agentx_check_packet, NULL))) { - snmp_log(LOG_ERR, "Failed to create session\n"); + } else if (!(sess = snmp_sess_add_ex(&init, t, NULL, agentx_parse, NULL, + NULL, agentx_realloc_build, + agentx_check_packet, NULL))) { + snmp_log(LOG_ERR, "Failed to create session\n"); change_state(&Exit); } else { sessp = sess; @@ -245,7 +242,7 @@ ConnectingEntry(UNUSED tState self) } } -const struct tState_s Connecting = { +static const struct tState_s Connecting = { ConnectingEntry, NULL, NULL, @@ -256,13 +253,13 @@ const struct tState_s Connecting = { 0 }; -static netsnmp_pdu* -pdu_create_opt_context(int command, const char* context, size_t len) +static netsnmp_pdu * +pdu_create_opt_context(int command, const char *context, size_t len) { - netsnmp_pdu* res = snmp_pdu_create(command); + netsnmp_pdu *res = snmp_pdu_create(command); if (res) if (context) { - if (snmp_clone_mem((void**)&res->contextName, context, len)) { + if (snmp_clone_mem((void **) &res->contextName, context, len)) { snmp_free_pdu(res); res = NULL; } else @@ -272,25 +269,25 @@ pdu_create_opt_context(int command, const char* context, size_t len) } static void -OpeningEntry(UNUSED tState self) +OpeningEntry(tState self) { - netsnmp_pdu* act = + netsnmp_pdu *act = pdu_create_opt_context(AGENTX_MSG_OPEN, context, contextLen); - if(act) { + if (act) { act->sessid = 0; act->transid = 0; act->reqid = ++packetid; act->time = 0; snmp_pdu_add_variable(act, NULL, 0, ASN_OCTET_STR, NULL, 0); - if(snmp_sess_send(sessp, act) == 0) + if (snmp_sess_send(sessp, act) == 0) snmp_free_pdu(act); } } static void -OpeningRes(UNUSED tState self, netsnmp_pdu *act) +OpeningRes(tState self, netsnmp_pdu *act) { - if(act->errstat == AGENTX_ERR_NOERROR) { + if (act->errstat == AGENTX_ERR_NOERROR) { session = act->sessid; change_state(&Notifying); } else { @@ -299,7 +296,7 @@ OpeningRes(UNUSED tState self, netsnmp_pdu *act) } } -const struct tState_s Opening = { +static const struct tState_s Opening = { OpeningEntry, NULL, OpeningRes, @@ -311,22 +308,22 @@ const struct tState_s Opening = { }; static void -NotifyingEntry(UNUSED tState self) +NotifyingEntry(tState self) { - netsnmp_pdu* act = snmp_clone_pdu(pdu); - if(act) { + netsnmp_pdu *act = snmp_clone_pdu(pdu); + if (act) { act->sessid = session; act->transid = 0; act->reqid = ++packetid; - if(snmp_sess_send(sessp, act) == 0) + if (snmp_sess_send(sessp, act) == 0) snmp_free_pdu(act); } } static void -NotifyingRes(UNUSED tState self, netsnmp_pdu *act) +NotifyingRes(tState self, netsnmp_pdu *act) { - if(act->errstat == AGENTX_ERR_NOERROR) + if (act->errstat == AGENTX_ERR_NOERROR) result = 0; else snmp_log(LOG_ERR, "Failed to send notification"); @@ -334,7 +331,7 @@ NotifyingRes(UNUSED tState self, netsnmp_pdu *act) change_state(&Closing); } -const struct tState_s Notifying = { +static const struct tState_s Notifying = { NotifyingEntry, NULL, NotifyingRes, @@ -346,43 +343,43 @@ const struct tState_s Notifying = { }; static void -ClosingEntry(UNUSED tState self) +ClosingEntry(tState self) { /* CLOSE pdu->errstat */ - netsnmp_pdu* act = + netsnmp_pdu *act = pdu_create_opt_context(AGENTX_MSG_CLOSE, context, contextLen); - if(act) { + if (act) { act->sessid = session; act->transid = 0; act->reqid = ++packetid; act->errstat = AGENTX_CLOSE_SHUTDOWN; - if(snmp_sess_send(sessp, act) == 0) + if (snmp_sess_send(sessp, act) == 0) snmp_free_pdu(act); } } static void -ClosingRes(UNUSED tState self, netsnmp_pdu *act) +ClosingRes(tState self, netsnmp_pdu *act) { - if(act->errstat != AGENTX_ERR_NOERROR) { + if (act->errstat != AGENTX_ERR_NOERROR) { snmp_log(LOG_ERR, "AgentX error status of %ld\n", act->errstat); } change_state(&Disconnecting); } static void -ClosingDisconnect(UNUSED tState self) +ClosingDisconnect(tState self) { change_state(&Disconnecting); } static void -ClosingClose(UNUSED tState self, UNUSED netsnmp_pdu *act) +ClosingClose(tState self, netsnmp_pdu *act) { change_state(&Disconnecting); } -const struct tState_s Closing = { +static const struct tState_s Closing = { ClosingEntry, NULL, ClosingRes, @@ -394,14 +391,14 @@ const struct tState_s Closing = { }; static void -DisconnectingEntry(UNUSED tState self) +DisconnectingEntry(tState self) { snmp_sess_close(sessp); sessp = NULL; change_state(&Exit); } -const struct tState_s Disconnecting = { +static const struct tState_s Disconnecting = { DisconnectingEntry, NULL, NULL, @@ -412,7 +409,7 @@ const struct tState_s Disconnecting = { 0 }; -const struct tState_s Exit = { +static const struct tState_s Exit = { NULL, NULL, NULL, @@ -429,8 +426,10 @@ main(int argc, char *argv[]) int arg; char *prognam; char *cp = NULL; + const char *sysUpTime = NULL; - const char* sysUpTime = NULL; + /* initialize tcpip, if necessary */ + SOCK_STARTUP; prognam = strrchr(argv[0], '/'); if (prognam) @@ -441,15 +440,16 @@ main(int argc, char *argv[]) putenv(strdup("POSIXLY_CORRECT=1")); netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD, 1); + NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD, 1); netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE, 1); + NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE, 1); while ((arg = getopt(argc, argv, ":Vhm:M:D:dP:L:U:c:x:")) != -1) { switch (arg) { case 'h': usage(prognam); - exit(0); + result = 0; + goto out; case 'm': setenv("MIBS", optarg, 1); break; @@ -472,23 +472,23 @@ main(int argc, char *argv[]) sysUpTime = optarg; break; case 'V': - fprintf(stderr, "NET-SNMP version: %s\n", netsnmp_get_version()); - exit(0); - break; + fprintf(stderr, "NET-SNMP version: %s\n", + netsnmp_get_version()); + result = 0; + goto out; #ifndef DISABLE_MIB_LOADING case 'P': cp = snmp_mib_toggle_options(optarg); if (cp != NULL) { fprintf(stderr, "Unknown parser option to -P: %c.\n", *cp); usage(prognam); - exit(1); + goto out; } break; -#endif /* DISABLE_MIB_LOADING */ +#endif /* DISABLE_MIB_LOADING */ case 'L': - if (snmp_log_options(optarg, argc, argv) < 0) { - exit(1); - } + if (snmp_log_options(optarg, argc, argv) < 0) + goto out; break; case 'x': if (optarg != NULL) { @@ -501,64 +501,55 @@ main(int argc, char *argv[]) case ':': fprintf(stderr, "Option -%c requires an operand\n", optopt); usage(prognam); - exit(1); - break; + goto out; case '?': fprintf(stderr, "Unrecognized option: -%c\n", optopt); usage(prognam); - exit(1); - break; + goto out; } } arg = optind; - /* initialize tcpip, if necessary */ - SOCK_STARTUP; - - init_snmp("snmpapp"); + init_snmp(NETSNMP_APPLICATION_CONFIG_TYPE); agentx_config_init(); /* NOTIFY varlist */ pdu = pdu_create_opt_context(AGENTX_MSG_NOTIFY, context, contextLen); if (sysUpTime) - snmp_add_var(pdu, sysuptime_oid, sysuptime_oid_len, 't', sysUpTime); + snmp_add_var(pdu, sysuptime_oid, sysuptime_oid_len, 't', + sysUpTime); if (arg == argc) { fprintf(stderr, "Missing trap-oid parameter\n"); usage(prognam); - SOCK_CLEANUP; - exit(1); + goto out; } if (snmp_add_var(pdu, snmptrap_oid, snmptrap_oid_len, 'o', argv[arg])) { snmp_perror(argv[arg]); - SOCK_CLEANUP; - exit(1); + goto out; } ++arg; while (arg < argc) { - oid name[MAX_OID_LEN]; - size_t name_length = MAX_OID_LEN; + oid name[MAX_OID_LEN]; + size_t name_length = MAX_OID_LEN; arg += 3; if (arg > argc) { fprintf(stderr, "%s: Missing type/value for variable\n", argv[arg - 3]); - SOCK_CLEANUP; - exit(1); + goto out; } if (!snmp_parse_oid(argv[arg - 3], name, &name_length)) { snmp_perror(argv[arg - 3]); - SOCK_CLEANUP; - exit(1); + goto out; } if (snmp_add_var(pdu, name, name_length, argv[arg - 2][0], argv[arg - 1]) != 0) { snmp_perror(argv[arg - 3]); - SOCK_CLEANUP; - exit(1); + goto out; } } @@ -566,31 +557,37 @@ main(int argc, char *argv[]) state = &Connecting; next_state = NULL; - if(state->entry) state->entry(state); + if (state->entry) + state->entry(state); /* main loop here... */ - for(;;) { - int block = 1; - int numfds = 0; - int count; - fd_set fdset; - struct timeval timeout; - - while(next_state) { - if(state->exit) state->exit(state); + for (;;) { + int block = 1; + int numfds = 0; + int count; + fd_set fdset; + struct timeval timeout; + NETSNMP_SELECT_TIMEVAL timeout2; + + while (next_state) { + if (state->exit) + state->exit(state); DEBUGMSGTL(("process", "State transition: %s -> %s\n", state->name, next_state->name)); state = next_state; next_state = NULL; - if(state->entry) state->entry(state); + if (state->entry) + state->entry(state); } - if(state == &Exit) + if (state == &Exit) break; FD_ZERO(&fdset); snmp_sess_select_info(sessp, &numfds, &fdset, &timeout, &block); - count = select(numfds, &fdset, NULL, NULL, !block ? &timeout : NULL); + timeout2.tv_sec = timeout.tv_sec; + timeout2.tv_usec = timeout.tv_usec; + count = select(numfds, &fdset, NULL, NULL, !block ? &timeout2 : NULL); if (count > 0) snmp_sess_read(sessp, &fdset); else if (count == 0) @@ -605,8 +602,9 @@ main(int argc, char *argv[]) snmp_free_pdu(pdu); pdu = NULL; - snmp_shutdown("snmpapp"); + snmp_shutdown(NETSNMP_APPLICATION_CONFIG_TYPE); +out: SOCK_CLEANUP; - exit(result); + return result; } diff --git a/apps/encode_keychange.c b/apps/encode_keychange.c index 5bf8e4c..656c9ba 100644 --- a/apps/encode_keychange.c +++ b/apps/encode_keychange.c @@ -26,10 +26,10 @@ #include #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -83,7 +83,7 @@ char *newpass = NULL, *oldpass = NULL; char *transform_type_input = NULL; const oid *transform_type = NULL; /* Type of HMAC hash to use. */ - +size_t transform_type_len = 0; /* @@ -95,12 +95,12 @@ int get_user_passphrases(void); int snmp_ttyecho(const int fd, const int echo); char *snmp_getpassphrase(const char *prompt, int fvisible); -#ifdef WIN32 +#if defined(HAVE__CPUTS) && defined(HAVE__GETCH) +#include +#include #define HAVE_GETPASS 1 -char *getpass(const char *prompt); -int isatty(int); -int _cputs(const char *); -int _getch(void); +#define isatty _isatty +static char *getpass(const char *prompt); #endif /*******************************************************************-o-****** @@ -120,7 +120,7 @@ main(int argc, char **argv) oldkul[SNMP_MAXBUF_SMALL], newkul[SNMP_MAXBUF_SMALL], keychange[SNMP_MAXBUF_SMALL]; - int i; + int i, auth_type; int arg = 1; local_progname = argv[0]; @@ -188,16 +188,9 @@ main(int argc, char **argv) /* * Convert and error check transform_type. */ -#ifndef NETSNMP_DISABLE_MD5 - if (!strcmp(transform_type_input, "md5")) { - transform_type = usmHMACMD5AuthProtocol; - - } else -#endif - if (!strcmp(transform_type_input, "sha1")) { - transform_type = usmHMACSHA1AuthProtocol; - - } else { + auth_type = usm_lookup_auth_type(transform_type_input); + transform_type = sc_get_auth_oid( auth_type, &transform_type_len ); + if (NULL == transform_type) { fprintf(stderr, "Unrecognized hash transform: \"%s\".\n", transform_type_input); @@ -206,13 +199,7 @@ main(int argc, char **argv) } if (verbose) { - fprintf(stderr, "Hash:\t\t%s\n", -#ifndef NETSNMP_DISABLE_MD5 - (transform_type == usmHMACMD5AuthProtocol) - ? "usmHMACMD5AuthProtocol" : -#endif - "usmHMACSHA1AuthProtocol" - ); + fprintf(stderr, "Hash:\t\t%s\n", sc_get_auth_name(auth_type)); } @@ -233,7 +220,8 @@ main(int argc, char **argv) (unsigned long)engineid_len)); } else { engineid_len = setup_engineID(&engineid, (char *) engineid); - + if ((ssize_t)engineid_len < 0) + exit(1); } #ifdef NETSNMP_ENABLE_TESTING_CODE @@ -279,13 +267,13 @@ main(int argc, char **argv) QUITFUN(rval, main_quit); - rval = generate_Ku(transform_type, USM_LENGTH_OID_TRANSFORM, + rval = generate_Ku(transform_type, transform_type_len, (u_char *) oldpass, strlen(oldpass), oldKu, &oldKu_len); QUITFUN(rval, main_quit); - rval = generate_Ku(transform_type, USM_LENGTH_OID_TRANSFORM, + rval = generate_Ku(transform_type, transform_type_len, (u_char *) newpass, strlen(newpass), newKu, &newKu_len); QUITFUN(rval, main_quit); @@ -302,7 +290,7 @@ main(int argc, char **argv) DEBUGMSGTL(("encode_keychange", "%02x", (int) (oldKu[i]))); DEBUGMSGTL(("encode_keychange", "\n")); - rval = generate_kul(transform_type, USM_LENGTH_OID_TRANSFORM, + rval = generate_kul(transform_type, transform_type_len, engineid, engineid_len, oldKu, oldKu_len, oldkul, &oldkul_len); QUITFUN(rval, main_quit); @@ -314,7 +302,7 @@ main(int argc, char **argv) DEBUGMSGTL(("encode_keychange", "%02x", (int) (oldkul[i]))); DEBUGMSGTL(("encode_keychange", "\n")); - rval = generate_kul(transform_type, USM_LENGTH_OID_TRANSFORM, + rval = generate_kul(transform_type, transform_type_len, engineid, engineid_len, newKu, newKu_len, newkul, &newkul_len); QUITFUN(rval, main_quit); @@ -325,7 +313,7 @@ main(int argc, char **argv) DEBUGMSGTL(("encode_keychange", "%02x", newkul[i])); DEBUGMSGTL(("encode_keychange", "\n")); - rval = encode_keychange(transform_type, USM_LENGTH_OID_TRANSFORM, + rval = encode_keychange(transform_type, transform_type_len, oldkul, oldkul_len, newkul, newkul_len, keychange, &keychange_len); QUITFUN(rval, main_quit); @@ -403,7 +391,7 @@ usage_to_file(FILE * ofp) "-f will require reading from the stdin/terminal, ignoring a) and b).\n\ -P will prevent prompts for passphrases to stdout from being printed.\n\ \n\ - is interpreted as a hex string when preceeded by \"0x\",\n\ + is interpreted as a hex string when preceded by \"0x\",\n\ otherwise it is created to contain \"text\". If nothing is given,\n\ is constructed from the first IP address for the local host.\n"); @@ -549,7 +537,7 @@ get_user_passphrases(void) } else if (!oldpass) { len = strlen(buf); - if (buf[len - 1] == '\n') + if (len && buf[len - 1] == '\n') buf[--len] = '\0'; oldpass = (char *) calloc(1, len + 1); if (oldpass) @@ -565,7 +553,7 @@ get_user_passphrases(void) } else if (!newpass) { len = strlen(buf); - if (buf[len - 1] == '\n') + if (len && buf[len - 1] == '\n') buf[--len] = '\0'; newpass = (char *) calloc(1, len + 1); if (newpass) @@ -756,7 +744,7 @@ snmp_getpassphrase(const char *prompt, int bvisible) * Copy the input and zero out the read-in buffer. */ len = strlen(buffer); - if (buffer[len - 1] == '\n') + if (len && buffer[len - 1] == '\n') buffer[--len] = '\0'; bufp = (char *) calloc(1, len + 1); @@ -770,8 +758,7 @@ snmp_getpassphrase(const char *prompt, int bvisible) } /* end snmp_getpassphrase() */ -#ifdef WIN32 - +#if defined(HAVE__CPUTS) && defined(HAVE__GETCH) int snmp_ttyecho(const int fd, const int echo) { @@ -782,7 +769,7 @@ snmp_ttyecho(const int fd, const int echo) * stops at the first newline, carrier return, or backspace. * WARNING! _getch does NOT read */ -char * +static char * getpass(const char *prompt) { static char pbuf[128]; @@ -800,4 +787,4 @@ getpass(const char *prompt) return pbuf; } -#endif /* WIN32 */ +#endif /* defined(HAVE__CPUTS) && defined(HAVE__GETCH) */ diff --git a/apps/snmpbulkget.c b/apps/snmpbulkget.c index 2e9ee34..87f15c6 100644 --- a/apps/snmpbulkget.c +++ b/apps/snmpbulkget.c @@ -25,41 +25,41 @@ SOFTWARE. **********************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include #include -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -138,19 +138,22 @@ main(int argc, char *argv[]) int arg; int count; int status; - int exitval = 0; + int exitval = 1; + + SOCK_STARTUP; /* * get the common command line arguments */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -158,7 +161,7 @@ main(int argc, char *argv[]) names = argc - arg; if (names < non_repeaters) { fprintf(stderr, "snmpbulkget: need more objects than \n"); - exit(1); + goto out; } namep = name = (struct nameStruct *) calloc(names, sizeof(*name)); @@ -167,14 +170,12 @@ main(int argc, char *argv[]) if (snmp_parse_oid(argv[arg], namep->name, &namep->name_len) == NULL) { snmp_perror(argv[arg]); - exit(1); + goto out; } arg++; namep++; } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -184,10 +185,11 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpbulkget", &session); - SOCK_CLEANUP; - exit(1); + goto out; } + exitval = 0; + /* * create PDU for GETBULK request and add object name to request */ @@ -245,6 +247,9 @@ main(int argc, char *argv[]) snmp_free_pdu(response); snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmpbulkwalk.c b/apps/snmpbulkwalk.c index 379d2ae..155e97d 100644 --- a/apps/snmpbulkwalk.c +++ b/apps/snmpbulkwalk.c @@ -26,40 +26,40 @@ SOFTWARE. **********************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include #include -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -186,7 +186,9 @@ main(int argc, char *argv[]) int running; int status = STAT_ERROR; int check; - int exitval = 0; + int exitval = 1; + + SOCK_STARTUP; netsnmp_ds_register_config(ASN_BOOLEAN, "snmpwalk", "includeRequested", NETSNMP_DS_APPLICATION_ID, @@ -203,12 +205,13 @@ main(int argc, char *argv[]) */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -223,7 +226,7 @@ main(int argc, char *argv[]) rootlen = MAX_OID_LEN; if (snmp_parse_oid(argv[arg], root, &rootlen) == NULL) { snmp_perror(argv[arg]); - exit(1); + goto out; } } else { /* @@ -233,8 +236,6 @@ main(int argc, char *argv[]) rootlen = sizeof(objid_mib) / sizeof(oid); } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -244,8 +245,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpbulkwalk", &session); - SOCK_CLEANUP; - exit(1); + goto out; } /* @@ -263,6 +263,8 @@ main(int argc, char *argv[]) snmp_get_and_print(ss, root, rootlen); } + exitval = 0; + while (running) { /* * create PDU for GETBULK request and add object name to request @@ -304,6 +306,7 @@ main(int argc, char *argv[]) && snmp_oid_compare(name, name_length, vars->name, vars->name_length) >= 0) { + fflush(stdout); fprintf(stderr, "Error: OID not increasing: "); fprint_objid(stderr, name, name_length); fprintf(stderr, " >= "); @@ -381,6 +384,8 @@ main(int argc, char *argv[]) printf("Variables found: %d\n", numprinted); } +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmpdelta.c b/apps/snmpdelta.c index 08e2ebc..a17121f 100644 --- a/apps/snmpdelta.c +++ b/apps/snmpdelta.c @@ -28,40 +28,40 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -100,7 +100,7 @@ int keepSeconds = 0, peaks = 0; int tableForm = 0; int varbindsPerPacket = 60; -void processFileArgs(char *fileName); +static void processFileArgs(char *fileName); void usage(void) @@ -398,16 +398,19 @@ main(int argc, char *argv[]) int status; int begin, end, last_end; int print = 1; - int exit_code = 0; + int exit_code = 1; + + SOCK_STARTUP; switch (arg = snmp_parse_args(argc, argv, &session, "C:", &optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exit_code = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -418,27 +421,25 @@ main(int argc, char *argv[]) if (current_name >= MAX_ARGS) { fprintf(stderr, "%s: Too many variables specified (max %d)\n", argv[optind], MAX_ARGS); - exit(1); + goto out; } varinfo[current_name++].name = argv[optind]; } if (current_name == 0) { usage(); - exit(1); + goto out; } if (dosum) { if (current_name >= MAX_ARGS) { fprintf(stderr, "Too many variables specified (max %d)\n", MAX_ARGS); - exit(1); + goto out; } varinfo[current_name++].name = NULL; } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -448,8 +449,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpdelta", &session); - SOCK_CLEANUP; - exit(1); + goto out; } if (tableForm && timestamp) { @@ -463,8 +463,7 @@ main(int argc, char *argv[]) if (snmp_parse_oid(vip->name, vip->info_oid, &vip->oidlen) == NULL) { snmp_perror(vip->name); - SOCK_CLEANUP; - exit(1); + goto close_session; } sprint_descriptor(vip->descriptor, vip); if (tableForm) @@ -591,7 +590,7 @@ main(int argc, char *argv[]) if (vip->type == ASN_COUNTER64) { fprintf(stderr, "time delta and table form not supported for counter64s\n"); - exit(1); + goto close_session; } else { printvalue = ((float) value * 100) / delta_time; @@ -742,7 +741,14 @@ main(int argc, char *argv[]) wait_for_period(period); } } + + exit_code = 0; + +close_session: snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return (exit_code); } diff --git a/apps/snmpdf.c b/apps/snmpdf.c index 144a505..751ee6c 100644 --- a/apps/snmpdf.c +++ b/apps/snmpdf.c @@ -36,40 +36,40 @@ SOFTWARE. */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -146,6 +146,11 @@ add(netsnmp_pdu *pdu, const char *mibnodename, exit(1); } + if (base_length + indexlen > sizeof(base) / sizeof(base[0])) { + fprintf(stderr, "internal error for %s, giving up\n", mibnodename); + exit(1); + } + if (index && indexlen) { memcpy(&(base[base_length]), index, indexlen * sizeof(oid)); base_length += indexlen; @@ -255,30 +260,31 @@ main(int argc, char *argv[]) size_t base_length; int status; netsnmp_variable_list *saved = NULL, *vlp = saved, *vlp2; - int count = 0; + int count = 0, exit_code = 1; + + SOCK_STARTUP; /* * get the common command line arguments */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exit_code = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } if (arg != argc) { fprintf(stderr, "snmpdf: extra argument: %s\n", argv[arg]); - exit(1); + goto out; } - SOCK_STARTUP; - /* * Open an SNMP session. */ @@ -288,8 +294,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpdf", &session); - SOCK_CLEANUP; - exit(1); + goto out; } if (human_units) { @@ -332,7 +337,7 @@ main(int argc, char *argv[]) status = snmp_synch_response(ss, pdu, &response); if (status != STAT_SUCCESS || !response) { snmp_sess_perror("snmpdf", ss); - exit(1); + goto close_session; } vlp2 = response->variables; @@ -411,7 +416,7 @@ main(int argc, char *argv[]) status = snmp_synch_response(ss, pdu, &response); if (status != STAT_SUCCESS || !response) { snmp_sess_perror("snmpdf", ss); - exit(1); + goto close_session; } vlp2 = response->variables; @@ -452,11 +457,16 @@ main(int argc, char *argv[]) if (count == 0) { fprintf(stderr, "Failed to locate any partitions.\n"); - exit(1); + goto close_session; } + exit_code = 0; + +close_session: snmp_close(ss); - SOCK_CLEANUP; - return 0; +out: + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return exit_code; } /* end main() */ diff --git a/apps/snmpget.c b/apps/snmpget.c index 701f536..41d2652 100644 --- a/apps/snmpget.c +++ b/apps/snmpget.c @@ -25,40 +25,40 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -117,20 +117,22 @@ main(int argc, char *argv[]) size_t name_length; int status; int failures = 0; - int exitval = 0; + int exitval = 1; + SOCK_STARTUP; /* * get the common command line arguments */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -138,13 +140,13 @@ main(int argc, char *argv[]) if (arg >= argc) { fprintf(stderr, "Missing object name\n"); usage(); - exit(1); + goto out; } if ((argc - arg) > SNMP_MAX_CMDLINE_OIDS) { fprintf(stderr, "Too many object identifiers specified. "); fprintf(stderr, "Only %d allowed in one request.\n", SNMP_MAX_CMDLINE_OIDS); usage(); - exit(1); + goto out; } /* @@ -153,9 +155,6 @@ main(int argc, char *argv[]) for (; arg < argc; arg++) names[current_name++] = argv[arg]; - SOCK_STARTUP; - - /* * Open an SNMP session. */ @@ -165,8 +164,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpget", &session); - SOCK_CLEANUP; - exit(1); + goto out; } @@ -182,12 +180,10 @@ main(int argc, char *argv[]) } else snmp_add_null_var(pdu, name, name_length); } - if (failures) { - snmp_close(ss); - SOCK_CLEANUP; - exit(1); - } + if (failures) + goto close_session; + exitval = 0; /* * Perform the request. @@ -248,8 +244,12 @@ main(int argc, char *argv[]) if (response) snmp_free_pdu(response); + +close_session: snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; - } /* end main() */ diff --git a/apps/snmpgetnext.c b/apps/snmpgetnext.c index 7de13f3..d05ee12 100644 --- a/apps/snmpgetnext.c +++ b/apps/snmpgetnext.c @@ -25,40 +25,40 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -114,19 +114,22 @@ main(int argc, char *argv[]) size_t name_length; int status; int failures = 0; - int exitval = 0; + int exitval = 1; + + SOCK_STARTUP; /* * get the common command line arguments */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", &optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -134,13 +137,13 @@ main(int argc, char *argv[]) if (arg >= argc) { fprintf(stderr, "Missing object name\n"); usage(); - exit(1); + goto out; } if ((argc - arg) > SNMP_MAX_CMDLINE_OIDS) { fprintf(stderr, "Too many object identifiers specified. "); fprintf(stderr, "Only %d allowed in one request.\n", SNMP_MAX_CMDLINE_OIDS); usage(); - exit(1); + goto out; } /* @@ -149,8 +152,6 @@ main(int argc, char *argv[]) for (; arg < argc; arg++) names[current_name++] = argv[arg]; - SOCK_STARTUP; - /* * open an SNMP session */ @@ -160,8 +161,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpgetnext", &session); - SOCK_CLEANUP; - exit(1); + goto out; } /* @@ -177,11 +177,10 @@ main(int argc, char *argv[]) } else snmp_add_null_var(pdu, name, name_length); } - if (failures) { - snmp_close(ss); - SOCK_CLEANUP; - exit(1); - } + if (failures) + goto close_session; + + exitval = 0; /* * do the request @@ -230,7 +229,12 @@ main(int argc, char *argv[]) if (response) snmp_free_pdu(response); + +close_session: snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmpnetstat/Makefile.depend b/apps/snmpnetstat/Makefile.depend index c4728a0..f6d23d5 100644 --- a/apps/snmpnetstat/Makefile.depend +++ b/apps/snmpnetstat/Makefile.depend @@ -1,9 +1,11 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. +./ffs.lo: ffs.h ./if.lo: ../../include/net-snmp/net-snmp-config.h ./if.lo: ../../include/net-snmp/system/linux.h ./if.lo: ../../include/net-snmp/system/sysv.h ./if.lo: ../../include/net-snmp/system/generic.h +./if.lo: ../../include/net-snmp/machine/generic.h ./if.lo: ../../include/net-snmp/net-snmp-includes.h ./if.lo: ../../include/net-snmp/definitions.h ../../include/net-snmp/types.h ./if.lo: ../../include/net-snmp/library/oid.h @@ -14,6 +16,7 @@ ./if.lo: ../../include/net-snmp/pdu_api.h ./if.lo: ../../include/net-snmp/library/asn1.h ./if.lo: ../../include/net-snmp/output_api.h +./if.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./if.lo: ../../include/net-snmp/library/snmp_debug.h ./if.lo: ../../include/net-snmp/library/snmp_logging.h ./if.lo: ../../include/net-snmp/session_api.h @@ -31,6 +34,7 @@ ./if.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./if.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./if.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./if.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./if.lo: ../../include/net-snmp/library/ucd_compat.h ./if.lo: ../../include/net-snmp/library/mib.h ./if.lo: ../../include/net-snmp/mib_api.h @@ -50,7 +54,6 @@ ./if.lo: ../../include/net-snmp/library/data_list.h ./if.lo: ../../include/net-snmp/library/check_varbind.h ./if.lo: ../../include/net-snmp/library/container.h -./if.lo: ../../include/net-snmp/library/factory.h ./if.lo: ../../include/net-snmp/library/container_binary_array.h ./if.lo: ../../include/net-snmp/library/container_list_ssll.h ./if.lo: ../../include/net-snmp/library/container_iterator.h @@ -71,81 +74,10 @@ ./if.lo: ../../include/net-snmp/library/lcd_time.h ./if.lo: ../../include/net-snmp/library/snmp_secmod.h ./if.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./if.lo: ../../include/net-snmp/library/snmptsm.h ./if.lo: ../../include/net-snmp/library/snmpusm.h +./if.lo: ../../include/net-snmp/library/snmptsm.h ./if.lo: main.h ./if.lo: netstat.h -./inet6.lo: ../../include/net-snmp/net-snmp-config.h -./inet6.lo: ../../include/net-snmp/net-snmp-includes.h -./inet6.lo: ../../include/net-snmp/definitions.h -./inet6.lo: ../../include/net-snmp/types.h -./inet6.lo: ../../include/net-snmp/library/oid.h -./inet6.lo: ../../include/net-snmp/library/types.h -./inet6.lo: ../../include/net-snmp/library/snmp_api.h -./inet6.lo: ../../include/net-snmp/varbind_api.h -./inet6.lo: ../../include/net-snmp/library/snmp_client.h -./inet6.lo: ../../include/net-snmp/pdu_api.h -./inet6.lo: ../../include/net-snmp/library/asn1.h -./inet6.lo: ../../include/net-snmp/output_api.h -./inet6.lo: ../../include/net-snmp/library/snmp_debug.h -./inet6.lo: ../../include/net-snmp/library/snmp_logging.h -./inet6.lo: ../../include/net-snmp/session_api.h -./inet6.lo: ../../include/net-snmp/library/callback.h -./inet6.lo: ../../include/net-snmp/library/snmp_transport.h -./inet6.lo: ../../include/net-snmp/library/snmp_service.h -./inet6.lo: ../../include/net-snmp/library/snmpCallbackDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpUnixDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpUDPDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpTCPDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h -./inet6.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h -./inet6.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h -./inet6.lo: ../../include/net-snmp/library/snmpIPXDomain.h -./inet6.lo: ../../include/net-snmp/library/ucd_compat.h -./inet6.lo: ../../include/net-snmp/library/mib.h -./inet6.lo: ../../include/net-snmp/mib_api.h -./inet6.lo: ../../include/net-snmp/library/parse.h -./inet6.lo: ../../include/net-snmp/library/oid_stash.h -./inet6.lo: ../../include/net-snmp/net-snmp-features.h -./inet6.lo: ../../include/net-snmp/library/snmp_impl.h -./inet6.lo: ../../include/net-snmp/library/snmp.h -./inet6.lo: ../../include/net-snmp/library/snmp-tc.h -./inet6.lo: ../../include/net-snmp/library/getopt.h -./inet6.lo: ../../include/net-snmp/utilities.h -./inet6.lo: ../../include/net-snmp/library/system.h -./inet6.lo: ../../include/net-snmp/library/tools.h -./inet6.lo: ../../include/net-snmp/library/int64.h -./inet6.lo: ../../include/net-snmp/library/mt_support.h -./inet6.lo: ../../include/net-snmp/library/snmp_alarm.h -./inet6.lo: ../../include/net-snmp/library/data_list.h -./inet6.lo: ../../include/net-snmp/library/check_varbind.h -./inet6.lo: ../../include/net-snmp/library/container.h -./inet6.lo: ../../include/net-snmp/library/factory.h -./inet6.lo: ../../include/net-snmp/library/container_binary_array.h -./inet6.lo: ../../include/net-snmp/library/container_list_ssll.h -./inet6.lo: ../../include/net-snmp/library/container_iterator.h -./inet6.lo: ../../include/net-snmp/library/container.h -./inet6.lo: ../../include/net-snmp/library/snmp_assert.h -./inet6.lo: ../../include/net-snmp/version.h -./inet6.lo: ../../include/net-snmp/config_api.h -./inet6.lo: ../../include/net-snmp/library/read_config.h -./inet6.lo: ../../include/net-snmp/library/default_store.h -./inet6.lo: ../../include/net-snmp/library/snmp_parse_args.h -./inet6.lo: ../../include/net-snmp/library/snmp_enum.h -./inet6.lo: ../../include/net-snmp/library/vacm.h -./inet6.lo: ../../include/net-snmp/snmpv3_api.h -./inet6.lo: ../../include/net-snmp/library/snmpv3.h -./inet6.lo: ../../include/net-snmp/library/transform_oids.h -./inet6.lo: ../../include/net-snmp/library/keytools.h -./inet6.lo: ../../include/net-snmp/library/scapi.h -./inet6.lo: ../../include/net-snmp/library/lcd_time.h -./inet6.lo: ../../include/net-snmp/library/snmp_secmod.h -./inet6.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./inet6.lo: ../../include/net-snmp/library/snmptsm.h -./inet6.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h ./inet.lo: ../../include/net-snmp/net-snmp-config.h ./inet.lo: ../../include/net-snmp/net-snmp-includes.h ./inet.lo: ../../include/net-snmp/definitions.h @@ -158,6 +90,7 @@ ./inet.lo: ../../include/net-snmp/pdu_api.h ./inet.lo: ../../include/net-snmp/library/asn1.h ./inet.lo: ../../include/net-snmp/output_api.h +./inet.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./inet.lo: ../../include/net-snmp/library/snmp_debug.h ./inet.lo: ../../include/net-snmp/library/snmp_logging.h ./inet.lo: ../../include/net-snmp/session_api.h @@ -175,6 +108,7 @@ ./inet.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./inet.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./inet.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./inet.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./inet.lo: ../../include/net-snmp/library/ucd_compat.h ./inet.lo: ../../include/net-snmp/library/mib.h ./inet.lo: ../../include/net-snmp/mib_api.h @@ -194,7 +128,6 @@ ./inet.lo: ../../include/net-snmp/library/data_list.h ./inet.lo: ../../include/net-snmp/library/check_varbind.h ./inet.lo: ../../include/net-snmp/library/container.h -./inet.lo: ../../include/net-snmp/library/factory.h ./inet.lo: ../../include/net-snmp/library/container_binary_array.h ./inet.lo: ../../include/net-snmp/library/container_list_ssll.h ./inet.lo: ../../include/net-snmp/library/container_iterator.h @@ -215,8 +148,80 @@ ./inet.lo: ../../include/net-snmp/library/lcd_time.h ./inet.lo: ../../include/net-snmp/library/snmp_secmod.h ./inet.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./inet.lo: ../../include/net-snmp/library/snmptsm.h -./inet.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h +./inet.lo: ../../include/net-snmp/library/snmpusm.h +./inet.lo: ../../include/net-snmp/library/snmptsm.h main.h netstat.h +./inet6.lo: ../../include/net-snmp/net-snmp-config.h +./inet6.lo: ../../include/net-snmp/net-snmp-includes.h +./inet6.lo: ../../include/net-snmp/definitions.h +./inet6.lo: ../../include/net-snmp/types.h +./inet6.lo: ../../include/net-snmp/library/oid.h +./inet6.lo: ../../include/net-snmp/library/types.h +./inet6.lo: ../../include/net-snmp/library/snmp_api.h +./inet6.lo: ../../include/net-snmp/varbind_api.h +./inet6.lo: ../../include/net-snmp/library/snmp_client.h +./inet6.lo: ../../include/net-snmp/pdu_api.h +./inet6.lo: ../../include/net-snmp/library/asn1.h +./inet6.lo: ../../include/net-snmp/output_api.h +./inet6.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h +./inet6.lo: ../../include/net-snmp/library/snmp_debug.h +./inet6.lo: ../../include/net-snmp/library/snmp_logging.h +./inet6.lo: ../../include/net-snmp/session_api.h +./inet6.lo: ../../include/net-snmp/library/callback.h +./inet6.lo: ../../include/net-snmp/library/snmp_transport.h +./inet6.lo: ../../include/net-snmp/library/snmp_service.h +./inet6.lo: ../../include/net-snmp/library/snmpCallbackDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpUnixDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpUDPDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpIPv4BaseDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpUDPBaseDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpTCPDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpUDPIPv6Domain.h +./inet6.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h +./inet6.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./inet6.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h +./inet6.lo: ../../include/net-snmp/library/ucd_compat.h +./inet6.lo: ../../include/net-snmp/library/mib.h +./inet6.lo: ../../include/net-snmp/mib_api.h +./inet6.lo: ../../include/net-snmp/library/parse.h +./inet6.lo: ../../include/net-snmp/library/oid_stash.h +./inet6.lo: ../../include/net-snmp/net-snmp-features.h +./inet6.lo: ../../include/net-snmp/library/snmp_impl.h +./inet6.lo: ../../include/net-snmp/library/snmp.h +./inet6.lo: ../../include/net-snmp/library/snmp-tc.h +./inet6.lo: ../../include/net-snmp/library/getopt.h +./inet6.lo: ../../include/net-snmp/utilities.h +./inet6.lo: ../../include/net-snmp/library/system.h +./inet6.lo: ../../include/net-snmp/library/tools.h +./inet6.lo: ../../include/net-snmp/library/int64.h +./inet6.lo: ../../include/net-snmp/library/mt_support.h +./inet6.lo: ../../include/net-snmp/library/snmp_alarm.h +./inet6.lo: ../../include/net-snmp/library/data_list.h +./inet6.lo: ../../include/net-snmp/library/check_varbind.h +./inet6.lo: ../../include/net-snmp/library/container.h +./inet6.lo: ../../include/net-snmp/library/container_binary_array.h +./inet6.lo: ../../include/net-snmp/library/container_list_ssll.h +./inet6.lo: ../../include/net-snmp/library/container_iterator.h +./inet6.lo: ../../include/net-snmp/library/container.h +./inet6.lo: ../../include/net-snmp/library/snmp_assert.h +./inet6.lo: ../../include/net-snmp/version.h +./inet6.lo: ../../include/net-snmp/config_api.h +./inet6.lo: ../../include/net-snmp/library/read_config.h +./inet6.lo: ../../include/net-snmp/library/default_store.h +./inet6.lo: ../../include/net-snmp/library/snmp_parse_args.h +./inet6.lo: ../../include/net-snmp/library/snmp_enum.h +./inet6.lo: ../../include/net-snmp/library/vacm.h +./inet6.lo: ../../include/net-snmp/snmpv3_api.h +./inet6.lo: ../../include/net-snmp/library/snmpv3.h +./inet6.lo: ../../include/net-snmp/library/transform_oids.h +./inet6.lo: ../../include/net-snmp/library/keytools.h +./inet6.lo: ../../include/net-snmp/library/scapi.h +./inet6.lo: ../../include/net-snmp/library/lcd_time.h +./inet6.lo: ../../include/net-snmp/library/snmp_secmod.h +./inet6.lo: ../../include/net-snmp/library/snmpv3-security-includes.h +./inet6.lo: ../../include/net-snmp/library/snmpusm.h +./inet6.lo: ../../include/net-snmp/library/snmptsm.h main.h netstat.h ./inetx.lo: ../../include/net-snmp/net-snmp-config.h ./inetx.lo: ../../include/net-snmp/net-snmp-includes.h ./inetx.lo: ../../include/net-snmp/definitions.h @@ -229,6 +234,7 @@ ./inetx.lo: ../../include/net-snmp/pdu_api.h ./inetx.lo: ../../include/net-snmp/library/asn1.h ./inetx.lo: ../../include/net-snmp/output_api.h +./inetx.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./inetx.lo: ../../include/net-snmp/library/snmp_debug.h ./inetx.lo: ../../include/net-snmp/library/snmp_logging.h ./inetx.lo: ../../include/net-snmp/session_api.h @@ -246,6 +252,7 @@ ./inetx.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./inetx.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./inetx.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./inetx.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./inetx.lo: ../../include/net-snmp/library/ucd_compat.h ./inetx.lo: ../../include/net-snmp/library/mib.h ./inetx.lo: ../../include/net-snmp/mib_api.h @@ -265,7 +272,6 @@ ./inetx.lo: ../../include/net-snmp/library/data_list.h ./inetx.lo: ../../include/net-snmp/library/check_varbind.h ./inetx.lo: ../../include/net-snmp/library/container.h -./inetx.lo: ../../include/net-snmp/library/factory.h ./inetx.lo: ../../include/net-snmp/library/container_binary_array.h ./inetx.lo: ../../include/net-snmp/library/container_list_ssll.h ./inetx.lo: ../../include/net-snmp/library/container_iterator.h @@ -286,8 +292,8 @@ ./inetx.lo: ../../include/net-snmp/library/lcd_time.h ./inetx.lo: ../../include/net-snmp/library/snmp_secmod.h ./inetx.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./inetx.lo: ../../include/net-snmp/library/snmptsm.h -./inetx.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h +./inetx.lo: ../../include/net-snmp/library/snmpusm.h +./inetx.lo: ../../include/net-snmp/library/snmptsm.h main.h netstat.h ./main.lo: ../../include/net-snmp/net-snmp-config.h ./main.lo: ../../include/net-snmp/net-snmp-includes.h ./main.lo: ../../include/net-snmp/definitions.h @@ -300,6 +306,7 @@ ./main.lo: ../../include/net-snmp/pdu_api.h ./main.lo: ../../include/net-snmp/library/asn1.h ./main.lo: ../../include/net-snmp/output_api.h +./main.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./main.lo: ../../include/net-snmp/library/snmp_debug.h ./main.lo: ../../include/net-snmp/library/snmp_logging.h ./main.lo: ../../include/net-snmp/session_api.h @@ -317,6 +324,7 @@ ./main.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./main.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./main.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./main.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./main.lo: ../../include/net-snmp/library/ucd_compat.h ./main.lo: ../../include/net-snmp/library/mib.h ./main.lo: ../../include/net-snmp/mib_api.h @@ -336,7 +344,6 @@ ./main.lo: ../../include/net-snmp/library/data_list.h ./main.lo: ../../include/net-snmp/library/check_varbind.h ./main.lo: ../../include/net-snmp/library/container.h -./main.lo: ../../include/net-snmp/library/factory.h ./main.lo: ../../include/net-snmp/library/container_binary_array.h ./main.lo: ../../include/net-snmp/library/container_list_ssll.h ./main.lo: ../../include/net-snmp/library/container_iterator.h @@ -357,8 +364,8 @@ ./main.lo: ../../include/net-snmp/library/lcd_time.h ./main.lo: ../../include/net-snmp/library/snmp_secmod.h ./main.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./main.lo: ../../include/net-snmp/library/snmptsm.h -./main.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h +./main.lo: ../../include/net-snmp/library/snmpusm.h +./main.lo: ../../include/net-snmp/library/snmptsm.h main.h netstat.h ./route.lo: ../../include/net-snmp/net-snmp-config.h ./route.lo: ../../include/net-snmp/net-snmp-includes.h ./route.lo: ../../include/net-snmp/definitions.h @@ -371,6 +378,7 @@ ./route.lo: ../../include/net-snmp/pdu_api.h ./route.lo: ../../include/net-snmp/library/asn1.h ./route.lo: ../../include/net-snmp/output_api.h +./route.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./route.lo: ../../include/net-snmp/library/snmp_debug.h ./route.lo: ../../include/net-snmp/library/snmp_logging.h ./route.lo: ../../include/net-snmp/session_api.h @@ -388,6 +396,7 @@ ./route.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./route.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./route.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./route.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./route.lo: ../../include/net-snmp/library/ucd_compat.h ./route.lo: ../../include/net-snmp/library/mib.h ./route.lo: ../../include/net-snmp/mib_api.h @@ -407,7 +416,6 @@ ./route.lo: ../../include/net-snmp/library/data_list.h ./route.lo: ../../include/net-snmp/library/check_varbind.h ./route.lo: ../../include/net-snmp/library/container.h -./route.lo: ../../include/net-snmp/library/factory.h ./route.lo: ../../include/net-snmp/library/container_binary_array.h ./route.lo: ../../include/net-snmp/library/container_list_ssll.h ./route.lo: ../../include/net-snmp/library/container_iterator.h @@ -428,8 +436,8 @@ ./route.lo: ../../include/net-snmp/library/lcd_time.h ./route.lo: ../../include/net-snmp/library/snmp_secmod.h ./route.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./route.lo: ../../include/net-snmp/library/snmptsm.h -./route.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h +./route.lo: ../../include/net-snmp/library/snmpusm.h +./route.lo: ../../include/net-snmp/library/snmptsm.h main.h netstat.h ffs.h ./routex.lo: ../../include/net-snmp/net-snmp-config.h ./routex.lo: ../../include/net-snmp/net-snmp-includes.h ./routex.lo: ../../include/net-snmp/definitions.h @@ -442,6 +450,7 @@ ./routex.lo: ../../include/net-snmp/pdu_api.h ./routex.lo: ../../include/net-snmp/library/asn1.h ./routex.lo: ../../include/net-snmp/output_api.h +./routex.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./routex.lo: ../../include/net-snmp/library/snmp_debug.h ./routex.lo: ../../include/net-snmp/library/snmp_logging.h ./routex.lo: ../../include/net-snmp/session_api.h @@ -459,6 +468,7 @@ ./routex.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./routex.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./routex.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./routex.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./routex.lo: ../../include/net-snmp/library/ucd_compat.h ./routex.lo: ../../include/net-snmp/library/mib.h ./routex.lo: ../../include/net-snmp/mib_api.h @@ -478,7 +488,6 @@ ./routex.lo: ../../include/net-snmp/library/data_list.h ./routex.lo: ../../include/net-snmp/library/check_varbind.h ./routex.lo: ../../include/net-snmp/library/container.h -./routex.lo: ../../include/net-snmp/library/factory.h ./routex.lo: ../../include/net-snmp/library/container_binary_array.h ./routex.lo: ../../include/net-snmp/library/container_list_ssll.h ./routex.lo: ../../include/net-snmp/library/container_iterator.h @@ -499,8 +508,8 @@ ./routex.lo: ../../include/net-snmp/library/lcd_time.h ./routex.lo: ../../include/net-snmp/library/snmp_secmod.h ./routex.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./routex.lo: ../../include/net-snmp/library/snmptsm.h -./routex.lo: ../../include/net-snmp/library/snmpusm.h main.h netstat.h +./routex.lo: ../../include/net-snmp/library/snmpusm.h +./routex.lo: ../../include/net-snmp/library/snmptsm.h main.h netstat.h ./winstub.lo: ../../include/net-snmp/net-snmp-config.h ./winstub.lo: ../../include/net-snmp/net-snmp-includes.h ./winstub.lo: ../../include/net-snmp/definitions.h @@ -513,6 +522,7 @@ ./winstub.lo: ../../include/net-snmp/pdu_api.h ./winstub.lo: ../../include/net-snmp/library/asn1.h ./winstub.lo: ../../include/net-snmp/output_api.h +./winstub.lo: ../../include/net-snmp/library/netsnmp-attribute-format.h ./winstub.lo: ../../include/net-snmp/library/snmp_debug.h ./winstub.lo: ../../include/net-snmp/library/snmp_logging.h ./winstub.lo: ../../include/net-snmp/session_api.h @@ -530,6 +540,7 @@ ./winstub.lo: ../../include/net-snmp/library/snmpIPv6BaseDomain.h ./winstub.lo: ../../include/net-snmp/library/snmpTCPIPv6Domain.h ./winstub.lo: ../../include/net-snmp/library/snmpIPXDomain.h +./winstub.lo: ../../include/net-snmp/library/snmpAAL5PVCDomain.h ./winstub.lo: ../../include/net-snmp/library/ucd_compat.h ./winstub.lo: ../../include/net-snmp/library/mib.h ./winstub.lo: ../../include/net-snmp/mib_api.h @@ -549,7 +560,6 @@ ./winstub.lo: ../../include/net-snmp/library/data_list.h ./winstub.lo: ../../include/net-snmp/library/check_varbind.h ./winstub.lo: ../../include/net-snmp/library/container.h -./winstub.lo: ../../include/net-snmp/library/factory.h ./winstub.lo: ../../include/net-snmp/library/container_binary_array.h ./winstub.lo: ../../include/net-snmp/library/container_list_ssll.h ./winstub.lo: ../../include/net-snmp/library/container_iterator.h @@ -570,5 +580,5 @@ ./winstub.lo: ../../include/net-snmp/library/lcd_time.h ./winstub.lo: ../../include/net-snmp/library/snmp_secmod.h ./winstub.lo: ../../include/net-snmp/library/snmpv3-security-includes.h -./winstub.lo: ../../include/net-snmp/library/snmptsm.h ./winstub.lo: ../../include/net-snmp/library/snmpusm.h +./winstub.lo: ../../include/net-snmp/library/snmptsm.h diff --git a/apps/snmpnetstat/Makefile.in b/apps/snmpnetstat/Makefile.in index 04aeb40..dfb566d 100644 --- a/apps/snmpnetstat/Makefile.in +++ b/apps/snmpnetstat/Makefile.in @@ -2,7 +2,6 @@ # snmpnetstat Makefile # -top_builddir=../.. mysubdir=apps/snmpnetstat INSTALLBINPROGS=snmpnetstat$(EXEEXT) diff --git a/apps/snmpnetstat/ffs.c b/apps/snmpnetstat/ffs.c index 5997339..f436c41 100644 --- a/apps/snmpnetstat/ffs.c +++ b/apps/snmpnetstat/ffs.c @@ -1,38 +1,42 @@ -/* $OpenBSD: ffs.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */ +/* + * $OpenBSD: ffs.c,v 1.7 2005/08/08 08:05:37 espie Exp $ + */ /* * Public domain. * Written by Dale Rahn. */ +#include "ffs.h" + /* * ffs -- vax ffs instruction */ int _ffs(int mask) { - int bit; - unsigned int r = mask; - static const signed char t[16] = { - -28, 1, 2, 1, - 3, 1, 2, 1, - 4, 1, 2, 1, - 3, 1, 2, 1 - }; + int bit; + unsigned int r = mask; + static const signed char t[16] = { + -28, 1, 2, 1, + 3, 1, 2, 1, + 4, 1, 2, 1, + 3, 1, 2, 1 + }; - bit = 0; - if (!(r & 0xffff)) { - bit += 16; - r >>= 16; - } - if (!(r & 0xff)) { - bit += 8; - r >>= 8; - } - if (!(r & 0xf)) { - bit += 4; - r >>= 4; - } + bit = 0; + if (!(r & 0xffff)) { + bit += 16; + r >>= 16; + } + if (!(r & 0xff)) { + bit += 8; + r >>= 8; + } + if (!(r & 0xf)) { + bit += 4; + r >>= 4; + } - return (bit + t[ r & 0xf ]); + return (bit + t[r & 0xf]); } diff --git a/apps/snmpnetstat/ffs.h b/apps/snmpnetstat/ffs.h new file mode 100644 index 0000000..c5b47bb --- /dev/null +++ b/apps/snmpnetstat/ffs.h @@ -0,0 +1 @@ +int _ffs(int mask); diff --git a/apps/snmpnetstat/if.c b/apps/snmpnetstat/if.c index 125e6a3..b4d7f8f 100644 --- a/apps/snmpnetstat/if.c +++ b/apps/snmpnetstat/if.c @@ -1,9 +1,13 @@ -/* $OpenBSD: if.c,v 1.42 2005/03/13 16:05:50 mpf Exp $ */ -/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ +/* + * $OpenBSD: if.c,v 1.42 2005/03/13 16:05:50 mpf Exp $ + */ +/* + * $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ + */ /* * Copyright (c) 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,23 +34,14 @@ * SUCH DAMAGE. */ -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; -#else -static char *rcsid = "$OpenBSD: if.c,v 1.42 2005/03/13 16:05:50 mpf Exp $"; -#endif -#endif /* not lint */ -#endif - #include #include -#if HAVE_UNISTD_H +#include +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif #ifndef _XOPEN_SOURCE @@ -63,88 +58,112 @@ static char *rcsid = "$OpenBSD: if.c,v 1.42 2005/03/13 16:05:50 mpf Exp $"; #define YES 1 #define NO 0 -static void sidewaysintpr(u_int); -static void timerSet(int interval_seconds); -static void timerPause(void); - - struct _if_info { - char name[128]; - char descr[128]; - char ip[128], route[128]; - int mtu; - int drops; - unsigned int ifindex; - /* - * Save "expandable" fields as string values - * rather than integer statistics - */ - char s_ipkts[20], s_ierrs[20]; - char s_opkts[20], s_oerrs[20]; - char s_ibytes[20], s_obytes[20]; - char s_outq[20]; - unsigned long ipkts, opkts; /* Need to combine 2 MIB values */ - int operstatus; -/* - u_long netmask; - struct in_addr ifip, ifroute; - */ - struct _if_info *next; - }; +static void sidewaysintpr(u_int); +struct _if_info { + char name[128]; + char descr[128]; + char ip[128], route[128]; + int mtu; + int drops; + unsigned int ifindex; + /* + * Save "expandable" fields as string values + * rather than integer statistics + */ + char s_ipkts[20], s_ierrs[20]; + char s_opkts[20], s_oerrs[20]; + char s_ibytes[20], s_obytes[20]; + char s_outq[20]; + unsigned long ipkts, opkts; /* Need to combine 2 MIB values */ + int operstatus; + /* + * u_long netmask; + * struct in_addr ifip, ifroute; + */ + struct _if_info *next; +}; + + +static struct timeval deadline; + +static void +timerSet(int interval_seconds) +{ + const struct timeval interval = { interval_seconds, 0 }; + + netsnmp_get_monotonic_clock(&deadline); + NETSNMP_TIMERADD(&deadline, &interval, &deadline); +} + +static void +timerPause(void) +{ + struct timeval now, delta; + + netsnmp_get_monotonic_clock(&now); + NETSNMP_TIMERSUB(&deadline, &now, &delta); + if (delta.tv_sec < 0) + return; +#ifdef WIN32 + Sleep(delta.tv_sec * 1000 + delta.tv_usec / 1000); +#else + if (select(0, NULL, NULL, NULL, &delta) < 0) + snmp_perror("select"); +#endif +} /* * Retrieve the interface addressing information * XXX - This could also be extended to handle non-IP interfaces */ void -_set_address( struct _if_info *cur_if ) +_set_address(struct _if_info *cur_if) { - oid ipaddr_oid[] = { 1,3,6,1,2,1,4,20,1,0 }; - size_t ipaddr_len = OID_LENGTH( ipaddr_oid ); - static netsnmp_variable_list *addr_if_var =NULL; - static netsnmp_variable_list *addr_mask_var=NULL; + oid ipaddr_oid[] = { 1, 3, 6, 1, 2, 1, 4, 20, 1, 0 }; + size_t ipaddr_len = OID_LENGTH(ipaddr_oid); + static netsnmp_variable_list *addr_if_var = NULL; + static netsnmp_variable_list *addr_mask_var = NULL; netsnmp_variable_list *vp, *vp2; union { - in_addr_t addr; - char data[4]; + in_addr_t addr; + char data[4]; } tmpAddr; - char *cp; - in_addr_t ifAddr, mask; + char *cp; + in_addr_t ifAddr, mask; - /* - * Note that this information only needs to be retrieved - * once, and can be re-used for subsequent calls. - */ - if ( addr_if_var == NULL ) { - ipaddr_oid[ 9 ] = 2; /* ipAdEntIfIndex */ - snmp_varlist_add_variable( &addr_if_var, ipaddr_oid, ipaddr_len, - ASN_NULL, NULL, 0); - netsnmp_query_walk( addr_if_var, ss ); - - ipaddr_oid[ 9 ] = 3; /* ipAdEntNetMask */ - snmp_varlist_add_variable( &addr_mask_var, ipaddr_oid, ipaddr_len, - ASN_NULL, NULL, 0); - netsnmp_query_walk( addr_mask_var, ss ); + /* + * Note that this information only needs to be retrieved + * once, and can be re-used for subsequent calls. + */ + if (addr_if_var == NULL) { + ipaddr_oid[9] = 2; /* ipAdEntIfIndex */ + snmp_varlist_add_variable(&addr_if_var, ipaddr_oid, ipaddr_len, + ASN_NULL, NULL, 0); + netsnmp_query_walk(addr_if_var, ss); + + ipaddr_oid[9] = 3; /* ipAdEntNetMask */ + snmp_varlist_add_variable(&addr_mask_var, ipaddr_oid, ipaddr_len, + ASN_NULL, NULL, 0); + netsnmp_query_walk(addr_mask_var, ss); } /* * Find the address row relevant to this interface */ - for (vp=addr_if_var, vp2=addr_mask_var; vp; - vp=vp->next_variable, vp2=vp2->next_variable) { - if ( vp->val.integer && *vp->val.integer == (int)cur_if->ifindex ) + for (vp = addr_if_var, vp2 = addr_mask_var; vp; + vp = vp->next_variable, vp2 = vp2->next_variable) { + if (vp->val.integer && *vp->val.integer == (int) cur_if->ifindex) break; } if (vp2) { /* * Always want a numeric interface IP address */ - snprintf( cur_if->ip, 128, "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u." - "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u", - vp2->name[10], - vp2->name[11], - vp2->name[12], - vp2->name[13]); + snprintf(cur_if->ip, 128, "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u." + "%" NETSNMP_PRIo "u.%" NETSNMP_PRIo "u", + vp2->name[10], + vp2->name[11], vp2->name[12], vp2->name[13]); /* * But re-use the routing table utilities/code for @@ -162,7 +181,7 @@ _set_address( struct _if_info *cur_if ) cp[2] = (uint8_t) vp2->val.string[2]; cp[3] = (uint8_t) vp2->val.string[3]; mask = tmpAddr.addr; - snprintf( cur_if->route, 128, "%s", netname(ifAddr, mask)); + snprintf(cur_if->route, 128, "%s", netname(ifAddr, mask)); } } @@ -173,57 +192,58 @@ _set_address( struct _if_info *cur_if ) void intpr(int interval) { - oid ifcol_oid[] = { 1,3,6,1,2,1,2,2,1,0 }; - size_t ifcol_len = OID_LENGTH( ifcol_oid ); - oid ifxcol_oid[] = { 1,3,6,1,2,1,31,1,1,1,0 }; - size_t ifxcol_len = OID_LENGTH( ifxcol_oid ); + oid ifcol_oid[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 0 }; + size_t ifcol_len = OID_LENGTH(ifcol_oid); + oid ifxcol_oid[] = { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 0 }; + size_t ifxcol_len = OID_LENGTH(ifxcol_oid); struct _if_info *if_head, *if_tail, *cur_if; netsnmp_variable_list *var, *vp; - /* - * Track maximum field widths, expanding as necessary - * This is one reason why results can't be - * displayed immediately they are retrieved. - */ - int max_name = 4, max_ip = 7, max_route = 7, max_outq = 5; - int max_ipkts = 5, max_ierrs = 5, max_opkts = 5, max_oerrs = 5; - int max_ibytes = 6, max_obytes = 6; - int i; + /* + * Track maximum field widths, expanding as necessary + * This is one reason why results can't be + * displayed immediately they are retrieved. + */ + int max_name = 4, max_ip = 7, max_route = 7, max_outq = 5; + int max_ipkts = 5, max_ierrs = 5, max_opkts = + 5, max_oerrs = 5; + int max_ibytes = 6, max_obytes = 6; + int i; if (interval) { - sidewaysintpr((unsigned)interval); + sidewaysintpr((unsigned) interval); return; } - /* - * The traditional "netstat -i" output combines information - * from two SNMP tables: - * ipAddrTable (for the IP address/network) - * ifTable (for the interface statistics) - * - * The previous approach was to retrieve (and save) the - * address information first. Then walk the main ifTable, - * add the relevant stored addresses, and saving the - * full information for each interface, before displaying - * the results as a separate pass. - * - * This code reverses this general structure, by first retrieving - * (and storing) the interface statistics for the whole table, - * then inserting the address information obtained from the - * ipAddrTable, and finally displaying the results. - * Such an arrangement should make it easier to extend this - * to handle non-IP interfaces (hence not in ipAddrTable) - */ + /* + * The traditional "netstat -i" output combines information + * from two SNMP tables: + * ipAddrTable (for the IP address/network) + * ifTable (for the interface statistics) + * + * The previous approach was to retrieve (and save) the + * address information first. Then walk the main ifTable, + * add the relevant stored addresses, and saving the + * full information for each interface, before displaying + * the results as a separate pass. + * + * This code reverses this general structure, by first retrieving + * (and storing) the interface statistics for the whole table, + * then inserting the address information obtained from the + * ipAddrTable, and finally displaying the results. + * Such an arrangement should make it easier to extend this + * to handle non-IP interfaces (hence not in ipAddrTable) + */ if_head = NULL; if_tail = NULL; - var = NULL; + var = NULL; #define ADD_IFVAR( x ) ifcol_oid[ ifcol_len-1 ] = x; \ snmp_varlist_add_variable( &var, ifcol_oid, ifcol_len, ASN_NULL, NULL, 0) - ADD_IFVAR( 2 ); /* ifName */ - ADD_IFVAR( 4 ); /* ifMtu */ - ADD_IFVAR( 8 ); /* ifOperStatus */ + ADD_IFVAR(2); /* ifName */ + ADD_IFVAR(4); /* ifMtu */ + ADD_IFVAR(8); /* ifOperStatus */ /* * The Net/Open-BSD behaviour is to display *either* byte * counts *or* packet/error counts (but not both). FreeBSD @@ -236,144 +256,144 @@ intpr(int interval) * Or we could perhaps support both styles? :-) */ if (bflag || oflag) { - ADD_IFVAR( 10 ); /* ifInOctets */ - ADD_IFVAR( 16 ); /* ifOutOctets */ + ADD_IFVAR(10); /* ifInOctets */ + ADD_IFVAR(16); /* ifOutOctets */ } if (!oflag) { - ADD_IFVAR( 11 ); /* ifInUcastPkts */ - ADD_IFVAR( 12 ); /* ifInNUcastPkts */ - ADD_IFVAR( 14 ); /* ifInErrors */ - ADD_IFVAR( 17 ); /* ifOutUcastPkts */ - ADD_IFVAR( 18 ); /* ifOutNUcastPkts */ - ADD_IFVAR( 20 ); /* ifOutErrors */ - ADD_IFVAR( 21 ); /* ifOutQLen */ + ADD_IFVAR(11); /* ifInUcastPkts */ + ADD_IFVAR(12); /* ifInNUcastPkts */ + ADD_IFVAR(14); /* ifInErrors */ + ADD_IFVAR(17); /* ifOutUcastPkts */ + ADD_IFVAR(18); /* ifOutNUcastPkts */ + ADD_IFVAR(20); /* ifOutErrors */ + ADD_IFVAR(21); /* ifOutQLen */ } #if 0 if (tflag) { - ADD_IFVAR( XX ); /* ??? */ + ADD_IFVAR(XX); /* ??? */ } #endif if (dflag) { - ADD_IFVAR( 19 ); /* ifOutDiscards */ + ADD_IFVAR(19); /* ifOutDiscards */ } #undef ADD_IFVAR #define ADD_IFXVAR( x ) ifxcol_oid[ ifxcol_len-1 ] = x; \ snmp_varlist_add_variable( &var, ifxcol_oid, ifxcol_len, ASN_NULL, NULL, 0) - ADD_IFXVAR(1); /* ifName */ + ADD_IFXVAR(1); /* ifName */ #undef ADD_IFXVAR - /* - * Now walk the ifTable, creating a list of interfaces - */ - while ( 1 ) { - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + /* + * Now walk the ifTable, creating a list of interfaces + */ + while (1) { + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; - if ((var->type & 0xF0) == 0x80) /* Exception */ + if ((var->type & 0xF0) == 0x80) /* Exception */ break; - ifcol_oid[ ifcol_len-1 ] = 2; /* ifDescr */ - if ( snmp_oid_compare( ifcol_oid, ifcol_len, - var->name, ifcol_len) != 0 ) - break; /* End of Table */ - if ((var->type & 0xF0) == 0x80) /* Exception */ - return; - cur_if = SNMP_MALLOC_TYPEDEF( struct _if_info ); + ifcol_oid[ifcol_len - 1] = 2; /* ifDescr */ + if (snmp_oid_compare(ifcol_oid, ifcol_len, + var->name, ifcol_len) != 0) + break; /* End of Table */ + cur_if = SNMP_MALLOC_TYPEDEF(struct _if_info); if (!cur_if) break; - cur_if->ifindex = var->name[ var->name_length-1 ]; - for ( vp=var; vp; vp=vp->next_variable ) { - if ((vp->type & 0xF0) == 0x80) /* Exception */ + cur_if->ifindex = var->name[var->name_length - 1]; + for (vp = var; vp; vp = vp->next_variable) { + if ((vp->type & 0xF0) == 0x80) /* Exception */ continue; - if ( ! vp->val.integer ) + if (!vp->val.integer) continue; - if ( var->name[ var->name_length-1 ] != cur_if->ifindex ) { + if (var->name[var->name_length - 1] != cur_if->ifindex) { /* * Inconsistent index information * XXX - Try to recover ? */ - SNMP_FREE( cur_if ); - break; /* not for now, no */ + SNMP_FREE(cur_if); + break; /* not for now, no */ } - switch ( vp->name[ var->name_length-2 ] ) { - case 2: /* ifDescr */ + switch (vp->name[var->name_length - 2]) { + case 2: /* ifDescr */ if (vp->val_len >= sizeof(cur_if->name)) - vp->val_len = sizeof(cur_if->name)-1; - memmove( cur_if->name, vp->val.string, vp->val_len ); + vp->val_len = sizeof(cur_if->name) - 1; + memmove(cur_if->name, vp->val.string, vp->val_len); cur_if->name[vp->val_len] = 0; - memmove( cur_if->descr, vp->val.string, vp->val_len ); + memmove(cur_if->descr, vp->val.string, vp->val_len); cur_if->descr[vp->val_len] = 0; break; - case 4: /* ifMtu */ + case 4: /* ifMtu */ cur_if->mtu = *vp->val.integer; break; - case 8: /* ifOperStatus */ + case 8: /* ifOperStatus */ cur_if->operstatus = *vp->val.integer; - /* XXX - any special processing ?? */ + /* + * XXX - any special processing ?? + */ break; - case 10: /* ifInOctets */ + case 10: /* ifInOctets */ sprintf(cur_if->s_ibytes, "%lu", *vp->val.integer); i = strlen(cur_if->s_ibytes); if (i > max_ibytes) max_ibytes = i; break; - case 11: /* ifInUcastPkts */ + case 11: /* ifInUcastPkts */ cur_if->ipkts += *vp->val.integer; sprintf(cur_if->s_ipkts, "%lu", cur_if->ipkts); i = strlen(cur_if->s_ipkts); if (i > max_ipkts) max_ipkts = i; break; - case 12: /* ifInNUcastPkts */ + case 12: /* ifInNUcastPkts */ cur_if->ipkts += *vp->val.integer; sprintf(cur_if->s_ipkts, "%lu", cur_if->ipkts); i = strlen(cur_if->s_ipkts); if (i > max_ipkts) max_ipkts = i; break; - case 14: /* ifInErrors */ + case 14: /* ifInErrors */ sprintf(cur_if->s_ierrs, "%lu", *vp->val.integer); i = strlen(cur_if->s_ierrs); if (i > max_ierrs) max_ierrs = i; break; - case 16: /* ifOutOctets */ + case 16: /* ifOutOctets */ sprintf(cur_if->s_obytes, "%lu", *vp->val.integer); i = strlen(cur_if->s_obytes); if (i > max_obytes) max_obytes = i; break; - case 17: /* ifOutUcastPkts */ + case 17: /* ifOutUcastPkts */ cur_if->opkts += *vp->val.integer; sprintf(cur_if->s_opkts, "%lu", cur_if->opkts); i = strlen(cur_if->s_opkts); if (i > max_opkts) max_opkts = i; break; - case 18: /* ifOutNUcastPkts */ + case 18: /* ifOutNUcastPkts */ cur_if->opkts += *vp->val.integer; sprintf(cur_if->s_opkts, "%lu", cur_if->opkts); i = strlen(cur_if->s_opkts); if (i > max_opkts) max_opkts = i; break; - case 19: /* ifOutDiscards */ + case 19: /* ifOutDiscards */ cur_if->drops = *vp->val.integer; break; - case 20: /* ifOutErrors */ + case 20: /* ifOutErrors */ sprintf(cur_if->s_oerrs, "%lu", *vp->val.integer); i = strlen(cur_if->s_oerrs); if (i > max_oerrs) max_oerrs = i; break; - case 21: /* ifOutQLen */ + case 21: /* ifOutQLen */ sprintf(cur_if->s_outq, "%lu", *vp->val.integer); i = strlen(cur_if->s_outq); if (i > max_outq) max_outq = i; break; - case 1: /* ifName */ + case 1: /* ifName */ if (vp->val_len >= sizeof(cur_if->name)) - vp->val_len = sizeof(cur_if->name)-1; - memmove( cur_if->name, vp->val.string, vp->val_len ); + vp->val_len = sizeof(cur_if->name) - 1; + memmove(cur_if->name, vp->val.string, vp->val_len); cur_if->name[vp->val_len] = 0; if ((i = strlen(cur_if->name) + 1) > max_name) max_name = i; @@ -389,22 +409,23 @@ intpr(int interval) /* * If we're to monitor a particular interface, then * ignore all others. It would be more efficient - * to check this earlier (as part of processing + * to check this earlier (as part of processing * the varbind list). But performing this test here * means we can recognise ifXTable names as well) */ - if ( intrface && strcmp( cur_if->name, intrface) != 0 && strcmp( cur_if->descr, intrface) != 0) { - SNMP_FREE( cur_if ); + if (intrface && strcmp(cur_if->name, intrface) != 0 + && strcmp(cur_if->descr, intrface) != 0) { + SNMP_FREE(cur_if); } /* * Insert the IP address and network settings, and * add the new _if_stat structure to the list. */ - if ( cur_if ) { + if (cur_if) { if ((i = strlen(cur_if->name) + 1) > max_name) max_name = i; - _set_address( cur_if ); + _set_address(cur_if); i = strlen(cur_if->ip); if (i > max_ip) max_ip = i; @@ -412,103 +433,103 @@ intpr(int interval) if (i > max_route) max_route = i; - if ( if_tail ) { + if (if_tail) { if_tail->next = cur_if; - if_tail = cur_if; + if_tail = cur_if; } else { - if_head = cur_if; - if_tail = cur_if; + if_head = cur_if; + if_tail = cur_if; } } - } /* while (1) */ + } /* while (1) */ + snmp_free_varbind(var); - /* - * Now display the specified results (in Free-BSD format) - * setting the field widths appropriately.... - */ + /* + * Now display the specified results (in Free-BSD format) + * setting the field widths appropriately.... + */ printf("%*.*s %5.5s %*.*s %*.*s", - -max_name, max_name, "Name", "Mtu", - -max_route, max_route, "Network", - -max_ip, max_ip, "Address"); + -max_name, max_name, "Name", "Mtu", + -max_route, max_route, "Network", -max_ip, max_ip, "Address"); if (oflag) { - printf(" %*s %*s", max_ibytes, "Ibytes", - max_obytes, "Obytes"); + printf(" %*s %*s", max_ibytes, "Ibytes", max_obytes, "Obytes"); } else { - printf(" %*s %*s", max_ipkts, "Ipkts", - max_ierrs, "Ierrs"); - if (bflag) - printf(" %*s", max_ibytes, "Ibytes"); + printf(" %*s %*s", max_ipkts, "Ipkts", max_ierrs, "Ierrs"); + if (bflag) + printf(" %*s", max_ibytes, "Ibytes"); - printf(" %*s %*s", max_opkts, "Opkts", - max_oerrs, "Oerrs"); - if (bflag) - printf(" %*s", max_obytes, "Obytes"); + printf(" %*s %*s", max_opkts, "Opkts", max_oerrs, "Oerrs"); + if (bflag) + printf(" %*s", max_obytes, "Obytes"); - printf(" %*s", max_outq, "Queue"); + printf(" %*s", max_outq, "Queue"); } - /* if (tflag) - printf(" %s", "Time"); - */ + /* + * if (tflag) + * printf(" %s", "Time"); + */ if (dflag) printf(" %s", "Drop"); putchar('\n'); - for (cur_if = if_head; cur_if; cur_if=cur_if->next) { + for (cur_if = if_head; cur_if; cur_if = cur_if->next) { if (cur_if->name[0] == 0) continue; - printf( "%*.*s %5d", -max_name, max_name, cur_if->name, cur_if->mtu); - printf(" %*.*s", -max_route, max_route, cur_if->route); - printf(" %*.*s", -max_ip, max_ip, cur_if->ip); + printf("%*.*s %5d", -max_name, max_name, cur_if->name, + cur_if->mtu); + printf(" %*.*s", -max_route, max_route, cur_if->route); + printf(" %*.*s", -max_ip, max_ip, cur_if->ip); if (oflag) { - printf(" %*s %*s", max_ibytes, cur_if->s_ibytes, - max_obytes, cur_if->s_obytes); + printf(" %*s %*s", max_ibytes, cur_if->s_ibytes, + max_obytes, cur_if->s_obytes); } else { - printf(" %*s %*s", max_ipkts, cur_if->s_ipkts, - max_ierrs, cur_if->s_ierrs); - if (bflag) - printf(" %*s", max_ibytes, cur_if->s_ibytes); - - printf(" %*s %*s", max_opkts, cur_if->s_opkts, - max_oerrs, cur_if->s_oerrs); - if (bflag) - printf(" %*s", max_obytes, cur_if->s_obytes); - printf(" %*s", max_outq, cur_if->s_outq); + printf(" %*s %*s", max_ipkts, cur_if->s_ipkts, + max_ierrs, cur_if->s_ierrs); + if (bflag) + printf(" %*s", max_ibytes, cur_if->s_ibytes); + + printf(" %*s %*s", max_opkts, cur_if->s_opkts, + max_oerrs, cur_if->s_oerrs); + if (bflag) + printf(" %*s", max_obytes, cur_if->s_obytes); + printf(" %*s", max_outq, cur_if->s_outq); } - /* if (tflag) - printf(" %4d", cur_if->???); - */ + /* + * if (tflag) + * printf(" %4d", cur_if->???); + */ if (dflag) printf(" %4d", cur_if->drops); putchar('\n'); } - /* - * ... and tidy up. - */ - for (cur_if = if_head; cur_if; cur_if=if_head) { - if_head=cur_if->next; + /* + * ... and tidy up. + */ + for (cur_if = if_head; cur_if; cur_if = if_head) { + if_head = cur_if->next; cur_if->next = NULL; - SNMP_FREE( cur_if ); + SNMP_FREE(cur_if); } } #define MAXIF 100 -struct iftot { - char ift_name[128]; /* interface name */ - int ifIndex; - u_long ift_ip; /* input packets */ - u_long ift_ib; /* input bytes */ - u_long ift_ie; /* input errors */ - u_long ift_op; /* output packets */ - u_long ift_ob; /* output bytes */ - u_long ift_oe; /* output errors */ - u_long ift_co; /* collisions */ - u_long ift_dr; /* drops */ +struct iftot { + char ift_name[128]; /* interface name */ + int ifIndex; + u_long ift_ip; /* input packets */ + u_long ift_ib; /* input bytes */ + u_long ift_ie; /* input errors */ + u_long ift_op; /* output packets */ + u_long ift_ob; /* output bytes */ + u_long ift_oe; /* output errors */ + u_long ift_co; /* collisions */ + u_long ift_dr; /* drops */ }; -int signalled; /* set if alarm goes off "early" */ +int signalled; /* set if alarm goes off "early" */ /* * Print a running summary of interface statistics. @@ -533,66 +554,68 @@ sidewaysintpr(unsigned int interval) * instance (including ifIndex), rather than just a * column object OID, as with the one-shot code. */ - oid ifcol_oid[] = { 1,3,6,1,2,1,2,2,1,0,0 }; - size_t ifcol_len = OID_LENGTH( ifcol_oid ); + oid ifcol_oid[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 0, 0 }; + size_t ifcol_len = OID_LENGTH(ifcol_oid); netsnmp_variable_list *var, *vp; - struct iftot *ip = NULL, *cur_if = NULL; /* single I/F display */ - struct iftot *sum = NULL, *total = NULL; /* overall summary */ - int line; - int first; - size_t i; + struct iftot *ip = NULL, *cur_if = NULL; /* single I/F display */ + struct iftot *sum = NULL, *total = NULL; /* overall summary */ + int line; + int first; + size_t i; var = NULL; - if ( intrface ) { + if (intrface) { /* * Locate the ifIndex of the interface to monitor, * by walking the ifDescr column of the ifTable */ - ifcol_oid[ ifcol_len-2 ] = 2; /* ifDescr */ - snmp_varlist_add_variable( &var, ifcol_oid, ifcol_len-1, - ASN_NULL, NULL, 0); + ifcol_oid[ifcol_len - 2] = 2; /* ifDescr */ + snmp_varlist_add_variable(&var, ifcol_oid, ifcol_len - 1, + ASN_NULL, NULL, 0); i = strlen(intrface); - netsnmp_query_walk( var, ss ); - for (vp=var; vp; vp=vp->next_variable) { - if (strncmp(intrface, (char *)vp->val.string, i) == 0 && + netsnmp_query_walk(var, ss); + for (vp = var; vp; vp = vp->next_variable) { + if (strncmp(intrface, (char *) vp->val.string, i) == 0 && i == vp->val_len) - break; /* found requested interface */ + break; /* found requested interface */ } /* * XXX - Might be worth searching ifName/ifAlias as well */ if (!vp) { - oid ifname_oid[] = { 1,3,6,1,2,1,31,1,1,1,1,0 }; - size_t ifname_len = OID_LENGTH( ifname_oid ); - snmp_free_var( var ); + oid ifname_oid[] = + { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 1, 0 }; + size_t ifname_len = OID_LENGTH(ifname_oid); + snmp_free_var(var); var = NULL; - snmp_varlist_add_variable( &var, ifname_oid, ifname_len-1, - ASN_NULL, NULL, 0); + snmp_varlist_add_variable(&var, ifname_oid, ifname_len - 1, + ASN_NULL, NULL, 0); i = strlen(intrface); - netsnmp_query_walk( var, ss ); - for (vp=var; vp; vp=vp->next_variable) { - if (strncmp(intrface, (char *)vp->val.string, i) == 0 && + netsnmp_query_walk(var, ss); + for (vp = var; vp; vp = vp->next_variable) { + if (strncmp(intrface, (char *) vp->val.string, i) == 0 && i == vp->val_len) - break; /* found requested interface */ + break; /* found requested interface */ } } if (!vp) { - oid ifalias_oid[] = { 1,3,6,1,2,1,31,1,1,1,18,0 }; - size_t ifalias_len = OID_LENGTH( ifalias_oid ); - snmp_free_var( var ); + oid ifalias_oid[] = + { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 18, 0 }; + size_t ifalias_len = OID_LENGTH(ifalias_oid); + snmp_free_var(var); var = NULL; - snmp_varlist_add_variable( &var, ifalias_oid, ifalias_len-1, - ASN_NULL, NULL, 0); + snmp_varlist_add_variable(&var, ifalias_oid, ifalias_len - 1, + ASN_NULL, NULL, 0); i = strlen(intrface); - netsnmp_query_walk( var, ss ); - for (vp=var; vp; vp=vp->next_variable) { - if (strncmp(intrface, (char *)vp->val.string, i) == 0 && + netsnmp_query_walk(var, ss); + for (vp = var; vp; vp = vp->next_variable) { + if (strncmp(intrface, (char *) vp->val.string, i) == 0 && i == vp->val_len) - break; /* found requested interface */ + break; /* found requested interface */ } } if (!vp) { - fprintf(stderr, "%s: unknown interface\n", intrface ); + fprintf(stderr, "%s: unknown interface\n", intrface); exit(1); } @@ -600,62 +623,67 @@ sidewaysintpr(unsigned int interval) * Prepare the current and previous 'iftot' structures, * and set the ifIndex value in the OID buffer. */ - ip = SNMP_MALLOC_TYPEDEF( struct iftot ); - cur_if = SNMP_MALLOC_TYPEDEF( struct iftot ); + ip = SNMP_MALLOC_TYPEDEF(struct iftot); + cur_if = SNMP_MALLOC_TYPEDEF(struct iftot); if (!ip || !cur_if) { fprintf(stderr, "internal error\n"); exit(1); } - ifcol_oid[ ifcol_len-1 ] = vp->name[ ifcol_len-1 ]; - snmp_free_var( var ); + ifcol_oid[ifcol_len - 1] = vp->name[ifcol_len - 1]; + snmp_free_var(var); var = NULL; } else { /* * Prepare the current and previous 'iftot' structures. * (using different pointers, for consistency with *BSD code) */ - sum = SNMP_MALLOC_TYPEDEF( struct iftot ); - total = SNMP_MALLOC_TYPEDEF( struct iftot ); + sum = SNMP_MALLOC_TYPEDEF(struct iftot); + total = SNMP_MALLOC_TYPEDEF(struct iftot); if (!sum || !total) { fprintf(stderr, "internal error\n"); exit(1); } } - timerSet( interval ); + timerSet(interval); first = 1; -banner: - printf( "%17s %14s %16s", "input", - intrface ? intrface : "(Total)", "output"); + banner: + printf("%17s %14s %16s", "input", + intrface ? intrface : "(Total)", "output"); putchar('\n'); - printf( "%10s %5s %10s %10s %5s %10s %5s", - "packets", "errs", "bytes", "packets", "errs", "bytes", "colls"); + printf("%10s %5s %10s %10s %5s %10s %5s", + "packets", "errs", "bytes", "packets", "errs", "bytes", + "colls"); if (dflag) - printf(" %5.5s", "drops"); + printf(" %5.5s", "drops"); putchar('\n'); fflush(stdout); line = 0; -loop: - if ( intrface ) { + loop: + if (intrface) { #define ADD_IFVAR( x ) ifcol_oid[ ifcol_len-2 ] = x; \ snmp_varlist_add_variable( &var, ifcol_oid, ifcol_len, ASN_NULL, NULL, 0) - /* if (bflag) { */ - ADD_IFVAR( 10 ); /* ifInOctets */ - ADD_IFVAR( 16 ); /* ifOutOctets */ - /* } */ - ADD_IFVAR( 11 ); /* ifInUcastPkts */ - ADD_IFVAR( 12 ); /* ifInNUcastPkts */ - ADD_IFVAR( 14 ); /* ifInErrors */ - ADD_IFVAR( 17 ); /* ifOutUcastPkts */ - ADD_IFVAR( 18 ); /* ifOutNUcastPkts */ - ADD_IFVAR( 20 ); /* ifOutErrors */ - ADD_IFVAR( 21 ); /* ifOutQLen */ + /* + * if (bflag) { + */ + ADD_IFVAR(10); /* ifInOctets */ + ADD_IFVAR(16); /* ifOutOctets */ + /* + * } + */ + ADD_IFVAR(11); /* ifInUcastPkts */ + ADD_IFVAR(12); /* ifInNUcastPkts */ + ADD_IFVAR(14); /* ifInErrors */ + ADD_IFVAR(17); /* ifOutUcastPkts */ + ADD_IFVAR(18); /* ifOutNUcastPkts */ + ADD_IFVAR(20); /* ifOutErrors */ + ADD_IFVAR(21); /* ifOutQLen */ if (dflag) { - ADD_IFVAR( 19 ); /* ifOutDiscards */ + ADD_IFVAR(19); /* ifOutDiscards */ } #undef ADD_IFVAR - netsnmp_query_get( var, ss ); /* Or parallel walk ?? */ + netsnmp_query_get(var, ss); /* Or parallel walk ?? */ cur_if->ift_ip = 0; cur_if->ift_ib = 0; cur_if->ift_ie = 0; @@ -664,142 +692,146 @@ sidewaysintpr(unsigned int interval) cur_if->ift_oe = 0; cur_if->ift_co = 0; cur_if->ift_dr = 0; - cur_if->ifIndex = var->name[ ifcol_len-1 ]; - for (vp=var; vp; vp=vp->next_variable) { + cur_if->ifIndex = var->name[ifcol_len - 1]; + for (vp = var; vp; vp = vp->next_variable) { if ((var->type & 0xF0) == 0x80) /* Exception */ continue; - if ( ! vp->val.integer ) + if (!vp->val.integer) continue; - switch (vp->name[ifcol_len-2]) { - case 10: /* ifInOctets */ + switch (vp->name[ifcol_len - 2]) { + case 10: /* ifInOctets */ cur_if->ift_ib = *vp->val.integer; break; - case 11: /* ifInUcastPkts */ + case 11: /* ifInUcastPkts */ cur_if->ift_ip += *vp->val.integer; break; - case 12: /* ifInNUcastPkts */ + case 12: /* ifInNUcastPkts */ cur_if->ift_ip += *vp->val.integer; break; - case 14: /* ifInErrors */ + case 14: /* ifInErrors */ cur_if->ift_ie = *vp->val.integer; break; - case 16: /* ifOutOctets */ + case 16: /* ifOutOctets */ cur_if->ift_ob = *vp->val.integer; break; - case 17: /* ifOutUcastPkts */ + case 17: /* ifOutUcastPkts */ cur_if->ift_op += *vp->val.integer; break; - case 18: /* ifOutNUcastPkts */ + case 18: /* ifOutNUcastPkts */ cur_if->ift_op += *vp->val.integer; break; - case 19: /* ifOutDiscards */ + case 19: /* ifOutDiscards */ cur_if->ift_dr = *vp->val.integer; break; - case 20: /* ifOutErrors */ + case 20: /* ifOutErrors */ cur_if->ift_oe = *vp->val.integer; break; - case 21: /* ifOutQLen */ + case 21: /* ifOutQLen */ cur_if->ift_co = *vp->val.integer; break; } } - snmp_free_varbind( var ); + snmp_free_varbind(var); var = NULL; - + if (!first) { - printf("%10lu %5lu %10lu %10lu %5lu %10lu %5lu", - cur_if->ift_ip - ip->ift_ip, - cur_if->ift_ie - ip->ift_ie, - cur_if->ift_ib - ip->ift_ib, - cur_if->ift_op - ip->ift_op, - cur_if->ift_oe - ip->ift_oe, - cur_if->ift_ob - ip->ift_ob, - cur_if->ift_co - ip->ift_co); - if (dflag) - printf(" %5lu", cur_if->ift_dr - ip->ift_dr); + printf("%10lu %5lu %10lu %10lu %5lu %10lu %5lu", + cur_if->ift_ip - ip->ift_ip, + cur_if->ift_ie - ip->ift_ie, + cur_if->ift_ib - ip->ift_ib, + cur_if->ift_op - ip->ift_op, + cur_if->ift_oe - ip->ift_oe, + cur_if->ift_ob - ip->ift_ob, + cur_if->ift_co - ip->ift_co); + if (dflag) + printf(" %5lu", cur_if->ift_dr - ip->ift_dr); putchar('\n'); fflush(stdout); - } - ip->ift_ip = cur_if->ift_ip; - ip->ift_ie = cur_if->ift_ie; - ip->ift_ib = cur_if->ift_ib; - ip->ift_op = cur_if->ift_op; - ip->ift_oe = cur_if->ift_oe; - ip->ift_ob = cur_if->ift_ob; - ip->ift_co = cur_if->ift_co; - ip->ift_dr = cur_if->ift_dr; - } /* (single) interface */ + } + ip->ift_ip = cur_if->ift_ip; + ip->ift_ie = cur_if->ift_ie; + ip->ift_ib = cur_if->ift_ib; + ip->ift_op = cur_if->ift_op; + ip->ift_oe = cur_if->ift_oe; + ip->ift_ob = cur_if->ift_ob; + ip->ift_co = cur_if->ift_co; + ip->ift_dr = cur_if->ift_dr; + } /* (single) interface */ else { - sum->ift_ip = 0; - sum->ift_ib = 0; - sum->ift_ie = 0; - sum->ift_op = 0; - sum->ift_ob = 0; - sum->ift_oe = 0; - sum->ift_co = 0; - sum->ift_dr = 0; + sum->ift_ip = 0; + sum->ift_ib = 0; + sum->ift_ie = 0; + sum->ift_op = 0; + sum->ift_ob = 0; + sum->ift_oe = 0; + sum->ift_co = 0; + sum->ift_dr = 0; #define ADD_IFVAR( x ) ifcol_oid[ ifcol_len-2 ] = x; \ snmp_varlist_add_variable( &var, ifcol_oid, ifcol_len-1, ASN_NULL, NULL, 0) - ADD_IFVAR( 11 ); /* ifInUcastPkts */ - ADD_IFVAR( 12 ); /* ifInNUcastPkts */ - ADD_IFVAR( 14 ); /* ifInErrors */ - ADD_IFVAR( 17 ); /* ifOutUcastPkts */ - ADD_IFVAR( 18 ); /* ifOutNUcastPkts */ - ADD_IFVAR( 20 ); /* ifOutErrors */ - ADD_IFVAR( 21 ); /* ifOutQLen */ - /* if (bflag) { */ - ADD_IFVAR( 10 ); /* ifInOctets */ - ADD_IFVAR( 16 ); /* ifOutOctets */ - /* } */ + ADD_IFVAR(11); /* ifInUcastPkts */ + ADD_IFVAR(12); /* ifInNUcastPkts */ + ADD_IFVAR(14); /* ifInErrors */ + ADD_IFVAR(17); /* ifOutUcastPkts */ + ADD_IFVAR(18); /* ifOutNUcastPkts */ + ADD_IFVAR(20); /* ifOutErrors */ + ADD_IFVAR(21); /* ifOutQLen */ + /* + * if (bflag) { + */ + ADD_IFVAR(10); /* ifInOctets */ + ADD_IFVAR(16); /* ifOutOctets */ + /* + * } + */ if (dflag) { - ADD_IFVAR( 19 ); /* ifOutDiscards */ + ADD_IFVAR(19); /* ifOutDiscards */ } #undef ADD_IFVAR - ifcol_oid[ ifcol_len-2 ] = 11; /* ifInUcastPkts */ - while ( 1 ) { - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + ifcol_oid[ifcol_len - 2] = 11; /* ifInUcastPkts */ + while (1) { + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; if ((var->type & 0xF0) == 0x80) /* Exception */ break; - if ( snmp_oid_compare( ifcol_oid, ifcol_len-2, - var->name, ifcol_len-2) != 0 ) - break; /* End of Table */ - - for ( vp=var; vp; vp=vp->next_variable ) { - if ((vp->type & 0xF0) == 0x80) /* Exception */ + if (snmp_oid_compare(ifcol_oid, ifcol_len - 2, + var->name, ifcol_len - 2) != 0) + break; /* End of Table */ + + for (vp = var; vp; vp = vp->next_variable) { + if ((vp->type & 0xF0) == 0x80) /* Exception */ continue; - if ( ! vp->val.integer ) + if (!vp->val.integer) continue; - switch ( vp->name[ ifcol_len-2 ] ) { - case 10: /* ifInOctets */ + switch (vp->name[ifcol_len - 2]) { + case 10: /* ifInOctets */ sum->ift_ib += *vp->val.integer; break; - case 11: /* ifInUcastPkts */ + case 11: /* ifInUcastPkts */ sum->ift_ip += *vp->val.integer; break; - case 12: /* ifInNUcastPkts */ + case 12: /* ifInNUcastPkts */ sum->ift_ip += *vp->val.integer; break; - case 14: /* ifInErrors */ + case 14: /* ifInErrors */ sum->ift_ie += *vp->val.integer; break; - case 16: /* ifOutOctets */ + case 16: /* ifOutOctets */ sum->ift_ob += *vp->val.integer; break; - case 17: /* ifOutUcastPkts */ + case 17: /* ifOutUcastPkts */ sum->ift_op += *vp->val.integer; break; - case 18: /* ifOutNUcastPkts */ + case 18: /* ifOutNUcastPkts */ sum->ift_op += *vp->val.integer; break; - case 19: /* ifOutDiscards */ + case 19: /* ifOutDiscards */ sum->ift_dr += *vp->val.integer; break; - case 20: /* ifOutErrors */ + case 20: /* ifOutErrors */ sum->ift_oe += *vp->val.integer; break; - case 21: /* ifOutQLen */ + case 21: /* ifOutQLen */ sum->ift_co += *vp->val.integer; break; } @@ -807,123 +839,42 @@ sidewaysintpr(unsigned int interval) /* * Now loop to retrieve the next entry from the table. */ - } /* while (1) */ + } /* while (1) */ - snmp_free_varbind( var ); + snmp_free_varbind(var); var = NULL; - + if (!first) { - printf("%10lu %5lu %10lu %10lu %5lu %10lu %5lu", - sum->ift_ip - total->ift_ip, - sum->ift_ie - total->ift_ie, - sum->ift_ib - total->ift_ib, - sum->ift_op - total->ift_op, - sum->ift_oe - total->ift_oe, - sum->ift_ob - total->ift_ob, - sum->ift_co - total->ift_co); - if (dflag) - printf(" %5lu", sum->ift_dr - total->ift_dr); + printf("%10lu %5lu %10lu %10lu %5lu %10lu %5lu", + sum->ift_ip - total->ift_ip, + sum->ift_ie - total->ift_ie, + sum->ift_ib - total->ift_ib, + sum->ift_op - total->ift_op, + sum->ift_oe - total->ift_oe, + sum->ift_ob - total->ift_ob, + sum->ift_co - total->ift_co); + if (dflag) + printf(" %5lu", sum->ift_dr - total->ift_dr); putchar('\n'); fflush(stdout); - } - total->ift_ip = sum->ift_ip; - total->ift_ie = sum->ift_ie; - total->ift_ib = sum->ift_ib; - total->ift_op = sum->ift_op; - total->ift_oe = sum->ift_oe; - total->ift_ob = sum->ift_ob; - total->ift_co = sum->ift_co; - total->ift_dr = sum->ift_dr; - } /* overall summary */ + } + total->ift_ip = sum->ift_ip; + total->ift_ie = sum->ift_ie; + total->ift_ib = sum->ift_ib; + total->ift_op = sum->ift_op; + total->ift_oe = sum->ift_oe; + total->ift_ob = sum->ift_ob; + total->ift_co = sum->ift_co; + total->ift_dr = sum->ift_dr; + } /* overall summary */ timerPause(); timerSet(interval); line++; first = 0; if (line == 21) - goto banner; + goto banner; else - goto loop; + goto loop; /*NOTREACHED*/ } - - -/* - * timerSet sets or resets the timer to fire in "interval" seconds. - * timerPause waits only if the timer has not fired. - * timing precision is not considered important. - */ - -#if (defined(WIN32) || defined(cygwin)) -static int sav_int; -static time_t timezup; -static void -timerSet(int interval_seconds) -{ - sav_int = interval_seconds; - timezup = time(0) + interval_seconds; -} - -/* - * you can do better than this ! - */ -static void -timerPause(void) -{ - time_t now; - while (time(&now) < timezup) -#ifdef WIN32 - Sleep(400); -#else - { - struct timeval tx; - tx.tv_sec = 0; - tx.tv_usec = 400 * 1000; /* 400 milliseconds */ - select(0, 0, 0, 0, &tx); - } -#endif -} - -#else - -/* - * Called if an interval expires before sidewaysintpr has completed a loop. - * Sets a flag to not wait for the alarm. - */ -RETSIGTYPE -catchalarm(int sig) -{ - signalled = YES; -} - -static void -timerSet(int interval_seconds) -{ -#ifdef HAVE_SIGSET - (void) sigset(SIGALRM, catchalarm); -#else - (void) signal(SIGALRM, catchalarm); -#endif - signalled = NO; - (void) alarm(interval_seconds); -} - -static void -timerPause(void) -{ -#ifdef HAVE_SIGHOLD - sighold(SIGALRM); - if (!signalled) { - sigpause(SIGALRM); - } -#else - int oldmask; - oldmask = sigblock(sigmask(SIGALRM)); - if (!signalled) { - sigpause(0); - } - sigsetmask(oldmask); -#endif -} - -#endif /* !WIN32 && !cygwin */ diff --git a/apps/snmpnetstat/inet.c b/apps/snmpnetstat/inet.c index 0537340..f27c0d8 100644 --- a/apps/snmpnetstat/inet.c +++ b/apps/snmpnetstat/inet.c @@ -1,9 +1,13 @@ -/* $OpenBSD: inet.c,v 1.92 2005/02/10 14:25:08 itojun Exp $ */ -/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ +/* + * $OpenBSD: inet.c,v 1.92 2005/02/10 14:25:08 itojun Exp $ + */ +/* + * $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ + */ /* * Copyright (c) 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,34 +34,25 @@ * SUCH DAMAGE. */ -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; -#else -static const char *rcsid = "$OpenBSD: inet.c,v 1.92 2005/02/10 14:25:08 itojun Exp $"; -#endif -#endif /* not lint */ -#endif - #include -#if HAVE_UNISTD_H +#include +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_WINSOCK_H +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -67,21 +62,20 @@ static const char *rcsid = "$OpenBSD: inet.c,v 1.92 2005/02/10 14:25:08 itojun E #include "netstat.h" struct stat_table { - unsigned int entry; /* entry number in table */ + unsigned int entry; /* entry number in table */ /* - * format string to printf(description, value) - * warning: the %d must be before the %s + * format string to printf(description, value) + * warning: the %d must be before the %s */ char description[80]; }; -char *inetname(struct in_addr *); -void inetprint(struct in_addr *, int, const char *, int); +static char *inetname(const struct in_addr *); - /* - * Print a summary of connections related to - * an Internet protocol (kread-based) - Omitted - */ + /* + * Print a summary of connections related to + * an Internet protocol (kread-based) - Omitted + */ /* * Print a summary of TCP connections @@ -102,87 +96,90 @@ const char *tcpstates[] = { "CLOSING", "TIMEWAIT" }; + #define TCP_NSTATES 11 static void -tcpprotoprint_line(const char *name, netsnmp_variable_list *vp, int *first) +tcpprotoprint_line(const char *name, netsnmp_variable_list * vp, + int *first) { - int state, width; - char *cp; + int state, width; + char *cp; union { - struct in_addr addr; - char data[4]; + struct in_addr addr; + char data[4]; } tmpAddr; - oid localPort, remotePort; - struct in_addr localAddr, remoteAddr; - - state = *vp->val.integer; - if (!aflag && state == MIB_TCPCONNSTATE_LISTEN) { - return; - } - - if (*first) { - printf("Active Internet (%s) Connections", name); - if (aflag) - printf(" (including servers)"); - putchar('\n'); - width = 27; - printf("%-5.5s %*.*s %*.*s %s\n", - "Proto", -width, width, "Local Address", - -width, width, "Remote Address", "(state)"); - *first = 0; - } - - /* Extract the local/remote information from the index values */ - cp = tmpAddr.data; - cp[0] = (uint8_t) vp->name[10]; - cp[1] = (uint8_t) vp->name[11]; - cp[2] = (uint8_t) vp->name[12]; - cp[3] = (uint8_t) vp->name[13]; - localAddr.s_addr = tmpAddr.addr.s_addr; - localPort = vp->name[ 14 ]; - cp = tmpAddr.data; - cp[0] = (uint8_t) vp->name[15]; - cp[1] = (uint8_t) vp->name[16]; - cp[2] = (uint8_t) vp->name[17]; - cp[3] = (uint8_t) vp->name[18]; - remoteAddr.s_addr = tmpAddr.addr.s_addr; - remotePort = vp->name[ 19 ]; - - printf("%-5.5s", name); - inetprint(&localAddr, localPort, name, 1); - inetprint(&remoteAddr, remotePort, name, 0); - if (state < 1 || state > TCP_NSTATES) { - printf(" %d\n", state ); - } else { - printf(" %s\n", tcpstates[state]); - } + oid localPort, remotePort; + struct in_addr localAddr, remoteAddr; + + state = *vp->val.integer; + if (!aflag && state == MIB_TCPCONNSTATE_LISTEN) { + return; + } + + if (*first) { + printf("Active Internet (%s) Connections", name); + if (aflag) + printf(" (including servers)"); + putchar('\n'); + width = 27; + printf("%-5.5s %*.*s %*.*s %s\n", + "Proto", -width, width, "Local Address", + -width, width, "Remote Address", "(state)"); + *first = 0; + } + + /* + * Extract the local/remote information from the index values + */ + cp = tmpAddr.data; + cp[0] = (uint8_t) vp->name[10]; + cp[1] = (uint8_t) vp->name[11]; + cp[2] = (uint8_t) vp->name[12]; + cp[3] = (uint8_t) vp->name[13]; + localAddr.s_addr = tmpAddr.addr.s_addr; + localPort = vp->name[14]; + cp = tmpAddr.data; + cp[0] = (uint8_t) vp->name[15]; + cp[1] = (uint8_t) vp->name[16]; + cp[2] = (uint8_t) vp->name[17]; + cp[3] = (uint8_t) vp->name[18]; + remoteAddr.s_addr = tmpAddr.addr.s_addr; + remotePort = vp->name[19]; + + printf("%-5.5s", name); + inetprint(&localAddr, localPort, name, 1); + inetprint(&remoteAddr, remotePort, name, 0); + if (state < 1 || state > TCP_NSTATES) { + printf(" %d\n", state); + } else { + printf(" %s\n", tcpstates[state]); + } } static void -tcpprotopr_get(const char *name, oid *root, size_t root_len) +tcpprotopr_get(const char *name, oid * root, size_t root_len) { netsnmp_variable_list *var, *vp; - int first = 1; + int first = 1; /* * Walking the tcpConnState column will provide all * the necessary information. */ var = NULL; - snmp_varlist_add_variable( &var, root, root_len, - ASN_NULL, NULL, 0); + snmp_varlist_add_variable(&var, root, root_len, ASN_NULL, NULL, 0); if (!var) return; - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) + return; + if ((var->type & 0xF0) == 0x80) /* Exception */ return; - if ((var->type & 0xF0) == 0x80) /* Exception */ - return; - for (vp = var; vp ; vp=vp->next_variable) { + for (vp = var; vp; vp = vp->next_variable) { tcpprotoprint_line(name, vp, &first); } - snmp_free_varbind( var ); + snmp_free_varbind(var); } /* @@ -193,33 +190,38 @@ void udpprotopr(const char *name) { netsnmp_variable_list *var, *vp; - oid udpLocalAddress_oid[] = { 1,3,6,1,2,1,7,5,1,1 }; - size_t udpLocalAddress_len = OID_LENGTH( udpLocalAddress_oid ); + oid udpLocalAddress_oid[] = + { 1, 3, 6, 1, 2, 1, 7, 5, 1, 1 }; + size_t udpLocalAddress_len = OID_LENGTH(udpLocalAddress_oid); union { - struct in_addr addr; - char data[4]; + struct in_addr addr; + char data[4]; } tmpAddr; - struct in_addr localAddr; - oid localPort; - char *cp; + struct in_addr localAddr; + oid localPort; + char *cp; /* * Walking a single column of the udpTable will provide * all the necessary information from the index values. */ var = NULL; - snmp_varlist_add_variable( &var, udpLocalAddress_oid, udpLocalAddress_len, - ASN_NULL, NULL, 0); + snmp_varlist_add_variable(&var, udpLocalAddress_oid, + udpLocalAddress_len, ASN_NULL, NULL, 0); if (!var) return; - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) { + snmp_free_varbind(var); return; - if ((var->type & 0xF0) == 0x80) /* Exception */ - return; + } + if ((var->type & 0xF0) == 0x80) { /* Exception */ + snmp_free_varbind(var); + return; + } printf("Active Internet (%s) Connections\n", name); printf("%-5.5s %-27.27s\n", "Proto", "Local Address"); - for (vp = var; vp ; vp=vp->next_variable) { + for (vp = var; vp; vp = vp->next_variable) { printf("%-5.5s", name); /* * Extract the local port from the index values, but take @@ -232,41 +234,41 @@ udpprotopr(const char *name) cp[2] = (uint8_t) vp->name[12]; cp[3] = (uint8_t) vp->name[13]; localAddr.s_addr = tmpAddr.addr.s_addr; - localPort = vp->name[ 14 ]; + localPort = vp->name[14]; inetprint(&localAddr, localPort, name, 1); putchar('\n'); } - snmp_free_varbind( var ); + snmp_free_varbind(var); } void -tcpprotopr_bulkget(const char *name, oid *root, size_t root_len) +tcpprotopr_bulkget(const char *name, oid * root, size_t root_len) { netsnmp_variable_list *vp; - netsnmp_pdu *pdu, *response; + netsnmp_pdu *pdu, *response; oid tcpConnState_oid[MAX_OID_LEN]; - size_t tcpConnState_len; - int first = 1; - int running = 1; - int status; + size_t tcpConnState_len; + int first = 1; + int running = 1; + int status; - /* + /* * setup initial object name */ - memmove(tcpConnState_oid, root, sizeof(oid) * root_len); - tcpConnState_len = root_len; + memmove(tcpConnState_oid, root, sizeof(oid) * root_len); + tcpConnState_len = root_len; /* * Walking the tcpConnState column will provide all * the necessary information. */ - while (running) { + while (running) { /* * create PDU for GETBULK request and add object name to request */ pdu = snmp_pdu_create(SNMP_MSG_GETBULK); pdu->non_repeaters = 0; - pdu->max_repetitions = max_getbulk; /* fill the packet */ + pdu->max_repetitions = max_getbulk; /* fill the packet */ snmp_add_null_var(pdu, tcpConnState_oid, tcpConnState_len); /* @@ -275,9 +277,10 @@ tcpprotopr_bulkget(const char *name, oid *root, size_t root_len) status = snmp_synch_response(ss, pdu, &response); if (status == STAT_SUCCESS) { if (response->errstat == SNMP_ERR_NOERROR) { - for (vp = response->variables; vp ; vp=vp->next_variable) { + for (vp = response->variables; vp; vp = vp->next_variable) { if ((vp->name_length < root_len) || - (memcmp(root, vp->name, sizeof(oid) * root_len) != 0)) { + (memcmp(root, vp->name, sizeof(oid) * root_len) != + 0)) { /* * not part of this subtree */ @@ -289,7 +292,7 @@ tcpprotopr_bulkget(const char *name, oid *root, size_t root_len) (vp->type != SNMP_NOSUCHOBJECT) && (vp->type != SNMP_NOSUCHINSTANCE)) { - tcpprotoprint_line(name, vp, &first); + tcpprotoprint_line(name, vp, &first); /* * Check if last variable, and if so, save for next request. @@ -305,7 +308,7 @@ tcpprotopr_bulkget(const char *name, oid *root, size_t root_len) */ running = 0; } - } + } } else { /* * error in response, print it @@ -320,16 +323,16 @@ tcpprotopr_bulkget(const char *name, oid *root, size_t root_len) if (response) { snmp_free_pdu(response); - } - } + } + } } void tcpprotopr(const char *name) { - oid tcpConnState_oid[] = { 1,3,6,1,2,1,6,13,1,1 }; - size_t tcpConnState_len = OID_LENGTH( tcpConnState_oid ); - int use_getbulk = 1; + oid tcpConnState_oid[] = { 1, 3, 6, 1, 2, 1, 6, 13, 1, 1 }; + size_t tcpConnState_len = OID_LENGTH(tcpConnState_oid); + int use_getbulk = 1; #ifndef NETSNMP_DISABLE_SNMPV1 if (ss->version == SNMP_VERSION_1) { @@ -338,48 +341,50 @@ tcpprotopr(const char *name) #endif if (use_getbulk) { - tcpprotopr_bulkget(name, tcpConnState_oid, tcpConnState_len); + tcpprotopr_bulkget(name, tcpConnState_oid, tcpConnState_len); } else { - tcpprotopr_get(name, tcpConnState_oid, tcpConnState_len); + tcpprotopr_get(name, tcpConnState_oid, tcpConnState_len); } } - /********************* + /********************* * * Internet-protocol statistics * *********************/ void -_dump_stats( const char *name, oid *oid_buf, size_t buf_len, - struct stat_table *stable ) +_dump_stats(const char *name, oid * oid_buf, size_t buf_len, + struct stat_table *stable) { netsnmp_variable_list *var, *vp; - struct stat_table *sp; - oid stat; + struct stat_table *sp; + oid stat; var = NULL; - for (sp=stable; sp->entry; sp++) { - oid_buf[buf_len-2] = sp->entry; - snmp_varlist_add_variable( &var, oid_buf, buf_len, - ASN_NULL, NULL, 0); + for (sp = stable; sp->entry; sp++) { + oid_buf[buf_len - 2] = sp->entry; + snmp_varlist_add_variable(&var, oid_buf, buf_len, + ASN_NULL, NULL, 0); } - - if (netsnmp_query_get( var, ss ) != SNMP_ERR_NOERROR) { - /* Need to fix and re-try SNMPv1 errors */ - snmp_free_var( var ); + + if (netsnmp_query_get(var, ss) != SNMP_ERR_NOERROR) { + /* + * Need to fix and re-try SNMPv1 errors + */ + snmp_free_varbind(var); return; } printf("%s:\n", name); - sp=stable; - for (vp=var; vp; vp=vp->next_variable, sp++) { + sp = stable; + for (vp = var; vp; vp = vp->next_variable, sp++) { /* * Match the returned results against * the original stats table. */ - stat = vp->name[buf_len-2]; + stat = vp->name[buf_len - 2]; while (sp->entry < stat) { sp++; if (sp->entry == 0) @@ -388,20 +393,22 @@ _dump_stats( const char *name, oid *oid_buf, size_t buf_len, if (sp->entry > stat) continue; - /* Skip exceptions or missing values */ - if ( !vp->val.integer ) + /* + * Skip exceptions or missing values + */ + if (!vp->val.integer) continue; /* * If '-Cs' was specified twice, * then only display non-zero stats. */ - if ( *vp->val.integer > 0 || sflag == 1 ) { + if (*vp->val.integer > 0 || sflag == 1) { printf(sp->description, *vp->val.integer, - plural(*vp->val.integer)); + plural(*vp->val.integer)); putchar('\n'); } } - snmp_free_varbind( var ); + snmp_free_varbind(var); } @@ -411,30 +418,30 @@ _dump_stats( const char *name, oid *oid_buf, size_t buf_len, void ip_stats(const char *name) { - oid ipstats_oid[] = { 1, 3, 6, 1, 2, 1, 4, 0, 0 }; - size_t ipstats_len = OID_LENGTH( ipstats_oid ); + oid ipstats_oid[] = { 1, 3, 6, 1, 2, 1, 4, 0, 0 }; + size_t ipstats_len = OID_LENGTH(ipstats_oid); struct stat_table ipstats_tbl[] = { - { 3, "%14d total datagram%s received"}, - { 4, "%14d datagram%s with header errors"}, - { 5, "%14d datagram%s with an invalid destination address"}, - { 6, "%14d datagram%s forwarded"}, - { 7, "%14d datagram%s with unknown protocol"}, - { 8, "%14d datagram%s discarded"}, - { 9, "%14d datagram%s delivered"}, - {10, "%14d output datagram request%s"}, - {11, "%14d output datagram%s discarded"}, - {12, "%14d datagram%s with no route"}, - {14, "%14d fragment%s received"}, - {15, "%14d datagram%s reassembled"}, - {16, "%14d reassembly failure%s"}, - {17, "%14d datagram%s fragmented"}, - {18, "%14d fragmentation failure%s"}, - {19, "%14d fragment%s created"}, - {23, "%14d route%s discarded"}, - { 0, ""} + {3, "%14lu total datagram%s received"}, + {4, "%14lu datagram%s with header errors"}, + {5, "%14lu datagram%s with an invalid destination address"}, + {6, "%14lu datagram%s forwarded"}, + {7, "%14lu datagram%s with unknown protocol"}, + {8, "%14lu datagram%s discarded"}, + {9, "%14lu datagram%s delivered"}, + {10, "%14lu output datagram request%s"}, + {11, "%14lu output datagram%s discarded"}, + {12, "%14lu datagram%s with no route"}, + {14, "%14lu fragment%s received"}, + {15, "%14lu datagram%s reassembled"}, + {16, "%14lu reassembly failure%s"}, + {17, "%14lu datagram%s fragmented"}, + {18, "%14lu fragmentation failure%s"}, + {19, "%14lu fragment%s created"}, + {23, "%14lu route%s discarded"}, + {0, ""} }; - _dump_stats( name, ipstats_oid, ipstats_len, ipstats_tbl ); + _dump_stats(name, ipstats_oid, ipstats_len, ipstats_tbl); } @@ -444,49 +451,49 @@ ip_stats(const char *name) void icmp_stats(const char *name) { - oid icmpstats_oid[] = { 1, 3, 6, 1, 2, 1, 5, 0, 0 }; - size_t icmpstats_len = OID_LENGTH( icmpstats_oid ); + oid icmpstats_oid[] = { 1, 3, 6, 1, 2, 1, 5, 0, 0 }; + size_t icmpstats_len = OID_LENGTH(icmpstats_oid); struct stat_table icmpstats_tbl[] = { - { 1, "%14d total message%s received"}, - { 2, "%14d message%s dropped due to errors"}, - {14, "%14d ouput message request%s"}, - {15, "%14d output message%s discarded"}, - { 0, ""} + {1, "%14lu total message%s received"}, + {2, "%14lu message%s dropped due to errors"}, + {14, "%14lu ouput message request%s"}, + {15, "%14lu output message%s discarded"}, + {0, ""} }; struct stat_table icmp_inhistogram[] = { - { 3, " Destination unreachable: %d"}, - { 4, " Time Exceeded: %d"}, - { 5, " Parameter Problem: %d"}, - { 6, " Source Quench: %d"}, - { 7, " Redirect: %d"}, - { 8, " Echo Request: %d"}, - { 9, " Echo Reply: %d"}, - {10, " Timestamp Request: %d"}, - {11, " Timestamp Reply: %d"}, - {12, " Address Mask Request: %d"}, - {13, " Address Mask Reply: %d"}, - { 0, ""} + {3, " Destination unreachable: %lu"}, + {4, " Time Exceeded: %lu"}, + {5, " Parameter Problem: %lu"}, + {6, " Source Quench: %lu"}, + {7, " Redirect: %lu"}, + {8, " Echo Request: %lu"}, + {9, " Echo Reply: %lu"}, + {10, " Timestamp Request: %lu"}, + {11, " Timestamp Reply: %lu"}, + {12, " Address Mask Request: %lu"}, + {13, " Address Mask Reply: %lu"}, + {0, ""} }; struct stat_table icmp_outhistogram[] = { - {16, " Destination unreachable: %d"}, - {17, " Time Exceeded: %d"}, - {18, " Parameter Problem: %d"}, - {19, " Source Quench: %d"}, - {20, " Redirect: %d"}, - {21, " Echo Request: %d"}, - {22, " Echo Reply: %d"}, - {23, " Timestamp Request: %d"}, - {24, " Timestamp Reply: %d"}, - {25, " Address Mask Request: %d"}, - {26, " Address Mask Reply: %d"}, + {16, " Destination unreachable: %lu"}, + {17, " Time Exceeded: %lu"}, + {18, " Parameter Problem: %lu"}, + {19, " Source Quench: %lu"}, + {20, " Redirect: %lu"}, + {21, " Echo Request: %lu"}, + {22, " Echo Reply: %lu"}, + {23, " Timestamp Request: %lu"}, + {24, " Timestamp Reply: %lu"}, + {25, " Address Mask Request: %lu"}, + {26, " Address Mask Reply: %lu"}, {0, ""} }; - _dump_stats( name, icmpstats_oid, icmpstats_len, icmpstats_tbl ); - _dump_stats( " Input Histogram", - icmpstats_oid, icmpstats_len, icmp_inhistogram ); - _dump_stats( " Output Histogram", - icmpstats_oid, icmpstats_len, icmp_outhistogram ); + _dump_stats(name, icmpstats_oid, icmpstats_len, icmpstats_tbl); + _dump_stats(" Input Histogram", + icmpstats_oid, icmpstats_len, icmp_inhistogram); + _dump_stats(" Output Histogram", + icmpstats_oid, icmpstats_len, icmp_outhistogram); } @@ -496,22 +503,22 @@ icmp_stats(const char *name) void tcp_stats(const char *name) { - oid tcpstats_oid[] = { 1, 3, 6, 1, 2, 1, 6, 0, 0 }; - size_t tcpstats_len = OID_LENGTH( tcpstats_oid ); + oid tcpstats_oid[] = { 1, 3, 6, 1, 2, 1, 6, 0, 0 }; + size_t tcpstats_len = OID_LENGTH(tcpstats_oid); struct stat_table tcpstats_tbl[] = { - { 5, "%14d active open%s"}, - { 6, "%14d passive open%s"}, - { 7, "%14d failed attempt%s"}, - { 8, "%14d reset%s of established connections"}, - { 9, "%14d currently established connection%s"}, - {10, "%14d segment%s received"}, - {11, "%14d segment%s sent"}, - {12, "%14d segment%s retransmitted"}, - {14, "%14d invalid segment%s received"}, - {15, "%14d reset%s sent"}, - { 0, ""} + {5, "%14lu active open%s"}, + {6, "%14lu passive open%s"}, + {7, "%14lu failed attempt%s"}, + {8, "%14lu reset%s of established connections"}, + {9, "%14lu currently established connection%s"}, + {10, "%14lu segment%s received"}, + {11, "%14lu segment%s sent"}, + {12, "%14lu segment%s retransmitted"}, + {14, "%14lu invalid segment%s received"}, + {15, "%14lu reset%s sent"}, + {0, ""} }; - _dump_stats( "tcp", tcpstats_oid, tcpstats_len, tcpstats_tbl ); + _dump_stats("tcp", tcpstats_oid, tcpstats_len, tcpstats_tbl); } @@ -521,16 +528,16 @@ tcp_stats(const char *name) void udp_stats(const char *name) { - oid udpstats_oid[] = { 1, 3, 6, 1, 2, 1, 7, 0, 0 }; - size_t udpstats_len = OID_LENGTH( udpstats_oid ); + oid udpstats_oid[] = { 1, 3, 6, 1, 2, 1, 7, 0, 0 }; + size_t udpstats_len = OID_LENGTH(udpstats_oid); struct stat_table udpstats_tbl[] = { - {1, "%14d total datagram%s received"}, - {2, "%14d datagram%s to invalid port"}, - {3, "%14d datagram%s dropped due to errors"}, - {4, "%14d output datagram request%s"}, + {1, "%14lu total datagram%s received"}, + {2, "%14lu datagram%s to invalid port"}, + {3, "%14lu datagram%s dropped due to errors"}, + {4, "%14lu output datagram request%s"}, {0, ""} }; - _dump_stats( "udp", udpstats_oid, udpstats_len, udpstats_tbl ); + _dump_stats("udp", udpstats_oid, udpstats_len, udpstats_tbl); } @@ -547,9 +554,9 @@ udp_stats(const char *name) * Dump IPCOMP statistics */ - /* - * Utility routines - */ + /* + * Utility routines + */ /* * Translation of RPC service names - Omitted @@ -560,30 +567,30 @@ udp_stats(const char *name) * If the nflag was specified, use numbers instead of names. */ void -inetprint(struct in_addr *in, int port, const char *proto, int local) +inetprint(const struct in_addr *in, int port, const char *proto, int local) { - struct servent *sp = NULL; - char line[80], *cp; - int width = 27; - - if (vflag) - snprintf(line, sizeof line, "%s.", inetname(in)); - else - snprintf(line, sizeof line, "%.*s.", width-9, inetname(in)); - cp = strchr(line, '\0'); - if (!nflag && port) - sp = getservbyport(htons((uint16_t) port), proto); - if (sp || port == 0) - snprintf(cp, line + sizeof line - cp, vflag ? "%s" : "%.8s", - sp ? sp->s_name : "*"); - /* - * Translation of RPC service names - Omitted - */ - else - snprintf(cp, line + sizeof line - cp, "%d", port); - if (vflag && width < strlen(line)) - width = strlen(line); - printf(" %-*.*s", width, width, line); + struct servent *sp = NULL; + char line[80], *cp; + int width = 27; + + if (vflag) + snprintf(line, sizeof line, "%s.", inetname(in)); + else + snprintf(line, sizeof line, "%.*s.", width - 9, inetname(in)); + cp = strchr(line, '\0'); + if (!nflag && port) + sp = getservbyport(htons((uint16_t) port), proto); + if (sp || port == 0) + snprintf(cp, line + sizeof line - cp, vflag ? "%s" : "%.8s", + sp ? sp->s_name : "*"); + /* + * Translation of RPC service names - Omitted + */ + else + snprintf(cp, line + sizeof line - cp, "%d", port); + if (vflag && width < strlen(line)) + width = strlen(line); + printf(" %-*.*s", width, width, line); } /* @@ -591,67 +598,59 @@ inetprint(struct in_addr *in, int port, const char *proto, int local) * If the nflag has been supplied, give * numeric value, otherwise try for symbolic name. */ -char * -inetname(struct in_addr *inp) +char * +inetname(const struct in_addr *inp) { - char *cp; - static char line[50]; - struct hostent *hp; - struct netent *np; - static char domain[MAXHOSTNAMELEN]; - static int first = 1; -#if defined (WIN32) || defined (cygwin) - char host_temp[] = "localhost"; -#endif + char *cp; + static char line[50]; + struct netent *np; + static char domain[MAXHOSTNAMELEN]; + static int first = 1; + + if (first && !nflag) { + char tmp[MAXHOSTNAMELEN]; + first = 0; + if (gethostname(tmp, sizeof(tmp)) == 0 && (cp = strchr(tmp, '.'))) + (void) strlcpy(domain, cp + 1, sizeof domain); + else + domain[0] = '\0'; + } + if (inp->s_addr == INADDR_ANY) { + strlcpy(line, "*", sizeof(line)); + } else { + char host[16]; - if (first && !nflag) { - char tmp[MAXHOSTNAMELEN]; - first = 0; - if (gethostname(tmp, sizeof(tmp)) == 0 && - (cp = strchr(tmp, '.'))) - (void) strlcpy(domain, cp + 1, sizeof domain); - else - domain[0] = '\0'; - } - cp = NULL; - if (!nflag && inp->s_addr != INADDR_ANY) { - int net = inet_netof(*inp); - int lna = inet_lnaof(*inp); - - if (lna == INADDR_ANY) { - np = getnetbyaddr(net, AF_INET); - if (np) - cp = np->n_name; - } - if (cp == NULL) { - hp = netsnmp_gethostbyaddr((char *)inp, sizeof (*inp), - AF_INET); - if (hp) { - if ((cp = strchr(hp->h_name, '.')) && - !strcmp(cp + 1, domain)) - *cp = '\0'; + cp = NULL; + if (!nflag && inet_lnaof(*inp) == INADDR_ANY) { + np = getnetbyaddr(inet_netof(*inp), AF_INET); + if (np) + cp = np->n_name; + } + if (cp == NULL) { + struct sockaddr_in sin; + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_addr = *inp; + if (getnameinfo((struct sockaddr *) &sin, sizeof(sin), + host, sizeof(host), NULL, 0, + nflag ? NI_NUMERICHOST : 0) < 0) + strlcpy(host, "?", sizeof(host)); + if ((cp = strchr(host, '.')) && !strcmp(cp + 1, domain)) + *cp = '\0'; #if defined (WIN32) || defined (cygwin) - /* Windows insists on returning the computer name for 127.0.0.1 - * even if the hosts file lists something else such as 'localhost'. - * If we are trying to look up 127.0.0.1, just return 'localhost' */ - if (!strcmp(inet_ntoa(*inp),"127.0.0.1")) - cp = host_temp; - else -#endif - cp = hp->h_name; - } - } - } - if (inp->s_addr == INADDR_ANY) - snprintf(line, sizeof line, "*"); - else if (cp) - snprintf(line, sizeof line, "%s", cp); - else { - inp->s_addr = ntohl(inp->s_addr); -#define C(x) (unsigned)((x) & 0xff) - snprintf(line, sizeof line, "%u.%u.%u.%u", - C(inp->s_addr >> 24), C(inp->s_addr >> 16), - C(inp->s_addr >> 8), C(inp->s_addr)); - } - return (line); + /* + * Windows insists on returning the computer name for + * 127.0.0.1 even if the hosts file lists something + * else such as 'localhost'. If we are trying to look + * up 127.0.0.1, just return 'localhost'. + */ + if (inp->s_addr == htonl(INADDR_LOOPBACK)) + strlcpy(host, "localhost", sizeof(host)); +#endif + cp = host; + } + strlcpy(line, cp, sizeof(line)); + } + return line; } diff --git a/apps/snmpnetstat/inet6.c b/apps/snmpnetstat/inet6.c index 7109b87..574ca6d 100644 --- a/apps/snmpnetstat/inet6.c +++ b/apps/snmpnetstat/inet6.c @@ -1,8 +1,12 @@ -/* $OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $ */ -/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ +/* + * $OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $ + */ +/* + * BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp + */ /* * Copyright (c) 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,39 +33,28 @@ * SUCH DAMAGE. */ -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; -#else -/*__RCSID("$OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $");*/ -/*__RCSID("KAME Id: inet6.c,v 1.10 2000/02/09 10:49:31 itojun Exp");*/ -#endif -#endif /* not lint */ -#endif - #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_WINSOCK_H +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -71,16 +64,15 @@ static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #include "netstat.h" struct stat_table { - unsigned int entry; /* entry number in table */ + unsigned int entry; /* entry number in table */ /* - * format string to printf(description, value) - * warning: the %d must be before the %s + * format string to printf(description, value) + * warning: the %d must be before the %s */ char description[80]; }; -char *inet6name(const unsigned char *); -void inet6print(unsigned char *, int, const char *, int); +static char *inet6name(const struct in6_addr *); /* * Print a summary of TCPv6 connections @@ -101,33 +93,35 @@ const char *tcp6states[] = { "CLOSING", "TIMEWAIT" }; + #define TCP_NSTATES 11 void tcp6protopr(const char *name) { netsnmp_variable_list *var, *vp; - oid ipv6TcpConnState_oid[] = { 1,3,6,1,2,1,6,16,1,6 }; - size_t ipv6TcpConnState_len = OID_LENGTH( ipv6TcpConnState_oid ); - int state, i; + oid ipv6TcpConnState_oid[] = + { 1, 3, 6, 1, 2, 1, 6, 16, 1, 6 }; + size_t ipv6TcpConnState_len = + OID_LENGTH(ipv6TcpConnState_oid); + int state, i; unsigned char localAddr[16], remoteAddr[16]; - int localPort, remotePort, ifIndex; - int first = 1; + int localPort, remotePort, ifIndex; + int first = 1; /* * Walking the v6 tcpConnState column will provide all * the necessary information. */ var = NULL; - snmp_varlist_add_variable( &var, ipv6TcpConnState_oid, - ipv6TcpConnState_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + snmp_varlist_add_variable(&var, ipv6TcpConnState_oid, + ipv6TcpConnState_len, ASN_NULL, NULL, 0); + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) return; - if ((var->type & 0xF0) == 0x80) /* exception */ + if ((var->type & 0xF0) == 0x80) /* exception */ return; - for (vp = var; vp ; vp=vp->next_variable) { + for (vp = var; vp; vp = vp->next_variable) { state = *vp->val.integer; if (!aflag && state == MIB_TCPCONNSTATE_LISTEN) continue; @@ -138,28 +132,31 @@ tcp6protopr(const char *name) printf(" (including servers)"); putchar('\n'); printf("%-5.5s %-27.27s %-27.27s %4s %s\n", - "Proto", "Local Address", "Remote Address", "I/F", "(state)"); + "Proto", "Local Address", "Remote Address", "I/F", + "(state)"); first = 0; } - - /* Extract the local/remote information from the index values */ - for (i=0; i<16; i++) - localAddr[i] = vp->name[ 10+i ]; - localPort = vp->name[ 26 ]; - for (i=0; i<16; i++) - remoteAddr[i] = vp->name[ 27+i ]; - remotePort = vp->name[ 43 ]; - ifIndex = vp->name[ 44 ]; + + /* + * Extract the local/remote information from the index values + */ + for (i = 0; i < 16; i++) + localAddr[i] = vp->name[10 + i]; + localPort = vp->name[26]; + for (i = 0; i < 16; i++) + remoteAddr[i] = vp->name[27 + i]; + remotePort = vp->name[43]; + ifIndex = vp->name[44]; printf("%-5.5s", name); - inet6print(localAddr, localPort, name, 1); - inet6print(remoteAddr, remotePort, name, 0); - if ( state < 1 || state > TCP_NSTATES ) - printf(" %4d %d\n", ifIndex, state ); + inet6print((struct in6_addr *) localAddr, localPort, name, 1); + inet6print((struct in6_addr *) remoteAddr, remotePort, name, 0); + if (state < 1 || state > TCP_NSTATES) + printf(" %4d %d\n", ifIndex, state); else - printf(" %4d %s\n", ifIndex, tcp6states[ state ]); + printf(" %4d %s\n", ifIndex, tcp6states[state]); } - snmp_free_varbind( var ); + snmp_free_varbind(var); } /* @@ -170,42 +167,43 @@ void udp6protopr(const char *name) { netsnmp_variable_list *var, *vp; - oid ipv6UdpLocalAddress_oid[] = { 1,3,6,1,2,1,7,6,1,1 }; - size_t ipv6UdpLocalAddress_len = OID_LENGTH( ipv6UdpLocalAddress_oid ); - int localPort, ifIndex; + oid ipv6UdpLocalAddress_oid[] = + { 1, 3, 6, 1, 2, 1, 7, 6, 1, 1 }; + size_t ipv6UdpLocalAddress_len = + OID_LENGTH(ipv6UdpLocalAddress_oid); + int localPort, ifIndex; /* * Walking a single column of the udpTable will provide * all the necessary information from the index values. */ var = NULL; - snmp_varlist_add_variable( &var, ipv6UdpLocalAddress_oid, - ipv6UdpLocalAddress_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + snmp_varlist_add_variable(&var, ipv6UdpLocalAddress_oid, + ipv6UdpLocalAddress_len, ASN_NULL, NULL, 0); + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) return; - if ((var->type & 0xF0) == 0x80) /* exception */ + if ((var->type & 0xF0) == 0x80) /* exception */ return; printf("Active Internet Connections\n"); printf("%-5.5s %-27.27s %4s\n", "Proto", "Local Address", "I/F"); - for (vp = var; vp ; vp=vp->next_variable) { + for (vp = var; vp; vp = vp->next_variable) { printf("%-5.5s", name); /* * Extract the local port from the index values, but take * the IP address from the varbind value, (which is why * we walked udpLocalAddress rather than udpLocalPort) */ - localPort = vp->name[ vp->name_length-2 ]; - ifIndex = vp->name[ vp->name_length-1 ]; - inet6print(vp->val.string, localPort, name, 1); - printf(" %4d\n", ifIndex ); + localPort = vp->name[vp->name_length - 2]; + ifIndex = vp->name[vp->name_length - 1]; + inet6print((struct in6_addr *) vp->val.string, localPort, name, 1); + printf(" %4d\n", ifIndex); } - snmp_free_varbind( var ); + snmp_free_varbind(var); } - /********************* + /********************* * * IPv6 statistics * @@ -218,68 +216,67 @@ udp6protopr(const char *name) * than simply retrieving individual scalar values) */ void -_dump_v6stats( const char *name, oid *oid_buf, size_t buf_len, - struct stat_table *stable ) +_dump_v6stats(const char *name, oid * oid_buf, size_t buf_len, + struct stat_table *stable) { netsnmp_variable_list *var, *vp; - struct stat_table *sp; - long *stats; - oid stat; - unsigned int max_stat = 0; - int active = 0; + struct stat_table *sp; + long *stats; + oid stat; + unsigned int max_stat = 0; + int active = 0; var = NULL; - for (sp=stable; sp->entry; sp++) { - oid_buf[buf_len-1] = sp->entry; + for (sp = stable; sp->entry; sp++) { + oid_buf[buf_len - 1] = sp->entry; if (sp->entry > max_stat) max_stat = sp->entry; - snmp_varlist_add_variable( &var, oid_buf, buf_len, - ASN_NULL, NULL, 0); + snmp_varlist_add_variable(&var, oid_buf, buf_len, + ASN_NULL, NULL, 0); } - oid_buf[buf_len-1] = stable[0].entry; - stats = (long *)calloc(max_stat+1, sizeof(long)); - + oid_buf[buf_len - 1] = stable[0].entry; + stats = (long *) calloc(max_stat + 1, sizeof(long)); + /* * Walk the specified column(s), and total the individual statistics */ while (1) { - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; - if ((var->type & 0xF0) == 0x80) /* exception */ + if ((var->type & 0xF0) == 0x80) /* exception */ break; - if ( snmp_oid_compare( oid_buf, buf_len, - var->name, buf_len) != 0 ) - break; /* End of Table */ - - for ( vp=var; vp; vp=vp->next_variable ) { - stat = vp->name[ buf_len-1 ]; + if (snmp_oid_compare(oid_buf, buf_len, var->name, buf_len) != 0) + break; /* End of Table */ + + for (vp = var; vp; vp = vp->next_variable) { + stat = vp->name[buf_len - 1]; stats[stat] += *vp->val.integer; } - active=1; + active = 1; } if (!active) { - free( stats ); - snmp_free_varbind( var ); - return; /* No statistics to display */ + free(stats); + snmp_free_varbind(var); + return; /* No statistics to display */ } /* * Display the results */ printf("%s:\n", name); - for (sp=stable; sp->entry; sp++) { + for (sp = stable; sp->entry; sp++) { /* * If '-Cs' was specified twice, * then only display non-zero stats. */ - if ( stats[sp->entry] > 0 || sflag == 1 ) { + if (stats[sp->entry] > 0 || sflag == 1) { printf(sp->description, stats[sp->entry], - plural(stats[sp->entry])); + plural(stats[sp->entry])); putchar('\n'); } } - free( stats ); - snmp_free_varbind( var ); + free(stats); + snmp_free_varbind(var); } @@ -289,18 +286,18 @@ _dump_v6stats( const char *name, oid *oid_buf, size_t buf_len, void ip6_stats(const char *name) { - oid ip6stats_oid[] = { 1, 3, 6, 1, 2, 1, 55, 1, 6, 1, 0 }; - size_t ip6stats_len = OID_LENGTH( ip6stats_oid ); + oid ip6stats_oid[] = { 1, 3, 6, 1, 2, 1, 55, 1, 6, 1, 0 }; + size_t ip6stats_len = OID_LENGTH(ip6stats_oid); struct stat_table ip6stats_tbl[] = { - { 1, "%14d total datagram%s received"}, - { 2, "%14d datagram%s with header errors"}, - { 3, "%14d oversized datagram%s"}, - { 4, "%14d datagram%s with no route"}, - { 5, "%14d datagram%s with an invalid destination address"}, - { 6, "%14d datagram%s with unknown protocol"}, - { 7, "%14d short datagram%s discarded"}, - { 8, "%14d datagram%s discarded"}, - { 9, "%14d datagram%s delivered"}, + {1, "%14d total datagram%s received"}, + {2, "%14d datagram%s with header errors"}, + {3, "%14d oversized datagram%s"}, + {4, "%14d datagram%s with no route"}, + {5, "%14d datagram%s with an invalid destination address"}, + {6, "%14d datagram%s with unknown protocol"}, + {7, "%14d short datagram%s discarded"}, + {8, "%14d datagram%s discarded"}, + {9, "%14d datagram%s delivered"}, {10, "%14d datagram%s forwarded"}, {11, "%14d output datagram request%s"}, {12, "%14d output datagram%s discarded"}, @@ -312,10 +309,10 @@ ip6_stats(const char *name) {18, "%14d reassembly failure%s"}, {19, "%14d multicast datagram%s received"}, {20, "%14d multicast datagram%s transmitted"}, - { 0, ""} + {0, ""} }; - _dump_v6stats( name, ip6stats_oid, ip6stats_len, ip6stats_tbl ); + _dump_v6stats(name, ip6stats_oid, ip6stats_len, ip6stats_tbl); } /* @@ -329,23 +326,24 @@ ip6_stats(const char *name) void icmp6_stats(const char *name) { - oid icmp6stats_oid[] = { 1, 3, 6, 1, 2, 1, 56, 1, 1, 1, 0 }; - size_t icmp6stats_len = OID_LENGTH( icmp6stats_oid ); + oid icmp6stats_oid[] = + { 1, 3, 6, 1, 2, 1, 56, 1, 1, 1, 0 }; + size_t icmp6stats_len = OID_LENGTH(icmp6stats_oid); struct stat_table icmp6stats_tbl[] = { - { 1, "%14d total message%s received"}, - { 2, "%14d message%s dropped due to errors"}, + {1, "%14d total message%s received"}, + {2, "%14d message%s dropped due to errors"}, {18, "%14d ouput message request%s"}, {19, "%14d output message%s discarded"}, - { 0, ""} + {0, ""} }; struct stat_table icmp6_inhistogram[] = { - { 3, " Destination unreachable: %d"}, - { 4, " Admin Prohibit: %d"}, - { 5, " Time Exceeded: %d"}, - { 6, " Parameter Problem: %d"}, - { 7, " Too Big: %d"}, - { 8, " Echo Request: %d"}, - { 9, " Echo Reply: %d"}, + {3, " Destination unreachable: %d"}, + {4, " Admin Prohibit: %d"}, + {5, " Time Exceeded: %d"}, + {6, " Parameter Problem: %d"}, + {7, " Too Big: %d"}, + {8, " Echo Request: %d"}, + {9, " Echo Reply: %d"}, {10, " Router Solicit: %d"}, {11, " Router Advert: %d"}, {12, " Neighbor Solicit: %d"}, @@ -354,7 +352,7 @@ icmp6_stats(const char *name) {15, " Group Member Request: %d"}, {16, " Group Member Reply: %d"}, {17, " Group Member Reduce: %d"}, - { 0, ""} + {0, ""} }; struct stat_table icmp6_outhistogram[] = { {20, " Destination unreachable: %d"}, @@ -375,11 +373,11 @@ icmp6_stats(const char *name) {0, ""} }; - _dump_v6stats( name, icmp6stats_oid, icmp6stats_len, icmp6stats_tbl ); - _dump_v6stats( " Input Histogram", - icmp6stats_oid, icmp6stats_len, icmp6_inhistogram ); - _dump_v6stats( " Output Histogram", - icmp6stats_oid, icmp6stats_len, icmp6_outhistogram ); + _dump_v6stats(name, icmp6stats_oid, icmp6stats_len, icmp6stats_tbl); + _dump_v6stats(" Input Histogram", + icmp6stats_oid, icmp6stats_len, icmp6_inhistogram); + _dump_v6stats(" Output Histogram", + icmp6stats_oid, icmp6stats_len, icmp6_outhistogram); } /* @@ -401,7 +399,8 @@ icmp6_stats(const char *name) */ void -inet6print(unsigned char *in6, int port, const char *proto, int local) +inet6print(const struct in6_addr *in6, int port, const char *proto, + int local) { #define GETSERVBYPORT6(port, proto, ret) do { \ @@ -413,30 +412,30 @@ inet6print(unsigned char *in6, int port, const char *proto, int local) (ret) = getservbyport((int)(port), (proto)); \ } while (0) - struct servent *sp = NULL; - char line[80], *cp; - int width = 27-9; - int len = sizeof line; - - if (vflag && width < strlen(inet6name(in6))) - width = strlen(inet6name(in6)); - snprintf(line, len, "%.*s.", width, inet6name(in6)); - len -= strlen(line); - if (len <= 0) - goto bail; - - cp = strchr(line, '\0'); - if (!nflag && port && local) - GETSERVBYPORT6(htons(port), proto, sp); - if (sp || port == 0) - snprintf(cp, len, vflag ? "%s" : "%.8s", sp ? sp->s_name : "*"); - else - snprintf(cp, len, "%d", port); - width = 27; - if (vflag && width < strlen(line)) - width = strlen(line); -bail: - printf(" %-*.*s", width, width, line); + struct servent *sp = NULL; + char line[80], *cp; + int width = 27 - 9; + int len = sizeof line; + + if (vflag && width < strlen(inet6name(in6))) + width = strlen(inet6name(in6)); + snprintf(line, len, "%.*s.", width, inet6name(in6)); + len -= strlen(line); + if (len <= 0) + goto bail; + + cp = strchr(line, '\0'); + if (!nflag && port && local) + GETSERVBYPORT6(htons(port), proto, sp); + if (sp || port == 0) + snprintf(cp, len, vflag ? "%s" : "%.8s", sp ? sp->s_name : "*"); + else + snprintf(cp, len, "%d", port); + width = 27; + if (vflag && width < strlen(line)) + width = strlen(line); + bail: + printf(" %-*.*s", width, width, line); } /* @@ -445,68 +444,52 @@ inet6print(unsigned char *in6, int port, const char *proto, int local) * numeric value, otherwise try for symbolic name. */ -char * -inet6name(const unsigned char *in6) +char * +inet6name(const struct in6_addr *in6p) { - char *cp; - static char line[NI_MAXHOST]; - static char domain[MAXHOSTNAMELEN]; - static int first = 1; -#ifdef NETSNMP_ENABLE_IPV6 - struct hostent *hp; - char hbuf[NI_MAXHOST]; - const int niflag = NI_NUMERICHOST; - struct sockaddr_in6 sin6; - const struct in6_addr *in6p = (const struct in6_addr *)in6; -#endif - - if (first && !nflag) { - first = 0; - if (gethostname(line, sizeof(line)) == 0 && - (cp = strchr(line, '.'))) - (void) strlcpy(domain, cp + 1, sizeof domain); - else - domain[0] = '\0'; - } + char *cp; + static char line[NI_MAXHOST]; + static char domain[MAXHOSTNAMELEN]; + static int first = 1; + + if (first && !nflag) { + first = 0; + if (gethostname(line, sizeof(line)) == 0 && + (cp = strchr(line, '.'))) + (void) strlcpy(domain, cp + 1, sizeof domain); + else + domain[0] = '\0'; + } #ifdef NETSNMP_ENABLE_IPV6 - cp = NULL; - if (!nflag && !IN6_IS_ADDR_UNSPECIFIED(in6p)) { - hp = netsnmp_gethostbyaddr((const char *)in6p, sizeof(*in6p), - AF_INET6); - if (hp) { - if ((cp = strchr(hp->h_name, '.')) && - !strcmp(cp + 1, domain)) - *cp = 0; - cp = hp->h_name; - } - } - if (IN6_IS_ADDR_UNSPECIFIED(in6p)) - strlcpy(line, "*", sizeof(line)); - else if (cp) - strlcpy(line, cp, sizeof(line)); - else { - memset(&sin6, 0, sizeof(sin6)); -/* sin6.sin6_len = sizeof(sin6); */ - sin6.sin6_family = AF_INET6; - sin6.sin6_addr = *in6p; + if (IN6_IS_ADDR_UNSPECIFIED(in6p)) { + strlcpy(line, "*", sizeof(line)); + } else { + struct sockaddr_in6 sin6; + char hbuf[NI_MAXHOST]; + + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_INET6; + sin6.sin6_addr = *in6p; #ifdef __KAME__ - if (IN6_IS_ADDR_LINKLOCAL(in6p) || - IN6_IS_ADDR_MC_LINKLOCAL(in6p)) { - sin6.sin6_scope_id = - ntohs(*(const uint16_t *)&in6p->s6_addr[2]); - sin6.sin6_addr.s6_addr[2] = 0; - sin6.sin6_addr.s6_addr[3] = 0; - } + if (IN6_IS_ADDR_LINKLOCAL(in6p) || IN6_IS_ADDR_MC_LINKLOCAL(in6p)) { + sin6.sin6_scope_id = + ntohs(*(const uint16_t *) &in6p->s6_addr[2]); + sin6.sin6_addr.s6_addr[2] = 0; + sin6.sin6_addr.s6_addr[3] = 0; + } #endif - if (getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), - hbuf, sizeof(hbuf), NULL, 0, niflag) != 0) - strlcpy(hbuf, "?", sizeof hbuf); - strlcpy(line, hbuf, sizeof(line)); - } + if (getnameinfo((struct sockaddr *) &sin6, sizeof(sin6), + hbuf, sizeof(hbuf), NULL, 0, + nflag ? NI_NUMERICHOST : 0) < 0) + strlcpy(hbuf, "?", sizeof(hbuf)); + if ((cp = strchr(hbuf, '.')) && strcmp(cp + 1, domain) == 0) + *cp = 0; + strlcpy(line, hbuf, sizeof(line)); + } #else - strlcpy(line, "[[XXX - inet6 address]]", sizeof(line)); + strlcpy(line, "[[XXX - inet6 address]]", sizeof(line)); #endif - return (line); + return (line); } #ifdef TCP6 diff --git a/apps/snmpnetstat/inetx.c b/apps/snmpnetstat/inetx.c index 365ebee..153b39c 100644 --- a/apps/snmpnetstat/inetx.c +++ b/apps/snmpnetstat/inetx.c @@ -1,8 +1,12 @@ -/* $OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $ */ -/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ +/* + * $OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $ + */ +/* + * BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp + */ /* * Copyright (c) 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,39 +33,28 @@ * SUCH DAMAGE. */ -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; -#else -/*__RCSID("$OpenBSD: inet6.c,v 1.31 2004/11/17 01:47:20 itojun Exp $");*/ -/*__RCSID("KAME Id: inet6.c,v 1.10 2000/02/09 10:49:31 itojun Exp");*/ -#endif -#endif /* not lint */ -#endif - #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_WINSOCK_H +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -71,15 +64,16 @@ static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #include "netstat.h" struct stat_table { - unsigned int entry; /* entry number in table */ + unsigned int entry; /* entry number in table */ /* - * format string to printf(description, value) - * warning: the %d must be before the %s + * format string to printf(description, value) + * warning: the %d must be before the %s */ char description[80]; }; -void inetxprint(int, struct sockaddr_in6 , int, const char *, int); +void inetxprint(int, struct sockaddr_in6, int, const char *, + int); /* * Print a summary of TCP connections @@ -100,110 +94,111 @@ const char *tcpxstates[] = { "CLOSING", "TIMEWAIT" }; + #define TCP_NSTATES 11 typedef struct { - int stat; - int hcstat; - const char *str; + int stat; + int hcstat; + const char *str; } systemstats_t; -systemstats_t systemstats[] = { - { 3, 4, "datagrams input" }, - { 5, 6, "octets received" }, - { 7, 0, "hdr errors input" }, - { 8, 0, "no routes input" }, - { 9, 0, "address errors input" }, - { 10, 0, "unknown protocol input" }, - { 12, 13, "input datagrams forwarded" }, - { 11, 0, "truncated datagrams input" }, - { 14, 0, "input reassembly required" }, - { 15, 0, "input reassemled OK" }, - { 16, 0, "input reassembly failed" }, - { 17, 0, "input datagrams discarded" }, - { 18, 19, "input datagrams received" }, - { 20, 21, "output datagram requests" }, - { 22, 0, "output no route" }, - { 23, 24, "datagrams forwarded" }, - { 25, 0, "output datagrams discarded" }, - { 26, 0, "output datagrams fragmentation required" }, - { 27, 0, "output datagrams fragmented" }, - { 28, 0, "output fragmentation failed" }, - { 29, 0, "fragments created" }, - { 30, 31, "datagrams transmitted" }, - { 32, 33, "octets transmitted" }, - { 0 } +systemstats_t systemstats[] = { + {3, 4, "datagrams input"}, + {5, 6, "octets received"}, + {7, 0, "hdr errors input"}, + {8, 0, "no routes input"}, + {9, 0, "address errors input"}, + {10, 0, "unknown protocol input"}, + {12, 13, "input datagrams forwarded"}, + {11, 0, "truncated datagrams input"}, + {14, 0, "input reassembly required"}, + {15, 0, "input reassemled OK"}, + {16, 0, "input reassembly failed"}, + {17, 0, "input datagrams discarded"}, + {18, 19, "input datagrams received"}, + {20, 21, "output datagram requests"}, + {22, 0, "output no route"}, + {23, 24, "datagrams forwarded"}, + {25, 0, "output datagrams discarded"}, + {26, 0, "output datagrams fragmentation required"}, + {27, 0, "output datagrams fragmented"}, + {28, 0, "output fragmentation failed"}, + {29, 0, "fragments created"}, + {30, 31, "datagrams transmitted"}, + {32, 33, "octets transmitted"}, + {0} }; -systemstats_t icmpstats[] = { - { 2, 0, "input messages" }, - { 3, 0, "input errors" }, - { 4, 0, "output messages" }, - { 5, 0, "output errors" }, - { 0 } +systemstats_t icmpstats[] = { + {2, 0, "input messages"}, + {3, 0, "input errors"}, + {4, 0, "output messages"}, + {5, 0, "output errors"}, + {0} }; typedef struct { - int code; - const char *name; + int code; + const char *name; } codelist_t; -codelist_t icmpcodes[] = { - { 0, "Echo reply" }, - { 3, "Destination unreachable" }, - { 4, "Source quench" }, - { 5, "Redirect" }, - { 6, "Alternate host address" }, - { 8, "Echo request" }, - { 9, "Router advertisement" }, - { 10, "Router selection" }, - { 11, "Time exceeded" }, - { 12, "Parameter problem" }, - { 13, "Timestamp request" }, - { 14, "Timestamp reply" }, - { 15, "Information request" }, - { 16, "Information reply" }, - { 17, "Address mask request" }, - { 18, "Address mask reply" }, - { 0 } +codelist_t icmpcodes[] = { + {0, "Echo reply"}, + {3, "Destination unreachable"}, + {4, "Source quench"}, + {5, "Redirect"}, + {6, "Alternate host address"}, + {8, "Echo request"}, + {9, "Router advertisement"}, + {10, "Router selection"}, + {11, "Time exceeded"}, + {12, "Parameter problem"}, + {13, "Timestamp request"}, + {14, "Timestamp reply"}, + {15, "Information request"}, + {16, "Information reply"}, + {17, "Address mask request"}, + {18, "Address mask reply"}, + {0} }; -codelist_t icmp6codes[] = { - { 1, "Destination Unreachable" }, - { 2, "Packet Too Big" }, - { 3, "Time Exceeded" }, - { 4, "Parameter Problem" }, - { 100, "Private experimentation 100" }, - { 101, "Private experimentation 101" }, - { 127, "Reserved for expansion of ICMPv6 error messages" }, - { 128, "Echo Request" }, - { 129, "Echo Reply" }, - { 130, "Multicast Listener Query" }, - { 131, "Multicast Listener Report" }, - { 132, "Multicast Listener Done" }, - { 133, "Router Solicitation" }, - { 134, "Router Advertisement" }, - { 135, "Neighbor Solicitation" }, - { 136, "Neighbor Advertisement" }, - { 137, "Redirect Message" }, - { 138, "Router Renumbering" }, - { 139, "ICMP Node Information Query" }, - { 140, "ICMP Node Information Response" }, - { 141, "Inverse Neighbor Discovery Solicitation Message" }, - { 142, "Inverse Neighbor Discovery Advertisement Message" }, - { 143, "Version 2 Multicast Listener Report" }, - { 144, "Home Agent Address Discovery Request Message" }, - { 145, "Home Agent Address Discovery Reply Message" }, - { 146, "Mobile Prefix Solicitation" }, - { 147, "Mobile Prefix Advertisement" }, - { 148, "Certification Path Solicitation Message" }, - { 149, "Certification Path Advertisement Message" }, - { 151, "Multicast Router Advertisement" }, - { 152, "Multicast Router Solicitation" }, - { 153, "Multicast Router Termination" }, - { 154, "FMIPv6 Messages" }, - { 155, "RPL Control Message" }, - { 0 } +codelist_t icmp6codes[] = { + {1, "Destination Unreachable"}, + {2, "Packet Too Big"}, + {3, "Time Exceeded"}, + {4, "Parameter Problem"}, + {100, "Private experimentation 100"}, + {101, "Private experimentation 101"}, + {127, "Reserved for expansion of ICMPv6 error messages"}, + {128, "Echo Request"}, + {129, "Echo Reply"}, + {130, "Multicast Listener Query"}, + {131, "Multicast Listener Report"}, + {132, "Multicast Listener Done"}, + {133, "Router Solicitation"}, + {134, "Router Advertisement"}, + {135, "Neighbor Solicitation"}, + {136, "Neighbor Advertisement"}, + {137, "Redirect Message"}, + {138, "Router Renumbering"}, + {139, "ICMP Node Information Query"}, + {140, "ICMP Node Information Response"}, + {141, "Inverse Neighbor Discovery Solicitation Message"}, + {142, "Inverse Neighbor Discovery Advertisement Message"}, + {143, "Version 2 Multicast Listener Report"}, + {144, "Home Agent Address Discovery Request Message"}, + {145, "Home Agent Address Discovery Reply Message"}, + {146, "Mobile Prefix Solicitation"}, + {147, "Mobile Prefix Advertisement"}, + {148, "Certification Path Solicitation Message"}, + {149, "Certification Path Advertisement Message"}, + {151, "Multicast Router Advertisement"}, + {152, "Multicast Router Solicitation"}, + {153, "Multicast Router Termination"}, + {154, "FMIPv6 Messages"}, + {155, "RPL Control Message"}, + {0} }; @@ -211,87 +206,100 @@ void tcpxprotopr(const char *name) { netsnmp_variable_list *var, *vp, *pvar; - oid tcpConnectionState_oid[] = { 1,3,6,1,2,1,6,19,1,7 }; - size_t tcpConnectionState_len = OID_LENGTH( tcpConnectionState_oid ); - int state, i; + oid tcpConnectionState_oid[] = + { 1, 3, 6, 1, 2, 1, 6, 19, 1, 7 }; + size_t tcpConnectionState_len = + OID_LENGTH(tcpConnectionState_oid); + int state, i; struct sockaddr_in6 localAddr, remoteAddr; - int localPort, remotePort, pid = 0; - int localType, remoteType, inx; - int first = 1; - static int done = 0; + int localPort, remotePort, pid = 0; + int localType, remoteType, inx; + int first = 1; + static int done = 0; - if (done++) return; + if (done++) + return; /* * Walking the v6 tcpConnectionState column will provide all * the necessary information. */ var = NULL; - snmp_varlist_add_variable( &var, tcpConnectionState_oid, - tcpConnectionState_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + snmp_varlist_add_variable(&var, tcpConnectionState_oid, + tcpConnectionState_len, ASN_NULL, NULL, 0); + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) { + snmp_free_varbind(var); return; - if ((var->type & 0xF0) == 0x80) /* Exception */ + } + if ((var->type & 0xF0) == 0x80) { /* Exception */ + snmp_free_varbind(var); return; + } - for (vp = var; vp ; vp=vp->next_variable) { - char lname[5]; + for (vp = var; vp; vp = vp->next_variable) { + char lname[5]; state = *vp->val.integer; - inx = tcpConnectionState_len; - pvar = NULL; - - vp->name[inx-1] = 8; - snmp_varlist_add_variable( &pvar, vp->name, vp->name_length, - ASN_NULL, NULL, 0); - if (netsnmp_query_get( pvar, ss ) != SNMP_ERR_NOERROR) { - snmp_free_var( pvar ); - return; - } - if ((pvar->type & 0xF0) != 0x80) /* Exception */ - pid = *pvar->val.integer; - - /* Extract the local/remote information from the index values */ - localType = vp->name[inx++]; - for (i = 0; i < vp->name[inx]; i++) - localAddr.sin6_addr.s6_addr[i] = vp->name[inx+i+1]; - inx += vp->name[inx] + 1; - localPort = vp->name[inx++]; - remoteType = vp->name[inx++]; - for (i = 0; i < vp->name[inx]; i++) - remoteAddr.sin6_addr.s6_addr[i] = vp->name[inx+i+1]; - inx += vp->name[inx] + 1; - remotePort = vp->name[inx++]; - - snmp_free_varbind(pvar); - - if (af == AF_INET && localType == 2) continue; - if (af == AF_INET6 && localType != 2) continue; + inx = tcpConnectionState_len; + pvar = NULL; + + vp->name[inx - 1] = 8; + snmp_varlist_add_variable(&pvar, vp->name, vp->name_length, + ASN_NULL, NULL, 0); + if (netsnmp_query_get(pvar, ss) != SNMP_ERR_NOERROR) { + snmp_free_var(pvar); + return; + } + if ((pvar->type & 0xF0) != 0x80) /* Exception */ + pid = *pvar->val.integer; + + /* + * Extract the local/remote information from the index values + */ + localType = vp->name[inx++]; + for (i = 0; i < vp->name[inx]; i++) + localAddr.sin6_addr.s6_addr[i] = vp->name[inx + i + 1]; + inx += vp->name[inx] + 1; + localPort = vp->name[inx++]; + remoteType = vp->name[inx++]; + for (i = 0; i < vp->name[inx]; i++) + remoteAddr.sin6_addr.s6_addr[i] = vp->name[inx + i + 1]; + inx += vp->name[inx] + 1; + remotePort = vp->name[inx++]; + + snmp_free_varbind(pvar); + + if (af == AF_INET && localType == 2) + continue; + if (af == AF_INET6 && localType != 2) + continue; if (first) { printf("Active Internet (%s) Connections", "tcp"); putchar('\n'); printf("%-5.5s %-27.27s %-27.27s %11.11s %5.5s\n", - "Proto", "Local Address", "Remote Address", "State", "PID"); + "Proto", "Local Address", "Remote Address", "State", + "PID"); first = 0; } - strcpy(lname, "tcp"); - if (localType == 2) lname[3] = '6'; - else lname[3] = '4'; - lname[4] = 0; + strcpy(lname, "tcp"); + if (localType == 2) + lname[3] = '6'; + else + lname[3] = '4'; + lname[4] = 0; printf("%-5.5s", lname); - inetxprint(localType, localAddr, localPort, "tcp", 1); + inetxprint(localType, localAddr, localPort, "tcp", 1); inetxprint(remoteType, remoteAddr, remotePort, "tcp", 0); - if ( state < 1 || state > TCP_NSTATES ) + if (state < 1 || state > TCP_NSTATES) printf(" %11d %5d\n", state, pid); else - printf(" %11s %5d\n", tcpxstates[ state ], pid); + printf(" %11s %5d\n", tcpxstates[state], pid); } - snmp_free_varbind( var ); + snmp_free_varbind(var); if (aflag) - listenxprotopr(name); + listenxprotopr(name); } /* @@ -301,53 +309,58 @@ void listenxprotopr(const char *name) { netsnmp_variable_list *var, *vp; - oid tcpListenerProcess_oid[] = { 1,3,6,1,2,1,6,20,1,4 }; - size_t tcpListenerProcess_len = OID_LENGTH( tcpListenerProcess_oid ); + oid tcpListenerProcess_oid[] = + { 1, 3, 6, 1, 2, 1, 6, 20, 1, 4 }; + size_t tcpListenerProcess_len = + OID_LENGTH(tcpListenerProcess_oid); struct sockaddr_in6 localAddr; - int localType, localPort, pid; - int i, inx; + int localType, localPort, pid; + int i, inx; /* * Walking a single column of the udpTable will provide * all the necessary information from the index values. */ var = NULL; - snmp_varlist_add_variable( &var, tcpListenerProcess_oid, - tcpListenerProcess_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + snmp_varlist_add_variable(&var, tcpListenerProcess_oid, + tcpListenerProcess_len, ASN_NULL, NULL, 0); + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) return; - if ((var->type & 0xF0) == 0x80) /* Exception */ + if ((var->type & 0xF0) == 0x80) /* Exception */ return; printf("Listening Internet (%s) Connections\n", "tcp"); printf("%-5.5s %-27.27s %5s\n", "Proto", "Local Address", "PID"); - for (vp = var; vp ; vp=vp->next_variable) { - char lname[5]; - inx = tcpListenerProcess_len; + for (vp = var; vp; vp = vp->next_variable) { + char lname[5]; + inx = tcpListenerProcess_len; /* * Extract the local port from the index values, but take * the IP address from the varbind value, (which is why * we walked udpLocalAddress rather than udpLocalPort) */ - localType = vp->name[inx++]; - if (af == AF_INET && localType == 2) continue; - if (af == AF_INET6 && localType != 2) continue; - - for (i = 0; i < vp->name[inx]; i++) - localAddr.sin6_addr.s6_addr[i] = vp->name[inx+i+1]; - inx += vp->name[inx]+1; - localPort = vp->name[ inx++ ]; - pid = *vp->val.integer; - strcpy(lname, "tcp"); - if (localType == 2) lname[3] = '6'; - else lname[3] = '4'; - lname[4] = 0; + localType = vp->name[inx++]; + if (af == AF_INET && localType == 2) + continue; + if (af == AF_INET6 && localType != 2) + continue; + + for (i = 0; i < vp->name[inx]; i++) + localAddr.sin6_addr.s6_addr[i] = vp->name[inx + i + 1]; + inx += vp->name[inx] + 1; + localPort = vp->name[inx++]; + pid = *vp->val.integer; + strcpy(lname, "tcp"); + if (localType == 2) + lname[3] = '6'; + else + lname[3] = '4'; + lname[4] = 0; printf("%-5.5s", lname); inetxprint(localType, localAddr, localPort, "tcp", 1); printf(" %5d\n", pid); } - snmp_free_varbind( var ); + snmp_free_varbind(var); } /* @@ -358,152 +371,165 @@ void udpxprotopr(const char *name) { netsnmp_variable_list *var, *vp; - oid udpEndpointProcess_oid[] = { 1,3,6,1,2,1,7,7,1,8 }; - size_t udpEndpointProcess_len = OID_LENGTH( udpEndpointProcess_oid ); + oid udpEndpointProcess_oid[] = + { 1, 3, 6, 1, 2, 1, 7, 7, 1, 8 }; + size_t udpEndpointProcess_len = + OID_LENGTH(udpEndpointProcess_oid); struct sockaddr_in6 localAddr, remoteAddr; - int localType, remoteType, localPort, remotePort, pid; - int i, inx; - static int done = 0; + int localType, remoteType, localPort, remotePort, pid; + int i, inx; + static int done = 0; - if (done++) return; + if (done++) + return; /* * Walking a single column of the udpTable will provide * all the necessary information from the index values. */ var = NULL; - snmp_varlist_add_variable( &var, udpEndpointProcess_oid, - udpEndpointProcess_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_walk( var, ss ) != SNMP_ERR_NOERROR) + snmp_varlist_add_variable(&var, udpEndpointProcess_oid, + udpEndpointProcess_len, ASN_NULL, NULL, 0); + if (netsnmp_query_walk(var, ss) != SNMP_ERR_NOERROR) { + snmp_free_varbind(var); return; - if ((var->type & 0xF0) == 0x80) /* Exception */ + } + if ((var->type & 0xF0) == 0x80) { /* Exception */ + snmp_free_varbind(var); return; + } printf("Active Internet (%s) Connections\n", "udp"); - printf("%-5.5s %-27.27s %-27.27s %5s\n", "Proto", "Local Address", "Remote Address", "PID"); - for (vp = var; vp ; vp=vp->next_variable) { - char lname[5]; - inx = udpEndpointProcess_len; + printf("%-5.5s %-27.27s %-27.27s %5s\n", "Proto", "Local Address", + "Remote Address", "PID"); + for (vp = var; vp; vp = vp->next_variable) { + char lname[5]; + inx = udpEndpointProcess_len; /* * Extract the local port from the index values, but take * the IP address from the varbind value, (which is why * we walked udpLocalAddress rather than udpLocalPort) */ - localType = vp->name[inx++]; - if (af == AF_INET && localType == 2) continue; - if (af == AF_INET6 && localType != 2) continue; - for (i = 0; i < vp->name[inx]; i++) - localAddr.sin6_addr.s6_addr[i] = vp->name[inx+i+1]; - inx += vp->name[inx]+1; - localPort = vp->name[ inx++ ]; - remoteType = vp->name[inx++]; - for (i = 0; i < vp->name[inx]; i++) - remoteAddr.sin6_addr.s6_addr[i] = vp->name[inx+i+1]; - inx += vp->name[inx]+1; - remotePort = vp->name[ inx++ ]; - pid = *vp->val.integer; - strcpy(lname, "udp"); - if (localType == 2) lname[3] = '6'; - else lname[3] = '4'; - lname[4] = 0; + localType = vp->name[inx++]; + if (af == AF_INET && localType == 2) + continue; + if (af == AF_INET6 && localType != 2) + continue; + for (i = 0; i < vp->name[inx]; i++) + localAddr.sin6_addr.s6_addr[i] = vp->name[inx + i + 1]; + inx += vp->name[inx] + 1; + localPort = vp->name[inx++]; + remoteType = vp->name[inx++]; + for (i = 0; i < vp->name[inx]; i++) + remoteAddr.sin6_addr.s6_addr[i] = vp->name[inx + i + 1]; + inx += vp->name[inx] + 1; + remotePort = vp->name[inx++]; + pid = *vp->val.integer; + strcpy(lname, "udp"); + if (localType == 2) + lname[3] = '6'; + else + lname[3] = '4'; + lname[4] = 0; printf("%-5.5s", lname); inetxprint(localType, localAddr, localPort, "udp", 1); inetxprint(remoteType, remoteAddr, remotePort, "udp", 1); printf(" %5d\n", pid); } - snmp_free_varbind( var ); + snmp_free_varbind(var); } static void -statsprint(const char *name, const systemstats_t *st, int proto, - const oid *tbl, size_t tbllen) +statsprint(const char *name, const systemstats_t * st, int proto, + const oid * tbl, size_t tbllen) { - oid var[32]; - size_t len; + oid var[32]; + size_t len; netsnmp_variable_list *vb; - memcpy(var, tbl, tbllen*sizeof(oid)); - var[tbllen+1] = proto; - len = tbllen+2; + memcpy(var, tbl, tbllen * sizeof(oid)); + var[tbllen + 1] = proto; + len = tbllen + 2; printf("%s:\n", name); while (st->stat) { - vb = NULL; - if (st->hcstat) { - var[tbllen] = st->hcstat; - snmp_varlist_add_variable( &vb, var, len, ASN_NULL, NULL, 0); - if (netsnmp_query_get( vb, ss ) != SNMP_ERR_NOERROR) { - snmp_free_var( vb ); - vb = NULL; - } - } - if (!vb) { - var[tbllen] = st->stat; - snmp_varlist_add_variable( &vb, var, len, ASN_NULL, NULL, 0); - if (netsnmp_query_get( vb, ss ) != SNMP_ERR_NOERROR) { - snmp_free_var( vb ); - vb = NULL; - } - } - if (vb) { - if (vb->type == ASN_COUNTER) { - if (*vb->val.integer > 0 || sflag == 1) - printf("%14lu %s\n", *vb->val.integer, st->str); - } - else if (vb->type == ASN_COUNTER64) { - char a64buf[I64CHARSZ + 1]; - printU64(a64buf, vb->val.counter64); - if (strcmp(a64buf, "0") != 0 || sflag == 1) - printf("%14s %s\n", a64buf, st->str); - } - else - printf("%14s %s\n", "-", st->str); - snmp_free_varbind(vb); - } - else { - printf("%14s %s\n", "-", st->str); - } - st++; + vb = NULL; + if (st->hcstat) { + var[tbllen] = st->hcstat; + snmp_varlist_add_variable(&vb, var, len, ASN_NULL, NULL, 0); + if (netsnmp_query_get(vb, ss) != SNMP_ERR_NOERROR) { + snmp_free_var(vb); + vb = NULL; + } + } + if (!vb) { + var[tbllen] = st->stat; + snmp_varlist_add_variable(&vb, var, len, ASN_NULL, NULL, 0); + if (netsnmp_query_get(vb, ss) != SNMP_ERR_NOERROR) { + snmp_free_var(vb); + vb = NULL; + } + } + if (vb) { + if (vb->type == ASN_COUNTER) { + if (*vb->val.integer > 0 || sflag == 1) + printf("%14lu %s\n", *vb->val.integer, st->str); + } else if (vb->type == ASN_COUNTER64) { + char a64buf[I64CHARSZ + 1]; + printU64(a64buf, vb->val.counter64); + if (strcmp(a64buf, "0") != 0 || sflag == 1) + printf("%14s %s\n", a64buf, st->str); + } else + printf("%14s %s\n", "-", st->str); + snmp_free_varbind(vb); + } else { + printf("%14s %s\n", "-", st->str); + } + st++; } } static void -prhisto(const char *name, const oid *var, size_t len, int ver, codelist_t *cs) +prhisto(const char *name, const oid * var, size_t len, int ver, + codelist_t * cs) { netsnmp_variable_list *vb = NULL, *vp; - codelist_t *cp; - int code; - char nocode[32]; - - snmp_varlist_add_variable( &vb, var, len, ASN_NULL, NULL, 0); - if (netsnmp_query_walk( vb, ss ) != SNMP_ERR_NOERROR) { - snmp_free_var( vb ); - return; + codelist_t *cp; + int code; + char nocode[32]; + + snmp_varlist_add_variable(&vb, var, len, ASN_NULL, NULL, 0); + if (netsnmp_query_walk(vb, ss) != SNMP_ERR_NOERROR) { + snmp_free_var(vb); + return; } printf(" %s histogram:\n", name); printf(" %10s %10s %s\n", "input", "output", "type"); for (code = 0; code < 256; code++) { - unsigned long inp = 0, out = 0; - int found = 0; - vp = vb; - while (vp && found != 2) { - if (vp->name[11] == code && vp->name[10] == ver) { - if (vp->name[9] == 3) inp = *vp->val.integer; - else out = *vp->val.integer; - found++; - } - vp = vp->next_variable; - } - if (found) { - cp = cs; - while (cp->name && cp->code != code) cp++; - if (inp || out || sflag == 1) { - if (!cp->code) - snprintf(nocode, sizeof nocode, "type %d", code); - printf(" %10lu %10lu %s\n", inp, out, cp->name ? cp->name : nocode); - } - } + unsigned long inp = 0, out = 0; + int found = 0; + vp = vb; + while (vp && found != 2) { + if (vp->name[11] == code && vp->name[10] == ver) { + if (vp->name[9] == 3) + inp = *vp->val.integer; + else + out = *vp->val.integer; + found++; + } + vp = vp->next_variable; + } + if (found) { + cp = cs; + while (cp->name && cp->code != code) + cp++; + if (inp || out || sflag == 1) { + if (!cp->code) + snprintf(nocode, sizeof nocode, "type %d", code); + printf(" %10lu %10lu %s\n", inp, out, + cp->name ? cp->name : nocode); + } + } } snmp_free_varbind(vb); } @@ -511,39 +537,43 @@ prhisto(const char *name, const oid *var, size_t len, int ver, codelist_t *cs) void ipx_stats(const char *name) { - oid ipsysstat_oid[] = { 1, 3, 6, 1, 2, 1, 4, 31, 1, 1 }; - size_t ipsysstat_len = sizeof(ipsysstat_oid) / sizeof(ipsysstat_oid[0]); - static int first = 1; + oid ipsysstat_oid[] = { 1, 3, 6, 1, 2, 1, 4, 31, 1, 1 }; + size_t ipsysstat_len = + sizeof(ipsysstat_oid) / sizeof(ipsysstat_oid[0]); + static int first = 1; - if (!first) return; + if (!first) + return; first = 0; if (!name || strcmp(name, "ip") == 0) - statsprint("ip", systemstats, 1, ipsysstat_oid, ipsysstat_len); + statsprint("ip", systemstats, 1, ipsysstat_oid, ipsysstat_len); if (!name || strcmp(name, "ip6") == 0) - statsprint("ip6", systemstats, 2, ipsysstat_oid, ipsysstat_len); + statsprint("ip6", systemstats, 2, ipsysstat_oid, ipsysstat_len); } void icmpx_stats(const char *name) { - oid icmpstat_oid[] = { 1, 3, 6, 1, 2, 1, 5, 29, 1 }; - size_t icmpstat_len = sizeof(icmpstat_oid) / sizeof(icmpstat_oid[0]); - oid icmpmsg_oid[] = { 1, 3, 6, 1, 2, 1, 5, 30, 1 }; - size_t icmpmsg_len = sizeof(icmpmsg_oid) / sizeof(icmpmsg_oid[0]); - static int first = 1; + oid icmpstat_oid[] = { 1, 3, 6, 1, 2, 1, 5, 29, 1 }; + size_t icmpstat_len = + sizeof(icmpstat_oid) / sizeof(icmpstat_oid[0]); + oid icmpmsg_oid[] = { 1, 3, 6, 1, 2, 1, 5, 30, 1 }; + size_t icmpmsg_len = + sizeof(icmpmsg_oid) / sizeof(icmpmsg_oid[0]); + static int first = 1; if (!first) - return; + return; first = 0; if (!name || strcmp(name, "icmp") == 0) { - statsprint("icmp", icmpstats, 1, icmpstat_oid, icmpstat_len); - prhisto("icmp", icmpmsg_oid, icmpmsg_len, 1, icmpcodes); + statsprint("icmp", icmpstats, 1, icmpstat_oid, icmpstat_len); + prhisto("icmp", icmpmsg_oid, icmpmsg_len, 1, icmpcodes); } if (!name || strcmp(name, "icmp6") == 0) { - statsprint("icmp6", icmpstats, 2, icmpstat_oid, icmpstat_len); - prhisto("icmp6", icmpmsg_oid, icmpmsg_len, 2, icmp6codes); + statsprint("icmp6", icmpstats, 2, icmpstat_oid, icmpstat_len); + prhisto("icmp6", icmpmsg_oid, icmpmsg_len, 2, icmp6codes); } } @@ -551,17 +581,17 @@ icmpx_stats(const char *name) static void unknownprint(void) { - char line[80], *cp; - int width = 27; + char line[80], *cp; + int width = 27; if (vflag) - snprintf(line, sizeof line, "%s.", "*"); + snprintf(line, sizeof line, "%s.", "*"); else - snprintf(line, sizeof line, "%.*s.", width-9, "*"); + snprintf(line, sizeof line, "%.*s.", width - 9, "*"); cp = strchr(line, '\0'); snprintf(cp, line + sizeof line - cp, vflag ? "%s" : "%.8s", "*"); if (vflag && width < strlen(line)) - width = strlen(line); + width = strlen(line); printf(" %-*.*s", width, width, line); } @@ -571,14 +601,17 @@ unknownprint(void) */ void -inetxprint(int proto, struct sockaddr_in6 in6, int port, const char *name, int local) +inetxprint(int proto, struct sockaddr_in6 in6, int port, const char *name, + int local) { - if (proto == 2) - inet6print((u_char *)&in6.sin6_addr.s6_addr, port, name, local); - else if (proto == 1) - inetprint((struct in_addr *)&in6.sin6_addr.s6_addr, port, name, local); - else if (proto == 0) - unknownprint(); - else abort(); + if (proto == 2) + inet6print(&in6.sin6_addr, port, name, local); + else if (proto == 1) + inetprint((struct in_addr *) &in6.sin6_addr.s6_addr, port, name, + local); + else if (proto == 0) + unknownprint(); + else + abort(); } diff --git a/apps/snmpnetstat/main.c b/apps/snmpnetstat/main.c index 0e977ad..6f00d1e 100644 --- a/apps/snmpnetstat/main.c +++ b/apps/snmpnetstat/main.c @@ -1,9 +1,13 @@ -/* $OpenBSD: main.c,v 1.52 2005/02/10 14:25:08 itojun Exp $ */ -/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ +/* + * $OpenBSD: main.c,v 1.52 2005/02/10 14:25:08 itojun Exp $ + */ +/* + * $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ + */ /* * Copyright (c) 1983, 1988, 1993 - * Regents of the University of California. All rights reserved. + * Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,448 +35,475 @@ */ #ifndef lint -char copyright[] = -"@(#) Copyright (c) 1983, 1988, 1993\n\ +char copyright[] = "@(#) Copyright (c) 1983, 1988, 1993\n\ Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; -#else -static char *rcsid = "$OpenBSD: main.c,v 1.52 2005/02/10 14:25:08 itojun Exp $"; -#endif -#endif /* not lint */ -#endif +#endif /* not lint */ #include #include #include -#if HAVE_NETDB_H +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_NETDB_H #include #endif #include "main.h" #include "netstat.h" -#if HAVE_WINSOCK_H +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif -int aflag; /* show all sockets (including servers) */ -int bflag; /* show bytes instead of packets */ -int dflag; /* show i/f dropped packets */ -int gflag; /* show group (multicast) routing or stats */ -int iflag; /* show interfaces */ -int lflag; /* show routing table with use and ref */ -int Lflag; /* Legacy mibs */ -int mflag; /* show memory stats */ -int nflag; /* show addresses numerically */ -int oflag; /* Open/Net-BSD style octet output */ -int pflag; /* show given protocol */ -int qflag; /* only display non-zero values for output */ -int rflag; /* show routing tables (or routing stats) */ -int Sflag; /* show source address in routing table */ -int sflag; /* show protocol statistics */ -int tflag; /* show i/f watchdog timers */ -int vflag; /* be verbose */ - - -int interval; /* repeat interval for i/f stats */ -char *intrface; /* desired i/f for stats, or NULL for all i/fs */ -int af; /* address family */ -int max_getbulk = 32; /* specifies the max-repeaters value to use with GETBULK requests */ - -char *progname = NULL; -const char *pname; - /* - * struct nlist nl[] - Omitted - */ +int aflag; /* show all sockets (including servers) */ +int bflag; /* show bytes instead of packets */ +int dflag; /* show i/f dropped packets */ +int gflag; /* show group (multicast) routing or stats */ +int iflag; /* show interfaces */ +int lflag; /* show routing table with use and ref */ +int Lflag; /* Legacy mibs */ +int mflag; /* show memory stats */ +int nflag; /* show addresses numerically */ +int oflag; /* Open/Net-BSD style octet output */ +int pflag; /* show given protocol */ +int qflag; /* only display non-zero values for output */ +int rflag; /* show routing tables (or routing stats) */ +int Sflag; /* show source address in routing table */ +int sflag; /* show protocol statistics */ +int tflag; /* show i/f watchdog timers */ +int vflag; /* be verbose */ + + +int interval; /* repeat interval for i/f stats */ +char *intrface; /* desired i/f for stats, or NULL for all i/fs */ +int af; /* address family */ +int max_getbulk = 32; /* specifies the max-repeaters value to use with GETBULK requests */ + +char *progname = NULL; +const char *pname; +/* + * struct nlist nl[] - Omitted + */ -typedef void (stringfun)(const char*); +typedef void (stringfun) (const char *); struct protox { - /* pr_index/pr_sindex - Omitted */ - int pr_wanted; /* 1 if wanted, 0 otherwise */ - stringfun *pr_cblocks; /* control blocks printing routine */ - stringfun *pr_stats; /* statistics printing routine */ - const char *pr_name; /* well-known name */ + /* + * pr_index/pr_sindex - Omitted + */ + int pr_wanted; /* 1 if wanted, 0 otherwise */ + stringfun *pr_cblocks; /* control blocks printing routine */ + stringfun *pr_stats; /* statistics printing routine */ + const char *pr_name; /* well-known name */ }; -struct protox protox[] = { - { 1, tcpprotopr, tcp_stats, "tcp" }, - { 1, udpprotopr, udp_stats, "udp" }, +struct protox protox[] = { + {1, tcpprotopr, tcp_stats, "tcp"}, + {1, udpprotopr, udp_stats, "udp"}, - { 1, (stringfun*)0, ip_stats, "ip" }, /* protopr Omitted */ - { 1, (stringfun*)0, icmp_stats, "icmp" }, - /* igmp/ah/esp/ipencap/etherip/ipcomp/carp/pfsync/pim - Omitted */ - { 0, (stringfun*)0, (stringfun*)0, NULL } + {1, (stringfun *) 0, ip_stats, "ip"}, /* protopr Omitted */ + {1, (stringfun *) 0, icmp_stats, "icmp"}, + /* + * igmp/ah/esp/ipencap/etherip/ipcomp/carp/pfsync/pim - Omitted + */ + {0, (stringfun *) 0, (stringfun *) 0, NULL} }; -struct protox ip6protox[] = { - { 1, tcp6protopr, (stringfun*)0, "tcp6" }, - { 1, udp6protopr, (stringfun*)0, "udp6" }, +struct protox ip6protox[] = { + {1, tcp6protopr, (stringfun *) 0, "tcp6"}, + {1, udp6protopr, (stringfun *) 0, "udp6"}, - { 1, (stringfun*)0, ip6_stats, "ip6" },/* ip6protopr Omitted */ - { 1, (stringfun*)0, icmp6_stats, "icmp6" }, - /* pim6/rip6 - Omitted */ - { 0, (stringfun*)0, (stringfun*)0, NULL } + {1, (stringfun *) 0, ip6_stats, "ip6"}, /* ip6protopr Omitted */ + {1, (stringfun *) 0, icmp6_stats, "icmp6"}, + /* + * pim6/rip6 - Omitted + */ + {0, (stringfun *) 0, (stringfun *) 0, NULL} }; -struct protox ipxprotox[] = { - { 1, tcpxprotopr, tcp_stats, "tcp" }, - { 1, udpxprotopr, udp_stats, "udp" }, - { 1, (stringfun*)0, ipx_stats, "ip" },/* ip6protopr Omitted */ - { 1, (stringfun*)0, ipx_stats, "ip6" },/* ip6protopr Omitted */ - { 1, (stringfun*)0, icmpx_stats, "icmp" }, - { 1, (stringfun*)0, icmpx_stats, "icmp6" }, - { 0, (stringfun*)0, (stringfun*)0, NULL } +struct protox ipxprotox[] = { + {1, tcpxprotopr, tcp_stats, "tcp"}, + {1, udpxprotopr, udp_stats, "udp"}, + {1, (stringfun *) 0, ipx_stats, "ip"}, /* ip6protopr Omitted */ + {1, (stringfun *) 0, ipx_stats, "ip6"}, /* ip6protopr Omitted */ + {1, (stringfun *) 0, icmpx_stats, "icmp"}, + {1, (stringfun *) 0, icmpx_stats, "icmp6"}, + {0, (stringfun *) 0, (stringfun *) 0, NULL} }; - /* {ipx,ns,atalk}protox Omitted */ +/* + * {ipx,ns,atalk}protox Omitted + */ -struct protox *protoprotox[] = { - protox, ip6protox, NULL +struct protox *protoprotox[] = { + protox, ip6protox, NULL }; -static void printproto(struct protox *, const char *); -static void usage(void); +static void printproto(struct protox *, const char *); +static void usage(void); static struct protox *name2protox(const char *); static struct protox *knownname(const char *); netsnmp_session *ss; -struct protox *tp = NULL; /* for printing cblocks & stats */ +struct protox *tp = NULL; /* for printing cblocks & stats */ static void -optProc( int argc, char *const *argv, int opt ) +optProc(int argc, char *const *argv, int opt) { switch (opt) { case 'C': while (*optarg) { switch (*optarg++) { - case 'a': - aflag = 1; - break; - case 'b': - bflag = 1; - break; - case 'd': - dflag = 1; - break; - case 'f': - if (!*optarg) - optarg = argv[optind++]; - if (strcmp(optarg, "inet") == 0) - af = AF_INET; - else if (strcmp(optarg, "inet6") == 0) - af = AF_INET6; - /* - else if (strcmp(optarg, "local") == 0) - af = AF_LOCAL; - else if (strcmp(optarg, "unix") == 0) - af = AF_UNIX; - else if (strcmp(optarg, "ipx") == 0) - af = AF_IPX; - else if (strcmp(optarg, "ns") == 0) - af = AF_NS; - else if (strcmp(optarg, "encap") == 0) - af = PF_KEY; - else if (strcmp(optarg, "atalk") == 0) - af = AF_APPLETALK; - */ - else { - (void)fprintf(stderr, - "%s: %s: unknown address family\n", - progname, optarg); - exit(1); - } - return; - case 'g': - gflag = 1; - break; - case 'I': - iflag = 1; - if (!*optarg) - optarg = argv[optind++]; - intrface = optarg; - return; - case 'i': - iflag = 1; - break; - case 'L': - Lflag = 1; - break; - /* case 'L': FreeBSD: Display listen queue lengths - NetBSD: Suppress link-level routes */ - /* case 'l': OpenBSD: Wider IPv6 display - Linux: Listening sockets only - lflag = 1; - break; - case 'M': *BSD: Memory image - Linux: Masqueraded connections - memf = optarg; - break; - */ - case 'm': - mflag = 1; - break; - /* case 'N': *BSD: Kernel image - nlistf = optarg; - break; - */ - case 'n': - nflag = 1; - break; - case 'o': - oflag = 1; - break; - /* case 'P': NetBSD: - OpenBSD: dump PCB block */ - case 'p': - if (!*optarg) - optarg = argv[optind++]; - if ((tp = name2protox(optarg)) == NULL) { - (void)fprintf(stderr, - "%s: %s: unknown protocol\n", - progname, optarg); - exit(1); - } - pflag = 1; - pname = tp->pr_name; - return; - /* case 'q': NetBSD: IRQ information - OpenBSD: Suppress inactive I/Fs - qflag = 1; - break; - */ - case 'r': - rflag = 1; - break; - case 'R': - if (optind < argc) { - if (argv[optind]) { - max_getbulk = atoi(argv[optind]); - if (max_getbulk == 0) { - usage(); - fprintf(stderr, "Bad -CR option: %s\n", - argv[optind]); - exit(1); - } - } - } else { + case 'a': + aflag = 1; + break; + case 'b': + bflag = 1; + break; + case 'd': + dflag = 1; + break; + case 'f': + if (!*optarg) + optarg = argv[optind++]; + if (strcmp(optarg, "inet") == 0) + af = AF_INET; + else if (strcmp(optarg, "inet6") == 0) + af = AF_INET6; + /* + * else if (strcmp(optarg, "local") == 0) + * af = AF_LOCAL; + * else if (strcmp(optarg, "unix") == 0) + * af = AF_UNIX; + * else if (strcmp(optarg, "ipx") == 0) + * af = AF_IPX; + * else if (strcmp(optarg, "ns") == 0) + * af = AF_NS; + * else if (strcmp(optarg, "encap") == 0) + * af = PF_KEY; + * else if (strcmp(optarg, "atalk") == 0) + * af = AF_APPLETALK; + */ + else { + (void) fprintf(stderr, + "%s: %s: unknown address family\n", + progname, optarg); + exit(1); + } + return; + case 'g': + gflag = 1; + break; + case 'I': + iflag = 1; + if (!*optarg) + optarg = argv[optind++]; + intrface = optarg; + return; + case 'i': + iflag = 1; + break; + case 'L': + Lflag = 1; + break; + /* + * case 'L': FreeBSD: Display listen queue lengths + * NetBSD: Suppress link-level routes + */ + /* + * case 'l': OpenBSD: Wider IPv6 display + * Linux: Listening sockets only + * lflag = 1; + * break; + * case 'M': *BSD: Memory image + * Linux: Masqueraded connections + * memf = optarg; + * break; + */ + case 'm': + mflag = 1; + break; + /* + * case 'N': *BSD: Kernel image + * nlistf = optarg; + * break; + */ + case 'n': + nflag = 1; + break; + case 'o': + oflag = 1; + break; + /* + * case 'P': NetBSD: + * OpenBSD: dump PCB block + */ + case 'p': + if (!*optarg) + optarg = argv[optind++]; + if ((tp = name2protox(optarg)) == NULL) { + (void) fprintf(stderr, + "%s: %s: unknown protocol\n", + progname, optarg); + exit(1); + } + pflag = 1; + pname = tp->pr_name; + return; + /* + * case 'q': NetBSD: IRQ information + * OpenBSD: Suppress inactive I/Fs + * qflag = 1; + * break; + */ + case 'r': + rflag = 1; + break; + case 'R': + if (optind < argc) { + if (argv[optind]) { + max_getbulk = atoi(argv[optind]); + if (max_getbulk == 0) { usage(); - fprintf(stderr, "Bad -CR option: no argument given\n"); + fprintf(stderr, "Bad -CR option: %s\n", + argv[optind]); exit(1); } - optind++; - break; - case 'S': /* FreeBSD: - NetBSD: Semi-numeric display - OpenBSD: Show route source selector */ - Sflag = 1; - break; - case 's': - ++sflag; - break; - /* case 't': FreeBSD: - OpenBSD: Display watchdog timers - tflag = 1; - break; - case 'u': OpenBSD: unix sockets only - af = AF_UNIX; - break; - */ - case 'v': - vflag = 1; - break; - case 'w': - if (!*optarg) - optarg = argv[optind++]; - interval = atoi(optarg); - iflag = 1; - return; - case '?': - default: - usage(); + } + } else { + usage(); + fprintf(stderr, "Bad -CR option: no argument given\n"); + exit(1); + } + optind++; + break; + case 'S': /* FreeBSD: + * NetBSD: Semi-numeric display + * OpenBSD: Show route source selector */ + Sflag = 1; + break; + case 's': + ++sflag; + break; + /* + * case 't': FreeBSD: + * OpenBSD: Display watchdog timers + * tflag = 1; + * break; + * case 'u': OpenBSD: unix sockets only + * af = AF_UNIX; + * break; + */ + case 'v': + vflag = 1; + break; + case 'w': + if (!*optarg) + optarg = argv[optind++]; + interval = atoi(optarg); + iflag = 1; + return; + case '?': + default: + usage(); + exit(1); } } - break; /* End of '-Cx' switch */ + break; /* End of '-Cx' switch */ - /* - * Backward compatability for the main display modes - * (where this doesn't clash with standard SNMP flags) - */ + /* + * Backward compatability for the main display modes + * (where this doesn't clash with standard SNMP flags) + */ case 'i': - iflag = 1; - break; + iflag = 1; + break; case 'R': - rflag = 1; /* -r sets the retry count */ - break; + rflag = 1; /* -r sets the retry count */ + break; case 's': - ++sflag; - break; + ++sflag; + break; } } int main(int argc, char *argv[]) { - netsnmp_session session; - struct protoent *p; - char *cp; - - af = AF_UNSPEC; - cp = strrchr( argv[0], '/' ); - if (cp) - progname = cp+1; - else - progname = argv[0]; - - switch (snmp_parse_args( argc, argv, &session, "C:iRs", optProc)) { - case NETSNMP_PARSE_ARGS_ERROR: - exit(1); - case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); - case NETSNMP_PARSE_ARGS_ERROR_USAGE: - usage(); - exit(1); - default: - break; - } - - /* - * Check argc vs optind ?? - */ - argv += optind; - argc -= optind; + netsnmp_session session; + struct protoent *p; + char *cp; + int exit_code = 1; + + SOCK_STARTUP; + + af = AF_UNSPEC; + cp = strrchr(argv[0], '/'); + if (cp) + progname = cp + 1; + else + progname = argv[0]; + + switch (snmp_parse_args(argc, argv, &session, "C:iRs", optProc)) { + case NETSNMP_PARSE_ARGS_ERROR: + goto out; + case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: + exit_code = 0; + goto out; + case NETSNMP_PARSE_ARGS_ERROR_USAGE: + usage(); + goto out; + default: + break; + } + + /* + * Check argc vs optind ?? + */ + argv += optind; + argc -= optind; /* * Open an SNMP session. */ - SOCK_STARTUP; ss = snmp_open(&session); if (ss == NULL) { /* - * diagnose snmp_open errors with the input netsnmp_session pointer + * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpnetstat", &session); - SOCK_CLEANUP; - exit(1); + goto out; } - /* - * Omitted: - * Privilege handling - * "Backward Compatibility" - * Kernel namelis handling - */ + /* + * Omitted: + * Privilege handling + * "Backward Compatibility" + * Kernel namelis handling + */ #if 0 - if (mflag) { - /* - mbpr(nl[N_MBSTAT].n_value, nl[N_MBPOOL].n_value, - nl[N_MCLPOOL].n_value); - */ - exit(0); - } - if (pflag) { - printproto(tp, tp->pr_name); - exit(0); - } -#endif - /* - * Keep file descriptors open to avoid overhead - * of open/close on each call to get* routines. - */ - sethostent(1); - setnetent(1); - if (iflag) { - intpr(interval); - exit(0); - } - if (rflag) { - /* - if (sflag) - rt_stats(); - else - */ - if (Lflag || routexpr(af) == 0) { - if (route4pr(af) == 0 && af == AF_INET) routepr(); - route6pr(af); - } - exit(0); - } - /* - if (gflag) { - if (sflag) { - if (af == AF_INET || af == AF_UNSPEC) - mrt_stats(nl[N_MRTPROTO].n_value, - nl[N_MRTSTAT].n_value); -#ifdef NETSNMP_ENABLE_IPV6 - if (af == AF_INET6 || af == AF_UNSPEC) - mrt6_stats(nl[N_MRT6PROTO].n_value, - nl[N_MRT6STAT].n_value); -#endif - } - else { - if (af == AF_INET || af == AF_UNSPEC) - mroutepr(nl[N_MRTPROTO].n_value, - nl[N_MFCHASHTBL].n_value, - nl[N_MFCHASH].n_value, - nl[N_VIFTABLE].n_value); -#ifdef NETSNMP_ENABLE_IPV6 - if (af == AF_INET6 || af == AF_UNSPEC) - mroute6pr(nl[N_MRT6PROTO].n_value, - nl[N_MF6CTABLE].n_value, - nl[N_MIF6TABLE].n_value); + if (mflag) { + /* + * mbpr(nl[N_MBSTAT].n_value, nl[N_MBPOOL].n_value, + * nl[N_MCLPOOL].n_value); + */ + exit_code = 0; + goto out; + } + if (pflag) { + printproto(tp, tp->pr_name); + exit_code = 0; + goto out; + } #endif - } - exit(0); - } + /* + * Keep file descriptors open to avoid overhead + * of open/close on each call to get* routines. */ - setservent(1); - if (Lflag) { - switch (af) { - case AF_UNSPEC: - setprotoent(1); - /* ugh, this is O(MN) ... why do we do this? */ - while ((p = getprotoent())) { - for (tp = protox; tp->pr_name; tp++) - if (strcmp(tp->pr_name, p->p_name) == 0) - if (tp->pr_name && tp->pr_wanted) - printproto(tp, p->p_name); - } - endprotoent(); - break; - case AF_INET: - for (tp = protox; tp->pr_name; tp++) - printproto(tp, tp->pr_name); - case AF_INET6: - for (tp = ip6protox; tp->pr_name; tp++) - printproto(tp, tp->pr_name); + sethostent(1); + setnetent(1); + if (iflag) { + intpr(interval); + exit_code = 0; + goto out; + } + if (rflag) { + /* + * if (sflag) + * rt_stats(); + * else + */ + if (Lflag || routexpr(af) == 0) { + if (route4pr(af) == 0 && af == AF_INET) + routepr(); + route6pr(af); + } + exit_code = 0; + goto out; + } + /* + * if (gflag) { + * if (sflag) { + * if (af == AF_INET || af == AF_UNSPEC) + * mrt_stats(nl[N_MRTPROTO].n_value, + * nl[N_MRTSTAT].n_value); + * #ifdef NETSNMP_ENABLE_IPV6 + * if (af == AF_INET6 || af == AF_UNSPEC) + * mrt6_stats(nl[N_MRT6PROTO].n_value, + * nl[N_MRT6STAT].n_value); + * #endif + * } + * else { + * if (af == AF_INET || af == AF_UNSPEC) + * mroutepr(nl[N_MRTPROTO].n_value, + * nl[N_MFCHASHTBL].n_value, + * nl[N_MFCHASH].n_value, + * nl[N_VIFTABLE].n_value); + * #ifdef NETSNMP_ENABLE_IPV6 + * if (af == AF_INET6 || af == AF_UNSPEC) + * mroute6pr(nl[N_MRT6PROTO].n_value, + * nl[N_MF6CTABLE].n_value, + * nl[N_MIF6TABLE].n_value); + * #endif + * } + * exit_code = 0; + * goto out; + * } + */ + setservent(1); + if (Lflag) { + switch (af) { + case AF_UNSPEC: + setprotoent(1); + /* + * ugh, this is O(MN) ... why do we do this? + */ + while ((p = getprotoent())) { + for (tp = protox; tp->pr_name; tp++) + if (strcmp(tp->pr_name, p->p_name) == 0) + if (tp->pr_name && tp->pr_wanted) + printproto(tp, p->p_name); } - } - else { - for (tp = ipxprotox; tp->pr_name; tp++) - if (!pname || strcmp(pname,tp->pr_name) == 0) - printproto(tp, pname); - } + endprotoent(); + break; + case AF_INET: + for (tp = protox; tp->pr_name; tp++) + printproto(tp, tp->pr_name); + /* + * FALL THROUGH + */ + case AF_INET6: + for (tp = ip6protox; tp->pr_name; tp++) + printproto(tp, tp->pr_name); + } + } else { + for (tp = ipxprotox; tp->pr_name; tp++) + if (!pname || strcmp(pname, tp->pr_name) == 0) + printproto(tp, pname); + } /* - if (af == AF_IPX || af == AF_UNSPEC) - for (tp = ipxprotox; tp->pr_name; tp++) - printproto(tp, tp->pr_name); - if (af == AF_NS || af == AF_UNSPEC) - for (tp = nsprotox; tp->pr_name; tp++) - printproto(tp, tp->pr_name); - if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag) - unixpr(nl[N_UNIXSW].n_value); - if (af == AF_APPLETALK || af == AF_UNSPEC) - for (tp = atalkprotox; tp->pr_name; tp++) - printproto(tp, tp->pr_name); + * if (af == AF_IPX || af == AF_UNSPEC) + * for (tp = ipxprotox; tp->pr_name; tp++) + * printproto(tp, tp->pr_name); + * if (af == AF_NS || af == AF_UNSPEC) + * for (tp = nsprotox; tp->pr_name; tp++) + * printproto(tp, tp->pr_name); + * if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag) + * unixpr(nl[N_UNIXSW].n_value); + * if (af == AF_APPLETALK || af == AF_UNSPEC) + * for (tp = atalkprotox; tp->pr_name; tp++) + * printproto(tp, tp->pr_name); */ - exit(0); + + exit_code = 0; + + out: + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return exit_code; } /* @@ -482,25 +513,25 @@ main(int argc, char *argv[]) static void printproto(struct protox *tp, const char *name) { - void (*pr)(const char *); - - if (sflag) { - pr = tp->pr_stats; - } else { - pr = tp->pr_cblocks; - } - if (pr != NULL) - (*pr)(name); + void (*pr)(const char *); + + if (sflag) { + pr = tp->pr_stats; + } else { + pr = tp->pr_cblocks; + } + if (pr != NULL) + (*pr) (name); } /* * Read kernel memory - Omitted */ -const char * +const char * plural(int n) { - return (n != 1 ? "s" : ""); + return (n != 1 ? "s" : ""); } /* @@ -509,13 +540,13 @@ plural(int n) static struct protox * knownname(const char *name) { - struct protox **tpp, *tp; + struct protox **tpp, *tp; - for (tpp = protoprotox; *tpp; tpp++) - for (tp = *tpp; tp->pr_name; tp++) - if (strcmp(tp->pr_name, name) == 0) - return (tp); - return (NULL); + for (tpp = protoprotox; *tpp; tpp++) + for (tp = *tpp; tp->pr_name; tp++) + if (strcmp(tp->pr_name, name) == 0) + return (tp); + return (NULL); } /* @@ -524,40 +555,45 @@ knownname(const char *name) static struct protox * name2protox(const char *name) { - struct protox *tp; - char **alias; /* alias from p->aliases */ - struct protoent *p; - - /* - * Try to find the name in the list of "well-known" names. If that - * fails, check if name is an alias for an Internet protocol. - */ - if ((tp = knownname(name))) - return (tp); - - setprotoent(1); /* make protocol lookup cheaper */ - while ((p = getprotoent())) { - /* netsnmp_assert: name not same as p->name */ - for (alias = p->p_aliases; *alias; alias++) - if (strcmp(name, *alias) == 0) { - endprotoent(); - return (knownname(p->p_name)); - } - } - endprotoent(); - return (NULL); + struct protox *tp; + char **alias; /* alias from p->aliases */ + struct protoent *p; + + /* + * Try to find the name in the list of "well-known" names. If that + * fails, check if name is an alias for an Internet protocol. + */ + if ((tp = knownname(name))) + return (tp); + + setprotoent(1); /* make protocol lookup cheaper */ + while ((p = getprotoent())) { + /* + * netsnmp_assert: name not same as p->name + */ + for (alias = p->p_aliases; *alias; alias++) + if (strcmp(name, *alias) == 0) { + endprotoent(); + return (knownname(p->p_name)); + } + } + endprotoent(); + return (NULL); } static void usage(void) { - (void)fprintf(stderr, -"usage: %s [snmp_opts] [-Canv] [-Cf address_family]\n", progname); - (void)fprintf(stderr, -" %s [snmp_opts] [-Cibodnv] [-CI interface] [-Cw wait]\n", progname); - (void)fprintf(stderr, -" %s [snmp_opts] [-Cs[s]] [-Cp protocol]\n", progname); - (void)fprintf(stderr, -" %s [snmp_opts] [-Crnv] [-Cf address_family]\n", progname); - exit(1); + (void) fprintf(stderr, + "usage: %s [snmp_opts] [-Canv] [-Cf address_family]\n", + progname); + (void) fprintf(stderr, + " %s [snmp_opts] [-Cibodnv] [-CI interface] [-Cw wait]\n", + progname); + (void) fprintf(stderr, + " %s [snmp_opts] [-Cs[s]] [-Cp protocol]\n", + progname); + (void) fprintf(stderr, + " %s [snmp_opts] [-Crnv] [-Cf address_family]\n", + progname); } diff --git a/apps/snmpnetstat/main.h b/apps/snmpnetstat/main.h index 1272321..df4dba4 100644 --- a/apps/snmpnetstat/main.h +++ b/apps/snmpnetstat/main.h @@ -3,16 +3,16 @@ #define MAXHOSTNAMELEN 64 #endif -extern netsnmp_session *ss; +extern netsnmp_session *ss; NETSNMP_IMPORT -int netsnmp_query_get( netsnmp_variable_list *list, - netsnmp_session *session); + int netsnmp_query_get(netsnmp_variable_list * list, + netsnmp_session *session); NETSNMP_IMPORT -int netsnmp_query_getnext(netsnmp_variable_list *list, - netsnmp_session *session); + int netsnmp_query_getnext(netsnmp_variable_list * list, + netsnmp_session *session); NETSNMP_IMPORT -int netsnmp_query_walk( netsnmp_variable_list *list, - netsnmp_session *session); + int netsnmp_query_walk(netsnmp_variable_list * list, + netsnmp_session *session); #ifndef AF_INET6 #define AF_INET6 10 diff --git a/apps/snmpnetstat/netstat.h b/apps/snmpnetstat/netstat.h index ba61eb3..41a537c 100644 --- a/apps/snmpnetstat/netstat.h +++ b/apps/snmpnetstat/netstat.h @@ -1,9 +1,13 @@ -/* $OpenBSD: netstat.h,v 1.31 2005/02/10 14:25:08 itojun Exp $ */ -/* $NetBSD: netstat.h,v 1.6 1996/05/07 02:55:05 thorpej Exp $ */ +/* + * $OpenBSD: netstat.h,v 1.31 2005/02/10 14:25:08 itojun Exp $ + */ +/* + * $NetBSD: netstat.h,v 1.6 1996/05/07 02:55:05 thorpej Exp $ + */ /* * Copyright (c) 1992, 1993 - * Regents of the University of California. All rights reserved. + * Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,77 +33,80 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)netstat.h 8.2 (Berkeley) 1/4/94 + * from: @(#)netstat.h 8.2 (Berkeley) 1/4/94 */ #ifdef HAVE_SYS_CDEFS_H #include #endif -/* What is the max length of a pointer printed with %p (including 0x)? */ +/* + * What is the max length of a pointer printed with %p (including 0x)? + */ #define PLEN (LONG_BIT / 4 + 2) -extern int aflag; /* show all sockets (including servers) */ -extern int bflag; /* show bytes instead of packets */ -extern int dflag; /* show i/f dropped packets */ -extern int gflag; /* show group (multicast) routing or stats */ -extern int iflag; /* show interfaces */ -extern int lflag; /* show routing table with use and ref */ -extern int Lflag; /* Legacy mibs */ -extern int mflag; /* show memory stats */ -extern int nflag; /* show addresses numerically */ -extern int oflag; /* Open/Net-BSD style octet output */ -extern int pflag; /* show given protocol */ -extern int qflag; /* only display non-zero values for output */ -extern int rflag; /* show routing tables (or routing stats) */ -extern int Sflag; /* show source address in routing table */ -extern int sflag; /* show protocol statistics */ -extern int tflag; /* show i/f watchdog timers */ -extern int vflag; /* be verbose */ +extern int aflag; /* show all sockets (including servers) */ +extern int bflag; /* show bytes instead of packets */ +extern int dflag; /* show i/f dropped packets */ +extern int gflag; /* show group (multicast) routing or stats */ +extern int iflag; /* show interfaces */ +extern int lflag; /* show routing table with use and ref */ +extern int Lflag; /* Legacy mibs */ +extern int mflag; /* show memory stats */ +extern int nflag; /* show addresses numerically */ +extern int oflag; /* Open/Net-BSD style octet output */ +extern int pflag; /* show given protocol */ +extern int qflag; /* only display non-zero values for output */ +extern int rflag; /* show routing tables (or routing stats) */ +extern int Sflag; /* show source address in routing table */ +extern int sflag; /* show protocol statistics */ +extern int tflag; /* show i/f watchdog timers */ +extern int vflag; /* be verbose */ -extern int interval; /* repeat interval for i/f stats */ +extern int interval; /* repeat interval for i/f stats */ -extern char *intrface; /* desired i/f for stats, or NULL for all i/fs */ +extern char *intrface; /* desired i/f for stats, or NULL for all i/fs */ -extern int af; /* address family */ -extern int max_getbulk; /* specifies the max-repeaters value to use with GETBULK requests */ +extern int af; /* address family */ +extern int max_getbulk; /* specifies the max-repeaters value to use with GETBULK requests */ -extern char *__progname; /* program name, from crt0.o */ +extern char *__progname; /* program name, from crt0.o */ -const char *plural(int); +const char *plural(int); -void tcpprotopr(const char *); -void udpprotopr(const char *); -void tcp_stats( const char *); -void udp_stats( const char *); -void ip_stats( const char *); -void icmp_stats(const char *); +void tcpprotopr(const char *); +void udpprotopr(const char *); +void tcp_stats(const char *); +void udp_stats(const char *); +void ip_stats(const char *); +void icmp_stats(const char *); -void tcp6protopr(const char *); -void udp6protopr(const char *); -void ip6_stats( const char *); -void icmp6_stats(const char *); +void tcp6protopr(const char *); +void udp6protopr(const char *); +void ip6_stats(const char *); +void icmp6_stats(const char *); -void tcpxprotopr(const char *); -void udpxprotopr(const char *); -void listenxprotopr(const char *); -void ipx_stats(const char *); -void icmpx_stats(const char *); +void tcpxprotopr(const char *); +void udpxprotopr(const char *); +void listenxprotopr(const char *); +void ipx_stats(const char *); +void icmpx_stats(const char *); -void pr_rthdr(int); -void pr_encaphdr(void); -void pr_family(int); -void rt_stats(void); +void pr_rthdr(int); +void pr_encaphdr(void); +void pr_family(int); +void rt_stats(void); -void get_ifname(char *, int); -char *routename(in_addr_t); -char *netname(in_addr_t, in_addr_t); -char *ns_print(struct sockaddr *); -void routepr(void); -int route4pr(int); -int route6pr(int); -int routexpr(int); +void get_ifname(char *, int); +char *routename(in_addr_t); +char *netname(in_addr_t, in_addr_t); +char *ns_print(struct sockaddr *); +void routepr(void); +int route4pr(int); +int route6pr(int); +int routexpr(int); -void intpr(int); -void inetprint(struct in_addr *, int, const char *, int); -void inet6print(unsigned char *, int, const char *, int); +void intpr(int); +void inetprint(const struct in_addr *, int, const char *, int); +void inet6print(const struct in6_addr *, int, const char *, + int); diff --git a/apps/snmpnetstat/route.c b/apps/snmpnetstat/route.c index 1dba74d..02cb15a 100644 --- a/apps/snmpnetstat/route.c +++ b/apps/snmpnetstat/route.c @@ -1,9 +1,13 @@ -/* $OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $ */ -/* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ +/* + * $OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $ + */ +/* + * $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ + */ /* * Copyright (c) 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,35 +34,25 @@ * SUCH DAMAGE. */ -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; -#else -static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $"; -#endif -#endif /* not lint */ -#endif - #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -68,7 +62,8 @@ static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $" #include "main.h" #include "netstat.h" -#if HAVE_WINSOCK_H +#include "ffs.h" +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif @@ -91,8 +86,7 @@ struct route_entry { char ifname[64]; }; -void p_rtnode( struct route_entry *rp ); -extern int _ffs(int mask); +void p_rtnode(struct route_entry *rp); /* * Print routing tables. @@ -100,80 +94,82 @@ extern int _ffs(int mask); void routepr(void) { - struct route_entry route, *rp = &route; - oid rtcol_oid[] = { 1,3,6,1,2,1,4,21,1,0 }; - size_t rtcol_len = OID_LENGTH( rtcol_oid ); + struct route_entry route, *rp = &route; + oid rtcol_oid[] = { 1, 3, 6, 1, 2, 1, 4, 21, 1, 0 }; + size_t rtcol_len = OID_LENGTH(rtcol_oid); union { - in_addr_t addr; - char data[4]; + in_addr_t addr; + char data[4]; } tmpAddr; - netsnmp_variable_list *var=NULL, *vp; - char *cp; - + netsnmp_variable_list *var = NULL, *vp; + char *cp; + printf("Routing tables (ipRouteTable)\n"); pr_rthdr(AF_INET); #define ADD_RTVAR( x ) rtcol_oid[ rtcol_len-1 ] = x; \ snmp_varlist_add_variable( &var, rtcol_oid, rtcol_len, ASN_NULL, NULL, 0) - ADD_RTVAR( 2 ); /* ipRouteIfIndex */ - ADD_RTVAR( 7 ); /* ipRouteNextHop */ - ADD_RTVAR( 8 ); /* ipRouteType */ - ADD_RTVAR( 9 ); /* ipRouteProto */ - ADD_RTVAR( 11 ); /* ipRouteMask */ + ADD_RTVAR(2); /* ipRouteIfIndex */ + ADD_RTVAR(7); /* ipRouteNextHop */ + ADD_RTVAR(8); /* ipRouteType */ + ADD_RTVAR(9); /* ipRouteProto */ + ADD_RTVAR(11); /* ipRouteMask */ #undef ADD_RTVAR - /* - * Now walk the ipRouteTable, reporting the various route entries - */ - while ( 1 ) { - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + /* + * Now walk the ipRouteTable, reporting the various route entries + */ + while (1) { + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; - rtcol_oid[ rtcol_len-1 ] = 2; /* ifRouteIfIndex */ - if ( snmp_oid_compare( rtcol_oid, rtcol_len, - var->name, rtcol_len) != 0 ) - break; /* End of Table */ - if (var->type == SNMP_NOSUCHOBJECT || - var->type == SNMP_NOSUCHINSTANCE || - var->type == SNMP_ENDOFMIBVIEW) - break; - memset( &route, 0, sizeof( struct route_entry )); - /* Extract ipRouteDest index value */ + rtcol_oid[rtcol_len - 1] = 2; /* ifRouteIfIndex */ + if (snmp_oid_compare(rtcol_oid, rtcol_len, + var->name, rtcol_len) != 0) + break; /* End of Table */ + if (var->type == SNMP_NOSUCHOBJECT || + var->type == SNMP_NOSUCHINSTANCE || + var->type == SNMP_ENDOFMIBVIEW) + break; + memset(&route, 0, sizeof(struct route_entry)); + /* + * Extract ipRouteDest index value + */ cp = tmpAddr.data; - cp[0] = var->name[ 10 ] & 0xff; - cp[1] = var->name[ 11 ] & 0xff; - cp[2] = var->name[ 12 ] & 0xff; - cp[3] = var->name[ 13 ] & 0xff; + cp[0] = var->name[10] & 0xff; + cp[1] = var->name[11] & 0xff; + cp[2] = var->name[12] & 0xff; + cp[3] = var->name[13] & 0xff; rp->destination = tmpAddr.addr; - for ( vp=var; vp; vp=vp->next_variable ) { - switch ( vp->name[ 9 ] ) { - case 2: /* ifRouteIfIndex */ - rp->ifNumber = *vp->val.integer; + for (vp = var; vp; vp = vp->next_variable) { + switch (vp->name[9]) { + case 2: /* ifRouteIfIndex */ + rp->ifNumber = *vp->val.integer; rp->set_bits |= SET_IFNO; break; - case 7: /* ipRouteNextHop */ + case 7: /* ipRouteNextHop */ memmove(&rp->gateway, vp->val.string, 4); rp->set_bits |= SET_GWAY; break; - case 8: /* ipRouteType */ - rp->type = *vp->val.integer; + case 8: /* ipRouteType */ + rp->type = *vp->val.integer; rp->set_bits |= SET_TYPE; break; - case 9: /* ipRouteProto */ - rp->proto = *vp->val.integer; + case 9: /* ipRouteProto */ + rp->proto = *vp->val.integer; rp->set_bits |= SET_PRTO; break; - case 11: /* ipRouteMask */ + case 11: /* ipRouteMask */ memmove(&rp->mask, vp->val.string, 4); rp->set_bits |= SET_MASK; break; } } if (rp->set_bits != SET_ALL) { - continue; /* Incomplete query */ + continue; /* Incomplete query */ } - p_rtnode( rp ); + p_rtnode(rp); } } @@ -181,47 +177,47 @@ routepr(void) int route4pr(int af) { - struct route_entry route, *rp = &route; - oid rtcol_oid[] = { 1,3,6,1,2,1,4,24,4,1,0 }; /* ipCidrRouteEntry */ - size_t rtcol_len = OID_LENGTH( rtcol_oid ); + struct route_entry route, *rp = &route; + oid rtcol_oid[] = { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 0 }; /* ipCidrRouteEntry */ + size_t rtcol_len = OID_LENGTH(rtcol_oid); netsnmp_variable_list *var = NULL, *vp; union { - in_addr_t addr; - unsigned char data[4]; + in_addr_t addr; + unsigned char data[4]; } tmpAddr; - int printed = 0; - int hdr_af = AF_UNSPEC; + int printed = 0; + int hdr_af = AF_UNSPEC; if (af != AF_UNSPEC && af != AF_INET) return 0; #define ADD_RTVAR( x ) rtcol_oid[ rtcol_len-1 ] = x; \ snmp_varlist_add_variable( &var, rtcol_oid, rtcol_len, ASN_NULL, NULL, 0) - ADD_RTVAR( 5 ); /* ipCidrRouteIfIndex */ - ADD_RTVAR( 6 ); /* ipCidrRouteType */ - ADD_RTVAR( 7 ); /* ipCidrRouteProto */ + ADD_RTVAR(5); /* ipCidrRouteIfIndex */ + ADD_RTVAR(6); /* ipCidrRouteType */ + ADD_RTVAR(7); /* ipCidrRouteProto */ #undef ADD_RTVAR /* * Now walk the ipCidrRouteTable, reporting the various route entries */ - while ( 1 ) { - oid *op; - unsigned char *cp; + while (1) { + oid *op; + unsigned char *cp; - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; - rtcol_oid[ rtcol_len-1 ] = 5; /* ipRouteIfIndex */ - if ( snmp_oid_compare( rtcol_oid, rtcol_len, - var->name, rtcol_len) != 0 ) - break; /* End of Table */ + rtcol_oid[rtcol_len - 1] = 5; /* ipRouteIfIndex */ + if (snmp_oid_compare(rtcol_oid, rtcol_len, + var->name, rtcol_len) != 0) + break; /* End of Table */ if (var->type == SNMP_NOSUCHOBJECT || - var->type == SNMP_NOSUCHINSTANCE || - var->type == SNMP_ENDOFMIBVIEW) + var->type == SNMP_NOSUCHINSTANCE || + var->type == SNMP_ENDOFMIBVIEW) break; - memset( &route, 0, sizeof( struct route_entry )); - rp->af = AF_INET; - op = var->name+rtcol_len; + memset(&route, 0, sizeof(struct route_entry)); + rp->af = AF_INET; + op = var->name + rtcol_len; cp = tmpAddr.data; cp[0] = *op++ & 0xff; cp[1] = *op++ & 0xff; @@ -234,45 +230,46 @@ route4pr(int af) cp[2] = *op++ & 0xff; cp[3] = *op++ & 0xff; rp->mask = tmpAddr.addr; - op++; /* ipCidrRouteTos */ + op++; /* ipCidrRouteTos */ cp = tmpAddr.data; cp[0] = *op++ & 0xff; cp[1] = *op++ & 0xff; cp[2] = *op++ & 0xff; cp[3] = *op++ & 0xff; rp->gateway = tmpAddr.addr; - rp->set_bits = SET_MASK | SET_GWAY; + rp->set_bits = SET_MASK | SET_GWAY; - for ( vp=var; vp; vp=vp->next_variable ) { - switch ( vp->name[ rtcol_len - 1 ] ) { - case 5: /* ipCidrRouteIfIndex */ - rp->ifNumber = *vp->val.integer; + for (vp = var; vp; vp = vp->next_variable) { + switch (vp->name[rtcol_len - 1]) { + case 5: /* ipCidrRouteIfIndex */ + rp->ifNumber = *vp->val.integer; rp->set_bits |= SET_IFNO; break; - case 6: /* ipCidrRouteType */ - rp->type = *vp->val.integer; + case 6: /* ipCidrRouteType */ + rp->type = *vp->val.integer; rp->set_bits |= SET_TYPE; break; - case 7: /* ipCidrRouteProto */ - rp->proto = *vp->val.integer; + case 7: /* ipCidrRouteProto */ + rp->proto = *vp->val.integer; rp->set_bits |= SET_PRTO; break; } } if (rp->set_bits != SET_ALL) { - continue; /* Incomplete query */ + continue; /* Incomplete query */ } if (hdr_af != rp->af) { if (hdr_af != AF_UNSPEC) printf("\n"); hdr_af = rp->af; - printf("Routing tables (ipCidrRouteTable)\n"); + printf("Routing tables (ipCidrRouteTable)\n"); pr_rthdr(hdr_af); } - p_rtnode( rp ); + p_rtnode(rp); printed++; } + snmp_free_varbind(var); return printed; } @@ -286,12 +283,12 @@ struct iflist { void get_ifname(char *name, int ifIndex) { - oid ifdescr_oid[] = { 1,3,6,1,2,1,2,2,1,2,0 }; - size_t ifdescr_len = OID_LENGTH( ifdescr_oid ); - oid ifxcol_oid[] = { 1,3,6,1,2,1,31,1,1,1,1,0 }; - size_t ifxcol_len = OID_LENGTH( ifxcol_oid ); + oid ifdescr_oid[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 2, 0 }; + size_t ifdescr_len = OID_LENGTH(ifdescr_oid); + oid ifxcol_oid[] = { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 1, 0 }; + size_t ifxcol_len = OID_LENGTH(ifxcol_oid); netsnmp_variable_list *var = NULL; - struct iflist *ip; + struct iflist *ip; for (ip = Iflist; ip; ip = ip->next) { if (ip->index == ifIndex) @@ -308,48 +305,58 @@ get_ifname(char *name, int ifIndex) Iflist = ip; ip->index = ifIndex; - ifxcol_oid[ ifxcol_len-1 ] = ifIndex; - snmp_varlist_add_variable( &var, ifxcol_oid, ifxcol_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_get( var, ss ) == SNMP_ERR_NOERROR) { + ifxcol_oid[ifxcol_len - 1] = ifIndex; + snmp_varlist_add_variable(&var, ifxcol_oid, ifxcol_len, + ASN_NULL, NULL, 0); + if (netsnmp_query_get(var, ss) == SNMP_ERR_NOERROR) { if (var->val_len >= sizeof(ip->name)) - var->val_len = sizeof(ip->name) - 1; + var->val_len = sizeof(ip->name) - 1; memmove(ip->name, var->val.string, var->val_len); ip->name[var->val_len] = '\0'; - strcpy(name, ip->name); - return; + strcpy(name, ip->name); + snmp_free_varbind(var); + return; } - ifdescr_oid[ ifdescr_len-1 ] = ifIndex; - snmp_varlist_add_variable( &var, ifdescr_oid, ifdescr_len, - ASN_NULL, NULL, 0); - if (netsnmp_query_get( var, ss ) == SNMP_ERR_NOERROR) { + ifdescr_oid[ifdescr_len - 1] = ifIndex; + snmp_varlist_add_variable(&var, ifdescr_oid, ifdescr_len, + ASN_NULL, NULL, 0); + if (netsnmp_query_get(var, ss) == SNMP_ERR_NOERROR) { if (var->val_len >= sizeof(ip->name)) - var->val_len = sizeof(ip->name) - 1; + var->val_len = sizeof(ip->name) - 1; memmove(ip->name, var->val.string, var->val_len); ip->name[var->val_len] = '\0'; + snmp_free_varbind(var); } else { sprintf(ip->name, "if%d", ifIndex); } strcpy(name, ip->name); } -/* column widths; each followed by one space */ +/* + * column widths; each followed by one space + */ #ifndef NETSNMP_ENABLE_IPV6 -#define WID_DST(af) 26 /* width of destination column */ -#define WID_GW(af) 18 /* width of gateway column */ +#define WID_DST(af) 26 /* width of destination column */ +#define WID_GW(af) 18 /* width of gateway column */ #else -/* width of destination/gateway column */ +/* + * width of destination/gateway column + */ #if 1 -/* strlen("fe80::aaaa:bbbb:cccc:dddd@gif0") == 30, strlen("/128") == 4 */ +/* + * strlen("fe80::aaaa:bbbb:cccc:dddd@gif0") == 30, strlen("/128") == 4 + */ #define WID_DST(af) ((af) == AF_INET6 ? (nflag ? 34 : 26) : 26) #define WID_GW(af) ((af) == AF_INET6 ? (nflag ? 30 : 18) : 18) #else -/* strlen("fe80::aaaa:bbbb:cccc:dddd") == 25, strlen("/128") == 4 */ +/* + * strlen("fe80::aaaa:bbbb:cccc:dddd") == 25, strlen("/128") == 4 + */ #define WID_DST(af) ((af) == AF_INET6 ? (nflag ? 29 : 18) : 18) #define WID_GW(af) ((af) == AF_INET6 ? (nflag ? 25 : 18) : 18) #endif -#endif /* NETSNMP_ENABLE_IPV6 */ +#endif /* NETSNMP_ENABLE_IPV6 */ /* * Print header for routing table columns. @@ -357,247 +364,239 @@ get_ifname(char *name, int ifIndex) void pr_rthdr(int af) { - /* - if (Aflag) - printf("%-*.*s ", PLEN, PLEN, "Address"); - if (Sflag) - printf("%-*.*s ", - WID_DST(af), WID_DST(af), "Source"); - */ - printf("%-*.*s ", - WID_DST(af), WID_DST(af), "Destination"); - printf("%-*.*s %-6.6s %s\n", - WID_GW(af), WID_GW(af), "Gateway", - "Flags", "Interface"); + /* + * if (Aflag) + * printf("%-*.*s ", PLEN, PLEN, "Address"); + * if (Sflag) + * printf("%-*.*s ", + * WID_DST(af), WID_DST(af), "Source"); + */ + printf("%-*.*s ", WID_DST(af), WID_DST(af), "Destination"); + printf("%-*.*s %-6.6s %s\n", + WID_GW(af), WID_GW(af), "Gateway", "Flags", "Interface"); } +#if 0 /* * Print header for PF_KEY entries. + */ void pr_encaphdr(void) { - if (Aflag) - printf("%-*s ", PLEN, "Address"); - printf("%-18s %-5s %-18s %-5s %-5s %-22s\n", - "Source", "Port", "Destination", - "Port", "Proto", "SA(Address/Proto/Type/Direction)"); + if (Aflag) + printf("%-*s ", PLEN, "Address"); + printf("%-18s %-5s %-18s %-5s %-5s %-22s\n", + "Source", "Port", "Destination", + "Port", "Proto", "SA(Address/Proto/Type/Direction)"); } - */ +#endif -char * +char * routename(in_addr_t in) { - char *cp; - static char line[MAXHOSTNAMELEN]; - struct hostent *hp; - static char domain[MAXHOSTNAMELEN]; - static int first = 1; - - if (first) { - first = 0; - if (gethostname(line, sizeof line) == 0 && - (cp = strchr(line, '.'))) - (void) strlcpy(domain, cp + 1, sizeof domain); - else - domain[0] = '\0'; - } - cp = NULL; - if (!nflag) { - hp = netsnmp_gethostbyaddr((char *)&in, sizeof (struct in_addr), - AF_INET); - if (hp) { - if ((cp = strchr(hp->h_name, '.')) && - !strcmp(cp + 1, domain)) - *cp = '\0'; - cp = hp->h_name; - } - } - if (cp) { - strlcpy(line, cp, sizeof(line)); - } else { -#define C(x) (unsigned)((x) & 0xff) - in = ntohl(in); - snprintf(line, sizeof line, "%u.%u.%u.%u", - C(in >> 24), C(in >> 16), C(in >> 8), C(in)); - } - return (line); + char *cp; + static char line[MAXHOSTNAMELEN]; + char host[MAXHOSTNAMELEN]; + static char domain[MAXHOSTNAMELEN]; + static int first = 1; + struct sockaddr_in sin; + + memset(&sin, 0, sizeof(sin)); + if (first) { + first = 0; + if (gethostname(line, sizeof line) == 0 && + (cp = strchr(line, '.'))) + strlcpy(domain, cp + 1, sizeof domain); + else + domain[0] = '\0'; + } + sin.sin_family = AF_INET; + sin.sin_addr.s_addr = in; + if (getnameinfo((struct sockaddr *) &sin, sizeof(sin), host, + sizeof(host), NULL, 0, nflag ? NI_NUMERICHOST : 0) < 0) + strlcpy(host, "?", sizeof(host)); + if ((cp = strchr(host, '.')) && strcmp(cp + 1, domain) == 0) + *cp = '\0'; + strlcpy(line, host, sizeof(line)); + return line; } +#define C(x) (unsigned int)((x) & 0xffU) /* * Return the name of the network whose address is given. * The address is assumed to be that of a net or subnet, not a host. */ -char * +char * netname(in_addr_t in, in_addr_t mask) { - char *cp = NULL; - static char line[MAXHOSTNAMELEN]; - struct netent *np = NULL; - int mbits; - - in = ntohl(in); - mask = ntohl(mask); - if (!nflag && in != INADDR_ANY) { - if ((np = getnetbyaddr(in, AF_INET)) != NULL) - cp = np->n_name; - } - mbits = mask ? 33 - _ffs(mask) : 0; - if (cp) { - strlcpy(line, cp, sizeof(line)); - } else if (mbits < 9) - snprintf(line, sizeof line, "%u/%d", C(in >> 24), mbits); - else if (mbits < 17) - snprintf(line, sizeof line, "%u.%u/%d", - C(in >> 24) , C(in >> 16), mbits); - else if (mbits < 25) - snprintf(line, sizeof line, "%u.%u.%u/%d", - C(in >> 24), C(in >> 16), C(in >> 8), mbits); - else - snprintf(line, sizeof line, "%u.%u.%u.%u/%d", C(in >> 24), - C(in >> 16), C(in >> 8), C(in), mbits); - return (line); + char *cp = NULL; + static char line[MAXHOSTNAMELEN]; + struct netent *np = NULL; + int mbits; + + in = ntohl(in); + mask = ntohl(mask); + if (!nflag && in != INADDR_ANY) { + if ((np = getnetbyaddr(in, AF_INET)) != NULL) + cp = np->n_name; + } + mbits = mask ? 33 - _ffs(mask) : 0; + if (cp) { + strlcpy(line, cp, sizeof(line)); + } else if (mbits < 9) + snprintf(line, sizeof line, "%u/%d", C(in >> 24), mbits); + else if (mbits < 17) + snprintf(line, sizeof line, "%u.%u/%d", + C(in >> 24), C(in >> 16), mbits); + else if (mbits < 25) + snprintf(line, sizeof line, "%u.%u.%u/%d", + C(in >> 24), C(in >> 16), C(in >> 8), mbits); + else + snprintf(line, sizeof line, "%u.%u.%u.%u/%d", C(in >> 24), + C(in >> 16), C(in >> 8), C(in), mbits); + return (line); } #undef NETSNMP_ENABLE_IPV6 #ifdef NETSNMP_ENABLE_IPV6 -char * +char * netname6(struct sockaddr_in6 *sa6, struct in6_addr *mask) { - static char line[MAXHOSTNAMELEN + 1]; - struct sockaddr_in6 sin6; - u_char *p; - u_char *lim; - int masklen, final = 0, illegal = 0; - int i; - char hbuf[NI_MAXHOST]; - int flag = 0; - int error; - - sin6 = *sa6; - - masklen = 0; - lim = (u_char *)(mask + 1); - i = 0; - if (mask) { - for (p = (u_char *)mask; p < lim; p++) { - if (final && *p) { - illegal++; - sin6.sin6_addr.s6_addr[i++] = 0x00; - continue; - } - - switch (*p & 0xff) { - case 0xff: - masklen += 8; - break; - case 0xfe: - masklen += 7; - final++; - break; - case 0xfc: - masklen += 6; - final++; - break; - case 0xf8: - masklen += 5; - final++; - break; - case 0xf0: - masklen += 4; - final++; - break; - case 0xe0: - masklen += 3; - final++; - break; - case 0xc0: - masklen += 2; - final++; - break; - case 0x80: - masklen += 1; - final++; - break; - case 0x00: - final++; - break; - default: - final++; - illegal++; - break; - } - - if (!illegal) - sin6.sin6_addr.s6_addr[i++] &= *p; - else - sin6.sin6_addr.s6_addr[i++] = 0x00; - } - } else - masklen = 128; - - if (masklen == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6.sin6_addr)) - return("default"); - - if (illegal) - fprintf(stderr, "illegal prefixlen\n"); - - if (nflag) - flag |= NI_NUMERICHOST; - error = getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len, - hbuf, sizeof(hbuf), NULL, 0, flag); - if (error) - snprintf(hbuf, sizeof(hbuf), "invalid"); - - snprintf(line, sizeof(line), "%s/%d", hbuf, masklen); - return line; + static char line[MAXHOSTNAMELEN + 1]; + struct sockaddr_in6 sin6; + u_char *p; + u_char *lim; + int masklen, final = 0, illegal = 0; + int i; + char hbuf[NI_MAXHOST]; + int flag = 0; + int error; + + sin6 = *sa6; + + masklen = 0; + lim = (u_char *) (mask + 1); + i = 0; + if (mask) { + for (p = (u_char *) mask; p < lim; p++) { + if (final && *p) { + illegal++; + sin6.sin6_addr.s6_addr[i++] = 0x00; + continue; + } + + switch (*p & 0xff) { + case 0xff: + masklen += 8; + break; + case 0xfe: + masklen += 7; + final++; + break; + case 0xfc: + masklen += 6; + final++; + break; + case 0xf8: + masklen += 5; + final++; + break; + case 0xf0: + masklen += 4; + final++; + break; + case 0xe0: + masklen += 3; + final++; + break; + case 0xc0: + masklen += 2; + final++; + break; + case 0x80: + masklen += 1; + final++; + break; + case 0x00: + final++; + break; + default: + final++; + illegal++; + break; + } + + if (!illegal) + sin6.sin6_addr.s6_addr[i++] &= *p; + else + sin6.sin6_addr.s6_addr[i++] = 0x00; + } + } else + masklen = 128; + + if (masklen == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6.sin6_addr)) + return ("default"); + + if (illegal) + fprintf(stderr, "illegal prefixlen\n"); + + if (nflag) + flag |= NI_NUMERICHOST; + error = getnameinfo((struct sockaddr *) &sin6, sin6.sin6_len, + hbuf, sizeof(hbuf), NULL, 0, flag); + if (error) + snprintf(hbuf, sizeof(hbuf), "invalid"); + + snprintf(line, sizeof(line), "%s/%d", hbuf, masklen); + return line; } -char * +char * routename6(struct sockaddr_in6 *sa6) { - static char line[NI_MAXHOST]; - const int niflag = NI_NUMERICHOST; + static char line[NI_MAXHOST]; + const int niflag = NI_NUMERICHOST; - if (getnameinfo((struct sockaddr *)sa6, sa6->sin6_len, - line, sizeof(line), NULL, 0, niflag) != 0) - strlcpy(line, "", sizeof line); - return line; + if (getnameinfo((struct sockaddr *) sa6, sa6->sin6_len, + line, sizeof(line), NULL, 0, niflag) != 0) + strlcpy(line, "", sizeof line); + return line; } -#endif /*NETSNMP_ENABLE_IPV6*/ +#endif /*NETSNMP_ENABLE_IPV6 */ -char * -s_rtflags( struct route_entry *rp ) +char * +s_rtflags(struct route_entry *rp) { - static char flag_buf[10]; - char *cp = flag_buf; + static char flag_buf[10]; + char *cp = flag_buf; *cp++ = '<'; - *cp++ = 'U'; /* route is in use */ - if (rp->mask == 0xffffffff) - *cp++ = 'H'; /* host */ + *cp++ = 'U'; /* route is in use */ + if (rp->mask == 0xffffffff) + *cp++ = 'H'; /* host */ if (rp->proto == 4) - *cp++ = 'D'; /* ICMP redirect */ - if (rp->type == 4) - *cp++ = 'G'; /* remote destination/net */ + *cp++ = 'D'; /* ICMP redirect */ + if (rp->type == 4) + *cp++ = 'G'; /* remote destination/net */ *cp++ = '>'; *cp = 0; return flag_buf; } void -p_rtnode( struct route_entry *rp ) +p_rtnode(struct route_entry *rp) { get_ifname(rp->ifname, rp->ifNumber); printf("%-*.*s ", - WID_DST(AF_INET), WID_DST(AF_INET), - (rp->destination == INADDR_ANY) ? "default" : - (rp->set_bits & SET_MASK) ? - (rp->mask == 0xffffffff ? - routename(rp->destination) : - netname(rp->destination, rp->mask)) : - netname(rp->destination, 0L)); + WID_DST(AF_INET), WID_DST(AF_INET), + (rp->destination == INADDR_ANY) ? "default" : + (rp->set_bits & SET_MASK) ? + (rp->mask == 0xffffffff ? + routename(rp->destination) : + netname(rp->destination, rp->mask)) : + netname(rp->destination, 0L)); printf("%-*.*s %-6.6s %s\n", - WID_GW(af), WID_GW(af), - rp->gateway ? routename(rp->gateway) : "*", - s_rtflags(rp), rp->ifname); + WID_GW(af), WID_GW(af), + rp->gateway ? routename(rp->gateway) : "*", + s_rtflags(rp), rp->ifname); } diff --git a/apps/snmpnetstat/routex.c b/apps/snmpnetstat/routex.c index be06d25..0cce875 100644 --- a/apps/snmpnetstat/routex.c +++ b/apps/snmpnetstat/routex.c @@ -1,5 +1,9 @@ -/* $OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $ */ -/* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ +/* + * $OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $ + */ +/* + * $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ + */ /* * Copyright (c) 1983, 1988, 1993 @@ -30,35 +34,27 @@ * SUCH DAMAGE. */ -#ifdef INHERITED_CODE -#ifndef lint -#if 0 -static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; -#else -static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $"; -#endif -#endif /* not lint */ -#endif - #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif #include -#if HAVE_UNISTD_H +netsnmp_feature_require(sockaddr_size); + +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -68,11 +64,13 @@ static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $" #include "main.h" #include "netstat.h" -#if HAVE_WINSOCK_H +#ifdef HAVE_WINSOCK_H #include "winstub.h" #endif -/* inetCidrRouteTable */ +/* + * inetCidrRouteTable + */ #define SET_IFNO 0x01 #define SET_TYPE 0x02 #define SET_PRTO 0x04 @@ -81,11 +79,15 @@ static char *rcsid = "$OpenBSD: route.c,v 1.66 2004/11/17 01:47:20 itojun Exp $" #define SET_MET1 0x20 #define SET_ALL 0x3f -/* ip6RouteTable */ +/* + * ip6RouteTable + */ #define SET_HOP 0x40 #define SET_INVALID 0x80 #define SET_ALL6 0x67 -/* not invalid, and only the columns that we fetch */ +/* + * not invalid, and only the columns that we fetch + */ struct route_entry { int af; @@ -103,8 +105,8 @@ struct route_entry { }; -static void pr_rtxhdr(int af, const char *table); -static void p_rtnodex( struct route_entry *rp ); +static void pr_rtxhdr(int af, const char *table); +static void p_rtnodex(struct route_entry *rp); /* * Print routing tables. @@ -112,121 +114,134 @@ static void p_rtnodex( struct route_entry *rp ); int routexpr(int af) { - struct route_entry route, *rp = &route; - oid rtcol_oid[] = { 1,3,6,1,2,1,4,24,7,1,0 }; /* inetCidrRouteEntry */ - size_t rtcol_len = OID_LENGTH( rtcol_oid ); + struct route_entry route, *rp = &route; + oid rtcol_oid[] = { 1, 3, 6, 1, 2, 1, 4, 24, 7, 1, 0 }; /* inetCidrRouteEntry */ + size_t rtcol_len = OID_LENGTH(rtcol_oid); netsnmp_variable_list *var = NULL, *vp; - int hdr_af = AF_UNSPEC; - int printed = 0; + int hdr_af = AF_UNSPEC; + int printed = 0; #define ADD_RTVAR( x ) rtcol_oid[ rtcol_len-1 ] = x; \ snmp_varlist_add_variable( &var, rtcol_oid, rtcol_len, ASN_NULL, NULL, 0) - ADD_RTVAR( 7 ); /* inetCidrRouteIfIndex */ - ADD_RTVAR( 8 ); /* inetCidrRouteType */ - ADD_RTVAR( 9 ); /* inetCidrRouteProto */ - ADD_RTVAR( 10 ); /* inetCidrRouteAge */ - ADD_RTVAR( 11 ); /* inetCidrRouteNextHopAS */ - ADD_RTVAR( 12 ); /* inetCidrRouteMetric1 */ + ADD_RTVAR(7); /* inetCidrRouteIfIndex */ + ADD_RTVAR(8); /* inetCidrRouteType */ + ADD_RTVAR(9); /* inetCidrRouteProto */ + ADD_RTVAR(10); /* inetCidrRouteAge */ + ADD_RTVAR(11); /* inetCidrRouteNextHopAS */ + ADD_RTVAR(12); /* inetCidrRouteMetric1 */ #undef ADD_RTVAR /* * Now walk the inetCidrRouteTable, reporting the various route entries */ - while ( 1 ) { - oid *op; - unsigned char *cp; - int i; + while (1) { + oid *op; + unsigned char *cp; + int i; - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; - rtcol_oid[ rtcol_len-1 ] = 7; /* ifRouteIfIndex */ - if ( snmp_oid_compare( rtcol_oid, rtcol_len, - var->name, rtcol_len) != 0 ) - break; /* End of Table */ + rtcol_oid[rtcol_len - 1] = 7; /* ifRouteIfIndex */ + if (snmp_oid_compare(rtcol_oid, rtcol_len, + var->name, rtcol_len) != 0) + break; /* End of Table */ if (var->type == SNMP_NOSUCHOBJECT || - var->type == SNMP_NOSUCHINSTANCE || - var->type == SNMP_ENDOFMIBVIEW) + var->type == SNMP_NOSUCHINSTANCE || + var->type == SNMP_ENDOFMIBVIEW) break; - memset( &route, 0, sizeof( struct route_entry )); - /* Extract inetCidrRouteDest, inetCidrRoutePfxLen, - * inetCidrRouteNextHop from index */ + memset(&route, 0, sizeof(struct route_entry)); + /* + * Extract inetCidrRouteDest, inetCidrRoutePfxLen, + * * inetCidrRouteNextHop from index + */ switch (var->name[rtcol_len]) { case 1: - { struct sockaddr_in *sin = (struct sockaddr_in *)&route.dst; - int len; + { + struct sockaddr_in *sin = + (struct sockaddr_in *) &route.dst; + int len; route.af = AF_INET; sin->sin_family = AF_INET; - op = var->name+rtcol_len+1; + op = var->name + rtcol_len + 1; len = *op++; - cp = (unsigned char *)&sin->sin_addr; - for (i = 0; i < len; i++) *cp++ = *op++; + cp = (unsigned char *) &sin->sin_addr; + for (i = 0; i < len; i++) + *cp++ = *op++; route.mask = *op++; - op += *op+1; - op++; /* addrType */ - op++; /* addrLen */ - sin = (struct sockaddr_in *)&route.hop; + op += *op + 1; + op++; /* addrType */ + op++; /* addrLen */ + sin = (struct sockaddr_in *) &route.hop; sin->sin_family = AF_INET; - cp = (unsigned char *)&sin->sin_addr; - for (i = 0; i < len; i++) *cp++ = *op++; + cp = (unsigned char *) &sin->sin_addr; + for (i = 0; i < len; i++) + *cp++ = *op++; break; } case 2: - { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&route.dst; - int len; + { + struct sockaddr_in6 *sin6 = + (struct sockaddr_in6 *) &route.dst; + int len; route.af = AF_INET6; sin6->sin6_family = AF_INET6; - op = var->name+rtcol_len+1; + op = var->name + rtcol_len + 1; len = *op++; - cp = (unsigned char *)&sin6->sin6_addr; - for (i = 0; i < len; i++) *cp++ = *op++; + cp = (unsigned char *) &sin6->sin6_addr; + for (i = 0; i < len; i++) + *cp++ = *op++; route.mask = *op++; - op += *op+1; - op++; /* addrType */ - op++; /* addrLen */ - sin6 = (struct sockaddr_in6 *)&route.hop; + op += *op + 1; + op++; /* addrType */ + op++; /* addrLen */ + sin6 = (struct sockaddr_in6 *) &route.hop; sin6->sin6_family = AF_INET6; - cp = (unsigned char *)&sin6->sin6_addr; - for (i = 0; i < len; i++) *cp++ = *op++; + cp = (unsigned char *) &sin6->sin6_addr; + for (i = 0; i < len; i++) + *cp++ = *op++; break; } default: - fprintf(stderr, "Bad address type: %d\n", (int)var->name[rtcol_len]); + fprintf(stderr, "Bad address type: %d\n", + (int) var->name[rtcol_len]); exit(1); } - /* Extract ipRouteDest index value */ - - for ( vp=var; vp; vp=vp->next_variable ) { - switch ( vp->name[ rtcol_len - 1 ] ) { - case 7: /* inetCidrRouteIfIndex */ - rp->ifNumber = *vp->val.integer; + /* + * Extract ipRouteDest index value + */ + + for (vp = var; vp; vp = vp->next_variable) { + switch (vp->name[rtcol_len - 1]) { + case 7: /* inetCidrRouteIfIndex */ + rp->ifNumber = *vp->val.integer; rp->set_bits |= SET_IFNO; break; - case 8: /* inetCidrRouteType */ - rp->type = *vp->val.integer; + case 8: /* inetCidrRouteType */ + rp->type = *vp->val.integer; rp->set_bits |= SET_TYPE; break; - case 9: /* inetCidrRouteProto */ - rp->proto = *vp->val.integer; + case 9: /* inetCidrRouteProto */ + rp->proto = *vp->val.integer; rp->set_bits |= SET_PRTO; break; - case 10: /* inetCidrRouteAge */ - rp->age = *vp->val.integer; + case 10: /* inetCidrRouteAge */ + rp->age = *vp->val.integer; rp->set_bits |= SET_AGE; break; - case 11: /* inetCidrRouteNextHopAS */ - rp->as = *vp->val.integer; + case 11: /* inetCidrRouteNextHopAS */ + rp->as = *vp->val.integer; rp->set_bits |= SET_AS; break; - case 12: /* inetCidrRouteMetric1 */ - rp->metric1 = *vp->val.integer; + case 12: /* inetCidrRouteMetric1 */ + rp->metric1 = *vp->val.integer; rp->set_bits |= SET_MET1; break; } } if (rp->set_bits != SET_ALL) { - continue; /* Incomplete query */ + continue; /* Incomplete query */ } - + if (af != AF_UNSPEC && rp->af != af) continue; @@ -236,9 +251,10 @@ routexpr(int af) hdr_af = rp->af; pr_rtxhdr(hdr_af, "inetCidrRouteTable"); } - p_rtnodex( rp ); + p_rtnodex(rp); printed++; } + snmp_free_varbind(var); return printed; } @@ -248,57 +264,58 @@ routexpr(int af) int route6pr(int af) { - struct route_entry route, *rp = &route; - oid rtcol_oid[] = { 1,3,6,1,2,1,55,1,11,1,0 }; /* ipv6RouteEntry */ - size_t rtcol_len = OID_LENGTH( rtcol_oid ); + struct route_entry route, *rp = &route; + oid rtcol_oid[] = { 1, 3, 6, 1, 2, 1, 55, 1, 11, 1, 0 }; /* ipv6RouteEntry */ + size_t rtcol_len = OID_LENGTH(rtcol_oid); netsnmp_variable_list *var = NULL, *vp; - int printed = 0; - int hdr_af = AF_UNSPEC; - int i; + int printed = 0; + int hdr_af = AF_UNSPEC; + int i; if (af != AF_UNSPEC && af != AF_INET6) return 0; #define ADD_RTVAR( x ) rtcol_oid[ rtcol_len-1 ] = x; \ snmp_varlist_add_variable( &var, rtcol_oid, rtcol_len, ASN_NULL, NULL, 0) - ADD_RTVAR( 4 ); /* ipv6RouteIfIndex */ - ADD_RTVAR( 5 ); /* ipv6RouteNextHop */ - ADD_RTVAR( 6 ); /* ipv6RouteType */ - ADD_RTVAR( 7 ); /* ipv6RouteProto */ - ADD_RTVAR( 11 ); /* ipv6RouteMetric */ - ADD_RTVAR( 14 ); /* ipv6RouteValid */ + ADD_RTVAR(4); /* ipv6RouteIfIndex */ + ADD_RTVAR(5); /* ipv6RouteNextHop */ + ADD_RTVAR(6); /* ipv6RouteType */ + ADD_RTVAR(7); /* ipv6RouteProto */ + ADD_RTVAR(11); /* ipv6RouteMetric */ + ADD_RTVAR(14); /* ipv6RouteValid */ #undef ADD_RTVAR /* * Now walk the ipv6RouteTable, reporting the various route entries */ - while ( 1 ) { - oid *op; - unsigned char *cp, *cp1; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&route.dst; + while (1) { + oid *op; + unsigned char *cp, *cp1; + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &route.dst; - if (netsnmp_query_getnext( var, ss ) != SNMP_ERR_NOERROR) + if (netsnmp_query_getnext(var, ss) != SNMP_ERR_NOERROR) break; - rtcol_oid[ rtcol_len-1 ] = 4; /* ipv6RouteIfIndex */ - if ( snmp_oid_compare( rtcol_oid, rtcol_len, - var->name, rtcol_len) != 0 ) - break; /* End of Table */ + rtcol_oid[rtcol_len - 1] = 4; /* ipv6RouteIfIndex */ + if (snmp_oid_compare(rtcol_oid, rtcol_len, + var->name, rtcol_len) != 0) + break; /* End of Table */ if (var->type == SNMP_NOSUCHOBJECT || - var->type == SNMP_NOSUCHINSTANCE || - var->type == SNMP_ENDOFMIBVIEW) + var->type == SNMP_NOSUCHINSTANCE || + var->type == SNMP_ENDOFMIBVIEW) break; - memset( &route, 0, sizeof( struct route_entry )); + memset(&route, 0, sizeof(struct route_entry)); rp->af = AF_INET6; sin6->sin6_family = AF_INET6; - op = var->name+rtcol_len; - cp = (unsigned char *)&sin6->sin6_addr; - for (i = 0; i < 16; i++) *cp++ = *op++; + op = var->name + rtcol_len; + cp = (unsigned char *) &sin6->sin6_addr; + for (i = 0; i < 16; i++) + *cp++ = *op++; route.mask = *op++; - for ( vp=var; vp; vp=vp->next_variable ) { - switch ( vp->name[ rtcol_len - 1 ] ) { - case 4: /* ipv6RouteIfIndex */ - rp->ifNumber = *vp->val.integer; + for (vp = var; vp; vp = vp->next_variable) { + switch (vp->name[rtcol_len - 1]) { + case 4: /* ipv6RouteIfIndex */ + rp->ifNumber = *vp->val.integer; /* * This is, technically, an Ipv6IfIndex, which * could maybe be different than the IfIndex @@ -309,62 +326,75 @@ route6pr(int af) */ rp->set_bits |= SET_IFNO; break; - case 5: /* ipv6RouteNextHop */ - cp1 = (unsigned char *)vp->val.string; - sin6 = (struct sockaddr_in6 *)&rp->hop; + case 5: /* ipv6RouteNextHop */ + cp1 = (unsigned char *) vp->val.string; + sin6 = (struct sockaddr_in6 *) &rp->hop; sin6->sin6_family = AF_INET6; - cp = (unsigned char *)&sin6->sin6_addr; - for (i = 0; i < 16; i++) *cp++ = *cp1++; + cp = (unsigned char *) &sin6->sin6_addr; + for (i = 0; i < 16; i++) + *cp++ = *cp1++; rp->set_bits |= SET_HOP; - case 6: /* ipv6RouteType */ - rp->type = *vp->val.integer; - /* This enum maps to similar values in inetCidrRouteType */ + break; + case 6: /* ipv6RouteType */ + rp->type = *vp->val.integer; + /* + * This enum maps to similar values in inetCidrRouteType + */ rp->set_bits |= SET_TYPE; break; - case 7: /* ipv6RouteProtocol */ - rp->proto = *vp->val.integer; - /* TODO: this does not map directly to the - * inetCidrRouteProtocol values. If we use - * rp->proto more, we will have to manage this. */ + case 7: /* ipv6RouteProtocol */ + rp->proto = *vp->val.integer; + /* + * TODO: this does not map directly to the + * * inetCidrRouteProtocol values. If we use + * * rp->proto more, we will have to manage this. + */ rp->set_bits |= SET_PRTO; break; - case 11: /* ipv6RouteMetric */ - rp->metric1 = *vp->val.integer; + case 11: /* ipv6RouteMetric */ + rp->metric1 = *vp->val.integer; rp->set_bits |= SET_MET1; break; - case 14: /* ipv6RouteValid */ + case 14: /* ipv6RouteValid */ if (*vp->val.integer == 2) rp->set_bits |= SET_INVALID; break; } } if (rp->set_bits != SET_ALL6) { - continue; /* Incomplete query */ + continue; /* Incomplete query */ } - + if (hdr_af != rp->af) { if (hdr_af != AF_UNSPEC) printf("\n"); hdr_af = rp->af; pr_rtxhdr(AF_INET6, "ip6RouteTable"); } - p_rtnodex( rp ); + p_rtnodex(rp); printed++; } + snmp_free_varbind(var); return printed; } -/* column widths; each followed by one space */ +/* + * column widths; each followed by one space + */ #ifndef NETSNMP_ENABLE_IPV6 -#define WID_DST(af) 26 /* width of destination column */ -#define WID_GW(af) 18 /* width of gateway column */ +#define WID_DST(af) 26 /* width of destination column */ +#define WID_GW(af) 18 /* width of gateway column */ #else -/* width of destination/gateway column */ -/* strlen("fe80::aaaa:bbbb:cccc:dddd@gif0") == 30, strlen("/128") == 4 */ +/* + * width of destination/gateway column + */ +/* + * strlen("fe80::aaaa:bbbb:cccc:dddd@gif0") == 30, strlen("/128") == 4 + */ #define WID_DST(af) ((af) == AF_INET6 ? (nflag ? 34 : 26) : 26) #define WID_GW(af) ((af) == AF_INET6 ? (nflag ? 39 : 26) : 26) -#endif /* NETSNMP_ENABLE_IPV6 */ +#endif /* NETSNMP_ENABLE_IPV6 */ /* * Print header for routing table columns. @@ -374,52 +404,54 @@ pr_rtxhdr(int af, const char *table) { switch (af) { case AF_INET: - printf("IPv4 Routing tables (inetCidrRouteTable)\n"); - break; + printf("IPv4 Routing tables (inetCidrRouteTable)\n"); + break; case AF_INET6: - printf("IPv6 Routing tables (%s)\n", table); - break; + printf("IPv6 Routing tables (%s)\n", table); + break; } - printf("%-*.*s ", - WID_DST(af), WID_DST(af), "Destination"); + printf("%-*.*s ", WID_DST(af), WID_DST(af), "Destination"); printf("%-*.*s %-6.6s %s\n", - WID_GW(af), WID_GW(af), "Gateway", - "Flags", "Interface"); + WID_GW(af), WID_GW(af), "Gateway", "Flags", "Interface"); } #ifndef HAVE_INET_NTOP -/* MSVC and MinGW */ +/* + * MSVC and MinGW + */ #define inet_ntop netsnmp_inet_ntop static const char * netsnmp_inet_ntop(int af, const void *src, char *dst, size_t size) { - DWORD out_len = size; + DWORD out_len = size; switch (af) { case AF_INET: - { - struct sockaddr_in in; - - memset(&in, 0, sizeof(in)); - in.sin_family = af; - memcpy(&in.sin_addr, src, 4); - if (WSAAddressToString((struct sockaddr *)&in, sizeof(in), NULL, dst, - &out_len) == 0) - return dst; - } - break; + { + struct sockaddr_in in; + + memset(&in, 0, sizeof(in)); + in.sin_family = af; + memcpy(&in.sin_addr, src, 4); + if (WSAAddressToString + ((struct sockaddr *) &in, sizeof(in), NULL, dst, + &out_len) == 0) + return dst; + } + break; case AF_INET6: - { - struct sockaddr_in6 in6; - - memset(&in6, 0, sizeof(in6)); - in6.sin6_family = af; - memcpy(&in6.sin6_addr, src, 16); - if (WSAAddressToString((struct sockaddr *)&in6, sizeof(in6), NULL, dst, - &out_len) == 0) - return dst; - } - break; + { + struct sockaddr_in6 in6; + + memset(&in6, 0, sizeof(in6)); + in6.sin6_family = af; + memcpy(&in6.sin6_addr, src, 16); + if (WSAAddressToString + ((struct sockaddr *) &in6, sizeof(in6), NULL, dst, + &out_len) == 0) + return dst; + } + break; } return NULL; } @@ -429,129 +461,112 @@ netsnmp_inet_ntop(int af, const void *src, char *dst, size_t size) * Return the name of the network whose address is given. * The address is assumed to be that of a net or subnet, not a host. */ -static char * +static char * netxname(struct sockaddr_storage *in, int mask) { - static char host[MAXHOSTNAMELEN]; - static char line[MAXHOSTNAMELEN]; - struct sockaddr_in *sin = (struct sockaddr_in *)in; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)in; + static char host[MAXHOSTNAMELEN]; + static char line[MAXHOSTNAMELEN]; + struct sockaddr_in *sin = (struct sockaddr_in *) in; + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) in; switch (in->ss_family) { case AF_INET: inet_ntop(in->ss_family, &sin->sin_addr, host, sizeof(host)); - if (mask == 32) strcpy(line, host); - else snprintf(line, sizeof(line), "%s/%d", host, mask); + if (mask == 32) + strcpy(line, host); + else + snprintf(line, sizeof(line), "%s/%d", host, mask); break; case AF_INET6: inet_ntop(in->ss_family, &sin6->sin6_addr, host, sizeof(host)); - if (mask == 128) strcpy(line, host); - else snprintf(line, sizeof(line), "%s/%d", host, mask); + if (mask == 128) + strcpy(line, host); + else + snprintf(line, sizeof(line), "%s/%d", host, mask); break; } return line; } -static char * -routexname(struct sockaddr_storage *in) +static char * +routexname(const struct sockaddr_storage *in) { - char *cp; - static char line[MAXHOSTNAMELEN]; - struct hostent *hp = NULL; - static char domain[MAXHOSTNAMELEN]; - static int first = 1; - struct sockaddr_in *sin = (struct sockaddr_in *)in; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)in; + char *cp; + static char line[MAXHOSTNAMELEN]; + char name[MAXHOSTNAMELEN]; + static char domain[MAXHOSTNAMELEN]; + static int first = 1; + const struct sockaddr *sa = (const void *) in; if (first) { first = 0; - if (gethostname(line, sizeof line) == 0 && - (cp = strchr(line, '.'))) - (void) strlcpy(domain, cp + 1, sizeof domain); + if (gethostname(line, sizeof(line)) == 0 + && (cp = strchr(line, '.'))) + strlcpy(domain, cp + 1, sizeof(domain)); else domain[0] = '\0'; } - cp = NULL; - if (!nflag) { - switch (in->ss_family) { - case AF_INET: - hp = netsnmp_gethostbyaddr(&sin->sin_addr, - sizeof (struct in_addr), AF_INET); - break; - case AF_INET6: - hp = netsnmp_gethostbyaddr(&sin6->sin6_addr, - sizeof (struct in6_addr), AF_INET6); - break; - } - if (hp) { - if ((cp = strchr(hp->h_name, '.')) && !strcmp(cp + 1, domain)) - *cp = '\0'; - cp = hp->h_name; - } - } - if (cp) { - strlcpy(line, cp, sizeof(line)); - } else { - switch (in->ss_family) { - case AF_INET: - inet_ntop(sin->sin_family, &sin->sin_addr, line, sizeof(line)); - break; - case AF_INET6: - inet_ntop(sin6->sin6_family, &sin6->sin6_addr, line, sizeof(line)); - break; - } - } - return (line); + if (getnameinfo(sa, netsnmp_sockaddr_size(sa), name, sizeof(name), + NULL, 0, nflag ? NI_NUMERICHOST : 0) < 0) + strlcpy(name, "?", sizeof(name)); + if ((cp = strchr(name, '.')) && strcmp(cp + 1, domain) == 0) + *cp = '\0'; + strlcpy(line, name, sizeof(line)); + return line; } -static char * -s_rtflagsx( struct route_entry *rp ) +static char * +s_rtflagsx(struct route_entry *rp) { - static char flag_buf[10]; - char *cp = flag_buf; + static char flag_buf[10]; + char *cp = flag_buf; *cp++ = '<'; - *cp++ = 'U'; /* route is in use */ + *cp++ = 'U'; /* route is in use */ if ((rp->af == AF_INET && rp->mask == 32) || - (rp->af == AF_INET6 && rp->mask == 128)) - *cp++ = 'H'; /* host */ + (rp->af == AF_INET6 && rp->mask == 128)) + *cp++ = 'H'; /* host */ if (rp->proto == 4) - *cp++ = 'D'; /* ICMP redirect */ - if (rp->type == 4) - *cp++ = 'G'; /* remote destination/net */ + *cp++ = 'D'; /* ICMP redirect */ + if (rp->type == 4) + *cp++ = 'G'; /* remote destination/net */ *cp++ = '>'; *cp = 0; return flag_buf; } static void -p_rtnodex( struct route_entry *rp ) +p_rtnodex(struct route_entry *rp) { get_ifname(rp->ifname, rp->ifNumber); if (rp->af == AF_INET) { - struct sockaddr_in *sin = (struct sockaddr_in *)&rp->dst; + struct sockaddr_in *sin = (struct sockaddr_in *) &rp->dst; printf("%-*s ", - WID_DST(AF_INET), - (sin->sin_addr.s_addr == INADDR_ANY) ? "default" : - (rp->mask == 32 ? - routexname(&rp->dst) : - netxname(&rp->dst, rp->mask))); - } - else if (rp->af == AF_INET6) { + WID_DST(AF_INET), + (sin->sin_addr.s_addr == INADDR_ANY) ? "default" : + (rp->mask == 32 ? + routexname(&rp->dst) : netxname(&rp->dst, rp->mask))); + } else if (rp->af == AF_INET6) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&rp->dst; - struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT; + struct in6_addr in6_addr_any; + + memset(&in6_addr_any, 0, sizeof(in6_addr_any)); /*IN6ADDR_ANY_INIT */ printf("%-*s ", - WID_DST(AF_INET6), - memcmp(&sin6->sin6_addr, &in6_addr_any, sizeof(in6_addr_any)) == 0 ? "default" : - (rp->mask == 128 ? - routexname(&rp->dst) : - netxname(&rp->dst, rp->mask))); + WID_DST(AF_INET6), + memcmp(&sin6->sin6_addr, &in6_addr_any, + sizeof(in6_addr_any)) == 0 ? "default" : (rp->mask == + 128 ? + routexname + (&rp->dst) + : + netxname + (&rp->dst, + rp->mask))); } printf("%-*s %-6.6s %s", - WID_GW(rp->af), - 1 ? routexname(&rp->hop) : "*", - s_rtflagsx(rp), rp->ifname); + WID_GW(rp->af), + 1 ? routexname(&rp->hop) : "*", s_rtflagsx(rp), rp->ifname); if ((rp->set_bits & SET_AS) && rp->as != 0) printf(" (AS %d)", rp->as); printf("\n"); diff --git a/apps/snmpnetstat/winstub.c b/apps/snmpnetstat/winstub.c index 5e2dd64..d0823b3 100644 --- a/apps/snmpnetstat/winstub.c +++ b/apps/snmpnetstat/winstub.c @@ -1,11 +1,11 @@ /* - * cheap and dirty network database lookup functions + * cheap and dirty network database lookup functions */ /* - * uses local files only + * uses local files only */ /* - * currently searches the protocols only + * currently searches the protocols only */ #include @@ -19,17 +19,25 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H +#ifdef cygwin +#define getnetent cygwin_getnetent +#define getnetbyaddr cygwin_getnetbyaddr +#endif #include +#ifdef cygwin +#undef getnetent +#undef getnetbyaddr +#endif #endif static int h_stay_open, s_stay_open, p_stay_open, n_stay_open; @@ -66,7 +74,7 @@ pre_env(void) if (cp) { ; /* - * printf ("Root is '%s'\n", cp); + * printf ("Root is '%s'\n", cp); */ } else cp = "C:\\WINNT"; @@ -94,7 +102,7 @@ pre_env(void) } /* - * sets can open. ends must close. + * sets can open. ends must close. */ void endhostent(void) @@ -163,16 +171,17 @@ setnetent(int stay_open) #define STRTOK_DELIMS " \t\n" /* - * get next entry from data base file, or from NIS if possible. + * get next entry from data base file, or from NIS if possible. */ /* - * returns 0 if there are no more entries to read. + * returns 0 if there are no more entries to read. */ struct hostent * gethostent(void) { return 0; } + struct servent * getservent(void) { @@ -187,7 +196,7 @@ getprotoent(void) static char *ali[10]; struct protoent *px = &spx; int linecnt = 0; - char *st; + char *st; for (alp = ali; *alp; free(*alp), *alp = 0, alp++); if (px->p_name) @@ -234,6 +243,7 @@ getprotoent(void) return 0; } + struct netent * getnetent(void) { @@ -247,7 +257,7 @@ getnetbyaddr(long net, int type) } /* - * Return the network number from an internet address + * Return the network number from an internet address */ u_long inet_netof(struct in_addr in) @@ -265,7 +275,7 @@ inet_netof(struct in_addr in) } /* - * Return the host number from an internet address + * Return the host number from an internet address */ u_long inet_lnaof(struct in_addr in) @@ -277,7 +287,7 @@ inet_lnaof(struct in_addr in) if (0x80 == (ii & 0xc0)) return (0x0000ffff & i); /* - * if (0xc0 == (ii & 0xe0)) + * if (0xc0 == (ii & 0xe0)) */ return (0x000000ff & i); } diff --git a/apps/snmpnetstat/winstub.h b/apps/snmpnetstat/winstub.h index 8fc51dd..312c4f7 100644 --- a/apps/snmpnetstat/winstub.h +++ b/apps/snmpnetstat/winstub.h @@ -7,11 +7,11 @@ #if (defined(WIN32) || defined(cygwin)) /* - * database access functions for host, services, protocols, networks + * database access functions for host, services, protocols, networks */ /* - * sets can open. ends must close. + * sets can open. ends must close. */ void sethostent(int stay_open); void setservent(int stay_open); @@ -23,10 +23,10 @@ void endprotoent(void); void endnetent(void); /* - * get next entry from data base file, or from NIS if possible. + * get next entry from data base file, or from NIS if possible. */ /* - * returns 0 if there are no more entries to read. + * returns 0 if there are no more entries to read. */ struct hostent *gethostent(void); struct servent *getservent(void); @@ -36,12 +36,12 @@ struct netent *getnetent(void); struct netent *getnetbyaddr(long net, int type); /* - * Return the network number from an internet address + * Return the network number from an internet address */ u_long inet_netof(struct in_addr in); /* - * Return the host number from an internet address + * Return the host number from an internet address */ u_long inet_lnaof(struct in_addr in); diff --git a/apps/snmppcap.c b/apps/snmppcap.c new file mode 100644 index 0000000..89fcabd --- /dev/null +++ b/apps/snmppcap.c @@ -0,0 +1,306 @@ +/* + * Copyright (c) 2015, Arista Networks, inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "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 OR CONTRIBUTORS 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FAKE_FD 3 +/* + * This is a funny little program, hooking together callbacks + * to get packets from a pcap format file to go through + * net-snmp's main loop. Both net-snmp and libpcap have + * callback-based processing, so: + * + * We create a fake snmp transport that calls snmppcap_recv() + * to receive a packet, and use snmp_add() to add the session + * and the transport directly. + * + * We create a session callback on the session that just + * prints out the varbind list that we got. + * + * We use the libpcap pcap_dispatch() to loop through all + * the packets in the pcap file, and then pretend to snmp_read2() + * that a fake file descriptor is ready. Luckily, there is + * only one session active, and it happens to also claim to + * be using that file descriptor, so snmplib calls the transport + * receive function, snmppcap_recv(). If the packet parses, + * we get a callback at snmppcap_callback(). If it doesn't, + * you may need to use the -D options. + */ +typedef struct mystuff { + int pktnum; +} mystuff_t; + +/* + * These two globals are used to communicate between handle_pcap() + * and snmppcap_recv(). Don't try to multi-thread! :-) + */ +const void *recv_data; +int recv_datalen; + +/* + * Are we acting as an agent, processing packets, or are we just + * parsing them and dumping them? + */ +int acting_as_agent = 0; + +int +snmppcap_recv(netsnmp_transport *t, void *buf, int bufsiz, void **opaque, int *opaque_len) +{ + if (bufsiz > recv_datalen) { + memcpy(buf, recv_data, recv_datalen); + return recv_datalen; + } else { + return -1; + } +} + +int +snmppcap_send(netsnmp_transport *t, const void *buf, int size, + void **opaque, int *olength) +{ + /* + * This seems silly - we have a buffer full of an SNMP packet + * but all we want is the parsed PDU. + */ + printf( "Reply:\n" ); + printf( "/* TODO: re-parse the data into a PDU? */\n" ); + return 0; +} + +/* + * snmplib calls us back with the received packet. + */ +static int +snmppcap_callback(int op, netsnmp_session *sess, int reqid, netsnmp_pdu *pdu, + void *magic) +{ + mystuff_t *mystuff = (mystuff_t *)magic; + netsnmp_variable_list *vars; + + /* + * We ignore op, since we know there is only way we can be + * called back, since this is not a "real" transport. + */ + printf( "Packet %d PDU contents:\n", mystuff->pktnum ); + /* + * TODO: print PDU type and other info? + */ + for (vars = pdu->variables; vars; vars = vars->next_variable) { + printf( " " ); + print_variable(vars->name, vars->name_length, vars ); + } + + if (acting_as_agent) { + pdu->flags = UCD_MSG_FLAG_ALWAYS_IN_VIEW; /* Bypass VACM for now */ + pdu->version = sess->version; + return handle_snmp_packet( op, sess, reqid, pdu, NULL ); + } + return 0; +} + +void +handle_pcap(u_char *user, const struct pcap_pkthdr *h, + const u_char *bytes) +{ + size_t len; + const u_char *buf; + int skip; + mystuff_t *mystuff = (mystuff_t *)user; + netsnmp_large_fd_set lfdset; + + mystuff->pktnum++; + + /* + * If it's not a full packet, then we can't parse it. + */ + if ( h->caplen < h->len ) { + printf( "Skipping packet #%d; we only have %d of %d bytes\n", mystuff->pktnum, h->caplen, h->len ); + return; + } + + /* + * For now, no error checking and almost no parsing. + * Assume that we have all Ethernet/IPv4/UDP/SNMP. + */ + skip = 14 /* Ethernet */ + 20 /* IPv4 */ + 8 /* UDP */; + buf = bytes + skip; + len = h->len - skip; + + printf( "Packet #%d:\n", mystuff->pktnum ); + + /* + * Store the data in the globals that we use to communicate + */ + recv_data = buf; + recv_datalen = len; + + /* + * We call snmp_read2() pretending that our + * fake file descriptor is ready to read. + * This is a funny API to fake up - we need to + * set our fake file descriptor so that our fake + * receive function gets called. + */ + netsnmp_large_fd_set_init(&lfdset, FD_SETSIZE); + netsnmp_large_fd_setfd(FAKE_FD, &lfdset); + snmp_read2(&lfdset); + netsnmp_large_fd_set_cleanup(&lfdset); +} + +void +usage(void) +{ + fprintf(stderr, "USAGE: snmppcap [OPTIONS] FILE\n\n"); + /* can't use snmp_parse_args_usage because it assumes an agent */ + snmp_parse_args_descriptions(stderr); + fprintf(stderr, "\nsnmppcap options:\n"); + fprintf(stderr, + "\t-Ca\tAct as agent and respond to request (try with -Dresponse)\n"); +} + +static void +optProc(int argc, char *const *argv, int opt) +{ + switch (opt) { + case 'C': + while (*optarg) { + switch (*optarg++) { + case 'a': + acting_as_agent = 1; + break; + default: + fprintf(stderr, + "Unknown flag passed to -C: %c\n", optarg[-1]); + exit(1); + } + } + } +} + +int main(int argc, char **argv) +{ + netsnmp_session *ss; + netsnmp_transport *transport; + int arg; + char errbuf[PCAP_ERRBUF_SIZE]; + char *fname; + pcap_t *p; + mystuff_t mystuff; + + ss = SNMP_MALLOC_TYPEDEF(netsnmp_session); + switch (arg = snmp_parse_args(argc, argv, ss, "C:", optProc)) { + case NETSNMP_PARSE_ARGS_ERROR: + exit(1); + case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: + exit(0); + case NETSNMP_PARSE_ARGS_ERROR_USAGE: + usage(); + exit(1); + default: + break; + } + if (arg != argc) { + fprintf(stderr, "Specify exactly one file name\n"); + usage(); + exit(1); + } + fname = argv[ arg-1 ]; + p = pcap_open_offline( fname, errbuf ); + if ( p == NULL ) { + fprintf(stderr, "%s: %s\n", fname, errbuf ); + return 1; + } + if ( pcap_datalink( p ) != DLT_EN10MB) { + fprintf(stderr, "Only Ethernet pcaps currently supported\n"); + return 2; + } + + const char *app_name = "snmppcap"; + if (acting_as_agent) { + if (init_agent(app_name) != 0) { + snmp_log(LOG_ERR, "Agent initialization failed\n"); + return 4; + } + init_mib_modules(); + } + init_snmp(app_name); + + transport = SNMP_MALLOC_TYPEDEF(netsnmp_transport); + if ( transport == NULL ) { + fprintf(stderr, "Could not malloc transport\n" ); + return 3; + } + /* + * We set up just enough of the transport to fake the main + * loop into calling us back. + */ + transport->sock = FAKE_FD; /* nobody actually uses this as a file descriptor */ + transport->f_recv = snmppcap_recv; + transport->f_send = snmppcap_send; + transport->msgMaxSize = SNMP_MAX_PACKET_LEN; + + ss->callback = snmppcap_callback; + ss->callback_magic = (void *)&mystuff; + + /* todo: add the option of a filter here */ + mystuff.pktnum = 0; + /* todo: user, etc. parsing. */ + ss->securityModel = SNMP_SEC_MODEL_USM; + printf("flags %lx securityModel %d version %ld securityNameLen %" NETSNMP_PRIz "d securityEngineIDLen %" NETSNMP_PRIz "d\n", + ss->flags, ss->securityModel, ss->version, + ss->securityNameLen, ss->securityEngineIDLen); + create_user_from_session(ss); + + /* + * We use snmp_add() to specify the transport + * explicitly. + */ + snmp_add(ss, transport, NULL, NULL); + + pcap_loop(p, -1, handle_pcap, (void *)&mystuff); + + pcap_close(p); + + SNMP_FREE(ss); + + return 0; +} diff --git a/apps/snmpping.c b/apps/snmpping.c new file mode 100644 index 0000000..898f62b --- /dev/null +++ b/apps/snmpping.c @@ -0,0 +1,670 @@ +/* + * 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 (c) 2013, Arista Networks, Inc. + * All rights reserved. + * + * 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. + * + * * Neither the name of Arista Networks, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``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 + * HOLDERS OR CONTRIBUTORS 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. + */ + +/* For getlogin() on MinGW */ +#define _POSIX + +#include + +#include + +#include + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif + +#include + +#include + +#include "inet_ntop.h" + +/* XXX */ +#define INETADDRESSTYPE_IPV4 1 +#define INETADDRESSTYPE_IPV6 2 + +#define PINGCTLADMINSTATUS_ENABLED 1 + +/* Target info */ +int targetAddrType; +u_char targetAddr[16]; +int targetAddrLen; + +char *targetName; + +/* Parameters */ +int pings = 15; +int datasize = 0; +/* todo: timeout, data fill, ownerindex, testname */ + +/* Control-C? */ +int interrupted = 0; + +void +usage(void) +{ + fprintf(stderr, "Usage: snmpping "); + snmp_parse_args_usage(stderr); + fprintf(stderr, " DESTINATION\n\n"); + snmp_parse_args_descriptions(stderr); + fprintf(stderr, "\nsnmpping options:\n"); + fprintf(stderr, "\t-Cc\tSpecify the number of pings (1-15)\n"); + fprintf(stderr, "\t-Cs\tSpecify the amount of extra data (0-65507)\n"); +} + +static void +optProc(int argc, char *const *argv, int opt) +{ + char *endptr = NULL; + + switch (opt) { + case 'C': + while (*optarg) { + switch (*optarg++) { + case 'c': + pings = strtol(optarg, &endptr, 0); + if (pings < 1 || pings > 15) { + /* out of range */ + usage(); + exit(1); + } + + optarg = endptr; + if (isspace((unsigned char)(*optarg))) { + return; + } + break; + + case 's': + datasize = strtol(optarg, &endptr, 0); + if (datasize < 0 || datasize > 65507) { + /* out of range */ + usage(); + exit(1); + } + + optarg = endptr; + if (isspace((unsigned char)(*optarg))) { + return; + } + break; + + + default: + fprintf(stderr, + "Unknown flag passed to -C: %c\n", optarg[-1]); + exit(1); + } + } + } +} + +void sigint(int sig) +{ + interrupted = 1; + printf("[interrupted]\n"); +} + +struct pingResultsTable { + int pingResultsOperStatus; + int pingResultsMinRtt; + int pingResultsMaxRtt; + int pingResultsAverageRtt; + int pingResultsProbeResponses; + int pingResultsSentProbes; + int pingResultsRttSumOfSquares; + char *pingResultsLastGoodProbe; +}; + +struct pingProbeHistoryTable { + int pingProbeHistoryIndex; + int pingProbeHistoryResponse; + int pingProbeHistoryStatus; + char *pingProbeHistoryTime; +}; + +const char * +inetaddresstop(u_char *addr, int addrlen, int addrtype) +{ + int type; + static char buf[INET6_ADDRSTRLEN]; + + switch (addrtype) { + case INETADDRESSTYPE_IPV4: + type = AF_INET; + break; + case INETADDRESSTYPE_IPV6: + type = AF_INET6; + break; + default: + buf[0] = '?'; + buf[1] = '\0'; + return buf; + } + return inet_ntop(type, addr, buf, sizeof(buf)); +} + +int +add_var(netsnmp_pdu *pdu, const char *mibnodename, + oid * index, size_t indexlen, + u_char type, const void *value, size_t len) +{ + oid base[MAX_OID_LEN]; + size_t base_length = MAX_OID_LEN; + + memset(base, 0, MAX_OID_LEN * sizeof(oid)); + + if (!snmp_parse_oid(mibnodename, base, &base_length)) { + snmp_perror(mibnodename); + fprintf(stderr, "couldn't find mib node %s, giving up\n", + mibnodename); + exit(1); + } + + if (base_length + indexlen > sizeof(base) / sizeof(base[0])) { + fprintf(stderr, "internal error for %s, giving up\n", mibnodename); + exit(1); + } + + if (index && indexlen) { + memcpy(&(base[base_length]), index, indexlen * sizeof(oid)); + base_length += indexlen; + } + DEBUGMSGTL(("add", "created: ")); + DEBUGMSGOID(("add", base, base_length)); + DEBUGMSG(("add", "\n")); + snmp_varlist_add_variable(&pdu->variables, base, base_length, + type, value, len); + + return base_length; +} + +int +add(netsnmp_pdu *pdu, const char *mibnodename, + oid * index, size_t indexlen) +{ + return add_var(pdu, mibnodename, index, indexlen, ASN_NULL, NULL, 0); +} + +int +my_synch_response(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response) +{ + int status; + + status = snmp_synch_response(ss, pdu, response); + if (status == STAT_SUCCESS) { + if (*response) { + if ((*response)->errstat == SNMP_ERR_NOERROR) { + return 0; + } else { + fprintf(stderr, "Error in packet.\nReason: %s\n", + snmp_errstring((*response)->errstat)); + if ((*response)->errindex != 0) { + int count; + netsnmp_variable_list *vars; + fprintf(stderr, "Failed object: "); + for (count = 1, vars = (*response)->variables; + vars && count != (*response)->errindex; + vars = vars->next_variable, count++) + /*EMPTY*/; + if (vars) + fprint_objid(stderr, vars->name, + vars->name_length); + else + fprintf(stderr, "??? (errindex=%ld)", + (*response)->errindex); + fprintf(stderr, "\n"); + } + return 2; + } + } + } else if (status == STAT_TIMEOUT) { + fprintf(stderr, "Timeout: No Response from %s\n", + ss->peername); + return 1; + } else { /* status == STAT_ERROR */ + snmp_sess_perror("snmpping", ss); + return 1; + } + return 0; +} + +int +cleanup_ctlTable(netsnmp_session *ss, oid * index, size_t indexlen) +{ + netsnmp_pdu *pdu; + netsnmp_pdu *response; + int rowStatus; + int status; + + pdu = snmp_pdu_create(SNMP_MSG_SET); + rowStatus = RS_DESTROY; + add_var(pdu, "DISMAN-PING-MIB::pingCtlRowStatus", index, indexlen, ASN_INTEGER, + &rowStatus, sizeof(rowStatus)); + status = my_synch_response(ss, pdu, &response); + if (response) + snmp_free_pdu(response); + return status; +} + +int +start_ping(netsnmp_session *ss, oid * index, size_t indexlen, char *pingDest) +{ + netsnmp_pdu *pdu; + netsnmp_pdu *response; + int adminStatus, rowStatus, storageType; + int status; + struct addrinfo *dest, hints; + + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_CANONNAME; + status = getaddrinfo(pingDest, NULL, &hints, &dest); + if (status != 0) { + fprintf(stderr, "snmpping: %s: %s\n", pingDest, gai_strerror(status)); + return 1; + } + + /* + * Destroy any previously-existing row. We could get fancy + * and try to reuse it, but that is way more complex. + */ + cleanup_ctlTable(ss, index, indexlen); + + switch (dest->ai_family) { + case AF_INET: + targetAddrType = INETADDRESSTYPE_IPV4; + targetAddrLen = sizeof(struct in_addr); + memcpy(targetAddr, &((struct sockaddr_in *)dest->ai_addr)->sin_addr, targetAddrLen); + break; +#ifdef NETSNMP_ENABLE_IPV6 + case AF_INET6: + targetAddrType = INETADDRESSTYPE_IPV6; + targetAddrLen = sizeof(struct in6_addr); + memcpy(targetAddr, &((struct sockaddr_in6 *)dest->ai_addr)->sin6_addr, sizeof(struct in6_addr)); + break; +#endif + default: + fprintf(stderr, "Unsupported address family\n"); + return 3; + } + + if (dest->ai_canonname) { + targetName = strdup(dest->ai_canonname); + } else { + targetName = strdup(pingDest); + } + + freeaddrinfo(dest); + + pdu = snmp_pdu_create(SNMP_MSG_SET); + add_var(pdu, "DISMAN-PING-MIB::pingCtlTargetAddressType", index, indexlen, ASN_INTEGER, + &targetAddrType, sizeof(targetAddrType)); + add_var(pdu, "DISMAN-PING-MIB::pingCtlTargetAddress", index, indexlen, ASN_OCTET_STR, + &targetAddr, targetAddrLen); + /* Rely on DEFVAL to keep the PDU small */ + if (pings != 1) { + add_var(pdu, "DISMAN-PING-MIB::pingCtlProbeCount", index, indexlen, ASN_UNSIGNED, + &pings, sizeof(pings)); + } + if (datasize != 0) { + add_var(pdu, "DISMAN-PING-MIB::pingCtlDataSize", index, indexlen, ASN_UNSIGNED, + &datasize, sizeof(datasize)); + } + adminStatus = PINGCTLADMINSTATUS_ENABLED; + add_var(pdu, "DISMAN-PING-MIB::pingCtlAdminStatus", index, indexlen, ASN_INTEGER, + &adminStatus, sizeof(adminStatus)); + storageType = ST_VOLATILE; /* don't ask for this to be saved, we're only going to delete it */ + add_var(pdu, "DISMAN-PING-MIB::pingCtlStorageType", index, indexlen, ASN_INTEGER, + &storageType, sizeof(storageType)); + rowStatus = RS_CREATEANDGO; + add_var(pdu, "DISMAN-PING-MIB::pingCtlRowStatus", index, indexlen, ASN_INTEGER, + &rowStatus, sizeof(rowStatus)); + status = my_synch_response(ss, pdu, &response); + if (response) + snmp_free_pdu(response); + if (status == 0) { + printf("PING %s (%s) from %s with %d bytes of extra data\n", targetName, + inetaddresstop(targetAddr, targetAddrLen, targetAddrType), ss->peername, + datasize); + } + return status; +} + +int +wait_for_completion(netsnmp_session *ss, oid * index, size_t indexlen) +{ + int running = 1; + int status; + int pingStatus; + int sent; + int responses, prev_responses = 0; + int tries = 0; + netsnmp_pdu *pdu; + netsnmp_pdu *response; + netsnmp_variable_list *vlp; + + while (running && !interrupted) { + pdu = snmp_pdu_create(SNMP_MSG_GET); + add(pdu, "DISMAN-PING-MIB::pingResultsOperStatus", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsSentProbes", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsProbeResponses", index, indexlen); + + status = snmp_synch_response(ss, pdu, &response); + if (status != STAT_SUCCESS || !response) { + snmp_sess_perror("snmpping", ss); + if (status == STAT_TIMEOUT) + goto retry; + running = 0; + goto out; + } + if (response->errstat != SNMP_ERR_NOERROR) { + fprintf(stderr, "snmpping: Error in packet: %s\n", + snmp_errstring(response->errstat)); + running = 0; + goto out; + } + + vlp = response->variables; + if (vlp->type == SNMP_NOSUCHINSTANCE) { + DEBUGMSGTL(("ping", "no-such-instance for pingResultsOperStatus\n")); + goto retry; + } + pingStatus = *vlp->val.integer; + + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHINSTANCE) { + DEBUGMSGTL(("ping", "no-such-instance for pingResultsSentProbes\n")); + goto retry; + } + sent = *vlp->val.integer; + + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHINSTANCE) { + DEBUGMSGTL(("ping", "no-such-instance for pingResultsProbeResponses\n")); + goto retry; + } + responses = *vlp->val.integer; +#define PINGRESULTSOPERSTATUS_ENABLED 1 /* XXX */ +#define PINGRESULTSOPERSTATUS_DISABLED 2 /* XXX */ +#define PINGRESULTSOPERSTATUS_COMPLETED 3 /* XXX */ + + if (responses > prev_responses || pingStatus == PINGRESULTSOPERSTATUS_COMPLETED) { + DEBUGMSGTL(("ping", "responses %d (was %d), status %d\n", responses, prev_responses, pingStatus)); + + /* collect results between prev_responses and responses by walking probeHistoryTable */ + prev_responses = responses; + } + + /* + * Observed behavior: before the test has run, operStatus can be + * disabled, and then can turn to enabled, so we can't just stop + * if it's disabled. However, it doesn't always go to completed. + * So, we say we're completed if it's completed, *or* if it's + * disabled and we've sent at least one probe. + */ + if (pingStatus == PINGRESULTSOPERSTATUS_COMPLETED || + (pingStatus == PINGRESULTSOPERSTATUS_DISABLED && sent > 0)) { + running = 0; + goto out; + } + + /* sleep before asking again */ + sleep(1); + + if (0) { +retry: + if (tries++ < 5) { + /* we can try again */ + sleep(1); + } else { + if (status == STAT_TIMEOUT) + fprintf(stderr, "snmpping: too many timeouts.\n"); + else + fprintf(stderr, "snmpping: pingResultsTable entry never created.\n"); + running = 0; + } + } + +out: + if (response) + snmp_free_pdu(response); + } + return 0; +} + +int +overall_stats(netsnmp_session *ss, oid * index, size_t indexlen) +{ + netsnmp_pdu *pdu; + netsnmp_pdu *response; + netsnmp_variable_list *vlp; + int status; + struct pingResultsTable result; + + pdu = snmp_pdu_create(SNMP_MSG_GET); + add(pdu, "DISMAN-PING-MIB::pingResultsOperStatus", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsMinRtt", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsMaxRtt", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsAverageRtt", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsProbeResponses", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsSentProbes", index, indexlen); + add(pdu, "DISMAN-PING-MIB::pingResultsRttSumOfSquares", index, indexlen); + + status = snmp_synch_response(ss, pdu, &response); + if (status != STAT_SUCCESS || !response) { + snmp_sess_perror("snmpping", ss); + goto out; + } + if (response->errstat != SNMP_ERR_NOERROR) { + fprintf(stderr, "snmpping: Error in packet: %s\n", + snmp_errstring(response->errstat)); + goto out; + } + + vlp = response->variables; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsOperStatus = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsMinRtt = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsMaxRtt = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsAverageRtt = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsProbeResponses = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsSentProbes = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto parseerr; + result.pingResultsRttSumOfSquares = *vlp->val.integer; + vlp = vlp->next_variable; + + printf( "--- %s ping statistics ---\n", targetName ); + printf( "%d packets transmitted, %d received, %d%% packet loss\n", + result.pingResultsSentProbes, result.pingResultsProbeResponses, + result.pingResultsSentProbes ? + ( ( result.pingResultsSentProbes - + result.pingResultsProbeResponses ) * 100 / + result.pingResultsSentProbes ) : 0 ); + if (result.pingResultsProbeResponses) { + double stddev; + + stddev = result.pingResultsRttSumOfSquares; + stddev /= result.pingResultsProbeResponses; + stddev -= result.pingResultsAverageRtt * result.pingResultsAverageRtt; + /* + * If the RTT is less than 1.0, the sum of squares can be + * smaller than the number of responses, resulting in a + * negative stddev. Clamp the stddev to 0. + */ + if (stddev < 0) + stddev = 0.0; + printf( "rtt min/avg/max/stddev = %d/%d/%d/%d ms\n", + result.pingResultsMinRtt, + result.pingResultsAverageRtt, + result.pingResultsMaxRtt, + (int)sqrt( stddev )); + } + if (0) { +parseerr: + fprintf(stderr, "snmpping: Error parsing response packet\n"); + } + +out: + if (response) + snmp_free_pdu(response); + return 0; +} + +#ifndef HAVE_GETLOGIN +/* To do: port this function to the Win32 platform. */ +const char *getlogin(void) +{ + return ""; +} +#endif + +int main(int argc, char **argv) +{ + netsnmp_session session, *ss; + int ret; + int arg; + oid index[66], *idx; + int indexlen, i; + int usernameLen, testnameLen; + char username[33]; + char testname[33]; + char *p; + + /* + * get the common command line arguments + */ + switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { + case NETSNMP_PARSE_ARGS_ERROR: + exit(1); + case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: + exit(0); + case NETSNMP_PARSE_ARGS_ERROR_USAGE: + usage(); + exit(1); + default: + break; + } + + if (arg >= argc) { + fprintf(stderr, "Please specify a destination host.\n"); + usage(); + exit(1); + } + + SOCK_STARTUP; + + /* + * open an SNMP session + */ + ss = snmp_open(&session); + if (ss == NULL) { + /* + * diagnose snmp_open errors with the input netsnmp_session pointer + */ + snmp_sess_perror("snmpping", &session); + exit(1); + } + + if (session.securityModel == SNMP_SEC_MODEL_USM) { + strncpy(username, session.securityName, sizeof(username) - 1); + username[32] = '\0'; + usernameLen = strlen(username); /* TODO session.securityNameLen */ + } else { + strncpy(username, getlogin(), sizeof(username) - 1); + username[32] = '\0'; + usernameLen = strlen(username); + } + if (1 /* !have-testname-arg */) { + snprintf(testname, sizeof(testname) - 1, "snmpping-%ld", (long)getpid()); + testname[32] = '\0'; + testnameLen = strlen(testname); + } + idx = index; + *idx++ = usernameLen; + p = username; + for (i = 0; i < usernameLen; i++) { + *idx++ = *p++; + } + *idx++ = testnameLen; + p = testname; + for (i = 0; i < testnameLen; i++) { + *idx++ = *p++; + } + indexlen = idx - index; + ret = start_ping( ss, index, indexlen, argv[ arg ] ); + if ( ret != 0 ) { + return ret; + } + + signal(SIGINT, sigint); + + wait_for_completion( ss, index, indexlen ); + overall_stats( ss, index, indexlen ); + cleanup_ctlTable( ss, index, indexlen ); + + snmp_close(ss); + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return 0; +} diff --git a/apps/snmpps.c b/apps/snmpps.c new file mode 100644 index 0000000..1491b81 --- /dev/null +++ b/apps/snmpps.c @@ -0,0 +1,1019 @@ +/* + * snmpps.c - display process table on a network entity via SNMP. + * + */ + +/* 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, 1991, 1992 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 + +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#else +#include +#endif +#include +#ifdef HAVE_NETINET_IN_H +#include +#endif +#include +#include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NCURSES_CURSES_H +#include +#elif defined(HAVE_CURSES_H) +#include +#endif +#include + +#include + +void +usage(void) +{ + fprintf(stderr, "Usage: snmpps [-Cp] [-Ca] [-C m | n | t] AGENT"); + snmp_parse_args_usage(stderr); + fprintf(stderr, "\n\n"); + snmp_parse_args_descriptions(stderr); + fprintf(stderr, "\nsnmpps options:\n"); + fprintf(stderr, + "\t-Cp\tShow hrSWRunPath instead of hrSWRunName\n"); + fprintf(stderr, + "\t-Ca\tShow hrSWRunParameters in addition to hrSWRunName/Path\n"); + fprintf(stderr, + "\t-Ct\tSort processes according to CPU time used\n"); + fprintf(stderr, + "\t-Cm\tSort processes according to memory usage\n"); + fprintf(stderr, + "\t-Cn\tSort processes by PID number (default)\n"); +} + +int command_args = 0, + command_path = 0; +int topsort = 'c'; +char *progname; + +static void +optProc(int argc, char *const *argv, int opt) +{ + switch (opt) { + case 'C': + while (*optarg) { + switch (*optarg++) { + case 'a': + command_args = 1; + break; + case 'p': + command_path = 1; + break; + case 'm': + topsort = 'm'; + break; + case 'n': + topsort = 'n'; + break; + case 't': + topsort = 't'; + break; + + default: + fprintf(stderr, + "Unknown flag passed to -C: %c\n", optarg[-1]); + exit(1); + } + } + } +} + +struct hrSWRunTable { + u_long hrSWRunIndex; + char *hrSWRunName; + char *hrSWRunPath; + char *hrSWRunParameters; + u_long hrSWRunID; + u_long hrSWRunType; + u_long hrSWRunStatus; + u_long hrSWRunPerfMem; + u_long hrSWRunPerfCPU; + u_long hrSWRunPerfCPUInc; +}; + +struct cpuStats { + u_long user; + u_long nice; + u_long system; + u_long idle; + u_long wait; + u_long kernel; + u_long intr; + u_long softintr; + u_long steal; + u_long guest; + u_long guestnice; +}; + +struct memStats { + u_long totalSwap; + u_long availSwap; + u_long totalReal; + u_long availReal; + u_long shared; + u_long buffer; + u_long cached; +}; + +struct laStats { + u_long la1; + u_long la5; + u_long la15; +}; + + +int +add(netsnmp_pdu *pdu, const char *mibnodename, + oid * index, size_t indexlen) +{ + oid base[MAX_OID_LEN]; + size_t base_length = MAX_OID_LEN; + + memset(base, 0, MAX_OID_LEN * sizeof(oid)); + + if (!snmp_parse_oid(mibnodename, base, &base_length)) { + snmp_perror(mibnodename); + fprintf(stderr, "couldn't find mib node %s, giving up\n", + mibnodename); +#ifdef HAVE_CURSES_H + endwin(); +#endif + exit(1); + } + + if (base_length + indexlen > sizeof(base) / sizeof(base[0])) { + fprintf(stderr, "internal error for %s, giving up\n", mibnodename); + exit(1); + } + + if (index && indexlen) { + memcpy(&(base[base_length]), index, indexlen * sizeof(oid)); + base_length += indexlen; + } + DEBUGMSGTL(("add", "created: ")); + DEBUGMSGOID(("add", base, base_length)); + DEBUGMSG(("add", "\n")); + snmp_add_null_var(pdu, base, base_length); + + return base_length; +} + +netsnmp_variable_list * +collect_procs(netsnmp_session *ss, netsnmp_pdu *pdu, + oid * base, size_t base_length) +{ + netsnmp_pdu *response; + int running = 1; + netsnmp_variable_list *saved = NULL, **vlpp = &saved; + int status; + + while (running) { + /* + * gotta catch em all, gotta catch em all! + */ + status = snmp_synch_response(ss, pdu, &response); + if (status != STAT_SUCCESS || !response) { + snmp_sess_perror(progname, ss); +#ifdef HAVE_CURSES_H + endwin(); +#endif + exit(1); + } + if (response->errstat != SNMP_ERR_NOERROR) { + fprintf(stderr, "%s: Error in packet: %s\n", progname, + snmp_errstring(response->errstat)); +#ifdef HAVE_CURSES_H + endwin(); +#endif + exit(1); + } + if (snmp_oid_compare(response->variables->name, + SNMP_MIN(base_length, + response->variables->name_length), + base, base_length) != 0) + running = 0; + else if (response->variables->type == SNMP_NOSUCHINSTANCE || + response->variables->type == SNMP_NOSUCHOBJECT || + response->variables->type == SNMP_ENDOFMIBVIEW) + running = 0; + else { + /* + * get response + */ + *vlpp = response->variables; + (*vlpp)->next_variable = NULL; /* shouldn't be any, but just in case */ + + /* + * create the next request + */ + pdu = snmp_pdu_create(SNMP_MSG_GETNEXT); + snmp_add_null_var(pdu, (*vlpp)->name, (*vlpp)->name_length); + + /* + * finish loop setup + */ + vlpp = &((*vlpp)->next_variable); + response->variables = NULL; /* ahh, forget about it */ + } + snmp_free_pdu(response); + } + return saved; +} + + +int +collect_perf(netsnmp_session *ss, struct hrSWRunTable **fproc) +{ + netsnmp_pdu *pdu; + netsnmp_pdu *response; + netsnmp_variable_list *vlp; + oid base[MAX_OID_LEN]; + size_t base_length; + int status, count = 0; + struct hrSWRunTable *procs = malloc(sizeof(struct hrSWRunTable)); + + pdu = snmp_pdu_create(SNMP_MSG_GETNEXT); + base_length = + add(pdu, "HOST-RESOURCES-MIB:hrSWRunIndex", NULL, 0); + memcpy(base, pdu->variables->name, base_length * sizeof(oid)); + + vlp = collect_procs(ss, pdu, base, base_length); + + while (vlp) { + size_t len; + struct hrSWRunTable proc; + netsnmp_variable_list *vlp2; + + pdu = snmp_pdu_create(SNMP_MSG_GET); + + add(pdu, "HOST-RESOURCES-MIB:hrSWRunName", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunID", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunPath", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunParameters", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunType", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunStatus", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunPerfCPU", + &vlp->name[base_length], vlp->name_length - base_length); + add(pdu, "HOST-RESOURCES-MIB:hrSWRunPerfMem", + &vlp->name[base_length], vlp->name_length - base_length); + + response = NULL; + status = snmp_synch_response(ss, pdu, &response); + if (status != STAT_SUCCESS || !response) { + snmp_sess_perror(progname, ss); +#ifdef HAVE_CURSES_H + endwin(); +#endif + exit(1); + } + if (response->errstat != SNMP_ERR_NOERROR) { + vlp = vlp->next_variable; + continue; + } + + memset(&proc, 0, sizeof(proc)); + + proc.hrSWRunIndex = vlp->name[base_length]; + + vlp2 = response->variables; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + len = vlp2->val_len; + proc.hrSWRunName = malloc(len+1); + memcpy(proc.hrSWRunName, vlp2->val.string, len); + proc.hrSWRunName[len] = '\0'; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + proc.hrSWRunID = *vlp2->val.integer; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + len = vlp2->val_len; + proc.hrSWRunPath = malloc(len+1); + memcpy(proc.hrSWRunPath, vlp2->val.string, len); + proc.hrSWRunPath[len] = '\0'; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + len = vlp2->val_len; + proc.hrSWRunParameters = malloc(len+1); + memcpy(proc.hrSWRunParameters, vlp2->val.string, len); + proc.hrSWRunParameters[len] = '\0'; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + proc.hrSWRunType = *vlp2->val.integer; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + proc.hrSWRunStatus = *vlp2->val.integer; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + proc.hrSWRunPerfCPU = *vlp2->val.integer; + + vlp2 = vlp2->next_variable; + if (vlp2->type == SNMP_NOSUCHINSTANCE || + vlp2->type == SNMP_NOSUCHOBJECT) goto next; + proc.hrSWRunPerfMem = *vlp2->val.integer; + + count++; + procs = realloc(procs, count*sizeof(procs[0])); + procs[count-1] = proc; + + snmp_free_pdu(response); + vlp2 = vlp; + vlp = vlp->next_variable; + free(vlp2); + continue; + +next: + if (proc.hrSWRunName) free(proc.hrSWRunName); + if (proc.hrSWRunPath) free(proc.hrSWRunPath); + if (proc.hrSWRunParameters) free(proc.hrSWRunParameters); + snmp_free_pdu(response); + vlp2 = vlp; + vlp = vlp->next_variable; + free(vlp2); + } + *fproc = procs; + return count; +} + + +void free_perf(struct hrSWRunTable *procs, int nproc) +{ + int i; + for (i = 0; i < nproc; i++) { + struct hrSWRunTable *proc = procs+i; + if (proc->hrSWRunName) free(proc->hrSWRunName); + if (proc->hrSWRunPath) free(proc->hrSWRunPath); + if (proc->hrSWRunParameters) free(proc->hrSWRunParameters); + } + free(procs); +} + + +int collect_cpu(netsnmp_session *ss, struct cpuStats *cpu) +{ + netsnmp_pdu *pdu; + netsnmp_pdu *response; + int status; + int ret = 0; + + pdu = snmp_pdu_create(SNMP_MSG_GET); + add(pdu, "UCD-SNMP-MIB:ssCpuRawUser.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawNice.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawSystem.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawIdle.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawWait.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawKernel.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawInterrupt.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawSoftIRQ.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawSteal.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawGuest.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:ssCpuRawGuestNice.0", NULL, 0); + + status = snmp_synch_response(ss, pdu, &response); + memset(cpu, 0, sizeof(*cpu)); + if (status != STAT_SUCCESS || !response || + response->errstat != SNMP_ERR_NOERROR) { + goto out; + } + else { + netsnmp_variable_list *vlp = response->variables; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->user = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->nice = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->system = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->idle = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->wait = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->kernel = *vlp->val.integer; + vlp = vlp->next_variable; + + ret = 1; + + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->intr = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->softintr = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->steal = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->guest = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + cpu->guestnice = *vlp->val.integer; + } +out: + if (response) snmp_free_pdu(response); + return ret; +} + + +int collect_mem(netsnmp_session *ss, struct memStats *mem) +{ + netsnmp_pdu *pdu; + netsnmp_pdu *response; + int status; + int ret = 0; + + pdu = snmp_pdu_create(SNMP_MSG_GET); + add(pdu, "UCD-SNMP-MIB:memTotalSwap.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:memAvailSwap.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:memTotalReal.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:memAvailReal.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:memShared.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:memBuffer.0", NULL, 0); + add(pdu, "UCD-SNMP-MIB:memCached.0", NULL, 0); + + status = snmp_synch_response(ss, pdu, &response); + memset(mem, 0, sizeof(*mem)); + if (status != STAT_SUCCESS || !response || + response->errstat != SNMP_ERR_NOERROR) { + goto out; + } + else { + netsnmp_variable_list *vlp = response->variables; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->totalSwap = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->availSwap = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->totalReal = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->availReal = *vlp->val.integer; + vlp = vlp->next_variable; + + ret = 1; + + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->shared = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->buffer = *vlp->val.integer; + vlp = vlp->next_variable; + if (vlp->type == SNMP_NOSUCHOBJECT) goto out; + mem->cached = *vlp->val.integer; + } +out: + if (response) snmp_free_pdu(response); + return ret; +} + + +char *format_centisec(char *buf, size_t len, unsigned long csec) +{ + long sec, min, hour, day; + + day = csec / 100 / 3600 / 24; + csec -= day * 100 * 3600 * 24; + hour = csec / 100 / 3600; + csec -= hour * 100 * 3600; + min = csec / 100 / 60; + csec -= min * 100 * 60; + sec = csec / 100; + csec -= sec * 100; + + if (day) + snprintf(buf, len, "%ldd%02ld:%02ld:%02ld.%02lu", day, hour, min, sec, csec); + else if (hour) + snprintf(buf, len, "%ld:%02ld:%02ld.%02lu", hour, min, sec, csec); + else if (min) + snprintf(buf, len, "%ld:%02ld.%02lu", min, sec, csec); + else + snprintf(buf, len, "%ld.%02lu", sec, csec); + return buf; +} + + +char *format_sec(char *buf, size_t len, unsigned long csec) +{ + long sec, min, hour, day; + + day = csec / 100 / 3600 / 24; + csec -= day * 100 * 3600 * 24; + hour = csec / 100 / 3600; + csec -= hour * 100 * 3600; + min = csec / 100 / 60; + csec -= min * 100 * 60; + sec = csec / 100; + csec -= sec * 100; + + if (day) + snprintf(buf, len, "%ldd%02ld:%02ld:%02ld", day, hour, min, sec); + else if (hour) + snprintf(buf, len, "%ld:%02ld:%02ld.%02lu", hour, min, sec, csec); + else if (min) + snprintf(buf, len, "%ld:%02ld.%02lu", min, sec, csec); + else + snprintf(buf, len, "%ld.%02lu", sec, csec); + return buf; +} + + +char *format_humanmem(char *buf, size_t len, unsigned long mem) +{ + if (mem >= 1024*1024) + snprintf(buf, len, "%4.2fGB", (float)mem/(1024*1024)); + else if (mem >= 1024) + snprintf(buf, len, "%4.2fMB", (float)mem/1024); + else + snprintf(buf, len, "%4.2fkB", (float)mem); + return buf; +} + + +int cpucomp(const void *v1, const void *v2) +{ + const struct hrSWRunTable *p1 = v1, *p2 = v2; + return p2->hrSWRunPerfCPUInc - p1->hrSWRunPerfCPUInc; +} + + +int memcomp(const void *v1, const void *v2) +{ + const struct hrSWRunTable *p1 = v1, *p2 = v2; + return p2->hrSWRunPerfMem - p1->hrSWRunPerfMem; +} + + +int totcomp(const void *v1, const void *v2) +{ + const struct hrSWRunTable *p1 = v1, *p2 = v2; + return p2->hrSWRunPerfCPU - p1->hrSWRunPerfCPU; +} + + +int pidcomp(const void *v1, const void *v2) +{ + const struct hrSWRunTable *p1 = v1, *p2 = v2; + return p1->hrSWRunIndex - p2->hrSWRunIndex; +} + + +int +snmpps(int argc, char *argv[]) +{ + netsnmp_session session, *ss; + int arg; + struct hrSWRunTable *procs; + int count, pinx = 0; + + /* + * get the common command line arguments + */ + switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { + case NETSNMP_PARSE_ARGS_ERROR: + exit(1); + case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: + exit(0); + case NETSNMP_PARSE_ARGS_ERROR_USAGE: + usage(); + exit(1); + default: + break; + } + + if (arg != argc) { + fprintf(stderr, "snmpps: extra argument: %s\n", argv[arg]); + exit(1); + } + + SOCK_STARTUP; + + /* + * Open an SNMP session. + */ + ss = snmp_open(&session); + if (ss == NULL) { + /* + * diagnose snmp_open errors with the input netsnmp_session pointer + */ + snmp_sess_perror("snmpps", &session); + SOCK_CLEANUP; + exit(1); + } + + count = collect_perf(ss, &procs); + if (count == 0) { + fprintf(stderr, "snmpps: no processes found\n"); + exit(1); + } + + switch (topsort) { + case 'm': + qsort(procs, count, sizeof(procs[0]), memcomp); + break; + case 't': + qsort(procs, count, sizeof(procs[0]), totcomp); + break; + } + + printf("%7s %4s %6s %10s %11s %-10s\n", + "Index", "Type", "Status", "Memory", "CPU", "Command"); + + while (pinx < count) { + struct hrSWRunTable *proc = procs+pinx; + const char *hr_status, *hr_type; + char b1[15], b2[20]; + + switch (proc->hrSWRunType) { + case 1: hr_type = "Unkn"; break; + case 2: hr_type = "Os"; break; + case 3: hr_type = "Drvr"; break; + case 4: hr_type = "Appl"; break; + default: hr_type = "?"; break; + } + + switch (proc->hrSWRunStatus) { + case 1: hr_status = "Run"; break; + case 2: hr_status = "Wait"; break; + case 3: hr_status = "Event"; break; + case 4: hr_status = "Inval"; break; + default: hr_status = "?"; break; + } + + printf("%7lu %4s %6s %10s %11.11s %s %s\n", + proc->hrSWRunIndex, + hr_type, + hr_status, + format_humanmem(b1, sizeof b1, proc->hrSWRunPerfMem), + format_centisec(b2, sizeof b2, proc->hrSWRunPerfCPU), + command_path && proc->hrSWRunPath[0] ? proc->hrSWRunPath : proc->hrSWRunName, + command_args ? proc->hrSWRunParameters : ""); + + pinx++; + } + + free_perf(procs, count); + snmp_close(ss); + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return 0; +} + + +#ifdef HAVE_CURSES_H +static void endtop(int sig) +{ + endwin(); + exit(1); +} + + +int snmptop(int argc, char **argv) +{ + netsnmp_session session, *ss; + int arg; + struct hrSWRunTable *oproc; + int ocount = 0; + int show_idle = 1; + int show_os = 1; + char ch; + struct cpuStats oldCpu; + struct memStats mem; + int has_cpu, has_mem; + + /* + * get the common command line arguments + */ + switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { + case NETSNMP_PARSE_ARGS_ERROR: + exit(1); + case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: + exit(0); + case NETSNMP_PARSE_ARGS_ERROR_USAGE: + usage(); + exit(1); + default: + break; + } + + if (arg != argc) { + fprintf(stderr, "snmptop: extra argument: %s\n", argv[arg]); + exit(1); + } + + SOCK_STARTUP; + + /* + * Open an SNMP session. + */ + ss = snmp_open(&session); + if (ss == NULL) { + /* + * diagnose snmp_open errors with the input netsnmp_session pointer + */ + snmp_sess_perror("snmptop", &session); + SOCK_CLEANUP; + exit(1); + } + + ocount = collect_perf(ss, &oproc); + if (ocount == 0) { + fprintf(stderr, "snmptop: no processes found\n"); + exit(1); + } + + collect_cpu(ss, &oldCpu); + + signal(SIGINT, endtop); + initscr(); + cbreak(); + noecho(); + nonl(); + halfdelay(50); + + while ((ch = getch()) != 'q') { + int ncount; + struct hrSWRunTable *nproc; + int oinx = 0, ninx = 0, line = 0; + netsnmp_pdu *pdu; + netsnmp_pdu *response = NULL; + int status; + time_t clock; + struct tm *ptm; + char uptime[40]; + char timestr[40]; + char b1[15], b2[15], b3[15], b4[15]; + struct cpuStats newCpu; + + if (ch == 'c' || ch == 'm' || ch == 'n' || ch == 't') topsort = ch; + if (ch == 'i') show_idle = !show_idle; + if (ch == 'o') show_os = !show_os; + if (ch == 'a') command_args = !command_args; + if (ch == 'p') command_path = !command_path; + + ncount = collect_perf(ss, &nproc); + + while (oinx < ocount && ninx < ncount) { + if (oproc[oinx].hrSWRunIndex == nproc[ninx].hrSWRunIndex) { + nproc[ninx].hrSWRunPerfCPUInc = nproc[ninx].hrSWRunPerfCPU-oproc[oinx].hrSWRunPerfCPU; + ninx++; + oinx++; + } + else if (nproc[oinx].hrSWRunIndex < oproc[ninx].hrSWRunIndex) + oinx++; + else { + nproc[ninx].hrSWRunPerfCPUInc = nproc[ninx].hrSWRunPerfCPU; + ninx++; + } + } + while (ninx < ncount) { + nproc[ninx].hrSWRunPerfCPUInc = nproc[ninx].hrSWRunPerfCPU; + ninx++; + } + + switch (topsort) { + case 'c': + qsort(nproc, ncount, sizeof(nproc[0]), cpucomp); + break; + case 'm': + qsort(nproc, ncount, sizeof(nproc[0]), memcomp); + break; + case 't': + qsort(nproc, ncount, sizeof(nproc[0]), totcomp); + break; + } + + has_cpu = collect_cpu(ss, &newCpu); + has_mem = collect_mem(ss, &mem); + + pdu = snmp_pdu_create(SNMP_MSG_GET); + add(pdu, "HOST-RESOURCES-MIB:hrSystemUptime.0", NULL, 0); + status = snmp_synch_response(ss, pdu, &response); + if (status != STAT_SUCCESS || !response || + response->errstat != SNMP_ERR_NOERROR) { + uptime[0] = '\0'; + } + else { + netsnmp_variable_list *vlp = response->variables; + if (vlp->type == SNMP_NOSUCHINSTANCE) abort(); + uptime_string_n(*vlp->val.integer, uptime, sizeof(uptime)); + } + snmp_free_pdu(response); + + clock = time(NULL); + ptm = localtime(&clock); + strftime(timestr, sizeof(timestr), "%H:%M:%S", ptm); + + clear(); + move(0, 0); + printw("%s %s%s", session.peername, uptime[0] ? "up " : "", uptime); + move(0, COLS-strlen(timestr)-1); + printw("%s", timestr); + if (has_cpu) { + struct cpuStats deltaCpu; + u_long sumCpu; + + deltaCpu.user = newCpu.user - oldCpu.user; + deltaCpu.nice = newCpu.nice - oldCpu.nice; + deltaCpu.system = newCpu.system - oldCpu.system; + deltaCpu.idle = newCpu.idle - oldCpu.idle; + deltaCpu.wait = newCpu.wait - oldCpu.wait; + deltaCpu.kernel = newCpu.kernel - oldCpu.kernel; + deltaCpu.intr = newCpu.intr - oldCpu.intr; + deltaCpu.softintr = newCpu.softintr - oldCpu.softintr; + deltaCpu.steal = newCpu.steal - oldCpu.steal; + deltaCpu.guest = newCpu.guest - oldCpu.guest; + deltaCpu.guestnice = newCpu.guestnice - oldCpu.guestnice; + oldCpu = newCpu; + sumCpu = deltaCpu.user + deltaCpu.nice + + deltaCpu.system + deltaCpu.idle + + deltaCpu.wait + deltaCpu.kernel + deltaCpu.steal + + deltaCpu.intr + deltaCpu.softintr + + deltaCpu.guest + deltaCpu.guestnice; + + printw("\nCPU%%: %4.1fUs %4.1fSy %4.1fId %3.1fWa %3.1fNi %3.1fKe %3.1fHi %3.1fSi %3.1fSt %3.1fGu %3.1fGN", + (float)deltaCpu.user*100/sumCpu, + (float)deltaCpu.system*100/sumCpu, + (float)deltaCpu.idle*100/sumCpu, + (float)deltaCpu.wait*100/sumCpu, + (float)deltaCpu.nice*100/sumCpu, + (float)deltaCpu.kernel*100/sumCpu, + (float)deltaCpu.intr*100/sumCpu, + (float)deltaCpu.softintr*100/sumCpu, + (float)deltaCpu.steal*100/sumCpu, + (float)deltaCpu.guest*100/sumCpu, + (float)deltaCpu.guestnice*100/sumCpu); + line++; + } + + if (has_mem) { + printw("\nMem: %10s Total %10s Used %10s Free %10s Buffer", + format_humanmem(b1, sizeof b1, mem.totalReal), + format_humanmem(b2, sizeof b2, mem.totalReal-mem.availReal), + format_humanmem(b3, sizeof b3, mem.availReal), + format_humanmem(b4, sizeof b4, mem.buffer)); + line++; + printw("\nSwap: %10s Total %10s Used %10s Free %10s Cached", + format_humanmem(b1, sizeof b1, mem.totalSwap), + format_humanmem(b2, sizeof b2, mem.totalSwap-mem.availSwap), + format_humanmem(b3, sizeof b3, mem.availSwap), + format_humanmem(b4, sizeof b4, mem.cached)); + line++; + } + + printw("\n%7s %4s %6s %10s %11s %5s %-10s", + "Index", "Type", "Status", "Memory", "Total CPU", "%CPU", "Command"); + line++; + ninx = 0; + while (line < LINES && ninx < ncount) { + struct hrSWRunTable *proc = nproc+ninx; + const char *hr_status, *hr_type; + + ninx++; + if (proc->hrSWRunPerfCPUInc == 0 && !show_idle) + continue; + if (proc->hrSWRunType != 4 && !show_os) + continue; + + line++; + + switch (proc->hrSWRunType) { + case 1: hr_type = "Unkn"; break; + case 2: hr_type = "Os"; break; + case 3: hr_type = "Drvr"; break; + case 4: hr_type = "Appl"; break; + default: hr_type = "?"; break; + } + + switch (proc->hrSWRunStatus) { + case 1: hr_status = "Run"; break; + case 2: hr_status = "Wait"; break; + case 3: hr_status = "Event"; break; + case 4: hr_status = "Inval"; break; + default: hr_status = "?"; break; + } + + printw("\n%7lu %4s %6s %10s %11s %5.1f %s %s", + proc->hrSWRunIndex, + hr_type, + hr_status, + format_humanmem(b1, sizeof b1, proc->hrSWRunPerfMem), + format_sec(b2,sizeof b2, proc->hrSWRunPerfCPU), + (float)proc->hrSWRunPerfCPUInc/5, + command_path && proc->hrSWRunPath[0] ? proc->hrSWRunPath : proc->hrSWRunName, + command_args ? proc->hrSWRunParameters : ""); + } + refresh(); + + qsort(nproc, ncount, sizeof(nproc[0]), pidcomp); + free_perf(oproc, ocount); + oproc = nproc; + ocount = ncount; + } + endwin(); + + free_perf(oproc, ocount); + snmp_close(ss); + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return 0; +} +#else +int snmptop(int argc, char **argv) +{ + fprintf(stderr, "%s: curses not detected during configure\n", progname); + return 1; +} +#endif + + +int main(int argc, char **argv) +{ + progname = strrchr(argv[0], '/'); + if (progname) progname++; + else progname = argv[0]; + if (strncmp(progname, "lt-", 3) == 0) progname += 3; + + if (strcmp(progname, "snmpps") == 0) return snmpps(argc, argv); + if (strcmp(progname, "snmptop") == 0) return snmptop(argc, argv); + fprintf(stderr, "%s: unknown prognam name\n", progname); + exit(1); +} diff --git a/apps/snmpset.c b/apps/snmpset.c index 1b29a6c..69dc43e 100644 --- a/apps/snmpset.c +++ b/apps/snmpset.c @@ -25,40 +25,40 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -127,7 +127,9 @@ main(int argc, char *argv[]) size_t name_length; int status; int failures = 0; - int exitval = 0; + int exitval = 1; + + SOCK_STARTUP; putenv(strdup("POSIXLY_CORRECT=1")); @@ -136,12 +138,13 @@ main(int argc, char *argv[]) */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -149,13 +152,13 @@ main(int argc, char *argv[]) if (arg >= argc) { fprintf(stderr, "Missing object name\n"); usage(); - exit(1); + goto out; } if ((argc - arg) > 3*SNMP_MAX_CMDLINE_OIDS) { fprintf(stderr, "Too many assignments specified. "); fprintf(stderr, "Only %d allowed in one request.\n", SNMP_MAX_CMDLINE_OIDS); usage(); - exit(1); + goto out; } /* @@ -163,8 +166,8 @@ main(int argc, char *argv[]) */ for (; arg < argc; arg++) { DEBUGMSGTL(("snmp_parse_args", "handling (#%d): %s %s %s\n", - arg,argv[arg], arg+1 < argc ? argv[arg+1] : NULL, - arg+2 < argc ? argv[arg+2] : NULL)); + arg, argv[arg], arg+1 < argc ? argv[arg+1] : "", + arg+2 < argc ? argv[arg+2] : "")); names[current_name++] = argv[arg++]; if (arg < argc) { switch (*argv[arg]) { @@ -179,6 +182,7 @@ main(int argc, char *argv[]) case 'x': case 'd': case 'b': + case 'n': /* undocumented */ #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES case 'I': case 'U': @@ -190,22 +194,20 @@ main(int argc, char *argv[]) default: fprintf(stderr, "%s: Bad object type: %c\n", argv[arg - 1], *argv[arg]); - exit(1); + goto out; } } else { fprintf(stderr, "%s: Needs type and value\n", argv[arg - 1]); - exit(1); + goto out; } if (arg < argc) values[current_value++] = argv[arg]; else { fprintf(stderr, "%s: Needs value\n", argv[arg - 2]); - exit(1); + goto out; } } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -215,8 +217,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpset", &session); - SOCK_CLEANUP; - exit(1); + goto out; } /* @@ -236,11 +237,10 @@ main(int argc, char *argv[]) } } - if (failures) { - snmp_close(ss); - SOCK_CLEANUP; - exit(1); - } + if (failures) + goto close_session; + + exitval = 0; /* * do the request @@ -278,7 +278,12 @@ main(int argc, char *argv[]) if (response) snmp_free_pdu(response); + +close_session: snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmpstatus.c b/apps/snmpstatus.c index 0443c4d..5f67ecf 100644 --- a/apps/snmpstatus.c +++ b/apps/snmpstatus.c @@ -26,40 +26,40 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -147,25 +147,26 @@ main(int argc, char *argv[]) char buf[40]; int interfaces; int count; - int exitval = 0; + int exitval = 1; + + SOCK_STARTUP; /* * get the common command line arguments */ switch (snmp_parse_args(argc, argv, &session, "C:", &optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -175,8 +176,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpstatus", &session); - SOCK_CLEANUP; - exit(1); + goto out; } /* @@ -251,14 +251,15 @@ main(int argc, char *argv[]) } else if (status == STAT_TIMEOUT) { fprintf(stderr, "Timeout: No Response from %s\n", session.peername); - SOCK_CLEANUP; - exit(1); + goto out; } else { /* status == STAT_ERROR */ snmp_sess_perror("snmpstatus", ss); - SOCK_CLEANUP; - exit(2); + exitval = 2; + goto out; } + exitval = 0; + transport = snmp_sess_transport(snmp_sess_pointer(ss)); if (transport != NULL && transport->f_fmtaddr != NULL) { char *addr_string = transport->f_fmtaddr(transport, @@ -275,6 +276,7 @@ main(int argc, char *argv[]) uptime_string(uptime, buf)); } + free(sysdescr); if (response) snmp_free_pdu(response); @@ -306,30 +308,38 @@ main(int argc, char *argv[]) continue; } if (vars->name_length >= length_ifOperStatus - && !memcmp(objid_ifOperStatus, vars->name, - sizeof(objid_ifOperStatus))) { + && !memcmp(objid_ifOperStatus, vars->name, + sizeof(objid_ifOperStatus)) + && vars->type == ASN_INTEGER + && vars->val.integer) { if (*vars->val.integer != MIB_IFSTATUS_UP) down_interfaces++; snmp_add_null_var(pdu, vars->name, vars->name_length); good_var++; - } else if (vars->name_length >= length_ifInUCastPkts && - !memcmp(objid_ifInUCastPkts, vars->name, - sizeof(objid_ifInUCastPkts))) { + } else if (vars->name_length >= length_ifInUCastPkts + &&!memcmp(objid_ifInUCastPkts, vars->name, + sizeof(objid_ifInUCastPkts)) + && vars->type == ASN_COUNTER + && vars->val.integer) { ipackets += *vars->val.integer; snmp_add_null_var(pdu, vars->name, vars->name_length); good_var++; } else if (vars->name_length >= length_ifInNUCastPkts && !memcmp(objid_ifInNUCastPkts, vars->name, - sizeof(objid_ifInNUCastPkts))) { + sizeof(objid_ifInNUCastPkts)) + && vars->type == ASN_COUNTER + && vars->val.integer) { ipackets += *vars->val.integer; snmp_add_null_var(pdu, vars->name, vars->name_length); good_var++; } else if (vars->name_length >= length_ifOutUCastPkts && !memcmp(objid_ifOutUCastPkts, vars->name, - sizeof(objid_ifOutUCastPkts))) { + sizeof(objid_ifOutUCastPkts)) + && vars->type == ASN_COUNTER + && vars->val.integer) { opackets += *vars->val.integer; snmp_add_null_var(pdu, vars->name, vars->name_length); @@ -337,7 +347,9 @@ main(int argc, char *argv[]) } else if (vars->name_length >= length_ifOutNUCastPkts && !memcmp(objid_ifOutNUCastPkts, vars->name, - sizeof(objid_ifOutNUCastPkts))) { + sizeof(objid_ifOutNUCastPkts)) + && vars->type == ASN_COUNTER + && vars->val.integer) { opackets += *vars->val.integer; snmp_add_null_var(pdu, vars->name, vars->name_length); @@ -381,6 +393,9 @@ main(int argc, char *argv[]) } snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmptable.c b/apps/snmptable.c index c9c7d26..dcd6cf2 100644 --- a/apps/snmptable.c +++ b/apps/snmptable.c @@ -27,39 +27,39 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H # include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -93,7 +93,7 @@ static size_t name_length; static oid root[MAX_OID_LEN]; static size_t rootlen; static int localdebug; -static int exitval = 0; +static int exitval = 1; static int use_getbulk = 1; static int max_getbulk = 10; static int extra_columns = 0; @@ -250,6 +250,8 @@ main(int argc, char *argv[]) netsnmp_session session, *ss; int total_entries = 0; + SOCK_STARTUP; + netsnmp_set_line_buffering(stdout); netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, @@ -260,12 +262,13 @@ main(int argc, char *argv[]) */ switch (snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -279,13 +282,13 @@ main(int argc, char *argv[]) if (optind + 1 != argc) { fprintf(stderr, "Must have exactly one table name\n"); usage(); - exit(1); + goto out; } rootlen = MAX_OID_LEN; if (!snmp_parse_oid(argv[optind], root, &rootlen)) { snmp_perror(argv[optind]); - exit(1); + goto out; } localdebug = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DUMP_PACKET); @@ -296,15 +299,13 @@ main(int argc, char *argv[]) /* * open an SNMP session */ - SOCK_STARTUP; ss = snmp_open(&session); if (ss == NULL) { /* * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmptable", &session); - SOCK_CLEANUP; - exit(1); + goto out; } #ifndef NETSNMP_DISABLE_SNMPV1 @@ -312,6 +313,8 @@ main(int argc, char *argv[]) use_getbulk = 0; #endif + exitval = 0; + do { entries = 0; allocated = 0; @@ -322,21 +325,25 @@ main(int argc, char *argv[]) get_table_entries(ss); } - if (exitval) { - snmp_close(ss); - SOCK_CLEANUP; - return exitval; - } + if (exitval) + goto close_session; if (entries || headers_only) print_table(); if (data) { + int i, j; + for (i = 0; i < entries; i++) + for (j = 0; j < fields; j++) + free(data[i*fields+j]); free (data); data = NULL; } if (indices) { + int i; + for (i = 0; i < entries; i++) + free(indices[i]); free (indices); indices = NULL; } @@ -345,15 +352,20 @@ main(int argc, char *argv[]) } while (!end_of_table); - snmp_close(ss); - SOCK_CLEANUP; - if (total_entries == 0) printf("%s: No entries\n", table_name); if (extra_columns) printf("%s: WARNING: More columns on agent than in MIB\n", table_name); - return 0; + exitval = 0; + +close_session: + snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return exitval; } void @@ -450,6 +462,8 @@ print_table(void) } first_pass = 0; + if (index_fmt) + free(index_fmt); } void @@ -696,7 +710,6 @@ get_table_entries(netsnmp_session * ss) vars->name_length)) { break; } - i = vars->name_length - rootlen + 1; if (localdebug || show_index) { if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_EXTENDED_INDEX)) { @@ -740,6 +753,14 @@ get_table_entries(netsnmp_session * ss) if (localdebug && buf) { printf("%s => taken\n", buf); } + if (dp[col]) { + fprintf(stderr, "OID not increasing: %s\n", buf); + running = 0; + vars = NULL; + end_of_table = 1; + exitval = 2; + break; + } out_len = 0; sprint_realloc_value((u_char **)&buf, &buf_len, &out_len, 1, vars->name, vars->name_length, @@ -757,6 +778,11 @@ get_table_entries(netsnmp_session * ss) column[col].width = i; } } + if (buf) { + free(buf); + buf = NULL; + buf_len = 0; + } if (end_of_table) { --entries; @@ -764,9 +790,9 @@ get_table_entries(netsnmp_session * ss) * not part of this subtree */ if (localdebug) { - printf("End of table: %s\n", - buf ? (char *) buf : "[NIL]"); + printf("End of table\n"); } + snmp_free_pdu(response); running = 0; continue; } @@ -877,6 +903,10 @@ getbulk_table_entries(netsnmp_session * ss) if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_EXTENDED_INDEX)) { name_p = strchr(buf, '['); + if (name_p == NULL) { + running = 0; + break; + } } else { switch (netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT)) { @@ -947,6 +977,13 @@ getbulk_table_entries(netsnmp_session * ss) index_width = i; } dp = data + row * fields; + if (dp[col]) { + fprintf(stderr, "OID not increasing: %s\n", buf); + exitval = 2; + end_of_table = 1; + running = 0; + break; + } out_len = 0; sprint_realloc_value((u_char **)&buf, &buf_len, &out_len, 1, vars->name, vars->name_length, @@ -968,6 +1005,11 @@ getbulk_table_entries(netsnmp_session * ss) memcpy(name, last_var->name, name_length * sizeof(oid)); } + if (buf) { + free(buf); + buf = NULL; + buf_len = 0; + } } else { /* * error in response, print it diff --git a/apps/snmptest.c b/apps/snmptest.c index 24de47b..e7e0cda 100644 --- a/apps/snmptest.c +++ b/apps/snmptest.c @@ -27,40 +27,40 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -68,7 +68,7 @@ SOFTWARE. int command = SNMP_MSG_GET; -int input_variable(netsnmp_variable_list *); +static int input_variable(netsnmp_variable_list *); void usage(void) @@ -87,27 +87,29 @@ main(int argc, char *argv[]) netsnmp_variable_list *vars, *vp; netsnmp_transport *transport = NULL; int ret; + int exit_code = 1; int status, count; char input[128]; int varcount, nonRepeaters = -1, maxRepetitions; + SOCK_STARTUP; + /* * get the common command line arguments */ switch (snmp_parse_args(argc, argv, &session, NULL, NULL)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exit_code = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -117,8 +119,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmptest", &session); - SOCK_CLEANUP; - exit(1); + goto out; } varcount = 0; @@ -150,10 +151,10 @@ main(int argc, char *argv[]) * free the last (unused) variable */ if (vp->name) - free((char *) vp->name); + free(vp->name); if (vp->val.string) - free((char *) vp->val.string); - free((char *) vp); + free(vp->val.string); + free(vp); if (command == SNMP_MSG_GETBULK) { if (nonRepeaters == -1) { @@ -165,8 +166,8 @@ main(int argc, char *argv[]) fflush(stdout); if (!fgets(input, sizeof(input), stdin)) { printf("Quitting, Goodbye\n"); - SOCK_CLEANUP; - exit(0); + exit_code = 0; + goto out; } maxRepetitions = atoi(input); pdu->non_repeaters = nonRepeaters; @@ -279,6 +280,11 @@ main(int argc, char *argv[]) nonRepeaters = -1; } /* NOTREACHED */ + +out: + netsnmp_cleanup_session(&session); + SOCK_CLEANUP; + return exit_code; } int @@ -301,7 +307,7 @@ input_variable(netsnmp_variable_list * vp) vp->name_length = 0; return 0; } - if (buf[val_len - 1] == '\n') + if (val_len && buf[val_len - 1] == '\n') buf[--val_len] = 0; if (*buf == '$') { switch (toupper((unsigned char)(buf[1]))) { diff --git a/apps/snmptls.c b/apps/snmptls.c index 84c5fbe..c0977b6 100644 --- a/apps/snmptls.c +++ b/apps/snmptls.c @@ -9,9 +9,13 @@ #include #include -netsnmp_feature_require(tls_fingerprint_build) +netsnmp_feature_require(tls_fingerprint_build); +netsnmp_feature_require(row_create); #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include @@ -554,6 +558,7 @@ main(int argc, char **argv) netsnmp_row_create(ss, var_list, rs_idx); + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return 0; } diff --git a/apps/snmptranslate.c b/apps/snmptranslate.c index 2b19777..d7773e7 100644 --- a/apps/snmptranslate.c +++ b/apps/snmptranslate.c @@ -30,22 +30,22 @@ SOFTWARE. #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include @@ -103,7 +103,67 @@ usage(void) fprintf(stderr, " -L LOGOPTS\t\tToggle various defaults controlling logging:\n"); snmp_log_options_usage("\t\t\t ", stderr); - exit(1); +} + +/** + * For every line on stdin, assume that it is either a plain OID + * or snmpwalk/snmpget output: + * mib-2.1.2.3.4 + * -or- + * mib-2.1.2.3.4 = INTEGER: 5 + * + * Replace the OID with its translation. + * If translation fails, just output the original string. + */ +#define MAX_LINE_TEMP 10240 +void +process_stdin(void) +{ + char buf[MAX_LINE_TEMP]; + oid name[MAX_OID_LEN]; + size_t name_length; + + while ( NULL != fgets( buf, sizeof( buf ), stdin ) ) { + char delim = ' '; + char *nl = strchr(buf, '\n'); + char *rest = strchr(buf, delim); + + if (nl != NULL) { + *nl = '\0'; + } /* else too-long line: output will look weird. Too bad. */ + if (rest == NULL) { + delim = '\t'; + rest = strchr(buf, delim); + } + if (rest != NULL) { + *rest++ = '\0'; + } + name_length = MAX_OID_LEN; + /* + * If it's not the whole line, only try to process buffer + * longer than 5 characters. + * The idea is to avoid false positives including, e.g., + * a hex dump. + */ + if ( !(rest && strlen( buf ) <= 5) && + read_objid( buf, name, &name_length )) { + char objbuf[MAX_LINE_TEMP]; + snprint_objid( objbuf, MAX_LINE_TEMP, name, name_length ); + fputs( objbuf, stdout ); + } else { + fputs( buf, stdout ); + } + /* + * For future improvement: if delim == ' ' && rest && *rest == '=' + * see if rest looks like snmpget/snmpwalk output + * and handle it in the context of the given node + */ + if (rest) { + fputc( delim, stdout ); + fputs( rest, stdout ); + } + fputc( '\n', stdout ); + } } int @@ -117,15 +177,20 @@ main(int argc, char *argv[]) int print = 0; int find_all = 0; int width = 1000000; + int exit_code = 1; + netsnmp_session dummy; + + SOCK_STARTUP; /* * usage: snmptranslate name */ + snmp_sess_init(&dummy); while ((arg = getopt(argc, argv, "Vhm:M:w:D:P:T:O:I:L:")) != EOF) { switch (arg) { case 'h': usage(); - exit(1); + goto out; case 'm': setenv("MIBS", optarg, 1); @@ -140,13 +205,14 @@ main(int argc, char *argv[]) case 'V': fprintf(stderr, "NET-SNMP version: %s\n", netsnmp_get_version()); - exit(0); + exit_code = 0; + goto out; break; case 'w': width = atoi(optarg); if (width <= 0) { fprintf(stderr, "Invalid width specification: %s\n", optarg); - exit (1); + goto out; } break; #ifndef NETSNMP_DISABLE_MIB_LOADING @@ -155,7 +221,7 @@ main(int argc, char *argv[]) if (cp != NULL) { fprintf(stderr, "Unknown parser option to -P: %c.\n", *cp); usage(); - exit(1); + goto out; } break; #endif /* NETSNMP_DISABLE_MIB_LOADING */ @@ -164,7 +230,7 @@ main(int argc, char *argv[]) if (cp != NULL) { fprintf(stderr, "Unknown OID option to -O: %c.\n", *cp); usage(); - exit(1); + goto out; } break; case 'I': @@ -172,7 +238,7 @@ main(int argc, char *argv[]) if (cp != NULL) { fprintf(stderr, "Unknown OID option to -I: %c.\n", *cp); usage(); - exit(1); + goto out; } break; case 'T': @@ -218,25 +284,23 @@ main(int argc, char *argv[]) fprintf(stderr, "Invalid -T character: %c\n", *cp); usage(); - exit(1); - break; + goto out; } } break; case 'L': - if (snmp_log_options(optarg, argc, argv) < 0) { - return (-1); - } + if (snmp_log_options(optarg, argc, argv) < 0) + goto out; break; default: fprintf(stderr, "invalid option: -%c\n", arg); usage(); - exit(1); - break; + goto out; } } - init_snmp("snmpapp"); + init_snmp(NETSNMP_APPLICATION_CONFIG_TYPE); + if (optind < argc) current_name = argv[optind]; @@ -244,7 +308,7 @@ main(int argc, char *argv[]) switch (print) { default: usage(); - exit(1); + goto out; #ifndef NETSNMP_DISABLE_MIB_LOADING case 1: print_mib_tree(stdout, get_tree_head(), width); @@ -257,10 +321,17 @@ main(int argc, char *argv[]) break; #endif /* NETSNMP_DISABLE_MIB_LOADING */ } - exit(0); + exit_code = 0; + goto out; } do { + if ( strcmp( current_name, "-" ) == 0 && ( print == 0 ) ) { + process_stdin(); + current_name = argv[++optind]; + continue; + } + name_length = MAX_OID_LEN; if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RANDOM_ACCESS)) { @@ -269,7 +340,8 @@ main(int argc, char *argv[]) #endif /* NETSNMP_DISABLE_MIB_LOADING */ fprintf(stderr, "Unknown object identifier: %s\n", current_name); - exit(2); + exit_code = 2; + goto out; #ifndef NETSNMP_DISABLE_MIB_LOADING } #endif /* NETSNMP_DISABLE_MIB_LOADING */ @@ -280,9 +352,9 @@ main(int argc, char *argv[]) fprintf(stderr, "Unable to find a matching object identifier for \"%s\"\n", current_name); - exit(1); + goto out; } - exit(0); + break; } else if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REGEX_ACCESS)) { #ifndef NETSNMP_DISABLE_MIB_LOADING @@ -291,14 +363,15 @@ main(int argc, char *argv[]) fprintf(stderr, "Unable to find a matching object identifier for \"%s\"\n", current_name); - exit(1); + goto out; #ifndef NETSNMP_DISABLE_MIB_LOADING } #endif /* NETSNMP_DISABLE_MIB_LOADING */ } else { if (!read_objid(current_name, name, &name_length)) { snmp_perror(current_name); - exit(2); + exit_code = 2; + goto out; } } @@ -312,7 +385,7 @@ main(int argc, char *argv[]) snmp_log(LOG_ERR, "Unable to find a matching object identifier for \"%s\"\n", current_name); - exit(1); + goto out; #ifndef NETSNMP_DISABLE_MIB_LOADING } print_mib_tree(stdout, tp, width); @@ -330,7 +403,11 @@ main(int argc, char *argv[]) printf("\n"); } while (optind < argc); - return (0); + exit_code = 0; + +out: + SOCK_CLEANUP; + return exit_code; } /* diff --git a/apps/snmptrap.c b/apps/snmptrap.c index 7c086db..c2a2c6a 100644 --- a/apps/snmptrap.c +++ b/apps/snmptrap.c @@ -25,49 +25,48 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H # include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif #include oid objid_enterprise[] = { 1, 3, 6, 1, 4, 1, 3, 1, 1 }; -oid objid_sysdescr[] = { 1, 3, 6, 1, 2, 1, 1, 1, 0 }; oid objid_sysuptime[] = { 1, 3, 6, 1, 2, 1, 1, 3, 0 }; oid objid_snmptrap[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 }; int inform = 0; @@ -120,7 +119,7 @@ optProc(int argc, char *const *argv, int opt) int main(int argc, char *argv[]) { - netsnmp_session session, *ss; + netsnmp_session session, *ss = NULL; netsnmp_pdu *pdu, *response; oid name[MAX_OID_LEN]; size_t name_length; @@ -128,12 +127,14 @@ main(int argc, char *argv[]) int status; char *trap = NULL; char *prognam; - int exitval = 0; + int exitval = 1; #ifndef NETSNMP_DISABLE_SNMPV1 char *specific = NULL, *description = NULL, *agent = NULL; in_addr_t *pdu_in_addr_t; #endif + SOCK_STARTUP; + prognam = strrchr(argv[0], '/'); if (prognam) prognam++; @@ -144,20 +145,21 @@ main(int argc, char *argv[]) if (strcmp(prognam, "snmpinform") == 0) inform = 1; + + /** parse args (also initializes session) */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } - SOCK_STARTUP; - session.callback = snmp_input; session.callback_magic = NULL; @@ -212,6 +214,9 @@ main(int argc, char *argv[]) session.engineBoots = 1; if (session.engineTime == 0) /* not really correct, */ session.engineTime = get_uptime(); /* but it'll work. Sort of. */ + + set_enginetime(session.securityEngineID, session.securityEngineIDLen, + session.engineBoots, session.engineTime, TRUE); } ss = snmp_add(&session, @@ -223,29 +228,25 @@ main(int argc, char *argv[]) * the input netsnmp_session pointer */ snmp_sess_perror("snmptrap", &session); - SOCK_CLEANUP; - exit(1); + goto out; } #ifndef NETSNMP_DISABLE_SNMPV1 if (session.version == SNMP_VERSION_1) { if (inform) { fprintf(stderr, "Cannot send INFORM as SNMPv1 PDU\n"); - SOCK_CLEANUP; - exit(1); + goto out; } pdu = snmp_pdu_create(SNMP_MSG_TRAP); if ( !pdu ) { fprintf(stderr, "Failed to create trap PDU\n"); - SOCK_CLEANUP; - exit(1); + goto out; } pdu_in_addr_t = (in_addr_t *) pdu->agent_addr; if (arg == argc) { fprintf(stderr, "No enterprise oid\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } if (argv[arg][0] == 0) { pdu->enterprise = (oid *) malloc(sizeof(objid_enterprise)); @@ -258,8 +259,7 @@ main(int argc, char *argv[]) if (!snmp_parse_oid(argv[arg], name, &name_length)) { snmp_perror(argv[arg]); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } pdu->enterprise = (oid *) malloc(name_length * sizeof(oid)); memcpy(pdu->enterprise, name, name_length * sizeof(oid)); @@ -268,15 +268,14 @@ main(int argc, char *argv[]) if (++arg >= argc) { fprintf(stderr, "Missing agent parameter\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } agent = argv[arg]; if (agent != NULL && strlen(agent) != 0) { int ret = netsnmp_gethostbyname_v4(agent, pdu_in_addr_t); if (ret < 0) { fprintf(stderr, "unknown host: %s\n", agent); - exit(1); + goto out; } } else { *pdu_in_addr_t = get_myaddr(); @@ -284,24 +283,21 @@ main(int argc, char *argv[]) if (++arg == argc) { fprintf(stderr, "Missing generic-trap parameter\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } trap = argv[arg]; pdu->trap_type = atoi(trap); if (++arg == argc) { fprintf(stderr, "Missing specific-trap parameter\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } specific = argv[arg]; pdu->specific_type = atoi(specific); if (++arg == argc) { fprintf(stderr, "Missing uptime parameter\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } description = argv[arg]; if (description == NULL || *description == 0) @@ -317,14 +313,12 @@ main(int argc, char *argv[]) pdu = snmp_pdu_create(inform ? SNMP_MSG_INFORM : SNMP_MSG_TRAP2); if ( !pdu ) { fprintf(stderr, "Failed to create notification PDU\n"); - SOCK_CLEANUP; - exit(1); + goto out; } if (arg == argc) { fprintf(stderr, "Missing up-time parameter\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } trap = argv[arg]; if (*trap == 0) { @@ -337,15 +331,13 @@ main(int argc, char *argv[]) if (++arg == argc) { fprintf(stderr, "Missing trap-oid parameter\n"); usage(); - SOCK_CLEANUP; - exit(1); + goto out; } if (snmp_add_var (pdu, objid_snmptrap, sizeof(objid_snmptrap) / sizeof(oid), 'o', argv[arg]) != 0) { snmp_perror(argv[arg]); - SOCK_CLEANUP; - exit(1); + goto out; } } arg++; @@ -355,21 +347,18 @@ main(int argc, char *argv[]) if (arg > argc) { fprintf(stderr, "%s: Missing type/value for variable\n", argv[arg - 3]); - SOCK_CLEANUP; - exit(1); + goto out; } name_length = MAX_OID_LEN; if (!snmp_parse_oid(argv[arg - 3], name, &name_length)) { snmp_perror(argv[arg - 3]); - SOCK_CLEANUP; - exit(1); + goto out; } if (snmp_add_var (pdu, name, name_length, argv[arg - 2][0], argv[arg - 1]) != 0) { snmp_perror(argv[arg - 3]); - SOCK_CLEANUP; - exit(1); + goto out; } } @@ -381,12 +370,19 @@ main(int argc, char *argv[]) snmp_sess_perror(inform ? "snmpinform" : "snmptrap", ss); if (!inform) snmp_free_pdu(pdu); - exitval = 1; + goto close_session; } else if (inform) snmp_free_pdu(response); + exitval = 0; + +close_session: snmp_close(ss); - snmp_shutdown("snmpapp"); + snmp_shutdown(NETSNMP_APPLICATION_CONFIG_TYPE); + +out: + if (ss == NULL) + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmptrapd.c b/apps/snmptrapd.c index bce0d47..6095266 100644 --- a/apps/snmptrapd.c +++ b/apps/snmptrapd.c @@ -25,70 +25,70 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #if !defined(mingw32) && defined(HAVE_SYS_TIME_H) # include -# if TIME_WITH_SYS_TIME +# ifdef TIME_WITH_SYS_TIME # include # endif #else # include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_PROCESS_H /* Win32-getpid */ +#ifdef HAVE_PROCESS_H #include #endif -#if HAVE_PWD_H +#ifdef HAVE_PWD_H #include #endif -#if HAVE_GRP_H +#ifdef HAVE_GRP_H #include #endif #include @@ -97,9 +97,17 @@ SOFTWARE. #include #include #include +#include +#include "../snmplib/snmp_syslog.h" +#include "../agent_global_vars.h" +#include "../agent/mibgroup/snmpv3/snmpEngine.h" +#include "../agent/mibgroup/snmpv3/usmUser.h" +#include "../agent/mibgroup/agent/nsVacmAccessTable.h" +#include "../agent/mibgroup/agentx/subagent.h" #include "snmptrapd_handlers.h" #include "snmptrapd_log.h" #include "snmptrapd_auth.h" +#include "snmptrapd_sql.h" #include "notification-log-mib/notification_log.h" #include "tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.h" #include "mibII/vacm_conf.h" @@ -119,85 +127,31 @@ SOFTWARE. #endif -#if NETSNMP_USE_LIBWRAP +#ifdef NETSNMP_USE_LIBWRAP #include #endif #include -#ifndef BSD4_3 -#define BSD4_2 +#ifndef NETSNMP_NO_SYSTEMD +#include #endif -#ifndef FD_SET - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((p), 0, sizeof(*(p))) +#ifndef BSD4_3 +#define BSD4_2 #endif char *logfile = NULL; -extern int SyslogTrap; -extern int dropauth; static int reconfig = 0; char ddefault_port[] = "udp:162"; /* Default default port */ char *default_port = ddefault_port; -#if HAVE_GETPID +#ifdef HAVE_GETPID FILE *PID; char *pid_file = NULL; #endif -extern void parse_format(const char *token, char *line); char *trap1_fmt_str_remember = NULL; int dofork = 1; -extern int netsnmp_running; - -#ifdef NETSNMP_USE_MYSQL -extern int netsnmp_mysql_init(void); -extern void snmptrapd_register_sql_configs( void ); -#endif - -/* - * These definitions handle 4.2 systems without additional syslog facilities. - */ -#ifndef LOG_CONS -#define LOG_CONS 0 /* Don't bother if not defined... */ -#endif -#ifndef LOG_PID -#define LOG_PID 0 /* Don't bother if not defined... */ -#endif -#ifndef LOG_LOCAL0 -#define LOG_LOCAL0 0 -#endif -#ifndef LOG_LOCAL1 -#define LOG_LOCAL1 0 -#endif -#ifndef LOG_LOCAL2 -#define LOG_LOCAL2 0 -#endif -#ifndef LOG_LOCAL3 -#define LOG_LOCAL3 0 -#endif -#ifndef LOG_LOCAL4 -#define LOG_LOCAL4 0 -#endif -#ifndef LOG_LOCAL5 -#define LOG_LOCAL5 0 -#endif -#ifndef LOG_LOCAL6 -#define LOG_LOCAL6 0 -#endif -#ifndef LOG_LOCAL7 -#define LOG_LOCAL7 0 -#endif -#ifndef LOG_DAEMON -#define LOG_DAEMON 0 -#endif - /* * Include an extra Facility variable to allow command line adjustment of * syslog destination @@ -220,15 +174,7 @@ const char *app_name = "snmptrapd"; void trapd_update_config(void); #ifdef WIN32SERVICE -void StopSnmpTrapd(void); -int SnmpTrapdMain(int argc, TCHAR * argv[]); -int __cdecl _tmain(int argc, TCHAR * argv[]); -#else -int main(int, char **); -#endif - -#if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(NETSNMP_SNMPTRAPD_DISABLE_AGENTX) -extern void subagent_init(void); +static void StopSnmpTrapd(void); #endif @@ -255,7 +201,7 @@ usage(void) fprintf(stderr, " -f\t\t\tdo not fork from the shell\n"); fprintf(stderr, " -F FORMAT\t\tuse specified format for logging to standard error\n"); -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H fprintf(stderr, " -g GID\t\tchange to this numeric gid after opening\n" "\t\t\t transport endpoints\n"); #endif @@ -268,7 +214,7 @@ usage(void) " -M DIRLIST\t\tuse DIRLIST as the list of locations\n\t\t\t to look for MIBs\n"); fprintf(stderr, " -n\t\t\tuse numeric addresses instead of attempting\n\t\t\t hostname lookups (no DNS)\n"); -#if HAVE_GETPID +#ifdef HAVE_GETPID fprintf(stderr, " -p FILE\t\tstore process id in FILE\n"); #endif #ifdef WIN32SERVICE @@ -278,7 +224,7 @@ usage(void) fprintf(stderr, " \t\t\t Note that some parameters are not relevant when running as a service\n"); #endif fprintf(stderr, " -t\t\t\tPrevent traps from being logged to syslog\n"); -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H fprintf(stderr, " -u UID\t\tchange to this uid (numeric or textual) after\n" "\t\t\t opening transport endpoints\n"); #endif @@ -305,15 +251,11 @@ version(void) printf("\nNET-SNMP Version: %s\n", netsnmp_get_version()); printf("Web: http://www.net-snmp.org/\n"); printf("Email: net-snmp-coders@lists.sourceforge.net\n\n"); - exit(0); } RETSIGTYPE term_handler(int sig) { -#ifdef WIN32SERVICE - extern netsnmp_session *main_session; -#endif netsnmp_running = 0; #ifdef WIN32SERVICE @@ -339,7 +281,7 @@ static int pre_parse(netsnmp_session * session, netsnmp_transport *transport, void *transport_data, int transport_data_length) { -#if NETSNMP_USE_LIBWRAP +#ifdef NETSNMP_USE_LIBWRAP char *addr_string = NULL; if (transport != NULL && transport->f_fmtaddr != NULL) { @@ -430,7 +372,7 @@ parse_trapd_address(const char *token, char *cptr) } else { p = malloc(strlen(buf) + 1 + strlen(default_port) + 1); if (p) { - strcat(p, buf); + strcpy(p, buf); strcat(p, ","); strcat(p, default_port ); } @@ -470,65 +412,6 @@ parse_config_pidFile(const char *token, char *cptr) pid_file = strdup (cptr); } -#ifdef HAVE_UNISTD_H -void -parse_config_agentuser(const char *token, char *cptr) -{ - if (cptr[0] == '#') { - char *ecp; - int uid; - - uid = strtoul(cptr + 1, &ecp, 10); - if (*ecp != 0) { - config_perror("Bad number"); - } else { - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID, uid); - } -#if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) - } else { - struct passwd *info; - - info = getpwnam(cptr); - if (info) - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID, info->pw_uid); - else - config_perror("User not found in passwd database"); - endpwent(); -#endif - } -} - -void -parse_config_agentgroup(const char *token, char *cptr) -{ - if (cptr[0] == '#') { - char *ecp; - int gid = strtoul(cptr + 1, &ecp, 10); - - if (*ecp != 0) { - config_perror("Bad number"); - } else { - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID, gid); - } -#if defined(HAVE_GETGRNAM) && defined(HAVE_GRP_H) - } else { - struct group *info; - - info = getgrnam(cptr); - if (info) - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID, info->gr_gid); - else - config_perror("Group not found in group database"); - endgrent(); -#endif - } -} -#endif - void parse_config_doNotFork(const char *token, char *cptr) { @@ -555,12 +438,22 @@ parse_config_outputOption(const char *token, char *cptr) } } +void +parse_config_addForwarderInfo(const char *token, char *cptr) +{ + if (netsnmp_ds_parse_boolean(cptr) == 1) { + netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_ADD_FORWARDER_INFO, 1); + } +} + static void snmptrapd_main_loop(void) { int count, numfds, block; fd_set readfds,writefds,exceptfds; - struct timeval timeout, *tvp; + struct timeval timeout; + NETSNMP_SELECT_TIMEVAL timeout2; while (netsnmp_running) { if (reconfig) { @@ -584,16 +477,16 @@ snmptrapd_main_loop(void) FD_ZERO(&writefds); FD_ZERO(&exceptfds); block = 0; - tvp = &timeout; - timerclear(tvp); - tvp->tv_sec = 5; - snmp_select_info(&numfds, &readfds, tvp, &block); - if (block == 1) - tvp = NULL; /* block without timeout */ + timerclear(&timeout); + timeout.tv_sec = 5; + snmp_select_info(&numfds, &readfds, &timeout, &block); #ifndef NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER netsnmp_external_event_info(&numfds, &readfds, &writefds, &exceptfds); #endif /* NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER */ - count = select(numfds, &readfds, &writefds, &exceptfds, tvp); + timeout2.tv_sec = timeout.tv_sec; + timeout2.tv_usec = timeout.tv_usec; + count = select(numfds, &readfds, &writefds, &exceptfds, + !block ? &timeout2 : NULL); if (count > 0) { #ifndef NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER netsnmp_dispatch_external_events(&count, &readfds, &writefds, @@ -647,27 +540,37 @@ SnmpTrapdMain(int argc, TCHAR * argv[]) main(int argc, char *argv[]) #endif { - char options[128] = "aAc:CdD::efF:g:hHI:L:m:M:no:O:Ptu:vx:X-:"; + static const char options[] = "aAc:CdD::efF:g:hHI:L:m:M:no:O:Ptu:vx:X-:" +#ifdef HAVE_GETPID + "p:" +#endif + ; netsnmp_session *sess_list = NULL, *ss = NULL; netsnmp_transport *transport = NULL; int arg, i = 0; - int uid = 0, gid = 0; + int exit_code = 1; char *cp, *listen_ports = NULL; #if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(NETSNMP_SNMPTRAPD_DISABLE_AGENTX) int agentx_subagent = 1; #endif netsnmp_trapd_handler *traph; +#ifndef WIN32 + int prepared_sockets = 0; +#endif +#ifndef NETSNMP_NO_SYSTEMD + /* check if systemd has sockets for us and don't close them */ + prepared_sockets = netsnmp_sd_listen_fds(0); +#endif #ifndef WIN32 /* * close all non-standard file descriptors we may have * inherited from the shell. */ - for (i = getdtablesize() - 1; i > 2; --i) { - (void) close(i); - } -#endif /* #WIN32 */ + if (!prepared_sockets) + netsnmp_close_fds(2); +#endif #ifdef SIGTERM signal(SIGTERM, term_handler); @@ -698,17 +601,17 @@ main(int argc, char *argv[]) register_config_handler("snmptrapd", "doNotLogTraps", parse_config_doNotLogTraps, NULL, "(1|yes|true|0|no|false)"); -#if HAVE_GETPID +#ifdef HAVE_GETPID register_config_handler("snmptrapd", "pidFile", parse_config_pidFile, NULL, "string"); #endif #ifdef HAVE_UNISTD_H register_config_handler("snmptrapd", "agentuser", - parse_config_agentuser, NULL, "userid"); + netsnmp_parse_agent_user, NULL, "userid"); register_config_handler("snmptrapd", "agentgroup", - parse_config_agentgroup, NULL, "groupid"); + netsnmp_parse_agent_group, NULL, "groupid"); #endif - + register_config_handler("snmptrapd", "doNotFork", parse_config_doNotFork, NULL, "(1|yes|true|0|no|false)"); @@ -718,12 +621,9 @@ main(int argc, char *argv[]) register_config_handler("snmptrapd", "outputOption", parse_config_outputOption, NULL, "string"); - /* - * Add some options if they are available. - */ -#if HAVE_GETPID - strcat(options, "p:"); -#endif + register_config_handler("snmptrapd", "addForwarderInfo", + parse_config_addForwarderInfo, NULL, + "(1|yes|true|0|no|false)"); #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG #ifdef WIN32 @@ -740,13 +640,11 @@ main(int argc, char *argv[]) while ((arg = getopt(argc, argv, options)) != EOF) { switch (arg) { case '-': - if (strcasecmp(optarg, "help") == 0) { - usage(); - exit(0); - } - if (strcasecmp(optarg, "version") == 0) { + if (strcasecmp(optarg, "help") == 0 || + strcasecmp(optarg, "version") == 0) { version(); - exit(0); + exit_code = 0; + goto out; } handle_long_opt(optarg); @@ -767,7 +665,7 @@ main(int argc, char *argv[]) NETSNMP_DS_LIB_OPTIONALCONFIG, optarg); } else { usage(); - exit(1); + goto out; } break; @@ -807,25 +705,42 @@ main(int argc, char *argv[]) } } else { usage(); - exit(1); + goto out; } break; -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H case 'g': if (optarg != NULL) { - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID, gid = atoi(optarg)); + int gid; + char *ecp; + + gid = strtoul(optarg, &ecp, 10); +#if defined(HAVE_GETGRNAM) && defined(HAVE_PWD_H) + if (*ecp) { + struct group *info; + + info = getgrnam(optarg); + gid = info ? info->gr_gid : -1; + endgrent(); + } +#endif + if (gid < 0) { + fprintf(stderr, "Bad group id: %s\n", optarg); + goto out; + } + netsnmp_set_agent_group_id(gid); } else { usage(); - exit(1); + goto out; } break; #endif case 'h': usage(); - exit(0); + exit_code = 0; + goto out; case 'H': init_agent("snmptrapd"); @@ -838,7 +753,8 @@ main(int argc, char *argv[]) init_snmp("snmptrapd"); fprintf(stderr, "Configuration directives understood:\n"); read_config_print_usage(" "); - exit(0); + exit_code = 0; + goto out; case 'I': if (optarg != NULL) { @@ -851,15 +767,14 @@ main(int argc, char *argv[]) case 'S': fprintf(stderr, "Warning: -S option has been withdrawn; use -Ls instead\n"); - exit(1); - break; + goto out; case 'm': if (optarg != NULL) { setenv("MIBS", optarg, 1); } else { usage(); - exit(1); + goto out; } break; @@ -868,7 +783,7 @@ main(int argc, char *argv[]) setenv("MIBDIRS", optarg, 1); } else { usage(); - exit(1); + goto out; } break; @@ -880,8 +795,7 @@ main(int argc, char *argv[]) case 'o': fprintf(stderr, "Warning: -o option has been withdrawn; use -Lf instead\n"); - exit(1); - break; + goto out; case 'O': cp = snmp_out_toggle_options(optarg); @@ -889,24 +803,24 @@ main(int argc, char *argv[]) fprintf(stderr, "Unknown output option passed to -O: %c\n", *cp); usage(); - exit(1); + goto out; } break; case 'L': if (snmp_log_options( optarg, argc, argv ) < 0 ) { usage(); - exit(1); + goto out; } break; -#if HAVE_GETPID +#ifdef HAVE_GETPID case 'p': if (optarg != NULL) { parse_config_pidFile(NULL, optarg); } else { usage(); - exit(1); + goto out; } break; #endif @@ -914,26 +828,25 @@ main(int argc, char *argv[]) case 'P': fprintf(stderr, "Warning: -P option has been withdrawn; use -f -Le instead\n"); - exit(1); - break; + goto out; case 's': fprintf(stderr, "Warning: -s option has been withdrawn; use -Lsd instead\n"); - exit(1); - break; + goto out; case 't': SyslogTrap++; break; -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H case 'u': if (optarg != NULL) { + int uid; char *ecp; uid = strtoul(optarg, &ecp, 10); -#if HAVE_GETPWNAM && HAVE_PWD_H +#if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) if (*ecp) { struct passwd *info; @@ -944,13 +857,12 @@ main(int argc, char *argv[]) #endif if (uid < 0) { fprintf(stderr, "Bad user id: %s\n", optarg); - exit(1); + goto out; } - netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID, uid); + netsnmp_set_agent_user_id(uid); } else { usage(); - exit(1); + goto out; } break; #endif @@ -967,7 +879,7 @@ main(int argc, char *argv[]) NETSNMP_DS_AGENT_X_SOCKET, optarg); } else { usage(); - exit(1); + goto out; } break; @@ -979,7 +891,7 @@ main(int argc, char *argv[]) default: fprintf(stderr, "invalid option: -%c\n", arg); usage(); - exit(1); + goto out; break; } } @@ -994,7 +906,7 @@ main(int argc, char *argv[]) astring = malloc(strlen(listen_ports) + 2 + strlen(argv[i])); if (astring == NULL) { fprintf(stderr, "malloc failure processing argv[%d]\n", i); - exit(1); + goto out; } sprintf(astring, "%s,%s", listen_ports, argv[i]); free(listen_ports); @@ -1003,7 +915,7 @@ main(int argc, char *argv[]) listen_ports = strdup(argv[i]); if (listen_ports == NULL) { fprintf(stderr, "malloc failure processing argv[%d]\n", i); - exit(1); + goto out; } } } @@ -1073,9 +985,6 @@ main(int argc, char *argv[]) * initialize local modules */ if (agentx_subagent) { -#ifdef USING_SNMPV3_SNMPENGINE_MODULE - extern void register_snmpEngine_scalars_context(const char *); -#endif subagent_init(); #ifdef USING_NOTIFICATION_LOG_MIB_NOTIFICATION_LOG_MODULE /* register the notification log table */ @@ -1105,14 +1014,10 @@ main(int argc, char *argv[]) #if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(NETSNMP_SNMPTRAPD_DISABLE_AGENTX) if (agentx_subagent) { -#ifdef USING_AGENT_NSVACMACCESSTABLE_MODULE - extern void init_register_nsVacm_context(const char *); -#endif #ifdef USING_SNMPV3_USMUSER_MODULE #ifdef NETSNMP_FEATURE_CHECKING netsnmp_feature_require(init_register_usmUser_context) #endif /* NETSNMP_FEATURE_CHECKING */ - extern void init_register_usmUser_context(const char *); /* register ourselves as having a USM user database */ init_register_usmUser_context("snmptrapd"); #endif @@ -1191,8 +1096,7 @@ main(int argc, char *argv[]) snmp_log(LOG_ERR, "couldn't open %s -- errno %d (\"%s\")\n", cp, errno, strerror(errno)); snmptrapd_close_sessions(sess_list); - SOCK_CLEANUP; - exit(1); + goto sock_cleanup; } else { ss = snmptrapd_add_session(transport); if (ss == NULL) { @@ -1202,8 +1106,7 @@ main(int argc, char *argv[]) */ snmptrapd_close_sessions(sess_list); snmp_log(LOG_ERR, "couldn't open snmp - %s", strerror(errno)); - SOCK_CLEANUP; - exit(1); + goto sock_cleanup; } else { ss->next = sess_list; sess_list = ss; @@ -1226,7 +1129,7 @@ main(int argc, char *argv[]) #ifdef NETSNMP_USE_MYSQL if( netsnmp_mysql_init() ) { fprintf(stderr, "MySQL initialization failed\n"); - exit(1); + goto sock_cleanup; } #endif @@ -1237,10 +1140,14 @@ main(int argc, char *argv[]) if (dofork && netsnmp_running) { int fd; +#ifdef HAVE_FORKALL + switch (forkall()) { +#else switch (fork()) { +#endif case -1: fprintf(stderr, "bad fork - %s\n", strerror(errno)); - _exit(1); + goto sock_cleanup; case 0: /* @@ -1248,17 +1155,19 @@ main(int argc, char *argv[]) */ if (setsid() == -1) { fprintf(stderr, "bad setsid - %s\n", strerror(errno)); - _exit(1); + goto sock_cleanup; } /* * if we are forked, we don't want to print out to stdout or stderr */ fd = open("/dev/null", O_RDWR); - dup2(fd, STDIN_FILENO); - dup2(fd, STDOUT_FILENO); - dup2(fd, STDERR_FILENO); - close(fd); + if (fd >= 0) { + dup2(fd, STDIN_FILENO); + dup2(fd, STDOUT_FILENO); + dup2(fd, STDERR_FILENO); + close(fd); + } break; default: @@ -1266,11 +1175,11 @@ main(int argc, char *argv[]) } } #endif /* WIN32 */ -#if HAVE_GETPID +#ifdef HAVE_GETPID if (pid_file != NULL) { if ((PID = fopen(pid_file, "w")) == NULL) { snmp_log_perror("fopen"); - exit(1); + goto sock_cleanup; } fprintf(PID, "%d\n", (int) getpid()); fclose(PID); @@ -1285,10 +1194,13 @@ main(int argc, char *argv[]) */ reconfig = 0; -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #ifdef HAVE_SETGID + { + int gid; + if ((gid = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_GROUPID)) != 0) { + NETSNMP_DS_AGENT_GROUPID)) > 0) { DEBUGMSGTL(("snmptrapd/main", "Changing gid to %d.\n", gid)); if (setgid(gid) == -1 #ifdef HAVE_SETGROUPS @@ -1298,26 +1210,44 @@ main(int argc, char *argv[]) snmp_log_perror("setgid failed"); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { - exit(1); + goto sock_cleanup; } } } + } #endif #ifdef HAVE_SETUID + { + int uid; + if ((uid = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID)) != 0) { + NETSNMP_DS_AGENT_USERID)) > 0) { DEBUGMSGTL(("snmptrapd/main", "Changing uid to %d.\n", uid)); if (setuid(uid) == -1) { snmp_log_perror("setuid failed"); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { - exit(1); + goto sock_cleanup; } } } + } #endif #endif + /* + * Let systemd know we're up. + */ +#ifndef NETSNMP_NO_SYSTEMD + netsnmp_sd_notify(1, "READY=1\n"); + if (prepared_sockets) + /* + * Clear the environment variable, we already processed all the sockets + * by now. + */ + netsnmp_sd_listen_fds(1); +#endif + #ifdef WIN32SERVICE trapd_status = SNMPTRAPD_RUNNING; #endif @@ -1345,8 +1275,14 @@ main(int argc, char *argv[]) trapd_status = SNMPTRAPD_STOPPED; #endif snmp_disable_log(); + + exit_code = 0; + +sock_cleanup: SOCK_CLEANUP; - return 0; + +out: + return exit_code; } /* @@ -1365,18 +1301,6 @@ trapd_update_config(void) read_configs(); } - -#if !defined(HAVE_GETDTABLESIZE) && !defined(WIN32) -#include -int -getdtablesize(void) -{ - struct rlimit rl; - getrlimit(RLIMIT_NOFILE, &rl); - return (rl.rlim_cur); -} -#endif - /* * Windows Service Related functions */ @@ -1388,9 +1312,8 @@ getdtablesize(void) * Invokes appropriate startup functions depending on the * parameters passed *************************************************************/ -int - __cdecl -_tmain(int argc, TCHAR * argv[]) +int __cdecl +main(int argc, TCHAR * argv[]) { /* * Define Service Name and Description, which appears in windows SCM @@ -1405,7 +1328,7 @@ _tmain(int argc, TCHAR * argv[]) #endif InputParams InputOptions; - int nRunType = RUN_AS_CONSOLE; + enum net_snmp_cmd_line_action nRunType = RUN_AS_CONSOLE; int quiet = 0; nRunType = ParseCmdLineForServiceOption(argc, argv, &quiet); diff --git a/apps/snmptrapd_auth.c b/apps/snmptrapd_auth.c index be21e5e..892fe49 100644 --- a/apps/snmptrapd_auth.c +++ b/apps/snmptrapd_auth.c @@ -1,16 +1,21 @@ /* * snmptrapd_auth.c - authorize notifications for further processing * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + * */ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -66,9 +71,11 @@ netsnmp_trapd_auth(netsnmp_pdu *pdu, int ret = 0; oid snmptrapoid[] = { 1,3,6,1,6,3,1,1,4,1,0 }; size_t snmptrapoid_len = OID_LENGTH(snmptrapoid); - int i; netsnmp_pdu *newpdu = pdu; netsnmp_variable_list *var; +#ifdef USING_MIBII_VACM_CONF_MODULE + int i; +#endif /* check to see if authorization was not disabled */ if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, diff --git a/apps/snmptrapd_handlers.c b/apps/snmptrapd_handlers.c index 5a8e3c8..9496d31 100644 --- a/apps/snmptrapd_handlers.c +++ b/apps/snmptrapd_handlers.c @@ -1,27 +1,30 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H #include #endif @@ -38,7 +41,7 @@ #include "snmptrapd_log.h" #include "notification-log-mib/notification_log.h" -netsnmp_feature_child_of(add_default_traphandler, snmptrapd) +netsnmp_feature_child_of(add_default_traphandler, snmptrapd); char *syslog_format1 = NULL; char *syslog_format2 = NULL; @@ -102,6 +105,7 @@ snmptrapd_parse_traphandle(const char *token, char *line) } if ( !cptr ) { netsnmp_config_error("Missing traphandle command (%s)", buf); + free(format); return; } @@ -126,6 +130,7 @@ snmptrapd_parse_traphandle(const char *token, char *line) if (!read_objid(buf, obuf, &olen)) { netsnmp_config_error("Bad trap OID in traphandle directive: %s", buf); + free(format); return; } DEBUGMSGOID(("read_config:traphandle", obuf, olen)); @@ -138,9 +143,12 @@ snmptrapd_parse_traphandle(const char *token, char *line) traph->flags = flags; traph->authtypes = TRAP_AUTH_EXE; traph->token = strdup(cptr); - if (format) + if (format) { traph->format = format; + format = NULL; + } } + free(format); } @@ -189,6 +197,7 @@ parse_forward(const char *token, char *line) if (!read_objid(buf, obuf, &olen)) { netsnmp_config_error("Bad trap OID in forward directive: %s", buf); + free(format); return; } DEBUGMSGOID(("read_config:forward", obuf, olen)); @@ -206,6 +215,8 @@ parse_forward(const char *token, char *line) traph->token = strdup(cptr); if (format) traph->format = format; + } else { + free(format); } } @@ -291,7 +302,7 @@ void free_trap1_fmt(void) { if (print_format1 && print_format1 != trap1_std_str) - free((char *) print_format1); + free(print_format1); print_format1 = NULL; } @@ -307,7 +318,7 @@ void free_trap2_fmt(void) { if (print_format2 && print_format2 != trap2_std_str) - free((char *) print_format2); + free(print_format2); print_format2 = NULL; } @@ -873,6 +884,121 @@ int axforward_handler( netsnmp_pdu *pdu, return NETSNMPTRAPD_HANDLER_OK; } +static int add_forwarder_info(netsnmp_pdu *pdu, netsnmp_pdu *pdu2) +{ + netsnmp_indexed_addr_pair *addr_pair1; + struct sockaddr_in *to1 = NULL; + struct sockaddr_in *to2 = NULL; + int last_snmpTrapAddress_index = -1; + /* snmpTrapAddress_oid.0 is also defined as agentaddr_oid */ + const oid snmpTrapAddress_oid[] = { 1,3,6,1,6,3,18,1,3}; + /* each forwarder will add this OID with changed last index */ + oid forwarder_oid[] = { 1,3,6,1,6,3,18,1,3,0}; + const size_t snmpTrapAddress_oid_size = OID_LENGTH(snmpTrapAddress_oid); + const size_t forwarder_oid_len = OID_LENGTH(forwarder_oid); + struct in_addr agent_addr; + struct in_addr my_ip_addr; + + memset(&agent_addr, 0, sizeof(agent_addr)); + memset(&my_ip_addr, 0, sizeof(my_ip_addr)); + + if (pdu && pdu->transport_data && + pdu->transport_data_length == sizeof(*addr_pair1)) { + addr_pair1 = (netsnmp_indexed_addr_pair *)pdu->transport_data; + + /* + * Get the IPv4 address of the host that this trap was sent from = + * last forwarder's IP address. + */ + if (addr_pair1->remote_addr.sa.sa_family == AF_INET) { + to1 = (struct sockaddr_in *)&(addr_pair1->remote_addr); + agent_addr = to1->sin_addr; + } + /* + * Get the IPv4 address of the host that this trap was sent to = + * this forwarder's IP address. + */ + if (addr_pair1->local_addr.sa.sa_family == AF_INET) { + to2 = (struct sockaddr_in *)&(addr_pair1->local_addr); + my_ip_addr = to2->sin_addr; + } + } + + if (to1) { + netsnmp_variable_list *vblist = NULL; + netsnmp_variable_list *var = NULL; + + if (*(in_addr_t *)pdu2->agent_addr == INADDR_ANY) { + /* + * there was no agent address defined in PDU. copy the forwarding + * agent IP address from the transport socket. + */ + *(struct in_addr *)pdu2->agent_addr = agent_addr; + } + + vblist = pdu2->variables; + + /* + * Iterate over all varbinds in the PDU to see if it already has any + * forwarder information. + */ + for (var = vblist; var; var = var->next_variable) { + if (snmp_oid_ncompare(var->name, var->name_length, + snmpTrapAddress_oid, + snmpTrapAddress_oid_size, + snmpTrapAddress_oid_size) == 0) { + int my_snmpTrapAddress_index = + var->name[var->name_length - 1]; + + DEBUGMSGTL(("snmptrapd", " my_snmpTrapAddress_index=%d, last_snmpTrapAddress_index=%d, my_ip_addr=%s\n", + my_snmpTrapAddress_index, + last_snmpTrapAddress_index, + inet_ntoa(my_ip_addr))); + + if (last_snmpTrapAddress_index < my_snmpTrapAddress_index) + last_snmpTrapAddress_index = my_snmpTrapAddress_index; + + /* Detect forwarding loop. */ + if (var->val_len < 4) { + snmp_log(LOG_ERR, "Length of IP address of OID .1.3.6.1.6.3.18.1.3.%d in PDU is less than %d bytes = %d\n", + my_snmpTrapAddress_index, 4, + (int)var->val_len); + } else { + if (to2 && + memcmp(var->val.string, &my_ip_addr, 4) == 0) { + snmp_log(LOG_ERR, "Forwarding loop detected, OID .1.3.6.1.6.3.18.1.3.%d already has this forwarder's IP address=%s, not forwarding this trap\n", + my_snmpTrapAddress_index, + inet_ntoa(my_ip_addr)); + return 0; + } + if (memcmp(var->val.string, &agent_addr, 4) == 0) { + snmp_log(LOG_ERR, "Forwarding loop detected, OID .1.3.6.1.6.3.18.1.3.%d already has the sender's IP address=%s, not forwarding this trap\n", + my_snmpTrapAddress_index, + inet_ntoa(agent_addr)); + return 0; + } + } + } + } /* for var in vblist */ + + DEBUGMSGTL(("snmptrapd", + " last_snmpTrapAddress_index=%d, adding index=%d\n", + last_snmpTrapAddress_index, last_snmpTrapAddress_index+1)); + /* Change the last index of this OID to the next avaiable number. */ + forwarder_oid[forwarder_oid_len - 1] = last_snmpTrapAddress_index + 1; + + /* + * Add forwarder IP address as OID to trap payload. Use the value + * from the transport, so if a v1 PDU is sent, the same IP is not + * duplicated you want every forwarder to add this OID with its + * own IP address. + */ + snmp_pdu_add_variable(pdu2, forwarder_oid, forwarder_oid_len, + ASN_IPADDRESS, (u_char *)&agent_addr, 4); + } + return 1; +} + /* * Trap handler for forwarding to another destination */ @@ -904,14 +1030,25 @@ int forward_handler( netsnmp_pdu *pdu, INFORMS which may require engineID probing */ pdu2 = snmp_clone_pdu(pdu); + + if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_ADD_FORWARDER_INFO) && + !add_forwarder_info(pdu, pdu2)) { + snmp_close(ss); + return NETSNMPTRAPD_HANDLER_FAIL; + } + if (pdu2->transport_data) { free(pdu2->transport_data); pdu2->transport_data = NULL; pdu2->transport_data_length = 0; } - if (!snmp_send( ss, pdu2 )) { - snmp_sess_perror("Forward failed", ss); - snmp_free_pdu(pdu2); + + ss->s_snmp_errno = SNMPERR_SUCCESS; + if (!snmp_send( ss, pdu2 ) && + ss->s_snmp_errno != SNMPERR_SUCCESS) { + snmp_sess_perror("Forward failed", ss); + snmp_free_pdu(pdu2); } snmp_close( ss ); return NETSNMPTRAPD_HANDLER_OK; diff --git a/apps/snmptrapd_handlers.h b/apps/snmptrapd_handlers.h index 097c02d..5322cfd 100644 --- a/apps/snmptrapd_handlers.h +++ b/apps/snmptrapd_handlers.h @@ -41,6 +41,8 @@ void free_trap1_fmt(void); void free_trap2_fmt(void); extern char *print_format1; extern char *print_format2; +extern int SyslogTrap; +extern int dropauth; #define NETSNMPTRAPD_AUTH_HANDLER 1 #define NETSNMPTRAPD_PRE_HANDLER 2 @@ -60,9 +62,9 @@ netsnmp_trapd_handler *netsnmp_add_traphandler(Netsnmp_Trap_Handler* handler, netsnmp_trapd_handler *netsnmp_get_traphandler(oid *trapOid, int trapOidLen); const char *trap_description(int trap); -void do_external(char *cmd, struct hostent *host, - netsnmp_pdu *pdu, netsnmp_transport *transport); int snmp_input(int op, netsnmp_session *session, int reqid, netsnmp_pdu *pdu, void *magic); +void parse_format(const char *token, char *line); + #endif /* SNMPTRAPD_HANDLERS_H */ diff --git a/apps/snmptrapd_log.c b/apps/snmptrapd_log.c index 774f797..d2d88c1 100644 --- a/apps/snmptrapd_log.c +++ b/apps/snmptrapd_log.c @@ -25,66 +25,67 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_SYS_WAIT_H +#ifdef HAVE_SYS_WAIT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include #if !defined(mingw32) && defined(HAVE_SYS_TIME_H) # include -# if TIME_WITH_SYS_TIME +# ifdef TIME_WITH_SYS_TIME # include # endif #else # include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif #include +#include "snmptrapd_handlers.h" #include "snmptrapd_log.h" @@ -302,11 +303,6 @@ typedef enum { * var - the parameter to reference */ -/* - * prototypes - */ -extern const char *trap_description(int trap); - static void init_options(options_type * options) @@ -591,6 +587,20 @@ realloc_handle_time_fmt(u_char ** buf, size_t * buf_len, size_t * out_len, (u_char **) & safe_bfr, options); } +static +void convert_agent_addr(struct in_addr agent_addr, char *name, size_t size) +{ + const int numeric = !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_APP_NUMERIC_IP); + struct sockaddr_in sin; + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_addr = agent_addr; + if (getnameinfo((struct sockaddr *)&sin, sizeof(sin), name, size, NULL, 0, + numeric ? NI_NUMERICHOST : 0) < 0) + strlcpy(name, "?", sizeof(size)); +} static int realloc_handle_ip_fmt(u_char ** buf, size_t * buf_len, size_t * out_len, @@ -613,7 +623,7 @@ realloc_handle_ip_fmt(u_char ** buf, size_t * buf_len, size_t * out_len, */ { struct in_addr *agent_inaddr = (struct in_addr *) pdu->agent_addr; - struct hostent *host = NULL; /* corresponding host name */ + char host[16]; /* corresponding host name */ char fmt_cmd = options->cmd; /* what we're formatting */ u_char *temp_buf = NULL; size_t temp_buf_len = 64, temp_out_len = 0; @@ -646,26 +656,14 @@ realloc_handle_ip_fmt(u_char ** buf, size_t * buf_len, size_t * out_len, * Try to resolve the agent_addr field as a hostname; fall back * to numerical address. */ - if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_APP_NUMERIC_IP)) { - host = netsnmp_gethostbyaddr((char *) pdu->agent_addr, 4, AF_INET); - } - if (host != NULL) { - if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1, - (const u_char *)host->h_name)) { - if (temp_buf != NULL) { - free(temp_buf); - } - return 0; - } - } else { - if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1, - (u_char *)inet_ntoa(*agent_inaddr))) { - if (temp_buf != NULL) { - free(temp_buf); - } - return 0; + convert_agent_addr(*(struct in_addr *)pdu->agent_addr, + host, sizeof(host)); + if (!snmp_strcat(&temp_buf, &temp_buf_len, &temp_out_len, 1, + (const u_char *)host)) { + if (temp_buf != NULL) { + free(temp_buf); } + return 0; } break; @@ -1339,7 +1337,7 @@ realloc_format_plain_trap(u_char ** buf, size_t * buf_len, struct tm *now_parsed; /* time in struct format */ char safe_bfr[200]; /* holds other strings */ struct in_addr *agent_inaddr = (struct in_addr *) pdu->agent_addr; - struct hostent *host = NULL; /* host name */ + char host[16]; /* host name */ netsnmp_variable_list *vars; /* variables assoc with trap */ if (buf == NULL) { @@ -1366,36 +1364,18 @@ realloc_format_plain_trap(u_char ** buf, size_t * buf_len, /* * Get info about the sender. */ - if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_APP_NUMERIC_IP)) { - host = netsnmp_gethostbyaddr((char *) pdu->agent_addr, 4, AF_INET); - } - if (host != (struct hostent *) NULL) { - if (!snmp_strcat - (buf, buf_len, out_len, allow_realloc, - (const u_char *) host->h_name)) { - return 0; - } - if (!snmp_strcat - (buf, buf_len, out_len, allow_realloc, - (const u_char *) " [")) { - return 0; - } - if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, - (const u_char *) inet_ntoa(*agent_inaddr))) { - return 0; - } - if (!snmp_strcat - (buf, buf_len, out_len, allow_realloc, - (const u_char *) "] ")) { - return 0; - } - } else { - if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, - (const u_char *) inet_ntoa(*agent_inaddr))) { - return 0; - } - } + convert_agent_addr(*(struct in_addr *)pdu->agent_addr, host, sizeof(host)); + if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, (u_char *)host)) + return 0; + if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, + (const u_char *)" [")) + return 0; + if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, + (u_char *)inet_ntoa(*agent_inaddr))) + return 0; + if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, + (const u_char *)"] ")) + return 0; /* * Append PDU transport info. diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c index 671e542..fd7ffb2 100644 --- a/apps/snmptrapd_sql.c +++ b/apps/snmptrapd_sql.c @@ -15,24 +15,43 @@ #ifdef NETSNMP_USE_MYSQL -#if HAVE_STDLIB_H +/* + * SQL includes + */ +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#if !defined(HAVE_MYSQL_INIT) +#ifdef HAVE_MY_GLOBAL_H +#include +#endif +#ifdef HAVE_MY_SYS_H +#include +#endif +#endif +#include +#include + +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -41,21 +60,9 @@ #include "snmptrapd_handlers.h" #include "snmptrapd_auth.h" #include "snmptrapd_log.h" +#include "snmptrapd_sql.h" -/* - * SQL includes - */ -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#include -#include -#include -#include - -netsnmp_feature_require(container_fifo) +netsnmp_feature_require(container_fifo); /* * define a structure to hold all the file globals @@ -194,7 +201,7 @@ typedef struct sql_buf_t { * static bind structures, plus 2 static buffers to bind to. */ static MYSQL_BIND _tbind[TBIND_MAX], _vbind[VBIND_MAX]; -static my_bool _no_v3; +static char _no_v3; static void _sql_process_queue(u_int dontcare, void *meeither); @@ -416,9 +423,6 @@ netsnmp_mysql_connect(void) int netsnmp_mysql_init(void) { - int not_argc = 0, i; - char *not_args[] = { NULL }; - char **not_argv = not_args; netsnmp_trapd_handler *traph; DEBUGMSGTL(("sql:init","called\n")); @@ -437,15 +441,30 @@ netsnmp_mysql_init(void) return -1; } -#ifdef HAVE_BROKEN_LIBMYSQLCLIENT - my_init(); -#else +#if defined(HAVE_MYSQL_INIT) + mysql_init(NULL); +#elif defined(HAVE_MY_INIT) MY_INIT("snmptrapd"); +#else + my_init(); #endif +#if !defined(HAVE_MYSQL_OPTIONS) + { + int not_argc = 0, i; + char *not_args[] = { NULL }; + char **not_argv = not_args; + /** load .my.cnf values */ +#ifdef HAVE_MY_LOAD_DEFAULTS + my_load_defaults ("my", _sql.groups, ¬_argc, ¬_argv, 0); +#elif defined(HAVE_LOAD_DEFAULTS) load_defaults ("my", _sql.groups, ¬_argc, ¬_argv); - for(i=0; i < not_argc; ++i) { +#else +#error Neither load_defaults() nor mysql_options() are available. +#endif + + for (i = 0; i < not_argc; ++i) { if (NULL == not_argv[i]) continue; if (strncmp(not_argv[i],"--password=",11) == 0) @@ -463,6 +482,8 @@ netsnmp_mysql_init(void) else snmp_log(LOG_WARNING, "unknown argument[%d] %s\n", i, not_argv[i]); } + } +#endif /* !defined(HAVE_MYSQL_OPTIONS) */ /** init bind structures */ memset(_tbind, 0x0, sizeof(_tbind)); @@ -542,6 +563,10 @@ netsnmp_mysql_init(void) return -1; } +#ifdef HAVE_MYSQL_OPTIONS + mysql_options(_sql.conn, MYSQL_READ_DEFAULT_GROUP, "snmptrapd"); +#endif + /** try to connect; we'll try again later if we fail */ (void) netsnmp_mysql_connect(); @@ -879,7 +904,7 @@ _sql_save_varbind_info(sql_buf *sqlb, netsnmp_pdu *pdu) tmp_size = 0; buf_val_len_t = 0; sprint_realloc_by_type((u_char**)&sqlvb->val, &tmp_size, - &buf_val_len_t, 1, var, 0, 0, 0); + &buf_val_len_t, 1, var, NULL, NULL, NULL); sqlvb->val_len = buf_val_len_t; #else sqlvb->val = netsnmp_memdup(var->val.string, var->val_len); @@ -936,7 +961,7 @@ mysql_handler(netsnmp_pdu *pdu, if(rc) { snmp_log(LOG_ERR, "Could not log queue sql trap buffer\n"); _sql_log(sqlb, NULL); - _sql_buf_free(sqlb, 0); + _sql_buf_free(sqlb, NULL); return -1; } diff --git a/apps/snmptrapd_sql.h b/apps/snmptrapd_sql.h new file mode 100644 index 0000000..05e2b0c --- /dev/null +++ b/apps/snmptrapd_sql.h @@ -0,0 +1,2 @@ +void snmptrapd_register_sql_configs(void); +int netsnmp_mysql_init(void); diff --git a/apps/snmpusm.c b/apps/snmpusm.c index 42919bd..6cd92a9 100644 --- a/apps/snmpusm.c +++ b/apps/snmpusm.c @@ -17,52 +17,50 @@ * distributed with the Net-SNMP package. */ #include +#include +#include +#include +#if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO) +#include +#endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */ -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO) -#include -#endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */ - -#include - -int main(int, char **); - #define CMD_PASSWD_NAME "passwd" #define CMD_PASSWD 1 #define CMD_CREATE_NAME "create" @@ -150,7 +148,7 @@ usage(void) fprintf(stderr, "\t\t\t(it won't be active until you active it)\n"); fprintf(stderr, "\t-Cx\t\tChange the privacy key.\n"); fprintf(stderr, "\t-Ca\t\tChange the authentication key.\n"); - fprintf(stderr, "\t-Ck\t\tAllows to use localized key (must start with 0x)\n"); + fprintf(stderr, "\t-Ck\t\tAllows one to use localized key (must start with 0x)\n"); fprintf(stderr, "\t\t\tinstead of passphrase.\n"); } @@ -190,6 +188,7 @@ get_USM_DH_key(netsnmp_variable_list *vars, netsnmp_variable_list *dhvar, oid *keyoid, size_t keyoid_len) { u_char *dhkeychange; DH *dh; + const BIGNUM *p, *g, *pub_key; BIGNUM *other_pub; u_char *key; size_t key_len; @@ -205,25 +204,28 @@ get_USM_DH_key(netsnmp_variable_list *vars, netsnmp_variable_list *dhvar, dh = d2i_DHparams(NULL, &cp, dhvar->val_len); } - if (!dh || !dh->g || !dh->p) { + if (dh) + DH_get0_pqg(dh, &p, NULL, &g); + + if (!dh || !g || !p) { SNMP_FREE(dhkeychange); return SNMPERR_GENERR; } - DH_generate_key(dh); - if (!dh->pub_key) { + if (!DH_generate_key(dh)) { SNMP_FREE(dhkeychange); return SNMPERR_GENERR; } - - if (vars->val_len != (unsigned int)BN_num_bytes(dh->pub_key)) { + + DH_get0_key(dh, &pub_key, NULL); + if (vars->val_len != (unsigned int)BN_num_bytes(pub_key)) { SNMP_FREE(dhkeychange); fprintf(stderr,"incorrect diffie-helman lengths (%lu != %d)\n", - (unsigned long)vars->val_len, BN_num_bytes(dh->pub_key)); + (unsigned long)vars->val_len, BN_num_bytes(pub_key)); return SNMPERR_GENERR; } - BN_bn2bin(dh->pub_key, dhkeychange + vars->val_len); + BN_bn2bin(pub_key, dhkeychange + vars->val_len); key_len = DH_size(dh); if (!key_len) { @@ -352,7 +354,7 @@ main(int argc, char *argv[]) size_t name_length = USM_OID_LEN; size_t name_length2 = USM_OID_LEN; int status; - int exitval = 0; + int exitval = 1; int rval; int command = 0; long longvar; @@ -375,6 +377,8 @@ main(int argc, char *argv[]) newkul[SNMP_MAXBUF_SMALL], keychange[SNMP_MAXBUF_SMALL], keychangepriv[SNMP_MAXBUF_SMALL]; + SOCK_STARTUP; + authKeyChange = authKeyOid; privKeyChange = privKeyOid; @@ -383,12 +387,13 @@ main(int argc, char *argv[]) */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -396,11 +401,9 @@ main(int argc, char *argv[]) if (arg >= argc) { fprintf(stderr, "Please specify an operation to perform.\n"); usage(); - exit(1); + goto out; } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -414,7 +417,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpusm", &session); - exit(1); + goto out; } /* @@ -432,7 +435,7 @@ main(int argc, char *argv[]) pdu = snmp_pdu_create(SNMP_MSG_SET); if (!pdu) { fprintf(stderr, "Failed to create request\n"); - exit(1); + goto close_session; } @@ -458,21 +461,25 @@ main(int argc, char *argv[]) fprintf(stderr, "New passphrase must be greater than %d characters in length.\n", USM_LENGTH_P_MIN); - exit(1); + goto close_session; } if (oldpass == NULL || strlen(oldpass) < USM_LENGTH_P_MIN) { fprintf(stderr, "Old passphrase must be greater than %d characters in length.\n", USM_LENGTH_P_MIN); - exit(1); + goto close_session; } + DEBUGMSGTL(("9:usm:passwd", "oldpass len %" NETSNMP_PRIz "d, newpass len %" NETSNMP_PRIz "d\n", + strlen(oldpass), strlen(newpass))); + /* * Change the user supplied on command line. */ if ((passwd_user != NULL) && (strlen(passwd_user) > 0)) { - session.securityName = passwd_user; + SNMP_FREE(session.securityName); + session.securityName = strdup(passwd_user); } else { /* * Use own key object if no user was supplied. @@ -534,7 +541,7 @@ main(int argc, char *argv[]) if (!snmp_hex_to_binary((u_char **) (&buf), &buf_len, &oldkul_len, 0, oldpass)) { snmp_perror(argv[0]); fprintf(stderr, "generating the old Kul from localized key failed\n"); - exit(1); + goto close_session; } memcpy(oldkul, buf, oldkul_len); @@ -552,7 +559,7 @@ main(int argc, char *argv[]) if (rval != SNMPERR_SUCCESS) { snmp_perror(argv[0]); fprintf(stderr, "generating the old Ku failed\n"); - exit(1); + goto close_session; } /* @@ -566,8 +573,9 @@ main(int argc, char *argv[]) if (rval != SNMPERR_SUCCESS) { snmp_perror(argv[0]); fprintf(stderr, "generating the old Kul failed\n"); - exit(1); + goto close_session; } + DEBUGMSGTL(("9:usm:passwd", "oldkul len %" NETSNMP_PRIz "d\n", oldkul_len)); } if (uselocalizedkey && (strncmp(newpass, "0x", 2) == 0)) { /* @@ -581,7 +589,7 @@ main(int argc, char *argv[]) if (!snmp_hex_to_binary((u_char **) (&buf), &buf_len, &newkul_len, 0, newpass)) { snmp_perror(argv[0]); fprintf(stderr, "generating the new Kul from localized key failed\n"); - exit(1); + goto close_session; } memcpy(newkul, buf, newkul_len); @@ -595,7 +603,7 @@ main(int argc, char *argv[]) if (rval != SNMPERR_SUCCESS) { snmp_perror(argv[0]); fprintf(stderr, "generating the new Ku failed\n"); - exit(1); + goto close_session; } rval = generate_kul(session.securityAuthProto, @@ -606,8 +614,9 @@ main(int argc, char *argv[]) if (rval != SNMPERR_SUCCESS) { snmp_perror(argv[0]); fprintf(stderr, "generating the new Kul failed\n"); - exit(1); + goto close_session; } + DEBUGMSGTL(("9:usm:passwd", "newkul len %" NETSNMP_PRIz "d\n", newkul_len)); } /* @@ -616,26 +625,44 @@ main(int argc, char *argv[]) * they're the same lengths. */ if (doprivkey) { + int privtype, properlength; + u_char *okp = oldkulpriv, *nkp = newkulpriv; if (!session.securityPrivProto) { snmp_log(LOG_ERR, "no encryption type specified, which I need in order to know to change the key\n"); - exit(1); + goto close_session; } - -#ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(session.securityPrivProto, DESPriv)) { - /* DES uses a 128 bit key, 64 bits of which is a salt */ - oldkulpriv_len = newkulpriv_len = 16; - } -#endif -#ifdef HAVE_AES - if (ISTRANSFORM(session.securityPrivProto, AESPriv)) { - oldkulpriv_len = newkulpriv_len = 16; - } -#endif + + privtype = sc_get_privtype(session.securityPrivProto, + session.securityPrivProtoLen); + properlength = sc_get_proper_priv_length_bytype(privtype); + if (USM_CREATE_USER_PRIV_DES == privtype) + properlength *= 2; /* ?? we store salt with key */ + DEBUGMSGTL(("9:usm:passwd", "proper len %d\n", properlength)); + oldkulpriv_len = oldkul_len; + newkulpriv_len = newkul_len; memcpy(oldkulpriv, oldkul, oldkulpriv_len); memcpy(newkulpriv, newkul, newkulpriv_len); + + if (oldkulpriv_len > properlength) { + oldkulpriv_len = newkulpriv_len = properlength; + } + else if (oldkulpriv_len < properlength) { + rval = netsnmp_extend_kul(properlength, + session.securityAuthProto, + session.securityAuthProtoLen, + privtype, + usmUserEngineID, usmUserEngineIDLen, + &okp, &oldkulpriv_len, + sizeof(oldkulpriv)); + rval = netsnmp_extend_kul(properlength, + session.securityAuthProto, + session.securityAuthProtoLen, + privtype, + usmUserEngineID, usmUserEngineIDLen, + &nkp, &newkulpriv_len, + sizeof(newkulpriv)); + } } - /* * create the keychange string @@ -651,24 +678,28 @@ main(int argc, char *argv[]) snmp_perror(argv[0]); fprintf(stderr, "encoding the keychange failed\n"); usage(); - exit(1); + goto close_session; } } /* which is slightly different for encryption if lengths are different */ if (doprivkey) { + DEBUGMSGTL(("9:usm:passwd:encode", "proper len %" NETSNMP_PRIz "d, old_len %" NETSNMP_PRIz "d, new_len %" NETSNMP_PRIz "d\n", + oldkulpriv_len, oldkulpriv_len, newkulpriv_len)); rval = encode_keychange(session.securityAuthProto, session.securityAuthProtoLen, oldkulpriv, oldkulpriv_len, newkulpriv, newkulpriv_len, keychangepriv, &keychangepriv_len); + DEBUGMSGTL(("9:usm:passwd:encode", "keychange len %" NETSNMP_PRIz "d\n", + keychangepriv_len)); if (rval != SNMPERR_SUCCESS) { snmp_perror(argv[0]); fprintf(stderr, "encoding the keychange failed\n"); usage(); - exit(1); + goto close_session; } } @@ -700,7 +731,7 @@ main(int argc, char *argv[]) if (++arg >= argc) { fprintf(stderr, "You must specify the user name to create\n"); usage(); - exit(1); + goto close_session; } command = CMD_CREATE; @@ -755,7 +786,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify the user name to operate on\n"); usage(); - exit(1); + goto close_session; } command = CMD_CLONEFROM; @@ -773,7 +804,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify the user name to clone from\n"); usage(); - exit(1); + goto close_session; } setup_oid(usmUserSecurityName, &name_length2, @@ -791,7 +822,7 @@ main(int argc, char *argv[]) */ if (++arg >= argc) { fprintf(stderr, "You must specify the user name to delete\n"); - exit(1); + goto close_session; } command = CMD_DELETE; @@ -809,7 +840,7 @@ main(int argc, char *argv[]) */ if (++arg >= argc) { fprintf(stderr, "You must specify the user name to activate\n"); - exit(1); + goto close_session; } command = CMD_ACTIVATE; @@ -827,7 +858,7 @@ main(int argc, char *argv[]) */ if (++arg >= argc) { fprintf(stderr, "You must specify the user name to deactivate\n"); - exit(1); + goto close_session; } command = CMD_DEACTIVATE; @@ -882,7 +913,7 @@ main(int argc, char *argv[]) dhpdu = snmp_pdu_create(SNMP_MSG_GET); if (!dhpdu) { fprintf(stderr, "Failed to create DH request\n"); - exit(1); + goto close_session; } /* get the current DH parameters */ @@ -935,18 +966,12 @@ main(int argc, char *argv[]) vars = vars->next_variable; } if (doprivkey) { - size_t dhprivKeyLen = 0; -#ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(ss->securityPrivProto, DESPriv)) { - /* DES uses a 128 bit key, 64 bits of which is a salt */ - dhprivKeyLen = 16; - } -#endif -#ifdef HAVE_AES - if (ISTRANSFORM(ss->securityPrivProto, AESPriv)) { - dhprivKeyLen = 16; - } -#endif + size_t dhprivKeyLen = 0; + int privtype = sc_get_privtype(ss->securityPrivProto, + ss->securityPrivProtoLen); + dhprivKeyLen = sc_get_proper_priv_length_bytype(privtype); + if (USM_CREATE_USER_PRIV_DES == privtype) + dhprivKeyLen *= 2; /* ?? we store salt with key */ if (get_USM_DH_key(vars, dhvar, dhprivKeyLen, pdu, "priv", @@ -960,7 +985,7 @@ main(int argc, char *argv[]) } else { fprintf(stderr, "Unknown command\n"); usage(); - exit(1); + goto close_session; } /* @@ -1012,12 +1037,18 @@ main(int argc, char *argv[]) exitval = 1; } + exitval = 0; #if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO) begone: #endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */ if (response) snmp_free_pdu(response); + +close_session: snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmpvacm.c b/apps/snmpvacm.c index f88ede6..fee67e4 100644 --- a/apps/snmpvacm.c +++ b/apps/snmpvacm.c @@ -5,47 +5,45 @@ */ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif #include -int main(int, char **); - #define CMD_CREATESEC2GROUP_NAME "createSec2Group" #define CMD_CREATESEC2GROUP 1 #define CMD_DELETESEC2GROUP_NAME "deleteSec2Group" @@ -269,7 +267,7 @@ main(int argc, char *argv[]) #endif size_t name_length; int status; - int exitval = 0; + int exitval = 1; int command = 0; long longvar; int secModel, secLevel, contextMatch; @@ -278,25 +276,24 @@ main(int argc, char *argv[]) u_char viewMask[VACMSTRINGLEN]; char *st; + SOCK_STARTUP; /* * get the common command line arguments */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } - - SOCK_STARTUP; - /* * open an SNMP session */ @@ -309,7 +306,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpvacm", &session); - exit(1); + goto out; } /* @@ -320,7 +317,7 @@ main(int argc, char *argv[]) if (arg >= argc) { fprintf(stderr, "Please specify a operation to perform.\n"); usage(); - exit(1); + goto close_session; } if (strcmp(argv[arg], CMD_DELETEVIEW_NAME) == 0) @@ -334,7 +331,7 @@ main(int argc, char *argv[]) if (++arg + 2 != argc) { fprintf(stderr, "You must specify the view to delete\n"); usage(); - exit(1); + goto close_session; } command = CMD_DELETEVIEW; @@ -356,7 +353,7 @@ main(int argc, char *argv[]) if (++arg + 2 > argc) { fprintf(stderr, "You must specify name, subtree and mask\n"); usage(); - exit(1); + goto close_session; } command = CMD_CREATEVIEW; name_length = VIEW_OID_LEN; @@ -374,11 +371,11 @@ main(int argc, char *argv[]) for (mask = strtok_r(mask, ".:", &st); mask; mask = strtok_r(NULL, ".:", &st)) { if (i >= sizeof(viewMask)) { printf("MASK too long\n"); - exit(1); + goto close_session; } if (sscanf(mask, "%x", &val) == 0) { printf("invalid MASK\n"); - exit(1); + goto close_session; } viewMask[i] = val; i++; @@ -409,7 +406,7 @@ main(int argc, char *argv[]) if (++arg + 2 != argc) { fprintf(stderr, "You must specify the sec2group to delete\n"); usage(); - exit(1); + goto close_session; } command = CMD_DELETESEC2GROUP; @@ -417,7 +414,7 @@ main(int argc, char *argv[]) if (sscanf(argv[arg], "%d", &secModel) == 0) { printf("invalid security model\n"); usage(); - exit(1); + goto close_session; } sec2group_oid(vacmSec2GroupStatus, &name_length, secModel, argv[arg + 1]); @@ -437,7 +434,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify model, security name and group name\n"); usage(); - exit(1); + goto close_session; } command = CMD_CREATESEC2GROUP; @@ -445,7 +442,7 @@ main(int argc, char *argv[]) if (sscanf(argv[arg], "%d", &secModel) == 0) { printf("invalid security model\n"); usage(); - exit(1); + goto close_session; } sec2group_oid(vacmSec2GroupStatus, &name_length, secModel, argv[arg + 1]); @@ -470,7 +467,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify the access entry to delete\n"); usage(); - exit(1); + goto close_session; } command = CMD_DELETEACCESS; @@ -484,12 +481,12 @@ main(int argc, char *argv[]) if (sscanf(argv[arg + 1], "%d", &secModel) == 0) { printf("invalid security model\n"); usage(); - exit(1); + goto close_session; } if (sscanf(argv[arg + 2], "%d", &secLevel) == 0) { printf("invalid security level\n"); usage(); - exit(1); + goto close_session; } access_oid(vacmAccessStatus, &name_length, groupName, prefix, secModel, secLevel); @@ -509,7 +506,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify the access entry to create\n"); usage(); - exit(1); + goto close_session; } command = CMD_CREATEACCESS; @@ -523,12 +520,12 @@ main(int argc, char *argv[]) if (sscanf(argv[arg + 1], "%d", &secModel) == 0) { printf("invalid security model\n"); usage(); - exit(1); + goto close_session; } if (sscanf(argv[arg + 2], "%d", &secLevel) == 0) { printf("invalid security level\n"); usage(); - exit(1); + goto close_session; } access_oid(vacmAccessStatus, &name_length, groupName, prefix, secModel, secLevel); @@ -542,7 +539,7 @@ main(int argc, char *argv[]) if (sscanf(argv[arg + 3], "%d", &contextMatch) == 0) { printf("invalid contextMatch\n"); usage(); - exit(1); + goto close_session; } snmp_pdu_add_variable(pdu, vacmAccessContextMatch, name_length, ASN_INTEGER, (u_char *) & contextMatch, @@ -577,7 +574,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify the authAccess entry to delete\n"); usage(); - exit(1); + goto close_session; } command = CMD_DELETEAUTH; @@ -591,12 +588,12 @@ main(int argc, char *argv[]) if (sscanf(argv[arg + 1], "%d", &secModel) == 0) { printf("invalid security model\n"); usage(); - exit(1); + goto close_session; } if (sscanf(argv[arg + 2], "%d", &secLevel) == 0) { printf("invalid security level\n"); usage(); - exit(1); + goto close_session; } authtype = argv[arg+3]; auth_oid(nsVacmRowStatus, &name_length, groupName, prefix, @@ -617,7 +614,7 @@ main(int argc, char *argv[]) fprintf(stderr, "You must specify the authAccess entry to create\n"); usage(); - exit(1); + goto close_session; } command = CMD_CREATEAUTH; @@ -631,12 +628,12 @@ main(int argc, char *argv[]) if (sscanf(argv[arg + 1], "%d", &secModel) == 0) { printf("invalid security model\n"); usage(); - exit(1); + goto close_session; } if (sscanf(argv[arg + 2], "%d", &secLevel) == 0) { printf("invalid security level\n"); usage(); - exit(1); + goto close_session; } authtype = argv[arg+3]; auth_oid(nsVacmRowStatus, &name_length, groupName, prefix, @@ -651,7 +648,7 @@ main(int argc, char *argv[]) if (sscanf(argv[arg + 4], "%d", &contextMatch) == 0) { printf("invalid contextMatch\n"); usage(); - exit(1); + goto close_session; } snmp_pdu_add_variable(pdu, nsVacmContextPfx, name_length, ASN_INTEGER, (u_char *) & contextMatch, @@ -665,9 +662,11 @@ main(int argc, char *argv[]) } else { printf("Unknown command\n"); usage(); - exit(1); + goto close_session; } + exitval = 0; + /* * do the request */ @@ -705,7 +704,11 @@ main(int argc, char *argv[]) if (response) snmp_free_pdu(response); +close_session: snmp_close(ss); + +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/snmpwalk.c b/apps/snmpwalk.c index 659d7de..8308cc8 100644 --- a/apps/snmpwalk.c +++ b/apps/snmpwalk.c @@ -26,39 +26,39 @@ SOFTWARE. ******************************************************************/ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H # include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -187,9 +187,11 @@ main(int argc, char *argv[]) int running; int status = STAT_ERROR; int check; - int exitval = 0; + int exitval = 1; struct timeval tv1, tv2, tv_a, tv_b; + SOCK_STARTUP; + netsnmp_ds_register_config(ASN_BOOLEAN, "snmpwalk", "includeRequested", NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_WALK_INCLUDE_REQUESTED); @@ -219,12 +221,13 @@ main(int argc, char *argv[]) */ switch (arg = snmp_parse_args(argc, argv, &session, "C:", optProc)) { case NETSNMP_PARSE_ARGS_ERROR: - exit(1); + goto out; case NETSNMP_PARSE_ARGS_SUCCESS_EXIT: - exit(0); + exitval = 0; + goto out; case NETSNMP_PARSE_ARGS_ERROR_USAGE: usage(); - exit(1); + goto out; default: break; } @@ -239,7 +242,7 @@ main(int argc, char *argv[]) rootlen = MAX_OID_LEN; if (snmp_parse_oid(argv[arg], root, &rootlen) == NULL) { snmp_perror(argv[arg]); - exit(1); + goto out; } } else { /* @@ -258,7 +261,7 @@ main(int argc, char *argv[]) end_len = MAX_OID_LEN; if (snmp_parse_oid(end_name, end_oid, &end_len) == NULL) { snmp_perror(end_name); - exit(1); + goto out; } } else { memmove(end_oid, root, rootlen*sizeof(oid)); @@ -266,8 +269,6 @@ main(int argc, char *argv[]) end_oid[end_len-1]++; } - SOCK_STARTUP; - /* * open an SNMP session */ @@ -277,8 +278,7 @@ main(int argc, char *argv[]) * diagnose snmp_open errors with the input netsnmp_session pointer */ snmp_sess_perror("snmpwalk", &session); - SOCK_CLEANUP; - exit(1); + goto out; } /* @@ -299,6 +299,7 @@ main(int argc, char *argv[]) if (netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_WALK_TIME_RESULTS)) netsnmp_get_monotonic_clock(&tv1); + exitval = 0; while (running) { /* * create PDU for GETNEXT request and add object name to request @@ -345,6 +346,7 @@ main(int argc, char *argv[]) && snmp_oid_compare(name, name_length, vars->name, vars->name_length) >= 0) { + fflush(stdout); fprintf(stderr, "Error: OID not increasing: "); fprint_objid(stderr, name, name_length); fprintf(stderr, " >= "); @@ -427,6 +429,8 @@ main(int argc, char *argv[]) (double) (tv2.tv_sec - tv1.tv_sec)); } +out: + netsnmp_cleanup_session(&session); SOCK_CLEANUP; return exitval; } diff --git a/apps/sshtosnmp.c b/apps/sshtosnmp.c index d26067d..6e765bd 100644 --- a/apps/sshtosnmp.c +++ b/apps/sshtosnmp.c @@ -17,7 +17,7 @@ #ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif @@ -28,7 +28,7 @@ #include #ifndef MAXPATHLEN -#warn no system max path length detected +#warning no system max path length detected #define MAXPATHLEN 2048 #endif @@ -44,10 +44,10 @@ #undef DEBUGGING -#ifdef DEBUGGING #define DEBUG(x) deb(x) +#ifdef DEBUGGING FILE *debf = NULL; -void +static void deb(const char *string) { if (NULL == debf) { debf = fopen("/tmp/sshtosnmp.log", "a"); @@ -58,7 +58,8 @@ deb(const char *string) { } } #else /* !DEBUGGING */ -#define DEBUG(x) +NETSNMP_STATIC_INLINE void +deb(const char *string) { } #endif /* DEBUGGING code */ int @@ -77,11 +78,8 @@ main(int argc, char **argv) { /* Open a connection to the UNIX domain socket or fail */ addr.sun_family = AF_UNIX; - if (argc > 1) { - strcpy(addr.sun_path, argv[1]); - } else { - strcpy(addr.sun_path, DEFAULT_SOCK_PATH); - } + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", + argc > 1 ? argv[1] : DEFAULT_SOCK_PATH); sock = socket(PF_UNIX, SOCK_STREAM, 0); DEBUG("created socket"); @@ -125,24 +123,29 @@ main(int argc, char **argv) { /* send the prelim message and the credentials together using sendmsg() */ { struct msghdr m; - struct { - struct cmsghdr cm; - struct ucred ouruser; + /* + * Ancillary data buffer, wrapped in a union in order to ensure it is + * suitably aligned. + */ + union { + char buf[CMSG_SPACE(sizeof(struct ucred))]; + struct cmsghdr cm; } cmsg; + struct ucred *const ouruser = (void *)CMSG_DATA(&cmsg.cm); struct iovec iov = { buf, buf_len }; /* Make sure that even padding fields get initialized.*/ memset(&cmsg, 0, sizeof(cmsg)); memset(&m, 0, sizeof(m)); - /* set up the basic message */ - cmsg.cm.cmsg_len = sizeof(struct cmsghdr) + sizeof(struct ucred); + /* set up the message header */ + cmsg.cm.cmsg_len = sizeof(cmsg); cmsg.cm.cmsg_level = SOL_SOCKET; cmsg.cm.cmsg_type = SCM_CREDENTIALS; - cmsg.ouruser.uid = getuid(); - cmsg.ouruser.gid = getgid(); - cmsg.ouruser.pid = getpid(); + ouruser->uid = getuid(); + ouruser->gid = getgid(); + ouruser->pid = getpid(); m.msg_iov = &iov; m.msg_iovlen = 1; @@ -165,6 +168,7 @@ main(int argc, char **argv) { while(1) { /* read from stdin and the socket */ + FD_ZERO(&read_set); FD_SET(sock, &read_set); FD_SET(STDIN_FILENO, &read_set); diff --git a/ci/build.bat b/ci/build.bat new file mode 100644 index 0000000..a0a20a2 --- /dev/null +++ b/ci/build.bat @@ -0,0 +1,97 @@ +echo "Build type %BUILD%" +@echo on +@rem dir /b /s "C:\Program Files (x86)" | findstr /i /e "\vcvars64.bat" +@rem dir /b /s "C:\Program Files" | findstr /i /e "\vcvars64.bat" +set p=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build +if exist "%p%" set "VCVARSPATH=%p%" +set p=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary/Build +if exist "%p%" set "VCVARSPATH=%p%" +goto %BUILD% +echo "Error: unknown build type %BUILD%" +goto eof + +:MSVCDYNAMIC64 +call "%VCVARSPATH%\vcvars64.bat" +call ci/perl.bat MSVC142 +if %errorlevel% neq 0 exit /b %errorlevel% +set PATH=c:\perl-msvc\bin;%PATH% +cd win32 +perl Configure --config=release --enable-blumenthal-aes --with-sdk --with-ipv6 --with-winextdll --linktype=dynamic --with-ssl --with-sslincdir=C:\OpenSSL-Win64\include --with-ssllibdir=C:\OpenSSL-Win64\lib\vc +if %errorlevel% neq 0 exit /b %errorlevel% +nmake /nologo +if %errorlevel% neq 0 exit /b %errorlevel% +nmake /nologo perl +if %errorlevel% neq 0 exit /b %errorlevel% +nmake /nologo perl_test +if %errorlevel% neq 0 exit /b %errorlevel% +cd .. +goto eof + +:MSVCSTATIC64 +call "%VCVARSPATH%\vcvars64.bat" +call ci/perl.bat MSVC142 +if %errorlevel% neq 0 exit /b %errorlevel% +set PATH=c:\perl-msvc\bin;%PATH% +cd win32 +perl Configure --config=release --enable-blumenthal-aes --with-sdk --with-ipv6 --with-winextdll --linktype=static --with-ssl --with-sslincdir=C:\OpenSSL-Win64\include --with-ssllibdir=C:\OpenSSL-Win64\lib\vc +if %errorlevel% neq 0 exit /b %errorlevel% +nmake /nologo +if %errorlevel% neq 0 exit /b %errorlevel% +cd .. +goto eof + +:INSTALLER +call "%VCVARSPATH%\vcvars64.bat" +call ci/perl.bat MSVC142 +if %errorlevel% neq 0 exit /b %errorlevel% +set PATH=c:\perl-msvc\bin;%PATH% +set OPENSSLDIR=C:\OpenSSL-Win64 +set PATH=%PATH%;C:\cygwin64\bin +perl win32\dist\build-binary.pl +if %errorlevel% neq 0 goto installer_build_error +mkdir installer +copy c:\usr\*.exe installer +goto eof + +:installer_build_error +set e=%errorlevel% +type win32\make.out +exit /b %e% +goto eof + +:MinGW32 +rem MinGW is not present in the Visual Studio 2017 image. See also +rem https://www.appveyor.com/docs/windows-images-software/. +if exist C:\mingw goto MinGW32-get +mkdir C:\mingw +curl --no-alpn -L "https://osdn.net/dl/mingw/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip" -o C:\mingw\mingw-get.zip +unzip C:\mingw\mingw-get.zip -d C:\mingw +:MinGW32-get +C:\mingw\bin\mingw-get install mingw32-binutils-bin mingw32-gcc-bin mingw32-gcc-dev mingw32-w32api-dev msys-autoconf-bin msys-automake-bin msys-bash-bin msys-core-bin msys-coreutils-bin msys-file-bin msys-gawk-bin msys-grep-bin msys-libncurses-dev msys-libopenssl-dev msys-m4-bin msys-make-bin msys-openssl-bin msys-perl-bin msys-sed-bin msys-tar-bin +set MSYSTEM=MINGW32 +C:\mingw\msys\1.0\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:MSYS2 +set MSYSTEM=MSYS +C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:MinGW64 +set MSYSTEM=MINGW64 +C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:Cygwin32 +c:\cygwin\setup-x86.exe --quiet-mode --no-shortcuts --only-site --site "%CYG_MIRROR%" --packages openssl-devel > NUL +c:\cygwin\setup-x86.exe --quiet-mode --no-shortcuts --only-site --site "%CYG_MIRROR%" --packages python38-devel > NUL +c:\cygwin\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:Cygwin64 +c:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --only-site --site "%CYG_MIRROR%" --packages openssl-devel > NUL +c:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --only-site --site "%CYG_MIRROR%" --packages python38-devel > NUL +c:\cygwin64\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:eof diff --git a/ci/build.sh b/ci/build.sh new file mode 100644 index 0000000..f7a3471 --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +scriptdir="$(dirname "$0")" +export NOAUTODEPS=1 +export SNMP_VERBOSE=1 +case "$(uname -a)" in + MSYS*|MINGW*) + pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada + pacman --noconfirm --remove mingw-w64-x86_64-gcc-fortran + pacman --noconfirm --remove mingw-w64-x86_64-gcc-libgfortran + pacman --noconfirm --remove mingw-w64-x86_64-gcc-objc + pacman --noconfirm --sync --refresh + pacman --noconfirm --sync --needed diffutils + pacman --noconfirm --sync --needed make + pacman --noconfirm --sync --needed perl-ExtUtils-MakeMaker + pacman --noconfirm --sync --needed perl-Test-Harness + ;; +esac +case "$(uname -a)" in + MSYS*x86_64*) + pacman --noconfirm --sync --needed openssl-devel + pacman --noconfirm --sync --needed pkg-config + ;; + MINGW64*) + pacman --noconfirm --sync --needed mingw-w64-x86_64-gcc + pacman --noconfirm --sync --needed mingw-w64-x86_64-libmariadbclient + pacman --noconfirm --sync --needed mingw-w64-x86_64-openssl + pacman --noconfirm --sync --needed mingw-w64-x86_64-pkg-config + export PATH="/mingw64/bin:$PATH" + ;; +esac +echo "compiler path: $(type -p "${CC:-gcc}")" +"${scriptdir}"/net-snmp-configure V5-9-patches || exit $? +case "$MODE" in + mini*) + # Net-SNMP uses static dependencies, the Makefile.depend files have + # been generated for MODE=regular, net-snmp-features.h includes + # in minimalist mode and that file is + # generated dynamically and is not in Makefile.depend. Hence disable + # parallel compilation for minimalist mode. + nproc=1;; + *) + if type nproc >/dev/null 2>&1; then + nproc=$(nproc) + else + nproc=1 + fi;; +esac +make -s -j${nproc} || exit $? +case "$MODE" in + disable-set|mini*|read-only) + exit 0;; +esac diff --git a/ci/install.sh b/ci/install.sh new file mode 100644 index 0000000..575b7be --- /dev/null +++ b/ci/install.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +scriptdir="$(cd "$(dirname "$0")" && pwd)" + +case "$(uname)" in + Linux) + packages=" + libatm1-dev + libkrb5-dev + libmariadb-client-lgpl-dev + libmariadbclient-dev + libmysqlclient-dev + libncurses-dev + libncurses5-dev + libnl-route-3-dev + libpcre3-dev + libperl-dev + libsensors-dev + libsensors4-dev + libssh2-1-dev + libssl-dev + make + pkg-config + python3-dev + setpriv + " + apt-get update + for p in ${packages}; do + apt-get install -qq -o=Dpkg::Use-Pty=0 -y "$p" + done + true + ;; + Darwin) + # Upgrade openssl such that Net-SNMP can be built with Blumenthal + # AES support. Disabled because this upgrade takes long and even + # sometimes fails. + if false; then + brew upgrade openssl + fi + ;; + FreeBSD) + pkg install -y bash + pkg install -y gawk + pkg install -y krb5 krb5-appl krb5-devel + pkg install -y libssh2 + #pkg install -y openssl111 + pkg install -y perl5 perl5-devel p5-ExtUtils-MakeMaker + #pkg install -y pkgconf + pkg install -y py27-setuptools + if [ ! -e /usr/bin/perl ]; then + ln -s /usr/local/bin/perl /usr/bin/perl + fi + ;; +esac + +case "$MODE" in + wolfssl) + if [ -n "$SUDO_UID" ] && [ -n "$SUDO_GID" ]; then + if type setpriv >/dev/null 2>&1; then + setpriv --reuid="$SUDO_UID" --regid="$SUDO_GID" --init-groups \ + --inh-caps=-CHOWN,-SETUID,-SETGID \ + "${scriptdir}/wolfssl.sh" + elif [ -n "${SUDO_USER}" ]; then + sudo -u "${SUDO_USER}" "${scriptdir}/wolfssl.sh" + else + "${scriptdir}/wolfssl.sh" + fi + else + "${scriptdir}/wolfssl.sh" + fi + ;; +esac diff --git a/ci/net-snmp-configure b/ci/net-snmp-configure new file mode 100644 index 0000000..6d843cc --- /dev/null +++ b/ci/net-snmp-configure @@ -0,0 +1,396 @@ +#!/usr/bin/env bash + +ssl_include_path() { + case "$(uname)" in + MINGW32*) + echo /mingw32/include/openssl;; + MINGW64*) + echo /mingw64/include/openssl;; + *) + echo "${with_openssl:-/usr}/include/openssl" + ;; + esac +} + +rpm_version() { + if type -p rpm >/dev/null 2>&1; then + rpm -q --qf '%{version}\n' "$1" 2>/dev/null | grep -v 'not installed' + fi +} + +dpkg_version() { + if type -p dpkg-query >/dev/null 2>&1; then + dpkg-query --show -f '${Version}\n' "$1" 2>/dev/null | grep -v '^$' + fi +} + +pacman_version() { + if type -p pacman >/dev/null 2>&1; then + pacman -Q "$1" 2>/dev/null | sed -n 's/^[^[:blank:]]*[[:blank:]]*//p' + fi +} + +apk_version() { + if type -p apk >/dev/null 2>&1; then + apk info -d "$1" | sed -n "s/^$1-\(.*\)-r[0-9]* description:/\1/p" + fi +} + +freebsd_pkg_version() { + local pkg ver + + for pkg in "$@"; do + ver=$(pkg info "$pkg" 2>/dev/null | + sed -n 's/^Version[[:blank:]]*:[[:blank:]]*//p') && + [ -n "$ver" ] && echo "$ver" && return + done + return 1 +} + +# Given the name of a compiler executable ($1), derive the compiler type (gcc, +# clang, xlc, ...). +compiler_type() { + "$1" -v 2>&1 | + sed -n 's/^gcc version .*/gcc/p;s/^clang version .*/clang/p;s/.*xlc.*IBM.*xlc.*/xlc/p' +} + +scriptdir=$(cd "$(dirname "$0")" && pwd) +branch_name="$1" +shift + +is_5_7_or_above="false" +is_5_8_or_above="false" +if [ "${branch_name#master}" != "${branch_name}" ]; then + is_5_8_or_above="true" + is_5_7_or_above="true" +elif [ "${branch_name#V5-7-}" != "${branch_name}" ]; then + is_5_7_or_above="true" +fi + +libatmver="$(rpm_version linux-atm-devel; + dpkg_version libatm1-dev)" +echo "libatmver=$libatmver" + +libmysqlver="$(rpm_version libmariadb-devel; + for p in libmariadbclient-dev libmariadb-client-lgpl-dev; do + dpkg_version "$p"; + done; + pacman_version mingw-w64-x86_64-libmariadbclient)" +echo "libmysqlver=$libmysqlver" + +libsensorsver="$(rpm_version libsensors4-devel; + dpkg_version libsensors4-dev)" +echo "libsensorsver=$libsensorsver" + +if echo "$*" | grep -q wolfssl; then + have_ssl=true +elif ! echo "$*" | grep -Eq 'with-openssl=(no|internal)|without-openssl'; then + have_ssl=true +fi +echo "have_ssl=$have_ssl" + +case "$(uname)" in + FreeBSD*) + libssh2ver="$(freebsd_pkg_version libssh2 2>/dev/null)";; + Linux*) + libssh2ver="$(for p in openssh-devel libssh2-devel libssh-devel; do + rpm_version "$p"; + done | + head -n1; + for p in libopenssh2 libssh2-1-dev libssh-dev; do + dpkg_version "$p"; + done; + pacman_version mingw-w64-x86_64-libssh2)" + ;; +esac +echo "libssh2ver=$libssh2ver" + +case "$(uname)" in + FreeBSD*) + perldevver="$(freebsd_pkg_version perl5 2>/dev/null)";; + Linux*) + perldevver="$(rpm_version perl; + dpkg_version libperl-dev; + pacman_version mingw-w64-x86_64-perl)" + ;; +esac +echo "perldevver=$perldevver" +# Set the perlcc variable. +eval "perl$(perl -V:cc)" +perlcc=$(compiler_type "$perlcc") +echo "perlcc=$perlcc" + +options=() +options+=(--enable-developer) +options+=(--enable-ipv6) +options+=("--prefix=/usr/local/net-snmp-${branch_name}") +options+=("--with-cflags=$CFLAGS") +options+=(--with-defaults) +transports=() +# Mib names can be found as follows: +# (cd agent/mibgroup && +# git grep -lE 'void[[:blank:]]*init_.*\(void\)|config_require\(' | +# sed -n 's/\.h$//p') +mibs=() +mibs+=(agent/extend) +case "$MODE" in + read-only) + ;; + *) + mibs+=(examples/data_set) + mibs+=(examples/delayed_instance) + mibs+=(examples/example) + mibs+=(examples/notification) + mibs+=(examples/scalar_int) + mibs+=(examples/ucdDemoPublic) + mibs+=(examples/watched) + mibs+=(smux) + ;; +esac + +case "$(uname)" in + Linux*) + options+=(--enable-new-features) + case "$MODE" in + mini*|read-only) + ;; + *) + $is_5_7_or_above && mibs+=(deliver/deliverByNotify) + mibs+=(disman/event) + mibs+=(disman/expression) + mibs+=(disman/mteEventNotificationTable) + mibs+=(disman/mteEventTable) + mibs+=(disman/mteObjectsTable) + mibs+=(disman/mteTriggerBooleanTable) + mibs+=(disman/mteTriggerDeltaTable) + mibs+=(disman/mteTriggerExistenceTable) + mibs+=(disman/mteTriggerTable) + mibs+=(disman/mteTriggerThresholdTable) + mibs+=(disman/nslookup-mib) + mibs+=(disman/ping-mib) + mibs+=(disman/schedule) + mibs+=(disman/traceroute-mib) + mibs+=(etherlike-mib) + mibs+=(examples/netSnmpHostsTable) + mibs+=(hardware/cpu) + mibs+=(hardware/fsys) + mibs+=(hardware/memory) + mibs+=(host) + mibs+=(ip-forward-mib) + mibs+=(ip-mib/inetNetToMediaTable) + mibs+=(ip-mib/ipDefaultRouterTable) + mibs+=(ip-mib/ipv4InterfaceTable) + mibs+=(ip-mib/ipv6InterfaceTable) + mibs+=(ip-mib/ipv6ScopeZoneIndexTable) + mibs+=(mibII/mta_sendmail) + mibs+=(misc/ipfwacc) + mibs+=(sctp-mib) + mibs+=(snmp-notification-mib) + mibs+=(tcp-mib) + mibs+=(testhandler) + mibs+=(tunnel) + mibs+=(ucd-snmp/diskio) + if [ -n "$libsensorsver" ]; then + mibs+=(hardware/sensors) + mibs+=(ucd-snmp/lmsensorsMib) + fi + mibs+=(ucd-snmp/extensible) + mibs+=(udp-mib) + mibs+=(rmon-mib) + ;; + esac + if [ -n "$libmysqlver" ]; then + options+=(--with-mysql) + fi + if [ -n "$perldevver" ] && [ "$perlcc" = "$(compiler_type "${CC:-cc}")" ]; + then + options+=(--with-perl-modules) + else + options+=(--disable-embedded-perl --without-perl-modules) + fi + if [ -n "$libatmver" ]; then + transports+=(AAL5PVC) + fi + if [ -e /usr/include/netipx/ipx.h ]; then + transports+=(IPX) + fi + transports+=(STD) + $is_5_8_or_above && transports+=(UDPshared) + options+=("--with-default-snmp-version=2") + options+=("--with-systemd") + # Disabled modules because troublesome: Rmon ipfwchains/ipfwchains ucd-snmp/lmSensors + ;; + darwin*|Darwin*) + case "$MODE" in + mini*|read-only) + ;; + *) + mibs+=(disman/nslookup-mib) + mibs+=(host) + mibs+=(if-mib) + mibs+=(mibII/mta_sendmail) + mibs+=(misc/ipfwacc) + mibs+=(snmp-notification-mib) + mibs+=(tcp-mib) + mibs+=(ucd-snmp/diskio) + mibs+=(ucd-snmp/extensible) + mibs+=(udp-mib) + mibs+=(Rmon) + ;; + esac + options+=("--with-openssl=$(brew --prefix openssl)") + ;; + FreeBSD*) + case "$MODE" in + mini*|read-only) + ;; + *) + mibs+=(disman/nslookup-mib) + mibs+=(host) + mibs+=(if-mib) + mibs+=(mibII/mta_sendmail) + mibs+=(misc/ipfwacc) + mibs+=(sctp-mib) + mibs+=(snmp-notification-mib) + mibs+=(tcp-mib) + mibs+=(ucd-snmp/diskio) + mibs+=(ucd-snmp/extensible) + mibs+=(udp-mib) + mibs+=(Rmon) + ;; + esac + options+=(--disable-embedded-perl --without-perl-modules) + ;; + CYGWIN*) + export ENV_SEPARATOR=":" + mibs+=(ucd-snmp/extensible) + mibs+=(winExtDLL) + options+=(--disable-embedded-perl --without-perl-modules) + ;; + MINGW*) + options+=(--disable-embedded-perl) + mibs+=(host) + mibs+=(snmp-notification-mib) + mibs+=(ucd-snmp/dlmod) + mibs+=(ucd-snmp/extensible) + mibs+=(winExtDLL) + options+=(--without-perl-modules) + ;; + MSYS*) + options+=(--disable-embedded-perl) + mibs+=(host) + mibs+=(snmp-notification-mib) + mibs+=(ucd-snmp/dlmod) + mibs+=(ucd-snmp/extensible) + mibs+=(winExtDLL) + options+=(--without-perl-modules) + # The config.guess script in the Net-SNMP source tree is too old to + # recognize the MSYS2 environment. Hence the explicit --build=... option. + # See also + # http://git.savannah.gnu.org/cgit/automake.git/tree/lib/config.guess. + options+=("--build=x86_64-pc-mingw32") + ;; + *) + echo "Unknown OS $(uname)." + ;; +esac + +with_openssl="" +case "$MODE" in + wolfssl) + with_openssl=wolfssl + wolfssl_dir=$(dirname "${scriptdir}")/wolfssl-inst + options+=(--with-wolfssl=${wolfssl_dir}) + ssl_include_path=${wolfssl_dir}/include/wolfssl/openssl + ;; + *) + with_openssl="" + for o in "${options[@]}"; do + if [ "${o#--with-openssl=}" != "$o" ]; then + with_openssl="${o#--with-openssl=}" + fi + done + ssl_include_path=$(ssl_include_path) + ;; +esac +echo "ssl_include_path=${ssl_include_path}" +if [ -z "$have_ssl" ]; then + options+=("--with-openssl=internal") + with_openssl="internal" +else + if grep -rq 'DTLS_method(void)\|define DTLS_method' "${ssl_include_path}" 2>/dev/null; then + transports+=(DTLSUDP TLSTCP) + else + echo "DTLS_method not found:" + grep -r DTLS_method "${ssl_include_path}" + fi + if [ "$MODE" != "read-only" ]; then + # these MIB modules do not support read-only + if [ -e "${ssl_include_path}/dh.h" ]; then + mibs+=(snmp-usm-dh-objects-mib) + fi + if [ -e "${ssl_include_path}/ssl.h" ]; then + mibs+=(tlstm-mib) + fi + mibs+=(tsm-mib) + fi +fi +if [ "$with_openssl" != "internal" ] && $is_5_8_or_above && + [ -e "${ssl_include_path}/aes.h" ] && + [ -e "${ssl_include_path}/evp.h" ] && + grep -qw EVP_aes_256_cfb "${ssl_include_path}/evp.h"; then + options+=(--enable-blumenthal-aes) +fi +security_modules=(usm tsm) +if [ -e /usr/include/krb5.h ]; then + security_modules+=(ksm) +fi +case "$(uname)" in + MSYS*|MINGW*) + # Do not enable Python support on MinGW32 nor for the MSYS build + # environment because the Python interpreter has been built on these + # environments with Visual C++. That compiler is incompatible with gcc. + ;; + Darwin*) + case "$(uname -r)" in + 11.*|12.*) + if python3 -c 'import setuptools' 1>/dev/null 2>&1; then + options+=(--with-python-modules) + fi + ;; + *) + ;; + esac + ;; + *) + # Do not enable Python support for Cirrus CI because on Cirrus linking + # with Python fails as follows (this is probably a bug in Net-SNMP): + # /usr/bin/ld: /tmp/cirrus-ci-build/snmplib/.libs/libnetsnmp.a(snmp_client.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC + if python3 -c 'import setuptools' 1>/dev/null 2>&1 && + [ -z "$CIRRUS_CI" ]; then + options+=(--with-python-modules) + fi + esac + +case "$MODE" in + disable-set) + options+=(--disable-set-support);; + mini) + options+=(--enable-mini-agent);; + minimalist) + options+=(--enable-minimalist);; + read-only) + options+=(--enable-read-only);; + regular|wolfssl|"") + ;; + *) + echo "Error: unknown build type $MODE" + exit 1;; +esac + +[ "${libssh2ver#2}" != "${libssh2ver}" ] && transports+=(SSH) +set -x +./configure "${options[@]}" --with-transports="${transports[*]}" \ + --with-security-modules="${security_modules[*]}" \ + --with-mib-modules="${mibs[*]}" \ + CFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" "$@" diff --git a/ci/net-snmp-run-perl-tests b/ci/net-snmp-run-perl-tests new file mode 100644 index 0000000..6fd4686 --- /dev/null +++ b/ci/net-snmp-run-perl-tests @@ -0,0 +1,7 @@ +#!/bin/sh + +export LD_LIBRARY_PATH="$(find . -name '*.so' | grep -v NetSNMP/agent/default_store | sed 's,^\./,'"$PWD/"',;s,/[^/]*$,,' | sort -u | tr '\n' :)" && +make perlmakefiles && +cd perl && +make && +make test diff --git a/ci/net-snmp-run-python-tests b/ci/net-snmp-run-python-tests new file mode 100644 index 0000000..e041033 --- /dev/null +++ b/ci/net-snmp-run-python-tests @@ -0,0 +1,19 @@ +#!/bin/sh + +set -x +killall snmpd +export LD_LIBRARY_PATH="$PWD/snmplib/.libs:$PWD/agent/.libs:$PWD/agent/helpers/.libs:" +export MIBDIRS=$PWD/mibs +export SNMP_PERSISTENT_DIR=/tmp/net-snmp +export SNMP_SNMPD_PORT=1161 +export PYTHONPATH=$PWD/python/netsnmp +mkdir -p "$SNMP_PERSISTENT_DIR" || exit $? +agent/snmpd -I-smux -r -f -Lo -c python/netsnmp/tests/snmpd.conf localhost:${SNMP_SNMPD_PORT} & +pid=$! +PYTHONPROG=$(sed -n 's/^S\["PYTHONPROG"\]="\(.*\)"$/\1/p' config.status) || + exit $? +[ -n "$PYTHONPROG" ] || exit $? +cd python || exit $? +$PYTHONPROG setup.py --basedir="$PWD/.." test || exit $? +kill $pid +wait diff --git a/ci/net-snmp-run-tests b/ci/net-snmp-run-tests new file mode 100644 index 0000000..99831fc --- /dev/null +++ b/ci/net-snmp-run-tests @@ -0,0 +1,45 @@ +#!/bin/sh + +scriptdir="$(dirname "$0")" + +killall snmpd snmptrapd >/dev/null 2>&1 + +export SNMP_VERBOSE=1 && +export NOAUTODEPS=1 && +export SNMP_SAVE_TMPDIR=1 && +make -s && +( + cd testing && + if [ -e RUNFULLTESTS ] && + perl -e 'require TAP::Harness;' >/dev/null 2>&1; then + case "$(uname)" in + Darwin) + for g in default snmpv3 unit-tests; do + echo "==== Test group $g ====" + ./RUNFULLTESTS -g $g || exit $? + echo "==== End of test group $g ====" + done + ;; + FreeBSD) + for g in default snmpv3 transports unit-tests; do + echo "==== Test group $g ====" + ./RUNFULLTESTS -g $g || exit $? + echo "==== End of test group $g ====" + done + ;; + *) + ./RUNFULLTESTS -g all -e dtls -e tls + ;; + esac + else + make -s test + fi && + cd .. && + if grep -q "PERLTARGS='perlmodules'" config.log; then + "$scriptdir/net-snmp-run-perl-tests" + fi +) && +# Disable the Python tests because these fail sporadically. +if false && grep -q with-python-modules config.log; then + "$scriptdir/net-snmp-run-python-tests" +fi diff --git a/ci/openssl.bat b/ci/openssl.bat new file mode 100644 index 0000000..7d1a286 --- /dev/null +++ b/ci/openssl.bat @@ -0,0 +1,8 @@ +REM Download and install OpenSSL +rmdir /s /q C:\OpenSSL-Win32 +rmdir /s /q C:\OpenSSL-v11-Win32 +rmdir /s /q C:\OpenSSL-Win64 +rmdir /s /q C:\OpenSSL-v11-Win64 +curl https://slproweb.com/download/Win64OpenSSL-3_1_1.exe -o openssl.exe +.\openssl.exe /suppressmsgboxes /silent /norestart /nocloseapplications /log=openssl-installation-log.txt /dir=C:\OpenSSL-Win64 +rem type openssl-installation-log.txt diff --git a/ci/perl.bat b/ci/perl.bat new file mode 100644 index 0000000..285b594 --- /dev/null +++ b/ci/perl.bat @@ -0,0 +1,50 @@ +REM Download and install Perl +setlocal +echo on +if "%1" == "" goto help +set PERL_VERSION=5.37.0 +set INST_DRV=c: +set INST_TOP=c:\perl-msvc +rd /q /s %INST_TOP% +curl https://www.cpan.org/src/5.0/perl-%PERL_VERSION%.tar.gz -o perl-%PERL_VERSION%.tar.gz +if %errorlevel% neq 0 goto build_error +tar xzf perl-%PERL_VERSION%.tar.gz +if %errorlevel% neq 0 goto build_error +cd perl-%PERL_VERSION%\win32 +if %errorlevel% neq 0 goto build_error +(echo CCTYPE=%1 && echo INST_DRV=%INST_DRV% && echo INST_TOP=%INST_TOP% && type Makefile | findstr /r /v "^CCTYPE" | findstr /r /v "^INST_DRV" | findstr /r /v "^INST_TOP") > Makefile2 +if %errorlevel% neq 0 goto build_error +del Makefile +if %errorlevel% neq 0 goto build_error +ren Makefile2 Makefile +if %errorlevel% neq 0 goto build_error +findstr /r "^CCTYPE" Makefile +findstr /r "^INST_DRV" Makefile +findstr /r "^INST_TOP" Makefile +@rem For mt.exe +@rem dir /b /s "C:\Program Files (x86)" | findstr /i /e "\mt.exe" +set "PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" +nmake "BUILDOPTEXTRA=/wd4244 /wd4267" +if %errorlevel% neq 0 goto build_error +nmake install +if %errorlevel% neq 0 goto build_error +set PATH=%INST_TOP%\bin;%PATH% +where perl +perl -v +cd ..\.. +set INST_DRV= +set INST_TOP= +goto done + +:build_error +endlocal +set e=%errorlevel% +exit /b %e% + +:help +endlocal +echo "Compiler type argument has not been specified" +exit /b 1 + +:done +endlocal diff --git a/ci/test.bat b/ci/test.bat new file mode 100644 index 0000000..a9e43b4 --- /dev/null +++ b/ci/test.bat @@ -0,0 +1,35 @@ +@echo on +goto %BUILD% +echo "Error: unknown build type %BUILD%" +goto eof + +:MSVCDYNAMIC64 +goto eof + +:MSVCSTATIC64 +goto eof + +:INSTALLER +goto eof + +:MinGW32 +goto eof + +:MSYS2 +goto eof + +:MinGW64 +rem C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/net-snmp-run-tests' +goto eof + +:Cygwin32 +goto eof +c:\cygwin\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/net-snmp-run-tests' +goto eof + +:Cygwin64 +goto eof +c:\cygwin64\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/net-snmp-run-tests' +goto eof + +:eof diff --git a/ci/test.sh b/ci/test.sh new file mode 100644 index 0000000..a340434 --- /dev/null +++ b/ci/test.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# Instead of relying on the hosts file provided by the CI host, replace it. +# See also +# https://blog.justincarmony.com/2011/07/27/mac-os-x-lion-etc-hosts-bugs-and-dns-resolution/. +sudo sh -c 'printf "127.0.0.1 ipv4-loopback\n::1 localhost ipv6-localhost ipv6-loopback\n" >/etc/hosts' + +head -n 999 /etc/hosts + +scriptdir="$(dirname "$0")" + +# To do: fix the tests for the disable-set, mini and read-only modes and delete +# the case statement below. +case "$MODE" in + "") + ;; + regular) + ;; + *) + exit 0 + ;; +esac + +case $(uname) in + MinGW) + ;; + *) + "${scriptdir}"/net-snmp-run-tests + ;; +esac diff --git a/ci/wolfssl.sh b/ci/wolfssl.sh new file mode 100644 index 0000000..f4498f9 --- /dev/null +++ b/ci/wolfssl.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +if [ ! -e wolfssl ]; then + git clone --depth=1 https://github.com/wolfSSL/wolfssl.git +fi +cd wolfssl +git clean -f +./autogen.sh +options=" + --enable-all + --enable-openssh + --enable-opensslextra + --prefix=$PWD/../wolfssl-inst +" +./configure ${options} +make -j"$(nproc)" +make install diff --git a/config.guess b/config.guess index 2852378..1972fda 100644 --- a/config.guess +++ b/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2010-08-21' +timestamp='2021-01-25' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,35 +15,31 @@ timestamp='2010-08-21' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to . -me=`echo "$0" | sed -e 's,.*/,,'` + +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -92,8 +84,6 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' HUP INT TERM - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -104,48 +94,92 @@ trap 'exit 1' HUP INT TERM # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown +UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown +UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown +UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + EOF + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -154,22 +188,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)) + case "$UNAME_MACHINE_ARCH" in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') + endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -181,7 +225,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") ;; esac # The OS release @@ -189,105 +240,125 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; + echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -296,12 +367,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -309,7 +380,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then + if test "$( (/bin/universe) 2>/dev/null)" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd @@ -322,69 +393,69 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in + case $(/usr/bin/uname -p) in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + set_cc_for_build + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case "$(/usr/bin/arch -k)" in Series*|S4*) - UNAME_RELEASE=`uname -v` + UNAME_RELEASE=$(uname -v) ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in + UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "$(/bin/arch)" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -395,44 +466,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -441,23 +512,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && + SYSTEM_NAME=$("$dummy" "$dummyarg") && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -481,21 +552,21 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=$(/usr/bin/uname -p) + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -510,26 +581,26 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if test -x /usr/bin/oslevel ; then + IBM_REV=$(/usr/bin/oslevel) else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -540,7 +611,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") then echo "$SYSTEM_NAME" else @@ -553,27 +624,28 @@ EOF fi exit ;; *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if test -x /usr/bin/lslpp ; then + IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -588,67 +660,67 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + if test -x /usr/bin/getconf; then + sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) + sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if test "$HP_ARCH" = hppa2.0w then - eval $set_cc_for_build + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -659,23 +731,23 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -700,11 +772,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -713,17 +785,17 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -731,135 +803,140 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=$(uname -p) + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + fi exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=$(/usr/bin/uname -p) + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -867,118 +944,184 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI="$LIBC"x32 + fi + fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -987,56 +1130,56 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case $(/bin/uname -X | grep "^Machine") in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1044,20 +1187,20 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1066,9 +1209,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1086,41 +1229,41 @@ EOF 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1130,16 +1273,16 @@ EOF exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + UNAME_MACHINE=$( (uname -p) 2>/dev/null) + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1151,25 +1294,25 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + if test -d /usr/nec; then + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1182,63 +1325,101 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + arm64:Darwin:*:*) + echo aarch64-apple-darwin"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + UNAME_PROCESSOR=$(uname -p) case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=$(uname -p) + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1247,18 +1428,19 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + # shellcheck disable=SC2154 + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1279,14 +1461,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + UNAME_MACHINE=$( (uname -p) 2>/dev/null) + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1295,24 +1477,39 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + *:AROS:*:*) + echo "$UNAME_MACHINE"-unknown-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < "$dummy.c" < -# include +#include +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif #endif main () { @@ -1325,28 +1522,20 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1380,39 +1569,54 @@ main () #endif #if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); + struct utsname un; + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif #endif #if defined (alliant) && defined (i860) @@ -1423,82 +1627,73 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +echo "$0: unable to guess system type" >&2 -# Convex versions that predate uname can use getsysinfo(1) +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 < in order to provide the needed -information to handle your system. +year=$(echo $timestamp | sed 's,-.*,,') +# shellcheck disable=SC2003 +if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then + cat >&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` +uname -m = $( (uname -m) 2>/dev/null || echo unknown) +uname -r = $( (uname -r) 2>/dev/null || echo unknown) +uname -s = $( (uname -s) 2>/dev/null || echo unknown) +uname -v = $( (uname -v) 2>/dev/null || echo unknown) -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` +/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) +/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` +hostinfo = $( (hostinfo) 2>/dev/null) +/bin/universe = $( (/bin/universe) 2>/dev/null) +/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) +/bin/arch = $( (/bin/arch) 2>/dev/null) +/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) +/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF +fi exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/config.sub b/config.sub index 320e303..63c1f1c 100644 --- a/config.sub +++ b/config.sub @@ -1,38 +1,31 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2010-09-11' +timestamp='2021-01-08' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -40,7 +33,7 @@ timestamp='2010-09-11' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -57,15 +50,14 @@ timestamp='2010-09-11' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -75,9 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -99,12 +89,12 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -120,1151 +110,1169 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac ;; - -clix*) - basic_machine=clipper-intergraph + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - -lynx*) - os=-lynxos + op50n) + cpu=hppa1.1 + vendor=oki ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + op60c) + cpu=hppa1.1 + vendor=oki ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + ibm*) + cpu=i370 + vendor=ibm ;; - -psos*) - os=-psos + orion105) + cpu=clipper + vendor=highlevel ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + basic_os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + basic_os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx + cpu=m68k + vendor=motorola ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=solaris2 ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) + cpu=mips + vendor=sgi + case $basic_os in + irix*) ;; *) - os=-irix4 + basic_os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + cpu=m68000 + vendor=convergent ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) ;; - -ns2*) - os=-nextstep2 + ns2*) + basic_os=nextstep2 ;; *) - os=-nextstep3 + basic_os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + basic_os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + cpu=m68k + vendor=tti ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + pc532) + cpu=ns32k + vendor=pc532 ;; pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + cpu=pn + vendor=gould ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff + cpu=i386 + vendor=ibm ;; rm[46]00) - basic_machine=mips-siemens + cpu=mips + vendor=siemens ;; rtpc | rtpc-*) - basic_machine=romp-ibm + cpu=romp + vendor=ibm ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} ;; - sb1) - basic_machine=mipsisa64sb1-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown + tower | tower-32) + cpu=m68k + vendor=ncr ;; - sde) - basic_machine=mipsisa32-sde - os=-elf + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - sei) - basic_machine=mips-sei - os=-seiux + w65) + cpu=w65 + vendor=wdc ;; - sequent) - basic_machine=i386-sequent + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf ;; - sh) - basic_machine=sh-hitachi - os=-hms + none) + cpu=none + vendor=none ;; - sh5el) - basic_machine=sh5le-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - sh64) - basic_machine=sh64-unknown + leon-*|leon[3-9]-*) + cpu=sparc + vendor=$(echo "$basic_machine" | sed 's/-.*//') ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ + | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | thumbv7* \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1272,203 +1280,213 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if test x$basic_os != x then + +# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') + ;; + os2-emx) + kernel=os2 + os=$(echo $basic_os | sed -e 's|os2-emx|emx|') + ;; + nto-qnx*) + kernel=nto + os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') + ;; + *-*) + # shellcheck disable=SC2162 + IFS="-" read kernel os <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1481,258 +1499,361 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in - score-*) - os=-elf +kernel= +case $cpu-$vendor in + score-*) + os=elf ;; - spu-*) - os=-elf + spu-*) + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + kernel=linux + os=gnu ;; arm*-semi) - os=-aout + os=aout + ;; + c4x-* | tic4x-*) + os=coff ;; - c4x-* | tic4x-*) - os=-coff + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; - mep-*) - os=-elf + mep-*) + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; - *-be) - os=-beos + pru-*) + os=elf ;; - *-haiku) - os=-haiku + *-be) + os=beos ;; *-ibm) - os=-aix + os=aix ;; - *-knuth) - os=-mmixware + *-knuth) + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; - *-next ) - os=-nextstep + *-next) + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - -sunos*) + *-sunos*) vendor=sun ;; - -cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - -beos*) + *-beos*) vendor=be ;; - -hpux*) + *-hpux*) vendor=hp ;; - -mpeix*) + *-mpeix*) vendor=hp ;; - -hiux*) + *-hiux*) vendor=hitachi ;; - -unos*) + *-unos*) vendor=crds ;; - -dgux*) + *-dgux*) vendor=dg ;; - -luna*) + *-luna*) vendor=omron ;; - -genix*) + *-genix*) vendor=ns ;; - -mvs* | -opened*) + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - -os400*) + s390-* | s390x-*) vendor=ibm ;; - -ptx*) + *-ptx*) vendor=sequent ;; - -tpf*) + *-tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - -aux*) + *-aux*) vendor=apple ;; - -hms*) + *-hms*) vendor=hitachi ;; - -mpw* | -macos*) + *-mpw* | *-macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - -vos*) + *-vos*) vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/configure b/configure index 433ba5b..80e34b5 100644 --- a/configure +++ b/configure @@ -1,14 +1,13 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for Net-SNMP 5.7.3. +# Generated by GNU Autoconf 2.71 for Net-SNMP 5.9.4.pre2. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -19,14 +18,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +37,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,13 +85,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -99,8 +93,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -112,40 +110,47 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -165,12 +170,16 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -184,30 +193,38 @@ test \$(( 1 + 1 )) = 2 || exit 1 PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -215,39 +232,51 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: net-snmp-coders@lists.sourceforge.net about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run @@ -275,6 +304,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -292,6 +322,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -306,7 +344,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -315,7 +353,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -340,18 +378,27 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -363,18 +410,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -386,9 +442,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -415,7 +471,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -459,8 +515,12 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -469,6 +529,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -482,6 +546,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -495,16 +566,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -516,28 +587,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -571,48 +622,44 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Net-SNMP' PACKAGE_TARNAME='net-snmp' -PACKAGE_VERSION='5.7.3' -PACKAGE_STRING='Net-SNMP 5.7.3' +PACKAGE_VERSION='5.9.4' +PACKAGE_STRING='Net-SNMP 5.9.4.pre2' PACKAGE_BUGREPORT='net-snmp-coders@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="agent/snmpd.c" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_config_libobj_dir=snmplib ac_subst_vars='LTLIBOBJS ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE @@ -622,13 +669,11 @@ OTHERAGENTLIBLFTS OTHERAGENTLIBLOBJS OTHERAGENTLIBOBJS AGENTLIBS -LMIBLIBS PSCMD LPSTAT_PATH LIBOBJS ALLOCA VAL_LIBS -LAGENTLIBS LNETSNMPLIBS PYTHONFEATURES PYTHONARGS @@ -645,6 +690,10 @@ PERLLDOPTS_FOR_APPS PERLLDOPTS_FOR_LIBS EMBEDPERLUNINSTALL EMBEDPERLINSTALL +LIBCURSES +HAVE_LIBCURSES +NETSNMP_BUILD_PCAP_PROG_FALSE +NETSNMP_BUILD_PCAP_PROG_TRUE MYSQL_INCLUDES MYSQL_LIBS MYSQLCONFIG @@ -659,12 +708,21 @@ NETSNMP_BUILD_TLS_PROG_FALSE NETSNMP_BUILD_TLS_PROG_TRUE NETSNMP_BUILD_SSH_PROG_FALSE NETSNMP_BUILD_SSH_PROG_TRUE +OPENSSL_LIBS +OPENSSL_CFLAGS +LIBNL3_LIBS +LIBNL3_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG NETSNMP_HAVE_AGENTX_LIBS_FALSE NETSNMP_HAVE_AGENTX_LIBS_TRUE NETSNMP_DEFAULT_MIBS ENV_SEPARATOR dllcleans default_mibs_install +LMIBLIBS +LAGENTLIBS krb5_config security_ftobj_list security_lobj_list @@ -707,6 +765,8 @@ SNMPLIB_INCLUDES TOP_INCLUDES DEVFLAGS LIBTOOL_DEPS +RC +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -737,13 +797,6 @@ DLLTOOL AS LINKCC CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC PERL_SYSTEM_INVOKES_POSIX_SHELL UNAMEPROG PYTHONPROG @@ -778,6 +831,13 @@ TRAPLIBS SNMPD INSTALL_PREFIX LIBTOOLFLAGS +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC CONFIGURE_OPTIONS target_alias host_alias @@ -798,6 +858,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -851,10 +912,6 @@ with_ldflags enable_as_needed with_libs enable_silent_libtool -with_dmalloc -enable_dmalloc -with_efence -enable_efence with_rsaref enable_rsaref with_openssl @@ -871,6 +928,8 @@ with_dnssec enable_dnssec with_rpm enable_rpm +with_pcre +enable_pcre with_install_prefix enable_agent with_agent @@ -907,12 +966,18 @@ enable_md5 with_md5 enable_internal_md5 with_internal_md5 +enable_blumenthal_aes +with_blumenthal_aes with_opaque_special_types enable_opaque_special_types enable_ipv6 with_ipv6 with_logfile enable_logfile +enable_usmUser_uses_default_auth_priv +with_usmUser_uses_default_auth_priv +enable_daemons_syslog_as_default +with_daemons_syslog_as_default with_persistent_directory enable_persistent_directory with_persistent_mask @@ -951,6 +1016,8 @@ with_kmem_usage enable_kmem_usage with_dummy_values enable_dummy_values +with_systemd +enable_systemd enable_set_support with_set_support with_sys_contact @@ -1036,6 +1103,7 @@ enable_shared enable_static with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock @@ -1048,7 +1116,15 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +LT_SYS_LIBRARY_PATH +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +LIBNL3_CFLAGS +LIBNL3_LIBS +OPENSSL_CFLAGS +OPENSSL_LIBS' # Initialize some variables set by options. @@ -1087,6 +1163,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1116,8 +1193,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1158,9 +1233,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1184,9 +1259,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1339,6 +1414,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1388,9 +1472,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1404,9 +1488,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1450,9 +1534,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1468,7 +1552,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1476,7 +1560,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1504,8 +1588,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1534,7 +1616,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1591,7 +1673,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Net-SNMP 5.7.3 to adapt to many kinds of systems. +\`configure' configures Net-SNMP 5.9.4.pre2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1631,6 +1713,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1657,7 +1740,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Net-SNMP 5.7.3:";; + short | recursive ) echo "Configuration of Net-SNMP 5.9.4.pre2:";; esac cat <<\_ACEOF @@ -1695,7 +1778,11 @@ Optional Features: --disable-privacy Don't compile in support for privacy (encryption). --disable-md5 Do not support MD5 authentication. --enable-internal-md5 Use the internal MD5 support. - --enable-ipv6 Generate IPv6 ready version. + --enable-blumenthal-aes Enable AES-192/AES-256 (Blumenthal draft) + --disable-ipv6 Disable IPv6 support. + --enable-usmUser-uses-default-auth-priv Use default auth/priv protocols; createUser + only needs auth/priv passphrases. + --enable-daemons-syslog-as-default Use syslog when no other log destination defined. --disable-snmpv1 Do not include code that implements SNMPv1. --disable-snmpv2c Do not include code that implements SNMPv2c. --enable-debugging Outputs extra debugging information at all @@ -1753,8 +1840,6 @@ Compiler Options: --with-cflags=CFLAGS use CFLAGS as compile time arguments. --with-ldflags=LDFLAGS use LDFLAGS as link time arguments to ld. --with-libs=LIBS use LIBS as link time arguments to ld. - --with-dmalloc=PATH Use dmalloc library (www.dmalloc.com) - --with-efence Look for and use libefence (malloc). --with-rsaref=PATH Look for librsaref in PATH/lib. --with-openssl=PATH Look for openssl in PATH/lib, or PATH may be "internal" to build with @@ -1766,13 +1851,15 @@ Compiler Options: --without-rpm Don't include support for the RPM package management system when building the host MIB module. + --without-pcre Don't include pcre process searching + support in the agent. --with-install-prefix=PATH Just for installing, prefix all directories with PATH. This is known not to work on some systems with shared libraries (eg, HPUX) --with-features-of=version Compile in MIB modules and other features as if this - was release "version" (default is 5.7.3). + was release "version" (default is 5.9.4.pre2). Miscellaneous: --with-defaults Use defaults for prompted values. @@ -1818,6 +1905,9 @@ Miscellaneous: This transport is available for Linux, Solaris and FreeBSD at least. This transport is compiled in by default if IPv6 support is enabled. + UDPshared Allows a UDP port to be shared with multiple transports. It + enables multiple notification destinations to share a single + source address/port. TCPIPv6 support for SNMP over UDP/IPv6. This transport is available for Linux, Solaris and FreeBSD at least. @@ -1867,6 +1957,8 @@ Configuring the agent: This is technically not compliant with the SNMP specifications, but was how the agent operated for versions < 4.0. + --with-systemd Provide systemd support. See README.systemd + for details. --with-sys-contact="who@where" Default system contact. (Default: LOGIN@DOMAINNAME) --with-sys-location="location" Default system location. @@ -1961,9 +2053,10 @@ Enterprise OIDs: (warning: this should be used with caution.) Perl: --with-perl-modules=ARGS Install the Perl modules along with the rest - of the net-snmp toolkit. If ARGS is - specified, they're passed to the - Makefile.PL script. + of the net-snmp toolkit. If ARGS is specified, + they're passed to the Makefile.PL script. Use + --with-perl-modules=verbose while debugging + the Makefile.PL files Python: --with-python-modules=ARGS Install the python bindings along with the @@ -1991,11 +2084,14 @@ Network Buffers: Mount table location. The default is to autodetect this. --with-mysql Include support for MySQL. - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -2006,6 +2102,20 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + LIBNL3_CFLAGS + C compiler flags for LIBNL3, overriding pkg-config + LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config + OPENSSL_CFLAGS + C compiler flags for OPENSSL, overriding pkg-config + OPENSSL_LIBS + linker flags for OPENSSL, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2026,9 +2136,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -2056,7 +2166,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -2064,7 +2175,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -2073,10 +2184,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Net-SNMP configure 5.7.3 -generated by GNU Autoconf 2.68 +Net-SNMP configure 5.9.4.pre2 +generated by GNU Autoconf 2.71 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2093,14 +2204,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2108,14 +2219,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2125,6 +2237,39 @@ fi } # ac_fn_c_try_compile +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -2137,7 +2282,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2145,14 +2290,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2162,184 +2308,20 @@ fi } # ac_fn_c_try_cpp -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------------------------------- ## -## Report this to net-snmp-coders@lists.sourceforge.net ## -## ---------------------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2347,17 +2329,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : + test -x conftest$ac_exeext + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2378,11 +2361,12 @@ fi ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -2390,16 +2374,9 @@ else #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2417,24 +2394,25 @@ choke me #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2446,16 +2424,17 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (ac_aggr.$3) @@ -2464,14 +2443,15 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2480,64 +2460,112 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=$ac_mid; break -else +else $as_nop as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= @@ -2545,41 +2573,45 @@ else fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_lo=$ac_mid; break -else +else $as_nop as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= @@ -2587,14 +2619,14 @@ else fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else +else $as_nop ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val @@ -2602,21 +2634,23 @@ while test "x$ac_lo" != "x$ac_hi"; do /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=$ac_mid -else +else $as_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -2626,12 +2660,12 @@ esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } #include #include int -main () +main (void) { FILE *f = fopen ("conftest.val", "w"); @@ -2659,9 +2693,10 @@ main () return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : echo >>conftest.val; read $3 &5 -$as_echo_n "checking for int$2_t... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +printf %s "checking for int$2_t... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. @@ -2696,34 +2732,38 @@ else $ac_includes_default enum { N = $2 / 2 - 1 }; int -main () +main (void) { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int -main () +main (void) { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( @@ -2731,19 +2771,20 @@ else eval "$3=\$ac_type" ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no" +then : -else +else $as_nop break fi done fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t @@ -2755,17 +2796,18 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2773,12 +2815,13 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2786,18 +2829,19 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2809,11 +2853,12 @@ $as_echo "$ac_res" >&6; } ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 -$as_echo_n "checking for uint$2_t... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +printf %s "checking for uint$2_t... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. @@ -2823,16 +2868,18 @@ else /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( @@ -2840,40 +2887,44 @@ if ac_fn_c_try_compile "$LINENO"; then : eval "$3=\$ac_type" ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no" +then : -else +else $as_nop break fi done fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { #ifndef $as_decl_name #ifdef __cplusplus @@ -2887,27 +2938,50 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_decl +} # ac_fn_check_decl +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Net-SNMP $as_me 5.7.3, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by Net-SNMP $as_me 5.9.4.pre2, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2940,8 +3014,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2976,7 +3054,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -3011,11 +3089,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -3026,8 +3106,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -3051,7 +3131,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -3059,14 +3139,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -3074,15 +3154,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -3090,8 +3170,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -3105,63 +3185,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -3171,19 +3236,437 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" +as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub ltmain.sh install-sh" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3194,12 +3677,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3208,24 +3691,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -3235,11 +3718,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3268,5033 +3752,4955 @@ ac_config_headers="$ac_config_headers include/net-snmp/net-snmp-config.h" # save the configure arguments # -cat >>confdefs.h <<_ACEOF -#define NETSNMP_CONFIGURE_OPTIONS "$ac_configure_args" -_ACEOF +printf "%s\n" "#define NETSNMP_CONFIGURE_OPTIONS \"${NETSNMP_CONFIGURE_OPTIONS-$ac_configure_args}\"" >>confdefs.h CONFIGURE_OPTIONS="\"$ac_configure_args\"" -## -## Recommended structure: -## -# information on the package -# checks for programs -# checks for libraries -# checks for header files -# checks for types -# checks for structures -# checks for compiler characteristics -# checks for library functions -# checks for system services - -# -*- autoconf -*- -######################################### -## -# Command-line processing - --with/--enable -## -######################################### - -## -# System: Compiler settings -## - - -# Check whether --with-cc was given. -if test "${with_cc+set}" = set; then : - withval=$with_cc; CC=$with_cc;export CC -fi +# +# Check whether _GNU_SOURCE etc. should be defined +# -# Check whether --with-linkcc was given. -if test "${with_linkcc+set}" = set; then : - withval=$with_linkcc; LINKCC=$with_linkcc;export LINKCC -fi -# Check whether --with-ar was given. -if test "${with_ar+set}" = set; then : - withval=$with_ar; AR=$with_ar; export AR -fi -# Check whether --with-endianness was given. -if test "${with_endianness+set}" = set; then : - withval=$with_endianness; if test $with_endianness != "big" -a $with_endianness != "little" ; then - as_fn_error $? "Endianness must be big or little, not \"$with_endianness\"." "$LINENO" 5; - fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - - - -# Check whether --with-cflags was given. -if test "${with_cflags+set}" = set; then : - withval=$with_cflags; CFLAGS=$with_cflags; export CFLAGS fi - - - -# Check whether --with-ldflags was given. -if test "${with_ldflags+set}" = set; then : - withval=$with_ldflags; LDFLAGS=$with_ldflags; export LDFLAGS +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -# Check whether --enable-as-needed was given. -if test "${enable_as_needed+set}" = set; then : - enableval=$enable_as_needed; fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - - -# Check whether --with-libs was given. -if test "${with_libs+set}" = set; then : - withval=$with_libs; LIBS=$with_libs; export LIBS fi - - -# Check whether --enable-silent-libtool was given. -if test "${enable_silent_libtool+set}" = set; then : - enableval=$enable_silent_libtool; LIBTOOLFLAGS=--silent fi - - - - -## -# System: Library settings -## - - -# Check whether --with-dmalloc was given. -if test "${with_dmalloc+set}" = set; then : - withval=$with_dmalloc; +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - # Check whether --enable-dmalloc was given. -if test "${enable_dmalloc+set}" = set; then : - enableval=$enable_dmalloc; as_fn_error $? "Invalid option. Use --with-dmalloc/--without-dmalloc instead" "$LINENO" 5 + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - -# Check whether --with-efence was given. -if test "${with_efence+set}" = set; then : - withval=$with_efence; use_efence="$withval" fi - - # Check whether --enable-efence was given. -if test "${enable_efence+set}" = set; then : - enableval=$enable_efence; as_fn_error $? "Invalid option. Use --with-efence/--without-efence instead" "$LINENO" 5 +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -tryrsaref=no - -# Check whether --with-rsaref was given. -if test "${with_rsaref+set}" = set; then : - withval=$with_rsaref; if test "x$withval" = "xyes"; then - tryrsaref=yes - elif test "x$withval" = "xno"; then - tryrsaref=no - elif test -d "$withval"; then - - if test "x$withval" != x -a -d $withval; then - if test -d $withval/lib; then - LDFLAGS="-L$withval/lib $LDFLAGS" - fi - if test -d $withval/include; then - CPPFLAGS="-I$withval/include $CPPFLAGS" - fi fi - - tryrsaref=yes - fi fi - - # Check whether --enable-rsaref was given. -if test "${enable_rsaref+set}" = set; then : - enableval=$enable_rsaref; as_fn_error $? "Invalid option. Use --with-rsaref/--without-rsaref instead" "$LINENO" 5 -fi - - -tryopenssl=defaultyes -askedopenssl=no - -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; if test "x$withval" = "xyes"; then - tryopenssl=yes - askedopenssl=yes - elif test "x$withval" = "xinternal"; then - tryopenssl=internal - askedopenssl=internal - elif test "x$withval" = "xno"; then - tryopenssl=no - elif test -d "$withval"; then - if test -d "$withval/lib/MinGW"; then - LDFLAGS="-L$withval/lib/MinGW $LDFLAGS" - CPPFLAGS="-I$withval/include $CPPFLAGS" - else - - if test "x$withval" != x -a -d $withval; then - if test -d $withval/lib; then - LDFLAGS="-L$withval/lib $LDFLAGS" - fi - if test -d $withval/include; then - CPPFLAGS="-I$withval/include $CPPFLAGS" +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue fi + ac_cv_prog_CC="cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - fi - tryopenssl=yes - askedopenssl=yes - fi +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + fi fi - - # Check whether --enable-openssl was given. -if test "${enable_openssl+set}" = set; then : - enableval=$enable_openssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -if test "x$tryopenssl" = "xdefaultyes"; then - if test "x/usr/local/ssl" != x -a -d /usr/local/ssl; then - if test -d /usr/local/ssl/lib; then - LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" - fi - if test -d /usr/local/ssl/include; then - CPPFLAGS="-I/usr/local/ssl/include $CPPFLAGS" - fi +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - tryopenssl=yes fi - -# Check whether --with-ssl was given. -if test "${with_ssl+set}" = set; then : - withval=$with_ssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 fi - -# Check whether --enable-ssl was given. -if test "${enable_ssl+set}" = set; then : - enableval=$enable_ssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -askedpkcs=no - -# Check whether --with-pkcs was given. -if test "${with_pkcs+set}" = set; then : - withval=$with_pkcs; if test "x$withval" = "xyes"; then - askedpkcs=yes - elif test "x$withval" = "xno"; then - askedpkcs=no - elif test -d "$withval"; then - - if test "x$withval" != x -a -d $withval; then - if test -d $withval/lib; then - LDFLAGS="-L$withval/lib $LDFLAGS" - fi - if test -d $withval/include; then - CPPFLAGS="-I$withval/include $CPPFLAGS" - fi + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - askedpkcs=yes - fi fi - - # Check whether --enable-pkcs was given. -if test "${enable_pkcs+set}" = set; then : - enableval=$enable_pkcs; as_fn_error $? "Invalid option. Use --with-pkcs/--without-pkcs instead" "$LINENO" 5 +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -trykrb5=defaultyes -askedkrb5=no + test -n "$ac_ct_CC" && break +done -# Check whether --with-krb5 was given. -if test "${with_krb5+set}" = set; then : - withval=$with_krb5; if test "x$withval" = "xyes"; then - trykrb5=yes - askedkrb5=yes - krb5path=undef - elif test "x$withval" = "xno"; then - trykrb5=no - krb5path=undef - elif test -d "$withval"; then - trykrb5=yes - askedkrb5=yes - krb5path=$withval - fi + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi - # Check whether --enable-krb5 was given. -if test "${enable_krb5+set}" = set; then : - enableval=$enable_krb5; as_fn_error $? "Invalid option. Use --with-krb5/--without-krb5 instead" "$LINENO" 5 fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -if test "x$trykrb5" = "xdefaultyes"; then - trykrb5=yes - krb5path=/usr/kerberos fi - - -# Check whether --with-dnssec-local-validation was given. -if test "${with_dnssec_local_validation+set}" = set; then : - withval=$with_dnssec_local_validation; want_dnssec=$withval -else - want_dnssec=no fi - -# Check whether --enable-dnssec-local-validation was given. -if test "${enable_dnssec_local_validation+set}" = set; then : - enableval=$enable_dnssec_local_validation; as_fn_error $? "Invalid option. Use --with-dnssec-local-validation/--without-dnssec-local-validation instead" "$LINENO" 5 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -# Check whether --with-dnssec was given. -if test "${with_dnssec+set}" = set; then : - withval=$with_dnssec; as_fn_error $? "Invalid option. Use --with-dnssec-local-validation/--without-dnssec-local-validation instead" "$LINENO" 5 fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Check whether --enable-dnssec was given. -if test "${enable_dnssec+set}" = set; then : - enableval=$enable_dnssec; as_fn_error $? "Invalid option. Use --with-dnssec-local-validation/--without-dnssec-local-validation instead" "$LINENO" 5 fi - - - -# Check whether --with-rpm was given. -if test "${with_rpm+set}" = set; then : - withval=$with_rpm; +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - # Check whether --enable-rpm was given. -if test "${enable_rpm+set}" = set; then : - enableval=$enable_rpm; as_fn_error $? "Invalid option. Use --with-rpm/--without-rpm instead" "$LINENO" 5 + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" fi +fi -## -# Project: Build configuration settings -## +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } -# Install prefix -# +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -# Check whether --with-install-prefix was given. -if test "${with_install_prefix+set}" = set; then : - withval=$with_install_prefix; INSTALL_PREFIX="$withval" -fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -if test "x$INSTALL_PREFIX" = "xyes" ; then - as_fn_error $? "--with-install-prefix requires an argument" "$LINENO" 5 -fi -if test "x$INSTALL_PREFIX" = "xno" ; then - INSTALL_PREFIX="" -fi + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles -# -# Subsystems to build: -# Library -# -FEATUREHEADERS="library/features.h" -FTMAINSUBS="" +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= -# -# Agent -# -# Check whether --enable-agent was given. -if test "${enable_agent+set}" = set; then : - enableval=$enable_agent; +else $as_nop + ac_file='' fi +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext -# Check whether --with-agent was given. -if test "${with_agent+set}" = set; then : - withval=$with_agent; as_fn_error $? "Invalid option. Use --enable-agent/--disable-agent instead" "$LINENO" 5 +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi +rm -f conftest conftest$ac_cv_exeext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } -if test "x$enable_agent" != "xno"; then - SNMPD='snmpd$(EXEEXT)' - MAINSUBS="$MAINSUBS agent" - FEATUREHEADERS="$FEATUREHEADERS agent/features-mibgroups.h agent/features.h" - FTMAINSUBS="agent $FTMAINSUBS" - TRAPLIBS='$(TRAPDWITHAGENT)' - USETRAPLIBS='$(USEAGENTLIBS)' -else - SNMPD="" - # we still need/want the agentlibs (for subagents, e.g. snmptrapd) - MAINSUBS="$MAINSUBS agent" - # building snmptrapd w/o agentlibs doesn't work atm - #TRAPLIBS='$(TRAPDWITHOUTAGENT)' - #USETRAPLIBS='$(USELIBS)' - TRAPLIBS='$(TRAPDWITHAGENT)' - USETRAPLIBS='$(USEAGENTLIBS)' - -$as_echo "#define NETSNMP_DISABLE_AGENT 1" >>confdefs.h +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - -# Applications -# -# Check whether --enable-applications was given. -if test "${enable_applications+set}" = set; then : - enableval=$enable_applications; +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - - -# Check whether --with-applications was given. -if test "${with_applications+set}" = set; then : - withval=$with_applications; as_fn_error $? "Invalid option. Use --enable-applications/--disable-applications instead" "$LINENO" 5 +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -if test "x$enable_applications" != "xno"; then - MAINSUBS="$MAINSUBS apps" - FEATUREHEADERS="$FEATUREHEADERS features-snmpnetstat.h features-apps.h" - FTMAINSUBS="apps $FTMAINSUBS" -else - -$as_echo "#define NETSNMP_DISABLE_APPS 1" >>confdefs.h +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -# Manual pages -# -# Check whether --enable-manuals was given. -if test "${enable_manuals+set}" = set; then : - enableval=$enable_manuals; fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# Check whether --with-manuals was given. -if test "${with_manuals+set}" = set; then : - withval=$with_manuals; as_fn_error $? "Invalid option. Use --enable-manuals/--disable-manuals instead" "$LINENO" 5 +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= fi +ac_test_CFLAGS=${CFLAGS+y} +ac_save_CFLAGS=$CFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -if test "x$enable_manuals" != "xno"; then - MAINSUBS="$MAINSUBS man" -fi +int +main (void) +{ -# Supporting scripts -# -# Check whether --enable-scripts was given. -if test "${enable_scripts+set}" = set; then : - enableval=$enable_scripts; -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -# Check whether --with-scripts was given. -if test "${with_scripts+set}" = set; then : - withval=$with_scripts; as_fn_error $? "Invalid option. Use --enable-scripts/--disable-scripts instead" "$LINENO" 5 -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -if test "x$enable_scripts" != "xno"; then - MAINSUBS="$MAINSUBS local" -fi +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# MIB files -# -# Check whether --enable-mibs was given. -if test "${enable_mibs+set}" = set; then : - enableval=$enable_mibs; -fi +int +main (void) +{ -if test "x$enable_mibs" != "xno"; then - MAINSUBS="$MAINSUBS mibs" + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes fi -# with-mibs is valid too, but means something else - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what to build and install" >&5 -$as_echo_n "checking what to build and install... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAINSUBS" >&5 -$as_echo "$MAINSUBS" >&6; } - - -# MIB module validation (during "configure") -# -# Check whether --enable-mib-config-checking was given. -if test "${enable_mib_config_checking+set}" = set; then : - enableval=$enable_mib_config_checking; if test "$enableval" = yes -o "$enableval" = no ; then - with_mib_cfg_checks="$enableval" - else - as_fn_error $? "Please use --enable/--disable-mib-config-checking" "$LINENO" 5 - fi -else - with_mib_cfg_checks="no" +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - - -# Check whether --with-mib-config-checking was given. -if test "${with_mib_config_checking+set}" = set; then : - withval=$with_mib_config_checking; as_fn_error $? "Invalid option. Use --enable-mib-config-checking/--disable-mib-config-checking instead" "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - - -# Check whether --enable-mib-config-debug was given. -if test "${enable_mib_config_debug+set}" = set; then : - enableval=$enable_mib_config_debug; if test "$enableval" = yes -o "$enableval" = no ; then - with_mib_cfg_debug="$enableval" - else - as_fn_error $? "Please use --enable/--disable-mib-config-debug" "$LINENO" 5 - fi -else - with_mib_cfg_debug="no" +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi - - -# Check whether --with-mib-config-debug was given. -if test "${with_mib_config_debug+set}" = set; then : - withval=$with_mib_config_debug; as_fn_error $? "Invalid option. Use --enable-mib-config-debug/--disable-mib-config-debug instead" "$LINENO" 5 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi - - -# Version-specific features -# -# Check whether --enable-new-features was given. -if test "${enable_new_features+set}" = set; then : - enableval=$enable_new_features; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -# Check whether --enable-old-features was given. -if test "${enable_old_features+set}" = set; then : - enableval=$enable_old_features; +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Check whether --with-features-of was given. -if test "${with_features_of+set}" = set; then : - withval=$with_features_of; -else - with_features_of=$PACKAGE_VERSION -fi +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done -# Manual prompting during "configure" -# -# Check whether --with-defaults was given. -if test "${with_defaults+set}" = set; then : - withval=$with_defaults; if test "$withval" = yes -o "$withval" = no ; then - defaults="$withval" - else - as_fn_error $? "Please use --with/--without-defaults" "$LINENO" 5 - fi -else - defaults="no" -fi - # Check whether --enable-defaults was given. -if test "${enable_defaults+set}" = set; then : - enableval=$enable_defaults; as_fn_error $? "Invalid option. Use --with-defaults/--without-defaults instead" "$LINENO" 5 -fi -# UCD compatability -# -# Check whether --enable-ucd-snmp-compatibility was given. -if test "${enable_ucd_snmp_compatibility+set}" = set; then : - enableval=$enable_ucd_snmp_compatibility; -fi +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -# Check whether --with-ucd-snmp-compatibility was given. -if test "${with_ucd_snmp_compatibility+set}" = set; then : - withval=$with_ucd_snmp_compatibility; as_fn_error $? "Invalid option. Use --enable-ucd-snmp-compatibility/--disable-ucd-snmp-compatibility instead" "$LINENO" 5 fi -if test "x$enable_ucd_snmp_compatibility" = "xyes" ; then - installucdheaders=installucdheaders - installucdlibs=installucdlibs - - cat >> configure-summary << EOF - UCD-SNMP compatability: enabled -EOF -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test ${ac_cv_safe_to_define___extensions__+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -## -# Project: Library: MIB configuration settings -## +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main (void) +{ -# Check whether --enable-mib-loading was given. -if test "${enable_mib_loading+set}" = set; then : - enableval=$enable_mib_loading; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else $as_nop + ac_cv_safe_to_define___extensions__=no fi - - -# Check whether --with-mib-loading was given. -if test "${with_mib_loading+set}" = set; then : - withval=$with_mib_loading; as_fn_error $? "Invalid option. Use --enable-mib-loading/--disable-mib-loading instead" "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } -if test "x$enable_mib_loading" = "xno"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test ${ac_cv_should_define__xopen_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_should_define__xopen_source=no + if test $ac_cv_header_wchar_h = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -$as_echo "#define NETSNMP_DISABLE_MIB_LOADING 1" >>confdefs.h + #include + mbstate_t x; +int +main (void) +{ -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Check whether --with-mibdirs was given. -if test "${with_mibdirs+set}" = set; then : - withval=$with_mibdirs; NETSNMP_DEFAULT_MIBDIRS="$with_mibdirs" + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main (void) +{ -cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBDIRS "$with_mibdirs" + ; + return 0; +} _ACEOF - +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes fi - - # Check whether --enable-mibdirs was given. -if test "${enable_mibdirs+set}" = set; then : - enableval=$enable_mibdirs; as_fn_error $? "Invalid option. Use --with-mibdirs/--without-mibdirs instead" "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h -# Check whether --with-mibs was given. -if test "${with_mibs+set}" = set; then : - withval=$with_mibs; NETSNMP_DEFAULT_MIBS="$with_mibs" -fi + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h -# enable-mibs is valid too, but means something else + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h -# Check whether --with-mibfiles was given. -if test "${with_mibfiles+set}" = set; then : - withval=$with_mibfiles; -cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBFILES "$with_mibfiles" -_ACEOF + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - # Check whether --enable-mibfiles was given. -if test "${enable_mibfiles+set}" = set; then : - enableval=$enable_mibfiles; as_fn_error $? "Invalid option. Use --with-mibfiles/--without-mibfiles instead" "$LINENO" 5 -fi + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h -## -# Project: Library: Security configuration -## + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h -# Check whether --enable-des was given. -if test "${enable_des+set}" = set; then : - enableval=$enable_des; -fi + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h -# Check whether --with-des was given. -if test "${with_des+set}" = set; then : - withval=$with_des; as_fn_error $? "Invalid option. Use --enable-des/--disable-des instead" "$LINENO" 5 -fi + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h -if test "x$enable_des" = "xno"; then + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h -$as_echo "#define NETSNMP_DISABLE_DES 1" >>confdefs.h + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h -# Check whether --enable-privacy was given. -if test "${enable_privacy+set}" = set; then : - enableval=$enable_privacy; +else $as_nop + MINIX= fi + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h -# Check whether --with-privacy was given. -if test "${with_privacy+set}" = set; then : - withval=$with_privacy; as_fn_error $? "Invalid option. Use --enable-privacy/--disable-privacy instead" "$LINENO" 5 fi -if test "x$enable_privacy" != "xno"; then -$as_echo "#define NETSNMP_ENABLE_SCAPI_AUTHPRIV 1" >>confdefs.h +## +## Recommended structure: +## +# information on the package +# checks for programs +# checks for libraries +# checks for header files +# checks for types +# checks for structures +# checks for compiler characteristics +# checks for library functions +# checks for system services -fi -# Check whether --enable-md5 was given. -if test "${enable_md5+set}" = set; then : - enableval=$enable_md5; -fi -# Check whether --with-md5 was given. -if test "${with_md5+set}" = set; then : - withval=$with_md5; as_fn_error $? "Invalid option. Use --enable-md5/--disable-md5 instead" "$LINENO" 5 -fi -if test "x$enable_md5" = "xno"; then +# -*- autoconf -*- +######################################### +## +# Command-line processing - --with/--enable +## +######################################### -$as_echo "#define NETSNMP_DISABLE_MD5 1" >>confdefs.h +## +# System: Compiler settings +## -fi -# Check whether --enable-internal-md5 was given. -if test "${enable_internal_md5+set}" = set; then : - enableval=$enable_internal_md5; +# Check whether --with-cc was given. +if test ${with_cc+y} +then : + withval=$with_cc; CC=$with_cc;export CC fi -# Check whether --with-internal-md5 was given. -if test "${with_internal_md5+set}" = set; then : - withval=$with_internal_md5; as_fn_error $? "Invalid option. Use --enable-internal-md5/--disable-internal-md5 instead" "$LINENO" 5 + +# Check whether --with-linkcc was given. +if test ${with_linkcc+y} +then : + withval=$with_linkcc; LINKCC=$with_linkcc;export LINKCC fi -if test "x$enable_internal_md5" = "xyes"; then - if test "x$enable_md5" = "xno"; then - as_fn_error $? "You can not specify both --enable-internal-md5 and --disable-md5" "$LINENO" 5 - else -$as_echo "#define NETSNMP_USE_INTERNAL_MD5 1" >>confdefs.h - fi +# Check whether --with-ar was given. +if test ${with_ar+y} +then : + withval=$with_ar; AR=$with_ar; export AR fi -## -# Project: Library: Misc configuration -## - -# Check whether --with-opaque-special-types was given. -if test "${with_opaque_special_types+set}" = set; then : - withval=$with_opaque_special_types; -fi +# Check whether --with-endianness was given. +if test ${with_endianness+y} +then : + withval=$with_endianness; if test $with_endianness != "big" -a $with_endianness != "little" ; then + as_fn_error $? "Endianness must be big or little, not \"$with_endianness\"." "$LINENO" 5; + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with-endianness is obsolete" >&5 +printf "%s\n" "$as_me: WARNING: --with-endianness is obsolete" >&2;} + fi - # Check whether --enable-opaque-special-types was given. -if test "${enable_opaque_special_types+set}" = set; then : - enableval=$enable_opaque_special_types; as_fn_error $? "Invalid option. Use --with-opaque-special-types/--without-opaque-special-types instead" "$LINENO" 5 fi -# Only define if specifically chosen as --without (i.e., default to true). -if test "x$with_opaque_special_types" != "xno"; then -$as_echo "#define NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 1" >>confdefs.h +# Check whether --with-cflags was given. +if test ${with_cflags+y} +then : + withval=$with_cflags; CFLAGS=$with_cflags; export CFLAGS fi -# Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then : - enableval=$enable_ipv6; if test "x$enable_ipv6" = "xyes"; then -$as_echo "#define NETSNMP_ENABLE_IPV6 1" >>confdefs.h - fi +# Check whether --with-ldflags was given. +if test ${with_ldflags+y} +then : + withval=$with_ldflags; LDFLAGS=$with_ldflags; export LDFLAGS fi -# Check whether --with-ipv6 was given. -if test "${with_ipv6+set}" = set; then : - withval=$with_ipv6; as_fn_error $? "Invalid option. Use --enable-ipv6/--disable-ipv6 instead" "$LINENO" 5 +# Check whether --enable-as-needed was given. +if test ${enable_as_needed+y} +then : + enableval=$enable_as_needed; fi -# Check whether --with-logfile was given. -if test "${with_logfile+set}" = set; then : - withval=$with_logfile; ac_cv_user_prompt_NETSNMP_LOGFILE="$with_logfile" +# Check whether --with-libs was given. +if test ${with_libs+y} +then : + withval=$with_libs; LIBS=$with_libs; export LIBS fi - # Check whether --enable-logfile was given. -if test "${enable_logfile+set}" = set; then : - enableval=$enable_logfile; as_fn_error $? "Invalid option. Use --with-logfile/--without-logfile instead" "$LINENO" 5 -fi -if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" = "no"; then - ac_cv_user_prompt_NETSNMP_LOGFILE="none" +# Check whether --enable-silent-libtool was given. +if test ${enable_silent_libtool+y} +then : + enableval=$enable_silent_libtool; LIBTOOLFLAGS=--silent fi -# Check whether --with-persistent-directory was given. -if test "${with_persistent_directory+set}" = set; then : - withval=$with_persistent_directory; ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY="$with_persistent_directory" -fi - # Check whether --enable-persistent-directory was given. -if test "${enable_persistent_directory+set}" = set; then : - enableval=$enable_persistent_directory; as_fn_error $? "Invalid option. Use --with-persistent-directory/--without-persistent-directory instead" "$LINENO" 5 -fi +## +# System: Library settings +## +tryrsaref=no -# Check whether --with-persistent-mask was given. -if test "${with_persistent_mask+set}" = set; then : - withval=$with_persistent_mask; if test `expr "X$withval" : 'X[0-7]*$'` -eq 4 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using persistent mask $withval" >&5 -$as_echo "using persistent mask $withval" >&6; } - withval="0$withval" - else - as_fn_error $? "Please provide a three digit octal persistent mask value" "$LINENO" 5 - fi -else - withval=077 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default persistent mask $withval" >&5 -$as_echo "using default persistent mask $withval" >&6; } +# Check whether --with-rsaref was given. +if test ${with_rsaref+y} +then : + withval=$with_rsaref; if test "x$withval" = "xyes"; then + tryrsaref=yes + elif test "x$withval" = "xno"; then + tryrsaref=no + elif test -d "$withval"; then + + if test "x$withval" != x -a -d $withval; then + if test -d $withval/lib; then + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + if test -d $withval/include; then + CPPFLAGS="-I$withval/include $CPPFLAGS" + fi + fi + + tryrsaref=yes + fi fi - # Check whether --enable-persistent-mask was given. -if test "${enable_persistent_mask+set}" = set; then : - enableval=$enable_persistent_mask; as_fn_error $? "Invalid option. Use --with-persistent-mask/--without-persistent-mask instead" "$LINENO" 5 + # Check whether --enable-rsaref was given. +if test ${enable_rsaref+y} +then : + enableval=$enable_rsaref; as_fn_error $? "Invalid option. Use --with-rsaref/--without-rsaref instead" "$LINENO" 5 fi -cat >>confdefs.h <<_ACEOF -#define NETSNMP_PERSISTENT_MASK $withval -_ACEOF +tryopenssl=defaultyes +askedopenssl=no +aes_capable=no +# Check whether --with-openssl was given. +if test ${with_openssl+y} +then : + withval=$with_openssl; if test "x$withval" = "xyes"; then + tryopenssl=yes + askedopenssl=yes + elif test "x$withval" = "xinternal"; then + tryopenssl=internal + askedopenssl=internal + elif test "x$withval" = "xno"; then + tryopenssl=no + elif test -d "$withval"; then + if test -d "$withval/lib/MinGW"; then + LDFLAGS="-L$withval/lib/MinGW $LDFLAGS" + CPPFLAGS="-I$withval/include $CPPFLAGS" + else + if test "x$withval" != x -a -d $withval; then + if test -d $withval/lib; then + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + if test -d $withval/include; then + CPPFLAGS="-I$withval/include $CPPFLAGS" + fi + fi -# Check whether --with-copy_persistent_files was given. -if test "${with_copy_persistent_files+set}" = set; then : - withval=$with_copy_persistent_files; ac_cv_user_prompt_COPY_PERSISTENT_FILES="$with_copy_persistent_files" + fi + tryopenssl=yes + askedopenssl=yes + fi fi - # Check whether --enable-copy_persistent_files was given. -if test "${enable_copy_persistent_files+set}" = set; then : - enableval=$enable_copy_persistent_files; as_fn_error $? "Invalid option. Use --with-copy_persistent_files/--without-copy_persistent_files instead" "$LINENO" 5 + # Check whether --enable-openssl was given. +if test ${enable_openssl+y} +then : + enableval=$enable_openssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 fi +if test "x$tryopenssl" = "xdefaultyes"; then -default_temp_file_pattern="/tmp/snmpdXXXXXX" - -# Check whether --with-temp-file-pattern was given. -if test "${with_temp_file_pattern+set}" = set; then : - withval=$with_temp_file_pattern; if test `expr "X$withval" : ".*XXXXXX$"` -ne 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using temporary file pattern $withval" >&5 -$as_echo "using temporary file pattern $withval" >&6; } - else - as_fn_error $? "temporary file pattens must end with 6 X's" "$LINENO" 5 - fi -else - withval="$default_temp_file_pattern" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default temporary file pattern $withval" >&5 -$as_echo "using default temporary file pattern $withval" >&6; } -fi + if test "x/usr/local/ssl" != x -a -d /usr/local/ssl; then + if test -d /usr/local/ssl/lib; then + LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" + fi + if test -d /usr/local/ssl/include; then + CPPFLAGS="-I/usr/local/ssl/include $CPPFLAGS" + fi + fi - # Check whether --enable-temp-file-pattern was given. -if test "${enable_temp_file_pattern+set}" = set; then : - enableval=$enable_temp_file_pattern; as_fn_error $? "Invalid option. Use --with-temp-file-pattern/--without-temp-file-pattern instead" "$LINENO" 5 + tryopenssl=yes fi - - -cat >>confdefs.h <<_ACEOF -#define NETSNMP_TEMP_FILE_PATTERN "$withval" +if test "x$tryopenssl" = "xyes"; then + for ac_header in openssl/aes.h openssl/evp.h +do : + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - - - -## -# Project: Library: Version configuration -## - -SNMP_VERSIONS="" -# Check whether --enable-snmpv1 was given. -if test "${enable_snmpv1+set}" = set; then : - enableval=$enable_snmpv1; + aes_capable=yes fi - -# Check whether --with-snmpv1 was given. -if test "${with_snmpv1+set}" = set; then : - withval=$with_snmpv1; as_fn_error $? "Invalid option. Use --enable-snmpv1/--disable-snmpv1 instead" "$LINENO" 5 +done fi -if test "x$enable_snmpv1" = "xno"; then - -$as_echo "#define NETSNMP_DISABLE_SNMPV1 1" >>confdefs.h -else - SNMP_VERSIONS="$SNMP_VERSIONS 1" +# Check whether --with-ssl was given. +if test ${with_ssl+y} +then : + withval=$with_ssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 fi -# Check whether --enable-snmpv2c was given. -if test "${enable_snmpv2c+set}" = set; then : - enableval=$enable_snmpv2c; +# Check whether --enable-ssl was given. +if test ${enable_ssl+y} +then : + enableval=$enable_ssl; as_fn_error $? "Invalid option. Use --with-openssl/--without-openssl instead" "$LINENO" 5 fi -# Check whether --with-snmpv2c was given. -if test "${with_snmpv2c+set}" = set; then : - withval=$with_snmpv2c; as_fn_error $? "Invalid option. Use --enable-snmpv2c/--disable-snmpv2c instead" "$LINENO" 5 -fi +askedpkcs=no -if test "x$enable_snmpv2c" = "xno"; then +# Check whether --with-pkcs was given. +if test ${with_pkcs+y} +then : + withval=$with_pkcs; if test "x$withval" = "xyes"; then + askedpkcs=yes + elif test "x$withval" = "xno"; then + askedpkcs=no + elif test -d "$withval"; then -$as_echo "#define NETSNMP_DISABLE_SNMPV2C 1" >>confdefs.h + if test "x$withval" != x -a -d $withval; then + if test -d $withval/lib; then + LDFLAGS="-L$withval/lib $LDFLAGS" + fi + if test -d $withval/include; then + CPPFLAGS="-I$withval/include $CPPFLAGS" + fi + fi -else - SNMP_VERSIONS="$SNMP_VERSIONS 2c" + askedpkcs=yes + fi fi -SNMP_VERSIONS="$SNMP_VERSIONS 3" - - cat >> configure-summary << EOF - SNMP Versions Supported: $SNMP_VERSIONS -EOF + # Check whether --enable-pkcs was given. +if test ${enable_pkcs+y} +then : + enableval=$enable_pkcs; as_fn_error $? "Invalid option. Use --with-pkcs/--without-pkcs instead" "$LINENO" 5 +fi +trykrb5=defaultyes +askedkrb5=no -# Check whether --with-default-snmp-version was given. -if test "${with_default_snmp_version+set}" = set; then : - withval=$with_default_snmp_version; ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION="$with_default_snmp_version" +# Check whether --with-krb5 was given. +if test ${with_krb5+y} +then : + withval=$with_krb5; if test "x$withval" = "xyes"; then + trykrb5=yes + askedkrb5=yes + krb5path=undef + elif test "x$withval" = "xno"; then + trykrb5=no + krb5path=undef + elif test -d "$withval"; then + trykrb5=yes + askedkrb5=yes + krb5path=$withval + fi fi - # Check whether --enable-default-snmp-version was given. -if test "${enable_default_snmp_version+set}" = set; then : - enableval=$enable_default_snmp_version; as_fn_error $? "Invalid option. Use --with-default-snmp-version/--without-default-snmp-version instead" "$LINENO" 5 + # Check whether --enable-krb5 was given. +if test ${enable_krb5+y} +then : + enableval=$enable_krb5; as_fn_error $? "Invalid option. Use --with-krb5/--without-krb5 instead" "$LINENO" 5 fi - -# we test this now and later as well. we test it now so configure can die -# early on with an error rather than waiting till the end of the script. -case "${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION-3}" in - [123]) ;; - 2c) ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=2 ;; - *) - as_fn_error $? "Illegal version number. Only 1, 2 (for SNMPv2c) and 3 are supported." "$LINENO" 5 - ;; -esac - - -## -# Project: Library: Transport modules -## - - -# Check whether --with-transports was given. -if test "${with_transports+set}" = set; then : - withval=$with_transports; +if test "x$trykrb5" = "xdefaultyes"; then + trykrb5=yes + krb5path=/usr/kerberos fi -# Check whether --with-out_transports was given. -if test "${with_out_transports+set}" = set; then : - withval=$with_out_transports; +# Check whether --with-dnssec-local-validation was given. +if test ${with_dnssec_local_validation+y} +then : + withval=$with_dnssec_local_validation; want_dnssec=$withval +else $as_nop + want_dnssec=no fi - -# -# Catch common mistakes in transport options -# - -# Check whether --with-transport was given. -if test "${with_transport+set}" = set; then : - withval=$with_transport; as_fn_error $? "Invalid option. Use --with-transports/--without-transports instead" "$LINENO" 5 +# Check whether --enable-dnssec-local-validation was given. +if test ${enable_dnssec_local_validation+y} +then : + enableval=$enable_dnssec_local_validation; as_fn_error $? "Invalid option. Use --with-dnssec-local-validation/--without-dnssec-local-validation instead" "$LINENO" 5 fi -# Check whether --with-out-transport was given. -if test "${with_out_transport+set}" = set; then : - withval=$with_out_transport; as_fn_error $? "Invalid option. Use --with-out-transports/--without-out-transports instead" "$LINENO" 5 +# Check whether --with-dnssec was given. +if test ${with_dnssec+y} +then : + withval=$with_dnssec; as_fn_error $? "Invalid option. Use --with-dnssec-local-validation/--without-dnssec-local-validation instead" "$LINENO" 5 fi +# Check whether --enable-dnssec was given. +if test ${enable_dnssec+y} +then : + enableval=$enable_dnssec; as_fn_error $? "Invalid option. Use --with-dnssec-local-validation/--without-dnssec-local-validation instead" "$LINENO" 5 +fi -## -# Project: Library: Security modules -## - -# Check whether --with-security-modules was given. -if test "${with_security_modules+set}" = set; then : - withval=$with_security_modules; +# Check whether --with-rpm was given. +if test ${with_rpm+y} +then : + withval=$with_rpm; fi - # Check whether --enable-security-modules was given. -if test "${enable_security_modules+set}" = set; then : - enableval=$enable_security_modules; as_fn_error $? "Invalid option. Use --with-security-modules/--without-security-modules instead" "$LINENO" 5 + # Check whether --enable-rpm was given. +if test ${enable_rpm+y} +then : + enableval=$enable_rpm; as_fn_error $? "Invalid option. Use --with-rpm/--without-rpm instead" "$LINENO" 5 fi -# Check whether --with-out-security-modules was given. -if test "${with_out_security_modules+set}" = set; then : - withval=$with_out_security_modules; -fi - # Check whether --enable-out-security-modules was given. -if test "${enable_out_security_modules+set}" = set; then : - enableval=$enable_out_security_modules; as_fn_error $? "Invalid option. Use --with-out-security-modules/--without-out-security-modules instead" "$LINENO" 5 +# Check whether --with-pcre was given. +if test ${with_pcre+y} +then : + withval=$with_pcre; with_pcre="$withval" +else $as_nop + with_pcre="maybe" fi + # Check whether --enable-pcre was given. +if test ${enable_pcre+y} +then : + enableval=$enable_pcre; as_fn_error $? "Invalid option. Use --with-pcre/--without-pcre instead" "$LINENO" 5 +fi ## -# Project: Library: Developer-related settings +# Project: Build configuration settings ## -# Check whether --enable-debugging was given. -if test "${enable_debugging+set}" = set; then : - enableval=$enable_debugging; $as_echo "#define NETSNMP_ALWAYS_DEBUG 1" >>confdefs.h +# Install prefix +# +# Check whether --with-install-prefix was given. +if test ${with_install_prefix+y} +then : + withval=$with_install_prefix; INSTALL_PREFIX="$withval" fi -# Check whether --with-debugging was given. -if test "${with_debugging+set}" = set; then : - withval=$with_debugging; as_fn_error $? "Invalid option. Use --enable-debugging/--disable-debugging instead" "$LINENO" 5 +if test "x$INSTALL_PREFIX" = "xyes" ; then + as_fn_error $? "--with-install-prefix requires an argument" "$LINENO" 5 +fi +if test "x$INSTALL_PREFIX" = "xno" ; then + INSTALL_PREFIX="" fi -if test "x$enable_debugging" = "xno"; then - $as_echo "#define NETSNMP_NO_DEBUGGING 1" >>confdefs.h -fi -# Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then : - enableval=$enable_developer; if test "$enableval" = yes ; then - developer="yes" - elif test "$enableval" != no ; then - as_fn_error $? "Please use --enable/--disable-developer" "$LINENO" 5 - else - developer="no" - fi +# +# Subsystems to build: +# Library +# +FEATUREHEADERS="library/features.h" +FTMAINSUBS="" + +# +# Agent +# +# Check whether --enable-agent was given. +if test ${enable_agent+y} +then : + enableval=$enable_agent; fi -# Check whether --with-developer was given. -if test "${with_developer+set}" = set; then : - withval=$with_developer; as_fn_error $? "Invalid option. Use --enable-developer/--disable-developer instead" "$LINENO" 5 +# Check whether --with-agent was given. +if test ${with_agent+y} +then : + withval=$with_agent; as_fn_error $? "Invalid option. Use --enable-agent/--disable-agent instead" "$LINENO" 5 fi +if test "x$enable_agent" != "xno"; then + SNMPD='snmpd$(EXEEXT)' + MAINSUBS="$MAINSUBS agent" + FEATUREHEADERS="$FEATUREHEADERS agent/features-mibgroups.h agent/features.h" + FTMAINSUBS="agent $FTMAINSUBS" + TRAPLIBS='$(TRAPDWITHAGENT)' + USETRAPLIBS='$(USEAGENTLIBS)' +else + SNMPD="" + # we still need/want the agentlibs (for subagents, e.g. snmptrapd) + MAINSUBS="$MAINSUBS agent" + # building snmptrapd w/o agentlibs doesn't work atm + #TRAPLIBS='$(TRAPDWITHOUTAGENT)' + #USETRAPLIBS='$(USELIBS)' + TRAPLIBS='$(TRAPDWITHAGENT)' + USETRAPLIBS='$(USEAGENTLIBS)' -# Check whether --enable-testing-code was given. -if test "${enable_testing_code+set}" = set; then : - enableval=$enable_testing_code; if test "$enableval" = yes ; then - -$as_echo "#define NETSNMP_ENABLE_TESTING_CODE 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_AGENT 1" >>confdefs.h - elif test "$enableval" != no ; then - as_fn_error $? "Please use --enable/--disable-testing-code" "$LINENO" 5 - fi fi -# Check whether --with-testing-code was given. -if test "${with_testing_code+set}" = set; then : - withval=$with_testing_code; as_fn_error $? "Invalid option. Use --enable-testing-code/--disable-testing-code instead" "$LINENO" 5 -fi - -# Check whether --enable-reentrant was given. -if test "${enable_reentrant+set}" = set; then : - enableval=$enable_reentrant; if test "$enableval" = yes -o "$enableval" = no ; then - with_res_locks="$enableval" - else - as_fn_error $? "Please use --enable/--disable-reentrant" "$LINENO" 5 - fi -else - with_res_locks="no" -fi -# Check whether --with-reentrant was given. -if test "${with_reentrant+set}" = set; then : - withval=$with_reentrant; as_fn_error $? "Invalid option. Use --enable-reentrant/--disable-reentrant instead" "$LINENO" 5 +# Applications +# +# Check whether --enable-applications was given. +if test ${enable_applications+y} +then : + enableval=$enable_applications; fi -# Check whether --enable-deprecated was given. -if test "${enable_deprecated+set}" = set; then : - enableval=$enable_deprecated; +# Check whether --with-applications was given. +if test ${with_applications+y} +then : + withval=$with_applications; as_fn_error $? "Invalid option. Use --enable-applications/--disable-applications instead" "$LINENO" 5 fi +if test "x$enable_applications" != "xno"; then + MAINSUBS="$MAINSUBS apps" + FEATUREHEADERS="$FEATUREHEADERS features-snmpnetstat.h features-apps.h" + FTMAINSUBS="apps $FTMAINSUBS" +else + +printf "%s\n" "#define NETSNMP_DISABLE_APPS 1" >>confdefs.h -# Check whether --with-deprecated was given. -if test "${with_deprecated+set}" = set; then : - withval=$with_deprecated; as_fn_error $? "Invalid option. Use --enable-deprecated/--disable-deprecated instead" "$LINENO" 5 fi -if test "$enable_deprecated" = no ; then +# Manual pages +# +# Check whether --enable-manuals was given. +if test ${enable_manuals+y} +then : + enableval=$enable_manuals; +fi -$as_echo "#define NETSNMP_NO_DEPRECATED_FUNCTIONS 1" >>confdefs.h +# Check whether --with-manuals was given. +if test ${with_manuals+y} +then : + withval=$with_manuals; as_fn_error $? "Invalid option. Use --enable-manuals/--disable-manuals instead" "$LINENO" 5 fi +if test "x$enable_manuals" != "xno"; then + MAINSUBS="$MAINSUBS man" +fi +# Supporting scripts +# +# Check whether --enable-scripts was given. +if test ${enable_scripts+y} +then : + enableval=$enable_scripts; +fi -## -# Project: Agent configuration settings -## +# Check whether --with-scripts was given. +if test ${with_scripts+y} +then : + withval=$with_scripts; as_fn_error $? "Invalid option. Use --enable-scripts/--disable-scripts instead" "$LINENO" 5 +fi -# Check whether --with-root-access was given. -if test "${with_root_access+set}" = set; then : - withval=$with_root_access; +if test "x$enable_scripts" != "xno"; then + MAINSUBS="$MAINSUBS local" fi - # Check whether --enable-root-access was given. -if test "${enable_root_access+set}" = set; then : - enableval=$enable_root_access; as_fn_error $? "Invalid option. Use --with-root-access/--without-root-access instead" "$LINENO" 5 +# MIB files +# +# Check whether --enable-mibs was given. +if test ${enable_mibs+y} +then : + enableval=$enable_mibs; fi -# Only define if specifically chosen as --without (i.e., default to true). -if test "x$with_root_access" = "xno"; then +if test "x$enable_mibs" != "xno"; then + MAINSUBS="$MAINSUBS mibs" +fi +# with-mibs is valid too, but means something else -$as_echo "#define NETSNMP_NO_ROOT_ACCESS 1" >>confdefs.h -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what to build and install" >&5 +printf %s "checking what to build and install... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAINSUBS" >&5 +printf "%s\n" "$MAINSUBS" >&6; } -# Check whether --with-kmem-usage was given. -if test "${with_kmem_usage+set}" = set; then : - withval=$with_kmem_usage; -fi - # Check whether --enable-kmem-usage was given. -if test "${enable_kmem_usage+set}" = set; then : - enableval=$enable_kmem_usage; as_fn_error $? "Invalid option. Use --with-kmem-usage/--without-kmem-usage instead" "$LINENO" 5 +# MIB module validation (during "configure") +# +# Check whether --enable-mib-config-checking was given. +if test ${enable_mib_config_checking+y} +then : + enableval=$enable_mib_config_checking; if test "$enableval" = yes -o "$enableval" = no ; then + with_mib_cfg_checks="$enableval" + else + as_fn_error $? "Please use --enable/--disable-mib-config-checking" "$LINENO" 5 + fi +else $as_nop + with_mib_cfg_checks="no" fi -# Only define if specifically chosen as --without (i.e., default to true). -if test "x$with_kmem_usage" = "xno"; then - -$as_echo "#define NETSNMP_NO_KMEM_USAGE 1" >>confdefs.h +# Check whether --with-mib-config-checking was given. +if test ${with_mib_config_checking+y} +then : + withval=$with_mib_config_checking; as_fn_error $? "Invalid option. Use --enable-mib-config-checking/--disable-mib-config-checking instead" "$LINENO" 5 fi -# Check whether --with-dummy-values was given. -if test "${with_dummy_values+set}" = set; then : - withval=$with_dummy_values; +# Check whether --enable-mib-config-debug was given. +if test ${enable_mib_config_debug+y} +then : + enableval=$enable_mib_config_debug; if test "$enableval" = yes -o "$enableval" = no ; then + with_mib_cfg_debug="$enableval" + else + as_fn_error $? "Please use --enable/--disable-mib-config-debug" "$LINENO" 5 + fi +else $as_nop + with_mib_cfg_debug="no" fi - # Check whether --enable-dummy-values was given. -if test "${enable_dummy_values+set}" = set; then : - enableval=$enable_dummy_values; as_fn_error $? "Invalid option. Use --with-dummy-values/--without-dummy-values instead" "$LINENO" 5 + +# Check whether --with-mib-config-debug was given. +if test ${with_mib_config_debug+y} +then : + withval=$with_mib_config_debug; as_fn_error $? "Invalid option. Use --enable-mib-config-debug/--disable-mib-config-debug instead" "$LINENO" 5 fi -# Define unless specifically suppressed (i.e., option defaults to false). -if test "x$with_dummy_values" != "xyes"; then -$as_echo "#define NETSNMP_NO_DUMMY_VALUES 1" >>confdefs.h +# Version-specific features +# +# Check whether --enable-new-features was given. +if test ${enable_new_features+y} +then : + enableval=$enable_new_features; fi -# Check whether --enable-set-support was given. -if test "${enable_set_support+set}" = set; then : - enableval=$enable_set_support; + +# Check whether --enable-old-features was given. +if test ${enable_old_features+y} +then : + enableval=$enable_old_features; fi -# Check whether --with-set-support was given. -if test "${with_set_support+set}" = set; then : - withval=$with_set_support; as_fn_error $? "Invalid option. Use --enable-set-support/--disable-set-support instead" "$LINENO" 5 + +# Check whether --with-features-of was given. +if test ${with_features_of+y} +then : + withval=$with_features_of; +else $as_nop + with_features_of=$PACKAGE_VERSION fi -if test "x$enable_set_support" = "xno"; then -$as_echo "#define NETSNMP_DISABLE_SET_SUPPORT 1" >>confdefs.h +# Manual prompting during "configure" +# + +# Check whether --with-defaults was given. +if test ${with_defaults+y} +then : + withval=$with_defaults; if test "$withval" = yes -o "$withval" = no ; then + defaults="$withval" + else + as_fn_error $? "Please use --with/--without-defaults" "$LINENO" 5 + fi +else $as_nop + defaults="no" +fi + + # Check whether --enable-defaults was given. +if test ${enable_defaults+y} +then : + enableval=$enable_defaults; as_fn_error $? "Invalid option. Use --with-defaults/--without-defaults instead" "$LINENO" 5 fi -# Check whether --with-sys_contact was given. -if test "${with_sys_contact+set}" = set; then : - withval=$with_sys_contact; ac_cv_user_prompt_NETSNMP_SYS_CONTACT="$with_sys_contact" +# UCD compatability +# +# Check whether --enable-ucd-snmp-compatibility was given. +if test ${enable_ucd_snmp_compatibility+y} +then : + enableval=$enable_ucd_snmp_compatibility; fi - # Check whether --enable-sys_contact was given. -if test "${enable_sys_contact+set}" = set; then : - enableval=$enable_sys_contact; as_fn_error $? "Invalid option. Use --with-sys_contact/--without-sys_contact instead" "$LINENO" 5 + +# Check whether --with-ucd-snmp-compatibility was given. +if test ${with_ucd_snmp_compatibility+y} +then : + withval=$with_ucd_snmp_compatibility; as_fn_error $? "Invalid option. Use --enable-ucd-snmp-compatibility/--disable-ucd-snmp-compatibility instead" "$LINENO" 5 fi +if test "x$enable_ucd_snmp_compatibility" = "xyes" ; then + installucdheaders=installucdheaders + installucdlibs=installucdlibs -# Check whether --with-sys_location was given. -if test "${with_sys_location+set}" = set; then : - withval=$with_sys_location; ac_cv_user_prompt_NETSNMP_SYS_LOC="$with_sys_location" -fi + cat >> configure-summary << EOF + UCD-SNMP compatability: enabled +EOF - # Check whether --enable-sys_location was given. -if test "${enable_sys_location+set}" = set; then : - enableval=$enable_sys_location; as_fn_error $? "Invalid option. Use --with-sys_location/--without-sys_location instead" "$LINENO" 5 fi ## -# Project: Agent: Extensibility configuration +# Project: Library: MIB configuration settings ## -# Check whether --enable-local-smux was given. -if test "${enable_local_smux+set}" = set; then : - enableval=$enable_local_smux; if test "x$enable_local_smux" = "xyes"; then - -$as_echo "#define NETSNMP_ENABLE_LOCAL_SMUX 1" >>confdefs.h - - fi +# Check whether --enable-mib-loading was given. +if test ${enable_mib_loading+y} +then : + enableval=$enable_mib_loading; fi -# Check whether --with-local-smux was given. -if test "${with_local_smux+set}" = set; then : - withval=$with_local_smux; as_fn_error $? "Invalid option. Use --enable-local-smux/--disable-local-smux instead" "$LINENO" 5 +# Check whether --with-mib-loading was given. +if test ${with_mib_loading+y} +then : + withval=$with_mib_loading; as_fn_error $? "Invalid option. Use --enable-mib-loading/--disable-mib-loading instead" "$LINENO" 5 fi +if test "x$enable_mib_loading" = "xno"; then -# Check whether --enable-agentx-dom-sock-only was given. -if test "${enable_agentx_dom_sock_only+set}" = set; then : - enableval=$enable_agentx_dom_sock_only; -$as_echo "#define NETSNMP_AGENTX_DOM_SOCK_ONLY 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_DISABLE_MIB_LOADING 1" >>confdefs.h fi -# Check whether --with-agentx-dom-sock-only was given. -if test "${with_agentx_dom_sock_only+set}" = set; then : - withval=$with_agentx_dom_sock_only; as_fn_error $? "Invalid option. Use --enable-agentx-dom-sock-only/--disable-agentx-dom-sock-only instead" "$LINENO" 5 -fi +# Check whether --with-mibdirs was given. +if test ${with_mibdirs+y} +then : + withval=$with_mibdirs; NETSNMP_DEFAULT_MIBDIRS="$with_mibdirs" +printf "%s\n" "#define NETSNMP_DEFAULT_MIBDIRS \"$with_mibdirs\"" >>confdefs.h -# Check whether --enable-snmptrapd-subagent was given. -if test "${enable_snmptrapd_subagent+set}" = set; then : - enableval=$enable_snmptrapd_subagent; fi - -# Check whether --with-snmptrapd-subagent was given. -if test "${with_snmptrapd_subagent+set}" = set; then : - withval=$with_snmptrapd_subagent; as_fn_error $? "Invalid option. Use --enable-snmptrapd-subagent/--disable-snmptrapd-subagent instead" "$LINENO" 5 + # Check whether --enable-mibdirs was given. +if test ${enable_mibdirs+y} +then : + enableval=$enable_mibdirs; as_fn_error $? "Invalid option. Use --with-mibdirs/--without-mibdirs instead" "$LINENO" 5 fi -if test "x$enable_snmptrapd_subagent" = "xno"; then -$as_echo "#define NETSNMP_SNMPTRAPD_DISABLE_AGENTX 1" >>confdefs.h +# Check whether --with-mibs was given. +if test ${with_mibs+y} +then : + withval=$with_mibs; NETSNMP_DEFAULT_MIBS="$with_mibs" fi -default_agentx_socket="/var/agentx/master" - -# Check whether --with-agentx-socket was given. -if test "${with_agentx_socket+set}" = set; then : - withval=$with_agentx_socket; - if test "$withval" = yes; then - as_fn_error $? " Please provide a full path " "$LINENO" 5; - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using AgentX socket $withval" >&5 -$as_echo "using AgentX socket $withval" >&6; } +# enable-mibs is valid too, but means something else -else - withval=$default_agentx_socket - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default AgentX socket $default_agentx_socket" >&5 -$as_echo "using default AgentX socket $default_agentx_socket" >&6; } +# Check whether --with-mibfiles was given. +if test ${with_mibfiles+y} +then : + withval=$with_mibfiles; +printf "%s\n" "#define NETSNMP_DEFAULT_MIBFILES \"$with_mibfiles\"" >>confdefs.h fi - # Check whether --enable-agentx-socket was given. -if test "${enable_agentx_socket+set}" = set; then : - enableval=$enable_agentx_socket; as_fn_error $? "Invalid option. Use --with-agentx-socket/--without-agentx-socket instead" "$LINENO" 5 + # Check whether --enable-mibfiles was given. +if test ${enable_mibfiles+y} +then : + enableval=$enable_mibfiles; as_fn_error $? "Invalid option. Use --with-mibfiles/--without-mibfiles instead" "$LINENO" 5 fi -cat >>confdefs.h <<_ACEOF -#define NETSNMP_AGENTX_SOCKET "$withval" -_ACEOF +## +# Project: Library: Security configuration +## -# -# feature addition/removal and minimialist support -# -FEATURE_ADD_FLAGS="" +# Check whether --enable-des was given. +if test ${enable_des+y} +then : + enableval=$enable_des; +fi -# Check whether --with-features was given. -if test "${with_features+set}" = set; then : - withval=$with_features; - if test "$withval" = yes; then - as_fn_error $? " Please provide a list of features " "$LINENO" 5; - fi - FEATURE_ADD_FLAGS="--add $withval" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding in features: $withval" >&5 -$as_echo "adding in features: $withval" >&6; } +# Check whether --with-des was given. +if test ${with_des+y} +then : + withval=$with_des; as_fn_error $? "Invalid option. Use --enable-des/--disable-des instead" "$LINENO" 5 fi - # Check whether --enable-features was given. -if test "${enable_features+set}" = set; then : - enableval=$enable_features; as_fn_error $? "Invalid option. Use --with-features/--without-features instead" "$LINENO" 5 -fi +if test "x$enable_des" = "xno"; then +printf "%s\n" "#define NETSNMP_DISABLE_DES 1" >>confdefs.h +fi +# Check whether --enable-privacy was given. +if test ${enable_privacy+y} +then : + enableval=$enable_privacy; +fi -FEATURE_REMOVE_FLAGS="" -# Check whether --with-out-features was given. -if test "${with_out_features+set}" = set; then : - withval=$with_out_features; - if test "$withval" = yes; then - as_fn_error $? " Please provide a list of features " "$LINENO" 5; - fi - FEATURE_REMOVE_FLAGS="--remove $withval" - FEATURETARGS="features" +# Check whether --with-privacy was given. +if test ${with_privacy+y} +then : + withval=$with_privacy; as_fn_error $? "Invalid option. Use --enable-privacy/--disable-privacy instead" "$LINENO" 5 +fi -$as_echo "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h +if test "x$enable_privacy" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: removing features: $withval" >&5 -$as_echo "removing features: $withval" >&6; } +printf "%s\n" "#define NETSNMP_ENABLE_SCAPI_AUTHPRIV 1" >>confdefs.h fi - # Check whether --enable-out-features was given. -if test "${enable_out_features+set}" = set; then : - enableval=$enable_out_features; as_fn_error $? "Invalid option. Use --with-out-features/--without-out-features instead" "$LINENO" 5 +# Check whether --enable-md5 was given. +if test ${enable_md5+y} +then : + enableval=$enable_md5; fi +# Check whether --with-md5 was given. +if test ${with_md5+y} +then : + withval=$with_md5; as_fn_error $? "Invalid option. Use --enable-md5/--disable-md5 instead" "$LINENO" 5 +fi +if test "x$enable_md5" = "xno"; then -# Catch common mistakes +printf "%s\n" "#define NETSNMP_DISABLE_MD5 1" >>confdefs.h -# Check whether --with-feature was given. -if test "${with_feature+set}" = set; then : - withval=$with_feature; as_fn_error $? "Invalid option. Use --with-features/--without-features instead" "$LINENO" 5 fi - -# Check whether --with-out-feature was given. -if test "${with_out_feature+set}" = set; then : - withval=$with_out_feature; as_fn_error $? "Invalid option. Use --with-out-features/--without-out-features instead" "$LINENO" 5 +# Check whether --enable-internal-md5 was given. +if test ${enable_internal_md5+y} +then : + enableval=$enable_internal_md5; fi -FEATURETARGS="" -# Check whether --enable-minimalist was given. -if test "${enable_minimalist+set}" = set; then : - enableval=$enable_minimalist; +# Check whether --with-internal-md5 was given. +if test ${with_internal_md5+y} +then : + withval=$with_internal_md5; as_fn_error $? "Invalid option. Use --enable-internal-md5/--disable-internal-md5 instead" "$LINENO" 5 fi +if test "x$enable_internal_md5" = "xyes"; then + if test "x$enable_md5" = "xno"; then + as_fn_error $? "You can not specify both --enable-internal-md5 and --disable-md5" "$LINENO" 5 + else -# Check whether --with-minimalist was given. -if test "${with_minimalist+set}" = set; then : - withval=$with_minimalist; as_fn_error $? "Invalid option. Use --enable-minimalist/--disable-minimalist instead" "$LINENO" 5 -fi +printf "%s\n" "#define NETSNMP_USE_INTERNAL_MD5 1" >>confdefs.h -if test "x$enable_minimalist" = "xyes"; then - # we'll assume the mini agent is desired here as well - mini_agent="yes" - FEATURETARGS="features" + fi +fi - # needed to bootstrap later checks - echo "" > include/net-snmp/feature-details.h +# Check whether --enable-blumenthal-aes was given. +if test ${enable_blumenthal_aes+y} +then : + enableval=$enable_blumenthal_aes; +fi -$as_echo "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h -else - FEATUREHEADERS="" +# Check whether --with-blumenthal-aes was given. +if test ${with_blumenthal_aes+y} +then : + withval=$with_blumenthal_aes; as_fn_error $? "Invalid option. Use --enable-blumenthal-aes/--disable-blumenthal-aes instead" "$LINENO" 5 fi -# Check whether --with-minimalist was given. -if test "${with_minimalist+set}" = set; then : - withval=$with_minimalist; as_fn_error $? "Invalid option. Use --enable-minimalist/--disable-minimalist instead" "$LINENO" 5 -fi +if test "x$enable_blumenthal_aes" = "xyes"; then + if test "x$aes_capable" = "xyes"; then +printf "%s\n" "#define NETSNMP_DRAFT_BLUMENTHAL_AES_04 1" >>confdefs.h + else + as_fn_error $? "Blumenthal draft requires OpenSSL with AES functions enabled" "$LINENO" 5 + fi +fi -# Check whether --enable-notify-only was given. -if test "${enable_notify_only+set}" = set; then : - enableval=$enable_notify_only; -fi +## +# Project: Library: Misc configuration +## -# Check whether --with-notify-only was given. -if test "${with_notify_only+set}" = set; then : - withval=$with_notify_only; as_fn_error $? "Invalid option. Use --enable-notify-only/--disable-notify-only instead" "$LINENO" 5 +# Check whether --with-opaque-special-types was given. +if test ${with_opaque_special_types+y} +then : + withval=$with_opaque_special_types; fi -if test "x$enable_notify_only" = "xyes"; then + # Check whether --enable-opaque-special-types was given. +if test ${enable_opaque_special_types+y} +then : + enableval=$enable_opaque_special_types; as_fn_error $? "Invalid option. Use --with-opaque-special-types/--without-opaque-special-types instead" "$LINENO" 5 +fi -$as_echo "#define NETSNMP_NOTIFY_ONLY 1" >>confdefs.h +# Only define if specifically chosen as --without (i.e., default to true). +if test "x$with_opaque_special_types" != "xno"; then -fi +printf "%s\n" "#define NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 1" >>confdefs.h -# Check whether --with-notify-only was given. -if test "${with_notify_only+set}" = set; then : - withval=$with_notify_only; as_fn_error $? "Invalid option. Use --enable-notify-only/--disable-notify-only instead" "$LINENO" 5 fi -# Check whether --enable-notifyonly was given. -if test "${enable_notifyonly+set}" = set; then : - enableval=$enable_notifyonly; as_fn_error $? "Invalid option. Use --enable-notify-only/--disable-notify-only instead" "$LINENO" 5 +# Check whether --enable-ipv6 was given. +if test ${enable_ipv6+y} +then : + enableval=$enable_ipv6; +else $as_nop + enable_ipv6="yes" fi -# Check whether --enable-no-listen was given. -if test "${enable_no_listen+set}" = set; then : - enableval=$enable_no_listen; +# Check whether --with-ipv6 was given. +if test ${with_ipv6+y} +then : + withval=$with_ipv6; as_fn_error $? "Invalid option. Use --enable-ipv6/--disable-ipv6 instead" "$LINENO" 5 fi +if test "x$enable_ipv6" != "xno"; then -# Check whether --with-no-listen was given. -if test "${with_no_listen+set}" = set; then : - withval=$with_no_listen; as_fn_error $? "Invalid option. Use --enable-no-listen/--disable-no-listen instead" "$LINENO" 5 -fi +printf "%s\n" "#define NETSNMP_ENABLE_IPV6 1" >>confdefs.h -if test "x$enable_no_listen" = "xyes" -o "x$enable_notify_only" = "xyes"; then - enable_no_listen="yes" +fi -$as_echo "#define NETSNMP_NO_LISTEN_SUPPORT 1" >>confdefs.h +# Check whether --with-logfile was given. +if test ${with_logfile+y} +then : + withval=$with_logfile; ac_cv_user_prompt_NETSNMP_LOGFILE="$with_logfile" fi -# Check whether --with-no-listen was given. -if test "${with_no_listen+set}" = set; then : - withval=$with_no_listen; as_fn_error $? "Invalid option. Use --enable-no-listen/--disable-no-listen instead" "$LINENO" 5 + # Check whether --enable-logfile was given. +if test ${enable_logfile+y} +then : + enableval=$enable_logfile; as_fn_error $? "Invalid option. Use --with-logfile/--without-logfile instead" "$LINENO" 5 fi -# Check whether --enable-nolisten was given. -if test "${enable_nolisten+set}" = set; then : - enableval=$enable_nolisten; as_fn_error $? "Invalid option. Use --enable-no-listen/--disable-no-listen instead" "$LINENO" 5 +if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" = "no"; then + ac_cv_user_prompt_NETSNMP_LOGFILE="none" fi +# Check whether --enable-usmUser-uses-default-auth-priv was given. +if test ${enable_usmUser_uses_default_auth_priv+y} +then : + enableval=$enable_usmUser_uses_default_auth_priv; if test "x$enable_usmUser_uses_default_auth_priv" = "xyes"; then -# Check whether --enable-read-only was given. -if test "${enable_read_only+set}" = set; then : - enableval=$enable_read_only; +printf "%s\n" "#define NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV 1" >>confdefs.h + + fi fi -# Check whether --with-read-only was given. -if test "${with_read_only+set}" = set; then : - withval=$with_read_only; as_fn_error $? "Invalid option. Use --enable-read-only/--disable-read-only instead" "$LINENO" 5 +# Check whether --with-usmUser-uses-default-auth-priv was given. +if test ${with_usmUser_uses_default_auth_priv+y} +then : + withval=$with_usmUser_uses_default_auth_priv; as_fn_error $? "Invalid option. Use --enable-usmUser-uses-default-auth-priv/--disable-usmUser-uses-default-auth-priv instead" "$LINENO" 5 fi -if test "x$enable_read_only" = "xyes" -o "x$enable_notify_only" = "xyes" ; then - enable_read_only="yes" -$as_echo "#define NETSNMP_NO_WRITE_SUPPORT 1" >>confdefs.h +# Check whether --enable-daemons-syslog-as-default was given. +if test ${enable_daemons_syslog_as_default+y} +then : + enableval=$enable_daemons_syslog_as_default; if test "x$enable_daemons_syslog_as_default" = "xyes"; then -fi +printf "%s\n" "#define NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG 1" >>confdefs.h -# Check whether --with-read-only was given. -if test "${with_read_only+set}" = set; then : - withval=$with_read_only; as_fn_error $? "Invalid option. Use --enable-read-only/--disable-read-only instead" "$LINENO" 5 + fi fi -# Check whether --enable-readonly was given. -if test "${enable_readonly+set}" = set; then : - enableval=$enable_readonly; as_fn_error $? "Invalid option. Use --enable-read-only/--disable-read-only instead" "$LINENO" 5 -fi +# Check whether --with-daemons-syslog-as-default was given. +if test ${with_daemons_syslog_as_default+y} +then : + withval=$with_daemons_syslog_as_default; as_fn_error $? "Invalid option. Use --enable-daemons-syslog-as-default/--disable-daemons-syslog-as-default instead" "$LINENO" 5 +fi -## -# Project: Agent: MIB module configuration -## -# Check whether --enable-mini_agent was given. -if test "${enable_mini_agent+set}" = set; then : - enableval=$enable_mini_agent; +# Check whether --with-persistent-directory was given. +if test ${with_persistent_directory+y} +then : + withval=$with_persistent_directory; ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY="$with_persistent_directory" fi - -# Check whether --with-mini_agent was given. -if test "${with_mini_agent+set}" = set; then : - withval=$with_mini_agent; as_fn_error $? "Invalid option. Use --enable-mini_agent/--disable-mini_agent instead" "$LINENO" 5 + # Check whether --enable-persistent-directory was given. +if test ${enable_persistent_directory+y} +then : + enableval=$enable_persistent_directory; as_fn_error $? "Invalid option. Use --with-persistent-directory/--without-persistent-directory instead" "$LINENO" 5 fi -if test "x$enable_mini_agent" = "xyes"; then - mini_agent="yes" -else - mini_agent="no" -fi -# Check whether --with-miniagent was given. -if test "${with_miniagent+set}" = set; then : - withval=$with_miniagent; as_fn_error $? "Invalid option. Use --enable-mini-agent/--disable-mini-agent instead" "$LINENO" 5 + +# Check whether --with-persistent-mask was given. +if test ${with_persistent_mask+y} +then : + withval=$with_persistent_mask; if test `expr "X$withval" : 'X[0-7]*$'` -eq 4 ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using persistent mask $withval" >&5 +printf "%s\n" "using persistent mask $withval" >&6; } + withval="0$withval" + else + as_fn_error $? "Please provide a three digit octal persistent mask value" "$LINENO" 5 + fi +else $as_nop + withval=077 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default persistent mask $withval" >&5 +printf "%s\n" "using default persistent mask $withval" >&6; } fi -# Check whether --enable-miniagent was given. -if test "${enable_miniagent+set}" = set; then : - enableval=$enable_miniagent; as_fn_error $? "Invalid option. Use --enable-mini-agent/--disable-mini-agent instead" "$LINENO" 5 + # Check whether --enable-persistent-mask was given. +if test ${enable_persistent_mask+y} +then : + enableval=$enable_persistent_mask; as_fn_error $? "Invalid option. Use --with-persistent-mask/--without-persistent-mask instead" "$LINENO" 5 fi +printf "%s\n" "#define NETSNMP_PERSISTENT_MASK $withval" >>confdefs.h -# Check whether --enable-mfd-rewrites was given. -if test "${enable_mfd_rewrites+set}" = set; then : - enableval=$enable_mfd_rewrites; +# Check whether --with-copy_persistent_files was given. +if test ${with_copy_persistent_files+y} +then : + withval=$with_copy_persistent_files; ac_cv_user_prompt_COPY_PERSISTENT_FILES="$with_copy_persistent_files" fi - -# Check whether --with-mfd-rewrites was given. -if test "${with_mfd_rewrites+set}" = set; then : - withval=$with_mfd_rewrites; as_fn_error $? "Invalid option. Use --enable-mfd-rewrites/--disable-mfd-rewrites instead" "$LINENO" 5 + # Check whether --enable-copy_persistent_files was given. +if test ${enable_copy_persistent_files+y} +then : + enableval=$enable_copy_persistent_files; as_fn_error $? "Invalid option. Use --with-copy_persistent_files/--without-copy_persistent_files instead" "$LINENO" 5 fi -if test "x$enable_mfd_rewrites" = "xyes"; then -$as_echo "#define NETSNMP_ENABLE_MFD_REWRITES 1" >>confdefs.h +default_temp_file_pattern="/tmp/snmpdXXXXXX" +# Check whether --with-temp-file-pattern was given. +if test ${with_temp_file_pattern+y} +then : + withval=$with_temp_file_pattern; if test `expr "X$withval" : ".*XXXXXX$"` -ne 0 ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using temporary file pattern $withval" >&5 +printf "%s\n" "using temporary file pattern $withval" >&6; } + else + as_fn_error $? "temporary file pattens must end with 6 X's" "$LINENO" 5 + fi +else $as_nop + withval="$default_temp_file_pattern" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default temporary file pattern $withval" >&5 +printf "%s\n" "using default temporary file pattern $withval" >&6; } fi + # Check whether --enable-temp-file-pattern was given. +if test ${enable_temp_file_pattern+y} +then : + enableval=$enable_temp_file_pattern; as_fn_error $? "Invalid option. Use --with-temp-file-pattern/--without-temp-file-pattern instead" "$LINENO" 5 +fi -# Check whether --with-mib_modules was given. -if test "${with_mib_modules+set}" = set; then : - withval=$with_mib_modules; -fi +printf "%s\n" "#define NETSNMP_TEMP_FILE_PATTERN \"$withval\"" >>confdefs.h - # Check whether --enable-mib_modules was given. -if test "${enable_mib_modules+set}" = set; then : - enableval=$enable_mib_modules; as_fn_error $? "Invalid option. Use --with-mib_modules/--without-mib_modules instead" "$LINENO" 5 -fi +## +# Project: Library: Version configuration +## -# Check whether --with-out_mib_modules was given. -if test "${with_out_mib_modules+set}" = set; then : - withval=$with_out_mib_modules; +SNMP_VERSIONS="" +# Check whether --enable-snmpv1 was given. +if test ${enable_snmpv1+y} +then : + enableval=$enable_snmpv1; fi - # Check whether --enable-out_mib_modules was given. -if test "${enable_out_mib_modules+set}" = set; then : - enableval=$enable_out_mib_modules; as_fn_error $? "Invalid option. Use --with-out_mib_modules/--without-out_mib_modules instead" "$LINENO" 5 + +# Check whether --with-snmpv1 was given. +if test ${with_snmpv1+y} +then : + withval=$with_snmpv1; as_fn_error $? "Invalid option. Use --enable-snmpv1/--disable-snmpv1 instead" "$LINENO" 5 fi +if test "x$enable_snmpv1" = "xno"; then +printf "%s\n" "#define NETSNMP_DISABLE_SNMPV1 1" >>confdefs.h -# -# Catch common mistakes in configure options -# +else + SNMP_VERSIONS="$SNMP_VERSIONS 1" +fi -# Check whether --with-mib-module was given. -if test "${with_mib_module+set}" = set; then : - withval=$with_mib_module; as_fn_error $? "Invalid option. Use --with-mib-modules/--without-mib-modules instead" "$LINENO" 5 +# Check whether --enable-snmpv2c was given. +if test ${enable_snmpv2c+y} +then : + enableval=$enable_snmpv2c; fi -# Check whether --with-module was given. -if test "${with_module+set}" = set; then : - withval=$with_module; as_fn_error $? "Invalid option. Use --with-mib-modules/--without-mib-modules instead" "$LINENO" 5 +# Check whether --with-snmpv2c was given. +if test ${with_snmpv2c+y} +then : + withval=$with_snmpv2c; as_fn_error $? "Invalid option. Use --enable-snmpv2c/--disable-snmpv2c instead" "$LINENO" 5 fi +if test "x$enable_snmpv2c" = "xno"; then + +printf "%s\n" "#define NETSNMP_DISABLE_SNMPV2C 1" >>confdefs.h -# Check whether --with-modules was given. -if test "${with_modules+set}" = set; then : - withval=$with_modules; as_fn_error $? "Invalid option. Use --with-mib-modules/--without-mib-modules instead" "$LINENO" 5 +else + SNMP_VERSIONS="$SNMP_VERSIONS 2c" fi +SNMP_VERSIONS="$SNMP_VERSIONS 3" + cat >> configure-summary << EOF + SNMP Versions Supported: $SNMP_VERSIONS +EOF -# Check whether --with-out-mib-module was given. -if test "${with_out_mib_module+set}" = set; then : - withval=$with_out_mib_module; as_fn_error $? "Invalid option. Use --with-out-mib-modules/--without-out-mib-modules instead" "$LINENO" 5 -fi -# Check whether --with-out-module was given. -if test "${with_out_module+set}" = set; then : - withval=$with_out_module; as_fn_error $? "Invalid option. Use --with-out-mib-modules/--without-out-mib-modules instead" "$LINENO" 5 +# Check whether --with-default-snmp-version was given. +if test ${with_default_snmp_version+y} +then : + withval=$with_default_snmp_version; ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION="$with_default_snmp_version" fi - -# Check whether --with-out-modules was given. -if test "${with_out_modules+set}" = set; then : - withval=$with_out_modules; as_fn_error $? "Invalid option. Use --with-out-mib-modules/--without-out-mib-modules instead" "$LINENO" 5 + # Check whether --enable-default-snmp-version was given. +if test ${enable_default_snmp_version+y} +then : + enableval=$enable_default_snmp_version; as_fn_error $? "Invalid option. Use --with-default-snmp-version/--without-default-snmp-version instead" "$LINENO" 5 fi +# we test this now and later as well. we test it now so configure can die +# early on with an error rather than waiting till the end of the script. +case "${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION-3}" in + [123]) ;; + 2c) ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=2 ;; + *) + as_fn_error $? "Illegal version number. Only 1, 2 (for SNMPv2c) and 3 are supported." "$LINENO" 5 + ;; +esac + ## -# Project: Enterprise settings (? Agent/Library/Both?) +# Project: Library: Transport modules ## -# Check whether --with-enterprise-oid was given. -if test "${with_enterprise_oid+set}" = set; then : - withval=$with_enterprise_oid; - if test "$withval" = yes; then - as_fn_error $? " Please provide a value for the enterprise number " "$LINENO" 5; - fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_ENTERPRISE_OID $withval -_ACEOF - - ent_oid="1,3,6,1,4,1,$withval" - cat >>confdefs.h <<_ACEOF -#define NETSNMP_ENTERPRISE_MIB $ent_oid -_ACEOF +# Check whether --with-transports was given. +if test ${with_transports+y} +then : + withval=$with_transports; +fi - ent_dot_oid="1.3.6.1.4.1.$withval" - cat >>confdefs.h <<_ACEOF -#define NETSNMP_ENTERPRISE_DOT_MIB $ent_dot_oid -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using enterprise number $withval" >&5 -$as_echo "using enterprise number $withval" >&6; } +# Check whether --with-out_transports was given. +if test ${with_out_transports+y} +then : + withval=$with_out_transports; +fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default \"enterprise.net-snmp\"" >&5 -$as_echo "using default \"enterprise.net-snmp\"" >&6; } +# +# Catch common mistakes in transport options +# +# Check whether --with-transport was given. +if test ${with_transport+y} +then : + withval=$with_transport; as_fn_error $? "Invalid option. Use --with-transports/--without-transports instead" "$LINENO" 5 fi - # Check whether --enable-enterprise-oid was given. -if test "${enable_enterprise_oid+set}" = set; then : - enableval=$enable_enterprise_oid; as_fn_error $? "Invalid option. Use --with-enterprise-oid/--without-enterprise-oid instead" "$LINENO" 5 + +# Check whether --with-out-transport was given. +if test ${with_out_transport+y} +then : + withval=$with_out_transport; as_fn_error $? "Invalid option. Use --with-out-transports/--without-out-transports instead" "$LINENO" 5 fi -# Check whether --with-enterprise-sysoid was given. -if test "${with_enterprise_sysoid+set}" = set; then : - withval=$with_enterprise_sysoid; - if test "$withval" = yes; then - as_fn_error $? " Please provide a base OID value " "$LINENO" 5; - fi - sys_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_MIB $sys_oid -_ACEOF +## +# Project: Library: Security modules +## - sys_dot_oid=`echo "$withval" | sed 's/^\.//'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_DOT_MIB $sys_dot_oid -_ACEOF - sysoid_len=`echo "$withval" | sed 's/^\.//g' | awk -F\. '{ print NF }'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_DOT_MIB_LENGTH $sysoid_len -_ACEOF +# Check whether --with-security-modules was given. +if test ${with_security_modules+y} +then : + withval=$with_security_modules; +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using enterprise sysOID $withval ...." >&5 -$as_echo "using enterprise sysOID $withval ...." >&6; } + # Check whether --enable-security-modules was given. +if test ${enable_security_modules+y} +then : + enableval=$enable_security_modules; as_fn_error $? "Invalid option. Use --with-security-modules/--without-security-modules instead" "$LINENO" 5 +fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default enterprise sysOID \"NET-SNMP-MIB::netSnmpAgentOIDs...\"" >&5 -$as_echo "using default enterprise sysOID \"NET-SNMP-MIB::netSnmpAgentOIDs...\"" >&6; } +# Check whether --with-out-security-modules was given. +if test ${with_out_security_modules+y} +then : + withval=$with_out_security_modules; fi - # Check whether --enable-enterprise-sysoid was given. -if test "${enable_enterprise_sysoid+set}" = set; then : - enableval=$enable_enterprise_sysoid; as_fn_error $? "Invalid option. Use --with-enterprise-sysoid/--without-enterprise-sysoid instead" "$LINENO" 5 + # Check whether --enable-out-security-modules was given. +if test ${enable_out_security_modules+y} +then : + enableval=$enable_out_security_modules; as_fn_error $? "Invalid option. Use --with-out-security-modules/--without-out-security-modules instead" "$LINENO" 5 fi -# Check whether --with-enterprise-notification-oid was given. -if test "${with_enterprise_notification_oid+set}" = set; then : - withval=$with_enterprise_notification_oid; - if test "$withval" = yes; then - as_fn_error $? " Please provide a base OID value " "$LINENO" 5; - fi - notification_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_NOTIFICATION_MIB $notification_oid -_ACEOF +## +# Project: Library: Developer-related settings +## - notification_dot_oid=`echo "$withval" | sed 's/^\.//'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_NOTIFICATION_DOT_MIB $notification_dot_oid -_ACEOF +# Check whether --enable-debugging was given. +if test ${enable_debugging+y} +then : + enableval=$enable_debugging; printf "%s\n" "#define NETSNMP_ALWAYS_DEBUG 1" >>confdefs.h - notificationoid_len=`echo "$withval" | sed 's/^\.//g' | awk -F\. '{ print NF }'` - cat >>confdefs.h <<_ACEOF -#define NETSNMP_NOTIFICATION_DOT_MIB_LENGTH $notificationoid_len -_ACEOF +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using enterprise notifications $withval" >&5 -$as_echo "using enterprise notifications $withval" >&6; } -else +# Check whether --with-debugging was given. +if test ${with_debugging+y} +then : + withval=$with_debugging; as_fn_error $? "Invalid option. Use --enable-debugging/--disable-debugging instead" "$LINENO" 5 +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default notifications \"NET-SNMP-MIB::netSnmpNotifications\"" >&5 -$as_echo "using default notifications \"NET-SNMP-MIB::netSnmpNotifications\"" >&6; } +if test "x$enable_debugging" = "xno"; then + printf "%s\n" "#define NETSNMP_NO_DEBUGGING 1" >>confdefs.h fi - # Check whether --enable-enterprise-notification-oid was given. -if test "${enable_enterprise_notification_oid+set}" = set; then : - enableval=$enable_enterprise_notification_oid; as_fn_error $? "Invalid option. Use --with-enterprise-notification-oid/--without-enterprise-notification-oid instead" "$LINENO" 5 +# Check whether --enable-developer was given. +if test ${enable_developer+y} +then : + enableval=$enable_developer; if test "$enableval" = yes ; then + developer="yes" + elif test "$enableval" != no ; then + as_fn_error $? "Please use --enable/--disable-developer" "$LINENO" 5 + else + developer="no" + fi fi - -## -# Project: Perl settings -## +# Check whether --with-developer was given. +if test ${with_developer+y} +then : + withval=$with_developer; as_fn_error $? "Invalid option. Use --enable-developer/--disable-developer instead" "$LINENO" 5 +fi -# Check whether --with-perl-modules was given. -if test "${with_perl_modules+set}" = set; then : - withval=$with_perl_modules; - if test "$withval" = "no"; then - install_perl="no" - else - install_perl="yes" - if test "$withval" != "yes"; then - PERLARGS="$withval" - fi - fi +# Check whether --enable-testing-code was given. +if test ${enable_testing_code+y} +then : + enableval=$enable_testing_code; if test "$enableval" = yes ; then -else - install_perl="try" -fi +printf "%s\n" "#define NETSNMP_ENABLE_TESTING_CODE 1" >>confdefs.h - # Check whether --enable-perl-modules was given. -if test "${enable_perl_modules+set}" = set; then : - enableval=$enable_perl_modules; as_fn_error $? "Invalid option. Use --with-perl-modules/--without-perl-modules instead" "$LINENO" 5 + elif test "$enableval" != no ; then + as_fn_error $? "Please use --enable/--disable-testing-code" "$LINENO" 5 + fi fi -# Check whether --enable-embedded-perl was given. -if test "${enable_embedded_perl+set}" = set; then : - enableval=$enable_embedded_perl; embed_perl="$enableval" -else - embed_perl="try" +# Check whether --with-testing-code was given. +if test ${with_testing_code+y} +then : + withval=$with_testing_code; as_fn_error $? "Invalid option. Use --enable-testing-code/--disable-testing-code instead" "$LINENO" 5 fi -# Check whether --with-embedded-perl was given. -if test "${with_embedded_perl+set}" = set; then : - withval=$with_embedded_perl; as_fn_error $? "Invalid option. Use --enable-embedded-perl/--disable-embedded-perl instead" "$LINENO" 5 +# Check whether --enable-reentrant was given. +if test ${enable_reentrant+y} +then : + enableval=$enable_reentrant; if test "$enableval" = yes -o "$enableval" = no ; then + with_res_locks="$enableval" + else + as_fn_error $? "Please use --enable/--disable-reentrant" "$LINENO" 5 + fi +else $as_nop + with_res_locks="no" fi -# Check whether --enable-perl-cc-checks was given. -if test "${enable_perl_cc_checks+set}" = set; then : - enableval=$enable_perl_cc_checks; +# Check whether --with-reentrant was given. +if test ${with_reentrant+y} +then : + withval=$with_reentrant; as_fn_error $? "Invalid option. Use --enable-reentrant/--disable-reentrant instead" "$LINENO" 5 fi -# Check whether --with-perl-cc-checks was given. -if test "${with_perl_cc_checks+set}" = set; then : - withval=$with_perl_cc_checks; as_fn_error $? "Invalid option. Use --enable-perl-cc-checks/--disable-perl-cc-checks instead" "$LINENO" 5 +# Check whether --enable-deprecated was given. +if test ${enable_deprecated+y} +then : + enableval=$enable_deprecated; fi +# Check whether --with-deprecated was given. +if test ${with_deprecated+y} +then : + withval=$with_deprecated; as_fn_error $? "Invalid option. Use --enable-deprecated/--disable-deprecated instead" "$LINENO" 5 +fi -## -# Project: Python settings -## - +if test "$enable_deprecated" = no ; then -# Check whether --with-python-modules was given. -if test "${with_python_modules+set}" = set; then : - withval=$with_python_modules; - install_python="yes" - if test "$withval" = "yes"; then - PYTHONARGS="" - elif test "$withval" = "no"; then - PYTHONARGS="" - install_python="no" - else - PYTHONARGS="$withval" - fi +printf "%s\n" "#define NETSNMP_NO_DEPRECATED_FUNCTIONS 1" >>confdefs.h -else - install_python="no" fi ## -# Project: Library settings +# Project: Agent configuration settings ## -# Check whether --with-server-send-buf was given. -if test "${with_server_send_buf+set}" = set; then : - withval=$with_server_send_buf; - if test "$withval" = yes; then - as_fn_error $? " Please provide a positive number for the server send buffer " "$LINENO" 5 - fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SERVER_SEND_BUF $withval -_ACEOF - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OS default send buffer size for server sockets" >&5 -$as_echo "using OS default send buffer size for server sockets" >&6; } +# Check whether --with-root-access was given. +if test ${with_root_access+y} +then : + withval=$with_root_access; fi - # Check whether --enable-server-send-buf was given. -if test "${enable_server_send_buf+set}" = set; then : - enableval=$enable_server_send_buf; as_fn_error $? "Invalid option. Use --with-server-send-buf/--without-server-send-buf instead" "$LINENO" 5 + # Check whether --enable-root-access was given. +if test ${enable_root_access+y} +then : + enableval=$enable_root_access; as_fn_error $? "Invalid option. Use --with-root-access/--without-root-access instead" "$LINENO" 5 fi +# Only define if specifically chosen as --without (i.e., default to true). +if test "x$with_root_access" = "xno"; then +printf "%s\n" "#define NETSNMP_NO_ROOT_ACCESS 1" >>confdefs.h -# Check whether --with-server-recv-buf was given. -if test "${with_server_recv_buf+set}" = set; then : - withval=$with_server_recv_buf; - if test "$withval" = yes; then - as_fn_error $? " Please provide a positive number for the server recv buffer " "$LINENO" 5 - fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SERVER_RECV_BUF $withval -_ACEOF +fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OS default recv buffer size for server sockets" >&5 -$as_echo "using OS default recv buffer size for server sockets" >&6; } + +# Check whether --with-kmem-usage was given. +if test ${with_kmem_usage+y} +then : + withval=$with_kmem_usage; fi - # Check whether --enable-server-recv-buf was given. -if test "${enable_server_recv_buf+set}" = set; then : - enableval=$enable_server_recv_buf; as_fn_error $? "Invalid option. Use --with-server-recv-buf/--without-server-recv-buf instead" "$LINENO" 5 + # Check whether --enable-kmem-usage was given. +if test ${enable_kmem_usage+y} +then : + enableval=$enable_kmem_usage; as_fn_error $? "Invalid option. Use --with-kmem-usage/--without-kmem-usage instead" "$LINENO" 5 fi +# Only define if specifically chosen as --without (i.e., default to true). +if test "x$with_kmem_usage" = "xno"; then +printf "%s\n" "#define NETSNMP_NO_KMEM_USAGE 1" >>confdefs.h -# Check whether --with-client-send-buf was given. -if test "${with_client_send_buf+set}" = set; then : - withval=$with_client_send_buf; - if test "$withval" = yes; then - as_fn_error $? " Please provide a positive number for the client send buffer " "$LINENO" 5 - fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_CLIENT_SEND_BUF $withval -_ACEOF +fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OS default send buffer size for client sockets" >&5 -$as_echo "using OS default send buffer size for client sockets" >&6; } + +# Check whether --with-dummy-values was given. +if test ${with_dummy_values+y} +then : + withval=$with_dummy_values; fi - # Check whether --enable-client-send-buf was given. -if test "${enable_client_send_buf+set}" = set; then : - enableval=$enable_client_send_buf; as_fn_error $? "Invalid option. Use --with-client-send-buf/--without-client-send-buf instead" "$LINENO" 5 + # Check whether --enable-dummy-values was given. +if test ${enable_dummy_values+y} +then : + enableval=$enable_dummy_values; as_fn_error $? "Invalid option. Use --with-dummy-values/--without-dummy-values instead" "$LINENO" 5 fi +# Define unless specifically suppressed (i.e., option defaults to false). +if test "x$with_dummy_values" != "xyes"; then +printf "%s\n" "#define NETSNMP_NO_DUMMY_VALUES 1" >>confdefs.h -# Check whether --with-client-recv-buf was given. -if test "${with_client_recv_buf+set}" = set; then : - withval=$with_client_recv_buf; - if test "$withval" = yes; then - as_fn_error $? " Please provide a positive number for the client recv buffer " "$LINENO" 5 - fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_CLIENT_RECV_BUF $withval -_ACEOF +fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OS default recv buffer size for client sockets" >&5 -$as_echo "using OS default recv buffer size for client sockets" >&6; } + +# Check whether --with-systemd was given. +if test ${with_systemd+y} +then : + withval=$with_systemd; fi - # Check whether --enable-client-recv-buf was given. -if test "${enable_client_recv_buf+set}" = set; then : - enableval=$enable_client_recv_buf; as_fn_error $? "Invalid option. Use --with-client-recv-buf/--without-client-recv-buf instead" "$LINENO" 5 + # Check whether --enable-systemd was given. +if test ${enable_systemd+y} +then : + enableval=$enable_systemd; as_fn_error $? "Invalid option. Use --with-systemd/--without-systemd instead" "$LINENO" 5 fi +# Define unless specifically suppressed (i.e., option defaults to false). +if test "x$with_systemd" != "xyes"; then -## -# System: library settings (more) -## +printf "%s\n" "#define NETSNMP_NO_SYSTEMD 1" >>confdefs.h +fi -# Check whether --with-elf was given. -if test "${with_elf+set}" = set; then : - withval=$with_elf; +# Check whether --enable-set-support was given. +if test ${enable_set_support+y} +then : + enableval=$enable_set_support; fi - # Check whether --enable-elf was given. -if test "${enable_elf+set}" = set; then : - enableval=$enable_elf; as_fn_error $? "Invalid option. Use --with-elf/--without-elf instead" "$LINENO" 5 + +# Check whether --with-set-support was given. +if test ${with_set_support+y} +then : + withval=$with_set_support; as_fn_error $? "Invalid option. Use --enable-set-support/--disable-set-support instead" "$LINENO" 5 fi +if test "x$enable_set_support" = "xno"; then +printf "%s\n" "#define NETSNMP_DISABLE_SET_SUPPORT 1" >>confdefs.h -# Check whether --with-nl was given. -if test "${with_nl+set}" = set; then : - withval=$with_nl; fi - # Check whether --enable-nl was given. -if test "${enable_nl+set}" = set; then : - enableval=$enable_nl; as_fn_error $? "Invalid option. Use --with-nl/--without-nl instead" "$LINENO" 5 -fi +# Check whether --with-sys_contact was given. +if test ${with_sys_contact+y} +then : + withval=$with_sys_contact; ac_cv_user_prompt_NETSNMP_SYS_CONTACT="$with_sys_contact" +fi -# Check whether --with-libwrap was given. -if test "${with_libwrap+set}" = set; then : - withval=$with_libwrap; -else - with_libwrap="no" + # Check whether --enable-sys_contact was given. +if test ${enable_sys_contact+y} +then : + enableval=$enable_sys_contact; as_fn_error $? "Invalid option. Use --with-sys_contact/--without-sys_contact instead" "$LINENO" 5 fi - # Check whether --enable-libwrap was given. -if test "${enable_libwrap+set}" = set; then : - enableval=$enable_libwrap; as_fn_error $? "Invalid option. Use --with-libwrap/--without-libwrap instead" "$LINENO" 5 + + +# Check whether --with-sys_location was given. +if test ${with_sys_location+y} +then : + withval=$with_sys_location; ac_cv_user_prompt_NETSNMP_SYS_LOC="$with_sys_location" fi + # Check whether --enable-sys_location was given. +if test ${enable_sys_location+y} +then : + enableval=$enable_sys_location; as_fn_error $? "Invalid option. Use --with-sys_location/--without-sys_location instead" "$LINENO" 5 +fi -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -else - with_zlib="no" + + +## +# Project: Agent: Extensibility configuration +## + +# Check whether --enable-local-smux was given. +if test ${enable_local_smux+y} +then : + enableval=$enable_local_smux; if test "x$enable_local_smux" = "xyes"; then + +printf "%s\n" "#define NETSNMP_ENABLE_LOCAL_SMUX 1" >>confdefs.h + + fi fi - # Check whether --enable-zlib was given. -if test "${enable_zlib+set}" = set; then : - enableval=$enable_zlib; as_fn_error $? "Invalid option. Use --with-zlib/--without-zlib instead" "$LINENO" 5 + +# Check whether --with-local-smux was given. +if test ${with_local_smux+y} +then : + withval=$with_local_smux; as_fn_error $? "Invalid option. Use --enable-local-smux/--disable-local-smux instead" "$LINENO" 5 fi +# Check whether --enable-agentx-dom-sock-only was given. +if test ${enable_agentx_dom_sock_only+y} +then : + enableval=$enable_agentx_dom_sock_only; +printf "%s\n" "#define NETSNMP_AGENTX_DOM_SOCK_ONLY 1" >>confdefs.h -# Check whether --with-bzip2 was given. -if test "${with_bzip2+set}" = set; then : - withval=$with_bzip2; -else - with_bzip2="no" fi +# Check whether --with-agentx-dom-sock-only was given. +if test ${with_agentx_dom_sock_only+y} +then : + withval=$with_agentx_dom_sock_only; as_fn_error $? "Invalid option. Use --enable-agentx-dom-sock-only/--disable-agentx-dom-sock-only instead" "$LINENO" 5 +fi + -# Check whether --with-mnttab was given. -if test "${with_mnttab+set}" = set; then : - withval=$with_mnttab; +# Check whether --enable-snmptrapd-subagent was given. +if test ${enable_snmptrapd_subagent+y} +then : + enableval=$enable_snmptrapd_subagent; fi - # Check whether --enable-mnttab was given. -if test "${enable_mnttab+set}" = set; then : - enableval=$enable_mnttab; as_fn_error $? "Invalid option. Use --with-mnttab/--without-mnttab instead" "$LINENO" 5 + +# Check whether --with-snmptrapd-subagent was given. +if test ${with_snmptrapd_subagent+y} +then : + withval=$with_snmptrapd_subagent; as_fn_error $? "Invalid option. Use --enable-snmptrapd-subagent/--disable-snmptrapd-subagent instead" "$LINENO" 5 fi +if test "x$enable_snmptrapd_subagent" = "xno"; then -## -# Project: mysql -## +printf "%s\n" "#define NETSNMP_SNMPTRAPD_DISABLE_AGENTX 1" >>confdefs.h +fi + +default_agentx_socket="/var/agentx/master" + +# Check whether --with-agentx-socket was given. +if test ${with_agentx_socket+y} +then : + withval=$with_agentx_socket; + if test "$withval" = yes; then + as_fn_error $? " Please provide a full path " "$LINENO" 5; + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using AgentX socket $withval" >&5 +printf "%s\n" "using AgentX socket $withval" >&6; } + +else $as_nop + + withval=$default_agentx_socket + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default AgentX socket $default_agentx_socket" >&5 +printf "%s\n" "using default AgentX socket $default_agentx_socket" >&6; } -# Check whether --with-mysql was given. -if test "${with_mysql+set}" = set; then : - withval=$with_mysql; fi - # Check whether --enable-mysql was given. -if test "${enable_mysql+set}" = set; then : - enableval=$enable_mysql; as_fn_error $? "Invalid option. Use --with-mysql/--without-mysql instead" "$LINENO" 5 + # Check whether --enable-agentx-socket was given. +if test ${enable_agentx_socket+y} +then : + enableval=$enable_agentx_socket; as_fn_error $? "Invalid option. Use --with-agentx-socket/--without-agentx-socket instead" "$LINENO" 5 fi -if test "x$with_mysql" = "xyes"; then -$as_echo "#define NETSNMP_USE_MYSQL 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_AGENTX_SOCKET \"$withval\"" >>confdefs.h -fi -# -*- autoconf -*- # -# Prompt for various bits of user information +# feature addition/removal and minimialist support # +FEATURE_ADD_FLAGS="" -if test "x$ac_cv_user_prompt_NETSNMP_LOGFILE" = "x" -o "x$ac_cv_user_prompt_NETSNMP_SYS_LOC" = "x" -o "x$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" = "x" -o "x$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" = "x"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to prompt for values" >&5 -$as_echo_n "checking whether to prompt for values... " >&6; } -if ${ac_cv_have_warned+:} false; then : - $as_echo_n "(cached) " >&6 -else +# Check whether --with-features was given. +if test ${with_features+y} +then : + withval=$with_features; + if test "$withval" = yes; then + as_fn_error $? " Please provide a list of features " "$LINENO" 5; + fi + FEATURE_ADD_FLAGS="--add $withval" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: adding in features: $withval" >&5 +printf "%s\n" "adding in features: $withval" >&6; } -if test "x$defaults" = "xno"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: +fi - ************** Configuration Section ************** + # Check whether --enable-features was given. +if test ${enable_features+y} +then : + enableval=$enable_features; as_fn_error $? "Invalid option. Use --with-features/--without-features instead" "$LINENO" 5 +fi - You are about to be prompted with a series of questions. Answer -them carefully, as they determine how the SNMP agent and related -applications are to function. - After the configure script finishes, you can browse the newly -created net-snmp-config.h file for further - less important - parameters to -modify. Be careful if you re-run configure though, since net-snmp-config.h -will be overwritten. --Press return to continue- -" >&5 -$as_echo "$as_me: - ************** Configuration Section ************** +FEATURE_REMOVE_FLAGS="" - You are about to be prompted with a series of questions. Answer -them carefully, as they determine how the SNMP agent and related -applications are to function. +# Check whether --with-out-features was given. +if test ${with_out_features+y} +then : + withval=$with_out_features; + if test "$withval" = yes; then + as_fn_error $? " Please provide a list of features " "$LINENO" 5; + fi + FEATURE_REMOVE_FLAGS="--remove $withval" + FEATURETARGS="features" - After the configure script finishes, you can browse the newly -created net-snmp-config.h file for further - less important - parameters to -modify. Be careful if you re-run configure though, since net-snmp-config.h -will be overwritten. +printf "%s\n" "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h --Press return to continue- -" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: removing features: $withval" >&5 +printf "%s\n" "removing features: $withval" >&6; } -read tmpinput <&7 -ac_cv_have_warned="yes" -else - ac_cv_have_warned="no" fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_warned" >&5 -$as_echo "$ac_cv_have_warned" >&6; } -else - ac_cv_have_warned="yes" + # Check whether --enable-out-features was given. +if test ${enable_out_features+y} +then : + enableval=$enable_out_features; as_fn_error $? "Invalid option. Use --with-out-features/--without-out-features instead" "$LINENO" 5 fi -ME=`$WHOAMI` -if test -f /etc/resolv.conf; then - LOC=`awk '/^domain/{loc=$NF}END{print loc}' /etc/resolv.conf` -fi -if test "x$LOC" = x; then - LOC="@no.where" -fi -MSG_CHECK="Default version of SNMP to use" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 -$as_echo_n "checking $MSG_CHECK... " >&6; } -if ${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION+:} false; then : - $as_echo_n "(cached) " >&6 -else - echo "" >&6 -if test "x$defaults" = "xno"; then -echo $ECHO_N " +# Catch common mistakes -*** Default SNMP Version: +# Check whether --with-feature was given. +if test ${with_feature+y} +then : + withval=$with_feature; as_fn_error $? "Invalid option. Use --with-features/--without-features instead" "$LINENO" 5 +fi - Starting with Net-SNMP 5.0, you can choose the default version of -the SNMP protocol to use when no version is given explicitly on the -command line, or via an 'snmp.conf' file. In the past this was set to -SNMPv1, but you can use this to switch to SNMPv3 if desired. SNMPv3 -will provide a more secure management environment (and thus you're -encouraged to switch to SNMPv3), but may break existing scripts that -rely on the old behaviour. (Though such scripts will probably need to -be changed to use the '-c' community flag anyway, as the SNMPv1 -command line usage has changed as well.). - At this prompt you can select \"1\", \"2\" (for SNMPv2c), or \"3\" as -the default version for the command tools (snmpget, ...) to use. This -can always be overridden at runtime using the -v flag to the tools, or -by using the \"defVersion\" token in your snmp.conf file. - Providing the --with-default-snmp-version=\"x\" parameter to ./configure -will avoid this prompt. -Default version of SNMP to use (3): $ECHO_C" -read tmpinput <&7 -if test "$tmpinput" = "" -a "3" != ""; then - tmpinput="3" -fi -eval NETSNMP_DEFAULT_SNMP_VERSION=\"$tmpinput\" -else -tmpinput="3" -eval NETSNMP_DEFAULT_SNMP_VERSION=\"$tmpinput\" +# Check whether --with-out-feature was given. +if test ${with_out_feature+y} +then : + withval=$with_out_feature; as_fn_error $? "Invalid option. Use --with-out-features/--without-out-features instead" "$LINENO" 5 fi -eval ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=\$NETSNMP_DEFAULT_SNMP_VERSION -echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 +FEATURETARGS="" +# Check whether --enable-minimalist was given. +if test ${enable_minimalist+y} +then : + enableval=$enable_minimalist; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" >&5 -$as_echo "$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" >&6; } -if test "$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" != "none"; then - if test "xunquoted" = "xquoted" -o "xunquoted" = "xQUOTED"; then - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SNMP_VERSION "$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" -_ACEOF - else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_SNMP_VERSION $ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION -_ACEOF - fi +# Check whether --with-minimalist was given. +if test ${with_minimalist+y} +then : + withval=$with_minimalist; as_fn_error $? "Invalid option. Use --enable-minimalist/--disable-minimalist instead" "$LINENO" 5 fi +if test "x$enable_minimalist" = "xyes"; then + # we'll assume the mini agent is desired here as well + mini_agent="yes" + FEATURETARGS="features" -# we tested this above before the prompt, but the prompt may give a new value. -case "${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION}" in - [123]) ;; - 2c) ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=2 ;; - *) - as_fn_error $? "Illegal version number. Only 1, 2 (for SNMPv2c) and 3 are supported." "$LINENO" 5 - ;; -esac + # needed to bootstrap later checks + echo "" > include/net-snmp/feature-details.h +printf "%s\n" "#define NETSNMP_MINIMAL_CODE 1" >>confdefs.h -MSG_CHECK="System Contact Information" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 -$as_echo_n "checking $MSG_CHECK... " >&6; } -if ${ac_cv_user_prompt_NETSNMP_SYS_CONTACT+:} false; then : - $as_echo_n "(cached) " >&6 else - echo "" >&6 + FEATUREHEADERS="" +fi -if test "x$defaults" = "xno"; then -echo $ECHO_N " +# Check whether --with-minimalist was given. +if test ${with_minimalist+y} +then : + withval=$with_minimalist; as_fn_error $? "Invalid option. Use --enable-minimalist/--disable-minimalist instead" "$LINENO" 5 +fi -*** System Contact Information: - Describes who should be contacted about the host the agent is -running on. This information is available in the MIB-II tree. This -can also be over-ridden using the \"syscontact\" syntax in the agent's -configuration files. - Providing the --with-sys-contact=\"contact\" parameter to ./configure -will avoid this prompt. -System Contact Information ($ME@$LOC): $ECHO_C" -read tmpinput <&7 -if test "$tmpinput" = "" -a "$ME@$LOC" != ""; then - tmpinput="$ME@$LOC" -fi -eval NETSNMP_SYS_CONTACT=\"$tmpinput\" -else -tmpinput="$ME@$LOC" -eval NETSNMP_SYS_CONTACT=\"$tmpinput\" + +# Check whether --enable-notify-only was given. +if test ${enable_notify_only+y} +then : + enableval=$enable_notify_only; fi -eval ac_cv_user_prompt_NETSNMP_SYS_CONTACT=\$NETSNMP_SYS_CONTACT -echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 +# Check whether --with-notify-only was given. +if test ${with_notify_only+y} +then : + withval=$with_notify_only; as_fn_error $? "Invalid option. Use --enable-notify-only/--disable-notify-only instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_SYS_CONTACT" >&5 -$as_echo "$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" >&6; } -if test "$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" != "none"; then - if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_CONTACT "$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" -_ACEOF - else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_CONTACT $ac_cv_user_prompt_NETSNMP_SYS_CONTACT -_ACEOF +if test "x$enable_notify_only" = "xyes"; then + +printf "%s\n" "#define NETSNMP_NOTIFY_ONLY 1" >>confdefs.h - fi fi +# Check whether --with-notify-only was given. +if test ${with_notify_only+y} +then : + withval=$with_notify_only; as_fn_error $? "Invalid option. Use --enable-notify-only/--disable-notify-only instead" "$LINENO" 5 +fi +# Check whether --enable-notifyonly was given. +if test ${enable_notifyonly+y} +then : + enableval=$enable_notifyonly; as_fn_error $? "Invalid option. Use --enable-notify-only/--disable-notify-only instead" "$LINENO" 5 +fi -MSG_CHECK="System Location" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 -$as_echo_n "checking $MSG_CHECK... " >&6; } -if ${ac_cv_user_prompt_NETSNMP_SYS_LOC+:} false; then : - $as_echo_n "(cached) " >&6 -else - echo "" >&6 -if test "x$defaults" = "xno"; then -echo $ECHO_N " +# Check whether --enable-no-listen was given. +if test ${enable_no_listen+y} +then : + enableval=$enable_no_listen; +fi -*** System Location: - Describes the location of the system. This information is -available in the MIB-II tree. this can also be over-ridden using the -\"syslocation\" syntax in the agent's configuration files. - Providing the --with-sys-location=\"location\" parameter to ./configure -will avoid this prompt. +# Check whether --with-no-listen was given. +if test ${with_no_listen+y} +then : + withval=$with_no_listen; as_fn_error $? "Invalid option. Use --enable-no-listen/--disable-no-listen instead" "$LINENO" 5 +fi + +if test "x$enable_no_listen" = "xyes" -o "x$enable_notify_only" = "xyes"; then + enable_no_listen="yes" + +printf "%s\n" "#define NETSNMP_NO_LISTEN_SUPPORT 1" >>confdefs.h -System Location (Unknown): $ECHO_C" -read tmpinput <&7 -if test "$tmpinput" = "" -a "Unknown" != ""; then - tmpinput="Unknown" fi -eval NETSNMP_SYS_LOC=\"$tmpinput\" -else -tmpinput="Unknown" -eval NETSNMP_SYS_LOC=\"$tmpinput\" + +# Check whether --with-no-listen was given. +if test ${with_no_listen+y} +then : + withval=$with_no_listen; as_fn_error $? "Invalid option. Use --enable-no-listen/--disable-no-listen instead" "$LINENO" 5 +fi + +# Check whether --enable-nolisten was given. +if test ${enable_nolisten+y} +then : + enableval=$enable_nolisten; as_fn_error $? "Invalid option. Use --enable-no-listen/--disable-no-listen instead" "$LINENO" 5 fi -eval ac_cv_user_prompt_NETSNMP_SYS_LOC=\$NETSNMP_SYS_LOC -echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 +# Check whether --enable-read-only was given. +if test ${enable_read_only+y} +then : + enableval=$enable_read_only; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_SYS_LOC" >&5 -$as_echo "$ac_cv_user_prompt_NETSNMP_SYS_LOC" >&6; } -if test "$ac_cv_user_prompt_NETSNMP_SYS_LOC" != "none"; then - if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_LOC "$ac_cv_user_prompt_NETSNMP_SYS_LOC" -_ACEOF - else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYS_LOC $ac_cv_user_prompt_NETSNMP_SYS_LOC -_ACEOF - fi +# Check whether --with-read-only was given. +if test ${with_read_only+y} +then : + withval=$with_read_only; as_fn_error $? "Invalid option. Use --enable-read-only/--disable-read-only instead" "$LINENO" 5 fi +if test "x$enable_read_only" = "xyes" -o "x$enable_notify_only" = "xyes" ; then + enable_read_only="yes" + +printf "%s\n" "#define NETSNMP_NO_WRITE_SUPPORT 1" >>confdefs.h -if test -d /var/log; then - defaultlog="/var/log/snmpd.log" -else - defaultlog="/usr/adm/snmpd.log" fi +# Check whether --with-read-only was given. +if test ${with_read_only+y} +then : + withval=$with_read_only; as_fn_error $? "Invalid option. Use --enable-read-only/--disable-read-only instead" "$LINENO" 5 +fi -MSG_CHECK="Location to write logfile" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 -$as_echo_n "checking $MSG_CHECK... " >&6; } -if ${ac_cv_user_prompt_NETSNMP_LOGFILE+:} false; then : - $as_echo_n "(cached) " >&6 -else - echo "" >&6 +# Check whether --enable-readonly was given. +if test ${enable_readonly+y} +then : + enableval=$enable_readonly; as_fn_error $? "Invalid option. Use --enable-read-only/--disable-read-only instead" "$LINENO" 5 +fi -if test "x$defaults" = "xno"; then -echo $ECHO_N " -*** Logfile location: - Enter the default location for the snmpd agent to dump -information & errors to. If not defined (enter the keyword \"none\" -at the prompt below) the agent will use stdout and stderr instead. -(Note: This value can be over-ridden using command line options.) - Providing the --with-logfile=\"path\" parameter to ./configure -will avoid this prompt. +## +# Project: Agent: MIB module configuration +## -Location to write logfile ($defaultlog): $ECHO_C" -read tmpinput <&7 -if test "$tmpinput" = "" -a "$defaultlog" != ""; then - tmpinput="$defaultlog" +# Check whether --enable-mini_agent was given. +if test ${enable_mini_agent+y} +then : + enableval=$enable_mini_agent; fi -eval NETSNMP_LOGFILE=\"$tmpinput\" + + +# Check whether --with-mini_agent was given. +if test ${with_mini_agent+y} +then : + withval=$with_mini_agent; as_fn_error $? "Invalid option. Use --enable-mini_agent/--disable-mini_agent instead" "$LINENO" 5 +fi + +if test "x$enable_mini_agent" = "xyes"; then + mini_agent="yes" else -tmpinput="$defaultlog" -eval NETSNMP_LOGFILE=\"$tmpinput\" + mini_agent="no" fi -eval ac_cv_user_prompt_NETSNMP_LOGFILE=\$NETSNMP_LOGFILE -echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 +# Check whether --with-miniagent was given. +if test ${with_miniagent+y} +then : + withval=$with_miniagent; as_fn_error $? "Invalid option. Use --enable-mini-agent/--disable-mini-agent instead" "$LINENO" 5 +fi +# Check whether --enable-miniagent was given. +if test ${enable_miniagent+y} +then : + enableval=$enable_miniagent; as_fn_error $? "Invalid option. Use --enable-mini-agent/--disable-mini-agent instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_LOGFILE" >&5 -$as_echo "$ac_cv_user_prompt_NETSNMP_LOGFILE" >&6; } -if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" != "none"; then - if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then - cat >>confdefs.h <<_ACEOF -#define NETSNMP_LOGFILE "$ac_cv_user_prompt_NETSNMP_LOGFILE" -_ACEOF - else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_LOGFILE $ac_cv_user_prompt_NETSNMP_LOGFILE -_ACEOF - fi + + + +# Check whether --enable-mfd-rewrites was given. +if test ${enable_mfd_rewrites+y} +then : + enableval=$enable_mfd_rewrites; fi -if test -d /var; then - defaultstore="/var/net-snmp" - ucddefaultstore="/var/ucd-snmp" -else - defaultstore="/etc/net-snmp" - ucddefaultstore="/etc/ucd-snmp" +# Check whether --with-mfd-rewrites was given. +if test ${with_mfd_rewrites+y} +then : + withval=$with_mfd_rewrites; as_fn_error $? "Invalid option. Use --enable-mfd-rewrites/--disable-mfd-rewrites instead" "$LINENO" 5 fi +if test "x$enable_mfd_rewrites" = "xyes"; then -MSG_CHECK="Location to write persistent information" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 -$as_echo_n "checking $MSG_CHECK... " >&6; } -if ${ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY+:} false; then : - $as_echo_n "(cached) " >&6 -else - echo "" >&6 +printf "%s\n" "#define NETSNMP_ENABLE_MFD_REWRITES 1" >>confdefs.h -if test "x$defaults" = "xno"; then -echo $ECHO_N " +fi -*** snmpd persistent storage location: - Enter a directory for the SNMP library to store persistent -data in the form of a configuration file. This default location is -different than the old default location (which was for ucd-snmp). If -you stay with the new path, I'll ask you in a second if you wish to -copy your files over to the new location (once only). If you pick -some other path than the default, you'll have to copy them yourself. -There is nothing wrong with picking the old path ($ucddefaultstore) if -you'd rather. - Providing the --with-persistent-directory=\"path\" parameter to -./configure will avoid this prompt. -Location to write persistent information ($defaultstore): $ECHO_C" -read tmpinput <&7 -if test "$tmpinput" = "" -a "$defaultstore" != ""; then - tmpinput="$defaultstore" +# Check whether --with-mib_modules was given. +if test ${with_mib_modules+y} +then : + withval=$with_mib_modules; fi -eval NETSNMP_PERSISTENT_DIRECTORY=\"$tmpinput\" -else -tmpinput="$defaultstore" -eval NETSNMP_PERSISTENT_DIRECTORY=\"$tmpinput\" + + # Check whether --enable-mib_modules was given. +if test ${enable_mib_modules+y} +then : + enableval=$enable_mib_modules; as_fn_error $? "Invalid option. Use --with-mib_modules/--without-mib_modules instead" "$LINENO" 5 fi -eval ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY=\$NETSNMP_PERSISTENT_DIRECTORY -echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" >&5 -$as_echo "$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" >&6; } -if test "$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" != "none"; then - if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then - cat >>confdefs.h <<_ACEOF -#define NETSNMP_PERSISTENT_DIRECTORY "$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" -_ACEOF - else - cat >>confdefs.h <<_ACEOF -#define NETSNMP_PERSISTENT_DIRECTORY $ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY -_ACEOF +# Check whether --with-out_mib_modules was given. +if test ${with_out_mib_modules+y} +then : + withval=$with_out_mib_modules; +fi - fi + # Check whether --enable-out_mib_modules was given. +if test ${enable_out_mib_modules+y} +then : + enableval=$enable_out_mib_modules; as_fn_error $? "Invalid option. Use --with-out_mib_modules/--without-out_mib_modules instead" "$LINENO" 5 fi -PERSISTENT_DIRECTORY=$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY -UCDPERSISTENT_DIRECTORY=$ucddefaultstore +# +# Catch common mistakes in configure options +# +# Check whether --with-mib-module was given. +if test ${with_mib_module+y} +then : + withval=$with_mib_module; as_fn_error $? "Invalid option. Use --with-mib-modules/--without-mib-modules instead" "$LINENO" 5 +fi -if test $PERSISTENT_DIRECTORY = "$defaultstore" -a -d "$ucddefaultstore" -a ! -d "$defaultstore" ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking If we should copy the old persistent directory" >&5 -$as_echo_n "checking If we should copy the old persistent directory... " >&6; } -if ${ac_cv_user_prompt_COPY_PERSISTENT_FILES+:} false; then : - $as_echo_n "(cached) " >&6 -else +# Check whether --with-module was given. +if test ${with_module+y} +then : + withval=$with_module; as_fn_error $? "Invalid option. Use --with-mib-modules/--without-mib-modules instead" "$LINENO" 5 +fi -if test "x$defaults" = "xno"; then -echo $ECHO_N " -*** Copying old ucd-snmp persistent files to net-snmp persistent directory: +# Check whether --with-modules was given. +if test ${with_modules+y} +then : + withval=$with_modules; as_fn_error $? "Invalid option. Use --with-mib-modules/--without-mib-modules instead" "$LINENO" 5 +fi - Would you like to copy the older ucd-snmp persistent files -into your new net-snmp persistent file path? This will functionally -save all your ucd-snmp data and let it be used within the net-snmp -tools. This will only be done once when you run make install. If you -wish to do this, enter "yes" at the prompt. - Providing the --with-copy-persistent-files=\"no\" (or \"yes\") -parameters to ./configure will avoid this prompt. -Copy ucd-snmp data into the net-snmp data directory ("yes"): $ECHO_C" -read tmpinput <&7 -if test "$tmpinput" = "" -a ""yes"" != ""; then - tmpinput=""yes"" -fi -eval ac_cv_user_prompt_COPY_PERSISTENT_FILES=\"$tmpinput\" -else -tmpinput=""yes"" -eval ac_cv_user_prompt_COPY_PERSISTENT_FILES=\"$tmpinput\" + +# Check whether --with-out-mib-module was given. +if test ${with_out_mib_module+y} +then : + withval=$with_out_mib_module; as_fn_error $? "Invalid option. Use --with-out-mib-modules/--without-out-mib-modules instead" "$LINENO" 5 fi +# Check whether --with-out-module was given. +if test ${with_out_module+y} +then : + withval=$with_out_module; as_fn_error $? "Invalid option. Use --with-out-mib-modules/--without-out-mib-modules instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_COPY_PERSISTENT_FILES" >&5 -$as_echo "$ac_cv_user_prompt_COPY_PERSISTENT_FILES" >&6; } -else -ac_cv_user_prompt_COPY_PERSISTENT_FILES="no" + + +# Check whether --with-out-modules was given. +if test ${with_out_modules+y} +then : + withval=$with_out_modules; as_fn_error $? "Invalid option. Use --with-out-mib-modules/--without-out-mib-modules instead" "$LINENO" 5 fi -COPY_PERSISTENT_FILES="$ac_cv_user_prompt_COPY_PERSISTENT_FILES" -# -*- autoconf -*- -######################################### -## -# Checks for programs -## -######################################### ## -# Shell checks: +# Project: Enterprise settings (? Agent/Library/Both?) ## -# Check for 'sh' overflow (HP-UX) -# (taken from Perl's configure script) -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if I need to feed myself to ksh" >&5 -$as_echo_n "checking if I need to feed myself to ksh... " >&6; } -if test -f /hp-ux -a -f /bin/ksh; then - if (PATH=.; alias -x) >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - if test "x$1" = "x"; then - exec /bin/ksh $0 - else - exec /bin/ksh $0 "$@" - fi + +# Check whether --with-enterprise-oid was given. +if test ${with_enterprise_oid+y} +then : + withval=$with_enterprise_oid; + if test "$withval" = yes; then + as_fn_error $? " Please provide a value for the enterprise number " "$LINENO" 5; fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + printf "%s\n" "#define NETSNMP_ENTERPRISE_OID $withval" >>confdefs.h + + ent_oid="1,3,6,1,4,1,$withval" + printf "%s\n" "#define NETSNMP_ENTERPRISE_MIB $ent_oid" >>confdefs.h + + ent_dot_oid="1.3.6.1.4.1.$withval" + printf "%s\n" "#define NETSNMP_ENTERPRISE_DOT_MIB $ent_dot_oid" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using enterprise number $withval" >&5 +printf "%s\n" "using enterprise number $withval" >&6; } + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default \"enterprise.net-snmp\"" >&5 +printf "%s\n" "using default \"enterprise.net-snmp\"" >&6; } + fi + # Check whether --enable-enterprise-oid was given. +if test ${enable_enterprise_oid+y} +then : + enableval=$enable_enterprise_oid; as_fn_error $? "Invalid option. Use --with-enterprise-oid/--without-enterprise-oid instead" "$LINENO" 5 +fi -## -# Standard and path program checks: -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +# Check whether --with-enterprise-sysoid was given. +if test ${with_enterprise_sysoid+y} +then : + withval=$with_enterprise_sysoid; + if test "$withval" = yes; then + as_fn_error $? " Please provide a base OID value " "$LINENO" 5; fi -else - ac_cv_path_GREP=$GREP + sys_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'` + printf "%s\n" "#define NETSNMP_SYSTEM_MIB $sys_oid" >>confdefs.h + + sys_dot_oid=`echo "$withval" | sed 's/^\.//'` + printf "%s\n" "#define NETSNMP_SYSTEM_DOT_MIB $sys_dot_oid" >>confdefs.h + + sysoid_len=`echo "$withval" | sed 's/^\.//g' | awk -F\. '{ print NF }'` + printf "%s\n" "#define NETSNMP_SYSTEM_DOT_MIB_LENGTH $sysoid_len" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using enterprise sysOID $withval ...." >&5 +printf "%s\n" "using enterprise sysOID $withval ...." >&6; } + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default enterprise sysOID \"NET-SNMP-MIB::netSnmpAgentOIDs...\"" >&5 +printf "%s\n" "using default enterprise sysOID \"NET-SNMP-MIB::netSnmpAgentOIDs...\"" >&6; } + fi + # Check whether --enable-enterprise-sysoid was given. +if test ${enable_enterprise_sysoid+y} +then : + enableval=$enable_enterprise_sysoid; as_fn_error $? "Invalid option. Use --with-enterprise-sysoid/--without-enterprise-sysoid instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +# Check whether --with-enterprise-notification-oid was given. +if test ${with_enterprise_notification_oid+y} +then : + withval=$with_enterprise_notification_oid; + if test "$withval" = yes; then + as_fn_error $? " Please provide a base OID value " "$LINENO" 5; fi -else - ac_cv_path_EGREP=$EGREP + notification_oid=`echo "$withval" | sed 's/^\.//' | sed 's/\./\,/g'` + printf "%s\n" "#define NETSNMP_NOTIFICATION_MIB $notification_oid" >>confdefs.h + + notification_dot_oid=`echo "$withval" | sed 's/^\.//'` + printf "%s\n" "#define NETSNMP_NOTIFICATION_DOT_MIB $notification_dot_oid" >>confdefs.h + + notificationoid_len=`echo "$withval" | sed 's/^\.//g' | awk -F\. '{ print NF }'` + printf "%s\n" "#define NETSNMP_NOTIFICATION_DOT_MIB_LENGTH $notificationoid_len" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using enterprise notifications $withval" >&5 +printf "%s\n" "using enterprise notifications $withval" >&6; } + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using default notifications \"NET-SNMP-MIB::netSnmpNotifications\"" >&5 +printf "%s\n" "using default notifications \"NET-SNMP-MIB::netSnmpNotifications\"" >&6; } + fi - fi + # Check whether --enable-enterprise-notification-oid was given. +if test ${enable_enterprise_notification_oid+y} +then : + enableval=$enable_enterprise_notification_oid; as_fn_error $? "Invalid option. Use --with-enterprise-notification-oid/--without-enterprise-notification-oid instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + +## +# Project: Perl settings +## + + +# Check whether --with-perl-modules was given. +if test ${with_perl_modules+y} +then : + withval=$with_perl_modules; + if test "$withval" = "no"; then + install_perl="no" + else + install_perl="yes" + if test "$withval" != "yes"; then + PERLARGS="$withval" + fi fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP +else $as_nop + install_perl="try" fi + # Check whether --enable-perl-modules was given. +if test ${enable_perl_modules+y} +then : + enableval=$enable_perl_modules; as_fn_error $? "Invalid option. Use --with-perl-modules/--without-perl-modules instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +# Check whether --enable-embedded-perl was given. +if test ${enable_embedded_perl+y} +then : + enableval=$enable_embedded_perl; embed_perl="$enableval" +else $as_nop + embed_perl="try" fi -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +# Check whether --with-embedded-perl was given. +if test ${with_embedded_perl+y} +then : + withval=$with_embedded_perl; as_fn_error $? "Invalid option. Use --enable-embedded-perl/--disable-embedded-perl instead" "$LINENO" 5 +fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - done -IFS=$as_save_IFS +# Check whether --enable-perl-cc-checks was given. +if test ${enable_perl_cc_checks+y} +then : + enableval=$enable_perl_cc_checks; +fi -rm -rf conftest.one conftest.two conftest.dir +# Check whether --with-perl-cc-checks was given. +if test ${with_perl_cc_checks+y} +then : + withval=$with_perl_cc_checks; as_fn_error $? "Invalid option. Use --enable-perl-cc-checks/--disable-perl-cc-checks instead" "$LINENO" 5 fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +## +# Project: Python settings +## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" +# Check whether --with-python-modules was given. +if test ${with_python_modules+y} +then : + withval=$with_python_modules; + install_python="yes" + if test "$withval" = "yes"; then + PYTHONARGS="" + elif test "$withval" = "no"; then + PYTHONARGS="" + install_python="no" + else + PYTHONARGS="$withval" + fi + +else $as_nop + install_python="no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED + +## +# Project: Library settings +## + + +# Check whether --with-server-send-buf was given. +if test ${with_server_send_buf+y} +then : + withval=$with_server_send_buf; + if test "$withval" = yes; then + as_fn_error $? " Please provide a positive number for the server send buffer " "$LINENO" 5 + fi + printf "%s\n" "#define NETSNMP_DEFAULT_SERVER_SEND_BUF $withval" >>confdefs.h + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using OS default send buffer size for server sockets" >&5 +printf "%s\n" "using OS default send buffer size for server sockets" >&6; } fi + # Check whether --enable-server-send-buf was given. +if test ${enable_server_send_buf+y} +then : + enableval=$enable_server_send_buf; as_fn_error $? "Invalid option. Use --with-server-send-buf/--without-server-send-buf instead" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed -for ac_prog in file -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FILE+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FILE"; then - ac_cv_prog_FILE="$FILE" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_FILE="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + +# Check whether --with-server-recv-buf was given. +if test ${with_server_recv_buf+y} +then : + withval=$with_server_recv_buf; + if test "$withval" = yes; then + as_fn_error $? " Please provide a positive number for the server recv buffer " "$LINENO" 5 fi -done - done -IFS=$as_save_IFS + printf "%s\n" "#define NETSNMP_DEFAULT_SERVER_RECV_BUF $withval" >>confdefs.h -fi -fi -FILE=$ac_cv_prog_FILE -if test -n "$FILE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 -$as_echo "$FILE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using OS default recv buffer size for server sockets" >&5 +printf "%s\n" "using OS default recv buffer size for server sockets" >&6; } fi + # Check whether --enable-server-recv-buf was given. +if test ${enable_server_recv_buf+y} +then : + enableval=$enable_server_recv_buf; as_fn_error $? "Invalid option. Use --with-server-recv-buf/--without-server-recv-buf instead" "$LINENO" 5 +fi - test -n "$FILE" && break -done -if test x$ac_cv_prog_FILE = x; then - # The file program is not included in the default Cygwin setup, although - # this program is essential for libtool to work properly. It is nontrivial - # to deduce from the message printed by libtool that the 'file' tool is - # missing and libtool does not abort when the file program is not found. So - # stop now if the file program has not been found. - as_fn_error 1 "file program not found although it is needed by libtool." "$LINENO" 5 -fi -for ac_prog in find -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FIND"; then - ac_cv_prog_FIND="$FIND" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_FIND="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +# Check whether --with-client-send-buf was given. +if test ${with_client_send_buf+y} +then : + withval=$with_client_send_buf; + if test "$withval" = yes; then + as_fn_error $? " Please provide a positive number for the client send buffer " "$LINENO" 5 fi -done - done -IFS=$as_save_IFS + printf "%s\n" "#define NETSNMP_DEFAULT_CLIENT_SEND_BUF $withval" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using OS default send buffer size for client sockets" >&5 +printf "%s\n" "using OS default send buffer size for client sockets" >&6; } fi -fi -FIND=$ac_cv_prog_FIND -if test -n "$FIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 -$as_echo "$FIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + # Check whether --enable-client-send-buf was given. +if test ${enable_client_send_buf+y} +then : + enableval=$enable_client_send_buf; as_fn_error $? "Invalid option. Use --with-client-send-buf/--without-client-send-buf instead" "$LINENO" 5 fi - test -n "$FIND" && break -done -for ac_prog in whoami logname -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_WHOAMI+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$WHOAMI"; then - ac_cv_prog_WHOAMI="$WHOAMI" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_WHOAMI="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +# Check whether --with-client-recv-buf was given. +if test ${with_client_recv_buf+y} +then : + withval=$with_client_recv_buf; + if test "$withval" = yes; then + as_fn_error $? " Please provide a positive number for the client recv buffer " "$LINENO" 5 fi -done - done -IFS=$as_save_IFS + printf "%s\n" "#define NETSNMP_DEFAULT_CLIENT_RECV_BUF $withval" >>confdefs.h -fi -fi -WHOAMI=$ac_cv_prog_WHOAMI -if test -n "$WHOAMI"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHOAMI" >&5 -$as_echo "$WHOAMI" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using OS default recv buffer size for client sockets" >&5 +printf "%s\n" "using OS default recv buffer size for client sockets" >&6; } fi + # Check whether --enable-client-recv-buf was given. +if test ${enable_client_recv_buf+y} +then : + enableval=$enable_client_recv_buf; as_fn_error $? "Invalid option. Use --with-client-recv-buf/--without-client-recv-buf instead" "$LINENO" 5 +fi - test -n "$WHOAMI" && break -done -test -n "$WHOAMI" || WHOAMI="whoami" +## +# System: library settings (more) +## -# Extract the first word of "autoconf", so it can be a program name with args. -set dummy autoconf; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AUTOCONF+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $AUTOCONF in - [\\/]* | ?:[\\/]*) - ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_AUTOCONF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac +# Check whether --with-elf was given. +if test ${with_elf+y} +then : + withval=$with_elf; fi -AUTOCONF=$ac_cv_path_AUTOCONF -if test -n "$AUTOCONF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5 -$as_echo "$AUTOCONF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + # Check whether --enable-elf was given. +if test ${enable_elf+y} +then : + enableval=$enable_elf; as_fn_error $? "Invalid option. Use --with-elf/--without-elf instead" "$LINENO" 5 fi -# Extract the first word of "autoheader", so it can be a program name with args. -set dummy autoheader; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AUTOHEADER+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $AUTOHEADER in - [\\/]* | ?:[\\/]*) - ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_AUTOHEADER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac +# Check whether --with-nl was given. +if test ${with_nl+y} +then : + withval=$with_nl; fi -AUTOHEADER=$ac_cv_path_AUTOHEADER -if test -n "$AUTOHEADER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOHEADER" >&5 -$as_echo "$AUTOHEADER" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + # Check whether --enable-nl was given. +if test ${enable_nl+y} +then : + enableval=$enable_nl; as_fn_error $? "Invalid option. Use --with-nl/--without-nl instead" "$LINENO" 5 fi -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PERLPROG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PERLPROG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PERLPROG="$PERLPROG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PERLPROG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac +# Check whether --with-libwrap was given. +if test ${with_libwrap+y} +then : + withval=$with_libwrap; +else $as_nop + with_libwrap="no" fi -PERLPROG=$ac_cv_path_PERLPROG -if test -n "$PERLPROG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLPROG" >&5 -$as_echo "$PERLPROG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + # Check whether --enable-libwrap was given. +if test ${enable_libwrap+y} +then : + enableval=$enable_libwrap; as_fn_error $? "Invalid option. Use --with-libwrap/--without-libwrap instead" "$LINENO" 5 fi -# Extract the first word of "ps", so it can be a program name with args. -set dummy ps; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PSPROG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PSPROG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PSPROG="$PSPROG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PSPROG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac +# Check whether --with-zlib was given. +if test ${with_zlib+y} +then : + withval=$with_zlib; +else $as_nop + with_zlib="no" fi -PSPROG=$ac_cv_path_PSPROG -if test -n "$PSPROG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PSPROG" >&5 -$as_echo "$PSPROG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + # Check whether --enable-zlib was given. +if test ${enable_zlib+y} +then : + enableval=$enable_zlib; as_fn_error $? "Invalid option. Use --with-zlib/--without-zlib instead" "$LINENO" 5 fi -# Extract the first word of "python", so it can be a program name with args. -set dummy python; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHONPROG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHONPROG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHONPROG="$PYTHONPROG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PYTHONPROG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -PYTHONPROG=$ac_cv_path_PYTHONPROG -if test -n "$PYTHONPROG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPROG" >&5 -$as_echo "$PYTHONPROG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# Check whether --with-bzip2 was given. +if test ${with_bzip2+y} +then : + withval=$with_bzip2; +else $as_nop + with_bzip2="no" fi -# Extract the first word of "uname", so it can be a program name with args. -set dummy uname; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_UNAMEPROG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $UNAMEPROG in - [\\/]* | ?:[\\/]*) - ac_cv_path_UNAMEPROG="$UNAMEPROG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_UNAMEPROG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -UNAMEPROG=$ac_cv_path_UNAMEPROG -if test -n "$UNAMEPROG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAMEPROG" >&5 -$as_echo "$UNAMEPROG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# Check whether --with-mnttab was given. +if test ${with_mnttab+y} +then : + withval=$with_mnttab; fi + # Check whether --enable-mnttab was given. +if test ${enable_mnttab+y} +then : + enableval=$enable_mnttab; as_fn_error $? "Invalid option. Use --with-mnttab/--without-mnttab instead" "$LINENO" 5 +fi -cat >>confdefs.h <<_ACEOF -#define UNAMEPROG "$UNAMEPROG" -_ACEOF - +## +# Project: mysql +## -if test "x$ac_cv_prog_AUTOCONF" = "x"; then - AUTOCONF=":" +# Check whether --with-mysql was given. +if test ${with_mysql+y} +then : + withval=$with_mysql; fi -if test "x$ac_cv_prog_AUTOHEADER" = "x"; then - AUTOHEADER=":" + # Check whether --enable-mysql was given. +if test ${enable_mysql+y} +then : + enableval=$enable_mysql; as_fn_error $? "Invalid option. Use --with-mysql/--without-mysql instead" "$LINENO" 5 fi -MAKE=${MAKE-"make"} -$MAKE -v -f /dev/null 2>/dev/null | $GREP GNU >/dev/null -have_gnu_make=$? +if test "x$with_mysql" = "xyes"; then + +printf "%s\n" "#define NETSNMP_USE_MYSQL 1" >>confdefs.h +fi ## -# The Perl function system() is used for running the Net-SNMP regression -# tests. Find out whether that function invokes a POSIX shell, which is -# necessary in order to run the regression tests. When using Windows + MSYS -# + ActiveState Perl, Perl's system() function does invoke Windows' cmd.exe -# which is not a POSIX shell. +# Protect against CFLAGS with -Werror which causes failures for some tests +# (e.g. it causes type mismatches in the AC_CV_FUNCS call) ## +noerr_CFLAGS="$CFLAGS" +CFLAGS=`echo $CFLAGS | sed 's/-Werror[^ ]*//g'` +CFLAGS_without_Werror=$CFLAGS +export CFLAGS +# -*- autoconf -*- +# +# Prompt for various bits of user information +# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Perl function system() invokes a POSIX shell" >&5 -$as_echo_n "checking whether the Perl function system() invokes a POSIX shell... " >&6; } -if test "x$PERLPROG" != 'x' && test -x "$PERLPROG" && test "x`$PERLPROG -e 'system('\''echo $OSTYPE'\'');'`" != 'x$OSTYPE'; then - PERL_SYSTEM_INVOKES_POSIX_SHELL=yes -else - PERL_SYSTEM_INVOKES_POSIX_SHELL=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_SYSTEM_INVOKES_POSIX_SHELL" >&5 -$as_echo "$PERL_SYSTEM_INVOKES_POSIX_SHELL" >&6; } +if test "x$ac_cv_user_prompt_NETSNMP_LOGFILE" = "x" -o "x$ac_cv_user_prompt_NETSNMP_SYS_LOC" = "x" -o "x$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" = "x" -o "x$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" = "x"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to prompt for values" >&5 +printf %s "checking whether to prompt for values... " >&6; } +if test ${ac_cv_have_warned+y} +then : + printf %s "(cached) " >&6 +else $as_nop +if test "x$defaults" = "xno"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: + ************** Configuration Section ************** -## -# Compilation-related program checks: -## + You are about to be prompted with a series of questions. Answer +them carefully, as they determine how the SNMP agent and related +applications are to function. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + After the configure script finishes, you can browse the newly +created net-snmp-config.h file for further - less important - parameters to +modify. Be careful if you re-run configure though, since net-snmp-config.h +will be overwritten. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +-Press return to continue- +" >&5 +printf "%s\n" "$as_me: -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + ************** Configuration Section ************** + You are about to be prompted with a series of questions. Answer +them carefully, as they determine how the SNMP agent and related +applications are to function. -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + After the configure script finishes, you can browse the newly +created net-snmp-config.h file for further - less important - parameters to +modify. Be careful if you re-run configure though, since net-snmp-config.h +will be overwritten. -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } +-Press return to continue- +" >&6;} + +read tmpinput <&7 +ac_cv_have_warned="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_have_warned="no" fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_warned" >&5 +printf "%s\n" "$ac_cv_have_warned" >&6; } else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - + ac_cv_have_warned="yes" fi + +ME=`$WHOAMI` +if test -f /etc/resolv.conf; then + LOC=`awk '/^domain/{loc=$NF}END{print loc}' /etc/resolv.conf` fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if test "x$LOC" = x; then + LOC="@no.where" fi - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +MSG_CHECK="Default version of SNMP to use" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 +printf %s "checking $MSG_CHECK... " >&6; } +if test ${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION+y} +then : + printf %s "(cached) " >&6 +else $as_nop + echo "" >&6 -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi +if test "x$defaults" = "xno"; then +echo $ECHO_N " + +*** Default SNMP Version: + + Starting with Net-SNMP 5.0, you can choose the default version of +the SNMP protocol to use when no version is given explicitly on the +command line, or via an 'snmp.conf' file. In the past this was set to +SNMPv1, but you can use this to switch to SNMPv3 if desired. SNMPv3 +will provide a more secure management environment (and thus you're +encouraged to switch to SNMPv3), but may break existing scripts that +rely on the old behaviour. (Though such scripts will probably need to +be changed to use the '-c' community flag anyway, as the SNMPv1 +command line usage has changed as well.). + At this prompt you can select \"1\", \"2\" (for SNMPv2c), or \"3\" as +the default version for the command tools (snmpget, ...) to use. This +can always be overridden at runtime using the -v flag to the tools, or +by using the \"defVersion\" token in your snmp.conf file. + Providing the --with-default-snmp-version=\"x\" parameter to ./configure +will avoid this prompt. + +Default version of SNMP to use (3): $ECHO_C" +read tmpinput <&7 +if test "$tmpinput" = "" -a "3" != ""; then + tmpinput="3" fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +eval NETSNMP_DEFAULT_SNMP_VERSION=\"$tmpinput\" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +tmpinput="3" +eval NETSNMP_DEFAULT_SNMP_VERSION=\"$tmpinput\" fi +eval ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=\$NETSNMP_DEFAULT_SNMP_VERSION +echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" >&5 +printf "%s\n" "$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" >&6; } +if test "$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" != "none"; then + if test "xunquoted" = "xquoted" -o "xunquoted" = "xQUOTED"; then + printf "%s\n" "#define NETSNMP_DEFAULT_SNMP_VERSION \"$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION\"" >>confdefs.h + + else + printf "%s\n" "#define NETSNMP_DEFAULT_SNMP_VERSION $ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" >>confdefs.h + fi fi + + +# we tested this above before the prompt, but the prompt may give a new value. +case "${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION}" in + [123]) ;; + 2c) ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=2 ;; + *) + as_fn_error $? "Illegal version number. Only 1, 2 (for SNMPv2c) and 3 are supported." "$LINENO" 5 + ;; +esac + + +MSG_CHECK="System Contact Information" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 +printf %s "checking $MSG_CHECK... " >&6; } +if test ${ac_cv_user_prompt_NETSNMP_SYS_CONTACT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + echo "" >&6 + +if test "x$defaults" = "xno"; then +echo $ECHO_N " + +*** System Contact Information: + + Describes who should be contacted about the host the agent is +running on. This information is available in the MIB-II tree. This +can also be over-ridden using the \"syscontact\" syntax in the agent's +configuration files. + Providing the --with-sys-contact=\"contact\" parameter to ./configure +will avoid this prompt. + +System Contact Information ($ME@$LOC): $ECHO_C" +read tmpinput <&7 +if test "$tmpinput" = "" -a "$ME@$LOC" != ""; then + tmpinput="$ME@$LOC" fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +eval NETSNMP_SYS_CONTACT=\"$tmpinput\" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +tmpinput="$ME@$LOC" +eval NETSNMP_SYS_CONTACT=\"$tmpinput\" fi +eval ac_cv_user_prompt_NETSNMP_SYS_CONTACT=\$NETSNMP_SYS_CONTACT +echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - test -n "$CC" && break - done fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_SYS_CONTACT" >&5 +printf "%s\n" "$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" >&6; } +if test "$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" != "none"; then + if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then + printf "%s\n" "#define NETSNMP_SYS_CONTACT \"$ac_cv_user_prompt_NETSNMP_SYS_CONTACT\"" >>confdefs.h + else + printf "%s\n" "#define NETSNMP_SYS_CONTACT $ac_cv_user_prompt_NETSNMP_SYS_CONTACT" >>confdefs.h + + fi fi + + + +MSG_CHECK="System Location" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 +printf %s "checking $MSG_CHECK... " >&6; } +if test ${ac_cv_user_prompt_NETSNMP_SYS_LOC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + echo "" >&6 + +if test "x$defaults" = "xno"; then +echo $ECHO_N " + +*** System Location: + + Describes the location of the system. This information is +available in the MIB-II tree. this can also be over-ridden using the +\"syslocation\" syntax in the agent's configuration files. + Providing the --with-sys-location=\"location\" parameter to ./configure +will avoid this prompt. + +System Location (Unknown): $ECHO_C" +read tmpinput <&7 +if test "$tmpinput" = "" -a "Unknown" != ""; then + tmpinput="Unknown" fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } +eval NETSNMP_SYS_LOC=\"$tmpinput\" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +tmpinput="Unknown" +eval NETSNMP_SYS_LOC=\"$tmpinput\" fi +eval ac_cv_user_prompt_NETSNMP_SYS_LOC=\$NETSNMP_SYS_LOC +echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 - test -n "$ac_ct_CC" && break -done +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_SYS_LOC" >&5 +printf "%s\n" "$ac_cv_user_prompt_NETSNMP_SYS_LOC" >&6; } +if test "$ac_cv_user_prompt_NETSNMP_SYS_LOC" != "none"; then + if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then + printf "%s\n" "#define NETSNMP_SYS_LOC \"$ac_cv_user_prompt_NETSNMP_SYS_LOC\"" >>confdefs.h - if test "x$ac_ct_CC" = x; then - CC="" else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC + printf "%s\n" "#define NETSNMP_SYS_LOC $ac_cv_user_prompt_NETSNMP_SYS_LOC" >>confdefs.h + fi fi + +if test -d /var/log; then + defaultlog="/var/log/snmpd.log" +else + defaultlog="/usr/adm/snmpd.log" fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +MSG_CHECK="Location to write logfile" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 +printf %s "checking $MSG_CHECK... " >&6; } +if test ${ac_cv_user_prompt_NETSNMP_LOGFILE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + echo "" >&6 -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done +if test "x$defaults" = "xno"; then +echo $ECHO_N " -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +*** Logfile location: -int -main () -{ + Enter the default location for the snmpd agent to dump +information & errors to. If not defined (enter the keyword \"none\" +at the prompt below) the agent will use stdout and stderr instead. +(Note: This value can be over-ridden using command line options.) + Providing the --with-logfile=\"path\" parameter to ./configure +will avoid this prompt. - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +Location to write logfile ($defaultlog): $ECHO_C" +read tmpinput <&7 +if test "$tmpinput" = "" -a "$defaultlog" != ""; then + tmpinput="$defaultlog" +fi +eval NETSNMP_LOGFILE=\"$tmpinput\" +else +tmpinput="$defaultlog" +eval NETSNMP_LOGFILE=\"$tmpinput\" +fi -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" +eval ac_cv_user_prompt_NETSNMP_LOGFILE=\$NETSNMP_LOGFILE +echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_LOGFILE" >&5 +printf "%s\n" "$ac_cv_user_prompt_NETSNMP_LOGFILE" >&6; } +if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" != "none"; then + if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then + printf "%s\n" "#define NETSNMP_LOGFILE \"$ac_cv_user_prompt_NETSNMP_LOGFILE\"" >>confdefs.h -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= + else + printf "%s\n" "#define NETSNMP_LOGFILE $ac_cv_user_prompt_NETSNMP_LOGFILE" >>confdefs.h -else - ac_file='' + fi fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } + +if test -d /var; then + defaultstore="/var/net-snmp" + ucddefaultstore="/var/ucd-snmp" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + defaultstore="/etc/net-snmp" + ucddefaultstore="/etc/ucd-snmp" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done + +MSG_CHECK="Location to write persistent information" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $MSG_CHECK" >&5 +printf %s "checking $MSG_CHECK... " >&6; } +if test ${ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY+y} +then : + printf %s "(cached) " >&6 +else $as_nop + echo "" >&6 + +if test "x$defaults" = "xno"; then +echo $ECHO_N " + +*** snmpd persistent storage location: + + Enter a directory for the SNMP library to store persistent +data in the form of a configuration file. This default location is +different than the old default location (which was for ucd-snmp). If +you stay with the new path, I'll ask you in a second if you wish to +copy your files over to the new location (once only). If you pick +some other path than the default, you'll have to copy them yourself. +There is nothing wrong with picking the old path ($ucddefaultstore) if +you'd rather. + Providing the --with-persistent-directory=\"path\" parameter to +./configure will avoid this prompt. + +Location to write persistent information ($defaultstore): $ECHO_C" +read tmpinput <&7 +if test "$tmpinput" = "" -a "$defaultstore" != ""; then + tmpinput="$defaultstore" +fi +eval NETSNMP_PERSISTENT_DIRECTORY=\"$tmpinput\" else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +tmpinput="$defaultstore" +eval NETSNMP_PERSISTENT_DIRECTORY=\"$tmpinput\" fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; +eval ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY=\$NETSNMP_PERSISTENT_DIRECTORY +echo $ECHO_N "setting $MSG_CHECK to... $ECHO_C" >&6 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" >&5 +printf "%s\n" "$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" >&6; } +if test "$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" != "none"; then + if test "xquoted" = "xquoted" -o "xquoted" = "xQUOTED"; then + printf "%s\n" "#define NETSNMP_PERSISTENT_DIRECTORY \"$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY\"" >>confdefs.h - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi + printf "%s\n" "#define NETSNMP_PERSISTENT_DIRECTORY $ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY" >>confdefs.h + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ +PERSISTENT_DIRECTORY=$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +UCDPERSISTENT_DIRECTORY=$ucddefaultstore -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ -#ifndef __GNUC__ - choke me -#endif +if test $PERSISTENT_DIRECTORY = "$defaultstore" -a -d "$ucddefaultstore" -a ! -d "$defaultstore" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If we should copy the old persistent directory" >&5 +printf %s "checking If we should copy the old persistent directory... " >&6; } +if test ${ac_cv_user_prompt_COPY_PERSISTENT_FILES+y} +then : + printf %s "(cached) " >&6 +else $as_nop - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu +if test "x$defaults" = "xno"; then +echo $ECHO_N " + +*** Copying old ucd-snmp persistent files to net-snmp persistent directory: + + Would you like to copy the older ucd-snmp persistent files +into your new net-snmp persistent file path? This will functionally +save all your ucd-snmp data and let it be used within the net-snmp +tools. This will only be done once when you run make install. If you +wish to do this, enter "yes" at the prompt. + Providing the --with-copy-persistent-files=\"no\" (or \"yes\") +parameters to ./configure will avoid this prompt. + +Copy ucd-snmp data into the net-snmp data directory ("yes"): $ECHO_C" +read tmpinput <&7 +if test "$tmpinput" = "" -a ""yes"" != ""; then + tmpinput=""yes"" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes +eval ac_cv_user_prompt_COPY_PERSISTENT_FILES=\"$tmpinput\" else - GCC= +tmpinput=""yes"" +eval ac_cv_user_prompt_COPY_PERSISTENT_FILES=\"$tmpinput\" fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_user_prompt_COPY_PERSISTENT_FILES" >&5 +printf "%s\n" "$ac_cv_user_prompt_COPY_PERSISTENT_FILES" >&6; } else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ +ac_cv_user_prompt_COPY_PERSISTENT_FILES="no" +fi +COPY_PERSISTENT_FILES="$ac_cv_user_prompt_COPY_PERSISTENT_FILES" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# -*- autoconf -*- +######################################### +## +# Checks for programs +## +######################################### -int -main () -{ +## +# Shell checks: +## - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" +# Check for 'sh' overflow (HP-UX) +# (taken from Perl's configure script) +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if I need to feed myself to ksh" >&5 +printf %s "checking if I need to feed myself to ksh... " >&6; } +if test -f /hp-ux -a -f /bin/ksh; then + if (PATH=.; alias -x) >/dev/null 2>&1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } else - CFLAGS="-g" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + if test "x$1" = "x"; then + exec /bin/ksh $0 + else + exec /bin/ksh $0 "$@" + fi fi else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +## +# Standard and path program checks: +## -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_EGREP_found && break 3 done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - ac_cv_prog_CPP=$CPP + ac_cv_path_EGREP=$EGREP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue + fi fi -rm -f conftest.err conftest.i conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + ac_cv_path_GREP=$GREP fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -LINKCC=${LINKCC-"$CC"} + # Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include + done +IFS=$as_save_IFS -int -main () -{ +rm -rf conftest.one conftest.two conftest.dir - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no + if test ${ac_cv_path_install+y}; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi fi -rm -f conftest* +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } -fi +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - ac_cv_header_stdc=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } fi -rm -f conftest* -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + SET_MAKE= +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" fi -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -$as_echo "#define STDC_HEADERS 1" >>confdefs.h + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +for ac_prog in file +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FILE"; then + ac_cv_prog_FILE="$FILE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILE="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FILE=$ac_cv_prog_FILE +if test -n "$FILE"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5 +printf "%s\n" "$FILE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + + test -n "$FILE" && break done +if test x$ac_cv_prog_FILE = x; then + # The file program is not included in the default Cygwin setup, although + # this program is essential for libtool to work properly. It is nontrivial + # to deduce from the message printed by libtool that the 'file' tool is + # missing and libtool does not abort when the file program is not found. So + # stop now if the file program has not been found. + as_fn_error 1 "file program not found although it is needed by libtool." "$LINENO" 5 +fi +for ac_prog in find +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FIND+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FIND"; then + ac_cv_prog_FIND="$FIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FIND="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes +fi +fi +FIND=$ac_cv_prog_FIND +if test -n "$FIND"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 +printf "%s\n" "$FIND" >&6; } else - MINIX= + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "$MINIX" = yes; then + test -n "$FIND" && break +done -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h +for ac_prog in whoami logname +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_WHOAMI+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$WHOAMI"; then + ac_cv_prog_WHOAMI="$WHOAMI" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_WHOAMI="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +WHOAMI=$ac_cv_prog_WHOAMI +if test -n "$WHOAMI"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WHOAMI" >&5 +printf "%s\n" "$WHOAMI" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + test -n "$WHOAMI" && break +done +test -n "$WHOAMI" || WHOAMI="whoami" -$as_echo "#define _MINIX 1" >>confdefs.h +# Extract the first word of "autoconf", so it can be a program name with args. +set dummy autoconf; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_AUTOCONF+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $AUTOCONF in + [\\/]* | ?:[\\/]*) + ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_AUTOCONF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no + test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":" + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +AUTOCONF=$ac_cv_path_AUTOCONF +if test -n "$AUTOCONF"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5 +printf "%s\n" "$AUTOCONF" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h +# Extract the first word of "autoheader", so it can be a program name with args. +set dummy autoheader; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_AUTOHEADER+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $AUTOHEADER in + [\\/]* | ?:[\\/]*) + ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_AUTOHEADER="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER=":" + ;; +esac +fi +AUTOHEADER=$ac_cv_path_AUTOHEADER +if test -n "$AUTOHEADER"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AUTOHEADER" >&5 +printf "%s\n" "$AUTOHEADER" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PERLPROG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PERLPROG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERLPROG="$PERLPROG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PERLPROG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +PERLPROG=$ac_cv_path_PERLPROG +if test -n "$PERLPROG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERLPROG" >&5 +printf "%s\n" "$PERLPROG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h -fi +# Extract the first word of "ps", so it can be a program name with args. +set dummy ps; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PSPROG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PSPROG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PSPROG="$PSPROG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PSPROG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 + ;; +esac +fi +PSPROG=$ac_cv_path_PSPROG +if test -n "$PSPROG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PSPROG" >&5 +printf "%s\n" "$PSPROG" >&6; } else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } -case $ac_cv_c_inline in - inline | yes) ;; +# Extract the first word of "python3", so it can be a program name with args. +set dummy python3; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHONPROG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHONPROG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHONPROG="$PYTHONPROG" # Let the user override the test with a path. + ;; *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - -# libtool stuff for shared/static libraries. -# + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHONPROG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + ;; esac +fi +PYTHONPROG=$ac_cv_path_PYTHONPROG +if test -n "$PYTHONPROG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHONPROG" >&5 +printf "%s\n" "$PYTHONPROG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -macro_version='2.4' -macro_revision='1.3293' - +# Extract the first word of "uname", so it can be a program name with args. +set dummy uname; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_UNAMEPROG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $UNAMEPROG in + [\\/]* | ?:[\\/]*) + ac_cv_path_UNAMEPROG="$UNAMEPROG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_UNAMEPROG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + ;; +esac +fi +UNAMEPROG=$ac_cv_path_UNAMEPROG +if test -n "$UNAMEPROG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNAMEPROG" >&5 +printf "%s\n" "$UNAMEPROG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +printf "%s\n" "#define UNAMEPROG \"$UNAMEPROG\"" >>confdefs.h +MAKE=${MAKE-"make"} +$MAKE -v -f /dev/null 2>/dev/null | $GREP GNU >/dev/null +have_gnu_make=$? +## +# The Perl function system() is used for running the Net-SNMP regression +# tests. Find out whether that function invokes a POSIX shell, which is +# necessary in order to run the regression tests. When using Windows + MSYS +# + ActiveState Perl, Perl's system() function does invoke Windows' cmd.exe +# which is not a POSIX shell. +## +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Perl function system() invokes a POSIX shell" >&5 +printf %s "checking whether the Perl function system() invokes a POSIX shell... " >&6; } +if test "x$PERLPROG" != 'x' && test -x "$PERLPROG" && test "x`$PERLPROG -e 'system('\''echo $OSTYPE'\'');'`" != 'x$OSTYPE'; then + PERL_SYSTEM_INVOKES_POSIX_SHELL=yes +else + PERL_SYSTEM_INVOKES_POSIX_SHELL=no +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL_SYSTEM_INVOKES_POSIX_SHELL" >&5 +printf "%s\n" "$PERL_SYSTEM_INVOKES_POSIX_SHELL" >&6; } -ltmain="$ac_aux_dir/ltmain.sh" +## +# Compilation-related program checks: +## -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi - +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi -else - ac_cv_path_FGREP=$FGREP fi - - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8303,42 +8709,47 @@ IFS=$as_save_IFS fi fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - test -n "$DUMPBIN" && break + test -n "$CC" && break done fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8347,707 +8758,867 @@ IFS=$as_save_IFS fi fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - test -n "$ac_ct_DUMPBIN" && break + test -n "$ac_ct_CC" && break done - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" + if test "x$ac_ct_CC" = x; then + CC="" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DUMPBIN=$ac_ct_DUMPBIN + CC=$ac_ct_CC fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi fi -test -z "$NM" && NM=nm - - - - +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi - rm -f conftest* +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else - i=0 - teststring="ABCD" + CC="$ac_cv_prog_CC" +fi - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; +fi - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; +int +main (void) +{ +#ifndef __GNUC__ + choke me +#endif - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + GCC= fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - +ac_test_CFLAGS=${CFLAGS+y} +ac_save_CFLAGS=$CFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi else - lt_unset=false + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + done + ac_cv_prog_CPP=$CPP -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 +fi + CPP=$ac_cv_prog_CPP else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : +else $as_nop + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +LINKCC=${LINKCC-"$CC"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } +int +main (void) +{ +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* IBM XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_const=yes +else $as_nop + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then +printf "%s\n" "#define const /**/" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF ;; esac +# libtool stuff for shared/static libraries. +# +case `pwd` in + *\ * | *\ *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac +macro_version='2.4.6' +macro_revision='2.4.6' -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi -test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +ltmain=$ac_aux_dir/ltmain.sh -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; -beos*) - lt_cv_deplibs_check_method=pass_all - ;; -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; +case $ECHO in + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; +esac -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -9056,9 +9627,83 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" @@ -9070,137 +9715,88 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + $ac_path_FGREP_found && break 3 + done + done done IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_FGREP=$FGREP fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" + fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" -test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$GREP" && GREP=grep -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -9208,110 +9804,115 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - test -n "$AR" && break - done + +# Check whether --with-gnu-ld was given. +if test ${with_gnu_ld+y} +then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else $as_nop + with_gnu_ld=no fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } +fi +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$ac_ct_AR" >&6; } + +LD=$lt_cv_path_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9321,84 +9922,97 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9407,38 +10021,47 @@ IFS=$as_save_IFS fi fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + test -n "$DUMPBIN" && break + done fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9447,171 +10070,249 @@ IFS=$as_save_IFS fi fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - STRIP=$ac_ct_STRIP + DUMPBIN=$ac_ct_DUMPBIN fi -else - STRIP="$ac_cv_prog_STRIP" fi -test -z "$STRIP" && STRIP=: + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + rm -f conftest* fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi +# find the maximum length of command line arguments +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else $as_nop + i=0 + teststring=ABCD -test -z "$RANLIB" && RANLIB=: + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + fi -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac +if test -n "$lt_cv_sys_max_cmd_len"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac @@ -9621,58 +10322,112 @@ esac -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } - test -n "$AWK" && break -done +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +fi +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_ld_reload_flag='-r' +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; + darwin*) + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac @@ -9681,264 +10436,337 @@ done -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Allow CC to be a program name with arguments. -compiler=$CC +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. -# Define system-specific variables. case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi + +beos*) + lt_cv_deplibs_check_method=pass_all ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so ;; -osf*) - symcode='[BCDEGQRST]' + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' ;; -solaris*) - symcode='[BDRT]' + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; -sco3.2v5*) - symcode='[DT]' + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' ;; -sysv4.2uw2*) - symcode='[DT]' + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi ;; -sysv4) - symcode='[DFNSTU]' + +haiku*) + lt_cv_deplibs_check_method=pass_all ;; -esac -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all ;; -esac -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF + ;; - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; -#ifdef __cplusplus -extern "C" { -#endif +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; - cat <<_LT_EOF >> conftest.$ac_ext +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' + ;; + esac fi +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -9961,260 +10789,182 @@ fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - with_sysroot=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } +test -z "$DLLTOOL" && DLLTOOL=dlltool -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; +esac -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac -need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10223,38 +10973,47 @@ IFS=$as_save_IFS fi fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10263,49 +11022,97 @@ IFS=$as_save_IFS fi fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + AR=$ac_ct_AR fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file fi @@ -10313,28 +11120,32 @@ fi - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10343,38 +11154,43 @@ IFS=$as_save_IFS fi fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10383,50 +11199,62 @@ IFS=$as_save_IFS fi fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DSYMUTIL=$ac_ct_DSYMUTIL + STRIP=$ac_ct_STRIP fi else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" + STRIP="$ac_cv_prog_STRIP" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10435,38 +11263,43 @@ IFS=$as_save_IFS fi fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10475,90 +11308,107 @@ IFS=$as_save_IFS fi fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - NMEDIT=$ac_ct_NMEDIT + RANLIB=$ac_ct_RANLIB fi else - NMEDIT="$ac_cv_prog_NMEDIT" + RANLIB="$ac_cv_prog_RANLIB" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +test -z "$RANLIB" && RANLIB=: -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10567,213 +11417,29 @@ IFS=$as_save_IFS fi fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi + test -n "$AWK" && break done - done -IFS=$as_save_IFS -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi @@ -10782,287 +11448,751 @@ fi +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +# Allow CC to be a program name with arguments. +compiler=$CC +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + # Check to see that the pipe works correctly. + pipe_works=no + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = { + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; - ; - return 0; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" +#endif -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} +#ifdef __cplusplus +} +#endif _LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi else - cat conftest.err >&5 + echo "cannot find nm_test_var in $nlist" >&5 fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi - ;; - esac + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done fi -done +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + -# Set options -enable_win32_dll=yes -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + + + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test ${with_sysroot+y} +then : + withval=$with_sysroot; +else $as_nop + with_sysroot=no fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + + +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done done IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi +rm -f conftest.i conftest2.i conftest.out fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} +then : + printf %s "(cached) " >&6 +else $as_nop + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + +# Check whether --enable-libtool-lock was given. +if test ${enable_libtool_lock+y} +then : + enableval=$enable_libtool_lock; +fi + +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac fi -else - AS="$ac_cv_prog_AS" + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_cv_cc_needs_belf=yes +else $as_nop + lt_cv_cc_needs_belf=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -11071,38 +12201,43 @@ IFS=$as_save_IFS fi fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -11111,50 +12246,84 @@ IFS=$as_save_IFS fi fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DLLTOOL=$ac_ct_DLLTOOL + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else - DLLTOOL="$ac_cv_prog_DLLTOOL" + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_mainfest_tool+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -11163,38 +12332,43 @@ IFS=$as_save_IFS fi fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -11203,174 +12377,438 @@ IFS=$as_save_IFS fi fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OBJDUMP=$ac_ct_OBJDUMP + DSYMUTIL=$ac_ct_DSYMUTIL fi else - OBJDUMP="$ac_cv_prog_OBJDUMP" + DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - enable_dlopen=no - - + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } else - enable_shared=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } else - enable_static=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi else - pic_mode=default + NMEDIT="$ac_cv_prog_NMEDIT" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -test -z "$pic_mode" && pic_mode=default - - +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else - enable_fast_install=yes -fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -11397,720 +12835,733 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -test -z "$LN_S" && LN_S="ln -s" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_cv_ld_exported_symbols_list=yes +else $as_nop + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +fi -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi +# Set options +enable_win32_dll=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi -rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +printf "%s\n" "$AS" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +printf "%s\n" "$ac_ct_AS" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi - ;; -esac +done + done +IFS=$as_save_IFS -# Global variables: -ofile=libtool -can_build_shared=yes +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi -with_gnu_ld="$lt_cv_prog_gnu_ld" + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -old_CC="$CC" -old_CFLAGS="$CFLAGS" +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - + done +IFS=$as_save_IFS -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac -fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +test -z "$AS" && AS=as -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 +test -z "$DLLTOOL" && DLLTOOL=dlltool -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - else - MAGIC_CMD=: - fi -fi +test -z "$OBJDUMP" && OBJDUMP=objdump - fi - ;; -esac -# Use C for the default configuration in the libtool script -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Source file extension for C test sources. -ac_ext=c -# Object file extension for compiled C test sources. -objext=o -objext=$objext -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" + enable_dlopen=no -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' + # Check whether --enable-shared was given. +if test ${enable_shared+y} +then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_shared=yes +fi -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Allow CC to be a program name with arguments. -compiler=$CC -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* + # Check whether --enable-static was given. +if test ${enable_static+y} +then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_static=yes +fi -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then -lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi -fi +# Check whether --with-pic was given. +if test ${with_pic+y} +then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + pic_mode=default +fi - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi + # Check whether --enable-fast-install was given. +if test ${enable_fast_install+y} +then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs ;; + esac +else $as_nop + enable_fast_install=yes +fi - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' +# Check whether --with-aix-soname was given. +if test ${with_aix_soname+y} +then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - *) - lt_prog_compiler_pic='-fPIC' + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac + lt_cv_with_aix_soname=$with_aix_soname +else $as_nop + if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - esac - ;; - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi -fi @@ -12122,1484 +13573,772 @@ fi -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi +test -z "$LN_S" && LN_S="ln -s" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs else - need_locks=no + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs fi +rmdir .libs 2>/dev/null +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - ld_shlibs=yes - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES fi + ;; +esac - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +# Global variables: +ofile=libtool +can_build_shared=yes - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 +with_gnu_ld=$lt_cv_prog_gnu_ld -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. +old_CC=$CC +old_CFLAGS=$CFLAGS -_LT_EOF - fi - ;; +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; +func_cc_basename $compiler +cc_basename=$func_cc_basename_result - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac fi - ;; + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; esac - else - ld_shlibs=no fi - ;; + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + else + MAGIC_CMD=: + fi +fi -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; + fi + ;; +esac - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 +# Use C for the default configuration in the libtool script -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +# Source file extension for C test sources. +ac_ext=c - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac +# Object file extension for compiled C test sources. +objext=o +objext=$objext - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi +# Allow CC to be a program name with arguments. +compiler=$CC -fi +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC - aix_libpath=$lt_cv_aix_libpath_ -fi +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : fi - aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' + lt_prog_compiler_pic='-fPIC' ;; m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. ;; - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' ;; - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= ;; - freebsd1*) - ld_shlibs=no + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' + *) + lt_prog_compiler_pic='-fPIC' ;; + esac - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac ;; - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' ;; - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' ;; - *nto* | *qnx*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: + rdos*) + lt_prog_compiler_static='-non_shared' ;; solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; + lt_prog_compiler_wl='-Wl,';; esac - link_all_deplibs=yes ;; sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' ;; - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no ;; uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' ;; *) - ld_shlibs=no + lt_prog_compiler_can_build_shared=no ;; esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # -# Do we need to explicitly link libc? +# Check to make sure the PIC flag actually works. # -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* +if test -n "$lt_prog_compiler_pic"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi +fi @@ -13611,8 +14350,47 @@ esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi @@ -13620,844 +14398,1511 @@ esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } + if test no = "$hard_links"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + esac + ld_shlibs=yes + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. +_LT_EOF + fi + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + export_dynamic_flag_spec='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi +fi + aix_libpath=$lt_cv_aix_libpath_ +fi + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi +fi + aix_libpath=$lt_cv_aix_libpath_ +fi + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + darwin* | rhapsody*) + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + else + ld_shlibs=no + fi + ;; + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + hpux9*) + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='$wl-E' + ;; + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac fi ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else $as_nop + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + lt_cv_irix_exported_symbol=yes +else $as_nop + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + *nto* | *qnx*) + ;; - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no + fi ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + + solaris*) + no_undefined_flag=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no ;; - esac - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -freebsd1*) - dynamic_linker=no - ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; + *) + ld_shlibs=no + ;; + esac -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' + ;; + esac fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; + fi -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; +with_gnu_ld=$with_gnu_ld -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir -fi - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} +then : + printf %s "(cached) " >&6 +else $as_nop + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac fi ;; +esac -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; -rdos*) - dynamic_linker=no - ;; -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi @@ -14550,735 +15995,899 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes -fi - ;; - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi -fi -fi -fi -fi -fi - ;; - esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" -#if HAVE_DLFCN_H -#include -#endif -#include -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" -#if HAVE_DLFCN_H -#include -#endif -#include -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac -fi - - - - - - + ;; +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -CC="$lt_save_CC" +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir - ac_config_commands="$ac_config_commands libtool" +fi + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -# Only expand once: + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -## -# Build environment: -## +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; -# developer build -# (enabled by default when building from SVN checkout) -# -if test "x$developer" != "xno" -a -f $srcdir/remove-files; then - developer="yes" +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for developer gcc flags" >&5 -$as_echo_n "checking for developer gcc flags... " >&6; } -if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then - # WWWXXX - strict type checking - # - DEVFLAGS="-Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual" -else - DEVFLAGS="" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVFLAGS" >&5 -$as_echo "$DEVFLAGS" >&6; } +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -# building outside source directory -# -# a) ensure build include paths are before source -# b) ensure GNU make uses 'vpath' instead of 'VPATH' -# -NON_GNU_VPATH="VPATH =" -GNU_vpath="#vpath" +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -# define include paths relative to top_srcdir -# tweak includes if we're building outside of the source dir -# -if test "x$srcdir" = "x."; then - TOP_INCLUDES=SRC_TOP_INCLUDES - SNMPLIB_INCLUDES=SRC_SNMPLIB_INCLUDES - AGENT_INCLUDES=SRC_AGENT_INCLUDES - HELPER_INCLUDES=SRC_HELPER_INCLUDES - MIBGROUP_INCLUDES=SRC_MIBGROUP_INCLUDES -else - TOP_INCLUDES=BLD_TOP_INCLUDES - SNMPLIB_INCLUDES=BLD_SNMPLIB_INCLUDES - AGENT_INCLUDES=BLD_AGENT_INCLUDES - HELPER_INCLUDES=BLD_HELPER_INCLUDES - MIBGROUP_INCLUDES=BLD_MIBGROUP_INCLUDES - if test $have_gnu_make -eq 0 ; then - NON_GNU_VPATH="#VPATH =" - GNU_vpath="vpath" - fi -fi +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH @@ -15289,1623 +16898,5656 @@ fi -## -# System-related compilation checks: -## -# What system are we building for -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if ${ac_cv_target+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- -PARTIALTARGETOS=`echo $target_os | sed 's/[-._].*//'` - cat >> configure-summary << EOF - Building for: $PARTIALTARGETOS -EOF -# -# Whether or not Cygwin's ld recognizes the flag -no-undefined. -# -case x$target_os in -xcygwin*) - saved_LDFLAGS=$LDFLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker supports -no-undefined" >&5 -$as_echo_n "checking whether the linker supports -no-undefined... " >&6; } - LDFLAGS="$saved_LDFLAGS -Wl,-no-undefined" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; LD_NO_UNDEFINED=-no-undefined -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$saved_LDFLAGS" - ;; -esac -# -# Socket library: either 'default' (non-MinGW) or 'winsock2' (MinGW). -# -case x$target_os in - xmingw*) - with_socklib=winsock2 - if test "x$enable_ipv6" = "xyes"; then - CFLAGS="-D_WIN32_WINNT=0x0501 $CFLAGS" - fi - ;; - *) - with_socklib=default;; -esac -# Check system define behaviour -# Does "-Ux -Dx=x" work as expected? -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to un-define target system token (before redefining)" >&5 -$as_echo_n "checking whether to un-define target system token (before redefining)... " >&6; } -OLD_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="-U$PARTIALTARGETOS -D$PARTIALTARGETOS=$PARTIALTARGETOS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -[ -#ifdef $PARTIALTARGETOS -yes -#endif - ] -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - PARTIALTARGETFLAGS="-U$PARTIALTARGETOS -D$PARTIALTARGETOS=$PARTIALTARGETOS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - PARTIALTARGETFLAGS="-D$PARTIALTARGETOS=$PARTIALTARGETOS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* -CFLAGS="$CFLAGS $PARTIALTARGETFLAGS" -CPPFLAGS="$OLD_CPPFLAGS" -# Determine appropriate include -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for system include file" >&5 -$as_echo_n "checking for system include file... " >&6; } -filebase=$target_os -# ignore binary format indication -filebase=`echo $filebase | $SED 's/elf//'` -filebase=`echo $filebase | $SED 's/aout//'` -filebase=`echo $filebase | $SED 's/ecoff//'` -filebase=`echo $filebase | $SED 's/coff//'` -while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/system/$filebase.h -do - last=$filebase - filebase=`echo $filebase | $SED 's/[-._][^-._]*$//'` - if test "x$filebase" = "x$last"; then - filebase=`echo $filebase | $SED 's/[0-9]*$//'` - fi -done -if test "x$filebase" = "x$last"; then - filebase="generic" -fi -ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE="net-snmp/system/$filebase.h" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE" >&5 -$as_echo "$ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE" >&6; } -cat >>confdefs.h <<_ACEOF -#define NETSNMP_SYSTEM_INCLUDE_FILE "$ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE" -_ACEOF -# Determine appropriate include -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for machine-type include file" >&5 -$as_echo_n "checking for machine-type include file... " >&6; } -filebase=$target_cpu -while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/machine/$filebase.h -do - last=$filebase - filebase=`echo $filebase | $SED 's/[-._][^-._]*$//'` -done -if test "x$filebase" = "x$last"; then - filebase="generic" -fi -ac_cv_NETSNMP_MACHINE_INCLUDE_FILE="net-snmp/machine/$filebase.h" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_NETSNMP_MACHINE_INCLUDE_FILE" >&5 -$as_echo "$ac_cv_NETSNMP_MACHINE_INCLUDE_FILE" >&6; } -cat >>confdefs.h <<_ACEOF -#define NETSNMP_MACHINE_INCLUDE_FILE "$ac_cv_NETSNMP_MACHINE_INCLUDE_FILE" -_ACEOF -## -# Platform-specific compilation checks: -## -# Preprocessor checks: -# -# More sensible system identifier (MinGW) -# -if test "x$PARTIALTARGETOS" = "xmingw32msvc"; then - CFLAGS="$CFLAGS -Dmingw32" -fi -# Handle .in file extension (GCC) -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional cpp flags" >&5 -$as_echo_n "checking for additional cpp flags... " >&6; } -if test "x$GCC" = "xyes" -a "x$CPP" = "x$CC -E"; then - EXTRACPPFLAGS="-x c" -else - EXTRACPPFLAGS="" -fi -# Solaris extra CPP flags (Solaris) -# -if test "x$GCC" != "xyes"; then - case $target_os in - solaris*) EXTRACPPFLAGS="$EXTRACPPFLAGS -Xs" ;; - esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRACPPFLAGS" >&5 -$as_echo "$EXTRACPPFLAGS" >&6; } -# Compiler checks: -# -# Extract the first word of "$CC", so it can be a program name with args. -set dummy $CC; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CCPATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CCPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_CCPATH="$CCPATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_CCPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -CCPATH=$ac_cv_path_CCPATH -if test -n "$CCPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCPATH" >&5 -$as_echo "$CCPATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -case $target_os in - bsdi*) - # Check for bundled compiler (BSDi) - # - if test "x$CCPATH" = "x/usr/ucb/cc" -o "x$CCPATH" = "x/usr/bin/cc"; then - as_fn_error $? " -*** The BSDI /usr/ucb/cc compiler does not work with this package. -*** Please run configure with --with-cc=gcc -" "$LINENO" 5 - fi - ;; - solaris*) - # Check for bundled compiler (Solaris) - # - if test "x$CCPATH" = "x/usr/ucb/cc"; then - as_fn_error $? " -*** The solaris /usr/ucb/cc compiler does not work with this package. -*** Please put a different compiler in your path first or run -*** configure with --with-cc=XX, where XX is the compiler you want to use. -" "$LINENO" 5 - fi - ;; -esac -# Compiler flags: -# -# The Net-SNMP source code is not strict-aliasing safe, so add -# -fno-strict-aliasing to $CFLAGS if the compiler supports it. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-strict-aliasing" >&5 -$as_echo_n "checking whether the compiler supports -fno-strict-aliasing... " >&6; } -netsnmp_save_CFLAGS="$CFLAGS" -CFLAGS="-fno-strict-aliasing $CFLAGS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$netsnmp_save_CFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -# Linker checks: -# -case $target_os in - aix4.2*|aix4.3*|aix5*|aix6*|aix7*) - # Runtime linking flags (AIX) - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker flags to add to enable runtime linking on AIX" >&5 -$as_echo_n "checking what linker flags to add to enable runtime linking on AIX... " >&6; } - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - netsnmp_aix_runtimelinking_flags_ok=yes - break - fi - done - if test "X$netsnmp_aix_runtimelinking_flags_ok" != "Xyes"; then - if test "x$GCC" = "xyes"; then - netsnmp_aix_ldflags="-Wl,-brtl" - else - netsnmp_aix_ldflags="-brtl" - fi - LDFLAGS="$netsnmp_aix_ldflags $LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_aix_ldflags" >&5 -$as_echo "$netsnmp_aix_ldflags" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - fi - ;; - darwin8*|darwin9*|darwin10*|darwin11*|darwin12*|darwin13*) - # Flat Namespace linking (Mac OS/X) - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether darwin ld might need -flat_namespace" >&5 -$as_echo_n "checking whether darwin ld might need -flat_namespace... " >&6; } - if test -z "$MACOSX_DEPLOYMENT_TARGET"; then - LDFLAGS="-flat_namespace -framework CoreFoundation -framework CoreServices -framework DiskArbitration -framework IOKit $LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - ;; -esac -# dpkg package (swintst_apt) -# used in agent only -# -# Extract the first word of "dpkg-query", so it can be a program name with args. -set dummy dpkg-query; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DPKG_QUERY_PATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $DPKG_QUERY_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_DPKG_QUERY_PATH="$DPKG_QUERY_PATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_DPKG_QUERY_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -DPKG_QUERY_PATH=$ac_cv_path_DPKG_QUERY_PATH -if test -n "$DPKG_QUERY_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DPKG_QUERY_PATH" >&5 -$as_echo "$DPKG_QUERY_PATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -if test x$DPKG_QUERY_PATH != x; then -$as_echo "#define HAVE_DPKG_QUERY 1" >>confdefs.h -fi -## -# Non-program/compilation checks: -## -# Substitute version number. -# -VERSION=$PACKAGE_VERSION - cat >> configure-summary << EOF - Net-SNMP Version: $PACKAGE_VERSION -EOF -# -*- autoconf -*- -######################################### -## -# Configure paths -## -######################################### -## -# Prefix paths: -## -# Main prefix -# -if test "x$prefix" = "xNONE"; then - prefix=/usr/local -fi -# Prefix must be an absolute path -# i.e. begin with "/" (Unix) -# or "[A-Z]:" (Windows) -# -firstchar=`echo $prefix | $SED 's/\(.\).*/\1/'` -if test "x$firstchar" != "x/" ; then - secondchar=`echo $prefix | $SED 's/.\(.\).*/\1/'` - if test "x$secondchar" != "x:" ; then - prefix=`pwd`/$prefix - echo "adjusting prefix to $prefix" - fi -fi -# Exec prefix -# -# Prefix must be an absolute path -# i.e. begin with "/" (Unix) -# or "[A-Z]:" (Windows) -# -if test "x$exec_prefix" = "xNONE"; then - exec_prefix='${prefix}' -else - firstchar=`echo $exec_prefix | $SED 's/\(.\).*/\1/'` - if test "x$firstchar" != "x/" ; then - secondchar=`echo $exec_prefix | $SED 's/.\(.\).*/\1/'` - if test "x$secondchar" != "x:" ; then - exec_prefix=`pwd`/$exec_prefix - echo "adjusting exec_prefix to $exec_prefix" - fi - fi -fi -## -# Environmental variables: -## - -# SNMPLIBPATH -# -SNMPLIBPATH="" -tmpset="$libdir/snmp" -while test "x$tmpset" != "x$SNMPLIBPATH"; do - SNMPLIBPATH="$tmpset" - eval tmpset="$tmpset" -done -cat >>confdefs.h <<_ACEOF -#define SNMPLIBPATH "$SNMPLIBPATH" -_ACEOF -cat >>confdefs.h <<_ACEOF -#define SNMPDLMODPATH "$SNMPLIBPATH/dlmod" -_ACEOF + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test yes = "$hardcode_automatic"; then + # We can hardcode non-existent directories. + if test no != "$hardcode_direct" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } -# SNMPSHAREPATH -# -SNMPSHAREPATH="" -tmpset="$datadir/snmp" -while test "x$tmpset" != "x$SNMPSHAREPATH"; do - SNMPSHAREPATH="$tmpset" - eval tmpset="$tmpset" -done -cat >>confdefs.h <<_ACEOF -#define SNMPSHAREPATH "$SNMPSHAREPATH" -_ACEOF +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi -# MIBDIRS (default) -# -if test "x$NETSNMP_DEFAULT_MIBDIRS" = "x"; then - NETSNMP_DEFAULT_MIBDIRS="\$HOME/.snmp/mibs:$SNMPSHAREPATH/mibs" - if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then - # - # USe Windows-style path separator - NETSNMP_DEFAULT_MIBDIRS=`echo "$NETSNMP_DEFAULT_MIBDIRS" | $SED 's/:/;/g'` - fi - cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBDIRS "$NETSNMP_DEFAULT_MIBDIRS" -_ACEOF -fi -# SNMPCONFPATH -# -SNMPCONFPATH="" -tmpset="$sysconfdir/snmp" -while test "x$tmpset" != "x$SNMPCONFPATH"; do - SNMPCONFPATH="$tmpset" - eval tmpset="$tmpset" -done -cat >>confdefs.h <<_ACEOF -#define SNMPCONFPATH "$SNMPCONFPATH" -_ACEOF + if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; -######################################### -## -# Checks for header files. -## -######################################### + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; -## -# Standard checks: -## -# Core: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + darwin*) + # if libdl is installed we need to link against it + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char dlopen (); int -main () +main (void) { - +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dl_dlopen=yes +else $as_nop + ac_cv_lib_dl_dlopen=no fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else $as_nop -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes -else - ac_cv_header_stdc=no fi -rm -f conftest* -fi + ;; -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes +then : + lt_cv_dlopen=shl_load +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char shl_load (); int -main () +main (void) { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return shl_load (); + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dld_shl_load=yes +else $as_nop + ac_cv_lib_dld_shl_load=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - # , , & -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval \${$as_ac_Header+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld +else $as_nop + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes +then : + lt_cv_dlopen=dlopen +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include <$ac_hdr> +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char dlopen (); int -main () +main (void) { -if ((DIR *) 0) -return 0; +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dl_dlopen=yes +else $as_nop + ac_cv_lib_dl_dlopen=no fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); +char dlopen (); int -main () +main (void) { -return opendir (); +return dlopen (); ; return 0; } _ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : - break -fi -done -if ${ac_cv_search_opendir+:} false; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_svld_dlopen=yes +else $as_nop + ac_cv_lib_svld_dlopen=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); +char dld_link (); int -main () +main (void) { -return opendir (); +return dld_link (); ; return 0; } _ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : - break -fi -done -if ${ac_cv_search_opendir+:} false; then : - -else - ac_cv_search_opendir=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_dld_dld_link=yes +else $as_nop + ac_cv_lib_dld_dld_link=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi -fi - # , , & -# Apps: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi - # - -# allow for quick module/library/etc processing checks -if test "x$NETSNMP_QUICK_CHECK" = "x" ; then -## -# Stand-alone headers: -## -# Core: -for ac_header in getopt.h pthread.h regex.h string.h syslog.h unistd.h stdint.h inttypes.h sys/param.h sys/select.h sys/socket.h sys/time.h sys/timeb.h sys/un.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi -done - - -# Library and Agent: -for ac_header in nlist.h -do : - ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" " -$ac_includes_default - -#ifndef LIBBSD_DISABLE_DEPRECATED -#define LIBBSD_DISABLE_DEPRECATED 1 -#endif - -" -if test "x$ac_cv_header_nlist_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NLIST_H 1 -_ACEOF fi -done - - -# Library: -for ac_header in fcntl.h io.h kstat.h limits.h locale.h sys/file.h sys/ioctl.h sys/sockio.h sys/stat.h sys/systemcfg.h sys/systeminfo.h sys/times.h sys/uio.h sys/utsname.h netipx/ipx.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi -done - - -# Agent: -for ac_header in dlfcn.h err.h fcntl.h fstab.h grp.h io.h ioctls.h kstat.h kvm.h limits.h mntent.h mtab.h pkglocs.h pwd.h com_err.h et/com_err.h utmpx.h utsname.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ;; + esac -fi + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi -done + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -for ac_header in sys/diskio.h sys/dkio.h sys/file.h sys/filio.h sys/fixpoint.h sys/fs.h sys/ioctl.h sys/loadavg.h sys/mntent.h sys/mnttab.h sys/pool.h sys/protosw.h sys/pstat.h sys/sockio.h sys/stat.h sys/statfs.h sys/statvfs.h sys/stream.h sys/sysget.h sys/sysmp.h sys/tcpipstats.h sys/utsname.h sys/vfs.h sys/vm.h sys/vmmac.h sys/vmmeter.h sys/vmparam.h sys/vmsystm.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" -done +#if HAVE_DLFCN_H +#include +#endif +#include -for ac_header in asm/page.h asm/types.h inet/mib2.h linux/hdreg.h linux/tasks.h machine/param.h netinet/tcp_fsm.h ufs/fs.h uvm/uvm_extern.h uvm/uvm_param.h vm/vm.h vm/vm_extern.h vm/vm_param.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif -fi +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -done +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; -# Apps: -for ac_header in fcntl.h grp.h pwd.h sys/cdefs.h sys/ioctl.h sys/socket.h sys/sockio.h sys/time.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi fi +rm -fr conftest* -done - - -# Not-Used: -for ac_header in search.h sgtty.h xti.h sys/dmap.h sys/poll.h sys/timeout.h machine/pte.h pci/pci.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } -done + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" +#if HAVE_DLFCN_H +#include +#endif +#include -# Valgrind -for ac_header in valgrind/valgrind.h valgrind/memcheck.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif -fi +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -done +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif -# OpenSSL -for ac_header in openssl/aes.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi fi +rm -fr conftest* -done - # (Core) -for ac_header in openssl/dh.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } + fi -done - # (Apps) -# Not-Used: -for ac_header in openssl/des.h openssl/hmac.h openssl/evp.h security/cryptoki.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac fi -done -# RPM subdirectory path (Agent) -if test "x$with_rpm" != "xno"; then - for ac_header in rpm/rpmts.h rpm/rpmfileutil.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + + + + + + + + + + + + + + +striplib= +old_striplib= +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report what library types will actually be built + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } + + + fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$RC"; then + ac_cv_prog_RC="$RC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_RC="${ac_tool_prefix}windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS fi +fi +RC=$ac_cv_prog_RC +if test -n "$RC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 +printf "%s\n" "$RC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -## -# Pre-requisite on other headers: -## +fi +if test -z "$ac_cv_prog_RC"; then + ac_ct_RC=$RC + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_RC"; then + ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RC="windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RC=$ac_cv_prog_ac_ct_RC +if test -n "$ac_ct_RC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 +printf "%s\n" "$ac_ct_RC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_RC" = x; then + RC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RC=$ac_ct_RC + fi +else + RC="$ac_cv_prog_RC" +fi + + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code=$lt_simple_compile_test_code + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +compiler_RC=$CC +func_cc_basename $compiler +cc_basename=$func_cc_basename_result + +lt_cv_prog_compiler_c_o_RC=yes + +if test -n "$compiler"; then + : + + + +fi + +GCC=$lt_save_GCC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS + + + + +## +# Build environment: +## + +# developer build +# (enabled by default when building from SVN checkout) +# +if test "x$developer" != "xno" -a -f $srcdir/remove-files; then + developer="yes" +fi +if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer gcc flags" >&5 +printf %s "checking for developer gcc flags... " >&6; } + # WWWXXX - strict type checking + # + netsnmp_save_CFLAGS="$CFLAGS" + for opt in -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual \ + -Wimplicit-fallthrough=2 -Wlogical-op -Wundef \ + -Wno-format-truncation -Wno-missing-field-initializers \ + -Wno-sign-compare -Wno-unused-parameter + do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports $opt" >&5 +printf %s "checking whether the compiler supports $opt... " >&6; } + if test x$opt != x-Wstrict-prototypes; then + CFLAGS="-Werror $opt $CFLAGS" + else + CFLAGS="$opt $CFLAGS" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + DEVFLAGS="$DEVFLAGS $opt" + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$netsnmp_save_CFLAGS" + done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVFLAGS" >&5 +printf "%s\n" "$DEVFLAGS" >&6; } +else + DEVFLAGS="" +fi + + + +# building outside source directory +# +# a) ensure build include paths are before source +# b) ensure GNU make uses 'vpath' instead of 'VPATH' +# +NON_GNU_VPATH="VPATH =" +GNU_vpath="#vpath" + +# define include paths relative to top_srcdir +# tweak includes if we're building outside of the source dir +# +if test "x$srcdir" = "x."; then + TOP_INCLUDES=SRC_TOP_INCLUDES + SNMPLIB_INCLUDES=SRC_SNMPLIB_INCLUDES + AGENT_INCLUDES=SRC_AGENT_INCLUDES + HELPER_INCLUDES=SRC_HELPER_INCLUDES + MIBGROUP_INCLUDES=SRC_MIBGROUP_INCLUDES +else + TOP_INCLUDES=BLD_TOP_INCLUDES + SNMPLIB_INCLUDES=BLD_SNMPLIB_INCLUDES + AGENT_INCLUDES=BLD_AGENT_INCLUDES + HELPER_INCLUDES=BLD_HELPER_INCLUDES + MIBGROUP_INCLUDES=BLD_MIBGROUP_INCLUDES + if test $have_gnu_make -eq 0 ; then + NON_GNU_VPATH="#VPATH =" + GNU_vpath="vpath" + fi +fi + + + + + + + + + + +## +# System-related compilation checks: +## + +# What system are we building for +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +printf %s "checking target system type... " >&6; } +if test ${ac_cv_target+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +printf "%s\n" "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +PARTIALTARGETOS=`echo $target_os | sed 's/[-._].*//'` + + + cat >> configure-summary << EOF + Building for: $PARTIALTARGETOS +EOF + + + +# Avoid conflicts on Cygwin between and the openssl header files. +case x$target_os in + xcygwin*|xmingw32*) + CPPFLAGS="-DVC_EXTRALEAN -DWIN32_LEAN_AND_MEAN $CPPFLAGS";; +esac + + +# +# Whether the linker supports the flag -Wl,-no-undefined. Do not use +# -Wl,-no-undefined on OpenBSD because it breaks linking of shared +# libraries. Use -Wl,-no-undefined on all other platforms such that +# undefined symbols are detected at compile time instead of at runtime. +# + +case x$target_os in + xopenbsd*) + ;; + *) + if ! echo "$CFLAGS" | grep -q -- -fsanitize=; then + saved_LDFLAGS=$LDFLAGS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports -Wl,-no-undefined" >&5 +printf %s "checking whether the linker supports -Wl,-no-undefined... " >&6; } + LDFLAGS="$saved_LDFLAGS -Wl,-no-undefined" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; LD_NO_UNDEFINED=-Wl,-no-undefined +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$saved_LDFLAGS" + + fi + ;; +esac + + +# +# Socket library: either 'default' (non-MinGW) or 'winsock2' (MinGW). +# +case x$target_os in + xmingw*) + with_socklib=winsock2 + CPPFLAGS="-D_WIN32_WINNT=0xffff -DWIN32 $CPPFLAGS" + ;; + *) + with_socklib=default;; +esac + + +# Check system define behaviour +# Does "-Ux -Dx=x" work as expected? +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to un-define target system token (before redefining)" >&5 +printf %s "checking whether to un-define target system token (before redefining)... " >&6; } +OLD_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-U$PARTIALTARGETOS -D$PARTIALTARGETOS=$PARTIALTARGETOS" + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +[ +#ifdef $PARTIALTARGETOS +yes +#endif + ] +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1 +then : + PARTIALTARGETFLAGS="-U$PARTIALTARGETOS -D$PARTIALTARGETOS=$PARTIALTARGETOS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + PARTIALTARGETFLAGS="-D$PARTIALTARGETOS=$PARTIALTARGETOS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -rf conftest* + +CFLAGS="$CFLAGS $PARTIALTARGETFLAGS" +CPPFLAGS="$OLD_CPPFLAGS" + + +# Determine appropriate include +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for system include file" >&5 +printf %s "checking for system include file... " >&6; } + +filebase=$target_os +# ignore binary format indication +filebase=`echo $filebase | $SED 's/elf//'` +filebase=`echo $filebase | $SED 's/aout//'` +filebase=`echo $filebase | $SED 's/ecoff//'` +filebase=`echo $filebase | $SED 's/coff//'` +while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/system/$filebase.h +do + last=$filebase + filebase=`echo $filebase | $SED 's/[-._][^-._]*$//'` + if test "x$filebase" = "x$last"; then + filebase=`echo $filebase | $SED 's/[0-9]*$//'` + fi +done + +if test "x$filebase" = "x$last"; then + filebase="generic" +fi +ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE="net-snmp/system/$filebase.h" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE" >&5 +printf "%s\n" "$ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE" >&6; } +printf "%s\n" "#define NETSNMP_SYSTEM_INCLUDE_FILE \"$ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE\"" >>confdefs.h + + + +# Determine appropriate include +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for machine-type include file" >&5 +printf %s "checking for machine-type include file... " >&6; } + +filebase=$target_cpu +while test "x$filebase" != "x$last" -a ! -f $srcdir/include/net-snmp/machine/$filebase.h +do + last=$filebase + filebase=`echo $filebase | $SED 's/[-._][^-._]*$//'` +done + +if test "x$filebase" = "x$last"; then + filebase="generic" +fi +ac_cv_NETSNMP_MACHINE_INCLUDE_FILE="net-snmp/machine/$filebase.h" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_NETSNMP_MACHINE_INCLUDE_FILE" >&5 +printf "%s\n" "$ac_cv_NETSNMP_MACHINE_INCLUDE_FILE" >&6; } +printf "%s\n" "#define NETSNMP_MACHINE_INCLUDE_FILE \"$ac_cv_NETSNMP_MACHINE_INCLUDE_FILE\"" >>confdefs.h + + + +## +# Platform-specific compilation checks: +## + +# Preprocessor checks: +# + +# More sensible system identifier (MinGW) +# +if test "x$PARTIALTARGETOS" = "xmingw32msvc"; then + CFLAGS="$CFLAGS -Dmingw32" +fi + +# Handle .in file extension (GCC) +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for additional cpp flags" >&5 +printf %s "checking for additional cpp flags... " >&6; } +if test "x$GCC" = "xyes" -a "x$CPP" = "x$CC -E"; then + EXTRACPPFLAGS="-x c" +else + EXTRACPPFLAGS="" +fi + +# Solaris extra CPP flags (Solaris) +# +if test "x$GCC" != "xyes"; then + case $target_os in + solaris*) EXTRACPPFLAGS="$EXTRACPPFLAGS -Xs" ;; + esac +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXTRACPPFLAGS" >&5 +printf "%s\n" "$EXTRACPPFLAGS" >&6; } + + +# Compiler checks: +# + +# Extract the first word of "$CC", so it can be a program name with args. +set dummy $CC; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_CCPATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $CCPATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_CCPATH="$CCPATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_CCPATH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CCPATH=$ac_cv_path_CCPATH +if test -n "$CCPATH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCPATH" >&5 +printf "%s\n" "$CCPATH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +case $target_os in + bsdi*) + # Check for bundled compiler (BSDi) + # + if test "x$CCPATH" = "x/usr/ucb/cc" -o "x$CCPATH" = "x/usr/bin/cc"; then + as_fn_error $? " + +*** The BSDI /usr/ucb/cc compiler does not work with this package. +*** Please run configure with --with-cc=gcc +" "$LINENO" 5 + fi + ;; + solaris*) + # Check for bundled compiler (Solaris) + # + if test "x$CCPATH" = "x/usr/ucb/cc"; then + as_fn_error $? " + +*** The solaris /usr/ucb/cc compiler does not work with this package. +*** Please put a different compiler in your path first or run +*** configure with --with-cc=XX, where XX is the compiler you want to use. +" "$LINENO" 5 + fi + ;; +esac + + +# Compiler flags: +# + +CFLAGS="-DNETSNMP_REMOVE_U64 $CFLAGS" + +# The Net-SNMP source code is not strict-aliasing safe, so add +# -fno-strict-aliasing to $CFLAGS if the compiler supports it. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-strict-aliasing" >&5 +printf %s "checking whether the compiler supports -fno-strict-aliasing... " >&6; } +netsnmp_save_CFLAGS="$CFLAGS" +CFLAGS="-fno-strict-aliasing $CFLAGS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + CFLAGS="$netsnmp_save_CFLAGS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + +# Linker checks: +# + +case $target_os in + aix4.2*|aix4.3*|aix5*|aix6*|aix7*) + # Runtime linking flags (AIX) + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what linker flags to add to enable runtime linking on AIX" >&5 +printf %s "checking what linker flags to add to enable runtime linking on AIX... " >&6; } + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + netsnmp_aix_runtimelinking_flags_ok=yes + break + fi + done + if test "X$netsnmp_aix_runtimelinking_flags_ok" != "Xyes"; then + if test "x$GCC" = "xyes"; then + netsnmp_aix_ldflags="-Wl,-brtl" + else + netsnmp_aix_ldflags="-brtl" + fi + LDFLAGS="$netsnmp_aix_ldflags $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_aix_ldflags" >&5 +printf "%s\n" "$netsnmp_aix_ldflags" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } + fi + ;; + + darwin*) + # Flat Namespace linking (Mac OS/X) + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether darwin ld might need -flat_namespace" >&5 +printf %s "checking whether darwin ld might need -flat_namespace... " >&6; } + if test -z "$MACOSX_DEPLOYMENT_TARGET"; then + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="-flat_namespace -framework CoreFoundation -framework CoreServices -framework DiskArbitration -framework IOKit $LDFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + LDFLAGS="$saved_LDFLAGS"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + ;; + + *) + ;; +esac + + +# dpkg package (swintst_apt) +# used in agent only +# +# Extract the first word of "dpkg-query", so it can be a program name with args. +set dummy dpkg-query; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DPKG_QUERY_PATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $DPKG_QUERY_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_DPKG_QUERY_PATH="$DPKG_QUERY_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DPKG_QUERY_PATH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DPKG_QUERY_PATH=$ac_cv_path_DPKG_QUERY_PATH +if test -n "$DPKG_QUERY_PATH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DPKG_QUERY_PATH" >&5 +printf "%s\n" "$DPKG_QUERY_PATH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test x$DPKG_QUERY_PATH != x; then + +printf "%s\n" "#define HAVE_DPKG_QUERY 1" >>confdefs.h + +fi + + +## +# Non-program/compilation checks: +## + +# Substitute version number. +# +VERSION=$PACKAGE_VERSION + + + cat >> configure-summary << EOF + Net-SNMP Version: $PACKAGE_VERSION +EOF + + + +# -*- autoconf -*- +######################################### +## +# Configure paths +## +######################################### + +## +# Prefix paths: +## + +# Main prefix +# +if test "x$prefix" = "xNONE"; then + prefix=/usr/local +fi + +# Prefix must be an absolute path +# i.e. begin with "/" (Unix) +# or "[A-Z]:" (Windows) +# +firstchar=`echo $prefix | $SED 's/\(.\).*/\1/'` +if test "x$firstchar" != "x/" ; then + secondchar=`echo $prefix | $SED 's/.\(.\).*/\1/'` + if test "x$secondchar" != "x:" ; then + prefix=`pwd`/$prefix + echo "adjusting prefix to $prefix" + fi +fi + + +# Exec prefix +# +# Prefix must be an absolute path +# i.e. begin with "/" (Unix) +# or "[A-Z]:" (Windows) +# +if test "x$exec_prefix" = "xNONE"; then + exec_prefix='${prefix}' +else + firstchar=`echo $exec_prefix | $SED 's/\(.\).*/\1/'` + if test "x$firstchar" != "x/" ; then + secondchar=`echo $exec_prefix | $SED 's/.\(.\).*/\1/'` + if test "x$secondchar" != "x:" ; then + exec_prefix=`pwd`/$exec_prefix + echo "adjusting exec_prefix to $exec_prefix" + fi + fi +fi + + +## +# Environmental variables: +## + +# SNMPLIBPATH +# +SNMPLIBPATH="" +tmpset="$libdir/snmp" +while test "x$tmpset" != "x$SNMPLIBPATH"; do + SNMPLIBPATH="$tmpset" + eval tmpset="$tmpset" +done +printf "%s\n" "#define SNMPLIBPATH \"$SNMPLIBPATH\"" >>confdefs.h + + +printf "%s\n" "#define SNMPDLMODPATH \"$SNMPLIBPATH/dlmod\"" >>confdefs.h + + +# SNMPSHAREPATH +# +SNMPSHAREPATH="" +tmpset="$datadir/snmp" +while test "x$tmpset" != "x$SNMPSHAREPATH"; do + SNMPSHAREPATH="$tmpset" + eval tmpset="$tmpset" +done +printf "%s\n" "#define SNMPSHAREPATH \"$SNMPSHAREPATH\"" >>confdefs.h + + + +# MIBDIRS (default) +# +if test "x$NETSNMP_DEFAULT_MIBDIRS" = "x"; then + NETSNMP_DEFAULT_MIBDIRS="\$HOME/.snmp/mibs:$SNMPSHAREPATH/mibs" + if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then + # + # USe Windows-style path separator + NETSNMP_DEFAULT_MIBDIRS=`echo "$NETSNMP_DEFAULT_MIBDIRS" | $SED 's/:/;/g'` + fi + printf "%s\n" "#define NETSNMP_DEFAULT_MIBDIRS \"$NETSNMP_DEFAULT_MIBDIRS\"" >>confdefs.h + +fi + + +# SNMPCONFPATH +# +SNMPCONFPATH="" +tmpset="$sysconfdir/snmp" +while test "x$tmpset" != "x$SNMPCONFPATH"; do + SNMPCONFPATH="$tmpset" + eval tmpset="$tmpset" +done +printf "%s\n" "#define SNMPCONFPATH \"$SNMPCONFPATH\"" >>confdefs.h + + + +######################################### +## +# Checks for header files. +## +######################################### + +## +# Standard checks: +## +# Core: +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + # , , & +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +printf %s "checking for $ac_hdr that defines DIR... " >&6; } +if eval test \${$as_ac_Header+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main (void) +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_ac_Header=yes" +else $as_nop + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main (void) +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main (void) +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : + break +fi +done +if test ${ac_cv_search_opendir+y} +then : + +else $as_nop + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + # , , & +# Apps: +# Don't use when using Windows sockets +case x$with_socklib in + xwinsock2) + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test ${ac_cv_header_sys_wait_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main (void) +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_header_sys_wait_h=yes +else $as_nop + ac_cv_header_sys_wait_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h + +fi + # +esac + +# allow for quick module/library/etc processing checks +if test "x$NETSNMP_QUICK_CHECK" = "x" ; then + +## +# Stand-alone headers: +## +# Core: +ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" +if test "x$ac_cv_header_regex_h" = xyes +then : + printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" +if test "x$ac_cv_header_syslog_h" = xyes +then : + printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default" +if test "x$ac_cv_header_process_h" = xyes +then : + printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/syslog.h" "ac_cv_header_sys_syslog_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_syslog_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_timeb_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIMEB_H 1" >>confdefs.h + +fi + + +# Library and Agent: +ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" " +$ac_includes_default + +#ifndef LIBBSD_DISABLE_DEPRECATED +#define LIBBSD_DISABLE_DEPRECATED 1 +#endif + +" +if test "x$ac_cv_header_nlist_h" = xyes +then : + printf "%s\n" "#define HAVE_NLIST_H 1" >>confdefs.h + +fi + + +# Library: +ac_fn_c_check_header_compile "$LINENO" "crt_externs.h" "ac_cv_header_crt_externs_h" "$ac_includes_default" +if test "x$ac_cv_header_crt_externs_h" = xyes +then : + printf "%s\n" "#define HAVE_CRT_EXTERNS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default" +if test "x$ac_cv_header_io_h" = xyes +then : + printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "kstat.h" "ac_cv_header_kstat_h" "$ac_includes_default" +if test "x$ac_cv_header_kstat_h" = xyes +then : + printf "%s\n" "#define HAVE_KSTAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes +then : + printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "mach-o/dyld.h" "ac_cv_header_mach_o_dyld_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_o_dyld_h" = xyes +then : + printf "%s\n" "#define HAVE_MACH_O_DYLD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_file_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sockio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/systemcfg.h" "ac_cv_header_sys_systemcfg_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_systemcfg_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSTEMCFG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_systeminfo_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_times_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_uio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_utsname_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netipx/ipx.h" "ac_cv_header_netipx_ipx_h" "$ac_includes_default" +if test "x$ac_cv_header_netipx_ipx_h" = xyes +then : + printf "%s\n" "#define HAVE_NETIPX_IPX_H 1" >>confdefs.h + +fi + + +# Agent: +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "err.h" "ac_cv_header_err_h" "$ac_includes_default" +if test "x$ac_cv_header_err_h" = xyes +then : + printf "%s\n" "#define HAVE_ERR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fstab.h" "ac_cv_header_fstab_h" "$ac_includes_default" +if test "x$ac_cv_header_fstab_h" = xyes +then : + printf "%s\n" "#define HAVE_FSTAB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" +if test "x$ac_cv_header_grp_h" = xyes +then : + printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default" +if test "x$ac_cv_header_io_h" = xyes +then : + printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ioctls.h" "ac_cv_header_ioctls_h" "$ac_includes_default" +if test "x$ac_cv_header_ioctls_h" = xyes +then : + printf "%s\n" "#define HAVE_IOCTLS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "kstat.h" "ac_cv_header_kstat_h" "$ac_includes_default" +if test "x$ac_cv_header_kstat_h" = xyes +then : + printf "%s\n" "#define HAVE_KSTAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "kvm.h" "ac_cv_header_kvm_h" "$ac_includes_default" +if test "x$ac_cv_header_kvm_h" = xyes +then : + printf "%s\n" "#define HAVE_KVM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default" +if test "x$ac_cv_header_mntent_h" = xyes +then : + printf "%s\n" "#define HAVE_MNTENT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "mtab.h" "ac_cv_header_mtab_h" "$ac_includes_default" +if test "x$ac_cv_header_mtab_h" = xyes +then : + printf "%s\n" "#define HAVE_MTAB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pkglocs.h" "ac_cv_header_pkglocs_h" "$ac_includes_default" +if test "x$ac_cv_header_pkglocs_h" = xyes +then : + printf "%s\n" "#define HAVE_PKGLOCS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default" +if test "x$ac_cv_header_spawn_h" = xyes +then : + printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" +if test "x$ac_cv_header_com_err_h" = xyes +then : + printf "%s\n" "#define HAVE_COM_ERR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" +if test "x$ac_cv_header_et_com_err_h" = xyes +then : + printf "%s\n" "#define HAVE_ET_COM_ERR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default" +if test "x$ac_cv_header_utmpx_h" = xyes +then : + printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "utsname.h" "ac_cv_header_utsname_h" "$ac_includes_default" +if test "x$ac_cv_header_utsname_h" = xyes +then : + printf "%s\n" "#define HAVE_UTSNAME_H 1" >>confdefs.h + +fi + + +ac_fn_c_check_header_compile "$LINENO" "sys/diskio.h" "ac_cv_header_sys_diskio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_diskio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DISKIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/dkio.h" "ac_cv_header_sys_dkio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_dkio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DKIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_file_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_filio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FILIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/fixpoint.h" "ac_cv_header_sys_fixpoint_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fixpoint_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FIXPOINT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/fs.h" "ac_cv_header_sys_fs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_loadavg_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mntent_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MNTENT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/mnttab.h" "ac_cv_header_sys_mnttab_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mnttab_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MNTTAB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/pool.h" "ac_cv_header_sys_pool_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_pool_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_POOL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/protosw.h" "ac_cv_header_sys_protosw_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_protosw_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PROTOSW_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/pstat.h" "ac_cv_header_sys_pstat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_pstat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PSTAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sockio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_statfs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_statvfs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stream_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/sysget.h" "ac_cv_header_sys_sysget_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysget_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSGET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/sysmp.h" "ac_cv_header_sys_sysmp_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmp_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSMP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/tcpipstats.h" "ac_cv_header_sys_tcpipstats_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_tcpipstats_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TCPIPSTATS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_utsname_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vfs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VFS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/vm.h" "ac_cv_header_sys_vm_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vm_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/vmmac.h" "ac_cv_header_sys_vmmac_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vmmac_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VMMAC_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/vmmeter.h" "ac_cv_header_sys_vmmeter_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vmmeter_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VMMETER_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/vmparam.h" "ac_cv_header_sys_vmparam_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vmparam_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VMPARAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/vmsystm.h" "ac_cv_header_sys_vmsystm_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vmsystm_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VMSYSTM_H 1" >>confdefs.h + +fi + + +ac_fn_c_check_header_compile "$LINENO" "asm/page.h" "ac_cv_header_asm_page_h" "$ac_includes_default" +if test "x$ac_cv_header_asm_page_h" = xyes +then : + printf "%s\n" "#define HAVE_ASM_PAGE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default" +if test "x$ac_cv_header_asm_types_h" = xyes +then : + printf "%s\n" "#define HAVE_ASM_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "inet/mib2.h" "ac_cv_header_inet_mib2_h" "$ac_includes_default" +if test "x$ac_cv_header_inet_mib2_h" = xyes +then : + printf "%s\n" "#define HAVE_INET_MIB2_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "linux/hdreg.h" "ac_cv_header_linux_hdreg_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_hdreg_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_HDREG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "linux/tasks.h" "ac_cv_header_linux_tasks_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_tasks_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_TASKS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "machine/param.h" "ac_cv_header_machine_param_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_param_h" = xyes +then : + printf "%s\n" "#define HAVE_MACHINE_PARAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ufs/fs.h" "ac_cv_header_ufs_fs_h" "$ac_includes_default" +if test "x$ac_cv_header_ufs_fs_h" = xyes +then : + printf "%s\n" "#define HAVE_UFS_FS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "uvm/uvm_extern.h" "ac_cv_header_uvm_uvm_extern_h" "$ac_includes_default" +if test "x$ac_cv_header_uvm_uvm_extern_h" = xyes +then : + printf "%s\n" "#define HAVE_UVM_UVM_EXTERN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "uvm/uvm_param.h" "ac_cv_header_uvm_uvm_param_h" "$ac_includes_default" +if test "x$ac_cv_header_uvm_uvm_param_h" = xyes +then : + printf "%s\n" "#define HAVE_UVM_UVM_PARAM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "vm/vm.h" "ac_cv_header_vm_vm_h" "$ac_includes_default" +if test "x$ac_cv_header_vm_vm_h" = xyes +then : + printf "%s\n" "#define HAVE_VM_VM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "vm/vm_extern.h" "ac_cv_header_vm_vm_extern_h" "$ac_includes_default" +if test "x$ac_cv_header_vm_vm_extern_h" = xyes +then : + printf "%s\n" "#define HAVE_VM_VM_EXTERN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "vm/vm_param.h" "ac_cv_header_vm_vm_param_h" "$ac_includes_default" +if test "x$ac_cv_header_vm_vm_param_h" = xyes +then : + printf "%s\n" "#define HAVE_VM_VM_PARAM_H 1" >>confdefs.h + +fi + + +# Apps: +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" +if test "x$ac_cv_header_grp_h" = xyes +then : + printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/cdefs.h" "ac_cv_header_sys_cdefs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_cdefs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_CDEFS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi + + +# Not-Used: +ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" +if test "x$ac_cv_header_search_h" = xyes +then : + printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default" +if test "x$ac_cv_header_sgtty_h" = xyes +then : + printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "xti.h" "ac_cv_header_xti_h" "$ac_includes_default" +if test "x$ac_cv_header_xti_h" = xyes +then : + printf "%s\n" "#define HAVE_XTI_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/dmap.h" "ac_cv_header_sys_dmap_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_dmap_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DMAP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_poll_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/timeout.h" "ac_cv_header_sys_timeout_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_timeout_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIMEOUT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "machine/pte.h" "ac_cv_header_machine_pte_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_pte_h" = xyes +then : + printf "%s\n" "#define HAVE_MACHINE_PTE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pci/pci.h" "ac_cv_header_pci_pci_h" "$ac_includes_default" +if test "x$ac_cv_header_pci_pci_h" = xyes +then : + printf "%s\n" "#define HAVE_PCI_PCI_H 1" >>confdefs.h + +fi + + + +# Valgrind +ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" +if test "x$ac_cv_header_valgrind_valgrind_h" = xyes +then : + printf "%s\n" "#define HAVE_VALGRIND_VALGRIND_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default" +if test "x$ac_cv_header_valgrind_memcheck_h" = xyes +then : + printf "%s\n" "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h + +fi + +# OpenSSL +ac_fn_c_check_header_compile "$LINENO" "openssl/aes.h" "ac_cv_header_openssl_aes_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_aes_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_AES_H 1" >>confdefs.h + +fi + # (Core) +ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_dh_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h + +fi + # (Apps) +# Not-Used: +ac_fn_c_check_header_compile "$LINENO" "openssl/des.h" "ac_cv_header_openssl_des_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_des_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_DES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_hmac_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_evp_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_EVP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "security/cryptoki.h" "ac_cv_header_security_cryptoki_h" "$ac_includes_default" +if test "x$ac_cv_header_security_cryptoki_h" = xyes +then : + printf "%s\n" "#define HAVE_SECURITY_CRYPTOKI_H 1" >>confdefs.h + +fi + + +# RPM subdirectory path (Agent) +if test "x$with_rpm" != "xno"; then + ac_fn_c_check_header_compile "$LINENO" "rpm/rpmts.h" "ac_cv_header_rpm_rpmts_h" "#include +" +if test "x$ac_cv_header_rpm_rpmts_h" = xyes +then : + printf "%s\n" "#define HAVE_RPM_RPMTS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "rpm/rpmfileutil.h" "ac_cv_header_rpm_rpmfileutil_h" "#include +" +if test "x$ac_cv_header_rpm_rpmfileutil_h" = xyes +then : + printf "%s\n" "#define HAVE_RPM_RPMFILEUTIL_H 1" >>confdefs.h + +fi + +fi + + +## +# Pre-requisite on other headers: +## + +# requiring (MAXPATHLEN) (OpenBSD 3.4) +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "sys/swap.h" "ac_cv_header_sys_swap_h" "$ac_includes_default + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_swap_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SWAP_H 1" >>confdefs.h + +fi + + +# requiring (FreeBSD) +# +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "osreldate.h" "ac_cv_header_osreldate_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_osreldate_h" = xyes +then : + printf "%s\n" "#define HAVE_OSRELDATE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "machine/types.h" "ac_cv_header_machine_types_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_machine_types_h" = xyes +then : + printf "%s\n" "#define HAVE_MACHINE_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/dkstat.h" "ac_cv_header_sys_dkstat_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_dkstat_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DKSTAT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/conf.h" "ac_cv_header_sys_conf_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_conf_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_CONF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/mbuf.h" "ac_cv_header_sys_mbuf_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_mbuf_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MBUF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_mount_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_proc_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PROC_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/queue.h" "ac_cv_header_sys_queue_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_queue_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_QUEUE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +" +if test "x$ac_cv_header_sys_user_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_USER_H 1" >>confdefs.h + +fi + + +case "$target_os" in + linux*) + # is considered deprecated on Linux and including that + # header file triggers a compiler warning. See also + # https://savannah.gnu.org/forum/forum.php?forum_id=9515. + ;; + *) + ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h + +fi + + ;; +esac + +# requiring (IRIX 6.5) +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "sys/sema.h" "ac_cv_header_sys_sema_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sema_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SEMA_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "sys/hashing.h" "ac_cv_header_sys_hashing_h" "$ac_includes_default + +#ifdef HAVE_SYS_SEMA_H +#include +#endif + +" +if test "x$ac_cv_header_sys_hashing_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_HASHING_H 1" >>confdefs.h + +fi + + +# requiring _KMEMUSER and (BSDi3/IRIX) +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "sys/vnode.h" "ac_cv_header_sys_vnode_h" " +#define _KMEMUSER 1 +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +" +if test "x$ac_cv_header_sys_vnode_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VNODE_H 1" >>confdefs.h + +fi + + +# requiring (NetBSD) +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "sys/disklabel.h" "ac_cv_header_sys_disklabel_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_MACHINE_TYPES_H +#include +#endif + +" +if test "x$ac_cv_header_sys_disklabel_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DISKLABEL_H 1" >>confdefs.h + +fi + + +# QNX +ac_fn_c_check_header_compile "$LINENO" "nbutil.h" "ac_cv_header_nbutil_h" "$ac_includes_default" +if test "x$ac_cv_header_nbutil_h" = xyes +then : + printf "%s\n" "#define HAVE_NBUTIL_H 1" >>confdefs.h + +fi + + +# UFS headers +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "ufs/ufs/dinode.h" "ac_cv_header_ufs_ufs_dinode_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UFS_UFS_DINODE_H +#include +#endif +#ifdef HAVE_UFS_UFS_QUOTA_H +#include +#endif + +" +if test "x$ac_cv_header_ufs_ufs_dinode_h" = xyes +then : + printf "%s\n" "#define HAVE_UFS_UFS_DINODE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ufs/ufs/quota.h" "ac_cv_header_ufs_ufs_quota_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UFS_UFS_DINODE_H +#include +#endif +#ifdef HAVE_UFS_UFS_QUOTA_H +#include +#endif + +" +if test "x$ac_cv_header_ufs_ufs_quota_h" = xyes +then : + printf "%s\n" "#define HAVE_UFS_UFS_QUOTA_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ufs/ufs/inode.h" "ac_cv_header_ufs_ufs_inode_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UFS_UFS_DINODE_H +#include +#endif +#ifdef HAVE_UFS_UFS_QUOTA_H +#include +#endif + +" +if test "x$ac_cv_header_ufs_ufs_inode_h" = xyes +then : + printf "%s\n" "#define HAVE_UFS_UFS_INODE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "ufs/ffs/fs.h" "ac_cv_header_ufs_ffs_fs_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UFS_UFS_DINODE_H +#include +#endif +#ifdef HAVE_UFS_UFS_QUOTA_H +#include +#endif + +" +if test "x$ac_cv_header_ufs_ffs_fs_h" = xyes +then : + printf "%s\n" "#define HAVE_UFS_FFS_FS_H 1" >>confdefs.h + +fi + + +# requiring (BSDi2) +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "vm/swap_pager.h" "ac_cv_header_vm_swap_pager_h" " +#ifdef HAVE_VM_VM_H +#include +#endif + +" +if test "x$ac_cv_header_vm_swap_pager_h" = xyes +then : + printf "%s\n" "#define HAVE_VM_SWAP_PAGER_H 1" >>confdefs.h + +fi + + +# netlink/rtnetlink (Linux) +# Agent: +# +ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" " +#ifdef HAVE_ASM_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_LINUX_NETLINK_H +#include +#endif + +" +if test "x$ac_cv_header_linux_netlink_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "linux/rtnetlink.h" "ac_cv_header_linux_rtnetlink_h" " +#ifdef HAVE_ASM_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_LINUX_NETLINK_H +#include +#endif + +" +if test "x$ac_cv_header_linux_rtnetlink_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_RTNETLINK_H 1" >>confdefs.h + +fi + + +# +# Avoid that on MinGW any networking headers get included that are +# incompatible with by only testing for certain headers if not +# building for one of these two platforms. +# + +case x$with_socklib in + xwinsock2) + ;; + *) + +ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_sys_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_sys_un_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/tcp_fsm.h" "ac_cv_header_netinet_tcp_fsm_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_tcp_fsm_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_TCP_FSM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_sys_sockio_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/socketvar.h" "ac_cv_header_sys_socketvar_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_sys_socketvar_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKETVAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_net_if_dl_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "net/if_types.h" "ac_cv_header_net_if_types_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_net_if_types_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_arpa_inet_h" = xyes +then : + printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_net_if_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netdb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_net_if_arp_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_ARP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "net/if_mib.h" "ac_cv_header_net_if_mib_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_net_if_mib_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_MIB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_net_if_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_VAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_if_ether_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IF_ETHER_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_in_systm_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_SYSTM_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in_var.h" "ac_cv_header_netinet_in_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_in_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_VAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_ip_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/ip_icmp.h" "ac_cv_header_netinet_ip_icmp_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_ip_icmp_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IP_ICMP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/icmp_var.h" "ac_cv_header_netinet_icmp_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_icmp_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_ICMP_VAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/ip_var.h" "ac_cv_header_netinet_ip_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_ip_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IP_VAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_tcp_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/tcp_timer.h" "ac_cv_header_netinet_tcp_timer_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_tcp_timer_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_TCP_TIMER_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/tcp_var.h" "ac_cv_header_netinet_tcp_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif + +" +if test "x$ac_cv_header_netinet_tcp_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_TCP_VAR_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/tcpip.h" "ac_cv_header_netinet_tcpip_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif -# requiring (MAXPATHLEN) (OpenBSD 3.4) -# Agent: -# -for ac_header in sys/swap.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/swap.h" "ac_cv_header_sys_swap_h" "$ac_includes_default +" +if test "x$ac_cv_header_netinet_tcpip_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_TCPIP_H 1" >>confdefs.h -#if HAVE_SYS_PARAM_H +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" " +#ifdef HAVE_SYS_PARAM_H #include #endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif " -if test "x$ac_cv_header_sys_swap_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SWAP_H 1 -_ACEOF +if test "x$ac_cv_header_netinet_udp_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_UDP_H 1" >>confdefs.h fi - -done - - -# requiring (FreeBSD) -# -# Core: (? Tested above? ) -for ac_header in stdlib.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_TYPES_H +ac_fn_c_check_header_compile "$LINENO" "netinet/udp_var.h" "ac_cv_header_netinet_udp_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_PARAM_H -#include +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_netinet_udp_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_UDP_VAR_H 1" >>confdefs.h fi - -done - -# -# Library: -for ac_header in malloc.h net/if_dl.h sys/sysctl.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_TYPES_H +ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_PARAM_H -#include +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_net_route_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_ROUTE_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "netinet/icmp6.h" "ac_cv_header_netinet_icmp6_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif -done +" +if test "x$ac_cv_header_netinet_icmp6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_ICMP6_H 1" >>confdefs.h -# -# Agent: -for ac_header in malloc.h osreldate.h machine/types.h net/if_dl.h net/if_types.h sys/dkstat.h sys/conf.h sys/mbuf.h sys/mount.h sys/proc.h sys/queue.h sys/sysctl.h sys/user.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_TYPES_H +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in_pcb.h" "ac_cv_header_netinet_in_pcb_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_PARAM_H -#include +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include #endif - -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# requiring (IRIX 6.5) -# Agent: -# -for ac_header in sys/sema.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/sema.h" "ac_cv_header_sys_sema_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sema_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SEMA_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/hashing.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/hashing.h" "ac_cv_header_sys_hashing_h" "$ac_includes_default - -#if HAVE_SYS_SEMA_H -#include +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if test "x$ac_cv_header_sys_hashing_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_HASHING_H 1 -_ACEOF +if test "x$ac_cv_header_netinet_in_pcb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_PCB_H 1" >>confdefs.h fi - -done - - -# requiring (Solaris 9) -# Agent: -# -for ac_header in sys/socketvar.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/socketvar.h" "ac_cv_header_sys_socketvar_h" "$ac_includes_default - -#if HAVE_SYS_SOCKET_H +ac_fn_c_check_header_compile "$LINENO" "netinet/ip6.h" "ac_cv_header_netinet_ip6_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H #include #endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif " -if test "x$ac_cv_header_sys_socketvar_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKETVAR_H 1 -_ACEOF +if test "x$ac_cv_header_netinet_ip6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IP6_H 1" >>confdefs.h fi - -done - - -# requiring _KMEMUSER and (BSDi3/IRIX) -# Agent: -# -for ac_header in sys/vnode.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/vnode.h" "ac_cv_header_sys_vnode_h" " -#define _KMEMUSER 1 -#if HAVE_SYS_TYPES_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/in6_var.h" "ac_cv_header_netinet6_in6_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif " -if test "x$ac_cv_header_sys_vnode_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_VNODE_H 1 -_ACEOF +if test "x$ac_cv_header_netinet6_in6_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_IN6_VAR_H 1" >>confdefs.h fi - -done - - -# requiring (NetBSD) -# Agent: -# -for ac_header in sys/disklabel.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/disklabel.h" "ac_cv_header_sys_disklabel_h" " -#if HAVE_SYS_TYPES_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/in6_pcb.h" "ac_cv_header_netinet6_in6_pcb_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_PARAM_H -#include +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif -#if HAVE_MACHINE_TYPES_H -#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if test "x$ac_cv_header_sys_disklabel_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_DISKLABEL_H 1 -_ACEOF - -fi - -done - - -# QNX -for ac_header in nbutil.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "nbutil.h" "ac_cv_header_nbutil_h" "$ac_includes_default" -if test "x$ac_cv_header_nbutil_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NBUTIL_H 1 -_ACEOF +if test "x$ac_cv_header_netinet6_in6_pcb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_IN6_PCB_H 1" >>confdefs.h fi - -done - - -# UFS headers -# Agent: -# -for ac_header in ufs/ufs/dinode.h ufs/ufs/quota.h ufs/ufs/inode.h ufs/ffs/fs.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_TYPES_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/ip6_var.h" "ac_cv_header_netinet6_ip6_var_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_UFS_UFS_DINODE_H -#include +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include #endif -#if HAVE_UFS_UFS_QUOTA_H -#include +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_netinet6_ip6_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_IP6_VAR_H 1" >>confdefs.h fi - -done - - -# requiring (BSDi2) -# Agent: -# -for ac_header in vm/swap_pager.h -do : - ac_fn_c_check_header_compile "$LINENO" "vm/swap_pager.h" "ac_cv_header_vm_swap_pager_h" " -#if HAVE_VM_VM_H -#include +ac_fn_c_check_header_compile "$LINENO" "netinet6/nd6.h" "ac_cv_header_netinet6_nd6_h" " +#ifdef HAVE_SYS_PARAM_H +#include #endif - -" -if test "x$ac_cv_header_vm_swap_pager_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VM_SWAP_PAGER_H 1 -_ACEOF - -fi - -done - - -# netlink/rtnetlink (Linux) -# Agent: -# -for ac_header in linux/netlink.h linux/rtnetlink.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_ASM_TYPES_H -#include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_LINUX_NETLINK_H -#include +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_netinet6_nd6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_ND6_H 1" >>confdefs.h fi - -done - - - -# Network headers -# Core or Library/Agent/Apps: -# -for ac_header in arpa/inet.h net/if.h netinet/in.h netdb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_TYPES_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/tcp6.h" "ac_cv_header_netinet6_tcp6_h" " +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_TIMEOUT_H +#ifdef HAVE_SYS_TIMEOUT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_IP_ICMP_H +#ifdef HAVE_NETINET_IP_ICMP_H #include #endif -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_netinet6_tcp6_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_H 1" >>confdefs.h fi - -done - -# -# Agent: -for ac_header in net/if_arp.h net/if_mib.h net/if_var.h netinet/if_ether.h netinet/in_systm.h netinet/in_var.h netinet/ip.h netinet/ip_icmp.h netinet/icmp_var.h netinet/ip_var.h netinet/tcp.h netinet/tcp_timer.h netinet/tcp_var.h netinet/tcpip.h netinet/udp.h netinet/udp_var.h net/route.h netinet/icmp6.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_PARAM_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/tcp6_fsm.h" "ac_cv_header_netinet6_tcp6_fsm_h" " +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_TIMEOUT_H +#ifdef HAVE_SYS_TIMEOUT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_IP_ICMP_H +#ifdef HAVE_NETINET_IP_ICMP_H #include #endif -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_ICMP6_H +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H #include #endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_netinet6_tcp6_fsm_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_FSM_H 1" >>confdefs.h fi - -done - - -# KAME (IPv6) headers -# Agent: -# -# KAME -for ac_header in netinet/ip6.h netinet6/in6_var.h netinet6/in6_pcb.h netinet6/ip6_var.h netinet6/nd6.h netinet6/tcp6.h netinet6/tcp6_fsm.h netinet6/tcp6_timer.h netinet6/tcp6_var.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -#if HAVE_SYS_PARAM_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/tcp6_timer.h" "ac_cv_header_netinet6_tcp6_timer_h" " +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_QUEUE_H -#include +#ifdef HAVE_SYS_TIMEOUT_H +#include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif -#if HAVE_NET_ROUTE_H -#include +#ifdef HAVE_NETINET_IP_VAR_H +#include #endif -#if HAVE_NETINET_IN_H -#include +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include #endif -#if HAVE_NETINET_IP6_H +#ifdef HAVE_NETINET_IP6_H #include #endif +#ifdef HAVE_NETINET_ICMP6_H +#include +#endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_netinet6_tcp6_timer_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_TIMER_H 1" >>confdefs.h fi - -done - - -# requiring (OpenBSD 2.6) -# Agent: -# -for ac_header in netinet/in_pcb.h -do : - ac_fn_c_check_header_compile "$LINENO" "netinet/in_pcb.h" "ac_cv_header_netinet_in_pcb_h" " -#if HAVE_SYS_PARAM_H +ac_fn_c_check_header_compile "$LINENO" "netinet6/tcp6_var.h" "ac_cv_header_netinet6_tcp6_var_h" " +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_TIMEOUT_H +#ifdef HAVE_SYS_TIMEOUT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #include #endif -#if HAVE_NETINET_IN_H -#include +#ifdef HAVE_ARPA_INET_H +#include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IP_H #include #endif -#if HAVE_NET_ROUTE_H -#include +#ifdef HAVE_NETINET_IP_H +#include #endif -#if HAVE_ARPA_INET_H -#include +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_H +#include +#endif +#ifdef HAVE_NETINET_UDP_H +#include +#endif +#ifdef HAVE_NETINET_TCP_TIMER_H +#include +#endif +#ifdef HAVE_NETINET_IP6_H +#include +#endif +#ifdef HAVE_NETINET_ICMP6_H +#include #endif " -if test "x$ac_cv_header_netinet_in_pcb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETINET_IN_PCB_H 1 -_ACEOF +if test "x$ac_cv_header_netinet6_tcp6_var_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET6_TCP6_VAR_H 1" >>confdefs.h fi -done +esac ## # Pre-requisite on specific types @@ -16915,8 +22557,27 @@ done # (major ugh!) # Agent: # -for ac_header in linux/ethtool.h -do : +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_ethtool_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_ETHTOOL_H 1" >>confdefs.h + +fi + +else $as_nop ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" " #include typedef __u64 u64; /* hack, so we may include kernel's ethtool.h */ @@ -16925,15 +22586,17 @@ typedef __u16 u16; /* ditto */ typedef __u8 u8; /* ditto */ " -if test "x$ac_cv_header_linux_ethtool_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_ETHTOOL_H 1 -_ACEOF +if test "x$ac_cv_header_linux_ethtool_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_ETHTOOL_H 1" >>confdefs.h fi -done +printf "%s\n" "#define HAVE_LINUX_ETHTOOL_NEEDS_U64 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ## # Headers requiring particular libraries @@ -16942,19 +22605,19 @@ done # for HostRes (Solaris 2.x) # Agent: # -for ac_header in pkginfo.h + for ac_header in pkginfo.h do : - ac_fn_c_check_header_mongrel "$LINENO" "pkginfo.h" "ac_cv_header_pkginfo_h" "$ac_includes_default" -if test "x$ac_cv_header_pkginfo_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PKGINFO_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pkginfo" >&5 -$as_echo_n "checking for library containing pkginfo... " >&6; } -if ${netsnmp_cv_func_pkginfo_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "pkginfo.h" "ac_cv_header_pkginfo_h" "$ac_includes_default" +if test "x$ac_cv_header_pkginfo_h" = xyes +then : + printf "%s\n" "#define HAVE_PKGINFO_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pkginfo" >&5 +printf %s "checking for library containing pkginfo... " >&6; } +if test ${netsnmp_cv_func_pkginfo_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -16966,21 +22629,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pkginfo (); int -main () +main (void) { return pkginfo (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in adm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16989,39 +22650,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pkginfo (); int -main () +main (void) { return pkginfo (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_pkginfo_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkginfo_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_pkginfo_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_pkginfo_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_pkginfo_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkginfo_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_pkginfo_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_pkginfo_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_pkginfo_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_PKGINFO 1" >>confdefs.h +printf "%s\n" "#define HAVE_PKGINFO 1" >>confdefs.h fi @@ -17030,20 +22689,19 @@ fi done - -for ac_header in pkg.h + for ac_header in pkg.h do : - ac_fn_c_check_header_mongrel "$LINENO" "pkg.h" "ac_cv_header_pkg_h" "$ac_includes_default" -if test "x$ac_cv_header_pkg_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PKG_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pkg_init" >&5 -$as_echo_n "checking for library containing pkg_init... " >&6; } -if ${netsnmp_cv_func_pkg_init_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "pkg.h" "ac_cv_header_pkg_h" "$ac_includes_default" +if test "x$ac_cv_header_pkg_h" = xyes +then : + printf "%s\n" "#define HAVE_PKG_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pkg_init" >&5 +printf %s "checking for library containing pkg_init... " >&6; } +if test ${netsnmp_cv_func_pkg_init_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LIBS" netsnmp_temp_LIBS=" ${LIBS}" @@ -17055,62 +22713,58 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pkg_init (); int -main () +main (void) { return pkg_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in pkg ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ char pkg_init (); int -main () +main (void) { return pkg_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_pkg_init_LIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkg_init_LIBS" >&5 -$as_echo "$netsnmp_cv_func_pkg_init_LIBS" >&6; } - if test "${netsnmp_cv_func_pkg_init_LIBS}" != "no" ; then - if test "${netsnmp_cv_func_pkg_init_LIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkg_init_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_pkg_init_LIBS" >&6; } + if test "x${netsnmp_cv_func_pkg_init_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_pkg_init_LIBS}" != "xnone required" ; then LIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_LIBPKG 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBPKG 1" >>confdefs.h fi @@ -17119,7 +22773,6 @@ fi done - if test $ac_cv_header_pkg_h = no then unset ac_cv_header_pkg_h @@ -17127,19 +22780,19 @@ then netsnmp_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" - for ac_header in pkg.h + for ac_header in pkg.h do : - ac_fn_c_check_header_mongrel "$LINENO" "pkg.h" "ac_cv_header_pkg_h" "$ac_includes_default" -if test "x$ac_cv_header_pkg_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PKG_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pkg_init" >&5 -$as_echo_n "checking for library containing pkg_init... " >&6; } -if ${netsnmp_cv_func_pkg_init_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "pkg.h" "ac_cv_header_pkg_h" "$ac_includes_default" +if test "x$ac_cv_header_pkg_h" = xyes +then : + printf "%s\n" "#define HAVE_PKG_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pkg_init" >&5 +printf %s "checking for library containing pkg_init... " >&6; } +if test ${netsnmp_cv_func_pkg_init_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LIBS" netsnmp_temp_LIBS=" ${LIBS}" @@ -17151,21 +22804,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pkg_init (); int -main () +main (void) { return pkg_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in pkg ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17174,39 +22825,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pkg_init (); int -main () +main (void) { return pkg_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_pkg_init_LIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkg_init_LIBS" >&5 -$as_echo "$netsnmp_cv_func_pkg_init_LIBS" >&6; } - if test "${netsnmp_cv_func_pkg_init_LIBS}" != "no" ; then - if test "${netsnmp_cv_func_pkg_init_LIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pkg_init_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_pkg_init_LIBS" >&6; } + if test "x${netsnmp_cv_func_pkg_init_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_pkg_init_LIBS}" != "xnone required" ; then LIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_LIBPKG 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBPKG 1" >>confdefs.h fi @@ -17214,7 +22863,6 @@ $as_echo "#define HAVE_LIBPKG 1" >>confdefs.h fi done - if test $ac_cv_header_pkg_h = no then CPPFLAGS="$netsnmp_save_CPPFLAGS" @@ -17227,24 +22875,24 @@ case $target_os in # for CPU/memory statistics (AIX) # Agent: # - for ac_header in libperfstat.h + for ac_header in libperfstat.h do : ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" " -#if HAVE_SYS_PROTOSW_H +#ifdef HAVE_SYS_PROTOSW_H #include #endif " -if test "x$ac_cv_header_libperfstat_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPERFSTAT_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_cpu_total" >&5 -$as_echo_n "checking for library containing perfstat_cpu_total... " >&6; } -if ${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test "x$ac_cv_header_libperfstat_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBPERFSTAT_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_cpu_total" >&5 +printf %s "checking for library containing perfstat_cpu_total... " >&6; } +if test ${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -17256,21 +22904,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char perfstat_cpu_total (); int -main () +main (void) { return perfstat_cpu_total (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in perfstat ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17279,39 +22925,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char perfstat_cpu_total (); int -main () +main (void) { return perfstat_cpu_total (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_perfstat_cpu_total_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_PERFSTAT 1" >>confdefs.h +printf "%s\n" "#define HAVE_PERFSTAT 1" >>confdefs.h else as_fn_error $? " @@ -17324,17 +22968,17 @@ $as_echo "#define HAVE_PERFSTAT 1" >>confdefs.h fi done - ;; hpux*) # HP-UX agent needs open_mib (XXX - not a header check!) # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing open_mib" >&5 -$as_echo_n "checking for library containing open_mib... " >&6; } -if ${netsnmp_cv_func_open_mib_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing open_mib" >&5 +printf %s "checking for library containing open_mib... " >&6; } +if test ${netsnmp_cv_func_open_mib_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -17346,21 +22990,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char open_mib (); int -main () +main (void) { return open_mib (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in nm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17369,39 +23011,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char open_mib (); int -main () +main (void) { return open_mib (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_open_mib_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_open_mib_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_open_mib_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_open_mib_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_open_mib_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_open_mib_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_open_mib_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_open_mib_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_open_mib_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_LIBNM 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBNM 1" >>confdefs.h fi @@ -17414,59 +23054,89 @@ esac # for MIB-2 info (Cygwin and MinGW) # Core: # -for ac_header in windows.h iphlpapi.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" " #ifdef HAVE_WINDOWS_H #include #endif " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_windows_h" = xyes +then : + printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" " +#ifdef HAVE_WINDOWS_H +#include +#endif + +" +if test "x$ac_cv_header_iphlpapi_h" = xyes +then : + printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h fi -done + for ac_header in lm.h +do : + ac_fn_c_check_header_compile "$LINENO" "lm.h" "ac_cv_header_lm_h" " +#ifdef HAVE_WINDOWS_H +#include +#endif + +" +if test "x$ac_cv_header_lm_h" = xyes +then : + printf "%s\n" "#define HAVE_LM_H 1" >>confdefs.h + LAGENTLIBS="$LAGENTLIBS -lnetapi32" +fi + +done # for MIB-2 info (MinGW) # Core: # if test x$with_socklib = xwinsock2; then - for ac_header in winsock.h winsock2.h ws2tcpip.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "winsock.h" "ac_cv_header_winsock_h" "#include +" +if test "x$ac_cv_header_winsock_h" = xyes +then : + printf "%s\n" "#define HAVE_WINSOCK_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "#include +" +if test "x$ac_cv_header_winsock2_h" = xyes +then : + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "#include +" +if test "x$ac_cv_header_ws2tcpip_h" = xyes +then : + printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h -done +fi fi # # for ucd-snmp/lmsensorsMib # -for ac_header in sensors/sensors.h picl.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "sensors/sensors.h" "ac_cv_header_sensors_sensors_h" "$ac_includes_default" +if test "x$ac_cv_header_sensors_sensors_h" = xyes +then : + printf "%s\n" "#define HAVE_SENSORS_SENSORS_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" +if test "x$ac_cv_header_picl_h" = xyes +then : + printf "%s\n" "#define HAVE_PICL_H 1" >>confdefs.h -done +fi ## This is here to avoid loads of redefinition warnings during @@ -17503,11 +23173,10 @@ ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_dst" "ac_cv_member_struct_rt #endif " -if test "x$ac_cv_member_struct_rtentry_rt_dst" = xyes; then : +if test "x$ac_cv_member_struct_rtentry_rt_dst" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_DST 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_DST 1" >>confdefs.h fi @@ -17535,11 +23204,10 @@ ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_hash" "ac_cv_member_struct_r #endif " -if test "x$ac_cv_member_struct_rtentry_rt_hash" = xyes; then : +if test "x$ac_cv_member_struct_rtentry_rt_hash" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_HASH 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_HASH 1" >>confdefs.h fi @@ -17567,11 +23235,10 @@ ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_next" "ac_cv_member_struct_r #endif " -if test "x$ac_cv_member_struct_rtentry_rt_next" = xyes; then : +if test "x$ac_cv_member_struct_rtentry_rt_next" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_NEXT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_NEXT 1" >>confdefs.h fi @@ -17599,11 +23266,10 @@ ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_refcnt" "ac_cv_member_struct #endif " -if test "x$ac_cv_member_struct_rtentry_rt_refcnt" = xyes; then : +if test "x$ac_cv_member_struct_rtentry_rt_refcnt" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_REFCNT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_REFCNT 1" >>confdefs.h fi @@ -17631,11 +23297,10 @@ ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_unit" "ac_cv_member_struct_r #endif " -if test "x$ac_cv_member_struct_rtentry_rt_unit" = xyes; then : +if test "x$ac_cv_member_struct_rtentry_rt_unit" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_UNIT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_UNIT 1" >>confdefs.h fi @@ -17663,11 +23328,10 @@ ac_fn_c_check_member "$LINENO" "struct rtentry" "rt_use" "ac_cv_member_struct_rt #endif " -if test "x$ac_cv_member_struct_rtentry_rt_use" = xyes; then : +if test "x$ac_cv_member_struct_rtentry_rt_use" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RTENTRY_RT_USE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_RTENTRY_RT_USE 1" >>confdefs.h fi @@ -17702,8 +23366,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -17733,15 +23397,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -17755,8 +23419,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -17775,17 +23439,19 @@ rm -f confcache # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +printf %s "checking size of short... " >&6; } +if test ${ac_cv_sizeof_short+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else @@ -17794,31 +23460,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +printf "%s\n" "$ac_cv_sizeof_short" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF +printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +printf %s "checking size of int... " >&6; } +if test ${ac_cv_sizeof_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else @@ -17827,31 +23493,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +printf "%s\n" "$ac_cv_sizeof_int" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF +printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +printf %s "checking size of long... " >&6; } +if test ${ac_cv_sizeof_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else @@ -17860,31 +23526,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +printf %s "checking size of long long... " >&6; } +if test ${ac_cv_sizeof_long_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else @@ -17893,31 +23559,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF +printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 -$as_echo_n "checking size of intmax_t... " >&6; } -if ${ac_cv_sizeof_intmax_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 +printf %s "checking size of intmax_t... " >&6; } +if test ${ac_cv_sizeof_intmax_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_intmax_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (intmax_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -17926,14 +23592,12 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 -$as_echo "$ac_cv_sizeof_intmax_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 +printf "%s\n" "$ac_cv_sizeof_intmax_t" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t -_ACEOF +printf "%s\n" "#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t" >>confdefs.h @@ -17942,9 +23606,7 @@ case $ac_cv_c_int8_t in #( no|yes) ;; #( *) -cat >>confdefs.h <<_ACEOF -#define int8_t $ac_cv_c_int8_t -_ACEOF +printf "%s\n" "#define int8_t $ac_cv_c_int8_t" >>confdefs.h ;; esac @@ -17953,9 +23615,7 @@ case $ac_cv_c_int16_t in #( no|yes) ;; #( *) -cat >>confdefs.h <<_ACEOF -#define int16_t $ac_cv_c_int16_t -_ACEOF +printf "%s\n" "#define int16_t $ac_cv_c_int16_t" >>confdefs.h ;; esac @@ -17964,9 +23624,7 @@ case $ac_cv_c_int32_t in #( no|yes) ;; #( *) -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF +printf "%s\n" "#define int32_t $ac_cv_c_int32_t" >>confdefs.h ;; esac @@ -17975,19 +23633,22 @@ case $ac_cv_c_int64_t in #( no|yes) ;; #( *) -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF +printf "%s\n" "#define int64_t $ac_cv_c_int64_t" >>confdefs.h ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if ${ac_cv_type_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +printf %s "checking for unsigned long long int... " >&6; } +if test ${ac_cv_type_unsigned_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_type_unsigned_long_long_int=yes + case $ac_prog_cc_stdc in + no | c89) ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many @@ -18005,7 +23666,7 @@ else ? 1 : -1)]; int i = 63; int -main () +main (void) { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; @@ -18019,74 +23680,103 @@ main () } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : +if ac_fn_c_try_link "$LINENO" +then : + +else $as_nop + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext;; + esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +printf %s "checking for long long int... " >&6; } +if test ${ac_cv_type_long_long_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_type_long_long_int=yes -else + case $ac_prog_cc_stdc in + no | c89) ;; + *) + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes +then : + : +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int -main () +main (void) { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes -else +if ac_fn_c_try_run "$LINENO" +then : + +else $as_nop ac_cv_type_long_long_int=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -else - ac_cv_type_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + fi;; + esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +printf "%s\n" "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h +printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = xyes; then : +if test "x$ac_cv_type_intmax_t" = xyes +then : -$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h -else +else $as_nop test $ac_cv_type_long_long_int = yes \ && ac_type='long long int' \ || ac_type='long int' -cat >>confdefs.h <<_ACEOF -#define intmax_t $ac_type -_ACEOF +printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h fi @@ -18096,12 +23786,10 @@ case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) -$as_echo "#define _UINT8_T 1" >>confdefs.h +printf "%s\n" "#define _UINT8_T 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define uint8_t $ac_cv_c_uint8_t -_ACEOF +printf "%s\n" "#define uint8_t $ac_cv_c_uint8_t" >>confdefs.h ;; esac @@ -18111,9 +23799,7 @@ case $ac_cv_c_uint16_t in #( *) -cat >>confdefs.h <<_ACEOF -#define uint16_t $ac_cv_c_uint16_t -_ACEOF +printf "%s\n" "#define uint16_t $ac_cv_c_uint16_t" >>confdefs.h ;; esac @@ -18122,12 +23808,10 @@ case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) -$as_echo "#define _UINT32_T 1" >>confdefs.h +printf "%s\n" "#define _UINT32_T 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF +printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h ;; esac @@ -18136,118 +23820,62 @@ case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) -$as_echo "#define _UINT64_T 1" >>confdefs.h +printf "%s\n" "#define _UINT64_T 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF +printf "%s\n" "#define uint64_t $ac_cv_c_uint64_t" >>confdefs.h ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if ${ac_cv_type_unsigned_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_type_unsigned_long_long_int=yes -else - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - - fi - - ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default" -if test "x$ac_cv_type_uintmax_t" = xyes; then : +if test "x$ac_cv_type_uintmax_t" = xyes +then : -$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h -else +else $as_nop test $ac_cv_type_unsigned_long_long_int = yes \ && ac_type='unsigned long long int' \ || ac_type='unsigned long int' -cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type -_ACEOF +printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" -if test "x$ac_cv_type_intptr_t" = xyes; then : +if test "x$ac_cv_type_intptr_t" = xyes +then : -$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h -else +else $as_nop for ac_type in 'int' 'long int' 'long long int'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -cat >>confdefs.h <<_ACEOF -#define intptr_t $ac_type -_ACEOF +printf "%s\n" "#define intptr_t $ac_type" >>confdefs.h ac_type= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test -z "$ac_type" && break done fi @@ -18255,35 +23883,36 @@ fi ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = xyes; then : +if test "x$ac_cv_type_uintptr_t" = xyes +then : -$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h -else +else $as_nop for ac_type in 'unsigned int' 'unsigned long int' \ 'unsigned long long int'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -cat >>confdefs.h <<_ACEOF -#define uintptr_t $ac_type -_ACEOF +printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h ac_type= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test -z "$ac_type" && break done fi @@ -18295,22 +23924,20 @@ fi ## ac_fn_c_check_type "$LINENO" "off64_t" "ac_cv_type_off64_t" "$ac_includes_default" -if test "x$ac_cv_type_off64_t" = xyes; then : +if test "x$ac_cv_type_off64_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_OFF64_T 1 -_ACEOF +printf "%s\n" "#define HAVE_OFF64_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "nfds_t" "ac_cv_type_nfds_t" "#include " -if test "x$ac_cv_type_nfds_t" = xyes; then : +if test "x$ac_cv_type_nfds_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_NFDS_T 1 -_ACEOF +printf "%s\n" "#define HAVE_NFDS_T 1" >>confdefs.h fi @@ -18321,22 +23948,20 @@ fi # ac_fn_c_check_type "$LINENO" "Counter64" "ac_cv_type_Counter64" "#include " -if test "x$ac_cv_type_Counter64" = xyes; then : +if test "x$ac_cv_type_Counter64" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_COUNTER64 1 -_ACEOF +printf "%s\n" "#define HAVE_COUNTER64 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "mib2_ipIfStatsEntry_t" "ac_cv_type_mib2_ipIfStatsEntry_t" "#include " -if test "x$ac_cv_type_mib2_ipIfStatsEntry_t" = xyes; then : +if test "x$ac_cv_type_mib2_ipIfStatsEntry_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_MIB2_IPIFSTATSENTRY_T 1 -_ACEOF +printf "%s\n" "#define HAVE_MIB2_IPIFSTATSENTRY_T 1" >>confdefs.h fi @@ -18346,6 +23971,24 @@ fi # the later 'config_types' sub-script # +# Darwin: check whether or not struct in_ifaddr is available. +# +# +ac_fn_c_check_member "$LINENO" "struct in_ifaddr" "ia_subnetmask" "ac_cv_member_struct_in_ifaddr_ia_subnetmask" " +#ifdef HAVE_NETINET_IN_VAR_H +#include +#endif + +" +if test "x$ac_cv_member_struct_in_ifaddr_ia_subnetmask" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK 1" >>confdefs.h + + +fi + + ## # Determine the IPv6 stack type @@ -18356,14 +23999,13 @@ fi # if test "x$enable_ipv6" = "xyes"; then - v6type=unknown v6lib=none v6trylibc=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 -$as_echo_n "checking ipv6 stack type... " >&6; } - for i in v6d toshiba kame inria zeta linux-glibc linux-inet6 cygwin winsock2 generic; do - case $i in + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 +printf %s "checking ipv6 stack type... " >&6; } + for v6type in v6d toshiba kame zeta generic; do + case $v6type in v6d) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18374,12 +24016,13 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=v6; + $EGREP "yes" >/dev/null 2>&1 +then : + v6lib=v6; v6libdir=/usr/local/v6/lib; CFLAGS="-I/usr/local/v6/include $CFLAGS" fi -rm -f conftest* +rm -rf conftest* ;; toshiba) @@ -18392,12 +24035,13 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=inet6; + $EGREP "yes" >/dev/null 2>&1 +then : + v6lib=inet6; v6libdir=/usr/local/v6/lib; CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" fi -rm -f conftest* +rm -rf conftest* ;; kame) @@ -18410,33 +24054,14 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=inet6; + $EGREP "yes" >/dev/null 2>&1 +then : + v6lib=inet6; v6libdir=/usr/local/v6/lib; v6trylibc=yes; CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" fi -rm -f conftest* - - ;; - inria) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef IPV6_INRIA_VERSION -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; - v6lib=dummy; - v6libdir=none; - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" -fi -rm -f conftest* +rm -rf conftest* ;; zeta) @@ -18445,91 +24070,29 @@ rm -f conftest* #include #ifdef _ZETA_MINAMI_INET6 -A yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=inet6; + $EGREP "yes" >/dev/null 2>&1 +then : + v6lib=inet6; v6libdir=/usr/local/v6/lib; CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" fi -rm -f conftest* - - ;; - linux-glibc) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC_ > 2)) -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; - v6lib=dummy; - v6libdir=none; - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" -fi -rm -f conftest* +rm -rf conftest* ;; - linux-inet6) - if test -d /usr/inet6; then - v6type=$i - v6lib=inet6 - v6libdir=/usr/inet6/lib - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" - fi - ;; - cygwin) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef _CYGWIN_IN6_H -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; - v6lib=dummy; - v6libdir=none - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" -fi -rm -f conftest* - - ;; - winsock2) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - + generic) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: postponed" >&5 +printf "%s\n" "postponed" >&6; } + ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_addr" "ac_cv_member_struct_sockaddr_in6_sin6_addr" " +#ifdef HAVE_WINSOCK2_H +#include +#ifdef HAVE_WS2TCPIP_H #include -#if defined(_WS2TCPIP_H) -yes #endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; - v6lib=dummy; - v6libdir=none - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" -fi -rm -f conftest* - - ;; - generic) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: postponed" >&5 -$as_echo "postponed" >&6; } - ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_addr" "ac_cv_member_struct_sockaddr_in6_sin6_addr" " +#endif $ac_includes_default #ifdef HAVE_SYS_PARAM_H #include @@ -18542,14 +24105,14 @@ $ac_includes_default #endif " -if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = xyes; then : +if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = xyes +then : fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 -$as_echo_n "checking ipv6 stack type... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 +printf %s "checking ipv6 stack type... " >&6; } if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = "xyes"; then - v6type=$i v6lib=dummy v6libdir=none v6trylibc=yes @@ -18557,7 +24120,7 @@ $as_echo_n "checking ipv6 stack type... " >&6; } fi ;; esac - if test "$v6type" != "unknown"; then + if test "$v6lib" != "none"; then break fi done @@ -18566,20 +24129,21 @@ $as_echo_n "checking ipv6 stack type... " >&6; } if test -d $v6libdir -a -f $v6libdir/lib$v6lib.a; then LIBS="-L$v6libdir -l$v6lib $LIBS" enable_ipv6="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6, using lib$v6lib\"" >&5 -$as_echo "\"$v6type, $enable_ipv6, using lib$v6lib\"" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6, using lib$v6lib\"" >&5 +printf "%s\n" "\"$v6type, $enable_ipv6, using lib$v6lib\"" >&6; } elif test "$v6trylibc" = "yes"; then enable_ipv6="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6, using libc\"" >&5 -$as_echo "\"$v6type, $enable_ipv6, using libc\"" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6, using libc\"" >&5 +printf "%s\n" "\"$v6type, $enable_ipv6, using libc\"" >&6; } else as_fn_error $? "no IPv6 library lib$v6lib.a found." "$LINENO" 5 exit 1 fi else + v6type="unknown" enable_ipv6="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6\"" >&5 -$as_echo "\"$v6type, $enable_ipv6\"" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$v6type, $enable_ipv6\"" >&5 +printf "%s\n" "\"$v6type, $enable_ipv6\"" >&6; } fi fi @@ -18590,7 +24154,7 @@ fi if test "x$with_res_locks" = "xyes"; then -$as_echo "#define NETSNMP_REENTRANT 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_REENTRANT 1" >>confdefs.h case $target_os in @@ -18608,8 +24172,8 @@ fi # # Add platform-specific source files. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for platform-specific source" >&5 -$as_echo_n "checking for platform-specific source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for platform-specific source" >&5 +printf %s "checking for platform-specific source... " >&6; } other_src_list="" other_ftobjs_list="" other_lobjs_list="" @@ -18639,6 +24203,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" other_ftobjs_list="$other_ftobjs_list winpipe.ft" fi +# Linux systemd +if test "x$with_systemd" = "xyes"; then + other_src_list="$other_src_list sd-daemon.c" + other_objs_list="$other_objs_list sd-daemon.o" + other_lobjs_list="$other_lobjs_list sd-daemon.lo" + other_ftobjs_list="$other_ftobjs_list sd-daemon.ft" +fi + @@ -18648,10 +24220,10 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $other_src_list $other_objs_list $other_lobjs_list" >&5 -$as_echo "$other_src_list $other_objs_list $other_lobjs_list" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $other_agentobjs $other_lagentobjs $other_trapd_objects" >&5 -$as_echo "$other_agentobjs $other_lagentobjs $other_trapd_objects" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $other_src_list $other_objs_list $other_lobjs_list" >&5 +printf "%s\n" "$other_src_list $other_objs_list $other_lobjs_list" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $other_agentobjs $other_lagentobjs $other_trapd_objects" >&5 +printf "%s\n" "$other_agentobjs $other_lagentobjs $other_trapd_objects" >&6; } # # Create directory structure for build @@ -18682,8 +24254,8 @@ fi # # Do transport module processing. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for and configuring transport modules to use" >&5 -$as_echo_n "checking for and configuring transport modules to use... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for and configuring transport modules to use" >&5 +printf %s "checking for and configuring transport modules to use... " >&6; } # include the actual code checking # -*- sh -*- @@ -18696,7 +24268,7 @@ new_with_transport_list=`echo $with_transports | $SED 's/,/ /g;'` new_with_out_transport_list=`echo $with_out_transports | $SED 's/,/ /g;'` # set up the CPP command -MODULECPP="$CPP $PARTIALTARGETFLAGS -I${srcdir} -I${srcdir}/include" +MODULECPP="$CPP $CPPFLAGS $PARTIALTARGETFLAGS -I${srcdir} -I${srcdir}/include" # # Add the default transports to the list @@ -18737,7 +24309,12 @@ while test "x$new_transport_list" != "x"; do transport_src="transports/snmp"$i"Domain.c" transport_hdr="snmp"$i"Domain.h" rel_transport_src="snmplib/"$transport_src - rel_transport_hdr="include/net-snmp/library/"$transport_hdr + case $i in + IPBase) + rel_transport_hdr="snmplib/transports/$transport_hdr";; + *) + rel_transport_hdr="include/net-snmp/library/$transport_hdr";; + esac lc_i=`echo $i | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ctor_fn="netsnmp_"$lc_i"_ctor" if test -f "$srcdir/$rel_transport_src"; then @@ -18834,13 +24411,11 @@ fi for i in $transport_def_list; do - cat >>confdefs.h <<_ACEOF -#define $i 1 -_ACEOF + printf "%s\n" "#define $i 1" >>confdefs.h done -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $transport_result_list." >&5 -$as_echo "$transport_result_list." >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $transport_result_list." >&5 +printf "%s\n" "$transport_result_list." >&6; } cat >> configure-summary << EOF Network transport support: $transport_result_list @@ -18854,8 +24429,8 @@ rm -f module_tmp_header.h # Security modules to use # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security modules to use" >&5 -$as_echo_n "checking for security modules to use... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for security modules to use" >&5 +printf %s "checking for security modules to use... " >&6; } # -*- sh -*- security_def_list="usm" security_src_list="" @@ -18922,10 +24497,8 @@ for i in $new_with_security; do echo "init_"$i"();" >> $security_init_file echo "shutdown_"$i"();" >> $security_shutdown_file echo "#include " >> $security_incl_file - def_name="`$as_echo "NETSNMP_SECMOD_$i" | $as_tr_cpp`" - cat >>confdefs.h <<_ACEOF -#define $def_name 1 -_ACEOF + def_name="`printf "%s\n" "NETSNMP_SECMOD_$i" | $as_tr_cpp`" + printf "%s\n" "#define $def_name 1" >>confdefs.h done @@ -18935,8 +24508,8 @@ done -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $new_with_security" >&5 -$as_echo "$new_with_security" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $new_with_security" >&5 +printf "%s\n" "$new_with_security" >&6; } cat >> configure-summary << EOF SNMPv3 Security Modules: $new_with_security @@ -18950,6 +24523,9 @@ EOF rebuilt_new_with_security= already_checked_krb5=no +netsnmp_save_LIBS=$LIBS +CRYPTO_LIBS="" + for sec in $new_with_security do if test "x$sec" = "xksm"; then @@ -18964,18 +24540,19 @@ do rebuilt_new_with_security="$rebuilt_new_with_security $sec" else if test no = $trykrb5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: configured not to use krb5. disabling ksm" >&5 -$as_echo "$as_me: configured not to use krb5. disabling ksm" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: configured not to use krb5. disabling ksm" >&5 +printf "%s\n" "$as_me: configured not to use krb5. disabling ksm" >&6;} continue fi # Extract the first word of "krb5-config", so it can be a program name with args. set dummy krb5-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_krb5_config+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_krb5_config+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $krb5_config in [\\/]* | ?:[\\/]*) ac_cv_path_krb5_config="$krb5_config" # Let the user override the test with a path. @@ -18986,11 +24563,15 @@ as_dummy="$krb5path/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_krb5_config="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_krb5_config="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19003,18 +24584,21 @@ esac fi krb5_config=$ac_cv_path_krb5_config if test -n "$krb5_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $krb5_config" >&5 -$as_echo "$krb5_config" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $krb5_config" >&5 +printf "%s\n" "$krb5_config" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test no != $krb5_config; then + CPPFLAGS="$CPPFLAGS `$krb5_config --cflags`" - LIBS="$LIBS `$krb5_config --libs`" + CRYPTO_LIBS="$CRYPTO_LIBS `$krb5_config --libs | + $SED 's/-flto=[^[:blank:]]*//g'`" + elif test $krb5path != no; then if test "x$krb5path" != x -a -d $krb5path; then @@ -19039,208 +24623,504 @@ fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5" >&5 -$as_echo_n "checking for krb5... " >&6; } - if ${ac_cv_have_krb5+:} false; then : - $as_echo_n "(cached) " >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 -$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_init_context" >&5 +printf %s "checking for library containing krb5_init_context... " >&6; } +if test ${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$CRYPTO_LIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char krb5_init_context (); int -main () +main (void) { return krb5_init_context (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb5_krb5_init_context=yes -else - ac_cv_lib_krb5_krb5_init_context=no +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in krb5 ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char krb5_init_context (); +int +main (void) +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 -$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : - ac_cv_have_krb5=yes -else - ac_cv_have_krb5=no - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS="${netsnmp_result}" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS" >&6; } + if test "x${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS}" != "xnone required" ; then + CRYPTO_LIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + ac_cv_have_krb5=yes + else + ac_cv_have_krb5=no + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing error_message" >&5 +printf %s "checking for library containing error_message... " >&6; } +if test ${netsnmp_cv_func_error_message_CRYPTO_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$CRYPTO_LIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char error_message (); +int +main (void) +{ +return error_message (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in com_err ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char error_message (); +int +main (void) +{ +return error_message (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_error_message_CRYPTO_LIBS="${netsnmp_result}" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_error_message_CRYPTO_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_error_message_CRYPTO_LIBS" >&6; } + if test "x${netsnmp_cv_func_error_message_CRYPTO_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_error_message_CRYPTO_LIBS}" != "xnone required" ; then + CRYPTO_LIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for krb5" >&5 +printf %s "checking for krb5... " >&6; } if test $ac_cv_have_krb5 = no; then if test "x$askedkrb5" = "xyes"; then as_fn_error $? "Asked to use krb5 but I couldn't find it." "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. disabling ksm" >&5 -$as_echo "no. disabling ksm" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. disabling ksm" >&5 +printf "%s\n" "no. disabling ksm" >&6; } continue fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } rebuilt_new_with_security="$rebuilt_new_with_security ksm" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for heimdal" >&5 -$as_echo_n "checking for heimdal... " >&6; } - if ${ac_cv_heimdal+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for heimdal" >&5 +printf %s "checking for heimdal... " >&6; } + if test ${ac_cv_heimdal+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { const char *v = heimdal_version; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_heimdal=yes -else +else $as_nop ac_cv_heimdal=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_heimdal" >&5 -$as_echo "$ac_cv_heimdal" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_heimdal" >&5 +printf "%s\n" "$ac_cv_heimdal" >&6; } if test $ac_cv_heimdal = yes; then -$as_echo "#define NETSNMP_USE_KERBEROS_HEIMDAL 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_USE_KERBEROS_HEIMDAL 1" >>confdefs.h if test no = $krb5_config; then - LIBS="$LIBS -lkrb5 -lasn1 -lcom_err -lroken" + CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lasn1 -lcom_err -lroken" fi elif test no = $krb5_config; then - LIBS="$LIBS -lkrb5 -lcom_err" + CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lcom_err" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see which crypto API we need to use" >&5 -$as_echo_n "checking to see which crypto API we need to use... " >&6; } - if ${ac_cv_NETSNMP_USE_KERBEROS_MIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lk5crypto" >&5 -$as_echo_n "checking for krb5_init_context in -lk5crypto... " >&6; } -if ${ac_cv_lib_k5crypto_krb5_init_context+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lk5crypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test ${ac_cv_NETSNMP_USE_KERBEROS_MIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_init_context" >&5 +printf %s "checking for library containing krb5_init_context... " >&6; } +if test ${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$CRYPTO_LIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char krb5_init_context (); int -main () +main (void) { return krb5_init_context (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_k5crypto_krb5_init_context=yes -else - ac_cv_lib_k5crypto_krb5_init_context=no +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in k5crypto ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char krb5_init_context (); +int +main (void) +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_krb5_init_context" >&5 -$as_echo "$ac_cv_lib_k5crypto_krb5_init_context" >&6; } -if test "x$ac_cv_lib_k5crypto_krb5_init_context" = xyes; then : - ac_cv_NETSNMP_USE_KERBEROS_MIT=yes -else - ac_cv_NETSNMP_USE_KERBEROS_MIT=no +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS" >&6; } + if test "x${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_krb5_init_context_CRYPTO_LIBS}" != "xnone required" ; then + CRYPTO_LIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + ac_cv_NETSNMP_USE_KERBEROS_MIT=yes + else + ac_cv_NETSNMP_USE_KERBEROS_MIT=no + fi + + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing krb5_c_keyed_checksum_types" >&5 +printf %s "checking for library containing krb5_c_keyed_checksum_types... " >&6; } +if test ${netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$CRYPTO_LIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char krb5_c_keyed_checksum_types (); +int +main (void) +{ +return krb5_c_keyed_checksum_types (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in k5crypto ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char krb5_c_keyed_checksum_types (); +int +main (void) +{ +return krb5_c_keyed_checksum_types (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS" >&6; } + if test "x${netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_krb5_c_keyed_checksum_types_CRYPTO_LIBS}" != "xnone required" ; then + CRYPTO_LIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + fi + + + ac_fn_c_check_member "$LINENO" "krb5_keyblock" "enctype" "ac_cv_member_krb5_keyblock_enctype" "#include +" +if test "x$ac_cv_member_krb5_keyblock_enctype" = xyes +then : +printf "%s\n" "#define HAVE_KRB5_KEYBLOCK_ENCTYPE 1" >>confdefs.h + + +else $as_nop + ac_cv_NETSNMP_USE_KERBEROS_MIT=no fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see which crypto API we need to use" >&5 +printf %s "checking to see which crypto API we need to use... " >&6; } if test yes = $ac_cv_NETSNMP_USE_KERBEROS_MIT; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: new MIT crypto API" >&5 -$as_echo "new MIT crypto API" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: new MIT crypto API" >&5 +printf "%s\n" "new MIT crypto API" >&6; } -$as_echo "#define NETSNMP_USE_KERBEROS_MIT 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_USE_KERBEROS_MIT 1" >>confdefs.h - if test no = $krb5_config; then - LIBS="$LIBS -lk5crypto" - fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: old MIT crypto API" >&5 -$as_echo "old MIT crypto API" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: old MIT crypto API" >&5 +printf "%s\n" "old MIT crypto API" >&6; } fi - for ac_func in krb5_auth_con_getsendsubkey -do : - ac_fn_c_check_func "$LINENO" "krb5_auth_con_getsendsubkey" "ac_cv_func_krb5_auth_con_getsendsubkey" -if test "x$ac_cv_func_krb5_auth_con_getsendsubkey" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_AUTH_CON_GETSENDSUBKEY 1 -_ACEOF + LIBS="$CRYPTO_LIBS $netsnmp_save_LIBS" + ac_fn_c_check_func "$LINENO" "krb5_auth_con_getsendsubkey" "ac_cv_func_krb5_auth_con_getsendsubkey" +if test "x$ac_cv_func_krb5_auth_con_getsendsubkey" = xyes +then : + printf "%s\n" "#define HAVE_KRB5_AUTH_CON_GETSENDSUBKEY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "krb5_auth_con_getrecvsubkey" "ac_cv_func_krb5_auth_con_getrecvsubkey" +if test "x$ac_cv_func_krb5_auth_con_getrecvsubkey" = xyes +then : + printf "%s\n" "#define HAVE_KRB5_AUTH_CON_GETRECVSUBKEY 1" >>confdefs.h fi -done fi done +LNETSNMPLIBS="$LNETSNMPLIBS $CRYPTO_LIBS" +LIBS=$netsnmp_save_LIBS + new_with_security=$rebuilt_new_with_security # # Detect lm_sensors version # if test "x$ac_cv_header_sensors_sensors_h" = "xyes"; then - ac_fn_c_check_decl "$LINENO" "sensors_get_all_subfeatures" "ac_cv_have_decl_sensors_get_all_subfeatures" "#include -" -if test "x$ac_cv_have_decl_sensors_get_all_subfeatures" = xyes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + +ac_fn_check_decl "$LINENO" "sensors_get_all_subfeatures" "ac_cv_have_decl_sensors_get_all_subfeatures" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sensors_get_all_subfeatures" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_SENSORS_GET_ALL_SUBFEATURES $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SENSORS_GET_ALL_SUBFEATURES $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -$as_echo "#define NETSNMP_USE_SENSORS_V3 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_USE_SENSORS_V3 1" >>confdefs.h fi @@ -19273,8 +25153,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -19304,15 +25184,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -19326,8 +25206,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -19344,37 +25224,37 @@ rm -f confcache # RPM checks # ## -for ac_header in rpm/rpmlib.h rpm/header.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "rpm/rpmlib.h" "ac_cv_header_rpm_rpmlib_h" "$ac_includes_default" +if test "x$ac_cv_header_rpm_rpmlib_h" = xyes +then : + printf "%s\n" "#define HAVE_RPM_RPMLIB_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "rpm/header.h" "ac_cv_header_rpm_header_h" "$ac_includes_default" +if test "x$ac_cv_header_rpm_header_h" = xyes +then : + printf "%s\n" "#define HAVE_RPM_HEADER_H 1" >>confdefs.h -done +fi -ac_fn_c_check_header_mongrel "$LINENO" "rpm/rpmlib.h" "ac_cv_header_rpm_rpmlib_h" "$ac_includes_default" -if test "x$ac_cv_header_rpm_rpmlib_h" = xyes; then : +ac_fn_c_check_header_compile "$LINENO" "rpm/rpmlib.h" "ac_cv_header_rpm_rpmlib_h" "$ac_includes_default" +if test "x$ac_cv_header_rpm_rpmlib_h" = xyes +then : rpmlib_h=yes -else +else $as_nop rpmlib_h=no fi - -ac_fn_c_check_header_mongrel "$LINENO" "rpm/header.h" "ac_cv_header_rpm_header_h" "$ac_includes_default" -if test "x$ac_cv_header_rpm_header_h" = xyes; then : +ac_fn_c_check_header_compile "$LINENO" "rpm/header.h" "ac_cv_header_rpm_header_h" "$ac_includes_default" +if test "x$ac_cv_header_rpm_header_h" = xyes +then : rpmheader_h=yes -else +else $as_nop rpmheader_h=no fi - if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then if test "x$with_rpm" = "xyes" ; then as_fn_error $? "Could not find either the RPM header files needed and was specifically asked to use RPM support" "$LINENO" 5 @@ -19394,11 +25274,12 @@ if test "x$with_rpm" != "xno"; then # rpm-4.0.x needs rpmio. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rpmGetPath" >&5 -$as_echo_n "checking for library containing rpmGetPath... " >&6; } -if ${netsnmp_cv_func_rpmGetPath__rpmlibs+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing rpmGetPath" >&5 +printf %s "checking for library containing rpmGetPath... " >&6; } +if test ${netsnmp_cv_func_rpmGetPath__rpmlibs+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$_rpmlibs" netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" @@ -19410,21 +25291,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char rpmGetPath (); int -main () +main (void) { return rpmGetPath (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in rpmio ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19433,35 +25312,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char rpmGetPath (); int -main () +main (void) { return rpmGetPath (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_rpmGetPath__rpmlibs="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rpmGetPath__rpmlibs" >&5 -$as_echo "$netsnmp_cv_func_rpmGetPath__rpmlibs" >&6; } - if test "${netsnmp_cv_func_rpmGetPath__rpmlibs}" != "no" ; then - if test "${netsnmp_cv_func_rpmGetPath__rpmlibs}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rpmGetPath__rpmlibs" >&5 +printf "%s\n" "$netsnmp_cv_func_rpmGetPath__rpmlibs" >&6; } + if test "x${netsnmp_cv_func_rpmGetPath__rpmlibs}" != "xno" ; then + if test "x${netsnmp_cv_func_rpmGetPath__rpmlibs}" != "xnone required" ; then _rpmlibs="${netsnmp_result} ${netsnmp_target_val}" fi @@ -19471,11 +25348,12 @@ $as_echo "$netsnmp_cv_func_rpmGetPath__rpmlibs" >&6; } # rpm-4.0.3 librpmdb actually contains what we need. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rpmdbOpen" >&5 -$as_echo_n "checking for library containing rpmdbOpen... " >&6; } -if ${netsnmp_cv_func_rpmdbOpen__rpmlibs+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing rpmdbOpen" >&5 +printf %s "checking for library containing rpmdbOpen... " >&6; } +if test ${netsnmp_cv_func_rpmdbOpen__rpmlibs+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$_rpmlibs" netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" @@ -19487,21 +25365,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char rpmdbOpen (); int -main () +main (void) { return rpmdbOpen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in rpmdb ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19510,35 +25386,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char rpmdbOpen (); int -main () +main (void) { return rpmdbOpen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_rpmdbOpen__rpmlibs="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rpmdbOpen__rpmlibs" >&5 -$as_echo "$netsnmp_cv_func_rpmdbOpen__rpmlibs" >&6; } - if test "${netsnmp_cv_func_rpmdbOpen__rpmlibs}" != "no" ; then - if test "${netsnmp_cv_func_rpmdbOpen__rpmlibs}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rpmdbOpen__rpmlibs" >&5 +printf "%s\n" "$netsnmp_cv_func_rpmdbOpen__rpmlibs" >&6; } + if test "x${netsnmp_cv_func_rpmdbOpen__rpmlibs}" != "xno" ; then + if test "x${netsnmp_cv_func_rpmdbOpen__rpmlibs}" != "xnone required" ; then _rpmlibs="${netsnmp_result} ${netsnmp_target_val}" fi @@ -19547,11 +25421,12 @@ $as_echo "$netsnmp_cv_func_rpmdbOpen__rpmlibs" >&6; } # now check for rpm using the appropriate libraries. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rpmReadConfigFiles" >&5 -$as_echo_n "checking for library containing rpmReadConfigFiles... " >&6; } -if ${netsnmp_cv_func_rpmReadConfigFiles__rpmlibs+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing rpmReadConfigFiles" >&5 +printf %s "checking for library containing rpmReadConfigFiles... " >&6; } +if test ${netsnmp_cv_func_rpmReadConfigFiles__rpmlibs+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$_rpmlibs" netsnmp_temp_LIBS="${netsnmp_target_val} $LMIBLIBS ${LIBS}" @@ -19563,21 +25438,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char rpmReadConfigFiles (); int -main () +main (void) { return rpmReadConfigFiles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in rpm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19586,40 +25459,38 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char rpmReadConfigFiles (); int -main () +main (void) { return rpmReadConfigFiles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_rpmReadConfigFiles__rpmlibs="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rpmReadConfigFiles__rpmlibs" >&5 -$as_echo "$netsnmp_cv_func_rpmReadConfigFiles__rpmlibs" >&6; } - if test "${netsnmp_cv_func_rpmReadConfigFiles__rpmlibs}" != "no" ; then - if test "${netsnmp_cv_func_rpmReadConfigFiles__rpmlibs}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_rpmReadConfigFiles__rpmlibs" >&5 +printf "%s\n" "$netsnmp_cv_func_rpmReadConfigFiles__rpmlibs" >&6; } + if test "x${netsnmp_cv_func_rpmReadConfigFiles__rpmlibs}" != "xno" ; then + if test "x${netsnmp_cv_func_rpmReadConfigFiles__rpmlibs}" != "xnone required" ; then _rpmlibs="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBRPM 1" >>confdefs.h LMIBLIBS="$_rpmlibs $LMIBLIBS" @@ -19628,27 +25499,66 @@ $as_echo "#define HAVE_LIBRPM 1" >>confdefs.h # rpm 4.6 has incompatible API, turn on the legacy one - ac_fn_c_check_decl "$LINENO" "headerGetEntry" "ac_cv_have_decl_headerGetEntry" "#include - -" -if test "x$ac_cv_have_decl_headerGetEntry" = xyes; then : - : -else -$as_echo "#define _RPM_4_4_COMPAT /**/" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing headerGet" >&5 +printf %s "checking for library containing headerGet... " >&6; } +if test ${netsnmp_cv_func_headerGet_LIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LIBS" + netsnmp_temp_LIBS="$LMIBLIBS ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char headerGet (); +int +main (void) +{ +return headerGet (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_headerGet_LIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_headerGet_LIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_headerGet_LIBS" >&6; } + if test "x${netsnmp_cv_func_headerGet_LIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_headerGet_LIBS}" != "xnone required" ; then + LIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + +printf "%s\n" "#define HAVE_HEADERGET 1" >>confdefs.h + + + fi fi # # getfsstat/getvfsstat # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getfsstat" >&5 -$as_echo_n "checking for library containing getfsstat... " >&6; } -if ${ac_cv_search_getfsstat+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getfsstat" >&5 +printf %s "checking for library containing getfsstat... " >&6; } +if test ${ac_cv_search_getfsstat+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19656,79 +25566,74 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char getfsstat (); int -main () +main (void) { return getfsstat (); ; return 0; } _ACEOF -for ac_lib in '' nbutil; do +for ac_lib in '' nbutil +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_getfsstat=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_getfsstat+:} false; then : + if test ${ac_cv_search_getfsstat+y} +then : break fi done -if ${ac_cv_search_getfsstat+:} false; then : +if test ${ac_cv_search_getfsstat+y} +then : -else +else $as_nop ac_cv_search_getfsstat=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getfsstat" >&5 -$as_echo "$ac_cv_search_getfsstat" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getfsstat" >&5 +printf "%s\n" "$ac_cv_search_getfsstat" >&6; } ac_res=$ac_cv_search_getfsstat -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -for ac_func in getfsstat -do : - ac_fn_c_check_func "$LINENO" "getfsstat" "ac_cv_func_getfsstat" -if test "x$ac_cv_func_getfsstat" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETFSSTAT 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "getfsstat" "ac_cv_func_getfsstat" +if test "x$ac_cv_func_getfsstat" = xyes +then : + printf "%s\n" "#define HAVE_GETFSSTAT 1" >>confdefs.h fi -done -for ac_func in getvfsstat -do : - ac_fn_c_check_func "$LINENO" "getvfsstat" "ac_cv_func_getvfsstat" -if test "x$ac_cv_func_getvfsstat" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETVFSSTAT 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "getvfsstat" "ac_cv_func_getvfsstat" +if test "x$ac_cv_func_getvfsstat" = xyes +then : + printf "%s\n" "#define HAVE_GETVFSSTAT 1" >>confdefs.h fi -done # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, # -lseq on Dynix/PTX, -lgen on Unixware. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 -$as_echo_n "checking for library containing getmntent... " >&6; } -if ${ac_cv_search_getmntent+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 +printf %s "checking for library containing getmntent... " >&6; } +if test ${ac_cv_search_getmntent+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19736,52 +25641,54 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char getmntent (); int -main () +main (void) { return getmntent (); ; return 0; } _ACEOF -for ac_lib in '' sun seq gen; do +for ac_lib in '' sun seq gen +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_getmntent=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_getmntent+:} false; then : + if test ${ac_cv_search_getmntent+y} +then : break fi done -if ${ac_cv_search_getmntent+:} false; then : +if test ${ac_cv_search_getmntent+y} +then : -else +else $as_nop ac_cv_search_getmntent=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 -$as_echo "$ac_cv_search_getmntent" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 +printf "%s\n" "$ac_cv_search_getmntent" >&6; } ac_res=$ac_cv_search_getmntent -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_func_getmntent=yes -$as_echo "#define HAVE_GETMNTENT 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETMNTENT 1" >>confdefs.h -else +else $as_nop ac_cv_func_getmntent=no fi @@ -19790,11 +25697,12 @@ fi # # kinfo_get_cpus # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_get_cpus" >&5 -$as_echo_n "checking for library containing kinfo_get_cpus... " >&6; } -if ${ac_cv_search_kinfo_get_cpus+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_get_cpus" >&5 +printf %s "checking for library containing kinfo_get_cpus... " >&6; } +if test ${ac_cv_search_kinfo_get_cpus+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19802,131 +25710,146 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kinfo_get_cpus (); int -main () +main (void) { return kinfo_get_cpus (); ; return 0; } _ACEOF -for ac_lib in '' kinfo; do +for ac_lib in '' kinfo +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_kinfo_get_cpus=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_kinfo_get_cpus+:} false; then : + if test ${ac_cv_search_kinfo_get_cpus+y} +then : break fi done -if ${ac_cv_search_kinfo_get_cpus+:} false; then : +if test ${ac_cv_search_kinfo_get_cpus+y} +then : -else +else $as_nop ac_cv_search_kinfo_get_cpus=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_get_cpus" >&5 -$as_echo "$ac_cv_search_kinfo_get_cpus" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_get_cpus" >&5 +printf "%s\n" "$ac_cv_search_kinfo_get_cpus" >&6; } ac_res=$ac_cv_search_kinfo_get_cpus -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -for ac_func in kinfo_get_cpus -do : - ac_fn_c_check_func "$LINENO" "kinfo_get_cpus" "ac_cv_func_kinfo_get_cpus" -if test "x$ac_cv_func_kinfo_get_cpus" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KINFO_GET_CPUS 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "kinfo_get_cpus" "ac_cv_func_kinfo_get_cpus" +if test "x$ac_cv_func_kinfo_get_cpus" = xyes +then : + printf "%s\n" "#define HAVE_KINFO_GET_CPUS 1" >>confdefs.h fi -done # # diskIOLAx requires exp which may require -lm # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing exp" >&5 -$as_echo_n "checking for library containing exp... " >&6; } -if ${ac_cv_search_exp+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing exp" >&5 +printf %s "checking for library containing exp... " >&6; } +if test ${netsnmp_cv_func_exp_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char exp (); int -main () +main (void) { return exp (); ; return 0; } _ACEOF -for ac_lib in '' m; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_exp=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_exp+:} false; then : - break -fi -done -if ${ac_cv_search_exp+:} false; then : +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in m ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -else - ac_cv_search_exp=no +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char exp (); +int +main (void) +{ +return exp (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_exp" >&5 -$as_echo "$ac_cv_search_exp" >&6; } -ac_res=$ac_cv_search_exp -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_exp_LMIBLIBS="${netsnmp_result}" fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_exp_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_exp_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_exp_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_exp_LMIBLIBS}" != "xnone required" ; then + LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + + fi # # libkvm # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_read" >&5 -$as_echo_n "checking for library containing kvm_read... " >&6; } -if ${netsnmp_cv_func_kvm_read_LAGENTLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_read" >&5 +printf %s "checking for library containing kvm_read... " >&6; } +if test ${netsnmp_cv_func_kvm_read_LAGENTLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LAGENTLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -19938,21 +25861,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_read (); int -main () +main (void) { return kvm_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in kvm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19961,35 +25882,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_read (); int -main () +main (void) { return kvm_read (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_kvm_read_LAGENTLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_read_LAGENTLIBS" >&5 -$as_echo "$netsnmp_cv_func_kvm_read_LAGENTLIBS" >&6; } - if test "${netsnmp_cv_func_kvm_read_LAGENTLIBS}" != "no" ; then - if test "${netsnmp_cv_func_kvm_read_LAGENTLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_read_LAGENTLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_read_LAGENTLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_read_LAGENTLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_read_LAGENTLIBS}" != "xnone required" ; then LAGENTLIBS="${netsnmp_result} ${netsnmp_target_val}" fi @@ -19997,11 +25916,12 @@ $as_echo "$netsnmp_cv_func_kvm_read_LAGENTLIBS" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_openfiles" >&5 -$as_echo_n "checking for library containing kvm_openfiles... " >&6; } -if ${netsnmp_cv_func_kvm_openfiles_LAGENTLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_openfiles" >&5 +printf %s "checking for library containing kvm_openfiles... " >&6; } +if test ${netsnmp_cv_func_kvm_openfiles_LAGENTLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LAGENTLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -20013,21 +25933,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_openfiles (); int -main () +main (void) { return kvm_openfiles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in kvm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20036,35 +25954,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_openfiles (); int -main () +main (void) { return kvm_openfiles (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_kvm_openfiles_LAGENTLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_openfiles_LAGENTLIBS" >&5 -$as_echo "$netsnmp_cv_func_kvm_openfiles_LAGENTLIBS" >&6; } - if test "${netsnmp_cv_func_kvm_openfiles_LAGENTLIBS}" != "no" ; then - if test "${netsnmp_cv_func_kvm_openfiles_LAGENTLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_openfiles_LAGENTLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_openfiles_LAGENTLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_openfiles_LAGENTLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_openfiles_LAGENTLIBS}" != "xnone required" ; then LAGENTLIBS="${netsnmp_result} ${netsnmp_target_val}" fi @@ -20072,11 +25988,12 @@ $as_echo "$netsnmp_cv_func_kvm_openfiles_LAGENTLIBS" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getprocs" >&5 -$as_echo_n "checking for library containing kvm_getprocs... " >&6; } -if ${netsnmp_cv_func_kvm_getprocs_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getprocs" >&5 +printf %s "checking for library containing kvm_getprocs... " >&6; } +if test ${netsnmp_cv_func_kvm_getprocs_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -20088,21 +26005,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_getprocs (); int -main () +main (void) { return kvm_getprocs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in kvm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20111,35 +26026,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_getprocs (); int -main () +main (void) { return kvm_getprocs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_kvm_getprocs_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getprocs_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_kvm_getprocs_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_kvm_getprocs_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_kvm_getprocs_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getprocs_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_getprocs_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_getprocs_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_getprocs_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi @@ -20147,11 +26060,12 @@ $as_echo "$netsnmp_cv_func_kvm_getprocs_LMIBLIBS" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getproc2" >&5 -$as_echo_n "checking for library containing kvm_getproc2... " >&6; } -if ${netsnmp_cv_func_kvm_getproc2_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getproc2" >&5 +printf %s "checking for library containing kvm_getproc2... " >&6; } +if test ${netsnmp_cv_func_kvm_getproc2_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -20163,21 +26077,163 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_getproc2 (); int -main () +main (void) { return kvm_getproc2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop + for netsnmp_cur_lib in kvm ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char kvm_getproc2 (); +int +main (void) +{ +return kvm_getproc2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_kvm_getproc2_LMIBLIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getproc2_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_getproc2_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_getproc2_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_getproc2_LMIBLIBS}" != "xnone required" ; then + LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getfiles" >&5 +printf %s "checking for library containing kvm_getfiles... " >&6; } +if test ${netsnmp_cv_func_kvm_getfiles_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char kvm_getfiles (); +int +main (void) +{ +return kvm_getfiles (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in kvm ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char kvm_getfiles (); +int +main (void) +{ +return kvm_getfiles (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_kvm_getfiles_LMIBLIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getfiles_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_getfiles_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_getfiles_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_getfiles_LMIBLIBS}" != "xnone required" ; then + LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + + fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getfile2" >&5 +printf %s "checking for library containing kvm_getfile2... " >&6; } +if test ${netsnmp_cv_func_kvm_getfile2_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char kvm_getfile2 (); +int +main (void) +{ +return kvm_getfile2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop for netsnmp_cur_lib in kvm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20186,35 +26242,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kvm_getproc2 (); +char kvm_getfile2 (); int -main () +main (void) { -return kvm_getproc2 (); +return kvm_getfile2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kvm_getproc2_LMIBLIBS="${netsnmp_result}" + netsnmp_cv_func_kvm_getfile2_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getproc2_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_kvm_getproc2_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_kvm_getproc2_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_kvm_getproc2_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getfile2_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_getfile2_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_getfile2_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_getfile2_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi @@ -20222,11 +26276,12 @@ $as_echo "$netsnmp_cv_func_kvm_getproc2_LMIBLIBS" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getswapinfo" >&5 -$as_echo_n "checking for library containing kvm_getswapinfo... " >&6; } -if ${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_getswapinfo" >&5 +printf %s "checking for library containing kvm_getswapinfo... " >&6; } +if test ${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -20238,21 +26293,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_getswapinfo (); int -main () +main (void) { return kvm_getswapinfo (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in kvm ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20261,35 +26314,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kvm_getswapinfo (); int -main () +main (void) { return kvm_getswapinfo (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi @@ -20298,17 +26349,42 @@ $as_echo "$netsnmp_cv_func_kvm_getswapinfo_LMIBLIBS" >&6; } netsnmp_save_LIBS="$LIBS" LIBS="$LAGENTLIBS $LMIBLIBS $LIBS" -for ac_func in kvm_openfiles kvm_getprocs kvm_getproc2 kvm_getswapinfo -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "kvm_openfiles" "ac_cv_func_kvm_openfiles" +if test "x$ac_cv_func_kvm_openfiles" = xyes +then : + printf "%s\n" "#define HAVE_KVM_OPENFILES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kvm_getprocs" "ac_cv_func_kvm_getprocs" +if test "x$ac_cv_func_kvm_getprocs" = xyes +then : + printf "%s\n" "#define HAVE_KVM_GETPROCS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kvm_getproc2" "ac_cv_func_kvm_getproc2" +if test "x$ac_cv_func_kvm_getproc2" = xyes +then : + printf "%s\n" "#define HAVE_KVM_GETPROC2 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kvm_getswapinfo" "ac_cv_func_kvm_getswapinfo" +if test "x$ac_cv_func_kvm_getswapinfo" = xyes +then : + printf "%s\n" "#define HAVE_KVM_GETSWAPINFO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kvm_getfiles" "ac_cv_func_kvm_getfiles" +if test "x$ac_cv_func_kvm_getfiles" = xyes +then : + printf "%s\n" "#define HAVE_KVM_GETFILES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kvm_getfile2" "ac_cv_func_kvm_getfile2" +if test "x$ac_cv_func_kvm_getfile2" = xyes +then : + printf "%s\n" "#define HAVE_KVM_GETFILE2 1" >>confdefs.h fi -done LIBS="$netsnmp_save_LIBS" @@ -20316,11 +26392,12 @@ LIBS="$netsnmp_save_LIBS" # dynamic module support # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -$as_echo_n "checking for library containing dlopen... " >&6; } -if ${netsnmp_cv_func_dlopen_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +printf %s "checking for library containing dlopen... " >&6; } +if test ${netsnmp_cv_func_dlopen_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} $LAGENTLIBS $LSNMPLIBS ${LIBS}" @@ -20332,21 +26409,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in dl ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20355,35 +26430,33 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_dlopen_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_dlopen_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_dlopen_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_dlopen_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_dlopen_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_dlopen_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_dlopen_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_dlopen_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_dlopen_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi @@ -20392,19 +26465,124 @@ $as_echo "$netsnmp_cv_func_dlopen_LMIBLIBS" >&6; } netsnmp_save_LIBS="$LIBS" LIBS="$LMIBLIBS $LAGENTLIBS $LSNMPLIBS $LIBS" -for ac_func in dlopen -do : - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLOPEN 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes +then : + printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h fi -done LIBS="$netsnmp_save_LIBS" +# +# regex in process table +# +if test "x$with_pcre" != "xno"; then + ac_fn_c_check_header_compile "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default" +if test "x$ac_cv_header_pcre_h" = xyes +then : + + +printf "%s\n" "#define HAVE_PCRE_H 1" >>confdefs.h + + pcre_h=yes + +else $as_nop + pcre_h=no + +fi + +fi +if test "x$pcreheader_h" = "xno" -o "x$pcre_h" = "xno" ; then + if test "x$with_pcre" = "xyes" ; then + as_fn_error $? "Could not find the pcre header file needed and was specifically asked to use pcre support" "$LINENO" 5 + else + with_pcre=no + fi +fi + +# +# pcre libraries only needed for the ucd process agent mib software +# +if test "x$with_pcre" != "xno"; then + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_exec" >&5 +printf %s "checking for library containing pcre_exec... " >&6; } +if test ${netsnmp_cv_func_pcre_exec_LAGENTLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LAGENTLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char pcre_exec (); +int +main (void) +{ +return pcre_exec (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in pcre ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char pcre_exec (); +int +main (void) +{ +return pcre_exec (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_pcre_exec_LAGENTLIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pcre_exec_LAGENTLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_pcre_exec_LAGENTLIBS" >&6; } + if test "x${netsnmp_cv_func_pcre_exec_LAGENTLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_pcre_exec_LAGENTLIBS}" != "xnone required" ; then + LAGENTLIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + LMIBLIBS="$LMIBLIBS -lpcre" + + + fi + + + +fi + # -*- autoconf -*- # # generate empty files @@ -20432,8 +26610,10 @@ done # # Do hairy agent module processing. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for and configuring mib modules to use" >&5 -$as_echo_n "checking for and configuring mib modules to use... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for and configuring mib modules to use" >&5 +printf %s "checking for and configuring mib modules to use... " >&6; } + + # set up the CPP command MODULECPP="$CPP $PARTIALTARGETFLAGS $CPPFLAGS -DNETSNMP_FEATURE_CHECKING -I${srcdir}/include -I${srcdir}/agent/mibgroup" @@ -20448,17 +26628,22 @@ new_with_mib_modules=`echo $with_mib_modules | $SED 's/,/ /g;'` new_with_out_mib_modules=`echo $with_out_mib_modules | $SED 's/,/ /g;'` # set up initial module list -new_module_list="$new_with_mib_modules default_modules" +new_module_list="$new_with_mib_modules" + +if test "x$enable_agent" != "xno" ; then + # If the agent should be built then use default_modules + new_module_list="$new_module_list default_modules" -# minor modifications -if test "x$enable_agent" = "xno"; then - # minimum mib module list for snmptrapd - new_module_list="mibII/vacm_vars mibII/vacm_conf utilities/execute $new_with_mib_modules" - default_mibs=SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB - default_mibs_install=" " -elif test "x$mini_agent" = "xyes"; then - # define the mini agent flag to reduce our load list from default_mibs.h - MODULECPP="$MODULECPP -DNETSNMP_MINI_AGENT" + if test "x$mini_agent" = "xyes"; then + # define the mini agent flag to reduce our load list from default_mibs.h + MODULECPP="$MODULECPP -DNETSNMP_MINI_AGENT" + fi +elif test "x$enable_applications" != "xno" ; then + # otherwise, if snmptrapd should be built then add SNMPv3 and + # snmptrapd-specific parts + new_module_list="$new_module_list mibII/vacm_conf utilities/execute" + default_mibs=SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB + default_mibs_install=" " fi test_modules="$new_module_list" @@ -20469,21 +26654,21 @@ for i in $test_modules do if echo " $new_with_out_mib_modules " | $GREP " $i " > /dev/null; then mib_cfg_msg="mib module '$i' is both included and excluded." - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module conflict" >&5 -$as_echo "$as_me: WARNING: mib module conflict" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module conflict" >&5 +printf "%s\n" "$as_me: WARNING: mib module conflict" >&2;} if test "x$with_mib_cfg_checks" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: user with : $with_mib_modules" >&5 -$as_echo "$as_me: WARNING: user with : $with_mib_modules" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: final with : $new_module_list" >&5 -$as_echo "$as_me: WARNING: final with : $new_module_list" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: user without : $with_out_mib_modules" >&5 -$as_echo "$as_me: WARNING: user without : $with_out_mib_modules" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: final without: $new_with_out_mib_modules" >&5 -$as_echo "$as_me: WARNING: final without: $new_with_out_mib_modules" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: user with : $with_mib_modules" >&5 +printf "%s\n" "$as_me: WARNING: user with : $with_mib_modules" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: final with : $new_module_list" >&5 +printf "%s\n" "$as_me: WARNING: final with : $new_module_list" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: user without : $with_out_mib_modules" >&5 +printf "%s\n" "$as_me: WARNING: user without : $with_out_mib_modules" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: final without: $new_with_out_mib_modules" >&5 +printf "%s\n" "$as_me: WARNING: final without: $new_with_out_mib_modules" >&2;} as_fn_error $? "$mib_cfg_msg" "$LINENO" 5 else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $mib_cfg_msg It will be excluded" >&5 -$as_echo "$as_me: WARNING: $mib_cfg_msg It will be excluded" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $mib_cfg_msg It will be excluded" >&5 +printf "%s\n" "$as_me: WARNING: $mib_cfg_msg It will be excluded" >&2;} cat >> configure-summary << EOF *** MIB Module warning *** $mib_cfg_msg It has been excluded. @@ -20497,8 +26682,8 @@ done new_module_list=`(echo $new_module_list | tr ' ' '\n' | sort | tr '\n' ' '; echo '') | $SED 's/ $//'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $new_module_list." >&5 -$as_echo "$new_module_list." >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $new_module_list." >&5 +printf "%s\n" "$new_module_list." >&6; } #--------------------- # loop over module list @@ -20748,13 +26933,13 @@ _ACEOF do if echo " $module_list $new_mib_module_list $new_list_two " | $GREP " $j " > /dev/null; then mib_cfg_msg="mib module '$i' excludes module '$j' but another module requires it" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 -$as_echo "$as_me: WARNING: mib module error" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 +printf "%s\n" "$as_me: WARNING: mib module error" >&2;} if test "x$with_mib_cfg_checks" = "xyes"; then as_fn_error $? "$mib_cfg_msg" "$LINENO" 5 else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $mib_cfg_msg" >&5 -$as_echo "$as_me: WARNING: $mib_cfg_msg" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $mib_cfg_msg" >&5 +printf "%s\n" "$as_me: WARNING: $mib_cfg_msg" >&2;} cat >> configure-summary << EOF *** MIB Module warning *** $mib_cfg_msg @@ -20877,19 +27062,19 @@ EOF if test ! -f $srcdir/$mibdir/$j.h -a ! -f $srcdir/$mibdir/$j.c; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 -$as_echo "$as_me: WARNING: mib module error" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 +printf "%s\n" "$as_me: WARNING: mib module error" >&2;} as_fn_error $? "mib module \"$i\" requires module \"$j\" but $j.h or $j.c could not be found in $srcdir/$mibdir" "$LINENO" 5 elif echo " $new_with_out_mib_modules " | $GREP " $j " > /dev/null; then if test "x$i" != "xdefault_modules" ; then mib_cfg_msg="mib module '$i' requires module '$j' but someone told me to compile without it" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 -$as_echo "$as_me: WARNING: mib module error" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 +printf "%s\n" "$as_me: WARNING: mib module error" >&2;} if test "x$with_mib_cfg_checks" = "xyes"; then as_fn_error $? "$mib_cfg_msg" "$LINENO" 5 else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $mib_cfg_msg" >&5 -$as_echo "$as_me: WARNING: $mib_cfg_msg" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $mib_cfg_msg" >&5 +printf "%s\n" "$as_me: WARNING: $mib_cfg_msg" >&2;} cat >> configure-summary << EOF *** MIB Module warning *** $mib_cfg_msg @@ -20961,10 +27146,10 @@ EOF # check for unsupported config_load_mib # if $MODULECPP module_tmp_header.h | $GREP -q config_load_mib; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 -$as_echo "$as_me: WARNING: mib module error" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module \"$i\" uses the \"config_load_mib\" directive, which is no longer supported. It probably won't work." >&5 -$as_echo "$as_me: WARNING: mib module \"$i\" uses the \"config_load_mib\" directive, which is no longer supported. It probably won't work." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 +printf "%s\n" "$as_me: WARNING: mib module error" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module \"$i\" uses the \"config_load_mib\" directive, which is no longer supported. It probably won't work." >&5 +printf "%s\n" "$as_me: WARNING: mib module \"$i\" uses the \"config_load_mib\" directive, which is no longer supported. It probably won't work." >&2;} fi # grep config_load_mib #------------------- @@ -21030,8 +27215,8 @@ $as_echo "$as_me: WARNING: mib module \"$i\" uses the \"config_load_mib\" direct # No .h or .c = error! (typo?) # else # no $i.h or $i.c - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 -$as_echo "$as_me: WARNING: mib module error" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 +printf "%s\n" "$as_me: WARNING: mib module error" >&2;} as_fn_error $? "module files $i.h or $i.c could not be found in $srcdir/$mibdir" "$LINENO" 5 fi # no $i.h @@ -21057,8 +27242,8 @@ $as_echo "$as_me: WARNING: mib module error" >&2;} if test "x$mnm" != "x`basename $i`"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 -$as_echo "$as_me: WARNING: mib module error" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: mib module error" >&5 +printf "%s\n" "$as_me: WARNING: mib module error" >&2;} as_fn_error $? "conflicting names: $mnm != \`basename $i\`" "$LINENO" 5 fi temp_init=`$GREP init_$mnm $srcdir/$mibdir/$i.c | $GREP -v _init_$mnm` @@ -21316,8 +27501,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ." >&5 -$as_echo "." >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ." >&5 +printf "%s\n" "." >&6; } if test $module_debug -eq 1; then @@ -21334,26 +27519,26 @@ EOF # end hairy agent module processing -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if directories need to be created" >&5 -$as_echo_n "checking if directories need to be created... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if directories need to be created" >&5 +printf %s "checking if directories need to be created... " >&6; } for i in $module_directories; do $srcdir/mkinstalldirs $i done -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ." >&5 -$as_echo "." >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ." >&5 +printf "%s\n" "." >&6; } #------------------- # Define default mibs # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default mib files to read" >&5 -$as_echo_n "checking default mib files to read... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default mib files to read" >&5 +printf %s "checking default mib files to read... " >&6; } if test "x$NETSNMP_DEFAULT_MIBS" = "x"; then NETSNMP_DEFAULT_MIBS="$default_mibs" fi if test "x$ENV_SEPARATOR" != "x"; then : -elif test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then - # mingw32 and cygwin use ';' as the default environment variable separator +elif test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then + # mingw32 uses ';' as the default environment variable separator ENV_SEPARATOR=";" NETSNMP_DEFAULT_MIBS=`echo "$NETSNMP_DEFAULT_MIBS" | $SED 's/:/;/g'` default_mibs=`echo "$default_mibs" | $SED 's/:/;/g'` @@ -21362,31 +27547,24 @@ else fi -cat >>confdefs.h <<_ACEOF -#define ENV_SEPARATOR "$ENV_SEPARATOR" -_ACEOF +printf "%s\n" "#define ENV_SEPARATOR \"$ENV_SEPARATOR\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define ENV_SEPARATOR_CHAR '$ENV_SEPARATOR' -_ACEOF +printf "%s\n" "#define ENV_SEPARATOR_CHAR '$ENV_SEPARATOR'" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define NETSNMP_DEFAULT_MIBS "$NETSNMP_DEFAULT_MIBS" -_ACEOF +printf "%s\n" "#define NETSNMP_DEFAULT_MIBS \"$NETSNMP_DEFAULT_MIBS\"" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETSNMP_DEFAULT_MIBS" >&5 -$as_echo "$NETSNMP_DEFAULT_MIBS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETSNMP_DEFAULT_MIBS" >&5 +printf "%s\n" "$NETSNMP_DEFAULT_MIBS" >&6; } #------------------- # Define symbols for conditional compilation in makefiles # if echo " $agent_module_list " | \ - fgrep ' agentx/agentx_config ' | \ - fgrep ' agentx/client ' | \ - fgrep ' agentx/protocol ' > /dev/null ; then + $FGREP ' agentx/agentx_config ' | \ + $FGREP ' agentx/protocol ' > /dev/null ; then NETSNMP_HAVE_AGENTX_LIBS_TRUE='' NETSNMP_HAVE_AGENTX_LIBS_FALSE='#' else @@ -21410,17 +27588,17 @@ fi # Dynamic modules require Position-Independent Code # LIB_CFLAGS/DLLIBS: used in agent Makefile only # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have to build PIC code" >&5 -$as_echo_n "checking whether we have to build PIC code... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have to build PIC code" >&5 +printf %s "checking whether we have to build PIC code... " >&6; } echo " $module_list " | $GREP " ucd-snmp/dlmod " >/dev/null if test $? -eq 0 ; then LIB_CFLAGS="$LIB_CFLAGS $SHLIB_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else DLLIBS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -21442,157 +27620,6 @@ fi # Simple checks: ## -# AC_CHECK_LIB(des, main) -# AC_CHECK_LIB(m, asin) - -# dmalloc -# -if test "${with_dmalloc+set}" = set; then - if test "$with_dmalloc" = yes -a -d $with_dmalloc ; then - - if test "x$with_dmalloc" != x -a -d $with_dmalloc; then - if test -d $with_dmalloc/lib; then - LDFLAGS="-L$with_dmalloc/lib $LDFLAGS" - fi - if test -d $with_dmalloc/include; then - CPPFLAGS="-I$with_dmalloc/include $CPPFLAGS" - fi - fi - - fi - for ac_header in dmalloc.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default" -if test "x$ac_cv_header_dmalloc_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DMALLOC_H 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dmalloc_message" >&5 -$as_echo_n "checking for library containing dmalloc_message... " >&6; } -if ${ac_cv_search_dmalloc_message+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dmalloc_message (); -int -main () -{ -return dmalloc_message (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dmalloc; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_dmalloc_message=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_dmalloc_message+:} false; then : - break -fi -done -if ${ac_cv_search_dmalloc_message+:} false; then : - -else - ac_cv_search_dmalloc_message=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dmalloc_message" >&5 -$as_echo "$ac_cv_search_dmalloc_message" >&6; } -ac_res=$ac_cv_search_dmalloc_message -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - -# EFence -# (This used to be on by default for developer checkout) -# -if test "x$use_efence" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EF_Exit" >&5 -$as_echo_n "checking for library containing EF_Exit... " >&6; } -if ${ac_cv_search_EF_Exit+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EF_Exit (); -int -main () -{ -return EF_Exit (); - ; - return 0; -} -_ACEOF -for ac_lib in '' efence; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_EF_Exit=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_EF_Exit+:} false; then : - break -fi -done -if ${ac_cv_search_EF_Exit+:} false; then : - -else - ac_cv_search_EF_Exit=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EF_Exit" >&5 -$as_echo "$ac_cv_search_EF_Exit" >&6; } -ac_res=$ac_cv_search_EF_Exit -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - - # ELF libraries # Typically used for 'nlist' (needed for uptime) # @@ -21601,11 +27628,12 @@ case $target_os in linux*) # add hosts which don't use nlist here ;; irix*) # Check for nlist in mld (irix) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist in -lelf" >&5 -$as_echo_n "checking for nlist in -lelf... " >&6; } -if ${ac_cv_lib_elf_nlist+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nlist in -lelf" >&5 +printf %s "checking for nlist in -lelf... " >&6; } +if test ${ac_cv_lib_elf_nlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21614,43 +27642,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nlist (); int -main () +main (void) { return nlist (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_elf_nlist=yes -else +else $as_nop ac_cv_lib_elf_nlist=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist" >&5 -$as_echo "$ac_cv_lib_elf_nlist" >&6; } -if test "x$ac_cv_lib_elf_nlist" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBELF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist" >&5 +printf "%s\n" "$ac_cv_lib_elf_nlist" >&6; } +if test "x$ac_cv_lib_elf_nlist" = xyes +then : + printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h LIBS="-lelf $LIBS" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist64 in -lelf" >&5 -$as_echo_n "checking for nlist64 in -lelf... " >&6; } -if ${ac_cv_lib_elf_nlist64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nlist64 in -lelf" >&5 +printf %s "checking for nlist64 in -lelf... " >&6; } +if test ${ac_cv_lib_elf_nlist64+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21659,43 +27685,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nlist64 (); int -main () +main (void) { return nlist64 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_elf_nlist64=yes -else +else $as_nop ac_cv_lib_elf_nlist64=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist64" >&5 -$as_echo "$ac_cv_lib_elf_nlist64" >&6; } -if test "x$ac_cv_lib_elf_nlist64" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBELF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist64" >&5 +printf "%s\n" "$ac_cv_lib_elf_nlist64" >&6; } +if test "x$ac_cv_lib_elf_nlist64" = xyes +then : + printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h LIBS="-lelf $LIBS" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist in -lmld" >&5 -$as_echo_n "checking for nlist in -lmld... " >&6; } -if ${ac_cv_lib_mld_nlist+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nlist in -lmld" >&5 +printf %s "checking for nlist in -lmld... " >&6; } +if test ${ac_cv_lib_mld_nlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21704,33 +27728,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nlist (); int -main () +main (void) { return nlist (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_mld_nlist=yes -else +else $as_nop ac_cv_lib_mld_nlist=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mld_nlist" >&5 -$as_echo "$ac_cv_lib_mld_nlist" >&6; } -if test "x$ac_cv_lib_mld_nlist" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMLD 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mld_nlist" >&5 +printf "%s\n" "$ac_cv_lib_mld_nlist" >&6; } +if test "x$ac_cv_lib_mld_nlist" = xyes +then : + printf "%s\n" "#define HAVE_LIBMLD 1" >>confdefs.h LIBS="-lmld $LIBS" @@ -21738,11 +27759,12 @@ fi ;; *) # default - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist in -lelf" >&5 -$as_echo_n "checking for nlist in -lelf... " >&6; } -if ${ac_cv_lib_elf_nlist+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nlist in -lelf" >&5 +printf %s "checking for nlist in -lelf... " >&6; } +if test ${ac_cv_lib_elf_nlist+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lelf $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21751,33 +27773,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nlist (); int -main () +main (void) { return nlist (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_elf_nlist=yes -else +else $as_nop ac_cv_lib_elf_nlist=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist" >&5 -$as_echo "$ac_cv_lib_elf_nlist" >&6; } -if test "x$ac_cv_lib_elf_nlist" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBELF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist" >&5 +printf "%s\n" "$ac_cv_lib_elf_nlist" >&6; } +if test "x$ac_cv_lib_elf_nlist" = xyes +then : + printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h LIBS="-lelf $LIBS" @@ -21806,7 +27825,7 @@ xwinsock2) #include int -main () +main (void) { socket(0, 0, 0); @@ -21816,27 +27835,29 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : # Keep LIBS. true -else +else $as_nop # Restore LIBS and complain. LIBS="$netsnmp_save_LIBS" as_fn_error $? "libws2_32 not found." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if ${ac_cv_search_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +printf %s "checking for library containing socket... " >&6; } +if test ${ac_cv_search_socket+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21844,124 +27865,126 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char socket (); int -main () +main (void) { return socket (); ; return 0; } _ACEOF -for ac_lib in '' socket; do +for ac_lib in '' socket +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_socket=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_socket+:} false; then : + if test ${ac_cv_search_socket+y} +then : break fi done -if ${ac_cv_search_socket+:} false; then : +if test ${ac_cv_search_socket+y} +then : -else +else $as_nop ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +printf "%s\n" "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else +else $as_nop as_fn_error $? "socket(2) not found." "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if ${ac_cv_search_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +printf %s "checking for library containing gethostbyname... " >&6; } +if test ${ac_cv_search_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif + builtin and then its argument prototype would still apply. */ char gethostbyname (); int -main () +main (void) { return gethostbyname (); ; return 0; } _ACEOF -for ac_lib in '' nsl socket; do +for ac_lib in '' nsl socket +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_gethostbyname=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gethostbyname+:} false; then : + if test ${ac_cv_search_gethostbyname+y} +then : break fi done -if ${ac_cv_search_gethostbyname+:} false; then : +if test ${ac_cv_search_gethostbyname+y} +then : -else +else $as_nop ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +printf "%s\n" "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - for ac_func in gethostbyname -do : ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYNAME 1 -_ACEOF +if test "x$ac_cv_func_gethostbyname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5 -$as_echo_n "checking for library containing gethostbyaddr... " >&6; } -if ${ac_cv_search_gethostbyaddr+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5 +printf %s "checking for library containing gethostbyaddr... " >&6; } +if test ${ac_cv_search_gethostbyaddr+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21969,60 +27992,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char gethostbyaddr (); int -main () +main (void) { return gethostbyaddr (); ; return 0; } _ACEOF -for ac_lib in '' nsl socket; do +for ac_lib in '' nsl socket +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_gethostbyaddr=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_gethostbyaddr+:} false; then : + if test ${ac_cv_search_gethostbyaddr+y} +then : break fi done -if ${ac_cv_search_gethostbyaddr+:} false; then : +if test ${ac_cv_search_gethostbyaddr+y} +then : -else +else $as_nop ac_cv_search_gethostbyaddr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5 -$as_echo "$ac_cv_search_gethostbyaddr" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5 +printf "%s\n" "$ac_cv_search_gethostbyaddr" >&6; } ac_res=$ac_cv_search_gethostbyaddr -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - for ac_func in gethostbyaddr -do : ac_fn_c_check_func "$LINENO" "gethostbyaddr" "ac_cv_func_gethostbyaddr" -if test "x$ac_cv_func_gethostbyaddr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYADDR 1 -_ACEOF +if test "x$ac_cv_func_gethostbyaddr" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h fi -done ;; esac @@ -22039,7 +28060,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { IpRenewAddress(0); @@ -22048,12 +28069,13 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : # Keep LIBS. true -else +else $as_nop # Restore LIBS and complain. LIBS="$netsnmp_save_LIBS" @@ -22064,7 +28086,42 @@ else esac fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MIB_IF_TABLE2" >&5 +printf %s "checking for MIB_IF_TABLE2... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _WIN32_WINNT 0xffff + #include + #include + #include + +int +main (void) +{ + + return sizeof(MIB_IF_TABLE2) + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_MIB_IF_TABLE2 1" >>confdefs.h + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -22079,7 +28136,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { regcomp(0, 0, 0); @@ -22088,18 +28145,19 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : # Keep LIBS. true -else +else $as_nop # Restore LIBS. LIBS="$netsnmp_save_LIBS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -22113,7 +28171,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main () +main (void) { SnmpUtilMemAlloc(0); @@ -22122,99 +28180,107 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : # Keep LIBS. true -else +else $as_nop # Restore LIBS. LIBS="$netsnmp_save_LIBS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext # kstat library (Solaris) # - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kstat_lookup" >&5 -$as_echo_n "checking for library containing kstat_lookup... " >&6; } -if ${netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LNETSNMPLIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" - netsnmp_result=no - LIBS="${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kstat_lookup in -lkstat" >&5 +printf %s "checking for kstat_lookup in -lkstat... " >&6; } +if test ${ac_cv_lib_kstat_kstat_lookup+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkstat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char kstat_lookup (); int -main () +main (void) { return kstat_lookup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in kstat ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_kstat_kstat_lookup=yes +else $as_nop + ac_cv_lib_kstat_kstat_lookup=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_lookup" >&5 +printf "%s\n" "$ac_cv_lib_kstat_kstat_lookup" >&6; } +if test "x$ac_cv_lib_kstat_kstat_lookup" = xyes +then : + LNETSNMPLIBS="$LNETSNMPLIBS -lkstat" +fi + + + +# socket library (Solaris) +# +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any in -lsocket" >&5 +printf %s "checking for in6addr_any in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_in6addr_any+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kstat_lookup (); +char in6addr_any (); int -main () +main (void) { -return kstat_lookup (); +return in6addr_any (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result=-l${netsnmp_cur_lib} - break +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_socket_in6addr_any=yes +else $as_nop + ac_cv_lib_socket_in6addr_any=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - done +LIBS=$ac_check_lib_save_LIBS fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS="${netsnmp_result}" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_in6addr_any" >&5 +printf "%s\n" "$ac_cv_lib_socket_in6addr_any" >&6; } +if test "x$ac_cv_lib_socket_in6addr_any" = xyes +then : + LNETSNMPLIBS="$LNETSNMPLIBS -lsocket" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS" >&5 -$as_echo "$netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS" >&6; } - if test "${netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS}" != "no" ; then - if test "${netsnmp_cv_func_kstat_lookup_LNETSNMPLIBS}" != "none required" ; then - LNETSNMPLIBS="${netsnmp_result} ${netsnmp_target_val}" - fi - -$as_echo "#define HAVE_LIBKSTAT 1" >>confdefs.h - - - fi @@ -22223,11 +28289,12 @@ $as_echo "#define HAVE_LIBKSTAT 1" >>confdefs.h # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if ${netsnmp_cv_func_clock_gettime_LNETSNMPLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +printf %s "checking for library containing clock_gettime... " >&6; } +if test ${netsnmp_cv_func_clock_gettime_LNETSNMPLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LNETSNMPLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -22239,21 +28306,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char clock_gettime (); int -main () +main (void) { return clock_gettime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in rt ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22262,39 +28327,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char clock_gettime (); int -main () +main (void) { return clock_gettime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_clock_gettime_LNETSNMPLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_clock_gettime_LNETSNMPLIBS" >&5 -$as_echo "$netsnmp_cv_func_clock_gettime_LNETSNMPLIBS" >&6; } - if test "${netsnmp_cv_func_clock_gettime_LNETSNMPLIBS}" != "no" ; then - if test "${netsnmp_cv_func_clock_gettime_LNETSNMPLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_clock_gettime_LNETSNMPLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_clock_gettime_LNETSNMPLIBS" >&6; } + if test "x${netsnmp_cv_func_clock_gettime_LNETSNMPLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_clock_gettime_LNETSNMPLIBS}" != "xnone required" ; then LNETSNMPLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h +printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h fi @@ -22313,11 +28376,12 @@ $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h echo " $module_list " | $GREP " ucd-snmp/diskio " >/dev/null if test $? -eq 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getdevs" >&5 -$as_echo_n "checking for library containing getdevs... " >&6; } -if ${netsnmp_cv_func_getdevs_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getdevs" >&5 +printf %s "checking for library containing getdevs... " >&6; } +if test ${netsnmp_cv_func_getdevs_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -22329,21 +28393,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char getdevs (); int -main () +main (void) { return getdevs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in devstat ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22352,49 +28414,48 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char getdevs (); int -main () +main (void) { return getdevs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_getdevs_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_getdevs_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_getdevs_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_getdevs_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_getdevs_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_getdevs_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_getdevs_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_getdevs_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_getdevs_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_GETDEVS 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETDEVS 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing devstat_getdevs" >&5 -$as_echo_n "checking for library containing devstat_getdevs... " >&6; } -if ${netsnmp_cv_func_devstat_getdevs_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing devstat_getdevs" >&5 +printf %s "checking for library containing devstat_getdevs... " >&6; } +if test ${netsnmp_cv_func_devstat_getdevs_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -22406,21 +28467,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char devstat_getdevs (); int -main () +main (void) { return devstat_getdevs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in devstat ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22429,39 +28488,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char devstat_getdevs (); int -main () +main (void) { return devstat_getdevs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_devstat_getdevs_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_devstat_getdevs_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_devstat_getdevs_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_devstat_getdevs_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_devstat_getdevs_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_devstat_getdevs_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_devstat_getdevs_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_devstat_getdevs_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_devstat_getdevs_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_DEVSTAT_GETDEVS 1" >>confdefs.h +printf "%s\n" "#define HAVE_DEVSTAT_GETDEVS 1" >>confdefs.h fi @@ -22472,11 +28529,12 @@ fi # (for if-mib description) # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pci_lookup_name" >&5 -$as_echo_n "checking for library containing pci_lookup_name... " >&6; } -if ${netsnmp_cv_func_pci_lookup_name_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pci_lookup_name" >&5 +printf %s "checking for library containing pci_lookup_name... " >&6; } +if test ${netsnmp_cv_func_pci_lookup_name_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -22488,21 +28546,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pci_lookup_name (); int -main () +main (void) { return pci_lookup_name (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in pci ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22511,39 +28567,37 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pci_lookup_name (); int -main () +main (void) { return pci_lookup_name (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_pci_lookup_name_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pci_lookup_name_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_pci_lookup_name_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_pci_lookup_name_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_pci_lookup_name_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_pci_lookup_name_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_pci_lookup_name_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_pci_lookup_name_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_pci_lookup_name_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi -$as_echo "#define HAVE_PCI_LOOKUP_NAME 1" >>confdefs.h +printf "%s\n" "#define HAVE_PCI_LOOKUP_NAME 1" >>confdefs.h fi @@ -22553,140 +28607,385 @@ $as_echo "#define HAVE_PCI_LOOKUP_NAME 1" >>confdefs.h # echo " $module_list " | $GREP -i "ucd-snmp/lmsensor" > /dev/null if test $? -eq 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sensors support" >&5 -$as_echo_n "checking for sensors support... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sensors support" >&5 +printf %s "checking for sensors support... " >&6; } case $target_os in solaris*) # Agent: HAVE_PICL_H # - ac_fn_c_check_header_mongrel "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" -if test "x$ac_cv_header_picl_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" +if test "x$ac_cv_header_picl_h" = xyes +then : LMIBLIBS="${LMIBLIBS} -lpicl" fi + ac_fn_c_check_header_compile "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" +if test "x$ac_cv_header_picl_h" = xyes +then : + printf "%s\n" "#define HAVE_PICL_H 1" >>confdefs.h - for ac_header in picl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" -if test "x$ac_cv_header_picl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PICL_H 1 +fi + + ;; + *) + # Not-Used: HAVE_SENSORS_SENSORS_H + # + ac_fn_c_check_header_compile "$LINENO" "sensors/sensors.h" "ac_cv_header_sensors_sensors_h" "$ac_includes_default" +if test "x$ac_cv_header_sensors_sensors_h" = xyes +then : + +else $as_nop + as_fn_error $? "asked to use lm_sensors but I couldn't find sensors/sensors.h" "$LINENO" 5 +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sensors_get_detected_chips" >&5 +printf %s "checking for library containing sensors_get_detected_chips... " >&6; } +if test ${netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LMIBLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char sensors_get_detected_chips (); +int +main (void) +{ +return sensors_get_detected_chips (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in sensors ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char sensors_get_detected_chips (); +int +main (void) +{ +return sensors_get_detected_chips (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS}" != "xnone required" ; then + LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + + else + as_fn_error $? "asked to use lm_sensors but I couldn't find -lsensors" "$LINENO" 5 + fi + + ;; + esac +fi + +# +# libnl (netlink) +# + +# The test below verifies whether the libnl-3 package been installed. +# This test works as follows: +# - If pkg-config was not installed at the time autogen.sh was run, +# the definition of the PKG_CHECK_EXISTS() macro will not be found by +# autogen.sh. Augogen.sh will generate a configure script that prints +# a warning about pkg-config and proceeds as if libnl-3 has not been +# installed. +# - If pkg-config was installed at the time autogen.sh was run, +# the generated configure script will try to detect the presence of +# the libnl-3 library by looking up compile and linker flags in the +# file called libnl-3.pc. +# - pkg-config settings can be overridden via the configure variables +# LIBNL3_CFLAGS and LIBNL3_LIBS (added by the pkg-config m4 macro's to +# the configure script -- see also ./configure --help). +# - The LIBNL3_CFLAGS and LIBNL3_LIBS configure variables can be used +# even if the pkg-config executable is not present on the system on +# which the configure script is run. +# - Although libnl-3 is only used on Linux, test presence of libnl-3 on +# all platforms because this code is the first occurrence in the configure +# script of PKG_* macros and because the search for the pkg-config executable +# only occurs once. + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + PKG_CONFIG="" + fi +fi +if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBNL3" >&5 +printf %s "checking for LIBNL3... " >&6; } +if test -n "$LIBNL3_CFLAGS"; then + pkg_cv_LIBNL3_CFLAGS="$LIBNL3_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBNL3_CFLAGS=`$PKG_CONFIG --cflags "libnl-3.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBNL3_LIBS"; then + pkg_cv_LIBNL3_LIBS="$LIBNL3_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBNL3_LIBS=`$PKG_CONFIG --libs "libnl-3.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -done - ;; - *) - # Not-Used: HAVE_SENSORS_SENSORS_H - # - ac_fn_c_check_header_mongrel "$LINENO" "sensors/sensors.h" "ac_cv_header_sensors_sensors_h" "$ac_includes_default" -if test "x$ac_cv_header_sensors_sensors_h" = xyes; then : +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - as_fn_error $? "asked to use lm_sensors but I couldn't find sensors/sensors.h" "$LINENO" 5 + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + LIBNL3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-3.0" 2>&1` + else + LIBNL3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-3.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBNL3_PKG_ERRORS" >&5 + as_fn_error $? "Package requirements (libnl-3.0) were not met: +$LIBNL3_PKG_ERRORS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sensors_get_detected_chips" >&5 -$as_echo_n "checking for library containing sensors_get_detected_chips... " >&6; } -if ${netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else - netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LMIBLIBS" - netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" - netsnmp_result=no - LIBS="${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sensors_get_detected_chips (); -int -main () -{ -return sensors_get_detected_chips (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result="none required" -else - for netsnmp_cur_lib in sensors ; do - LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +Alternatively, you may set the environment variables LIBNL3_CFLAGS +and LIBNL3_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sensors_get_detected_chips (); -int -main () -{ -return sensors_get_detected_chips (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - netsnmp_result=-l${netsnmp_cur_lib} - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS="${netsnmp_result}" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_sensors_get_detected_chips_LMIBLIBS}" != "none required" ; then - LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" - fi +Alternatively, you may set the environment variables LIBNL3_CFLAGS +and LIBNL3_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - else - as_fn_error $? "asked to use lm_sensors but I couldn't find -lsensors" "$LINENO" 5 - fi +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + LIBNL3_CFLAGS=$pkg_cv_LIBNL3_CFLAGS + LIBNL3_LIBS=$pkg_cv_LIBNL3_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - ;; - esac +fi fi -# -# libnl (netlink) -# if test "x$with_nl" != "xno"; then case $target_os in linux*) # Check for libnl (linux) netsnmp_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nl_connect" >&5 -$as_echo_n "checking for library containing nl_connect... " >&6; } -if ${netsnmp_cv_func_nl_connect_LIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + CPPFLAGS="${LIBNL3_CFLAGS} ${LIBNLROUTE3_CFLAGS} $CPPFLAGS" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nl_connect" >&5 +printf %s "checking for library containing nl_connect... " >&6; } +if test ${netsnmp_cv_func_nl_connect_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" - netsnmp_target_val="$LIBS" - netsnmp_temp_LIBS=" ${LIBS}" + netsnmp_target_val="$LMIBLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" netsnmp_result=no LIBS="${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22695,21 +28994,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nl_connect (); int -main () +main (void) { return nl_connect (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in nl-3 ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22718,61 +29015,55 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nl_connect (); int -main () +main (void) { return nl_connect (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" - netsnmp_cv_func_nl_connect_LIBS="${netsnmp_result}" + netsnmp_cv_func_nl_connect_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_nl_connect_LIBS" >&5 -$as_echo "$netsnmp_cv_func_nl_connect_LIBS" >&6; } - if test "${netsnmp_cv_func_nl_connect_LIBS}" != "no" ; then - if test "${netsnmp_cv_func_nl_connect_LIBS}" != "none required" ; then - LIBS="${netsnmp_result} ${netsnmp_target_val}" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_nl_connect_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_nl_connect_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xnone required" ; then + LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi - for ac_header in netlink/netlink.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netlink/netlink.h" "ac_cv_header_netlink_netlink_h" "$ac_includes_default" -if test "x$ac_cv_header_netlink_netlink_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETLINK_NETLINK_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "netlink/netlink.h" "ac_cv_header_netlink_netlink_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_netlink_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_NETLINK_H 1" >>confdefs.h fi -done - - EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3" + EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNL3_CFLAGS}" else CPPFLAGS="$netsnmp_save_CPPFLAGS" fi if test "x$ac_cv_header_netlink_netlink_h" != xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nl_connect" >&5 -$as_echo_n "checking for library containing nl_connect... " >&6; } -if ${netsnmp_cv_func_nl_connect_LMIBLIBS+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nl_connect" >&5 +printf %s "checking for library containing nl_connect... " >&6; } +if test ${netsnmp_cv_func_nl_connect_LMIBLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_func_search_save_LIBS="$LIBS" netsnmp_target_val="$LMIBLIBS" netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" @@ -22784,21 +29075,19 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nl_connect (); int -main () +main (void) { return nl_connect (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result="none required" -else +else $as_nop for netsnmp_cur_lib in nl ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22807,50 +29096,43 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char nl_connect (); int -main () +main (void) { return nl_connect (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : netsnmp_result=-l${netsnmp_cur_lib} break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="${netsnmp_func_search_save_LIBS}" netsnmp_cv_func_nl_connect_LMIBLIBS="${netsnmp_result}" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_nl_connect_LMIBLIBS" >&5 -$as_echo "$netsnmp_cv_func_nl_connect_LMIBLIBS" >&6; } - if test "${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "no" ; then - if test "${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "none required" ; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_nl_connect_LMIBLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_nl_connect_LMIBLIBS" >&6; } + if test "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_nl_connect_LMIBLIBS}" != "xnone required" ; then LMIBLIBS="${netsnmp_result} ${netsnmp_target_val}" fi - for ac_header in netlink/netlink.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netlink/netlink.h" "ac_cv_header_netlink_netlink_h" "$ac_includes_default" -if test "x$ac_cv_header_netlink_netlink_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETLINK_NETLINK_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "netlink/netlink.h" "ac_cv_header_netlink_netlink_h" "$ac_includes_default" +if test "x$ac_cv_header_netlink_netlink_h" = xyes +then : + printf "%s\n" "#define HAVE_NETLINK_NETLINK_H 1" >>confdefs.h fi -done - fi @@ -22862,12 +29144,13 @@ done _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "nl_socket_free" >/dev/null 2>&1; then : + $EGREP "nl_socket_free" >/dev/null 2>&1 +then : -$as_echo "#define HAVE_LIBNL3 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBNL3 1" >>confdefs.h fi -rm -f conftest* +rm -rf conftest* fi ;; @@ -22888,11 +29171,12 @@ TLSPROG=no if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then # check for libpkcs11 if asked if test "x$askedopenssl" != "xyes" -a "x$askedpkcs" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C_Initialize in -lpkcs11" >&5 -$as_echo_n "checking for C_Initialize in -lpkcs11... " >&6; } -if ${ac_cv_lib_pkcs11_C_Initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C_Initialize in -lpkcs11" >&5 +printf %s "checking for C_Initialize in -lpkcs11... " >&6; } +if test ${ac_cv_lib_pkcs11_C_Initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpkcs11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22901,43 +29185,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char C_Initialize (); int -main () +main (void) { return C_Initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pkcs11_C_Initialize=yes -else +else $as_nop ac_cv_lib_pkcs11_C_Initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pkcs11_C_Initialize" >&5 -$as_echo "$ac_cv_lib_pkcs11_C_Initialize" >&6; } -if test "x$ac_cv_lib_pkcs11_C_Initialize" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pkcs11_C_Initialize" >&5 +printf "%s\n" "$ac_cv_lib_pkcs11_C_Initialize" >&6; } +if test "x$ac_cv_lib_pkcs11_C_Initialize" = xyes +then : -$as_echo "#define HAVE_LIBPKCS11 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBPKCS11 1" >>confdefs.h LIBPKCS11="-lpkcs11" fi else if test "x$tryrsaref" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSAPrivateDecrypt in -lrsaref" >&5 -$as_echo_n "checking for RSAPrivateDecrypt in -lrsaref... " >&6; } -if ${ac_cv_lib_rsaref_RSAPrivateDecrypt+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RSAPrivateDecrypt in -lrsaref" >&5 +printf %s "checking for RSAPrivateDecrypt in -lrsaref... " >&6; } +if test ${ac_cv_lib_rsaref_RSAPrivateDecrypt+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lrsaref $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22946,43 +29230,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char RSAPrivateDecrypt (); int -main () +main (void) { return RSAPrivateDecrypt (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_rsaref_RSAPrivateDecrypt=yes -else +else $as_nop ac_cv_lib_rsaref_RSAPrivateDecrypt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rsaref_RSAPrivateDecrypt" >&5 -$as_echo "$ac_cv_lib_rsaref_RSAPrivateDecrypt" >&6; } -if test "x$ac_cv_lib_rsaref_RSAPrivateDecrypt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRSAREF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rsaref_RSAPrivateDecrypt" >&5 +printf "%s\n" "$ac_cv_lib_rsaref_RSAPrivateDecrypt" >&6; } +if test "x$ac_cv_lib_rsaref_RSAPrivateDecrypt" = xyes +then : + printf "%s\n" "#define HAVE_LIBRSAREF 1" >>confdefs.h LIBS="-lrsaref $LIBS" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSA_PKCS1_RSAref in -lRSAglue" >&5 -$as_echo_n "checking for RSA_PKCS1_RSAref in -lRSAglue... " >&6; } -if ${ac_cv_lib_RSAglue_RSA_PKCS1_RSAref+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RSA_PKCS1_RSAref in -lRSAglue" >&5 +printf %s "checking for RSA_PKCS1_RSAref in -lRSAglue... " >&6; } +if test ${ac_cv_lib_RSAglue_RSA_PKCS1_RSAref+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lRSAglue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22991,33 +29273,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char RSA_PKCS1_RSAref (); int -main () +main (void) { return RSA_PKCS1_RSAref (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_RSAglue_RSA_PKCS1_RSAref=yes -else +else $as_nop ac_cv_lib_RSAglue_RSA_PKCS1_RSAref=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_RSAglue_RSA_PKCS1_RSAref" >&5 -$as_echo "$ac_cv_lib_RSAglue_RSA_PKCS1_RSAref" >&6; } -if test "x$ac_cv_lib_RSAglue_RSA_PKCS1_RSAref" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRSAGLUE 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_RSAglue_RSA_PKCS1_RSAref" >&5 +printf "%s\n" "$ac_cv_lib_RSAglue_RSA_PKCS1_RSAref" >&6; } +if test "x$ac_cv_lib_RSAglue_RSA_PKCS1_RSAref" = xyes +then : + printf "%s\n" "#define HAVE_LIBRSAGLUE 1" >>confdefs.h LIBS="-lRSAglue $LIBS" @@ -23025,40 +29304,167 @@ fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -leay32" >&5 -$as_echo_n "checking for -leay32... " >&6; } - netsnmp_save_LIBS="$LIBS" - LIBS="-leay32" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 +printf %s "checking for OPENSSL... " >&6; } + +if test -n "$OPENSSL_CFLAGS"; then + pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$OPENSSL_LIBS"; then + pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1` + else + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$OPENSSL_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (openssl) were not met: + +$OPENSSL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables OPENSSL_CFLAGS +and OPENSSL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables OPENSSL_CFLAGS +and OPENSSL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS + OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +fi +fi + if test "x${PKG_CONFIG}" != "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OPENSSL_CFLAGS=${OPENSSL_CFLAGS}" >&5 +printf "%s\n" "$as_me: OPENSSL_CFLAGS=${OPENSSL_CFLAGS}" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OPENSSL_LIBS=${OPENSSL_LIBS}" >&5 +printf "%s\n" "$as_me: OPENSSL_LIBS=${OPENSSL_LIBS}" >&6;} + CRYPTO=use_pkg_config_for_openssl + LIBCRYPTO="-lssl ${OPENSSL_LIBS}" + netsnmp_save_LIBS="$LIBS" + LIBS="-lssl ${OPENSSL_LIBS}" + ac_fn_c_check_func "$LINENO" "EVP_md5" "ac_cv_func_EVP_md5" +if test "x$ac_cv_func_EVP_md5" = xyes +then : + +fi + + LIBS="$netsnmp_save_LIBS" + fi + + + if test "x${PKG_CONFIG}" = "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find pkg-config." >&5 +printf "%s\n" "$as_me: Could not find pkg-config." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -leay32" >&5 +printf %s "checking for -leay32... " >&6; } + netsnmp_save_LIBS="$LIBS" + LIBS="-leay32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int -main () +main (void) { return EVP_md5(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; ac_cv_lib_eay32_EVP_md5=yes; CRYPTO="eay32" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_cv_lib_eay32_EVP_md5=yes + CRYPTO="eay32" + LIBCRYPTO="-leay32" + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$netsnmp_save_LIBS" - - if test x$CRYPTO = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5 -$as_echo_n "checking for EVP_md5 in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_EVP_md5+:} false; then : - $as_echo_n "(cached) " >&6 -else + LIBS="$netsnmp_save_LIBS" + + if test x$CRYPTO = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5 +printf %s "checking for EVP_md5 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_md5+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23067,235 +29473,308 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char EVP_md5 (); int -main () +main (void) { return EVP_md5 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypto_EVP_md5=yes -else +else $as_nop ac_cv_lib_crypto_EVP_md5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5 -$as_echo "$ac_cv_lib_crypto_EVP_md5" >&6; } -if test "x$ac_cv_lib_crypto_EVP_md5" = xyes; then : - CRYPTO="crypto" -fi - - fi - - if test x$CRYPTO != x; then - -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h - - LIBCRYPTO="-l${CRYPTO}" - as_ac_Lib=`$as_echo "ac_cv_lib_${CRYPTO}''_AES_cfb128_encrypt" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AES_cfb128_encrypt in -l${CRYPTO}" >&5 -$as_echo_n "checking for AES_cfb128_encrypt in -l${CRYPTO}... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_md5" >&6; } +if test "x$ac_cv_lib_crypto_EVP_md5" = xyes +then : + CRYPTO="crypto"; LIBCRYPTO="-lcrypto" +else $as_nop + + unset ac_cv_lib_crypto_EVP_md5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5 +printf %s "checking for EVP_md5 in -lcrypto... " >&6; } +if test ${ac_cv_lib_crypto_EVP_md5+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-l${CRYPTO} $LIBS" +LIBS="-lcrypto -lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char AES_cfb128_encrypt (); +char EVP_md5 (); int -main () +main (void) { -return AES_cfb128_encrypt (); +return EVP_md5 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_crypto_EVP_md5=yes +else $as_nop + ac_cv_lib_crypto_EVP_md5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5 +printf "%s\n" "$ac_cv_lib_crypto_EVP_md5" >&6; } +if test "x$ac_cv_lib_crypto_EVP_md5" = xyes +then : + CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz" +fi -$as_echo "#define HAVE_AES_CFB128_ENCRYPT 1" >>confdefs.h fi + fi + fi - as_ac_Lib=`$as_echo "ac_cv_lib_${CRYPTO}''_EVP_MD_CTX_create" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_create in -l${CRYPTO}" >&5 -$as_echo_n "checking for EVP_MD_CTX_create in -l${CRYPTO}... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l${CRYPTO} $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test x$CRYPTO != x; then + +printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + + netsnmp_save_LIBS="$LIBS" + LIBS="$LIBCRYPTO" + ac_fn_c_check_func "$LINENO" "AES_cfb128_encrypt" "ac_cv_func_AES_cfb128_encrypt" +if test "x$ac_cv_func_AES_cfb128_encrypt" = xyes +then : + printf "%s\n" "#define HAVE_AES_CFB128_ENCRYPT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "EVP_sha224" "ac_cv_func_EVP_sha224" +if test "x$ac_cv_func_EVP_sha224" = xyes +then : + printf "%s\n" "#define HAVE_EVP_SHA224 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "EVP_sha384" "ac_cv_func_EVP_sha384" +if test "x$ac_cv_func_EVP_sha384" = xyes +then : + printf "%s\n" "#define HAVE_EVP_SHA384 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_create" "ac_cv_func_EVP_MD_CTX_create" +if test "x$ac_cv_func_EVP_MD_CTX_create" = xyes +then : + printf "%s\n" "#define HAVE_EVP_MD_CTX_CREATE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_destroy" "ac_cv_func_EVP_MD_CTX_destroy" +if test "x$ac_cv_func_EVP_MD_CTX_destroy" = xyes +then : + printf "%s\n" "#define HAVE_EVP_MD_CTX_DESTROY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new" +if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes +then : + printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_free" "ac_cv_func_EVP_MD_CTX_free" +if test "x$ac_cv_func_EVP_MD_CTX_free" = xyes +then : + printf "%s\n" "#define HAVE_EVP_MD_CTX_FREE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "DH_set0_pqg" "ac_cv_func_DH_set0_pqg" +if test "x$ac_cv_func_DH_set0_pqg" = xyes +then : + printf "%s\n" "#define HAVE_DH_SET0_PQG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "DH_get0_pqg" "ac_cv_func_DH_get0_pqg" +if test "x$ac_cv_func_DH_get0_pqg" = xyes +then : + printf "%s\n" "#define HAVE_DH_GET0_PQG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "DH_get0_key" "ac_cv_func_DH_get0_key" +if test "x$ac_cv_func_DH_get0_key" = xyes +then : + printf "%s\n" "#define HAVE_DH_GET0_KEY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ASN1_STRING_get0_data" "ac_cv_func_ASN1_STRING_get0_data" +if test "x$ac_cv_func_ASN1_STRING_get0_data" = xyes +then : + printf "%s\n" "#define HAVE_ASN1_STRING_GET0_DATA 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "X509_NAME_ENTRY_get_object" "ac_cv_func_X509_NAME_ENTRY_get_object" +if test "x$ac_cv_func_X509_NAME_ENTRY_get_object" = xyes +then : + printf "%s\n" "#define HAVE_X509_NAME_ENTRY_GET_OBJECT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "X509_NAME_ENTRY_get_data" "ac_cv_func_X509_NAME_ENTRY_get_data" +if test "x$ac_cv_func_X509_NAME_ENTRY_get_data" = xyes +then : + printf "%s\n" "#define HAVE_X509_NAME_ENTRY_GET_DATA 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid" +if test "x$ac_cv_func_X509_get_signature_nid" = xyes +then : + printf "%s\n" "#define HAVE_X509_GET_SIGNATURE_NID 1" >>confdefs.h + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether 2nd app_verify_cookie_cb() arg is const" >&5 +printf %s "checking whether 2nd app_verify_cookie_cb() arg is const... " >&6; } + netsnmp_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EVP_MD_CTX_create (); + #include + int -main () +main (void) { -return EVP_MD_CTX_create (); + + int (*app_verify_cookie_cb)(SSL *ssl, + const unsigned char *cookie, + unsigned int cookie_len) = NULL; + SSL_CTX_set_cookie_verify_cb(NULL, app_verify_cookie_cb); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; ac_cv_saccaq=const +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -$as_echo "#define HAVE_EVP_MD_CTX_CREATE /**/" >>confdefs.h +printf "%s\n" "#define SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER $ac_cv_saccaq" >>confdefs.h + CFLAGS="$netsnmp_save_CFLAGS" + LIBS="$netsnmp_save_LIBS" + fi + netsnmp_save_LIBS="$LIBS" + LIBS="-lssl $LIBCRYPTO" + ac_fn_c_check_func "$LINENO" "ERR_get_error_all" "ac_cv_func_ERR_get_error_all" +if test "x$ac_cv_func_ERR_get_error_all" = xyes +then : + printf "%s\n" "#define HAVE_ERR_GET_ERROR_ALL 1" >>confdefs.h -$as_echo "#define HAVE_EVP_MD_CTX_DESTROY /**/" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_algorithms" "ac_cv_func_OpenSSL_add_all_algorithms" +if test "x$ac_cv_func_OpenSSL_add_all_algorithms" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "OPENSSL_sk_num" "ac_cv_func_OPENSSL_sk_num" +if test "x$ac_cv_func_OPENSSL_sk_num" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SK_NUM 1" >>confdefs.h - fi - if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTLSv1_method in -lssl" >&5 -$as_echo_n "checking for DTLSv1_method in -lssl... " >&6; } -if ${ac_cv_lib_ssl_DTLSv1_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +ac_fn_c_check_func "$LINENO" "OPENSSL_sk_value" "ac_cv_func_OPENSSL_sk_value" +if test "x$ac_cv_func_OPENSSL_sk_value" = xyes +then : + printf "%s\n" "#define HAVE_OPENSSL_SK_VALUE 1" >>confdefs.h -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char DTLSv1_method (); -int -main () -{ -return DTLSv1_method (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssl_DTLSv1_method=yes -else - ac_cv_lib_ssl_DTLSv1_method=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate" +if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes +then : + printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_DTLSv1_method" >&5 -$as_echo "$ac_cv_lib_ssl_DTLSv1_method" >&6; } -if test "x$ac_cv_lib_ssl_DTLSv1_method" = xyes; then : +ac_fn_c_check_func "$LINENO" "SSL_library_init" "ac_cv_func_SSL_library_init" +if test "x$ac_cv_func_SSL_library_init" = xyes +then : + printf "%s\n" "#define HAVE_SSL_LIBRARY_INIT 1" >>confdefs.h -$as_echo "#define HAVE_LIBSSL_DTLS 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "SSL_load_error_strings" "ac_cv_func_SSL_load_error_strings" +if test "x$ac_cv_func_SSL_load_error_strings" = xyes +then : + printf "%s\n" "#define HAVE_SSL_LOAD_ERROR_STRINGS 1" >>confdefs.h - LIBCRYPTO=" -lssl $LIBCRYPTO" -else - as_fn_error $? "The DTLS based transports require the libssl library from OpenSSL to be available and support DTLS" "$LINENO" 5 fi +ac_fn_c_check_func "$LINENO" "TLS_method" "ac_cv_func_TLS_method" +if test "x$ac_cv_func_TLS_method" = xyes +then : + printf "%s\n" "#define HAVE_TLS_METHOD 1" >>confdefs.h - TLSPROG=yes - fi - if echo " $transport_result_list " | $GREP "TLS" > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 -$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } -if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +ac_fn_c_check_func "$LINENO" "TLSv1_method" "ac_cv_func_TLSv1_method" +if test "x$ac_cv_func_TLSv1_method" = xyes +then : + printf "%s\n" "#define HAVE_TLSV1_METHOD 1" >>confdefs.h -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SSL_library_init (); -int -main () -{ -return SSL_library_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssl_SSL_library_init=yes -else - ac_cv_lib_ssl_SSL_library_init=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +ac_fn_c_check_func "$LINENO" "DTLS_method" "ac_cv_func_DTLS_method" +if test "x$ac_cv_func_DTLS_method" = xyes +then : + printf "%s\n" "#define HAVE_DTLS_METHOD 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "DTLSv1_method" "ac_cv_func_DTLSv1_method" +if test "x$ac_cv_func_DTLSv1_method" = xyes +then : + printf "%s\n" "#define HAVE_DTLSV1_METHOD 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 -$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } -if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : -$as_echo "#define HAVE_LIBSSL 1" >>confdefs.h + LIBS="$netsnmp_save_LIBS" + if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then + if test x$ac_cv_func_DTLSv1_method = xyes -o \ + x$ac_cv_func_DTLS_method = xyes; then + +printf "%s\n" "#define HAVE_LIBSSL_DTLS 1" >>confdefs.h LIBCRYPTO=" -lssl $LIBCRYPTO" -else - as_fn_error $? "The DTLS based transports require the libssl library from OpenSSL to be available" "$LINENO" 5 -fi + else + as_fn_error $? "The DTLS based transports require the libssl library from OpenSSL to be available and support DTLS" "$LINENO" 5 + fi + TLSPROG=yes + fi + if echo " $transport_result_list " | $GREP "TLS" > /dev/null; then + if test x$ac_cv_func_TLSv1_method = xyes -o \ + x$ac_cv_func_TLS_method = xyes; then + +printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h + LIBCRYPTO=" -lssl $LIBCRYPTO" + else + as_fn_error $? "The TLS based transports require the libssl library from OpenSSL to be available" "$LINENO" 5 + fi TLSPROG=yes fi if echo " $transport_result_list " | $GREP " SSH " > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_session_startup in -lssh2" >&5 -$as_echo_n "checking for libssh2_session_startup in -lssh2... " >&6; } -if ${ac_cv_lib_ssh2_libssh2_session_startup+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh2_session_startup in -lssh2" >&5 +printf %s "checking for libssh2_session_startup in -lssh2... " >&6; } +if test ${ac_cv_lib_ssh2_libssh2_session_startup+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lssh2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23304,35 +29783,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char libssh2_session_startup (); int -main () +main (void) { return libssh2_session_startup (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ssh2_libssh2_session_startup=yes -else +else $as_nop ac_cv_lib_ssh2_libssh2_session_startup=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_session_startup" >&5 -$as_echo "$ac_cv_lib_ssh2_libssh2_session_startup" >&6; } -if test "x$ac_cv_lib_ssh2_libssh2_session_startup" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_session_startup" >&5 +printf "%s\n" "$ac_cv_lib_ssh2_libssh2_session_startup" >&6; } +if test "x$ac_cv_lib_ssh2_libssh2_session_startup" = xyes +then : -$as_echo "#define HAVE_LIBSSH2 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBSSH2 1" >>confdefs.h LIBCRYPTO=" -lssh2 $LIBCRYPTO" -else +else $as_nop as_fn_error $? "The SSH transport requires the libssh2 library to be available" "$LINENO" 5 fi @@ -23340,11 +29818,12 @@ fi fi fi elif test "x$askedpkcs" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C_Initialize in -lpkcs11" >&5 -$as_echo_n "checking for C_Initialize in -lpkcs11... " >&6; } -if ${ac_cv_lib_pkcs11_C_Initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C_Initialize in -lpkcs11" >&5 +printf %s "checking for C_Initialize in -lpkcs11... " >&6; } +if test ${ac_cv_lib_pkcs11_C_Initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpkcs11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23353,57 +29832,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char C_Initialize (); int -main () +main (void) { return C_Initialize (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pkcs11_C_Initialize=yes -else +else $as_nop ac_cv_lib_pkcs11_C_Initialize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pkcs11_C_Initialize" >&5 -$as_echo "$ac_cv_lib_pkcs11_C_Initialize" >&6; } -if test "x$ac_cv_lib_pkcs11_C_Initialize" = xyes; then : - $as_echo "#define HAVE_LIBPKCS11 1" >>confdefs.h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pkcs11_C_Initialize" >&5 +printf "%s\n" "$ac_cv_lib_pkcs11_C_Initialize" >&6; } +if test "x$ac_cv_lib_pkcs11_C_Initialize" = xyes +then : + printf "%s\n" "#define HAVE_LIBPKCS11 1" >>confdefs.h LIBPKCS11="-lpkcs11" fi -fi -if test "x$TLSPROG" = "xyes"; then - ac_fn_c_check_decl "$LINENO" "EVP_sha224" "ac_cv_have_decl_EVP_sha224" "#include -" -if test "x$ac_cv_have_decl_EVP_sha224" = xyes; then : - -$as_echo "#define HAVE_EVP_SHA224 /**/" >>confdefs.h - -else - : -fi - - ac_fn_c_check_decl "$LINENO" "EVP_sha384" "ac_cv_have_decl_EVP_sha384" "#include -" -if test "x$ac_cv_have_decl_EVP_sha384" = xyes; then : - -$as_echo "#define HAVE_EVP_SHA384 /**/" >>confdefs.h - -else - : -fi - fi LIBS=$NONAGENTLIBS # restore old libraries @@ -23465,7 +29921,7 @@ if test "x$tryopenssl" != "xno" -a "x$CRYPTO" = "x"; then crypto_files_c="openssl/openssl_sha1.c openssl/openssl_md5.c openssl/openssl_set_key.c openssl/openssl_des_enc.c openssl/openssl_cbc_enc.c openssl/openssl_aes_cfb.c openssl/openssl_aes_core.c openssl/openssl_cfb128.c" crypto_files_o="openssl/openssl_sha1.o openssl/openssl_md5.o openssl/openssl_set_key.o openssl/openssl_des_enc.o openssl/openssl_cbc_enc.o openssl/openssl_aes_cfb.o openssl/openssl_aes_core.oo openssl/openssl_cfb128.o" crypto_files_lo="openssl/openssl_sha1.lo openssl/openssl_md5.lo openssl/openssl_set_key.lo openssl/openssl_des_enc.lo openssl/openssl_cbc_enc.lo openssl/openssl_aes_cfb.lo openssl/openssl_aes_core.lo openssl/openssl_cfb128.lo" - $as_echo "#define HAVE_AES_CFB128_ENCRYPT 1" >>confdefs.h + printf "%s\n" "#define HAVE_AES_CFB128_ENCRYPT 1" >>confdefs.h fi @@ -23477,7 +29933,7 @@ fi # if test "x$CRYPTO" != "x" ; then -$as_echo "#define NETSNMP_CAN_DO_CRYPTO 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_CAN_DO_CRYPTO 1" >>confdefs.h fi @@ -23492,18 +29948,18 @@ if test "$with_libwrap" != "no"; then fi _libs=${LIBS} - ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" -if test "x$ac_cv_header_tcpd_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" +if test "x$ac_cv_header_tcpd_h" = xyes +then : -else +else $as_nop as_fn_error $? "Asked to use libwrap but I couldn't find tcpd.h." "$LINENO" 5 fi - LIBS="$LIBS -lwrap" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library -lwrap" >&5 -$as_echo_n "checking for TCP wrappers library -lwrap... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library -lwrap" >&5 +printf %s "checking for TCP wrappers library -lwrap... " >&6; } # XXX: should check for hosts_ctl cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23512,33 +29968,36 @@ $as_echo_n "checking for TCP wrappers library -lwrap... " >&6; } int allow_severity = 0; int deny_severity = 0; int -main () +main (void) { hosts_access((void *)0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define NETSNMP_USE_LIBWRAP 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + printf "%s\n" "#define NETSNMP_USE_LIBWRAP 1" >>confdefs.h test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib" _wraplibs="$_wraplibs -lwrap" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } # Linux RedHat 6.1 won't link libwrap without libnsl ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain" -if test "x$ac_cv_func_yp_get_default_domain" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_get_default_domain in -lnsl" >&5 -$as_echo_n "checking for yp_get_default_domain in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_yp_get_default_domain+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test "x$ac_cv_func_yp_get_default_domain" = xyes +then : + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yp_get_default_domain in -lnsl" >&5 +printf %s "checking for yp_get_default_domain in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_yp_get_default_domain+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23547,33 +30006,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char yp_get_default_domain (); int -main () +main (void) { return yp_get_default_domain (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_nsl_yp_get_default_domain=yes -else +else $as_nop ac_cv_lib_nsl_yp_get_default_domain=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5 -$as_echo "$ac_cv_lib_nsl_yp_get_default_domain" >&6; } -if test "x$ac_cv_lib_nsl_yp_get_default_domain" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5 +printf "%s\n" "$ac_cv_lib_nsl_yp_get_default_domain" >&6; } +if test "x$ac_cv_lib_nsl_yp_get_default_domain" = xyes +then : + printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h LIBS="-lnsl $LIBS" @@ -23581,8 +30037,8 @@ fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library -lwrap linked with -lnsl" >&5 -$as_echo_n "checking for TCP wrappers library -lwrap linked with -lnsl... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library -lwrap linked with -lnsl" >&5 +printf %s "checking for TCP wrappers library -lwrap linked with -lnsl... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -23590,31 +30046,32 @@ $as_echo_n "checking for TCP wrappers library -lwrap linked with -lnsl... " >&6; int allow_severity = 0; int deny_severity = 0; int -main () +main (void) { hosts_access((void *)0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - $as_echo "#define NETSNMP_USE_LIBWRAP 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + printf "%s\n" "#define NETSNMP_USE_LIBWRAP 1" >>confdefs.h test "$with_libwrap" != no -a "$with_libwrap" != yes && _wraplibs="-L$with_libwrap/lib" _wraplibs="$_wraplibs -lwrap -lnsl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } as_fn_error $? "Asked to use libwrap but I couldn't find it." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LAGENTLIBS="$_wraplibs" + LAGENTLIBS="$LAGENTLIBS $_wraplibs" CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags} LIBS=${_libs} @@ -23629,11 +30086,12 @@ if test "x$with_mysql" = "xyes" ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MYSQLCONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MYSQLCONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQLCONFIG="$MYSQLCONFIG" # Let the user override the test with a path. @@ -23643,11 +30101,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MYSQLCONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_MYSQLCONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -23659,11 +30121,11 @@ esac fi MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG if test -n "$MYSQLCONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQLCONFIG" >&5 -$as_echo "$MYSQLCONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MYSQLCONFIG" >&5 +printf "%s\n" "$MYSQLCONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -23678,41 +30140,112 @@ done _cppflags="${CPPFLAGS}" LIBS="${LIBS} ${MYSQL_LIBS}" CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}" - ac_fn_c_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default" -if test "x$ac_cv_header_mysql_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default" +if test "x$ac_cv_header_mysql_h" = xyes +then : -else +else $as_nop as_fn_error $? "Could not find mysql.h and was specifically asked to use MySQL support" "$LINENO" 5 fi + ac_fn_c_check_header_compile "$LINENO" "my_global.h" "ac_cv_header_my_global_h" "$ac_includes_default" +if test "x$ac_cv_header_my_global_h" = xyes +then : + printf "%s\n" "#define HAVE_MY_GLOBAL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "my_sys.h" "ac_cv_header_my_sys_h" "$ac_includes_default" +if test "x$ac_cv_header_my_sys_h" = xyes +then : + printf "%s\n" "#define HAVE_MY_SYS_H 1" >>confdefs.h + +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether MY_INIT() works" >&5 -$as_echo_n "checking whether MY_INIT() works... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether MY_INIT() works" >&5 +printf %s "checking whether MY_INIT() works... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #ifdef HAVE_MY_GLOBAL_H + #include + #endif + #ifdef HAVE_MY_SYS_H #include + #endif + #include int -main () +main (void) { MY_INIT("my_init_test") ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_MY_INIT 1" >>confdefs.h + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether my_load_defaults() exists" >&5 +printf %s "checking whether my_load_defaults() exists... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifdef HAVE_MY_GLOBAL_H + #include + #endif + #ifdef HAVE_MY_SYS_H + #include + #endif + #include +int +main (void) +{ +my_load_defaults("my_init_test") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_BROKEN_LIBMYSQLCLIENT 1" >>confdefs.h +printf "%s\n" "#define HAVE_MY_LOAD_DEFAULTS 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext + ac_fn_c_check_func "$LINENO" "load_defaults" "ac_cv_func_load_defaults" +if test "x$ac_cv_func_load_defaults" = xyes +then : + printf "%s\n" "#define HAVE_LOAD_DEFAULTS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mysql_init" "ac_cv_func_mysql_init" +if test "x$ac_cv_func_mysql_init" = xyes +then : + printf "%s\n" "#define HAVE_MYSQL_INIT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mysql_options" "ac_cv_func_mysql_options" +if test "x$ac_cv_func_mysql_options" = xyes +then : + printf "%s\n" "#define HAVE_MYSQL_OPTIONS 1" >>confdefs.h + +fi + CPPFLAGS="${_cppflags}" LIBS="${_libs}" @@ -23730,25 +30263,258 @@ fi +## +# libpcap +## +NETSNMP_BUILD_PCAP_PROG_TRUE='#' +NETSNMP_BUILD_PCAP_PROG_FALSE='' +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap_create in -lpcap" >&5 +printf %s "checking for pcap_create in -lpcap... " >&6; } +if test ${ac_cv_lib_pcap_pcap_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpcap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char pcap_create (); +int +main (void) +{ +return pcap_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pcap_pcap_create=yes +else $as_nop + ac_cv_lib_pcap_pcap_create=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_create" >&5 +printf "%s\n" "$ac_cv_lib_pcap_pcap_create" >&6; } +if test "x$ac_cv_lib_pcap_pcap_create" = xyes +then : + + for ac_header in pcap/pcap.h +do : + ac_fn_c_check_header_compile "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" +if test "x$ac_cv_header_pcap_pcap_h" = xyes +then : + printf "%s\n" "#define HAVE_PCAP_PCAP_H 1" >>confdefs.h + + NETSNMP_BUILD_PCAP_PROG_TRUE='' + NETSNMP_BUILD_PCAP_PROG_FALSE='#' + +fi + +done + +fi + + + ## # Non-library checks ## # nlist -for ac_func in nlist nlist64 knlist -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +ac_fn_c_check_func "$LINENO" "nlist" "ac_cv_func_nlist" +if test "x$ac_cv_func_nlist" = xyes +then : + printf "%s\n" "#define HAVE_NLIST 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "nlist64" "ac_cv_func_nlist64" +if test "x$ac_cv_func_nlist64" = xyes +then : + printf "%s\n" "#define HAVE_NLIST64 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "knlist" "ac_cv_func_knlist" +if test "x$ac_cv_func_knlist" = xyes +then : + printf "%s\n" "#define HAVE_KNLIST 1" >>confdefs.h + +fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing endwin" >&5 +printf %s "checking for library containing endwin... " >&6; } +if test ${netsnmp_cv_func_endwin_LIBCURSES+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LIBCURSES" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char endwin (); +int +main (void) +{ +return endwin (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in curses ncurses ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char endwin (); +int +main (void) +{ +return endwin (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_endwin_LIBCURSES="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_endwin_LIBCURSES" >&5 +printf "%s\n" "$netsnmp_cv_func_endwin_LIBCURSES" >&6; } + if test "x${netsnmp_cv_func_endwin_LIBCURSES}" != "xno" ; then + if test "x${netsnmp_cv_func_endwin_LIBCURSES}" != "xnone required" ; then + LIBCURSES="${netsnmp_result} ${netsnmp_target_val}" + fi + + ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" +if test "x$ac_cv_header_curses_h" = xyes +then : + printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h + +fi + + ac_fn_c_check_header_compile "$LINENO" "ncurses/curses.h" "ac_cv_header_ncurses_curses_h" "$ac_includes_default" +if test "x$ac_cv_header_ncurses_curses_h" = xyes +then : + printf "%s\n" "#define HAVE_NCURSES_CURSES_H 1" >>confdefs.h + +fi + + HAVE_LIBCURSES=TRUE + else + HAVE_LIBCURSES=FALSE + fi + + + + +# libm for ceil +# + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing ceil" >&5 +printf %s "checking for library containing ceil... " >&6; } +if test ${netsnmp_cv_func_ceil_LNETSNMPLIBS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + netsnmp_func_search_save_LIBS="$LIBS" + netsnmp_target_val="$LNETSNMPLIBS" + netsnmp_temp_LIBS="${netsnmp_target_val} ${LIBS}" + netsnmp_result=no + LIBS="${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char ceil (); +int +main (void) +{ +return ceil (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result="none required" +else $as_nop + for netsnmp_cur_lib in m ; do + LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char ceil (); +int +main (void) +{ +return ceil (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + netsnmp_result=-l${netsnmp_cur_lib} + break fi -done +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${netsnmp_func_search_save_LIBS}" + netsnmp_cv_func_ceil_LNETSNMPLIBS="${netsnmp_result}" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_func_ceil_LNETSNMPLIBS" >&5 +printf "%s\n" "$netsnmp_cv_func_ceil_LNETSNMPLIBS" >&6; } + if test "x${netsnmp_cv_func_ceil_LNETSNMPLIBS}" != "xno" ; then + if test "x${netsnmp_cv_func_ceil_LNETSNMPLIBS}" != "xnone required" ; then + LNETSNMPLIBS="${netsnmp_result} ${netsnmp_target_val}" + fi + fi + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -23777,8 +30543,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -23808,15 +30574,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -23830,8 +30596,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -23895,16 +30661,16 @@ fi # Perl modules can only be installed from within the source tree # if test "x$install_perl" != "xno" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are in the source tree so we can install Perl modules" >&5 -$as_echo_n "checking if we are in the source tree so we can install Perl modules... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we are in the source tree so we can install Perl modules" >&5 +printf %s "checking if we are in the source tree so we can install Perl modules... " >&6; } if test "x$srcdir" = "x." -o -d perl/agent/default_store ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Yes" >&5 -$as_echo "Yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Yes" >&5 +printf "%s\n" "Yes" >&6; } else if test "x$install_perl" = "xtry" ; then install_perl="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: No" >&5 -$as_echo "No" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No" >&5 +printf "%s\n" "No" >&6; } else as_fn_error $? "Perl modules can not be built outside the source directory" "$LINENO" 5 fi @@ -23924,15 +30690,15 @@ if test "x$install_perl" != "xno" ; then # What compiler was used to build the perl binary? # - if test "xenable_perl_cc_checks" != "xno" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl cc" >&5 -$as_echo_n "checking for Perl cc... " >&6; } + if test "x$enable_perl_cc_checks" != "xno" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl cc" >&5 +printf %s "checking for Perl cc... " >&6; } - PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'` + PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/.]+).;\s*/$1/);'` if test "x$PERLCC" != "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLCC" >&5 -$as_echo "$PERLCC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERLCC" >&5 +printf "%s\n" "$PERLCC" >&6; } else if test "x$install_perl" = "xtry" ; then install_perl="no" @@ -23940,21 +30706,20 @@ $as_echo "$PERLCC" >&6; } as_fn_error $? "Could not determine the compiler that was used to build $myperl. Either set the environment variable PERLPROG to a different perl binary or use --without-perl-modules to build without Perl." "$LINENO" 5 fi fi - fi - # Was GCC used to build the perl binary? - # - if test "x$install_perl" != "xno" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PERLCC is a GNU C compiler" >&5 -$as_echo_n "checking whether $PERLCC is a GNU C compiler... " >&6; } - OLDCC=$CC - CC="$PERLCC" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Was GCC used to build the perl binary? + # + if test "x$install_perl" != "xno" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PERLCC is a GNU C compiler" >&5 +printf %s "checking whether $PERLCC is a GNU C compiler... " >&6; } + OLDCC=$CC + CC="$PERLCC" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ @@ -23965,37 +30730,39 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : perlcc_is_gnu=yes -else +else $as_nop perlcc_is_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perlcc_is_gnu" >&5 -$as_echo "$perlcc_is_gnu" >&6; } - CC=$OLDCC +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $perlcc_is_gnu" >&5 +printf "%s\n" "$perlcc_is_gnu" >&6; } + CC=$OLDCC - # Check compatability: Gnu Net-SNMP vs Non-Gnu perl - # - if test "x$GCC" = "xyes" -a "x$perlcc_is_gnu" = "xno" ; then - if test "x$install_perl" = "xtry" ; then - install_perl="no" - else - as_fn_error $? "This build is using a GNU C compiler ($CC) while Perl has been compiled with a non-GNU (or non-working) compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules)." "$LINENO" 5 - fi - fi - fi + # Check compatability: Gnu Net-SNMP vs Non-Gnu perl + # + if test "x$GCC" = "xyes" -a "x$perlcc_is_gnu" = "xno" ; then + if test "x$install_perl" = "xtry" ; then + install_perl="no" + else + as_fn_error $? "This build is using a GNU C compiler ($CC) while Perl has been compiled with a non-GNU (or non-working) compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules)." "$LINENO" 5 + fi + fi + fi - # Check compatability: Non-Gnu Net-SNMP vs Gnu perl - # - if test "x$install_perl" != "xno" ; then - if test "x$GCC" != "xyes" -a "x$perlcc_is_gnu" = "xyes" ; then - if test "x$install_perl" = "xtry" ; then - install_perl="no" - else - as_fn_error $? "This build is using a non-GNU C compiler ($CC) while Perl has been compiled with a GNU compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules)." "$LINENO" 5 - fi - fi + # Check compatability: Non-Gnu Net-SNMP vs Gnu perl + # + if test "x$install_perl" != "xno" ; then + if test "x$GCC" != "xyes" -a "x$perlcc_is_gnu" = "xyes" ; then + if test "x$install_perl" = "xtry" ; then + install_perl="no" + else + as_fn_error $? "This build is using a non-GNU C compiler ($CC) while Perl has been compiled with a GNU compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules)." "$LINENO" 5 + fi + fi + fi fi # Are we clear to proceed? @@ -24021,8 +30788,8 @@ case $target_os in if test "x$embed_perl" != "xno" ; then # Check for LARGEFILE support (Solaris) # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for problematic Perl cc flags on Suns" >&5 -$as_echo_n "checking for problematic Perl cc flags on Suns... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for problematic Perl cc flags on Suns" >&5 +printf %s "checking for problematic Perl cc flags on Suns... " >&6; } if $myperl -V:ccflags | $GREP LARGEFILE > /dev/null ; then if test "x$embed_perl" = "xtry" ; then embed_perl="no" @@ -24030,8 +30797,8 @@ $as_echo_n "checking for problematic Perl cc flags on Suns... " >&6; } as_fn_error $? "Perl was compiled with LARGEFILE support which will break Net-SNMP. Either set the environment variable PERLPROG to a different perl binary or use --disable-embedded-perl to turn off embedded Perl functionality altogether." "$LINENO" 5 fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none known" >&5 -$as_echo "none known" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none known" >&5 +printf "%s\n" "none known" >&6; } fi fi ;; @@ -24041,8 +30808,8 @@ $as_echo "none known" >&6; } # But for the time being, turn this off by default hpux*|darwin8*|darwin9*|darwin10*) if test "x$embed_perl" = "xtry" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Embedded perl defaulting to off" >&5 -$as_echo "$as_me: WARNING: Embedded perl defaulting to off" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Embedded perl defaulting to off" >&5 +printf "%s\n" "$as_me: WARNING: Embedded perl defaulting to off" >&2;} embed_perl="no" fi ;; @@ -24054,12 +30821,12 @@ esac # Compiler flags # if test "x$embed_perl" != "xno" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl CFLAGS" >&5 -$as_echo_n "checking for Perl CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl CFLAGS" >&5 +printf %s "checking for Perl CFLAGS... " >&6; } perlcflags=`$myperl -MExtUtils::Embed -e ccopts` if test "x$perlcflags" != "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perlcflags" >&5 -$as_echo "$perlcflags" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $perlcflags" >&5 +printf "%s\n" "$perlcflags" >&6; } CFLAGS="$CFLAGS $perlcflags" else if test "x$embed_perl" = "xtry" ; then @@ -24073,12 +30840,12 @@ fi # Linker flags # if test "x$embed_perl" != "xno" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl LDFLAGS" >&5 -$as_echo_n "checking for Perl LDFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl LDFLAGS" >&5 +printf %s "checking for Perl LDFLAGS... " >&6; } netsnmp_perlldopts=`$myperl -MExtUtils::Embed -e ldopts` if test "x$netsnmp_perlldopts" != "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_perlldopts" >&5 -$as_echo "$netsnmp_perlldopts" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_perlldopts" >&5 +printf "%s\n" "$netsnmp_perlldopts" >&6; } else if test "x$embed_perl" = "xtry" ; then embed_perl="no" @@ -24093,13 +30860,13 @@ $as_echo "$netsnmp_perlldopts" >&6; } PERLLDOPTS_FOR_LIBS="$netsnmp_perlldopts" # Perl ccdlflags (RPATH to libperl, hopefully) # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl CCDLFLAGS" >&5 -$as_echo_n "checking for Perl CCDLFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl CCDLFLAGS" >&5 +printf %s "checking for Perl CCDLFLAGS... " >&6; } netsnmp_perlccdlflags=`$myperl -V:ccdlflags | $myperl -n -e 'print $1 '"if (/^\s*ccdlflags='([^']+)';/);"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_perlccdlflags" >&5 -$as_echo "$netsnmp_perlccdlflags" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_perlccdlflags" >&5 +printf "%s\n" "$netsnmp_perlccdlflags" >&6; } PERLLDOPTS_FOR_APPS="$netsnmp_perlccdlflags" else # Otherwise embed the Perl library within the application @@ -24120,28 +30887,26 @@ if test "x$embed_perl" != "xno" ; then # OLDLIBS="$LIBS" LIBS="$LIBS $netsnmp_perlldopts" - for ac_func in eval_pv -do : - ac_fn_c_check_func "$LINENO" "eval_pv" "ac_cv_func_eval_pv" -if test "x$ac_cv_func_eval_pv" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EVAL_PV 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "eval_pv" "ac_cv_func_eval_pv" +if test "x$ac_cv_func_eval_pv" = xyes +then : + printf "%s\n" "#define HAVE_EVAL_PV 1" >>confdefs.h fi -done ac_fn_c_check_func "$LINENO" "perl_eval_pv" "ac_cv_func_perl_eval_pv" -if test "x$ac_cv_func_perl_eval_pv" = xyes; then : +if test "x$ac_cv_func_perl_eval_pv" = xyes +then : -$as_echo "#define HAVE_PERL_EVAL_PV_LC 1" >>confdefs.h +printf "%s\n" "#define HAVE_PERL_EVAL_PV_LC 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "Perl_eval_pv" "ac_cv_func_Perl_eval_pv" -if test "x$ac_cv_func_Perl_eval_pv" = xyes; then : +if test "x$ac_cv_func_Perl_eval_pv" = xyes +then : -$as_echo "#define HAVE_PERL_EVAL_PV_UC 1" >>confdefs.h +printf "%s\n" "#define HAVE_PERL_EVAL_PV_UC 1" >>confdefs.h fi @@ -24160,7 +30925,7 @@ fi # Activate Embedded Perl # -$as_echo "#define NETSNMP_EMBEDDED_PERL 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_EMBEDDED_PERL 1" >>confdefs.h OTHERAGENTLIBOBJS="snmp_perl.o" OTHERAGENTLIBLOBJS="snmp_perl.lo" @@ -24189,24 +30954,24 @@ fi # Results of Embedded Perl checks # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for potential embedded Perl support" >&5 -$as_echo_n "checking for potential embedded Perl support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for potential embedded Perl support" >&5 +printf %s "checking for potential embedded Perl support... " >&6; } if test "x$embed_perl" != "xyes" ; then cat >> configure-summary << EOF Embedded Perl support: disabled EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +printf "%s\n" "disabled" >&6; } else cat >> configure-summary << EOF Embedded Perl support: enabled EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 -$as_echo "enabled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +printf "%s\n" "enabled" >&6; } fi # Results of Perl Module checks @@ -24215,8 +30980,8 @@ PERLTARGS="" PERLINSTALLTARGS="" PERLUNINSTALLTARGS="" PERLFEATURES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can install the Perl modules" >&5 -$as_echo_n "checking if we can install the Perl modules... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can install the Perl modules" >&5 +printf %s "checking if we can install the Perl modules... " >&6; } if test "x$install_perl" = "xyes" ; then PERLTARGS="perlmodules" PERLINSTALLTARGS="perlinstall" @@ -24228,20 +30993,20 @@ if test "x$install_perl" = "xyes" ; then SNMP Perl modules: building -- embeddable EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes -- and embeddable" >&5 -$as_echo "yes -- and embeddable" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes -- and embeddable" >&5 +printf "%s\n" "yes -- and embeddable" >&6; } else cat >> configure-summary << EOF SNMP Perl modules: building -- not embeddable EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes -- not embeddable" >&5 -$as_echo "yes -- not embeddable" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes -- not embeddable" >&5 +printf "%s\n" "yes -- not embeddable" >&6; } fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } cat >> configure-summary << EOF SNMP Perl modules: disabled @@ -24271,8 +31036,8 @@ PYTHONINSTALLTARGS="" PYTHONUNINSTALLTARGS="" PYTHONCLEANTARGS="" PYTHONFEATURES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install the python bindings" >&5 -$as_echo_n "checking if we should install the python bindings... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should install the python bindings" >&5 +printf %s "checking if we should install the python bindings... " >&6; } if test "x$install_python" = "xyes" ; then PYTHONTARGS="pythonmodules" PYTHONINSTALLTARGS="pythoninstall" @@ -24284,16 +31049,16 @@ if test "x$install_python" = "xyes" ; then SNMP Python modules: building for $PYTHONPROG EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else cat >> configure-summary << EOF SNMP Python modules: disabled EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -24318,8 +31083,8 @@ fi # Check for PKCS11 # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for authentication support" >&5 -$as_echo_n "checking for authentication support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for authentication support" >&5 +printf %s "checking for authentication support... " >&6; } useopenssl=no usepkcs=no if test "x$ac_cv_lib_pkcs11_C_Initialize" != "xyes" -o "x$ac_cv_header_security_cryptoki_h" != "xyes"; then @@ -24334,7 +31099,10 @@ fi # Check for OpenSSL # -if test "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a "x$ac_cv_lib_eay32_EVP_md5" != "xyes" -o "x$ac_cv_header_openssl_hmac_h" != "xyes"; then +if test \( "x$ac_cv_func_EVP_md5" != "xyes" -a \ + "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a \ + "x$ac_cv_lib_eay32_EVP_md5" != "xyes" \) -o \ + "x$ac_cv_header_openssl_hmac_h" != "xyes"; then if test "x$askedopenssl" = "xyes"; then as_fn_error $? "Asked to use OpenSSL but I couldn't find it." "$LINENO" 5 fi @@ -24358,12 +31126,18 @@ if test "x$CRYPTO" = "xinternal" ; then encrmodes="disabled" fi -$as_echo "#define NETSNMP_USE_INTERNAL_CRYPTO 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_USE_INTERNAL_CRYPTO 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal Crypto Support" >&5 -$as_echo "Internal Crypto Support" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal Crypto Support" >&5 +printf "%s\n" "Internal Crypto Support" >&6; } elif test "x$useopenssl" != "xno" ; then authmodes="MD5 SHA1" + if test "x$ac_cv_func_EVP_sha224" = xyes; then + authmodes="$authmodes SHA224 SHA256" + fi + if test "x$ac_cv_func_EVP_sha384" = xyes; then + authmodes="$authmodes SHA384 SHA512" + fi if test "x$enable_privacy" != "xno" ; then if test "x$ac_cv_header_openssl_aes_h" = "xyes" ; then encrmodes="DES AES" @@ -24373,11 +31147,11 @@ elif test "x$useopenssl" != "xno" ; then else encrmodes="disabled" fi - $as_echo "#define NETSNMP_USE_OPENSSL 1" >>confdefs.h + printf "%s\n" "#define NETSNMP_USE_OPENSSL 1" >>confdefs.h LNETSNMPLIBS="$LNETSNMPLIBS $LIBCRYPTO" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL Support" >&5 -$as_echo "OpenSSL Support" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OpenSSL Support" >&5 +printf "%s\n" "OpenSSL Support" >&6; } elif test "x$usepkcs" != "xno" ; then authmodes="MD5 SHA1" if test "x$enable_privacy" != "xno" ; then @@ -24386,22 +31160,29 @@ elif test "x$usepkcs" != "xno" ; then encrmodes="disabled" fi -$as_echo "#define NETSNMP_USE_PKCS11 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_USE_PKCS11 1" >>confdefs.h LNETSNMPLIBS="$LNETSNMPLIBS $LIBPKCS11" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PKCS11 Support" >&5 -$as_echo "PKCS11 Support" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: PKCS11 Support" >&5 +printf "%s\n" "PKCS11 Support" >&6; } elif test "x$enable_md5" != "xno"; then authmodes="MD5" encrmodes="" - $as_echo "#define NETSNMP_USE_INTERNAL_MD5 1" >>confdefs.h + printf "%s\n" "#define NETSNMP_USE_INTERNAL_MD5 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal MD5 Support" >&5 -$as_echo "Internal MD5 Support" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal MD5 Support" >&5 +printf "%s\n" "Internal MD5 Support" >&6; } fi if test "x$enable_md5" = "xno"; then authmodes=`echo $authmodes | $SED 's/MD5 *//;'` fi +if test "x$ac_cv_func_AES_cfb128_encrypt" = xyes || + test "x$CRYPTO" = xinternal; then + encrmodes="$encrmodes AES128" + if test "x$aes_capable" = "xyes"; then + encrmodes="$encrmodes AES192 AES192C AES256 AES256C" + fi +fi @@ -24434,18 +31215,13 @@ fi # _libs=${LIBS} if ! test "x-$want_dnssec" = "x-no" ; then - for ac_header in validator/validator-config.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "validator/validator-config.h" "ac_cv_header_validator_validator_config_h" "$ac_includes_default" -if test "x$ac_cv_header_validator_validator_config_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VALIDATOR_VALIDATOR_CONFIG_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "validator/validator-config.h" "ac_cv_header_validator_validator_config_h" "$ac_includes_default" +if test "x$ac_cv_header_validator_validator_config_h" = xyes +then : + printf "%s\n" "#define HAVE_VALIDATOR_VALIDATOR_CONFIG_H 1" >>confdefs.h fi -done - if test "$ac_cv_header_validator_validator_config_h" != yes; then as_fn_error $? "Can't find validator.h" "$LINENO" 5 fi @@ -24455,11 +31231,12 @@ done as_fn_error $? "Couldn't find OpenSSL for local DNSSEC validation support." "$LINENO" 5 fi LIBS="$LIBS $LIBCRYPTO" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for query_send in -lsres" >&5 -$as_echo_n "checking for query_send in -lsres... " >&6; } -if ${ac_cv_lib_sres_query_send+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for query_send in -lsres" >&5 +printf %s "checking for query_send in -lsres... " >&6; } +if test ${ac_cv_lib_sres_query_send+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsres $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24468,47 +31245,45 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char query_send (); int -main () +main (void) { return query_send (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_sres_query_send=yes -else +else $as_nop ac_cv_lib_sres_query_send=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sres_query_send" >&5 -$as_echo "$ac_cv_lib_sres_query_send" >&6; } -if test "x$ac_cv_lib_sres_query_send" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSRES 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sres_query_send" >&5 +printf "%s\n" "$ac_cv_lib_sres_query_send" >&6; } +if test "x$ac_cv_lib_sres_query_send" = xyes +then : + printf "%s\n" "#define HAVE_LIBSRES 1" >>confdefs.h LIBS="-lsres $LIBS" -else +else $as_nop as_fn_error $? "Can't find libsres" "$LINENO" 5 fi VAL_LIBS="-lsres $LIBCRYPTO" LIBS="$LIBS -lsres" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for p_val_status in -lval" >&5 -$as_echo_n "checking for p_val_status in -lval... " >&6; } -if ${ac_cv_lib_val_p_val_status+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for p_val_status in -lval" >&5 +printf %s "checking for p_val_status in -lval... " >&6; } +if test ${ac_cv_lib_val_p_val_status+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lval $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24517,39 +31292,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char p_val_status (); int -main () +main (void) { return p_val_status (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_val_p_val_status=yes -else +else $as_nop ac_cv_lib_val_p_val_status=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_val_p_val_status" >&5 -$as_echo "$ac_cv_lib_val_p_val_status" >&6; } -if test "x$ac_cv_lib_val_p_val_status" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_val_p_val_status" >&5 +printf "%s\n" "$ac_cv_lib_val_p_val_status" >&6; } +if test "x$ac_cv_lib_val_p_val_status" = xyes +then : LIBS="$LIBS -lval" VAL_LIBS="$VAL_LIBS -lval" have_val_res_query=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lpthread" >&5 -$as_echo_n "checking for pthread_rwlock_init in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_rwlock_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lpthread" >&5 +printf %s "checking for pthread_rwlock_init in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_rwlock_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24558,43 +31333,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_rwlock_init (); int -main () +main (void) { return pthread_rwlock_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_rwlock_init=yes -else +else $as_nop ac_cv_lib_pthread_pthread_rwlock_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_init" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_rwlock_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_init" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_init" >&6; } +if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes +then : + printf "%s\n" "#define HAVE_LIBPTHREAD 1" >>confdefs.h LIBS="-lpthread $LIBS" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for p_val_status in -lval-threads" >&5 -$as_echo_n "checking for p_val_status in -lval-threads... " >&6; } -if ${ac_cv_lib_val_threads_p_val_status+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for p_val_status in -lval-threads" >&5 +printf %s "checking for p_val_status in -lval-threads... " >&6; } +if test ${ac_cv_lib_val_threads_p_val_status+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lval-threads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24603,35 +31376,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char p_val_status (); int -main () +main (void) { return p_val_status (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_val_threads_p_val_status=yes -else +else $as_nop ac_cv_lib_val_threads_p_val_status=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_val_threads_p_val_status" >&5 -$as_echo "$ac_cv_lib_val_threads_p_val_status" >&6; } -if test "x$ac_cv_lib_val_threads_p_val_status" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_val_threads_p_val_status" >&5 +printf "%s\n" "$ac_cv_lib_val_threads_p_val_status" >&6; } +if test "x$ac_cv_lib_val_threads_p_val_status" = xyes +then : have_val_res_query=yes LIBS="-lval-threads $LIBS" VAL_LIBS="-lval-threads -lpthread $VAL_LIBS" LIBVAL_SUFFIX="-threads" -else +else $as_nop as_fn_error $? "Can't find libval or libval-threads" "$LINENO" 5 fi @@ -24639,7 +31411,7 @@ fi fi -$as_echo "#define DNSSEC_LOCAL_VALIDATION 1" >>confdefs.h +printf "%s\n" "#define DNSSEC_LOCAL_VALIDATION 1" >>confdefs.h DNSSEC="enabled" else @@ -24670,61 +31442,104 @@ EOF # Checks for typedefs, structures, and compiler characteristics. ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : +if test "x$ac_cv_type_off_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF +printf "%s\n" "#define off_t long int" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : -else + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default +" +if test "x$ac_cv_type_pid_t" = xyes +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #if defined _WIN64 && !defined __CYGWIN__ + LLP64 + #endif + +int +main (void) +{ + + ; + return 0; +} -cat >>confdefs.h <<_ACEOF -#define pid_t int _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_pid_type='int' +else $as_nop + ac_pid_type='__int64' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + +# Obsolete code to be removed. +if test $ac_cv_header_sys_time_h = yes; then + +printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi +# End of obsolete code. + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include int -main () +main (void) { -if ((struct tm *) 0) -return 0; +int x __attribute__((deprecated)) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO" +then : + attr="__attribute__((deprecated))" +else $as_nop + attr="/**/" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +printf "%s\n" "#define NETSNMP_ATTRIBUTE_DEPRECATED ${attr}" >>confdefs.h + -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ +int x __attribute__((unused)) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + attr="__attribute__((unused))" +else $as_nop + attr="/**/" fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +printf "%s\n" "#define NETSNMP_ATTRIBUTE_UNUSED ${attr}" >>confdefs.h @@ -24732,313 +31547,274 @@ fi # More complex checks: ## -# Check for 'socklen_t' (HP-UX) +# Check for 'socklen_t', 'in_addr_t' and 'ssize_t'. # ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -#include -#if STDC_HEADERS +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#endif #include #include +#ifdef HAVE_SYS_TYPES_H +#include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif +#ifdef HAVE_NETINET_IN_H +#include +#endif " -if test "x$ac_cv_type_socklen_t" = xyes; then : +if test "x$ac_cv_type_socklen_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF +printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h fi - - - -# Check for 'in_addr_t' -# May be in (AIX) -# ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" " -#include -#if STDC_HEADERS +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#endif #include #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include #endif #ifdef HAVE_NETINET_IN_H #include #endif " -if test "x$ac_cv_type_in_addr_t" = xyes; then : +if test "x$ac_cv_type_in_addr_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_IN_ADDR_T 1 -_ACEOF +printf "%s\n" "#define HAVE_IN_ADDR_T 1" >>confdefs.h fi - - - -# Check for 'ssize_t' -# Not necessarily in (older MinGW) -# ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" " -#include -#if STDC_HEADERS +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#endif #include #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include #endif " -if test "x$ac_cv_type_ssize_t" = xyes; then : +if test "x$ac_cv_type_ssize_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_SSIZE_T 1 -_ACEOF +printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h fi -# -*- autoconf -*- -######################################### -## -# Miscellaneous checks -## -######################################### +if test "x$ac_cv_type_in_addr_t" != xyes; then -## -# Compilation characteristics -## +printf "%s\n" "#define in_addr_t unsigned long" >>confdefs.h -# Byte order -# -if test "$with_endianness" = "big"; then - ac_cv_c_bigendian=yes -elif test "$with_endianness" = "little" ; then - ac_cv_c_bigendian=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +# +# Determine the type of fd_set::fds_bits on Unix systems. +# - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +netsnmp_save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of fd_set::fds_bits" >&5 +printf %s "checking for the type of fd_set::fds_bits... " >&6; } +for type in __fd_mask __int32_t unknown; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include + +#include +#include +#include int -main () +main (void) { -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif + + fd_set set; + memset(&set, 0, sizeof(set)); + { + ${type} *fds_array = set.fds_bits; + return fds_array != NULL; + } ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO" +then : + break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${type}" >&5 +printf "%s\n" "${type}" >&6; } + +printf "%s\n" "#define NETSNMP_FD_MASK_TYPE ${type}" >>confdefs.h + + +CFLAGS=$netsnmp_save_CFLAGS + +# +# Check for the type of the fifth argument of select() +# + +netsnmp_save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror" + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of the fifth argument of select()" >&5 +printf %s "checking for the type of the fifth argument of select()... " >&6; } +arg_type="struct timeval" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include int -main () +main (void) { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO" +then : + +# The compiler supports -Werror. +for t in "struct timeval" "struct __ms_timeval"; do +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#else +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#endif +#include int -main () +main (void) { -#ifndef _BIG_ENDIAN - not big endian - #endif - +return select(0, NULL, NULL, NULL, ($t *)NULL) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no +if ac_fn_c_try_compile "$LINENO" +then : + arg_type=$t; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done + +else $as_nop + +: # The compiler does not support -Werror. + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${arg_type}" >&5 +printf "%s\n" "${arg_type}" >&6; } + +printf "%s\n" "#define NETSNMP_SELECT_TIMEVAL ${arg_type}" >>confdefs.h + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of the third argument of ioctlsocket()" >&5 +printf %s "checking for the type of the third argument of ioctlsocket()... " >&6; } +arg_type=unknown +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; int -main () +main (void) { -return use_ascii (foo) == use_ebcdic (foo); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO" +then : + +# The compiler supports -Werror. +for t in "unsigned int" "unsigned long"; do +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#else +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#endif +#include + int -main () +main (void) { - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - +return ioctlsocket(0, 0, ($t *)NULL) ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO" +then : + arg_type=$t; break fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done + +else $as_nop + +: # The compiler does not support -Werror. - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${arg_type}" >&5 +printf "%s\n" "${arg_type}" >&6; } -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_IOCTLSOCKET_ARG ${arg_type}" >>confdefs.h - ;; #( - *) - as_fn_error $? "Failed to figure out host endianness, please use --with-endianness to specify it." "$LINENO" 5 ;; - esac + +CFLAGS=$netsnmp_save_CFLAGS + +# -*- autoconf -*- +######################################### +## +# Miscellaneous checks +## +######################################### + +## +# Compilation characteristics +## cat >confcache <<\_ACEOF @@ -25068,8 +31844,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -25099,15 +31875,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -25121,8 +31897,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -25132,33 +31908,38 @@ rm -f confcache # Checks for library functions. ## ######################################### +# +# Portions of this file are copyrighted by: +# Copyright (c) 2016 VMware, Inc. All rights reserved. +# Use is subject to license terms specified in the COPYING file +# distributed with the Net-SNMP package. ## # Standard checks: ## ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -25166,52 +31947,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_working_alloca_h=yes -else +else $as_nop ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER # include # define alloca _alloca # else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif +# ifdef __cplusplus +extern "C" # endif +void *alloca (size_t); # endif #endif int -main () +main (void) { char *p = (char *) alloca (1); if (p) return 0; @@ -25219,20 +32000,22 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_alloca_works=yes -else +else $as_nop ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } +fi if test $ac_cv_func_alloca_works = yes; then -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -25242,84 +32025,43 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h - done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_c_stack_direction=0 -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_c_stack_direction=1 -else +else $as_nop ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -25327,21 +32069,20 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h fi # alloca() if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if ${ac_cv_prog_gcc_traditional+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +printf %s "checking whether $CC needs -traditional... " >&6; } +if test ${ac_cv_prog_gcc_traditional+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25349,449 +32090,1131 @@ else Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : + $EGREP "$ac_pattern" >/dev/null 2>&1 +then : ac_cv_prog_gcc_traditional=yes -else +else $as_nop ac_cv_prog_gcc_traditional=no fi -rm -f conftest* +rm -rf conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1 +then : + ac_cv_prog_gcc_traditional=yes +fi +rm -rf conftest* + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +printf %s "checking return type of signal handlers... " >&6; } +if test ${ac_cv_type_signal+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main (void) +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_type_signal=int +else $as_nop + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +printf "%s\n" "$ac_cv_type_signal" >&6; } + +printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h + + + +## +# Stand-alone function checks: +## +# Core: +ac_fn_c_check_func "$LINENO" "rand" "ac_cv_func_rand" +if test "x$ac_cv_func_rand" = xyes +then : + printf "%s\n" "#define HAVE_RAND 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" +if test "x$ac_cv_func_random" = xyes +then : + printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "srand" "ac_cv_func_srand" +if test "x$ac_cv_func_srand" = xyes +then : + printf "%s\n" "#define HAVE_SRAND 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom" +if test "x$ac_cv_func_srandom" = xyes +then : + printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "lrand48" "ac_cv_func_lrand48" +if test "x$ac_cv_func_lrand48" = xyes +then : + printf "%s\n" "#define HAVE_LRAND48 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "srand48" "ac_cv_func_srand48" +if test "x$ac_cv_func_srand48" = xyes +then : + printf "%s\n" "#define HAVE_SRAND48 1" >>confdefs.h + +fi + + +# Library: +ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" +if test "x$ac_cv_func_asprintf" = xyes +then : + printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir" +if test "x$ac_cv_func_closedir" = xyes +then : + printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fgetc_unlocked" "ac_cv_func_fgetc_unlocked" +if test "x$ac_cv_func_fgetc_unlocked" = xyes +then : + printf "%s\n" "#define HAVE_FGETC_UNLOCKED 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile" +if test "x$ac_cv_func_flockfile" = xyes +then : + printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile" +if test "x$ac_cv_func_funlockfile" = xyes +then : + printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getipnodebyname" "ac_cv_func_getipnodebyname" +if test "x$ac_cv_func_getipnodebyname" = xyes +then : + printf "%s\n" "#define HAVE_GETIPNODEBYNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes +then : + printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin" +if test "x$ac_cv_func_getlogin" = xyes +then : + printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" +if test "x$ac_cv_func_if_nametoindex" = xyes +then : + printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" +if test "x$ac_cv_func_opendir" = xyes +then : + printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" +if test "x$ac_cv_func_readdir" = xyes +then : + printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" +if test "x$ac_cv_func_regcomp" = xyes +then : + printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes +then : + printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" +if test "x$ac_cv_func_setitimer" = xyes +then : + printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" +if test "x$ac_cv_func_setsid" = xyes +then : + printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes +then : + printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes +then : + printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes +then : + printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes +then : + printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" +if test "x$ac_cv_func_sysconf" = xyes +then : + printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" +if test "x$ac_cv_func_times" = xyes +then : + printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" +if test "x$ac_cv_func_vsnprintf" = xyes +then : + printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h + +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _NSGetArgv()" >&5 +printf %s "checking for _NSGetArgv()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +return _NSGetArgv + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +printf "%s\n" "#define HAVE__NSGETARGV 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _NSGetExecutablePath()" >&5 +printf %s "checking for _NSGetExecutablePath()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +return _NSGetExecutablePath + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +printf "%s\n" "#define HAVE__NSGETEXECUTABLEPATH 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +# IPv4/IPv6 function checks. AC_CHECK_FUNC() can't find these on MinGW +# since these functions have the __cdecl calling convention on MinGW. +case x$with_socklib in + xwinsock2) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + closesocket(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_closesocket=yes + printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + gai_strerror(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_gai_strerror=yes + printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + getaddrinfo(NULL, NULL, NULL, NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_getaddrinfo=yes + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -Autoconf TCGETA +#include +int +main (void) +{ + gethostbyname(NULL); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_gethostbyname=yes + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - -if test "$cross_compiling" = yes -a "${ac_cv_func_memcmp_working+set}" != set -then - # Cross-compiling and ac_cv_func_memcmp_working has not been set - assume - # that memcmp() is available. - ac_cv_func_memcmp_working=yes -else - # Native compilation - test for the availability of memcmp(). - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 -$as_echo_n "checking for working memcmp... " >&6; } -if ${ac_cv_func_memcmp_working+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_memcmp_working=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int -main () +main (void) { + gethostbyaddr(NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_gethostbyaddr=yes + printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; - - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + gethostname(NULL, 0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_memcmp_working=yes -else - ac_cv_func_memcmp_working=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_func_gethostname=yes + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + ;; + + *) + # Do not use fork() nor any related function when using Windows sockets + # because Windows sockets are not compatible with fork(). + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" +if test "x$ac_cv_func_execv" = xyes +then : + printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h + fi +ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" +if test "x$ac_cv_func_fork" = xyes +then : + printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 -$as_echo "$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac +ac_fn_c_check_func "$LINENO" "signal" "ac_cv_func_signal" +if test "x$ac_cv_func_signal" = xyes +then : + printf "%s\n" "#define HAVE_SIGNAL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset" +if test "x$ac_cv_func_sigset" = xyes +then : + printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes +then : + printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn" +if test "x$ac_cv_func_posix_spawn" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include +fi +ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" +if test "x$ac_cv_func_waitpid" = xyes +then : + printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_func "$LINENO" "closesocket" "ac_cv_func_closesocket" +if test "x$ac_cv_func_closesocket" = xyes +then : + printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } +ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" +if test "x$ac_cv_func_gai_strerror" = xyes +then : + printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "gethostbyname2" "ac_cv_func_gethostbyname2" +if test "x$ac_cv_func_gethostbyname2" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYNAME2 1" >>confdefs.h -## -# Stand-alone function checks: -## -# Core: -for ac_func in lrand48 rand random signal sigset -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" +if test "x$ac_cv_func_gethostname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "gethostbyaddr" "ac_cv_func_gethostbyaddr" +if test "x$ac_cv_func_gethostbyaddr" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" +if test "x$ac_cv_func_inet_ntop" = xyes +then : + printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h -# Library: -for ac_func in closedir fgetc_unlocked flockfile fork funlockfile getipnodebyname gettimeofday if_nametoindex mkstemp opendir readdir regcomp setenv setitimer setlocale setsid snprintf strcasestr strdup strerror strncasecmp sysconf times vsnprintf -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" +if test "x$ac_cv_func_inet_pton" = xyes +then : + printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h fi -done + ;; +esac -# IPv4/IPv6 function checks. AC_CHECK_FUNC() can't find these on MinGW -# since these functions have the __cdecl calling convention on MinGW. -case x$target_os in - xmingw*) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Check for MSVC functions. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _beginthreadex()" >&5 +printf %s "checking for _beginthreadex()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#include + int -main () +main (void) { - gai_strerror(0); + _beginthreadex(NULL, 0, NULL, NULL, 0, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_gai_strerror=yes - $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _cputs()" >&5 +printf %s "checking for _cputs()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int -main () +main (void) { - getaddrinfo(NULL, NULL, NULL, NULL); + _cputs(0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_getaddrinfo=yes - $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE__CPUTS 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _get_osfhandle()" >&5 +printf %s "checking for _get_osfhandle()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int -main () +main (void) { - gethostbyname(NULL); + _get_osfhandle(0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_gethostbyname=yes - $as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE__GET_OSFHANDLE 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _getch()" >&5 +printf %s "checking for _getch()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int -main () +main (void) { - gethostbyaddr(NULL); + return _getch(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_gethostaddr=yes - $as_echo "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE__GETCH 1" >>confdefs.h + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _open_osfhandle()" >&5 +printf %s "checking for _open_osfhandle()... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#include + int -main () +main (void) { - gethostname(NULL, 0); + _open_osfhandle(NULL, 0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_gethostname=yes - $as_echo "#define HAVE_GETHOSTNAME 1" >>confdefs.h +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE__OPEN_OSFHANDLE 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ;; - *) - for ac_func in gai_strerror getaddrinfo gethostbyname gethostbyname2 gethostname gethostbyaddr -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + + + +ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" +if test "x$ac_cv_func_getopt" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" getopt.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getopt.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" +if test "x$ac_cv_func_strlcat" = xyes +then : + printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strlcat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" +if test "x$ac_cv_func_strlcpy" = xyes +then : + printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strlcpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" +if test "x$ac_cv_func_strtok_r" = xyes +then : + printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtok_r.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes +then : + printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtol.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtol.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes +then : + printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; +esac + +fi +ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes +then : + printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h + +else $as_nop + case " $LIBOBJS " in + *" strtoull.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" + ;; +esac + +fi + + +# Agent: +ac_fn_c_check_func "$LINENO" "cgetnext" "ac_cv_func_cgetnext" +if test "x$ac_cv_func_cgetnext" = xyes +then : + printf "%s\n" "#define HAVE_CGETNEXT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown" +if test "x$ac_cv_func_chown" = xyes +then : + printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "endfsent" "ac_cv_func_endfsent" +if test "x$ac_cv_func_endfsent" = xyes +then : + printf "%s\n" "#define HAVE_ENDFSENT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "forkall" "ac_cv_func_forkall" +if test "x$ac_cv_func_forkall" = xyes +then : + printf "%s\n" "#define HAVE_FORKALL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync" +if test "x$ac_cv_func_fsync" = xyes +then : + printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" +if test "x$ac_cv_func_gai_strerror" = xyes +then : + printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getfsent" "ac_cv_func_getfsent" +if test "x$ac_cv_func_getfsent" = xyes +then : + printf "%s\n" "#define HAVE_GETFSENT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getgrnam" "ac_cv_func_getgrnam" +if test "x$ac_cv_func_getgrnam" = xyes +then : + printf "%s\n" "#define HAVE_GETGRNAM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" +if test "x$ac_cv_func_gethostname" = xyes +then : + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" +if test "x$ac_cv_func_getloadavg" = xyes +then : + printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" +if test "x$ac_cv_func_getmntent" = xyes +then : + printf "%s\n" "#define HAVE_GETMNTENT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getmntinfo" "ac_cv_func_getmntinfo" +if test "x$ac_cv_func_getmntinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETMNTINFO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid" +if test "x$ac_cv_func_getpid" = xyes +then : + printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" +if test "x$ac_cv_func_getpwnam" = xyes +then : + printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt" +if test "x$ac_cv_func_hasmntopt" = xyes +then : + printf "%s\n" "#define HAVE_HASMNTOPT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" +if test "x$ac_cv_func_initgroups" = xyes +then : + printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex" +if test "x$ac_cv_func_if_nameindex" = xyes +then : + printf "%s\n" "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "if_indextoname" "ac_cv_func_if_indextoname" +if test "x$ac_cv_func_if_indextoname" = xyes +then : + printf "%s\n" "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" +if test "x$ac_cv_func_if_nametoindex" = xyes +then : + printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" +if test "x$ac_cv_func_localtime_r" = xyes +then : + printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime" +if test "x$ac_cv_func_mktime" = xyes +then : + printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" +if test "x$ac_cv_func_poll" = xyes +then : + printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" -if test "x$ac_cv_func_getopt" = xyes; then : - $as_echo "#define HAVE_GETOPT 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" +if test "x$ac_cv_func_regcomp" = xyes +then : + printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h -else - case " $LIBOBJS " in - *" getopt.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getopt.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "setfsent" "ac_cv_func_setfsent" +if test "x$ac_cv_func_setfsent" = xyes +then : + printf "%s\n" "#define HAVE_SETFSENT 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid" +if test "x$ac_cv_func_setgid" = xyes +then : + printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = xyes; then : - $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups" +if test "x$ac_cv_func_setgroups" = xyes +then : + printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h -else - case " $LIBOBJS " in - *" inet_ntop.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "setmntent" "ac_cv_func_setmntent" +if test "x$ac_cv_func_setmntent" = xyes +then : + printf "%s\n" "#define HAVE_SETMNTENT 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid" +if test "x$ac_cv_func_setuid" = xyes +then : + printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" -if test "x$ac_cv_func_inet_pton" = xyes; then : - $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" +if test "x$ac_cv_func_sigaction" = xyes +then : + printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h -else - case " $LIBOBJS " in - *" inet_pton.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock" +if test "x$ac_cv_func_sigblock" = xyes +then : + printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes +then : + printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = xyes; then : - $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "statfs" "ac_cv_func_statfs" +if test "x$ac_cv_func_statfs" = xyes +then : + printf "%s\n" "#define HAVE_STATFS 1" >>confdefs.h -else - case " $LIBOBJS " in - *" strlcat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" +if test "x$ac_cv_func_statvfs" = xyes +then : + printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "stime" "ac_cv_func_stime" +if test "x$ac_cv_func_stime" = xyes +then : + printf "%s\n" "#define HAVE_STIME 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes; then : - $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h -else - case " $LIBOBJS " in - *" strlcpy.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" +if test "x$ac_cv_func_system" = xyes +then : + printf "%s\n" "#define HAVE_SYSTEM 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep" +if test "x$ac_cv_func_usleep" = xyes +then : + printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" -if test "x$ac_cv_func_strtok_r" = xyes; then : - $as_echo "#define HAVE_STRTOK_R 1" >>confdefs.h +fi -else - case " $LIBOBJS " in - *" strtok_r.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" - ;; -esac + +# Agent, Darwin (Apple): +ac_fn_c_check_func "$LINENO" "vm_region" "ac_cv_func_vm_region" +if test "x$ac_cv_func_vm_region" = xyes +then : + printf "%s\n" "#define HAVE_VM_REGION 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "vm_region_64" "ac_cv_func_vm_region_64" +if test "x$ac_cv_func_vm_region_64" = xyes +then : + printf "%s\n" "#define HAVE_VM_REGION_64 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = xyes; then : - $as_echo "#define HAVE_STRTOL 1" >>confdefs.h +fi -else - case " $LIBOBJS " in - *" strtol.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtol.$ac_objext" - ;; -esac + +# Apps: +ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" +if test "x$ac_cv_func_getdtablesize" = xyes +then : + printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "getgrnam" "ac_cv_func_getgrnam" +if test "x$ac_cv_func_getgrnam" = xyes +then : + printf "%s\n" "#define HAVE_GETGRNAM 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" -if test "x$ac_cv_func_strtoul" = xyes; then : - $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid" +if test "x$ac_cv_func_getpid" = xyes +then : + printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h -else - case " $LIBOBJS " in - *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" +if test "x$ac_cv_func_getpwnam" = xyes +then : + printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid" +if test "x$ac_cv_func_setgid" = xyes +then : + printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" -if test "x$ac_cv_func_strtoull" = xyes; then : - $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups" +if test "x$ac_cv_func_setgroups" = xyes +then : + printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h -else - case " $LIBOBJS " in - *" strtoull.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" - ;; -esac +fi +ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid" +if test "x$ac_cv_func_setuid" = xyes +then : + printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr" +if test "x$ac_cv_func_tcgetattr" = xyes +then : + printf "%s\n" "#define HAVE_TCGETATTR 1" >>confdefs.h +fi -# Agent: -for ac_func in cgetnext chown execv gai_strerror getgrnam gethostname getloadavg getpid getpwnam hasmntopt initgroups if_nameindex if_indextoname if_nametoindex localtime_r mkstemp mktime poll regcomp setgid setgroups setmntent setuid sigaction sigblock sighold sigprocmask statfs statvfs stime strncasecmp system uname usleep -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +# Not-Used: +ac_fn_c_check_func "$LINENO" "if_freenameindex" "ac_cv_func_if_freenameindex" +if test "x$ac_cv_func_if_freenameindex" = xyes +then : + printf "%s\n" "#define HAVE_IF_FREENAMEINDEX 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes +then : + printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "lseek64" "ac_cv_func_lseek64" +if test "x$ac_cv_func_lseek64" = xyes +then : + printf "%s\n" "#define HAVE_LSEEK64 1" >>confdefs.h -# Apps: -for ac_func in getdtablesize getgrnam getpid getpwnam setgid setgroups setuid tcgetattr -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "pread64" "ac_cv_func_pread64" +if test "x$ac_cv_func_pread64" = xyes +then : + printf "%s\n" "#define HAVE_PREAD64 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" +if test "x$ac_cv_func_select" = xyes +then : + printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "sigalrm" "ac_cv_func_sigalrm" +if test "x$ac_cv_func_sigalrm" = xyes +then : + printf "%s\n" "#define HAVE_SIGALRM 1" >>confdefs.h -# Not-Used: -for ac_func in if_freenameindex getpagesize lseek64 pread64 select sigalrm socket -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes +then : + printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h fi -done @@ -25805,30 +33228,28 @@ done if test "x$with_rpm" != "xno"; then OLDLIBS=$LIBS LIBS=$LMIBLIBS - for ac_func in rpmGetPath -do : - ac_fn_c_check_func "$LINENO" "rpmGetPath" "ac_cv_func_rpmGetPath" -if test "x$ac_cv_func_rpmGetPath" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RPMGETPATH 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "rpmGetPath" "ac_cv_func_rpmGetPath" +if test "x$ac_cv_func_rpmGetPath" = xyes +then : + printf "%s\n" "#define HAVE_RPMGETPATH 1" >>confdefs.h fi -done LIBS=$OLDLIBS fi # statfs( char *, struct fs_data* ) (Ultrix) # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 -$as_echo_n "checking for two-argument statfs with struct fs_data (Ultrix)... " >&6; } -if ${fu_cv_sys_stat_fs_data+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +printf %s "checking for two-argument statfs with struct fs_data (Ultrix)... " >&6; } +if test ${fu_cv_sys_stat_fs_data+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : fu_cv_sys_stat_fs_data=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25842,17 +33263,25 @@ else #ifdef HAVE_SYS_FS_TYPES_H #include #endif -main () +#ifdef HAVE_SYS_STATFS_H +#include +#endif +#ifdef HAVE_SYS_STATVFS_H +#include +#endif + +int main(void) { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ -exit (statfs (".", &fsd) != 1); +return statfs (".", &fsd) != 1; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : fu_cv_sys_stat_fs_data=yes -else +else $as_nop fu_cv_sys_stat_fs_data=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -25861,11 +33290,11 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_fs_data" >&5 -$as_echo "$fu_cv_sys_stat_fs_data" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_fs_data" >&5 +printf "%s\n" "$fu_cv_sys_stat_fs_data" >&6; } if test $fu_cv_sys_stat_fs_data = yes; then -$as_echo "#define STAT_STATFS_FS_DATA 1" >>confdefs.h +printf "%s\n" "#define STAT_STATFS_FS_DATA 1" >>confdefs.h fi @@ -25877,64 +33306,66 @@ fi # How to get the name of the current function # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the name of the current function" >&5 -$as_echo_n "checking how to get the name of the current function... " >&6; } -if ${netsnmp_cv__func__name+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the name of the current function" >&5 +printf %s "checking how to get the name of the current function... " >&6; } +if test ${netsnmp_cv__func__name+y} +then : + printf %s "(cached) " >&6 +else $as_nop netsnmp_cv__func__name=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { const char* cp = __func__; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : netsnmp_cv__func__name=__func__ fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$netsnmp_cv__func__name" = no ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { const char* cp = __FUNCTION__; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : netsnmp_cv__func__name=__FUNCTION__ fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv__func__name" >&5 -$as_echo "$netsnmp_cv__func__name" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv__func__name" >&5 +printf "%s\n" "$netsnmp_cv__func__name" >&6; } if test "$netsnmp_cv__func__name" != no; then -cat >>confdefs.h <<_ACEOF -#define NETSNMP_FUNCTION $netsnmp_cv__func__name -_ACEOF +printf "%s\n" "#define NETSNMP_FUNCTION $netsnmp_cv__func__name" >>confdefs.h fi # Whether static inline functions are broken (SCO Unixware) # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether static inline functions are broken (Unixware)" >&5 -$as_echo_n "checking whether static inline functions are broken (Unixware)... " >&6; } -if ${netsnmp_cv_c_broken_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether static inline functions are broken (Unixware)" >&5 +printf %s "checking whether static inline functions are broken (Unixware)... " >&6; } +if test ${netsnmp_cv_broken_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25946,16 +33377,8 @@ inline int main_inline_function( void ) { } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_broken_inline=no -else - netsnmp_cv_broken_inline=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_c_broken_inline" >&5 -$as_echo "$netsnmp_cv_c_broken_inline" >&6; } - +if ac_fn_c_try_compile "$LINENO" +then : # Yes - static inline functions are broken (Solaris 2.x) # @@ -25964,316 +33387,141 @@ case "$target_os" in netsnmp_cv_broken_inline=yes ;; *) + netsnmp_cv_broken_inline=no ;; esac +else $as_nop -if test "$netsnmp_cv_broken_inline" = yes ; then - -$as_echo "#define NETSNMP_BROKEN_INLINE 1" >>confdefs.h - -fi - - -## -# Mis-placed (non-function) checks: -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIOCGIFADDR in sys/ioctl.h" >&5 -$as_echo_n "checking for SIOCGIFADDR in sys/ioctl.h... " >&6; } -if ${netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_IOCTL_H -#include -#endif -#ifndef SIOCGIFADDR -No SIOCGIFADDR found here. -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR=yes -else - netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR" >&5 -$as_echo "$netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR" >&6; } -if test $netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR = yes; then - -$as_echo "#define SYS_IOCTL_H_HAS_SIOCGIFADDR 1" >>confdefs.h - -fi - -## -# Check how to print a size_t variable -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the underlying type of a size_t" >&5 -$as_echo_n "checking the underlying type of a size_t... " >&6; } -if ${netsnmp_cv_size_t_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if [ x$netsnmp_cv_size_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned int variable; -extern size_t variable; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_size_t_type="int" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_size_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned long variable; -extern size_t variable; -int -main () -{ + netsnmp_cv_broken_inline=yes - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_size_t_type="long" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_size_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned long long variable; -extern size_t variable; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_size_t_type="long long" +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_size_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned short variable; -extern size_t variable; -int -main () -{ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_broken_inline" >&5 +printf "%s\n" "$netsnmp_cv_broken_inline" >&6; } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_size_t_type="short" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_size_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned char variable; -extern size_t variable; -int -main () -{ +if test "$netsnmp_cv_broken_inline" = yes ; then - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_size_t_type="char" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi +printf "%s\n" "#define NETSNMP_BROKEN_INLINE 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_size_t_type" >&5 -$as_echo "$netsnmp_cv_size_t_type" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to printf a size_t" >&5 -$as_echo_n "checking how to printf a size_t... " >&6; } -case "$netsnmp_cv_size_t_type" in - char|short|int) netsnmp_PRIz="" ;; - long) netsnmp_PRIz="l" ;; - "long long") netsnmp_PRIz="ll" ;; - *) as_fn_error $? "underlying type of size_t not known" "$LINENO" 5 ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_PRIz" >&5 -$as_echo "$netsnmp_PRIz" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NETSNMP_PRIz "$netsnmp_PRIz" -_ACEOF ## -# Check how to print a uint32_t variable +# Mis-placed (non-function) checks: ## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the underlying type of an uint32_t" >&5 -$as_echo_n "checking the underlying type of an uint32_t... " >&6; } -if ${netsnmp_cv_uint32_t_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if [ x$netsnmp_cv_uint32_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned char variable; -extern uint32_t variable; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_uint32_t_type="char" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_uint32_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIOCGIFADDR in sys/ioctl.h" >&5 +printf %s "checking for SIOCGIFADDR in sys/ioctl.h... " >&6; } +if test ${netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -extern unsigned short variable; -extern uint32_t variable; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_uint32_t_type="short" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_uint32_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned int variable; -extern uint32_t variable; +#ifdef HAVE_SYS_IOCTL_H +#include +#endif +#ifndef SIOCGIFADDR +No SIOCGIFADDR found here. +#endif + int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_uint32_t_type="int" +if ac_fn_c_try_compile "$LINENO" +then : + netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR=yes +else $as_nop + netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_uint32_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -extern unsigned long variable; -extern uint32_t variable; -int -main () -{ +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR" >&5 +printf "%s\n" "$netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR" >&6; } +if test $netsnmp_cv_sys_ioctl_h_has_SIOCGIFADDR = yes; then + +printf "%s\n" "#define SYS_IOCTL_H_HAS_SIOCGIFADDR 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_uint32_t_type="long" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if [ x$netsnmp_cv_uint32_t_type = x ] ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +## +# Check how to print a size_t variable +## + +case x${host_cpu}-${host_vendor}-${host_os} in + x*mingw*) + # MinGW or MinGW-w64. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the underlying type of size_t" >&5 +printf %s "checking the underlying type of size_t... " >&6; } +if test ${netsnmp_cv_size_t_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop + for TYPE in int long "long long" short char; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -extern unsigned long long variable; -extern uint32_t variable; + + $ac_includes_default + extern unsigned $TYPE variable; + extern size_t variable; + int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - netsnmp_cv_uint32_t_type="long long" +if ac_fn_c_try_compile "$LINENO" +then : + netsnmp_cv_size_t_type="$TYPE" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test "x$netsnmp_cv_size_t_type" != x; then break; fi + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_uint32_t_type" >&5 -$as_echo "$netsnmp_cv_uint32_t_type" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to printf a uint32_t" >&5 -$as_echo_n "checking how to printf a uint32_t... " >&6; } -case "$netsnmp_cv_uint32_t_type" in - char|short|int) netsnmp_PRI32="" ;; - long) netsnmp_PRI32="l" ;; - "long long") netsnmp_PRI32="ll" ;; - *) as_fn_error $? "underlying type of uint32_t not known" "$LINENO" 5 ;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_cv_size_t_type" >&5 +printf "%s\n" "$netsnmp_cv_size_t_type" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to printf a size_t" >&5 +printf %s "checking how to printf a size_t... " >&6; } + case "$netsnmp_cv_size_t_type" in + char|short|int) + netsnmp_PRIz="";; + long) + netsnmp_PRIz="l";; + "long long") + netsnmp_PRIz="I64";; + *) + as_fn_error $? "underlying type of size_t not known" "$LINENO" 5;; + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_PRIz" >&5 +printf "%s\n" "$netsnmp_PRIz" >&6; };; + *) + # Unix or Cygwin. + netsnmp_PRIz="z";; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_PRI32" >&5 -$as_echo "$netsnmp_PRI32" >&6; } -cat >>confdefs.h <<_ACEOF -#define NETSNMP_PRI32 "$netsnmp_PRI32" -_ACEOF +printf "%s\n" "#define NETSNMP_PRIz \"$netsnmp_PRIz\"" >>confdefs.h # check to see if the openssl is good enough for DTLS # (BIO_dgram_get_peer is a macro, not a true function) if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then - if ${netsnmp_cv_bio_dgram_get_peer+:} false; then : - $as_echo_n "(cached) " >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_dgram_get_peer" >&5 -$as_echo_n "checking for BIO_dgram_get_peer... " >&6; } + if test ${netsnmp_cv_bio_dgram_get_peer+y} +then : + printf %s "(cached) " >&6 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BIO_dgram_get_peer" >&5 +printf %s "checking for BIO_dgram_get_peer... " >&6; } oldLIBS="$LIBS" LIBS="$LIBS -lcrypto" @@ -26281,25 +33529,26 @@ $as_echo_n "checking for BIO_dgram_get_peer... " >&6; } /* end confdefs.h. */ #include int -main () +main (void) { BIO_dgram_get_peer(NULL, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -else +else $as_nop as_fn_error $? "DTLS support requires a newer version of OpenSSL" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$oldLIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi @@ -26333,19 +33582,18 @@ ac_fn_c_check_member "$LINENO" "struct arphd" "at_next" "ac_cv_member_struct_arp #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IF_ETHER_H +#ifdef HAVE_NETINET_IF_ETHER_H #include #endif " -if test "x$ac_cv_member_struct_arphd_at_next" = xyes; then : +if test "x$ac_cv_member_struct_arphd_at_next" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_ARPHD_AT_NEXT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_ARPHD_AT_NEXT 1" >>confdefs.h fi @@ -26362,11 +33610,10 @@ if test "x$ac_cv_header_openssl_des_h" = "xyes" ; then #endif " -if test "x$ac_cv_member_struct_des_ks_struct_weak_key" = xyes; then : +if test "x$ac_cv_member_struct_des_ks_struct_weak_key" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY 1" >>confdefs.h fi @@ -26380,16 +33627,15 @@ fi ac_fn_c_check_member "$LINENO" "struct dirent" "d_type" "ac_cv_member_struct_dirent_d_type" " $ac_includes_default -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #endif " -if test "x$ac_cv_member_struct_dirent_d_type" = xyes; then : +if test "x$ac_cv_member_struct_dirent_d_type" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_DIRENT_D_TYPE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h fi @@ -26406,11 +33652,10 @@ ac_fn_c_check_member "$LINENO" "struct ethtool_cmd" "speed_hi" "ac_cv_member_str #endif " -if test "x$ac_cv_member_struct_ethtool_cmd_speed_hi" = xyes; then : +if test "x$ac_cv_member_struct_ethtool_cmd_speed_hi" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI 1" >>confdefs.h fi @@ -26423,190 +33668,180 @@ fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_cantfrag" "ac_cv_member_struct_ipstat_ips_cantfrag" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_cantfrag" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_cantfrag" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_CANTFRAG 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_CANTFRAG 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_delivered" "ac_cv_member_struct_ipstat_ips_delivered" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_delivered" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_delivered" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_DELIVERED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_DELIVERED 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_fragdropped" "ac_cv_member_struct_ipstat_ips_fragdropped" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_fragdropped" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_fragdropped" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_fragmented" "ac_cv_member_struct_ipstat_ips_fragmented" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_fragmented" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_fragmented" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_FRAGMENTED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_FRAGMENTED 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_localout" "ac_cv_member_struct_ipstat_ips_localout" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_localout" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_localout" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_LOCALOUT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_LOCALOUT 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_noproto" "ac_cv_member_struct_ipstat_ips_noproto" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_noproto" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_noproto" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_NOPROTO 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_NOPROTO 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_noroute" "ac_cv_member_struct_ipstat_ips_noroute" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_noroute" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_noroute" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_NOROUTE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_NOROUTE 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_odropped" "ac_cv_member_struct_ipstat_ips_odropped" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_odropped" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_odropped" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_ODROPPED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_ODROPPED 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_ofragments" "ac_cv_member_struct_ipstat_ips_ofragments" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_ofragments" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_ofragments" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_reassembled" "ac_cv_member_struct_ipstat_ips_reassembled" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_reassembled" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_reassembled" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED 1" >>confdefs.h fi @@ -26617,19 +33852,18 @@ fi ac_fn_c_check_member "$LINENO" "struct ip6stat" "ip6s_exthdrtoolong " "ac_cv_member_struct_ip6stat_ip6s_exthdrtoolong_" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET6_IP6_VAR_H +#ifdef HAVE_NETINET6_IP6_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ip6stat_ip6s_exthdrtoolong_" = xyes; then : +if test "x$ac_cv_member_struct_ip6stat_ip6s_exthdrtoolong_" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_ 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_ 1" >>confdefs.h fi @@ -26640,38 +33874,36 @@ fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_cantforward" "ac_cv_member_struct_ipstat_ips_cantforward" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_cantforward" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_cantforward" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ipstat" "ips_fragtimeout" "ac_cv_member_struct_ipstat_ips_fragtimeout" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_ipstat_ips_fragtimeout" = xyes; then : +if test "x$ac_cv_member_struct_ipstat_ips_fragtimeout" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT 1" >>confdefs.h fi @@ -26683,57 +33915,54 @@ fi ac_fn_c_check_member "$LINENO" "struct mbstat" "m_clusters" "ac_cv_member_struct_mbstat_m_clusters" " $ac_includes_default -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif " -if test "x$ac_cv_member_struct_mbstat_m_clusters" = xyes; then : +if test "x$ac_cv_member_struct_mbstat_m_clusters" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MBSTAT_M_CLUSTERS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_MBSTAT_M_CLUSTERS 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct mbstat" "m_clfree" "ac_cv_member_struct_mbstat_m_clfree" " $ac_includes_default -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif " -if test "x$ac_cv_member_struct_mbstat_m_clfree" = xyes; then : +if test "x$ac_cv_member_struct_mbstat_m_clfree" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MBSTAT_M_CLFREE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_MBSTAT_M_CLFREE 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct mbstat" "m_mbufs" "ac_cv_member_struct_mbstat_m_mbufs" " $ac_includes_default -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif " -if test "x$ac_cv_member_struct_mbstat_m_mbufs" = xyes; then : +if test "x$ac_cv_member_struct_mbstat_m_mbufs" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MBSTAT_M_MBUFS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_MBSTAT_M_MBUFS 1" >>confdefs.h fi @@ -26744,14 +33973,14 @@ fi ac_fn_c_check_member "$LINENO" "struct uvmexp" "pgswapin" "ac_cv_member_struct_uvmexp_pgswapin" " $ac_includes_default +#include #include " -if test "x$ac_cv_member_struct_uvmexp_pgswapin" = xyes; then : +if test "x$ac_cv_member_struct_uvmexp_pgswapin" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UVMEXP_PGSWAPIN 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UVMEXP_PGSWAPIN 1" >>confdefs.h fi @@ -26762,32 +33991,30 @@ fi ac_fn_c_check_member "$LINENO" "struct nlist" "n_value" "ac_cv_member_struct_nlist_n_value" " $ac_includes_default -#if HAVE_NLIST_H +#ifdef HAVE_NLIST_H #include #endif " -if test "x$ac_cv_member_struct_nlist_n_value" = xyes; then : +if test "x$ac_cv_member_struct_nlist_n_value" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_NLIST_N_VALUE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_NLIST_N_VALUE 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct nlist64" "n_value" "ac_cv_member_struct_nlist64_n_value" " $ac_includes_default -#if HAVE_NLIST_H +#ifdef HAVE_NLIST_H #include #endif " -if test "x$ac_cv_member_struct_nlist64_n_value" = xyes; then : +if test "x$ac_cv_member_struct_nlist64_n_value" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_NLIST64_N_VALUE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_NLIST64_N_VALUE 1" >>confdefs.h fi @@ -26799,19 +34026,13 @@ fi ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" " $ac_includes_default -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_SIGNAL_H -#include -#endif +#include " -if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then : +if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h fi @@ -26836,11 +34057,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_s #endif " -if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : +if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h fi @@ -26860,11 +34080,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_union.sa_generic.sa_family2 #endif " -if test "x$ac_cv_member_struct_sockaddr_sa_union_sa_generic_sa_family2" = xyes; then : +if test "x$ac_cv_member_struct_sockaddr_sa_union_sa_generic_sa_family2" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 1" >>confdefs.h fi @@ -26884,11 +34103,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_memb #endif " -if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h fi @@ -26908,11 +34126,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_me #endif " -if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then : +if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1" >>confdefs.h fi @@ -26941,11 +34158,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_memb #endif " -if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then : +if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1" >>confdefs.h fi @@ -26958,25 +34174,27 @@ fi # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of sockaddr_un.sun_path" >&5 -$as_echo_n "checking size of sockaddr_un.sun_path... " >&6; } -if ${ac_cv_sizeof_sockaddr_un_sun_path+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of sockaddr_un.sun_path" >&5 +printf %s "checking size of sockaddr_un.sun_path... " >&6; } +if test ${ac_cv_sizeof_sockaddr_un_sun_path+y} +then : + printf %s "(cached) " >&6 +else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (sockaddr_un.sun_path))" "ac_cv_sizeof_sockaddr_un_sun_path" " $ac_includes_default -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif struct sockaddr_un sockaddr_un; -"; then : +" +then : -else +else $as_nop if test "$ac_cv_type_sockaddr_un_sun_path" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (sockaddr_un.sun_path) See \`config.log' for more details" "$LINENO" 5; } else @@ -26985,14 +34203,12 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_sockaddr_un_sun_path" >&5 -$as_echo "$ac_cv_sizeof_sockaddr_un_sun_path" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_sockaddr_un_sun_path" >&5 +printf "%s\n" "$ac_cv_sizeof_sockaddr_un_sun_path" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SOCKADDR_UN_SUN_PATH $ac_cv_sizeof_sockaddr_un_sun_path -_ACEOF +printf "%s\n" "#define SIZEOF_SOCKADDR_UN_SUN_PATH $ac_cv_sizeof_sockaddr_un_sun_path" >>confdefs.h @@ -27002,7 +34218,7 @@ _ACEOF ac_fn_c_check_member "$LINENO" "struct statfs" "f_favail" "ac_cv_member_struct_statfs_f_favail" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -27016,18 +34232,17 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_favail" "ac_cv_member_struct_s #endif " -if test "x$ac_cv_member_struct_statfs_f_favail" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_favail" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FAVAIL 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FAVAIL 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct statfs" "f_ffree" "ac_cv_member_struct_statfs_f_ffree" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -27041,18 +34256,17 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_ffree" "ac_cv_member_struct_st #endif " -if test "x$ac_cv_member_struct_statfs_f_ffree" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_ffree" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FFREE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FFREE 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct statfs" "f_files" "ac_cv_member_struct_statfs_f_files" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -27066,18 +34280,17 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_files" "ac_cv_member_struct_st #endif " -if test "x$ac_cv_member_struct_statfs_f_files" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_files" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FILES 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FILES 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -27091,18 +34304,17 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_st #endif " -if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_flags" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FLAGS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FLAGS 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct statfs" "f_frsize" "ac_cv_member_struct_statfs_f_frsize" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -27116,11 +34328,10 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_frsize" "ac_cv_member_struct_s #endif " -if test "x$ac_cv_member_struct_statfs_f_frsize" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_frsize" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FRSIZE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FRSIZE 1" >>confdefs.h fi @@ -27132,57 +34343,54 @@ fi ac_fn_c_check_member "$LINENO" "struct statvfs" "f_files" "ac_cv_member_struct_statvfs_f_files" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif " -if test "x$ac_cv_member_struct_statvfs_f_files" = xyes; then : +if test "x$ac_cv_member_struct_statvfs_f_files" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATVFS_F_FILES 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATVFS_F_FILES 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct statvfs" "f_frsize" "ac_cv_member_struct_statvfs_f_frsize" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif " -if test "x$ac_cv_member_struct_statvfs_f_frsize" = xyes; then : +if test "x$ac_cv_member_struct_statvfs_f_frsize" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATVFS_F_FRSIZE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATVFS_F_FRSIZE 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct statvfs" "mnt_dir" "ac_cv_member_struct_statvfs_mnt_dir" " $ac_includes_default -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif " -if test "x$ac_cv_member_struct_statvfs_mnt_dir" = xyes; then : +if test "x$ac_cv_member_struct_statvfs_mnt_dir" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATVFS_MNT_DIR 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATVFS_MNT_DIR 1" >>confdefs.h fi @@ -27197,16 +34405,15 @@ ac_fn_c_check_member "$LINENO" "struct swdevt" "sw_nblksenabled" "ac_cv_member_s #ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_CONF_H +#ifdef HAVE_SYS_CONF_H #include #endif " -if test "x$ac_cv_member_struct_swdevt_sw_nblksenabled" = xyes; then : +if test "x$ac_cv_member_struct_swdevt_sw_nblksenabled" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED 1" >>confdefs.h fi @@ -27235,11 +34442,10 @@ ac_fn_c_check_member "$LINENO" "struct tcpstat" "tcp_rcvmemdrop" "ac_cv_member_s #endif " -if test "x$ac_cv_member_struct_tcpstat_tcp_rcvmemdrop" = xyes; then : +if test "x$ac_cv_member_struct_tcpstat_tcp_rcvmemdrop" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TCPSTAT_TCP_RCVMEMDROP 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_TCPSTAT_TCP_RCVMEMDROP 1" >>confdefs.h fi @@ -27251,11 +34457,11 @@ fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" " $ac_includes_default -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -27263,27 +34469,89 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_t #endif " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_GMTOFF 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_TM_TM_GMTOFF 1" >>confdefs.h + + +fi +ac_fn_c_check_member "$LINENO" "struct tm" "tm_isdst" "ac_cv_member_struct_tm_tm_isdst" " + $ac_includes_default + +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +" +if test "x$ac_cv_member_struct_tm_tm_isdst" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_TM_TM_ISDST 1" >>confdefs.h + + +fi + + +ac_fn_check_decl "$LINENO" "daylight" "ac_cv_have_decl_daylight" " +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_daylight" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_DAYLIGHT $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "timezone" "ac_cv_have_decl_timezone" " +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_timezone" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_TIMEZONE $ac_have_decl" >>confdefs.h -# extern timezone -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking extern timezone" >&5 -$as_echo_n "checking extern timezone... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether timezone is a scalar" >&5 +printf %s "checking whether timezone is a scalar... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -27291,31 +34559,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main () +main (void) { - return timezone; +int a[2]; +return &a[timezone] != NULL; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_TIMEZONE_VARIABLE 1" >>confdefs.h - - -else +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +printf "%s\n" "#define HAVE_SCALAR_TIMEZONE 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # struct timezone # Library: @@ -27326,7 +34591,7 @@ ac_fn_c_check_member "$LINENO" "struct timezone" "tz_dsttime" "ac_cv_member_stru #ifdef HAVE_SYS_TIMEB_H # include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else @@ -27338,11 +34603,10 @@ ac_fn_c_check_member "$LINENO" "struct timezone" "tz_dsttime" "ac_cv_member_stru #endif " -if test "x$ac_cv_member_struct_timezone_tz_dsttime" = xyes; then : +if test "x$ac_cv_member_struct_timezone_tz_dsttime" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TIMEZONE_TZ_DSTTIME 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_TIMEZONE_TZ_DSTTIME 1" >>confdefs.h fi @@ -27354,150 +34618,144 @@ fi ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_discard" "ac_cv_member_struct_udpstat_udps_discard" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_udpstat_udps_discard" = xyes; then : +if test "x$ac_cv_member_struct_udpstat_udps_discard" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UDPSTAT_UDPS_DISCARD 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UDPSTAT_UDPS_DISCARD 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_fullsock" "ac_cv_member_struct_udpstat_udps_fullsock" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_udpstat_udps_fullsock" = xyes; then : +if test "x$ac_cv_member_struct_udpstat_udps_fullsock" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_noport" "ac_cv_member_struct_udpstat_udps_noport" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_udpstat_udps_noport" = xyes; then : +if test "x$ac_cv_member_struct_udpstat_udps_noport" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UDPSTAT_UDPS_NOPORT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UDPSTAT_UDPS_NOPORT 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_noportbcast" "ac_cv_member_struct_udpstat_udps_noportbcast" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_udpstat_udps_noportbcast" = xyes; then : +if test "x$ac_cv_member_struct_udpstat_udps_noportbcast" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_ipackets" "ac_cv_member_struct_udpstat_udps_ipackets" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_udpstat_udps_ipackets" = xyes; then : +if test "x$ac_cv_member_struct_udpstat_udps_ipackets" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UDPSTAT_UDPS_IPACKETS 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct udpstat" "udps_opackets" "ac_cv_member_struct_udpstat_udps_opackets" " $ac_includes_default -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif " -if test "x$ac_cv_member_struct_udpstat_udps_opackets" = xyes; then : +if test "x$ac_cv_member_struct_udpstat_udps_opackets" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_UDPSTAT_UDPS_OPACKETS 1" >>confdefs.h fi @@ -27511,11 +34769,12 @@ fi # Does "struct ifnet" need _KERNEL defined? (Irix) # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if _KERNEL needs to be defined for if_mtu" >&5 -$as_echo_n "checking if _KERNEL needs to be defined for if_mtu... " >&6; } -if ${ac_cv_IFNET_NEEDS_KERNEL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _KERNEL needs to be defined for if_mtu" >&5 +printf %s "checking if _KERNEL needs to be defined for if_mtu... " >&6; } +if test ${ac_cv_IFNET_NEEDS_KERNEL+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_IFNET_NEEDS_KERNEL=unknown cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27535,17 +34794,18 @@ else #endif int -main () +main (void) { struct ifnet test; test.if_mtu = 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_IFNET_NEEDS_KERNEL=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$ac_cv_IFNET_NEEDS_KERNEL" = unknown ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27566,35 +34826,37 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #endif int -main () +main (void) { struct ifnet test; test.if_mtu = 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_IFNET_NEEDS_KERNEL=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_IFNET_NEEDS_KERNEL" >&5 -$as_echo "$ac_cv_IFNET_NEEDS_KERNEL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_IFNET_NEEDS_KERNEL" >&5 +printf "%s\n" "$ac_cv_IFNET_NEEDS_KERNEL" >&6; } if test "x$ac_cv_IFNET_NEEDS_KERNEL" = "xyes"; then -$as_echo "#define NETSNMP_IFNET_NEEDS_KERNEL 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_IFNET_NEEDS_KERNEL 1" >>confdefs.h fi # Does "struct ifnet" need _KERNEL_STRUCTURES defined? (DragonFly 3) # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if _KERNEL_STRUCTURES needs to be defined for if_mtu" >&5 -$as_echo_n "checking if _KERNEL_STRUCTURES needs to be defined for if_mtu... " >&6; } -if ${ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _KERNEL_STRUCTURES needs to be defined for if_mtu" >&5 +printf %s "checking if _KERNEL_STRUCTURES needs to be defined for if_mtu... " >&6; } +if test ${ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=unknown cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27614,17 +34876,18 @@ else #endif int -main () +main (void) { struct ifnet test; test.if_mtu = 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" = unknown ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27645,25 +34908,26 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #endif int -main () +main (void) { struct ifnet test; test.if_mtu = 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" >&5 -$as_echo "$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" >&5 +printf "%s\n" "$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" >&6; } if test "x$ac_cv_IFNET_NEEDS_KERNEL_STRUCTURES" = "xyes"; then -$as_echo "#define NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES 1" >>confdefs.h fi @@ -27702,11 +34966,10 @@ ac_fn_c_check_member "$LINENO" "struct ifaddr" "ifa_next" "ac_cv_member_struct_i #endif " -if test "x$ac_cv_member_struct_ifaddr_ifa_next" = xyes; then : +if test "x$ac_cv_member_struct_ifaddr_ifa_next" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFADDR_IFA_NEXT 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFADDR_IFA_NEXT 1" >>confdefs.h fi @@ -27778,11 +35041,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_addrlist" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_addrlist" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_ADDRLIST 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_ADDRLIST 1" >>confdefs.h fi @@ -27848,11 +35110,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_addrhead_tqh_first" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_addrhead_tqh_first" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_ADDRHEAD_TQH_FIRST 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_ADDRHEAD_TQH_FIRST 1" >>confdefs.h fi @@ -27918,11 +35179,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_baudrate" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_baudrate" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_BAUDRATE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_BAUDRATE 1" >>confdefs.h fi @@ -27988,11 +35248,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_baudrate_ifs_value" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_baudrate_ifs_value" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE 1" >>confdefs.h fi @@ -28058,11 +35317,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_ibytes" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_ibytes" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_IBYTES 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_IBYTES 1" >>confdefs.h fi @@ -28128,11 +35386,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_imcasts" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_imcasts" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_IMCASTS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_IMCASTS 1" >>confdefs.h fi @@ -28198,11 +35455,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_iqdrops" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_iqdrops" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_IQDROPS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_IQDROPS 1" >>confdefs.h fi @@ -28268,11 +35524,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_lastchange_tv_sec" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_lastchange_tv_sec" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC 1" >>confdefs.h fi @@ -28338,11 +35593,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC 1" >>confdefs.h fi @@ -28408,11 +35662,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_mtu" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_mtu" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_MTU 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_MTU 1" >>confdefs.h fi @@ -28478,11 +35731,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_noproto" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_noproto" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_NOPROTO 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_NOPROTO 1" >>confdefs.h fi @@ -28548,11 +35800,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_obytes" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_obytes" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_OBYTES 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_OBYTES 1" >>confdefs.h fi @@ -28618,11 +35869,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_omcasts" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_omcasts" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_OMCASTS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_OMCASTS 1" >>confdefs.h fi @@ -28688,11 +35938,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_speed" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_speed" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_SPEED 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_SPEED 1" >>confdefs.h fi @@ -28758,11 +36007,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_type" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_type" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_TYPE 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_TYPE 1" >>confdefs.h fi @@ -28828,11 +36076,10 @@ struct ifnet { #endif " -if test "x$ac_cv_member_struct_ifnet_if_xname" = xyes; then : +if test "x$ac_cv_member_struct_ifnet_if_xname" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFNET_IF_XNAME 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_IFNET_IF_XNAME 1" >>confdefs.h fi @@ -28841,11 +36088,12 @@ fi # Check for BSD 4.3 vs 4.4 struct rtentry # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of rtentry structure" >&5 -$as_echo_n "checking type of rtentry structure... " >&6; } -if ${ac_cv_RTENTRY_TYPE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of rtentry structure" >&5 +printf %s "checking type of rtentry structure... " >&6; } +if test ${ac_cv_RTENTRY_TYPE+y} +then : + printf %s "(cached) " >&6 +else $as_nop # BSD 4.4 compatible structure # ('rt_nodes' array) @@ -28872,7 +36120,7 @@ else #include int -main () +main (void) { @@ -28888,10 +36136,11 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_RTENTRY_TYPE="BSD-4.4" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "x$ac_cv_RTENTRY_TYPE" = "x"; then # BSD 4.3 compatible structure @@ -28919,7 +36168,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #include int -main () +main (void) { @@ -28930,10 +36179,11 @@ rt.rt_hash; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_RTENTRY_TYPE="BSD-4.3" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$ac_cv_RTENTRY_TYPE" = "x"; then @@ -28943,23 +36193,24 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_RTENTRY_TYPE" >&5 -$as_echo "$ac_cv_RTENTRY_TYPE" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_RTENTRY_TYPE" >&5 +printf "%s\n" "$ac_cv_RTENTRY_TYPE" >&6; } if test "x$ac_cv_RTENTRY_TYPE" = "xBSD-4.4"; then -$as_echo "#define RTENTRY_4_4 1" >>confdefs.h +printf "%s\n" "#define RTENTRY_4_4 1" >>confdefs.h fi # Check for ortentry (Alpha) # if test "x$ac_cv_RTENTRY_TYPE" = "xunknown"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rtentry" >&5 -$as_echo_n "checking for struct rtentry... " >&6; } -if ${ac_cv_struct_rtentry+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rtentry" >&5 +printf %s "checking for struct rtentry... " >&6; } +if test ${ac_cv_struct_rtentry+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -28968,12 +36219,13 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ortentry" >/dev/null 2>&1; then : + $EGREP "ortentry" >/dev/null 2>&1 +then : ac_cv_struct_rtentry=ortentry -else +else $as_nop ac_cv_struct_rtentry=rtentry fi -rm -f conftest* +rm -rf conftest* if test "x$ac_cv_struct_rtentry" = "xrtentry" ; then ac_cv_struct_rtentry="rtentry" @@ -28982,8 +36234,8 @@ rm -f conftest* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_rtentry" >&5 -$as_echo "$ac_cv_struct_rtentry" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_rtentry" >&5 +printf "%s\n" "$ac_cv_struct_rtentry" >&6; } else RTENTRY_TYPE="rtentry" ac_cv_struct_rtentry="rtentry" @@ -28993,12 +36245,50 @@ if test "x$ac_cv_struct_rtentry" = "x"; then ac_cv_struct_rtentry=rtentry fi -cat >>confdefs.h <<_ACEOF -#define RTENTRY struct ${ac_cv_struct_rtentry} +printf "%s\n" "#define RTENTRY struct ${ac_cv_struct_rtentry}" >>confdefs.h + + +# prioritynames +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking syslog prioritynames" >&5 +printf %s "checking syslog prioritynames... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_SYSLOG_H +#define SYSLOG_NAMES +#include +#endif + +int +main (void) +{ + + char *test = prioritynames[0].c_name; + printf("%s\n", test); /* so it's not unused */ + + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_PRIORITYNAMES 1" >>confdefs.h +else $as_nop + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + # -*- autoconf -*- ######################################### ## @@ -29015,8 +36305,8 @@ if test -c /dev/null; then elif test -f /dev/null; then CDEV_TEST_FLAG="-f" else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't reliably detect character devices" >&5 -$as_echo "$as_me: WARNING: Can't reliably detect character devices" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't reliably detect character devices" >&5 +printf "%s\n" "$as_me: WARNING: Can't reliably detect character devices" >&2;} # Is it actually sensible to fall back on "test -f" ? CDEV_TEST_FLAG="-f" fi @@ -29024,11 +36314,12 @@ fi # Kernel Location # used in library/agent # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of system kernel" >&5 -$as_echo_n "checking for location of system kernel... " >&6; } -if ${ac_cv_KERNEL_LOC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of system kernel" >&5 +printf %s "checking for location of system kernel... " >&6; } +if test ${ac_cv_KERNEL_LOC+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_KERNEL_LOC="unknown" for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel do @@ -29048,56 +36339,28 @@ else # Since this default will never actually be used, then don't try to set it # if test $i = "unknown"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find system kernel... hopefully this won't be needed!" >&5 -$as_echo "$as_me: WARNING: Can't find system kernel... hopefully this won't be needed!" >&2;} - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_KERNEL_LOC" >&5 -$as_echo "$ac_cv_KERNEL_LOC" >&6; } - -cat >>confdefs.h <<_ACEOF -#define KERNEL_LOC "$ac_cv_KERNEL_LOC" -_ACEOF - - - -# /dev/kmem existence -# used in agent only -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/kmem" >&5 -$as_echo_n "checking for /dev/kmem... " >&6; } -if ${ac_cv_HAVE_KMEM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test $CDEV_TEST_FLAG /dev/kmem; then - ac_cv_HAVE_KMEM="/dev/kmem" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't find system kernel... hopefully this won't be needed!" >&5 +printf "%s\n" "$as_me: WARNING: Can't find system kernel... hopefully this won't be needed!" >&2;} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_KMEM" >&5 -$as_echo "$ac_cv_HAVE_KMEM" >&6; } -# -# Note that it's OK if this device is not found -# -if test "x$ac_cv_HAVE_KMEM" = "x/dev/kmem"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_KERNEL_LOC" >&5 +printf "%s\n" "$ac_cv_KERNEL_LOC" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_KMEM "$ac_cv_HAVE_KMEM" -_ACEOF +printf "%s\n" "#define KERNEL_LOC \"$ac_cv_KERNEL_LOC\"" >>confdefs.h -fi # Swap device Location # (/dev/dmem or /dev/drum) # used in agent only # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of swap device" >&5 -$as_echo_n "checking for location of swap device... " >&6; } -if ${ac_cv_DMEM_LOC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of swap device" >&5 +printf %s "checking for location of swap device... " >&6; } +if test ${ac_cv_DMEM_LOC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test $CDEV_TEST_FLAG /dev/dmem; then ac_cv_DMEM_LOC="/dev/dmem" elif test $CDEV_TEST_FLAG /dev/drum; then @@ -29107,16 +36370,14 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_DMEM_LOC" >&5 -$as_echo "$ac_cv_DMEM_LOC" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_DMEM_LOC" >&5 +printf "%s\n" "$ac_cv_DMEM_LOC" >&6; } # # Note that it's OK if this device is not found # if test "x$ac_cv_DMEM_LOC" != "xnone"; then -cat >>confdefs.h <<_ACEOF -#define DMEM_LOC "$ac_cv_DMEM_LOC" -_ACEOF +printf "%s\n" "#define DMEM_LOC \"$ac_cv_DMEM_LOC\"" >>confdefs.h fi @@ -29124,11 +36385,12 @@ fi # Mount table Location # used in agent only # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount table location" >&5 -$as_echo_n "checking for mount table location... " >&6; } -if ${ac_cv_ETC_MNTTAB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mount table location" >&5 +printf %s "checking for mount table location... " >&6; } +if test ${ac_cv_ETC_MNTTAB+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_ETC_MNTTAB="${with_mnttab:-unknown}" if test "$ac_cv_ETC_MNTTAB" = "unknown"; then for i in /etc/mnttab /etc/mtab /etc/filesystems /dev/mnttab @@ -29141,12 +36403,10 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ETC_MNTTAB" >&5 -$as_echo "$ac_cv_ETC_MNTTAB" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ETC_MNTTAB" >&5 +printf "%s\n" "$ac_cv_ETC_MNTTAB" >&6; } -cat >>confdefs.h <<_ACEOF -#define ETC_MNTTAB "$ac_cv_ETC_MNTTAB" -_ACEOF +printf "%s\n" "#define ETC_MNTTAB \"$ac_cv_ETC_MNTTAB\"" >>confdefs.h @@ -29155,11 +36415,12 @@ _ACEOF # # Extract the first word of "lpstat", so it can be a program name with args. set dummy lpstat; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LPSTAT_PATH+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_LPSTAT_PATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $LPSTAT_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_LPSTAT_PATH="$LPSTAT_PATH" # Let the user override the test with a path. @@ -29169,11 +36430,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LPSTAT_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_LPSTAT_PATH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -29185,27 +36450,25 @@ esac fi LPSTAT_PATH=$ac_cv_path_LPSTAT_PATH if test -n "$LPSTAT_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LPSTAT_PATH" >&5 -$as_echo "$LPSTAT_PATH" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LPSTAT_PATH" >&5 +printf "%s\n" "$LPSTAT_PATH" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test x$LPSTAT_PATH != x; then -cat >>confdefs.h <<_ACEOF -#define LPSTAT_PATH "$LPSTAT_PATH" -_ACEOF +printf "%s\n" "#define LPSTAT_PATH \"$LPSTAT_PATH\"" >>confdefs.h -$as_echo "#define HAVE_LPSTAT 1" >>confdefs.h +printf "%s\n" "#define HAVE_LPSTAT 1" >>confdefs.h fi if test -r /etc/printcap; then -$as_echo "#define HAVE_PRINTCAP 1" >>confdefs.h +printf "%s\n" "#define HAVE_PRINTCAP 1" >>confdefs.h fi @@ -29213,44 +36476,42 @@ fi # Check ps args # used in agent only # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct flags to ps" >&5 -$as_echo_n "checking for correct flags to ps... " >&6; } -if ${ac_cv_ps_flags+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct flags to ps" >&5 +printf %s "checking for correct flags to ps... " >&6; } +if test ${ac_cv_ps_flags+y} +then : + printf %s "(cached) " >&6 +else $as_nop -if test "`($PSPROG -e 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-e" -elif test "`($PSPROG -el 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-el" -elif test "`($PSPROG acx 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="acx" -elif test "`($PSPROG -acx 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-acx" -elif test "`($PSPROG -o pid,tt,state,time,ucomm 2>&1) | $EGREP ' ps *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-o pid,tt,state,time,ucomm" -elif test "`($PSPROG ax 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="ax" -elif test "x$PARTIALTARGETOS" = "xcygwin"; then - ac_cv_ps_flags="-e" -elif test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then - ac_cv_ps_flags="-e" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine valid ps flags... defaulting..." >&5 -$as_echo "$as_me: WARNING: Unable to determine valid ps flags... defaulting..." >&2;} - ac_cv_ps_flags="-acx" -fi +case "x$PARTIALTARGETOS" in + xcygwin|xmingw32*) + ac_cv_ps_flags="-e";; + *) + ac_cv_ps_flags="" + for args in -e -el acx -acx "-o pid,tt,state,time,ucomm" ax; do + if test "`($PSPROG $args 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps"; then + ac_cv_ps_flags=$args + break + fi + done + if test "x${ac_cv_ps_flags}" = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine valid ps flags... defaulting..." >&5 +printf "%s\n" "$as_me: WARNING: Unable to determine valid ps flags... defaulting..." >&2;} + ac_cv_ps_flags="-acx" + elif $PSPROG $ac_cv_ps_flags -J 0 >/dev/null 2>&1; then + ac_cv_ps_flags="$ac_cv_ps_flags -J 0" + fi + ;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ps_flags" >&5 -$as_echo "$ac_cv_ps_flags" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ps_flags" >&5 +printf "%s\n" "$ac_cv_ps_flags" >&6; } PSCMD="$PSPROG $ac_cv_ps_flags" -cat >>confdefs.h <<_ACEOF -#define PSCMD "$PSPROG $ac_cv_ps_flags" -_ACEOF +printf "%s\n" "#define PSCMD \"$PSPROG $ac_cv_ps_flags\"" >>confdefs.h @@ -29261,31 +36522,32 @@ _ACEOF # Test for SIGHUP # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGHUP" >&5 -$as_echo_n "checking for SIGHUP... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGHUP" >&5 +printf %s "checking for SIGHUP... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { return SIGHUP ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : netsnmp_have_sighup=yes -else +else $as_nop netsnmp_have_sighup=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netsnmp_have_sighup" >&5 -$as_echo "$netsnmp_have_sighup" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netsnmp_have_sighup" >&5 +printf "%s\n" "$netsnmp_have_sighup" >&6; } if test "x$netsnmp_have_sighup" = xyes; then -$as_echo "#define HAVE_SIGHUP 1" >>confdefs.h +printf "%s\n" "#define HAVE_SIGHUP 1" >>confdefs.h fi @@ -29293,40 +36555,45 @@ fi # Check whether sysctl() is usable # used in library/agent # -if test $cross_compiling = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't check sysctl, manually define NETSNMP_CAN_USE_SYSCTL if platform support available" >&5 -$as_echo "$as_me: WARNING: Can't check sysctl, manually define NETSNMP_CAN_USE_SYSCTL if platform support available" >&2;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sysctl can read kernel information" >&5 -$as_echo_n "checking if sysctl can read kernel information... " >&6; } -if ${ac_cv_NETSNMP_CAN_USE_SYSCTL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +if test $cross_compiling = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't check sysctl, manually define NETSNMP_CAN_USE_SYSCTL if platform support available" >&5 +printf "%s\n" "$as_me: WARNING: Can't check sysctl, manually define NETSNMP_CAN_USE_SYSCTL if platform support available" >&2;} +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sysctl can read kernel information" >&5 +printf %s "checking if sysctl can read kernel information... " >&6; } +if test ${ac_cv_NETSNMP_CAN_USE_SYSCTL+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_NETSNMP_CAN_USE_SYSCTL=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H # include #endif #include -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H # include #endif +#include +#include -main() { +int main(void) +{ int mib[2]; size_t len; struct timeval boottime; @@ -29335,17 +36602,14 @@ main() { mib[1] = KERN_BOOTTIME; len = sizeof(boottime); - sysctl(mib, 2, &boottime, &len, NULL, NULL); - if (boottime.tv_sec != 0) - exit(0); - else - exit(1); + return 1 - (sysctl(mib, 2, &boottime, &len, NULL, 0) == 0 && boottime.tv_sec); } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_NETSNMP_CAN_USE_SYSCTL=yes -else +else $as_nop ac_cv_NETSNMP_CAN_USE_SYSCTL=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -29353,53 +36617,54 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_NETSNMP_CAN_USE_SYSCTL" >&5 -$as_echo "$ac_cv_NETSNMP_CAN_USE_SYSCTL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_NETSNMP_CAN_USE_SYSCTL" >&5 +printf "%s\n" "$ac_cv_NETSNMP_CAN_USE_SYSCTL" >&6; } fi if test "x$ac_cv_NETSNMP_CAN_USE_SYSCTL" = "xyes"; then -$as_echo "#define NETSNMP_CAN_USE_SYSCTL 1" >>confdefs.h +printf "%s\n" "#define NETSNMP_CAN_USE_SYSCTL 1" >>confdefs.h fi # Check whether TCP timer constants are indeed constant -# or depend on the kernel clock tick 'hz'. (FreeBSD 4.x) +# or depend on the kernel clock tick 'hz'. (FreeBSD) # # If the latter, then we will need to have a local # variable 'hz' defined and with a suitable value, # whenever we want to use one one of these 'constants'. # -# used in agent only -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TCP timers depend on 'hz'" >&5 -$as_echo_n "checking whether TCP timers depend on 'hz'... " >&6; } -if ${ac_cv_TCPTV_NEEDS_HZ+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether TCP timers depend on 'hz'" >&5 +printf %s "checking whether TCP timers depend on 'hz'... " >&6; } +if test ${ac_cv_TCPTV_NEEDS_HZ+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -TCPTV_SRTTDFLT +TCPTV_MIN +TCPTV_REXMTMAX _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "hz" >/dev/null 2>&1; then : + $EGREP "hz" >/dev/null 2>&1 +then : ac_cv_TCPTV_NEEDS_HZ=yes -else +else $as_nop ac_cv_TCPTV_NEEDS_HZ=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_TCPTV_NEEDS_HZ" >&5 -$as_echo "$ac_cv_TCPTV_NEEDS_HZ" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_TCPTV_NEEDS_HZ" >&5 +printf "%s\n" "$ac_cv_TCPTV_NEEDS_HZ" >&6; } if test "x$ac_cv_TCPTV_NEEDS_HZ" = "xyes"; then -$as_echo "#define TCPTV_NEEDS_HZ 1" >>confdefs.h +printf "%s\n" "#define TCPTV_NEEDS_HZ 1" >>confdefs.h fi @@ -29411,56 +36676,50 @@ case $target_os in solaris*) # Header checks (Solaris 2.6/7) # - for ac_header in inet/common.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "inet/common.h" "ac_cv_header_inet_common_h" "$ac_includes_default" -if test "x$ac_cv_header_inet_common_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INET_COMMON_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "inet/common.h" "ac_cv_header_inet_common_h" "$ac_includes_default" +if test "x$ac_cv_header_inet_common_h" = xyes +then : + printf "%s\n" "#define HAVE_INET_COMMON_H 1" >>confdefs.h fi -done - - for ac_header in inet/ip.h + for ac_header in inet/ip.h do : ac_fn_c_check_header_compile "$LINENO" "inet/ip.h" "ac_cv_header_inet_ip_h" "$ac_includes_default -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_INET_COMMON_H +#ifdef HAVE_INET_COMMON_H #include #endif " -if test "x$ac_cv_header_inet_ip_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INET_IP_H 1 -_ACEOF +if test "x$ac_cv_header_inet_ip_h" = xyes +then : + printf "%s\n" "#define HAVE_INET_IP_H 1" >>confdefs.h ac_inet_ip_h=yes -else +else $as_nop ac_inet_ip_h=no fi done - if test $ac_inet_ip_h = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mib2_ipRouteEntry_t in inet/mib2.h" >&5 -$as_echo_n "checking for mib2_ipRouteEntry_t in inet/mib2.h... " >&6; } -if ${ac_cv_mib2_ipRouteEntry_t+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mib2_ipRouteEntry_t in inet/mib2.h" >&5 +printf %s "checking for mib2_ipRouteEntry_t in inet/mib2.h... " >&6; } +if test ${ac_cv_mib2_ipRouteEntry_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if HAVE_INET_MIB2_H +#ifdef HAVE_INET_MIB2_H #include #endif int -main () +main (void) { mib2_ipRouteEntry_t testit; @@ -29471,31 +36730,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_mib2_ipRouteEntry_t=yes -else +else $as_nop ac_cv_mib2_ipRouteEntry_t=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mib2_ipRouteEntry_t" >&5 -$as_echo "$ac_cv_mib2_ipRouteEntry_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mib2_ipRouteEntry_t" >&5 +printf "%s\n" "$ac_cv_mib2_ipRouteEntry_t" >&6; } if test "x$ac_cv_mib2_ipRouteEntry_t" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether IRE_CACHE is defined in inet/ip.h" >&5 -$as_echo_n "checking whether IRE_CACHE is defined in inet/ip.h... " >&6; } -if ${ac_cv_ire_cache+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether IRE_CACHE is defined in inet/ip.h" >&5 +printf %s "checking whether IRE_CACHE is defined in inet/ip.h... " >&6; } +if test ${ac_cv_ire_cache+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if HAVE_INET_IP_H +#ifdef HAVE_INET_IP_H #include #endif int -main () +main (void) { int testit=IRE_CACHE; @@ -29506,28 +36767,29 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_ire_cache=yes -else +else $as_nop ac_cv_ire_cache=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ire_cache" >&5 -$as_echo "$ac_cv_ire_cache" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ire_cache" >&5 +printf "%s\n" "$ac_cv_ire_cache" >&6; } else ac_cv_ire_cache=no fi if test "x$ac_cv_ire_cache" = "xyes" ; then -$as_echo "#define HAVE_DEFINED_IRE_CACHE /**/" >>confdefs.h +printf "%s\n" "#define HAVE_DEFINED_IRE_CACHE /**/" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that you have inet/ip.h, but IRE_CACHE is not defined. \ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: It seems that you have inet/ip.h, but IRE_CACHE is not defined. \ That means that your query to ipRoute MIB could generate over 20k results! \ And this can be very slow." >&5 -$as_echo "$as_me: WARNING: It seems that you have inet/ip.h, but IRE_CACHE is not defined. \ +printf "%s\n" "$as_me: WARNING: It seems that you have inet/ip.h, but IRE_CACHE is not defined. \ That means that your query to ipRoute MIB could generate over 20k results! \ And this can be very slow." >&2;} fi @@ -29535,14 +36797,68 @@ And this can be very slow." >&2;} ;; esac +# Check whether SO_BINDTODEVICE is available. +# + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SO_BINDTODEVICE" >&5 +printf %s "checking for SO_BINDTODEVICE... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main (void) +{ + +return SO_BINDTODEVICE + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + +printf "%s\n" "#define HAVE_SO_BINDTODEVICE 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +# Check whether struct in_pktinfo.ipi_spec_dst is available. +# + +ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" " +#include +#include +#include + +" +if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes +then : + +printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h + + +fi + + # Check whether IP_PKTINFO is usable. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IP_PKTINFO " >&5 -$as_echo_n "checking for IP_PKTINFO ... " >&6; } -if ${ac_cv_have_ip_pktinfo+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IP_PKTINFO " >&5 +printf %s "checking for IP_PKTINFO ... " >&6; } +if test ${ac_cv_have_ip_pktinfo+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29552,9 +36868,10 @@ else #include #include #include +#include /* inet_ntoa() */ int -main () +main (void) { void *buf; @@ -29590,31 +36907,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_have_ip_pktinfo=yes -else +else $as_nop ac_cv_have_ip_pktinfo=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ip_pktinfo" >&5 -$as_echo "$ac_cv_have_ip_pktinfo" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ip_pktinfo" >&5 +printf "%s\n" "$ac_cv_have_ip_pktinfo" >&6; } if test x$ac_cv_have_ip_pktinfo = xyes; then -$as_echo "#define HAVE_IP_PKTINFO 1" >>confdefs.h +printf "%s\n" "#define HAVE_IP_PKTINFO 1" >>confdefs.h fi # Check whether IP_RECVDSTADDR is usable. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IP_RECVDSTADDR " >&5 -$as_echo_n "checking for IP_RECVDSTADDR ... " >&6; } -if ${ac_cv_have_ip_recvdstaddr+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IP_RECVDSTADDR " >&5 +printf %s "checking for IP_RECVDSTADDR ... " >&6; } +if test ${ac_cv_have_ip_recvdstaddr+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29624,9 +36943,10 @@ else #include #include #include +#include /* inet_ntoa() */ int -main () +main (void) { void *buf; @@ -29661,20 +36981,21 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_have_ip_recvdstaddr=yes -else +else $as_nop ac_cv_have_ip_recvdstaddr=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ip_recvdstaddr" >&5 -$as_echo "$ac_cv_have_ip_recvdstaddr" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ip_recvdstaddr" >&5 +printf "%s\n" "$ac_cv_have_ip_recvdstaddr" >&6; } if test x$ac_cv_have_ip_recvdstaddr = xyes; then -$as_echo "#define HAVE_IP_RECVDSTADDR 1" >>confdefs.h +printf "%s\n" "#define HAVE_IP_RECVDSTADDR 1" >>confdefs.h fi @@ -29705,8 +37026,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -29736,15 +37057,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -29758,11 +37079,16 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache +## +# Add back in the original CFLAGS setting +## +CFLAGS="$noerr_CFLAGS ${CFLAGS#$CFLAGS_without_Werror}" +export CFLAGS # # define the agent libraries variables @@ -29804,6 +37130,8 @@ ac_config_files="$ac_config_files net-snmp-config:net-snmp-config.in" ac_config_files="$ac_config_files net-snmp-create-v3-user:net-snmp-create-v3-user.in" +ac_config_files="$ac_config_files netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in" + ac_config_files="$ac_config_files dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in" ac_config_files="$ac_config_files local/snmpconf" @@ -29848,8 +37176,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -29879,15 +37207,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -29901,8 +37229,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -29919,7 +37247,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -29931,13 +37259,12 @@ LTLIBOBJS=$ac_ltlibobjs - : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -29960,14 +37287,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -29977,46 +37306,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -30025,13 +37354,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -30040,8 +37362,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -30053,30 +37379,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -30089,13 +37395,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -30122,18 +37429,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -30145,12 +37454,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -30181,7 +37491,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -30203,6 +37513,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -30216,6 +37530,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -30229,16 +37549,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -30257,7 +37577,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -30266,7 +37586,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -30298,28 +37618,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -30340,8 +37648,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Net-SNMP $as_me 5.7.3, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by Net-SNMP $as_me 5.9.4.pre2, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -30403,14 +37711,16 @@ $config_commands Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Net-SNMP config.status 5.7.3 -configured by $0, generated by GNU Autoconf 2.68, +Net-SNMP config.status 5.9.4.pre2 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -30449,15 +37759,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -30465,7 +37775,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -30474,7 +37784,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -30500,9 +37810,9 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -30516,7 +37826,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -30542,8 +37852,10 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -30588,10 +37900,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -30624,7 +37939,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -30657,13 +37971,56 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`' +reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`' +reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`' +compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`' +GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`' +archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`' +module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`' +inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`' +always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`' +include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`' +prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`' +file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`' +hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' @@ -30683,6 +38040,7 @@ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -30708,9 +38066,12 @@ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -30731,7 +38092,6 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -30743,10 +38103,29 @@ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ -striplib; do +striplib \ +LD_RC \ +reload_flag_RC \ +compiler_RC \ +lt_prog_compiler_no_builtin_flag_RC \ +lt_prog_compiler_pic_RC \ +lt_prog_compiler_wl_RC \ +lt_prog_compiler_static_RC \ +lt_cv_prog_compiler_c_o_RC \ +export_dynamic_flag_spec_RC \ +whole_archive_flag_spec_RC \ +compiler_needs_object_RC \ +with_gnu_ld_RC \ +allow_undefined_flag_RC \ +no_undefined_flag_RC \ +hardcode_libdir_flag_spec_RC \ +hardcode_libdir_separator_RC \ +exclude_expsyms_RC \ +include_expsyms_RC \ +file_list_spec_RC; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -30773,10 +38152,22 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path \ +reload_cmds_RC \ +old_archive_cmds_RC \ +old_archive_from_new_cmds_RC \ +old_archive_from_expsyms_cmds_RC \ +archive_cmds_RC \ +archive_expsym_cmds_RC \ +module_cmds_RC \ +module_expsym_cmds_RC \ +export_symbols_cmds_RC \ +prelink_cmds_RC \ +postlink_cmds_RC; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -30785,25 +38176,24 @@ sys_lib_dlsearch_path_spec; do done ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' + + _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -30827,6 +38217,8 @@ do "mibs/Makefile") CONFIG_FILES="$CONFIG_FILES mibs/Makefile:Makefile.top:mibs/Makefile.in:Makefile.rules" ;; "net-snmp-config") CONFIG_FILES="$CONFIG_FILES net-snmp-config:net-snmp-config.in" ;; "net-snmp-create-v3-user") CONFIG_FILES="$CONFIG_FILES net-snmp-create-v3-user:net-snmp-create-v3-user.in" ;; + "netsnmp.pc") CONFIG_FILES="$CONFIG_FILES netsnmp.pc:netsnmp.pc.in" ;; + "netsnmp-agent.pc") CONFIG_FILES="$CONFIG_FILES netsnmp-agent.pc:netsnmp-agent.pc.in" ;; "dist/generation-scripts/gen-variables") CONFIG_FILES="$CONFIG_FILES dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in" ;; "local/snmpconf") CONFIG_FILES="$CONFIG_FILES local/snmpconf" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; @@ -30841,9 +38233,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -31213,7 +38605,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -31221,17 +38613,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -31248,7 +38640,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -31272,9 +38664,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -31331,8 +38723,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -31380,9 +38772,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -31398,27 +38790,27 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -31426,55 +38818,53 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="" +available_tags='RC ' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -31503,12 +38893,18 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -31611,18 +39007,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -31713,8 +39118,11 @@ hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -31804,20 +39212,16 @@ no_undefined_flag=$lt_no_undefined_flag # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -31867,6 +39271,65 @@ hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -31875,7 +39338,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -31884,7 +39347,8 @@ _LT_EOF esac -ltmain="$ac_aux_dir/ltmain.sh" + +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -31894,169 +39358,149 @@ ltmain="$ac_aux_dir/ltmain.sh" sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: RC + +# The linker used to build libraries. +LD=$lt_LD_RC + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_RC +reload_cmds=$lt_reload_cmds_RC + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_RC + +# A language specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU compiler? +with_gcc=$GCC_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_RC + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_RC + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_RC + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_RC + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_RC + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_RC + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_RC + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_RC + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# ### END LIBTOOL TAG CONFIG: RC +_LT_EOF + ;; "net-snmp-config":F) chmod +x net-snmp-config ;; "net-snmp-create-v3-user":F) chmod +x net-snmp-create-v3-user ;; @@ -32095,8 +39539,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -32115,3 +39559,4 @@ fi # mode: Autoconf # comment-start: "#" # End: + diff --git a/configure.ac b/configure.ac index ecf761f..9544209 100644 --- a/configure.ac +++ b/configure.ac @@ -6,28 +6,38 @@ # Use is subject to license terms specified in the COPYING file # distributed with the Net-SNMP package. # +# Portions of this file are copyrighted by: +# Copyright (c) 2016 VMware, Inc. All rights reserved. +# Use is subject to license terms specified in the COPYING file +# distributed with the Net-SNMP package. +# # # Process this file with autoconf to produce a configure script. # -AC_INIT([Net-SNMP], [5.7.3], [net-snmp-coders@lists.sourceforge.net]) -AC_PREREQ([2.63]) +AC_INIT([Net-SNMP],[5.9.4.pre2],[net-snmp-coders@lists.sourceforge.net]) +AC_PREREQ([2.71]) AC_CONFIG_SRCDIR([agent/snmpd.c]) AC_REVISION([$Revision$]) AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADER(include/net-snmp/net-snmp-config.h) +AC_CONFIG_HEADERS([include/net-snmp/net-snmp-config.h]) AC_MSG_CACHE_INIT() # # save the configure arguments # -AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"$ac_configure_args", +AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"${NETSNMP_CONFIGURE_OPTIONS-$ac_configure_args}", [configure options specified]) CONFIGURE_OPTIONS="\"$ac_configure_args\"" AC_SUBST(CONFIGURE_OPTIONS) +# +# Check whether _GNU_SOURCE etc. should be defined +# +AC_USE_SYSTEM_EXTENSIONS + ## ## Recommended structure: ## @@ -41,7 +51,16 @@ AC_SUBST(CONFIGURE_OPTIONS) # checks for library functions # checks for system services +m4_include([configure.d/config_net_snmp_config_h]) m4_include([configure.d/config_project_with_enable]) +## +# Protect against CFLAGS with -Werror which causes failures for some tests +# (e.g. it causes type mismatches in the AC_CV_FUNCS call) +## +noerr_CFLAGS="$CFLAGS" +CFLAGS=`echo $CFLAGS | sed 's/-Werror[[^ ]]*//g'` +CFLAGS_without_Werror=$CFLAGS +export CFLAGS m4_include([configure.d/config_project_manual]) m4_include([configure.d/config_os_progs]) m4_include([configure.d/config_project_paths]) @@ -64,6 +83,11 @@ m4_include([configure.d/config_os_functions]) m4_include([configure.d/config_os_struct_members]) m4_include([configure.d/config_os_misc4]) AC_CACHE_SAVE +## +# Add back in the original CFLAGS setting +## +CFLAGS="$noerr_CFLAGS ${CFLAGS#$CFLAGS_without_Werror}" +export CFLAGS # # define the agent libraries variables @@ -94,6 +118,7 @@ AC_CONFIG_FILES([net-snmp-config:net-snmp-config.in], [chmod +x net-snmp-config]) AC_CONFIG_FILES([net-snmp-create-v3-user:net-snmp-create-v3-user.in], [chmod +x net-snmp-create-v3-user]) +AC_CONFIG_FILES([netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in]) AC_CONFIG_FILES([dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in]) AC_CONFIG_FILES([local/snmpconf]) diff --git a/configure.d/config_modules_agent b/configure.d/config_modules_agent index c18ac33..a1f8570 100644 --- a/configure.d/config_modules_agent +++ b/configure.d/config_modules_agent @@ -27,6 +27,8 @@ done # AC_MSG_CHECKING([for and configuring mib modules to use]) +AH_TOP([#define NETSNMP_REQUIRE_SEMICOLON extern void netsnmp_unused_function(void)]) + # set up the CPP command MODULECPP="$CPP $PARTIALTARGETFLAGS $CPPFLAGS -DNETSNMP_FEATURE_CHECKING -I${srcdir}/include -I${srcdir}/agent/mibgroup" if test "x$enable_mfd_rewrites" = "xyes"; then @@ -40,17 +42,22 @@ new_with_mib_modules=`echo $with_mib_modules | $SED 's/,/ /g;'` new_with_out_mib_modules=`echo $with_out_mib_modules | $SED 's/,/ /g;'` # set up initial module list -new_module_list="$new_with_mib_modules default_modules" - -# minor modifications -if test "x$enable_agent" = "xno"; then - # minimum mib module list for snmptrapd - new_module_list="mibII/vacm_vars mibII/vacm_conf utilities/execute $new_with_mib_modules" - default_mibs=SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB - default_mibs_install=" " -elif test "x$mini_agent" = "xyes"; then - # define the mini agent flag to reduce our load list from default_mibs.h - MODULECPP="$MODULECPP -DNETSNMP_MINI_AGENT" +new_module_list="$new_with_mib_modules" + +if test "x$enable_agent" != "xno" ; then + # If the agent should be built then use default_modules + new_module_list="$new_module_list default_modules" + + if test "x$mini_agent" = "xyes"; then + # define the mini agent flag to reduce our load list from default_mibs.h + MODULECPP="$MODULECPP -DNETSNMP_MINI_AGENT" + fi +elif test "x$enable_applications" != "xno" ; then + # otherwise, if snmptrapd should be built then add SNMPv3 and + # snmptrapd-specific parts + new_module_list="$new_module_list mibII/vacm_conf utilities/execute" + default_mibs=SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB + default_mibs_install=" " fi test_modules="$new_module_list" @@ -187,7 +194,7 @@ while test "x$new_module_list" != "x"; do # - mib_module => libnetsnmpmibs (default) # - agent_module => libnetsnmpagent # - AH_TOP([#define config_belongs_in(x)]) + AH_TOP([#define config_belongs_in(x) NETSNMP_REQUIRE_SEMICOLON]) module_type=mib_module if test -f $srcdir/$mibdir/$i.h; then changequote(, ) @@ -272,7 +279,7 @@ while test "x$new_module_list" != "x"; do # # check if $i has any conflicts # - AH_TOP([#define config_exclude(x)]) + AH_TOP([#define config_exclude(x) NETSNMP_REQUIRE_SEMICOLON]) new_list_excl=`$MODULECPP module_tmp_header.h | \ $SED -n 's/.*config_exclude(\(.*\)).*/\1/p'` if test "x$new_list_excl" != "x"; then @@ -301,7 +308,7 @@ while test "x$new_module_list" != "x"; do # # check if $i has any architecture specific requirements # - AH_TOP([#define config_arch_require(x,y)]) + AH_TOP([#define config_arch_require(x,y) NETSNMP_REQUIRE_SEMICOLON]) changequote(, ) new_list_arch=`$MODULECPP module_tmp_header.h | \ $SED -n 's/.*config_arch_require( *\([^ ]*\) *, *\([^ ]*\) *).*/\1-xarchx-\2/p'` @@ -323,7 +330,7 @@ while test "x$new_module_list" != "x"; do # macro: config_version_require((base, version, version-modules, ...)) # - lists alternative modules used from different versions. # - AH_TOP([#define config_version_require(x)]) + AH_TOP([#define config_version_require(x) NETSNMP_REQUIRE_SEMICOLON]) [new_list_alt3=`$MODULECPP module_tmp_header.h | \ $AWK ' BEGIN { @@ -365,7 +372,7 @@ while test "x$new_module_list" != "x"; do # # check if $i has any other required modules # - AH_TOP([#define config_require(x)]) + AH_TOP([#define config_require(x) NETSNMP_REQUIRE_SEMICOLON]) new_list="$new_list `$MODULECPP module_tmp_header.h | \ $SED -n 's/.*config_require(\(.*\)).*/\1/p'`" AC_MSG_MODULE_DBG(" $i will test: $new_list") @@ -402,7 +409,7 @@ while test "x$new_module_list" != "x"; do # # check if $i has any mibs to add # - AH_TOP([#define config_add_mib(x)]) + AH_TOP([#define config_add_mib(x) NETSNMP_REQUIRE_SEMICOLON]) new_mibs=`$MODULECPP module_tmp_header.h | \ $SED -n 's/.*config_add_mib(\(.*\)).*/\1/p'` if test "x$new_mibs" != "x"; then @@ -449,7 +456,7 @@ while test "x$new_module_list" != "x"; do # check for config_parse_dot_conf # (generally not used any longer; old auto-load a .conf token) # - AH_TOP([#define config_parse_dot_conf(w,x,y,z)]) + AH_TOP([#define config_parse_dot_conf(w,x,y,z) NETSNMP_REQUIRE_SEMICOLON]) changequote(, ) $MODULECPP module_tmp_header.h | \ $SED -n 's@.*config_parse_dot_conf(\([^)]*\), *\([^),]*\), *\([^),]*\), *\([^),]*\)).*@register_config_handler("snmpd",\1, \2, \3, \4);@p' >> $mibdir/mib_module_dot_conf.h @@ -461,7 +468,7 @@ while test "x$new_module_list" != "x"; do # # check if $i has any errors, or warnings # - AH_TOP([#define config_error(x)]) + AH_TOP([#define config_error(x) NETSNMP_REQUIRE_SEMICOLON]) error=`$MODULECPP module_tmp_header.h | \ $SED -n 's/.*config_error(\(.*\)).*/\1/p'` if test "x$error" != "x"; then @@ -474,7 +481,7 @@ while test "x$new_module_list" != "x"; do # macro: config_warning(warning text) # - used to signal a configuration "warning" to be printed to the user # - AH_TOP([#define config_warning(x)]) + AH_TOP([#define config_warning(x) NETSNMP_REQUIRE_SEMICOLON]) warning=`$MODULECPP module_tmp_header.h | \ $SED -n 's/.*config_warning(\(.*\)).*/\1/p'` if test "x$warning" != "x"; then @@ -787,8 +794,8 @@ if test "x$NETSNMP_DEFAULT_MIBS" = "x"; then fi if test "x$ENV_SEPARATOR" != "x"; then : -elif test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then - # mingw32 and cygwin use ';' as the default environment variable separator +elif test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then + # mingw32 uses ';' as the default environment variable separator ENV_SEPARATOR=";" NETSNMP_DEFAULT_MIBS=`echo "$NETSNMP_DEFAULT_MIBS" | $SED 's/:/;/g'` default_mibs=`echo "$default_mibs" | $SED 's/:/;/g'` @@ -809,9 +816,8 @@ AC_MSG_RESULT($NETSNMP_DEFAULT_MIBS) # if echo " $agent_module_list " | \ - fgrep ' agentx/agentx_config ' | \ - fgrep ' agentx/client ' | \ - fgrep ' agentx/protocol ' > /dev/null ; then + $FGREP ' agentx/agentx_config ' | \ + $FGREP ' agentx/protocol ' > /dev/null ; then NETSNMP_HAVE_AGENTX_LIBS_TRUE='' NETSNMP_HAVE_AGENTX_LIBS_FALSE='#' else diff --git a/configure.d/config_modules_lib b/configure.d/config_modules_lib index 362ba0a..6026cd8 100644 --- a/configure.d/config_modules_lib +++ b/configure.d/config_modules_lib @@ -53,6 +53,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" other_ftobjs_list="$other_ftobjs_list winpipe.ft" fi +# Linux systemd +if test "x$with_systemd" = "xyes"; then + other_src_list="$other_src_list sd-daemon.c" + other_objs_list="$other_objs_list sd-daemon.o" + other_lobjs_list="$other_lobjs_list sd-daemon.lo" + other_ftobjs_list="$other_ftobjs_list sd-daemon.ft" +fi + AC_SUBST(other_src_list) AC_SUBST(other_objs_list) AC_SUBST(other_lobjs_list) @@ -134,6 +142,9 @@ AC_MSG_CACHE_ADD(SNMPv3 Security Modules: $new_with_security) rebuilt_new_with_security= already_checked_krb5=no +netsnmp_save_LIBS=$LIBS +CRYPTO_LIBS="" + for sec in $new_with_security do if test "x$sec" = "xksm"; then @@ -155,21 +166,24 @@ do AC_PATH_PROG([krb5_config],krb5-config,[no],$krb5path/bin:$PATH) if test no != $krb5_config; then + [ CPPFLAGS="$CPPFLAGS `$krb5_config --cflags`" - LIBS="$LIBS `$krb5_config --libs`" + CRYPTO_LIBS="$CRYPTO_LIBS `$krb5_config --libs | + $SED 's/-flto=[^[:blank:]]*//g'`" + ] elif test $krb5path != no; then AC_ADD_SEARCH_PATH($krb5path) else AC_ADD_SEARCH_PATH(/usr/kerberos) fi - AC_MSG_CHECKING([for krb5]) - AC_CACHE_VAL(ac_cv_have_krb5, - AC_CHECK_LIB(krb5, krb5_init_context, - ac_cv_have_krb5=yes, ac_cv_have_krb5=no - ) - ) + NETSNMP_SEARCH_LIBS([krb5_init_context], [krb5], + [ac_cv_have_krb5=yes], [ac_cv_have_krb5=no], [], + [CRYPTO_LIBS]) + NETSNMP_SEARCH_LIBS([error_message], [com_err], [], [], [], + [CRYPTO_LIBS]) + AC_MSG_CHECKING([for krb5]) if test $ac_cv_have_krb5 = no; then if test "x$askedkrb5" = "xyes"; then AC_MSG_ERROR(Asked to use krb5 but I couldn't find it.) @@ -183,44 +197,48 @@ do AC_MSG_CHECKING([[for heimdal]]) AC_CACHE_VAL(ac_cv_heimdal, - [AC_TRY_COMPILE( - [#include ], - [const char *v = heimdal_version;], - ac_cv_heimdal=yes, - ac_cv_heimdal=no - )]) + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[const char *v = heimdal_version;]])],[ac_cv_heimdal=yes],[ac_cv_heimdal=no + ])]) AC_MSG_RESULT($ac_cv_heimdal) if test $ac_cv_heimdal = yes; then AC_DEFINE(NETSNMP_USE_KERBEROS_HEIMDAL, 1, [Define this if you're using Heimdal Kerberos]) if test no = $krb5_config; then - LIBS="$LIBS -lkrb5 -lasn1 -lcom_err -lroken" + CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lasn1 -lcom_err -lroken" fi elif test no = $krb5_config; then - LIBS="$LIBS -lkrb5 -lcom_err" + CRYPTO_LIBS="$CRYPTO_LIBS -lkrb5 -lcom_err" fi - AC_MSG_CHECKING([to see which crypto API we need to use]) AC_CACHE_VAL(ac_cv_NETSNMP_USE_KERBEROS_MIT, - AC_CHECK_LIB(k5crypto, krb5_init_context, - ac_cv_NETSNMP_USE_KERBEROS_MIT=yes, ac_cv_NETSNMP_USE_KERBEROS_MIT=no - ) + NETSNMP_SEARCH_LIBS([krb5_init_context], [k5crypto], + [ac_cv_NETSNMP_USE_KERBEROS_MIT=yes], + [ac_cv_NETSNMP_USE_KERBEROS_MIT=no], [], + [CRYPTO_LIBS]) ) + NETSNMP_SEARCH_LIBS([krb5_c_keyed_checksum_types], [k5crypto], [], [], [], + [CRYPTO_LIBS]) + + AC_CHECK_MEMBERS([krb5_keyblock.enctype], [], + [ac_cv_NETSNMP_USE_KERBEROS_MIT=no], + [[#include ]]) + AC_MSG_CHECKING([to see which crypto API we need to use]) if test yes = $ac_cv_NETSNMP_USE_KERBEROS_MIT; then AC_MSG_RESULT(new MIT crypto API) AC_DEFINE(NETSNMP_USE_KERBEROS_MIT, 1, [Define this if we're using the new MIT crypto API]) - if test no = $krb5_config; then - LIBS="$LIBS -lk5crypto" - fi else AC_MSG_RESULT(old MIT crypto API) fi - AC_CHECK_FUNCS([krb5_auth_con_getsendsubkey]) + LIBS="$CRYPTO_LIBS $netsnmp_save_LIBS" + AC_CHECK_FUNCS([krb5_auth_con_getsendsubkey krb5_auth_con_getrecvsubkey]) fi done +LNETSNMPLIBS="$LNETSNMPLIBS $CRYPTO_LIBS" +LIBS=$netsnmp_save_LIBS + new_with_security=$rebuilt_new_with_security # diff --git a/configure.d/config_modules_transports b/configure.d/config_modules_transports index b10b960..d570a6e 100644 --- a/configure.d/config_modules_transports +++ b/configure.d/config_modules_transports @@ -8,7 +8,7 @@ new_with_transport_list=`echo $with_transports | $SED 's/,/ /g;'` new_with_out_transport_list=`echo $with_out_transports | $SED 's/,/ /g;'` # set up the CPP command -MODULECPP="$CPP $PARTIALTARGETFLAGS -I${srcdir} -I${srcdir}/include" +MODULECPP="$CPP $CPPFLAGS $PARTIALTARGETFLAGS -I${srcdir} -I${srcdir}/include" # # Add the default transports to the list @@ -49,7 +49,12 @@ while test "x$new_transport_list" != "x"; do transport_src="transports/snmp"$i"Domain.c" transport_hdr="snmp"$i"Domain.h" rel_transport_src="snmplib/"$transport_src - rel_transport_hdr="include/net-snmp/library/"$transport_hdr + case $i in + IPBase) + rel_transport_hdr="snmplib/transports/$transport_hdr";; + *) + rel_transport_hdr="include/net-snmp/library/$transport_hdr";; + esac lc_i=`echo $i | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ctor_fn="netsnmp_"$lc_i"_ctor" if test -f "$srcdir/$rel_transport_src"; then diff --git a/acconfig.h b/configure.d/config_net_snmp_config_h similarity index 94% rename from acconfig.h rename to configure.d/config_net_snmp_config_h index 12f85c6..cd41a6b 100644 --- a/acconfig.h +++ b/configure.d/config_net_snmp_config_h @@ -1,4 +1,4 @@ -/* +AH_TOP([/* * net-snmp configuration header file * * NOTE: DO NOT EDIT include/net-snmp/net-snmp-config.h.in as your changes @@ -14,6 +14,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, 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 @@ -27,11 +32,9 @@ */ #ifndef NETSNMP_NO_AUTOCONF_DEFINITIONS -/* definitions added by configure on-the-fly */ -@TOP@ -@BOTTOM@ +/* definitions added by configure on-the-fly */]) -/* end of definitions added by configure on-the-fly */ +AH_BOTTOM([/* 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 @@ -39,20 +42,6 @@ #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 @@ -68,8 +57,6 @@ #endif /* NETSNMP_NO_AUTOCONF_DEFINITIONS */ - - /* ********* NETSNMP_MARK_BEGIN_CLEAN_NAMESPACE ********* */ /* * put all new net-snmp-specific definitions here @@ -348,6 +335,10 @@ available. */ #undef NETSNMP_TRANSPORT_UDP_DOMAIN +/* This is defined if support for the shared UDP/IP transport domain is + available. */ +#undef NETSNMP_TRANSPORT_UDPSHARED_DOMAIN + /* This is defined if support for the "callback" transport domain is available. */ #undef NETSNMP_TRANSPORT_CALLBACK_DOMAIN @@ -467,10 +458,10 @@ #if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) # define NETSNMP_USE_INLINE 1 # ifndef NETSNMP_INLINE -# define NETSNMP_INLINE inline +# define NETSNMP_INLINE __inline__ # endif # ifndef NETSNMP_STATIC_INLINE -# define NETSNMP_STATIC_INLINE static inline +# define NETSNMP_STATIC_INLINE static __inline__ # endif #else # define NETSNMP_INLINE @@ -486,10 +477,36 @@ #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) +#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(NETSNMP_DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE) #define NETSNMP_CAN_USE_NLIST #endif +/* + * Note: GCC 4.6 added __BYTE_ORDER__, __ORDER_BIG_ENDIAN__, + * __ORDER_LITTLE_ENDIAN__ and __ORDER_PDP_ENDIAN__ in SVN r165881. For older + * gcc versions and also for other compilers, determine the endianness by + * calling a function that can be inlined. + */ +#if defined(__BYTE_ORDER__) +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define NETSNMP_BIGENDIAN 1 +# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define NETSNMP_BIGENDIAN 0 +# else +# error Unknown byte order +# endif +#else +NETSNMP_STATIC_INLINE int netsnmp_bigendian(void) +{ + union { unsigned long l; unsigned char c; } u; + + u.l = 1; + + return u.c == 0; +} +# define NETSNMP_BIGENDIAN netsnmp_bigendian() +#endif + /* ********* NETSNMP_MARK_BEGIN_LEGACY_DEFINITIONS *********/ /* @@ -645,6 +662,7 @@ #define HPUX11ID NETSNMP_HPUX11ID #define AIXID NETSNMP_AIXID #define MACOSXID NETSNMP_MACOSXID +#define DRAGONFLYID NETSNMP_DRAGONFLYID #define UNKNOWNID NETSNMP_UNKNOWNID #define ENTERPRISE_OID NETSNMP_ENTERPRISE_OID @@ -819,4 +837,4 @@ #endif /* NETSNMP_NO_LEGACY_DEFINITIONS */ -#endif /* NET_SNMP_CONFIG_H */ +#endif /* NET_SNMP_CONFIG_H */]) diff --git a/configure.d/config_os_functions b/configure.d/config_os_functions index 3c5385b..5d61e7f 100644 --- a/configure.d/config_os_functions +++ b/configure.d/config_os_functions @@ -4,6 +4,11 @@ # Checks for library functions. ## ######################################### +# +# Portions of this file are copyrighted by: +# Copyright (c) 2016 VMware, Inc. All rights reserved. +# Use is subject to license terms specified in the COPYING file +# distributed with the Net-SNMP package. ## # Standard checks: @@ -11,39 +16,55 @@ AC_FUNC_ALLOCA # alloca() AC_PROG_GCC_TRADITIONAL -if test "$cross_compiling" = yes -a "${ac_cv_func_memcmp_working+set}" != set -then - # Cross-compiling and ac_cv_func_memcmp_working has not been set - assume - # that memcmp() is available. - ac_cv_func_memcmp_working=yes -else - # Native compilation - test for the availability of memcmp(). - AC_FUNC_MEMCMP -fi - AC_TYPE_SIGNAL ## # Stand-alone function checks: ## # Core: -AC_CHECK_FUNCS([lrand48 rand random ] dnl - [signal sigset ] ) +AC_CHECK_FUNCS([rand random srand srandom lrand48 srand48]) # Library: -AC_CHECK_FUNCS([closedir fgetc_unlocked flockfile ] dnl - [fork funlockfile getipnodebyname ] dnl - [gettimeofday if_nametoindex mkstemp ] dnl +AC_CHECK_FUNCS([asprintf closedir fgetc_unlocked ] dnl + [flockfile funlockfile getipnodebyname ] dnl + [gettimeofday getlogin ] dnl + [if_nametoindex mkstemp ] dnl [opendir readdir regcomp ] dnl [setenv setitimer setlocale ] dnl [setsid snprintf strcasestr ] dnl [strdup strerror strncasecmp ] dnl [sysconf times vsnprintf ] ) +AC_MSG_CHECKING([for _NSGetArgv()]) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [return _NSGetArgv])], + [AC_DEFINE([HAVE__NSGETARGV], [1], + [Define to 1 if you have the `_NSGetArgv' function.]) + AC_MSG_RESULT([yes]) + ], + [AC_MSG_RESULT([no])] +) + +AC_MSG_CHECKING([for _NSGetExecutablePath()]) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], [return _NSGetExecutablePath])], + [AC_DEFINE([HAVE__NSGETEXECUTABLEPATH], [1], + [Define to 1 if you have the `_NSGetExecutablePath' function.]) + AC_MSG_RESULT([yes]) + ], + [AC_MSG_RESULT([no])] +) + # IPv4/IPv6 function checks. AC_CHECK_FUNC() can't find these on MinGW # since these functions have the __cdecl calling convention on MinGW. -case x$target_os in - xmingw*) +case x$with_socklib in + xwinsock2) + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [ closesocket(0); ])], + [ ac_cv_func_closesocket=yes + AS_ECHO "#define HAVE_CLOSESOCKET 1" >>confdefs.h + ], [ ]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [ gai_strerror(0); ])], [ ac_cv_func_gai_strerror=yes @@ -64,7 +85,7 @@ case x$target_os in AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [ gethostbyaddr(NULL); ])], - [ ac_cv_func_gethostaddr=yes + [ ac_cv_func_gethostbyaddr=yes AS_ECHO "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h ], [ ]) @@ -76,32 +97,82 @@ case x$target_os in ;; *) - AC_CHECK_FUNCS([gai_strerror getaddrinfo gethostbyname gethostbyname2 gethostname gethostbyaddr]) + # Do not use fork() nor any related function when using Windows sockets + # because Windows sockets are not compatible with fork(). + AC_CHECK_FUNCS([execv fork signal sigset uname posix_spawn waitpid]dnl + [closesocket gai_strerror getaddrinfo gethostbyname]dnl + [gethostbyname2 gethostname gethostbyaddr]dnl + [inet_ntop inet_pton]) ;; esac +# Check for MSVC functions. +AC_MSG_CHECKING([for _beginthreadex()]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include +#include +], [ _beginthreadex(NULL, 0, NULL, NULL, 0, NULL); ])], +[AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE__BEGINTHREADEX], [1], + [Define if _beginthreadex() is defined in ])], +[AC_MSG_RESULT([no])]) + +AC_MSG_CHECKING([for _cputs()]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],[ _cputs(0); ])], +[AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE__CPUTS], [1], + [Define if _cputs() is defined in ])], +[AC_MSG_RESULT([no])]) + +AC_MSG_CHECKING([for _get_osfhandle()]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],[ _get_osfhandle(0); ])], +[AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE__GET_OSFHANDLE], [1], + [Define if _get_osfhandle() is defined in ])], +[AC_MSG_RESULT([no])]) + +AC_MSG_CHECKING([for _getch()]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],[ return _getch(); ])], +[AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE__GETCH], [1], + [Define if _getch() is defined in ])], +[AC_MSG_RESULT([no])]) + +AC_MSG_CHECKING([for _open_osfhandle()]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include +#include +], [ _open_osfhandle(NULL, 0); ])], +[AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE__OPEN_OSFHANDLE], [1], + [Define if _open_osfhandle() is defined in ])], +[AC_MSG_RESULT([no])]) + + AC_CONFIG_LIBOBJ_DIR([snmplib]) -AC_REPLACE_FUNCS([getopt inet_ntop inet_pton ] dnl +AC_REPLACE_FUNCS([getopt ] dnl [strlcat strlcpy strtok_r ] dnl [strtol strtoul strtoull ] ) # Agent: -AC_CHECK_FUNCS([cgetnext chown execv ] dnl - [gai_strerror getgrnam ] dnl - [gethostname getloadavg ] dnl +AC_CHECK_FUNCS([cgetnext chown endfsent ] dnl + [forkall fsync gai_strerror ] dnl + [getfsent getgrnam gethostname ] dnl + [getloadavg getmntent getmntinfo ] dnl [getpid getpwnam ] dnl [hasmntopt initgroups ] dnl [if_nameindex if_indextoname if_nametoindex ] dnl [localtime_r mkstemp mktime ] dnl - [poll regcomp ] dnl + [poll regcomp setfsent ] dnl [setgid setgroups ] dnl [setmntent setuid ] dnl - [sigaction sigblock sighold ] dnl - [sigprocmask ] dnl + [sigaction sigblock sigprocmask ] dnl [statfs statvfs stime ] dnl - [strncasecmp system ] dnl - [uname usleep ] ) + [strncasecmp system usleep ] ) + +# Agent, Darwin (Apple): +AC_CHECK_FUNCS([vm_region vm_region_64]) # Apps: AC_CHECK_FUNCS([getdtablesize ] dnl @@ -145,12 +216,19 @@ AC_CACHE_VAL( #ifdef HAVE_SYS_FS_TYPES_H #include #endif -main () +#ifdef HAVE_SYS_STATFS_H +#include +#endif +#ifdef HAVE_SYS_STATVFS_H +#include +#endif + +int main(void) { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ -exit (statfs (".", &fsd) != 1); +return statfs (".", &fsd) != 1; }]])], [fu_cv_sys_stat_fs_data=yes], [fu_cv_sys_stat_fs_data=no], @@ -190,7 +268,7 @@ fi # Whether static inline functions are broken (SCO Unixware) # AC_CACHE_CHECK([[whether static inline functions are broken (Unixware)]], - [netsnmp_cv_c_broken_inline], + [netsnmp_cv_broken_inline], AC_COMPILE_IFELSE([AC_LANG_SOURCE([ static inline int nested_inline_function(void) { return 0; @@ -198,11 +276,7 @@ static inline int nested_inline_function(void) { inline int main_inline_function( void ) { return nested_inline_function(); } - ])], - netsnmp_cv_broken_inline=no, - netsnmp_cv_broken_inline=yes)) - - + ])], [[ # Yes - static inline functions are broken (Solaris 2.x) # case "$target_os" in @@ -210,8 +284,11 @@ case "$target_os" in netsnmp_cv_broken_inline=yes ;; *) + netsnmp_cv_broken_inline=no ;; -esac +esac]], [ + netsnmp_cv_broken_inline=yes] +)) if test "$netsnmp_cv_broken_inline" = yes ; then AC_DEFINE(NETSNMP_BROKEN_INLINE, 1, @@ -245,62 +322,42 @@ fi # Check how to print a size_t variable ## -AC_CACHE_CHECK( - [the underlying type of a size_t], - netsnmp_cv_size_t_type, - [m4_foreach([TYPE], [[int],[long],[long long],[short],[char]], - [if [[ x$netsnmp_cv_size_t_type = x ]] ; then - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( -[AC_INCLUDES_DEFAULT() -extern unsigned TYPE variable; -extern size_t variable;], - [])], - [netsnmp_cv_size_t_type="TYPE"]) - fi - ])]) - -AC_MSG_CHECKING([how to printf a size_t]) -case "$netsnmp_cv_size_t_type" in - char|short|int) netsnmp_PRIz="" ;; - long) netsnmp_PRIz="l" ;; - "long long") netsnmp_PRIz="ll" ;; - *) AC_MSG_ERROR([underlying type of size_t not known]) ;; +case x${host_cpu}-${host_vendor}-${host_os} in + x*mingw*) + # MinGW or MinGW-w64. + AC_CACHE_CHECK( + [the underlying type of size_t], + [netsnmp_cv_size_t_type], + [for TYPE in int long "long long" short char; do + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + AC_INCLUDES_DEFAULT() + extern unsigned $TYPE variable; + extern size_t variable; + ], [])], + [netsnmp_cv_size_t_type="$TYPE"]) + if test "x$netsnmp_cv_size_t_type" != x; then break; fi + done]) + + AC_MSG_CHECKING([how to printf a size_t]) + case "$netsnmp_cv_size_t_type" in + char|short|int) + netsnmp_PRIz="";; + long) + netsnmp_PRIz="l";; + "long long") + netsnmp_PRIz="I64";; + *) + AC_MSG_ERROR([underlying type of size_t not known]);; + esac + AC_MSG_RESULT([$netsnmp_PRIz]);; + *) + # Unix or Cygwin. + netsnmp_PRIz="z";; esac -AC_MSG_RESULT($netsnmp_PRIz) AC_DEFINE_UNQUOTED([NETSNMP_PRIz], ["$netsnmp_PRIz"], [Size prefix to use to printf a size_t or ssize_t]) -## -# Check how to print a uint32_t variable -## - -AC_CACHE_CHECK( - [the underlying type of an uint32_t], - netsnmp_cv_uint32_t_type, - [m4_foreach([TYPE], [[char],[short],[int],[long],[long long]], - [if [[ x$netsnmp_cv_uint32_t_type = x ]] ; then - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( -[AC_INCLUDES_DEFAULT() -extern unsigned TYPE variable; -extern uint32_t variable;], - [])], - [netsnmp_cv_uint32_t_type="TYPE"]) - fi - ])]) - -AC_MSG_CHECKING([how to printf a uint32_t]) -case "$netsnmp_cv_uint32_t_type" in - char|short|int) netsnmp_PRI32="" ;; - long) netsnmp_PRI32="l" ;; - "long long") netsnmp_PRI32="ll" ;; - *) AC_MSG_ERROR([underlying type of uint32_t not known]) ;; -esac -AC_MSG_RESULT($netsnmp_PRI32) -AC_DEFINE_UNQUOTED([NETSNMP_PRI32], ["$netsnmp_PRI32"], - [Size prefix to use to printf a uint32_t]) - # check to see if the openssl is good enough for DTLS # (BIO_dgram_get_peer is a macro, not a true function) if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers index 708aa09..584064e 100644 --- a/configure.d/config_os_headers +++ b/configure.d/config_os_headers @@ -11,7 +11,13 @@ AC_HEADER_STDC # , , & AC_HEADER_DIRENT # , , & # Apps: -AC_HEADER_SYS_WAIT # +# Don't use when using Windows sockets +case x$with_socklib in + xwinsock2) + ;; + *) + AC_HEADER_SYS_WAIT # +esac # allow for quick module/library/etc processing checks if test "x$NETSNMP_QUICK_CHECK" = "x" ; then @@ -23,12 +29,12 @@ if test "x$NETSNMP_QUICK_CHECK" = "x" ; then AC_CHECK_HEADERS([getopt.h pthread.h regex.h ] dnl [string.h syslog.h unistd.h ] dnl [stdint.h inttypes.h ] dnl + [process.h ] dnl [sys/param.h ] dnl [sys/select.h ] dnl - [sys/socket.h ] dnl + [sys/syslog.h ] dnl [sys/time.h ] dnl - [sys/timeb.h ] dnl - [sys/un.h ]) + [sys/timeb.h ]) # Library and Agent: AC_CHECK_HEADERS([nlist.h],,,[ @@ -40,8 +46,10 @@ AC_INCLUDES_DEFAULT ]]) # Library: -AC_CHECK_HEADERS([fcntl.h io.h kstat.h ] dnl +AC_CHECK_HEADERS([crt_externs.h ] dnl + [fcntl.h io.h kstat.h ] dnl [limits.h locale.h ] dnl + [mach-o/dyld.h ] dnl [sys/file.h sys/ioctl.h ] dnl [sys/sockio.h sys/stat.h ] dnl [sys/systemcfg.h sys/systeminfo.h ] dnl @@ -54,16 +62,16 @@ AC_CHECK_HEADERS([dlfcn.h err.h fcntl.h fstab.h ] dnl [ grp.h io.h ] dnl [ioctls.h kstat.h kvm.h limits.h ] dnl [ mntent.h mtab.h ] dnl - [ pkglocs.h pwd.h ] dnl + [pkglocs.h pwd.h spawn.h ] dnl [ com_err.h et/com_err.h ] dnl [ utmpx.h utsname.h ]) AC_CHECK_HEADERS([sys/diskio.h sys/dkio.h ] dnl [sys/file.h sys/filio.h sys/fixpoint.h ] dnl - [sys/fs.h sys/ioctl.h sys/loadavg.h sys/mntent.h ] dnl - [sys/mnttab.h sys/pool.h sys/protosw.h sys/pstat.h ] dnl - [sys/sockio.h sys/stat.h sys/statfs.h sys/statvfs.h ] dnl - [sys/stream.h sys/sysget.h sys/sysmp.h ] dnl + [sys/fs.h sys/ioctl.h sys/loadavg.h sys/mntent.h ] dnl + [sys/mnttab.h sys/pool.h sys/protosw.h sys/pstat.h ] dnl + [sys/sockio.h sys/stat.h sys/statfs.h sys/statvfs.h] dnl + [sys/stream.h sys/sysget.h sys/sysmacros.h sys/sysmp.h ] dnl [sys/tcpipstats.h sys/utsname.h sys/vfs.h ] dnl [sys/vm.h sys/vmmac.h sys/vmmeter.h sys/vmparam.h ] dnl [sys/vmsystm.h ]) @@ -72,7 +80,6 @@ AC_CHECK_HEADERS([asm/page.h asm/types.h ] dnl [inet/mib2.h ] dnl [linux/hdreg.h linux/tasks.h ] dnl [machine/param.h ] dnl - [netinet/tcp_fsm.h ] dnl [ufs/fs.h ] dnl [uvm/uvm_extern.h uvm/uvm_param.h ] dnl [vm/vm.h vm/vm_extern.h vm/vm_param.h ]) @@ -80,7 +87,6 @@ AC_CHECK_HEADERS([asm/page.h asm/types.h ] dnl # Apps: AC_CHECK_HEADERS([fcntl.h grp.h pwd.h ] dnl [sys/cdefs.h sys/ioctl.h ] dnl - [sys/socket.h sys/sockio.h ] dnl [sys/time.h ]) # Not-Used: @@ -117,50 +123,38 @@ fi AC_CHECK_HEADERS(sys/swap.h,,, AC_INCLUDES_DEFAULT([]) [ -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif ]) # requiring (FreeBSD) # -# Core: (? Tested above? ) -AC_CHECK_HEADERS([stdlib.h ],,, - [[ -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif - ]]) -# -# Library: -AC_CHECK_HEADERS([malloc.h net/if_dl.h sys/sysctl.h ],,, - [[ -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif - ]]) -# -# Agent: AC_CHECK_HEADERS([malloc.h osreldate.h ] dnl - [machine/types.h net/if_dl.h net/if_types.h ] dnl + [machine/types.h ] dnl [sys/dkstat.h sys/conf.h sys/mbuf.h ] dnl [sys/mount.h sys/proc.h sys/queue.h ] dnl - [sys/sysctl.h sys/user.h ],,, + [sys/user.h ],,, [[ -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif ]]) +case "$target_os" in + linux*) + # is considered deprecated on Linux and including that + # header file triggers a compiler warning. See also + # https://savannah.gnu.org/forum/forum.php?forum_id=9515. + ;; + *) + AC_CHECK_HEADERS([sys/sysctl.h]) + ;; +esac + # requiring (IRIX 6.5) # Agent: # @@ -168,29 +162,18 @@ AC_CHECK_HEADERS([sys/sema.h]) AC_CHECK_HEADERS(sys/hashing.h,,, AC_INCLUDES_DEFAULT([]) [ -#if HAVE_SYS_SEMA_H +#ifdef HAVE_SYS_SEMA_H #include #endif ]) -# requiring (Solaris 9) -# Agent: -# -AC_CHECK_HEADERS(sys/socketvar.h,,, - AC_INCLUDES_DEFAULT([]) - [ -#if HAVE_SYS_SOCKET_H -#include -#endif - ]) - # requiring _KMEMUSER and (BSDi3/IRIX) # Agent: # AC_CHECK_HEADERS(sys/vnode.h,,, [ #define _KMEMUSER 1 -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif ]) @@ -200,13 +183,13 @@ AC_CHECK_HEADERS(sys/vnode.h,,, # AC_CHECK_HEADERS(sys/disklabel.h,,, [[ -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_MACHINE_TYPES_H +#ifdef HAVE_MACHINE_TYPES_H #include #endif ]]) @@ -219,13 +202,13 @@ AC_CHECK_HEADERS([nbutil.h]) # AC_CHECK_HEADERS([ufs/ufs/dinode.h ufs/ufs/quota.h ufs/ufs/inode.h ufs/ffs/fs.h],,, [[ -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_UFS_UFS_DINODE_H +#ifdef HAVE_UFS_UFS_DINODE_H #include #endif -#if HAVE_UFS_UFS_QUOTA_H +#ifdef HAVE_UFS_UFS_QUOTA_H #include #endif ]]) @@ -235,7 +218,7 @@ AC_CHECK_HEADERS([ufs/ufs/dinode.h ufs/ufs/quota.h ufs/ufs/inode.h ufs/ffs/fs.h] # AC_CHECK_HEADERS(vm/swap_pager.h,,, [[ -#if HAVE_VM_VM_H +#ifdef HAVE_VM_VM_H #include #endif ]]) @@ -245,206 +228,130 @@ AC_CHECK_HEADERS(vm/swap_pager.h,,, # AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h],,, [[ -#if HAVE_ASM_TYPES_H +#ifdef HAVE_ASM_TYPES_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_LINUX_NETLINK_H +#ifdef HAVE_LINUX_NETLINK_H #include #endif ]]) - -# Network headers -# Core or Library/Agent/Apps: # -AC_CHECK_HEADERS([arpa/inet.h net/if.h ] dnl - [netinet/in.h netdb.h ],,, - [[ -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_TIMEOUT_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_SYS_SOCKETVAR_H -#include -#endif -#if HAVE_ARPA_INET_H -#include -#endif -#if HAVE_NETINET_IN_SYSTM_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif -#if HAVE_NETINET_IP_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -#if HAVE_NETINET_IP_VAR_H -#include -#endif -#if HAVE_NETINET_IP_ICMP_H -#include -#endif -#if HAVE_NETINET_TCP_H -#include -#endif -#if HAVE_NETINET_UDP_H -#include -#endif -#if HAVE_NETINET_TCP_TIMER_H -#include -#endif - ]]) +# Avoid that on MinGW any networking headers get included that are +# incompatible with by only testing for certain headers if not +# building for one of these two platforms. # -# Agent: -AC_CHECK_HEADERS([net/if_arp.h net/if_mib.h net/if_var.h ] dnl - [netinet/if_ether.h netinet/in_systm.h netinet/in_var.h ] dnl - [netinet/ip.h netinet/ip_icmp.h ] dnl - [netinet/icmp_var.h netinet/ip_var.h ] dnl - [netinet/tcp.h netinet/tcp_timer.h netinet/tcp_var.h] dnl - [netinet/tcpip.h netinet/udp.h netinet/udp_var.h] dnl - [net/route.h netinet/icmp6.h ],,, + +case x$with_socklib in + xwinsock2) + ;; + *) + +AC_CHECK_HEADERS([sys/socket.h]dnl + [sys/un.h]dnl + [netinet/tcp_fsm.h]dnl + [sys/sockio.h]dnl + [sys/socketvar.h]dnl + [net/if_dl.h]dnl + [net/if_types.h]dnl + [arpa/inet.h]dnl + [net/if.h]dnl + [netinet/in.h]dnl + [netdb.h]dnl + [net/if_arp.h]dnl + [net/if_mib.h]dnl + [net/if_var.h]dnl + [netinet/if_ether.h]dnl + [netinet/in_systm.h]dnl + [netinet/in_var.h]dnl + [netinet/ip.h]dnl + [netinet/ip_icmp.h]dnl + [netinet/icmp_var.h]dnl + [netinet/ip_var.h]dnl + [netinet/tcp.h]dnl + [netinet/tcp_timer.h]dnl + [netinet/tcp_var.h]dnl + [netinet/tcpip.h]dnl + [netinet/udp.h]dnl + [netinet/udp_var.h]dnl + [net/route.h]dnl + [netinet/icmp6.h]dnl + [netinet/in_pcb.h]dnl + [netinet/ip6.h]dnl + [netinet6/in6_var.h]dnl + [netinet6/in6_pcb.h]dnl + [netinet6/ip6_var.h]dnl + [netinet6/nd6.h]dnl + [netinet6/tcp6.h]dnl + [netinet6/tcp6_fsm.h]dnl + [netinet6/tcp6_timer.h]dnl + [netinet6/tcp6_var.h]dnl + ,,, [[ -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H #include #endif -#if HAVE_SYS_TIMEOUT_H +#ifdef HAVE_SYS_TIMEOUT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_SOCKETVAR_H +#ifdef HAVE_SYS_SOCKETVAR_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETINET_IN_SYSTM_H +#ifdef HAVE_NETINET_IN_SYSTM_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IP_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NET_IF_VAR_H +#ifdef HAVE_NET_IF_VAR_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_IP_ICMP_H +#ifdef HAVE_NETINET_IP_ICMP_H #include #endif -#if HAVE_NETINET_TCP_H +#ifdef HAVE_NETINET_TCP_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_TCP_TIMER_H +#ifdef HAVE_NETINET_TCP_TIMER_H #include #endif -#if HAVE_NETINET_ICMP6_H -#include -#endif - ]]) - -# KAME (IPv6) headers -# Agent: -# -# KAME -AC_CHECK_HEADERS([netinet/ip6.h ] dnl - [netinet6/in6_var.h netinet6/in6_pcb.h ] dnl - [netinet6/ip6_var.h netinet6/nd6.h ] dnl - [netinet6/tcp6.h netinet6/tcp6_fsm.h ] dnl - [netinet6/tcp6_timer.h netinet6/tcp6_var.h],,, - [[ -#if HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_QUEUE_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -#if HAVE_NET_IF_VAR_H -#include -#endif -#if HAVE_NET_ROUTE_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif -#if HAVE_NETINET_IP6_H +#ifdef HAVE_NETINET_IP6_H #include #endif - ]]) - -# requiring (OpenBSD 2.6) -# Agent: -# -AC_CHECK_HEADERS(netinet/in_pcb.h,,, - [[ -#if HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_TIMEOUT_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_SYS_SOCKETVAR_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif -#if HAVE_NETINET_IN_SYSTM_H -#include -#endif -#if HAVE_NETINET_IP_H -#include -#endif -#if HAVE_NET_ROUTE_H -#include -#endif -#if HAVE_ARPA_INET_H -#include +#ifdef HAVE_NETINET_ICMP6_H +#include #endif ]]) +esac + ## # Pre-requisite on specific types ## @@ -453,6 +360,8 @@ AC_CHECK_HEADERS(netinet/in_pcb.h,,, # (major ugh!) # Agent: # +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ],[])], + AC_CHECK_HEADERS([linux/ethtool.h]), AC_CHECK_HEADERS([linux/ethtool.h],,, [[ #include @@ -461,6 +370,8 @@ typedef __u32 u32; /* ditto */ typedef __u16 u16; /* ditto */ typedef __u8 u8; /* ditto */ ]]) +AC_DEFINE([HAVE_LINUX_ETHTOOL_NEEDS_U64], 1, + [Define if __u8 .. __u64 must be declared explicitly before including ])) ## # Headers requiring particular libraries @@ -509,7 +420,7 @@ case $target_os in ]),, LMIBLIBS),, [[ -#if HAVE_SYS_PROTOSW_H +#ifdef HAVE_SYS_PROTOSW_H #include #endif ]]) @@ -533,11 +444,17 @@ AC_CHECK_HEADERS([windows.h iphlpapi.h], [], [], [ #endif ]) +AC_CHECK_HEADERS([lm.h], [LAGENTLIBS="$LAGENTLIBS -lnetapi32"], [], [ +#ifdef HAVE_WINDOWS_H +#include +#endif +]) + # for MIB-2 info (MinGW) # Core: # if test x$with_socklib = xwinsock2; then - AC_CHECK_HEADERS([winsock.h winsock2.h ws2tcpip.h]) + AC_CHECK_HEADERS([winsock.h winsock2.h ws2tcpip.h],,,[#include ]) fi # diff --git a/configure.d/config_os_libs1 b/configure.d/config_os_libs1 index 35f052a..3ccd41c 100644 --- a/configure.d/config_os_libs1 +++ b/configure.d/config_os_libs1 @@ -46,11 +46,9 @@ if test "x$with_rpm" != "xno"; then ],, $LMIBLIBS, _rpmlibs) # rpm 4.6 has incompatible API, turn on the legacy one - AC_CHECK_DECL([headerGetEntry], - : , - AC_DEFINE([_RPM_4_4_COMPAT], [], [Define if you have RPM 4.6 or newer to turn on legacy API]), - [[#include ]] - ) + NETSNMP_SEARCH_LIBS(headerGet,, [ + AC_DEFINE(HAVE_HEADERGET, 1, + [Define to 1 if you have the headerGet function.])],, $LMIBLIBS) fi # @@ -70,7 +68,7 @@ AC_CHECK_FUNCS(kinfo_get_cpus) # # diskIOLAx requires exp which may require -lm # -AC_SEARCH_LIBS(exp, [m]) +NETSNMP_SEARCH_LIBS([exp], [m],,,, [LMIBLIBS]) # # libkvm @@ -79,10 +77,12 @@ NETSNMP_SEARCH_LIBS(kvm_read, kvm,,,, LAGENTLIBS) NETSNMP_SEARCH_LIBS(kvm_openfiles, kvm,,,, LAGENTLIBS) NETSNMP_SEARCH_LIBS(kvm_getprocs, kvm,,,, LMIBLIBS) NETSNMP_SEARCH_LIBS(kvm_getproc2, kvm,,,, LMIBLIBS) +NETSNMP_SEARCH_LIBS(kvm_getfiles, kvm,,,, LMIBLIBS) +NETSNMP_SEARCH_LIBS(kvm_getfile2, kvm,,,, LMIBLIBS) NETSNMP_SEARCH_LIBS(kvm_getswapinfo, kvm,,,, LMIBLIBS) netsnmp_save_LIBS="$LIBS" LIBS="$LAGENTLIBS $LMIBLIBS $LIBS" -AC_CHECK_FUNCS([kvm_openfiles kvm_getprocs kvm_getproc2 kvm_getswapinfo]) +AC_CHECK_FUNCS([kvm_openfiles kvm_getprocs kvm_getproc2 kvm_getswapinfo kvm_getfiles kvm_getfile2]) LIBS="$netsnmp_save_LIBS" # @@ -93,3 +93,33 @@ netsnmp_save_LIBS="$LIBS" LIBS="$LMIBLIBS $LAGENTLIBS $LSNMPLIBS $LIBS" AC_CHECK_FUNCS([dlopen]) LIBS="$netsnmp_save_LIBS" + +# +# regex in process table +# +if test "x$with_pcre" != "xno"; then + AC_CHECK_HEADER([pcre.h], [ + AC_DEFINE([HAVE_PCRE_H], [1], [Define to 1 if you have .]) + pcre_h=yes + ], + [pcre_h=no] + ) +fi +if test "x$pcreheader_h" = "xno" -o "x$pcre_h" = "xno" ; then + if test "x$with_pcre" = "xyes" ; then + AC_MSG_ERROR([Could not find the pcre header file needed and was specifically asked to use pcre support]) + else + with_pcre=no + fi +fi + +# +# pcre libraries only needed for the ucd process agent mib software +# +if test "x$with_pcre" != "xno"; then + NETSNMP_SEARCH_LIBS([pcre_exec], [pcre], [ + LMIBLIBS="$LMIBLIBS -lpcre" + ],,, LAGENTLIBS) + AC_SUBST(LAGENTLIBS) + AC_SUBST(LMIBLIBS) +fi diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2 index 47491e2..a2c7bf1 100644 --- a/configure.d/config_os_libs2 +++ b/configure.d/config_os_libs2 @@ -16,27 +16,6 @@ # Simple checks: ## -# AC_CHECK_LIB(des, main) -# AC_CHECK_LIB(m, asin) - -# dmalloc -# -if test "${with_dmalloc+set}" = set; then - if test "$with_dmalloc" = yes -a -d $with_dmalloc ; then - AC_ADD_SEARCH_PATH($with_dmalloc) - fi - AC_CHECK_HEADERS([dmalloc.h]) - AC_SEARCH_LIBS([dmalloc_message], [dmalloc]) -fi - -# EFence -# (This used to be on by default for developer checkout) -# -if test "x$use_efence" = "xyes"; then - AC_SEARCH_LIBS([EF_Exit], [efence]) -fi - - # ELF libraries # Typically used for 'nlist' (needed for uptime) # @@ -114,6 +93,20 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([ esac ]) +AC_MSG_CHECKING([for MIB_IF_TABLE2]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #define _WIN32_WINNT 0xffff + #include + #include + #include +],[ + return sizeof(MIB_IF_TABLE2) +])],[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_MIB_IF_TABLE2], 1, + [Define if MIB_IF_TABLE2 is available])], + [AC_MSG_RESULT([no])]) + # libregex (MinGW) # @@ -152,10 +145,12 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([ # kstat library (Solaris) # -NETSNMP_SEARCH_LIBS(kstat_lookup, kstat, - AC_DEFINE(HAVE_LIBKSTAT, 1, - [Define to 1 if you have the `kstat' library (-lkstat).]),,, - LNETSNMPLIBS) +AC_CHECK_LIB(kstat, kstat_lookup, [LNETSNMPLIBS="$LNETSNMPLIBS -lkstat"]) + + +# socket library (Solaris) +# +AC_CHECK_LIB(socket, in6addr_any, [LNETSNMPLIBS="$LNETSNMPLIBS -lsocket"]) # @@ -222,15 +217,46 @@ fi # libnl (netlink) # +# The test below verifies whether the libnl-3 package been installed. +# This test works as follows: +# - If pkg-config was not installed at the time autogen.sh was run, +# the definition of the PKG_CHECK_EXISTS() macro will not be found by +# autogen.sh. Augogen.sh will generate a configure script that prints +# a warning about pkg-config and proceeds as if libnl-3 has not been +# installed. +# - If pkg-config was installed at the time autogen.sh was run, +# the generated configure script will try to detect the presence of +# the libnl-3 library by looking up compile and linker flags in the +# file called libnl-3.pc. +# - pkg-config settings can be overridden via the configure variables +# LIBNL3_CFLAGS and LIBNL3_LIBS (added by the pkg-config m4 macro's to +# the configure script -- see also ./configure --help). +# - The LIBNL3_CFLAGS and LIBNL3_LIBS configure variables can be used +# even if the pkg-config executable is not present on the system on +# which the configure script is run. +# - Although libnl-3 is only used on Linux, test presence of libnl-3 on +# all platforms because this code is the first occurrence in the configure +# script of PKG_* macros and because the search for the pkg-config executable +# only occurs once. +ifdef( + [PKG_CHECK_EXISTS], + [ + PKG_CHECK_EXISTS([libnl-3.0], [PKG_CHECK_MODULES([LIBNL3], [libnl-3.0])]) + ], + [ + AC_MSG_ERROR([pkg-config must be installed before autoconf is run.]) + ] +) + if test "x$with_nl" != "xno"; then case $target_os in linux*) # Check for libnl (linux) netsnmp_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS" + CPPFLAGS="${LIBNL3_CFLAGS} ${LIBNLROUTE3_CFLAGS} $CPPFLAGS" NETSNMP_SEARCH_LIBS(nl_connect, nl-3, [AC_CHECK_HEADERS(netlink/netlink.h) - EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"], - [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS]) + EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNL3_CFLAGS}"], + [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [LMIBLIBS]) if test "x$ac_cv_header_netlink_netlink_h" != xyes; then NETSNMP_SEARCH_LIBS(nl_connect, nl, [ AC_CHECK_HEADERS(netlink/netlink.h)], [], [], LMIBLIBS) @@ -269,49 +295,116 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then AC_CHECK_LIB(RSAglue, RSA_PKCS1_RSAref) fi - AC_MSG_CHECKING([for -leay32]) - netsnmp_save_LIBS="$LIBS" - LIBS="-leay32" - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - #include ], - [return EVP_md5();])], - [AC_MSG_RESULT(yes); ac_cv_lib_eay32_EVP_md5=yes; CRYPTO="eay32"], - [AC_MSG_RESULT(no)] - ) - LIBS="$netsnmp_save_LIBS" - - if test x$CRYPTO = x; then - AC_CHECK_LIB([crypto], [EVP_md5], [CRYPTO="crypto"]) - fi + ifdef( + [PKG_CHECK_EXISTS], + [ + PKG_CHECK_EXISTS([openssl], + [PKG_CHECK_MODULES([OPENSSL], [openssl])]) + if test "x${PKG_CONFIG}" != "x"; then + AC_MSG_NOTICE([OPENSSL_CFLAGS=${OPENSSL_CFLAGS}]) + AC_MSG_NOTICE([OPENSSL_LIBS=${OPENSSL_LIBS}]) + CRYPTO=use_pkg_config_for_openssl + LIBCRYPTO="-lssl ${OPENSSL_LIBS}" + netsnmp_save_LIBS="$LIBS" + LIBS="-lssl ${OPENSSL_LIBS}" + AC_CHECK_FUNC([EVP_md5]) + LIBS="$netsnmp_save_LIBS" + fi + ], + [ + AC_MSG_ERROR([pkg-config must be installed before autoconf is run.]) + ] + ) + + if test "x${PKG_CONFIG}" = "x"; then + AC_MSG_NOTICE([Could not find pkg-config.]) + AC_MSG_CHECKING([for -leay32]) + netsnmp_save_LIBS="$LIBS" + LIBS="-leay32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #include ], + [return EVP_md5();])], + [AC_MSG_RESULT(yes) + ac_cv_lib_eay32_EVP_md5=yes + CRYPTO="eay32" + LIBCRYPTO="-leay32" + ], + [AC_MSG_RESULT(no)] + ) + LIBS="$netsnmp_save_LIBS" + + if test x$CRYPTO = x; then + AC_CHECK_LIB([crypto], [EVP_md5], + [CRYPTO="crypto"; LIBCRYPTO="-lcrypto"], [ + unset ac_cv_lib_crypto_EVP_md5 + AC_CHECK_LIB([crypto], [EVP_md5], + [CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz"], + [], [-lz]) + ]) + fi + fi if test x$CRYPTO != x; then AC_DEFINE(HAVE_LIBCRYPTO, 1, [Define to 1 if you have the OpenSSL library (-lcrypto or -leay32).]) - LIBCRYPTO="-l${CRYPTO}" - AC_CHECK_LIB(${CRYPTO}, AES_cfb128_encrypt, - AC_DEFINE(HAVE_AES_CFB128_ENCRYPT, 1, - [Define to 1 if you have the `AES_cfb128_encrypt' function.])) - - AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create, - AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [], - [Define to 1 if you have the `EVP_MD_CTX_create' function.]) - AC_DEFINE([HAVE_EVP_MD_CTX_DESTROY], [], - [Define to 1 if you have the `EVP_MD_CTX_destroy' function.])) + netsnmp_save_LIBS="$LIBS" + LIBS="$LIBCRYPTO" + AC_CHECK_FUNCS([AES_cfb128_encrypt]dnl + [EVP_sha224 EVP_sha384 ]dnl + [EVP_MD_CTX_create EVP_MD_CTX_destroy]dnl + [EVP_MD_CTX_new EVP_MD_CTX_free ]dnl + [DH_set0_pqg DH_get0_pqg DH_get0_key]dnl + [ASN1_STRING_get0_data X509_NAME_ENTRY_get_object]dnl + [X509_NAME_ENTRY_get_data X509_get_signature_nid]) + AC_MSG_CHECKING([whether 2nd app_verify_cookie_cb() arg is const]) + netsnmp_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + ]],[[ + int (*app_verify_cookie_cb)(SSL *ssl, + const unsigned char *cookie, + unsigned int cookie_len) = NULL; + SSL_CTX_set_cookie_verify_cb(NULL, app_verify_cookie_cb); + ]])], + [AC_MSG_RESULT(yes); ac_cv_saccaq=const], + [AC_MSG_RESULT(no)]) + AC_DEFINE_UNQUOTED([SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER], + [$ac_cv_saccaq], + [Qualifier for second argument of the appverify_cookie_cb() callback function]) + CFLAGS="$netsnmp_save_CFLAGS" + LIBS="$netsnmp_save_LIBS" fi + netsnmp_save_LIBS="$LIBS" + LIBS="-lssl $LIBCRYPTO" + AC_CHECK_FUNCS([ERR_get_error_all]dnl + [OpenSSL_add_all_algorithms OPENSSL_sk_num]dnl + [OPENSSL_sk_value]dnl + [SSL_get1_peer_certificate]dnl + [SSL_library_init SSL_load_error_strings]dnl + [TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl + ) + LIBS="$netsnmp_save_LIBS" if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then - AC_CHECK_LIB(ssl, DTLSv1_method, + if test x$ac_cv_func_DTLSv1_method = xyes -o \ + x$ac_cv_func_DTLS_method = xyes; then AC_DEFINE(HAVE_LIBSSL_DTLS, 1, [Define to 1 if your `ssl' library supports DTLS (-lssl).]) - LIBCRYPTO=" -lssl $LIBCRYPTO", - AC_MSG_ERROR([The DTLS based transports require the libssl library from OpenSSL to be available and support DTLS]) ,-lcrypto) + LIBCRYPTO=" -lssl $LIBCRYPTO" + else + AC_MSG_ERROR([The DTLS based transports require the libssl library from OpenSSL to be available and support DTLS]) + fi TLSPROG=yes fi if echo " $transport_result_list " | $GREP "TLS" > /dev/null; then - AC_CHECK_LIB(ssl, SSL_library_init, + if test x$ac_cv_func_TLSv1_method = xyes -o \ + x$ac_cv_func_TLS_method = xyes; then AC_DEFINE(HAVE_LIBSSL, 1, [Define to 1 if you have the `ssl' library (-lssl).]) - LIBCRYPTO=" -lssl $LIBCRYPTO", - AC_MSG_ERROR([The DTLS based transports require the libssl library from OpenSSL to be available]) ,-lcrypto) + LIBCRYPTO=" -lssl $LIBCRYPTO" + else + AC_MSG_ERROR([The TLS based transports require the libssl library from OpenSSL to be available]) + fi TLSPROG=yes fi if echo " $transport_result_list " | $GREP " SSH " > /dev/null; then @@ -328,16 +421,6 @@ elif test "x$askedpkcs" = "xyes"; then AC_DEFINE(HAVE_LIBPKCS11) LIBPKCS11="-lpkcs11") fi -if test "x$TLSPROG" = "xyes"; then - AC_CHECK_DECL([EVP_sha224], - AC_DEFINE([HAVE_EVP_SHA224], [], [Define if you have EVP_sha224/256 in openssl]), - : , - [[#include ]]) - AC_CHECK_DECL([EVP_sha384], - AC_DEFINE([HAVE_EVP_SHA384], [], [Define if you have EVP_sha384/256 in openssl]), - : , - [[#include ]]) -fi LIBS=$NONAGENTLIBS # restore old libraries if test "x$SSHPROG" = "xyes"; then @@ -453,7 +536,7 @@ if test "$with_libwrap" != "no"; then _wraplibs="$_wraplibs -lwrap -lnsl"], [AC_MSG_RESULT(no) AC_MSG_ERROR(Asked to use libwrap but I couldn't find it.)])]) - LAGENTLIBS="$_wraplibs" + LAGENTLIBS="$LAGENTLIBS $_wraplibs" CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags} LIBS=${_libs} @@ -475,16 +558,38 @@ if test "x$with_mysql" = "xyes" ; then CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}" AC_CHECK_HEADER(mysql.h,, [AC_MSG_ERROR([Could not find mysql.h and was specifically asked to use MySQL support])]) + AC_CHECK_HEADERS([my_global.h my_sys.h]) AC_MSG_CHECKING([whether MY_INIT() works]) AC_LINK_IFELSE([ AC_LANG_PROGRAM( - [[#include - #include ]], + [[#ifdef HAVE_MY_GLOBAL_H + #include + #endif + #ifdef HAVE_MY_SYS_H + #include + #endif + #include ]], [[MY_INIT("my_init_test")]])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_DEFINE([HAVE_BROKEN_LIBMYSQLCLIENT], 1, - [Define if using MY_INIT() causes a linker error])]) + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_MY_INIT], 1, + [Define if MY_INIT() is availabe in libmysqlclient])], + [AC_MSG_RESULT(no)]) + AC_MSG_CHECKING([whether my_load_defaults() exists]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [[#ifdef HAVE_MY_GLOBAL_H + #include + #endif + #ifdef HAVE_MY_SYS_H + #include + #endif + #include ]], + [[my_load_defaults("my_init_test")]])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_MY_LOAD_DEFAULTS], 1, + [Define if having my_load_defaults()])], + [AC_MSG_RESULT(no)]) + AC_CHECK_FUNCS([load_defaults mysql_init mysql_options]) CPPFLAGS="${_cppflags}" LIBS="${_libs}" AC_MSG_CACHE_ADD(MYSQL Trap Logging: enabled) @@ -493,7 +598,20 @@ else fi AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_INCLUDES) - + +## +# libpcap +## +NETSNMP_BUILD_PCAP_PROG_TRUE='#' +NETSNMP_BUILD_PCAP_PROG_FALSE='' +AC_CHECK_LIB([pcap], [pcap_create], [ + AC_CHECK_HEADERS([pcap/pcap.h], [ + NETSNMP_BUILD_PCAP_PROG_TRUE='' + NETSNMP_BUILD_PCAP_PROG_FALSE='#' + ]) +]) +AC_SUBST(NETSNMP_BUILD_PCAP_PROG_TRUE) +AC_SUBST(NETSNMP_BUILD_PCAP_PROG_FALSE) ## # Non-library checks @@ -502,3 +620,15 @@ AC_SUBST(MYSQL_INCLUDES) # nlist AC_CHECK_FUNCS(nlist nlist64 knlist) +NETSNMP_SEARCH_LIBS([endwin], [curses ncurses], [ + AC_CHECK_HEADERS([curses.h]) + AC_CHECK_HEADERS([ncurses/curses.h]) + HAVE_LIBCURSES=TRUE], + [HAVE_LIBCURSES=FALSE],, + [LIBCURSES]) +AC_SUBST([HAVE_LIBCURSES]) +AC_SUBST([LIBCURSES]) + +# libm for ceil +# +NETSNMP_SEARCH_LIBS(ceil, m,,,, LNETSNMPLIBS) diff --git a/configure.d/config_os_misc2 b/configure.d/config_os_misc2 index e2a8ff5..b0b4bca 100644 --- a/configure.d/config_os_misc2 +++ b/configure.d/config_os_misc2 @@ -27,7 +27,10 @@ fi # Check for OpenSSL # -if test "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a "x$ac_cv_lib_eay32_EVP_md5" != "xyes" -o "x$ac_cv_header_openssl_hmac_h" != "xyes"; then +if test \( "x$ac_cv_func_EVP_md5" != "xyes" -a \ + "x$ac_cv_lib_crypto_EVP_md5" != "xyes" -a \ + "x$ac_cv_lib_eay32_EVP_md5" != "xyes" \) -o \ + "x$ac_cv_header_openssl_hmac_h" != "xyes"; then if test "x$askedopenssl" = "xyes"; then AC_MSG_ERROR(Asked to use OpenSSL but I couldn't find it.) fi @@ -54,6 +57,12 @@ if test "x$CRYPTO" = "xinternal" ; then AC_MSG_RESULT(Internal Crypto Support) elif test "x$useopenssl" != "xno" ; then authmodes="MD5 SHA1" + if test "x$ac_cv_func_EVP_sha224" = xyes; then + authmodes="$authmodes SHA224 SHA256" + fi + if test "x$ac_cv_func_EVP_sha384" = xyes; then + authmodes="$authmodes SHA384 SHA512" + fi if test "x$enable_privacy" != "xno" ; then if test "x$ac_cv_header_openssl_aes_h" = "xyes" ; then encrmodes="DES AES" @@ -86,6 +95,13 @@ fi if test "x$enable_md5" = "xno"; then authmodes=`echo $authmodes | $SED 's/MD5 *//;'` fi +if test "x$ac_cv_func_AES_cfb128_encrypt" = xyes || + test "x$CRYPTO" = xinternal; then + encrmodes="$encrmodes AES128" + if test "x$aes_capable" = "xyes"; then + encrmodes="$encrmodes AES192 AES192C AES256 AES256C" + fi +fi AC_SUBST(LNETSNMPLIBS) AC_SUBST(LAGENTLIBS) diff --git a/configure.d/config_os_misc3 b/configure.d/config_os_misc3 index 17aff48..547ba7e 100644 --- a/configure.d/config_os_misc3 +++ b/configure.d/config_os_misc3 @@ -9,12 +9,3 @@ # Compilation characteristics ## -# Byte order -# -if test "$with_endianness" = "big"; then - ac_cv_c_bigendian=yes -elif test "$with_endianness" = "little" ; then - ac_cv_c_bigendian=no -fi -AC_C_BIGENDIAN(,, - [AC_MSG_ERROR([Failed to figure out host endianness, please use --with-endianness to specify it.])]) diff --git a/configure.d/config_os_misc4 b/configure.d/config_os_misc4 index cc8bad2..4c445d6 100644 --- a/configure.d/config_os_misc4 +++ b/configure.d/config_os_misc4 @@ -49,23 +49,6 @@ AC_CACHE_CHECK([for location of system kernel], AC_DEFINE_UNQUOTED(KERNEL_LOC,"$ac_cv_KERNEL_LOC", [location of UNIX kernel]) -# /dev/kmem existence -# used in agent only -# -AC_CACHE_CHECK([for /dev/kmem], - ac_cv_HAVE_KMEM, - [if test $CDEV_TEST_FLAG /dev/kmem; then - ac_cv_HAVE_KMEM="/dev/kmem" - fi -]) -# -# Note that it's OK if this device is not found -# -if test "x$ac_cv_HAVE_KMEM" = "x/dev/kmem"; then - AC_DEFINE_UNQUOTED(HAVE_KMEM,"$ac_cv_HAVE_KMEM", [Define if you have /dev/kmem]) -fi - - # Swap device Location # (/dev/dmem or /dev/drum) # used in agent only @@ -127,26 +110,25 @@ fi AC_CACHE_CHECK([for correct flags to ps], ac_cv_ps_flags, [ -if test "`($PSPROG -e 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-e" -elif test "`($PSPROG -el 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-el" -elif test "`($PSPROG acx 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="acx" -elif test "`($PSPROG -acx 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-acx" -elif test "`($PSPROG -o pid,tt,state,time,ucomm 2>&1) | $EGREP ' ps *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="-o pid,tt,state,time,ucomm" -elif test "`($PSPROG ax 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps" ; then - ac_cv_ps_flags="ax" -elif test "x$PARTIALTARGETOS" = "xcygwin"; then - ac_cv_ps_flags="-e" -elif test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then - ac_cv_ps_flags="-e" -else - AC_MSG_WARN([Unable to determine valid ps flags... defaulting...]) - ac_cv_ps_flags="-acx" -fi +case "x$PARTIALTARGETOS" in + xcygwin|xmingw32*) + ac_cv_ps_flags="-e";; + *) + ac_cv_ps_flags="" + for args in -e -el acx -acx "-o pid,tt,state,time,ucomm" ax; do + if test "`($PSPROG $args 2>&1) | $EGREP ' (ps) *$' | awk '{print $NF}'`" = "ps"; then + ac_cv_ps_flags=$args + break + fi + done + if test "x${ac_cv_ps_flags}" = x; then + AC_MSG_WARN([Unable to determine valid ps flags... defaulting...]) + ac_cv_ps_flags="-acx" + elif $PSPROG $ac_cv_ps_flags -J 0 >/dev/null 2>&1; then + ac_cv_ps_flags="$ac_cv_ps_flags -J 0" + fi + ;; +esac ]) PSCMD="$PSPROG $ac_cv_ps_flags" @@ -184,26 +166,29 @@ if test $cross_compiling = yes; then else AC_CACHE_CHECK([if sysctl can read kernel information], ac_cv_NETSNMP_CAN_USE_SYSCTL, - [AC_TRY_RUN([ -#if TIME_WITH_SYS_TIME + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H # include #endif #include -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H # include #endif +#include +#include -main() { +int main(void) +{ int mib[2]; size_t len; struct timeval boottime; @@ -212,16 +197,9 @@ main() { mib[1] = KERN_BOOTTIME; len = sizeof(boottime); - sysctl(mib, 2, &boottime, &len, NULL, NULL); - if (boottime.tv_sec != 0) - exit(0); - else - exit(1); + return 1 - (sysctl(mib, 2, &boottime, &len, NULL, 0) == 0 && boottime.tv_sec); } - ], - ac_cv_NETSNMP_CAN_USE_SYSCTL=yes, - ac_cv_NETSNMP_CAN_USE_SYSCTL=no, - ac_cv_NETSNMP_CAN_USE_SYSCTL=no)]) + ]])],[ac_cv_NETSNMP_CAN_USE_SYSCTL=yes],[ac_cv_NETSNMP_CAN_USE_SYSCTL=no],[ac_cv_NETSNMP_CAN_USE_SYSCTL=no])]) fi if test "x$ac_cv_NETSNMP_CAN_USE_SYSCTL" = "xyes"; then @@ -230,20 +208,19 @@ fi # Check whether TCP timer constants are indeed constant -# or depend on the kernel clock tick 'hz'. (FreeBSD 4.x) +# or depend on the kernel clock tick 'hz'. (FreeBSD) # # If the latter, then we will need to have a local # variable 'hz' defined and with a suitable value, # whenever we want to use one one of these 'constants'. # -# used in agent only -# AC_CACHE_CHECK([whether TCP timers depend on 'hz'], ac_cv_TCPTV_NEEDS_HZ, [AC_EGREP_CPP(hz, [ #include -TCPTV_SRTTDFLT +TCPTV_MIN +TCPTV_REXMTMAX ], ac_cv_TCPTV_NEEDS_HZ=yes, ac_cv_TCPTV_NEEDS_HZ=no)]) @@ -251,7 +228,7 @@ TCPTV_SRTTDFLT if test "x$ac_cv_TCPTV_NEEDS_HZ" = "xyes"; then AC_DEFINE(TCPTV_NEEDS_HZ, 1, [Define if the TCP timer constants in - depend on the integer variable 'hz'. @<:@FreeBSD 4.x@:>@]) + depend on the integer variable 'hz'. @<:@FreeBSD@:>@]) fi @@ -266,42 +243,38 @@ case $target_os in AC_CHECK_HEADERS(inet/ip.h,ac_inet_ip_h=yes,ac_inet_ip_h=no, AC_INCLUDES_DEFAULT([]) [ -#if HAVE_SYS_STREAM_H +#ifdef HAVE_SYS_STREAM_H #include #endif -#if HAVE_INET_COMMON_H +#ifdef HAVE_INET_COMMON_H #include #endif ]) if test $ac_inet_ip_h = yes ; then AC_CACHE_CHECK([for mib2_ipRouteEntry_t in inet/mib2.h], ac_cv_mib2_ipRouteEntry_t, - [AC_TRY_COMPILE([ -#if HAVE_INET_MIB2_H + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_INET_MIB2_H #include #endif - ],[ + ]], [[ mib2_ipRouteEntry_t testit; if(sizeof(testit)) return(0); - ], - ac_cv_mib2_ipRouteEntry_t=yes, - ac_cv_mib2_ipRouteEntry_t=no)]) + ]])],[ac_cv_mib2_ipRouteEntry_t=yes],[ac_cv_mib2_ipRouteEntry_t=no])]) if test "x$ac_cv_mib2_ipRouteEntry_t" = "xyes" ; then AC_CACHE_CHECK([whether IRE_CACHE is defined in inet/ip.h], ac_cv_ire_cache, - [AC_TRY_COMPILE([ -#if HAVE_INET_IP_H + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_INET_IP_H #include #endif - ],[ + ]], [[ int testit=IRE_CACHE; if(testit) return(0); - ], - ac_cv_ire_cache=yes, - ac_cv_ire_cache=no)]) + ]])],[ac_cv_ire_cache=yes],[ac_cv_ire_cache=no])]) else ac_cv_ire_cache=no fi @@ -318,6 +291,30 @@ And this can be very slow.]) ;; esac +# Check whether SO_BINDTODEVICE is available. +# + +AC_MSG_CHECKING([for SO_BINDTODEVICE]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include +#include +], [ +return SO_BINDTODEVICE +])], +[AC_DEFINE([HAVE_SO_BINDTODEVICE], [1], + [Define to 1 if SO_BINDTODEVICE is available]) + AC_MSG_RESULT([yes])], +[AC_MSG_RESULT([no])]) + +# Check whether struct in_pktinfo.ipi_spec_dst is available. +# + +AC_CHECK_MEMBERS([struct in_pktinfo.ipi_spec_dst], [], [], [ +#include +#include +#include +]) + # Check whether IP_PKTINFO is usable. # @@ -330,6 +327,7 @@ AC_CACHE_CHECK([for IP_PKTINFO ], #include #include #include +#include /* inet_ntoa() */ ], [ void *buf; int len; @@ -379,6 +377,7 @@ AC_CACHE_CHECK([for IP_RECVDSTADDR ], #include #include #include +#include /* inet_ntoa() */ ], [ void *buf; int len; diff --git a/configure.d/config_os_progs b/configure.d/config_os_progs index 160134c..955ef2c 100644 --- a/configure.d/config_os_progs +++ b/configure.d/config_os_progs @@ -53,24 +53,15 @@ fi AC_CHECK_PROGS(FIND, find) AC_CHECK_PROGS(WHOAMI, whoami logname, whoami) -AC_PATH_PROG(AUTOCONF, autoconf) -AC_PATH_PROG(AUTOHEADER, autoheader) +AC_PATH_PROG(AUTOCONF, autoconf, [:]) +AC_PATH_PROG(AUTOHEADER, autoheader, [:]) AC_PATH_PROG([PERLPROG], perl) AC_PATH_PROG([PSPROG], ps) -AC_PATH_PROG([PYTHONPROG],python) +AC_PATH_PROG([PYTHONPROG],python3) AC_PATH_PROG([UNAMEPROG], uname) AC_DEFINE_UNQUOTED(UNAMEPROG,"$UNAMEPROG", [Where is the uname command]) -if test "x$ac_cv_prog_AUTOCONF" = "x"; then - AUTOCONF=":" - AC_SUBST(AUTOCONF) -fi -if test "x$ac_cv_prog_AUTOHEADER" = "x"; then - AUTOHEADER=":" - AC_SUBST(AUTOHEADER) -fi - MAKE=${MAKE-"make"} $MAKE -v -f /dev/null 2>/dev/null | $GREP GNU >/dev/null have_gnu_make=$? @@ -104,7 +95,6 @@ AC_PROG_CPP LINKCC=${LINKCC-"$CC"} AC_SUBST(LINKCC) -AC_AIX AC_C_CONST AC_C_INLINE @@ -112,6 +102,7 @@ AC_C_INLINE # LT_PREREQ([2.2.6]) LT_INIT([win32-dll]) +LT_LANG([Windows Resource]) AC_SUBST(LIBTOOL_DEPS) @@ -125,16 +116,34 @@ AC_SUBST(LIBTOOL_DEPS) if test "x$developer" != "xno" -a -f $srcdir/remove-files; then developer="yes" fi -AC_MSG_CHECKING([for developer gcc flags]) if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then - + AC_MSG_CHECKING([for developer gcc flags]) # WWWXXX - strict type checking # - DEVFLAGS="-Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual" + netsnmp_save_CFLAGS="$CFLAGS" + for opt in -Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wcast-qual \ + -Wimplicit-fallthrough=2 -Wlogical-op -Wundef \ + -Wno-format-truncation -Wno-missing-field-initializers \ + -Wno-sign-compare -Wno-unused-parameter + do + AC_MSG_CHECKING([whether the compiler supports $opt]) + if test x$opt != x-Wstrict-prototypes; then + CFLAGS="-Werror $opt $CFLAGS" + else + CFLAGS="$opt $CFLAGS" + fi + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + AC_MSG_RESULT([yes]) + DEVFLAGS="$DEVFLAGS $opt" + ], [ + AC_MSG_RESULT([no]) + ]) + CFLAGS="$netsnmp_save_CFLAGS" + done + AC_MSG_RESULT($DEVFLAGS) else DEVFLAGS="" fi -AC_MSG_RESULT($DEVFLAGS) AC_SUBST(DEVFLAGS) @@ -189,27 +198,38 @@ changequote([, ]) AC_MSG_CACHE_ADD(Building for: $PARTIALTARGETOS) +# Avoid conflicts on Cygwin between and the openssl header files. +case x$target_os in + xcygwin*|xmingw32*) + CPPFLAGS="-DVC_EXTRALEAN -DWIN32_LEAN_AND_MEAN $CPPFLAGS";; +esac + + # -# Whether or not Cygwin's ld recognizes the flag -no-undefined. +# Whether the linker supports the flag -Wl,-no-undefined. Do not use +# -Wl,-no-undefined on OpenBSD because it breaks linking of shared +# libraries. Use -Wl,-no-undefined on all other platforms such that +# undefined symbols are detected at compile time instead of at runtime. # case x$target_os in -xcygwin*) - saved_LDFLAGS=$LDFLAGS - - AC_MSG_CHECKING([whether the linker supports -no-undefined]) - LDFLAGS="$saved_LDFLAGS -Wl,-no-undefined" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AC_MSG_RESULT([yes]); dnl - LD_NO_UNDEFINED=-no-undefined], - [AC_MSG_RESULT([no])]) - - LDFLAGS="$saved_LDFLAGS" - ;; + xopenbsd*) + ;; + *) + if ! echo "$CFLAGS" | grep -q -- -fsanitize=; then + saved_LDFLAGS=$LDFLAGS + AC_MSG_CHECKING([whether the linker supports -Wl,-no-undefined]) + LDFLAGS="$saved_LDFLAGS -Wl,-no-undefined" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AC_MSG_RESULT([yes]); dnl + LD_NO_UNDEFINED=-Wl,-no-undefined], + [AC_MSG_RESULT([no])]) + LDFLAGS="$saved_LDFLAGS" + AC_SUBST(LD_NO_UNDEFINED) + fi + ;; esac -AC_SUBST(LD_NO_UNDEFINED) - # # Socket library: either 'default' (non-MinGW) or 'winsock2' (MinGW). @@ -217,9 +237,7 @@ AC_SUBST(LD_NO_UNDEFINED) case x$target_os in xmingw*) with_socklib=winsock2 - if test "x$enable_ipv6" = "xyes"; then - CFLAGS="-D_WIN32_WINNT=0x0501 $CFLAGS" - fi + CPPFLAGS="-D_WIN32_WINNT=0xffff -DWIN32 $CPPFLAGS" ;; *) with_socklib=default;; @@ -363,6 +381,8 @@ esac # Compiler flags: # +CFLAGS="-DNETSNMP_REMOVE_U64 $CFLAGS" + # The Net-SNMP source code is not strict-aliasing safe, so add # -fno-strict-aliasing to $CFLAGS if the compiler supports it. AC_MSG_CHECKING([whether the compiler supports -fno-strict-aliasing]) @@ -401,13 +421,16 @@ case $target_os in fi ;; - darwin8*|darwin9*|darwin10*|darwin11*|darwin12*|darwin13*) + darwin*) # Flat Namespace linking (Mac OS/X) # AC_MSG_CHECKING([whether darwin ld might need -flat_namespace]) if test -z "$MACOSX_DEPLOYMENT_TARGET"; then - LDFLAGS="-flat_namespace -framework CoreFoundation -framework CoreServices -framework DiskArbitration -framework IOKit $LDFLAGS" - AC_MSG_RESULT([yes]) + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="-flat_namespace -framework CoreFoundation -framework CoreServices -framework DiskArbitration -framework IOKit $LDFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [AC_MSG_RESULT([yes])], + [LDFLAGS="$saved_LDFLAGS"; AC_MSG_RESULT([no])]) else AC_MSG_RESULT([no]) fi diff --git a/configure.d/config_os_struct_members b/configure.d/config_os_struct_members index 7f6b2c0..8c073c7 100644 --- a/configure.d/config_os_struct_members +++ b/configure.d/config_os_struct_members @@ -25,10 +25,10 @@ AC_CHECK_MEMBERS([struct arphd.at_next],,,[ #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IF_ETHER_H +#ifdef HAVE_NETINET_IF_ETHER_H #include #endif ]]) @@ -52,7 +52,7 @@ fi AC_CHECK_MEMBERS([struct dirent.d_type],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H #include #endif ]]) @@ -84,10 +84,10 @@ AC_CHECK_MEMBERS([struct ipstat.ips_cantfrag, struct ipstat.ips_reassembled],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif ]]) @@ -97,10 +97,10 @@ AC_CHECK_MEMBERS([struct ipstat.ips_cantfrag, AC_CHECK_MEMBERS([struct ip6stat.ip6s_exthdrtoolong ],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET6_IP6_VAR_H +#ifdef HAVE_NETINET6_IP6_VAR_H #include #endif ]]) @@ -111,10 +111,10 @@ AC_CHECK_MEMBERS([struct ipstat.ips_cantforward, struct ipstat.ips_fragtimeout],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif ]]) @@ -127,10 +127,10 @@ AC_CHECK_MEMBERS([struct mbstat.m_clusters, struct mbstat.m_mbufs],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_MBUF_H +#ifdef HAVE_SYS_MBUF_H #include #endif ]]) @@ -140,6 +140,7 @@ AC_CHECK_MEMBERS([struct mbstat.m_clusters, AC_CHECK_MEMBERS([struct uvmexp.pgswapin],,,[ AC_INCLUDES_DEFAULT() [ +#include #include ]]) @@ -149,7 +150,7 @@ AC_CHECK_MEMBERS([struct nlist.n_value, struct nlist64.n_value],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_NLIST_H +#ifdef HAVE_NLIST_H #include #endif ]]) @@ -160,12 +161,7 @@ AC_CHECK_MEMBERS([struct nlist.n_value, AC_CHECK_MEMBERS([struct sigaction.sa_sigaction],,,[ AC_INCLUDES_DEFAULT() [ -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_SIGNAL_H -#include -#endif +#include ]]) # struct sockaddr @@ -219,7 +215,7 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,[ AC_CHECK_SIZEOF([sockaddr_un.sun_path],,[ AC_INCLUDES_DEFAULT [ -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif struct sockaddr_un sockaddr_un; @@ -235,7 +231,7 @@ AC_CHECK_MEMBERS([struct statfs.f_favail, struct statfs.f_frsize],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_PARAM_H @@ -257,10 +253,10 @@ AC_CHECK_MEMBERS([struct statvfs.f_files, struct statvfs.mnt_dir],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H #include #endif -#if HAVE_SYS_STATVFS_H +#ifdef HAVE_SYS_STATVFS_H #include #endif ]]) @@ -274,7 +270,7 @@ AC_CHECK_MEMBERS([struct swdevt.sw_nblksenabled],,,[ #ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_CONF_H +#ifdef HAVE_SYS_CONF_H #include #endif ]]) @@ -305,14 +301,14 @@ AC_CHECK_MEMBERS([struct tcpstat.tcp_rcvmemdrop],,,[ # struct tm # Library: # -AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ +AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.tm_isdst],,,[ AC_INCLUDES_DEFAULT() [ -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -320,28 +316,39 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ #endif ]]) -# extern timezone -AC_MSG_CHECKING([extern timezone]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#if TIME_WITH_SYS_TIME +AC_CHECK_DECLS([daylight,timezone],,,[ +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -]], [[ - return timezone; -]])], [ -AC_MSG_RESULT([yes]) -AC_DEFINE([HAVE_TIMEZONE_VARIABLE], [1], [Define if a timezone variable is declared in ]) -], [ -AC_MSG_RESULT([no]) ]) +AC_MSG_CHECKING([whether timezone is a scalar]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +]], [[ +int a[2]; +return &a[timezone] != NULL; +]])], [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_SCALAR_TIMEZONE], [1], + [Define if timezone declared as a scalar in ])], + [AC_MSG_RESULT([no])]) + # struct timezone # Library: # @@ -351,7 +358,7 @@ AC_CHECK_MEMBERS([struct timezone.tz_dsttime],,,[ #ifdef HAVE_SYS_TIMEB_H # include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else @@ -374,16 +381,16 @@ AC_CHECK_MEMBERS([struct udpstat.udps_discard, struct udpstat.udps_opackets],,,[ AC_INCLUDES_DEFAULT() [ -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_NETINET_IP_VAR_H +#ifdef HAVE_NETINET_IP_VAR_H #include #endif -#if HAVE_NETINET_UDP_H +#ifdef HAVE_NETINET_UDP_H #include #endif -#if HAVE_NETINET_UDP_VAR_H +#ifdef HAVE_NETINET_UDP_VAR_H #include #endif ]]) @@ -615,7 +622,7 @@ AC_CACHE_CHECK([type of rtentry structure], # BSD 4.4 compatible structure # ('rt_nodes' array) # - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_SYS_PARAM_H #include #endif @@ -633,7 +640,7 @@ AC_CACHE_CHECK([type of rtentry structure], #undef KERNEL #undef _KERNEL #include - ],[ + ]], [[ #ifndef HAVE_STRUCT_RTENTRY_RT_DST #define rt_dst rt_nodes->rn_key @@ -642,13 +649,13 @@ AC_CACHE_CHECK([type of rtentry structure], struct rtentry rt; rt.rt_nodes[0].rn_flags = 1; rt.rt_dst; - ], ac_cv_RTENTRY_TYPE="BSD-4.4") + ]])],[ac_cv_RTENTRY_TYPE="BSD-4.4"],[]) if test "x$ac_cv_RTENTRY_TYPE" = "x"; then # BSD 4.3 compatible structure # ('rt_hash') # - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_SYS_PARAM_H #include #endif @@ -666,11 +673,11 @@ AC_CACHE_CHECK([type of rtentry structure], #undef KERNEL #undef _KERNEL #include - ],[ + ]], [[ struct rtentry rt; rt.rt_hash; - ], ac_cv_RTENTRY_TYPE="BSD-4.3") + ]])],[ac_cv_RTENTRY_TYPE="BSD-4.3"],[]) fi if test "x$ac_cv_RTENTRY_TYPE" = "x"; then @@ -713,3 +720,20 @@ fi AC_DEFINE_UNQUOTED(RTENTRY,struct ${ac_cv_struct_rtentry}, [define rtentry to ortentry on SYSV machines (alphas)]) +# prioritynames +AC_MSG_CHECKING([syslog prioritynames]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +#ifdef HAVE_SYSLOG_H +#define SYSLOG_NAMES +#include +#endif +]], [[ + char *test = prioritynames[0].c_name; + printf("%s\n", test); /* so it's not unused */ +]])], [ +AC_MSG_RESULT([yes]) +AC_DEFINE([HAVE_PRIORITYNAMES], [1], [Define if prioritynames variable is declared in ]) +], [ +AC_MSG_RESULT([no]) +]) diff --git a/configure.d/config_project_ipv6_types b/configure.d/config_project_ipv6_types index 35886a1..b476cff 100644 --- a/configure.d/config_project_ipv6_types +++ b/configure.d/config_project_ipv6_types @@ -45,6 +45,15 @@ AC_CHECK_TYPES([mib2_ipIfStatsEntry_t],,,[#include ]) # the later 'config_types' sub-script # +# Darwin: check whether or not struct in_ifaddr is available. +# +# +AC_CHECK_MEMBERS([struct in_ifaddr.ia_subnetmask],,,[ +#ifdef HAVE_NETINET_IN_VAR_H +#include +#endif +]) + ## # Determine the IPv6 stack type @@ -55,20 +64,19 @@ AC_CHECK_TYPES([mib2_ipIfStatsEntry_t],,,[#include ]) # if test "x$enable_ipv6" = "xyes"; then - v6type=unknown v6lib=none v6trylibc=no AC_MSG_CHECKING([[ipv6 stack type]]) - for i in v6d toshiba kame inria zeta linux-glibc linux-inet6 cygwin winsock2 generic; do - case $i in + for v6type in v6d toshiba kame zeta generic; do + case $v6type in v6d) AC_EGREP_CPP(yes, [ #include #ifdef __V6D__ yes #endif], - [v6type=$i; v6lib=v6; + [v6lib=v6; v6libdir=/usr/local/v6/lib; CFLAGS="-I/usr/local/v6/include $CFLAGS"]) ;; @@ -78,7 +86,7 @@ yes #ifdef _TOSHIBA_INET6 yes #endif], - [v6type=$i; v6lib=inet6; + [v6lib=inet6; v6libdir=/usr/local/v6/lib; CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) ;; @@ -88,81 +96,30 @@ yes #ifdef __KAME__ yes #endif], - [v6type=$i; v6lib=inet6; + [v6lib=inet6; v6libdir=/usr/local/v6/lib; v6trylibc=yes; CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) ;; - inria) - AC_EGREP_CPP(yes, [ -#include -#ifdef IPV6_INRIA_VERSION -yes -#endif], - [v6type=$i; - v6lib=dummy; - v6libdir=none; - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) - ;; zeta) AC_EGREP_CPP(yes, [ #include #ifdef _ZETA_MINAMI_INET6 -A yes #endif], - [v6type=$i; v6lib=inet6; + [v6lib=inet6; v6libdir=/usr/local/v6/lib; CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) ;; - linux-glibc) - AC_EGREP_CPP(yes, [ -#include -#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC_ > 2)) -yes -#endif], - [v6type=$i; - v6lib=dummy; - v6libdir=none; - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) - ;; - linux-inet6) - if test -d /usr/inet6; then - v6type=$i - v6lib=inet6 - v6libdir=/usr/inet6/lib - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS" - fi - ;; - cygwin) - AC_EGREP_CPP(yes, [ -#include -#ifdef _CYGWIN_IN6_H -yes -#endif], - [v6type=$i; - v6lib=dummy; - v6libdir=none - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) - ;; - winsock2) - AC_EGREP_CPP(yes, [ -#include -#if defined(_WS2TCPIP_H) -yes -#endif], - [v6type=$i; - v6lib=dummy; - v6libdir=none - v6trylibc=yes; - CFLAGS="-DNETSNMP_ENABLE_IPV6 $CFLAGS"]) - ;; generic) AC_MSG_RESULT([[postponed]]) - AC_CHECK_MEMBER([struct sockaddr_in6.sin6_addr],,,[ + AC_CHECK_MEMBER([struct sockaddr_in6.sin6_addr],,,[[ +#ifdef HAVE_WINSOCK2_H +#include +#ifdef HAVE_WS2TCPIP_H +#include +#endif +#endif] AC_INCLUDES_DEFAULT() [#ifdef HAVE_SYS_PARAM_H #include @@ -176,7 +133,6 @@ AC_INCLUDES_DEFAULT() ]]) AC_MSG_CHECKING([[ipv6 stack type]]) if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = "xyes"; then - v6type=$i v6lib=dummy v6libdir=none v6trylibc=yes @@ -184,7 +140,7 @@ AC_INCLUDES_DEFAULT() fi ;; esac - if test "$v6type" != "unknown"; then + if test "$v6lib" != "none"; then break fi done @@ -202,6 +158,7 @@ AC_INCLUDES_DEFAULT() exit 1 fi else + v6type="unknown" enable_ipv6="no" AC_MSG_RESULT(["$v6type, $enable_ipv6"]) fi diff --git a/configure.d/config_project_paths b/configure.d/config_project_paths index 9690c84..da480a7 100644 --- a/configure.d/config_project_paths +++ b/configure.d/config_project_paths @@ -80,7 +80,7 @@ AC_SUBST(SNMPSHAREPATH) # if test "x$NETSNMP_DEFAULT_MIBDIRS" = "x"; then NETSNMP_DEFAULT_MIBDIRS="\$HOME/.snmp/mibs:$SNMPSHAREPATH/mibs" - if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc" -o "x$PARTIALTARGETOS" = "xcygwin"; then + if test "x$PARTIALTARGETOS" = "xmingw32" -o "x$PARTIALTARGETOS" = "xmingw32msvc"; then # # USe Windows-style path separator NETSNMP_DEFAULT_MIBDIRS=`echo "$NETSNMP_DEFAULT_MIBDIRS" | $SED 's/:/;/g'` diff --git a/configure.d/config_project_perl_python b/configure.d/config_project_perl_python index 23f8c7e..e5c8531 100644 --- a/configure.d/config_project_perl_python +++ b/configure.d/config_project_perl_python @@ -84,10 +84,10 @@ if test "x$install_perl" != "xno" ; then # What compiler was used to build the perl binary? # - if test "xenable_perl_cc_checks" != "xno" ; then + if test "x$enable_perl_cc_checks" != "xno" ; then AC_MSG_CHECKING([for Perl cc]) changequote(, ) - PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'` + PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/.]+).;\s*/$1/);'` changequote([, ]) if test "x$PERLCC" != "x" ; then AC_MSG_RESULT([$PERLCC]) @@ -98,44 +98,44 @@ if test "x$install_perl" != "xno" ; then AC_MSG_ERROR([Could not determine the compiler that was used to build $myperl. Either set the environment variable PERLPROG to a different perl binary or use --without-perl-modules to build without Perl.]) fi fi - fi - # Was GCC used to build the perl binary? - # - if test "x$install_perl" != "xno" ; then - AC_MSG_CHECKING([whether $PERLCC is a GNU C compiler]) - OLDCC=$CC - CC="$PERLCC" - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([], [[ + # Was GCC used to build the perl binary? + # + if test "x$install_perl" != "xno" ; then + AC_MSG_CHECKING([whether $PERLCC is a GNU C compiler]) + OLDCC=$CC + CC="$PERLCC" + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([], [[ #ifndef __GNUC__ choke me #endif - ]])], [perlcc_is_gnu=yes], [perlcc_is_gnu=no]) - AC_MSG_RESULT([$perlcc_is_gnu]) - CC=$OLDCC - - # Check compatability: Gnu Net-SNMP vs Non-Gnu perl - # - if test "x$GCC" = "xyes" -a "x$perlcc_is_gnu" = "xno" ; then - if test "x$install_perl" = "xtry" ; then - install_perl="no" - else - AC_MSG_ERROR([This build is using a GNU C compiler ($CC) while Perl has been compiled with a non-GNU (or non-working) compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules).]) - fi - fi - fi - - # Check compatability: Non-Gnu Net-SNMP vs Gnu perl - # - if test "x$install_perl" != "xno" ; then - if test "x$GCC" != "xyes" -a "x$perlcc_is_gnu" = "xyes" ; then - if test "x$install_perl" = "xtry" ; then - install_perl="no" - else - AC_MSG_ERROR([This build is using a non-GNU C compiler ($CC) while Perl has been compiled with a GNU compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules).]) - fi - fi + ]])], [perlcc_is_gnu=yes], [perlcc_is_gnu=no]) + AC_MSG_RESULT([$perlcc_is_gnu]) + CC=$OLDCC + + # Check compatability: Gnu Net-SNMP vs Non-Gnu perl + # + if test "x$GCC" = "xyes" -a "x$perlcc_is_gnu" = "xno" ; then + if test "x$install_perl" = "xtry" ; then + install_perl="no" + else + AC_MSG_ERROR([This build is using a GNU C compiler ($CC) while Perl has been compiled with a non-GNU (or non-working) compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules).]) + fi + fi + fi + + # Check compatability: Non-Gnu Net-SNMP vs Gnu perl + # + if test "x$install_perl" != "xno" ; then + if test "x$GCC" != "xyes" -a "x$perlcc_is_gnu" = "xyes" ; then + if test "x$install_perl" = "xtry" ; then + install_perl="no" + else + AC_MSG_ERROR([This build is using a non-GNU C compiler ($CC) while Perl has been compiled with a GNU compiler ($PERLCC). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules).]) + fi + fi + fi fi # Are we clear to proceed? diff --git a/configure.d/config_project_types b/configure.d/config_project_types index ec9c85a..1b4c66b 100644 --- a/configure.d/config_project_types +++ b/configure.d/config_project_types @@ -13,45 +13,139 @@ AC_TYPE_OFF_T AC_TYPE_PID_T AC_HEADER_TIME +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], + [int x __attribute__((deprecated))])], + [attr="__attribute__((deprecated))"], + [attr="/**/"]) +AC_DEFINE_UNQUOTED([NETSNMP_ATTRIBUTE_DEPRECATED], [${attr}], + [Used to make the compiler issue a warning about deprecated functions and variables]) + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], + [int x __attribute__((unused))])], + [attr="__attribute__((unused))"], + [attr="/**/"]) +AC_DEFINE_UNQUOTED([NETSNMP_ATTRIBUTE_UNUSED], [${attr}], + [Used to suppress compiler warnings about unused functions and variables]) ## # More complex checks: ## -# Check for 'socklen_t' (HP-UX) +# Check for 'socklen_t', 'in_addr_t' and 'ssize_t'. # -AC_CHECK_TYPES([socklen_t],,,[ -#include -#if STDC_HEADERS +AC_CHECK_TYPES([socklen_t, in_addr_t, ssize_t],,,[ +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#endif #include #include +#ifdef HAVE_SYS_TYPES_H +#include #endif #ifdef HAVE_SYS_SOCKET_H #include +#endif +#ifdef HAVE_NETINET_IN_H +#include #endif]) +if test "x$ac_cv_type_in_addr_t" != xyes; then +AC_DEFINE([in_addr_t], [unsigned long], + [in_addr_t definition if not defined in . Must match the type of sockaddr_in::sin_addr]) +fi -# Check for 'in_addr_t' -# May be in (AIX) # -AC_CHECK_TYPES([in_addr_t],,,[ -#include -#if STDC_HEADERS -#include +# Determine the type of fd_set::fds_bits on Unix systems. +# + +netsnmp_save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror" + +AC_MSG_CHECKING([for the type of fd_set::fds_bits]) +for type in __fd_mask __int32_t unknown; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +#include #include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif]) +#include + ], [ + fd_set set; + memset(&set, 0, sizeof(set)); + { + ${type} *fds_array = set.fds_bits; + return fds_array != NULL; + } + ])], [break]) +done +AC_MSG_RESULT(${type}) +AC_DEFINE_UNQUOTED([NETSNMP_FD_MASK_TYPE], [${type}], + [Type of fd_set::fds_bits]) +CFLAGS=$netsnmp_save_CFLAGS -# Check for 'ssize_t' -# Not necessarily in (older MinGW) # -AC_CHECK_TYPES([ssize_t],,,[ -#include -#if STDC_HEADERS -#include +# Check for the type of the fifth argument of select() +# + +netsnmp_save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror" + +AC_MSG_CHECKING([for the type of the fifth argument of select()]) +arg_type="struct timeval" +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ +# The compiler supports -Werror. +for t in "struct timeval" "struct __ms_timeval"; do +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#else +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#endif #include -#endif]) +], [return select(0, NULL, NULL, NULL, ($t *)NULL)])], + [arg_type=$t; break]) +done +], [ +: # The compiler does not support -Werror. +]) +AC_MSG_RESULT(${arg_type}) +AC_DEFINE_UNQUOTED([NETSNMP_SELECT_TIMEVAL], [${arg_type}], + [Type of the fifth argument of select()]) + +AC_MSG_CHECKING([for the type of the third argument of ioctlsocket()]) +arg_type=unknown +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ +# The compiler supports -Werror. +for t in "unsigned int" "unsigned long"; do +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ +#if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) +#include +#include +#else +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#endif +#include +], [return ioctlsocket(0, 0, ($t *)NULL)])], + [arg_type=$t; break]) +done +], [ +: # The compiler does not support -Werror. +]) +AC_MSG_RESULT(${arg_type}) +AC_DEFINE_UNQUOTED([NETSNMP_IOCTLSOCKET_ARG], [${arg_type}], + [Type of the third argument of ioctlsocket()]) + +CFLAGS=$netsnmp_save_CFLAGS diff --git a/configure.d/config_project_with_enable b/configure.d/config_project_with_enable index 61ba026..cdf56de 100644 --- a/configure.d/config_project_with_enable +++ b/configure.d/config_project_with_enable @@ -27,6 +27,8 @@ AC_ARG_WITH(endianness, cross-compiling.], [if test $with_endianness != "big" -a $with_endianness != "little" ; then AC_MSG_ERROR([Endianness must be big or little, not "$with_endianness".]); + else + AC_MSG_WARN([--with-endianness is obsolete]) fi ]) @@ -57,14 +59,6 @@ AC_SUBST(LIBTOOLFLAGS) # System: Library settings ## -NETSNMP_ARG_WITH(dmalloc, - AS_HELP_STRING([--with-dmalloc=PATH], - [Use dmalloc library (www.dmalloc.com)])) - -NETSNMP_ARG_WITH(efence, -[ --with-efence Look for and use libefence (malloc).], - use_efence="$withval") - tryrsaref=no NETSNMP_ARG_WITH(rsaref, [ --with-rsaref=PATH Look for librsaref in PATH/lib.], @@ -80,6 +74,7 @@ NETSNMP_ARG_WITH(rsaref, tryopenssl=defaultyes askedopenssl=no +aes_capable=no NETSNMP_ARG_WITH(openssl, [ --with-openssl=PATH Look for openssl in PATH/lib, or PATH may be "internal" to build with @@ -107,6 +102,14 @@ if test "x$tryopenssl" = "xdefaultyes"; then AC_ADD_SEARCH_PATH(/usr/local/ssl) tryopenssl=yes fi +if test "x$tryopenssl" = "xyes"; then + AC_CHECK_HEADERS( + [openssl/aes.h openssl/evp.h], + [aes_capable=yes], + [] + ) +fi + AC_ARG_WITH([ssl],,NETSNMP_INVALID_WITH([openssl])) AC_ARG_ENABLE([ssl],,NETSNMP_INVALID_WITH([openssl])) @@ -158,6 +161,11 @@ NETSNMP_ARG_WITH(rpm, module.]) +NETSNMP_ARG_WITH(pcre, +[ --without-pcre Don't include pcre process searching + support in the agent.], + with_pcre="$withval", with_pcre="maybe") + ## # Project: Build configuration settings ## @@ -405,6 +413,17 @@ if test "x$enable_internal_md5" = "xyes"; then fi fi +NETSNMP_ARG_ENABLE(blumenthal-aes, +[ --enable-blumenthal-aes Enable AES-192/AES-256 (Blumenthal draft)]) +if test "x$enable_blumenthal_aes" = "xyes"; then + if test "x$aes_capable" = "xyes"; then + AC_DEFINE([NETSNMP_DRAFT_BLUMENTHAL_AES_04], 1, + [Define if AES-192/AES-256 encryption should be supported]) + else + AC_MSG_ERROR([Blumenthal draft requires OpenSSL with AES functions enabled]) + fi +fi + ## # Project: Library: Misc configuration @@ -426,11 +445,13 @@ if test "x$with_opaque_special_types" != "xno"; then fi NETSNMP_ARG_ENABLE(ipv6, -[ --enable-ipv6 Generate IPv6 ready version.], - [if test "x$enable_ipv6" = "xyes"; then - AC_DEFINE(NETSNMP_ENABLE_IPV6, 1, - [define if you want to enable IPv6 support]) - fi]) +[ --disable-ipv6 Disable IPv6 support.], + [],dnl default to "yes" + [enable_ipv6="yes"]) +if test "x$enable_ipv6" != "xno"; then + AC_DEFINE(NETSNMP_ENABLE_IPV6, 1, + [define if you want to enable IPv6 support]) +fi NETSNMP_ARG_WITH(logfile, [ --with-logfile="location" Default log file location for snmpd.], @@ -439,6 +460,21 @@ if test "$ac_cv_user_prompt_NETSNMP_LOGFILE" = "no"; then ac_cv_user_prompt_NETSNMP_LOGFILE="none" fi +NETSNMP_ARG_ENABLE(usmUser-uses-default-auth-priv, +[ --enable-usmUser-uses-default-auth-priv Use default auth/priv protocols; createUser + only needs auth/priv passphrases.], + [if test "x$enable_usmUser_uses_default_auth_priv" = "xyes"; then + AC_DEFINE(NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV, 1, + [if defined always use default auth/priv protocol when creating usmUsers]) + fi]) + +NETSNMP_ARG_ENABLE(daemons-syslog-as-default, +[ --enable-daemons-syslog-as-default Use syslog when no other log destination defined.], + [if test "x$enable_daemons_syslog_as_default" = "xyes"; then + AC_DEFINE(NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG, 1, + [if defined daemons will use syslog when no log destination is defined]) + fi]) + NETSNMP_ARG_WITH(persistent-directory, [ --with-persistent-directory="directory" Default directory for persistent data storage.],ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY="$with_persistent_directory") @@ -539,6 +575,9 @@ AC_ARG_WITH(out_transports, This transport is available for Linux, Solaris and FreeBSD at least. This transport is compiled in by default if IPv6 support is enabled. + UDPshared Allows a UDP port to be shared with multiple transports. It + enables multiple notification destinations to share a single + source address/port. TCPIPv6 support for SNMP over UDP/IPv6. This transport is available for Linux, Solaris and FreeBSD at least. @@ -690,6 +729,15 @@ if test "x$with_dummy_values" != "xyes"; then data for]) fi +NETSNMP_ARG_WITH(systemd, +[ --with-systemd Provide systemd support. See README.systemd + for details.]) +# Define unless specifically suppressed (i.e., option defaults to false). +if test "x$with_systemd" != "xyes"; then + AC_DEFINE(NETSNMP_NO_SYSTEMD, 1, + [If you don't want to integrate with systemd.]) +fi + NETSNMP_ARG_ENABLE(set-support, [ --disable-set-support Do not allow SNMP set requests.]) if test "x$enable_set_support" = "xno"; then @@ -1016,9 +1064,10 @@ NETSNMP_ARG_WITH(perl-modules, [ Perl: --with-perl-modules[=ARGS] Install the Perl modules along with the rest - of the net-snmp toolkit. If ARGS is - specified, they're passed to the - Makefile.PL script.],[ + of the net-snmp toolkit. If ARGS is specified, + they're passed to the Makefile.PL script. Use + --with-perl-modules=verbose while debugging + the Makefile.PL files],[ if test "$withval" = "no"; then install_perl="no" else diff --git a/dist/RELEASE-INSTRUCTIONS b/dist/RELEASE-INSTRUCTIONS index 56a4161..032a0c9 100644 --- a/dist/RELEASE-INSTRUCTIONS +++ b/dist/RELEASE-INSTRUCTIONS @@ -1,9 +1,9 @@ This is a summary of the steps required to make a new release. Do not attempt to run these manually - instead use the 'makerelease' application and makerelease.xml file. Get 'makerelease' from the -makerelease SVN repository: +makerelease repository: - svn co https://makerelease.svn.sourceforge.net/svnroot/makerelease/trunk/makerelease + git clone https://github.com/hardaker/makerelease cd makerelease perl Makefile.PL make @@ -67,7 +67,7 @@ STEP: 1.4: Release Parameter Information Floating point VERSION: {VERSIONFLOAT} - SVN Branch URL: {BRANCHPATH} + Branch URL: {BRANCHPATH} STEP: 1.5: update @@ -444,7 +444,7 @@ STEP: 5: Make the Release This is it! After this point it's much harder to turn back. If everything is ok until this point and you're ready to actually stamp the - release in SVN and make release files, these steps will do that for you. + release in git and make release files, these steps will do that for you. ===== Entering Step: 5 ===== @@ -775,7 +775,7 @@ Note: This is the last stage that is handled by the "makerelease" script news item on the project home page - including the NEWS snippet of significant changes since the last release. - 17) Update the following htdocs files (in the main SVN trunk): + 17) Update the following htdocs files (in the main git trunk): htdocs/download.html htdocs/dev/schedule.html @@ -801,7 +801,7 @@ Note: This is the last stage that is handled by the "makerelease" script Wikipedia entries. 20) For a release on the most recent development line, update the - 'htdocs/page-top.html' file (in the main SVN trunk) to reference + 'htdocs/page-top.html' file (in the main git trunk) to reference the latest version. Update the following files with any changes: @@ -818,9 +818,9 @@ Note: This is the last stage that is handled by the "makerelease" script 21) For a major new-feature release (i.e. 5.x), create the patches branch: - $ svn copy /tags/Ext-5-x /branches/V5-x-patches + $ git co -b V5-x-patches - and update the SVN main trunk with a new version number: + and update the git main trunk with a new version number: $ local/Version-Munge.pl -v 5.(x+1).dev -M -P -C @@ -852,7 +852,7 @@ Note: This is the last stage that is handled by the "makerelease" script net-snmp.spec snmpd-init.d snmptrapd-init.d Note that any files removed should also be deleted from - SVN repository. + git repository. *************************************************************************** @@ -863,7 +863,7 @@ CREATING BINARY DISTRIBUTIONS binaries again. This ensures that everything (especially perl modules) are properly linked against the right libraries. - 1) always build releases from a tarball, not from SVN. + 1) always build releases from a tarball, not from git. 2) Add mib modules that are common. Basically, add: @@ -990,7 +990,7 @@ Updating README, NEWS, and CHANGES files However, leaving some examples here for quick referral: - SVN commit messages that generate auto-NEWS and auto-CHANGES + git commit messages that generate auto-NEWS and auto-CHANGES extractions should be formatted like the following examples: NEWS: snmpd: I did something really cool to the agent diff --git a/dist/autoconf-version b/dist/autoconf-version index 264f2ce..b93b4f2 100644 --- a/dist/autoconf-version +++ b/dist/autoconf-version @@ -1 +1 @@ -2.68 +2.71 diff --git a/dist/cvsshow b/dist/cvsshow deleted file mode 100644 index 7539595..0000000 --- a/dist/cvsshow +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -export CVS_RSH=ssh -TAG= - -do_cvs() -{ - DIR=$1 - if [ ! -f $DIR/CVS/Repository ]; then - echo "'$DIR' has no CVS/Repository!" - exit - fi - - if [ ! -f $DIR/CVS/Root ]; then - echo "'$DIR' has no CVS/Root!" - exit - fi - - if [ -f $DIR/CVS/Tag ]; then - TAG="-r `cat $DIR/CVS/Tag | cut -c 2-`" - fi - - REP="`cat $DIR/CVS/Repository`" - ROOT="`cat $DIR/CVS/Root`" - - echo "Directory $DIR is rooted at $ROOT, $TAG $REP..." - echo " update with cvs -z3 -d $ROOT -q co $TAG -d $DIR $REP" -} - -do_svn() -{ - DIR=$1 - if [ ! -d $DIR/.svn ]; then - echo "'$DIR' has no .svn/ subdir!" - exit - fi - - ROOT=`svn info | grep URL|cut -f2 -d " "` - if [ -z "$ROOT" ]; then - echo "Couldn't find root from $DIR/.svn/entries" - exit 1 - fi - - echo "Directory $DIR is rooted at $ROOT..." - echo " update with svn co $ROOT $DIR" -} - -if [ $# -eq 0 ]; then - DIRS=. -else - DIRS=$@ -fi - -for d in $DIRS -do - if [ ! -d $d ]; then - echo "no such directory '$d'" - exit - fi - - if [ -d $d/CVS ]; then - do_cvs $d - elif [ -d $d/.svn ]; then - do_svn $d - else - echo "'$d' has neither CVS nor SVN information!" - fi -done - diff --git a/dist/cvsup b/dist/cvsup deleted file mode 100644 index ca07b0f..0000000 --- a/dist/cvsup +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -# -# $Id$ -# -CVS_RSH=ssh; export CVS_RSH -TAG= -WO=0 -DEST= - -if [ "x$1" = "x-u" ]; then - DEST=$2 - shift 2 - - # gnu tar (as of 1.15.1) is unable to create portable tar archives, - # especially if long file names (>100 char) are present. - # star is a better replacement. - if [ -x /usr/bin/star ]; then - TAR='/usr/bin/star -Hustar -not -pat="*/CVS/*" -c -f' - elif [ -x /bin/tar ]; then - TAR="/bin/tar --exclude=CVS -c -f" - echo "warning: star not available, using (less portable) tar..." - else - echo "neither /usr/bin/star nor /bin/tar found." - exit - fi -fi - -if [ $# -eq 0 ]; then - DIR=$PWD -else - if [ $# -ne 1 ]; then - echo "usage: $0 " - exit - fi - DIR=$1 -fi - -if [ -z ${DIR##*/} ];then - DIR=${DIR%/*} -fi -SUBD=${DIR##*/} -PARENT=${DIR%*$SUBD} -#echo "$DIR = $PARENT + $SUBD" - -if [ ! -d $DIR ]; then - echo "no such directory '$DIR'" - exit -fi - -if [ ! -d $DIR/CVS ]; then - echo "'$DIR' has no CVS directory!" - exit -fi - -if [ ! -f $DIR/CVS/Repository ]; then - echo "'$DIR' has no CVS/Repository!" - exit -fi - -if [ ! -f $DIR/CVS/Root ]; then - echo "'$DIR' has no CVS/Root!" - exit -fi - -if [ -f $DIR/CVS/Tag ]; then - TAG=`cat $DIR/CVS/Tag | cut -c 2-` - CMDTAG="-r $TAG" -fi - -REP="`cat $DIR/CVS/Repository`" -ROOT="`cat $DIR/CVS/Root`" - -cd $DIR -#echo $PWD -# COMMAND="cvs -q -z3 -d $ROOT co $TAG -d $DIR $REP" - -COMMAND="cvs -q -z3 -d $ROOT update -P -d $CMDTAG" - -if [ ! -w $DIR/CVS ]; then - if [ -O $DIR/CVS ]; then - WO=1 - echo "Making $DIR writable" - chmod -R u+w $DIR - fi -fi - -echo "Updating directory $DIR with $TAG $REP..." -echo "$COMMAND" - -$COMMAND -rc=$? -if [ $rc -ne 0 ]; then - echo "cvs command returned $?" -fi - -if [ $WO -eq 1 ]; then - echo "Making $DIR read-only" - chmod -R a-w $DIR -fi - -if [ ! -z $DEST ]; then - if [ -z $TAG ]; then - TAG=MAIN - fi - - if [ $rc -ne 0 ]; then - echo "skipping upload" - else - cd .. -# echo $PWD - DATE=`date +%Y%m%d_%H%M` - SOURCE=$REP-cvs-$TAG"_$DATE" - $TAR /tmp/$SOURCE.tar $SUBD - gzip -f --best /tmp/$SOURCE.tar - scp /tmp/$SOURCE.tar.gz $DEST - rm -f /tmp/$SOURCE.tar.gz - fi -fi diff --git a/dist/makerelease.xml b/dist/makerelease.xml index 021a2b7..7c069bd 100644 --- a/dist/makerelease.xml +++ b/dist/makerelease.xml @@ -38,10 +38,10 @@ parameter="VERSION"> Please enter the version number to publish. Net-SNMP - convention dictates that this be a version number like 5.4 or - 5.4.1. Pre-releases that occur before a branch freezes should - be appended with ".preN" like 5.4.1.pre2. Release-candidates - should be labeled ".rcN" like 5.4.1.rc1. + convention dictates that this be a version number like 5.7 or + 5.7.1. Pre-releases that occur before a branch freezes should + be appended with ".preN" like 5.7.1.pre2. Release-candidates + should be labeled ".rcN" like 5.7.1.rc1. + title="Running diff to check changes"> Check the following changes for proper version number differences before we commit the chances. @@ -274,28 +274,33 @@ - + Note in 'dist/release' that this branch is in release candidate mode - git checkout V5-4-patches - echo {BRANCHPATH} rc >> dist/release + git checkout V5-7-patches + grep -v {BRANCHPATH} dist/release > dist/release.new + echo {BRANCHPATH} rc >> dist/release.new + mv dist/release.new dist/release git commit -m "Release Candidate for {BRANCHPATH}" dist/release git checkout {BRANCHPATH} - git merge V5-4-patches - git commit + grep -v {BRANCHPATH} dist/release > dist/release.new + echo {BRANCHPATH} rc >> dist/release.new + mv dist/release.new dist/release + git commit -m "Release Candidate for {BRANCHPATH}" dist/release - + Ensure that 'dist/release' doesn't reference this branch - git checkout V5-4-patches + git checkout V5-7-patches grep -v {BRANCHPATH} dist/release > dist/release.new mv dist/release.new dist/release git commit -m "{BRANCHPATH} out of Release Candidate" dist/release git checkout {BRANCHPATH} - git merge V5-4-patches + grep -v {BRANCHPATH} dist/release > dist/release.new + mv dist/release.new dist/release git commit @@ -320,7 +325,7 @@ done. After this step, we'll commit all the modified files. You may find additional files (marked with a ?) that should - be added to the svn repository and you'll need to do this by + be added to the repository and you'll need to do this by hand before going on to the next step. Note: based on a recent net-snmp-admin discussion, we're no @@ -368,7 +373,7 @@ Then we need to build the code - NETSNMP_DONT_CHECK_VERSION=1 make + NETSNMP_DONT_CHECK_VERSION=1 make 2>&1 | tee -a make-$(date +%y%m%d_%H%M).log @@ -376,7 +381,7 @@ set up test results. If not, this needs to be fixed or at least understood and accepted as is for some other reason. - make test + make test 2>&1 | tee -a make-test-$(date +%y%m%d_%H%M).log @@ -499,13 +504,13 @@ - This will actually svn copy the current checked out branch + This will actually copy the current checked out branch to the new tag name. Specifically: - git tag -u E0F81533 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" + git tag -u 6E6718AEF1EB5C65C32D1B2A356BC0B552D53CAB -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" - git tag -u E0F81533 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" + git tag -u 6E6718AEF1EB5C65C32D1B2A356BC0B552D53CAB -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" @@ -540,12 +545,12 @@ - gpg --use-agent -u E0F81533 -a --detach-sign net-snmp-{VERSION}.tar.gz + gpg --use-agent -u 6E6718AEF1EB5C65C32D1B2A356BC0B552D53CAB -a --detach-sign net-snmp-{VERSION}.tar.gz - gpg --use-agent -u E0F81533 -a --detach-sign net-snmp-{VERSION}.zip + gpg --use-agent -u 6E6718AEF1EB5C65C32D1B2A356BC0B552D53CAB -a --detach-sign net-snmp-{VERSION}.zip - cd net-snmp-{VERSION} && make + cd net-snmp-{VERSION} && make 2>&1 | tee -a make-$(date +%y%m%d_%H%M).log - cd net-snmp-{VERSION} && make test + cd net-snmp-{VERSION} && make test 2>&1 | tee -a make-test-$(date +%y%m%d_%H%M).log @@ -614,17 +619,7 @@ is just as an example - this script does *not* upload the files automatically. You must do something like: - echo rsync -v net-snmp-{VERSION}.tar.gz net-snmp-{VERSION}.tar.gz.asc net-snmp-{VERSION}.zip net-snmp-{VERSION}.zip.asc hardaker,net-snmp@frs.sourceforge.net:/home/frs/project/n/ne/net-snmp/net-snmp/{VERSIONTARGET}-pre-releases/ - - - - This will copy the results to the SF uploads directory - in your account on frs.sourceforge.net. The following command - is just as an example - this script does *not* upload the - files automatically. You must do something like: - - echo rsync -v net-snmp-{VERSION}.tar.gz net-snmp-{VERSION}.tar.gz.asc net-snmp-{VERSION}.zip net-snmp-{VERSION}.zip.asc hardaker,net-snmp@frs.sourceforge.net:/home/frs/project/n/ne/net-snmp/net-snmp/{VERSIONTARGET}/ + echo rsync -v net-snmp-{VERSION}.tar.gz net-snmp-{VERSION}.tar.gz.asc net-snmp-{VERSION}.zip net-snmp-{VERSION}.zip.asc $USER@frs.sourceforge.net:/home/frs/project/net-snmp/net-snmp/{VERSIONTARGET}-pre-releases/ - + Binaries: build rpms, .tar.gzs, etc. @@ -677,16 +672,7 @@ - - Add a note to the source forge news system: - - http://sourceforge.net/news/submit.php?group_id=12694 - - - echo firefox 'http://sourceforge.net/news/submit.php?group_id=12694' - - - + Send an announcement message to one of the following mailing lists based on its type: @@ -698,23 +684,14 @@ (one week after the source tarball is made available) - + Update the topic on the #Net-SNMP channel if this is a - trunk based release. - - - - Update the freshmeat listing (Wes needs to do this): - - http://freshmeat.net/projects/net-snmp/ + trunk based release (or the latest on the top most patch tree). - - echo firefox http://freshmeat.net/projects/net-snmp/ - - + Advertise: NEWS upload to sf, publish on -announce, freshmeat, and the GNU FSF directory diff --git a/dist/net-snmp.spec b/dist/net-snmp.spec index 893adbe..316c0b2 100644 --- a/dist/net-snmp.spec +++ b/dist/net-snmp.spec @@ -35,25 +35,31 @@ %if 0%{?netsnmp_embedded_perl} || 0%{?netsnmp_perl_modules} %define netsnmp_include_perl 1 %endif -Summary: Tools and servers for the SNMP protocol +Summary: Tools and services for the SNMP protocol Name: net-snmp -Version: 5.7.3 +Version: 5.9.4 # update release for vendor release. (eg 1.fc6, 1.rh72, 1.ydl3, 1.ydl23) Release: 1 URL: http://www.net-snmp.org/ License: BSDish Group: System Environment/Daemons Vendor: Net-SNMP project -Source: http://prdownloads.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz -Prereq: openssl +Source: net-snmp-%{version}.tar.gz Obsoletes: cmu-snmp ucd-snmp ucd-snmp-utils BuildRoot: /tmp/%{name}-root Packager: The Net-SNMP Coders -Requires: openssl, popt, rpm, zlib, bzip2-libs, elfutils-libelf, glibc -BuildRequires: perl, elfutils-libelf-devel, openssl-devel, bzip2-devel, rpm-devel +Requires: openssl, popt, rpm, zlib, bzip2-libs, glibc +# Net-SNMP requires either openssl-devel or libressl-devel at build time, but +# how to express this in an RPM spec file? +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bzip2 +BuildRequires: gcc +BuildRequires: perl +BuildRequires: rpm-devel %if 0%{?netsnmp_embedded_perl} -BuildRequires: perl(ExtUtils::Embed) Requires: perl +BuildRequires: perl(ExtUtils::Embed) %endif %if 0%{?fedora}%{?rhel} @@ -62,6 +68,7 @@ Provides: net-snmp-libs, net-snmp-utils Obsoletes: net-snmp-libs, net-snmp-utils Epoch: 2 +# RHEL or Fedora %if 0%{?fedora} >= 9 Provides: net-snmp-gui Obsoletes: net-snmp-gui @@ -70,7 +77,7 @@ Obsoletes: net-snmp-gui %else BuildRequires: beecrypt-devel %endif -%endif # RHEL or Fedora +%endif %description @@ -89,7 +96,7 @@ This package includes embedded Perl support within the agent. Group: Development/Libraries Summary: The includes and static libraries from the Net-SNMP package. AutoReqProv: no -Requires: net-snmp = %{epoch}:%{version} +Requires: net-snmp = %{?%{epoch}:%{epoch}\:}%{version} Obsoletes: cmu-snmp-devel ucd-snmp-devel %description devel @@ -101,7 +108,7 @@ useful for building SNMP applications, agents, and sub-agents. Group: System Environment/Libraries Summary: The Perl modules provided with Net-SNMP AutoReqProv: no -Requires: net-snmp = %{epoch}:%{version}, perl +Requires: net-snmp = %{?%{epoch}:%{epoch}\:}%{version}, perl %if 0%{?fedora}%{?rhel} Provides: net-snmp-perl @@ -124,18 +131,29 @@ protocol. Both client and agent support modules are provided. echo "'-with embedded_perl' requires '-with perl_modules'" exit 1 %endif + %setup -q %build -%configure --with-defaults --with-sys-contact="Unknown" \ - --with-mib-modules="smux" \ - --with-sysconfdir="/etc/net-snmp" \ - --enable-shared \ - %{?netsnmp_perl_modules: --with-perl-modules="INSTALLDIRS=vendor"} \ - %{!?netsnmp_perl_modules: --without-perl-modules} \ - %{?netsnmp_embedded_perl: --enable-embedded-perl} \ - %{!?netsnmp_embedded_perl: --disable-embedded-perl} \ - --with-cflags="$RPM_OPT_FLAGS %{netsnmp_cflags}" +options=() +options+=(--enable-shared) +options+=(--sysconfdir="/etc/net-snmp") +options+=(--with-cflags="$RPM_OPT_FLAGS %{netsnmp_cflags}") +options+=(--with-defaults) +options+=(--with-mib-modules="smux") +options+=(--with-sys-contact="Unknown") +%if 0%{?netsnmp_perl_modules} +options+=(--with-perl-modules="INSTALLDIRS=vendor") +%else +options+=(--without-perl-modules) +%endif +%if 0%{?netsnmp_embedded_perl} +options+=(--enable-embedded-perl) +%else +options+=(--disable-embedded-perl) +%endif + +%configure "${options[@]}" make @@ -203,10 +221,10 @@ rm -rf $RPM_BUILD_ROOT %doc README.snmpv3 README.solaris README.thread README.win32 %doc README.aix README.osX README.tru64 README.irix README.agent-mibs %doc README.Panasonic_AM3X.txt + +# % config(noreplace) /etc/net-snmp/snmpd.conf -#%config(noreplace) /etc/net-snmp/snmpd.conf - -#%{_datadir}/snmp/snmpconf-data +# % {_datadir}/snmp/snmpconf-data %{_datadir}/snmp %{_bindir} @@ -217,6 +235,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/* %{_mandir}/man8/* %{_libdir}/*.so* +%{_libdir}/pkgconfig/*.pc /etc/rc.d/init.d/snmpd %files devel @@ -233,12 +252,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/SNMP* %endif -%verifyscript -echo "No additional verification is done for net-snmp" - %changelog +* Sat Aug 22 2020 Bart Van Assche +- Fixed the warnings reported by rpmbuild about this spec file. + * Sat Dec 15 2012 Magnus Fromreide -- Make he -without options to rpmbuild work +- Make the -without options to rpmbuild work * Thu Jul 26 2012 Dave Shield - Additional "Provides:" to complete the list of perl modules @@ -259,7 +278,7 @@ echo "No additional verification is done for net-snmp" * Tue Jun 19 2007 Thomas Anders - add "BuildRequires: perl-ExtUtils-Embed", e.g. for Fedora 7 -* Wed Nov 23 2006 Thomas Anders +* Wed Nov 22 2006 Thomas Anders - fixes for 5.4 and 64-bit platforms - enable Perl by default, but allow for --without perl_modules|embedded_perl - add netsnmp_ prefix for local defines diff --git a/dist/run-autoconf b/dist/run-autoconf index c0f1eec..6bf4ead 100644 --- a/dist/run-autoconf +++ b/dist/run-autoconf @@ -10,6 +10,10 @@ for path in $searchprefixes ; do prog="$path/autoconf-$version/bin/$prog" break; fi + if [ -x "$path/bin/autoconf-$version" ]; then + prog="$path/bin/$prog-$version" + break; + fi done echo "trying $prog version" diff --git a/dist/run-autoheader b/dist/run-autoheader new file mode 100644 index 0000000..b56caf2 --- /dev/null +++ b/dist/run-autoheader @@ -0,0 +1,36 @@ +#!/bin/sh + +version=`cat dist/autoconf-version` +prog='autoheader' +# TODO: accept a different tool (autoheader) from the command line + +searchprefixes="/usr/local" +for path in $searchprefixes ; do + if [ -d "$path/autoconf-$version" ]; then + prog="$path/autoconf-$version/bin/$prog" + break; + fi + if [ -x "$path/bin/autoconf-$version" ]; then + prog="$path/bin/$prog-$version" + break; + fi +done + +echo "trying $prog version" +echo "$prog --version" +toolversion=`$prog --version | head -1 | awk '{print $NF}'` + +echo "Expected: $version" +echo "Found: $toolversion" + +if [ "$version" != "$toolversion" ] ; then + echo "$prog doesn't match the expected version" + echo "" + echo "If you want this tool to auto-find versions, build the right" + echo "autoconf version using --prefix=/usr/local/autoconf-$version" + echo "and then re-run this tool ($0) once it's installed" + exit 1 +fi + +echo "Running $prog" +$prog "$@" diff --git a/dist/snmpd.service b/dist/snmpd.service new file mode 100644 index 0000000..31391e5 --- /dev/null +++ b/dist/snmpd.service @@ -0,0 +1,18 @@ +# +# SNMP agent service file for systemd +# +# +# The service should be enabled, i.e. snmpd should start during machine boot. +# Socket activation shall not be used. See README.systemd for details. + +[Unit] +Description=Simple Network Management Protocol (SNMP) daemon. +After=syslog.target network.target + +[Service] +# Type=notify is also supported. It should be set when snmpd.socket is not used. +Type=simple +ExecStart=/usr/sbin/snmpd -f + +[Install] +WantedBy=multi-user.target diff --git a/dist/snmpd.socket b/dist/snmpd.socket new file mode 100644 index 0000000..7f3a2d9 --- /dev/null +++ b/dist/snmpd.socket @@ -0,0 +1,17 @@ +[Unit] +Description=Socket listening for SNMP and AgentX messages + +[Socket] +ListenDatagram=0.0.0.0:161 +# Uncomment other listening addresses as needed - TCP, UDP6, TCP6. +# It must match listening addresses/ports defined in snmpd.service +# or snmpd.conf. +# ListenStream=0.0.0.0:161 +# ListenDatagram=[::]:161 +# ListenStream=[::]:161 +# +# Uncomment AgentX socket if snmpd.conf enables AgentX protocol. +# ListenStream=/var/agentx/master + +[Install] +WantedBy=sockets.target diff --git a/dist/snmptrapd.service b/dist/snmptrapd.service new file mode 100644 index 0000000..e88a5b4 --- /dev/null +++ b/dist/snmptrapd.service @@ -0,0 +1,16 @@ +# +# SNMP trap-processing service file for systemd +# + +[Unit] +Description=Simple Network Management Protocol (SNMP) Trap daemon. +After=syslog.target network.target + +[Service] +# Type=notify is also supported. It should be set when snmptrapd.socket is not +# used. +Type=simple +ExecStart=/usr/sbin/snmptrapd -f + +[Install] +WantedBy=multi-user.target diff --git a/dist/snmptrapd.socket b/dist/snmptrapd.socket new file mode 100644 index 0000000..0fc8a7c --- /dev/null +++ b/dist/snmptrapd.socket @@ -0,0 +1,14 @@ +[Unit] +Description=Socket listening for SNMP trap messages + +[Socket] +ListenDatagram=0.0.0.0:162 +# Uncomment other listening addresses as needed - TCP, UDP6, TCP6. +# It must match listening addresses/ports defined in snmptrapd.service +# or snmptrapd.conf. +# ListenStream=0.0.0.0:162 +# ListenDatagram=[::]:162 +# ListenStream=[::]:162 + +[Install] +WantedBy=sockets.target diff --git a/dist/svnup b/dist/svnup deleted file mode 100644 index 40353f0..0000000 --- a/dist/svnup +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# -# $Id: cvsup 15788 2007-01-24 13:49:38Z dts12 $ -# -TAG= -WO=0 -DEST= -TMPDIR=/tmp - -if [ "x$1" = "x-u" ]; then - DEST=$2 - shift 2 - - # gnu tar (as of 1.15.1) is unable to create portable tar archives, - # especially if long file names (>100 char) are present. - # star is a better replacement. - if [ -x /usr/bin/star ]; then - TAR='/usr/bin/star -Hustar -not -pat=*/.svn/* -c -f' - elif [ -x /bin/tar ]; then - TAR="/bin/tar --exclude=.svn -c -f" - echo "warning: star not available, using (less portable) tar..." - else - echo "neither /usr/bin/star nor /bin/tar found." - exit - fi -fi - -if [ $# -eq 0 ]; then - DIR=$PWD -else - if [ $# -ne 1 ]; then - echo "usage: $0 " - exit - fi - DIR=$1 -fi - -if [ -z ${DIR##*/} ];then - DIR=${DIR%/*} -fi -SUBD=${DIR##*/} -PARENT=${DIR%*$SUBD} -#echo "$DIR = $PARENT + $SUBD" - -if [ ! -d $DIR ]; then - echo "no such directory '$DIR'" - exit -fi - -if [ ! -d $DIR/.svn ]; then - echo "'$DIR' has no .svn directory!" - exit -fi - -if [ ! -f $DIR/.svn/entries ]; then - echo "'$DIR' has no .svn/entries!" - exit -fi - -SVNURL=`svn info $DIR| grep URL|cut -f2 -d " "` -SVNTLD=`echo $SVNURL | sed 's:.*svnroot/net-snmp/\([^/]*\).*:\1:'` -if [ "x$SVNTLD" = "xtrunk" ]; then - TAG="main" -else - TAG=`echo $SVNURL | sed 's:.*svnroot/net-snmp/[^/]*/\([^/]*\).*:\1:'` -fi - -if [ ! -z $DEST ]; then - if [ -z $TAG ]; then - echo "no TAG found in $DIR!" - exit 1 - fi -fi - -COMMAND="svn update -q $SVNURL $DIR" - -if [ ! -w $DIR/.svn ]; then - if [ -O $DIR/.svn ]; then - WO=1 - echo "Making $DIR writable" - chmod -R u+w $DIR - fi -fi - -echo "Updating directory $DIR from $TAG..." -echo "$COMMAND" - -$COMMAND -rc=$? -if [ $rc -ne 0 ]; then - echo "svn command returned $?" -fi - -if [ $WO -eq 1 ]; then - echo "Making $DIR read-only" - chmod -R a-w $DIR -fi - -if [ ! -z $DEST ]; then - if [ $rc -ne 0 ]; then - echo "skipping upload due to rc $rc from svn command" - exit $rc - else - cd $DIR/.. - #echo $PWD - DATE=`date +%Y%m%d_%H%M` - SOURCE=net-snmp-svn-$TAG"_$DATE" - $TAR $TMPDIR/$SOURCE.tar $SUBD - rc=$? - if [ $rc -ne 0 ]; then - echo "skipping upload due to rc $rc from tar command" - rm -f $TMPDIR/$SOURCE.tar.gz - exit $rc - fi - gzip -f --best $TMPDIR/$SOURCE.tar - rc=$? - if [ $rc -ne 0 ]; then - echo "skipping upload due to rc $rc from gzip command" - rm -f $TMPDIR/$SOURCE.tar.gz - exit $rc - fi - scp $TMPDIR/$SOURCE.tar.gz $DEST - rc=$? - if [ $rc -ne 0 ]; then - echo "warning: rc $rc from scp command (tarball in $TMPDIR)" - else - rm -f $TMPDIR/$SOURCE.tar.gz - fi - fi -fi diff --git a/doxygen.conf b/doxygen.conf index 20e457d..373d556 100644 --- a/doxygen.conf +++ b/doxygen.conf @@ -304,7 +304,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = $(srcdir) $(srcdir)/agent $(srcdir)/snmplib $(srcdir)/agent/helpers $(srcdir)/agent/mibgroup/examples $(srcdir)/include/net-snmp $(srcdir)/include/net-snmp/library $(srcdir)/include/net-snmp/agent +INPUT = . agent snmplib agent/helpers agent/mibgroup/examples include/net-snmp include/net-snmp/library include/net-snmp/agent # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -335,7 +335,7 @@ EXCLUDE_PATTERNS = # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = $(srcdir)/agent/mibgroup/examples +EXAMPLE_PATH = agent/mibgroup/examples # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -650,7 +650,7 @@ SEARCH_INCLUDES = YES # contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = agent/mibgroup # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the diff --git a/include/net-snmp/agent/agent_callbacks.h b/include/net-snmp/agent/agent_callbacks.h index d8e8b47..d600a66 100644 --- a/include/net-snmp/agent/agent_callbacks.h +++ b/include/net-snmp/agent/agent_callbacks.h @@ -17,5 +17,6 @@ #define SNMPD_CALLBACK_REQ_REG_SYSOR 13 #define SNMPD_CALLBACK_REQ_UNREG_SYSOR 14 #define SNMPD_CALLBACK_REQ_UNREG_SYSOR_SESS 15 +#define SNMPD_CALLBACK_UNREGISTER_NOTIFICATIONS 16 #endif /* AGENT_CALLBACKS_H */ diff --git a/include/net-snmp/agent/agent_handler.h b/include/net-snmp/agent/agent_handler.h index ec930fe..04ace26 100644 --- a/include/net-snmp/agent/agent_handler.h +++ b/include/net-snmp/agent/agent_handler.h @@ -142,10 +142,15 @@ typedef struct netsnmp_handler_registration_s { * function handler definitions */ +/** + * @typedef Netsnmp_Node_Handler + * @param[in] handler pointer to MIB handler. + * @param[in] reginfo pointer to registration struct. + * @param[in] reqinfo pointer to current transaction. + * @param[in] requests SNMP requests to process. + */ 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); diff --git a/include/net-snmp/agent/agent_index.h b/include/net-snmp/agent/agent_index.h index 49ee7fd..9846a61 100644 --- a/include/net-snmp/agent/agent_index.h +++ b/include/net-snmp/agent/agent_index.h @@ -40,6 +40,8 @@ int unregister_index(netsnmp_variable_list *, int, unsigned long count_indexes(oid * name, size_t namelen, int include_unallocated); +void dump_idx_registry(void); + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/agent/agent_read_config.h b/include/net-snmp/agent/agent_read_config.h index e6b3540..0dbf025 100644 --- a/include/net-snmp/agent/agent_read_config.h +++ b/include/net-snmp/agent/agent_read_config.h @@ -25,6 +25,11 @@ extern "C" { void snmpd_unregister_config_handler(const char *); void snmpd_store_config(const char *); + void netsnmp_set_agent_user_id(int uid); + void netsnmp_set_agent_group_id(int gid); + void netsnmp_parse_agent_user(const char *token, char *cptr); + void netsnmp_parse_agent_group(const char *token, char *cptr); + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/agent/agent_registry.h b/include/net-snmp/agent/agent_registry.h index 2949c9d..78d0f86 100644 --- a/include/net-snmp/agent/agent_registry.h +++ b/include/net-snmp/agent/agent_registry.h @@ -57,6 +57,7 @@ typedef struct subtree_context_cache_s { void setup_tree (void); void shutdown_tree (void); +void dump_registry(void); netsnmp_subtree *netsnmp_subtree_find (const oid *, size_t, diff --git a/include/net-snmp/agent/agent_trap.h b/include/net-snmp/agent/agent_trap.h index 26e2223..c74fd9c 100644 --- a/include/net-snmp/agent/agent_trap.h +++ b/include/net-snmp/agent/agent_trap.h @@ -1,6 +1,12 @@ #ifndef AGENT_TRAP_H #define AGENT_TRAP_H +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #ifdef __cplusplus extern "C" { #endif @@ -8,6 +14,13 @@ extern "C" { struct agent_add_trap_args { netsnmp_session *ss; int confirm; + const char *nameData; /* notification target addr name */ + int nameLen; + const char *tagData; /* notification tag */ + int tagLen; + const char *profileData; /* filter profile */ + int profileLen; + int rc; }; void init_traps(void); @@ -40,8 +53,36 @@ void send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu *template_pdu); int create_trap_session(char *, u_short, char *, int, int); +int create_trap_session_with_src(const char *, const char *, + const char *, const char *, + int, int); int add_trap_session(netsnmp_session *, int, int, int); int remove_trap_session(netsnmp_session *); +netsnmp_session *netsnmp_create_v1v2_notification_session(const char *, + const char*, + const char *, + const char *, + int, int, + const char *, + const char *, + const char*); +netsnmp_session *netsnmp_create_v3user_notification_session(const char *dst, + const char *user, + int lvl, + const char *ctx, + int pdutype, + const u_char *eid, + size_t eidl, + const char *src, + const char *name, + const char *tag, + const char *prof); +int netsnmp_add_notification_session(netsnmp_session *, int, int, + int, const char*, const char*, + const char*); +void netsnmp_unregister_notification(const char *, u_char); + +int netsnmp_build_trap_oid(netsnmp_pdu *pdu, oid *, size_t *); void convert_v2_to_v1(netsnmp_variable_list *, netsnmp_pdu *); netsnmp_variable_list *convert_v1_to_v2(netsnmp_pdu *); diff --git a/include/net-snmp/agent/ds_agent.h b/include/net-snmp/agent/ds_agent.h index f6f639d..105eeb4 100644 --- a/include/net-snmp/agent/ds_agent.h +++ b/include/net-snmp/agent/ds_agent.h @@ -8,6 +8,10 @@ * If new ds_agent entries are added to this header file, * then remember to run 'perl/agent/default_store/gen' to * update the corresponding perl interface. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file */ /* @@ -70,5 +74,7 @@ #define NETSNMP_DS_AGENT_INTERNAL_SECLEVEL 12 /* used by internal queries */ #define NETSNMP_DS_AGENT_MAX_GETBULKREPEATS 13 /* max getbulk repeats */ #define NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES 14 /* max getbulk respones */ - +#define NETSNMP_DS_AGENT_AVG_BULKVARBINDSIZE 15 /* avg varbind size estimate */ +#define NETSNMP_DS_AGENT_PDU_STATS_MAX 16 /* size of top N array*/ +#define NETSNMP_DS_AGENT_PDU_STATS_THRESHOLD 17 /* minimum threshold time */ #endif diff --git a/include/net-snmp/agent/hardware/cpu.h b/include/net-snmp/agent/hardware/cpu.h index f6e43e5..0ea4203 100644 --- a/include/net-snmp/agent/hardware/cpu.h +++ b/include/net-snmp/agent/hardware/cpu.h @@ -66,3 +66,4 @@ netsnmp_cpu_info *netsnmp_cpu_get_byName( char*, int ); netsnmp_cache *netsnmp_cpu_get_cache( void ); int netsnmp_cpu_load( void ); +int netsnmp_cpu_arch_load(netsnmp_cache *cache, void *magic); diff --git a/include/net-snmp/agent/hardware/fsys.h b/include/net-snmp/agent/hardware/fsys.h index 91e8e17..9800c72 100644 --- a/include/net-snmp/agent/hardware/fsys.h +++ b/include/net-snmp/agent/hardware/fsys.h @@ -33,14 +33,15 @@ typedef struct netsnmp_fsys_info_s netsnmp_fsys_info; /* * Additional enumerationis - not listed in that MIB */ -#define NETSNMP_FS_TYPE_IGNORE 1 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT +#define NETSNMP_FS_TYPE_IGNORE (1 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT) -#define NETSNMP_FS_TYPE_PROC 2 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT +#define NETSNMP_FS_TYPE_PROC (2 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT) -#define NETSNMP_FS_TYPE_DEVPTS 3 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT -#define NETSNMP_FS_TYPE_SYSFS 4 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT -#define NETSNMP_FS_TYPE_TMPFS 5 | _NETSNMP_FS_TYPE_LOCAL -#define NETSNMP_FS_TYPE_USBFS 6 | _NETSNMP_FS_TYPE_LOCAL +#define NETSNMP_FS_TYPE_DEVPTS (3 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT) +#define NETSNMP_FS_TYPE_SYSFS (4 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT) +#define NETSNMP_FS_TYPE_TMPFS (5 | _NETSNMP_FS_TYPE_LOCAL) +#define NETSNMP_FS_TYPE_USBFS (6 | _NETSNMP_FS_TYPE_LOCAL) +#define NETSNMP_FS_TYPE_AUTOFS (7 | _NETSNMP_FS_TYPE_LOCAL | _NETSNMP_FS_TYPE_SKIP_BIT) #define NETSNMP_FS_FLAG_ACTIVE 0x01 #define NETSNMP_FS_FLAG_REMOTE 0x02 @@ -87,9 +88,7 @@ struct netsnmp_fsys_info_s { * Possibly not all needed ?? */ netsnmp_fsys_info *netsnmp_fsys_get_first( void ); -netsnmp_fsys_info *netsnmp_fsys_get_next( netsnmp_fsys_info* ); -netsnmp_fsys_info *netsnmp_fsys_get_byIdx( int, int ); -netsnmp_fsys_info *netsnmp_fsys_get_next_byIdx(int,int ); +netsnmp_fsys_info *netsnmp_fsys_get_next(const netsnmp_fsys_info *); netsnmp_fsys_info *netsnmp_fsys_by_device( char*, int ); netsnmp_fsys_info *netsnmp_fsys_by_path( char*, int ); @@ -98,12 +97,12 @@ netsnmp_cache *netsnmp_fsys_get_cache( void ); int netsnmp_fsys_load( netsnmp_cache *cache, void *data ); void netsnmp_fsys_free( netsnmp_cache *cache, void *data ); -int netsnmp_fsys_size( netsnmp_fsys_info* ); -int netsnmp_fsys_used( netsnmp_fsys_info* ); -int netsnmp_fsys_avail(netsnmp_fsys_info* ); +int netsnmp_fsys_size(const netsnmp_fsys_info*); +int netsnmp_fsys_used(const netsnmp_fsys_info*); +int netsnmp_fsys_avail(const netsnmp_fsys_info*); -unsigned long long netsnmp_fsys_size_ull( netsnmp_fsys_info* ); -unsigned long long netsnmp_fsys_used_ull( netsnmp_fsys_info* ); -unsigned long long netsnmp_fsys_avail_ull(netsnmp_fsys_info* ); +unsigned long long netsnmp_fsys_size_ull(const netsnmp_fsys_info*); +unsigned long long netsnmp_fsys_used_ull(const netsnmp_fsys_info*); +unsigned long long netsnmp_fsys_avail_ull(const netsnmp_fsys_info*); void netsnmp_fsys_calculate32( netsnmp_fsys_info *f); diff --git a/include/net-snmp/agent/hardware/memory.h b/include/net-snmp/agent/hardware/memory.h index aba0a6c..aca3a4d 100644 --- a/include/net-snmp/agent/hardware/memory.h +++ b/include/net-snmp/agent/hardware/memory.h @@ -10,6 +10,7 @@ typedef struct netsnmp_memory_info_s netsnmp_memory_info; #define NETSNMP_MEM_TYPE_SHARED 8 #define NETSNMP_MEM_TYPE_SHARED2 9 #define NETSNMP_MEM_TYPE_SWAP 10 +#define NETSNMP_MEM_TYPE_AVAILMEM 11 /* Leave space for individual swap devices */ #define NETSNMP_MEM_TYPE_MAX 30 @@ -37,3 +38,4 @@ netsnmp_memory_info *netsnmp_memory_get_next_byIdx(int,int ); netsnmp_cache *netsnmp_memory_get_cache( void ); int netsnmp_memory_load( void ); +int netsnmp_mem_arch_load(netsnmp_cache *cache, void *magic); diff --git a/include/net-snmp/agent/netsnmp_close_fds.h b/include/net-snmp/agent/netsnmp_close_fds.h new file mode 100644 index 0000000..8c05f55 --- /dev/null +++ b/include/net-snmp/agent/netsnmp_close_fds.h @@ -0,0 +1,6 @@ +#ifndef netsnmp_close_fds_h_INCLUDED +#define netsnmp_close_fds_h_INCLUDED + +extern void netsnmp_close_fds(int fd); + +#endif /* netsnmp_close_fds_h_INCLUDED */ diff --git a/include/net-snmp/agent/snmp_agent.h b/include/net-snmp/agent/snmp_agent.h index aad8837..56ca306 100644 --- a/include/net-snmp/agent/snmp_agent.h +++ b/include/net-snmp/agent/snmp_agent.h @@ -7,8 +7,13 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, 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 @@ -21,6 +26,8 @@ #ifndef SNMP_AGENT_H #define SNMP_AGENT_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -32,6 +39,11 @@ extern "C" { #define SNMP_MAX_PDU_SIZE 64000 /* local constraint on PDU size sent by agent * (see also SNMP_MAX_MSG_SIZE in snmp_api.h) */ +#define SNMP_AGENT_FLAGS_NONE 0x0 +#define SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS 0x1 + + struct timeval; + /* * If non-zero, causes the addresses of peers to be logged when receptions * occur. @@ -205,6 +217,7 @@ extern "C" { int treecache_num; /* number of current cache entries */ netsnmp_cachemap *cache_store; int vbcount; + int flags; } netsnmp_agent_session; /* @@ -240,6 +253,7 @@ extern "C" { int init_master_agent(void); void shutdown_master_agent(void); int agent_check_and_process(int block); + void netsnmp_check_delegated_requests(void); void netsnmp_check_outstanding_agent_requests(void); int netsnmp_request_set_error(netsnmp_request_info *request, @@ -295,6 +309,8 @@ extern "C" { *t); void netsnmp_deregister_agent_nsap(int handle); + int netsnmp_agent_listen_on(const char *port); + void netsnmp_agent_add_list_data(netsnmp_agent_request_info *agent, netsnmp_data_list *node); @@ -315,6 +331,22 @@ extern "C" { void netsnmp_free_agent_request_info(netsnmp_agent_request_info *ari); + +#ifndef NETSNMP_NO_PDU_STATS + /* + * pdu stats + */ + typedef struct netsnmp_pdu_stats_s { + u_long processing_time; /* ms */ + time_t timestamp; /* date/time */ + netsnmp_pdu *pdu; + } netsnmp_pdu_stats; + + netsnmp_container * netsnmp_get_pdu_stats(void); + +#endif /* NETSNMP_NO_PDU_STATS */ + + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/agent/table.h b/include/net-snmp/agent/table.h index 79e588c..68440ef 100644 --- a/include/net-snmp/agent/table.h +++ b/include/net-snmp/agent/table.h @@ -14,7 +14,7 @@ * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. */ -/* +/** * @file table.h * * @addtogroup table diff --git a/include/net-snmp/data_access/interface.h b/include/net-snmp/data_access/interface.h index 20013ed..36c3247 100644 --- a/include/net-snmp/data_access/interface.h +++ b/include/net-snmp/data_access/interface.h @@ -10,6 +10,12 @@ extern "C" { #endif +#if defined(HAVE_PCRE_H) +#include +#elif defined(HAVE_REGEX_H) +#include +#endif + /* * define flags to indicate the availability of certain data */ @@ -204,6 +210,16 @@ typedef struct _conf_if_list { typedef netsnmp_conf_if_list conf_if_list; /* backwards compat */ +typedef struct _include_if_list { +#if defined(HAVE_PCRE_H) + pcre *regex_ptr; +#elif defined(HAVE_REGEX_H) + regex_t *regex_ptr; +#endif + char *name; + struct _include_if_list *next; +} netsnmp_include_if_list; + /**---------------------------------------------------------------------*/ /* * ACCESS function prototypes @@ -283,6 +299,9 @@ void netsnmp_access_interface_entry_overrides(netsnmp_interface_entry *); netsnmp_conf_if_list * netsnmp_access_interface_entry_overrides_get(const char * name); +int netsnmp_access_interface_include(const char * name); +int netsnmp_access_interface_max_reached(const char * name); + /**---------------------------------------------------------------------*/ #if defined( USING_IF_MIB_IFTABLE_IFTABLE_DATA_ACCESS_MODULE ) && \ diff --git a/include/net-snmp/data_access/ip_scalars.h b/include/net-snmp/data_access/ip_scalars.h index 03601a0..7c035a6 100644 --- a/include/net-snmp/data_access/ip_scalars.h +++ b/include/net-snmp/data_access/ip_scalars.h @@ -17,6 +17,8 @@ int netsnmp_arch_ip_scalars_ipv6IpForwarding_set(u_long value); int netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_get(u_long *value); int netsnmp_arch_ip_scalars_ipv6IpDefaultHopLimit_set(u_long value); +long netsnmp_arch_ip_scalars_ipReasmTimeout_get(void); + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/data_access/ipstats.h b/include/net-snmp/data_access/ipstats.h index f782459..f0df46b 100644 --- a/include/net-snmp/data_access/ipstats.h +++ b/include/net-snmp/data_access/ipstats.h @@ -58,45 +58,45 @@ typedef struct netsnmp_ipstats_s { * other columns, when underlying OS does not provide them. * Always fill at least 32 bits, the table is periodically polled -> 32 bit * overflow shall be detected and 64 bit value should be computed automatically. */ - U64 HCInReceives; - U64 HCInOctets; + struct counter64 HCInReceives; + struct counter64 HCInOctets; u_long InHdrErrors; - U64 HCInNoRoutes; + struct counter64 HCInNoRoutes; u_long InAddrErrors; u_long InUnknownProtos; u_long InTruncatedPkts; /* optional, can be computed from HCInNoRoutes and HCOutForwDatagrams */ - U64 HCInForwDatagrams; + struct counter64 HCInForwDatagrams; u_long ReasmReqds; u_long ReasmOKs; u_long ReasmFails; u_long InDiscards; - U64 HCInDelivers; - U64 HCOutRequests; - U64 HCOutNoRoutes; - U64 HCOutForwDatagrams; - U64 HCOutDiscards; + struct counter64 HCInDelivers; + struct counter64 HCOutRequests; + struct counter64 HCOutNoRoutes; + struct counter64 HCOutForwDatagrams; + struct counter64 HCOutDiscards; /* optional, can be computed from HCOutFragOKs + HCOutFragFails*/ - U64 HCOutFragReqds; - U64 HCOutFragOKs; - U64 HCOutFragFails; - U64 HCOutFragCreates; + struct counter64 HCOutFragReqds; + struct counter64 HCOutFragOKs; + struct counter64 HCOutFragFails; + struct counter64 HCOutFragCreates; /* optional, can be computed from * HCOutRequests +HCOutForwDatagrams + HCOutFragCreates * - HCOutFragReqds - HCOutNoRoutes - HCOutDiscards */ - U64 HCOutTransmits; + struct counter64 HCOutTransmits; - U64 HCOutOctets; - U64 HCInMcastPkts; - U64 HCInMcastOctets; - U64 HCOutMcastPkts; - U64 HCOutMcastOctets; - U64 HCInBcastPkts; - U64 HCOutBcastPkts; + struct counter64 HCOutOctets; + struct counter64 HCInMcastPkts; + struct counter64 HCInMcastOctets; + struct counter64 HCOutMcastPkts; + struct counter64 HCOutMcastOctets; + struct counter64 HCInBcastPkts; + struct counter64 HCOutBcastPkts; /* Array of available columns.*/ int columnAvail[IPSYSTEMSTATSTABLE_LAST+1]; diff --git a/include/net-snmp/data_access/swrun.h b/include/net-snmp/data_access/swrun.h index 3e15c41..2b8636b 100644 --- a/include/net-snmp/data_access/swrun.h +++ b/include/net-snmp/data_access/swrun.h @@ -85,10 +85,15 @@ extern "C" { void netsnmp_swrun_entry_free(netsnmp_swrun_entry *entry); - int swrun_count_processes( void ); + int swrun_count_processes( int include_kthreads ); int swrun_max_processes( void ); int swrun_count_processes_by_name( char *name ); +#if !defined(NETSNMP_FEATURE_REMOVE_SWRUN_COUNT_PROCESSES_BY_REGEX) \ + && defined(HAVE_PCRE_H) + int swrun_count_processes_by_regex(char *name, netsnmp_regex_ptr regexp); +#endif + #define NETSNMP_SWRUN_NOFLAGS 0x00000000 #define NETSNMP_SWRUN_ALL_OR_NONE 0x00000001 #define NETSNMP_SWRUN_DONT_FREE_ITEMS 0x00000002 diff --git a/include/net-snmp/library/asn1.h b/include/net-snmp/library/asn1.h index 52ecc3b..8de9162 100644 --- a/include/net-snmp/library/asn1.h +++ b/include/net-snmp/library/asn1.h @@ -2,6 +2,9 @@ #define ASN1_H #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif #ifdef __cplusplus extern "C" { @@ -37,7 +40,11 @@ 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + */ #define MIN_OID_LEN 2 #define MAX_OID_LEN 128 /* max subid's in an oid */ @@ -48,26 +55,26 @@ SOFTWARE. #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_BOOLEAN 0x01U +#define ASN_INTEGER 0x02U +#define ASN_BIT_STR 0x03U +#define ASN_OCTET_STR 0x04U +#define ASN_NULL 0x05U +#define ASN_OBJECT_ID 0x06U +#define ASN_SEQUENCE 0x10U +#define ASN_SET 0x11U -#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_UNIVERSAL 0x00U +#define ASN_APPLICATION 0x40U +#define ASN_CONTEXT 0x80U +#define ASN_PRIVATE 0xC0U -#define ASN_PRIMITIVE ((u_char)0x00) -#define ASN_CONSTRUCTOR ((u_char)0x20) +#define ASN_PRIMITIVE 0x00U +#define ASN_CONSTRUCTOR 0x20U -#define ASN_LONG_LEN (0x80) -#define ASN_EXTENSION_ID (0x1F) -#define ASN_BIT8 (0x80) +#define ASN_LONG_LEN 0x80U +#define ASN_EXTENSION_ID 0x1FU +#define ASN_BIT8 0x80U #define IS_CONSTRUCTOR(byte) ((byte) & ASN_CONSTRUCTOR) #define IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) @@ -103,9 +110,9 @@ SOFTWARE. * 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_TAG2 0x30U -#define ASN_OPAQUE_TAG2U ((u_char)0x2f) /* second octet of tag for union */ +#define ASN_OPAQUE_TAG2U 0x2fU /* second octet of tag for union */ /* * All the ASN.1 types for SNMP "should have been" defined in this file, @@ -174,9 +181,11 @@ SOFTWARE. #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) /* 199 */ +#define ASN_PRIV_STOP (ASN_PRIVATE | 8) /* 200 */ #define IS_DELEGATED(x) ((x) == ASN_PRIV_DELEGATED) + NETSNMP_IMPORT int asn_check_packet(u_char *, size_t); NETSNMP_IMPORT u_char *asn_parse_int(u_char *, size_t *, u_char *, long *, @@ -198,6 +207,7 @@ SOFTWARE. const u_char *, size_t); NETSNMP_IMPORT u_char *asn_parse_header(u_char *, size_t *, u_char *); + NETSNMP_IMPORT 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 */ NETSNMP_IMPORT @@ -230,16 +240,22 @@ SOFTWARE. NETSNMP_IMPORT u_char *asn_build_unsigned_int64(u_char *, size_t *, u_char, const struct counter64 *, size_t); + NETSNMP_IMPORT u_char *asn_parse_signed_int64(u_char *, size_t *, u_char *, struct counter64 *, size_t); + NETSNMP_IMPORT u_char *asn_build_signed_int64(u_char *, size_t *, u_char, const struct counter64 *, size_t); + NETSNMP_IMPORT u_char *asn_build_float(u_char *, size_t *, u_char, const float *, size_t); + NETSNMP_IMPORT u_char *asn_parse_float(u_char *, size_t *, u_char *, float *, size_t); + NETSNMP_IMPORT u_char *asn_build_double(u_char *, size_t *, u_char, const double *, size_t); + NETSNMP_IMPORT u_char *asn_parse_double(u_char *, size_t *, u_char *, double *, size_t); @@ -249,6 +265,7 @@ SOFTWARE. * Re-allocator function for below. */ + NETSNMP_IMPORT int asn_realloc(u_char **, size_t *); /* @@ -356,11 +373,13 @@ SOFTWARE. */ + NETSNMP_IMPORT 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); + NETSNMP_IMPORT int asn_realloc_rbuild_string(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -369,6 +388,7 @@ SOFTWARE. const u_char * data, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_unsigned_int(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -377,6 +397,7 @@ SOFTWARE. const u_long * data, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_header(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -384,6 +405,7 @@ SOFTWARE. u_char type, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_sequence(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -391,12 +413,14 @@ SOFTWARE. u_char type, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_length(u_char ** pkt, size_t * pkt_len, size_t * offset, int allow_realloc, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_objid(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -404,12 +428,14 @@ SOFTWARE. u_char type, const oid *, size_t); + NETSNMP_IMPORT int asn_realloc_rbuild_null(u_char ** pkt, size_t * pkt_len, size_t * offset, int allow_realloc, u_char type); + NETSNMP_IMPORT int asn_realloc_rbuild_bitstring(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -418,6 +444,7 @@ SOFTWARE. const u_char * data, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_unsigned_int64(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -426,6 +453,7 @@ SOFTWARE. struct counter64 const *data, size_t); + NETSNMP_IMPORT int asn_realloc_rbuild_signed_int64(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -434,6 +462,7 @@ SOFTWARE. const struct counter64 *data, size_t); + NETSNMP_IMPORT int asn_realloc_rbuild_float(u_char ** pkt, size_t * pkt_len, size_t * offset, @@ -441,6 +470,7 @@ SOFTWARE. u_char type, const float *data, size_t data_size); + NETSNMP_IMPORT int asn_realloc_rbuild_double(u_char ** pkt, size_t * pkt_len, size_t * offset, diff --git a/include/net-snmp/library/callback.h b/include/net-snmp/library/callback.h index 56cdbae..555162d 100644 --- a/include/net-snmp/library/callback.h +++ b/include/net-snmp/library/callback.h @@ -10,7 +10,7 @@ extern "C" { #endif #define MAX_CALLBACK_IDS 2 -#define MAX_CALLBACK_SUBIDS 16 +#define MAX_CALLBACK_SUBIDS 17 /* * Callback Major Types diff --git a/include/net-snmp/library/cert_util.h b/include/net-snmp/library/cert_util.h index 34a79dc..80e2a19 100644 --- a/include/net-snmp/library/cert_util.h +++ b/include/net-snmp/library/cert_util.h @@ -19,11 +19,12 @@ extern "C" { * *************************************************************************/ -void netsnmp_certs_init(void); -void netsnmp_certs_agent_init(void); -void netsnmp_certs_shutdown(void); -void netsnmp_certs_load(void); -netsnmp_container *netsnmp_cert_get_trustlist(void); + void netsnmp_certs_init(void); + NETSNMP_IMPORT + void netsnmp_certs_agent_init(void); + void netsnmp_certs_shutdown(void); + void netsnmp_certs_load(void); + netsnmp_container *netsnmp_cert_get_trustlist(void); typedef struct netsnmp_cert_common_s { char *dir; @@ -97,6 +98,7 @@ netsnmp_container *netsnmp_cert_get_trustlist(void); * netsnmp_cert function definitions *************************************************************************/ + NETSNMP_IMPORT netsnmp_cert *netsnmp_cert_find(int what, int where, void *hint); int netsnmp_cert_check_vb_fingerprint(const netsnmp_variable_list *var); @@ -154,6 +156,7 @@ netsnmp_container *netsnmp_cert_get_trustlist(void); netsnmp_container *netsnmp_cert_map_container_create(int with_fp); netsnmp_container *netsnmp_cert_map_container(void); + netsnmp_cert_map *netsnmp_certToTSN_parse_common(char **line); int netsnmp_cert_get_secname_maps(netsnmp_container *cm); /************************************************************************* @@ -214,6 +217,7 @@ netsnmp_container *netsnmp_cert_get_trustlist(void); void netsnmp_tlstmAddr_free(snmpTlstmAddr *entry); int netsnmp_tlstmAddr_add(snmpTlstmAddr *entry); int netsnmp_tlstmAddr_remove(snmpTlstmAddr *entry); + NETSNMP_IMPORT char *netsnmp_tlstmAddr_get_serverId(const char *name); #ifdef __cplusplus diff --git a/include/net-snmp/library/container.h b/include/net-snmp/library/container.h index 963289e..af80360 100644 --- a/include/net-snmp/library/container.h +++ b/include/net-snmp/library/container.h @@ -7,6 +7,11 @@ * Copyright (C) 2007 Apple, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef NETSNMP_CONTAINER_H #define NETSNMP_CONTAINER_H @@ -26,7 +31,6 @@ #include /* free() */ #include -#include #include #include @@ -39,8 +43,9 @@ extern "C" { * function pointer definitions * *************************************************************************/ - struct netsnmp_iterator_s; /** forward declare */ struct netsnmp_container_s; /** forward declare */ + struct netsnmp_factory_s; /** forward declare */ + struct netsnmp_iterator_s; /** forward declare */ /* * function for performing an operation on a container which @@ -78,6 +83,21 @@ extern "C" { typedef int (netsnmp_container_op)(struct netsnmp_container_s *, const void *data); + /* + * function returning an int for an operation on an object at a given + * position in a container (for containers supporting direct access) + */ + typedef int (netsnmp_container_da_op)(struct netsnmp_container_s *, + size_t pos, void *data); + + /* + * function returning an int and an object at a given position in a + * container (for containers supporting direct access) + */ + typedef int (netsnmp_container_da_op_rtn)(struct netsnmp_container_s *, + size_t pos, + void **data); + /* * function returning an oject for an operation on an object and a * container @@ -146,11 +166,22 @@ extern "C" { */ netsnmp_container_op *insert; + /* + * add an entry to the container at a given position + */ + netsnmp_container_da_op *insert_before; + netsnmp_container_da_op *insert_after; + /* * remove an entry from the container */ netsnmp_container_op *remove; + /* + * remove an entry from the container at a given position + */ + netsnmp_container_da_op_rtn *remove_at; + /* * release memory for an entry from the container */ @@ -173,6 +204,11 @@ extern "C" { */ netsnmp_container_rtn *find_next; + /* + * get entry at the given index (for containers supporting direct access + */ + netsnmp_container_da_op_rtn *get_at; + /* * find all entries in the container which match the partial key * returns allocated memory (netsnmp_void_array). User is responsible @@ -273,9 +309,9 @@ extern "C" { * register a new container factory */ int netsnmp_container_register_with_compare(const char* name, - netsnmp_factory *f, + struct netsnmp_factory_s *f, netsnmp_container_compare *c); - int netsnmp_container_register(const char* name, netsnmp_factory *f); + int netsnmp_container_register(const char* name, struct netsnmp_factory_s *f); /* * search for and create a container from a list of types or a @@ -293,7 +329,7 @@ extern "C" { netsnmp_container *new_index); - netsnmp_factory *netsnmp_container_get_factory(const char *type); + struct netsnmp_factory_s *netsnmp_container_get_factory(const char *type); /* * common comparison routines @@ -309,6 +345,7 @@ extern "C" { int netsnmp_ncompare_cstring(const void * lhs, const void * rhs); /** useful for octet strings */ + NETSNMP_IMPORT int netsnmp_compare_mem(const char * lhs, size_t lhs_len, const char * rhs, size_t rhs_len); @@ -329,6 +366,8 @@ extern "C" { */ #define CONTAINER_KEY_ALLOW_DUPLICATES 0x00000001 #define CONTAINER_KEY_UNSORTED 0x00000002 + /* ... */ +#define CONTAINER_FLAG_INTERNAL_1 0x80000000 #define CONTAINER_SET_OPTIONS(x,o,rc) do { \ if (NULL==(x)->options) \ @@ -363,23 +402,36 @@ extern "C" { #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 - */ /* * insert k into all containers */ NETSNMP_IMPORT int CONTAINER_INSERT(netsnmp_container *x, const void *k); + /* + * insert item before given position + */ + NETSNMP_IMPORT + int CONTAINER_INSERT_BEFORE(netsnmp_container *x, size_t pos, void *k); + /* * remove k from all containers */ NETSNMP_IMPORT int CONTAINER_REMOVE(netsnmp_container *x, const void *k); + /* + * remove item at given position + */ + NETSNMP_IMPORT + int CONTAINER_REMOVE_AT(netsnmp_container *x, size_t pos, void **k); + + /* + * get item at given position + */ + NETSNMP_IMPORT + int CONTAINER_GET_AT(netsnmp_container *x, size_t pos, void **k); + /* * duplicate container */ diff --git a/include/net-snmp/library/container_binary_array.h b/include/net-snmp/library/container_binary_array.h index 336a8e9..e47a8f0 100644 --- a/include/net-snmp/library/container_binary_array.h +++ b/include/net-snmp/library/container_binary_array.h @@ -12,7 +12,6 @@ extern "C" { #include #include -#include /* * initialize binary array container. call at startup. @@ -27,7 +26,7 @@ extern "C" { /* * get a factory for producing binary_array objects */ - netsnmp_factory * netsnmp_container_get_binary_array_factory(void); + struct netsnmp_factory_s *netsnmp_container_get_binary_array_factory(void); int netsnmp_binary_array_remove(netsnmp_container *c, const void *key, diff --git a/include/net-snmp/library/data_list.h b/include/net-snmp/library/data_list.h index 54a3a5d..e31250e 100644 --- a/include/net-snmp/library/data_list.h +++ b/include/net-snmp/library/data_list.h @@ -7,14 +7,17 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, 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 +/** + * @file data_list.h * * @addtogroup agent - * @addtogroup library * - * - * $Id$ + * @addtogroup library * * External definitions for functions and variables in netsnmp_data_list.c. * @@ -98,6 +101,9 @@ extern "C" { Netsnmp_Save_List_Data * data_list_save_ptr); SNMPCallback netsnmp_save_all_data_callback; void netsnmp_read_data_callback(const char *token, char *line); + + void shutdown_data_list(void); + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/library/default_store.h b/include/net-snmp/library/default_store.h index 3c3c519..1b1978e 100644 --- a/include/net-snmp/library/default_store.h +++ b/include/net-snmp/library/default_store.h @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* * Note: @@ -14,7 +19,7 @@ * then remember to run 'perl/default_store/gen' to update the * corresponding perl interface. */ -/* +/** * @file default_store.h: storage space for defaults * * @addtogroup default_store @@ -94,7 +99,13 @@ extern "C" { #define NETSNMP_DS_LIB_TSM_USE_PREFIX 39 /* TSM's simple security name mapping */ #define NETSNMP_DS_LIB_DONT_LOAD_HOST_FILES 40 /* don't read host.conf files */ #define NETSNMP_DS_LIB_DNSSEC_WARN_ONLY 41 /* tread DNSSEC errors as warnings */ -#define NETSNMP_DS_LIB_MAX_BOOL_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ +#define NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT 42 /* NETSNMP_DS_LIB_CLIENT_ADDR includes address and also port */ +#define NETSNMP_DS_LIB_DISABLE_V1 43 /* disable SNMPv1 */ +#define NETSNMP_DS_LIB_DISABLE_V2c 44 /* disable SNMPv2c */ +#define NETSNMP_DS_LIB_DISABLE_V3 45 /* disable SNMPv3 */ +#define NETSNMP_DS_LIB_FILTER_SOURCE 46 /* filter pkt by source IP */ +#define NETSNMP_DS_LIB_ADD_FORWARDER_INFO 47 /* add info about forwarder to SNMP packets */ +#define NETSNMP_DS_LIB_MAX_BOOL_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ /* * library integers @@ -117,6 +128,8 @@ extern "C" { #define NETSNMP_DS_SSHDOMAIN_SOCK_GROUP 13 #define NETSNMP_DS_LIB_TIMEOUT 14 #define NETSNMP_DS_LIB_RETRIES 15 +#define NETSNMP_DS_LIB_MSG_SEND_MAX 16 /* global max response size */ +#define NETSNMP_DS_LIB_FILTER_TYPE 17 /* 0=NONE, 1=acceptlist, -1=blocklist */ #define NETSNMP_DS_LIB_MAX_INT_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ /* @@ -169,12 +182,79 @@ extern "C" { #define NETSNMP_DS_LIB_SSH_USERNAME 32 #define NETSNMP_DS_LIB_SSH_PUBKEY 33 #define NETSNMP_DS_LIB_SSH_PRIVKEY 34 +#define NETSNMP_DS_LIB_OUTPUT_PRECISION 35 #define NETSNMP_DS_LIB_MAX_STR_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ /* * end storage definitions */ + /* + * macros for dynamic protocol switches + */ +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + +#if defined(NETSNMP_DISABLE_SNMPV1) +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V1(pc_ver) \ + ((pc_ver) == 0/*SNMP_VERSION_1*/) +#else +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V1(pc_ver) \ + ((pc_ver) == SNMP_VERSION_1 && \ + netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, \ + NETSNMP_DS_LIB_DISABLE_V1)) +#endif + +#if defined(NETSNMP_DISABLE_SNMPV2C) +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V2(pc_ver) \ + ((pc_ver) == 1/*SNMP_VERSION_2c*/) +#else +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V2(pc_ver) \ + ((pc_ver) == SNMP_VERSION_2c && \ + netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, \ + NETSNMP_DS_LIB_DISABLE_V2c)) +#endif + +#define NETSNMP_RUNTIME_PROTOCOL_CHECK_V1V2(pc_ver, pc_target) do { \ + if (NETSNMP_RUNTIME_PROTOCOL_SKIP_V1(pc_ver) || \ + NETSNMP_RUNTIME_PROTOCOL_SKIP_V2(pc_ver)) { \ + DEBUGMSGTL(("snmp:protocol:disabled", "enforced\n")); \ + goto pc_target; \ + } \ + } while(0) + +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V3(pc_ver) \ + ((pc_ver == SNMP_VERSION_3) && \ + netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, \ + NETSNMP_DS_LIB_DISABLE_V3)) + +#define NETSNMP_RUNTIME_PROTOCOL_CHECK_V3(pc_ver, pc_target) do { \ + if (NETSNMP_RUNTIME_PROTOCOL_SKIP_V3(pc_ver)) { \ + DEBUGMSGTL(("snmp:protocol:disabled", "enforced\n")); \ + goto pc_target; \ + } \ + } while(0) + +#define NETSNMP_RUNTIME_PROTOCOL_CHECK(pc_ver, pc_target) do { \ + NETSNMP_RUNTIME_PROTOCOL_CHECK_V1V2(pc_ver, pc_target); \ + NETSNMP_RUNTIME_PROTOCOL_CHECK_V3(pc_ver, pc_target); \ + } while(0) + +#define NETSNMP_RUNTIME_PROTOCOL_SKIP(pc_ver) \ + (NETSNMP_RUNTIME_PROTOCOL_SKIP_V1(pc_ver) || \ + NETSNMP_RUNTIME_PROTOCOL_SKIP_V2(pc_ver) || \ + NETSNMP_RUNTIME_PROTOCOL_SKIP_V3(pc_ver)) + +#else /* NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION */ +#define NETSNMP_RUNTIME_PROTOCOL_SKIP(pc_ver) (0) +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V1(pc_ver) (0) +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V2(pc_ver) (0) +#define NETSNMP_RUNTIME_PROTOCOL_SKIP_V3(pc_ver) (0) +#define NETSNMP_RUNTIME_PROTOCOL_CHECK(ver, gt) do { ; } while(0) +#define NETSNMP_RUNTIME_PROTOCOL_CHECK_V1V2(ver, gt) do { ; } while(0) +#define NETSNMP_RUNTIME_PROTOCOL_CHECK_V3(ver, gt) do { ; } while(0) +#endif /* NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION */ + + NETSNMP_IMPORT int netsnmp_ds_set_boolean(int storeid, int which, int value); NETSNMP_IMPORT diff --git a/include/net-snmp/library/factory.h b/include/net-snmp/library/factory.h deleted file mode 100644 index faf82a2..0000000 --- a/include/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/include/net-snmp/library/int64.h b/include/net-snmp/library/int64.h index 9c7c894..69e5b5d 100644 --- a/include/net-snmp/library/int64.h +++ b/include/net-snmp/library/int64.h @@ -5,36 +5,48 @@ extern "C" { #endif +#ifndef NETSNMP_REMOVE_U64 + /* + * Note: using the U64 typedef is deprecated because this typedef conflicts + * with a typedef with the same name defined in the Perl header files. + */ typedef struct counter64 U64; +#endif #define I64CHARSZ 21 - void divBy10(U64, U64 *, unsigned int *); - void multBy10(U64, U64 *); - void incrByU16(U64 *, unsigned int); - void incrByU32(U64 *, unsigned int); + void divBy10(struct counter64, struct counter64 *, + unsigned int *); + void multBy10(struct counter64, struct counter64 *); + void incrByU16(struct counter64 *, unsigned int); + void incrByU32(struct counter64 *, unsigned int); NETSNMP_IMPORT - void zeroU64(U64 *); - int isZeroU64(const U64 *); + void zeroU64(struct counter64 *); + int isZeroU64(const struct counter64 *); NETSNMP_IMPORT - void printU64(char *, const U64 *); + void printU64(char *, const struct counter64 *); NETSNMP_IMPORT - void printI64(char *, const U64 *); - int read64(U64 *, const char *); + void printI64(char *, const struct counter64 *); + int read64(struct counter64 *, const char *); NETSNMP_IMPORT - 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); + void u64Subtract(const struct counter64 *pu64one, + const struct counter64 *pu64two, + struct counter64 *pu64out); + void u64Incr(struct counter64 *pu64out, + const struct counter64 *pu64one); + void u64UpdateCounter(struct counter64 *pu64out, + const struct counter64 *pu64one, + const struct counter64 *pu64two); + void u64Copy(struct counter64 *pu64one, + const struct counter64 *pu64two); - int netsnmp_c64_check_for_32bit_wrap(U64 *old_val, U64 *new_val, + int netsnmp_c64_check_for_32bit_wrap(const struct counter64 *old_val, + struct counter64 *new_val, int adjust); NETSNMP_IMPORT int netsnmp_c64_check32_and_update(struct counter64 *prev_val, struct counter64 *new_val, - struct counter64 *old_prev_val, + const struct counter64 *old_prev_val, int *need_wrap_check); #ifdef __cplusplus diff --git a/include/net-snmp/library/keytools.h b/include/net-snmp/library/keytools.h index 44acc48..7b3ddcd 100644 --- a/include/net-snmp/library/keytools.h +++ b/include/net-snmp/library/keytools.h @@ -35,6 +35,12 @@ extern "C" { const u_char * Ku, size_t ku_len, u_char * Kul, size_t * kul_len); + NETSNMP_IMPORT + int netsnmp_extend_kul(u_int needKeyLen, oid *hashoid, u_int hashoid_len, + int privType, u_char *engineID, u_int engineIDLen, + u_char **kulBuf, size_t *kulBufLen, + u_int kulBufSize); + NETSNMP_IMPORT int encode_keychange(const oid * hashtype, u_int hashtype_len, u_char * oldkey, @@ -43,11 +49,11 @@ extern "C" { size_t * kcstring_len); NETSNMP_IMPORT - 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); + int decode_keychange(const oid *hashtype, u_int hashtype_len, + const u_char *oldkey, size_t oldkey_len, + const u_char *kcstring, + size_t kcstring_len, u_char *newkey, + size_t *newkey_len); /* diff --git a/include/net-snmp/library/large_fd_set.h b/include/net-snmp/library/large_fd_set.h index af3fa02..f9f1195 100644 --- a/include/net-snmp/library/large_fd_set.h +++ b/include/net-snmp/library/large_fd_set.h @@ -64,6 +64,9 @@ extern "C" { do { (fdset)->lfs_setptr->fd_count = 0; } while(0) +struct timeval; + + NETSNMP_IMPORT void netsnmp_large_fd_setfd( SOCKET fd, netsnmp_large_fd_set *fdset); NETSNMP_IMPORT diff --git a/include/net-snmp/library/lcd_time.h b/include/net-snmp/library/lcd_time.h index da8c3c1..123dfd1 100644 --- a/include/net-snmp/library/lcd_time.h +++ b/include/net-snmp/library/lcd_time.h @@ -111,6 +111,7 @@ extern "C" { u_int * last_engine_time, u_int authenticated); + NETSNMP_IMPORT int set_enginetime(const u_char * engineID, u_int engineID_len, u_int engine_boot, u_int engine_time, u_int authenticated); diff --git a/include/net-snmp/library/libsnmp.h b/include/net-snmp/library/libsnmp.h index 6a07300..6e2d2c7 100644 --- a/include/net-snmp/library/libsnmp.h +++ b/include/net-snmp/library/libsnmp.h @@ -37,40 +37,40 @@ extern "C" { #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include #include -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif diff --git a/include/net-snmp/library/mib.h b/include/net-snmp/library/mib.h index 18d98e1..a90cb18 100644 --- a/include/net-snmp/library/mib.h +++ b/include/net-snmp/library/mib.h @@ -124,9 +124,6 @@ SOFTWARE. NETSNMP_IMPORT char *netsnmp_get_mib_directory(void); void netsnmp_fixup_mib_directory(void); - void netsnmp_mibindex_load( void ); - char * netsnmp_mibindex_lookup( const char * ); - FILE * netsnmp_mibindex_new( const char * ); int sprint_realloc_description(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, oid * objid, size_t objidlen, int width); @@ -149,7 +146,7 @@ SOFTWARE. netsnmp_variable_list * data); NETSNMP_IMPORT int build_oid_noalloc(oid * in, size_t in_len, - size_t * out_len, oid * prefix, + size_t * out_len, const oid * prefix, size_t prefix_len, netsnmp_variable_list * indexes); NETSNMP_IMPORT @@ -484,14 +481,17 @@ SOFTWARE. unsigned char **new_val, int *new_val_len); NETSNMP_IMPORT - void clear_tree_flags(register struct tree *tp); + void clear_tree_flags(struct tree *tp); NETSNMP_IMPORT char *snmp_out_toggle_options(char *); NETSNMP_IMPORT + char *snmp_out_options(char *, int, char * const *); + NETSNMP_IMPORT void snmp_out_toggle_options_usage(const char *, FILE *); NETSNMP_IMPORT char *snmp_in_toggle_options(char *); + NETSNMP_IMPORT char *snmp_in_options(char *, int, char * const *); NETSNMP_IMPORT void snmp_in_toggle_options_usage(const char *, FILE *); @@ -500,6 +500,7 @@ SOFTWARE. int netsnmp_str2oid(const char *S, oid * O, int L); + char *make_printf_format_string(const char *); #define NETSNMP_STRING_OUTPUT_GUESS 1 diff --git a/include/net-snmp/library/mt_support.h b/include/net-snmp/library/mt_support.h index 4e35d33..fd8e57c 100644 --- a/include/net-snmp/library/mt_support.h +++ b/include/net-snmp/library/mt_support.h @@ -44,7 +44,7 @@ extern "C" { #if defined(NETSNMP_REENTRANT) || defined(WIN32) -#if HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD_H #include typedef pthread_mutex_t mutex_type; #ifdef pthread_mutexattr_default diff --git a/include/net-snmp/library/netsnmp-attribute-format.h b/include/net-snmp/library/netsnmp-attribute-format.h new file mode 100644 index 0000000..8d357b3 --- /dev/null +++ b/include/net-snmp/library/netsnmp-attribute-format.h @@ -0,0 +1,11 @@ +#ifndef _NETSNMP_ATTRIBUTE_FORMAT_H_ +#define _NETSNMP_ATTRIBUTE_FORMAT_H_ + +#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +#define NETSNMP_ATTRIBUTE_FORMAT(type, formatArg, firstArg) +#else +#define NETSNMP_ATTRIBUTE_FORMAT(type, formatArg, firstArg) \ + __attribute__((__format__( __ ## type ## __, formatArg, firstArg ))) +#endif + +#endif /* _NETSNMP_ATTRIBUTE_FORMAT_H_ */ diff --git a/include/net-snmp/library/oid.h b/include/net-snmp/library/oid.h index e7adf41..05965b9 100644 --- a/include/net-snmp/library/oid.h +++ b/include/net-snmp/library/oid.h @@ -1,18 +1,27 @@ #ifndef NETSNMP_LIBRARY_OID_H #define NETSNMP_LIBRARY_OID_H -#ifdef HAVE_INTTYPES_H -#include -#endif - +#if defined(__CYGWIN__) && defined(__LP64__) +/* + * The winExtDLL implementation assumes that the size of an OID component is + * 32 bits. Since on the 64-bit Cygwin environment unsigned long is 64 bits + * wide, use unsigned int instead for oids. See also the definition of + * SnmpVarBindList on MSDN + * (https://msdn.microsoft.com/en-us/library/windows/desktop/aa378929.aspx). + */ +typedef unsigned int oid; +#define MAX_SUBID 0xFFFFFFFFUL +#define NETSNMP_PRIo "" +#else #ifndef EIGHTBIT_SUBIDS -typedef u_long oid; +typedef unsigned long oid; #define MAX_SUBID 0xFFFFFFFFUL #define NETSNMP_PRIo "l" #else -typedef uint8_t oid; +typedef unsigned char oid; #define MAX_SUBID 0xFF #define NETSNMP_PRIo "" #endif +#endif /* __CYGWIN64__ */ #endif /* NETSNMP_LIBRARY_OID_H */ diff --git a/include/net-snmp/library/openssl_config.h b/include/net-snmp/library/openssl_config.h new file mode 100644 index 0000000..ea044e1 --- /dev/null +++ b/include/net-snmp/library/openssl_config.h @@ -0,0 +1,12 @@ +/* + * Declare our OpenSSL API usage, to avoid deprecation warnings. + * This must be included before any OpenSSL header files. + */ + +#ifndef NETSNMP_OPENSSL_COMPAT_H +#define NETSNMP_OPENSSL_COMPAT_H + +/* Our interface matches OpenSSL 1.0.0 */ +#define OPENSSL_API_COMPAT 0x10000000L + +#endif /* NETSNMP_OPENSSL_COMPAT_H */ diff --git a/include/net-snmp/library/parse.h b/include/net-snmp/library/parse.h index ce46ab9..7c33d3f 100644 --- a/include/net-snmp/library/parse.h +++ b/include/net-snmp/library/parse.h @@ -201,7 +201,7 @@ SOFTWARE. #endif void netsnmp_init_mib_internals(void); void unload_all_mibs(void); - int add_mibfile(const char*, const char*, FILE *); + int add_mibfile(const char*, const char*); int which_module(const char *); NETSNMP_IMPORT char *module_name(int, char *); diff --git a/include/net-snmp/library/read_config.h b/include/net-snmp/library/read_config.h index 08eca9b..f036c30 100644 --- a/include/net-snmp/library/read_config.h +++ b/include/net-snmp/library/read_config.h @@ -15,7 +15,14 @@ extern "C" { #define PREMIB_CONFIG 1 #define EITHER_CONFIG 2 +/* + * Value of 'type' parameter of various snmp_config calls, + * used by Net-SNMP client utilities. + */ +#define NETSNMP_APPLICATION_CONFIG_TYPE "snmpapp" + #include +#include /* * Defines a set of file types and the parse and free functions @@ -52,17 +59,12 @@ extern "C" { int read_config_files(int); NETSNMP_IMPORT void free_config(void); -#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2&& __GNUC_MINOR__ < 8) - NETSNMP_IMPORT - void netsnmp_config_error(const char *, ...); - void netsnmp_config_warn(const char *, ...); -#else NETSNMP_IMPORT void netsnmp_config_error(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); + NETSNMP_ATTRIBUTE_FORMAT(printf, 1, 2); + NETSNMP_IMPORT void netsnmp_config_warn(const char *, ...) - __attribute__((__format__(__printf__, 1, 2))); -#endif + NETSNMP_ATTRIBUTE_FORMAT(printf, 1, 2); NETSNMP_IMPORT char *skip_white(char *); diff --git a/include/net-snmp/library/scapi.h b/include/net-snmp/library/scapi.h index f4b63f5..6166560 100644 --- a/include/net-snmp/library/scapi.h +++ b/include/net-snmp/library/scapi.h @@ -1,10 +1,19 @@ /* * scapi.h + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef _SCAPI_H #define _SCAPI_H +#ifdef NETSNMP_USE_OPENSSL +#include /* EVP_MD */ +#endif + #ifdef __cplusplus extern "C" { #endif @@ -14,62 +23,156 @@ extern "C" { */ #define SNMP_TRANS_AUTHLEN_HMACMD5 128 #define SNMP_TRANS_AUTHLEN_HMACSHA1 160 +#define SNMP_TRANS_AUTHLEN_HMAC128SHA224 224 /* OPTIONAL */ +#define SNMP_TRANS_AUTHLEN_HMAC192SHA256 256 /* MUST */ +#define SNMP_TRANS_AUTHLEN_HMAC256SHA384 384 /* OPTIONAL */ +#define SNMP_TRANS_AUTHLEN_HMAC384SHA512 512 /* SHOULD */ #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 */ +#ifdef NETSNMP_DRAFT_REEDER_3DES +#define SNMP_TRANS_PRIVLEN_3DESEDE 256 +#define SNMP_TRANS_PRIVLEN_3DESEDE_IV 64 +#endif /* NETSNMP_DRAFT_REEDER_3DES */ + +#define SNMP_TRANS_PRIVLEN_AES 128 +#define SNMP_TRANS_PRIVLEN_AES_IV 128 + +#define SNMP_TRANS_PRIVLEN_AES128 SNMP_TRANS_PRIVLEN_AES +#define SNMP_TRANS_PRIVLEN_AES128_IV SNMP_TRANS_PRIVLEN_AES_IV + +#define SNMP_TRANS_PRIVLEN_AES192 192 +#define SNMP_TRANS_PRIVLEN_AES192_IV 128 /* 192 */ + +#define SNMP_TRANS_PRIVLEN_AES256 256 +#define SNMP_TRANS_PRIVLEN_AES256_IV 128 /* 256 */ + + +typedef struct netsnmp_auth_alg_info_s { + int type; + const char * name; + oid * alg_oid; + int oid_len; + int proper_length; + int mac_length; +} netsnmp_auth_alg_info; + +typedef struct netsnmp_priv_alg_info_s { + int type; + const char * name; + oid * alg_oid; + int oid_len; + int proper_length; + int iv_length; + int pad_size; +#ifdef NETSNMP_USE_OPENSSL + const EVP_CIPHER * cipher; +#endif +} netsnmp_priv_alg_info; /* * Prototypes. */ + NETSNMP_IMPORT + int sc_get_authtype(const oid * hashoid, u_int hashoid_len); + NETSNMP_IMPORT + int sc_get_proper_auth_length_bytype(int auth_type); + NETSNMP_IMPORT + int sc_get_auth_maclen(int auth_type); + NETSNMP_IMPORT + const char* sc_get_auth_name(int auth_type); + NETSNMP_IMPORT + oid * sc_get_auth_oid(int auth_type, size_t *oid_len); + NETSNMP_IMPORT + const netsnmp_auth_alg_info * + sc_find_auth_alg_byoid(const oid *oid, u_int len); + NETSNMP_IMPORT + const netsnmp_auth_alg_info * + sc_find_auth_alg_bytype(u_int type); + NETSNMP_IMPORT + const netsnmp_auth_alg_info * sc_get_auth_alg_byindex(u_int index); + + /** deprectated, use + * sc_get_authtype() + sc_get_proper_auth_length_bytype() */ + NETSNMP_IMPORT int sc_get_properlength(const oid * hashtype, u_int hashtype_len); + +#ifdef NETSNMP_USE_OPENSSL + NETSNMP_IMPORT + const EVP_MD *sc_get_openssl_hashfn(int auth_type); + NETSNMP_IMPORT + const EVP_CIPHER *sc_get_openssl_privfn(int priv_type); +#endif + + NETSNMP_IMPORT + int sc_get_privtype(const oid * privtype, u_int privtype_len); + NETSNMP_IMPORT + oid * sc_get_priv_oid(int type, size_t *oid_len); + NETSNMP_IMPORT int sc_get_proper_priv_length(const oid * privtype, u_int privtype_len); + NETSNMP_IMPORT + int sc_get_proper_priv_length_bytype(int privtype); + NETSNMP_IMPORT + const netsnmp_priv_alg_info * + sc_get_priv_alg_byoid(const oid *oid, u_int len); + NETSNMP_IMPORT + const netsnmp_priv_alg_info * sc_get_priv_alg_bytype(u_int type); + NETSNMP_IMPORT + const netsnmp_priv_alg_info * sc_get_priv_alg_byindex(u_int index); NETSNMP_IMPORT int sc_init(void); + NETSNMP_IMPORT int sc_shutdown(int majorID, int minorID, void *serverarg, void *clientarg); + NETSNMP_IMPORT int sc_random(u_char * buf, size_t * buflen); + NETSNMP_IMPORT int sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, const u_char * key, u_int keylen, const u_char * message, u_int msglen, u_char * MAC, size_t * maclen); + NETSNMP_IMPORT int sc_check_keyed_hash(const oid * authtype, size_t authtypelen, const u_char * key, u_int keylen, const u_char * message, u_int msglen, const u_char * MAC, u_int maclen); + NETSNMP_IMPORT int sc_encrypt(const oid * privtype, size_t privtypelen, u_char * key, u_int keylen, u_char * iv, u_int ivlen, const u_char * plaintext, u_int ptlen, u_char * ciphertext, size_t * ctlen); + NETSNMP_IMPORT 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); + NETSNMP_IMPORT + int sc_hash_type(int auth_type, const u_char * buf, + size_t buf_len, u_char * MAC, + size_t * MAC_len); + + NETSNMP_IMPORT int sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, size_t buf_len, u_char * MAC, size_t * MAC_len); + NETSNMP_IMPORT int sc_get_transform_type(oid * hashtype, u_int hashtype_len, int (**hash_fn) (const int mode, diff --git a/include/net-snmp/library/sd-daemon.h b/include/net-snmp/library/sd-daemon.h new file mode 100644 index 0000000..f48b4f1 --- /dev/null +++ b/include/net-snmp/library/sd-daemon.h @@ -0,0 +1,155 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef SNMPD_SD_DAEMON_H +#define SNMPD_SD_DAEMON_H + +/*** + Copyright 2010 Lennart Poettering + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +***/ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + Reference implementation of a few systemd related interfaces for + writing daemons. These interfaces are trivial to implement. To + simplify porting we provide this reference implementation. + Applications are welcome to reimplement the algorithms described + here if they do not want to include these two source files. + + The following functionality is provided: + + - Support for logging with log levels on stderr + - File descriptor passing for socket-based activation + - Daemon startup and status notification + - Detection of systemd boots + + You may compile this with -DDISABLE_SYSTEMD to disable systemd + support. This makes all those calls NOPs that are directly related to + systemd (i.e. only sd_is_xxx() will stay useful). + + Since this is drop-in code we don't want any of our symbols to be + exported in any case. Hence we declare hidden visibility for all of + them. + + You may find an up-to-date version of these source files online: + + http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h + http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c + + This should compile on non-Linux systems, too, but with the + exception of the sd_is_xxx() calls all functions will become NOPs. + + See sd-daemon(7) for more information. +*/ + +/* + Returns how many file descriptors have been passed, or a negative + errno code on failure. Optionally, removes the $LISTEN_FDS and + $LISTEN_PID file descriptors from the environment (recommended, but + problematic in threaded environments). If r is the return value of + this function you'll find the file descriptors passed as fds + SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative + errno style error code on failure. This function call ensures that + the FD_CLOEXEC flag is set for the passed file descriptors, to make + sure they are not passed on to child processes. If FD_CLOEXEC shall + not be set, the caller needs to unset it after this call for all file + descriptors that are used. + + See sd_listen_fds(3) for more information. +*/ +int netsnmp_sd_listen_fds(int unset_environment); + +/* + Informs systemd about changed daemon state. This takes a number of + newline separated environment-style variable assignments in a + string. The following variables are known: + + READY=1 Tells systemd that daemon startup is finished (only + relevant for services of Type=notify). The passed + argument is a boolean "1" or "0". Since there is + little value in signaling non-readiness the only + value daemons should send is "READY=1". + + STATUS=... Passes a single-line status string back to systemd + that describes the daemon state. This is free-from + and can be used for various purposes: general state + feedback, fsck-like programs could pass completion + percentages and failing programs could pass a human + readable error message. Example: "STATUS=Completed + 66% of file system check..." + + ERRNO=... If a daemon fails, the errno-style error code, + formatted as string. Example: "ERRNO=2" for ENOENT. + + BUSERROR=... If a daemon fails, the D-Bus error-style error + code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut" + + MAINPID=... The main pid of a daemon, in case systemd did not + fork off the process itself. Example: "MAINPID=4711" + + Daemons can choose to send additional variables. However, it is + recommended to prefix variable names not listed above with X_. + + Returns a negative errno-style error code on failure. Returns > 0 + if systemd could be notified, 0 if it couldn't possibly because + systemd is not running. + + Example: When a daemon finished starting up, it could issue this + call to notify systemd about it: + + sd_notify(0, "READY=1"); + + See sd_notifyf() for more complete examples. + + See sd_notify(3) for more information. +*/ +int netsnmp_sd_notify(int unset_environment, const char *state); + +/** + * Find an socket with given parameters. See man sd_is_socket_inet for + * description of the arguments. + * + * Returns the file descriptor if it is found, 0 otherwise. + */ +int netsnmp_sd_find_inet_socket(int family, int type, int listening, int port); + +/** + * Find an unix socket with given parameters. See man sd_is_socket_unix for + * description of the arguments. + * + * Returns the file descriptor if it is found, 0 otherwise. + */ +int +netsnmp_sd_find_unix_socket(int type, int listening, const char *path); + +#ifdef __cplusplus +} +#endif + +#endif /* SNMPD_SD_DAEMON_H */ diff --git a/include/net-snmp/library/snmp.h b/include/net-snmp/library/snmp.h index f5978c6..b2aa5fe 100644 --- a/include/net-snmp/library/snmp.h +++ b/include/net-snmp/library/snmp.h @@ -31,6 +31,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + */ + #define SNMP_PORT 161 /* standard UDP port for SNMP agents * to receive requests messages */ @@ -40,6 +46,7 @@ SOFTWARE. #define SNMP_MAX_LEN 1500 /* typical maximum message size */ #define SNMP_MIN_MAX_LEN 484 /* minimum maximum message size */ +#define SNMP_MAX_PACKET_LEN (0x7fffffff) /* * SNMP versions @@ -300,6 +307,7 @@ SOFTWARE. /* * control PDU handling characteristics */ +/** NOTE low byte used for AGENTX_MSG_FLAG_* */ #define UCD_MSG_FLAG_RESPONSE_PDU 0x100 #define UCD_MSG_FLAG_EXPECT_RESPONSE 0x200 #define UCD_MSG_FLAG_FORCE_PDU_COPY 0x400 @@ -307,6 +315,10 @@ SOFTWARE. #define UCD_MSG_FLAG_PDU_TIMEOUT 0x1000 #define UCD_MSG_FLAG_ONE_PASS_ONLY 0x2000 #define UCD_MSG_FLAG_TUNNELED 0x4000 +#ifdef NETSNMP_USE_REVERSE_ASNENCODING +#define UCD_MSG_FLAG_FORWARD_ENCODE 0x8000 +#endif +#define UCD_MSG_FLAG_BULK_TOOBIG 0x010000 /* * view status diff --git a/include/net-snmp/library/snmpAAL5PVCDomain.h b/include/net-snmp/library/snmpAAL5PVCDomain.h index 325109a..e75f6fe 100644 --- a/include/net-snmp/library/snmpAAL5PVCDomain.h +++ b/include/net-snmp/library/snmpAAL5PVCDomain.h @@ -7,7 +7,7 @@ extern "C" { #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif @@ -22,7 +22,7 @@ extern "C" { extern oid netsnmp_AAL5PVCDomain[]; /* = { NETSNMP_ENTERPRISE_MIB, 3, 3, 3 }; */ -netsnmp_transport *netsnmp_aal5pvc_transport(struct sockaddr_atmpvc *addr, +netsnmp_transport *netsnmp_aal5pvc_transport(const struct sockaddr_atmpvc *addr, int local); /* diff --git a/include/net-snmp/library/snmpDTLSUDPDomain.h b/include/net-snmp/library/snmpDTLSUDPDomain.h index 2135da3..57c9bff 100644 --- a/include/net-snmp/library/snmpDTLSUDPDomain.h +++ b/include/net-snmp/library/snmpDTLSUDPDomain.h @@ -1,12 +1,12 @@ #ifndef _SNMPDTLSUDPDOMAIN_H #define _SNMPDTLSUDPDOMAIN_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(UDP) -config_require(TLSBase) +config_require(UDP); +config_require(TLSBase); #include #include @@ -19,8 +19,8 @@ extern "C" { NETSNMP_IMPORT oid netsnmpDTLSUDPDomain[7]; NETSNMP_IMPORT size_t netsnmpDTLSUDPDomain_len; -netsnmp_transport *netsnmp_dtlsudp_transport(struct sockaddr_in *addr, - int local); +netsnmp_transport * +netsnmp_dtlsudp_transport(const struct netsnmp_ep *ep, int local); /* diff --git a/include/net-snmp/library/snmpIPXDomain.h b/include/net-snmp/library/snmpIPXDomain.h index 11c2beb..b51e298 100644 --- a/include/net-snmp/library/snmpIPXDomain.h +++ b/include/net-snmp/library/snmpIPXDomain.h @@ -7,7 +7,7 @@ extern "C" { #include #include -#if HAVE_NETIPX_IPX_H +#ifdef HAVE_NETIPX_IPX_H #include #endif @@ -15,7 +15,8 @@ extern "C" { config_error(IPX support unavailable for this platform -Linux only-); #endif -netsnmp_transport *netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local); +netsnmp_transport *netsnmp_ipx_transport(const struct sockaddr_ipx *addr, + int local); /* * Convert an textually formatted IPX address into a sockaddr_ipx diff --git a/include/net-snmp/library/snmpIPv4BaseDomain.h b/include/net-snmp/library/snmpIPv4BaseDomain.h index 7871dc4..41eac0b 100644 --- a/include/net-snmp/library/snmpIPv4BaseDomain.h +++ b/include/net-snmp/library/snmpIPv4BaseDomain.h @@ -3,22 +3,30 @@ #ifndef SNMPIPV4BASE_H #define SNMPIPV4BASE_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include +config_require(IPBase); + #ifdef __cplusplus extern "C" { #endif + struct netsnmp_ep; + /* * Prototypes */ char *netsnmp_ipv4_fmtaddr(const char *prefix, netsnmp_transport *t, - void *data, int len); + const void *data, int len); + void netsnmp_ipv4_get_taddr(struct netsnmp_transport_s *t, void **addr, + size_t *addr_len); + int netsnmp_ipv4_ostring_to_sockaddr(struct sockaddr_in *sin, + const void *o, size_t o_len); /* * Convert a "traditional" peername into a sockaddr_in structure which is @@ -30,6 +38,9 @@ extern "C" { int remote_port); int netsnmp_sockaddr_in2(struct sockaddr_in *addr, const char *inpeername, const char *default_target); + int + netsnmp_sockaddr_in3(struct netsnmp_ep *ep, + const char *inpeername, const char *default_target); #ifdef __cplusplus } diff --git a/include/net-snmp/library/snmpIPv6BaseDomain.h b/include/net-snmp/library/snmpIPv6BaseDomain.h index 545c8f0..69eae1c 100644 --- a/include/net-snmp/library/snmpIPv6BaseDomain.h +++ b/include/net-snmp/library/snmpIPv6BaseDomain.h @@ -3,10 +3,12 @@ #ifndef SNMPIPV6BASE_H #define SNMPIPV6BASE_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif +config_require(IPBase); + #include #ifdef __cplusplus @@ -17,15 +19,20 @@ extern "C" { * Prototypes */ - NETSNMP_IMPORT char *netsnmp_ipv6_fmtaddr(const char *prefix, netsnmp_transport *t, - void *data, int len); - NETSNMP_IMPORT + const void *data, int len); + void netsnmp_ipv6_get_taddr(struct netsnmp_transport_s *t, void **addr, + size_t *addr_len); + int netsnmp_ipv6_ostring_to_sockaddr(struct sockaddr_in6 *sin6, + const void *o, size_t o_len); int netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr, const char *inpeername, const char *default_target); int netsnmp_sockaddr_in6(struct sockaddr_in6 *addr, const char *inpeername, int remote_port); + int + netsnmp_sockaddr_in6_3(struct netsnmp_ep *ep, + const char *inpeername, const char *default_target); #ifdef __cplusplus } diff --git a/include/net-snmp/library/snmpSSHDomain.h b/include/net-snmp/library/snmpSSHDomain.h index 2bd44e9..9a6da52 100644 --- a/include/net-snmp/library/snmpSSHDomain.h +++ b/include/net-snmp/library/snmpSSHDomain.h @@ -1,14 +1,14 @@ #ifndef _SNMPSSHDOMAIN_H #define _SNMPSSHDOMAIN_H -config_require(IPv4Base) -config_require(SocketBase) +config_require(IPv4Base); +config_require(SocketBase); #ifdef NETSNMP_TRANSPORT_SSH_DOMAIN #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -25,7 +25,8 @@ extern "C" { NETSNMP_IMPORT const oid netsnmp_snmpSSHDomain[]; enum { netsnmp_snmpSSHDomain_len = 9 }; -netsnmp_transport *netsnmp_ssh_transport(struct sockaddr_in *addr, int local); +netsnmp_transport *netsnmp_ssh_transport(const struct sockaddr_in *addr, + int local); /* * "Constructor" for transport domain object. diff --git a/include/net-snmp/library/snmpSocketBaseDomain.h b/include/net-snmp/library/snmpSocketBaseDomain.h index 71d86c8..0600172 100644 --- a/include/net-snmp/library/snmpSocketBaseDomain.h +++ b/include/net-snmp/library/snmpSocketBaseDomain.h @@ -1,7 +1,7 @@ #ifndef SNMPSOCKETBASEDOMAIN_H #define SNMPSOCKETBASEDOMAIN_H -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/include/net-snmp/library/snmpTCPBaseDomain.h b/include/net-snmp/library/snmpTCPBaseDomain.h index 9c81a90..e0e9247 100644 --- a/include/net-snmp/library/snmpTCPBaseDomain.h +++ b/include/net-snmp/library/snmpTCPBaseDomain.h @@ -12,7 +12,7 @@ extern "C" { */ int netsnmp_tcpbase_recv(netsnmp_transport *t, void *buf, int size, void **opaque, int *olength); - int netsnmp_tcpbase_send(netsnmp_transport *t, void *buf, int size, + int netsnmp_tcpbase_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength); #ifdef __cplusplus diff --git a/include/net-snmp/library/snmpTCPDomain.h b/include/net-snmp/library/snmpTCPDomain.h index c45856b..c662b48 100644 --- a/include/net-snmp/library/snmpTCPDomain.h +++ b/include/net-snmp/library/snmpTCPDomain.h @@ -1,13 +1,13 @@ #ifndef _SNMPTCPDOMAIN_H #define _SNMPTCPDOMAIN_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(IPv4Base) -config_require(SocketBase) -config_require(TCPBase) +config_require(IPv4Base); +config_require(SocketBase); +config_require(TCPBase); #ifdef NETSNMP_TRANSPORT_TCP_DOMAIN @@ -25,7 +25,8 @@ extern "C" { #define TRANSPORT_DOMAIN_TCP_IP 1,3,6,1,2,1,100,1,5 NETSNMP_IMPORT oid netsnmp_snmpTCPDomain[]; -netsnmp_transport *netsnmp_tcp_transport(struct sockaddr_in *addr, int local); +netsnmp_transport * +netsnmp_tcp_transport(const struct netsnmp_ep *ep, int local); /* * "Constructor" for transport domain object. diff --git a/include/net-snmp/library/snmpTCPIPv6Domain.h b/include/net-snmp/library/snmpTCPIPv6Domain.h index 3bca22b..bf8f4e8 100644 --- a/include/net-snmp/library/snmpTCPIPv6Domain.h +++ b/include/net-snmp/library/snmpTCPIPv6Domain.h @@ -1,13 +1,13 @@ #ifndef _SNMPTCPIPV6DOMAIN_H #define _SNMPTCPIPV6DOMAIN_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(IPv6Base) -config_require(SocketBase) -config_require(TCPBase) +config_require(IPv6Base); +config_require(SocketBase); +config_require(TCPBase); #include @@ -23,14 +23,14 @@ extern "C" { #define TRANSPORT_DOMAIN_TCP_IPV6 1,3,6,1,2,1,100,1,6 NETSNMP_IMPORT oid netsnmp_TCPIPv6Domain[]; -netsnmp_transport *netsnmp_tcp6_transport(struct sockaddr_in6 *addr, - int local); +netsnmp_transport * +netsnmp_tcp6_transport(const struct netsnmp_ep *ep, int local); /* * "Constructor" for transport domain object. */ -NETSNMP_IMPORT void netsnmp_tcpipv6_ctor(void); +void netsnmp_tcpipv6_ctor(void); #ifdef __cplusplus } diff --git a/include/net-snmp/library/snmpTLSTCPDomain.h b/include/net-snmp/library/snmpTLSTCPDomain.h index 4f27662..1373533 100644 --- a/include/net-snmp/library/snmpTLSTCPDomain.h +++ b/include/net-snmp/library/snmpTLSTCPDomain.h @@ -1,13 +1,13 @@ #ifndef _SNMPTLSTCPDOMAIN_H #define _SNMPTLSTCPDOMAIN_H -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(IPv4Base) -config_require(SocketBase) -config_require(TLSBase) +config_require(IPv4Base); +config_require(SocketBase); +config_require(TLSBase); #include diff --git a/include/net-snmp/library/snmpUDPBaseDomain.h b/include/net-snmp/library/snmpUDPBaseDomain.h index b9d2c34..93b8745 100644 --- a/include/net-snmp/library/snmpUDPBaseDomain.h +++ b/include/net-snmp/library/snmpUDPBaseDomain.h @@ -1,7 +1,7 @@ #ifndef SNMPUDPBASEDOMAIN_H #define SNMPUDPBASEDOMAIN_H -config_require(SocketBase) +config_require(SocketBase); #include @@ -21,7 +21,7 @@ extern "C" { void _netsnmp_udp_sockopt_set(int fd, int local); int netsnmp_udpbase_recv(netsnmp_transport *t, void *buf, int size, void **opaque, int *olength); - int netsnmp_udpbase_send(netsnmp_transport *t, void *buf, int size, + int netsnmp_udpbase_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength); #if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) @@ -29,8 +29,9 @@ extern "C" { struct sockaddr *from, socklen_t *fromlen, struct sockaddr *dstip, socklen_t *dstlen, int *if_index); - int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, - struct sockaddr *remote, void *data, int len); + int netsnmp_udpbase_sendto(int fd, const struct in_addr *srcip, + int if_index, const struct sockaddr *remote, + const void *data, int len); #endif #ifdef __cplusplus diff --git a/include/net-snmp/library/snmpUDPDomain.h b/include/net-snmp/library/snmpUDPDomain.h index 3a09dfd..a518941 100644 --- a/include/net-snmp/library/snmpUDPDomain.h +++ b/include/net-snmp/library/snmpUDPDomain.h @@ -1,6 +1,12 @@ #ifndef _SNMPUDPDOMAIN_H #define _SNMPUDPDOMAIN_H +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #ifdef __cplusplus extern "C" { #endif @@ -8,18 +14,45 @@ extern "C" { #include #include -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(UDPIPv4Base) +config_require(UDPIPv4Base); #include -netsnmp_transport *netsnmp_udp_transport(struct sockaddr_in *addr, int local); +netsnmp_transport * +netsnmp_udp_transport(const struct netsnmp_ep *ep, int local); + +netsnmp_transport *netsnmp_udp_create_tspec(netsnmp_tdomain_spec *tspec); + +netsnmp_transport * +netsnmp_udp_transport_with_source(const struct netsnmp_ep *ep, int local, + const struct netsnmp_ep *src_addr); + +#define C2SE_ERR_SUCCESS 0 +#define C2SE_ERR_MISSING_ARG -1 +#define C2SE_ERR_COMMUNITY_TOO_LONG -2 +#define C2SE_ERR_SECNAME_TOO_LONG -3 +#define C2SE_ERR_CONTEXT_TOO_LONG -4 +#define C2SE_ERR_MASK_MISMATCH -5 +#define C2SE_ERR_MEMORY -6 + +typedef struct com2SecEntry_s com2SecEntry; + +int netsnmp_udp_com2SecEntry_create(com2SecEntry **entryp, + const char *community, + const char *secName, + const char *contextName, + struct in_addr *network, + struct in_addr *mask, + int negate); +void netsnmp_udp_com2Sec_free(com2SecEntry *e); +int netsnmp_udp_com2SecList_remove(com2SecEntry *e); /* * Register any configuration tokens specific to the agent. @@ -47,13 +80,14 @@ void netsnmp_udp_ctor(void); /* * protected-ish functions used by other core-code */ -char *netsnmp_udp_fmtaddr(netsnmp_transport *t, void *data, int len); +char *netsnmp_udp_fmtaddr(netsnmp_transport *t, const void *data, int len); #if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) int netsnmp_udp_recvfrom(int s, void *buf, int len, struct sockaddr *from, socklen_t *fromlen, struct sockaddr *dstip, socklen_t *dstlen, int *if_index); -int netsnmp_udp_sendto(int fd, struct in_addr *srcip, int if_index, - struct sockaddr *remote, void *data, int len); +int netsnmp_udp_sendto(int fd, const struct in_addr *srcip, int if_index, + const struct sockaddr *remote, const void *data, + int len); #endif #ifdef __cplusplus diff --git a/include/net-snmp/library/snmpUDPIPv4BaseDomain.h b/include/net-snmp/library/snmpUDPIPv4BaseDomain.h index 6f7f2c2..cf9ea5a 100644 --- a/include/net-snmp/library/snmpUDPIPv4BaseDomain.h +++ b/include/net-snmp/library/snmpUDPIPv4BaseDomain.h @@ -1,17 +1,22 @@ /* UDPIPV4 base transport support functions + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef SNMPUDPIPV4BASE_H #define SNMPUDPIPV4BASE_H -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -config_require(UDPBase) -config_require(IPv4Base) +config_require(UDPBase); +config_require(IPv4Base); #include #include @@ -24,16 +29,41 @@ extern "C" { * Prototypes */ - netsnmp_transport *netsnmp_udpipv4base_transport(struct sockaddr_in *addr, - int local); + netsnmp_transport * + netsnmp_udpipv4base_transport(const struct netsnmp_ep *ep, int local); + + netsnmp_transport * + netsnmp_udpipv4base_transport_with_source(const struct netsnmp_ep *ep, + int local, + const struct netsnmp_ep *src_addr); + + netsnmp_transport * + netsnmp_udpipv4base_tspec_transport(netsnmp_tdomain_spec *tspec); + + /** internal functions for derivatives of udpipv4base */ + netsnmp_transport * + netsnmp_udpipv4base_transport_init(const struct netsnmp_ep *ep, + int local); + + int + netsnmp_udpipv4base_transport_socket(int flags); + + int + netsnmp_udpipv4base_transport_bind(netsnmp_transport *t, + const struct netsnmp_ep *ep, + int flags); + + void + netsnmp_udpipv4base_transport_get_bound_addr(netsnmp_transport *t); #if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from, socklen_t *fromlen, struct sockaddr *dstip, socklen_t *dstlen, int *if_index); - int netsnmp_udpipv4_sendto(int fd, struct in_addr *srcip, int if_index, - struct sockaddr *remote, void *data, int len); + int netsnmp_udpipv4_sendto(int fd, const struct in_addr *srcip, + int if_index, const struct sockaddr *remote, + const void *data, int len); #endif diff --git a/include/net-snmp/library/snmpUDPIPv6Domain.h b/include/net-snmp/library/snmpUDPIPv6Domain.h index 83eba2c..5c10ac9 100644 --- a/include/net-snmp/library/snmpUDPIPv6Domain.h +++ b/include/net-snmp/library/snmpUDPIPv6Domain.h @@ -1,6 +1,13 @@ #ifndef _SNMPUDPIPV6DOMAIN_H #define _SNMPUDPIPV6DOMAIN_H +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #ifdef __cplusplus @@ -9,8 +16,8 @@ extern "C" { #include -config_require(IPv6Base) -config_require(UDPBase) +config_require(IPv6Base); +config_require(UDPBase); #include @@ -22,9 +29,29 @@ config_require(UDPBase) #define TRANSPORT_DOMAIN_UDP_IPV6 1,3,6,1,2,1,100,1,2 NETSNMP_IMPORT oid netsnmp_UDPIPv6Domain[]; -netsnmp_transport *netsnmp_udp6_transport(struct sockaddr_in6 *addr, +netsnmp_transport *netsnmp_udp6_transport(const struct netsnmp_ep *ep, int local); +netsnmp_transport * +netsnmp_udp6_transport_with_source(const struct netsnmp_ep *ep, int local, + const struct netsnmp_ep *src_addr); + + /** internal functions for derivatives of udpipv6 */ + + netsnmp_transport * + netsnmp_udp6_transport_init(const struct netsnmp_ep *ep, int local); + + int + netsnmp_udp6_transport_socket(int flags); + + int + netsnmp_udp6_transport_bind(netsnmp_transport *t, + const struct netsnmp_ep *ep, + int flags); + + void + netsnmp_udp6_transport_get_bound_addr(netsnmp_transport *t); + /* * Convert a "traditional" peername into a sockaddr_in6 structure which is @@ -53,7 +80,7 @@ int netsnmp_udp6_getSecName(void *opaque, int olength, * "Constructor" for transport domain object. */ -NETSNMP_IMPORT void netsnmp_udpipv6_ctor(void); +void netsnmp_udpipv6_ctor(void); #ifdef __cplusplus } diff --git a/include/net-snmp/library/snmpUDPsharedDomain.h b/include/net-snmp/library/snmpUDPsharedDomain.h new file mode 100644 index 0000000..b1117ee --- /dev/null +++ b/include/net-snmp/library/snmpUDPsharedDomain.h @@ -0,0 +1,47 @@ +/* UDPshared base transport support functions + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ +#ifndef SNMPUDPsharedBASE_H +#define SNMPUDPsharedBASE_H + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + +config_require(UDP); + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Prototypes + */ + + /* + * "Constructor" for transport domain object. + */ + void netsnmp_udpshared_ctor(void); + + netsnmp_transport *netsnmp_udpshared_transport(const struct netsnmp_ep *ep, + int local); + + netsnmp_transport * + netsnmp_udpshared_transport_with_source(const struct netsnmp_ep *ep, + int local, + const struct netsnmp_ep *src_addr); + +#ifdef __cplusplus +} +#endif +#endif /* SNMPUDPsharedBASE_H */ diff --git a/include/net-snmp/library/snmpUnixDomain.h b/include/net-snmp/library/snmpUnixDomain.h index 91e7f63..ac879c3 100644 --- a/include/net-snmp/library/snmpUnixDomain.h +++ b/include/net-snmp/library/snmpUnixDomain.h @@ -4,19 +4,19 @@ #ifdef NETSNMP_TRANSPORT_UNIX_DOMAIN #if defined(cygwin) || defined(mingw32) || defined(mingw32msvc) - config_error(Unix domain protocol support unavailable for this platform) + config_error(Unix domain protocol support unavailable for this platform); #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif #include -config_require(SocketBase) +config_require(SocketBase); #ifdef __cplusplus extern "C" { @@ -30,7 +30,7 @@ extern "C" { #define TRANSPORT_DOMAIN_LOCAL 1,3,6,1,2,1,100,1,13 NETSNMP_IMPORT oid netsnmp_UnixDomain[]; -netsnmp_transport *netsnmp_unix_transport(struct sockaddr_un *addr, +netsnmp_transport *netsnmp_unix_transport(const struct sockaddr_un *addr, int local); void netsnmp_unix_agent_config_tokens_register(void); void netsnmp_unix_parse_security(const char *token, char *param); diff --git a/include/net-snmp/library/snmp_alarm.h b/include/net-snmp/library/snmp_alarm.h index d1bcbfa..9e3b7d6 100644 --- a/include/net-snmp/library/snmp_alarm.h +++ b/include/net-snmp/library/snmp_alarm.h @@ -1,6 +1,20 @@ #ifndef SNMP_ALARM_H #define SNMP_ALARM_H +/* + * For 'timeval' + */ +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/include/net-snmp/library/snmp_api.h b/include/net-snmp/library/snmp_api.h index 6f658d5..ab61434 100644 --- a/include/net-snmp/library/snmp_api.h +++ b/include/net-snmp/library/snmp_api.h @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, 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 @@ -109,16 +114,17 @@ typedef struct request_list { #else #define SNMP_DEFAULT_AUTH_PROTO usmHMACSHA1AuthProtocol #endif -#define SNMP_DEFAULT_AUTH_PROTOLEN USM_LENGTH_OID_TRANSFORM +#define SNMP_DEFAULT_AUTH_PROTOLEN OID_LENGTH(SNMP_DEFAULT_AUTH_PROTO) #ifndef NETSNMP_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 +#define SNMP_DEFAULT_PRIV_PROTOLEN OID_LENGTH(SNMP_DEFAULT_PRIV_PROTO) NETSNMP_IMPORT void snmp_set_detail(const char *); +#define SNMP_MAX_RCV_MSG_SIZE 65536 #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 @@ -167,6 +173,7 @@ typedef struct request_list { #define SNMP_FLAGS_STREAM_SOCKET 0x80 #define SNMP_FLAGS_LISTENING 0x40 /* Server stream sockets only */ #define SNMP_FLAGS_SUBSESSION 0x20 +#define SNMP_FLAGS_SHARED_SOCKET 0x10 /* subsession list=related sessions */ #define SNMP_FLAGS_STRIKE2 0x02 #define SNMP_FLAGS_STRIKE1 0x01 @@ -281,6 +288,9 @@ typedef struct request_list { NETSNMP_IMPORT void netsnmp_free(void *ptr); NETSNMP_IMPORT char *netsnmp_strdup(const char *s1); + NETSNMP_IMPORT long int netsnmp_random(void); + NETSNMP_IMPORT void netsnmp_srandom(unsigned int seed); + /* * void * snmp_free_pdu(pdu) @@ -328,17 +338,25 @@ typedef struct request_list { #define NETSNMP_CALLBACK_OP_SEND_FAILED 3 #define NETSNMP_CALLBACK_OP_CONNECT 4 #define NETSNMP_CALLBACK_OP_DISCONNECT 5 +#define NETSNMP_CALLBACK_OP_RESEND 6 +#define NETSNMP_CALLBACK_OP_SEC_ERROR 7 + NETSNMP_IMPORT long snmp_get_next_msgid(void); + NETSNMP_IMPORT long snmp_get_next_reqid(void); NETSNMP_IMPORT long snmp_get_next_sessid(void); NETSNMP_IMPORT long snmp_get_next_transid(void); + NETSNMP_IMPORT + int netsnmp_max_send_msg_size(void); + NETSNMP_IMPORT int snmp_oid_compare(const oid *, size_t, const oid *, size_t); + NETSNMP_IMPORT int snmp_oid_ncompare(const oid *, size_t, const oid *, size_t, size_t); NETSNMP_IMPORT @@ -354,6 +372,7 @@ typedef struct request_list { NETSNMP_IMPORT int netsnmp_oid_equals(const oid *, size_t, const oid *, size_t); + NETSNMP_IMPORT int netsnmp_oid_tree_equals(const oid *, size_t, const oid *, size_t); NETSNMP_IMPORT @@ -364,26 +383,46 @@ typedef struct request_list { const oid * in_name2, size_t len2); NETSNMP_IMPORT void init_snmp(const char *); + + NETSNMP_IMPORT + int + snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, + netsnmp_session * pss, netsnmp_pdu *pdu); + + NETSNMP_IMPORT + int + snmp_parse(struct session_list *sessp, netsnmp_session *pss, + netsnmp_pdu *pdu, u_char *data, size_t length); + + NETSNMP_IMPORT u_char *snmp_pdu_build(netsnmp_pdu *, u_char *, size_t *); #ifdef NETSNMP_USE_REVERSE_ASNENCODING + NETSNMP_IMPORT u_char *snmp_pdu_rbuild(netsnmp_pdu *, u_char *, size_t *); #endif + NETSNMP_IMPORT int snmpv3_parse(netsnmp_pdu *, u_char *, size_t *, u_char **, netsnmp_session *); + NETSNMP_IMPORT 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); + NETSNMP_IMPORT 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); + NETSNMP_IMPORT int snmpv3_make_report(netsnmp_pdu *pdu, int error); + NETSNMP_IMPORT int snmpv3_get_report_type(netsnmp_pdu *pdu); + NETSNMP_IMPORT int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length); + NETSNMP_IMPORT u_char *snmpv3_scopedPDU_parse(netsnmp_pdu *pdu, u_char * cp, size_t * length); NETSNMP_IMPORT @@ -399,14 +438,15 @@ typedef struct request_list { const char *); NETSNMP_IMPORT oid *snmp_duplicate_objid(const oid * objToCopy, size_t); - NETSNMP_IMPORT #ifndef NETSNMP_FEATURE_REMOVE_STATISTICS + NETSNMP_IMPORT u_int snmp_increment_statistic(int which); NETSNMP_IMPORT u_int snmp_increment_statistic_by(int which, int count); NETSNMP_IMPORT u_int snmp_get_statistic(int which); + NETSNMP_IMPORT void snmp_init_statistics(void); #else /* NETSNMP_FEATURE_REMOVE_STATISTICS */ @@ -417,8 +457,10 @@ typedef struct request_list { #endif + NETSNMP_IMPORT int create_user_from_session(netsnmp_session * session); - int snmpv3_probe_contextEngineID_rfc5343(void *slp, + NETSNMP_IMPORT + int snmpv3_probe_contextEngineID_rfc5343(struct session_list *slp, netsnmp_session *session); /* @@ -426,12 +468,14 @@ typedef struct request_list { */ #ifdef NETSNMP_USE_REVERSE_ASNENCODING + NETSNMP_IMPORT 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); + NETSNMP_IMPORT int snmp_pdu_realloc_rbuild(u_char ** pkt, size_t * pkt_len, size_t * offset, netsnmp_pdu *pdu); #endif @@ -478,6 +522,8 @@ struct netsnmp_transport_s; void netsnmp_sess_log_error(int priority, const char *prog_string, netsnmp_session * ss); + + NETSNMP_IMPORT const char * snmp_pdu_type(int type); /* @@ -487,6 +533,7 @@ struct netsnmp_transport_s; NETSNMP_IMPORT struct netsnmp_transport_s *snmp_sess_transport(void *); + NETSNMP_IMPORT void snmp_sess_transport_set(void *, struct netsnmp_transport_s *); @@ -511,6 +558,10 @@ struct netsnmp_transport_s; * */ + NETSNMP_IMPORT + void netsnmp_cleanup_session(netsnmp_session *s); + + NETSNMP_IMPORT void *snmp_sess_add_ex(netsnmp_session *, struct netsnmp_transport_s *, int (*fpre_parse) (netsnmp_session *, @@ -537,6 +588,7 @@ struct netsnmp_transport_s; void *, size_t)); + NETSNMP_IMPORT void *snmp_sess_add(netsnmp_session *, struct netsnmp_transport_s *, int (*fpre_parse) (netsnmp_session *, diff --git a/include/net-snmp/library/snmp_debug.h b/include/net-snmp/library/snmp_debug.h index a3969f6..7c2ed65 100644 --- a/include/net-snmp/library/snmp_debug.h +++ b/include/net-snmp/library/snmp_debug.h @@ -1,6 +1,19 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #ifndef SNMP_DEBUG_H #define SNMP_DEBUG_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -14,14 +27,6 @@ extern "C" { * compile time. */ - -#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define NETSNMP_ATTRIBUTE_FORMAT(type, formatArg, firstArg) -#else -#define NETSNMP_ATTRIBUTE_FORMAT(type, formatArg, firstArg) \ - __attribute__((__format__( __ ## type ## __, formatArg, firstArg ))) -#endif - /* * These functions should not be used, if at all possible. Instead, use * the macros below. @@ -33,12 +38,10 @@ extern "C" { void debugmsgtoken(const char *token, const char *format, ...) NETSNMP_ATTRIBUTE_FORMAT(printf, 2, 3); + NETSNMP_IMPORT void debug_combo_nc(const char *token, const char *format, ...) NETSNMP_ATTRIBUTE_FORMAT(printf, 2, 3); - -#undef NETSNMP_ATTRIBUTE_FORMAT - NETSNMP_IMPORT void debugmsg_oid(const char *token, const oid * theoid, size_t len); @@ -61,7 +64,11 @@ extern "C" { NETSNMP_IMPORT void debug_indent_add(int amount); NETSNMP_IMPORT + void debug_indent_reset(void); + NETSNMP_IMPORT int debug_indent_get(void); + NETSNMP_IMPORT + void debug_indent_reset(void); /* * What is said above is true for this function as well. Further this * function is deprecated and only provided for backwards compatibility. @@ -214,6 +221,7 @@ extern "C" { #endif void snmp_debug_init(void); + void snmp_debug_shutdown(void); #define MAX_DEBUG_TOKENS 256 #define MAX_DEBUG_TOKEN_LEN 128 diff --git a/include/net-snmp/library/snmp_enum.h b/include/net-snmp/library/snmp_enum.h index 237891d..0dab3a5 100644 --- a/include/net-snmp/library/snmp_enum.h +++ b/include/net-snmp/library/snmp_enum.h @@ -1,6 +1,13 @@ #ifndef SNMP_ENUM_H #define SNMP_ENUM_H +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #ifdef __cplusplus extern "C" { #endif @@ -69,6 +76,9 @@ extern "C" { NETSNMP_IMPORT int se_find_value_in_slist(const char *listname, const char *label); + NETSNMP_IMPORT + int se_find_casevalue_in_slist(const char *listname, + const char *label); int se_find_free_value_in_slist(const char *listname); /** * Add the pair (label, value) to the slist with name listname. Transfers @@ -86,6 +96,8 @@ extern "C" { int value); int se_find_value_in_list(struct snmp_enum_list *list, const char *label); + int se_find_casevalue_in_list(struct snmp_enum_list *list, + const 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); @@ -101,7 +113,7 @@ extern "C" { void se_store_slist(const char *listname, const 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 se_read_conf(const char *word, const char *cptr); /** * Deallocate the memory allocated by init_snmp_enum(): remove all key/value * pairs stored by se_add_*() calls. diff --git a/include/net-snmp/library/snmp_logging.h b/include/net-snmp/library/snmp_logging.h index a78bfa8..3504aa8 100644 --- a/include/net-snmp/library/snmp_logging.h +++ b/include/net-snmp/library/snmp_logging.h @@ -4,12 +4,12 @@ #include #include -#if HAVE_SYSLOG_H -#ifdef PHP_WIN32 -# include -#else -# include -#endif +#ifdef HAVE_SYSLOG_H +# ifdef PHP_WIN32 +# include +# else +# include +# endif #endif #include #include @@ -63,6 +63,7 @@ extern "C" { int dont_zero_log); NETSNMP_IMPORT void snmp_enable_stderrlog(void); + NETSNMP_IMPORT void snmp_enable_calllog(void); NETSNMP_IMPORT @@ -86,8 +87,9 @@ extern "C" { char *snmp_log_syslogname(const char *syslogname); typedef struct netsnmp_log_handler_s netsnmp_log_handler; typedef int (NetsnmpLogHandler)(netsnmp_log_handler*, int, const char *); - +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO NetsnmpLogHandler log_handler_stdouterr; +#endif /* NETSNMP_FEATURE_REMOVE_LOGGING_STDIO */ NetsnmpLogHandler log_handler_file; NetsnmpLogHandler log_handler_syslog; NetsnmpLogHandler log_handler_callback; @@ -124,6 +126,16 @@ NETSNMP_IMPORT void netsnmp_disable_this_loghandler( netsnmp_log_handler *logh ); NETSNMP_IMPORT void netsnmp_logging_restart(void); + +NETSNMP_IMPORT +netsnmp_log_handler * +netsnmp_create_stdio_loghandler(int is_stdout, int priority, int priority_max, + const char *tok); +NETSNMP_IMPORT +netsnmp_log_handler * +netsnmp_register_filelog_handler(const char* logfilename, int priority, + int priority_max, int dont_zero_log); + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/library/snmp_openssl.h b/include/net-snmp/library/snmp_openssl.h index b291736..d4c8361 100644 --- a/include/net-snmp/library/snmp_openssl.h +++ b/include/net-snmp/library/snmp_openssl.h @@ -5,10 +5,17 @@ #ifndef SNMP_OPENSSL_H #define SNMP_OPENSSL_H +#ifdef NETSNMP_USE_OPENSSL +#include +#include + #ifdef __cplusplus extern "C" { #endif + struct netsnmp_cert_map_s; + + NETSNMP_IMPORT void netsnmp_init_openssl(void); /* @@ -24,8 +31,8 @@ extern "C" { int netsnmp_openssl_cert_issued_by(X509 *issuer, X509 *cert); - char *netsnmp_openssl_extract_secname(netsnmp_cert_map *cert_map, - netsnmp_cert_map *peer_cert); + char *netsnmp_openssl_extract_secname(struct netsnmp_cert_map_s *cert_map, + struct netsnmp_cert_map_s *peer_cert); char *netsnmp_openssl_cert_get_subjectAltName(X509 *, char **buf, int *len); @@ -40,6 +47,49 @@ extern "C" { void netsnmp_openssl_err_log(const char *prefix); void netsnmp_openssl_null_checks(SSL *ssl, int *nullAuth, int *nullCipher); + /* + * backports + */ +#ifndef HAVE_DH_SET0_PQG + NETSNMP_IMPORT + int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); +#endif +#ifndef HAVE_DH_GET0_PQG + NETSNMP_IMPORT + void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, + const BIGNUM **g); +#endif +#ifndef HAVE_DH_GET0_KEY + NETSNMP_IMPORT + void DH_get0_key(const DH *dh, const BIGNUM **pub_key, + const BIGNUM **priv_key); +#endif +#ifndef HAVE_ASN1_STRING_GET0_DATA + NETSNMP_IMPORT + const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x); +#endif +#ifndef HAVE_X509_NAME_ENTRY_GET_OBJECT + NETSNMP_IMPORT + ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne); +#endif +#ifndef HAVE_X509_NAME_ENTRY_GET_DATA + NETSNMP_IMPORT + ASN1_STRING *X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne); +#endif +#ifndef HAVE_X509_GET_SIGNATURE_NID + NETSNMP_IMPORT + int X509_get_signature_nid(const X509 *req); +#endif +#ifndef HAVE_TLS_METHOD + NETSNMP_IMPORT + const SSL_METHOD *TLS_method(void); +#endif +#ifndef HAVE_DTLS_METHOD + NETSNMP_IMPORT + const SSL_METHOD *DTLS_method(void); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/library/snmp_parse_args.h b/include/net-snmp/library/snmp_parse_args.h index 1ad63e0..6f6f966 100644 --- a/include/net-snmp/library/snmp_parse_args.h +++ b/include/net-snmp/library/snmp_parse_args.h @@ -43,9 +43,7 @@ extern "C" { #define NETSNMP_PARSE_ARGS_ERROR -3 /** - * Parse an argument list and initialize \link netsnmp_session - * session\endlink - * from it. + * Parse an argument list and initialize netsnmp_session from it. * @param argc Number of elements in argv * @param argv string array of at least argc elements * @param session diff --git a/include/net-snmp/library/snmp_secmod.h b/include/net-snmp/library/snmp_secmod.h index aabb7ed..937f235 100644 --- a/include/net-snmp/library/snmp_secmod.h +++ b/include/net-snmp/library/snmp_secmod.h @@ -86,13 +86,15 @@ 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, +typedef void (SecmodHandleReport) (struct session_list *slp, netsnmp_transport *transport, netsnmp_session *, int result, netsnmp_pdu *origpdu); -typedef int (SecmodDiscoveryMethod) (void *slp, netsnmp_session *session); -typedef int (SecmodPostDiscovery) (void *slp, netsnmp_session *session); +typedef int (SecmodDiscoveryMethod) (struct session_list *slp, + netsnmp_session *session); +typedef int (SecmodPostDiscovery) (struct session_list *slp, + netsnmp_session *session); typedef int (SecmodSessionSetup) (netsnmp_session *in_session, netsnmp_session *out_session); diff --git a/include/net-snmp/library/snmp_transport.h b/include/net-snmp/library/snmp_transport.h index 4162897..d005d45 100644 --- a/include/net-snmp/library/snmp_transport.h +++ b/include/net-snmp/library/snmp_transport.h @@ -1,9 +1,15 @@ #ifndef _SNMP_TRANSPORT_H #define _SNMP_TRANSPORT_H +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #ifdef solaris2 #define _XPG4_2 #endif @@ -48,6 +54,7 @@ extern "C" { TSM tmStateReference */ #define NETSNMP_TRANSPORT_FLAG_EMPTY_PKT 0x10 #define NETSNMP_TRANSPORT_FLAG_OPENED 0x20 /* f_open called */ +#define NETSNMP_TRANSPORT_FLAG_SHARED 0x40 #define NETSNMP_TRANSPORT_FLAG_HOSTNAME 0x80 /* for fmtaddr hook */ /* The standard SNMP domains. */ @@ -106,6 +113,20 @@ typedef struct netsnmp_tmStateReference_s { void *otherTransportOpaque; /* XXX: May have mem leak issues */ } netsnmp_tmStateReference; +#define NETSNMP_TSPEC_LOCAL 0x01 /* 1=server, 0=client */ +#define NETSNMP_TSPEC_PREBOUND 0x02 /* 1=bound by systemd, 0=needs bind in the library */ + +struct netsnmp_container_s; /* forward decl */ +typedef struct netsnmp_tdomain_spec_s { + const char *application; /* application name */ + const char *target; /* target as string */ + u_int flags; + const char *default_domain; /* default domain */ + const char *default_target; /* default target */ + const char *source; /* source as string iff remote */ + struct netsnmp_container_s *transport_config; /* extra config */ +} netsnmp_tdomain_spec; + /* Structure which defines the transport-independent API. */ struct snmp_session; @@ -118,12 +139,12 @@ typedef struct netsnmp_transport_s { /* Local transport address (in relevant SNMP-style encoding). */ - unsigned char *local; + void *local; int local_length; /* In octets. */ /* Remote transport address (in relevant SNMP-style encoding). */ - unsigned char *remote; + void *remote; int remote_length; /* In octets. */ /* The actual socket. */ @@ -158,7 +179,7 @@ typedef struct netsnmp_transport_s { int (*f_recv) (struct netsnmp_transport_s *, void *, int, void **, int *); - int (*f_send) (struct netsnmp_transport_s *, void *, + int (*f_send) (struct netsnmp_transport_s *, const void *, int, void **, int *); int (*f_close) (struct netsnmp_transport_s *); @@ -171,7 +192,8 @@ typedef struct netsnmp_transport_s { /* Optional callback to format a transport address. */ - char *(*f_fmtaddr)(struct netsnmp_transport_s *, void *, int); + char *(*f_fmtaddr)(struct netsnmp_transport_s *, const void *, + int); /* Optional callback to support extra configuration token/value pairs */ /* return non-zero on error */ @@ -180,7 +202,7 @@ typedef struct netsnmp_transport_s { /* Optional callback that is called after the first transport is cloned to the second */ - int (*f_copy)(struct netsnmp_transport_s *, + int (*f_copy)(const struct netsnmp_transport_s *, struct netsnmp_transport_s *); /* Setup initial session config if special things are needed */ @@ -190,6 +212,11 @@ typedef struct netsnmp_transport_s { /* allocated host name identifier; used by configuration system to load localhost.conf for host-specific configuration */ u_char *identifier; /* udp:localhost:161 -> "localhost" */ + + /* Duplicate the remote address in the format required by SNMP-TARGET-MIB */ + void (*f_get_taddr)(struct netsnmp_transport_s *t, + void **addr, size_t *addr_len); + } netsnmp_transport; typedef struct netsnmp_transport_list_s { @@ -203,27 +230,35 @@ typedef struct netsnmp_tdomain_s { const char **prefix; /* - * The f_create_from_tstring field is deprecated, please do not use it - * for new code and try to migrate old code away from using it. + * The f_create_from_tstring and f_create_from_tstring_new fields are + * deprecated, please do not use them for new code and try to migrate + * old code away from using them. */ netsnmp_transport *(*f_create_from_tstring) (const char *, int); - netsnmp_transport *(*f_create_from_ostring) (const u_char *, size_t, int); + /* @o and @o_len define an address in the format used by SNMP-TARGET-MIB */ + netsnmp_transport *(*f_create_from_ostring) (const void *o, size_t o_len, + int local); struct netsnmp_tdomain_s *next; + /** deprecated, please do not use it */ netsnmp_transport *(*f_create_from_tstring_new) (const char *, int, const char*); + netsnmp_transport *(*f_create_from_tspec) (netsnmp_tdomain_spec *); } netsnmp_tdomain; void init_snmp_transport(void); +void shutdown_snmp_transport(void); /* Some utility functions. */ -char *netsnmp_transport_peer_string(netsnmp_transport *t, void *data, int len); +NETSNMP_IMPORT +char *netsnmp_transport_peer_string(netsnmp_transport *t, const void *data, + int len); -int netsnmp_transport_send(netsnmp_transport *t, void *data, int len, +int netsnmp_transport_send(netsnmp_transport *t, const void *data, int len, void **opaque, int *olength); int netsnmp_transport_recv(netsnmp_transport *t, void *data, int len, void **opaque, int *olength); @@ -232,7 +267,8 @@ 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); -int netsnmp_sockaddr_size(struct sockaddr *sa); +NETSNMP_IMPORT +int netsnmp_sockaddr_size(const struct sockaddr *sa); /* @@ -240,7 +276,7 @@ int netsnmp_sockaddr_size(struct sockaddr *sa); * problem (for instance). */ -netsnmp_transport *netsnmp_transport_copy(netsnmp_transport *t); +netsnmp_transport *netsnmp_transport_copy(const netsnmp_transport *t); /* Free an netsnmp_transport. */ @@ -248,6 +284,23 @@ netsnmp_transport *netsnmp_transport_copy(netsnmp_transport *t); NETSNMP_IMPORT void netsnmp_transport_free(netsnmp_transport *t); +#ifndef FEATURE_REMOVE_TRANSPORT_CACHE + +/** transport cache support */ + +NETSNMP_IMPORT +netsnmp_transport *netsnmp_transport_cache_get(int af, int type, int local, + const netsnmp_sockaddr_storage *bind_addr); + +NETSNMP_IMPORT +int netsnmp_transport_cache_save(int af, int type, int local, + const netsnmp_sockaddr_storage *addr, + netsnmp_transport *t); + +NETSNMP_IMPORT +int netsnmp_transport_cache_remove(netsnmp_transport *t); + +#endif /* FEATURE_REMOVE_TRANSPORT_CACHE */ /* * If the passed oid (in_oid, in_len) corresponds to a supported transport @@ -289,6 +342,9 @@ netsnmp_transport *netsnmp_tdomain_transport_oid(const oid * dom, size_t o_len, int local); +NETSNMP_IMPORT +netsnmp_transport *netsnmp_tdomain_transport_tspec(netsnmp_tdomain_spec *tspec); + NETSNMP_IMPORT netsnmp_transport* netsnmp_transport_open_client(const char* application, const char* str); @@ -309,8 +365,27 @@ NETSNMP_IMPORT int netsnmp_transport_config_compare(netsnmp_transport_config *left, netsnmp_transport_config *right); NETSNMP_IMPORT -netsnmp_transport_config *netsnmp_transport_create_config(char *key, - char *value); +netsnmp_transport_config *netsnmp_transport_create_config(const char *key, + const char *value); + +#ifndef NETSNMP_FEATURE_REMOVE_FILTER_SOURCE +NETSNMP_IMPORT +void netsnmp_transport_parse_filterType(const char *word, char *cptr); + +NETSNMP_IMPORT +int netsnmp_transport_filter_add(const char *addrtxt); + +NETSNMP_IMPORT +int netsnmp_transport_filter_remove(const char *addrtxt); + +NETSNMP_IMPORT +int netsnmp_transport_filter_check(const char *addrtxt); + +NETSNMP_IMPORT +void netsnmp_transport_filter_cleanup(void); + +#endif /* NETSNMP_FEATURE_REMOVE_FILTER_SOURCE */ + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/library/snmpusm.h b/include/net-snmp/library/snmpusm.h index 9d673cc..a97aeb2 100644 --- a/include/net-snmp/library/snmpusm.h +++ b/include/net-snmp/library/snmpusm.h @@ -2,6 +2,11 @@ * snmpusm.h * * Header file for USM support. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef SNMPUSM_H @@ -26,29 +31,18 @@ extern "C" { #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_HMAC128SHA224_AUTH_LEN 16 /* OPTIONAL */ +#define USM_HMAC192SHA256_AUTH_LEN 24 /* MUST */ +#define USM_HMAC256SHA384_AUTH_LEN 32 /* OPTIONAL */ +#define USM_HMAC384SHA512_AUTH_LEN 48 /* SHOULD */ +#define USM_MAX_AUTHSIZE USM_HMAC384SHA512_AUTH_LEN #define USM_SEC_MODEL_NUMBER SNMP_SEC_MODEL_USM /* * 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 usmStateReference; /* * struct usmUser: a structure to represent a given user in a list @@ -60,6 +54,7 @@ extern "C" { struct usmUser; struct usmUser { + u_int flags; u_char *engineID; size_t engineIDLen; char *name; @@ -70,8 +65,12 @@ extern "C" { size_t authProtocolLen; u_char *authKey; size_t authKeyLen; + u_char *authKeyKu; + size_t authKeyKuLen; oid *privProtocol; size_t privProtocolLen; + u_char *privKeyKu; + size_t privKeyKuLen; u_char *privKey; size_t privKeyLen; u_char *userPublicString; @@ -85,186 +84,101 @@ extern "C" { struct usmUser *prev; }; +#define USMUSER_FLAG_KEEP_MASTER_KEY 0x01 /* * 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); - int usm_clone_usmStateReference(struct usmStateReference *from, - struct usmStateReference **to); - - -#ifdef NETSNMP_ENABLE_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); - - SecmodSessionCallback usm_open_session; - 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); + NETSNMP_IMPORT + int usm_extend_user_kul(struct usmUser *user, + u_int privKeyBufSize); NETSNMP_IMPORT struct usmUser *usm_get_userList(void); NETSNMP_IMPORT - 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_get_user(const u_char *engineID, size_t engineIDLen, + const char *name); NETSNMP_IMPORT struct usmUser *usm_add_user(struct usmUser *user); - struct usmUser *usm_add_user_to_list(struct usmUser *user, - struct usmUser *userList); NETSNMP_IMPORT struct usmUser *usm_free_user(struct usmUser *user); NETSNMP_IMPORT struct usmUser *usm_create_user(void); NETSNMP_IMPORT - struct usmUser *usm_create_initial_user(const char *name, - const oid * authProtocol, - size_t authProtocolLen, - const oid * privProtocol, - size_t privProtocolLen); - NETSNMP_IMPORT struct usmUser *usm_cloneFrom_user(struct usmUser *from, struct usmUser *to); NETSNMP_IMPORT 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); - NETSNMP_IMPORT - 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); - NETSNMP_IMPORT - SNMPCallback usm_store_users; - struct usmUser *usm_read_user(const char *line); NETSNMP_IMPORT void usm_parse_config_usmUser(const char *token, char *line); - - void usm_set_password(const char *token, char *line); NETSNMP_IMPORT void usm_set_user_password(struct usmUser *user, const char *token, char *line); void init_usm(void); NETSNMP_IMPORT 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); - NETSNMP_IMPORT - void clear_user_list(void); NETSNMP_IMPORT void shutdown_usm(void); + NETSNMP_IMPORT + int usm_lookup_auth_type(const char *str); + NETSNMP_IMPORT + const char *usm_lookup_auth_str(int value); + NETSNMP_IMPORT + oid *usm_get_auth_oid(int auth_type, size_t *oid_len); + NETSNMP_IMPORT + int usm_lookup_priv_type(const char *str); + NETSNMP_IMPORT + const char *usm_lookup_priv_str(int value); + NETSNMP_IMPORT + oid *usm_get_priv_oid(int priv_type, size_t *oid_len); + + +#define USM_CREATE_USER_AUTH_DFLT -1 +#define USM_CREATE_USER_AUTH_NONE NETSNMP_USMAUTH_NONE +#define USM_CREATE_USER_AUTH_MD5 NETSNMP_USMAUTH_HMACMD5 +#define USM_CREATE_USER_AUTH_SHA1 NETSNMP_USMAUTH_HMACSHA1 +#define USM_CREATE_USER_AUTH_SHA USM_CREATE_USER_AUTH_SHA1 +#define USM_CREATE_USER_AUTH_SHA512 NETSNMP_USMAUTH_HMAC384SHA512 +#define USM_CREATE_USER_AUTH_SHA384 NETSNMP_USMAUTH_HMAC256SHA384 +#define USM_CREATE_USER_AUTH_SHA256 NETSNMP_USMAUTH_HMAC192SHA256 +#define USM_CREATE_USER_AUTH_SHA224 NETSNMP_USMAUTH_HMAC128SHA224 + + /** flags for variants fo priv algorithsm */ +#define USM_DES_FLAG_3 0x000100 + +#define USM_AES_FLAG_192 0x000100 +#define USM_AES_FLAG_256 0x000200 + +#define USM_AES_REEDER_FLAG 0x030000 +#define USM_AES_FLAG_CISCO 0x100000 + +#define USM_PRIV_MASK_ALG 0x0000ff +#define USM_PRIV_MASK_VARIANT 0x00ff00 + +#define USM_CREATE_USER_PRIV_DFLT -1 +#define USM_CREATE_USER_PRIV_NONE 0 + +#define USM_CREATE_USER_PRIV_DES 0x01 +#define USM_CREATE_USER_PRIV_3DES \ + (USM_CREATE_USER_PRIV_DES | USM_DES_FLAG_3) + +#define USM_CREATE_USER_PRIV_AES 0x02 +#define USM_CREATE_USER_PRIV_AES192 \ + (USM_CREATE_USER_PRIV_AES | USM_AES_FLAG_192) +#define USM_CREATE_USER_PRIV_AES256 \ + (USM_CREATE_USER_PRIV_AES | USM_AES_FLAG_256) + +#define USM_CREATE_USER_PRIV_AES192_CISCO \ + (USM_CREATE_USER_PRIV_AES | USM_AES_FLAG_192 | USM_AES_FLAG_CISCO \ + | USM_AES_REEDER_FLAG) +#define USM_CREATE_USER_PRIV_AES256_CISCO \ + (USM_CREATE_USER_PRIV_AES | USM_AES_FLAG_256 | USM_AES_FLAG_CISCO \ + | USM_AES_REEDER_FLAG) + NETSNMP_IMPORT int usm_create_user_from_session(netsnmp_session * session); - SecmodPostDiscovery usm_create_user_from_session_hook; NETSNMP_IMPORT void usm_parse_create_usmUser(const char *token, char *line); @@ -272,8 +186,6 @@ extern "C" { const oid *get_default_authtype(size_t *); NETSNMP_IMPORT const oid *get_default_privtype(size_t *); - void snmpv3_authtype_conf(const char *word, char *cptr); - void snmpv3_privtype_conf(const char *word, char *cptr); #ifdef __cplusplus } diff --git a/include/net-snmp/library/snmpv3.h b/include/net-snmp/library/snmpv3.h index a958809..df8b8a4 100644 --- a/include/net-snmp/library/snmpv3.h +++ b/include/net-snmp/library/snmpv3.h @@ -1,5 +1,10 @@ /* * snmpv3.h + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef SNMPV3_H @@ -20,8 +25,13 @@ extern "C" { #define DEFAULT_NIC "eth0" + NETSNMP_IMPORT int + snmpv3_parse_args(char *optarg, netsnmp_session * session, char **Apsz, + char **Xpsz, int argc, char *const *argv, int flags); NETSNMP_IMPORT int setup_engineID(u_char ** eidp, const char *text); + NETSNMP_IMPORT + int set_exact_engineID(const u_char *id, size_t len); void engineID_conf(const char *word, char *cptr); void engineBoots_conf(const char *, char *); void engineIDType_conf(const char *, char *); @@ -54,6 +64,13 @@ extern "C" { void *clientarg); NETSNMP_IMPORT int parse_secLevel_conf(const char* word, char *cptr); + NETSNMP_IMPORT int + snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, + char **Apsz, char **Xpsz, int argc, char *const *argv, + int flags); + NETSNMP_IMPORT int + snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, + char **Xpsz, int argc, char *const *argv); #ifdef __cplusplus } diff --git a/include/net-snmp/library/system.h b/include/net-snmp/library/system.h index 1a424c2..de19e66 100644 --- a/include/net-snmp/library/system.h +++ b/include/net-snmp/library/system.h @@ -5,6 +5,8 @@ #error "Please include before this file" #endif +#include /* va_list */ + #ifdef __cplusplus extern "C" { #endif @@ -41,6 +43,9 @@ SOFTWARE. */ + struct timeval; + + /* * function to create a daemon. Will fork and call setsid(). * @@ -95,18 +100,9 @@ SOFTWARE. #endif /* MSVC_PERL */ -/* - * Note: when compiling Net-SNMP with dmalloc enabled on a system without - * strcasecmp() or strncasecmp(), the macro HAVE_STRNCASECMP is - * not defined but strcasecmp() and strncasecmp() are defined as macros in - * . In order to prevent a compilation error, do not declare - * strcasecmp() or strncasecmp() when the header has been included. - */ -#if !defined(HAVE_STRNCASECMP) && !defined(strcasecmp) +#if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp) NETSNMP_IMPORT int strcasecmp(const char *s1, const char *s2); -#endif -#if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp) NETSNMP_IMPORT int strncasecmp(const char *s1, const char *s2, size_t n); #endif @@ -124,6 +120,9 @@ SOFTWARE. #endif /* WIN32 */ #include /* For definition of in_addr_t */ +#ifdef HAVE_NETINET_IN_H +#include +#endif /* Simply resolve a hostname and return first IPv4 address. * Returns -1 on error */ @@ -184,6 +183,12 @@ SOFTWARE. #ifndef HAVE_SNPRINTF int snprintf(char *, size_t, const char *, ...); #endif +#ifndef HAVE_ASPRINTF + NETSNMP_IMPORT + int vasprintf(char **strp, const char *fmt, va_list ap); + NETSNMP_IMPORT + int asprintf(char **strp, const char *fmt, ...); +#endif NETSNMP_IMPORT int mkdirhier(const char *pathname, mode_t mode, diff --git a/include/net-snmp/library/tools.h b/include/net-snmp/library/tools.h index 2634b34..0967139 100644 --- a/include/net-snmp/library/tools.h +++ b/include/net-snmp/library/tools.h @@ -3,15 +3,16 @@ * @defgroup util Memory Utility Routines * @ingroup library * @{ + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef _TOOLS_H #define _TOOLS_H -#ifdef HAVE_INTTYPES_H -#include /* uintptr_t */ -#endif - #ifdef __cplusplus extern "C" { #endif @@ -54,11 +55,7 @@ extern "C" { /** @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) +#define SNMP_FREE(s) do { if (s) { free(s); s=NULL; } } while(0) /* * XXX Not optimal everywhere. @@ -87,9 +84,9 @@ extern "C" { */ #if defined(__GNUC__) #define NETSNMP_REMOVE_CONST(t, e) \ - (__extension__ ({ const t tmp = (e); (t)(uintptr_t)tmp; })) + (__extension__ ({ const t tmp = (e); (t)(size_t)tmp; })) #else -#define NETSNMP_REMOVE_CONST(t, e) ((t)(uintptr_t)(e)) +#define NETSNMP_REMOVE_CONST(t, e) ((t)(size_t)(e)) #endif @@ -127,6 +124,8 @@ extern "C" { #define TRUE 1 #endif +#define NETSNMP_IGNORE_RESULT(e) do { if (e) { } } while (0) + /* * QUIT the FUNction: * e Error code variable @@ -150,15 +149,14 @@ extern "C" { * @note res may be the same variable as one of the operands. In other * words, &a == &res || &b == &res may hold. */ -#define NETSNMP_TIMERADD(a, b, res) \ -{ \ +#define NETSNMP_TIMERADD(a, b, res) do { \ (res)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ if ((res)->tv_usec >= 1000000L) { \ (res)->tv_usec -= 1000000L; \ (res)->tv_sec++; \ } \ -} +} while (0) /** * Compute res = a - b. @@ -168,31 +166,20 @@ extern "C" { * @note res may be the same variable as one of the operands. In other * words, &a == &res || &b == &res may hold. */ -#define NETSNMP_TIMERSUB(a, b, res) \ -{ \ +#define NETSNMP_TIMERSUB(a, b, res) do { \ (res)->tv_sec = (a)->tv_sec - (b)->tv_sec - 1; \ (res)->tv_usec = (a)->tv_usec - (b)->tv_usec + 1000000L; \ if ((res)->tv_usec >= 1000000L) { \ (res)->tv_usec -= 1000000L; \ (res)->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) +} while (0) #define ENGINETIME_MAX 2147483647 /* ((2^31)-1) */ #define ENGINEBOOT_MAX 2147483647 /* ((2^31)-1) */ + struct timeval; /* @@ -208,6 +195,8 @@ extern "C" { u_char *malloc_zero(size_t size); NETSNMP_IMPORT void *netsnmp_memdup(const void * from, size_t size); + NETSNMP_IMPORT + void *netsnmp_memdup_nt(const void *from, size_t from_len, size_t *to_len); void netsnmp_check_definedness(const void *packet, size_t length); @@ -267,6 +256,7 @@ extern "C" { void netsnmp_set_monotonic_marker(marker_t *pm); NETSNMP_IMPORT long atime_diff(const_marker_t first, const_marker_t second); + NETSNMP_IMPORT u_long uatime_diff(const_marker_t first, const_marker_t second); /* 1/1000th sec */ NETSNMP_IMPORT u_long uatime_hdiff(const_marker_t first, const_marker_t second); /* 1/100th sec */ @@ -293,4 +283,4 @@ extern "C" { } #endif #endif /* _TOOLS_H */ -/* @} */ +/** @} */ diff --git a/include/net-snmp/library/transform_oids.h b/include/net-snmp/library/transform_oids.h index 61bc338..79dbca5 100644 --- a/include/net-snmp/library/transform_oids.h +++ b/include/net-snmp/library/transform_oids.h @@ -8,22 +8,50 @@ extern "C" { * transform_oids.h * * Numeric MIB names for auth and priv transforms. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ -NETSNMP_IMPORT oid usmNoAuthProtocol[10]; /* == { 1,3,6,1,6,3,10,1,1,1 }; */ +/** auth */ +#define NETSNMP_USMAUTH_BASE_OID 1,3,6,1,6,3,10,1,1 +#define NETSNMP_USMAUTH_NOAUTH 1 +#define NETSNMP_USMAUTH_HMACMD5 2 +#define NETSNMP_USMAUTH_HMACSHA1 3 +#define NETSNMP_USMAUTH_HMACSHA NETSNMP_USMAUTH_HMACSHA1 +#define NETSNMP_USMAUTH_HMAC128SHA224 4 /* RFC 7860; OPTIONAL */ +#define NETSNMP_USMAUTH_HMAC192SHA256 5 /* RFC 7860; MUST */ +#define NETSNMP_USMAUTH_HMAC256SHA384 6 /* RFC 7860; OPTIONAL */ +#define NETSNMP_USMAUTH_HMAC384SHA512 7 /* RFC 7860; SHOULD */ + +NETSNMP_IMPORT oid usmNoAuthProtocol[10]; + #ifndef NETSNMP_DISABLE_MD5 -NETSNMP_IMPORT oid usmHMACMD5AuthProtocol[10]; /* == { 1,3,6,1,6,3,10,1,1,2 }; */ +NETSNMP_IMPORT oid usmHMACMD5AuthProtocol[10]; #endif -NETSNMP_IMPORT oid usmHMACSHA1AuthProtocol[10]; /* == { 1,3,6,1,6,3,10,1,1,3 }; */ -NETSNMP_IMPORT oid usmNoPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,1 }; */ + +NETSNMP_IMPORT oid usmHMACSHA1AuthProtocol[10]; + +NETSNMP_IMPORT oid usmHMAC128SHA224AuthProtocol[10]; +NETSNMP_IMPORT oid usmHMAC192SHA256AuthProtocol[10]; +NETSNMP_IMPORT oid usmHMAC256SHA384AuthProtocol[10]; +NETSNMP_IMPORT oid usmHMAC384SHA512AuthProtocol[10]; + +/** priv */ +NETSNMP_IMPORT oid usmNoPrivProtocol[10]; + #ifndef NETSNMP_DISABLE_DES -NETSNMP_IMPORT oid usmDESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,2 }; */ +NETSNMP_IMPORT oid usmDESPrivProtocol[10]; #endif -/* XXX: OIDs not defined yet */ -NETSNMP_IMPORT oid usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */ +NETSNMP_IMPORT oid usmAESPrivProtocol[10]; NETSNMP_IMPORT oid *usmAES128PrivProtocol; /* backwards compat */ +/* + * backwards compatibility. should not be used in internal code. + */ #define USM_AUTH_PROTO_NOAUTH_LEN 10 #define USM_AUTH_PROTO_MD5_LEN 10 #define USM_AUTH_PROTO_SHA_LEN 10 @@ -33,6 +61,17 @@ NETSNMP_IMPORT oid *usmAES128PrivProtocol; /* backwards compat */ #define USM_PRIV_PROTO_AES_LEN 10 #define USM_PRIV_PROTO_AES128_LEN 10 /* backwards compat */ +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 +NETSNMP_IMPORT oid usmAES192PrivProtocol[9]; +NETSNMP_IMPORT oid usmAES256PrivProtocol[9]; + +NETSNMP_IMPORT oid usmAES192CiscoPrivProtocol[11]; +NETSNMP_IMPORT oid usmAES256CiscoPrivProtocol[11]; + +NETSNMP_IMPORT oid usmAES192Cisco2PrivProtocol[11]; +NETSNMP_IMPORT oid usmAES256Cisco2PrivProtocol[11]; +#endif /* NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ + #ifdef __cplusplus } #endif diff --git a/include/net-snmp/library/vacm.h b/include/net-snmp/library/vacm.h index a5be6ac..e5bc5fd 100644 --- a/include/net-snmp/library/vacm.h +++ b/include/net-snmp/library/vacm.h @@ -2,6 +2,15 @@ * vacm.h * * SNMPv3 View-based Access Control Model + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #ifndef VACM_H @@ -42,7 +51,7 @@ extern "C" { #define VIEWMASK 4 #define VIEWTYPE 5 #define VIEWSTORAGE 6 -#define VIEWSTATUS 7 +#define VACMVIEWSTATUS 7 #define VACM_MAX_STRING 32 #define VACMSTRINGLEN 34 /* VACM_MAX_STRING + 2 */ @@ -112,7 +121,7 @@ extern "C" { struct vacm_viewEntry { char viewName[VACMSTRINGLEN]; - oid viewSubtree[MAX_OID_LEN]; + oid viewSubtree[MAX_OID_LEN+1]; /* keep len in [0] */ size_t viewSubtreeLen; u_char viewMask[VACMSTRINGLEN]; size_t viewMaskLen; @@ -259,6 +268,15 @@ extern "C" { oid * viewSubtree, size_t viewSubtreeLen, int mode); + NETSNMP_IMPORT + int netsnmp_vacm_simple_usm_add(const char *user, int rw, int authLevel, + const char *view, oid *oidView, + size_t oidViewLen, const char *context); + + NETSNMP_IMPORT + int netsnmp_vacm_simple_usm_del(const char *user, int authLevel, + const char *view, oid *oidView, + size_t oidViewLen, const char *context); #ifdef __cplusplus } diff --git a/include/net-snmp/library/winservice.h b/include/net-snmp/library/winservice.h index 76080d6..29d9f2a 100644 --- a/include/net-snmp/library/winservice.h +++ b/include/net-snmp/library/winservice.h @@ -1,159 +1,70 @@ #ifndef WINSERVICE_H #define WINSERVICE_H - /* - * - * Windows Service related functions declaration - * By Raju Krishanppa(raju_krishnappa@yahoo.com) - * - */ +/* Windows Service related function declarations. */ #ifdef __cplusplus -extern "C" +extern "C" { +#elif 0 +} +#endif /* */ + +/* + * Define Constants for Register, De-register , Run As service or Console mode + */ +enum net_snmp_cmd_line_action { + REGISTER_SERVICE = 0, + UN_REGISTER_SERVICE = 1, + RUN_AS_SERVICE = 2, + RUN_AS_CONSOLE = 3, +}; + +/* + * Input parameter structure to thread + */ +typedef struct _InputParams { + DWORD Argc; + char **Argv; +} InputParams; + +/* + * Define Service Related functions + */ + +/* + * To register application as windows service with SCM + */ +int RegisterService(const char *lpszServiceName, + const char *lpszServiceDisplayName, + const char *lpszServiceDescription, + InputParams *StartUpArg, int quiet); + +/* + * To unregister service + */ +int UnregisterService(const char *lpszServiceName, int quiet); + +/* + * To parse command line for startup option + */ +enum net_snmp_cmd_line_action + ParseCmdLineForServiceOption(int argc, char *argv[], + int *quiet); + +/* + * To start Service + */ +BOOL RunAsService(int (*ServiceFunction)(int, char **)); + +/* + * Service STOP function registration with this framewrok + * * this function must be invoked before calling RunAsService + */ +void RegisterStopFunction(void (*StopFunc)(void)); + +#if 0 { - -#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 (LPCTSTR 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); - - /* - * 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 - */ - unsigned 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 +#elif defined(__cplusplus) } -#endif /* */ -#endif /* WINSERVICE_H */ - +#endif /* */ +#endif /* WINSERVICE_H */ diff --git a/include/net-snmp/net-snmp-config.h.in b/include/net-snmp/net-snmp-config.h.in index 1db0237..9963b99 100644 --- a/include/net-snmp/net-snmp-config.h.in +++ b/include/net-snmp/net-snmp-config.h.in @@ -1,5 +1,6 @@ /* 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 @@ -15,6 +16,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, 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 @@ -30,33 +36,27 @@ /* definitions added by configure on-the-fly */ -#define config_belongs_in(x) +#define config_parse_dot_conf(w,x,y,z) NETSNMP_REQUIRE_SEMICOLON -#define config_exclude(x) +#define config_error(x) NETSNMP_REQUIRE_SEMICOLON -#define config_arch_require(x,y) +#define config_warning(x) NETSNMP_REQUIRE_SEMICOLON -#define config_version_require(x) +#define NETSNMP_REQUIRE_SEMICOLON extern void netsnmp_unused_function(void) -#define config_require(x) +#define config_belongs_in(x) NETSNMP_REQUIRE_SEMICOLON -#define config_add_mib(x) +#define config_exclude(x) NETSNMP_REQUIRE_SEMICOLON -#define config_parse_dot_conf(w,x,y,z) +#define config_arch_require(x,y) NETSNMP_REQUIRE_SEMICOLON -#define config_error(x) +#define config_version_require(x) NETSNMP_REQUIRE_SEMICOLON -#define config_warning(x) +#define config_require(x) NETSNMP_REQUIRE_SEMICOLON -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD +#define config_add_mib(x) NETSNMP_REQUIRE_SEMICOLON -/* 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'. */ +/* Define to 1 if using 'alloca.c'. */ #undef C_ALLOCA /* location of swap device */ @@ -77,11 +77,10 @@ /* 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 to 1 if you have 'alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define to 1 if you have and it should be used (not on Ultrix). - */ +/* Define to 1 if works. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ @@ -93,8 +92,11 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASM_TYPES_H -/* Define if using MY_INIT() causes a linker error */ -#undef HAVE_BROKEN_LIBMYSQLCLIENT +/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */ +#undef HAVE_ASN1_STRING_GET0_DATA + +/* Define to 1 if you have the `asprintf' function. */ +#undef HAVE_ASPRINTF /* Define to 1 if you have the `cgetnext' function. */ #undef HAVE_CGETNEXT @@ -108,22 +110,48 @@ /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR +/* Define to 1 if you have the `closesocket' function. */ +#undef HAVE_CLOSESOCKET + /* Define to 1 if you have the header file. */ #undef HAVE_COM_ERR_H /* Define to 1 if the system has the type `Counter64'. */ #undef HAVE_COUNTER64 +/* Define to 1 if you have the header file. */ +#undef HAVE_CRT_EXTERNS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_CURSES_H + +/* Define to 1 if you have the declaration of `daylight', and to 0 if you + don't. */ +#undef HAVE_DECL_DAYLIGHT + /* 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 the declaration of `timezone', and to 0 if you + don't. */ +#undef HAVE_DECL_TIMEZONE + /* 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 `DH_get0_key' function. */ +#undef HAVE_DH_GET0_KEY + +/* Define to 1 if you have the `DH_get0_pqg' function. */ +#undef HAVE_DH_GET0_PQG + +/* Define to 1 if you have the `DH_set0_pqg' function. */ +#undef HAVE_DH_SET0_PQG + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -134,12 +162,21 @@ /* Define to 1 if you have the `dlopen' function. */ #undef HAVE_DLOPEN -/* 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 `DTLSv1_method' function. */ +#undef HAVE_DTLSV1_METHOD + +/* Define to 1 if you have the `DTLS_method' function. */ +#undef HAVE_DTLS_METHOD + +/* Define to 1 if you have the `endfsent' function. */ +#undef HAVE_ENDFSENT + +/* Define to 1 if you have the `ERR_get_error_all' function. */ +#undef HAVE_ERR_GET_ERROR_ALL + /* Define to 1 if you have the header file. */ #undef HAVE_ERR_H @@ -155,10 +192,16 @@ /* 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 */ +/* Define to 1 if you have the `EVP_MD_CTX_free' function. */ +#undef HAVE_EVP_MD_CTX_FREE + +/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ +#undef HAVE_EVP_MD_CTX_NEW + +/* Define to 1 if you have the `EVP_sha224' function. */ #undef HAVE_EVP_SHA224 -/* Define if you have EVP_sha384/256 in openssl */ +/* Define to 1 if you have the `EVP_sha384' function. */ #undef HAVE_EVP_SHA384 /* Define to 1 if you have the `execv' function. */ @@ -176,9 +219,15 @@ /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK +/* Define to 1 if you have the `forkall' function. */ +#undef HAVE_FORKALL + /* Define to 1 if you have the header file. */ #undef HAVE_FSTAB_H +/* Define to 1 if you have the `fsync' function. */ +#undef HAVE_FSYNC + /* Define to 1 if you have the `funlockfile' function. */ #undef HAVE_FUNLOCKFILE @@ -194,6 +243,9 @@ /* Define to 1 if you have the `getdtablesize' function. */ #undef HAVE_GETDTABLESIZE +/* Define to 1 if you have the `getfsent' function. */ +#undef HAVE_GETFSENT + /* Define to 1 if you have the `getfsstat' function. */ #undef HAVE_GETFSSTAT @@ -218,9 +270,15 @@ /* Define to 1 if you have the `getloadavg' function. */ #undef HAVE_GETLOADAVG +/* Define to 1 if you have the `getlogin' function. */ +#undef HAVE_GETLOGIN + /* Define to 1 if you have the `getmntent' function. */ #undef HAVE_GETMNTENT +/* Define to 1 if you have the `getmntinfo' function. */ +#undef HAVE_GETMNTINFO + /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT @@ -248,6 +306,9 @@ /* Define to 1 if you have the `hasmntopt' function. */ #undef HAVE_HASMNTOPT +/* Define to 1 if you have the headerGet function. */ +#undef HAVE_HEADERGET + /* Define to 1 if you have the `if_freenameindex' function. */ #undef HAVE_IF_FREENAMEINDEX @@ -308,18 +369,27 @@ /* 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_getrecvsubkey' function. */ +#undef HAVE_KRB5_AUTH_CON_GETRECVSUBKEY + /* Define to 1 if you have the `krb5_auth_con_getsendsubkey' function. */ #undef HAVE_KRB5_AUTH_CON_GETSENDSUBKEY +/* Define to 1 if `enctype' is a member of `krb5_keyblock'. */ +#undef HAVE_KRB5_KEYBLOCK_ENCTYPE + /* Define to 1 if you have the header file. */ #undef HAVE_KSTAT_H +/* Define to 1 if you have the `kvm_getfile2' function. */ +#undef HAVE_KVM_GETFILE2 + +/* Define to 1 if you have the `kvm_getfiles' function. */ +#undef HAVE_KVM_GETFILES + /* Define to 1 if you have the `kvm_getproc2' function. */ #undef HAVE_KVM_GETPROC2 @@ -341,9 +411,6 @@ /* 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 @@ -395,6 +462,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_ETHTOOL_H +/* Define if __u8 .. __u64 must be declared explicitly before including + */ +#undef HAVE_LINUX_ETHTOOL_NEEDS_U64 + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_HDREG_H @@ -407,6 +478,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_TASKS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LM_H + +/* Define to 1 if you have the `load_defaults' function. */ +#undef HAVE_LOAD_DEFAULTS + /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H @@ -434,15 +511,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_O_DYLD_H + /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if the system has the type `mib2_ipIfStatsEntry_t'. */ #undef HAVE_MIB2_IPIFSTATSENTRY_T +/* Define if MIB_IF_TABLE2 is available */ +#undef HAVE_MIB_IF_TABLE2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_MINIX_CONFIG_H + /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP @@ -455,9 +538,30 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MTAB_H +/* Define to 1 if you have the `mysql_init' function. */ +#undef HAVE_MYSQL_INIT + +/* Define to 1 if you have the `mysql_options' function. */ +#undef HAVE_MYSQL_OPTIONS + +/* Define to 1 if you have the header file. */ +#undef HAVE_MY_GLOBAL_H + +/* Define if MY_INIT() is availabe in libmysqlclient */ +#undef HAVE_MY_INIT + +/* Define if having my_load_defaults() */ +#undef HAVE_MY_LOAD_DEFAULTS + +/* Define to 1 if you have the header file. */ +#undef HAVE_MY_SYS_H + /* Define to 1 if you have the header file. */ #undef HAVE_NBUTIL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NCURSES_CURSES_H + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H @@ -587,6 +691,9 @@ /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR +/* Define to 1 if you have the `OpenSSL_add_all_algorithms' function. */ +#undef HAVE_OPENSSL_ADD_ALL_ALGORITHMS + /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_AES_H @@ -602,15 +709,27 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_HMAC_H +/* Define to 1 if you have the `OPENSSL_sk_num' function. */ +#undef HAVE_OPENSSL_SK_NUM + +/* Define to 1 if you have the `OPENSSL_sk_value' function. */ +#undef HAVE_OPENSSL_SK_VALUE + /* Define to 1 if you have the header file. */ #undef HAVE_OSRELDATE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_PCAP_PCAP_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 +/* Define to 1 if you have . */ +#undef HAVE_PCRE_H + /* on aix, if you have perfstat */ #undef HAVE_PERFSTAT @@ -638,12 +757,21 @@ /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL +/* Define to 1 if you have the `posix_spawn' function. */ +#undef HAVE_POSIX_SPAWN + /* Define to 1 if you have the `pread64' function. */ #undef HAVE_PREAD64 /* Set if /etc/printcap exists */ #undef HAVE_PRINTCAP +/* Define if prioritynames variable is declared in */ +#undef HAVE_PRIORITYNAMES + +/* Define to 1 if you have the header file. */ +#undef HAVE_PROCESS_H + /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H @@ -680,6 +808,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_RPM_RPMTS_H +/* Define if timezone declared as a scalar in */ +#undef HAVE_SCALAR_TIMEZONE + /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H @@ -695,6 +826,9 @@ /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV +/* Define to 1 if you have the `setfsent' function. */ +#undef HAVE_SETFSENT + /* Define to 1 if you have the `setgid' function. */ #undef HAVE_SETGID @@ -728,9 +862,6 @@ /* Define to 1 if you have the `sigblock' function. */ #undef HAVE_SIGBLOCK -/* Define to 1 if you have the `sighold' function. */ -#undef HAVE_SIGHOLD - /* Define if SIGHUP is defined in . */ #undef HAVE_SIGHUP @@ -752,9 +883,33 @@ /* Define to 1 if the system has the type `socklen_t'. */ #undef HAVE_SOCKLEN_T +/* Define to 1 if SO_BINDTODEVICE is available */ +#undef HAVE_SO_BINDTODEVICE + +/* Define to 1 if you have the header file. */ +#undef HAVE_SPAWN_H + +/* Define to 1 if you have the `srand' function. */ +#undef HAVE_SRAND + +/* Define to 1 if you have the `srand48' function. */ +#undef HAVE_SRAND48 + +/* Define to 1 if you have the `srandom' function. */ +#undef HAVE_SRANDOM + /* Define to 1 if the system has the type `ssize_t'. */ #undef HAVE_SSIZE_T +/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */ +#undef HAVE_SSL_GET1_PEER_CERTIFICATE + +/* Define to 1 if you have the `SSL_library_init' function. */ +#undef HAVE_SSL_LIBRARY_INIT + +/* Define to 1 if you have the `SSL_load_error_strings' function. */ +#undef HAVE_SSL_LOAD_ERROR_STRINGS + /* Define to 1 if you have the `statfs' function. */ #undef HAVE_STATFS @@ -764,6 +919,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -869,6 +1027,12 @@ /* Define to 1 if `if_xname' is a member of `struct ifnet'. */ #undef HAVE_STRUCT_IFNET_IF_XNAME +/* Define to 1 if `ia_subnetmask' is a member of `struct in_ifaddr'. */ +#undef HAVE_STRUCT_IN_IFADDR_IA_SUBNETMASK + +/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ +#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST + /* Define to 1 if `ip6s_exthdrtoolong ' is a member of `struct ip6stat'. */ #undef HAVE_STRUCT_IP6STAT_IP6S_EXTHDRTOOLONG_ @@ -996,6 +1160,9 @@ /* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_GMTOFF +/* Define to 1 if `tm_isdst' is a member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_ISDST + /* Define to 1 if `udps_discard' is a member of `struct udpstat'. */ #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD @@ -1145,6 +1312,12 @@ /* 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_SYSLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSMACROS_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSMP_H @@ -1214,8 +1387,11 @@ /* Define to 1 if you have the `times' function. */ #undef HAVE_TIMES -/* Define if a timezone variable is declared in */ -#undef HAVE_TIMEZONE_VARIABLE +/* Define to 1 if you have the `TLSv1_method' function. */ +#undef HAVE_TLSV1_METHOD + +/* Define to 1 if you have the `TLS_method' function. */ +#undef HAVE_TLS_METHOD /* Define to 1 if you have the header file. */ #undef HAVE_UFS_FFS_FS_H @@ -1271,6 +1447,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_VALIDATOR_VALIDATOR_CONFIG_H +/* Define to 1 if you have the `vm_region' function. */ +#undef HAVE_VM_REGION + +/* Define to 1 if you have the `vm_region_64' function. */ +#undef HAVE_VM_REGION_64 + /* Define to 1 if you have the header file. */ #undef HAVE_VM_SWAP_PAGER_H @@ -1286,6 +1468,12 @@ /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF +/* Define to 1 if you have the `waitpid' function. */ +#undef HAVE_WAITPID + +/* Define to 1 if you have the header file. */ +#undef HAVE_WCHAR_H + /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H @@ -1298,17 +1486,46 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H +/* Define to 1 if you have the `X509_get_signature_nid' function. */ +#undef HAVE_X509_GET_SIGNATURE_NID + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_data' function. */ +#undef HAVE_X509_NAME_ENTRY_GET_DATA + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_object' function. */ +#undef HAVE_X509_NAME_ENTRY_GET_OBJECT + /* Define to 1 if you have the header file. */ #undef HAVE_XTI_H +/* Define if _beginthreadex() is defined in */ +#undef HAVE__BEGINTHREADEX + +/* Define if _cputs() is defined in */ +#undef HAVE__CPUTS + +/* Define if _getch() is defined in */ +#undef HAVE__GETCH + +/* Define if _get_osfhandle() is defined in */ +#undef HAVE__GET_OSFHANDLE + +/* Define to 1 if you have the `_NSGetArgv' function. */ +#undef HAVE__NSGETARGV + +/* Define to 1 if you have the `_NSGetExecutablePath' function. */ +#undef HAVE__NSGETEXECUTABLEPATH + +/* Define if _open_osfhandle() is defined in */ +#undef HAVE__OPEN_OSFHANDLE + /* location of UNIX kernel */ #undef KERNEL_LOC /* Path to the lpstat command */ #undef LPSTAT_PATH -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* define if agentx transport is to use domain sockets only */ @@ -1317,6 +1534,13 @@ /* Unix domain socket for AgentX master-subagent communication */ #undef NETSNMP_AGENTX_SOCKET +/* Used to make the compiler issue a warning about deprecated functions and + variables */ +#undef NETSNMP_ATTRIBUTE_DEPRECATED + +/* Used to suppress compiler warnings about unused functions and variables */ +#undef NETSNMP_ATTRIBUTE_UNUSED + /* Define if static inline functions are unsupported */ #undef NETSNMP_BROKEN_INLINE @@ -1329,6 +1553,9 @@ /* configure options specified */ #undef NETSNMP_CONFIGURE_OPTIONS +/* if defined daemons will use syslog when no log destination is defined */ +#undef NETSNMP_DAEMONS_DEFAULT_LOG_SYSLOG + /* default location to look for mibs to load using the above tokens and/or those in the MIBS envrionment variable */ #undef NETSNMP_DEFAULT_MIBDIRS @@ -1360,6 +1587,9 @@ /* Define if SNMPv2c code should not be included */ #undef NETSNMP_DISABLE_SNMPV2C +/* Define if AES-192/AES-256 encryption should be supported */ +#undef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + /* Define if you are embedding perl in the main agent. */ #undef NETSNMP_EMBEDDED_PERL @@ -1379,6 +1609,12 @@ /* testing code sections. */ #undef NETSNMP_ENABLE_TESTING_CODE +/* Type of fd_set::fds_bits */ +#undef NETSNMP_FD_MASK_TYPE + +/* if defined always use default auth/priv protocol when creating usmUsers */ +#undef NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV + /* Should evaluate to the name of the current function if defined */ #undef NETSNMP_FUNCTION @@ -1388,6 +1624,9 @@ /* ifnet needs to have _KERNEL_STRUCTURES defined */ #undef NETSNMP_IFNET_NEEDS_KERNEL_STRUCTURES +/* Type of the third argument of ioctlsocket() */ +#undef NETSNMP_IOCTLSOCKET_ARG + /* Define if you want to remove all non-essential code features. */ #undef NETSNMP_MINIMAL_CODE @@ -1410,15 +1649,15 @@ /* If you don't have root access don't exit upon kmem errors */ #undef NETSNMP_NO_ROOT_ACCESS +/* If you don't want to integrate with systemd. */ +#undef NETSNMP_NO_SYSTEMD + /* 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 */ #undef NETSNMP_PERSISTENT_MASK -/* Size prefix to use to printf a uint32_t */ -#undef NETSNMP_PRI32 - /* Size prefix to use to printf a size_t or ssize_t */ #undef NETSNMP_PRIz @@ -1426,6 +1665,9 @@ */ #undef NETSNMP_REENTRANT +/* Type of the fifth argument of select() */ +#undef NETSNMP_SELECT_TIMEVAL + /* define if you do not want snmptrapd to register as an AgentX subagent */ #undef NETSNMP_SNMPTRAPD_DISABLE_AGENTX @@ -1498,6 +1740,10 @@ /* Use BSD 4.4 routing table entries? */ #undef RTENTRY_4_4 +/* Qualifier for second argument of the appverify_cookie_cb() callback + function */ +#undef SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER + /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT @@ -1528,17 +1774,20 @@ fs_data. [Ultrix] */ #undef STAT_STATFS_FS_DATA -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* define if SIOCGIFADDR exists in sys/ioctl.h */ #undef SYS_IOCTL_H_HAS_SIOCGIFADDR /* Define if the TCP timer constants in depend on the - integer variable 'hz'. [FreeBSD 4.x] */ + integer variable 'hz'. [FreeBSD] */ #undef TCPTV_NEEDS_HZ -/* Define to 1 if you can safely include both and . */ +/* Define to 1 if you can safely include both and . This + macro is obsolete. */ #undef TIME_WITH_SYS_TIME /* Where is the uname command */ @@ -1548,49 +1797,90 @@ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable threading extensions on Solaris. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE #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. */ @@ -1609,6 +1899,10 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const +/* in_addr_t definition if not defined in . Must match the type + of sockaddr_in::sin_addr */ +#undef in_addr_t + /* 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 @@ -1642,7 +1936,7 @@ /* Define to `long int' if does not define. */ #undef off_t -/* Define to `int' if does not define. */ +/* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to `unsigned int' if does not define. */ @@ -1680,20 +1974,6 @@ #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 @@ -1709,8 +1989,6 @@ #endif /* NETSNMP_NO_AUTOCONF_DEFINITIONS */ - - /* ********* NETSNMP_MARK_BEGIN_CLEAN_NAMESPACE ********* */ /* * put all new net-snmp-specific definitions here @@ -1989,6 +2267,10 @@ available. */ #undef NETSNMP_TRANSPORT_UDP_DOMAIN +/* This is defined if support for the shared UDP/IP transport domain is + available. */ +#undef NETSNMP_TRANSPORT_UDPSHARED_DOMAIN + /* This is defined if support for the "callback" transport domain is available. */ #undef NETSNMP_TRANSPORT_CALLBACK_DOMAIN @@ -2108,10 +2390,10 @@ #if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) # define NETSNMP_USE_INLINE 1 # ifndef NETSNMP_INLINE -# define NETSNMP_INLINE inline +# define NETSNMP_INLINE __inline__ # endif # ifndef NETSNMP_STATIC_INLINE -# define NETSNMP_STATIC_INLINE static inline +# define NETSNMP_STATIC_INLINE static __inline__ # endif #else # define NETSNMP_INLINE @@ -2127,10 +2409,36 @@ #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) +#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(NETSNMP_DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE) #define NETSNMP_CAN_USE_NLIST #endif +/* + * Note: GCC 4.6 added __BYTE_ORDER__, __ORDER_BIG_ENDIAN__, + * __ORDER_LITTLE_ENDIAN__ and __ORDER_PDP_ENDIAN__ in SVN r165881. For older + * gcc versions and also for other compilers, determine the endianness by + * calling a function that can be inlined. + */ +#if defined(__BYTE_ORDER__) +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define NETSNMP_BIGENDIAN 1 +# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define NETSNMP_BIGENDIAN 0 +# else +# error Unknown byte order +# endif +#else +NETSNMP_STATIC_INLINE int netsnmp_bigendian(void) +{ + union { unsigned long l; unsigned char c; } u; + + u.l = 1; + + return u.c == 0; +} +# define NETSNMP_BIGENDIAN netsnmp_bigendian() +#endif + /* ********* NETSNMP_MARK_BEGIN_LEGACY_DEFINITIONS *********/ /* @@ -2286,6 +2594,7 @@ #define HPUX11ID NETSNMP_HPUX11ID #define AIXID NETSNMP_AIXID #define MACOSXID NETSNMP_MACOSXID +#define DRAGONFLYID NETSNMP_DRAGONFLYID #define UNKNOWNID NETSNMP_UNKNOWNID #define ENTERPRISE_OID NETSNMP_ENTERPRISE_OID diff --git a/include/net-snmp/net-snmp-features.h b/include/net-snmp/net-snmp-features.h index f37e6c5..0d53d5b 100644 --- a/include/net-snmp/net-snmp-features.h +++ b/include/net-snmp/net-snmp-features.h @@ -21,12 +21,12 @@ /* prototypes always needed */ #ifndef NETSNMP_FEATURE_CHECKING -#define netsnmp_feature_provide(X) -#define netsnmp_feature_require(X) -#define netsnmp_feature_want(X) -#define netsnmp_feature_child_of(X, Y) +#define netsnmp_feature_provide(X) extern char netsnmp_feature_unused_ ## X +#define netsnmp_feature_require(X) extern char netsnmp_feature_unused_ ## X +#define netsnmp_feature_want(X) extern char netsnmp_feature_unused_ ## X +#define netsnmp_feature_child_of(X, Y) extern char netsnmp_feature_unused_ ## X #endif -#define netsnmp_feature_unused(X) char netsnmp_feature_unused_ ## X +#define netsnmp_feature_unused(X) extern char netsnmp_feature_unused_ ## X #endif /* NETSNMP_FEATURES_H */ diff --git a/include/net-snmp/net-snmp-includes.h b/include/net-snmp/net-snmp-includes.h index 3ee62ae..e0d47dc 100644 --- a/include/net-snmp/net-snmp-includes.h +++ b/include/net-snmp/net-snmp-includes.h @@ -8,59 +8,16 @@ */ - /* - * 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 +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_UNISTD_H -#include -#endif -#if HAVE_NETINET_IN_H -#include -#endif - -#if TIME_WITH_SYS_TIME -# include -# 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 */ diff --git a/include/net-snmp/output_api.h b/include/net-snmp/output_api.h index 3bf3172..3b14285 100644 --- a/include/net-snmp/output_api.h +++ b/include/net-snmp/output_api.h @@ -6,8 +6,9 @@ * (including error handling and debugging). */ -#include #include /* for va_list */ +#include +#include #ifdef __cplusplus extern "C" { @@ -38,14 +39,9 @@ extern "C" { /* Logging messages */ -#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define _LOG_ATTR -#else -#define _LOG_ATTR __attribute__ ((__format__ (__printf__, 2, 3))) -#endif - NETSNMP_IMPORT - int snmp_log( int priority, const char *format, ...) _LOG_ATTR; + int snmp_log( int priority, const char *format, ...) + NETSNMP_ATTRIBUTE_FORMAT(printf, 2, 3); NETSNMP_IMPORT int snmp_vlog(int priority, const char *format, va_list ap); NETSNMP_IMPORT @@ -90,15 +86,38 @@ extern "C" { #else /* NETSNMP_NO_DEBUGGING := enable streamlining of the code */ -#define DEBUGMSG(x) -#define DEBUGMSGT(x) -#define DEBUGTRACE -#define DEBUGTRACETOK(x) -#define DEBUGMSGL(x) -#define DEBUGMSGTL(x) -#define DEBUGMSGOID(x) -#define DEBUGMSGSUBOID(x) -#define DEBUGMSGVAR(x) +NETSNMP_STATIC_INLINE void +netsnmp_debug_no_msg(const char *token, const char *fmt, ...) +{ } + +NETSNMP_STATIC_INLINE void +netsnmp_debug_no_tracetok(const char *token) +{ } + +NETSNMP_STATIC_INLINE void +netsnmp_debug_no_oid(const char *token, const oid *oid, size_t oid_len) +{ } + +struct variable_list; + +NETSNMP_STATIC_INLINE void +netsnmp_debug_no_var(const char *token, const struct variable_list *var) +{ } + +NETSNMP_STATIC_INLINE void +netsnmp_debug_no_dumpsetup(const char *token, const void *buf, size_t len) +{ } + +#define DEBUGMSG(x) do { netsnmp_debug_no_msg x; } while (0) +#define DEBUGMSGT(x) do { netsnmp_debug_no_msg x; } while (0) +#define DEBUGTRACE do { } while (0) +#define DEBUGTRACETOK(x) \ + do { netsnmp_debug_no_tracetok(x); } while (0) +#define DEBUGMSGL(x) do { netsnmp_debug_no_msg x; } while (0) +#define DEBUGMSGTL(x) do { netsnmp_debug_no_msg x; } while (0) +#define DEBUGMSGOID(x) do { netsnmp_debug_no_oid x; } while (0) +#define DEBUGMSGSUBOID(x) do { netsnmp_debug_no_oid x; } while (0) +#define DEBUGMSGVAR(x) do { netsnmp_debug_no_var x; } while (0) #define DEBUGMSGOIDRANGE(x) #define DEBUGMSGHEX(x) #define DEBUGIF(x) if(0) @@ -110,21 +129,32 @@ extern "C" { #define DEBUGPRINTINDENT(token) #define DEBUGDUMPHEADER(token,x) #define DEBUGDUMPSECTION(token,x) -#define DEBUGDUMPSETUP(token, buf, len) +#define DEBUGDUMPSETUP(token, buf, len) \ + do { netsnmp_debug_no_dumpsetup(token, buf, len); } while (0) -#define DEBUGMSG_NC(x) -#define DEBUGMSGT_NC(x) +#define DEBUGMSG_NC(x) do { netsnmp_debug_no_msg x; } while (0) +#define DEBUGMSGT_NC(x) do { netsnmp_debug_no_msg x; } while (0) #endif /* NETSNMP_NO_DEBUGGING */ NETSNMP_IMPORT void debug_register_tokens(const char *tokens); NETSNMP_IMPORT + int debug_enable_token_logs (const char *token); + NETSNMP_IMPORT + int debug_disable_token_logs (const char *token); + NETSNMP_IMPORT int debug_is_token_registered(const char *token); NETSNMP_IMPORT void snmp_set_do_debugging(int); NETSNMP_IMPORT int snmp_get_do_debugging(void); +#ifndef NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL + NETSNMP_IMPORT + void netsnmp_set_debug_log_level(int val); + NETSNMP_IMPORT + int netsnmp_get_debug_log_level(void); +#endif /* NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL */ /* * Having extracted the main ("public API") calls relevant diff --git a/include/net-snmp/session_api.h b/include/net-snmp/session_api.h index 88dbc41..b785b7c 100644 --- a/include/net-snmp/session_api.h +++ b/include/net-snmp/session_api.h @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #ifndef NET_SNMP_SESSION_API_H #define NET_SNMP_SESSION_API_H @@ -12,6 +23,10 @@ extern "C" { #endif + struct session_list; + struct timeval; + + NETSNMP_IMPORT void snmp_sess_init(netsnmp_session *); @@ -43,6 +58,10 @@ extern "C" { NETSNMP_IMPORT int snmp_close_sessions(void); + NETSNMP_IMPORT + int + _build_initial_pdu_packet(struct session_list *slp, netsnmp_pdu *pdu, + int bulk); /* * int snmp_send(session, pdu) @@ -54,6 +73,7 @@ extern "C" { * 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. + * (There is a special case: if the request id is 0, 1 will be returned). * On any error, 0 is returned. * The pdu is freed by snmp_send() unless a failure occured. */ @@ -185,7 +205,6 @@ extern "C" { snmp_sess_init(&session); session.retries = ... - session.remote_port = ... sessp = snmp_sess_open(&session); ss = snmp_sess_session(sessp); if (ss == NULL) @@ -217,7 +236,8 @@ extern "C" { netsnmp_session *snmp_sess_session(void *); NETSNMP_IMPORT netsnmp_session *snmp_sess_session_lookup(void *); - + NETSNMP_IMPORT + netsnmp_session *snmp_sess_lookup_by_name(const char *paramName); /* * use return value from snmp_sess_open as void * parameter diff --git a/include/net-snmp/system/aix.h b/include/net-snmp/system/aix.h index 02d4981..aa75ddc 100644 --- a/include/net-snmp/system/aix.h +++ b/include/net-snmp/system/aix.h @@ -9,12 +9,6 @@ #undef RTTABLES_SYMBOL #define RTTABLES_SYMBOL "rt_tables" -#undef ARPTAB_SIZE_SYMBOL -#define ARPTAB_SIZE_SYMBOL "arptabsize" - -#undef ARPTAB_SYMBOL -#define ARPTAB_SYMBOL "arptabnb" - #ifndef __GNUC__ # undef NETSNMP_ENABLE_INLINE # define NETSNMP_ENABLE_INLINE 0 @@ -25,3 +19,15 @@ /* the legacy symbol NOACCESS clashes with the system headers. Remove it. */ #define NETSNMP_NO_LEGACY_DEFINITIONS + +#ifdef _AIX43 +#define aix4 +#endif + +#ifdef _AIX51 +#define aix5 +#endif + +#ifdef _AIX61 +#define aix6 +#endif diff --git a/include/net-snmp/system/bsd.h b/include/net-snmp/system/bsd.h index 2739c3c..ebb0ccd 100644 --- a/include/net-snmp/system/bsd.h +++ b/include/net-snmp/system/bsd.h @@ -11,10 +11,5 @@ */ #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/include/net-snmp/system/cygwin.h b/include/net-snmp/system/cygwin.h index a9b76fb..64df943 100644 --- a/include/net-snmp/system/cygwin.h +++ b/include/net-snmp/system/cygwin.h @@ -1,12 +1 @@ -#include - -/* got socklen_t? */ -#define HAVE_SOCKLEN_T 1 - -#ifdef HAVE_STDINT_H -#include /* uint32_t */ -#endif - -#undef bsdlike -#undef MBSTAT_SYMBOL -#undef TOTAL_MEMORY_SYMBOL +/* Everything that is specific to Cygwin is detected by the configure script */ diff --git a/include/net-snmp/system/darwin.h b/include/net-snmp/system/darwin.h index 5a065b7..6e7a1c2 100644 --- a/include/net-snmp/system/darwin.h +++ b/include/net-snmp/system/darwin.h @@ -1,8 +1,71 @@ #include "freebsd4.h" #define darwin darwin + +#define CHECK_RT_FLAGS 1 + +/* + * udp_inpcb list symbol, e.g. for mibII/udpTable.c + */ +#define INP_NEXT_SYMBOL inp_next + +/* + * Mac OS X should only use the modern API and definitions. + */ +#ifndef NETSNMP_NO_LEGACY_DEFINITIONS +#define NETSNMP_NO_LEGACY_DEFINITIONS 1 +#endif + +/* + * use new host resources files as well + */ +#define NETSNMP_INCLUDE_HOST_RESOURCES +#define NETSNMP_INCLUDE_HRSWINST_REWRITES +#define NETSNMP_INCLUDE_HRSWRUN_REWRITES +#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT +#define NETSNMP_CAN_GET_DISK_LABEL 1 + +/* + * Enabling this restricts the compiler to mostly public APIs. + */ +#ifndef __APPLE_API_STRICT_CONFORMANCE +#define __APPLE_API_STRICT_CONFORMANCE 1 +#endif +#ifndef __APPLE_API_UNSTABLE +#define __APPLE_API_UNSTABLE 1 +#endif + /* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. + * Although Darwin does have an fstab.h file, getfsfile etc. always return null * At least, as of 5.3. */ #undef HAVE_FSTAB_H +#define SWAPFILE_DIR "/private/var/vm" +#define SWAPFILE_PREFIX "swapfile" + +/* + * These apparently used to be in netinet/tcp_timers.h, but went away in + * 10.4.2. Define them here til we find out a way to get the real values. + */ +#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ +#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ + +/* + * Because Mac OS X is built on Mach, it does not provide a BSD-compatible + * VM statistics API. + */ +#define USE_MACH_HOST_STATISTICS 1 + +/* + * utility macro used in several darwin specific files + */ +#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0) + +/* + * Mac OS X runs on both PPC and Intel hardware, + * which handle udpTable index values differently + */ +#include +#ifdef TARGET_RT_LITTLE_ENDIAN +#define UDP_ADDRESSES_IN_HOST_ORDER 1 +#endif diff --git a/include/net-snmp/system/darwin10.h b/include/net-snmp/system/darwin10.h deleted file mode 100644 index 3037324..0000000 --- a/include/net-snmp/system/darwin10.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * While Darwin 10 (aka, Mac OS X 10.6 Snow Leopard) is "BSD-like", it differs - * substantially enough to not warrant pretending it is a BSD flavor. - * This first section are the vestigal BSD remnants. - */ -/* 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 (C) 2007 Apple, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -/* - * 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 CHECK_RT_FLAGS 1 - -/* - * this is not good enough before freebsd3! - */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* - * This section adds the relevant definitions from generic.h - * (a file we don't include here) - */ - -/* - * udp_inpcb list symbol, e.g. for mibII/udpTable.c - */ -#define INP_NEXT_SYMBOL inp_next - -/* - * This section defines Mac OS X 10.5 (and later) specific additions. - */ -#define darwin 10 -#ifndef darwin10 -# define darwin10 darwin -#endif - -/* - * Mac OS X should only use the modern API and definitions. - */ -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS -#define NETSNMP_NO_LEGACY_DEFINITIONS 1 -#endif - -/* - * looks like the IFTable stuff works better than the mibII versions - */ - -#define NETSNMP_INCLUDE_IFTABLE_REWRITES - -/* - * use new host resources files as well - */ -#define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_HRSWINST_REWRITES -#define NETSNMP_INCLUDE_HRSWRUN_REWRITES -#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT -#define NETSNMP_CAN_GET_DISK_LABEL 1 - -/* - * Enabling this restricts the compiler to mostly public APIs. - */ -#ifndef __APPLE_API_STRICT_CONFORMANCE -#define __APPLE_API_STRICT_CONFORMANCE 1 -#endif -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE 1 -#endif - -/* - * Darwin's tools are capable of building multiple architectures in one pass. - * As a result, platform definitions should be deferred until compile time. - */ -#ifdef BYTE_ORDER -# undef WORDS_BIGENDIAN -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - -/* - * These apparently used to be in netinet/tcp_timers.h, but went away in - * 10.4.2. Define them here til we find out a way to get the real values. - */ -#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ -#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ - -/* - * Because Mac OS X is built on Mach, it does not provide a BSD-compatible - * VM statistics API. - */ -#define USE_MACH_HOST_STATISTICS 1 - -/* - * This tells code that manipulates IPv6 that the structures are unified, - * i.e., IPv4 and IPv6 use the same structs. - * This should eventually be replaced with a configure directive. - */ -/* #define USE_UNIFIED_IPV6_STRUCTS 1 */ -#undef STRUCT_in6pcb_HAS_inp_vflag - -/* - * utility macro used in several darwin specific files - */ -#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0) - -/* - * Mac OS X runs on both PPC and Intel hardware, - * which handle udpTable index values differently - */ -#include -#ifdef TARGET_RT_LITTLE_ENDIAN -#define UDP_ADDRESSES_IN_HOST_ORDER 1 -#endif - diff --git a/include/net-snmp/system/darwin11.h b/include/net-snmp/system/darwin11.h deleted file mode 100644 index 9d6f03d..0000000 --- a/include/net-snmp/system/darwin11.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * While Darwin 10 (aka, Mac OS X 10.6 Snow Leopard) is "BSD-like", it differs - * substantially enough to not warrant pretending it is a BSD flavor. - * This first section are the vestigal BSD remnants. - */ -/* 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 (C) 2007 Apple, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -/* - * 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 CHECK_RT_FLAGS 1 - -/* - * this is not good enough before freebsd3! - */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* - * This section adds the relevant definitions from generic.h - * (a file we don't include here) - */ - -/* - * udp_inpcb list symbol, e.g. for mibII/udpTable.c - */ -#define INP_NEXT_SYMBOL inp_next - -/* - * This section defines Mac OS X 10.5 (and later) specific additions. - */ -#define darwin 11 -#ifndef darwin11 -# define darwin11 darwin -#endif - -/* - * Mac OS X should only use the modern API and definitions. - */ -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS -#define NETSNMP_NO_LEGACY_DEFINITIONS 1 -#endif - -/* - * looks like the IFTable stuff works better than the mibII versions - */ - -#define NETSNMP_INCLUDE_IFTABLE_REWRITES - -/* - * use new host resources files as well - */ -#define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_HRSWINST_REWRITES -#define NETSNMP_INCLUDE_HRSWRUN_REWRITES -#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT -#define NETSNMP_CAN_GET_DISK_LABEL 1 - -/* - * Enabling this restricts the compiler to mostly public APIs. - */ -#ifndef __APPLE_API_STRICT_CONFORMANCE -#define __APPLE_API_STRICT_CONFORMANCE 1 -#endif -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE 1 -#endif - -/* - * Darwin's tools are capable of building multiple architectures in one pass. - * As a result, platform definitions should be deferred until compile time. - */ -#ifdef BYTE_ORDER -# undef WORDS_BIGENDIAN -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - -/* - * These apparently used to be in netinet/tcp_timers.h, but went away in - * 10.4.2. Define them here til we find out a way to get the real values. - */ -#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ -#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ - -/* - * Because Mac OS X is built on Mach, it does not provide a BSD-compatible - * VM statistics API. - */ -#define USE_MACH_HOST_STATISTICS 1 - -/* - * This tells code that manipulates IPv6 that the structures are unified, - * i.e., IPv4 and IPv6 use the same structs. - * This should eventually be replaced with a configure directive. - */ -/* #define USE_UNIFIED_IPV6_STRUCTS 1 */ -#undef STRUCT_in6pcb_HAS_inp_vflag - -/* - * utility macro used in several darwin specific files - */ -#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0) - -/* - * Mac OS X runs on both PPC and Intel hardware, - * which handle udpTable index values differently - */ -#include -#ifdef TARGET_RT_LITTLE_ENDIAN -#define UDP_ADDRESSES_IN_HOST_ORDER 1 -#endif - -/* - * as of 7/2010, openssl on darwin does not have sha256 - */ -#define OPENSSL_NO_SHA256 1 -#define OPENSSL_NO_SHA512 1 diff --git a/include/net-snmp/system/darwin12.h b/include/net-snmp/system/darwin12.h deleted file mode 100644 index 3031d04..0000000 --- a/include/net-snmp/system/darwin12.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * While Darwin 10 (aka, Mac OS X 10.6 Snow Leopard) is "BSD-like", it differs - * substantially enough to not warrant pretending it is a BSD flavor. - * This first section are the vestigal BSD remnants. - */ -/* 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 (C) 2007 Apple, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -/* - * 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 CHECK_RT_FLAGS 1 - -/* - * this is not good enough before freebsd3! - */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* - * This section adds the relevant definitions from generic.h - * (a file we don't include here) - */ - -/* - * udp_inpcb list symbol, e.g. for mibII/udpTable.c - */ -#define INP_NEXT_SYMBOL inp_next - -/* - * This section defines Mac OS X 10.5 (and later) specific additions. - */ -#define darwin 12 -#ifndef darwin12 -# define darwin12 darwin -#endif - -/* - * Mac OS X should only use the modern API and definitions. - */ -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS -#define NETSNMP_NO_LEGACY_DEFINITIONS 1 -#endif - -/* - * looks like the IFTable stuff works better than the mibII versions - */ - -#define NETSNMP_INCLUDE_IFTABLE_REWRITES - -/* - * use new host resources files as well - */ -#define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_HRSWINST_REWRITES -#define NETSNMP_INCLUDE_HRSWRUN_REWRITES -#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT -#define NETSNMP_CAN_GET_DISK_LABEL 1 - -/* - * Enabling this restricts the compiler to mostly public APIs. - */ -#ifndef __APPLE_API_STRICT_CONFORMANCE -#define __APPLE_API_STRICT_CONFORMANCE 1 -#endif -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE 1 -#endif - -/* - * Darwin's tools are capable of building multiple architectures in one pass. - * As a result, platform definitions should be deferred until compile time. - */ -#ifdef BYTE_ORDER -# undef WORDS_BIGENDIAN -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - -/* - * These apparently used to be in netinet/tcp_timers.h, but went away in - * 10.4.2. Define them here til we find out a way to get the real values. - */ -#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ -#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ - -/* - * Because Mac OS X is built on Mach, it does not provide a BSD-compatible - * VM statistics API. - */ -#define USE_MACH_HOST_STATISTICS 1 - -/* - * This tells code that manipulates IPv6 that the structures are unified, - * i.e., IPv4 and IPv6 use the same structs. - * This should eventually be replaced with a configure directive. - */ -/* #define USE_UNIFIED_IPV6_STRUCTS 1 */ -#undef STRUCT_in6pcb_HAS_inp_vflag - -/* - * utility macro used in several darwin specific files - */ -#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0) - -/* - * Mac OS X runs on both PPC and Intel hardware, - * which handle udpTable index values differently - */ -#include -#ifdef TARGET_RT_LITTLE_ENDIAN -#define UDP_ADDRESSES_IN_HOST_ORDER 1 -#endif - -/* - * as of 7/2010, openssl on darwin does not have sha256 - */ -#define OPENSSL_NO_SHA256 1 -#define OPENSSL_NO_SHA512 1 diff --git a/include/net-snmp/system/darwin13.h b/include/net-snmp/system/darwin13.h deleted file mode 100644 index cb1870b..0000000 --- a/include/net-snmp/system/darwin13.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * While Darwin 10 (aka, Mac OS X 10.6 Snow Leopard) is "BSD-like", it differs - * substantially enough to not warrant pretending it is a BSD flavor. - * This first section are the vestigal BSD remnants. - */ -/* 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 (C) 2007 Apple, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -/* - * 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 CHECK_RT_FLAGS 1 - -/* - * this is not good enough before freebsd3! - */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* - * This section adds the relevant definitions from generic.h - * (a file we don't include here) - */ - -/* - * udp_inpcb list symbol, e.g. for mibII/udpTable.c - */ -#define INP_NEXT_SYMBOL inp_next - -/* - * This section defines Mac OS X 10.5 (and later) specific additions. - */ -#define darwin 13 -#ifndef darwin13 -# define darwin13 darwin -#endif - -/* - * Mac OS X should only use the modern API and definitions. - */ -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS -#define NETSNMP_NO_LEGACY_DEFINITIONS 1 -#endif - -/* - * looks like the IFTable stuff works better than the mibII versions - */ - -#define NETSNMP_INCLUDE_IFTABLE_REWRITES - -/* - * use new host resources files as well - */ -#define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_HRSWINST_REWRITES -#define NETSNMP_INCLUDE_HRSWRUN_REWRITES -#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT -#define NETSNMP_CAN_GET_DISK_LABEL 1 - -/* - * Enabling this restricts the compiler to mostly public APIs. - */ -#ifndef __APPLE_API_STRICT_CONFORMANCE -#define __APPLE_API_STRICT_CONFORMANCE 1 -#endif -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE 1 -#endif - -/* - * Darwin's tools are capable of building multiple architectures in one pass. - * As a result, platform definitions should be deferred until compile time. - */ -#ifdef BYTE_ORDER -# undef WORDS_BIGENDIAN -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - -/* - * These apparently used to be in netinet/tcp_timers.h, but went away in - * 10.4.2. Define them here til we find out a way to get the real values. - */ -#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ -#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ - -/* - * Because Mac OS X is built on Mach, it does not provide a BSD-compatible - * VM statistics API. - */ -#define USE_MACH_HOST_STATISTICS 1 - -/* - * This tells code that manipulates IPv6 that the structures are unified, - * i.e., IPv4 and IPv6 use the same structs. - * This should eventually be replaced with a configure directive. - */ -/* #define USE_UNIFIED_IPV6_STRUCTS 1 */ -#undef STRUCT_in6pcb_HAS_inp_vflag - -/* - * utility macro used in several darwin specific files - */ -#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0) - -/* - * Mac OS X runs on both PPC and Intel hardware, - * which handle udpTable index values differently - */ -#include -#ifdef TARGET_RT_LITTLE_ENDIAN -#define UDP_ADDRESSES_IN_HOST_ORDER 1 -#endif - -/* - * as of 7/2010, openssl on darwin does not have sha256 - */ -#define OPENSSL_NO_SHA256 1 -#define OPENSSL_NO_SHA512 1 diff --git a/include/net-snmp/system/darwin7.h b/include/net-snmp/system/darwin7.h deleted file mode 100644 index 8d4554d..0000000 --- a/include/net-snmp/system/darwin7.h +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include "freebsd4.h" -#define darwin darwin -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define MBSTAT_SYMBOL "mbstat" -#undef TOTAL_MEMORY_SYMBOL - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - diff --git a/include/net-snmp/system/darwin8.h b/include/net-snmp/system/darwin8.h deleted file mode 100644 index 1e6d7d3..0000000 --- a/include/net-snmp/system/darwin8.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * While Darwin 8 (aka, Mac OS X 10.4 Tiger) is "BSD-like", it differs - * substantially enough to not warrant pretending it is a BSD flavor. - * This first section are the vestigal BSD remnants. - */ - -/* - * 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 CHECK_RT_FLAGS 1 - -/* - * this is not good enough before freebsd3! - */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* - * This section adds the relevant definitions from generic.h - * (a file we don't include here) - */ - -/* - * udp_inpcb list symbol, e.g. for mibII/udpTable.c - */ -#define INP_NEXT_SYMBOL inp_next - -/* - * This section defines Mac OS X 10.4 (and later) specific additions. - */ -#define darwin 8 - -/* - * Mac OS X should only use the modern API and definitions. - */ -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS -#define NETSNMP_NO_LEGACY_DEFINITIONS 1 -#endif - -/* - * (eventually) Enabling this forces the compiler to only use public APIs. - */ -/*#ifndef __APPLE_API_STRICT_CONFORMANCE - *#define __APPLE_API_STRICT_CONFORMANCE 1 - *#endif - */ - -/* - * Darwin's tools are capable of building multiple architectures in one pass. - * As a result, platform definitions should be deferred until compile time. - */ -#ifdef BYTE_ORDER -# undef WORDS_BIGENDIAN -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - -/* - * These apparently used to be in netinet/tcp_timers.h, but went away in - * 10.4.2. Define them here til we find out a way to get the real values. - */ -#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ -#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ - -/* - * Because Mac OS X is built on Mach, it does not provide a BSD-compatible - * VM statistics API. - */ -#define USE_MACH_HOST_STATISTICS 1 - -/* - * This tells code that manipulates IPv6 that the structures are unified, - * i.e., IPv4 and IPv6 use the same structs. - * This should eventually be replaced with a configure directive. - */ -/* #define USE_UNIFIED_IPV6_STRUCTS 1 */ -#undef STRUCT_in6pcb_HAS_inp_vflag - diff --git a/include/net-snmp/system/darwin9.h b/include/net-snmp/system/darwin9.h deleted file mode 100644 index bf3d2dc..0000000 --- a/include/net-snmp/system/darwin9.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * While Darwin 9 (aka, Mac OS X 10.5 Leopard) is "BSD-like", it differs - * substantially enough to not warrant pretending it is a BSD flavor. - * This first section are the vestigal BSD remnants. - */ -/* 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 (C) 2007 Apple, Inc. All rights reserved. - * Use is subject to license terms specified in the COPYING file - * distributed with the Net-SNMP package. - */ - -/* - * 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 CHECK_RT_FLAGS 1 - -/* - * this is not good enough before freebsd3! - */ -/* #undef HAVE_NET_IF_MIB_H */ - -/* - * This section adds the relevant definitions from generic.h - * (a file we don't include here) - */ - -/* - * udp_inpcb list symbol, e.g. for mibII/udpTable.c - */ -#define INP_NEXT_SYMBOL inp_next - -/* - * This section defines Mac OS X 10.5 (and later) specific additions. - */ -#define darwin 9 -#ifndef darwin9 -# define darwin9 darwin -#endif - -/* - * Mac OS X should only use the modern API and definitions. - */ -#ifndef NETSNMP_NO_LEGACY_DEFINITIONS -#define NETSNMP_NO_LEGACY_DEFINITIONS 1 -#endif - -/* - * looks like the IFTable stuff works better than the mibII versions - */ - -#define NETSNMP_INCLUDE_IFTABLE_REWRITES - -/* - * use new host resources files as well - */ -#define NETSNMP_INCLUDE_HRSWINST_REWRITES -#define NETSNMP_INCLUDE_HRSWRUN_REWRITES -#undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT -#define NETSNMP_CAN_GET_DISK_LABEL 1 - -/* - * Enabling this restricts the compiler to mostly public APIs. - */ -#ifndef __APPLE_API_STRICT_CONFORMANCE -#define __APPLE_API_STRICT_CONFORMANCE 1 -#endif -#ifndef __APPLE_API_UNSTABLE -#define __APPLE_API_UNSTABLE 1 -#endif - -/* - * Darwin's tools are capable of building multiple architectures in one pass. - * As a result, platform definitions should be deferred until compile time. - */ -#ifdef BYTE_ORDER -# undef WORDS_BIGENDIAN -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - -/* - * Although Darwin does have an fstab.h file, getfsfile etc. always return null. - * At least, as of 5.3. - */ -#undef HAVE_FSTAB_H - -#define SWAPFILE_DIR "/private/var/vm" -#define SWAPFILE_PREFIX "swapfile" - -/* - * These apparently used to be in netinet/tcp_timers.h, but went away in - * 10.4.2. Define them here til we find out a way to get the real values. - */ -#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */ -#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */ - -/* - * Because Mac OS X is built on Mach, it does not provide a BSD-compatible - * VM statistics API. - */ -#define USE_MACH_HOST_STATISTICS 1 - -/* - * This tells code that manipulates IPv6 that the structures are unified, - * i.e., IPv4 and IPv6 use the same structs. - * This should eventually be replaced with a configure directive. - */ -/* #define USE_UNIFIED_IPV6_STRUCTS 1 */ -#undef STRUCT_in6pcb_HAS_inp_vflag - -/* - * utility macro used in several darwin specific files - */ -#define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0) - -/* - * Mac OS X runs on both PPC and Intel hardware, - * which handle udpTable index values differently - */ -#include -#ifdef TARGET_RT_LITTLE_ENDIAN -#define UDP_ADDRESSES_IN_HOST_ORDER 1 -#endif - diff --git a/include/net-snmp/system/dragonfly.h b/include/net-snmp/system/dragonfly.h index 35d016b..5edb209 100644 --- a/include/net-snmp/system/dragonfly.h +++ b/include/net-snmp/system/dragonfly.h @@ -6,6 +6,7 @@ #define freebsd2 freebsd2 #define freebsd3 freebsd3 #define freebsd4 freebsd4 +#define __FreeBSD_version 400000 #define dragonfly dragonfly #undef IFADDR_SYMBOL diff --git a/include/net-snmp/system/dynix.h b/include/net-snmp/system/dynix.h index 63e979b..db06dcc 100644 --- a/include/net-snmp/system/dynix.h +++ b/include/net-snmp/system/dynix.h @@ -98,7 +98,7 @@ * Might as well include this here, since a significant * number of files seem to need it. DTS */ -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif diff --git a/include/net-snmp/system/freebsd.h b/include/net-snmp/system/freebsd.h index a30683f..bf2eede 100644 --- a/include/net-snmp/system/freebsd.h +++ b/include/net-snmp/system/freebsd.h @@ -24,4 +24,3 @@ /* define the extra mib modules that are supported */ #define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_IFTABLE_REWRITES diff --git a/include/net-snmp/system/freebsd13.h b/include/net-snmp/system/freebsd13.h new file mode 100644 index 0000000..5add58c --- /dev/null +++ b/include/net-snmp/system/freebsd13.h @@ -0,0 +1,3 @@ +/* freebsd13 is a superset of freebsd12 */ +#include "freebsd12.h" +#define freebsd12 freebsd12 diff --git a/include/net-snmp/system/freebsd14.h b/include/net-snmp/system/freebsd14.h new file mode 100644 index 0000000..18df064 --- /dev/null +++ b/include/net-snmp/system/freebsd14.h @@ -0,0 +1,3 @@ +/* freebsd14 is a superset of freebsd13 */ +#include "freebsd13.h" +#define freebsd13 freebsd13 diff --git a/include/net-snmp/system/freebsd8.h b/include/net-snmp/system/freebsd8.h index 0c814bd..5f02984 100644 --- a/include/net-snmp/system/freebsd8.h +++ b/include/net-snmp/system/freebsd8.h @@ -1,3 +1,11 @@ /* freebsd8 is a superset of freebsd7 */ #include "freebsd7.h" #define freebsd7 freebsd7 + +/* + * Not completely sure when these fields got + * added to FreeBSD, but FreeBSD 8 is about the oldest + * one we care about, so add them here. + */ +#undef UTMP_HAS_NO_TYPE +#undef UTMP_HAS_NO_PID diff --git a/include/net-snmp/system/generic.h b/include/net-snmp/system/generic.h index 0828a84..545604f 100644 --- a/include/net-snmp/system/generic.h +++ b/include/net-snmp/system/generic.h @@ -16,12 +16,6 @@ #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 */ diff --git a/include/net-snmp/system/hpux.h b/include/net-snmp/system/hpux.h index 57cea42..1abf8f8 100644 --- a/include/net-snmp/system/hpux.h +++ b/include/net-snmp/system/hpux.h @@ -28,15 +28,6 @@ #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 @@ -65,11 +56,6 @@ #undef PHYSMEM_SYMBOL #endif -/* - * ARP_Scan_Next needs a 4th ifIndex argument - */ -#define ARP_SCAN_FOUR_ARGUMENTS - #define rt_pad1 rt_refcnt /* diff --git a/include/net-snmp/system/irix.h b/include/net-snmp/system/irix.h index 933fe63..e279174 100644 --- a/include/net-snmp/system/irix.h +++ b/include/net-snmp/system/irix.h @@ -16,8 +16,6 @@ #undef TCPSTAT_SYMBOL #undef UDPSTAT_SYMBOL -#define ARP_SCAN_FOUR_ARGUMENTS 1 - #define _KMEMUSER 1 /* diff --git a/include/net-snmp/system/kfreebsd.h b/include/net-snmp/system/kfreebsd.h index dbf7024..3796fc8 100644 --- a/include/net-snmp/system/kfreebsd.h +++ b/include/net-snmp/system/kfreebsd.h @@ -1,9 +1,45 @@ -#include "freebsd6.h" -#define freebsd6 freebsd6 - +/* For __FreeBSD_kernel_version */ #include #define __FreeBSD_version __FreeBSD_kernel_version -#include +/* For */ #include +#define INP_NEXT_SYMBOL inp_next + +#if __FreeBSD_kernel_version >= 3 +#define freebsd3 +#endif +#if __FreeBSD_kernel_version >= 4 +#define freebsd4 +#endif +#if __FreeBSD_kernel_version >= 5 +#define freebsd5 +#endif +#if __FreeBSD_kernel_version >= 6 +#define freebsd6 +#endif +#if __FreeBSD_kernel_version >= 7 +#define freebsd7 +#endif +#if __FreeBSD_kernel_version >= 8 +#define freebsd8 +#endif +#if __FreeBSD_kernel_version >= 9 +#define freebsd9 +#endif +#if __FreeBSD_kernel_version >= 10 +#define freebsd10 +#endif +#if __FreeBSD_kernel_version >= 11 +#define freebsd11 +#endif +#if __FreeBSD_kernel_version >= 12 +#define freebsd12 +#endif +#if __FreeBSD_kernel_version >= 13 +#define freebsd13 +#endif +#if __FreeBSD_kernel_version >= 14 +#define freebsd14 +#endif diff --git a/include/net-snmp/system/linux.h b/include/net-snmp/system/linux.h index 65b3be1..e7aeb68 100644 --- a/include/net-snmp/system/linux.h +++ b/include/net-snmp/system/linux.h @@ -6,8 +6,6 @@ #undef bsdlike -#define ARP_SCAN_FOUR_ARGUMENTS - /* uncomment this to read process names from /proc/X/cmdline (like <= 5.0) */ /* #define USE_PROC_CMDLINE */ @@ -20,4 +18,3 @@ /* define the extra mib modules that are supported */ #define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_IFTABLE_REWRITES diff --git a/include/net-snmp/system/mingw32.h b/include/net-snmp/system/mingw32.h index 68a3a76..d326062 100644 --- a/include/net-snmp/system/mingw32.h +++ b/include/net-snmp/system/mingw32.h @@ -18,76 +18,18 @@ */ /* - * Make the getnameinfo() function available. - * Note: according to MSDN getnameinfo() is available in ws2_32 on Windows 2000 - * and above. MinGW only makes getnameinfo() visible when setting _WIN32_WINNT - * to 0x0501 (Windows XP) or higher, which is a bug in the MinGW 5.1.6 headers. + * Make sure that the Winsock header files get included before any + * header files to avoid that the build fails as follows: + * In file included from /usr/include/w32api/winsock2.h:56:0, + * from ../include/net-snmp/types.h:24, + * from snmp_client.c:87: + * /usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: *warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] + * #warning "fd_set and associated macros have been defined in sys/types. */ -#define _WIN32_WINNT 0x0501 +#include +#include #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. */ -#define HAVE_GETTIMEOFDAY 1 - -/* 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 raise() instead of alarm() */ -#define HAVE_RAISE 1 - -/* Define if you have the socket function. */ -#define HAVE_SOCKET 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 - see licensing information above */ -#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) */ - -#ifndef HAVE_STRUCT_TIMEZONE_TZ_DSTTIME -/* - * Older MinGW versions do not have struct timezone, so define it here. - */ -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -#endif - diff --git a/include/net-snmp/system/netbsd.h b/include/net-snmp/system/netbsd.h index 1f22a44..b2c8c51 100644 --- a/include/net-snmp/system/netbsd.h +++ b/include/net-snmp/system/netbsd.h @@ -18,11 +18,19 @@ /* * inp_next symbol */ +#define HAVE_INPCBTABLE 1 #undef INP_NEXT_SYMBOL -#define INP_NEXT_SYMBOL inp_queue.cqe_next #undef INP_PREV_SYMBOL + +#if __NetBSD_Version__ >= 700000001 +#define INP_FIRST_SYMBOL inpt_queue.tqh_first +#define INP_NEXT_SYMBOL inp_queue.tqe_next +#define INP_PREV_SYMBOL inp_queue.tqe_prev +#else +#define INP_FIRST_SYMBOL inpt_queue.cqh_first +#define INP_NEXT_SYMBOL inp_queue.cqe_next #define INP_PREV_SYMBOL inp_queue.cqe_prev -#define HAVE_INPCBTABLE 1 +#endif #if __NetBSD_Version__ >= 106300000 /* NetBSD 1.6ZD */ #undef IFADDR_SYMBOL @@ -34,6 +42,10 @@ #define UDP_ADDRESSES_IN_HOST_ORDER 1 +#ifdef netbsdelf7 +#define netbsd7 +#define netbsdelf6 +#endif #ifdef netbsdelf6 #define netbsd6 #define netbsdelf5 @@ -50,6 +62,18 @@ #define netbsd3 #endif +#if defined(netbsd10) && !defined(netbsd9) +#define netbsd9 netbsd9 +#endif +#if defined(netbsd9) && !defined(netbsd8) +#define netbsd8 netbsd8 +#endif +#if defined(netbsd8) && !defined(netbsd7) +#define netbsd7 netbsd7 +#endif +#if defined(netbsd7) && !defined(netbsd6) +#define netbsd6 netbsd6 +#endif #if defined(netbsd6) && !defined(netbsd5) #define netbsd5 netbsd5 #endif @@ -72,4 +96,3 @@ /* define the extra mib modules that are supported */ #define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_IFTABLE_REWRITES diff --git a/include/net-snmp/system/openbsd.h b/include/net-snmp/system/openbsd.h index 8db0eac..6d36bad 100644 --- a/include/net-snmp/system/openbsd.h +++ b/include/net-snmp/system/openbsd.h @@ -1,3 +1,4 @@ +#define __NetBSD_Version__ 1 #include "netbsd.h" #define netbsd1 netbsd1 /* we're really close to this */ @@ -15,4 +16,3 @@ /* define the extra mib modules that are supported */ #define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_IFTABLE_REWRITES diff --git a/include/net-snmp/system/openbsd5.h b/include/net-snmp/system/openbsd5.h index 26b2415..a3bedb0 100644 --- a/include/net-snmp/system/openbsd5.h +++ b/include/net-snmp/system/openbsd5.h @@ -1,3 +1,15 @@ /* openbsd5 is a superset of all since openbsd3 */ #include "openbsd4.h" #define openbsd4 openbsd4 + +#undef HAVE_NET_IF_VAR_H + +#if OpenBSD >= 201605 +#undef INP_FIRST_SYMBOL +#define INP_FIRST_SYMBOL inpt_queue.tqh_first +#undef INP_NEXT_SYMBOL +#define INP_NEXT_SYMBOL inp_queue.tqe_next +#undef INP_PREV_SYMBOL +#define INP_PREV_SYMBOL inp_queue.tqe_prev +#endif + diff --git a/include/net-snmp/system/openbsd6.h b/include/net-snmp/system/openbsd6.h new file mode 100644 index 0000000..3889f16 --- /dev/null +++ b/include/net-snmp/system/openbsd6.h @@ -0,0 +1,3 @@ +/* openbsd6 is a superset of all since openbsd3 */ +#include "openbsd5.h" +#define openbsd5 openbsd5 diff --git a/include/net-snmp/system/openbsd7.h b/include/net-snmp/system/openbsd7.h new file mode 100644 index 0000000..1244fe4 --- /dev/null +++ b/include/net-snmp/system/openbsd7.h @@ -0,0 +1,3 @@ +/* openbsd7 is a superset of all since openbsd3 */ +#include "openbsd6.h" +#define openbsd6 openbsd6 diff --git a/include/net-snmp/system/osf5.h b/include/net-snmp/system/osf5.h index 32f45b8..9b0a2d1 100644 --- a/include/net-snmp/system/osf5.h +++ b/include/net-snmp/system/osf5.h @@ -16,8 +16,6 @@ #undef RTHASHSIZE_SYMBOL #define RTHASHSIZE_SYMBOL "rhash_size" -#undef ARPTAB_SIZE_SYMBOL - #ifndef __GNUC__ # undef NETSNMP_ENABLE_INLINE # define NETSNMP_ENABLE_INLINE 0 diff --git a/include/net-snmp/system/solaris.h b/include/net-snmp/system/solaris.h index ec61c39..8650cbd 100644 --- a/include/net-snmp/system/solaris.h +++ b/include/net-snmp/system/solaris.h @@ -2,10 +2,6 @@ #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 @@ -27,7 +23,6 @@ /* define the extra mib modules that are supported */ #define NETSNMP_INCLUDE_HOST_RESOURCES -#define NETSNMP_INCLUDE_IFTABLE_REWRITES /* Solaris 2.6+ */ #define _SLASH_PROC_METHOD_ 1 diff --git a/include/net-snmp/types.h b/include/net-snmp/types.h index 5cad193..0617c08 100644 --- a/include/net-snmp/types.h +++ b/include/net-snmp/types.h @@ -1,3 +1,14 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #ifndef NET_SNMP_TYPES_H #define NET_SNMP_TYPES_H @@ -11,48 +22,7 @@ #error "Please include before this file" #endif - /* - * For 'timeval' - */ -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#ifdef HAVE_INTTYPES_H -#include -#endif #include -#if 1 -/* - * If neither the Microsoft winsock header file nor the MinGW winsock header - * file has already been included, do this now. - */ -# if defined(HAVE_WINSOCK2_H) && defined(HAVE_WS2TCPIP_H) -# if !defined(__MINGW32__) && !defined(HAVE_WIN32_PLATFORM_SDK) && \ - _MSC_VER -0 <= 1200 && _WIN32_WINNT -0 >= 0x0400 - /* - * When using the MSVC 6 header files, including when - * _WIN32_WINNT >= 0x0400 results in a compilation error. Hence include - * instead, because is included from inside - * when _WIN32_WINNT >= 0x0400. The SDK version of - * does not include however. - */ -# include -# else -# include -# endif -# include -# elif defined(HAVE_WINSOCK_H) -# include -# endif -#endif #if defined(WIN32) && !defined(cygwin) typedef HANDLE netsnmp_pid_t; @@ -67,10 +37,6 @@ typedef pid_t netsnmp_pid_t; #define NETSNMP_NO_SUCH_PROCESS -1 #endif -#if HAVE_NETINET_IN_H -#include /* For definition of in_addr_t */ -#endif - #include #ifdef __cplusplus @@ -78,20 +44,16 @@ extern "C" { #endif #ifndef HAVE_SOCKLEN_T +#ifdef WIN32 +typedef int socklen_t; +#else typedef u_int socklen_t; #endif - -#ifndef HAVE_IN_ADDR_T - /* - * The type in_addr_t must match the type of sockaddr_in::sin_addr. - * For MSVC and MinGW32, this is u_long. - */ -typedef u_long in_addr_t; #endif -#if !defined(HAVE_SSIZE_T) && !defined(_WIN64) -#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 -typedef int ssize_t; +#ifndef HAVE_SSIZE_T +#if defined(_WIN64) +typedef __int64 ssize_t; #else typedef long ssize_t; #endif @@ -101,6 +63,16 @@ typedef long ssize_t; typedef unsigned long int nfds_t; #endif +#ifdef HAVE_PCRE_H +/* + * Abstract the pcre typedef such that not all *.c files have to include + * . + */ +typedef struct { + void *regex_ptr; +} netsnmp_regex_ptr; +#endif + /* * For the initial release, this will just refer to the * relevant UCD header files. @@ -177,7 +149,7 @@ typedef struct snmp_pdu { long version; /** Type of this PDU */ int command; - /** Request id - note: not incremented on retries */ + /** Request id - note: incremented for each retry */ long reqid; /** Message id for V3 messages note: incremented for each retry */ long msgid; @@ -198,6 +170,9 @@ typedef struct snmp_pdu { int securityLevel; int msgParseModel; + /** smallest of max for transport, v3 msgMaxSize and local cfg. */ + long msgMaxSize; + /** * Transport-specific opaque data. This replaces the IP-centric address * field. @@ -268,13 +243,15 @@ typedef struct snmp_pdu { } netsnmp_pdu; -/** @typedef struct snmp_session netsnmp_session - * Typedefs the snmp_session struct intonetsnmp_session */ - struct snmp_session; +/** + * @typedef struct snmp_session netsnmp_session + * Typedefs the snmp_session struct into netsnmp_session. + */ typedef struct snmp_session netsnmp_session; -#define USM_AUTH_KU_LEN 32 -#define USM_PRIV_KU_LEN 32 +/** for openssl this should match up with EVP_MAX_MD_SIZE */ +#define USM_AUTH_KU_LEN 64 +#define USM_PRIV_KU_LEN 64 typedef int (*snmp_callback) (int, netsnmp_session *, int, netsnmp_pdu *, void *); @@ -283,6 +260,30 @@ typedef int (*netsnmp_callback) (int, netsnmp_session *, int, struct netsnmp_container_s; +#ifndef NETSNMP_NO_TRAP_STATS + /* + * trap/inform statistics. + * + * all times are sysuptime + */ +typedef struct netsnmp_trap_stats_s { + u_long sent_count; + u_long sent_last_sent; + + u_long sent_fail_count; + u_long sent_last_fail; + + u_long ack_count; + u_long ack_last_rcvd; + + u_long sec_err_count; + u_long sec_err_last; + + u_long timeouts; + u_long sent_last_timeout; +} netsnmp_trap_stats; +#endif /* NETSNMP_NO_TRAP_STATS */ + /** @struct snmp_session * The snmp session structure. */ @@ -303,7 +304,7 @@ struct snmp_session { /** name or address of default peer (may include transport specifier and/or port number) */ char *peername; /** UDP port number of peer. (NO LONGER USED - USE peername INSTEAD) */ - u_short remote_port; + u_short remote_port NETSNMP_ATTRIBUTE_DEPRECATED; /** My Domain name or dotted IP address, 0 for default */ char *localname; /** My UDP port number, 0 for default, picked randomly */ @@ -395,6 +396,9 @@ struct snmp_session { int securityLevel; /** target param name */ char *paramName; +#ifndef NETSNMP_NO_TRAP_STATS + netsnmp_trap_stats *trap_stats; +#endif /* NETSNMP_NO_TRAP_STATS */ /** * security module specific diff --git a/include/net-snmp/utilities.h b/include/net-snmp/utilities.h index 55aed5f..85a7c71 100644 --- a/include/net-snmp/utilities.h +++ b/include/net-snmp/utilities.h @@ -27,15 +27,12 @@ #include #include -#if HAVE_GETOPT_H +#ifdef HAVE_GETOPT_H #include #else #include #endif -#ifdef HAVE_NETINET_IN_H -#include /* for in_addr_t */ -#endif #include #include #include /* for counter64 */ diff --git a/install-sh b/install-sh index 3f83ce9..ec298b5 100644 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2010-02-06.18; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,25 +35,21 @@ scriptversion=2010-02-06.18; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,22 +64,16 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -97,7 +87,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -114,18 +104,28 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,42 +137,62 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; + + -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - shift;; + -S) backupsuffix="$2" + shift;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -186,6 +206,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -194,11 +218,20 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -215,16 +248,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -232,9 +265,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -242,6 +275,10 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -256,185 +293,150 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else - mkdir_mode= + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + trap '' 0;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -447,14 +449,25 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -469,20 +482,24 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -490,24 +507,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 @@ -516,9 +533,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/local/Makefile.in b/local/Makefile.in index cb84afc..db8cfda 100644 --- a/local/Makefile.in +++ b/local/Makefile.in @@ -1,8 +1,6 @@ # # local (scripts) directory Makefile # -top_builddir=.. - VPATH = @srcdir@ # @@ -16,11 +14,11 @@ OTHERUNINSTALL=localuninstall # SNMPCONFPATH=@SNMPCONFPATH@ PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@ -PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert +PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert checkbandwidth SHELLSCRIPTS=mib2c-update SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \ ipf-mod.pl.made snmpconf.made traptoemail.made snmp-bridge-mib.made \ - net-snmp-cert.made + net-snmp-cert.made checkbandwidth.made DATASRCS=mib2c.conf mib2c.iterate.conf mib2c.iterate_access.conf \ mib2c.create-dataset.conf mib2c.mfd.conf \ mib2c.array-user.conf mib2c.column_enums.conf \ @@ -28,7 +26,7 @@ DATASRCS=mib2c.conf mib2c.iterate.conf mib2c.iterate_access.conf \ mib2c.old-api.conf mib2c.scalar.conf \ mib2c.check_values.conf mib2c.check_values_local.conf \ mib2c.access_functions.conf mib2c.notify.conf \ - mib2c.int_watch.conf mib2c.genhtml.conf \ + mib2c.int_watch.conf mib2c.genhtml.conf mib2c.org-mode.conf \ mib2c.raw-table.conf mib2c.table_data.conf \ mib2c.container.conf mib2c.perl.conf MIB2CINSTALLDIR=$(snmplibdir)/mib2c-data @@ -151,6 +149,13 @@ snmp-bridge-mib.made: $(srcdir)/snmp-bridge-mib touch snmp-bridge-mib.made; \ fi +checkbandwidth.made: $(srcdir)/checkbandwidth + if test "x$(PERL)" != "x" ; then \ + $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' $(srcdir)/checkbandwidth > checkbandwidth.made ; \ + else \ + touch checkbandwidth.made ; \ + fi + localinstall: $(SCRIPTSMADEFORPERL) @if test "x$(PERL)" != "x" ; then \ for i in $(PERLSCRIPTS) ; do $(INSTALL) $$i.made $(INSTALL_PREFIX)$(bindir)/$$i ; echo "install: installed $$i in $(INSTALL_PREFIX)$(bindir)" ; done ; \ diff --git a/local/checkbandwidth b/local/checkbandwidth new file mode 100644 index 0000000..c69637b --- /dev/null +++ b/local/checkbandwidth @@ -0,0 +1,835 @@ +#!/usr/bin/perl + +=pod + +=head1 NAME + +checkbandwidth - Alert on bandwidth high/low levels for a host/interface + +=head1 DESCRIPTION + +The checkbandwidth script uses the perl SNMP module to collect, store +and analyze date from the IF-MIB::ifXTable for the ifHCInOctets and +ifHCOutOctets counters. It can be configured with high/low levels and +issue warnings, either through email or via output text and exit +codes. Specifically, the exit codes (1 = warning, 2 = error) and text +output are designed to be used with Nagios. It calculates bandwidth +by comparing the values from the last run against the values from the +current run and the amonut of time that has passeed between the two +runs [i.e. bandwidth = (this_run - last_run)/time]. Because we need +data from two runs, the first time it is run after configuration will +never detect an error until the second run. + +Data is stored in ~/.snmp/checkbandwidth.json, which can be +removed/unlinked to reset the command's data store if needed. Or the +-r switch can be used to just reset the data without wiping the +configuration. + +=head1 SYNOPSIS + +1) Setup your snmp.conf file with authentication parameters for your system: + + # snmpconf -g basic_setup + +2) Add the interface on the host you want monitor, along with an optional +"threshold" parameters that you want to be warned about: + + # checkbandwidth --add-interface eth0 \ + --max-in-bandwidth 300000=admin@example.com \ + foo.example.com + +3A) Then run the tool against the host on a regular basis (eg, every 5 +minutes in cron): + + # checkbandwidth foo.example.com + foo.example.com wlan1 49200.1426 in 5538.7522 out (B/s) IO + +The numbers reported are the measured bandwidth during this run. The +"IO" letters are flags letting you know that the (I)nput or (O)utput +values are out of expected range. + +3B) Run the tool inside of nagios: + + define command { + command_name checkbandwidth + # specific path to vendor_perl is to fix vir's /usr/local installation + command_line /usr/bin/perl /usr/local/bin/checkbandwidth -L /var/spool/nagios/.snmp/checkbandwidth.json.lock -N -s $ARG1$ + } + +=head1 OPTIONS + +=head2 Configuration and setup: + +=over + +=item -i STRING + +=item --add-interface=STRING + +Add this interface to the list of things to report data for. + +=item -I INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +=item --max-in-bandwidth=INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +=item -O INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +=item --max-out-bandwidth=INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +These setup options specify an maximum input and/or output bandwidth that will: + +1) When running as a nagios script (using the --nagios flag), the + script will display an appropriate message and exit with a return + code based on whether the string passed to the flag is 'nagioswarn' + or 'nagioscritical'. + +2) When run manually or via cron, then the checkbandwidth will send an + email address to ADDRESS about the error. + +The INT field should be the bandwidth above which the error or warning +should occur. If the :COUNT field is included, no messages will be +sent/generated until at least the COUNT'th time is seen (default: 1). +The frequency of the count is dependent on often often the script gets +called or the loop frequency occurs (--loop). + +Note that the --add-interface (-i) flag is required for this flag to be useful. + +See the EXAMPLES section below for more usage. + +=item -J INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +=item --min-in-bandwidth=INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +=item -Q INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +=item --min-out-bandwidth=INT[:COUNT]=( 'nagioswarn' | 'nagioscritical' | ADDRESS ) + +These two are similar to --max-in-bandwidth and --max-out-bandwidth, +but set the low-water mark thresholds for an interface. + +=back + +=head2 Operation: + +=over + +=item -c STRING + +=item --cache-file=STRING + +Location to store persistent data file, which is a JSON encoded structure. +This defaults to ~/.snmp/checkbandwidth.json. + +=item -r + +=item --reset + +Ignore all past data and restart the statists collection from scratch +for all hosts/interfaces. This wipes the collected data without +wiping the configuration min/max warning/critical levels. + + + +=item -l INTEGER + +=item --loop=INTEGER + +Run as a daemon and loop forever, displaying bandwidth performing +checks every INTEGER seconds and displaying an output summary line. + +=back + +=head2 Nagios mode: + +The following options only make sense when acting as an interface with +nagios. An example nagios command definition is as follows: + + define command { + command_name checkbandwidth + command_line /usr/local/bin/checkbandwidth -c /var/spool/nagios/.snmp/checkbandwidth.nagios.json -L /var/spool/nagios/.snmp/checkbandwidth.nagios.json.lock -N $ARG1 + } + +Note that if you need to specify perl module paths, you'll need to call it as: + + /usr/bin/perl -I /usr/lib64/perl5/vendor_perl/ /usr/local/bin/checkbandwidth + +You can then use a service definition such as this one: + + define service { + service_description bandwidth + host_name localhost + check_command checkbandwidth!localhost + use ... + + } + +Recommendation: Use a different configuration file for nagios hosts +than other command line usage. + +Recommendation: Use a lock file (-L) to ensure that data from two +parallel calls in nagios won't be written to at once, causing the file +to be corrupted. + +Recommendation: If you're monitoring a large number of hosts, use a +sepearate configuration file (and lock file) for each host by passing +an argument like -c /var/spool/nagios/.snmp/checkbandwidth.nagios.$ARG1.json + +=over + +=item -N + +=item --nagios + +Operate in nagios mode, which will display appropriate nagios display +error codes and exit with an exit code that nagios will process. + +=item -s + +=item --nagios-summary + +Place a basic summary line of bandwidth in the output even when no +errors are currently present. Otherwise, the output will simply be +"All interfaces ok" + + + +=item -L LOCKFILE + +=item --lock-file LOCKFILE + +Use this file as a lockfile to ensure multiple checkbandwidth's +running won't try to write to the file at the same time. + +=back + +=head2 Sending mail on errors from cron + +When not in nagios mode, checkbandwidth will send mail if an error +condition is reached. The following options specify the SMTP server +parameters used to send mail. + +=over + +=item -S STRING + +=item --smtp-server=STRING + +The hostname or IP address of the SMTP serve to use. + + + +=item -P INTEGER + +=item --port=INTEGER + +The port number of the SMTP server to use. + + + +=item -F STRING + +=item --from=STRING + +The email address to put in the From: line. + + +=item -q + +=item --quiet + +Don't output data to the terminal (i.e., email only). + +=back + +=head2 Debugging: + +=over + +=item -d + +=item --dump + +Dump the raw JSON data when finished. + +=item -v + +=item --verbose + +Log (debugging) messages to stderr about what is being done + +=item -n + +=item --noop + +Don't store the collected information from the SNMP agent to the +persistent data storage file. I.E., only compare the results to last time. + +[This is highly useful when you just want to check the server from the +command line using a data store configuration cache that is being used +by another daemon (--loop mode) or by nagios], without affecting the +timing between runs] + +=back + +=head1 EXAMPLES + +=head2 Example Setup + +With these goals: + +* monitor eth0 +* send a message to root@localhost when the input bandwidth goes above 50000 B/s +* send a message to ops@localhost when the input bandwidth goes above 100000 B/s + +This can be configured as following: + + # checkbandwidth -i eth0 -I 50000=root@localhost localhost + # checkbandwidth -i eth0 -I 100000=ops@localhost localhost + +If we want to add new configuration in the future, say for the output +interface at 50000 but with a minimum number of 3 "times seen", we can do so: + + # checkbandwidth -i eth0 -O 50000:3=root@localhost localhost + +Testing it on a regalur basis is as simple as running: + + # checkbandwidth + localhost eth0 3907.2973 in 1638.1081 out (B/s) + +=head2 Nagios usage example + +* monitor eth0 +* Alert at nagios 'warning' when the input bandwidth goes above 50000 B/s +* Alert at nagios 'critical' when the input bandwidth goes above 100000 B/s + + # checkbandwidth -i eth0 -I 50000=nagioswarning -O 50000=nagioswarning localhost + # checkbandwidth -i eth0 -I 50000=nagioscritical -O 50000=nagioscritical localhost + +(and you may or may not want to add -s to always include summary information) + +=head1 BUGS / TODO + +* There is no way to automatically remove a configured option. IE, + once an delivery address is designated, there is no way to remove it + without manually editing the json file. + +=head1 AUTHOR + +Wes Hardaker +USC/ISI + +=head1 COPYRIGHT and LICENSING + +See the Net-SNMP COPYING file for licensing information for this script. + +=cut + +use JSON; +use Data::Dumper; +use Mail::Sender; +use SNMP; +use Fcntl ':flock'; + +use strict; + +my %opts = ( + c => "$ENV{HOME}/.snmp/checkbandwidth.json", + S => 'localhost', + F => 'root', + P => 25, + ); +my %storage; +my ($NAGIOS_NORMAL, $NAGIOS_WARNING, $NAGIOS_CRITICAL) = (0,1,2); +my $nagiosexit = $NAGIOS_NORMAL; +my $nagiosstr = ""; + +LocalGetOptions(\%opts, + ["GUI:separator", "Configuration and setup:"], + ["i|add-interface=s", "Add this interface to the list of things to monitor"], + ["I|max-in-bandwidth=s", "Alert to ADDRESS on bandwidth > INT, COUNT times; STRING format: INT[:COUNT]=ADDRESS"], + ["O|max-out-bandwidth=s", "Alert to ADDRESS on bandwidth > INT, COUNT times; STRING format: INT[:COUNT]=ADDRESS"], + ["J|min-in-bandwidth=s", "Alert to ADDRESS on bandwidth < INT, COUNT times; STRING format: INT[:COUNT]=ADDRESS"], + ["Q|min-out-bandwidth=s", "Alert to ADDRESS on bandwidth < INT, COUNT times; STRING format: INT[:COUNT]=ADDRESS"], + + ["GUI:separator", "Operation:"], + ["c|cache-file=s", "Location to store persistent data"], + ["r|reset", "Ignore all past data and start from scratch for all hosts/interfaces"], + ["l|loop=i", "Loop forever, displaying bandwidth every INTEGER seconds"], + + ["GUI:separator", "Nagios mode:"], + ["N|nagios", "Operate in nagios mode, displaying errors/exit code for a given host"], + ["s|nagios-summary", "Always include summary information in the nagios output"], + ["L|lock-file=s", "Use a lockfile to ensure no simultaneous runs"], + + ["GUI:separator", "Sending mail:"], + ["S|smtp-server=s", "SMTP server to use"], + ["P|port=i", "SMTP port to use"], + ["F|from=s", "From address to use"], + + ["GUI:separator", "Debugging:"], + ["q|quiet", "Don't output data to the terminal (i.e., email only)"], + ["d|dump", "Dump the raw JSON data when finished"], + ["v|verbose", "Log (debugging) messages to stderr about what is being done"], + ["n|noop", "Don\'t store persistent data ; compare only to last time"], + ) || die "Illegal usage; see -h for help"; + +my @hosts = @ARGV; # remaining arguments should be hosts + +my $cache = read_cache(); + +if ($#hosts == -1) { + @hosts = keys(%{$cache->{'hosts'}}); + Verbose("loading hosts from cache: ", join(", ", @hosts)); +} + +my $lockfileh; + +if ($opts{'d'}) { + print to_json($cache, { ascii => 1, pretty => 1}),"\n"; +} elsif ($opts{'i'}) { + add_interface($cache, $opts{'i'}, $opts{'I'}, $opts{'O'}, $opts{'J'}, $opts{'Q'}, \@hosts); +} else { + # just process per norm + do { + if ($opts{'L'}) { + open($lockfileh, ">>$opts{L}"); + my $have_lock = flock($lockfileh, LOCK_EX | LOCK_NB); + if (! $have_lock) { + print STDERR "failed to get lock on $opts{L}\n"; + print "failed to get lock on $opts{L}\n"; + exit($NAGIOS_NORMAL); + } + } + $cache = process_hosts($cache, \@hosts); + if (defined($opts{'l'})) { + Output(""); + save_cache($cache); + sleep($opts{'l'}); + } + } while ($opts{'l'}); +} + +save_cache($cache); +if ($lockfileh) { + unlink($lockfileh); + flock($lockfileh, LOCK_UN); # it's ok if it fails +} +nagios_exit() if ($opts{'N'}); + +sub read_cache { + # read in the json-based cache file + my $cache = {}; + my ($buf, $content); + + if (-f $opts{'c'}) { + Verbose("Reading cache file from '$opts{c}'"); + + open(my $cacheh, "<", $opts{'c'}); + while (read($cacheh, $buf, 4096 * 16) > 0) { + $content .= $buf; + } + close($cacheh); + + $cache = from_json($content); # cheap hack + } + return $cache; +} + +sub process_hosts($$) { + my ($cache, $hosts) = @_; + + # process hosts + foreach my $host (sort @$hosts) { + Verbose("Procesing host '$host'"); + + my $sess = get_snmp_session($host); + + # we always want the uptime + my @vars; + push @vars, ['sysUpTime',0]; + + foreach my $interface (sort keys(%{$cache->{'hosts'}{$host}{'interfaces'}})) { + push @vars, ['ifHCInOctets', $cache->{'hosts'}{$host}{'interfaces'}{$interface}{'index'}]; + push @vars, ['ifHCOutOctets', $cache->{'hosts'}{$host}{'interfaces'}{$interface}{'index'}]; + } + + my $list = new SNMP::VarList(@vars); + my $res = $sess->get($list); + + my $sysUpTime = shift @$list; + my $sysUpTime = $sysUpTime->[2]; + + my $sysUpTimeDiff = $sysUpTime - $cache->{'hosts'}{$host}{'sysUpTime'}; + + foreach my $interface (sort keys(%{$cache->{'hosts'}{$host}{'interfaces'}})) { + my $ifHCInOctets = shift @$list; + my $ifHCOutOctets = shift @$list; + + my $ifData = $cache->{'hosts'}{$host}{'interfaces'}{$interface}; + + if ($opts{'r'} || + !exists($ifData->{'data'}{'ifHCInOctets'}) || + !exists($cache->{'hosts'}{$host}{'sysUpTime'}) || + $sysUpTimeDiff < 0) { + # reset all past data or... + # no data is collected yet -- just store the sysUpTime + # XXX: should collect engine boots too + $ifData->{'data'}{'ifHCInOctets'} = $ifHCInOctets->[2]; + $ifData->{'data'}{'ifHCOutOctets'} = $ifHCOutOctets->[2]; + Verbose("interface $interface on $host needs to start with new data"); + } else { + # the great analysis + + my $diffIn = $ifHCInOctets->[2] - $ifData->{'data'}{'ifHCInOctets'}; + my $diffOut = $ifHCOutOctets->[2] - $ifData->{'data'}{'ifHCOutOctets'}; + + Verbose("$interface in: $ifHCInOctets->[2] - $ifData->{'data'}{'ifHCInOctets'}"); + Verbose("$interface diff: $diffIn/$sysUpTimeDiff = " . (100 * $diffIn/$sysUpTimeDiff) . " B/s"); + + Verbose("$interface out: $ifHCOutOctets->[2] - $ifData->{'data'}{'ifHCOutOctets'}"); + Verbose("$interface diff: $diffOut/$sysUpTimeDiff = " . (100 * $diffOut/$sysUpTimeDiff) . " B/s"); + + my $inRate = (100 * $diffIn/$sysUpTimeDiff); + my $outRate = (100 * $diffOut/$sysUpTimeDiff); + + my $inMarker = " "; + my $outMarker = " "; + + # check maximum bandwidth limits + if (defined($ifData->{'maxInBandwidth'})) { + foreach my $limit (@{$ifData->{'maxInBandwidth'}}) { + if ($inRate > 0 && $inRate > $limit->{'rate'}) { + $inMarker = "I"; + $ifData->{'maxInBandwidthCount'} ++; + + if ($ifData->{'maxInBandwidthCount'} == $limit->{'maxcount'} || $opts{'N'}) { + Verbose(" input too high!!! $inRate > $limit->{'rate'} ; emailing $limit->{'email'}"); + send_rate_message($limit->{'email'}, + $host, $interface, 'in', 'gt', + $ifData->{'maxInBandwidthCount'}, + $inRate, $limit->{'rate'}); + } + } else { + $ifData->{'maxInBandwidthCount'} = 0; + } + } + } + + if (defined($ifData->{'maxOutBandwidth'})) { + foreach my $limit (@{$ifData->{'maxOutBandwidth'}}) { + if ($outRate > 0 && $outRate > $limit->{'rate'}) { + $outMarker = "O"; + $ifData->{'maxOutBandwidthCount'} ++; + + if ($ifData->{'maxOutBandwidthCount'} == $limit->{'maxcount'} || $opts{'N'}) { + Verbose(" output too high!!! $outRate > $limit->{'rate'} ; emailing $limit->{'email'}"); + + send_rate_message($limit->{'email'}, + $host, $interface, 'out', 'gt', + $ifData->{'maxOutBandwidthCount'}, + $outRate, $limit->{'rate'}); + } + } else { + $ifData->{'maxOutBandwidthCount'} = 0; + } + } + } + + # check minimum bandwidth limits + if (defined($ifData->{'minInBandwidth'})) { + foreach my $limit (@{$ifData->{'minInBandwidth'}}) { + if ($inRate > 0 && $inRate < $limit->{'rate'}) { + $inMarker = "I"; + $ifData->{'minInBandwidthCount'} ++; + + if ($ifData->{'minInBandwidthCount'} == $limit->{'maxcount'} || $opts{'N'}) { + Verbose(" input too low!!! $inRate < $limit->{'rate'} ; emailing $limit->{'email'}"); + send_rate_message($limit->{'email'}, + $host, $interface, 'in', 'lt', + $ifData->{'minInBandwidthCount'}, + $inRate, $limit->{'rate'}); + } + } else { + $ifData->{'minInBandwidthCount'} = 0; + } + } + } + + if (defined($ifData->{'minOutBandwidth'})) { + foreach my $limit (@{$ifData->{'minOutBandwidth'}}) { + if ($outRate > 0 && $outRate < $limit->{'rate'}) { + $outMarker = "O"; + $ifData->{'minOutBandwidthCount'} ++; + + if ($ifData->{'minOutBandwidthCount'} == $limit->{'maxcount'} || $opts{'N'}) { + Verbose(" output too low!!! $outRate < $limit->{'rate'} ; emailing $limit->{'email'}"); + + send_rate_message($limit->{'email'}, + $host, $interface, 'out', 'lt', + $ifData->{'minOutBandwidthCount'}, + $outRate, $limit->{'rate'}); + } + } else { + $ifData->{'minOutBandwidthCount'} = 0; + } + } + } + + Output(sprintf("%-15s %-8s %16.0f in %16.0f out (B/s) %s%s", + $host, $interface, + $inRate, $outRate, + $inMarker, $outMarker)); + + # Update the cache data. Maybe. + if (! $opts{'n'}) { + $ifData->{'data'}{'ifHCInOctets'} = $ifHCInOctets->[2]; + $ifData->{'data'}{'ifHCOutOctets'} = $ifHCOutOctets->[2]; + } + } + } + + # store the sysUpTime + $cache->{'hosts'}{$host}{'sysUpTime'} = $sysUpTime unless ($opts{'n'}); + } + + return $cache; +} + +sub add_interface($$$$$) { + my ($cache, $interface, $maxInBandwidth, $maxOutBandwidth, $minInBandwidth, $minOutBandwidth, $hosts) = @_; + foreach my $host (@$hosts) { + Verbose("adding interface $interface to $host"); + + my $session = get_snmp_session($host); + my $tabledata = $session->gettable('ifTable'); + my $found = 0; + + foreach my $key (keys(%$tabledata)) { + # each key is an interface number; find the matching interface + if ($tabledata->{$key}{'ifDescr'} eq $interface) { + # found it! + + Verbose("found $interface on $host at $key; adding it"); + + $cache->{'hosts'}{$host}{'interfaces'}{$interface}{'index'} = $key; + if ($maxInBandwidth) { + my ($ratespec, $email) = split(/=/, $maxInBandwidth); + my ($rate, $count) = split(/:/, $ratespec); + if (!defined($count)) { + $rate = $ratespec; + $count = 1; + } + push @{$cache->{'hosts'}{$host}{'interfaces'}{$interface}{'maxInBandwidth'}}, + { rate => $rate, + email => $email, + maxcount => $count }; + } + if ($maxOutBandwidth) { + my ($ratespec, $email) = split(/=/, $maxOutBandwidth); + my ($rate, $count) = split(/:/, $ratespec); + if (!defined($count)) { + $rate = $ratespec; + $count = 1; + } + push @{$cache->{'hosts'}{$host}{'interfaces'}{$interface}{'maxOutBandwidth'}}, + { rate => $rate, + email => $email, + maxcount => $count}; + } + if ($minInBandwidth) { + my ($ratespec, $email) = split(/=/, $minInBandwidth); + my ($rate, $count) = split(/:/, $ratespec); + if (!defined($count)) { + $rate = $ratespec; + $count = 1; + } + push @{$cache->{'hosts'}{$host}{'interfaces'}{$interface}{'minInBandwidth'}}, + { rate => $rate, + email => $email, + maxcount => $count }; + } + if ($minOutBandwidth) { + my ($ratespec, $email) = split(/=/, $minOutBandwidth); + my ($rate, $count) = split(/:/, $ratespec); + if (!defined($count)) { + $rate = $ratespec; + $count = 1; + } + push @{$cache->{'hosts'}{$host}{'interfaces'}{$interface}{'minOutBandwidth'}}, + { rate => $rate, + email => $email, + maxcount => $count}; + } + $found = 1; + Output("Configured $interface for $host"); + } + } + + if (!$found) { + Log(" failed to find interface '$interface' on '$host'"); + } + } +} + +my %session_cache; +sub get_snmp_session($) { + my ($host) = @_; + if (exists($session_cache{$host})) { + return $session_cache{$host}; + } + + my @args; + + if (-f "/etc/snmp/perl/$host.conf") { + open(CC, "/etc/snmp/perl/$host.conf"); + while () { + next if (/^\s*#/); + chomp; + push @args, split(); + } + } + + # hack to work around perl not handling per-host files correctly + $session_cache{$host} = new SNMP::Session(DestHost => $host, @args); + return $session_cache{$host}; +} + +sub save_cache($) { + my ($cache) = @_; + + # save data to the json cache (maybe) + if (!$opts{'n'}) { + my $dir = $opts{'c'}; + $dir =~ s/(.*)\/.*/$1/; + if (! -d $dir) { + mkdir($dir); + if (! -d $dir) { + Log("failed to create directory $dir"); + } else { + Verbose("note: created directory $dir"); + } + } + # XXX: mkdir + + Verbose("Writing cache file to '$opts{c}'"); + + my $jsondata = to_json($cache); + open(my $outh, ">", $opts{'c'} . $$); + print $outh $jsondata,"\n"; + $outh->close(); + rename($opts{'c'} . $$, $opts{'c'}); + } +} + +sub send_rate_message($$$$$$) { + my ($to, $host, $interface, $direction, $highlow, $count, $measured, $max) = @_; + + if ($opts{'N'} && ($to eq 'nagioswarn' || $to eq 'nagioscritical')) { + # nagios mode ; collect simple output for later + nagios_collect($to, $host, $interface, $direction, $highlow, $count, $measured, $max); + } elsif($to ne 'nagioswarn' && $to ne 'nagioscritical') { + # send email + my $word = ($highlow eq '>' ? 'exceeded' : 'too low'); + send_message($to, + "rate $word: $host/$interface=$direction ($count times)", + "Rate limit $word for:\n\n" . + "\thost:\t\t$host\n" . + "\tinterface:\t$interface ($direction)\n" . + "\trate:\t\t$measured\n" . + "\tmax allowed:\t$max\n" . + "\tcount:\t\t$count times in a row\n"); + } +} + +sub send_message($$$) { + my ($to, $subject, $text) = @_; + + my $sender = new Mail::Sender { smtp => $opts{'S'} , + port => $opts{'P'}, + from => $opts{'F'}, + }; + + my $status = + $sender->MailMsg({ + to => $to, + subject => $subject, + msg => $text + }); + if ($status < 0) { + Log("Failed to send mail with error code $status: $Mail::Sender::Error"); + } +} + +sub nagios_collect($$$$$$) { + my ($to, $host, $interface, $direction, $highlow, $count, $measured, $max) = @_; + + if ($to eq 'nagioscritical') { + $nagiosexit = $NAGIOS_CRITICAL; + } elsif ($to eq 'nagioswarn' && $nagiosexit < $NAGIOS_CRITICAL) { + $nagiosexit = $NAGIOS_WARNING; + } + + $nagiosstr .= sprintf(", %s $direction %16.0f B/s $highlow %s", $interface, $measured, $max); +} + +sub nagios_exit() { + if ($nagiosstr eq '') { + $nagiosstr = "All interfaces ok: " . join(", ", keys(%{$cache->{'hosts'}{$hosts[0]}{'interfaces'}})); + } else { + $nagiosstr =~ s/^, //; + } + + print $nagiosstr, "\n"; + exit $nagiosexit; +} + +sub Verbose { + if ($opts{'v'}) { + print STDERR @_, "\n"; + } +} + +sub Log { + print STDERR @_,"\n"; +} + +sub Output { + if (! $opts{'q'} && !$opts{'N'}) { + print @_, "\n"; + } + if ($opts{'N'} && $opts{'s'}) { + $nagiosstr .= ", " . join(" ", @_); + } +} + +#### portability for not requiring Getopt::GUI::Long directly +sub LocalGetOptions { + if (eval {require Getopt::GUI::Long;}) { + import Getopt::GUI::Long; + # optional configure call + Getopt::GUI::Long::Configure(qw(display_help no_ignore_case allow_zero)); + return GetOptions(@_); + } + require Getopt::Long; + import Getopt::Long; + # optional configure call + Getopt::Long::Configure(qw(auto_help no_ignore_case)); + GetOptions(LocalOptionsMap(@_)); +} + +sub LocalOptionsMap { + my ($st, $cb, @opts) = ((ref($_[0]) eq 'HASH') + ? (1, 1, $_[0]) : (0, 2)); + for (my $i = $st; $i <= $#_; $i += $cb) { + if ($_[$i]) { + next if (ref($_[$i]) eq 'ARRAY' && $_[$i][0] =~ /^GUI:/); + push @opts, ((ref($_[$i]) eq 'ARRAY') ? $_[$i][0] : $_[$i]); + push @opts, $_[$i+1] if ($cb == 2); + } + } + return @opts; +} + +# Local Variables: +# tab-width: 4 +# End: diff --git a/local/gittools/shell-functions b/local/gittools/shell-functions index aef3a98..eafcbfd 100644 --- a/local/gittools/shell-functions +++ b/local/gittools/shell-functions @@ -4,7 +4,7 @@ nsbuildroot=${nsbuildroot:=$HOME/ns-build-root} nsecho=${nsecho:=} -nsbranches=${nsbranches:="V5-4-patches V5-5-patches V5-6-patches V5-7-patches master"} +nsbranches=${nsbranches:="V5-9-patches master"} # set nsverbose to ':' if you don't want verbose output of what's going on nsverbose=${nsverbose:="echo ::: Net-SNMP: "} @@ -85,6 +85,13 @@ nsmakeall () { for branch in $nsbranches ; do git checkout $branch + if [ $? != 0 ] ; then + echo "" + echo "---------------------------------------------" + echo "Checkout of $branch failed!!!" + echo + return + fi nsmake "$@" done } @@ -131,6 +138,11 @@ nspatchtry() { nspatchfile=`echo $nspatchargs | sed 's/.* \([^ ]+\)$/\1/'` # attempt to count the slashes before any agent/snmplib/apps/etc patchcount=$((`grep diff $nspatchfile | head -1 | awk '{print $NF}' | sed 's/\(agent\|snmplib\|apps\|local\|perl\|python\).*//;s#[^/]##g' | wc -c` - 1)) + # if we failed to guess, bail out. + if [ "X$patchcount" = "X-1" ]; then + echo "Please specify -p argument; I failed to guess the right one." + return + fi nspatchargs="-p $patchcount $nspatchargs" fi @@ -145,6 +157,13 @@ nspatchtry() { for branch in $nsbranches ; do $nsverbose checking out and applying patch in $branch $nsecho git checkout $branch + if [ $? != 0 ] ; then + echo "" + echo "---------------------------------------------" + echo "Checkout of $branch failed!!!" + echo + return + fi $nsverbose Appling patch $nsecho patch -N --batch $nspatchargs @@ -176,6 +195,13 @@ _nspatchapplybase() { $nsverbose Checking out $patchbranch $nsecho git checkout $patchbranch + if [ $? != 0 ] ; then + echo "" + echo "---------------------------------------------" + echo "Checkout of $branch failed!!!" + echo + return + fi $nsverbose applying the patch "$nspatchargs" $nsecho patch $nspatchargs @@ -299,6 +325,13 @@ nsrollup() { if [ "$nslastbranch" != "" ] ; then $nsverbose checking out $branch $nsecho git checkout $branch + if [ $? != 0 ] ; then + echo "" + echo "---------------------------------------------" + echo "Checkout of $branch failed!!!" + echo + return + fi if [ -f dist/release ] ; then if [ "`egrep ^$branch dist/release`" = "$branch rc" ] ; then @@ -398,6 +431,13 @@ nspull() { git fetch --all for branch in $nsbranches ; do git checkout $branch + if [ $? != 0 ] ; then + echo "" + echo "---------------------------------------------" + echo "Checkout of $branch failed!!!" + echo + return + fi MERGE_AUTOEDIT=no git $mergeop origin/$branch if [ $? != 0 ] ; then echo "git $mergeop failed; please fix first" @@ -405,6 +445,13 @@ nspull() { fi done git checkout $nscurrentbranch + if [ $? != 0 ] ; then + echo "" + echo "---------------------------------------------" + echo "Checkout of $branch failed!!!" + echo + return + fi } nspush() { @@ -446,10 +493,10 @@ nsautoconf() { if [ "$VER" != "$COR" ] ; then echo "failed to find the correct version of autoconf" echo "please install autoconf version $COR in /usr/local/autoconf-$COR" - echo " (configure autoconf-$COR using -prefix=/usr/local/autoconf-$COR" + echo " (configure autoconf-$COR using --prefix=/usr/local/autoconf-$COR" return fi echo "RUNNING AUTOCONF $COR" - PATH=/usr/local/autoconf-${autover}/bin:$PATH $tool + PATH=/usr/local/autoconf-${COR}/bin:$PATH $tool } diff --git a/local/mib2c b/local/mib2c index 2016f06..73e6bed 100644 --- a/local/mib2c +++ b/local/mib2c @@ -148,7 +148,7 @@ while($#ARGV >= 0) { "UNSIGNED32", "u_long", "UINTEGER", "u_long", "OBJECTID", "oid", - "COUNTER64", "U64", + "COUNTER64", "struct counter64", "COUNTER", "u_long", "IPADDR", "in_addr_t", "BITS", "char", @@ -326,6 +326,9 @@ sub process_vars { # mib substitutions ($var.type -> $mibnode->{'type'}) if ( $it =~ /\$(\w+)\.(\w+)/ ) { + if (!defined($vars{$1})) { + m2c_die "Undefined variable \$$1"; + } if ($SNMP::MIB{$vars{$1}} && defined($tables{$SNMP::MIB{$vars{$1}}{'label'}})) { $it =~ s/\$(\w+)\.(settable)/(table_is_writable($SNMP::MIB{$vars{$1}}{label}))/eg; $it =~ s/\$(\w+)\.(creatable)/(table_has_create($SNMP::MIB{$vars{$1}}{label}))/eg; diff --git a/local/mib2c-conf.d/details-enums.m2i b/local/mib2c-conf.d/details-enums.m2i index 3b0f152..598e188 100644 --- a/local/mib2c-conf.d/details-enums.m2i +++ b/local/mib2c-conf.d/details-enums.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for enums. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by details-enums.m2i */ @end@ ######################################################################## @ifconf $node.syntax.m2i@ @@ -76,5 +75,5 @@ $m2c_const_dcl INTERNAL_$context.uc_$m2c_iname $m2c_const_del (0x01 << $v) $m2c_ @end@ # ! syntax include ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by details-enums.m2i */ @end@ diff --git a/local/mib2c-conf.d/details-node.m2i b/local/mib2c-conf.d/details-node.m2i index 0f3e2a2..2659663 100644 --- a/local/mib2c-conf.d/details-node.m2i +++ b/local/mib2c-conf.d/details-node.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## Generic include for columns. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by details-node.m2i */ @end@ ######################################################################## /*--------------------------------------------------------------------- @@ -98,5 +97,5 @@ $node.description */ ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by details-node.m2i */ @end@ diff --git a/local/mib2c-conf.d/details-table.m2i b/local/mib2c-conf.d/details-table.m2i index 06df7ef..06bd801 100644 --- a/local/mib2c-conf.d/details-table.m2i +++ b/local/mib2c-conf.d/details-table.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for tables. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by details-table.m2i */ @end@ ######################################################################## /********************************************************************** @@ -21,5 +20,5 @@ */ ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by details-table.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-ctx-copy.m2i b/local/mib2c-conf.d/generic-ctx-copy.m2i index c959637..3021135 100644 --- a/local/mib2c-conf.d/generic-ctx-copy.m2i +++ b/local/mib2c-conf.d/generic-ctx-copy.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-ctx-copy.m2i */ @end@ ######################################################################## ## @@ -29,5 +28,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-ctx-copy.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-ctx-get.m2i b/local/mib2c-conf.d/generic-ctx-get.m2i index ef795c3..eed87f0 100644 --- a/local/mib2c-conf.d/generic-ctx-get.m2i +++ b/local/mib2c-conf.d/generic-ctx-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-ctx-get.m2i */ @end@ ######################################################################## ##/* @@ -92,7 +91,7 @@ $m2c_ctx_lhs = $m2c_ctx_rhs$m2c_ctx_lm; memcpy( $m2c_ctx_lh, $m2c_ctx_rh, $m2c_ctx_rhs$m2c_ctx_cm ); @else@ -@ if $node.decl =~ /U64/i@ # ASN_COUNTER64 +@ if $node.decl =~ /struct counter64/i@ # ASN_COUNTER64 ${m2c_ctx_lh}.high = ${m2c_ctx_rh}.high; ${m2c_ctx_lh}.low = ${m2c_ctx_rh}.low; @ else@ @@ -102,5 +101,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-ctx-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-ctx-set.m2i b/local/mib2c-conf.d/generic-ctx-set.m2i index 86c99a0..e0cb85b 100644 --- a/local/mib2c-conf.d/generic-ctx-set.m2i +++ b/local/mib2c-conf.d/generic-ctx-set.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-ctx-set.m2i */ @end@ ######################################################################## ## @@ -25,5 +24,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-ctx-set.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-data-allocate.m2i b/local/mib2c-conf.d/generic-data-allocate.m2i index 556defe..cdc4846 100644 --- a/local/mib2c-conf.d/generic-data-allocate.m2i +++ b/local/mib2c-conf.d/generic-data-allocate.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-data-allocate.m2i */ @end@ ######################################################################## ## @@ -58,5 +57,5 @@ ${context}_release_data(${context}_data *data) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-data-allocate.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-data-context.m2i b/local/mib2c-conf.d/generic-data-context.m2i index 4152e91..e9599a6 100644 --- a/local/mib2c-conf.d/generic-data-context.m2i +++ b/local/mib2c-conf.d/generic-data-context.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-data-context.m2i */ @end@ ######################################################################## ## @@ -47,5 +46,5 @@ typedef $m2c_data_context ${context}_data; ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-data-context.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-get-U64.m2i b/local/mib2c-conf.d/generic-get-U64.m2i index 791c79e..7420422 100644 --- a/local/mib2c-conf.d/generic-get-U64.m2i +++ b/local/mib2c-conf.d/generic-get-U64.m2i @@ -1,14 +1,13 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-get-U64.m2i */ @end@ ######################################################################## ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-get-U64.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-get-char.m2i b/local/mib2c-conf.d/generic-get-char.m2i index e63e686..fd6726b 100644 --- a/local/mib2c-conf.d/generic-get-char.m2i +++ b/local/mib2c-conf.d/generic-get-char.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-get-char.m2i */ @end@ ######################################################################## ## @@ -34,16 +33,17 @@ $example_start if ($m2c_ctx_rh & INTERNAL_$context.uc_$m2c_iname) { $m2c_node_lh |= $m2c_ename; } + $m2c_node_lh = htonl( $m2c_node_lh ); @ end@ # for each $example_end @ else@ * assuming generated code keeps $node BITS in SNMP order. */ - $m2c_node_lh = @m2c_ctx_rh; + $m2c_node_lh = htonl( @m2c_ctx_rh@ ); @ end@ @end@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-get-char.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-get-decl-bot.m2i b/local/mib2c-conf.d/generic-get-decl-bot.m2i index 32b4e68..e327e1c 100644 --- a/local/mib2c-conf.d/generic-get-decl-bot.m2i +++ b/local/mib2c-conf.d/generic-get-decl-bot.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-get-decl-bot.m2i */ @end@ ######################################################################## ## @@ -18,5 +17,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-get-decl-bot.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-get-decl.m2i b/local/mib2c-conf.d/generic-get-decl.m2i index 0568e1c..ede0c2d 100644 --- a/local/mib2c-conf.d/generic-get-decl.m2i +++ b/local/mib2c-conf.d/generic-get-decl.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-get-decl.m2i */ @end@ ######################################################################## ## @@ -39,5 +38,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-get-decl.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-get-long.m2i b/local/mib2c-conf.d/generic-get-long.m2i index 791c79e..5360286 100644 --- a/local/mib2c-conf.d/generic-get-long.m2i +++ b/local/mib2c-conf.d/generic-get-long.m2i @@ -1,14 +1,13 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-get-long.m2i */ @end@ ######################################################################## ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-get-long.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-get-oid.m2i b/local/mib2c-conf.d/generic-get-oid.m2i index 56dd485..3454aba 100644 --- a/local/mib2c-conf.d/generic-get-oid.m2i +++ b/local/mib2c-conf.d/generic-get-oid.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-get-oid.m2i */ @end@ ######################################################################## ## @@ -14,5 +13,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-get-oid.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-header-bottom.m2i b/local/mib2c-conf.d/generic-header-bottom.m2i index e00e174..be69f56 100644 --- a/local/mib2c-conf.d/generic-header-bottom.m2i +++ b/local/mib2c-conf.d/generic-header-bottom.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-header-bottom.m2i */ @end@ ######################################################################## ## @@ -17,5 +16,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-header-bottom.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-header-top.m2i b/local/mib2c-conf.d/generic-header-top.m2i index a4d3bd8..062883b 100644 --- a/local/mib2c-conf.d/generic-header-top.m2i +++ b/local/mib2c-conf.d/generic-header-top.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-header-top.m2i */ @end@ ######################################################################## ## @@ -18,5 +17,5 @@ extern "C" { ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-header-top.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-source-includes.m2i b/local/mib2c-conf.d/generic-source-includes.m2i index 9341cf9..0782769 100644 --- a/local/mib2c-conf.d/generic-source-includes.m2i +++ b/local/mib2c-conf.d/generic-source-includes.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-source-includes.m2i */ @end@ ######################################################################## ## @@ -20,5 +19,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-source-includes.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-table-constants.m2c b/local/mib2c-conf.d/generic-table-constants.m2c index 36e23d3..d75373a 100644 --- a/local/mib2c-conf.d/generic-table-constants.m2c +++ b/local/mib2c-conf.d/generic-table-constants.m2c @@ -1,7 +1,6 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_create_fewer_files != 1@ @ foreach $table table@ @@ -11,19 +10,16 @@ @ end@ # table ######################################################################## @else@ -@ eval $hack = "Id"@ @ eval $m2c_save = "$name"@ @ eval $name = "${m2c_save}_constants"@ @ open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using generic-table-constants.m2c */ ######################################################################## @ if $m2c_mark_boundary == 1@ -/** START header generated by $RCSfile$ $Revision$ */ +/** START header generated by generic-table-constants.m2c */ @ end@ ######################################################################## @ include generic-header-top.m2i@ @@ -39,6 +35,6 @@ @ eval $name = "$m2c_save"@ ######################################################################## @ if $m2c_mark_boundary == 1@ -/** END header generated by $RCSfile$ $Revision$ */ +/** END header generated by generic-table-constants.m2c */ @ end@ @end@ // m2c_create_fewer_files diff --git a/local/mib2c-conf.d/generic-table-enums.m2c b/local/mib2c-conf.d/generic-table-enums.m2c index 92b2132..2df9fd8 100644 --- a/local/mib2c-conf.d/generic-table-enums.m2c +++ b/local/mib2c-conf.d/generic-table-enums.m2c @@ -1,25 +1,21 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_create_fewer_files != 1@ -@eval $hack = "Id"@ @eval $m2c_save = "$name"@ @eval $name = "${name}_enums"@ @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using generic-table-enums.m2c */ @include generic-header-top.m2i@ @eval $name = "$m2c_save"@ @end@ // m2c_create_fewer_files ######################################################################## @if $m2c_mark_boundary == 1@ -/** START header generated by $RCSfile$ $Revision$ */ +/** START header generated by generic-table-enums.m2c */ @end@ ## /* @@ -59,5 +55,5 @@ @end@ ######################################################################## @if $m2c_mark_boundary == 1@ -/** END header generated by $RCSfile$ $Revision$ */ +/** END header generated by generic-table-enums.m2c */ @end@ diff --git a/local/mib2c-conf.d/generic-table-indexes-from-oid.m2i b/local/mib2c-conf.d/generic-table-indexes-from-oid.m2i index 758bda2..ae24760 100644 --- a/local/mib2c-conf.d/generic-table-indexes-from-oid.m2i +++ b/local/mib2c-conf.d/generic-table-indexes-from-oid.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-table-indexes-from-oid.m2i */ @end@ ######################################################################## ## @@ -66,5 +65,5 @@ ${context}_index_from_oid(netsnmp_index *oid_idx, ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-table-indexes-from-oid.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-table-indexes-set.m2i b/local/mib2c-conf.d/generic-table-indexes-set.m2i index 34f9c7d..cac415c 100644 --- a/local/mib2c-conf.d/generic-table-indexes-set.m2i +++ b/local/mib2c-conf.d/generic-table-indexes-set.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-table-indexes-set.m2i */ @end@ ######################################################################## ## @@ -119,5 +118,5 @@ ${context}_indexes_set(${context}_rowreq_ctx *rowreq_ctx$gtis_tmp) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-table-indexes-set.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-table-indexes-to-oid.m2i b/local/mib2c-conf.d/generic-table-indexes-to-oid.m2i index c17de4c..9918b00 100644 --- a/local/mib2c-conf.d/generic-table-indexes-to-oid.m2i +++ b/local/mib2c-conf.d/generic-table-indexes-to-oid.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-table-indexes-to-oid.m2i */ @end@ ######################################################################## ## @@ -48,5 +47,5 @@ ${context}_index_to_oid(netsnmp_index *oid_idx, ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-table-indexes-to-oid.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-table-indexes-varbind-setup.m2i b/local/mib2c-conf.d/generic-table-indexes-varbind-setup.m2i index 8c0d48d..414f296 100644 --- a/local/mib2c-conf.d/generic-table-indexes-varbind-setup.m2i +++ b/local/mib2c-conf.d/generic-table-indexes-varbind-setup.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-table-indexes-varbind-setup.m2i */ @end@ ######################################################################## ## @@ -47,5 +46,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-table-indexes-varbind-setup.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-table-indexes.m2i b/local/mib2c-conf.d/generic-table-indexes.m2i index c226611..b41a0ad 100644 --- a/local/mib2c-conf.d/generic-table-indexes.m2i +++ b/local/mib2c-conf.d/generic-table-indexes.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-table-indexes.m2i */ @end@ ######################################################################## ## @@ -63,5 +62,5 @@ typedef struct ${context}_mib_index_s { ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-table-indexes.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-table-oids.m2c b/local/mib2c-conf.d/generic-table-oids.m2c index 6f8ab2a..20e5ce8 100644 --- a/local/mib2c-conf.d/generic-table-oids.m2c +++ b/local/mib2c-conf.d/generic-table-oids.m2c @@ -1,25 +1,21 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_create_fewer_files != 1@ -@eval $hack = "Id"@ @eval $m2c_save = "$name"@ @eval $name = "${m2c_save}_oids"@ @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using generic-table-oids.m2c */ @include generic-header-top.m2i@ @eval $name = "$m2c_save"@ @end@ // m2c_create_fewer_files ######################################################################## @if $m2c_mark_boundary == 1@ -/** START header generated by $RCSfile$ $Revision$ */ +/** START header generated by generic-table-oids.m2c */ @end@ ## @@ -109,5 +105,5 @@ @end@ ######################################################################## @if $m2c_mark_boundary == 1@ -/** END header generated by $RCSfile$ $Revision$ */ +/** END header generated by generic-table-oids.m2c */ @end@ diff --git a/local/mib2c-conf.d/generic-value-map-func.m2i b/local/mib2c-conf.d/generic-value-map-func.m2i index b0df63b..88fd565 100644 --- a/local/mib2c-conf.d/generic-value-map-func.m2i +++ b/local/mib2c-conf.d/generic-value-map-func.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-value-map-func.m2i */ @end@ ######################################################################## ## } @@ -100,5 +99,5 @@ ${node}_map($m2c_node_map_param) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-value-map-func.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-value-map-reverse.m2i b/local/mib2c-conf.d/generic-value-map-reverse.m2i index 4b6eb38..304358d 100644 --- a/local/mib2c-conf.d/generic-value-map-reverse.m2i +++ b/local/mib2c-conf.d/generic-value-map-reverse.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-value-map-reverse.m2i */ @end@ ######################################################################## ## @@ -45,5 +44,5 @@ $example_end ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-value-map-reverse.m2i */ @end@ diff --git a/local/mib2c-conf.d/generic-value-map.m2i b/local/mib2c-conf.d/generic-value-map.m2i index 0f7bd2e..809e8e9 100644 --- a/local/mib2c-conf.d/generic-value-map.m2i +++ b/local/mib2c-conf.d/generic-value-map.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by generic-value-map.m2i */ @end@ ######################################################################## ## } @@ -42,5 +41,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by generic-value-map.m2i */ @end@ diff --git a/local/mib2c-conf.d/m2c_setup_enum.m2i b/local/mib2c-conf.d/m2c_setup_enum.m2i index b5bb7ae..76597f4 100644 --- a/local/mib2c-conf.d/m2c_setup_enum.m2i +++ b/local/mib2c-conf.d/m2c_setup_enum.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by m2c_setup_enum.m2i */ @end@ ######################################################################## ## @@ -20,5 +19,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by m2c_setup_enum.m2i */ @end@ diff --git a/local/mib2c-conf.d/m2c_setup_node.m2i b/local/mib2c-conf.d/m2c_setup_node.m2i index 67fb89d..2fbf0ad 100644 --- a/local/mib2c-conf.d/m2c_setup_node.m2i +++ b/local/mib2c-conf.d/m2c_setup_node.m2i @@ -1,6 +1,5 @@ ############################################################# -*- c -*- ## Defaults -## $Id$ ######################################################################## @if "$m2c_node_name" ne "$node"@ ## if $node.accessible != 1, might be inaccessible index node @@ -61,7 +60,7 @@ @ eval $m2c_node_skip_get = 1@ @ end@ @ else@ -@ eval $m2c_decl = $node.decl@ +@ eval $m2c_decl = "$node.decl"@ @ end@ // enums ######################################################################## ## find max size diff --git a/local/mib2c-conf.d/m2c_setup_table.m2i b/local/mib2c-conf.d/m2c_setup_table.m2i index 4481e39..4acd016 100644 --- a/local/mib2c-conf.d/m2c_setup_table.m2i +++ b/local/mib2c-conf.d/m2c_setup_table.m2i @@ -1,10 +1,9 @@ ######################################################################## ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by m2c_setup_table.m2i */ @end@ ######################################################################## ## @@ -44,5 +43,5 @@ ######################################################################## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by m2c_setup_table.m2i */ @end@ diff --git a/local/mib2c-conf.d/m2c_table_save_defaults.m2i b/local/mib2c-conf.d/m2c_table_save_defaults.m2i index e36c32e..7c4cfeb 100644 --- a/local/mib2c-conf.d/m2c_table_save_defaults.m2i +++ b/local/mib2c-conf.d/m2c_table_save_defaults.m2i @@ -1,7 +1,6 @@ ####################################################################### ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## ## ## diff --git a/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i b/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i index 5f65b63..e7ce708 100644 --- a/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i +++ b/local/mib2c-conf.d/mfd-access-container-cached-defines.m2i @@ -1,10 +1,9 @@ ####################################################################### ###generic include for XXX. Do not use directly. ### -### $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-access-container-cached-defines.m2i */ @end@ ##//#################################################################### ##//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -172,7 +171,7 @@ ${context}_container_shutdown(netsnmp_container *container_ptr) * While loading the data, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you can limit yourself to setting the indexes and saving any * information you will need later. Then use the saved information in @@ -190,6 +189,14 @@ ${context}_container_load(netsnmp_container *container) ${context}_rowreq_ctx *rowreq_ctx; size_t count = 0; + /* + * storage for each column + */ +@ foreach $node index@ +@ include m2c_setup_node.m2i@ +@ include node-storage.m2i@ +@ end@ // foreach + /* * temporary storage for index values */ @@ -351,7 +358,7 @@ $example_end @end@ # example DEBUGMSGT(("verbose:${context}:${context}_container_load", - "inserted %d records\n", count)); + "inserted %" NETSNMP_PRIz "u records\n", count)); return MFD_SUCCESS; } /* ${context}_container_load */ @@ -514,8 +521,16 @@ _${context}_container_init(${context}_interface_ctx *if_ctx) */ ${context}_container_init(&if_ctx->container); @ end@ data cache - if(NULL == if_ctx->container) + if(NULL == if_ctx->container) { if_ctx->container = netsnmp_container_find("${context}:table_container"); + if(NULL != if_ctx->container) { + /* + * When reporting container management errors, we log the container's + * name, so set it here. + */ + if_ctx->container->container_name = strdup("${context}"); + } + } if(NULL == if_ctx->container) { snmp_log(LOG_ERR,"error creating container in " "${context}_container_init\n"); @@ -572,5 +587,5 @@ _${context}_container_shutdown(${context}_interface_ctx *if_ctx) ######################################################################## ##//#################################################################### @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-access-container-cached-defines.m2i */ @end@ diff --git a/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i b/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i index f4f3514..e474827 100644 --- a/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i +++ b/local/mib2c-conf.d/mfd-access-unsorted-external-defines.m2i @@ -1,7 +1,6 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## ## @eval $mfd_aue_wrap_param = "wrap_ctx"@ @@ -14,7 +13,7 @@ @eval $mfd_aue_param_cmt = "$mfd_aue_param Pointer to a $mfd_aue_param_type" ## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-access-unsorted-external-defines.m2i */ @end@ ##//#################################################################### ##//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -288,7 +287,7 @@ _${context}_container_init(${context}_interface_ctx *if_ctx) * Note that during the loop, the only important thing is the indexes. * If access to your data is cheap/fast (e.g. you have a pointer to a * structure in memory), it would make sense to update the data here. - * If, however, the accessing the data invovles more work (e.g. parsing + * If, however, the accessing the data involves more work (e.g. parsing * some other existing data, or peforming calculations to derive the data), * then you should limit yourself to setting the indexes. Extracting the * can be put off until the desired row is found. See the notes on @@ -1007,7 +1006,7 @@ $example_end Note that during the loop, the only important thing is the indexes. If access to your data is cheap/fast (e.g. you have a pointer to a structure in memory), it would make sense to update the data here. - If, however, the accessing the data invovles more work (e.g. parsing + If, however, the accessing the data involves more work (e.g. parsing some other existing data, or peforming calculations to derive the data), then you should limit yourslef to setting the indexes. Extracting the can be put off until the desired row is found See the notes on @@ -1194,5 +1193,5 @@ $example_end @end@ // m2c_processing_type eq 'r ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-access-unsorted-external-defines.m2i */ @end@ diff --git a/local/mib2c-conf.d/mfd-data-access.m2c b/local/mib2c-conf.d/mfd-data-access.m2c index bcff9bb..dc97b89 100644 --- a/local/mib2c-conf.d/mfd-data-access.m2c +++ b/local/mib2c-conf.d/mfd-data-access.m2c @@ -1,7 +1,6 @@ ##//######################################################### -*- c -*- ##//generic include for XXX. Do not use directly. ## -##//$Id$ ##//#################################################################### ##//#################################################################### ## @@ -10,15 +9,12 @@ @eval $mfd_data_access_processing_type = "$m2c_processing_type"@ @eval $m2c_processing_type = 'h'@ @open ${name}_data_access.h@ -@eval $hack = "Id"@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-data-access.m2c */ @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-data-access.m2c */ @end@ @eval $m2c_save = "$name"@ @eval $name = "${name}_DATA_ACCESS"@ @@ -71,10 +67,8 @@ int ${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ); /* internal */ @eval $m2c_processing_type = 'c'@ @open ${name}_data_access.c@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-data-access.m2c */ @include generic-source-includes.m2i@ @@ -326,6 +320,6 @@ ${context}_validate_index( ${context}_registration * ${context}_reg, /** @} */ ##//#################################################################### @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-data-access.m2c */ @end@ @eval $m2c_processing_type = "$mfd_data_access_processing_type"@ diff --git a/local/mib2c-conf.d/mfd-data-get.m2c b/local/mib2c-conf.d/mfd-data-get.m2c index cf1c848..448b9c6 100644 --- a/local/mib2c-conf.d/mfd-data-get.m2c +++ b/local/mib2c-conf.d/mfd-data-get.m2c @@ -1,7 +1,6 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## ######################################################################## ## lower conf files get confused with multiple processing types, so @@ -11,12 +10,9 @@ @eval $m2c_processing_type = 'h'@ @if $m2c_create_fewer_files != 1@ @ open ${name}_data_get.h@ -@ eval $hack = "Id"@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-data-get.m2c * * @file ${name}_data_get.h * @@ -32,7 +28,7 @@ @ eval $name = "$m2c_tmp"@ @end@ // m2c_create_fewer_files @if $m2c_mark_boundary == 1@ -/** START header generated by $RCSfile$ $Revision$ */ +/** START header generated by mfd-data-get.m2c */ @end@ ######################################################################## ## @@ -69,7 +65,7 @@ @end@ // table @if $m2c_mark_boundary == 1@ -/** END header generated by $RCSfile$ $Revision$ */ +/** END header generated by mfd-data-get.m2c */ @end@ @if $m2c_create_fewer_files != 1@ @ eval $m2c_tmp = "$name"@ @@ -88,10 +84,8 @@ @if $m2c_create_fewer_files != 1@ @open ${name}_data_get.c@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-data-get.m2c */ @include generic-source-includes.m2i@ @@ -108,7 +102,7 @@ */ @end@ // m2c_create_fewer_files @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-data-get.m2c */ @end@ @foreach $table table@ @ include m2c_setup_table.m2i@ @@ -160,7 +154,7 @@ /** @} */ ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-data-get.m2c */ @end@ ######################################################################## @end@ // $mfd_processing_types =~ /c/ diff --git a/local/mib2c-conf.d/mfd-data-set.m2c b/local/mib2c-conf.d/mfd-data-set.m2c index 1150551..3933e9a 100644 --- a/local/mib2c-conf.d/mfd-data-set.m2c +++ b/local/mib2c-conf.d/mfd-data-set.m2c @@ -1,7 +1,6 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## ## lower conf files get confused with multiple processing types, so ## set single options @@ -9,13 +8,10 @@ @if "$mfd_processing_types" =~ /h/@ @eval $m2c_processing_type = 'h'@ @if $m2c_create_fewer_files != 1@ -@ eval $hack = "Id"@ @open ${name}_data_set.h@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-data-set.m2c */ @eval $m2c_save = "$name"@ @eval $name = "${name}_DATA_SET"@ @@ -24,7 +20,7 @@ @end@ // m2c_create_fewer_files ######################################################################## @if $m2c_mark_boundary == 1@ -/** START header generated by $RCSfile$ $Revision$ */ +/** START header generated by mfd-data-set.m2c */ @end@ ## /* ********************************************************************* @@ -56,7 +52,7 @@ int ${context}_check_dependencies(${context}_rowreq_ctx *ctx); @end@ # foreach table @if $m2c_mark_boundary == 1@ -/** END header generated by $RCSfile$ $Revision$ */ +/** END header generated by mfd-data-set.m2c */ @end@ @if $m2c_create_fewer_files != 1@ @eval $m2c_save = "$name"@ @@ -77,10 +73,8 @@ int ${context}_check_dependencies(${context}_rowreq_ctx *ctx); @if $m2c_create_fewer_files != 1@ @open ${name}_data_set.c@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-data-set.m2c * */ @include generic-source-includes.m2i@ @@ -94,7 +88,7 @@ int ${context}_check_dependencies(${context}_rowreq_ctx *ctx); */ @end@ // m2c_create_fewer_files @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-data-set.m2c */ @end@ ######################################################################## @foreach $table table@ @@ -134,7 +128,7 @@ int ${context}_check_dependencies(${context}_rowreq_ctx *ctx); ######################################################################## /** @} */ @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-data-set.m2c */ @end@ ######################################################################## @end@ // mfd_processing_type =~ /c/ diff --git a/local/mib2c-conf.d/mfd-interactive-setup.m2c b/local/mib2c-conf.d/mfd-interactive-setup.m2c index e3d3d55..772f168 100644 --- a/local/mib2c-conf.d/mfd-interactive-setup.m2c +++ b/local/mib2c-conf.d/mfd-interactive-setup.m2c @@ -1,10 +1,9 @@ ####################################################################### ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-interactive-setup.m2c */ @end@ ######################################################################## @eval $m2c_temp_writable = table_is_writable($context)@ @@ -331,5 +330,5 @@ snmpd. (You can still link it in later.) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-interactive-setup.m2c */ @end@ diff --git a/local/mib2c-conf.d/mfd-interface.m2c b/local/mib2c-conf.d/mfd-interface.m2c index d666c9a..6d86a6c 100644 --- a/local/mib2c-conf.d/mfd-interface.m2c +++ b/local/mib2c-conf.d/mfd-interface.m2c @@ -1,22 +1,18 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-interface.m2c */ @end@ ######################################################################## ## ######################################################################## @eval $m2c_processing_type = 'h'@ @open ${name}_interface.h@ -@eval $hack = "Id"@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-interface.m2c */ /** @ingroup interface: Routines to interface to Net-SNMP * @@ -104,10 +100,8 @@ void ${context}_valid_columns_set(netsnmp_column_info *vc); ## @open ${name}_interface.c@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-interface.m2c */ @include m2c-internal-warning.m2i@ @@ -118,9 +112,9 @@ void ${context}_valid_columns_set(netsnmp_column_info *vc); #include "${name}_interface.h" -netsnmp_feature_require(baby_steps) -netsnmp_feature_require(row_merge) -netsnmp_feature_require(check_all_requests_error) +netsnmp_feature_require(baby_steps); +netsnmp_feature_require(row_merge); +netsnmp_feature_require(check_all_requests_error); #include @@ -332,7 +326,7 @@ _${context}_initialize_interface(${context}_registration * reg_ptr, u_long flag ${context}_oid, ${context}_oid_size, HANDLER_CAN_BABY_STEP | -#if !(defined(NETSNMP_NO_WRITE_SUPPORT) || defined(NETSNMP_DISABLE_SET_SUPPORT)) +#if (defined(NETSNMP_NO_WRITE_SUPPORT) || defined(NETSNMP_DISABLE_SET_SUPPORT)) HANDLER_CAN_RONLY #else @if $m2c_table_settable == 1@ @@ -915,7 +909,7 @@ rc = ${node}_get(rowreq_ctx, $m2c_node_var_ref ); var->val_len = 0; while( 0 != mask ) { ++idx; - if ( *(($m2c_decl *) var->val.string) & mask ) + if ( ntohl( *(($m2c_decl *) var->val.string) ) & mask ) var->val_len = idx; mask = mask >> 8; } @@ -961,7 +955,7 @@ _mfd_${context}_get_values(netsnmp_mib_handler *handler, @if $m2c_table_sparse == 1@ DEBUGMSGTL(("9:${context}:_mfd_${context}_get_values", - "exists %p\n", (void*)rowreq_ctx->column_exists_flags)); + "exists %x\n", rowreq_ctx->column_exists_flags)); @end@ for(;requests; requests = requests->next) { @@ -1002,7 +996,7 @@ _mfd_${context}_get_values(netsnmp_mib_handler *handler, /* * if the buffer wasn't used previously for the old data (i.e. it - * was allcoated memory) and the get routine replaced the pointer, + * was allocated memory) and the get routine replaced the pointer, * we need to free the previous pointer. */ if(old_string && (old_string != requests->requestvb->buf) && @@ -1618,7 +1612,7 @@ _mfd_${context}_irreversible_commit(netsnmp_mib_handler *handler, if (rowreq_ctx->column_set_flags) { @if $m2c_table_sparse == 1@ DEBUGMSGTL(("internal:${context}:_mfd_irreversible_commit", - "updating exists (%p) w/set (%p) = %p\n", + "updating exists (%x) w/set (%x) = %x\n", rowreq_ctx->column_exists_flags, rowreq_ctx->column_set_flags, (rowreq_ctx->column_exists_flags | @@ -1714,5 +1708,5 @@ ${context}_row_ref_decrement(${context}_rowreq_ctx *rowreq_ctx) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-interface.m2c */ @end@ diff --git a/local/mib2c-conf.d/mfd-makefile.m2m b/local/mib2c-conf.d/mfd-makefile.m2m index c41d5bb..be00fbb 100644 --- a/local/mib2c-conf.d/mfd-makefile.m2m +++ b/local/mib2c-conf.d/mfd-makefile.m2m @@ -1,5 +1,4 @@ ####################################################### -*- Makefile -*- -## $Id$ ## ######################################################################## ## @@ -16,7 +15,7 @@ @ else@ ######################################################################## @ if $m2c_mark_boundary == 1@ -# START code generated by $RCSfile$ $Revision$ +# START code generated by mfd-makefile.m2m @ end@ ######################################################################## @@ -132,7 +131,7 @@ include $(TABLE_PREFIX)_data_set.deps @end@ ######################################################################## @ if $m2c_mark_boundary == 1@ -# END code generated by $RCSfile$ $Revision$ +# END code generated by mfd-makefile.m2m @ end@ @ end@ # not including ${name}_Makefile.m2m @ close ${name}_Makefile@ diff --git a/local/mib2c-conf.d/mfd-persistence.m2i b/local/mib2c-conf.d/mfd-persistence.m2i index 7796cf2..caeb2c7 100644 --- a/local/mib2c-conf.d/mfd-persistence.m2i +++ b/local/mib2c-conf.d/mfd-persistence.m2i @@ -1,9 +1,8 @@ ######################################################################## ## generic include for XXX. Do not use directly. -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-persistence.m2i */ @end@ ######################################################################## @if $m2c_processing_type eq 'h'@ @@ -474,5 +473,5 @@ _${context}_container_col_restore( @end@ // $m2c_processing_type eq 'i' ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-persistence.m2i */ @end@ diff --git a/local/mib2c-conf.d/mfd-readme.m2c b/local/mib2c-conf.d/mfd-readme.m2c index 5ed9d59..cb83cf6 100644 --- a/local/mib2c-conf.d/mfd-readme.m2c +++ b/local/mib2c-conf.d/mfd-readme.m2c @@ -1,10 +1,9 @@ ######################################################################## ## generic include for XXX. Don't use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-readme.m2c */ @end@ ######################################################################## ## @@ -842,5 +841,5 @@ Table / column details ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-readme.m2c */ @end@ diff --git a/local/mib2c-conf.d/mfd-top.m2c b/local/mib2c-conf.d/mfd-top.m2c index db0f398..f2398fa 100644 --- a/local/mib2c-conf.d/mfd-top.m2c +++ b/local/mib2c-conf.d/mfd-top.m2c @@ -1,6 +1,5 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. -## $Id$ ######################################################################## ######################################################################## ## @@ -74,12 +73,9 @@ ######################################################################## @eval $m2c_processing_type = 'h'@ @open ${name}.h@ -@eval $hack = "Id"@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-top.m2c */ @include generic-header-top.m2i@ @@ -88,18 +84,18 @@ * @{ */ @if $m2c_mark_boundary == 1@ -/** START header generated by $RCSfile$ $Revision$ */ +/** START header generated by mfd-top.m2c */ @end@ #include /* other required module components */ /* *INDENT-OFF* */ -config_add_mib($name.module) -config_require($name.module/${name}/${name}_interface) -config_require($name.module/${name}/${name}_data_access) +config_add_mib($name.module); +config_require($name.module/${name}/${name}_interface); +config_require($name.module/${name}/${name}_data_access); @if $m2c_create_fewer_files != 1@ -config_require($name.module/${name}/${name}_data_get) -config_require($name.module/${name}/${name}_data_set) +config_require($name.module/${name}/${name}_data_get); +config_require($name.module/${name}/${name}_data_set); /* *INDENT-ON* */ /* OID and column number definitions for $context */ @@ -278,7 +274,7 @@ extern const int ${context}_oid_size; * TODO:499:x: ************************************************************* */ @if $m2c_mark_boundary == 1@ -/** END header generated by $RCSfile$ $Revision$ */ +/** END header generated by mfd-top.m2c */ @end@ @include generic-header-bottom.m2i@ /** @} */ @@ -288,10 +284,8 @@ extern const int ${context}_oid_size; @eval $m2c_processing_type = 'c'@ @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mfd-top.m2c */ /** \page MFD helper for ${name} * @@ -303,7 +297,7 @@ extern const int ${context}_oid_size; #include @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mfd-top.m2c */ @end@ #include "${name}_interface.h" @@ -577,7 +571,7 @@ ${context}_post_request(${context}_registration * user_context, int rc) ######################################################################## /** @{ */ @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mfd-top.m2c */ @end@ ## ######################################################################## diff --git a/local/mib2c-conf.d/node-get.m2i b/local/mib2c-conf.d/node-get.m2i index 1d7255c..72b0765 100644 --- a/local/mib2c-conf.d/node-get.m2i +++ b/local/mib2c-conf.d/node-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by node-get.m2i */ @end@ ######################################################################## ## @@ -84,7 +83,7 @@ ${node}_get( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_ref ) @ include generic-get-char.m2i@ @ elsif $node.decl =~ /oid/i@ # ASN_OBJECT_ID @ include generic-get-oid.m2i@ -@ elsif $node.decl =~ /U64/i@ # ASN_COUNTER64 +@ elsif $node.decl =~ /struct counter64/i@ # ASN_COUNTER64 @ include generic-get-U64.m2i@ @ else@ @ print ERROR: unknown node.decl: $node.decl@ @@ -103,5 +102,5 @@ ${node}_get( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_ref ) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by node-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/node-set.m2i b/local/mib2c-conf.d/node-set.m2i index 2041b59..78c252d 100644 --- a/local/mib2c-conf.d/node-set.m2i +++ b/local/mib2c-conf.d/node-set.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by node-set.m2i */ @end@ ######################################################################## ## @@ -232,5 +231,5 @@ ${node}_undo( ${context}_rowreq_ctx *rowreq_ctx) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by node-set.m2i */ @end@ diff --git a/local/mib2c-conf.d/node-storage.m2i b/local/mib2c-conf.d/node-storage.m2i index 7a941f0..bf5b97d 100644 --- a/local/mib2c-conf.d/node-storage.m2i +++ b/local/mib2c-conf.d/node-storage.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by node-storage.m2i */ @end@ ######################################################################## ## @@ -17,5 +16,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by node-storage.m2i */ @end@ diff --git a/local/mib2c-conf.d/node-validate.m2i b/local/mib2c-conf.d/node-validate.m2i index a63f1d7..a03d700 100644 --- a/local/mib2c-conf.d/node-validate.m2i +++ b/local/mib2c-conf.d/node-validate.m2i @@ -1,13 +1,12 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ## ## assumes an integer rc is available and will be tested by caller ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by node-validate.m2i */ @end@ ######################################################################## ##---------------------------------------------------------------------- @@ -29,15 +28,20 @@ @ else@ # BITS ## { if($m2c_nv_len > 4) { - snmp_log(LOG_ERR,"I can not handle BITS > 4 bytes\n"); + DEBUGMSGTL(("${context}:${node}", + "I can not handle BITS > 4 bytes\n")); rc = SNMP_ERR_GENERR; } else if (SNMPERR_SUCCESS == rc){ u_long bits = 0; /* check that value is within enum mask */ memcpy( &bits, $m2c_nv_str, $m2c_nv_len); - if( (bits | $m2c_enum_mask) != $m2c_enum_mask) - rc = SNMP_ERR_WRONGVALUE; + bits = ntohl( bits ); + if( (bits | $m2c_enum_mask) != $m2c_enum_mask) { + DEBUGMSGTL(("${context}:${node}", + "bad bits set: bits = %x valid = %x", bits, $m2c_enum_mask)); + rc = SNMP_ERR_WRONGVALUE; + } } @ end@ ##---------------------------------------------------------------------- @@ -67,5 +71,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by node-validate.m2i */ @end@ diff --git a/local/mib2c-conf.d/node-varbind-validate.m2i b/local/mib2c-conf.d/node-varbind-validate.m2i index 1b3fb37..013ecb4 100644 --- a/local/mib2c-conf.d/node-varbind-validate.m2i +++ b/local/mib2c-conf.d/node-varbind-validate.m2i @@ -1,7 +1,6 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ## ## Tests a netsnmp_variable_list pointer (var) against known ## contstraints. If none are found, calls the user supplied funtion @@ -14,7 +13,7 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by node-varbind-validate.m2i */ @end@ ######################################################################## ##---------------------------------------------------------------------- @@ -50,5 +49,5 @@ netsnmp_assert(rc == SNMP_ERR_NOERROR); /* paranoia */ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by node-varbind-validate.m2i */ @end@ diff --git a/local/mib2c-conf.d/parent-dependencies.m2i b/local/mib2c-conf.d/parent-dependencies.m2i index 104f150..3a867c9 100644 --- a/local/mib2c-conf.d/parent-dependencies.m2i +++ b/local/mib2c-conf.d/parent-dependencies.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by parent-dependencies.m2i */ @end@ # ; ######################################################################## ## @@ -59,5 +58,5 @@ ${context}_check_dependencies(${context}_rowreq_ctx *rowreq_ctx) ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by parent-dependencies.m2i */ @end@ diff --git a/local/mib2c-conf.d/parent-set.m2i b/local/mib2c-conf.d/parent-set.m2i index 02afe3d..fcf775d 100644 --- a/local/mib2c-conf.d/parent-set.m2i +++ b/local/mib2c-conf.d/parent-set.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by parent-set.m2i */ @end@ ######################################################################## ##//#################################################################### @@ -358,10 +357,16 @@ ${context}_undo_commit( ${context}_rowreq_ctx *rowreq_ctx) /* * TODO:485:M: |-> Undo $context commit. - * check the column's flag in rowreq_ctx->column_set_flags to see + * check each column's flag in rowreq_ctx->column_set_flags to see * if it was set during commit, then undo it. * +@ foreach $node nonindex@ +@ include m2c_setup_node.m2i@ +@ if $node.settable == 0@ +@ next@ +@ end@ * eg: if (rowreq_ctx->column_set_flags & COLUMN_$node.uc_FLAG) {} +@ end@ # foreach $node */ @@ -413,5 +418,5 @@ ${context}_irreversible_commit( ${context}_rowreq_ctx *rowreq_ctx) @end@ // m2c_processing_type eq 'c' ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by parent-set.m2i */ @end@ diff --git a/local/mib2c-conf.d/subagent.m2c b/local/mib2c-conf.d/subagent.m2c index 61fc26d..502bb3e 100644 --- a/local/mib2c-conf.d/subagent.m2c +++ b/local/mib2c-conf.d/subagent.m2c @@ -1,17 +1,16 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by subagent.m2c */ @end@ ######################################################################## ## @if 0@ @open ${name}_subagent.h@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ + * Note: this file originally auto-generated by mib2c + * using subagent.m2c */ @include generic-header-top.m2i@ @include generic-header-bottom.m2i@ @@ -21,8 +20,8 @@ ###################################################################### @open ${name}_subagent.c@ /* - * Note: this file originally auto-generated by mib2c using - * version $Revision$ of $RCSfile$ + * Note: this file originally auto-generated by mib2c + * using subagent.m2c */ @include generic-source-includes.m2i@ #include @@ -36,8 +35,8 @@ * --with-features="agent_check_and_process enable_stderrlog" to your * configure line. */ -netsnmp_feature_require(agent_check_and_process) -netsnmp_feature_require(enable_stderrlog) +netsnmp_feature_require(agent_check_and_process); +netsnmp_feature_require(enable_stderrlog); static int keep_running; @@ -72,8 +71,14 @@ main (int argc, char **argv) { int dont_fork = 0, use_syslog = 0; char *agentx_socket = NULL; - while ((ch = getopt(argc, argv, "D:fHLMx:")) != EOF) + while ((ch = getopt(argc, argv, "D:fHLM-:x:")) != EOF) switch(ch) { + case '-': + if (strcasecmp(optarg, "help") == 0) { + usage(); + } + handle_long_opt(optarg); + break; case 'D': debug_register_tokens(optarg); snmp_set_do_debugging(1); @@ -191,5 +196,5 @@ main (int argc, char **argv) { ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by subagent.m2c */ @end@ diff --git a/local/mib2c-conf.d/syntax-COUNTER64-get.m2i b/local/mib2c-conf.d/syntax-COUNTER64-get.m2i index 7f36830..ed43419 100644 --- a/local/mib2c-conf.d/syntax-COUNTER64-get.m2i +++ b/local/mib2c-conf.d/syntax-COUNTER64-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-COUNTER64-get.m2i */ ## } @end@ ######################################################################## @@ -31,5 +30,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-COUNTER64-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-DateAndTime-get.m2i b/local/mib2c-conf.d/syntax-DateAndTime-get.m2i index 984d1e2..07dd15c 100644 --- a/local/mib2c-conf.d/syntax-DateAndTime-get.m2i +++ b/local/mib2c-conf.d/syntax-DateAndTime-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-DateAndTime-get.m2i */ @end@ ######################################################################## ## @@ -50,5 +49,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-DateAndTime-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-InetAddress-get.m2i b/local/mib2c-conf.d/syntax-InetAddress-get.m2i index 253980c..cf3fe15 100644 --- a/local/mib2c-conf.d/syntax-InetAddress-get.m2i +++ b/local/mib2c-conf.d/syntax-InetAddress-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-InetAddress-get.m2i */ @end@ ######################################################################## ## @@ -96,5 +95,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-InetAddress-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-InetAddress-set.m2i b/local/mib2c-conf.d/syntax-InetAddress-set.m2i index be3cf10..90da1c8 100644 --- a/local/mib2c-conf.d/syntax-InetAddress-set.m2i +++ b/local/mib2c-conf.d/syntax-InetAddress-set.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-InetAddress-set.m2i */ @end@ ######################################################################## ## @@ -18,5 +17,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-InetAddress-set.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-InetAddressType-get.m2i b/local/mib2c-conf.d/syntax-InetAddressType-get.m2i index 0b89a5a..9fc45eb 100644 --- a/local/mib2c-conf.d/syntax-InetAddressType-get.m2i +++ b/local/mib2c-conf.d/syntax-InetAddressType-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-InetAddressType-get.m2i */ @end@ ######################################################################## ## @@ -21,5 +20,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-InetAddressType-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-InetAddressType-set.m2i b/local/mib2c-conf.d/syntax-InetAddressType-set.m2i index fb81efe..173519d 100644 --- a/local/mib2c-conf.d/syntax-InetAddressType-set.m2i +++ b/local/mib2c-conf.d/syntax-InetAddressType-set.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-InetAddressType-set.m2i */ @end@ ######################################################################## ## @@ -21,5 +20,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-InetAddressType-set.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-RowStatus-dependencies.m2i b/local/mib2c-conf.d/syntax-RowStatus-dependencies.m2i index 9f14baf..6784a9b 100644 --- a/local/mib2c-conf.d/syntax-RowStatus-dependencies.m2i +++ b/local/mib2c-conf.d/syntax-RowStatus-dependencies.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-RowStatus-dependencies.m2i */ @end@ ######################################################################## ## { @@ -40,6 +39,14 @@ } ${m2c_data_item}$node = ROWSTATUS_ACTIVE; } + else if (ROWSTATUS_CREATEANDWAIT == ${m2c_data_item}$node) { + if ((rowreq_ctx->column_set_flags & $context.uc_REQUIRED_COLS) + != $context.uc_REQUIRED_COLS) { + ${m2c_data_item}$node = ROWSTATUS_NOTREADY; + } else { + ${m2c_data_item}$node = ROWSTATUS_NOTINSERVICE; + } + } } /* row creation */ else { @end@ @@ -109,5 +116,5 @@ ## } ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-RowStatus-dependencies.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-RowStatus-get.m2i b/local/mib2c-conf.d/syntax-RowStatus-get.m2i index f8e0996..a9a6b7d 100644 --- a/local/mib2c-conf.d/syntax-RowStatus-get.m2i +++ b/local/mib2c-conf.d/syntax-RowStatus-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-RowStatus-get.m2i */ @end@ ######################################################################## ## @@ -61,5 +60,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-RowStatus-get.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-RowStatus-varbind-validate.m2i b/local/mib2c-conf.d/syntax-RowStatus-varbind-validate.m2i index dc91ac8..c4feeb9 100644 --- a/local/mib2c-conf.d/syntax-RowStatus-varbind-validate.m2i +++ b/local/mib2c-conf.d/syntax-RowStatus-varbind-validate.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-RowStatus-varbind-validate.m2i */ @end@ ######################################################################## ## @@ -12,5 +11,5 @@ rc = netsnmp_check_vb_rowstatus_value(var); ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-RowStatus-varbind-validate.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-StorageType-dependencies.m2i b/local/mib2c-conf.d/syntax-StorageType-dependencies.m2i index 0419514..9b2a96d 100644 --- a/local/mib2c-conf.d/syntax-StorageType-dependencies.m2i +++ b/local/mib2c-conf.d/syntax-StorageType-dependencies.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-StorageType-dependencies.m2i */ @end@ ######################################################################## ## { @@ -15,5 +14,5 @@ ## } ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-StorageType-dependencies.m2i */ @end@ diff --git a/local/mib2c-conf.d/syntax-TestAndIncr-get.m2i b/local/mib2c-conf.d/syntax-TestAndIncr-get.m2i index 7cd2f60..28f7cc6 100644 --- a/local/mib2c-conf.d/syntax-TestAndIncr-get.m2i +++ b/local/mib2c-conf.d/syntax-TestAndIncr-get.m2i @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by syntax-TestAndIncr-get.m2i */ @end@ ######################################################################## ## @@ -18,5 +17,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by syntax-TestAndIncr-get.m2i */ @end@ diff --git a/local/mib2c-update b/local/mib2c-update index 42017e5..4282f33 100644 --- a/local/mib2c-update +++ b/local/mib2c-update @@ -32,8 +32,8 @@ FIRST_RUN=0 # debug() { - if [ $UPDATE_DEBUG -ge 1 ]; then - echo $1 + if [ "$UPDATE_DEBUG" -ge 1 ]; then + echo "$1" fi } @@ -50,7 +50,7 @@ die() safecd() { - cd $1 + cd "$1" if [ $? -ne 0 ]; then die "changing to directory $1 from $PWD failed!" fi @@ -69,11 +69,11 @@ safecp() check_setup() { rc=1 - for d in $UPDATE_CURR $UPDATE_ORIG $UPDATE_NEW $UPDATE_MERGED $UPDATE_PATCH $UPDATE_BACKUP $UPDATE_BACKUP/curr $UPDATE_BACKUP/orig + for d in "$UPDATE_CURR" "$UPDATE_ORIG" "$UPDATE_NEW" "$UPDATE_MERGED" "$UPDATE_PATCH" "$UPDATE_BACKUP" "$UPDATE_BACKUP/curr" "$UPDATE_BACKUP/orig" do - if [ ! -d $d ]; then + if [ ! -d "$d" ]; then echo "Creating missing directory $d" - mkdir -p $d + mkdir -p "$d" if [ $? -ne 0 ]; then error "Could not create directory $d" rc=0 @@ -96,7 +96,7 @@ check_setup() # rc=0 # fi - if [ $rc -eq 0 ] && [ $UPDATE_NOPROBE -ne 1 ]; then + if [ "$rc" -eq 0 ] && [ "$UPDATE_NOPROBE" -ne 1 ]; then mib2c -c unknown > /dev/null 2>&1 if [ $? -eq 0 ]; then error "WARNING: mib2c returns 0 on error conditions!" @@ -125,11 +125,11 @@ do_diff() local rcs=0 safecd $DD_ORIG echo " checking files in $1 ($PWD)" - files=`ls *$UPDATE_OID* 2>/dev/null` - if [ ! -z "$files" ]; then + files=`ls ./*"$UPDATE_OID"* 2>/dev/null` + if [ -n "$files" ]; then for f in $files; do diff -U $FUZZ -p -b -w --show-c-function \ - -I "$""Id:" $f $DD_CURR/$f >> $DD_OUTPUT + -I "\$Id:" "$f" "$DD_CURR/$f" >> "$DD_OUTPUT" rc=$? rcs=`expr $rcs + $rc` if [ $rc -eq 1 ]; then @@ -137,11 +137,11 @@ do_diff() fi done fi - if [ $rcs -eq 0 ]; then - rm -f $DD_OUTPUT + if [ "$rcs" -eq 0 ]; then + rm -f "$DD_OUTPUT" fi safecd - - return $rcs + return "$rcs" } #---------------------------------------------------------------------- @@ -150,18 +150,18 @@ do_cp() { src=$1 dest=$2 - if [ ! -d $dest ]; then + if [ ! -d "$dest" ]; then die "dest $dest is not a directory" fi - if [ ! -d $src ]; then + if [ ! -d "$src" ]; then die "src $src is not a directory" fi - safecd $src - files=`ls *$UPDATE_OID* 2>/dev/null| egrep "(file|onf|m2d|txt|\.c|\.h)$"` + safecd "$src" + files=`ls ./*"$UPDATE_OID"* 2>/dev/null| egrep "(file|onf|m2d|txt|\.c|\.h)$"` if [ -z "$files" ]; then echo " no files to copy from $src" else - safecp $files $dest + safecp $files "$dest" if [ $? -ne 0 ]; then die "error while copying files from $src to $dest in $PWD" fi @@ -174,14 +174,14 @@ do_cp() save_diff() { echo "Creating patch for your custom code" - cnt=`ls $UPDATE_CURR/*$UPDATE_OID* 2>/dev/null | egrep "(file|onf|m2d|txt|\.c|\.h)$" | wc -l` - if [ $cnt -eq 0 ]; then + cnt=`ls ./"$UPDATE_CURR/"*"$UPDATE_OID"* 2>/dev/null | egrep "(file|onf|m2d|txt|\.c|\.h)$" | wc -l` + if [ "$cnt" -eq 0 ]; then echo " no custom code!" FIRST_RUN=1 return fi - do_diff $UPDATE_ORIG/ $UPDATE_CURR/ $UPDATE_PATCH/custom.$UPDATE_DATE + do_diff "$UPDATE_ORIG/" "$UPDATE_CURR/" "$UPDATE_PATCH/custom.$UPDATE_DATE" if [ $? -eq 0 ]; then echo " no custom code changes found." fi @@ -191,15 +191,15 @@ save_diff() # gen_code() { - copy_defaults . $UPDATE_NEW + copy_defaults . "$UPDATE_NEW" - safecd $UPDATE_NEW - files=`ls *$UPDATE_OID* 2>/dev/null | grep -v "^default"` - if [ ! -z "$files" ]; then + safecd "$UPDATE_NEW" + files=`ls ./*"$UPDATE_OID"* 2>/dev/null | grep -v "^default"` + if [ -n "$files" ]; then rm -f $files > /dev/null 2>&1 fi echo "mib2c $@ -c $UPDATE_CONF $UPDATE_MIB2C_OPTS $UPDATE_OID" - mib2c $@ -c $UPDATE_CONF $UPDATE_MIB2C_OPTS $UPDATE_OID + mib2c "$@" -c "$UPDATE_CONF" "$UPDATE_MIB2C_OPTS" "$UPDATE_OID" if [ $? -ne 0 ]; then die "bad rc $rc from mib2 while generation new code." fi @@ -211,12 +211,12 @@ gen_code() check_new() { echo "Checking for updates to generated code" - do_diff $UPDATE_ORIG/ $UPDATE_NEW/ $UPDATE_PATCH/generated.$UPDATE_DATE + do_diff "$UPDATE_ORIG/" "$UPDATE_NEW/" "$UPDATE_PATCH/generated.$UPDATE_DATE" if [ $? -eq 0 ]; then echo "Generated code has not changed." - safecd $UPDATE_PATCH - files=`ls *.$UPDATE_DATE 2>/dev/null ` - if [ ! -z "$files" ]; then + safecd "$UPDATE_PATCH" + files=`ls ./*".$UPDATE_DATE" 2>/dev/null ` + if [ -n "$files" ]; then rm $files fi exit 0 @@ -227,17 +227,17 @@ check_new() # merge_code() { - files=`ls $UPDATE_MERGED/* 2>/dev/null ` - if [ ! -z "$files" ]; then - rm $UPDATE_MERGED/* + files=`ls "$UPDATE_MERGED/"* 2>/dev/null ` + if [ -n "$files" ]; then + rm "$UPDATE_MERGED/"* fi - do_cp $UPDATE_NEW $UPDATE_MERGED + do_cp "$UPDATE_NEW" $UPDATE_MERGED"" - if [ -f $UPDATE_PATCH/custom.$UPDATE_DATE ]; then + if [ -f "$UPDATE_PATCH/custom.$UPDATE_DATE" ]; then touch .M2C-UPDATE-MERGE-FAILED echo "Patching new generated code in $UPDATE_MERGED ($PWD)" # --forward = ignore already applied - patch --forward -F $FUZZ -N -d $UPDATE_MERGED -i $UPDATE_PATCH/custom.$UPDATE_DATE + patch --forward -F "$FUZZ" -N -d "$UPDATE_MERGED" -i "$UPDATE_PATCH/custom.$UPDATE_DATE" if [ $? -ne 0 ]; then error "Could not apply custom code patch to new generated code" die "You must fix the problem in $UPDATE_MERGED, and then re-run mib2c-update." @@ -250,12 +250,12 @@ copy_defaults() { SRC=$1 DST=$2 - if [ -d $SRC/defaults ]; then - safecp -a $SRC/defaults $DST + if [ -d "$SRC/defaults" ]; then + safecp -a "$SRC/defaults" "$DST" else - files=`ls $SRC/default-*.m2d 2>/dev/null ` - if [ ! -z "$files" ]; then - safecp $files $DST + files=`ls "$SRC/default-"*.m2d 2>/dev/null ` + if [ -n "$files" ]; then + safecp $files "$DST" fi fi @@ -264,28 +264,28 @@ copy_defaults() copy_merged() { echo "Backing up current code to $UPDATE_BACKUP/curr" - do_cp $UPDATE_CURR $UPDATE_BACKUP/curr/ - copy_defaults . $UPDATE_BACKUP/curr/ + do_cp "$UPDATE_CURR" "$UPDATE_BACKUP/curr/" + copy_defaults . "$UPDATE_BACKUP/curr/" echo "Copying merged code to $UPDATE_CURR" - do_cp $UPDATE_MERGED $UPDATE_CURR/ + do_cp "$UPDATE_MERGED" "$UPDATE_CURR/" echo "Backing up original code to $UPDATE_BACKUP/orig" - do_cp $UPDATE_ORIG $UPDATE_BACKUP/orig/ + do_cp "$UPDATE_ORIG" "$UPDATE_BACKUP/orig/" echo "Saving new original code to $UPDATE_ORIG" - do_cp $UPDATE_NEW $UPDATE_ORIG/ + do_cp "$UPDATE_NEW" "$UPDATE_ORIG/" } copy_new() { echo "Copying code to $UPDATE_CURR" - do_cp $UPDATE_NEW $UPDATE_CURR/ + do_cp "$UPDATE_NEW" "$UPDATE_CURR/" # copy defaults back to current dir (which may not be UPDATE_CURR) - copy_defaults $UPDATE_NEW . + copy_defaults "$UPDATE_NEW" . echo "Saving original code to $UPDATE_ORIG" - do_cp $UPDATE_NEW $UPDATE_ORIG/ + do_cp "$UPDATE_NEW" "$UPDATE_ORIG/" } copy_code() @@ -297,19 +297,19 @@ copy_code() fi # always get defaults from UPDATE_NEW, since those are what were used. - copy_defaults $UPDATE_NEW . + copy_defaults "$UPDATE_NEW" . } #---------------------------------------------------------------------- UPDATE_NOPROBE=0 -if [ -f $HOME/.mib2c-updaterc ]; then - . $HOME/.mib2c-updaterc +if [ -f "$HOME/.mib2c-updaterc" ]; then + . "$HOME/.mib2c-updaterc" fi -if [ -f $PWD/.mib2c-updaterc ]; then - . $PWD/.mib2c-updaterc +if [ -f "$PWD/.mib2c-updaterc" ]; then + . "$PWD/.mib2c-updaterc" else echo "creating example .mib2c-udpaterc. edit as needed and re-run " echo "mib2c-update." @@ -337,7 +337,7 @@ if [ -f .M2C-UPDATE-MERGE-FAILED ]; then echo "[r)e-run from scratch]" echo "[q)uit]" echo "(c|r|q) ?" - read ans + read -r ans if [ "x$ans" = "xr" ]; then rm .M2C-UPDATE-MERGE-FAILED break @@ -345,7 +345,7 @@ if [ -f .M2C-UPDATE-MERGE-FAILED ]; then echo "Have you have manually merged all the" echo "changes into the merged directory?" echo "(y|n)" - read ans + read -r ans if [ "x$ans" != "xy" ]; then echo "Ok. Try again after you've done that." exit 1 diff --git a/local/mib2c.access_functions.conf b/local/mib2c.access_functions.conf index 9d54f14..20433ad 100644 --- a/local/mib2c.access_functions.conf +++ b/local/mib2c.access_functions.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}_access.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.access_functions.conf */ #ifndef $name.uc_ACCESS_H #define $name.uc_ACCESS_H @@ -36,8 +36,8 @@ void * ${t}_create_data_context(netsnmp_variable_list *index_data, int column); @open ${name}_access.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.access_functions.conf */ #include diff --git a/local/mib2c.array-user.conf b/local/mib2c.array-user.conf index 31559ac..49cf981 100644 --- a/local/mib2c.array-user.conf +++ b/local/mib2c.array-user.conf @@ -9,12 +9,9 @@ ###################################################################### @foreach $i table@ @open ${i}.h@ -@eval $hack = "Id" /* - * Note: this file originally auto-generated by mib2c using - * $Id$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mib2c.array-user.conf * * Yes, there is lots of code here that you might not use. But it is much * easier to remove code than to add it! @@ -217,12 +214,9 @@ ${i}_context * ${i}_get( const char *name, int len ); ###################################################################### @foreach $i table@ @open ${i}.c@ -@eval $hack = "Id"@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ - * - * $$hack:$ + * Note: this file originally auto-generated by mib2c + * using mib2c.array-user.conf * * * For help understanding NET-SNMP in general, please check the diff --git a/local/mib2c.check_values.conf b/local/mib2c.check_values.conf index 259ac1f..58f3bc1 100644 --- a/local/mib2c.check_values.conf +++ b/local/mib2c.check_values.conf @@ -5,7 +5,8 @@ ###################################################################### @open ${name}_checkfns.h@ /* - * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c + * using mib2c.check_values.conf * : mib2c.iterate.conf,v 5.6 2003/02/20 00:52:07 hardaker Exp $ */ @@ -18,7 +19,7 @@ #define $name.uc_CHECKFNS_H /** make sure we load the functions that you can modify */ -config_require(${name}_checkfns_local) +config_require(${name}_checkfns_local); @foreach $t table@ /* these functions are designed to check incoming values for @@ -40,8 +41,8 @@ datatype and value. ###################################################################### @open ${name}_checkfns.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.check_values.conf */ /******************************************************************** diff --git a/local/mib2c.check_values_local.conf b/local/mib2c.check_values_local.conf index 13c1e60..f132589 100644 --- a/local/mib2c.check_values_local.conf +++ b/local/mib2c.check_values_local.conf @@ -4,12 +4,12 @@ ###################################################################### @open ${name}_checkfns_local.h@ /* - * Note: this file originally auto-generated by mib2c using - * : $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.check_values_local.conf * */ -#ifndef $name.uc_CHECKFNS_H -#define $name.uc_CHECKFNS_H +#ifndef $name.uc_CHECKFNS_LOCAL_H +#define $name.uc_CHECKFNS_LOCAL_H @foreach $t table@ /* these functions are designed to check incoming values for @@ -27,15 +27,15 @@ should NOT be modified. @end@ @end@ -#endif /* $name.uc_CHECKFNS_H */ +#endif /* $name.uc_CHECKFNS_LOCAL_H */ ###################################################################### ## Do the .c file ###################################################################### @open ${name}_checkfns_local.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.check_values_local.conf */ /* standard headers */ diff --git a/local/mib2c.column_defines.conf b/local/mib2c.column_defines.conf index 5b8328f..023162a 100644 --- a/local/mib2c.column_defines.conf +++ b/local/mib2c.column_defines.conf @@ -1,7 +1,7 @@ @open ${name}_columns.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.column_defines.conf */ #ifndef $name.uc_COLUMNS_H #define $name.uc_COLUMNS_H diff --git a/local/mib2c.column_enums.conf b/local/mib2c.column_enums.conf index 4dba4fa..e639ae0 100644 --- a/local/mib2c.column_enums.conf +++ b/local/mib2c.column_enums.conf @@ -1,7 +1,7 @@ @open ${name}_enums.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.column_enums.conf */ #ifndef $name.uc_ENUMS_H #define $name.uc_ENUMS_H diff --git a/local/mib2c.column_storage.conf b/local/mib2c.column_storage.conf index 9f3ba1f..7167ca9 100644 --- a/local/mib2c.column_storage.conf +++ b/local/mib2c.column_storage.conf @@ -1,10 +1,9 @@ ############################################################# -*- c -*- ## top level mfd conf file -## $Id$ ######################################################################## @ open ${name}_storage.h@ @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mib2c */ @end@ ######################################################################## ## @@ -19,5 +18,5 @@ ## ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mib2c */ @end@ diff --git a/local/mib2c.conf b/local/mib2c.conf index c71968c..57d2c1f 100644 --- a/local/mib2c.conf +++ b/local/mib2c.conf @@ -14,10 +14,15 @@ You requested mib2c to be run on the following part of the MIB tree: First, do you want to generate code that is compatible with the ucd-snmp 4.X line of code, or code for the newer Net-SNMP 5.X code -base (which provides a much greater choice of APIs to pick from): +base (which provides a much greater choice of APIs to pick from). You +can also generate C-header files containing define statements for +column numbers, enums, etc. Or do you simply want to translate the +MIB structures into documentation? 1) ucd-snmp style code 2) Net-SNMP style code + 3) Generate header files + 4) Generate documentation @prompt $ans Select your choice : @ @if $ans == 1@ @@ -28,6 +33,46 @@ base (which provides a much greater choice of APIs to pick from): using the mib2c.old-api.conf configuration file to generate your code. @run mib2c.old-api.conf@ +@elsif $ans == 4@ +********************************************************************** + GENERATING DOCUMENTATION +********************************************************************** + +Which type of documentation would you like to generate: + + 1) HTML + 2) Emacs Org-Mode + + @prompt $ansdocs Select your choice : @ +@if $ansdocs == 1@ +*** Generating ${name}.html: +@run mib2c.genhtml.conf@ +@elsif $ansdocs != 2@ +ERROR: invalid selection; terminating. +@else@ +*** Generating ${name}.org: +@run mib2c.org-mode.conf@ +@end@ +@elsif $ans == 3@ +********************************************************************** + GENERATING HEADER FILES +********************************************************************** + +Which type of header file would you like to generate: + + 1) column definitions + 2) column enums + + @prompt $ansheaders Select your choice : @ +@if $ansheaders == 1@ +*** Generating ${name}_columns.h: +@run mib2c.column_defines.conf@ +@elsif $ansdocs != 2@ +ERROR: invalid selection; terminating. +@else@ +*** Generating ${name}_enums.h: +@run mib2c.column_enums.conf@ +@end@ @elsif $ans != 2@ Invalid answer. @else@ diff --git a/local/mib2c.container.conf b/local/mib2c.container.conf index e76621f..ed15461 100644 --- a/local/mib2c.container.conf +++ b/local/mib2c.container.conf @@ -7,8 +7,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.container.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -32,8 +32,8 @@ Netsnmp_Node_Handler ${i}_handler; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.container.conf */ #include @@ -43,10 +43,12 @@ Netsnmp_Node_Handler ${i}_handler; #include #include "${name}.h" -#ifdef ${i.uc}_USE_CACHE -static void _cache_free(netsnmp_cache * cache, void *magic); -static int _cache_load(netsnmp_cache * cache, void *vmagic); +@foreach $i table@ +#ifdef $i.uc_USE_CACHE +static void ${i}_cache_free(netsnmp_cache * cache, void *magic); +static int ${i}_cache_load(netsnmp_cache * cache, void *vmagic); #endif +@end@ /** Initializes the $name module */ void @@ -81,7 +83,7 @@ initialize_table_$i(void) netsnmp_mib_handler *handler = NULL; netsnmp_container *container = NULL; netsnmp_table_registration_info *table_info = NULL; -#ifdef ${i.uc}_USE_CACHE +#ifdef $i.uc_USE_CACHE netsnmp_cache *cache = NULL; #endif @@ -140,13 +142,13 @@ initialize_table_$i(void) } handler = NULL; /* reg has it, will reuse below */ -#ifdef ${i.uc}_USE_CACHE +#ifdef $i.uc_USE_CACHE /************************************************* * * inject cache helper */ cache = netsnmp_cache_create(30, /* timeout in seconds */ - _cache_load, _cache_free, + ${i}_cache_load, ${i}_cache_free, ${i}_oid, ${i}_oid_len); if (NULL == cache) { @@ -193,7 +195,7 @@ initialize_table_$i(void) if (handler) netsnmp_handler_free(handler); -#ifdef ${i.uc}_USE_CACHE +#ifdef $i.uc_USE_CACHE if (cache) netsnmp_cache_free(cache); #endif @@ -799,12 +801,12 @@ ${i}_handler( return SNMP_ERR_NOERROR; } -#ifdef ${i.uc}_USE_CACHE +#ifdef $i.uc_USE_CACHE /** * @internal */ static int -_cache_load(netsnmp_cache * cache, void *vmagic) +${i}_cache_load(netsnmp_cache * cache, void *vmagic) { netsnmp_container *container; @@ -841,7 +843,7 @@ ${i}_freeEntry_cb(${i}_entry *entry, void *magic) { * @internal */ static void -_cache_free(netsnmp_cache * cache, void *magic) +${i}_cache_free(netsnmp_cache * cache, void *magic) { netsnmp_container *container; @@ -860,5 +862,5 @@ _cache_free(netsnmp_cache * cache, void *magic) (netsnmp_container_obj_func*)${i}_freeEntry_cb, NULL); } /* _cache_free */ -#endif /* ${i.uc}_USE_CACHE */ +#endif /* $i.uc_USE_CACHE */ @end@ diff --git a/local/mib2c.create-dataset.conf b/local/mib2c.create-dataset.conf index 9cf75fd..eaa0899 100644 --- a/local/mib2c.create-dataset.conf +++ b/local/mib2c.create-dataset.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.create-dataset.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -29,8 +29,8 @@ Netsnmp_Node_Handler ${i}_handler; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.create-dataset.conf */ #include diff --git a/local/mib2c.emulation.conf b/local/mib2c.emulation.conf index 20d2e7b..1cfe4b5 100644 --- a/local/mib2c.emulation.conf +++ b/local/mib2c.emulation.conf @@ -6,7 +6,6 @@ ## provide basic/simplistic emulation for a particular MIB. ## ## -## $Id$ ###################################################################### @open ${name}-emulation.conf@ # diff --git a/local/mib2c.int_watch.conf b/local/mib2c.int_watch.conf index ecc5d10..2276c15 100644 --- a/local/mib2c.int_watch.conf +++ b/local/mib2c.int_watch.conf @@ -6,8 +6,8 @@ *** Warning: only generating code for nodes of MIB type INTEGER @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.int_watch.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -21,8 +21,8 @@ void init_$name(void); ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.int_watch.conf */ #include diff --git a/local/mib2c.iterate.conf b/local/mib2c.iterate.conf index 3a2b5f7..98ddac7 100644 --- a/local/mib2c.iterate.conf +++ b/local/mib2c.iterate.conf @@ -38,8 +38,8 @@ Invalid value for 'cache' ($cache) - generating caching code ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.iterate.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -70,8 +70,8 @@ NetsnmpCacheFree ${i}_free; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.iterate.conf */ #include @@ -90,7 +90,7 @@ init_$name(void) } @foreach $i table@ - # Determine the first/last column names + ## Determine the first/last column names @eval $first_column = "-"@ @eval $last_column = "-"@ @foreach $c column@ diff --git a/local/mib2c.iterate_access.conf b/local/mib2c.iterate_access.conf index a38ac20..76c5ad3 100644 --- a/local/mib2c.iterate_access.conf +++ b/local/mib2c.iterate_access.conf @@ -4,15 +4,15 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.iterate_access.conf */ #ifndef $name.uc_H #define $name.uc_H /** other required module components */ -config_require(${name}_access) -config_require(${name}_checkfns) +config_require(${name}_access); +config_require(${name}_checkfns); /* function declarations */ void init_$name(void); @@ -38,8 +38,8 @@ Netsnmp_Node_Handler ${i}_handler; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.iterate_access.conf */ #include diff --git a/local/mib2c.mfd.conf b/local/mib2c.mfd.conf index d309ea5..809d36c 100644 --- a/local/mib2c.mfd.conf +++ b/local/mib2c.mfd.conf @@ -1,9 +1,8 @@ ############################################################# -*- c -*- ## top level mfd conf file -## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ -/** START code generated by $RCSfile$ $Revision$ */ +/** START code generated by mib2c */ @end@ ######################################################################## ## @@ -28,5 +27,5 @@ @run mfd-top.m2c@ ######################################################################## @if $m2c_mark_boundary == 1@ -/** END code generated by $RCSfile$ $Revision$ */ +/** END code generated by mib2c */ @end@ diff --git a/local/mib2c.notify.conf b/local/mib2c.notify.conf index 77f3330..8c1b56c 100644 --- a/local/mib2c.notify.conf +++ b/local/mib2c.notify.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.notify.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -21,8 +21,8 @@ int send_${i}_trap(void); ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.notify.conf */ #include diff --git a/local/mib2c.old-api.conf b/local/mib2c.old-api.conf index 8fa270b..c44418a 100644 --- a/local/mib2c.old-api.conf +++ b/local/mib2c.old-api.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.old-api.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -35,8 +35,8 @@ FindVarMethod var_${i}; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.old-api.conf */ #include diff --git a/local/mib2c.org-mode.conf b/local/mib2c.org-mode.conf new file mode 100644 index 0000000..428aadc --- /dev/null +++ b/local/mib2c.org-mode.conf @@ -0,0 +1,74 @@ +@define object@ +******* ${objecttodo}$o ($o.subid) + + OID: $o.objectID + + Type: $o.perltype + + Access: $o.access + + Status: $o.status +@if $o.ranges@ + + Ranges +@foreach $start, $end range $o@ + $start - $end +@end@ +@end@ +@if $o.enums@ +********* Enums +@foreach $label, $value enum@ + $value: $label +@end@ +@end@ +********* Description + $o.description +@enddefine@ +## +@open -@ +We're about to generate an Emacs org-mode file for you. First, though, +a couple of quick questions: + +@prompt $dotodo Do you want us to put TODO labels on the tables (y/n):@ +@if "$dotodo" eq "y"@ +@eval $tabletodo = "TODO "@ +@end@ + +@prompt $dotodo Do you want us to put TODO labels on the notifications (y/n):@ +@if "$dotodo" eq "y"@ +@eval $notificationtodo = "TODO "@ +@end@ + +What about objects, such as table columns and notification varbinds? +@prompt $dotodo Do you want us to put TODO labels on these objects (y/n):@ +@if "$dotodo" eq "y"@ +@eval $objecttodo = "TODO "@ +@end@ +## +@open ${name}.org@ +MIB Information for $name.module::$name + +This file was created with /mib2c -c mib2c.org-mode.conf $name/ + +* Scalars +@foreach $o scalar@ +@calldefine object@ +@end@ +* Tables +@foreach $t table@ +*** ${tabletodo}$t ($t.objectID) +***** Description + $t.description +***** Indexes: +@foreach $o index@ +@calldefine object@ +@end@ +***** Columns: +@foreach $o nonindex@ +@calldefine object@ +@end@ +@end@ +* Notifications +@foreach $n notifications@ +*** Description + $n.description +*** ${notificationtodo}$n ($n.objectID) +@foreach $o varbinds@ +@calldefine object@ +@end@ +@end@ diff --git a/local/mib2c.raw-table.conf b/local/mib2c.raw-table.conf index bd88fdb..e152d2c 100644 --- a/local/mib2c.raw-table.conf +++ b/local/mib2c.raw-table.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id: mib2c.raw-table.conf 17436 2009-03-31 15:12:19Z dts12 $ + * Note: this file originally auto-generated by mib2c + * using mib2c.raw-table.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -18,8 +18,8 @@ void init_$name(void); ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id: mib2c.raw-table.conf 17436 2009-03-31 15:12:19Z dts12 $ + * Note: this file originally auto-generated by mib2c + * using mib2c.raw-table.conf */ #include diff --git a/local/mib2c.row.conf b/local/mib2c.row.conf index f736baa..5453c10 100644 --- a/local/mib2c.row.conf +++ b/local/mib2c.row.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.row.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -82,8 +82,8 @@ struct ${i}_entry { ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.row.conf */ #include diff --git a/local/mib2c.scalar.conf b/local/mib2c.scalar.conf index 3024fa4..41b6c19 100644 --- a/local/mib2c.scalar.conf +++ b/local/mib2c.scalar.conf @@ -4,8 +4,8 @@ ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.scalar.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -22,8 +22,8 @@ Netsnmp_Node_Handler handle_${i}; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.scalar.conf */ #include diff --git a/local/mib2c.table_data.conf b/local/mib2c.table_data.conf index 2cc665c..0b784ef 100644 --- a/local/mib2c.table_data.conf +++ b/local/mib2c.table_data.conf @@ -32,8 +32,8 @@ Invalid value for 'cache' ($cache) - generating caching code ###################################################################### @open ${name}.h@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.table_data.conf */ #ifndef $name.uc_H #define $name.uc_H @@ -62,8 +62,8 @@ NetsnmpCacheFree ${i}_free; ###################################################################### @open ${name}.c@ /* - * Note: this file originally auto-generated by mib2c using - * $Id$ + * Note: this file originally auto-generated by mib2c + * using mib2c.table_data.conf */ #include @@ -106,6 +106,7 @@ initialize_table_$i(void) @if "$cache" == 1 @ netsnmp_cache *cache; @end@ + int ret; DEBUGMSGTL(("${name}:init", "initializing table $i\n")); @@ -148,9 +149,14 @@ initialize_table_$i(void) table_info->min_column = COLUMN_$first_column.uc; table_info->max_column = COLUMN_$last_column.uc; - netsnmp_tdata_register( reg, table_data, table_info ); + rc = netsnmp_tdata_register(reg, table_data, table_info); + if (rc) { + snmp_log(LOG_ERR, "%s: netsnmp_tdata_register() returned %d\n", + __func__, rc); + return; + } @if "$cache" == 1 @ - if (cache) + if (cache) netsnmp_inject_handler_before( reg, netsnmp_cache_handler_GET(cache), TABLE_TDATA_NAME); @end@ diff --git a/local/minimalist/feature-check b/local/minimalist/feature-check index aa4987e..d8d9bb4 100644 --- a/local/minimalist/feature-check +++ b/local/minimalist/feature-check @@ -67,7 +67,7 @@ touch $destination; # process requires firstrequire=1 -for i in `grep NSF_RR $tmpf | sed 's/ NSF_RR//'` ; do +for i in `grep NSF_RR $tmpf | sed 's/ NSF_RR;//'` ; do if test $firstrequire = 1 ; then echo "" >> $destination echo "/* required by $sourcedir/$source */" >> $destination @@ -79,7 +79,7 @@ done # process provides firstfeature=1 -for i in `grep NSF_PP $tmpf | sed 's/ NSF_PP//'` ; do +for i in `grep NSF_PP $tmpf | sed 's/ NSF_PP;//'` ; do if test $firstfeature = 1 ; then echo "" >> $destination echo "/* features provided by $sourcedir/$source */" >> $destination @@ -91,7 +91,7 @@ done # process children firstfeature=1 -for i in `grep NSF_CO $tmpf | sed 's/ NSF_CO//'` ; do +for i in `grep NSF_CO $tmpf | sed 's/ NSF_CO;//'` ; do parent=`echo $i | sed 's/.*,//'` child=`echo $i | sed 's/,.*//'` if test $firstfeature = 1 ; then @@ -107,7 +107,7 @@ done # process wants firstfeature=1 -for i in `grep NSF_WW $tmpf | sed 's/ NSF_WW//'` ; do +for i in `grep NSF_WW $tmpf | sed 's/ NSF_WW;//'` ; do if test $firstfeature = 1 ; then echo "" >> $destination echo "/* features wanted by $sourcedir/$source */" >> $destination diff --git a/local/net-snmp-cert b/local/net-snmp-cert index a45dc57..9aab016 100644 --- a/local/net-snmp-cert +++ b/local/net-snmp-cert @@ -1003,7 +1003,7 @@ sub make_openssl_conf { rdir = . dir = $ENV::DIR RANDFILE = $rdir/.rand -MD = sha1 +MD = sha512 KSIZE = 2048 CN = net-snmp.org EMAIL = admin@net-snmp.org diff --git a/local/pass_persisttest b/local/pass_persisttest index f4045cc..47e58ac 100644 --- a/local/pass_persisttest +++ b/local/pass_persisttest @@ -62,6 +62,10 @@ while (<>){ ($req eq "$place.5")) { $ret = "$place.5.0";} # netSnmpPassCounter.0 elsif (($req =~ m/$place\.5\..*/) || ($req eq "$place.6")) { $ret = "$place.6.0";} # netSnmpPassGauge.0 + elsif (($req =~ m/$place\.6\..*/) || + ($req eq "$place.7")) { $ret = "$place.7.0";} # netSnmpPassCounter64.0 + elsif (($req =~ m/$place\.7\..*/) || + ($req eq "$place.8")) { $ret = "$place.8.0";} # netSnmpPassInteger64.0 else { print "NONE\n"; next; @@ -92,6 +96,10 @@ while (<>){ print "counter\n$counter\n"; } elsif ($ret eq "$place.6.0") { print "gauge\n42\n"; + } elsif ($ret eq "$place.7.0") { + print "counter64\n9223372036854775806\n"; + } elsif ($ret eq "$place.8.0") { + print "integer64\n9223372036854775807\n"; } else { print "string\nack... $ret $req\n"; } diff --git a/local/snmp-bridge-mib b/local/snmp-bridge-mib index 880ea6b..c6a7fae 100644 --- a/local/snmp-bridge-mib +++ b/local/snmp-bridge-mib @@ -998,7 +998,7 @@ sub readindexes() opendir(DIR, $brifdir) or return -1; my @interfaces = readdir(DIR); - next if ($#interfaces lt 2); + next if ($#interfaces < 2); foreach my $if (@interfaces) { next if $if eq "."; next if $if eq ".."; diff --git a/ltmain.sh b/ltmain.sh index ed1814f..0f0a2da 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -1,9 +1,12 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -23,885 +26,2112 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.4 -TIMESTAMP="" -package_revision=1.3293 +VERSION=2.4.6 +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +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 + # Pre-4.2 versions of Zsh do 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 + 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 - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. : ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" -dirname="s,/[^/]*$,," -basename="s,^.*/,," -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation +# 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' +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation +## ----------------- ## +## Global variables. ## +## ----------------- ## -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` -# Make sure we have an absolute path for reexecution: +# Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=$func_dirname_result + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; *) - save_IFS="$IFS" - IFS=: + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS="$save_IFS" + IFS=$_G_IFS test -x "$progdir/$progname" && break done - IFS="$save_IFS" + IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' +## ----------------- ## +## Standard options. ## +## ----------------- ## -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Standard options: opt_dry_run=false -opt_help=false opt_quiet=false opt_verbose=false -opt_warning=: -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} +## -------------------- ## +## Resource management. ## +## -------------------- ## -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. - # bash bug again: - : -} -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () { - func_error ${1+"$@"} - exit $EXIT_FAILURE -} + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" + require_term_colors=: } -help="Try \`$progname --help' for more information." ## default -# func_grep expression filename +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { + $debug_cmd + $GREP "$1" "$2" >/dev/null 2>&1 } -# func_mkdir_p directory-path +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - my_directory_path="$1" - my_dir_list= + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do + while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" + _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac + case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : + $MKDIR "$_G_dir" 2>/dev/null || : done - IFS="$save_mkdir_p_IFS" + IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi } -# func_mktempdir [string] +# func_mktempdir [BASENAME] +# ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. +# given, BASENAME is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + $debug_cmd - if test "$opt_dry_run" = ":"; then + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" + _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - if test ! -d "$my_tmpdir"; then + if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + _G_tmpdir=$_G_template-${RANDOM-0}$$ - save_mktempdir_umask=`umask` + func_mktempdir_umask=`umask` umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi - $ECHO "$my_tmpdir" + $ECHO "$_G_tmpdir" } -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. func_quote_for_eval () { + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) - func_quote_for_eval_unquoted_result="$1" ;; + _G_arg=$1 ;; esac - case $func_quote_for_eval_unquoted_result in + case $_G_arg in # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. + # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + _G_arg=\"$_G_arg\" ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () { - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac + $debug_cmd - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} - func_quote_for_expand_result="$my_arg" + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + func_parse_options_result= - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } -# func_version -# Echo version message to standard output and exit. -func_version () +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () { - $opt_debug + $debug_cmd - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. + +# func_help +# --------- +# Echo long help message to standard output and exit. func_help () { - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $opt_debug + $debug_cmd - func_error "missing argument for $1." + func_error "Missing argument for '$1'." exit_cmd=exit } -# func_split_short_opt shortopt +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () { - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + $debug_cmd - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () { - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' + $debug_cmd - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} -exit_cmd=: +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + exit $? +} -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation + $debug_cmd -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} -# func_arith arithmetic-term... -func_arith () +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () { - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation + $debug_cmd + $warning_func ${1+"$@"} +} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" -# func_lo2o object -func_lo2o () +# Additional text appended to 'usage_message' in response to '--help'. +func_help () { - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi -# func_fatal_configuration arg... +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -919,17 +2149,19 @@ func_config () exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -938,309 +2170,350 @@ func_features () exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF - fi + fi - exit $EXIT_MISMATCH - fi + exit $EXIT_MISMATCH + fi } -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + nonopt= + preserve_args= -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_verbose=: -opt_silent=false -opt_verbose=false + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () { - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done + $debug_cmd - # Validate options: + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - $opt_help || { - # Sanity checks first: - func_check_version_match - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift fi - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } +func_add_hook func_validate_options libtool_validate_options +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + ## ----------- ## ## Main. ## ## ----------- ## +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1248,13 +2521,13 @@ func_lalib_unsafe_p () for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1263,7 +2536,8 @@ func_lalib_unsafe_p () # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -1288,7 +2562,7 @@ func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1307,11 +2581,13 @@ func_ltwrapper_p () # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1323,10 +2599,11 @@ func_execute_cmds () # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1353,10 +2630,10 @@ func_resolve_sysroot () # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case "$lt_sysroot:$1" in + case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" + func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. @@ -1373,7 +2650,8 @@ func_replace_sysroot () # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1392,7 +2670,7 @@ func_infer_tag () for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. @@ -1417,7 +2695,7 @@ func_infer_tag () # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1433,15 +2711,15 @@ func_infer_tag () # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1449,7 +2727,7 @@ func_write_libtool_object () $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` + $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -1513,18 +2792,19 @@ func_convert_core_file_wine_to_w32 () # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $opt_debug + $debug_cmd + # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" + func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -1553,7 +2833,8 @@ func_convert_core_path_wine_to_w32 () # environment variable; do not put it in $PATH. func_cygpath () { - $opt_debug + $debug_cmd + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -1562,7 +2843,7 @@ func_cygpath () fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath @@ -1573,10 +2854,11 @@ func_cygpath () # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $opt_debug + $debug_cmd + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -1587,13 +2869,14 @@ func_convert_core_msys_to_w32 () # func_to_host_file_result to ARG1). func_convert_file_check () { - $opt_debug - if test -z "$2" && test -n "$1" ; then + $debug_cmd + + if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" - func_error " \`$1'" + func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result="$1" + func_to_host_file_result=$1 fi } # end func_convert_file_check @@ -1605,10 +2888,11 @@ func_convert_file_check () # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $opt_debug + $debug_cmd + if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " \`$3'" + func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -1617,7 +2901,7 @@ func_convert_path_check () func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result="$3" + func_to_host_path_result=$3 fi fi } @@ -1629,9 +2913,10 @@ func_convert_path_check () # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $opt_debug + $debug_cmd + case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" + $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in @@ -1645,7 +2930,7 @@ func_convert_path_front_back_pathsep () ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via `$to_host_file_cmd ARG' +# invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -1656,7 +2941,8 @@ func_convert_path_front_back_pathsep () # in func_to_host_file_result. func_to_host_file () { - $opt_debug + $debug_cmd + $to_host_file_cmd "$1" } # end func_to_host_file @@ -1668,7 +2954,8 @@ func_to_host_file () # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $opt_debug + $debug_cmd + case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -1686,7 +2973,7 @@ func_to_tool_file () # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result="$1" + func_to_host_file_result=$1 } # end func_convert_file_noop @@ -1697,11 +2984,12 @@ func_convert_file_noop () # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1713,8 +3001,9 @@ func_convert_file_msys_to_w32 () # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -1730,11 +3019,12 @@ func_convert_file_cygwin_to_w32 () # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1746,12 +3036,13 @@ func_convert_file_nix_to_w32 () # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1764,13 +3055,14 @@ func_convert_file_msys_to_cygwin () # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1780,7 +3072,7 @@ func_convert_file_nix_to_cygwin () ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via `$to_host_path_cmd ARG' +# invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -1804,10 +3096,11 @@ func_convert_file_nix_to_cygwin () to_host_path_cmd= func_init_to_host_path_cmd () { - $opt_debug + $debug_cmd + if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" + to_host_path_cmd=func_convert_path_$func_stripname_result fi } @@ -1817,7 +3110,8 @@ func_init_to_host_path_cmd () # in func_to_host_path_result. func_to_host_path () { - $opt_debug + $debug_cmd + func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -1828,7 +3122,7 @@ func_to_host_path () # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result="$1" + func_to_host_path_result=$1 } # end func_convert_path_noop @@ -1839,8 +3133,9 @@ func_convert_path_noop () # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -1848,7 +3143,7 @@ func_convert_path_msys_to_w32 () func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1862,8 +3157,9 @@ func_convert_path_msys_to_w32 () # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -1882,14 +3178,15 @@ func_convert_path_cygwin_to_w32 () # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1903,15 +3200,16 @@ func_convert_path_nix_to_w32 () # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1926,8 +3224,9 @@ func_convert_path_msys_to_cygwin () # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -1936,7 +3235,7 @@ func_convert_path_nix_to_cygwin () func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1945,13 +3244,31 @@ func_convert_path_nix_to_cygwin () # end func_convert_path_nix_to_cygwin +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1964,12 +3281,12 @@ func_mode_compile () case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1979,7 +3296,7 @@ func_mode_compile () case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; @@ -2008,12 +3325,12 @@ func_mode_compile () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -2026,8 +3343,8 @@ func_mode_compile () # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; @@ -2042,13 +3359,13 @@ func_mode_compile () func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -2059,7 +3376,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -2068,7 +3385,7 @@ func_mode_compile () case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -2077,8 +3394,8 @@ func_mode_compile () for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -2104,17 +3421,17 @@ func_mode_compile () func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -2126,16 +3443,16 @@ func_mode_compile () pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -2144,12 +3461,12 @@ func_mode_compile () # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -2157,7 +3474,7 @@ func_mode_compile () This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2179,11 +3496,11 @@ compiler." qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -2200,7 +3517,7 @@ compiler." func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2211,7 +3528,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2227,20 +3544,20 @@ compiler." fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then + if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi @@ -2249,7 +3566,7 @@ compiler." func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2260,7 +3577,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2280,7 +3597,7 @@ compiler." func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -2290,7 +3607,7 @@ compiler." } $opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () @@ -2310,7 +3627,7 @@ func_mode_help () Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -2329,16 +3646,16 @@ This mode accepts the following additional options: -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -2351,7 +3668,7 @@ This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -2370,7 +3687,7 @@ Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -2380,7 +3697,7 @@ the \`--dry-run' option if you just want to see what would be executed." Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -2406,7 +3723,7 @@ The following components of LINK-COMMAND are treated specially: -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -2420,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially: -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -2440,20 +3758,20 @@ The following components of LINK-COMMAND are treated specially: -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -2464,7 +3782,7 @@ is created, otherwise an executable program is created." Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -2472,17 +3790,17 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { @@ -2490,7 +3808,7 @@ if $opt_help; then for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -2498,7 +3816,7 @@ if $opt_help; then func_mode_help done } | - sed '1d + $SED '1d /^When reporting/,/^Report/{ H d @@ -2515,16 +3833,17 @@ fi # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in @@ -2534,7 +3853,7 @@ func_mode_execute () # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -2545,18 +3864,18 @@ func_mode_execute () if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -2564,18 +3883,18 @@ func_mode_execute () *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -2587,7 +3906,7 @@ func_mode_execute () # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -2600,12 +3919,12 @@ func_mode_execute () if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac @@ -2613,7 +3932,15 @@ func_mode_execute () func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -2630,25 +3957,18 @@ func_mode_execute () done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug + $debug_cmd + libs= libdirs= admincmds= @@ -2662,11 +3982,11 @@ func_mode_finish () if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "\`$opt' is not a valid libtool archive" + func_warning "'$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument \`$opt'" + func_fatal_error "invalid argument '$opt'" fi done @@ -2681,12 +4001,12 @@ func_mode_finish () # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -2711,7 +4031,7 @@ func_mode_finish () fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -2722,27 +4042,27 @@ func_mode_finish () echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" + $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo @@ -2761,18 +4081,20 @@ func_mode_finish () exit $EXIT_SUCCESS } -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -2799,7 +4121,7 @@ func_mode_install () opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg @@ -2812,7 +4134,7 @@ func_mode_install () fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2830,7 +4152,7 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2855,7 +4177,7 @@ func_mode_install () func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else @@ -2877,19 +4199,19 @@ func_mode_install () dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2898,7 +4220,7 @@ func_mode_install () case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2907,7 +4229,7 @@ func_mode_install () # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2927,7 +4249,7 @@ func_mode_install () # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2949,7 +4271,7 @@ func_mode_install () fi func_dirname "$file" "/" "" - dir="$func_dirname_result" + dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then @@ -2963,7 +4285,7 @@ func_mode_install () # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2972,29 +4294,36 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -3005,7 +4334,7 @@ func_mode_install () if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -3016,14 +4345,14 @@ func_mode_install () fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -3035,11 +4364,11 @@ func_mode_install () # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -3049,11 +4378,11 @@ func_mode_install () staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -3062,7 +4391,7 @@ func_mode_install () func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -3074,23 +4403,23 @@ func_mode_install () *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -3118,19 +4447,19 @@ func_mode_install () # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -3138,29 +4467,29 @@ func_mode_install () func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { + $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -3197,15 +4526,17 @@ func_mode_install () for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3213,18 +4544,18 @@ func_mode_install () done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$opt_mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -3232,16 +4563,17 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"} # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -3252,7 +4584,7 @@ func_generate_dlsyms () "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -3260,34 +4592,36 @@ func_generate_dlsyms () func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -3295,7 +4629,7 @@ extern \"C\" { progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -3315,10 +4649,10 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -3328,7 +4662,7 @@ extern \"C\" { } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -3342,22 +4676,22 @@ extern \"C\" { fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" + name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" + dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then + if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" + dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -3365,7 +4699,7 @@ extern \"C\" { fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then + if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -3421,6 +4755,11 @@ extern \"C\" { echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -3429,11 +4768,30 @@ typedef struct { void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -3470,14 +4828,12 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -3494,10 +4850,10 @@ static const void *lt_preloaded_setup() { func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -3515,7 +4871,7 @@ static const void *lt_preloaded_setup() { esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -3529,6 +4885,32 @@ static const void *lt_preloaded_setup() { fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -3538,8 +4920,9 @@ static const void *lt_preloaded_setup() { # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -3549,16 +4932,29 @@ func_win32_libid () # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -3590,7 +4986,8 @@ func_win32_libid () # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $opt_debug + $debug_cmd + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -3607,7 +5004,8 @@ func_cygming_dll_for_implib () # specified import library. func_cygming_dll_for_implib_fallback_core () { - $opt_debug + $debug_cmd + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -3643,8 +5041,8 @@ func_cygming_dll_for_implib_fallback_core () /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -3655,30 +5053,6 @@ func_cygming_dll_for_implib_fallback_core () $SED -e '/^\./d;/^.\./d;q' } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -3692,16 +5066,17 @@ func_cygming_ms_implib_p () # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then + elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result="" + sharedlib_from_linklib_result= fi } @@ -3709,10 +5084,11 @@ func_cygming_dll_for_implib_fallback () # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -3721,7 +5097,7 @@ func_extract_an_archive () fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -3735,22 +5111,23 @@ func_extract_an_archive () # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -3762,7 +5139,7 @@ func_extract_archives () esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -3775,22 +5152,23 @@ func_extract_archives () cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do @@ -3812,7 +5190,7 @@ func_extract_archives () my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -3827,7 +5205,7 @@ func_extract_archives () # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -3838,7 +5216,7 @@ func_emit_wrapper () #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3895,9 +5273,9 @@ _LTECHO_EOF' # 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 +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3930,7 +5308,7 @@ func_parse_lt_options () # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3941,7 +5319,7 @@ func_lt_dump_args () lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3955,7 +5333,7 @@ func_exec_program_core () *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3965,7 +5343,7 @@ func_exec_program_core () *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -3982,14 +5360,17 @@ func_exec_program_core () # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + 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+\"\$@\"} } @@ -4037,13 +5418,13 @@ func_exec_program () test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -4060,7 +5441,7 @@ func_exec_program () if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -4095,7 +5476,7 @@ func_exec_program () fi # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -4115,7 +5496,7 @@ func_exec_program () fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -4134,7 +5515,7 @@ func_emit_cwrapperexe_src () cat < #include +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -4228,8 +5607,8 @@ int setenv (const char *, const char *, int); # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -4262,10 +5641,10 @@ int setenv (const char *, const char *, int); #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -4294,11 +5673,16 @@ void lt_dump_script (FILE *f); EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -5057,9 +6441,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5070,27 +6460,47 @@ EOF # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -5134,10 +6544,11 @@ func_mode_link () module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -5149,7 +6560,7 @@ func_mode_link () vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -5157,15 +6568,15 @@ func_mode_link () do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -5198,7 +6609,7 @@ func_mode_link () # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -5215,21 +6626,21 @@ func_mode_link () case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -5237,9 +6648,9 @@ func_mode_link () continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -5249,7 +6660,7 @@ func_mode_link () continue ;; *) - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -5260,14 +6671,14 @@ func_mode_link () esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -5285,7 +6696,13 @@ func_mode_link () continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -5309,21 +6726,21 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5334,7 +6751,7 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5342,23 +6759,23 @@ func_mode_link () # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5366,7 +6783,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5374,24 +6791,29 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -5403,7 +6825,7 @@ func_mode_link () func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -5418,7 +6840,7 @@ func_mode_link () continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; @@ -5458,7 +6880,7 @@ func_mode_link () esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -5472,7 +6894,7 @@ func_mode_link () -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -5504,7 +6926,7 @@ func_mode_link () if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -5538,9 +6960,9 @@ func_mode_link () func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -5551,8 +6973,8 @@ func_mode_link () *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in @@ -5587,7 +7009,7 @@ func_mode_link () ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -5595,11 +7017,11 @@ func_mode_link () ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -5608,16 +7030,16 @@ func_mode_link () ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -5627,6 +7049,11 @@ func_mode_link () continue ;; + -mllvm) + prev=mllvm + continue + ;; + -module) module=yes continue @@ -5643,7 +7070,8 @@ func_mode_link () continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -5655,7 +7083,7 @@ func_mode_link () ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -5669,8 +7097,8 @@ func_mode_link () *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -5688,6 +7116,11 @@ func_mode_link () continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -5775,14 +7208,14 @@ func_mode_link () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5791,15 +7224,15 @@ func_mode_link () func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5822,7 +7255,7 @@ func_mode_link () # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -5838,22 +7271,42 @@ func_mode_link () # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; *.$objext) @@ -5874,21 +7327,21 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5899,7 +7352,7 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5907,23 +7360,23 @@ func_mode_link () # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5931,7 +7384,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5939,7 +7392,7 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; @@ -5955,11 +7408,11 @@ func_mode_link () # A libtool-controlled library. func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -5974,7 +7427,7 @@ func_mode_link () # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; esac # arg @@ -5986,9 +7439,9 @@ func_mode_link () done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -5997,20 +7450,23 @@ func_mode_link () oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -6033,7 +7489,7 @@ func_mode_link () # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6041,7 +7497,7 @@ func_mode_link () func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -6073,7 +7529,7 @@ func_mode_link () case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -6081,7 +7537,7 @@ func_mode_link () prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -6093,29 +7549,29 @@ func_mode_link () for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -6136,25 +7592,26 @@ func_mode_link () esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6164,13 +7621,13 @@ func_mode_link () continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -6178,31 +7635,22 @@ func_mode_link () for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -6210,19 +7658,19 @@ func_mode_link () old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -6231,15 +7679,25 @@ func_mode_link () *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6252,18 +7710,18 @@ func_mode_link () case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6274,13 +7732,13 @@ func_mode_link () func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -6298,7 +7756,7 @@ func_mode_link () lib=$func_resolve_sysroot_result ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -6309,21 +7767,26 @@ func_mode_link () case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -6331,18 +7794,13 @@ func_mode_link () echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6353,10 +7811,10 @@ func_mode_link () esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -6369,22 +7827,20 @@ func_mode_link () continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -6414,30 +7870,30 @@ func_mode_link () done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6451,26 +7907,26 @@ func_mode_link () # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib="$l" + linklib=$l done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -6484,40 +7940,40 @@ func_mode_link () # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then + if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -6526,11 +7982,11 @@ func_mode_link () name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi - case "$host" in + case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -6574,9 +8030,9 @@ func_mode_link () if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -6586,14 +8042,14 @@ func_mode_link () fi - if test "$linkmode" = prog && test "$pass" != link; then + if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= @@ -6605,14 +8061,14 @@ func_mode_link () ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6622,15 +8078,15 @@ func_mode_link () continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -6659,9 +8115,9 @@ func_mode_link () esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -6670,19 +8126,19 @@ func_mode_link () link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then + if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -6692,24 +8148,24 @@ func_mode_link () # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -6737,43 +8193,43 @@ func_mode_link () # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -6781,58 +8237,58 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$opt_mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6841,10 +8297,10 @@ func_mode_link () ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6852,7 +8308,7 @@ func_mode_link () *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi @@ -6862,15 +8318,15 @@ func_mode_link () *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -6879,33 +8335,33 @@ func_mode_link () fi fi - if test "$linkmode" = prog || test "$opt_mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6914,10 +8370,10 @@ func_mode_link () ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6925,43 +8381,43 @@ func_mode_link () test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6974,11 +8430,11 @@ func_mode_link () fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -6992,12 +8448,12 @@ func_mode_link () *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -7007,7 +8463,7 @@ func_mode_link () func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -7016,12 +8472,12 @@ func_mode_link () func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -7029,12 +8485,12 @@ func_mode_link () dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -7042,35 +8498,35 @@ func_mode_link () case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -7082,23 +8538,23 @@ func_mode_link () fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -7108,12 +8564,12 @@ func_mode_link () esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -7171,62 +8627,93 @@ func_mode_link () eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then + if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" + oldlibs=$output func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -7235,10 +8722,10 @@ func_mode_link () eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -7252,8 +8739,8 @@ func_mode_link () esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" @@ -7262,21 +8749,21 @@ func_mode_link () fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -7285,20 +8772,20 @@ func_mode_link () fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -7306,41 +8793,42 @@ func_mode_link () case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows|none) + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -7348,30 +8836,30 @@ func_mode_link () case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -7386,26 +8874,36 @@ func_mode_link () # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -7416,69 +8914,74 @@ func_mode_link () nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - func_append verstring ":${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -7492,42 +8995,45 @@ func_mode_link () verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" + func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + test " " = "$libobjs" && libobjs= - if test "$opt_mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -7536,8 +9042,8 @@ func_mode_link () case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue @@ -7553,11 +9059,11 @@ func_mode_link () fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -7578,13 +9084,13 @@ func_mode_link () *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -7594,7 +9100,7 @@ func_mode_link () done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -7603,7 +9109,7 @@ func_mode_link () esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -7627,7 +9133,7 @@ func_mode_link () ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then + if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; @@ -7643,9 +9149,9 @@ func_mode_link () # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -7674,20 +9180,20 @@ EOF -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7717,20 +9223,20 @@ EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7767,24 +9273,24 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test "$want_nocaseglob" = yes; then + if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -7802,25 +9308,25 @@ EOF # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7828,7 +9334,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7851,30 +9357,30 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7882,7 +9388,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7898,18 +9404,18 @@ EOF done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7933,8 +9439,8 @@ EOF ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7943,12 +9449,12 @@ EOF if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7959,14 +9465,14 @@ EOF echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -8012,7 +9518,7 @@ EOF *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -8020,20 +9526,25 @@ EOF dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8058,12 +9569,8 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -8076,8 +9583,8 @@ EOF test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -8087,19 +9594,19 @@ EOF eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do @@ -8113,7 +9620,7 @@ EOF delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi @@ -8122,31 +9629,31 @@ EOF cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do - IFS="$save_ifs" + IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -8160,7 +9667,7 @@ EOF try_normal_branch=no ;; esac - if test "$try_normal_branch" = yes \ + if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -8171,7 +9678,7 @@ EOF output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=${output_objdir}/${output_la}.nm + output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -8194,8 +9701,8 @@ EOF break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -8203,16 +9710,16 @@ EOF fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8231,11 +9738,11 @@ EOF ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -8246,7 +9753,7 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8255,18 +9762,18 @@ EOF fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -8284,7 +9791,7 @@ EOF fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -8317,8 +9824,8 @@ EOF last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs @@ -8330,14 +9837,14 @@ EOF func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi @@ -8352,7 +9859,7 @@ EOF else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -8364,13 +9871,13 @@ EOF func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -8380,10 +9887,10 @@ EOF reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -8395,9 +9902,9 @@ EOF # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" @@ -8405,9 +9912,9 @@ EOF output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -8416,16 +9923,16 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8433,7 +9940,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8442,7 +9949,7 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -8450,18 +9957,18 @@ EOF fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8470,7 +9977,7 @@ EOF export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -8484,7 +9991,7 @@ EOF # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -8506,7 +10013,7 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -8514,11 +10021,12 @@ EOF test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8526,7 +10034,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8535,10 +10043,10 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -8558,39 +10066,39 @@ EOF done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -8598,7 +10106,7 @@ EOF ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -8611,17 +10119,19 @@ EOF # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" + gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8630,12 +10140,12 @@ EOF fi # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -8647,7 +10157,7 @@ EOF exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -8657,12 +10167,12 @@ EOF # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -8679,16 +10189,14 @@ EOF output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -8702,11 +10210,11 @@ EOF *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -8742,7 +10250,7 @@ EOF *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" @@ -8766,7 +10274,7 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8789,7 +10297,7 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -8806,10 +10314,10 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -8817,7 +10325,7 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8842,45 +10350,43 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -8893,12 +10399,12 @@ EOF fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8928,9 +10434,9 @@ EOF fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -8947,27 +10453,28 @@ EOF exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -9024,8 +10531,8 @@ EOF func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -9046,7 +10553,7 @@ EOF trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -9069,25 +10576,27 @@ EOF # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -9095,13 +10604,13 @@ EOF fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -9122,7 +10631,7 @@ EOF : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -9131,7 +10640,7 @@ EOF for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -9153,6 +10662,8 @@ EOF esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9198,18 +10709,18 @@ EOF else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -9226,7 +10737,7 @@ EOF case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -9241,30 +10752,31 @@ EOF fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -9280,23 +10792,23 @@ EOF *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -9306,34 +10818,34 @@ EOF # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -9349,10 +10861,9 @@ EOF case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -9361,7 +10872,7 @@ EOF esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -9375,7 +10886,7 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -9401,7 +10912,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -9416,27 +10927,29 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; + -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -9449,18 +10962,18 @@ func_mode_uninstall () for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - odir="$dir/$objdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then + if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -9475,11 +10988,11 @@ func_mode_uninstall () elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -9493,7 +11006,7 @@ func_mode_uninstall () done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$opt_mode" in + case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; @@ -9504,12 +11017,12 @@ func_mode_uninstall () uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -9525,21 +11038,19 @@ func_mode_uninstall () func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then + if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$opt_mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -9566,12 +11077,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -9580,7 +11091,7 @@ func_mode_uninstall () func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -9590,16 +11101,17 @@ func_mode_uninstall () exit $exit_status } -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi test -z "$opt_mode" && { - help="$generic_help" + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -9610,7 +11122,7 @@ exit $exit_status # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -9633,5 +11145,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff --git a/m4/libtool.m4 b/m4/libtool.m4 index d812584..a3bc337 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,8 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,36 +8,30 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -67,7 +59,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -91,7 +83,7 @@ dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -111,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -146,6 +155,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -175,15 +186,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -196,7 +208,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -207,14 +219,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -267,14 +279,14 @@ no_glob_subst='s/\*/\\\*/g' # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN @@ -284,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -419,8 +431,8 @@ m4_define([_lt_decl_all_varnames], # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -444,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl +available_tags='_LT_TAGS'dnl ]) @@ -472,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], @@ -498,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], @@ -545,7 +557,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -558,7 +570,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -574,7 +586,7 @@ _LT_OUTPUT_LIBTOOL_INIT # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this +# '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -596,7 +608,7 @@ AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl +test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -619,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -637,11 +649,11 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." -while test $[#] != 0 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -654,10 +666,10 @@ do lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -683,7 +695,7 @@ chmod +x "$CONFIG_LT" # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: -test "$silent" = yes && +test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false @@ -703,32 +715,47 @@ m4_defun([_LT_CONFIG], _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -737,7 +764,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -754,8 +781,6 @@ _LT_EOF sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -773,7 +798,6 @@ _LT_EOF [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -801,6 +825,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +847,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +902,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -942,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -954,7 +1008,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1022,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -971,8 +1032,9 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1052,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1000,32 +1064,32 @@ _LT_EOF ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1035,8 +1099,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1045,27 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1085,7 +1151,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then +if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1103,7 +1169,7 @@ else _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1123,8 +1189,8 @@ m4_define([_LT_SHELL_INIT], # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1152,10 +1218,10 @@ fi # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case "$ECHO" in +case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1181,16 +1247,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1200,14 +1267,14 @@ case ${with_sysroot} in #( no|'') ;; #( *) - AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) +[dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1215,31 +1282,33 @@ m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1268,9 +1337,46 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1280,9 +1386,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1301,7 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1319,25 +1438,39 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; -sparc*-*solaris*) - # Find out which ABI we are using. +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1351,7 +1484,7 @@ sparc*-*solaris*) ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1370,11 +1503,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -1382,7 +1515,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ]) ]) -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1413,14 +1546,14 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1449,7 +1582,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1476,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2], $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1498,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION], m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1517,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2], fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1541,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN], AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1581,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1600,6 +1733,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1626,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1657,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1685,7 +1824,7 @@ m4_defun([_LT_HEADER_DLFCN], # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1732,9 +1871,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1760,7 +1899,7 @@ int main () return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1781,7 +1920,7 @@ rm -fr conftest* # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1791,44 +1930,52 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1837,21 +1984,21 @@ else ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1861,7 +2008,7 @@ else lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl @@ -1871,9 +2018,9 @@ else ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -1965,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS], m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -1976,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -2004,8 +2151,8 @@ objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2017,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH], _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2039,12 +2186,12 @@ else fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2068,7 +2215,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2086,6 +2233,47 @@ _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2096,17 +2284,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2122,28 +2311,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2157,7 +2353,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2166,7 +2362,7 @@ fi]) library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2183,56 +2379,109 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2242,27 +2491,27 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -2274,7 +2523,7 @@ bsdi[[45]]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -2283,8 +2532,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -2300,17 +2549,17 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -2319,8 +2568,8 @@ m4_if([$1], [],[ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -2347,7 +2596,7 @@ m4_if([$1], [],[ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2360,8 +2609,8 @@ m4_if([$1], [],[ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -2374,7 +2623,7 @@ m4_if([$1], [],[ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2387,8 +2636,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2398,18 +2647,14 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,25 +2662,26 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2454,25 +2700,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2490,14 +2726,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2505,8 +2742,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -2515,8 +2752,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -2526,11 +2763,11 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2541,16 +2778,16 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -2569,8 +2806,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -2579,13 +2816,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +linux*android*) + version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2610,7 +2867,12 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -2630,12 +2892,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -2644,8 +2906,8 @@ netbsd*) ;; newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -2654,58 +2916,68 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2713,11 +2985,11 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -2727,20 +2999,20 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -2761,24 +3033,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -2793,19 +3065,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2814,20 +3086,30 @@ uts4*) ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2860,39 +3142,41 @@ _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -2915,11 +3199,11 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -2937,7 +3221,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2964,16 +3248,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -2987,7 +3271,7 @@ if test "$GCC" = yes; then while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -2998,37 +3282,37 @@ if test "$GCC" = yes; then with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3114,13 +3435,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3147,8 +3468,7 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -3184,10 +3504,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3225,8 +3541,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3248,8 +3564,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3302,6 +3618,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) @@ -3342,33 +3661,38 @@ AC_DEFUN([LT_PATH_NM], AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3379,21 +3703,21 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -3401,8 +3725,8 @@ else esac fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3448,8 +3772,8 @@ lt_cv_sharedlib_from_linklib_cmd, case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3461,7 +3785,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) @@ -3488,13 +3812,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + # LT_LIB_M # -------- # check for math library @@ -3506,11 +3845,11 @@ case $host in # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3529,7 +3868,7 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3581,7 +3920,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3614,14 +3953,44 @@ case `$NM -V 2>&1` in symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3639,20 +4008,24 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -3692,11 +4065,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -3722,7 +4095,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3742,9 +4115,9 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -3765,7 +4138,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3792,12 +4165,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3813,17 +4190,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3834,8 +4212,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3851,6 +4229,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3900,7 +4283,7 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -3941,14 +4324,14 @@ m4_if([$1], [CXX], [ case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -3977,7 +4360,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -3985,7 +4368,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -4130,17 +4513,18 @@ m4_if([$1], [CXX], [ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4151,8 +4535,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -4169,6 +4553,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -4229,7 +4618,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4237,7 +4628,7 @@ m4_if([$1], [CXX], [ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4245,11 +4636,30 @@ m4_if([$1], [CXX], [ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -4265,7 +4675,7 @@ m4_if([$1], [CXX], [ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4274,9 +4684,9 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4301,6 +4711,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4321,18 +4737,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4383,7 +4814,7 @@ m4_if([$1], [CXX], [ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4412,7 +4843,7 @@ m4_if([$1], [CXX], [ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4478,21 +4909,27 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4517,7 +4954,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4533,9 +4969,9 @@ m4_if([$1], [CXX], [ # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -4551,7 +4987,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4559,7 +4995,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -4569,7 +5005,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -4591,24 +5027,24 @@ dnl Note also adjust exclude_expsyms for C++ above. esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -4621,7 +5057,7 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -4640,7 +5076,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4656,7 +5092,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4666,7 +5102,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -4674,61 +5110,89 @@ _LT_EOF _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4739,43 +5203,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4789,8 +5257,8 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4808,8 +5276,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4821,7 +5289,7 @@ _LT_EOF _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -4836,9 +5304,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4855,15 +5323,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4879,7 +5347,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported @@ -4887,34 +5355,57 @@ _LT_EOF ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -4933,13 +5424,21 @@ _LT_EOF _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -4958,61 +5457,80 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5021,7 +5539,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5051,35 +5569,37 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5088,7 +5608,7 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5110,10 +5630,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5126,7 +5642,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5142,34 +5658,33 @@ _LT_EOF ;; hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5177,25 +5692,25 @@ _LT_EOF ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5203,14 +5718,14 @@ _LT_EOF # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -5221,7 +5736,7 @@ _LT_EOF *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -5232,16 +5747,16 @@ _LT_EOF ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5254,21 +5769,31 @@ _LT_EOF end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -5283,7 +5808,7 @@ _LT_EOF newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5291,27 +5816,19 @@ _LT_EOF *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -5322,33 +5839,53 @@ _LT_EOF _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5359,24 +5896,24 @@ _LT_EOF solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5386,11 +5923,11 @@ _LT_EOF solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi @@ -5400,10 +5937,10 @@ _LT_EOF ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -5452,43 +5989,43 @@ _LT_EOF ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -5503,17 +6040,17 @@ _LT_EOF ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5530,7 +6067,7 @@ x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5607,18 +6144,15 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the + "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -5659,10 +6193,10 @@ dnl [Compiler flag to generate thread safe objects]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5702,18 +6236,18 @@ if test -n "$compiler"; then LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5721,8 +6255,12 @@ if test -n "$compiler"; then ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5730,13 +6268,13 @@ if test -n "$compiler"; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG @@ -5744,14 +6282,14 @@ CC="$lt_save_CC" # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes @@ -5767,7 +6305,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -5794,7 +6331,7 @@ _LT_TAGVAR(objext, $1)=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5836,35 +6373,35 @@ if test "$_lt_caught_CXX_error" != yes; then if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5900,18 +6437,30 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -5921,6 +6470,13 @@ if test "$_lt_caught_CXX_error" != yes; then ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5939,13 +6495,21 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5963,64 +6527,84 @@ if test "$_lt_caught_CXX_error" != yes; then fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -6030,7 +6614,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6058,57 +6642,58 @@ if test "$_lt_caught_CXX_error" != yes; then # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6119,6 +6704,34 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_DARWIN_LINKER_FEATURES($1) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -6137,7 +6750,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6153,18 +6766,15 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default @@ -6176,7 +6786,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6185,11 +6795,11 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6199,15 +6809,15 @@ if test "$_lt_caught_CXX_error" != yes; then ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -6233,13 +6843,13 @@ if test "$_lt_caught_CXX_error" != yes; then aCC*) case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -6250,20 +6860,20 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6278,22 +6888,22 @@ if test "$_lt_caught_CXX_error" != yes; then interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -6302,22 +6912,22 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6325,8 +6935,8 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6335,10 +6945,10 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -6352,59 +6962,59 @@ if test "$_lt_caught_CXX_error" != yes; then # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -6418,18 +7028,18 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -6437,10 +7047,10 @@ if test "$_lt_caught_CXX_error" != yes; then *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -6498,22 +7108,17 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -6529,9 +7134,9 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6549,17 +7154,17 @@ if test "$_lt_caught_CXX_error" != yes; then cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6574,21 +7179,21 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -6634,9 +7239,9 @@ if test "$_lt_caught_CXX_error" != yes; then # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6644,7 +7249,7 @@ if test "$_lt_caught_CXX_error" != yes; then solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; @@ -6661,30 +7266,30 @@ if test "$_lt_caught_CXX_error" != yes; then ;; gcx*) # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -6692,11 +7297,11 @@ if test "$_lt_caught_CXX_error" != yes; then output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6705,52 +7310,52 @@ if test "$_lt_caught_CXX_error" != yes; then ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -6781,10 +7386,10 @@ if test "$_lt_caught_CXX_error" != yes; then esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6811,7 +7416,7 @@ if test "$_lt_caught_CXX_error" != yes; then lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -6833,13 +7438,14 @@ AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6898,12 +7504,18 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -6917,13 +7529,13 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -6939,16 +7551,16 @@ if AC_TRY_EVAL(ac_compile); then case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -6956,9 +7568,9 @@ if AC_TRY_EVAL(ac_compile); then esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= @@ -6973,15 +7585,15 @@ if AC_TRY_EVAL(ac_compile); then continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7012,51 +7624,6 @@ interix[[3-9]]*) _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac ]) @@ -7065,7 +7632,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) @@ -7085,10 +7652,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then +if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi @@ -7100,7 +7667,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7126,7 +7692,7 @@ _LT_TAGVAR(objext, $1)=$objext # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7148,7 +7714,7 @@ if test "$_lt_disable_F77" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7162,21 +7728,25 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7184,11 +7754,11 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7205,9 +7775,9 @@ if test "$_lt_disable_F77" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7217,11 +7787,11 @@ AC_LANG_POP # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test "X$FC" = "Xno"; then +if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi @@ -7233,7 +7803,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7259,7 +7828,7 @@ _LT_TAGVAR(objext, $1)=$objext # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7281,7 +7850,7 @@ if test "$_lt_disable_FC" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7297,21 +7866,25 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7319,11 +7892,11 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7343,7 +7916,7 @@ if test "$_lt_disable_FC" != yes; then GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7353,7 +7926,7 @@ AC_LANG_POP # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7387,7 +7960,7 @@ CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -7420,11 +7993,82 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -7440,7 +8084,7 @@ _LT_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" +lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER @@ -7450,7 +8094,7 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -7479,7 +8123,7 @@ AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -7489,6 +8133,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -7583,7 +8234,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7600,9 +8251,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7626,27 +8277,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], []) # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7670,102 +8301,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine which file name conversion functions should be used by +# Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 17cfd51..94b0829 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -1,14 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 7 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[ dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL], _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], @@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared], *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], @@ -226,14 +228,14 @@ AC_ARG_ENABLE([static], *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], @@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install], *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) +the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -319,19 +321,85 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -344,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 index 9000a05..48bc934 100644 --- a/m4/ltsugar.m4 +++ b/m4/ltsugar.m4 @@ -1,6 +1,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -33,7 +34,7 @@ m4_define([_lt_join], # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], @@ -44,7 +45,7 @@ m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index 9c7b5d4..fa04b52 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index c573da9..c6b26f8 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -1,6 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -11,7 +12,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # @@ -25,7 +26,7 @@ # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until diff --git a/m4/netsnmp_search_libs.m4 b/m4/netsnmp_search_libs.m4 index bdd8a12..3942f81 100644 --- a/m4/netsnmp_search_libs.m4 +++ b/m4/netsnmp_search_libs.m4 @@ -16,16 +16,17 @@ AC_DEFUN([NETSNMP_SEARCH_LIBS], LIBS="${netsnmp_temp_LIBS}" AC_LINK_IFELSE([AC_LANG_CALL([],[$1])], [netsnmp_result="none required"], + ifelse([$2],[],[], [for netsnmp_cur_lib in $2 ; do LIBS="-l${netsnmp_cur_lib} ${netsnmp_temp_LIBS}" AC_LINK_IFELSE([AC_LANG_CALL([],[$1])], [netsnmp_result=-l${netsnmp_cur_lib} break]) - done]) + done])) LIBS="${netsnmp_func_search_save_LIBS}" [netsnmp_cv_func_$1_]netsnmp_target="${netsnmp_result}"]) - if test "${[netsnmp_cv_func_$1_]netsnmp_target}" != "no" ; then - if test "${[netsnmp_cv_func_$1_]netsnmp_target}" != "none required" ; then + if test "x${[netsnmp_cv_func_$1_]netsnmp_target}" != "xno" ; then + if test "x${[netsnmp_cv_func_$1_]netsnmp_target}" != "xnone required" ; then netsnmp_target="${netsnmp_result} ${netsnmp_target_val}" fi $3 diff --git a/m4/pkg.m4 b/m4/pkg.m4 new file mode 100644 index 0000000..c5b26b5 --- /dev/null +++ b/m4/pkg.m4 @@ -0,0 +1,214 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR diff --git a/man/Makefile.in b/man/Makefile.in index 01fe852..6120437 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,7 +1,6 @@ # # Makefile for the man page directory # -top_builddir=.. VPATH = @srcdir@ # @@ -14,7 +13,7 @@ OTHERUNINSTALL=manuninstall # local stuff # -MAN1 = snmpinform.1 snmp-bridge-mib.1 +MAN1 = snmpinform.1 snmp-bridge-mib.1 snmptop.1 @NETSNMP_HAVE_AGENTX_LIBS_TRUE@AGENTXTRAP = agentxtrap.1 @NETSNMP_HAVE_AGENTX_LIBS_FALSE@AGENTXTRAP = @@ -22,7 +21,8 @@ MAN1 = snmpinform.1 snmp-bridge-mib.1 MAN1G = $(AGENTXTRAP) snmpbulkget.1 snmpcmd.1 snmpget.1 snmpset.1 snmpwalk.1 \ snmpbulkwalk.1 snmpgetnext.1 snmptest.1 snmptranslate.1 snmptrap.1 \ snmpusm.1 snmpvacm.1 snmptable.1 snmpstatus.1 snmpconf.1 mib2c.1 \ - snmpnetstat.1 snmpdelta.1 snmpdf.1 encode_keychange.1 fixproc.1 \ + snmpnetstat.1 snmpdelta.1 snmpdf.1 snmpps.1 encode_keychange.1 \ + fixproc.1 \ net-snmp-config.1 mib2c-update.1 tkmib.1 traptoemail.1 \ net-snmp-create-v3-user.1 @@ -128,6 +128,9 @@ snmpdelta.1: $(srcdir)/snmpdelta.1.def ../sedscript snmpdf.1: $(srcdir)/snmpdf.1.def ../sedscript $(SED) -f ../sedscript < $(srcdir)/snmpdf.1.def > snmpdf.1 +snmpps.1: $(srcdir)/snmpps.1.def ../sedscript + $(SED) -f ../sedscript < $(srcdir)/snmpps.1.def > snmpps.1 + snmpget.1: $(srcdir)/snmpget.1.def ../sedscript $(SED) -f ../sedscript < $(srcdir)/snmpget.1.def > snmpget.1 diff --git a/man/mib2c.conf.5.in b/man/mib2c.conf.5.in index 3692a65..8c6e065 100644 --- a/man/mib2c.conf.5.in +++ b/man/mib2c.conf.5.in @@ -1,6 +1,6 @@ .TH MIB2C.CONF 5 "28 Apr 2004" VVERSIONINFO "Net-SNMP" .SH NAME -mib2c.conf \[em] How to write mib2c.conf files to do ANYTHING based on MIB input. +mib2c.conf \- How to write mib2c.conf files to do ANYTHING based on MIB input. .SH SYNOPSIS % cat > mib2c.test.conf << EOF @foreach $t table@ diff --git a/man/net-snmp-config.1.def b/man/net-snmp-config.1.def index 3a0fa2b..cfdd4dc 100644 --- a/man/net-snmp-config.1.def +++ b/man/net-snmp-config.1.def @@ -30,7 +30,7 @@ code for a list of available debug tokens SNMP Setup commands: .TP \fB\-\-create\-snmpv3\-user\fR [\-ro] [\-a authpass] [\-x privpass] -[\-X DES|AES] [\-A MD5|SHA] [username] +[\-X DES|AES] [\-A MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224] [username] .PP These options produce the various compilation flags needed when building external SNMP applications: diff --git a/man/netsnmp_config_api.3.def b/man/netsnmp_config_api.3.def index d009fc5..90b20d9 100644 --- a/man/netsnmp_config_api.3.def +++ b/man/netsnmp_config_api.3.def @@ -365,7 +365,9 @@ function that it should abort the operation of the application. SNMPCONFPATH A colon separated list of directories to search for configuration files in. -Default: SYSCONFDIR/snmp:DATADIR/snmp:LIBDIR/snmp:$HOME/.snmp +Default: +.br +SYSCONFDIR/snmp:\:DATADIR/snmp:\:LIBDIR/snmp:\:$HOME/.snmp .SH "SEE ALSO" netsnmp_mib_api(3), snmp_api(3) .\" Local Variables: diff --git a/man/netsnmp_mib_api.3.def b/man/netsnmp_mib_api.3.def index 2e1da8f..4c297cd 100644 --- a/man/netsnmp_mib_api.3.def +++ b/man/netsnmp_mib_api.3.def @@ -277,7 +277,8 @@ A colon separated list of MIB modules to load. .br The default list of modules will depend on how the Net-SNMP software was originally compiled, but is typically: -IP\-MIB:IF\-MIB:TCP\-MIB:UDP\-MIB:SNMPv2\-MIB:RFC1213\-MIB: UCD\-SNMP\-MIB:HOST\-RESOURCES\-MIB +.br +IP\-MIB:\:IF\-MIB:\:TCP\-MIB:\:UDP\-MIB:\:SNMPv2\-MIB:\:RFC1213\-MIB:\:UCD\-SNMP\-MIB:\:HOST\-RESOURCES\-MIB .IP If the value of the .B MIBS diff --git a/man/snmp.conf.5.def b/man/snmp.conf.5.def index 46203d0..e14df27 100644 --- a/man/snmp.conf.5.def +++ b/man/snmp.conf.5.def @@ -108,6 +108,8 @@ turns on debugging for all applications run if set to 1. defines the debugging tokens that should be turned on when \fIdoDebugging\fR is set. This is equivalent to the \fB\-D\fR option. +.IP "debugLogLevel (emerg|alert|crit|err|warning|notice|info|debug)" +Set the priority level for logging of debug output. Defaults to debug. .\".IP "16bitIDs (1|yes|true|0|no|false)" .IP "16bitIDs yes" restricts requestIDs, etc to 16-bit values. @@ -127,6 +129,11 @@ This value is also used by \fBsnmpd\fR when generating notifications. .\" But not responses to an incoming request? .\" What about snmptrapd? .\" +.IP "clientaddrUsesPort no" +specifies, if clientaddr option contains a port number. Set this option +to "yes", if clientaddr contains a port number and this port should +be used for sending outgoing SNMP requests. This option only affects +IPv4 client addresses and is ignored for IPv6 client addresses. .IP "clientRecvBuf INTEGER" specifies the desired size of the buffer to be used when receiving responses to SNMP requests. @@ -177,7 +184,15 @@ Specifies the timeout in seconds between retries. .\" .\" XXX - It is probably about time to remove this choice! .\" +.SH SNMPv1/SNMPv2c SETTINGS +.IP "disableSNMPv1 (1|yes|true|0|no|false)" +.IP "disableSNMPv2c (1|yes|true|0|no|false)" +Disables protocol versions at runtime. Incoming and outgoing packets for +the protocol will be dropped. .SH SNMPv3 SETTINGS +.IP "disableSNMPv3 (1|yes|true|0|no|false)" +Disables protocol versions at runtime. Incoming and outgoing packets for +the protocol will be dropped. .IP "defSecurityName STRING" defines the default security name to use for SNMPv3 requests. This can be overridden using the \fB\-u\fR option. @@ -205,7 +220,7 @@ The .B defPassphrase value will be used for the authentication and/or privacy pass phrases if either of the other directives are not specified. -.IP "defAuthType MD5|SHA" +.IP "defAuthType MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224" .IP "defPrivType DES|AES" define the default authentication and privacy protocols to use for SNMPv3 requests. @@ -303,6 +318,17 @@ This directive will be ignored if the platforms does not support .IP "serverSendBuf INTEGER" is similar to \fIserverRecvBuf\fR, but applies to the size of the buffer used when sending SNMP responses. +.IP +.IP "sourceFilterType none|acceptlist|blocklist" +specifies whether or not addresses added with \fIsourceFilterAddress\fR are +accepted or blocked. The default is none, indicating that incoming +packets will not be checked agains the filter list. +.IP +.IP "sourceFilterAddress ADDRESS" +specifies an address to be added to the source address filter list. +\fIsourceFilterType\fR configuration determines whether or not addresses are +accepted or blocked. +.IP .SH MIB HANDLING .IP "mibdirs DIRLIST" specifies a list of directories to search for MIB files. @@ -393,6 +419,12 @@ Equivalent to Disables the use of DISPLAY-HINT information when parsing indices and values to set. Equivalent to .BR \-Ih . +.IP "outputPrecision PRECISION" +Uses the PRECISION string to allow modification of the value output +format. See snmpcmd(1) for details. +Equivalent to +.BR \-Op +(which takes precedence over the config file). .SH FILES .IP "System-wide configuration files:" SYSCONFDIR/snmp/snmp.conf diff --git a/man/snmpcmd.1.def b/man/snmpcmd.1.def index e4df8b2..141d505 100644 --- a/man/snmpcmd.1.def +++ b/man/snmpcmd.1.def @@ -50,7 +50,7 @@ In addition to the options described in this manual page, all of the tokens described in the \fIsnmp.conf\fR and other .conf manual pages can be used on the command line of Net-SNMP applications as well by prefixing them with "\-\-". EG, specifying -\fI\-\-dontLoadHostConfig=true\fR on the command line will turn of +\fI\-\-dontLoadHostConfig=true\fR on the command line will turn off loading of the host specific configuration files. .PP The snmp.conf file settings and the double-dash arguments over-ride @@ -279,7 +279,8 @@ file, see .I snmp.conf(5). .TP .BI \-a " authProtocol" -Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 +Set the authentication protocol (MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224) +used for authenticated SNMPv3 messages. Overrides the \fIdefAuthType\fR token in the .I snmp.conf file. @@ -622,6 +623,17 @@ Displays the OID numerically: .br \fC .1.3.6.1.2.1.1.3.0 = Timeticks: (14096763) 1 day, 15:09:27.63\fR .TP +.B -Op PRECISION +Uses the PRECISION string to allow modification of the value output format. +This is used with OPAQUE float/double at the moment, but might be usabe for +other types in the future. Allowed PRECISION strings are compatible to the +flag/field with/precision part of the printf(3) function: +.br +\fC $ snmpget localhost outputVoltage.1 + WIENER-CRATE-MIB::outputVoltage.u0 = Opaque: Float: 0.000000 V + $ snmpget -Op +020.12 localhost outputVoltage.1 + WIENER-CRATE-MIB::outputVoltage.u0 = Opaque: Float: +000000.000000000000 V\fR +.TP .B \-Oq Removes the equal sign and type information when displaying varbind values: .br @@ -705,6 +717,9 @@ messages can be controlled by passing various parameters to the .B \-L flag. .TP +.B \-Ln +Disable all logging. +.TP .B \-Le Log messages to the standard error stream. .TP @@ -726,9 +741,10 @@ priorities of message. Using standard error logging as an example: .TP .B \-LE pri will log messages of priority 'pri' and above to standard error. +See below for possible 'pri' values- .TP -.B \-LE p1\-p2 -will log messages with priority between 'p1' and 'p2' (inclusive) to +.B \-LE pri1\-pri2 +will log messages with priority between 'pri1' and 'pri2' (inclusive) to standard error. .PP For @@ -736,6 +752,7 @@ For and .B \-LS the priority specification comes before the file or facility token. +.PP The priorities recognised are: .IP .B 0 @@ -888,7 +905,9 @@ The standard prefix for object identifiers (when using UCD-style output). Defaults to .iso.org.dod.internet.mgmt.mib\-2 .IP MIBS The list of MIBs to load. Defaults to -SNMPv2\-TC:SNMPv2\-MIB:IF\-MIB:IP\-MIB:TCP\-MIB:UDP\-MIB:SNMP\-VACM\-MIB. +.br +SNMPv2\-TC:\:SNMPv2\-MIB:\:IF\-MIB:\:IP\-MIB:\:TCP\-MIB:\:UDP\-MIB:\:SNMP\-VACM\-MIB. +.br Overridden by the .B \-m option. diff --git a/man/snmpd.8.def b/man/snmpd.8.def index f173396..5d47b6e 100644 --- a/man/snmpd.8.def +++ b/man/snmpd.8.def @@ -55,9 +55,11 @@ the \-D flag and the listed TOKENs. Do not fork() from the calling shell. .TP .B \-g \fIGID -Change to the numerical group ID +Change the group ID of the snmpd process into .I GID -after opening listening sockets. +after opening listening sockets. This overrides the +.I agentgroup +configuration file parameter. .TP .B \-h, \-\-help Display a brief usage message and then exit. @@ -78,9 +80,9 @@ To get a list of compiled modules, run the agent with the arguments .I "\-Dmib_init \-H" (assuming debugging support has been compiled in). .TP -.B \-L[efos] +.B \-L[eEfFoOsSnN] Specify where logging output should be directed (standard error or output, -to a file or via syslog). See LOGGING OPTIONS in snmpcmd(5) for details. +to a file or via syslog). See LOGGING OPTIONS in snmpcmd(1) for details. .TP .BR \-m " \fIMIBLIST" Specifies a colon separated list of MIB modules to load for this @@ -111,10 +113,12 @@ if files only accessible to root (such as /dev/kmem etc.) cannot be opened. .TP .B \-u \fIUID -Change to the user ID +Change the user ID of the snmpd process into .I UID (which can be given in numerical or textual form) after opening -listening sockets. +listening sockets. This overrides the +.I agentuser +configuration file parameter. .TP .B \-U Instructs the agent to not remove its pid file (see the diff --git a/man/snmpd.conf.5.def b/man/snmpd.conf.5.def index 2a8a3d3..4760eb3 100644 --- a/man/snmpd.conf.5.def +++ b/man/snmpd.conf.5.def @@ -78,7 +78,7 @@ this to unlimited is not considered safe if your user population can not be trusted. A repeat number greater than this will be truncated to this value. .IP -This is set by default to -1. +This is set by default to \-1. .IP "maxGetbulkResponses NUM" Sets the maximum number of responses allowed for a getbulk request. This is set by default to 100. Set to 0 to enable the default and set @@ -87,11 +87,33 @@ time, setting this to unlimited is not considered safe if your user population can not be trusted. .IP In general, the total number of responses will not be allowed to -exceed the maxGetbulkResponses number and the total number returned +exceed the maxGetbulkResponses number, and the total number returned will be an integer multiple of the number of variables requested times the calculated number of repeats allow to fit below this number. .IP -Also not that processing of maxGetbulkRepeats is handled first. +Also note that processing of maxGetbulkRepeats is handled first. +.IP "ifmib_max_num_ifaces NUM" +Sets the maximum number of interfaces included in IF-MIB data collection. +For servers with a large number of interfaces (ppp, dummy, bridge, etc) +the IF-MIB processing will take a large chunk of CPU for ioctl calls +(on Linux). Setting a reasonable maximum for the CPU used will +reduce the CPU load for IF-MIB processing. For example, configuring +"ifmib_max_num_ifaces 500" will include only the first 500 interfaces +based on ifindex and ignore all others for IF-MIB processing. +.IP +The default (without this configured) is to include all interfaces. +.IP "include_ifmib_iface_prefix PREFIX1 PREFIX2 ..." +Sets the interface name prefixes to include in the IF-MIB data collection. +For servers with a large number of interfaces (ppp, dummy, bridge, etc) +the IF-MIB processing will take a large chunk of CPU for ioctl calls +(on Linux). A set of space separated interface name prefixes will +reduce the CPU load for IF-MIB processing. For example, configuring +"include_ifmib_iface_prefix eth dummy lo" will include only interfaces +with these prefixes and ignore all others for IF-MIB processing. If +regex support is compiled in, each of the prefixes is a regular +expression (which is not permitted to contain a space or tab character). +.IP +The default (without this configured) is to include all interfaces. .SS SNMPv3 Configuration - Real Security SNMPv3 is added flexible security models to the SNMP packet structure so that multiple security solutions could be used. SNMPv3 was @@ -262,16 +284,17 @@ them. It is recommended you .B "use the net\-snmp\-config command" to do this, but you can also do it by directly specifying createUser directives yourself instead: -.IP "createUser [\-e ENGINEID] username (MD5|SHA) authpassphrase [DES|AES] [privpassphrase]" +.IP "createUser [\-e ENGINEID] username (MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224) authpassphrase [DES|AES] [privpassphrase]" .IP -MD5 and SHA are the authentication types to use. DES and AES are the -privacy protocols to use. If the privacy +MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224 are the authentication types to use. +DES and AES are the privacy protocols to use. If the privacy passphrase is not specified, it is assumed to be the same as the authentication passphrase. Note that the users created will be useless unless they are also added to the VACM access control tables described above. .IP -SHA authentication and DES/AES privacy require OpenSSL to be installed and +SHA|SHA-512|SHA-384|SHA-256|SHA-224 authentication and DES/AES privacy +require OpenSSL to be installed and the agent to be built with OpenSSL support. MD5 authentication may be used without OpenSSL. .IP @@ -390,6 +413,20 @@ a particular range of source addresses, or globally (\fI"default"\fR). A restricted source can either be a specific hostname (or address), or a subnet - represented as IP/MASK (e.g. 10.10.10.0/255.255.255.0), or IP/BITS (e.g. 10.10.10.0/24), or the IPv6 equivalents. +A restriction preceded by an exclamation mark (!) denies access from +that address or subnet, e.g., !10.10.10.0/24 denies requests from +that sources in that subnet. Deny restrictions must be before +permit. E.g., the following example permits access from all of 10.0.0.0/8 +except for 10.10.10.0/24: +.RS +.RS +com2sec sec1 !10.10.10.0/24 public +.br +com2sec sec1 10.0.0.0/8 public +.RE +.RE +.IP +Access from outside of 10.0.0.0/8 would still be denied. .IP The same community string can be specified in several separate directives (presumably with different source tokens), and the first source/community @@ -571,11 +608,24 @@ to determine the list of devices that will be scanned. .IP The pattern can include one or more wildcard expressions. See \fIsnmpd.examples(5)\fR for illustration of the wildcard syntax. +.IP "ignoremount [-r] STRING" +controls which mounts should be omitted from the hrStorageTable. +If the Net-SNMP agent gets hung on accessing a filesystem, or the +filesystem is always mostly full (and thus leads to spurious alerts), +you can omit it by listing the full path in this directive. +.RE +.IP +If the "-r" option is provided, the pattern can include one or more +regular expressions. .IP "skipNFSInHostResources true" controls whether NFS and NFS-like file systems should be omitted from the hrStorageTable (true or 1) or not (false or 0, which is the default). If the Net-SNMP agent gets hung on NFS-mounted filesystems, you can try setting this to '1'. +.RE +.IP +Alternately, more granular control over which mounts should be omitted +from the hrStorageTable can be achieved via the \fIignoremount\fR directive. .IP "storageUseNFS [1|2]" controls how NFS and NFS-like file systems should be reported in the hrStorageTable. @@ -652,6 +702,8 @@ This requires that the agent was built with support for the default build configuration). .IP "disk PATH [ MINSPACE | MINPERCENT% ]" monitors the disk mounted at PATH for available disk space. +Disks mounted after the agent has started will not be monitored, +unless \fIincludeAllDisks\fR option is specified. .IP The minimum threshold can either be specified in kB (MINSPACE) or as a percentage of the total disk (MINPERCENT% with a '%' character), @@ -668,6 +720,9 @@ the problem - see the DisMan Event MIB section later. .IP "includeAllDisks MINPERCENT%" configures monitoring of all disks found on the system, using the specified (percentage) threshold. +The \fCdskTable\fR is dynamically updated, unmounted disks +disappear from the table and newly mounted disks are +added to the table. The threshold for individual disks can be adjusted using suitable \fIdisk\fR directives (which can come either before or after the \fIincludeAllDisks\fR directive). @@ -680,12 +735,8 @@ may affect the indexing of the \fCdskTable\fR. Only one \fIincludeAllDisks\fR directive should be specified - any subsequent copies will be ignored. .IP -The list of mounted disks will be determined when the agent starts using the -setmntent(3) and getmntent(3), or fopen(3) and getmntent(3), or -setfsent(3) and getfsent(3) system calls. If none of the above -system calls are available then the root partition "/" -(which is assumed to exist on any UNIX based system) will be monitored. -Disks mounted after the agent has started will not be monitored. +The list of mounted disks will be determined from +HOST-RESOURCES-MIB::hrFSTable. .\" .\" XXX - unless the config is re-read ?? .\" @@ -714,6 +765,15 @@ e.g. "loop0" .IP "diskio_exclude_ram yes" Excludes all LInux ramdisk block devices, whose names start with "ram", e.g. "ram0" +.PP +On Linux systems, it is also possible to report only explicitly accepted +devices. It may take significant amount of time to process diskIOTable data +on systems with tens of thousands of block devices and accept only the +important ones avoids large CPU consumption. +.IP "diskio " +Enables acceptlist of devices and adds the device to the acceptlist. Only +explicitly acceptlisted devices will be reported. This option may be used +multiple times. .SS System Load Monitoring This requires that the agent was built with support for either the \fIucd\-snmp/loadave\fR module or the \fIucd\-snmp/memory\fR module @@ -826,9 +886,9 @@ can configure \fIsnmpd\fR to take a more active role. defines the default community string to be used when sending traps. Note that this directive must be used prior to any community-based trap destination directives that need to use it. -.IP "trapsink HOST [COMMUNITY [PORT]]" -.IP "trap2sink HOST [COMMUNITY [PORT]]" -.IP "informsink HOST [COMMUNITY [PORT]]" +.IP "trapsink [-profile p] [-name n] [-tag t] [-s src] HOST [COMMUNITY [PORT]]" +.IP "trap2sink [-profile p] [-name n] [-tag t] [-s src] HOST [COMMUNITY [PORT]]" +.IP "informsink [-profile p] [-name n] [-tag t] [-s src] HOST [COMMUNITY [PORT]]" define the address of a notification receiver that should be sent SNMPv1 TRAPs, SNMPv2c TRAP2s, or SNMPv2 INFORM notifications respectively. See the section @@ -850,6 +910,21 @@ This mechanism is being deprecated, and the listening port should be specified via the transport specification HOST instead. .RE .IP +The optional name and tag parameters specifies the name or tag that will +be used for SNMP-NOTIFICATION-MIB table entries. The profile specifies +which notification filter profile entry will be used for filtering +outgoing notifications. (See \fInotificationFilter\fR) +.IP +The optional src parameter specifies the source address that will +be used when sending the trap packet to this sink. +It is specified as a , using the same + as the destination HOST. +See the section +.B LISTENING ADDRESSES +in the +.I snmpd(8) +manual page for more information about the format. +.IP If several sink directives are specified, multiple copies of each notification (in the appropriate formats) will be generated. @@ -858,7 +933,7 @@ will be generated. It is \fBnot\fR normally appropriate to list two (or all three) sink directives with the same destination. .RE -.IP "trapsess [SNMPCMD_ARGS] HOST" +.IP "trapsess [-profile p] [-name n] [-tag t] [-s src] [SNMPCMD_ARGS] HOST" provides a more generic mechanism for defining notification destinations. .I "SNMPCMD_ARGS" should be the command-line options required for an equivalent @@ -866,10 +941,28 @@ should be the command-line options required for an equivalent The option \fI\-Ci\fR can be used (with \fI\-v2c\fR or \fI\-v3\fR) to generate an INFORM notification rather than an unacknowledged TRAP. .IP +The optional name and tag parameters specifies the name or tag that will +be used for SNMP-NOTIFICATION-MIB table entries. The profile specifies +which notification filter profile entry will be used for filtering +outgoing notifications. (See \fInotificationFilter\fR) +.IP This is the appropriate directive for defining SNMPv3 trap receivers. See http://www.net\-snmp.org/tutorial/tutorial\-5/commands/snmptrap\-v3.html for more information about SNMPv3 notification behaviour. +.IP "notificationFilter NAME OID MASK TYPE" +specifies a SNMP-NOTIFICATION-MIB notification filter profile, which may +be used to filter traps. TYPE must be included or excluded, Some examples: +.RS +.IP +.nf +notificationFilter all_ok .1.3 0x00 included +notificationFilter no_coldstart .1.3 0x00 included +notificationFilter no_coldstart .1.3.6.1.6.3.1.1.5.1 0x00 excluded + +trapsink -profile no_coldstart 192.168.1.3:3162 secret3 +.fi +.RE .IP "authtrapenable {1|2}" determines whether to generate authentication failure traps (\fIenabled(1)\fR) or not (\fIdisabled(2)\fR - the default). @@ -926,7 +1019,9 @@ Note that the event will only be triggered once, when the expression first matches. This monitor entry will not fire again until the monitored condition first becomes false, and then matches again. NAME is an administrative name for this expression, and is used for -indexing the \fCmteTriggerTable\fR (and related tables). +indexing the \fCmteTriggerTable\fR (and related tables). Each monitor +line must have a unique NAME. Monitor lines with a duplicate name are +discarded and cause snmpd to log a duplicate index complaint. Note also that such monitors use an internal SNMPv3 request to retrieve the values being monitored (even if normal agent queries typically use SNMPv1 or SNMPv2c). See the \fIiquerySecName\fP token described above. @@ -1284,7 +1379,7 @@ Attempting to define an unaccompanied \fIexecfix\fR directive will fail. .PP \fIexec\fR and \fIsh\fR extensions can only be configured via the snmpd.conf file. They cannot be set up via SNMP SET requests. -.IP "extend [MIBOID] NAME PROG ARGS" +.IP "extend [-cacheTime TIME] [-execType TYPE] [MIBOID] NAME PROG ARGS" works in a similar manner to the \fIexec\fR directive, but with a number of improvements. The MIB tables (\fInsExtendConfigTable\fR etc) are indexed by the NAME token, so are unaffected by the order in @@ -1294,6 +1389,14 @@ containing the exit status, the first line and full output (as a single string) for each \fIextend\fR entry, and the other (\fInsExtendOutput2Table\fR) containing the complete output as a series of separate lines. .IP +If -cacheTime is specified, then its argument is used as the cache timeout +(in whole seconds) for this \fIextend\fR entry. This mechanism provides a +non-volatile way to specify the cache timeout. +.IP +If -execType is specified and has a value of \fIsh\fR, then this \fIextend\fR +entry will be run in a shell. Otherwise it will be run in the default \fIexec\fR +fashion. This mechanism provides a non-volatile way to specify the exec type. +.IP If MIBOID is specified, then the configuration and result tables will be rooted at this point in the OID tree, but are otherwise structured in exactly the same way. This means that several separate \fIextend\fR @@ -1338,10 +1441,11 @@ respectively, where OID is the requested OID. The PROG command should return the response varbind as three separate lines printed to stdout - the first line should be the OID of the returned value, the second should be its TYPE (one of the text strings -.B integer, gauge, counter, timeticks, ipaddress, objectid, +.B integer, gauge, counter, timeticks, ipaddress, objectid, octet, or .B string -), and the third should be the value itself. +), and the third should be the value itself. (Note: octets are sent as +ASCII, space-separated hex strings, e.g. "00 3f dd 00 c6 be".) .IP If the command cannot return an appropriate varbind - e.g the specified OID did not correspond to a valid instance for a GET request, or there diff --git a/man/snmpps.1.def b/man/snmpps.1.def new file mode 100644 index 0000000..1a05b62 --- /dev/null +++ b/man/snmpps.1.def @@ -0,0 +1,75 @@ +.\" See the Net-SNMP's COPYING file for details and copyrights +.\" that may apply. +.\" ******************************************************************/ +.TH SNMPPS 1 "04 Nov 2013" VVERSIONINFO "Net-SNMP" +.SH NAME +snmpps - display process table on a network entity via SNMP +.SH SYNOPSIS +.B snmpps +[COMMON OPTIONS] [\-Cp] [\-Ca] [\-C n | m | t ] AGENT +.PP +.B snmptop +[COMMON OPTIONS] [\-Cp] [\-Ca] [\-C n | m | t ] AGENT +.SH DESCRIPTION +.B snmpps +is a networked version of a simple \fIps\fR command. It +checks the processes on the remote machine by examining the +HOST\-RESOURCES\-MIB's \fIhrSWRunTable\fR and the \fIhrSWRunPerfTable\fR. +.PP +AGENT identifies a target SNMP agent, which is instrumented +to monitor the given objects. At its simplest, the AGENT +specification will consist of a hostname or an IPv4 +address. In this situation, the command will attempt +communication with the agent, using UDP/IPv4 to port 161 +of the given target host. See the +.I snmpcmd(1) +manual page for a full list of the possible formats for AGENT. + +.B snmptop +emulates the \fItop\fR command using SNMP. While running, the keyboard +inputs of 'c', 'n', 'm', 't' switches sorting between cpu, pid, memory, +or total runtime. +Typing 'i' toggles hiding idle processes, while 'o' toggles hiding Os processes. +Typing 'a' toggles display of hrSWRunParameters, 'p' toggles display +of hrSWRunPath. + +.SH "OPTIONS" +.TP 8 +.B COMMON OPTIONS +Please see +.I snmpcmd(1) +for a list of possible values for COMMON OPTIONS +as well as their descriptions. +.TP +.B \-Cp +Show hrSWRunPath in addition to hrSWRunName +.TP +.B \-Ca +Show hrSWRunParameters in addition to hrSWRunName +.TP +.B \-Ct +Sort display by total CPU usage +.TP +.B \-Cm +Sort display by memory usage +.TP +.B \-Cn +Sort display numeric by PID +.SH "EXAMPLES" +.PP +% snmpps \-v 2c \-c public localhost +.PP +.nf +Index Type Status Memory CPU Command + 1 Appl Wait 1.00MB 1.29 init + 554 Appl Wait 364.00kB 0.03 udevd + 1813 Appl Run 6.73MB 0.41 snmpd + 1833 Appl Wait 1.27MB 3.49 rsyslogd + 1871 Appl Wait 496.00kB 47.92 irqbalance + 1890 Appl Wait 648.00kB 0.62 rpcbind + 2121 Appl Wait 1.89MB 0.00 bash + 2150 Appl Wait 3.49MB 0.16 vim + 2185 Appl Wait 556.00kB 0.00 sleep +.fi +.SH "SEE ALSO" +snmpcmd(1), snmp.conf(5) diff --git a/man/snmptranslate.1.def b/man/snmptranslate.1.def index 721af99..550a4f7 100644 --- a/man/snmptranslate.1.def +++ b/man/snmptranslate.1.def @@ -33,6 +33,9 @@ snmptranslate - translate MIB OID names between numeric and textual forms .SH SYNOPSIS .B snmptranslate [OPTIONS] OID [OID]... +.br +.B snmptranslate +[OPTIONS] - .SH DESCRIPTION .B snmptranslate is an application that translates one or more SNMP object identifier @@ -40,6 +43,16 @@ values from their symbolic (textual) forms into their numerical forms (or vice versa). .PP OID is either a numeric or textual object identifier. +.PP +The special +.B \- +argument is used to translate multiple object IDs in one run. +Input is taken from stdin, and output is written to stdout. +The input format can be a single object ID per line, or +can be the output of +.B snmpwalk +or +.B snmpget . .SH OPTIONS .TP 8 .B \-D\fI[TOKEN[,...]] @@ -287,5 +300,25 @@ will produce the following dump sysObjectID(2) type=1 sysUpTime(3) type=8 .fi +.PP +.IP \(bu 4 +snmptranslate -OX - +.br +with the following input: +.IP +.nf +SNMPv2-SMI::mib-2.14.1.1.0 = IpAddress: 192.0.2.1 +SNMPv2-SMI::mib-2.14.1.2.0 = INTEGER: 1 +SNMPv2-SMI::mib-2.14.1.3.0 = INTEGER: 2 +.fi +.IP +will produce the following output: +.IP +.nf +OSPF-MIB::ospfRouterId.0 = IpAddress: 192.0.2.1 +OSPF-MIB::ospfAdminStat.0 = INTEGER: 1 +OSPF-MIB::ospfVersionNumber.0 = INTEGER: 2 +.fi + .SH "SEE ALSO" snmpcmd(1), variables(5), RFC 2578-2580. diff --git a/man/snmptrap.1.def b/man/snmptrap.1.def index 55c19d1..8040e74 100644 --- a/man/snmptrap.1.def +++ b/man/snmptrap.1.def @@ -109,7 +109,36 @@ which are handled in the same way as the .B snmpset command. .PP -For example: +The +.I +AGENT +argument is only embedded in SNMP TRAP PDUs but not in SNMP INFORM PDUs. If +.I AGENT +is not an empty string, it must be an IPv4 address. This limitation comes from +RFC 1157, in which the agent address field is defined as follows: +.IP +agent-addr NetworkAddress, -- address of object generating trap +.PP +From RFC 1155: +.IP +NetworkAddress ::= +.br + CHOICE { +.br + internet IpAddress +.br + } +.br +[ ... ] +.br +IpAddress ::= +.br + [APPLICATION 0] -- in network-byte order +.br + IMPLICIT OCTET STRING (SIZE (4)) +.PP +An example of how to use +.B snmptrap: .PP snmptrap \-v 1 \-c public manager enterprises.spider test\-hub 3 0 '' interfaces.iftable.ifentry.ifindex.1 i 1 .PP diff --git a/man/snmptrapd.conf.5.def b/man/snmptrapd.conf.5.def index 1bbbfbb..e99ffcc 100644 --- a/man/snmptrapd.conf.5.def +++ b/man/snmptrapd.conf.5.def @@ -117,7 +117,7 @@ to trigger the types of processing listed. See .IR snmpd.conf (5) for more details. -.IP "createUser [-e ENGINEID] username (MD5|SHA) authpassphrase [DES|AES]" +.IP "createUser [-e ENGINEID] username (MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224) authpassphrase [DES|AES]" See the .IR snmpd.conf (5) manual page for a description of how to create SNMPv3 users. This @@ -284,6 +284,17 @@ in the manual page for more information about the format of listening addresses. .RE +.P +addForwarderInfo 1|yes|true|0|no|false +.IP +Each time a trap is forwarded, add an OID with the IP address of the system +from which the trap has been received. The following OID is +added: .1.3.6.1.6.3.18.1.3.x (SNMP-COMMUNITY-MIB::snmpTrapAddress.x) where +x is the lowest index >= 0 that does not yet occur in the trap payload. The end +recipient (i.e. the monitoring system) can determine the IPv4 address of the +original sender by looking for the varbind with OID snmpTrapAddress.0. If that +OID is not populated it means that the trap has been sent directly or in other +words that it has not been forwarded. .SH NOTES .IP o The daemon blocks while executing the \fItraphandle\fR commands. diff --git a/man/snmpusm.1.def b/man/snmpusm.1.def index 9061213..878df52 100644 --- a/man/snmpusm.1.def +++ b/man/snmpusm.1.def @@ -83,7 +83,7 @@ with no authentication or privacy settings. In principle, this user should be useable for 'noAuthNoPriv' requests, but in practise the Net-SNMP agent will not allow such an entry to be made active. The user can be created via the createAndWait -operation instead by using the \-Ca flag. This will prevent the user +operation instead by using the \-Cw flag. This will prevent the user from being marked as active in any agent until explicitly activated later via the activate command. diff --git a/man/variables.5.def b/man/variables.5.def index 14ee5e2..ccf8f77 100644 --- a/man/variables.5.def +++ b/man/variables.5.def @@ -84,7 +84,8 @@ A variant of this (typically used when writing OIDs in descriptive text, rather than running programs), is to combine the name and numeric subidentifier: .RS - .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysDescr(1) + .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1) + .sysDescr(1) .RE .SS Module-qualified OIDs diff --git a/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt b/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt index 7995fc4..c31cd41 100644 --- a/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +++ b/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt @@ -1,166 +1,200 @@ - IANA-ADDRESS-FAMILY-NUMBERS-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, - mib-2 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - - ianaAddressFamilyNumbers MODULE-IDENTITY - LAST-UPDATED "201309250000Z" -- September 25, 2013 - ORGANIZATION "IANA" - CONTACT-INFO - "Postal: Internet Assigned Numbers Authority - Internet Corporation for Assigned Names - and Numbers - 12025 Waterfront Drive, Suite 300 - Los Angeles, CA 90094-2536 - USA - - Tel: +1 310-301-5800 - E-Mail: iana&iana.org" - DESCRIPTION - "The MIB module defines the AddressFamilyNumbers - textual convention." - - -- revision history - - REVISION "201309250000Z" -- September 25, 2013 - DESCRIPTION "Fixed labels for 16389-16390." - - REVISION "201307160000Z" -- July 16, 2013 - DESCRIPTION "Fixed labels for 16389-16390." - - REVISION "201306260000Z" -- June 26, 2013 - DESCRIPTION "Added assignments 26-28." - - REVISION "201306180000Z" -- June 18, 2013 - DESCRIPTION "Added assignments 16384-16390. Assignment - 25 added in 2007 revision." - - REVISION "200203140000Z" -- March 14, 2002 - DESCRIPTION "AddressFamilyNumbers assignment 22 to - fibreChannelWWPN. AddressFamilyNumbers - assignment 23 to fibreChannelWWNN. - AddressFamilyNumers assignment 24 to gwid." - - REVISION "200009080000Z" -- September 8, 2000 - DESCRIPTION "AddressFamilyNumbers assignment 19 to xtpOverIpv4. - AddressFamilyNumbers assignment 20 to xtpOverIpv6. - AddressFamilyNumbers assignment 21 to xtpNativeModeXTP." - - REVISION "200003010000Z" -- March 1, 2000 - DESCRIPTION "AddressFamilyNumbers assignment 17 to distinguishedName. - AddressFamilyNumbers assignment 18 to asNumber." - - REVISION "200002040000Z" -- February 4, 2000 - DESCRIPTION "AddressFamilyNumbers assignment 16 to dns." - - REVISION "9908260000Z" -- August 26, 1999 - DESCRIPTION "Initial version, published as RFC 2677." - ::= { mib-2 72 } - - AddressFamilyNumbers ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The definition of this textual convention with the - addition of newly assigned values is published - periodically by the IANA, in either the Assigned - Numbers RFC, or some derivative of it specific to - Internet Network Management number assignments. - (The latest arrangements can be obtained by - contacting the IANA.) - - The enumerations are described as: - - other(0), -- none of the following - ipV4(1), -- IP Version 4 - ipV6(2), -- IP Version 6 - nsap(3), -- NSAP - hdlc(4), -- (8-bit multidrop) - bbn1822(5), - all802(6), -- (includes all 802 media - -- plus Ethernet 'canonical format') - e163(7), - e164(8), -- (SMDS, Frame Relay, ATM) - f69(9), -- (Telex) - x121(10), -- (X.25, Frame Relay) - ipx(11), -- IPX (Internet Protocol Exchange) - appleTalk(12), -- Apple Talk - decnetIV(13), -- DEC Net Phase IV - banyanVines(14), -- Banyan Vines - e164withNsap(15), - -- (E.164 with NSAP format subaddress) - dns(16), -- (Domain Name System) - distinguishedName(17), -- (Distinguished Name, per X.500) - asNumber(18), -- (16-bit quantity, per the AS number space) - xtpOverIpv4(19), -- XTP over IP version 4 - xtpOverIpv6(20), -- XTP over IP version 6 - xtpNativeModeXTP(21), -- XTP native mode XTP - fibreChannelWWPN(22), -- Fibre Channel World-Wide Port Name - fibreChannelWWNN(23), -- Fibre Channel World-Wide Node Name - gwid(24), -- Gateway Identifier - afi(25), -- AFI for L2VPN information - mplsTpSectionEndpointIdentifier(26), -- MPLS-TP Section Endpoint Identifier - mplsTpLspEndpointIdentifier(27), -- MPLS-TP LSP Endpoint Identifier - mplsTpPseudowireEndpointIdentifier(28), -- MPLS-TP Pseudowire Endpoint Identifier - eigrpCommonServiceFamily(16384), -- EIGRP Common Service Family - eigrpIpv4ServiceFamily(16385), -- EIGRP IPv4 Service Family - eigrpIpv6ServiceFamily(16386), -- EIGRP IPv6 Service Family - lispCanonicalAddressFormat(16387), -- LISP Canonical Address Format (LCAF) - bgpLs(16388), -- BGP-LS - fortyeightBitMacBitMac(16389), -- 48-bit MAC - sixtyfourBitMac(16390), -- 64-bit MAC - oui(16391), -- OUI - mac24(16392), -- MAC/24 - mac40(16393), -- MAC/40 - ipv664(16394), -- IPv6/64 - rBridgePortID(16395), -- RBridge Port ID - reserved(65535) - - Requests for new values should be made to IANA via - email (iana&iana.org)." - SYNTAX INTEGER { - other(0), - ipV4(1), - ipV6(2), - nsap(3), - hdlc(4), - bbn1822(5), - all802(6), - e163(7), - e164(8), - f69(9), - x121(10), - ipx(11), - appleTalk(12), - decnetIV(13), - banyanVines(14), - e164withNsap(15), - dns(16), - distinguishedName(17), -- (Distinguished Name, per X.500) - asNumber(18), -- (16-bit quantity, per the AS number space) - xtpOverIpv4(19), - xtpOverIpv6(20), - xtpNativeModeXTP(21), - fibreChannelWWPN(22), - fibreChannelWWNN(23), - gwid(24), - afi(25), - mplsTpSectionEndpointIdentifier(26), - mplsTpLspEndpointIdentifier(27), - mplsTpPseudowireEndpointIdentifier(28), - eigrpCommonServiceFamily(16384), - eigrpIpv4ServiceFamily(16385), - eigrpIpv6ServiceFamily(16386), - lispCanonicalAddressFormat(16387), - bgpLs(16388), - fortyeightBitMac(16389), - sixtyfourBitMac(16390), - oui(16391), - mac24(16392), - mac40(16393), - ipv664(16394), - rBridgePortID(16395), - reserved(65535) - } - END +IANA-ADDRESS-FAMILY-NUMBERS-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, + mib-2 FROM SNMPv2-SMI + TEXTUAL-CONVENTION FROM SNMPv2-TC; + +ianaAddressFamilyNumbers MODULE-IDENTITY + LAST-UPDATED "202110190000Z" -- October 19, 2021 + ORGANIZATION "IANA" + CONTACT-INFO + "Postal: Internet Assigned Numbers Authority + Internet Corporation for Assigned Names and Numbers + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + USA + + Tel: +1 310-301-5800 + E-Mail: iana&iana.org" + DESCRIPTION + "The MIB module defines the AddressFamilyNumbers + textual convention." + + -- revision history + + REVISION "202110190000Z" -- October 19, 2021 + DESCRIPTION "Assigned value 16399." + + REVISION "202105180000Z" -- May 18, 2021 + DESCRIPTION "Assigned value 31." + + REVISION "202009140000Z" -- September 14, 2020 + DESCRIPTION "Added missing value 16398." + + REVISION "202009020000Z" -- September 2, 2020 + DESCRIPTION "Added assignments 29-30." + + REVISION "202005120000Z" -- May 12, 2020 + DESCRIPTION "Assigned value 16398." + + REVISION "201911040000Z" -- November 4, 2019 + DESCRIPTION "Assigned value 16397." + + REVISION "201409020000Z" -- September 2, 2014 + DESCRIPTION "Assigned value 16396." + + REVISION "201309250000Z" -- September 25, 2013 + DESCRIPTION "Assigned values 16391-16395." + + REVISION "201307160000Z" -- July 16, 2013 + DESCRIPTION "Fixed labels for 16389-16390." + + REVISION "201306260000Z" -- June 26, 2013 + DESCRIPTION "Added assignments 26-28." + + REVISION "201306180000Z" -- June 18, 2013 + DESCRIPTION "Added assignments 16384-16390. Assignment + 25 added in 2007 revision." + + REVISION "200203140000Z" -- March 14, 2002 + DESCRIPTION "AddressFamilyNumbers assignment 22 to + fibreChannelWWPN. AddressFamilyNumbers + assignment 23 to fibreChannelWWNN. + AddressFamilyNumers assignment 24 to gwid." + + REVISION "200009080000Z" -- September 8, 2000 + DESCRIPTION "AddressFamilyNumbers assignment 19 to xtpOverIpv4. + AddressFamilyNumbers assignment 20 to xtpOverIpv6. + AddressFamilyNumbers assignment 21 to xtpNativeModeXTP." + + REVISION "200003010000Z" -- March 1, 2000 + DESCRIPTION "AddressFamilyNumbers assignment 17 to distinguishedName. + AddressFamilyNumbers assignment 18 to asNumber." + + REVISION "200002040000Z" -- February 4, 2000 + DESCRIPTION "AddressFamilyNumbers assignment 16 to dns." + + REVISION "9908260000Z" -- August 26, 1999 + DESCRIPTION "Initial version, published as RFC 2677." + ::= { mib-2 72 } + +AddressFamilyNumbers ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "The definition of this textual convention with the + addition of newly assigned values is published + periodically by the IANA, in either the Assigned + Numbers RFC, or some derivative of it specific to + Internet Network Management number assignments. + (The latest arrangements can be obtained by + contacting the IANA.) + + The enumerations are described as: + + other(0), -- none of the following + ipV4(1), -- IP Version 4 + ipV6(2), -- IP Version 6 + nsap(3), -- NSAP + hdlc(4), -- (8-bit multidrop) + bbn1822(5), + all802(6), -- (includes all 802 media + -- plus Ethernet 'canonical format') + e163(7), + e164(8), -- (SMDS, Frame Relay, ATM) + f69(9), -- (Telex) + x121(10), -- (X.25, Frame Relay) + ipx(11), -- IPX (Internet Protocol Exchange) + appleTalk(12), -- Apple Talk + decnetIV(13), -- DEC Net Phase IV + banyanVines(14), -- Banyan Vines + e164withNsap(15), + -- (E.164 with NSAP format subaddress) + dns(16), -- (Domain Name System) + distinguishedName(17), -- (Distinguished Name, per X.500) + asNumber(18), -- (16-bit quantity, per the AS number space) + xtpOverIpv4(19), -- XTP over IP version 4 + xtpOverIpv6(20), -- XTP over IP version 6 + xtpNativeModeXTP(21), -- XTP native mode XTP + fibreChannelWWPN(22), -- Fibre Channel World-Wide Port Name + fibreChannelWWNN(23), -- Fibre Channel World-Wide Node Name + gwid(24), -- Gateway Identifier + afi(25), -- AFI for L2VPN information + mplsTpSectionEndpointIdentifier(26), -- MPLS-TP Section Endpoint Identifier + mplsTpLspEndpointIdentifier(27), -- MPLS-TP LSP Endpoint Identifier + mplsTpPseudowireEndpointIdentifier(28), -- MPLS-TP Pseudowire Endpoint Identifier + mtIpMultiTopologyIpVersion4 (29), -- MT IP: Multi-Topology IP version 4 + mtIpv6MultiTopologyIpVersion6 (30), -- MT IPv6: Multi-Topology IP version 6 + bgpSfc (31), -- BGP SFC + eigrpCommonServiceFamily(16384), -- EIGRP Common Service Family + eigrpIpv4ServiceFamily(16385), -- EIGRP IPv4 Service Family + eigrpIpv6ServiceFamily(16386), -- EIGRP IPv6 Service Family + lispCanonicalAddressFormat(16387), -- LISP Canonical Address Format (LCAF) + bgpLs(16388), -- BGP-LS + fortyeightBitMacBitMac(16389), -- 48-bit MAC + sixtyfourBitMac(16390), -- 64-bit MAC + oui(16391), -- OUI + mac24(16392), -- MAC/24 + mac40(16393), -- MAC/40 + ipv664(16394), -- IPv6/64 + rBridgePortID(16395), -- RBridge Port ID + trillNickname(16396), -- TRILL Nickname + universallyUniqueIdentifier(16397), -- Universally Unique Identifier (UUID) + routingPolicyAfi(16398), -- Routing Policy AFI + mplsNamespaces(16399), -- MPLS Namespaces + reserved(65535) + + Requests for new values should be made to IANA via + email (iana&iana.org)." + SYNTAX INTEGER { + other(0), + ipV4(1), + ipV6(2), + nsap(3), + hdlc(4), + bbn1822(5), + all802(6), + e163(7), + e164(8), + f69(9), + x121(10), + ipx(11), + appleTalk(12), + decnetIV(13), + banyanVines(14), + e164withNsap(15), + dns(16), + distinguishedName(17), -- (Distinguished Name, per X.500) + asNumber(18), -- (16-bit quantity, per the AS number space) + xtpOverIpv4(19), + xtpOverIpv6(20), + xtpNativeModeXTP(21), + fibreChannelWWPN(22), + fibreChannelWWNN(23), + gwid(24), + afi(25), + mplsTpSectionEndpointIdentifier(26), + mplsTpLspEndpointIdentifier(27), + mplsTpPseudowireEndpointIdentifier(28), + mtipmultitopologyipversion4 (29), + mtipv6multitopologyipversion6 (30), + bgpSfc (31), + eigrpCommonServiceFamily(16384), + eigrpIpv4ServiceFamily(16385), + eigrpIpv6ServiceFamily(16386), + lispCanonicalAddressFormat(16387), + bgpLs(16388), + fortyeightBitMac(16389), + sixtyfourBitMac(16390), + oui(16391), + mac24(16392), + mac40(16393), + ipv664(16394), + rBridgePortID(16395), + trillNickname(16396), + universallyUniqueIdentifier(16397), + routingPolicyAfi(16398), + mplsNamespaces(16399), + reserved(65535) + } + END diff --git a/mibs/IANA-LANGUAGE-MIB.txt b/mibs/IANA-LANGUAGE-MIB.txt index 4b97bdd..28006b0 100644 --- a/mibs/IANA-LANGUAGE-MIB.txt +++ b/mibs/IANA-LANGUAGE-MIB.txt @@ -30,10 +30,10 @@ ianaLanguages MODULE-IDENTITY Note, this module does not have to register all possible languages since languages are identified by object - identifier values. It is therefore possible to registered + identifier values. It is therefore possible to registered languages in private OID trees. The references given below are not normative with regard to the language version. Other - references might be better suited to describe some newer + references might be better suited to describe some newer versions of this language. The references are only provided as `a pointer into the right direction'." diff --git a/mibs/IANA-RTPROTO-MIB.txt b/mibs/IANA-RTPROTO-MIB.txt index f7bc1eb..571ed2f 100644 --- a/mibs/IANA-RTPROTO-MIB.txt +++ b/mibs/IANA-RTPROTO-MIB.txt @@ -5,7 +5,7 @@ IMPORTS TEXTUAL-CONVENTION FROM SNMPv2-TC; ianaRtProtoMIB MODULE-IDENTITY - LAST-UPDATED "201208300000Z" -- August 30, 2012 + LAST-UPDATED "201604250000Z" -- April 25, 2016 ORGANIZATION "IANA" CONTACT-INFO " Internet Assigned Numbers Authority @@ -24,17 +24,23 @@ ianaRtProtoMIB MODULE-IDENTITY Any additions or changes to the contents of this MIB module require either publication of an RFC, or Designated Expert Review as defined in RFC 2434, Guidelines for Writing an - IANA Considerations Section in RFCs. The Designated Expert + IANA Considerations Section in RFCs. The Designated Expert will be selected by the IESG Area Director(s) of the Routing Area." - REVISION "201208300000Z" -- August 30, 2012 + REVISION "201604250000Z" -- April 25, 2016 + DESCRIPTION "Corrected typographical error in revision date." + + REVISION "201604060000Z" -- April 6, 2016 + DESCRIPTION "Added ttdp(20)." + + REVISION "201208300000Z" -- August 30, 2012 DESCRIPTION "Added dhcp(19)." - REVISION "201107220000Z" -- July 22, 2011 + REVISION "201107220000Z" -- July 22, 2011 DESCRIPTION "Added rpl(18) ." - REVISION "200009260000Z" -- September 26, 2000 + REVISION "200009260000Z" -- September 26, 2000 DESCRIPTION "Original version, published in coordination with RFC 2932." ::= { mib-2 84 } @@ -68,7 +74,8 @@ IANAipRouteProtocol ::= TEXTUAL-CONVENTION ciscoEigrp (16), -- Cisco EIGRP dvmrp (17), -- DVMRP rpl (18), -- RPL [RFC-ietf-roll-rpl-19] - dhcp (19) -- DHCP [RFC2132] + dhcp (19), -- DHCP [RFC2132] + ttdp (20) -- Train Topology Discovery Protocol (TTDP) [IEC 61375-2-5] } IANAipMRouteProtocol ::= TEXTUAL-CONVENTION diff --git a/mibs/IANAifType-MIB.txt b/mibs/IANAifType-MIB.txt index 027a153..c8e77c4 100644 --- a/mibs/IANAifType-MIB.txt +++ b/mibs/IANAifType-MIB.txt @@ -5,7 +5,7 @@ TEXTUAL-CONVENTION FROM SNMPv2-TC; ianaifType MODULE-IDENTITY - LAST-UPDATED "201407030000Z" -- July 3, 2014 + LAST-UPDATED "202208170000Z" -- August 17, 2022 ORGANIZATION "IANA" CONTACT-INFO " Internet Assigned Numbers Authority @@ -14,13 +14,101 @@ Los Angeles, CA 90094-2536 Tel: +1 310-301-5800 - E-Mail: iana&iana.org" + E-Mail: iana@iana.org" DESCRIPTION "This MIB module defines the IANAifType Textual Convention, and thus the enumerated values of the ifType object defined in MIB-II's ifTable." + REVISION "202208170000Z" -- August 17, 2022 + DESCRIPTION "Changed gpon description to refer to G.984." + + REVISION "202105170000Z" -- May 17, 2021 + DESCRIPTION "Registration of new IANAifType 303." + + REVISION "202104230000Z" -- April 23, 2021 + DESCRIPTION "Registration of new tunnelType 19 and + combined 2018-06-28 revision statements" + + REVISION "202104220000Z" -- April 22, 2021 + DESCRIPTION "Registration of new IANAifType 302." + + REVISION "202102180000Z" -- February 18, 2021 + DESCRIPTION "Registration of new IANAifType 301." + + REVISION "202008270000Z" -- August 27, 2020 + DESCRIPTION "Updated Interface Types (ifType) registry name." + + REVISION "202007100000Z" -- July 10, 2020 + DESCRIPTION "Registration of new IANAifType 300." + + REVISION "202004020000Z" -- April 2, 2020 + DESCRIPTION "Added reference to ifType definitions registry." + + REVISION "202001100000Z" -- January 10, 2020 + DESCRIPTION "Addition of IANAifType 299." + + REVISION "201912030000Z" -- December 3, 2019 + DESCRIPTION "Updated email address for IANA" + + REVISION "201910160000Z" -- October 16, 2019 + DESCRIPTION "Addition of IANAifTypes 297-298." + + REVISION "201902140000Z" -- February 14, 2019 + DESCRIPTION "Registration of new tunnelType 18." + + REVISION "201902080000Z" -- February 8, 2019 + DESCRIPTION "Added missing commas for 295-296." + + REVISION "201901310000Z" -- January 31, 2019 + DESCRIPTION "Registration of new IANAifTypes 295-296." + + REVISION "201807040000Z" -- July 4, 2018 + DESCRIPTION "Added missing commas for 291-293." + + REVISION "201806280000Z" -- June 28, 2018 + DESCRIPTION "Registration of new IANAifTypes 293-294." + + REVISION "201806220000Z" -- June 22, 2018 + DESCRIPTION "Registration of new IANAifType 292." + + REVISION "201806210000Z" -- June 21, 2018 + DESCRIPTION "Registration of new IANAifType 291." + + REVISION "201703300000Z" -- March 30, 2017 + DESCRIPTION "Registration of new IANAifType 290." + + REVISION "201701190000Z" -- January 19, 2017 + DESCRIPTION "Registration of new IANAifType 289." + + REVISION "201611230000Z" -- November 23, 2016 + DESCRIPTION "Registration of new IANAifTypes 283-288." + + REVISION "201606160000Z" -- June 16, 2016 + DESCRIPTION "Updated IANAtunnelType DESCRIPTION per RFC 7870" + + REVISION "201606090000Z" -- June 9, 2016 + DESCRIPTION "Registration of new IANAifType 282." + + REVISION "201606080000Z" -- June 8, 2016 + DESCRIPTION "Updated description for tunnelType 17." + + REVISION "201605190000Z" -- May 19, 2016 + DESCRIPTION "Updated description for tunnelType 16." + + REVISION "201605030000Z" -- May 3, 2016 + DESCRIPTION "Registration of new IANAifType 281." + + REVISION "201604290000Z" -- April 29, 2016 + DESCRIPTION "Registration of new tunnelTypes 16 and 17." + + REVISION "201409240000Z" -- September 24, 2014 + DESCRIPTION "Registration of new IANAifType 280." + + REVISION "201409190000Z" -- September 19, 2014 + DESCRIPTION "Registration of new IANAifType 279." + REVISION "201407030000Z" -- July 3, 2014 - DESCRIPTION "Registration of new IANAifTypes 277-278." + DESCRIPTION "Registration of new IANAifTypes 277-278." REVISION "201405220000Z" -- May 22, 2014 DESCRIPTION "Updated contact info." @@ -89,23 +177,23 @@ DESCRIPTION "Registration of new IANAifType 242." REVISION "200701230000Z" -- January 23, 2007 - DESCRIPTION "Registration of new IANAifTypes 239, 240, and 241." + DESCRIPTION "Registration of new IANAifTypes 239, 240, and 241." REVISION "200610170000Z" -- October 17, 2006 - DESCRIPTION "Deprecated/Obsoleted IANAifType 230. Registration of - IANAifType 238." + DESCRIPTION "Deprecated/Obsoleted IANAifType 230. Registration of + IANAifType 238." REVISION "200609250000Z" -- September 25, 2006 - DESCRIPTION "Changed the description for IANA ifType - 184 and added new IANA ifType 237." + DESCRIPTION "Changed the description for IANA ifType + 184 and added new IANA ifType 237." REVISION "200608170000Z" -- August 17, 2006 DESCRIPTION "Changed the descriptions for IANAifTypes - 20 and 21." + 20 and 21." REVISION "200608110000Z" -- August 11, 2006 DESCRIPTION "Changed the descriptions for IANAifTypes - 7, 11, 62, 69, and 117." + 7, 11, 62, 69, and 117." REVISION "200607250000Z" -- July 25, 2006 DESCRIPTION "Registration of new IANA ifType 236." @@ -133,7 +221,7 @@ REVISION "200503030000Z" -- March 3, 2005 DESCRIPTION "Added the IANAtunnelType TC and deprecated - IANAifType sixToFour (215) per RFC4087." + IANAifType sixToFour (215) per RFC4087." REVISION "200411220000Z" -- November 22, 2004 DESCRIPTION "Registration of new IANA ifType 227 per RFC4631." @@ -142,8 +230,8 @@ DESCRIPTION "Registration of new IANA ifType 226." REVISION "200405120000Z" -- May 12, 2004 - DESCRIPTION "Added description for IANAifType 6, and - changed the descriptions for IANAifTypes + DESCRIPTION "Added description for IANAifType 6, and + changed the descriptions for IANAifTypes 180, 181, and 182." REVISION "200405070000Z" -- May 7, 2004 @@ -236,17 +324,17 @@ REVISION "200010170000Z" -- Oct 17, 2000 DESCRIPTION "Registration of new IANAifTypes - 188 and 189." + 188 and 189." REVISION "200010020000Z" -- Oct 02, 2000 - DESCRIPTION "Registration of new IANAifType 187." + DESCRIPTION "Registration of new IANAifType 187." REVISION "200009010000Z" -- Sept 01, 2000 DESCRIPTION "Registration of new IANAifTypes - 184, 185, and 186." + 184, 185, and 186." REVISION "200008240000Z" -- Aug 24, 2000 - DESCRIPTION "Registration of new IANAifType 183." + DESCRIPTION "Registration of new IANAifType 183." REVISION "200008230000Z" -- Aug 23, 2000 DESCRIPTION "Registration of new IANAifTypes @@ -257,7 +345,7 @@ 171, 172 and 173." REVISION "200004250000Z" -- Apr 25, 2000 - DESCRIPTION "Registration of new IANAifTypes 168 and 169." + DESCRIPTION "Registration of new IANAifTypes 168 and 169." REVISION "200003060000Z" -- Mar 6, 2000 DESCRIPTION "Fixed a missing semi-colon in the IMPORT. @@ -291,8 +379,10 @@ latest arrangements can be obtained by contacting the IANA.) - Requests for new values should be made to IANA via - email (iana&iana.org). + Interface types must not be directly added to the + IANAifType-MIB MIB module. They must instead be added + to the 'Interface Types (ifType)' registry at + https://www.iana.org/assignments/smi-numbers. The relationship between the assignment of ifType values and of OIDs to particular media-specific MIBs @@ -334,21 +424,21 @@ propPointToPointSerial(22), -- proprietary serial ppp(23), softwareLoopback(24), - eon(25), -- CLNP over IP + eon(25), -- CLNP over IP ethernet3Mbit(26), nsip(27), -- XNS over IP slip(28), -- generic SLIP ultra(29), -- ULTRA technologies ds3(30), -- DS3-MIB sip(31), -- SMDS, coffee - frameRelay(32), -- DTE only. + frameRelay(32), -- DTE only. rs232(33), para(34), -- parallel-port arcnet(35), -- arcnet arcnetPlus(36), -- arcnet plus atm(37), -- ATM cells miox25(38), - sonet(39), -- SONET or SDH + sonet(39), -- SONET or SDH x25ple(40), iso88022llc(41), localTalk(42), @@ -366,25 +456,25 @@ propMultiplexor(54),-- proprietary multiplexing ieee80212(55), -- 100BaseVG fibreChannel(56), -- Fibre Channel - hippiInterface(57), -- HIPPI interfaces + hippiInterface(57), -- HIPPI interfaces frameRelayInterconnect(58), -- Obsolete, use either - -- frameRelay(32) or + -- frameRelay(32) or -- frameRelayService(44). aflane8023(59), -- ATM Emulated LAN for 802.3 aflane8025(60), -- ATM Emulated LAN for 802.5 - cctEmul(61), -- ATM Emulated circuit + cctEmul(61), -- ATM Emulated circuit fastEther(62), -- Obsoleted via RFC3635 -- ethernetCsmacd (6) should be used instead - isdn(63), -- ISDN and X.25 - v11(64), -- CCITT V.11/X.21 - v36(65), -- CCITT V.36 + isdn(63), -- ISDN and X.25 + v11(64), -- CCITT V.11/X.21 + v36(65), -- CCITT V.36 g703at64k(66), -- CCITT G703 at 64Kbps g703at2mb(67), -- Obsolete see DS1-MIB - qllc(68), -- SNA QLLC + qllc(68), -- SNA QLLC fastEtherFX(69), -- Obsoleted via RFC3635 -- ethernetCsmacd (6) should be used instead - channel(70), -- channel - ieee80211(71), -- radio spread spectrum + channel(70), -- channel + ieee80211(71), -- radio spread spectrum ibm370parChan(72), -- IBM System 360/370 OEMI Channel escon(73), -- IBM Enterprise Systems Connection dlsw(74), -- Data Link Switching @@ -420,7 +510,7 @@ voiceOverIp(104), -- voice over IP encapsulation atmDxi(105), -- ATM DXI atmFuni(106), -- ATM FUNI - atmIma (107), -- ATM IMA + atmIma (107), -- ATM IMA pppMultilinkBundle(108), -- PPP Multilink Bundle ipOverCdlc (109), -- IBM ipOverCdlc ipOverClaw (110), -- IBM Common Link Access to Workstn @@ -429,18 +519,18 @@ mpc (113), -- IBM multi-protocol channel support ipOverAtm (114), -- IBM ipOverAtm iso88025Fiber (115), -- ISO 802.5j Fiber Token Ring - tdlc (116), -- IBM twinaxial data link control + tdlc (116), -- IBM twinaxial data link control gigabitEthernet (117), -- Obsoleted via RFC3635 -- ethernetCsmacd (6) should be used instead hdlc (118), -- HDLC - lapf (119), -- LAP F - v37 (120), -- V.37 + lapf (119), -- LAP F + v37 (120), -- V.37 x25mlp (121), -- Multi-Link Protocol x25huntGroup (122), -- X25 Hunt Group transpHdlc (123), -- Transp HDLC interleave (124), -- Interleave channel fast (125), -- Fast channel - ip (126), -- IP (for APPN HPR in IP networks) + ip (126), -- IP (for APPN HPR in IP networks) docsCableMaclayer (127), -- CATV Mac Layer docsCableDownstream (128), -- CATV Downstream interface docsCableUpstream (129), -- CATV Upstream interface @@ -452,42 +542,42 @@ l2vlan (135), -- Layer 2 Virtual LAN using 802.1Q l3ipvlan (136), -- Layer 3 Virtual LAN using IP l3ipxvlan (137), -- Layer 3 Virtual LAN using IPX - digitalPowerline (138), -- IP over Power Lines + digitalPowerline (138), -- IP over Power Lines mediaMailOverIp (139), -- Multimedia Mail over IP dtm (140), -- Dynamic syncronous Transfer Mode dcn (141), -- Data Communications Network ipForward (142), -- IP Forwarding Interface msdsl (143), -- Multi-rate Symmetric DSL ieee1394 (144), -- IEEE1394 High Performance Serial Bus - if-gsn (145), -- HIPPI-6400 + if-gsn (145), -- HIPPI-6400 dvbRccMacLayer (146), -- DVB-RCC MAC Layer dvbRccDownstream (147), -- DVB-RCC Downstream Channel dvbRccUpstream (148), -- DVB-RCC Upstream Channel atmVirtual (149), -- ATM Virtual Interface mplsTunnel (150), -- MPLS Tunnel Virtual Interface - srp (151), -- Spatial Reuse Protocol + srp (151), -- Spatial Reuse Protocol voiceOverAtm (152), -- Voice Over ATM - voiceOverFrameRelay (153), -- Voice Over Frame Relay - idsl (154), -- Digital Subscriber Loop over ISDN + voiceOverFrameRelay (153), -- Voice Over Frame Relay + idsl (154), -- Digital Subscriber Loop over ISDN compositeLink (155), -- Avici Composite Link Interface - ss7SigLink (156), -- SS7 Signaling Link + ss7SigLink (156), -- SS7 Signaling Link propWirelessP2P (157), -- Prop. P2P wireless interface frForward (158), -- Frame Forward Interface - rfc1483 (159), -- Multiprotocol over ATM AAL5 - usb (160), -- USB Interface + rfc1483 (159), -- Multiprotocol over ATM AAL5 + usb (160), -- USB Interface ieee8023adLag (161), -- IEEE 802.3ad Link Aggregate bgppolicyaccounting (162), -- BGP Policy Accounting - frf16MfrBundle (163), -- FRF .16 Multilink Frame Relay + frf16MfrBundle (163), -- FRF .16 Multilink Frame Relay h323Gatekeeper (164), -- H323 Gatekeeper h323Proxy (165), -- H323 Voice and Video Proxy - mpls (166), -- MPLS + mpls (166), -- MPLS mfSigLink (167), -- Multi-frequency signaling link hdsl2 (168), -- High Bit-Rate DSL - 2nd generation shdsl (169), -- Multirate HDSL2 ds1FDL (170), -- Facility Data Link 4Kbps on a DS1 pos (171), -- Packet over SONET/SDH Interface dvbAsiIn (172), -- DVB-ASI Input - dvbAsiOut (173), -- DVB-ASI Output + dvbAsiOut (173), -- DVB-ASI Output plc (174), -- Power Line Communtications nfas (175), -- Non Facility Associated Signaling tr008 (176), -- TR008 @@ -506,7 +596,7 @@ digitalWrapperOverheadChannel (186), -- Digital Wrapper aal2 (187), -- ATM adaptation layer 2 radioMAC (188), -- MAC layer over radio links - atmRadio (189), -- ATM over radio links + atmRadio (189), -- ATM over radio links imt (190), -- Inter Machine Trunks mvl (191), -- Multiple Virtual Lines DSL reachDSL (192), -- Long Reach DSL @@ -514,20 +604,20 @@ atmVciEndPt (194), -- ATM VCI End Point opticalChannel (195), -- Optical Channel opticalTransport (196), -- Optical Transport - propAtm (197), -- Proprietary ATM + propAtm (197), -- Proprietary ATM voiceOverCable (198), -- Voice Over Cable Interface infiniband (199), -- Infiniband teLink (200), -- TE Link q2931 (201), -- Q.2931 virtualTg (202), -- Virtual Trunk Group sipTg (203), -- SIP Trunk Group - sipSig (204), -- SIP Signaling + sipSig (204), -- SIP Signaling docsCableUpstreamChannel (205), -- CATV Upstream Channel econet (206), -- Acorn Econet pon155 (207), -- FSAN 155Mb Symetrical PON interface pon622 (208), -- FSAN622Mb Symetrical PON interface bridge (209), -- Transparent bridge interface - linegroup (210), -- Interface common to multiple lines + linegroup (210), -- Interface common to multiple lines voiceEMFGD (211), -- voice E&M Feature Group D voiceFGDEANA (212), -- voice FGD Exchange Access North American voiceDID (213), -- voice Direct Inward Dialing @@ -540,16 +630,16 @@ homepna (220), -- HomePNA ITU-T G.989 gfp (221), -- Generic Framing Procedure (GFP) ciscoISLvlan (222), -- Layer 2 Virtual LAN using Cisco ISL - actelisMetaLOOP (223), -- Acteleis proprietary MetaLOOP High Speed Link - fcipLink (224), -- FCIP Link + actelisMetaLOOP (223), -- Acteleis proprietary MetaLOOP High Speed Link + fcipLink (224), -- FCIP Link rpr (225), -- Resilient Packet Ring Interface Type qam (226), -- RF Qam Interface lmp (227), -- Link Management Protocol cblVectaStar (228), -- Cambridge Broadband Networks Limited VectaStar docsCableMCmtsDownstream (229), -- CATV Modular CMTS Downstream Interface - adsl2 (230), -- Asymmetric Digital Subscriber Loop Version 2 + adsl2 (230), -- Asymmetric Digital Subscriber Loop Version 2 -- (DEPRECATED/OBSOLETED - please use adsl2plus 238 instead) - macSecControlledIF (231), -- MACSecControlled + macSecControlledIF (231), -- MACSecControlled macSecUncontrolledIF (232), -- MACSecUncontrolled aviciOpticalEther (233), -- Avici Optical Ethernet Aggregate atmbond (234), -- atmbond @@ -557,7 +647,7 @@ mocaVersion1 (236), -- MultiMedia over Coax Alliance (MoCA) Interface -- as documented in information provided privately to IANA ieee80216WMAN (237), -- IEEE 802.16 WMAN interface - adsl2plus (238), -- Asymmetric Digital Subscriber Loop Version 2, + adsl2plus (238), -- Asymmetric Digital Subscriber Loop Version 2, -- Version 2 Plus and all variants dvbRcsMacLayer (239), -- DVB-RCS MAC Layer dvbTdm (240), -- DVB Satellite TDM @@ -570,7 +660,7 @@ ilan (247), -- Internal LAN on a bridge per IEEE 802.1ap pip (248), -- Provider Instance Port on a bridge per IEEE 802.1ah PBB aluELP (249), -- Alcatel-Lucent Ethernet Link Protection - gpon (250), -- Gigabit-capable passive optical networks (G-PON) as per ITU-T G.948 + gpon (250), -- Gigabit-capable passive optical networks (G-PON) as per ITU-T G.984 vdsl2 (251), -- Very high speed digital subscriber line Version 2 (as per ITU-T Recommendation G.993.2) capwapDot11Profile (252), -- WLAN Profile Interface capwapDot11Bss (253), -- WLAN BSS Interface @@ -594,7 +684,32 @@ aluGponPhysicalUni (271), -- GPON physical User to Network interface vmwareNicTeam (272), -- VMware NIC Team docsOfdmDownstream (277), -- CATV Downstream OFDM interface - docsOfdmaUpstream (278) -- CATV Upstream OFDMA interface + docsOfdmaUpstream (278), -- CATV Upstream OFDMA interface + gfast (279), -- G.fast port + sdci (280), -- SDCI (IO-Link) + xboxWireless (281), -- Xbox wireless + fastdsl (282), -- FastDSL + docsCableScte55d1FwdOob (283), -- Cable SCTE 55-1 OOB Forward Channel + docsCableScte55d1RetOob (284), -- Cable SCTE 55-1 OOB Return Channel + docsCableScte55d2DsOob (285), -- Cable SCTE 55-2 OOB Downstream Channel + docsCableScte55d2UsOob (286), -- Cable SCTE 55-2 OOB Upstream Channel + docsCableNdf (287), -- Cable Narrowband Digital Forward + docsCableNdr (288), -- Cable Narrowband Digital Return + ptm (289), -- Packet Transfer Mode + ghn (290), -- G.hn port + otnOtsi (291), -- Optical Tributary Signal + otnOtuc (292), -- OTN OTUCn + otnOduc (293), -- OTN ODUC + otnOtsig (294), -- OTN OTUC Signal + microwaveCarrierTermination (295), -- air interface of a single microwave carrier + microwaveRadioLinkTerminal (296), -- radio link interface for one or several aggregated microwave carriers + ieee8021axDrni (297), -- IEEE 802.1AX Distributed Resilient Network Interface + ax25 (298), -- AX.25 network interfaces + ieee19061nanocom (299), -- Nanoscale and Molecular Communication + cpri (300), -- Common Public Radio Interface + omni (301), -- Overlay Multilink Network Interface (OMNI) + roe (302), -- Radio over Ethernet Interface + p2pOverLan (303) -- Point to Point over LAN interface } IANAtunnelType ::= TEXTUAL-CONVENTION @@ -622,25 +737,38 @@ IANAtunnelType ::= TEXTUAL-CONVENTION header of the protocol of that name is inserted between the outer header and the payload header. + The IP Tunnel MIB [RFC4087] is designed to manage + tunnels of any type over IPv4 and IPv6 networks; + therefore, it already supports IP-in-IP tunnels. + But in a DS-Lite scenario, the tunnel type is + point-to-multipoint IP-in-IP tunnels. The direct(2) + defined in the IP Tunnel MIB only supports point-to-point + tunnels. So, it needs to define a new tunnel type for + DS-Lite. + The assignment policy for IANAtunnelType values is identical to the policy for assigning IANAifType values." SYNTAX INTEGER { - other(1), -- none of the following - direct(2), -- no intermediate header - gre(3), -- GRE encapsulation - minimal(4), -- Minimal encapsulation - l2tp(5), -- L2TP encapsulation - pptp(6), -- PPTP encapsulation - l2f(7), -- L2F encapsulation - udp(8), -- UDP encapsulation - atmp(9), -- ATMP encapsulation - msdp(10), -- MSDP encapsulation - sixToFour(11), -- 6to4 encapsulation - sixOverFour(12), -- 6over4 encapsulation - isatap(13), -- ISATAP encapsulation - teredo(14), -- Teredo encapsulation - ipHttps(15) -- IPHTTPS + other(1), -- none of the following + direct(2), -- no intermediate header + gre(3), -- GRE encapsulation + minimal(4), -- Minimal encapsulation + l2tp(5), -- L2TP encapsulation + pptp(6), -- PPTP encapsulation + l2f(7), -- L2F encapsulation + udp(8), -- UDP encapsulation + atmp(9), -- ATMP encapsulation + msdp(10), -- MSDP encapsulation + sixToFour(11), -- 6to4 encapsulation + sixOverFour(12), -- 6over4 encapsulation + isatap(13), -- ISATAP encapsulation + teredo(14), -- Teredo encapsulation + ipHttps(15), -- IPHTTPS + softwireMesh(16), -- softwire mesh tunnel + dsLite(17), -- DS-Lite tunnel + aplusp(18), -- A+P encapsulation + ipsectunnelmode(19) -- IpSec tunnel mode encapsulation } END diff --git a/mibs/IPV6-ICMP-MIB.txt b/mibs/IPV6-ICMP-MIB.txt index bb66da5..ed4953a 100644 --- a/mibs/IPV6-ICMP-MIB.txt +++ b/mibs/IPV6-ICMP-MIB.txt @@ -7,13 +7,13 @@ ipv6IfEntry FROM IPV6-MIB; ipv6IcmpMIB MODULE-IDENTITY - LAST-UPDATED "9801082155Z" + LAST-UPDATED "201702220000Z" ORGANIZATION "IETF IPv6 Working Group" CONTACT-INFO " Dimitry Haskin Postal: Bay Networks, Inc. - 660 Techology Park Drive. + 660 Technology Park Drive. Billerica, MA 01821 US @@ -30,8 +30,27 @@ Tel: +1-978-916-3816 E-mail: sonishi@baynetworks.com" DESCRIPTION - "The MIB module for entities implementing - the ICMPv6." + "The obsolete MIB module for entities implementing + the ICMPv6. Use the IP-MIB instead. + + Copyright (c) 2017 IETF Trust and the persons + identified as authors of the code. All rights + reserved. + + Redistribution and use in source and binary + forms, with or without modification, is permitted + pursuant to, and subject to the license terms contained + in, the Simplified BSD License set forth in Section + 4.c of the IETF Trust's Legal Provisions Relating to + IETF Documents + (http://trustee.ietf.org/license-info)." + REVISION "201702220000Z" + DESCRIPTION + "Obsoleting this MIB module; it has been replaced by + the revised IP-MIB (RFC 4293)." + REVISION "9801082155Z" + DESCRIPTION + "First revision, published as RFC 2466" ::= { mib-2 56 } -- the ICMPv6 group @@ -43,17 +62,20 @@ ipv6IfIcmpTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6IfIcmpEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "IPv6 ICMP statistics. This table contains statistics + "IPv6 ICMP statistics. This table contains statistics of ICMPv6 messages that are received and sourced by - the entity." + the entity. + + This table is obsolete because systems were found + not to maintain these statistics per-interface." ::= { ipv6IcmpMIBObjects 1 } ipv6IfIcmpEntry OBJECT-TYPE SYNTAX Ipv6IfIcmpEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "An ICMPv6 statistics entry containing objects at a particular IPv6 interface. @@ -63,10 +85,13 @@ is addressed which may not be necessarily the input interface for the message. - Similarly, the sending interface is + Similarly, the sending interface is the interface that sources a given ICMP message which is usually but not - necessarily the output interface for the message." + necessarily the output interface for the message. + + This table is obsolete because systems were found + not to maintain these statistics per-interface." AUGMENTS { ipv6IfEntry } ::= { ipv6IfIcmpTable 1 } @@ -145,176 +170,231 @@ ipv6IfIcmpInMsgs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The total number of ICMP messages received by the interface which includes all those - counted by ipv6IfIcmpInErrors. Note that this + counted by ipv6IfIcmpInErrors. Note that this interface is the interface to which the ICMP messages were addressed which may not be - necessarily the input interface for the messages." + necessarily the input interface for the messages. + + This object has been obsoleted by IP-MIB::icmpStatsInMsgs." ::= { ipv6IfIcmpEntry 1 } ipv6IfIcmpInErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP messages which the interface received but determined as having ICMP-specific - errors (bad ICMP checksums, bad length, etc.)." + errors (bad ICMP checksums, bad length, etc.). + + This object has been obsoleted by IP-MIB::icmpStatsInErrors." ::= { ipv6IfIcmpEntry 2 } ipv6IfIcmpInDestUnreachs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Destination Unreachable - messages received by the interface." + messages received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 3 } ipv6IfIcmpInAdminProhibs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP destination unreachable/communication administratively - prohibited messages received by the interface." + + prohibited messages received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 4 } ipv6IfIcmpInTimeExcds OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Time Exceeded messages - received by the interface." + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 5 } ipv6IfIcmpInParmProblems OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Parameter Problem messages - received by the interface." + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 6 } ipv6IfIcmpInPktTooBigs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Packet Too Big messages - received by the interface." + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 7 } ipv6IfIcmpInEchos OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Echo (request) messages - received by the interface." + + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 8 } ipv6IfIcmpInEchoReplies OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Echo Reply messages received - by the interface." + by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 9 } ipv6IfIcmpInRouterSolicits OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Router Solicit messages - received by the interface." + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 10 } ipv6IfIcmpInRouterAdvertisements OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Router Advertisement messages - received by the interface." + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 11 } ipv6IfIcmpInNeighborSolicits OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Neighbor Solicit messages - received by the interface." + + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 12 } ipv6IfIcmpInNeighborAdvertisements OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Neighbor Advertisement - messages received by the interface." + messages received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 13 } ipv6IfIcmpInRedirects OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of Redirect messages received - by the interface." + by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 14 } ipv6IfIcmpInGroupMembQueries OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMPv6 Group Membership Query - messages received by the interface." + messages received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 15} ipv6IfIcmpInGroupMembResponses OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMPv6 Group Membership Response messages - received by the interface." + + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 16} ipv6IfIcmpInGroupMembReductions OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMPv6 Group Membership Reduction messages - received by the interface." + received by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsInPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 17} ipv6IfIcmpOutMsgs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The total number of ICMP messages which this interface attempted to send. Note that this counter - includes all those counted by icmpOutErrors." + includes all those counted by icmpOutErrors. + + This object has been obsoleted by IP-MIB::icmpStatsOutMsgs." ::= { ipv6IfIcmpEntry 18 } ipv6IfIcmpOutErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP messages which this interface did not send due to problems discovered within ICMP @@ -323,144 +403,190 @@ such as the inability of IPv6 to route the resultant datagram. In some implementations there may be no types of error which contribute to this counter's - value." + value. + + This object has been obsoleted by IP-MIB::icmpStatsOutErrors." ::= { ipv6IfIcmpEntry 19 } ipv6IfIcmpOutDestUnreachs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Destination Unreachable + messages sent by the interface. - messages sent by the interface." + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 20 } ipv6IfIcmpOutAdminProhibs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "Number of ICMP dest unreachable/communication - administratively prohibited messages sent." + administratively prohibited messages sent. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 21 } ipv6IfIcmpOutTimeExcds OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Time Exceeded messages sent - by the interface." + by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 22 } ipv6IfIcmpOutParmProblems OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Parameter Problem messages - sent by the interface." + sent by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 23 } ipv6IfIcmpOutPktTooBigs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Packet Too Big messages sent - by the interface." + by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 24 } ipv6IfIcmpOutEchos OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Echo (request) messages sent - by the interface." + by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 25 } ipv6IfIcmpOutEchoReplies OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Echo Reply messages sent - by the interface." + by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 26 } ipv6IfIcmpOutRouterSolicits OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Router Solicitation messages - sent by the interface." + sent by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 27 } ipv6IfIcmpOutRouterAdvertisements OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Router Advertisement messages - sent by the interface." + sent by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 28 } ipv6IfIcmpOutNeighborSolicits OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Neighbor Solicitation - messages sent by the interface." + messages sent by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 29 } ipv6IfIcmpOutNeighborAdvertisements OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMP Neighbor Advertisement - messages sent by the interface." + messages sent by the interface. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 30 } ipv6IfIcmpOutRedirects OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The number of Redirect messages sent. For + "The number of Redirect messages sent. For a host, this object will always be zero, - since hosts do not send redirects." + since hosts do not send redirects. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 31 } ipv6IfIcmpOutGroupMembQueries OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMPv6 Group Membership Query - messages sent." + messages sent. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 32} ipv6IfIcmpOutGroupMembResponses OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMPv6 Group Membership Response - messages sent." + messages sent. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 33} ipv6IfIcmpOutGroupMembReductions OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of ICMPv6 Group Membership Reduction - messages sent." + messages sent. + + This object has been obsoleted by IP-MIB::icmpMsgStatsOutPkts + in the row corresponding to this message type." ::= { ipv6IfIcmpEntry 34} -- conformance information @@ -475,10 +601,13 @@ ipv6IcmpGroups -- compliance statements ipv6IcmpCompliance MODULE-COMPLIANCE - STATUS current + STATUS obsolete DESCRIPTION "The compliance statement for SNMPv2 entities which - implement ICMPv6." + implement ICMPv6. + + This compliance statement has been obsoleted by + IP-MIB::ipMIBCompliance2." MODULE -- this module MANDATORY-GROUPS { ipv6IcmpGroup } ::= { ipv6IcmpCompliances 1 } @@ -520,10 +649,12 @@ ipv6IcmpGroup OBJECT-GROUP ipv6IfIcmpOutGroupMembResponses, ipv6IfIcmpOutGroupMembReductions } - STATUS current + STATUS obsolete DESCRIPTION "The ICMPv6 group of objects providing information - specific to ICMPv6." + specific to ICMPv6. + + This group has been obsoleted by IP-MIB::icmpStatsGroup." ::= { ipv6IcmpGroups 1 } END diff --git a/mibs/IPV6-MIB.txt b/mibs/IPV6-MIB.txt index 6957af2..4328f77 100644 --- a/mibs/IPV6-MIB.txt +++ b/mibs/IPV6-MIB.txt @@ -13,13 +13,13 @@ Ipv6IfIndexOrZero FROM IPV6-TC; ipv6MIB MODULE-IDENTITY - LAST-UPDATED "9802052155Z" + LAST-UPDATED "201702220000Z" ORGANIZATION "IETF IPv6 Working Group" CONTACT-INFO " Dimitry Haskin Postal: Bay Networks, Inc. - 660 Techology Park Drive. + 660 Technology Park Drive. Billerica, MA 01821 US @@ -37,8 +37,26 @@ Tel: +1-978-916-3816 E-mail: sonishi@baynetworks.com" DESCRIPTION - "The MIB module for entities implementing the IPv6 - protocol." + "The obsolete MIB module for entities implementing the IPv6 + protocol. Use the IP-MIB or IP-FORWARD-MIB instead. + + Copyright (c) 2017 IETF Trust and the persons identified + as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info)." + REVISION "201702220000Z" + DESCRIPTION + "Obsoleting this MIB module; it has been replaced by + the revised IP-MIB (RFC 4293) and IP-FORWARD-MIB + (RFC 4292)." + REVISION "9802052155Z" + DESCRIPTION + "First revision, published as RFC 2465" ::= { mib-2 55 } -- the IPv6 general group @@ -53,7 +71,7 @@ notForwarding(2) -- a router } MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "The indication of whether this entity is acting as an IPv6 router in respect to the forwarding of @@ -67,41 +85,52 @@ Accordingly, it is appropriate for an agent to return a `wrongValue' response if a management station attempts to change this object to an - inappropriate value." + inappropriate value. + + This object is obsoleted by IP-MIB::ipv6IpForwarding." ::= { ipv6MIBObjects 1 } ipv6DefaultHopLimit OBJECT-TYPE SYNTAX INTEGER(0..255) MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "The default value inserted into the Hop Limit field of the IPv6 header of datagrams originated at this entity, whenever a Hop Limit value is not - supplied by the transport layer protocol." + supplied by the transport layer protocol. + + This object is obsoleted by IP-MIB::ipv6IpDefaultHopLimit." DEFVAL { 64 } ::= { ipv6MIBObjects 2 } ipv6Interfaces OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of IPv6 interfaces (regardless of - their current state) present on this system." + their current state) present on this system. + + This object is obsolete; there is no direct replacement, + but its value can be derived from the number of rows + in the IP-MIB::ipv6InterfaceTable." ::= { ipv6MIBObjects 3 } ipv6IfTableLastChange OBJECT-TYPE SYNTAX TimeStamp MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The value of sysUpTime at the time of the last insertion or removal of an entry in the - ipv6IfTable. If the number of entries has been + ipv6IfTable. If the number of entries has been unchanged since the last re-initialization of the local network management subsystem, then this - object contains a zero value." + object contains a zero value. + + This object is obsoleted by + IP-MIB::ipv6InterfaceTableLastChange." ::= { ipv6MIBObjects 4 } -- the IPv6 Interfaces table @@ -109,7 +138,7 @@ ipv6IfTableLastChange OBJECT-TYPE ipv6IfTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6IfEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The IPv6 Interfaces table contains information on the entity's internetwork-layer interfaces. @@ -117,16 +146,20 @@ ipv6IfTable OBJECT-TYPE layer attachment to the layer immediately below IPv6 including internet layer 'tunnels', such as - tunnels over IPv4 or IPv6 itself." + tunnels over IPv4 or IPv6 itself. + + This table is obsoleted by IP-MIB::ipv6InterfaceTable." ::= { ipv6MIBObjects 5 } ipv6IfEntry OBJECT-TYPE SYNTAX Ipv6IfEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "An interface entry containing objects - about a particular IPv6 interface." + about a particular IPv6 interface. + + This object is obsoleted by IP-MIB::ipv6InterfaceEntry." INDEX { ipv6IfIndex } ::= { ipv6IfTable 1 } @@ -147,105 +180,126 @@ ipv6IfTable OBJECT-TYPE ipv6IfIndex OBJECT-TYPE SYNTAX Ipv6IfIndex MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "A unique non-zero value identifying - the particular IPv6 interface." + the particular IPv6 interface. + + This object is obsoleted. In the IP-MIB, + interfaces are simply identified by IfIndex." ::= { ipv6IfEntry 1 } ipv6IfDescr OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "A textual string containing information about the interface. This string may be set by the network - management system." + management system. + + This object is obsoleted by IF-MIB::ifDescr." ::= { ipv6IfEntry 2 } ipv6IfLowerLayer OBJECT-TYPE SYNTAX VariablePointer MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "This object identifies the protocol layer over which this network interface operates. If this network interface operates over the data-link layer, then the value of this object refers to an - instance of ifIndex [6]. If this network interface + instance of ifIndex [RFC1573]. If this network interface operates over an IPv4 interface, the value of this - object refers to an instance of ipAdEntAddr [3]. + object refers to an instance of ipAdEntAddr [RFC1213]. If this network interface operates over another IPv6 interface, the value of this object refers to an instance of ipv6IfIndex. If this network interface is not currently operating over an active protocol layer, then the value of this object - should be set to the OBJECT ID { 0 0 }." + should be set to the OBJECT ID { 0 0 }. + + This object is obsolete. The IF-STACK-TABLE may + be used to express relationships between interfaces." ::= { ipv6IfEntry 3 } ipv6IfEffectiveMtu OBJECT-TYPE SYNTAX Unsigned32 UNITS "octets" MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The size of the largest IPv6 packet which can be sent/received on the interface, specified in - octets." + octets. + + This object is obsolete. The value of IF-MIB::ifMtu + for the corresponding value of ifIndex represents the + MTU of the interface." ::= { ipv6IfEntry 4 } ipv6IfReasmMaxSize OBJECT-TYPE SYNTAX Unsigned32 (0..65535) UNITS "octets" MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The size of the largest IPv6 datagram which this entity can re-assemble from incoming IPv6 fragmented - datagrams received on this interface." + datagrams received on this interface. + + This object is obsoleted by IP-MIB::ipv6InterfaceReasmMaxSize." ::= { ipv6IfEntry 5 } ipv6IfIdentifier OBJECT-TYPE SYNTAX Ipv6AddressIfIdentifier MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "The Interface Identifier for this interface that - is (at least) unique on the link this interface is - attached to. The Interface Identifier is combined + attached to. The Interface Identifier is combined with an address prefix to form an interface address. By default, the Interface Identifier is autoconfigured according to the rules of the link type this - interface is attached to." + interface is attached to. + + This object is obsoleted by IP-MIB::ipv6InterfaceIdentifier." ::= { ipv6IfEntry 6 } ipv6IfIdentifierLength OBJECT-TYPE SYNTAX INTEGER (0..64) UNITS "bits" MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION - "The length of the Interface Identifier in bits." + "The length of the Interface Identifier in bits. + + This object is obsolete. It can be derived from the length + of IP-MIB::ipv6InterfaceIdentifier; Interface Identifiers + that are not an even number of octets are not supported." ::= { ipv6IfEntry 7 } ipv6IfPhysicalAddress OBJECT-TYPE SYNTAX PhysAddress MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The interface's physical address. For example, for + "The interface's physical address. For example, for an IPv6 interface attached to an 802.x link, this - object normally contains a MAC address. Note that + object normally contains a MAC address. Note that in some cases this address may differ from the address of the interface's protocol sub-layer. The interface's media-specific MIB must define the bit and byte ordering and the format of the value of - this object. For interfaces which do not have such + this object. For interfaces which do not have such an address (e.g., a serial line), this object should - contain an octet string of zero length." + contain an octet string of zero length. + + This object is obsoleted by IF-MIB::ifPhysAddress." ::= { ipv6IfEntry 8 } ipv6IfAdminStatus OBJECT-TYPE @@ -254,16 +308,19 @@ ipv6IfAdminStatus OBJECT-TYPE down(2) } MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "The desired state of the interface. When a managed - system initializes, all IPv6 interfaces start with + system initializes, all IPv6 interfaces start with ipv6IfAdminStatus in the down(2) state. As a result of either explicit management action or per configuration information retained by the managed + system, ipv6IfAdminStatus is then changed to + the up(1) state (or remains in the down(2) state). - system, ipv6IfAdminStatus is then changed to - the up(1) state (or remains in the down(2) state)." + This object is obsolete. IPv6 does not have a + separate admin status; the admin status of the + interface is represented by IF-MIB::ifAdminStatus." ::= { ipv6IfEntry 9 } ipv6IfOperStatus OBJECT-TYPE @@ -274,6 +331,7 @@ ipv6IfOperStatus OBJECT-TYPE noIfIdentifier(3), -- no interface identifier -- status can not be + -- determined for some unknown(4), -- reason @@ -281,7 +339,7 @@ ipv6IfOperStatus OBJECT-TYPE notPresent(5) -- missing } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The current operational state of the interface. The noIfIdentifier(3) state indicates that no valid @@ -297,21 +355,27 @@ ipv6IfOperStatus OBJECT-TYPE fault that prevents it from going to the up(1) state; it should remain in the notPresent(5) state if the interface has missing (typically, lower layer) - components." + components. + + This object is obsolete. IPv6 does not have a + separate operational status; the operational status of the + interface is represented by IF-MIB::ifOperStatus." ::= { ipv6IfEntry 10 } ipv6IfLastChange OBJECT-TYPE SYNTAX TimeStamp MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The value of sysUpTime at the time the interface entered its current operational state. If the current state was entered prior to the last re-initialization of the local network management - subsystem, then this object contains a zero - value." + value. + + This object is obsolete. The last change of + IF-MIB::ifOperStatus is represented by IF-MIB::ifLastChange." ::= { ipv6IfEntry 11 } -- IPv6 Interface Statistics table @@ -319,18 +383,22 @@ ipv6IfLastChange OBJECT-TYPE ipv6IfStatsTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6IfStatsEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "IPv6 interface traffic statistics." + "IPv6 interface traffic statistics. + + This table is obsoleted by the IP-MIB::ipIfStatsTable." ::= { ipv6MIBObjects 6 } ipv6IfStatsEntry OBJECT-TYPE SYNTAX Ipv6IfStatsEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "An interface statistics entry containing objects - at a particular IPv6 interface." + at a particular IPv6 interface. + + This object is obsoleted by the IP-MIB::ipIfStatsEntry." AUGMENTS { ipv6IfEntry } ::= { ipv6IfStatsTable 1 } @@ -358,9 +426,9 @@ ipv6IfLastChange OBJECT-TYPE ipv6IfStatsOutRequests Counter32, ipv6IfStatsOutDiscards - Counter32, ipv6IfStatsOutFragOKs + Counter32, ipv6IfStatsOutFragFails Counter32, @@ -381,48 +449,59 @@ ipv6IfLastChange OBJECT-TYPE ipv6IfStatsInReceives OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The total number of input datagrams received by - the interface, including those received in error." + the interface, including those received in error. + + This object is obsoleted by IP-MIB::ipIfStatsHCInReceives." ::= { ipv6IfStatsEntry 1 } ipv6IfStatsInHdrErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of input datagrams discarded due to errors in their IPv6 headers, including version number mismatch, other format errors, hop count exceeded, errors discovered in processing their - IPv6 options, etc." + IPv6 options, etc. + + This object is obsoleted by IP-MIB::ipIfStatsInHdrErrors." ::= { ipv6IfStatsEntry 2 } ipv6IfStatsInTooBigErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of input datagrams that could not be + forwarded because their size exceeded the link MTU - of outgoing interface." + of outgoing interface. + + This object is obsoleted. It was not replicated in the + IP-MIB due to feedback that systems did not retain the + incoming interface of a packet that failed fragmentation." ::= { ipv6IfStatsEntry 3 } ipv6IfStatsInNoRoutes OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of input datagrams discarded because no route could be found to transmit them to their - destination." + destination. + + This object is obsoleted by IP-MIB::ipIfStatsInNoRoutes." ::= { ipv6IfStatsEntry 4 } ipv6IfStatsInAddrErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of input datagrams discarded because the IPv6 address in their IPv6 header's destination @@ -433,62 +512,73 @@ ipv6IfLastChange OBJECT-TYPE entities which are not IPv6 routers and therefore do not forward datagrams, this counter includes datagrams discarded because the destination address - was not a local address." + was not a local address. + + This object is obsoleted by IP-MIB::ipIfStatsInAddrErrors." ::= { ipv6IfStatsEntry 5 } ipv6IfStatsInUnknownProtos OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of locally-addressed datagrams received successfully but discarded because of an - unknown or unsupported protocol. This counter is + unknown or unsupported protocol. This counter is incremented at the interface to which these + datagrams were addressed which might not be necessarily the input interface for some of - the datagrams." + the datagrams. + + This object is obsoleted by IP-MIB::ipIfStatsInUnknownProtos." ::= { ipv6IfStatsEntry 6 } ipv6IfStatsInTruncatedPkts OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of input datagrams discarded because - datagram frame didn't carry enough data." + datagram frame didn't carry enough data. + + This object is obsoleted by IP-MIB::ipIfStatsInTruncatedPkts." ::= { ipv6IfStatsEntry 7 } ipv6IfStatsInDiscards OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of input IPv6 datagrams for which no problems were encountered to prevent their continued processing, but which were discarded (e.g., for lack of buffer space). Note that this counter does not include any datagrams discarded - while awaiting re-assembly." + while awaiting re-assembly. + + This object is obsoleted by IP-MIB::ipIfStatsInDiscards." ::= { ipv6IfStatsEntry 8 } ipv6IfStatsInDelivers OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The total number of datagrams successfully delivered to IPv6 user-protocols (including ICMP). This counter is incremented at the interface to which these datagrams were addressed which might not be necessarily the input interface for some of - the datagrams." + the datagrams. + + This object is obsoleted by IP-MIB::ipIfStatsHCInDelivers." ::= { ipv6IfStatsEntry 9 } ipv6IfStatsOutForwDatagrams OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of output datagrams which this entity received and forwarded to their final @@ -498,25 +588,30 @@ ipv6IfLastChange OBJECT-TYPE via this entity, and the Source-Route processing was successful. Note that for a successfully forwarded datagram the counter - of the outgoing interface is incremented." + of the outgoing interface is incremented. + + This object is obsoleted by + IP-MIB::ipIfStatsHCOutForwDatagrams." ::= { ipv6IfStatsEntry 10 } ipv6IfStatsOutRequests OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The total number of IPv6 datagrams which local IPv6 user-protocols (including ICMP) supplied to IPv6 in requests for transmission. Note that this counter does not include any datagrams counted in - ipv6IfStatsOutForwDatagrams." + ipv6IfStatsOutForwDatagrams. + + This object is obsoleted by IP-MIB::ipIfStatsHCOutRequests." ::= { ipv6IfStatsEntry 11 } ipv6IfStatsOutDiscards OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of output IPv6 datagrams for which no problem was encountered to prevent their @@ -524,67 +619,79 @@ ipv6IfLastChange OBJECT-TYPE discarded (e.g., for lack of buffer space). Note that this counter would include datagrams counted in ipv6IfStatsOutForwDatagrams if any such packets - met this (discretionary) discard criterion." + met this (discretionary) discard criterion. + + This object is obsoleted by IP-MIB::ipIfStatsOutDiscards." ::= { ipv6IfStatsEntry 12 } ipv6IfStatsOutFragOKs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of IPv6 datagrams that have been - successfully fragmented at this output interface." + successfully fragmented at this output interface. + + This object is obsoleted by IP-MIB::ipIfStatsOutFragOKs." ::= { ipv6IfStatsEntry 13 } ipv6IfStatsOutFragFails OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of IPv6 datagrams that have been discarded because they needed to be fragmented - at this output interface but could not be." + at this output interface but could not be. + + This object is obsoleted by IP-MIB::ipIfStatsOutFragFails." ::= { ipv6IfStatsEntry 14 } ipv6IfStatsOutFragCreates OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of output datagram fragments that have been generated as a result of fragmentation at - this output interface." + this output interface. + + This object is obsoleted by IP-MIB::ipIfStatsOutFragCreates." ::= { ipv6IfStatsEntry 15 } ipv6IfStatsReasmReqds OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of IPv6 fragments received which needed to be reassembled at this interface. Note that this counter is incremented at the interface to which these fragments were addressed which might not be necessarily the input interface for some of - the fragments." + the fragments. + + This object is obsoleted by IP-MIB::ipIfStatsReasmReqds." ::= { ipv6IfStatsEntry 16 } ipv6IfStatsReasmOKs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of IPv6 datagrams successfully reassembled. Note that this counter is incremented at the interface to which these datagrams were addressed which might not be necessarily the input - interface for some of the fragments." + interface for some of the fragments. + + This object is obsoleted by IP-MIB::ipIfStatsReasmOKs." ::= { ipv6IfStatsEntry 17 } ipv6IfStatsReasmFails OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of failures detected by the IPv6 re- assembly algorithm (for whatever reason: timed @@ -596,25 +703,31 @@ ipv6IfLastChange OBJECT-TYPE This counter is incremented at the interface to which these fragments were addressed which might not be necessarily the input interface for some of the - fragments." + fragments. + + This object is obsoleted by IP-MIB::ipIfStatsReasmFails." ::= { ipv6IfStatsEntry 18 } ipv6IfStatsInMcastPkts OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of multicast packets received - by the interface" + by the interface + + This object is obsoleted by IP-MIB::ipIfStatsHCInMcastPkts." ::= { ipv6IfStatsEntry 19 } ipv6IfStatsOutMcastPkts OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of multicast packets transmitted - by the interface" + by the interface + + This object is obsoleted by IP-MIB::ipIfStatsHCOutMcastPkts." ::= { ipv6IfStatsEntry 20 } -- Address Prefix table @@ -626,79 +739,93 @@ ipv6IfLastChange OBJECT-TYPE ipv6AddrPrefixTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6AddrPrefixEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The list of IPv6 address prefixes of - IPv6 interfaces." + IPv6 interfaces. + + This table is obsoleted by IP-MIB::ipAddressPrefixTable." ::= { ipv6MIBObjects 7 } ipv6AddrPrefixEntry OBJECT-TYPE SYNTAX Ipv6AddrPrefixEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "An interface entry containing objects of - a particular IPv6 address prefix." + a particular IPv6 address prefix. + + This entry is obsoleted by IP-MIB::ipAddressPrefixEntry." INDEX { ipv6IfIndex, ipv6AddrPrefix, ipv6AddrPrefixLength } ::= { ipv6AddrPrefixTable 1 } Ipv6AddrPrefixEntry ::= SEQUENCE { - ipv6AddrPrefix Ipv6AddressPrefix, - ipv6AddrPrefixLength INTEGER (0..128), + ipv6AddrPrefixLength INTEGER, ipv6AddrPrefixOnLinkFlag TruthValue, ipv6AddrPrefixAutonomousFlag TruthValue, ipv6AddrPrefixAdvPreferredLifetime Unsigned32, ipv6AddrPrefixAdvValidLifetime Unsigned32 + } ipv6AddrPrefix OBJECT-TYPE SYNTAX Ipv6AddressPrefix MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The prefix associated with the this interface." + "The prefix associated with the this interface. + + This object is obsoleted by IP-MIB::ipAddressPrefixPrefix." ::= { ipv6AddrPrefixEntry 1 } ipv6AddrPrefixLength OBJECT-TYPE SYNTAX INTEGER (0..128) UNITS "bits" MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The length of the prefix (in bits)." + "The length of the prefix (in bits). + + This object is obsoleted by IP-MIB::ipAddressPrefixLength." ::= { ipv6AddrPrefixEntry 2 } ipv6AddrPrefixOnLinkFlag OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "This object has the value 'true(1)', if this - prefix can be used for on-link determination - and the value 'false(2)' otherwise." + prefix can be used for on-link determination + and the value 'false(2)' otherwise. + + This object is obsoleted by IP-MIB::ipAddressPrefixOnLinkFlag." ::= { ipv6AddrPrefixEntry 3 } ipv6AddrPrefixAutonomousFlag OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "Autonomous address configuration flag. When + "Autonomous address configuration flag. When true(1), indicates that this prefix can be used for autonomous address configuration (i.e. can be used to form a local interface address). If false(2), it is not used to autoconfigure - a local interface address." + a local interface address. + + This object is obsoleted by + + IP-MIB::ipAddressPrefixAutonomousFlag." ::= { ipv6AddrPrefixEntry 4 } ipv6AddrPrefixAdvPreferredLifetime OBJECT-TYPE SYNTAX Unsigned32 UNITS "seconds" MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "It is the length of time in seconds that this prefix will remain preferred, i.e. time until @@ -708,14 +835,17 @@ ipv6IfLastChange OBJECT-TYPE The address generated from a deprecated prefix should no longer be used as a source address in new communications, but packets received on such - an interface are processed as expected." + an interface are processed as expected. + + This object is obsoleted by + IP-MIB::ipAddressPrefixAdvPreferredLifetime." ::= { ipv6AddrPrefixEntry 5 } ipv6AddrPrefixAdvValidLifetime OBJECT-TYPE SYNTAX Unsigned32 UNITS "seconds" MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "It is the length of time in seconds that this prefix will remain valid, i.e. time until @@ -724,7 +854,10 @@ ipv6IfLastChange OBJECT-TYPE The address generated from an invalidated prefix should not appear as the destination or source - address of a packet." + address of a packet. + + This object is obsoleted by + IP-MIB::ipAddressPrefixAdvValidLifetime." ::= { ipv6AddrPrefixEntry 6 } -- the IPv6 Address table @@ -735,19 +868,23 @@ ipv6IfLastChange OBJECT-TYPE ipv6AddrTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6AddrEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The table of addressing information relevant to - this node's interface addresses." + this node's interface addresses. + + This table is obsoleted by IP-MIB::ipAddressTable." ::= { ipv6MIBObjects 8 } ipv6AddrEntry OBJECT-TYPE SYNTAX Ipv6AddrEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The addressing information for one of this - node's interface addresses." + node's interface addresses. + + This entry is obsoleted by IP-MIB::ipAddressEntry." INDEX { ipv6IfIndex, ipv6AddrAddress } ::= { ipv6AddrTable 1 } @@ -763,20 +900,26 @@ ipv6IfLastChange OBJECT-TYPE ipv6AddrAddress OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The IPv6 address to which this entry's addressing - information pertains." + information pertains. + + This object is obsoleted by IP-MIB::ipAddressAddr." ::= { ipv6AddrEntry 1 } ipv6AddrPfxLength OBJECT-TYPE SYNTAX INTEGER(0..128) UNITS "bits" MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The length of the prefix (in bits) associated with - the IPv6 address of this entry." + the IPv6 address of this entry. + + This object is obsoleted by the IP-MIB::ipAddressPrefixLength + in the row of the IP-MIB::ipAddressPrefixTable to which the + IP-MIB::ipAddressPrefix points." ::= { ipv6AddrEntry 2 } ipv6AddrType OBJECT-TYPE @@ -794,23 +937,28 @@ ipv6IfLastChange OBJECT-TYPE unknown(3) -- for some reason. } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The type of address. Note that 'stateless(1)' + "The type of address. Note that 'stateless(1)' refers to an address that was statelessly autoconfigured; 'stateful(2)' refers to a address which was acquired by via a stateful protocol - (e.g. DHCPv6, manual configuration)." + (e.g. DHCPv6, manual configuration). + + This object is obsoleted by IP-MIB::ipAddressOrigin." ::= { ipv6AddrEntry 3 } ipv6AddrAnycastFlag OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "This object has the value 'true(1)', if this address is an anycast address and the value - 'false(2)' otherwise." + 'false(2)' otherwise. + + This object is obsoleted by a value of 'anycast(2)' + in IP-MIB::ipAddressType." ::= { ipv6AddrEntry 4 } ipv6AddrStatus OBJECT-TYPE @@ -823,7 +971,7 @@ ipv6IfLastChange OBJECT-TYPE -- for some reason. } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "Address status. The preferred(1) state indicates that this is a valid address that can appear as @@ -832,13 +980,14 @@ ipv6IfLastChange OBJECT-TYPE a valid but deprecated address that should no longer be used as a source address in new communications, but packets addressed to such an address are - processed as expected. The invalid(3) state indicates + processed as expected. The invalid(3) state indicates that this is not valid address which should not - appear as the destination or source address of - a packet. The inaccessible(4) state indicates that + a packet. The inaccessible(4) state indicates that the address is not accessible because the interface - to which this address is assigned is not operational." + to which this address is assigned is not operational. + + This object is obsoleted by IP-MIB::ipAddressStatus." ::= { ipv6AddrEntry 5 } -- IPv6 Routing objects @@ -846,23 +995,29 @@ ipv6IfLastChange OBJECT-TYPE ipv6RouteNumber OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of current ipv6RouteTable entries. This is primarily to avoid having to read - the table in order to determine this number." + the table in order to determine this number. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRouteNumber." ::= { ipv6MIBObjects 9 } ipv6DiscardedRoutes OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of routing entries which were chosen + to be discarded even though they are valid. One possible reason for discarding such an entry could be to free-up buffer space for other routing - entries." + entries. + + This object is obsoleted by + IP-FORWARD-MIB::inetCidrRouteDiscards." ::= { ipv6MIBObjects 10 } -- IPv6 Routing table @@ -870,20 +1025,25 @@ ipv6IfLastChange OBJECT-TYPE ipv6RouteTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6RouteEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "IPv6 Routing table. This table contains + "IPv6 Routing table. This table contains an entry for each valid IPv6 unicast route that can be used for packet forwarding - determination." + determination. + + This table is obsoleted by IP-FORWARD-MIB::inetCidrRouteTable." ::= { ipv6MIBObjects 11 } ipv6RouteEntry OBJECT-TYPE SYNTAX Ipv6RouteEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "A routing entry." + "A routing entry. + + This entry is obsoleted by + IP-FORWARD-MIB::inetCidrRouteEntry." INDEX { ipv6RouteDest, ipv6RoutePfxLength, ipv6RouteIndex } @@ -909,40 +1069,46 @@ ipv6IfLastChange OBJECT-TYPE ipv6RouteDest OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The destination IPv6 address of this route. This object may not take a Multicast address - value." + value. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRouteDest." ::= { ipv6RouteEntry 1 } ipv6RoutePfxLength OBJECT-TYPE SYNTAX INTEGER(0..128) UNITS "bits" MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "Indicates the prefix length of the destination - address." + address. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRoutePfxLen." ::= { ipv6RouteEntry 2 } ipv6RouteIndex OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The value which uniquely identifies the route among the routes to the same network layer destination. The way this value is chosen is implementation specific but it must be unique for ipv6RouteDest/ipv6RoutePfxLength pair and remain - constant for the life of the route." + constant for the life of the route. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRoutePolicy." ::= { ipv6RouteEntry 3 } ipv6RouteIfIndex OBJECT-TYPE SYNTAX Ipv6IfIndexOrZero MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The index value which uniquely identifies the local interface through which the next hop of this @@ -950,18 +1116,24 @@ ipv6IfLastChange OBJECT-TYPE by a particular value of this index is the same interface as identified by the same value of ipv6IfIndex. For routes of the discard type this - value can be zero." + value can be zero. + + This object is obsoleted by + IP-FORWARD-MIB::inetCidrRouteIfIndex." ::= { ipv6RouteEntry 4 } ipv6RouteNextHop OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "On remote routes, the address of the next system en route; otherwise, ::0 ('00000000000000000000000000000000'H in ASN.1 - string representation)." + string representation). + + This object is obsoleted by + IP-FORWARD-MIB::inetCidrRouteNextHop." ::= { ipv6RouteEntry 5 } ipv6RouteType OBJECT-TYPE @@ -982,16 +1154,18 @@ ipv6IfLastChange OBJECT-TYPE } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The type of route. Note that 'local(3)' refers + "The type of route. Note that 'local(3)' refers to a route for which the next hop is the final destination; 'remote(4)' refers to a route for - which the next hop is not the final + which the next hop is not the final destination; 'discard(2)' refers to a route indicating that packets to destinations matching this route are to be discarded (sometimes called - black-hole route)." + black-hole route). + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRouteType." ::= { ipv6RouteEntry 6 } ipv6RouteProtocol OBJECT-TYPE @@ -1017,16 +1191,18 @@ ipv6IfLastChange OBJECT-TYPE igrp(9) -- InterGateway Routing Protocol } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The routing mechanism via which this route was - learned." + learned. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRouteProto." ::= { ipv6RouteEntry 7 } ipv6RoutePolicy OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The general set of conditions that would cause the selection of one multipath route (set of next hops @@ -1039,90 +1215,103 @@ ipv6IfLastChange OBJECT-TYPE Protocols defining 'policy' otherwise must either define a set of values which are valid for this object or must implement an integer- - instanced policy table for which this object's - value acts as an index." + instanced policy table for which this object's + value acts as an index. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRoutePolicy." ::= { ipv6RouteEntry 8 } ipv6RouteAge OBJECT-TYPE SYNTAX Unsigned32 UNITS "seconds" MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The number of seconds since this route was last updated or otherwise determined to be correct. Note that no semantics of `too old' can be implied except through knowledge of the routing protocol - by which the route was learned." + by which the route was learned. + + This object is obsoleted by IP-FORWARD-MIB::inetCidrRouteAge." ::= { ipv6RouteEntry 9 } ipv6RouteNextHopRDI OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The Routing Domain ID of the Next Hop. - The semantics of this object are determined by - the routing-protocol specified in the route's - ipv6RouteProtocol value. When this object is + The semantics of this object are determined by + the routing-protocol specified in the route's + ipv6RouteProtocol value. When this object is unknown or not relevant its value should be set - to zero." + to zero. + + This object is obsolete, and it has no replacement. + The Routing Domain ID concept did not catch on." ::= { ipv6RouteEntry 10 } ipv6RouteMetric OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The routing metric for this route. The + "The routing metric for this route. The semantics of this metric are determined by the routing protocol specified in the route's ipv6RouteProtocol value. When this is unknown or not relevant to the protocol indicated by ipv6RouteProtocol, the object value should be - set to its maximum value (4,294,967,295)." + set to its maximum value (4,294,967,295). + + This object is obsoleted by + IP-FORWARD-MIB::inetCidrRouteMetric1." ::= { ipv6RouteEntry 11 } ipv6RouteWeight OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The system internal weight value for this route. The semantics of this value are determined by - the implementation specific rules. Generally, + the implementation specific rules. Generally, within routes with the same ipv6RoutePolicy value, the lower the weight value the more preferred is - the route." + the route. + + This object is obsoleted, and it has not been replaced." ::= { ipv6RouteEntry 12 } ipv6RouteInfo OBJECT-TYPE SYNTAX RowPointer MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "A reference to MIB definitions specific to the particular routing protocol which is responsible - for this route, as determined by the value - specified in the route's ipv6RouteProto value. - If this information is not present, its value + for this route, as determined by the value + specified in the route's ipv6RouteProto value. + If this information is not present, its value should be set to the OBJECT ID { 0 0 }, - which is a syntactically valid object identifier, + which is a syntactically valid object identifier, and any implementation conforming to ASN.1 - and the Basic Encoding Rules must be able to - generate and recognize this value." + and the Basic Encoding Rules must be able to + generate and recognize this value. + + This object is obsoleted, and it has not been replaced." ::= { ipv6RouteEntry 13 } ipv6RouteValid OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "Setting this object to the value 'false(2)' has the effect of invalidating the corresponding entry in the ipv6RouteTable object. That is, it effectively disassociates the destination - identified with said entry from the route identified with said entry. It is an implementation-specific matter as to whether the @@ -1132,7 +1321,10 @@ ipv6IfLastChange OBJECT-TYPE corresponds to entries not currently in use. Proper interpretation of such entries requires examination of the relevant ipv6RouteValid - object." + object. + + This object is obsoleted by + IP-FORWARD-MIB::inetCidrRouteStatus." DEFVAL { true } ::= { ipv6RouteEntry 14 } @@ -1141,7 +1333,7 @@ ipv6IfLastChange OBJECT-TYPE ipv6NetToMediaTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6NetToMediaEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The IPv6 Address Translation table used for mapping from IPv6 addresses to physical addresses. @@ -1152,16 +1344,20 @@ ipv6IfLastChange OBJECT-TYPE for determining address equivalencies; if all interfaces are of this type, then the Address Translation table is empty, i.e., has zero - entries." + entries. + + This table is obsoleted by IP-MIB::ipNetToPhysicalTable." ::= { ipv6MIBObjects 12 } ipv6NetToMediaEntry OBJECT-TYPE SYNTAX Ipv6NetToMediaEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "Each entry contains one IPv6 address to `physical' - address equivalence." + address equivalence. + + This entry is obsoleted by IP-MIB::ipNetToPhysicalEntry." INDEX { ipv6IfIndex, ipv6NetToMediaNetAddress } ::= { ipv6NetToMediaTable 1 } @@ -1170,7 +1366,6 @@ ipv6IfLastChange OBJECT-TYPE ipv6NetToMediaNetAddress Ipv6Address, ipv6NetToMediaPhysAddress - PhysAddress, ipv6NetToMediaType INTEGER, @@ -1185,18 +1380,22 @@ ipv6IfLastChange OBJECT-TYPE ipv6NetToMediaNetAddress OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The IPv6 Address corresponding to - the media-dependent `physical' address." + the media-dependent `physical' address. + + This object is obsoleted by IP-MIB::ipNetToPhysicalNetAddress." ::= { ipv6NetToMediaEntry 1 } ipv6NetToMediaPhysAddress OBJECT-TYPE SYNTAX PhysAddress MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The media-dependent `physical' address." + "The media-dependent `physical' address. + + This object is obsoleted by IP-MIB::ipNetToPhysicalPhysAddress." ::= { ipv6NetToMediaEntry 2 } ipv6NetToMediaType OBJECT-TYPE @@ -1207,16 +1406,18 @@ ipv6IfLastChange OBJECT-TYPE local(4) -- local interface } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The type of the mapping. The 'dynamic(2)' type + "The type of the mapping. The 'dynamic(2)' type indicates that the IPv6 address to physical addresses mapping has been dynamically resolved using the IPv6 Neighbor Discovery - protocol. The static(3)' types indicates that + protocol. The static(3)' types indicates that the mapping has been statically configured. The local(4) indicates that the mapping is - provided for an entity's own interface address." + provided for an entity's own interface address. + + This object is obsoleted by IP-MIB::ipNetToPhysicalType." ::= { ipv6NetToMediaEntry 3 } ipv6IfNetToMediaState OBJECT-TYPE @@ -1237,29 +1438,33 @@ ipv6IfNetToMediaState OBJECT-TYPE -- for some reason. } MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION - "The Neighbor Unreachability Detection [8] state + "The Neighbor Unreachability Detection [RFC2461] state for the interface when the address mapping in - this entry is used." + this entry is used. + + This object is obsoleted by IP-MIB::ipNetToPhysicalState." ::= { ipv6NetToMediaEntry 4 } ipv6IfNetToMediaLastUpdated OBJECT-TYPE SYNTAX TimeStamp MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "The value of sysUpTime at the time this entry was last updated. If this entry was updated prior to the last re-initialization of the local network management subsystem, then this object contains - a zero value." + a zero value. + + This object is obsoleted by IP-MIB::ipNetToPhysicalLastUpdated." ::= { ipv6NetToMediaEntry 5 } ipv6NetToMediaValid OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "Setting this object to the value 'false(2)' has the effect of invalidating the corresponding entry @@ -1267,21 +1472,22 @@ ipv6IfNetToMediaLastUpdated OBJECT-TYPE disassociates the interface identified with said entry from the mapping identified with said entry. It is an implementation-specific matter as to - whether the agent removes an invalidated entry from the table. Accordingly, management stations must be prepared to receive tabular information from agents that corresponds to entries not currently in use. Proper interpretation of such entries requires examination of the relevant - ipv6NetToMediaValid object." + ipv6NetToMediaValid object. + + This object is obsoleted by IP-MIB::ipNetToPhysicalRowStatus." DEFVAL { true } ::= { ipv6NetToMediaEntry 6 } -- definition of IPv6-related notifications. -- Note that we need ipv6NotificationPrefix with the 0 -- sub-identifier to make this MIB to translate to --- an SNMPv1 format in a reversible way. For example +-- an SNMPv1 format in a reversible way. For example -- it is needed for proxies that convert SNMPv1 traps -- to SNMPv2 notifications without MIB knowledge. @@ -1295,13 +1501,16 @@ ipv6IfStateChange NOTIFICATION-TYPE ipv6IfDescr, ipv6IfOperStatus -- the new state of the If. } - STATUS current + STATUS obsolete DESCRIPTION "An ipv6IfStateChange notification signifies that there has been a change in the state of an ipv6 interface. This notification should be generated when the interface's operational - status transitions to or from the up(1) state." + status transitions to or from the up(1) state. + + This object is obsoleted by IF-MIB::linkUp + and IF-MIB::linkDown notifications." ::= { ipv6NotificationPrefix 1 } -- conformance information @@ -1314,10 +1523,13 @@ ipv6Groups OBJECT IDENTIFIER ::= { ipv6Conformance 2 } -- compliance statements ipv6Compliance MODULE-COMPLIANCE - STATUS current + STATUS obsolete DESCRIPTION "The compliance statement for SNMPv2 entities which - implement ipv6 MIB." + implement ipv6 MIB. + + This compliance statement is obsoleted by + IP-MIB::ipMIBCompliance2." MODULE -- this module MANDATORY-GROUPS { ipv6GeneralGroup, ipv6NotificationGroup } @@ -1361,7 +1573,6 @@ ipv6Compliance MODULE-COMPLIANCE MIN-ACCESS read-only DESCRIPTION "An agent is not required to provide write - access to this object" ::= { ipv6Compliances 1 } @@ -1426,18 +1637,25 @@ ipv6GeneralGroup OBJECT-GROUP ipv6IfNetToMediaState, ipv6IfNetToMediaLastUpdated, ipv6NetToMediaValid } - STATUS current + STATUS obsolete DESCRIPTION "The IPv6 group of objects providing for basic - management of IPv6 entities." + + management of IPv6 entities. + + This group is obsoleted by various groups in + IP-MIB." ::= { ipv6Groups 1 } ipv6NotificationGroup NOTIFICATION-GROUP NOTIFICATIONS { ipv6IfStateChange } - STATUS current + STATUS obsolete DESCRIPTION "The notification that an IPv6 entity is required - to implement." + to implement. + + This group is obsoleted by + IF-MIB::linkUpDownNotificationsGroup." ::= { ipv6Groups 2 } END diff --git a/mibs/IPV6-TC.txt b/mibs/IPV6-TC.txt index 05e1e7d..270271c 100644 --- a/mibs/IPV6-TC.txt +++ b/mibs/IPV6-TC.txt @@ -1,5 +1,14 @@ IPV6-TC DEFINITIONS ::= BEGIN +-- Copyright (c) 2017 IETF Trust and the persons identified as +-- authors of the code. All rights reserved. + +-- Redistribution and use in source and binary forms, with or without +-- modification, is permitted pursuant to, and subject to the license +-- terms contained in, the Simplified BSD License set forth in Section +-- 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents +-- (http://trustee.ietf.org/license-info). + IMPORTS Integer32 FROM SNMPv2-SMI TEXTUAL-CONVENTION FROM SNMPv2-TC; @@ -7,49 +16,55 @@ IMPORTS -- definition of textual conventions Ipv6Address ::= TEXTUAL-CONVENTION DISPLAY-HINT "2x:" - STATUS current + STATUS obsolete DESCRIPTION "This data type is used to model IPv6 addresses. This is a binary string of 16 octets in network - byte-order." + byte-order. + + This object is obsoleted by INET-ADDRESS-MIB::InetAddress." SYNTAX OCTET STRING (SIZE (16)) Ipv6AddressPrefix ::= TEXTUAL-CONVENTION DISPLAY-HINT "2x:" - STATUS current + STATUS obsolete DESCRIPTION "This data type is used to model IPv6 address - prefixes. This is a binary string of up to 16 - octets in network byte-order." + prefixes. This is a binary string of up to 16 + octets in network byte-order. + This object is obsoleted by INET-ADDRESS-MIB::InetAddress." SYNTAX OCTET STRING (SIZE (0..16)) Ipv6AddressIfIdentifier ::= TEXTUAL-CONVENTION DISPLAY-HINT "2x:" - STATUS current + STATUS obsolete DESCRIPTION "This data type is used to model IPv6 address - interface identifiers. This is a binary string - of up to 8 octets in network byte-order." + interface identifiers. This is a binary string + of up to 8 octets in network byte-order. + + This object is obsoleted by IP-MIB::Ipv6AddressIfIdentifierTC." SYNTAX OCTET STRING (SIZE (0..8)) Ipv6IfIndex ::= TEXTUAL-CONVENTION DISPLAY-HINT "d" - STATUS current + STATUS obsolete DESCRIPTION "A unique value, greater than zero for each internetwork-layer interface in the managed - system. It is recommended that values are assigned - contiguously starting from 1. The value for each + system. It is recommended that values are assigned + contiguously starting from 1. The value for each internetwork-layer interface must remain constant at least from one re-initialization of the entity's network management system to the next + re-initialization. - re-initialization." + This object is obsoleted by IF-MIB::InterfaceIndex." SYNTAX Integer32 (1..2147483647) Ipv6IfIndexOrZero ::= TEXTUAL-CONVENTION DISPLAY-HINT "d" - STATUS current + STATUS obsolete DESCRIPTION "This textual convention is an extension of the Ipv6IfIndex convention. The latter defines @@ -61,7 +76,9 @@ Ipv6IfIndexOrZero ::= TEXTUAL-CONVENTION which uses this syntax. Examples of the usage of zero might include situations where interface was unknown, or when none or all interfaces need to be - referenced." + referenced. + + This object is obsoleted by IF-MIB::InterfaceIndexOrZero." SYNTAX Integer32 (0..2147483647) END diff --git a/mibs/IPV6-TCP-MIB.txt b/mibs/IPV6-TCP-MIB.txt index a2fb857..9fb7d13 100644 --- a/mibs/IPV6-TCP-MIB.txt +++ b/mibs/IPV6-TCP-MIB.txt @@ -7,7 +7,7 @@ IMPORTS Ipv6Address, Ipv6IfIndexOrZero FROM IPV6-TC; ipv6TcpMIB MODULE-IDENTITY - LAST-UPDATED "9801290000Z" + LAST-UPDATED "201702220000Z" ORGANIZATION "IETF IPv6 MIB Working Group" CONTACT-INFO " Mike Daniele @@ -20,7 +20,25 @@ ipv6TcpMIB MODULE-IDENTITY Phone: +1 603 884 1423 Email: daniele@zk3.dec.com" DESCRIPTION - "The MIB module for entities implementing TCP over IPv6." + "The obsolete MIB module for entities implementing TCP + over IPv6. Use the TCP-MIB instead. + + Copyright (c) 2017 IETF Trust and the persons identified + as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with + or without modification, is permitted pursuant to, and + subject to the license terms contained in, the Simplified + BSD License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info)." + REVISION "201702220000Z" + DESCRIPTION + "Obsoleting this MIB module; it has been replaced by + the revised TCP-MIB (RFC 4022)." + REVISION "9801290000Z" + DESCRIPTION + "First revision, published as RFC 2452" ::= { experimental 86 } -- objects specific to TCP for IPv6 @@ -38,16 +56,18 @@ tcp OBJECT IDENTIFIER ::= { mib-2 6 } ipv6TcpConnTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6TcpConnEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "A table containing TCP connection-specific information, - for only those connections whose endpoints are IPv6 addresses." + for only those connections whose endpoints are IPv6 addresses. + + This table is obsoleted by TCP-MIB::tcpConnectionTable." ::= { tcp 16 } ipv6TcpConnEntry OBJECT-TYPE SYNTAX Ipv6TcpConnEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "A conceptual row of the ipv6TcpConnTable containing information about a particular current TCP connection. @@ -57,7 +77,9 @@ ipv6TcpConnEntry OBJECT-TYPE Note that conceptual rows in this table require an additional index object compared to tcpConnTable, since IPv6 addresses - are not guaranteed to be unique on the managed node." + are not guaranteed to be unique on the managed node. + + This entry is obsoleted by TCP-MIB::tcpConnectionEntry." INDEX { ipv6TcpConnLocalAddress, ipv6TcpConnLocalPort, ipv6TcpConnRemAddress, @@ -67,75 +89,89 @@ ipv6TcpConnEntry OBJECT-TYPE Ipv6TcpConnEntry ::= SEQUENCE { ipv6TcpConnLocalAddress Ipv6Address, - ipv6TcpConnLocalPort INTEGER (0..65535), + ipv6TcpConnLocalPort INTEGER, ipv6TcpConnRemAddress Ipv6Address, - ipv6TcpConnRemPort INTEGER (0..65535), + ipv6TcpConnRemPort INTEGER, ipv6TcpConnIfIndex Ipv6IfIndexOrZero, ipv6TcpConnState INTEGER } ipv6TcpConnLocalAddress OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The local IPv6 address for this TCP connection. In + "The local IPv6 address for this TCP connection. In the case of a connection in the listen state which is willing to accept connections for any IPv6 address associated with the managed node, the value - ::0 is used." + ::0 is used. + + This object is obsoleted by + TCP-MIB::tcpConnectionLocalAddressType." ::= { ipv6TcpConnEntry 1 } ipv6TcpConnLocalPort OBJECT-TYPE SYNTAX INTEGER (0..65535) MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The local port number for this TCP connection." + "The local port number for this TCP connection. + + This object is obsoleted by TCP-MIB::tcpConnectionLocalPort." ::= { ipv6TcpConnEntry 2 } ipv6TcpConnRemAddress OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The remote IPv6 address for this TCP connection." + "The remote IPv6 address for this TCP connection. + + This object is obsoleted by TCP-MIB::tcpConnectionRemAddress." ::= { ipv6TcpConnEntry 3 } ipv6TcpConnRemPort OBJECT-TYPE SYNTAX INTEGER (0..65535) MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The remote port number for this TCP connection." + "The remote port number for this TCP connection. + + This object is obsoleted by TCP-MIB::tcpConnectionRemPort." ::= { ipv6TcpConnEntry 4 } ipv6TcpConnIfIndex OBJECT-TYPE SYNTAX Ipv6IfIndexOrZero MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "An index object used to disambiguate conceptual rows in the table, since the connection 4-tuple may not be unique. If the connection's remote address (ipv6TcpConnRemAddress) is a link-local address and the connection's local address - (ipv6TcpConnLocalAddress) is not a link-local address, this object identifies a local interface on the same link as the connection's remote link-local address. Otherwise, this object identifies the local interface that is associated with the ipv6TcpConnLocalAddress for this - TCP connection. If such a local interface cannot be determined, - this object should take on the value 0. (A possible example - of this would be if the value of ipv6TcpConnLocalAddress is ::0.) + TCP connection. If such a local interface cannot be + determined, this object should take on the value 0. + (A possible example of this would be if the value of + ipv6TcpConnLocalAddress is ::0.) The interface identified by a particular non-0 value of this index is the same interface as identified by the same value of ipv6IfIndex. The value of this object must remain constant during the life - of the TCP connection." + of the TCP connection. + + This object is obsoleted by the zone identifier in + an InetAddressIPv6z address in either + TCP-MIB::tcpConnectionLocalAddress or + TCP-MIB::tcpConnectionRemAddress." ::= { ipv6TcpConnEntry 5 } ipv6TcpConnState OBJECT-TYPE @@ -153,15 +189,15 @@ ipv6TcpConnState OBJECT-TYPE timeWait(11), deleteTCB(12) } MAX-ACCESS read-write - STATUS current + STATUS obsolete DESCRIPTION "The state of this TCP connection. The only value which may be set by a management station is deleteTCB(12). Accordingly, it is appropriate for an agent - to return an error response (`badValue' for SNMPv1, 'wrongValue' - for SNMPv2) if a management station attempts to set this - object to any other value. + to return an error response ('badValue' for SNMPv1, + 'wrongValue' for SNMPv2) if a management station attempts + to set this object to any other value. If a management station sets this object to the value deleteTCB(12), then this has the effect of deleting the TCB @@ -171,7 +207,9 @@ ipv6TcpConnState OBJECT-TYPE As an implementation-specific option, a RST segment may be sent from the managed node to the other TCP endpoint (note - however that RST segments are not sent reliably)." + however that RST segments are not sent reliably). + + This object is obsoleted by TCP-MIB::tcpConnectionState." ::= { ipv6TcpConnEntry 6 } -- @@ -186,26 +224,32 @@ ipv6TcpGroups OBJECT IDENTIFIER ::= { ipv6TcpConformance 2 } -- compliance statements ipv6TcpCompliance MODULE-COMPLIANCE - STATUS current + STATUS obsolete DESCRIPTION "The compliance statement for SNMPv2 entities which - implement TCP over IPv6." + implement TCP over IPv6. + + This compliance statement is obsoleted by + TCP-MIB::tcpMIBCompliance2." MODULE -- this module MANDATORY-GROUPS { ipv6TcpGroup } ::= { ipv6TcpCompliances 1 } ipv6TcpGroup OBJECT-GROUP OBJECTS { -- these are defined in this module + -- ipv6TcpConnLocalAddress (not-accessible) -- ipv6TcpConnLocalPort (not-accessible) -- ipv6TcpConnRemAddress (not-accessible) -- ipv6TcpConnRemPort (not-accessible) -- ipv6TcpConnIfIndex (not-accessible) ipv6TcpConnState } - STATUS current + STATUS obsolete DESCRIPTION "The group of objects providing management of - TCP over IPv6." + TCP over IPv6. + + This group is obsoleted by several groups in TCP-MIB." ::= { ipv6TcpGroups 1 } END diff --git a/mibs/IPV6-UDP-MIB.txt b/mibs/IPV6-UDP-MIB.txt index 6c929eb..c50f757 100644 --- a/mibs/IPV6-UDP-MIB.txt +++ b/mibs/IPV6-UDP-MIB.txt @@ -7,7 +7,7 @@ IMPORTS Ipv6Address, Ipv6IfIndexOrZero FROM IPV6-TC; ipv6UdpMIB MODULE-IDENTITY - LAST-UPDATED "9801290000Z" + LAST-UPDATED "201702220000Z" ORGANIZATION "IETF IPv6 MIB Working Group" CONTACT-INFO " Mike Daniele @@ -20,7 +20,25 @@ ipv6UdpMIB MODULE-IDENTITY Phone: +1 603 884 1423 Email: daniele@zk3.dec.com" DESCRIPTION - "The MIB module for entities implementing UDP over IPv6." + "The obsolete MIB module for entities implementing UDP + over IPv6. Use the UDP-MIB instead. + + Copyright (c) 2017 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, + with or without modification, is permitted pursuant to, + and subject to the license terms contained in, the + Simplified BSD License set forth in Section 4.c of the IETF + Trust's Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info)." + REVISION "201702220000Z" + DESCRIPTION + "Obsoleting this MIB module; it has been replaced by + the revised UDP-MIB (RFC 4113)." + REVISION "9801290000Z" + DESCRIPTION + "First revision, published as RFC 2454" ::= { experimental 87 } -- objects specific to UDP for IPv6 @@ -37,57 +55,66 @@ udp OBJECT IDENTIFIER ::= { mib-2 7 } ipv6UdpTable OBJECT-TYPE SYNTAX SEQUENCE OF Ipv6UdpEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "A table containing UDP listener information for - UDP/IPv6 endpoints." + UDP/IPv6 endpoints. + + This table is obsoleted by UDP-MIB::udpEndpointTable." ::= { udp 6 } ipv6UdpEntry OBJECT-TYPE SYNTAX Ipv6UdpEntry MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "Information about a particular current UDP listener. Note that conceptual rows in this table require an additional index object compared to udpTable, since IPv6 addresses are not guaranteed to be unique on the - managed node." + managed node. + + This entry is obsoleted by UDP-MIB::udpEndpointTable." INDEX { ipv6UdpLocalAddress, ipv6UdpLocalPort, ipv6UdpIfIndex } ::= { ipv6UdpTable 1 } Ipv6UdpEntry ::= SEQUENCE { + ipv6UdpLocalAddress Ipv6Address, - ipv6UdpLocalPort INTEGER (0..65535), + ipv6UdpLocalPort INTEGER, ipv6UdpIfIndex Ipv6IfIndexOrZero } ipv6UdpLocalAddress OBJECT-TYPE SYNTAX Ipv6Address MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION "The local IPv6 address for this UDP listener. In the case of a UDP listener which is willing to accept datagrams for any IPv6 address associated with the managed node, the value ::0 - is used." + is used. + + This object is obsoleted by UDP-MIB::udpEndpointLocalAddress." ::= { ipv6UdpEntry 1 } ipv6UdpLocalPort OBJECT-TYPE SYNTAX INTEGER (0..65535) MAX-ACCESS not-accessible - STATUS current + STATUS obsolete DESCRIPTION - "The local port number for this UDP listener." + "The local port number for this UDP listener. + + This object is obsoleted by UDP-MIB::udpEndpointLocalPort." ::= { ipv6UdpEntry 2 } ipv6UdpIfIndex OBJECT-TYPE SYNTAX Ipv6IfIndexOrZero MAX-ACCESS read-only - STATUS current + STATUS obsolete DESCRIPTION "An index object used to disambiguate conceptual rows in the table, since the ipv6UdpLocalAddress/ipv6UdpLocalPort @@ -104,7 +131,12 @@ ipv6UdpIfIndex OBJECT-TYPE value of ipv6IfIndex. The value of this object must remain constant during - the life of this UDP endpoint." + + the life of this UDP endpoint. + + This object is obsoleted by the zone identifier in + an InetAddressIPv6z address in + UDP-MIB::udpEndpointLocalAddress." ::= { ipv6UdpEntry 3 } -- @@ -119,10 +151,12 @@ ipv6UdpGroups OBJECT IDENTIFIER ::= { ipv6UdpConformance 2 } -- compliance statements ipv6UdpCompliance MODULE-COMPLIANCE - STATUS current + STATUS obsolete DESCRIPTION "The compliance statement for SNMPv2 entities which - implement UDP over IPv6." + implement UDP over IPv6. + + This object is obsoleted by UDP-MIB::udpMIBCompliance2." MODULE -- this module MANDATORY-GROUPS { ipv6UdpGroup } ::= { ipv6UdpCompliances 1 } @@ -132,10 +166,12 @@ ipv6UdpGroup OBJECT-GROUP -- ipv6UdpLocalAddress (not-accessible) -- ipv6UdpLocalPort (not-accessible) ipv6UdpIfIndex } - STATUS current + STATUS obsolete DESCRIPTION "The group of objects providing management of - UDP over IPv6." + UDP over IPv6. + + This group is obsoleted by several groups in UDP-MIB." ::= { ipv6UdpGroups 1 } END diff --git a/mibs/Makefile.in b/mibs/Makefile.in index f185002..fad4c2a 100644 --- a/mibs/Makefile.in +++ b/mibs/Makefile.in @@ -2,8 +2,6 @@ # Makefile to install mib files. # -top_builddir=.. - VPATH = @srcdir@ # @@ -39,7 +37,7 @@ RFCMIBS = IF-MIB.txt IF-INVERTED-STACK-MIB.txt \ IPV6-UDP-MIB.txt IPV6-FLOW-LABEL-MIB.txt TUNNEL-MIB.txt \ DISMAN-EVENT-MIB.txt DISMAN-SCRIPT-MIB.txt DISMAN-SCHEDULE-MIB.txt \ NOTIFICATION-LOG-MIB.txt SNMP-USM-AES-MIB.txt \ - SNMP-USM-DH-OBJECTS-MIB.txt \ + SNMP-USM-HMAC-SHA2-MIB.txt SNMP-USM-DH-OBJECTS-MIB.txt \ SNMP-TLS-TM-MIB.txt SNMP-TSM-MIB.txt \ SCTP-MIB.txt BRIDGE-MIB.txt diff --git a/mibs/Makefile.mib b/mibs/Makefile.mib index 6d31242..9109ba5 100644 --- a/mibs/Makefile.mib +++ b/mibs/Makefile.mib @@ -1,6 +1,6 @@ # RFCHOST = ftp://ftp.nordu.net -RFCHOST = ftp://ftp.ietf.org -RFCDIR = rfc +RFCHOST = https://www.ietf.org +RFCDIR = ietf-ftp/rfc IANAHOST = http://www.iana.org IANADIR = assignments @@ -16,6 +16,7 @@ MIBS = SNMPv2-TC.txt SNMPv2-TM.txt SNMPv2-SMI.txt SNMPv2-MIB.txt \ SNMP-TARGET-MIB.txt SNMP-NOTIFICATION-MIB.txt SNMP-PROXY-MIB.txt \ SNMP-USM-DH-OBJECTS-MIB.txt SNMP-USM-AES-MIB.txt \ SNMP-TLS-TM-MIB.txt \ + SNMP-TSM-MIB.txt SNMP-SSH-TM-MIB.txt \ AGENTX-MIB.txt SMUX-MIB.txt \ DISMAN-SCRIPT-MIB.txt DISMAN-SCHEDULE-MIB.txt \ DISMAN-PING-MIB.txt DISMAN-TRACEROUTE-MIB.txt \ @@ -75,12 +76,21 @@ SNMP-COMMUNITY-MIB.txt: $(MIBDEPS) SNMP-USM-AES-MIB.txt: $(MIBDEPS) ./mibfetch $(RFCHOST) $(RFCDIR) 3826 +SNMP-USM-HMAC-SHA2-MIB.txt: $(MIBDEPS) + ./mibfetch $(RFCHOST) $(RFCDIR) 7860 + SNMP-TLS-TM-MIB.txt: $(MIBDEPS) ./mibfetch $(RFCHOST) $(RFCDIR) 6353 SNMP-USM-DH-OBJECTS-MIB.txt: $(MIBDEPS) ./mibfetch $(RFCHOST) $(RFCDIR) 2786 +SNMP-TSM-MIB.txt: $(MIBDEPS) + ./mibfetch $(RFCHOST) $(RFCDIR) 5591 + +SNMP-SSH-TM-MIB.txt: $(MIBDEPS) + ./mibfetch $(RFCHOST) $(RFCDIR) 5592 + SNMPv2-SMI.txt: $(MIBDEPS) ./mibfetch $(RFCHOST) $(RFCDIR) 2578 SNMPv2-SMI @@ -165,17 +175,8 @@ TUNNEL-MIB.txt: $(MIBDEPS) TRANSPORT-ADDRESS-MIB.txt: $(MIBDEPS) ./mibfetch $(RFCHOST) $(RFCDIR) 3419 -IPV6-TC.txt IPV6-MIB.txt: $(MIBDEPS) - ./mibfetch $(RFCHOST) $(RFCDIR) 2465 - -IPV6-ICMP-MIB.txt: $(MIBDEPS) - ./mibfetch $(RFCHOST) $(RFCDIR) 2466 - -IPV6-TCP-MIB.txt: $(MIBDEPS) - ./mibfetch $(RFCHOST) $(RFCDIR) 2452 - -IPV6-UDP-MIB.txt: $(MIBDEPS) - ./mibfetch $(RFCHOST) $(RFCDIR) 2454 +IPV6-TC.txt IPV6-MIB.txt IPV6-ICMP-MIB IPV6-TCP-MIB IPV6-UDP-MIB: $(MIBDEPS) + ./mibfetch $(RFCHOST) $(RFCDIR) 8096 IPV6-FLOW-LABEL-MIB.txt: $(MIBDEPS) ./mibfetch $(RFCHOST) $(RFCDIR) 3595 diff --git a/mibs/NET-SNMP-PASS-MIB.txt b/mibs/NET-SNMP-PASS-MIB.txt index 93c1a10..2f2c516 100644 --- a/mibs/NET-SNMP-PASS-MIB.txt +++ b/mibs/NET-SNMP-PASS-MIB.txt @@ -68,6 +68,20 @@ netSnmpPassGauge OBJECT-TYPE DEFVAL { 42 } ::= { netSnmpPassExamples 6 } +netSnmpPassCounter64 OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Example Counter64 object." + ::= { netSnmpPassExamples 7 } + +netSnmpPassInteger64 OBJECT-TYPE + SYNTAX Opaque + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Example Opaque Integer64 object." + ::= { netSnmpPassExamples 8 } + netSnmpPassOIDValue OBJECT IDENTIFIER ::= { netSnmpPassExamples 99 } diff --git a/mibs/SNMP-SSH-TM-MIB.txt b/mibs/SNMP-SSH-TM-MIB.txt new file mode 100644 index 0000000..4e0d828 --- /dev/null +++ b/mibs/SNMP-SSH-TM-MIB.txt @@ -0,0 +1,329 @@ +SNMP-SSH-TM-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, + OBJECT-IDENTITY, mib-2, snmpDomains, + Counter32 + FROM SNMPv2-SMI -- RFC 2578 + TEXTUAL-CONVENTION + FROM SNMPv2-TC -- RFC 2579 + MODULE-COMPLIANCE, OBJECT-GROUP + FROM SNMPv2-CONF -- RFC 2580 + ; + +snmpSshtmMIB MODULE-IDENTITY + LAST-UPDATED "200906090000Z" + ORGANIZATION "ISMS Working Group" + CONTACT-INFO "WG-EMail: isms@lists.ietf.org + Subscribe: isms-request@lists.ietf.org + + Chairs: + Juergen Quittek + NEC Europe Ltd. + Network Laboratories + Kurfuersten-Anlage 36 + 69115 Heidelberg + Germany + +49 6221 90511-15 + quittek@netlab.nec.de + + Juergen Schoenwaelder + Jacobs University Bremen + Campus Ring 1 + 28725 Bremen + Germany + +49 421 200-3587 + j.schoenwaelder@jacobs-university.de + + Co-editors: + David Harrington + Huawei Technologies USA + 1700 Alma Drive + Plano Texas 75075 + + USA + +1 603-436-8634 + ietfdbh@comcast.net + + Joseph Salowey + Cisco Systems + 2901 3rd Ave + Seattle, WA 98121 + USA + jsalowey@cisco.com + + Wes Hardaker + Cobham Analytic Solutions + P.O. Box 382 + Davis, CA 95617 + USA + +1 530 792 1913 + ietf@hardakers.net + " + DESCRIPTION + "The Secure Shell Transport Model MIB. + + Copyright (c) 2009 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + 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. + + - Neither the name of Internet Society, IETF or IETF Trust, + nor the names of specific contributors, may be used to endorse + or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS '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 OWNER OR + CONTRIBUTORS 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. + + This version of this MIB module is part of RFC 5592; + see the RFC itself for full legal notices." + + REVISION "200906090000Z" + DESCRIPTION "The initial version, published in RFC 5592." + ::= { mib-2 189 } + +-- ---------------------------------------------------------- -- +-- subtrees in the SNMP-SSH-TM-MIB +-- ---------------------------------------------------------- -- + +snmpSshtmNotifications OBJECT IDENTIFIER ::= { snmpSshtmMIB 0 } +snmpSshtmObjects OBJECT IDENTIFIER ::= { snmpSshtmMIB 1 } +snmpSshtmConformance OBJECT IDENTIFIER ::= { snmpSshtmMIB 2 } + +-- ------------------------------------------------------------- +-- Objects +-- ------------------------------------------------------------- + +snmpSSHDomain OBJECT-IDENTITY + STATUS current + DESCRIPTION + "The SNMP-over-SSH transport domain. The corresponding + transport address is of type SnmpSSHAddress. + + When an SNMP entity uses the snmpSSHDomain Transport + Model, it must be capable of accepting messages up to + and including 8192 octets in size. Implementation of + larger values is encouraged whenever possible. + + The securityName prefix to be associated with the + snmpSSHDomain is 'ssh'. This prefix may be used by Security + Models or other components to identify which secure transport + infrastructure authenticated a securityName." + ::= { snmpDomains 7 } + +SnmpSSHAddress ::= TEXTUAL-CONVENTION + DISPLAY-HINT "1a" + STATUS current + DESCRIPTION + "Represents either a hostname or IP address, along with a port + number and an optional user name. + + The beginning of the address specification may contain a + user name followed by an '@' (US-ASCII character 0x40). This + portion of the address will indicate the user name that should + be used when authenticating to an SSH server. The user name + must be encoded in UTF-8 (per [RFC4252]). If missing, the + SNMP securityName should be used. After the optional user + name field and '@' character comes the hostname or IP + address. + + The hostname is always in US-ASCII (as per RFC1033); + internationalized hostnames are encoded in US-ASCII as + specified in RFC 3490. The hostname is followed by a colon + ':' (US-ASCII character 0x3A) and a decimal port number in + US-ASCII. The name SHOULD be fully qualified whenever + possible. + + An IPv4 address must be in dotted decimal format followed + by a colon ':' (US-ASCII character 0x3A) and a decimal port + number in US-ASCII. + + An IPv6 address must be in colon-separated format, surrounded + by square brackets ('[', US-ASCII character 0x5B, and ']', + US-ASCII character 0x5D), followed by a colon ':' (US-ASCII + character 0x3A) and a decimal port number in US-ASCII. + + Values of this Textual Convention might not be directly usable + as transport-layer addressing information and may require + runtime resolution. As such, applications that write them + must be prepared for handling errors if such values are + not supported or cannot be resolved (if resolution occurs + at the time of the management operation). + + The DESCRIPTION clause of TransportAddress objects that may + have snmpSSHAddress values must fully describe how (and + when) such names are to be resolved to IP addresses and vice + versa. + + This Textual Convention SHOULD NOT be used directly in + object definitions since it restricts addresses to a + specific format. However, if it is used, it MAY be used + either on its own or in conjunction with + TransportAddressType or TransportDomain as a pair. + + When this Textual Convention is used as a syntax of an + index object, there may be issues with the limit of 128 + sub-identifiers, which is specified in SMIv2 (STD 58). It + is RECOMMENDED that all MIB documents using this Textual + Convention make explicit any limitations on index + component lengths that management software must observe. + This may be done either by including SIZE constraints on + the index components or by specifying applicable + constraints in the conceptual row DESCRIPTION clause or + in the surrounding documentation. + " + REFERENCE + "RFC 1033: DOMAIN ADMINISTRATORS OPERATIONS GUIDE + RFC 3490: Internationalizing Domain Names in Applications + RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 4252: The Secure Shell (SSH) Authentication Protocol" + SYNTAX OCTET STRING (SIZE (1..255)) + +-- The snmpSshtmSession Group + +snmpSshtmSession OBJECT IDENTIFIER ::= { snmpSshtmObjects 1 } + +snmpSshtmSessionOpens OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times an openSession() request has been + executed as an SSH client, whether it succeeded or + failed. + " + ::= { snmpSshtmSession 1 } + +snmpSshtmSessionCloses OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times a closeSession() request has been + executed as an SSH client, whether it succeeded or + failed. + " + ::= { snmpSshtmSession 2 } + +snmpSshtmSessionOpenErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times an openSession() request + failed to open a transport connection or failed to + authenticate the server. + " + ::= { snmpSshtmSession 3 } + +snmpSshtmSessionUserAuthFailures OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times an openSession() request + failed to open a session as an SSH client due to + user-authentication failures. + " + ::= { snmpSshtmSession 4 } + +snmpSshtmSessionNoChannels OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times an openSession() request + failed to open a session as an SSH client due to + channel-open failures. + " + ::= { snmpSshtmSession 5 } + +snmpSshtmSessionNoSubsystems OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times an openSession() request + failed to open a session as an SSH client due to + inability to connect to the requested subsystem. + " + ::= { snmpSshtmSession 6 } + +snmpSshtmSessionNoSessions OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of times an outgoing message was + dropped because the same session was no longer + available. + " + ::= { snmpSshtmSession 7 } + +snmpSshtmSessionInvalidCaches OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The number of outgoing messages dropped because the + tmStateReference referred to an invalid cache. + " + ::= { snmpSshtmSession 8 } + +-- ************************************************ +-- snmpSshtmMIB - Conformance Information +-- ************************************************ + +snmpSshtmCompliances OBJECT IDENTIFIER ::= { snmpSshtmConformance 1 } + +snmpSshtmGroups OBJECT IDENTIFIER ::= { snmpSshtmConformance 2 } + +-- ************************************************ +-- Compliance statements +-- ************************************************ + +snmpSshtmCompliance MODULE-COMPLIANCE + STATUS current + DESCRIPTION "The compliance statement for SNMP engines that + support the SNMP-SSH-TM-MIB." + MODULE + MANDATORY-GROUPS { snmpSshtmGroup } + ::= { snmpSshtmCompliances 1 } + +-- ************************************************ +-- Units of conformance +-- ************************************************ + +snmpSshtmGroup OBJECT-GROUP + OBJECTS { + snmpSshtmSessionOpens, + snmpSshtmSessionCloses, + snmpSshtmSessionOpenErrors, + snmpSshtmSessionUserAuthFailures, + snmpSshtmSessionNoChannels, + snmpSshtmSessionNoSubsystems, + snmpSshtmSessionNoSessions, + snmpSshtmSessionInvalidCaches + } + STATUS current + DESCRIPTION "A collection of objects for maintaining information + of an SNMP engine that implements the SNMP Secure + Shell Transport Model. + " + ::= { snmpSshtmGroups 2 } + +END diff --git a/mibs/SNMP-USM-HMAC-SHA2-MIB.txt b/mibs/SNMP-USM-HMAC-SHA2-MIB.txt new file mode 100644 index 0000000..ea31f41 --- /dev/null +++ b/mibs/SNMP-USM-HMAC-SHA2-MIB.txt @@ -0,0 +1,103 @@ + SNMP-USM-HMAC-SHA2-MIB DEFINITIONS ::= BEGIN + IMPORTS + MODULE-IDENTITY, OBJECT-IDENTITY, + mib-2 FROM SNMPv2-SMI -- RFC 2578 + snmpAuthProtocols FROM SNMP-FRAMEWORK-MIB; -- RFC 3411 + +snmpUsmHmacSha2MIB MODULE-IDENTITY + LAST-UPDATED "201604180000Z" -- 18 April 2016, midnight + ORGANIZATION "SNMPv3 Working Group" + CONTACT-INFO "WG email: OPSAWG@ietf.org + Subscribe: + https://www.ietf.org/mailman/listinfo/opsawg + Editor: Johannes Merkle + secunet Security Networks + Postal: Mergenthaler Allee 77 + D-65760 Eschborn + Germany + Phone: +49 20154543091 + Email: johannes.merkle@secunet.com + + Co-Editor: Manfred Lochter + Bundesamt fuer Sicherheit in der + Informationstechnik (BSI) + Postal: Postfach 200363 + D-53133 Bonn + Germany + Phone: +49 228 9582 5643 + Email: manfred.lochter@bsi.bund.de" + DESCRIPTION + "Definitions of Object Identities needed for the use of + HMAC-SHA2 Authentication Protocols by SNMP's User-based Security + Model. + + Copyright (c) 2016 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + + Relating to IETF Documents + (http://trustee.ietf.org/license-info)." + + REVISION "201604180000Z" -- 18 April 2016, midnight + DESCRIPTION + "Version correcting the MODULE-IDENTITY value, + published as RFC 7860" + + REVISION "201510140000Z" -- 14 October 2015, midnight + DESCRIPTION + "Initial version, published as RFC 7630" + ::= { mib-2 235 } + +usmHMAC128SHA224AuthProtocol OBJECT-IDENTITY + STATUS current + DESCRIPTION "The Authentication Protocol + usmHMAC128SHA224AuthProtocol uses HMAC-SHA-224 and + truncates output to 128 bits." + REFERENCE "- Krawczyk, H., Bellare, M., and R. Canetti, + HMAC: Keyed-Hashing for Message Authentication, + RFC 2104. + - National Institute of Standards and Technology, + Secure Hash Standard (SHS), FIPS PUB 180-4, 2012." + ::= { snmpAuthProtocols 4 } + +usmHMAC192SHA256AuthProtocol OBJECT-IDENTITY + STATUS current + DESCRIPTION "The Authentication Protocol + usmHMAC192SHA256AuthProtocol uses HMAC-SHA-256 and + truncates output to 192 bits." + REFERENCE "- Krawczyk, H., Bellare, M., and R. Canetti, + HMAC: Keyed-Hashing for Message Authentication, + RFC 2104. + - National Institute of Standards and Technology, + Secure Hash Standard (SHS), FIPS PUB 180-4, 2012." + ::= { snmpAuthProtocols 5 } + +usmHMAC256SHA384AuthProtocol OBJECT-IDENTITY + STATUS current + DESCRIPTION "The Authentication Protocol + usmHMAC256SHA384AuthProtocol uses HMAC-SHA-384 and + truncates output to 256 bits." + REFERENCE "- Krawczyk, H., Bellare, M., and R. Canetti, + HMAC: Keyed-Hashing for Message Authentication, + RFC 2104. + - National Institute of Standards and Technology, + Secure Hash Standard (SHS), FIPS PUB 180-4, 2012." + ::= { snmpAuthProtocols 6 } + +usmHMAC384SHA512AuthProtocol OBJECT-IDENTITY + STATUS current + DESCRIPTION "The Authentication Protocol + usmHMAC384SHA512AuthProtocol uses HMAC-SHA-512 and + truncates output to 384 bits." + REFERENCE "- Krawczyk, H., Bellare, M., and R. Canetti, + HMAC: Keyed-Hashing for Message Authentication, + RFC 2104. + - National Institute of Standards and Technology, + Secure Hash Standard (SHS), FIPS PUB 180-4, 2012." + ::= { snmpAuthProtocols 7 } + +END diff --git a/mibs/UCD-DISKIO-MIB.txt b/mibs/UCD-DISKIO-MIB.txt index ba9e4db..ffbf676 100644 --- a/mibs/UCD-DISKIO-MIB.txt +++ b/mibs/UCD-DISKIO-MIB.txt @@ -17,7 +17,7 @@ IMPORTS FROM UCD-SNMP-MIB; ucdDiskIOMIB MODULE-IDENTITY - LAST-UPDATED "200504200000Z" + LAST-UPDATED "201604040000Z" ORGANIZATION "University of California, Davis" CONTACT-INFO "This mib is no longer being maintained by the University of @@ -35,6 +35,10 @@ ucdDiskIOMIB MODULE-IDENTITY DESCRIPTION "This MIB module defines objects for disk IO statistics." + REVISION "201604040000Z" + DESCRIPTION + "Add 64-bit counter for busy micro-seconds." + REVISION "200504200000Z" DESCRIPTION "Add 64 bit counters. Patch from Dan Nelson." @@ -77,7 +81,8 @@ DiskIOEntry ::= SEQUENCE { diskIOLA5 Integer32, diskIOLA15 Integer32, diskIONReadX Counter64, - diskIONWrittenX Counter64 + diskIONWrittenX Counter64, + diskIOBusyTime Counter64 } diskIOIndex OBJECT-TYPE @@ -168,4 +173,13 @@ diskIONWrittenX OBJECT-TYPE "The number of bytes written to this device since boot." ::= { diskIOEntry 13 } + +diskIOBusyTime OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of usecs the drive has been busy since boot." + ::= { diskIOEntry 14 } + END diff --git a/mibs/UCD-SNMP-MIB.txt b/mibs/UCD-SNMP-MIB.txt index e8acc8c..bcc7da6 100644 --- a/mibs/UCD-SNMP-MIB.txt +++ b/mibs/UCD-SNMP-MIB.txt @@ -33,11 +33,14 @@ IMPORTS Integer32, Opaque, enterprises, Counter32, Unsigned32 FROM SNMPv2-SMI + CounterBasedGauge64 + FROM HCNUM-TC + TEXTUAL-CONVENTION, DisplayString, TruthValue FROM SNMPv2-TC; ucdavis MODULE-IDENTITY - LAST-UPDATED "201407310000Z" + LAST-UPDATED "202008210000Z" ORGANIZATION "University of California, Davis" CONTACT-INFO "This mib is no longer being maintained by the University of @@ -55,9 +58,18 @@ ucdavis MODULE-IDENTITY DESCRIPTION "This file defines the private UCD SNMP MIB extensions." + REVISION "202008210000Z" + DESCRIPTION + "Add new memSysAvail object" + + REVISION "201606100000Z" + DESCRIPTION + "New 64-bit memory objects" + REVISION "201407310000Z" DESCRIPTION "New object for number of CPUs as counted by the agent" + REVISION "201105140000Z" DESCRIPTION "New objects for monitoring CPU Steal, Guest and Nice values" @@ -632,6 +644,129 @@ memUsedRealTXT OBJECT-TYPE pages from other uses of physical memory." ::= { memory 17 } +memTotalSwapX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of swap space configured for this host." + ::= { memory 18 } + +memAvailSwapX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The amount of swap space currently unused or available." + ::= { memory 19 } + +memTotalRealX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of real/physical memory installed + on this host." + ::= { memory 20 } + +memAvailRealX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The amount of real/physical memory currently unused + or available." + ::= { memory 21 } + + +memTotalFreeX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of memory free or available for use on + this host. This value typically covers both real memory + and swap space or virtual memory." + ::= { memory 22 } + +memMinimumSwapX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The minimum amount of swap space expected to be kept + free or available during normal operation of this host. + + If this value (as reported by 'memAvailSwap(4)') falls + below the specified level, then 'memSwapError(100)' will + be set to 1 and an error message made available via + 'memSwapErrorMsg(101)'." + ::= { memory 23 } + +memSharedX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of real or virtual memory currently + allocated for use as shared memory. + + This object will not be implemented on hosts where the + underlying operating system does not explicitly identify + memory as specifically reserved for this purpose." + ::= { memory 24 } + +memBufferX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of real or virtual memory currently + allocated for use as memory buffers. + + This object will not be implemented on hosts where the + underlying operating system does not explicitly identify + memory as specifically reserved for this purpose." + ::= { memory 25 } + +memCachedX OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of real or virtual memory currently + allocated for use as cached memory. + + This object will not be implemented on hosts where the + underlying operating system does not explicitly identify + memory as specifically reserved for this purpose." + ::= { memory 26 } + +memSysAvail OBJECT-TYPE + SYNTAX CounterBasedGauge64 + UNITS "kB" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total amount of available memory, which is an estimate + of how much memory is available for starting new applications, + without swapping. + + This object will not be implemented on hosts where the + underlying operating system does not explicitly identify + memory as specifically reserved for this purpose." + ::= { memory 27 } + + memSwapError OBJECT-TYPE SYNTAX UCDErrorFlag MAX-ACCESS read-only diff --git a/mibs/ianalist b/mibs/ianalist index 8b31ad6..9947e7b 100644 --- a/mibs/ianalist +++ b/mibs/ianalist @@ -1,7 +1,8 @@ -# updated 2014-08-14 +# updated 2015-10-26 ianaaddressfamilynumbers-mib IANA-ADDRESS-FAMILY-NUMBERS-MIB ianabfdtcstd-mib IANA-BFD-TC-STD-MIB ianacharset-mib IANA-CHARSET-MIB +ianaenergyrelation-mib IANA-ENERGY-RELATION-MIB ianaentity-mib IANA-ENTITY-MIB ianafinisher-mib IANA-FINISHER-MIB ianagmplstc-mib IANA-GMPLS-TC-MIB @@ -13,5 +14,8 @@ ianalanguage-mib IANA-LANGUAGE-MIB ianamalloc-mib IANA-MALLOC-MIB ianamau-mib IANA-MAU-MIB ianaolsrv2linkmetrictype-mib IANA-OLSRv2-LINK-METRIC-TYPE-MIB +ianapowerstateset-mib IANAPowerStateSet-MIB ianaprinter-mib IANA-PRINTER-MIB +ianasmf-mib IANA-SMF-MIB ianatn3270etc-mib IANATn3270eTC-MIB +ianastoragemediatype-mib IANA-STORAGE-MEDIA-TYPE-MIB diff --git a/mibs/rfclist b/mibs/rfclist index e0d3eef..8675f1a 100644 --- a/mibs/rfclist +++ b/mibs/rfclist @@ -1,4 +1,4 @@ -# updated 2014-08-15 +# updated 2023-05-10 1155 RFC1155-SMI 1213 RFC1213-MIB 1227 SMUX-MIB @@ -50,16 +50,10 @@ 2287 SYSAPPL-MIB 2320 IPOA-MIB 2366 IPATM-IPMC-MIB -2452 IPV6-TCP-MIB -2454 IPV6-UDP-MIB 2455 APPN-MIB 2456 APPN-TRAP-MIB 2457 EBN-MIB -2465 IPV6-TC:IPV6-MIB -2466 IPV6-ICMP-MIB 2494 DS0-MIB:DS0BUNDLE-MIB -2495 DS1-MIB -2496 DS3-MIB 2512 ATM-ACCOUNTING-INFORMATION-MIB 2513 ACCOUNTING-CONTROL-MIB 2514 ATM-TC-MIB @@ -155,9 +149,9 @@ 3873 SCTP-MIB 3877 ALARM-MIB:ITU-ALARM-TC-MIB:ITU-ALARM-MIB 3878 ARC-MIB +3896 DS3-MIB 3970 TE-MIB 4001 INET-ADDRESS-MIB -4008 NAT-MIB 4011 POLICY-BASED-MANAGEMENT-MIB 4022 TCP-MIB 4036 DOCS-IETF-SUBMGT-MIB @@ -213,6 +207,7 @@ 4801 GMPLS-TC-STD-MIB 4802 GMPLS-TE-STD-MIB 4803 GMPLS-LSR-STD-MIB:GMPLS-LABEL-STD-MIB +4805 DS1-MIB 4807 IPSEC-SPD-MIB 4836 MAU-MIB 4837 DOT3-EPON-MIB @@ -238,7 +233,8 @@ 5519 MGMD-STD-MIB 5525 RSERPOOL-MIB 5542 PW-TC-STD-MIB -5591 SNMP-TSM-MIB +5591 SNMP-TSM-MIB +5592 SNMP-SSH-TM-MIB 5601 PW-STD-MIB:IANA-PWE3-MIB 5602 PW-MPLS-STD-MIB 5603 PW-ENET-STD-MIB @@ -266,7 +262,6 @@ 6766 G9983-MIB 6767 G9982-MIB 6768 G9981-MIB -6779 NHDP-MIB 6825 TED-MIB 6850 RBRIDGE-MIB 6933 ENTITY-MIB:UUID-TC-MIB @@ -277,3 +272,26 @@ 7257 VPLS-GENERIC-MIB:VPLS-LDP-MIB:VPLS-BGP-MIB 7330 BFD-TC-STD-MIB 7331 BFD-STD-MIB +7367 SMF-MIB +7388 LOWPAN-MIB +7420 PCE-PCEP-MIB +7453 MPLS-TC-EXT-STD-MIB:MPLS-ID-STD-MIB:MPLS-LSR-EXT-STD-MIB:MPLS-TE-EXT-STD-MIB +7460 ENERGY-OBJECT-MIB:POWER-ATTRIBUTES-MIB +7461 ENERGY-OBJECT-CONTEXT-MIB +7577 BATTERY-MIB +7658 NAT-MIB +7659 NATV2-MIB +7666 VM-MIB +7697 MPLS-OAM-ID-STD-MIB +7784 TRILL-OAM-MIB +7856 SOFTWIRE-MESH-MIB +7860 SNMP-USM-HMAC-SHA2-MIB +7870 DSLite-MIB +7939 NHDP-MIB +8096 IPV6-TC:IPV6-MIB:IPV6-ICMP-MIB:IPV6-TCP-MIB:IPV6-UDP-MIB +8150 MPLS-LPS-MIB +8173 PTPBASE-MIB +8389 MAP-E-MIB +8502 L2L3-VPN-MULTICAST-TC-MIB:L2L3-VPN-MULTICAST-MIB +8503 BGP-MPLS-LAYER3-VPN-MULTICAST-MIB +9349 IP-TRAFFIC-FLOW-SECURITY-MIB diff --git a/mibs/smistrip b/mibs/smistrip index b5fc8f2..33d0bc8 100644 --- a/mibs/smistrip +++ b/mibs/smistrip @@ -47,7 +47,7 @@ do_usage () { do_strip () { - cat $1 | $AWK -v test="$test" -v dir="$dir" -v single="$single" -v suffix="$suffix" -v verbose="$verbose" ' + expand $1 | sed 's/[ \r]*$//' | $AWK -v test="$test" -v dir="$dir" -v single="$single" -v suffix="$suffix" -v verbose="$verbose" ' BEGIN { if (length(single) != 0) { diff --git a/net-snmp-config.in b/net-snmp-config.in index d55872c..c0fc154 100644 --- a/net-snmp-config.in +++ b/net-snmp-config.in @@ -31,7 +31,9 @@ check_build_dir() # effect: returns the (n+1)th argument index() { - eval echo \$`expr $1 + 1` + [ $# -gt $1 ] || return + shift $1 + echo $1 } # usage: count arguments @@ -45,7 +47,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ -datarootdir=@datarootdir@ +# Avoid that configure complains that this script ignores @datarootdir@ +echo "@datarootdir@" >/dev/null NSC_LDFLAGS="@LDFLAGS@" NSC_LIBS="@LIBS@" @@ -74,6 +77,8 @@ NSC_SRC_LIBDEPS="agent/.libs/libnetsnmpmibs.a agent/.libs/libnetsnmpagent.a snmp if test "x$NSC_SRCDIR" = "x." ; then NSC_SRCDIR="NET-SNMP-SOURCE-DIR" +elif test "x$NSC_SRCDIR" = "x" ; then + NSC_SRCDIR="NET-SNMP-SOURCE-DIR" fi if test "x$1" = "x"; then @@ -183,7 +188,7 @@ else echo $result ;; --build-command) - echo "@CC@ @CFLAGS@ @DEVFLAGS@" + echo "@CC@ @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@" ;; #################################################### client lib --libs) @@ -250,7 +255,7 @@ else echo "You must specify the extra cflags" exit 1 fi - cflags=$1 + cflags="$1" echo "setting extra cflags: $cflags" shift ;; @@ -260,7 +265,7 @@ else echo "You must specify the extra ldflags" exit 1 fi - ldflags=$1 + ldflags="$1" echo "setting extra ldflags: $ldflags" shift ;; @@ -291,6 +296,12 @@ else #ifdef HAVE_SIGNAL #include #endif /* HAVE_SIGNAL */ +#ifdef HAVE_SYS_STAT_H +#include +#endif /* HAVE_SYS_STAT_H */ +#ifdef HAVE_FCNTL_H +#include +#endif /* HAVE_FCNTL_H */ #include #include EOF @@ -334,14 +345,8 @@ static int reconfig = 0; extern int netsnmp_running; -#ifdef __GNUC__ -#define UNUSED __attribute__((unused)) -#else -#define UNUSED -#endif - RETSIGTYPE -stop_server(UNUSED int a) { +stop_server(int a) { netsnmp_running = 0; } @@ -363,6 +368,8 @@ usage(const char *prog) "OPTIONS:\n", prog); fprintf(stderr, + " -c FILE[,...]\t\tread FILE(s) as configuration file(s)\n" + " -C\t\t\tdo not read the default configuration files\n" " -d\t\t\tdump all traffic\n" " -D TOKEN[,...]\tturn on debugging output for the specified " "TOKENs\n" @@ -378,6 +385,8 @@ usage(const char *prog) "everything)\n" " -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n"); #endif /* DISABLE_MIB_LOADING */ + fprintf(stderr, + " -p FILE\t\tstore process id in FILE\n"); #ifndef DISABLE_MIB_LOADING fprintf(stderr, " -P MIBOPTS\t\tToggle various defaults controlling mib " @@ -403,17 +412,32 @@ main (int argc, char **argv) int arg; char* cp = NULL; int dont_fork = 0, do_help = 0; + char* pid_file = NULL; - while ((arg = getopt(argc, argv, "dD:fhHL:" + while ((arg = getopt(argc, argv, "c:CdD:fhHL:" #ifndef DISABLE_MIB_LOADING "m:M:" #endif /* DISABLE_MIB_LOADING */ - "n:" + "n:p:" #ifndef DISABLE_MIB_LOADING "P:" #endif /* DISABLE_MIB_LOADING */ "vx:")) != EOF) { switch (arg) { + case 'c': + if (optarg != NULL) { + netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_OPTIONALCONFIG, optarg); + } else { + usage(argv[0]); + } + break; + + case 'C': + netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DONT_READ_CONFIGS, 1); + break; + case 'd': netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DUMP_PACKET, 1); @@ -470,6 +494,14 @@ main (int argc, char **argv) } break; + case 'p': + if (optarg != NULL) { + pid_file = optarg; + } else { + usage(argv[0]); + } + break; + #ifndef DISABLE_MIB_LOADING case 'P': cp = snmp_mib_toggle_options(optarg); @@ -513,6 +545,31 @@ main (int argc, char **argv) exit(1); } +#ifdef HAVE_GETPID + if (pid_file != NULL) { + /* + * unlink the pid_file, if it exists, prior to open. Without + * doing this the open will fail if the user specified pid_file + * already exists. + */ + int fd; + unlink(pid_file); + fd = open(pid_file, O_CREAT | O_EXCL | O_WRONLY, 0600); + if (fd == -1) { + snmp_log_perror(pid_file); + if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { + exit(1); + } + } else { + char buf[3 + sizeof(long) * 3]; + int len = snprintf(buf, sizeof(buf), "%ld\n", (long int)getpid()); + write(fd, buf, len); + close(fd); + } + } +#endif + /* initialize tcpip, if necessary */ SOCK_STARTUP; } @@ -590,6 +647,11 @@ EOF /* shutdown the agent library */ shutdown_agent(); + + if (pid_file != NULL) { + unlink(pid_file); + } + SOCK_CLEANUP; exit(0); } @@ -600,16 +662,18 @@ EOF fi cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags" echo "running: $cmd" - `$cmd` + echo `$cmd` + result=$? if test "x$norm" != "x1" ; then echo "removing the temporary code file: $tmpfile" rm -f $tmpfile else echo "leaving the temporary code file: $tmpfile" fi - if test -f $outname ; then + if test "$result" = "0" -a -f "$outname" ; then echo "subagent program $outname created" fi + exit $result ;; *) diff --git a/net-snmp-create-v3-user.in b/net-snmp-create-v3-user.in index 5288f3b..5e99b4f 100644 --- a/net-snmp-create-v3-user.in +++ b/net-snmp-create-v3-user.in @@ -1,35 +1,10 @@ #!/bin/sh # -# $Id$ -# # this shell script is designed to add new SNMPv3 users # to Net-SNMP config file. -prefix=@prefix@ -exec_prefix=@exec_prefix@ -includedir=@includedir@ -libdir=@libdir@ -datarootdir=@datarootdir@ -NSC_LDFLAGS="@LDFLAGS@" -NSC_INCLUDEDIR=${includedir} -NSC_LIBDIR=-L${libdir} -NSC_LIBS="@LIBS@" -NSC_AGENTLIBS="@AGENTLIBS@ @PERLLDOPTS_FOR_APPS@" -NSC_PREFIX=$prefix -NSC_EXEC_PREFIX=$exec_prefix -NSC_SRCDIR=@srcdir@ -NSC_INCDIR=${NSC_PREFIX}/include -NSC_BASE_SUBAGENT_LIBS="-lnetsnmpagent -lnetsnmp" -NSC_BASE_AGENT_LIBS="-lnetsnmpagent -lnetsnmpmibs -lnetsnmp" -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 @PSCMD@ | egrep ' snmpd *$' > /dev/null 2>&1 ; then - echo "Apparently at least one snmpd demon is already running." +if @PSCMD@ | @EGREP@ ' snmpd *$' > /dev/null 2>&1 ; then + echo "Apparently at least one snmpd daemon is already running." echo "You must stop them in order to use this command." exit 1 fi @@ -39,15 +14,12 @@ 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 @VERSION@ + exit 0 ;; --help) usage="yes" @@ -60,12 +32,12 @@ case $1 in exit 1 fi case $1 in - MD5|SHA) + MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224) Aalgorithm=$1 shift ;; md5|sha) - Aalgorithm=`echo $1 | tr a-z A-Z` + Aalgorithm=$(echo "$1" | tr a-z A-Z) shift ;; *) @@ -86,7 +58,7 @@ case $1 in shift ;; des|aes|aes128) - Xalgorithm=`echo $1 | tr a-z A-Z` + Xalgorithm=$(echo "$1" | tr a-z A-Z) shift ;; *) @@ -114,7 +86,7 @@ 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 " [-a MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224] [-x DES|AES] [username]" echo "" exit fi @@ -147,22 +119,30 @@ fi fi outdir="@PERSISTENT_DIRECTORY@" outfile="$outdir/snmpd.conf" -line="createUser $user $Aalgorithm \"$apassphrase\" $Xalgorithm $xpassphrase" +if test "x$xpassphrase" = "x" ; then + line="createUser $user $Aalgorithm \"$apassphrase\" $Xalgorithm" +else + line="createUser $user $Aalgorithm \"$apassphrase\" $Xalgorithm \"$xpassphrase\"" +fi echo "adding the following line to $outfile:" -echo " " $line +echo " $line" # in case it hasn't ever been started yet, start it. -if test ! -d $outdir ; then - mkdir $outdir +if test ! -d "$outdir"; then + mkdir "$outdir" fi -if test ! -d $outfile ; then - touch $outfile +if test ! -d "$outfile"; then + touch "$outfile" fi -echo $line >> $outfile +echo "$line" >> "$outfile" +prefix=@prefix@ +datarootdir=@datarootdir@ +# To suppress shellcheck complaints about $prefix and $datarootdir. +: "$prefix" "$datarootdir" outfile="@datadir@/snmp/snmpd.conf" line="$token $user" echo "adding the following line to $outfile:" -echo " " $line -if test ! -d $outfile ; then - touch $outfile +echo " $line" +if test ! -d "$outfile"; then + touch "$outfile" fi -echo $line >> $outfile +echo "$line" >> $outfile diff --git a/net-snmp.patch.txt b/net-snmp.patch.txt deleted file mode 100644 index a326e02..0000000 --- a/net-snmp.patch.txt +++ /dev/null @@ -1,3763 +0,0 @@ -diff --git a/include/net-snmp/library/snmp_logging.h b/include/net-snmp/library/snmp_logging.h -index 1d7921b..a78bfa8 100644 ---- a/include/net-snmp/library/snmp_logging.h -+++ b/include/net-snmp/library/snmp_logging.h -@@ -5,7 +5,11 @@ - #include - - #if HAVE_SYSLOG_H --#include -+#ifdef PHP_WIN32 -+# include -+#else -+# include -+#endif - #endif - #include - #include -diff --git a/include/net-snmp/library/system.h b/include/net-snmp/library/system.h -index ac5052e..1a424c2 100644 ---- a/include/net-snmp/library/system.h -+++ b/include/net-snmp/library/system.h -@@ -59,7 +59,7 @@ SOFTWARE. - */ - #ifndef MSVC_PERL - --#ifndef HAVE_READDIR -+#if !defined(HAVE_READDIR) && !defined(PHP_WIN32) - /* - * structure of a directory entry - */ -diff --git a/include/net-snmp/types.h b/include/net-snmp/types.h -index 5e80a45..5cad193 100644 ---- a/include/net-snmp/types.h -+++ b/include/net-snmp/types.h -@@ -89,7 +89,7 @@ typedef u_int socklen_t; - typedef u_long in_addr_t; - #endif - --#ifndef HAVE_SSIZE_T -+#if !defined(HAVE_SSIZE_T) && !defined(_WIN64) - #if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 - typedef int ssize_t; - #else -diff --git a/win32/net-snmp/net-snmp-config.h b/win32/net-snmp/net-snmp-config.h -index 1608563..70ec21e 100644 ---- a/win32/net-snmp/net-snmp-config.h -+++ b/win32/net-snmp/net-snmp-config.h -@@ -1,1827 +1,1825 @@ --/* include/net-snmp/net-snmp-config.h.in. Generated from configure.in by autoheader. */ --/* modified by hand with care. */ -- --#ifndef NET_SNMP_CONFIG_H --#define NET_SNMP_CONFIG_H -- --/* _MSC_VER values -- 1800 = MSVC++ 12.0 (Visual Studio 2013) -- 1700 = MSVC++ 11.0 (Visual Studio 2012) -- 1600 = MSVC++ 10.0 (Visual Studio 2010) -- 1500 = MSVC++ 9.0 (Visual Studio 2008) -- 1400 = MSVC++ 8.0 (Visual Studio 2005) -- 1310 = MSVC++ 7.1 (Visual Studio 2003) -- 1300 = MSVC++ 7.0 (Visual Studio 2002) -- 1200 = MSVC++ 6.0 --*/ -- --#ifdef _MSC_VER --/* Disable warning 4018: signed/unsigned mismatch. */ --#pragma warning (disable: 4018) --#endif -- --/* Automatically set by Windows perl Configure script. -- * When compiling with the MSVC workspace, this must be set manually. -- * See the PACKAGE_VERSION variable in Unix /configure script --*/ --#ifndef PACKAGE_VERSION --#define PACKAGE_VERSION "unknown" --#endif -- --/* Define HAVE_WIN32_PLATFORM_SDK if you have: -- * Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK) -- * Microsoft Visual Studio.Net 2002 -- * Microsoft Visual Studio.Net 2003 -- */ --#define HAVE_WIN32_PLATFORM_SDK 1 -- --/* Define NETSNMP_ENABLE_IPV6 to enable IPv6. IPv6 is only available on -- * Windows XP and higher. */ --/* #undef NETSNMP_ENABLE_IPV6 */ -- --/* Only use Windows API functions available on Windows 2000 SP4 or later. -- * We need at least SP1 for some IPv6 defines in ws2ipdef.h -- */ --#ifndef _WIN32_WINNT --#define _WIN32_WINNT 0x600 /*_WIN32_WINNT_WIN6*/ --#else --#if _WIN32_WINNT < 0x501 --#error _WIN32_WINNT is too low - it should be set to at least 0x501. --#endif --#endif -- --#define INSTALL_BASE "c:/usr" -- --/* config.h: a general config file */ -- --/* 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 "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;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 NETSNMP_DEFAULT_MIBDIRS INSTALL_BASE ## "/share/snmp/mibs" -- --/* default mib files to load, specified by path. */ --/* #undef NETSNMP_DEFAULT_MIBFILES */ -- --/* should we compile to use special opaque types: float, double, -- counter64, i64, ui64, union? */ --#define NETSNMP_WITH_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 NETSNMP_ENABLE_SCAPI_AUTHPRIV 1 -- --/* define if you are using the MD5 code ...*/ --/* #undef NETSNMP_USE_INTERNAL_MD5 */ -- --/* define if you are using the codeS11 library ...*/ --/* #undef NETSNMP_USE_PKCS11 */ -- --/* add in recent CMU library extensions (not complete) */ --/* #undef CMU_COMPATIBLE */ -- --/* add in recent resource lock functions (not complete) */ --/* #undef NETSNMP_REENTRANT */ -- --/* 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 */ -- --/* NETSNMP_PERSISTENT_DIRECTORY: If defined, the library is capabile of saving -- persisant information to this directory in the form of configuration -- lines: NETSNMP_PERSISTENT_DIRECTORY/NAME.persistent.conf */ --#define NETSNMP_PERSISTENT_DIRECTORY INSTALL_BASE ## "/snmp/persist" -- --/* NETSNMP_PERSISTENT_MASK: the umask permissions to set up persistent files with */ --/* #undef NETSNMP_PERSISTENT_MASK -- no win32 umask */ -- --/* NETSNMP_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 -- --/* NETSNMP_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 if you are embedding perl in the main agent */ --/* #undef NETSNMP_EMBEDDED_PERL */ -- --#if notused --/* define the system type include file here */ --#define NETSNMP_SYSTEM_INCLUDE_FILE -- --/* define the machine (cpu) type include file here */ --#define NETSNMP_MACHINE_INCLUDE_FILE --#endif -- --/* SNMPLIBDIR contains important files */ -- --#define SNMPLIBPATH INSTALL_BASE ## "/lib" --#define SNMPSHAREPATH INSTALL_BASE ## "/share/snmp" --#define SNMPCONFPATH INSTALL_BASE ## "/etc/snmp" --#define SNMPDLMODPATH INSTALL_BASE ## "/lib/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) */ --/* #undef NETSNMP_LOGFILE */ -- --/* default system contact */ --#define NETSNMP_SYS_CONTACT "unknown" -- --/* system location */ --#define NETSNMP_SYS_LOC "unknown" -- --/* Use libwrap to handle allow/deny hosts? */ --/* #undef NETSNMP_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 "unknown" -- --/* 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" -- --/* Where is the uname command */ --#define UNAMEPROG "/bin/uname" -- --/* pattern for temporary file names */ --#define NETSNMP_TEMP_FILE_PATTERN INSTALL_BASE ## "/temp/snmpdXXXXXX" -- --/* testing code sections. */ --/* #undef NETSNMP_ENABLE_TESTING_CODE */ -- --/* If you don't have root access don't exit upon kmem errors */ --/* #undef NETSNMP_NO_ROOT_ACCESS */ -- --/* If we don't want to use kmem. */ --/* #undef NETSNMP_NO_KMEM_USAGE */ -- --/* If you don't want the agent to report on variables it doesn't have data for */ --#define NETSNMP_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 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 SNMPv1 code should not be included */ --/* #undef NETSNMP_DISABLE_SNMPV1 */ -- --/* Define if SNMPv2c code should not be included */ --/* #undef NETSNMP_DISABLE_SNMPV2C */ -- --/* 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. */ --/* #undef HAVE_ALLOCA */ -- --/* Define to 1 if you have and it should be used (not on Ultrix). -- */ --/* #undef HAVE_ALLOCA_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_ARPA_INET_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_ASM_PAGE_H */ -- --/* Define to 1 if you have the `cgetnext' function. */ --/* #undef HAVE_CGETNEXT */ -- --/* Define to 1 if you have the header file. */ --#define HAVE_CRTDBG_H 1 -- --/* Define to 1 if you have the header file. */ --#define HAVE_DIRECT_H 1 -- --/* Define to 1 if you have the header file, and it defines `DIR'. -- */ --/* #undef HAVE_DIRENT_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_DLFCN_H */ -- --/* Define to 1 if you have the `dlopen' function. */ --/* #undef HAVE_DLOPEN */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_ERR_H */ -- --/* Define to 1 if you have the `eval_pv' function. */ --/* #undef HAVE_EVAL_PV */ -- --/* Define to 1 if you have the `execv' function. */ --/* #undef HAVE_EXECV */ -- --/* Define to 1 if you have the header file. */ --#define HAVE_FCNTL_H 1 -- --/* Define to 1 if you have the `fork' function. */ --/* #undef HAVE_FORK */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_FSTAB_H */ -- --/* Define to 1 if you have the `getaddrinfo' function. */ --/* #undef HAVE_GETADDRINFO */ -- --/* Define to 1 if you have the `getdtablesize' function. */ --/* #undef HAVE_GETDTABLESIZE */ -- --/* Define to 1 if you have the `getfsstat' function. */ --/* #undef HAVE_GETFSSTAT */ -- --/* Define to 1 if you have the `getgrnam' function. */ --/* #undef HAVE_GETGRNAM */ -- --/* 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. */ --/* #undef HAVE_GETLOADAVG */ -- --/* Define to 1 if you have the `getmntent' function. */ --/* #undef HAVE_GETMNTENT */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_GETOPT_H */ -- --/* Define to 1 if you have the `getpagesize' function. */ --/* #undef HAVE_GETPAGESIZE */ -- --/* Define to 1 if you have the `getpid' function. */ --#define HAVE_GETPID 1 -- --/* Define to 1 if you have the `getpwnam' function. */ --/* #undef HAVE_GETPWNAM */ -- --/* Define to 1 if you have the `gettimeofday' function. */ --/* #undef HAVE_GETTIMEOFDAY */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_GRP_H */ -- --/* Define to 1 if you have the `if_freenameindex' function. */ --/* #undef HAVE_IF_FREENAMEINDEX */ -- --/* Define to 1 if you have the `if_nameindex' function. */ --/* #undef HAVE_IF_NAMEINDEX */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_INET_MIB2_H */ -- --#ifdef HAVE_WIN32_PLATFORM_SDK --/* Define to 1 if you have the header file. */ --#define HAVE_IPHLPAPI_H --#endif -- --/* Define to 1 if the system has the 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 */ --#undef HAVE_U_INT32_T -- --/* 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 */ --#undef HAVE_U_INT64_T -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_INTTYPES_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_IOCTLS_H */ -- --/* Define to 1 if you have the header file. */ --#define HAVE_IO_H 1 -- --/* 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). */ --/* #undef HAVE_LIBCRYPTO */ -- --/* 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 `m' library (-lm). */ --/* #undef HAVE_LIBM */ -- --/* 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 `sensors' library (-lsensors). */ --/* #undef HAVE_LIBSENSORS */ -- --/* Define to 1 if you have the header file. */ --#define HAVE_LIMITS_H 1 -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_LINUX_HDREG_H */ -- --/* 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. */ --/* #undef HAVE_LRAND48 */ -- --/* 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 you have the `mkstemp' function. */ --/* #undef HAVE_MKSTEMP */ -- --/* Define to 1 if you have the `mktime' function. */ --/* #undef HAVE_MKTIME */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_MNTENT_H */ -- --/* 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. */ --/* #undef HAVE_NETDB_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_PCB_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_VAR_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_ND6_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_FSM_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_TIMER_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_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. */ --/* #undef HAVE_NETINET_IF_ETHER_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_IN_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_IN_SYSTM_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_IN_VAR_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_IP6_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_IP_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_IP_ICMP_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_ICMP6_H */ -- --/* 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. */ --/* #undef HAVE_NETINET_TCP_H */ -- --/* 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. */ --/* #undef HAVE_NETINET_UDP_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETINET_UDP_VAR_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NETIPX_IPX_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NET_IF_DL_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_NET_IF_H */ -- --/* 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. */ --/* #undef HAVE_NET_ROUTE_H */ -- --/* 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. */ --/* #undef HAVE_OPENSSL_AES_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_OPENSSL_DES_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_OPENSSL_DH_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_OPENSSL_EVP_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_OPENSSL_HMAC_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_OSRELDATE_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 if you have header file. (Win32-getpid) */ --#define HAVE_PROCESS_H 1 -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_PTHREAD_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_PWD_H */ -- --/* Define to 1 if you have the `rand' function. */ --#define HAVE_RAND 1 -- --/* Define to 1 if you have the `random' function. */ --#define HAVE_RAND 1 -- --/* Define to 1 if you have the `regcomp' function. */ --/* #undef HAVE_REGCOMP */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_REGEX_H */ -- --/* Define to 1 if you have the `rpmGetPath' function. */ --/* #undef HAVE_RPMGETPATH */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_RPMIO_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_RPM_RPMIO_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. */ --/* #undef HAVE_SELECT */ -- --/* Define to 1 if you have the `setenv' function. */ --/* #undef HAVE_SETENV */ -- --/* Define to 1 if you have the `setgid' function. */ --/* #undef HAVE_SETGID */ -- --/* Define to 1 if you have the `setgroups' function. */ --/* #undef HAVE_SETGROUPS */ -- --/* Define to 1 if you have the `setitimer' function. */ --/* #undef HAVE_SETITIMER */ -- --/* Define to 1 if you have the `setlocale' function. */ --#define HAVE_SETLOCALE 1 -- --/* Define to 1 if you have the `setmntent' function. */ --/* #undef HAVE_SETMNTENT */ -- --/* Define to 1 if you have the `setsid' function. */ --/* #undef HAVE_SETSID */ -- --/* Define to 1 if you have the `setuid' function. */ --/* #undef HAVE_SETUID */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SGTTY_H */ -- --/* Define to 1 if you have the `sigaction' function. */ --/* #undef HAVE_SIGACTION */ -- --/* Define to 1 if you have the `sigalrm' function. */ --/* #undef HAVE_SIGALRM */ -- --/* Define to 1 if you have the `sigblock' function. */ --/* #undef HAVE_SIGBLOCK */ -- --/* Define to 1 if you have the `sighold' function. */ --/* #undef HAVE_SIGHOLD */ -- --/* Define to 1 if you have the `signal' function. */ --/* #undef HAVE_SIGNAL */ -- --/* Define to 1 if you have the `sigset' function. */ --/* #undef HAVE_SIGSET */ -- --/* 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. */ --/* #undef HAVE_STATFS */ -- --/* Define to 1 if you have the `statvfs' function. */ --/* #undef HAVE_STATVFS */ -- --/* Define to 1 if you have the header file. */ --#ifdef __MINGW32__ --#define HAVE_STDINT_H 1 --#endif -- --/* Define to 1 if you have the header file. */ --#define HAVE_STDLIB_H 1 -- --/* Define to 1 if you have the `stime' function. */ --/* #undef HAVE_STIME */ -- --/* Define to 1 if you have the `strcasestr' function. */ --/* #undef HAVE_STRCASESTR */ -- --/* 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. */ --/* #undef HAVE_STRINGS_H */ -- --/* 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. */ --/* #undef HAVE_STRNCASECMP */ -- --/* 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 header file. */ --/* #undef HAVE_SYSLOG_H */ -- --/* Define to 1 if you have the `system' function. */ --#define HAVE_SYSTEM 1 -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_CDEFS_H */ -- --/* 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. */ --/* #undef HAVE_SYS_FILE_H */ -- --/* 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. */ --/* #undef HAVE_SYS_IOCTL_H */ -- --/* 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. */ --/* #undef HAVE_SYS_MOUNT_H */ -- --/* 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. */ --/* #undef HAVE_SYS_PARAM_H */ -- --/* 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. */ --/* #undef HAVE_SYS_QUEUE_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_SELECT_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_SOCKETVAR_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_SOCKET_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_SOCKIO_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_STATFS_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_STATVFS_H */ -- --/* 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. */ --/* #undef HAVE_SYS_SWAP_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_SYSCTL_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_TCPIPSTATS_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_TIME_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. */ --#define HAVE_SYS_TYPES_H 1 -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_UN_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_USER_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_UTSNAME_H */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_SYS_VFS_H */ -- --/* 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. */ --/* #undef HAVE_SYS_WAIT_H */ -- --/* Define to 1 if you have the `tcgetattr' function. */ --/* #undef HAVE_TCGETATTR */ -- --/* 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 you have the `uname' function. */ --/* #undef HAVE_UNAME */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_UNISTD_H */ -- --/* Define to 1 if you have the `usleep' function. */ --/* #undef HAVE_USLEEP */ -- --/* Define to 1 if you have the header file. */ --/* #undef HAVE_UTMPX_H */ -- --/* 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_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. */ --#define HAVE_WINSOCK_H 1 -- --/* Define to 1 if you have the header file. */ --#define HAVE_WINSOCK2_H 1 -- --/* Define to 1 if you have the header file. */ --#define HAVE_WS2TCPIP_H 1 -- --/* Set if IP_PKTINFO is usable */ --#define HAVE_IP_PKTINFO 1 -- --/* 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. */ --/* #undef PACKAGE_BUGREPORT */ -- --/* 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. */ --/* #undef PACKAGE_STRING */ -- --/* Define to the one symbol short name of this package. */ --#ifndef PACKAGE_TARNAME --#define PACKAGE_TARNAME "net-snmp" --#endif -- --/* Define to the version of this package. */ --/* #undef PACKAGE_VERSION */ -- --/* 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 `intmax_t', as computed by sizeof. */ --#define SIZEOF_INTMAX_T 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 . */ --/* #undef TIME_WITH_SYS_TIME */ -- --/* 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 as `__inline' if that's what the C compiler calls it, or to nothing -- if it is not supported. */ --#define inline __inline -- --/* Define to `long' if does not define. */ --/* #undef off_t */ -- --/* Define to `int' if does not define. */ --/* #undef pid_t */ -- --/* 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 rtentry; -- --/* Use BSD 4.4 routing table entries? */ --/* #undef RTENTRY_4_4 */ -- --/* Does struct sigaction have a sa_sigaction field? */ --/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ -- --/* Does struct sockaddr have a sa_len field? */ --/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ -- --/* Does struct sockaddr have a sa_family2 field? */ --/* #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 */ -- --/* Does struct in6_addr have a s6_un.sa6_ladd field? */ --/* #undef HAVE_STRUCT_IN6_ADDR_S6_UN_SA6_LADDR */ -- --/* msghdr.msg_control */ --/* #undef HAVE_STRUCT_MSGHDR_MSG_CONTROL */ -- --/* msghdr.msg_flags */ --/* #undef HAVE_STRUCT_MSGHDR_MSG_FLAGS */ -- --/* rtentry structure tests */ --/* #undef RTENTRY_RT_NEXT */ --/* #undef HAVE_STRUCT_RTENTRY_RT_DST */ --/* #undef HAVE_STRUCT_RTENTRY_RT_UNIT */ --/* #undef HAVE_STRUCT_RTENTRY_RT_USE */ --/* #undef HAVE_STRUCT_RTENTRY_RT_REFCNT */ --/* #undef HAVE_STRUCT_RTENTRY_RT_HASH */ -- --/* ifnet structure tests */ --/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE */ --/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE */ --/* #undef HAVE_STRUCT_IFNET_IF_SPEED */ --/* #undef HAVE_STRUCT_IFNET_IF_TYPE */ --/* #undef HAVE_STRUCT_IFNET_IF_IMCASTS */ --/* #undef HAVE_STRUCT_IFNET_IF_IQDROPS */ --/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC */ --/* #undef HAVE_STRUCT_IFNET_IF_NOPROTO */ --/* #undef HAVE_STRUCT_IFNET_IF_OMCASTS */ --/* #undef HAVE_STRUCT_IFNET_IF_XNAME */ --/* #undef HAVE_STRUCT_IFNET_IF_OBYTES */ --/* #undef HAVE_STRUCT_IFNET_IF_IBYTES */ --/* #undef HAVE_STRUCT_IFNET_IF_ADDRLIST */ -- --/* tcpstat.tcps_rcvmemdrop */ --/* #undef HAVE_STRUCT_TCPSTAT_TCPS_RCVMEMDROP */ -- --/* udpstat.udps_discard */ --/* #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD */ -- --/* udpstat.udps_discard */ --/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT */ -- --/* udpstat.udps_discard */ --/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST */ -- --/* udpstat.udps_discard */ --/* #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK */ -- --/* arphd.at_next */ --/* #undef HAVE_STRUCT_ARPHD_AT_NEXT */ -- --/* ifaddr.ifa_next */ --/* #undef HAVE_STRUCT_IFADDR_IFA_NEXT */ -- --/* ifnet.if_mtu */ --/* #undef HAVE_STRUCT_IFNET_IF_MTU */ -- --/* swdevt.sw_nblksenabled */ --/* #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED */ -- --/* nlist.n_value */ --/* #undef HAVE_STRUCT_NLIST_N_VALUE */ -- --/* ipstat structure tests */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS */ --/* #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED */ -- --/* vfsstat.f_frsize */ --/* #undef HAVE_STRUCT_STATVFS_F_FRSIZE */ -- --/* vfsstat.f_files */ --/* #undef HAVE_STRUCT_STATVFS_F_FILES */ -- --/* statfs inode structure tests*/ --/* #undef HAVE_STRUCT_STATFS_F_FILES */ --/* #undef HAVE_STRUCT_STATFS_F_FFREE */ --/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */ -- --/* des_ks_struct.weak_key */ --/* #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY */ -- --/* ifnet needs to have _KERNEL defined */ --/* #undef IFNET_NEEDS_KERNEL */ -- --/* sysctl works to get boottime, etc... */ --/* #undef NETSNMP_CAN_USE_SYSCTL */ -- --/* type check for in_addr_t */ --/* #undef in_addr_t */ -- --/* define if SIOCGIFADDR exists in sys/ioctl.h */ --/* #undef SYS_IOCTL_H_HAS_SIOCGIFADDR */ -- --/* 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 NETSNMP_AGENTID above. IE, the resulting -- value returned by a query to sysObjectID is -- EXTENSIBLEMIB.NETSNMP_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_UNKNOWNID 255 -- --#ifdef hpux9 --#define OSTYPE NETSNMP_HPUX9ID --#endif --#ifdef hpux10 --#define OSTYPE NETSNMP_HPUX10ID --#endif --#ifdef hpux11 --#define OSTYPE NETSNMP_HPUX11ID --#endif --#ifdef sunos4 --#define OSTYPE NETSNMP_SUNOS4ID --#endif --#ifdef solaris2 --#define OSTYPE NETSNMP_SOLARISID --#endif --#if defined(osf3) || defined(osf4) || defined(osf5) --#define OSTYPE NETSNMP_OSFID --#endif --#ifdef ultrix4 --#define OSTYPE NETSNMP_ULTRIXID --#endif --#ifdef netbsd1 --#define OSTYPE NETSNMP_NETBSD1ID --#endif --#if defined(__FreeBSD__) --#define OSTYPE NETSNMP_FREEBSDID --#endif --#if defined(irix6) || defined(irix5) --#define OSTYPE NETSNMP_IRIXID --#endif --#ifdef linux --#define OSTYPE NETSNMP_LINUXID --#endif --#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4) --#define OSTYPE NETSNMP_BSDIID --#endif --#ifdef openbsd2 --#define OSTYPE NETSNMP_OPENBSDID --#endif --#ifdef WIN32 --#define OSTYPE NETSNMP_WIN32ID --#endif --/* unknown */ --#ifndef OSTYPE --#define 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,OSTYPE --#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.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 -- --/* 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 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 (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 NETSNMP_DEFDISKMINIMUMSPACE 100000 -- --#define NETSNMP_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 NETSNMP_MAXREADCOUNT 100 /* max times to loop reading output from execs. */ -- --/* The original CMU code had this hardcoded as = 1 */ --#define NETSNMP_SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */ -- --/* How long to wait before restarting the agent after a snmpset to -- EXTENSIBLEMIB.NETSNMP_VERSIONMIBNUM.VERRESTARTAGENT. This is -- necessary to finish the snmpset reply before restarting. */ --#define NETSNMP_RESTARTSLEEP 5 -- --/* Number of community strings to store */ --#define NETSNMP_NUM_COMMUNITIES 5 -- --/* UNdefine to allow specifying zero-length community string */ --/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */ -- --#define NETSNMP_LASTFIELD -1 /* internal define */ -- --/* configure options specified */ --#define NETSNMP_CONFIGURE_OPTIONS "" -- --/* got socklen_t? */ --#ifdef HAVE_WIN32_PLATFORM_SDK --#define HAVE_SOCKLEN_T 1 --#endif -- --/* got in_addr_t? */ --/* #undef HAVE_IN_ADDR_T */ -- --#ifdef __MINGW32__ --/* got ssize_t? */ --#define HAVE_SSIZE_T --#endif -- --/* If you have openssl 0.9.7 or above, you likely have AES support. */ --/* #undef NETSNMP_USE_OPENSSL */ -- --#ifdef NETSNMP_USE_OPENSSL -- --/* 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_AES_H 1 -- --/* Define to 1 if you have the `EVP_MD_CTX_create' function. */ --#define HAVE_EVP_MD_CTX_CREATE 1 -- --/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ --#define HAVE_EVP_MD_CTX_DESTROY 1 -- --/* Define to 1 if you have the `AES_cfb128_encrypt' function. */ --#define HAVE_AES_CFB128_ENCRYPT 1 -- --#if defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT) --#define HAVE_AES 1 --#endif -- --#else /* ! NETSNMP_USE_OPENSSL */ -- --/* define if you are using the MD5 code ...*/ --#define NETSNMP_USE_INTERNAL_MD5 1 -- --#endif /* ! NETSNMP_USE_OPENSSL */ -- -- --/* 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 gethostbyaddr */ --#define HAVE_GETHOSTBYADDR 1 -- --/* printing system */ --/* #undef HAVE_LPSTAT */ --/* #undef LPSTAT_PATH */ --/* #undef HAVE_PRINTCAP */ -- --/* 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. */ --/* #undef NETSNMP_TRANSPORT_UNIX_DOMAIN */ -- --/* 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 */ -- --/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ --/* This is defined if support for the UDP/IPv6 transport domain is -- available. */ --/* #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ -- --/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ --/* 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. */ --/* #undef NETSNMP_TRANSPORT_ALIAS_DOMAIN */ -- --/* 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 we're using the new MIT crypto API */ --/* #undef NETSNMP_USE_KERBEROS_MIT */ -- --/* define if you want to build with reentrant/threaded code (incomplete)*/ --/* #undef NETSNMP_REENTRANT */ -- --/* 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_version_require(x) --#define config_warning(x) --#define config_error(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) --#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; } -- * -- */ --/* -- * Win32 needs extern for inline function declarations in headers. -- * See MS tech note Q123768: -- * http://support.microsoft.com/default.aspx?scid=kb;EN-US;123768 -- */ --#define NETSNMP_INLINE extern inline --#define NETSNMP_STATIC_INLINE static inline --#define NETSNMP_ENABLE_INLINE 1 -- --#if notused --#include NETSNMP_SYSTEM_INCLUDE_FILE --#include NETSNMP_MACHINE_INCLUDE_FILE --#endif -- --#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) --# define NETSNMP_USE_INLINE 1 --#else --# undef NETSNMP_INLINE --# define NETSNMP_INLINE --# undef NETSNMP_STATIC_INLINE --# define NETSNMP_STATIC_INLINE static --#endif -- --#ifdef WIN32 -- --#ifndef __MINGW32__ --typedef unsigned short mode_t; --#endif --#ifndef HAVE_STDINT_H --typedef unsigned char uint8_t; --typedef char int8_t; --typedef unsigned __int16 uint16_t; --typedef __int16 int16_t; --typedef unsigned __int32 uint32_t; --typedef __int32 int32_t; --typedef unsigned __int64 uint64_t; --typedef __int64 int64_t; --typedef unsigned __int64 uintmax_t; --typedef __int64 intmax_t; --#else /* HAVE_STDINT_H */ --#include --#endif /* HAVE_STDINT_H */ -- -- --/* (u)intptr_t should only be needed for MSVC 6 32-bit. */ --/* SDK has it for 64-bit and newer MSVC should also have it in stddef.h. */ --#ifndef _INTPTR_T_DEFINED --#ifdef _M_X64 --typedef __int64 intptr_t; --#else --typedef int intptr_t; --#endif --#define _INTPTR_T_DEFINED --#endif -- --#ifndef _UINTPTR_T_DEFINED --#ifdef _M_X64 --typedef unsigned __int64 uintptr_t; --#else --typedef unsigned int uintptr_t; --#endif --#define _UINTPTR_T_DEFINED --#endif -- --#ifndef __cplusplus --#ifdef _MSC_VER --#pragma warning(push) --#pragma warning(disable: 4804) // '-' : unsafe use of type 'bool' in operation --#endif --enum { -- netsnmp_compile_time_uintptr_t_size_check -- = sizeof(struct netsnmp_compile_time_uintptr_t_size_check_s { int:-!(sizeof(uintptr_t) == sizeof(void*)); }) --}; --#ifdef _MSC_VER --#pragma warning(pop) --#endif --#endif -- --/* Define if you have the closesocket function. */ --#define HAVE_CLOSESOCKET 1 -- --/* Define if you have raise() instead of alarm() */ --#define HAVE_RAISE 1 -- --/* define to 1 if you do not want to set global snmp_errno */ --#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1 -- --/* Defining vsnprintf is not necessary for MSVC 2008 or later */ --#if defined(_MSC_VER) && _MSC_VER < 1500 --#define vsnprintf _vsnprintf --#endif --#ifdef _MSC_VER --#define snprintf _snprintf --#endif -- --#if defined(_MSC_VER) && _MSC_VER < 1600 --#define EADDRINUSE WSAEADDRINUSE --#endif -- --/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL */ --/* #undef NETSNMP_USE_DLL */ -- --#if defined(NETSNMP_DLL) && !defined(NETSNMP_USE_DLL) --#error NETSNMP_USE_DLL must be defined when building libsnmp as a DLL. --#endif -- --/* -- * DLL decoration, if used at all, must be consistent. -- * This is why NETSNMP_IMPORT is really an export decoration -- * when it is encountered in a header file that is included -- * during the compilation of a library source file. -- * NETSNMP_DLL is set by the MSVC libsnmp_dll project -- * in order to signal that the library sources are being compiled. -- * Not defining NETSNMP_USE_DLL ignores the preceding, and renders -- * the NETSNMP_IMPORT definitions harmless. -- */ -- --#ifdef NETSNMP_USE_DLL -- #ifdef NETSNMP_DLL -- #if defined(_MSC_VER) -- #define NETSNMP_IMPORT __declspec(dllexport) -- #endif -- #else -- #if defined(_MSC_VER) -- #define NETSNMP_IMPORT __declspec(dllimport) -- #endif -- #endif /* NETSNMP_DLL */ --#endif /* NETSNMP_USE_DLL */ -- --/* MSVC OpenSSL linker settings. */ --#if defined(_MSC_VER) --# if defined(NETSNMP_USE_OPENSSL) --# ifdef _DLL --# ifdef _DEBUG --# pragma comment(lib, "libeay32MDd.lib") --# else --# pragma comment(lib, "libeay32MD.lib") --# endif --# else --# ifdef _DEBUG --# pragma comment(lib, "libeay32MTd.lib") --# else --# pragma comment(lib, "libeay32MT.lib") --# endif --# endif --# pragma comment(lib, "gdi32.lib") --# pragma comment(lib, "user32.lib") --# endif --#endif -- --#endif /* WIN32 */ -- --#ifndef NETSNMP_IMPORT --# define NETSNMP_IMPORT extern --#endif -- --#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE) --#define NETSNMP_CAN_USE_NLIST --#endif -- --#if HAVE_DMALLOC_H --#define DMALLOC_FUNC_CHECK --#endif -- --/* #undef NETSNMP_ENABLE_LOCAL_SMUX */ -- --/* define if agentx transport is to use domain sockets only */ --/* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */ -- --#ifndef LOG_DAEMON --#define LOG_DAEMON (3<<3) /* system daemons */ --#endif -- --#if UCD_COMPATIBLE --/* old and in the way */ --#define EXTENSIBLEMIB NETSNMP_UCDAVIS_MIB --#endif -- --#ifdef _MSC_VER --/* Windows Vista and higher have inet_ntop but older Windows does not. -- * We'll use the Net-SNMP version instead. */ --#undef HAVE_INET_NTOP --#undef HAVE_INET_PTON -- --/* IPv6 transports */ --#ifdef NETSNMP_ENABLE_IPV6 -- #define NETSNMP_TRANSPORT_TCPIPV6_DOMAIN 1 -- #define NETSNMP_TRANSPORT_UDPIPV6_DOMAIN 1 -- #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 --#else -- #undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN -- #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN --#endif --#endif -- --/* -- * Although if_nametoindex() is available on Windows Vista, Windows Server -- * 2008 and later in iphlpapi.dll, do not link with if_nametoindex() such -- * that the Net-SNMP executable can be started on earlier Windows versions. -- */ --#undef HAVE_IF_NAMETOINDEX -- --#ifndef NI_MAXHOST --#define NI_MAXHOST 1025 --#endif -- --/* Define to 1 if you have the `strtoull' function. */ --#if _MSC_VER >= 1800 --#define HAVE_STRTOULL 1 --#else --/* #undef HAVE_STRTOULL */ --#endif -- --/* -- * Module configuration and control starts here. -- * -- * Some of the defines herein are used to control -- * groups of modules. The ones that have "CFG" -- * are used especially to control the include files -- * seen in {agent,mib}_module_includes.h, and the init entries -- * which are invoked in {agent,mib}_module_inits.h. -- * -- * To disable a group, uncomment the associated define. -- */ -- --/* CFG Define if compiling with the ucd_snmp module files. */ --#define USING_UCD_SNMP_MODULE 1 -- --/* CFG Define if compiling with the agentx module files. */ --#define USING_AGENTX_MODULE 1 -- --/* CFG Define if compiling with the host module files. */ --/* #undef USING_HOST_MODULE */ -- --/* CFG Define if compiling with the Rmon module files. */ --/* #undef USING_RMON_MODULE */ -- --/* CFG Define if compiling with the disman/event-mib module files. */ --#define USING_DISMAN_EVENT_MIB_MODULE 1 -- --/* CFG Define if compiling with the smux module files. */ --/* #undef USING_SMUX_MODULE */ -- --/* Define if compiling with the winExtDLL module. */ --/* #undef USING_WINEXTDLL_MODULE */ -- --/* -- * Module configuration and control ends here. -- */ --#define UDP_ADDRESSES_IN_HOST_ORDER 1 -- --/* Timeout in milliseconds for Win32 function WaitForSingleObject. -- Used by agent pass. */ --#define NETSNMP_TIMEOUT_WAITFORSINGLEOBJECT 5000 -- --#ifdef HAVE_WIN32_PLATFORM_SDK --#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 --#endif -- --/* Size prefix to use to printf a uint32_t */ --#define NETSNMP_PRI32 "" -- --#ifdef _MSC_VER --#ifdef _WIN64 --#define NETSNMP_PRIz "I64" --#else --#define NETSNMP_PRIz "" --#endif --#endif -- --#endif /* NET_SNMP_CONFIG_H */ -- -+/* include/net-snmp/net-snmp-config.h.in. Generated from configure.in by autoheader. */ -+/* modified by hand with care. */ -+ -+#ifndef NET_SNMP_CONFIG_H -+#define NET_SNMP_CONFIG_H -+ -+/* _MSC_VER values -+ 1800 = MSVC++ 12.0 (Visual Studio 2013) -+ 1700 = MSVC++ 11.0 (Visual Studio 2012) -+ 1600 = MSVC++ 10.0 (Visual Studio 2010) -+ 1500 = MSVC++ 9.0 (Visual Studio 2008) -+ 1400 = MSVC++ 8.0 (Visual Studio 2005) -+ 1310 = MSVC++ 7.1 (Visual Studio 2003) -+ 1300 = MSVC++ 7.0 (Visual Studio 2002) -+ 1200 = MSVC++ 6.0 -+*/ -+ -+#ifdef _MSC_VER -+/* Disable warning 4018: signed/unsigned mismatch. */ -+#pragma warning (disable: 4018) -+#endif -+ -+/* Automatically set by Windows perl Configure script. -+ * When compiling with the MSVC workspace, this must be set manually. -+ * See the PACKAGE_VERSION variable in Unix /configure script -+*/ -+#ifndef PACKAGE_VERSION -+#define PACKAGE_VERSION "5.7.3" -+#endif -+ -+/* Define HAVE_WIN32_PLATFORM_SDK if you have: -+ * Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK) -+ * Microsoft Visual Studio.Net 2002 -+ * Microsoft Visual Studio.Net 2003 -+ */ -+#define HAVE_WIN32_PLATFORM_SDK 1 -+ -+/* Define NETSNMP_ENABLE_IPV6 to enable IPv6. IPv6 is only available on -+ * Windows XP and higher. */ -+#define NETSNMP_ENABLE_IPV6 1 -+ -+/* Only use Windows API functions available on Windows 2000 SP4 or later. -+ * We need at least SP1 for some IPv6 defines in ws2ipdef.h -+ */ -+#ifndef _WIN32_WINNT -+#define _WIN32_WINNT 0x600 /*_WIN32_WINNT_WIN6*/ -+#else -+#if _WIN32_WINNT < 0x501 -+#error _WIN32_WINNT is too low - it should be set to at least 0x501. -+#endif -+#endif -+ -+#define INSTALL_BASE "c:/usr" -+ -+/* config.h: a general config file */ -+ -+/* 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 "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;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 NETSNMP_DEFAULT_MIBDIRS INSTALL_BASE ## "/share/snmp/mibs" -+ -+/* default mib files to load, specified by path. */ -+/* #undef NETSNMP_DEFAULT_MIBFILES */ -+ -+/* should we compile to use special opaque types: float, double, -+ counter64, i64, ui64, union? */ -+#define NETSNMP_WITH_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 NETSNMP_ENABLE_SCAPI_AUTHPRIV 1 -+ -+/* define if you are using the MD5 code ...*/ -+/* #undef NETSNMP_USE_INTERNAL_MD5 */ -+ -+/* define if you are using the codeS11 library ...*/ -+/* #undef NETSNMP_USE_PKCS11 */ -+ -+/* add in recent CMU library extensions (not complete) */ -+/* #undef CMU_COMPATIBLE */ -+ -+/* add in recent resource lock functions (not complete) */ -+/* #undef NETSNMP_REENTRANT */ -+ -+/* 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 */ -+ -+/* NETSNMP_PERSISTENT_DIRECTORY: If defined, the library is capabile of saving -+ persisant information to this directory in the form of configuration -+ lines: NETSNMP_PERSISTENT_DIRECTORY/NAME.persistent.conf */ -+#define NETSNMP_PERSISTENT_DIRECTORY INSTALL_BASE ## "/snmp/persist" -+ -+/* NETSNMP_PERSISTENT_MASK: the umask permissions to set up persistent files with */ -+/* #undef NETSNMP_PERSISTENT_MASK -- no win32 umask */ -+ -+/* NETSNMP_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 -+ -+/* NETSNMP_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 if you are embedding perl in the main agent */ -+/* #undef NETSNMP_EMBEDDED_PERL */ -+ -+#if notused -+/* define the system type include file here */ -+#define NETSNMP_SYSTEM_INCLUDE_FILE -+ -+/* define the machine (cpu) type include file here */ -+#define NETSNMP_MACHINE_INCLUDE_FILE -+#endif -+ -+/* SNMPLIBDIR contains important files */ -+ -+#define SNMPLIBPATH INSTALL_BASE ## "/lib" -+#define SNMPSHAREPATH INSTALL_BASE ## "/share/snmp" -+#define SNMPCONFPATH INSTALL_BASE ## "/etc/snmp" -+#define SNMPDLMODPATH INSTALL_BASE ## "/lib/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) */ -+/* #undef NETSNMP_LOGFILE */ -+ -+/* default system contact */ -+#define NETSNMP_SYS_CONTACT "unknown" -+ -+/* system location */ -+#define NETSNMP_SYS_LOC "unknown" -+ -+/* Use libwrap to handle allow/deny hosts? */ -+/* #undef NETSNMP_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 "unknown" -+ -+/* 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" -+ -+/* Where is the uname command */ -+#define UNAMEPROG "/bin/uname" -+ -+/* pattern for temporary file names */ -+#define NETSNMP_TEMP_FILE_PATTERN INSTALL_BASE ## "/temp/snmpdXXXXXX" -+ -+/* testing code sections. */ -+/* #undef NETSNMP_ENABLE_TESTING_CODE */ -+ -+/* If you don't have root access don't exit upon kmem errors */ -+/* #undef NETSNMP_NO_ROOT_ACCESS */ -+ -+/* If we don't want to use kmem. */ -+/* #undef NETSNMP_NO_KMEM_USAGE */ -+ -+/* If you don't want the agent to report on variables it doesn't have data for */ -+#define NETSNMP_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 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 SNMPv1 code should not be included */ -+/* #undef NETSNMP_DISABLE_SNMPV1 */ -+ -+/* Define if SNMPv2c code should not be included */ -+/* #undef NETSNMP_DISABLE_SNMPV2C */ -+ -+/* 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. */ -+/* #undef HAVE_ALLOCA */ -+ -+/* Define to 1 if you have and it should be used (not on Ultrix). -+ */ -+/* #undef HAVE_ALLOCA_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_ARPA_INET_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_ASM_PAGE_H */ -+ -+/* Define to 1 if you have the `cgetnext' function. */ -+/* #undef HAVE_CGETNEXT */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_CRTDBG_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_DIRECT_H 1 -+ -+/* Define to 1 if you have the header file, and it defines `DIR'. -+ */ -+/* #undef HAVE_DIRENT_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_DLFCN_H */ -+ -+/* Define to 1 if you have the `dlopen' function. */ -+/* #undef HAVE_DLOPEN */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_ERR_H */ -+ -+/* Define to 1 if you have the `eval_pv' function. */ -+/* #undef HAVE_EVAL_PV */ -+ -+/* Define to 1 if you have the `execv' function. */ -+/* #undef HAVE_EXECV */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_FCNTL_H 1 -+ -+/* Define to 1 if you have the `fork' function. */ -+/* #undef HAVE_FORK */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_FSTAB_H */ -+ -+/* Define to 1 if you have the `getaddrinfo' function. */ -+/* #undef HAVE_GETADDRINFO */ -+ -+/* Define to 1 if you have the `getdtablesize' function. */ -+/* #undef HAVE_GETDTABLESIZE */ -+ -+/* Define to 1 if you have the `getfsstat' function. */ -+/* #undef HAVE_GETFSSTAT */ -+ -+/* Define to 1 if you have the `getgrnam' function. */ -+/* #undef HAVE_GETGRNAM */ -+ -+/* 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. */ -+/* #undef HAVE_GETLOADAVG */ -+ -+/* Define to 1 if you have the `getmntent' function. */ -+/* #undef HAVE_GETMNTENT */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_GETOPT_H */ -+ -+/* Define to 1 if you have the `getpagesize' function. */ -+/* #undef HAVE_GETPAGESIZE */ -+ -+/* Define to 1 if you have the `getpid' function. */ -+#define HAVE_GETPID 1 -+ -+/* Define to 1 if you have the `getpwnam' function. */ -+/* #undef HAVE_GETPWNAM */ -+ -+/* Define to 1 if you have the `gettimeofday' function. */ -+/* #undef HAVE_GETTIMEOFDAY */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_GRP_H */ -+ -+/* Define to 1 if you have the `if_freenameindex' function. */ -+/* #undef HAVE_IF_FREENAMEINDEX */ -+ -+/* Define to 1 if you have the `if_nameindex' function. */ -+/* #undef HAVE_IF_NAMEINDEX */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_INET_MIB2_H */ -+ -+#ifdef HAVE_WIN32_PLATFORM_SDK -+/* Define to 1 if you have the header file. */ -+#define HAVE_IPHLPAPI_H -+#endif -+ -+/* Define to 1 if the system has the 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 */ -+#undef HAVE_U_INT32_T -+ -+/* 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 */ -+#undef HAVE_U_INT64_T -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_INTTYPES_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_IOCTLS_H */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_IO_H 1 -+ -+/* 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). */ -+/* #undef HAVE_LIBCRYPTO */ -+ -+/* 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 `m' library (-lm). */ -+/* #undef HAVE_LIBM */ -+ -+/* 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 `sensors' library (-lsensors). */ -+/* #undef HAVE_LIBSENSORS */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_LIMITS_H 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_LINUX_HDREG_H */ -+ -+/* 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. */ -+/* #undef HAVE_LRAND48 */ -+ -+/* 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 you have the `mkstemp' function. */ -+/* #undef HAVE_MKSTEMP */ -+ -+/* Define to 1 if you have the `mktime' function. */ -+/* #undef HAVE_MKTIME */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_MNTENT_H */ -+ -+/* 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. */ -+/* #undef HAVE_NETDB_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_PCB_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_VAR_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_ND6_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_FSM_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_TIMER_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_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. */ -+/* #undef HAVE_NETINET_IF_ETHER_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_IN_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_IN_SYSTM_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_IN_VAR_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_IP6_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_IP_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_IP_ICMP_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_ICMP6_H */ -+ -+/* 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. */ -+/* #undef HAVE_NETINET_TCP_H */ -+ -+/* 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. */ -+/* #undef HAVE_NETINET_UDP_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETINET_UDP_VAR_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NETIPX_IPX_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NET_IF_DL_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_NET_IF_H */ -+ -+/* 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. */ -+/* #undef HAVE_NET_ROUTE_H */ -+ -+/* 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. */ -+/* #undef HAVE_OPENSSL_AES_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_OPENSSL_DES_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_OPENSSL_DH_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_OPENSSL_EVP_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_OPENSSL_HMAC_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_OSRELDATE_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 if you have header file. (Win32-getpid) */ -+#define HAVE_PROCESS_H 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_PTHREAD_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_PWD_H */ -+ -+/* Define to 1 if you have the `rand' function. */ -+#define HAVE_RAND 1 -+ -+/* Define to 1 if you have the `random' function. */ -+#define HAVE_RAND 1 -+ -+/* Define to 1 if you have the `regcomp' function. */ -+/* #undef HAVE_REGCOMP */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_REGEX_H */ -+ -+/* Define to 1 if you have the `rpmGetPath' function. */ -+/* #undef HAVE_RPMGETPATH */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_RPMIO_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_RPM_RPMIO_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. */ -+/* #undef HAVE_SELECT */ -+ -+/* Define to 1 if you have the `setenv' function. */ -+/* #undef HAVE_SETENV */ -+ -+/* Define to 1 if you have the `setgid' function. */ -+/* #undef HAVE_SETGID */ -+ -+/* Define to 1 if you have the `setgroups' function. */ -+/* #undef HAVE_SETGROUPS */ -+ -+/* Define to 1 if you have the `setitimer' function. */ -+/* #undef HAVE_SETITIMER */ -+ -+/* Define to 1 if you have the `setlocale' function. */ -+#define HAVE_SETLOCALE 1 -+ -+/* Define to 1 if you have the `setmntent' function. */ -+/* #undef HAVE_SETMNTENT */ -+ -+/* Define to 1 if you have the `setsid' function. */ -+/* #undef HAVE_SETSID */ -+ -+/* Define to 1 if you have the `setuid' function. */ -+/* #undef HAVE_SETUID */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SGTTY_H */ -+ -+/* Define to 1 if you have the `sigaction' function. */ -+/* #undef HAVE_SIGACTION */ -+ -+/* Define to 1 if you have the `sigalrm' function. */ -+/* #undef HAVE_SIGALRM */ -+ -+/* Define to 1 if you have the `sigblock' function. */ -+/* #undef HAVE_SIGBLOCK */ -+ -+/* Define to 1 if you have the `sighold' function. */ -+/* #undef HAVE_SIGHOLD */ -+ -+/* Define to 1 if you have the `signal' function. */ -+/* #undef HAVE_SIGNAL */ -+ -+/* Define to 1 if you have the `sigset' function. */ -+/* #undef HAVE_SIGSET */ -+ -+/* 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. */ -+/* #undef HAVE_STATFS */ -+ -+/* Define to 1 if you have the `statvfs' function. */ -+/* #undef HAVE_STATVFS */ -+ -+/* Define to 1 if you have the header file. */ -+#ifdef __MINGW32__ -+#define HAVE_STDINT_H 1 -+#endif -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_STDLIB_H 1 -+ -+/* Define to 1 if you have the `stime' function. */ -+/* #undef HAVE_STIME */ -+ -+/* Define to 1 if you have the `strcasestr' function. */ -+/* #undef HAVE_STRCASESTR */ -+ -+/* 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. */ -+/* #undef HAVE_STRINGS_H */ -+ -+/* 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. */ -+/* #undef HAVE_STRNCASECMP */ -+ -+/* 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 header file. */ -+/* #undef HAVE_SYSLOG_H */ -+ -+/* Define to 1 if you have the `system' function. */ -+#define HAVE_SYSTEM 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_CDEFS_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_FILE_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_IOCTL_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_MOUNT_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_PARAM_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_QUEUE_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_SELECT_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_SOCKETVAR_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_SOCKET_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_SOCKIO_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_STATFS_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_STATVFS_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_SWAP_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_SYSCTL_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_TCPIPSTATS_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_TIME_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. */ -+#define HAVE_SYS_TYPES_H 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_UN_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_USER_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_UTSNAME_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_VFS_H */ -+ -+/* 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. */ -+/* #undef HAVE_SYS_WAIT_H */ -+ -+/* Define to 1 if you have the `tcgetattr' function. */ -+/* #undef HAVE_TCGETATTR */ -+ -+/* 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 you have the `uname' function. */ -+/* #undef HAVE_UNAME */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_UNISTD_H */ -+ -+/* Define to 1 if you have the `usleep' function. */ -+/* #undef HAVE_USLEEP */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_UTMPX_H */ -+ -+/* 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_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. */ -+#define HAVE_WINSOCK_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_WINSOCK2_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_WS2TCPIP_H 1 -+ -+/* Set if IP_PKTINFO is usable */ -+#define HAVE_IP_PKTINFO 1 -+ -+/* 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. */ -+/* #undef PACKAGE_BUGREPORT */ -+ -+/* 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. */ -+/* #undef PACKAGE_STRING */ -+ -+/* Define to the one symbol short name of this package. */ -+#ifndef PACKAGE_TARNAME -+#define PACKAGE_TARNAME "net-snmp" -+#endif -+ -+/* Define to the version of this package. */ -+/* #undef PACKAGE_VERSION */ -+ -+/* 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 `intmax_t', as computed by sizeof. */ -+#define SIZEOF_INTMAX_T 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 . */ -+/* #undef TIME_WITH_SYS_TIME */ -+ -+/* 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 as `__inline' if that's what the C compiler calls it, or to nothing -+ if it is not supported. */ -+#ifndef PHP_WIN32 -+#define inline __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 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 rtentry; -+ -+/* Use BSD 4.4 routing table entries? */ -+/* #undef RTENTRY_4_4 */ -+ -+/* Does struct sigaction have a sa_sigaction field? */ -+/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ -+ -+/* Does struct sockaddr have a sa_len field? */ -+/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ -+ -+/* Does struct sockaddr have a sa_family2 field? */ -+/* #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 */ -+ -+/* Does struct in6_addr have a s6_un.sa6_ladd field? */ -+/* #undef HAVE_STRUCT_IN6_ADDR_S6_UN_SA6_LADDR */ -+ -+/* msghdr.msg_control */ -+/* #undef HAVE_STRUCT_MSGHDR_MSG_CONTROL */ -+ -+/* msghdr.msg_flags */ -+/* #undef HAVE_STRUCT_MSGHDR_MSG_FLAGS */ -+ -+/* rtentry structure tests */ -+/* #undef RTENTRY_RT_NEXT */ -+/* #undef HAVE_STRUCT_RTENTRY_RT_DST */ -+/* #undef HAVE_STRUCT_RTENTRY_RT_UNIT */ -+/* #undef HAVE_STRUCT_RTENTRY_RT_USE */ -+/* #undef HAVE_STRUCT_RTENTRY_RT_REFCNT */ -+/* #undef HAVE_STRUCT_RTENTRY_RT_HASH */ -+ -+/* ifnet structure tests */ -+/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE */ -+/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE */ -+/* #undef HAVE_STRUCT_IFNET_IF_SPEED */ -+/* #undef HAVE_STRUCT_IFNET_IF_TYPE */ -+/* #undef HAVE_STRUCT_IFNET_IF_IMCASTS */ -+/* #undef HAVE_STRUCT_IFNET_IF_IQDROPS */ -+/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC */ -+/* #undef HAVE_STRUCT_IFNET_IF_NOPROTO */ -+/* #undef HAVE_STRUCT_IFNET_IF_OMCASTS */ -+/* #undef HAVE_STRUCT_IFNET_IF_XNAME */ -+/* #undef HAVE_STRUCT_IFNET_IF_OBYTES */ -+/* #undef HAVE_STRUCT_IFNET_IF_IBYTES */ -+/* #undef HAVE_STRUCT_IFNET_IF_ADDRLIST */ -+ -+/* tcpstat.tcps_rcvmemdrop */ -+/* #undef HAVE_STRUCT_TCPSTAT_TCPS_RCVMEMDROP */ -+ -+/* udpstat.udps_discard */ -+/* #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD */ -+ -+/* udpstat.udps_discard */ -+/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT */ -+ -+/* udpstat.udps_discard */ -+/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST */ -+ -+/* udpstat.udps_discard */ -+/* #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK */ -+ -+/* arphd.at_next */ -+/* #undef HAVE_STRUCT_ARPHD_AT_NEXT */ -+ -+/* ifaddr.ifa_next */ -+/* #undef HAVE_STRUCT_IFADDR_IFA_NEXT */ -+ -+/* ifnet.if_mtu */ -+/* #undef HAVE_STRUCT_IFNET_IF_MTU */ -+ -+/* swdevt.sw_nblksenabled */ -+/* #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED */ -+ -+/* nlist.n_value */ -+/* #undef HAVE_STRUCT_NLIST_N_VALUE */ -+ -+/* ipstat structure tests */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS */ -+/* #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED */ -+ -+/* vfsstat.f_frsize */ -+/* #undef HAVE_STRUCT_STATVFS_F_FRSIZE */ -+ -+/* vfsstat.f_files */ -+/* #undef HAVE_STRUCT_STATVFS_F_FILES */ -+ -+/* statfs inode structure tests*/ -+/* #undef HAVE_STRUCT_STATFS_F_FILES */ -+/* #undef HAVE_STRUCT_STATFS_F_FFREE */ -+/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */ -+ -+/* des_ks_struct.weak_key */ -+/* #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY */ -+ -+/* ifnet needs to have _KERNEL defined */ -+/* #undef IFNET_NEEDS_KERNEL */ -+ -+/* sysctl works to get boottime, etc... */ -+/* #undef NETSNMP_CAN_USE_SYSCTL */ -+ -+/* type check for in_addr_t */ -+/* #undef in_addr_t */ -+ -+/* define if SIOCGIFADDR exists in sys/ioctl.h */ -+/* #undef SYS_IOCTL_H_HAS_SIOCGIFADDR */ -+ -+/* 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 NETSNMP_AGENTID above. IE, the resulting -+ value returned by a query to sysObjectID is -+ EXTENSIBLEMIB.NETSNMP_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_UNKNOWNID 255 -+ -+#ifdef hpux9 -+#define OSTYPE NETSNMP_HPUX9ID -+#endif -+#ifdef hpux10 -+#define OSTYPE NETSNMP_HPUX10ID -+#endif -+#ifdef hpux11 -+#define OSTYPE NETSNMP_HPUX11ID -+#endif -+#ifdef sunos4 -+#define OSTYPE NETSNMP_SUNOS4ID -+#endif -+#ifdef solaris2 -+#define OSTYPE NETSNMP_SOLARISID -+#endif -+#if defined(osf3) || defined(osf4) || defined(osf5) -+#define OSTYPE NETSNMP_OSFID -+#endif -+#ifdef ultrix4 -+#define OSTYPE NETSNMP_ULTRIXID -+#endif -+#ifdef netbsd1 -+#define OSTYPE NETSNMP_NETBSD1ID -+#endif -+#if defined(__FreeBSD__) -+#define OSTYPE NETSNMP_FREEBSDID -+#endif -+#if defined(irix6) || defined(irix5) -+#define OSTYPE NETSNMP_IRIXID -+#endif -+#ifdef linux -+#define OSTYPE NETSNMP_LINUXID -+#endif -+#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4) -+#define OSTYPE NETSNMP_BSDIID -+#endif -+#ifdef openbsd2 -+#define OSTYPE NETSNMP_OPENBSDID -+#endif -+#ifdef WIN32 -+#define OSTYPE NETSNMP_WIN32ID -+#endif -+/* unknown */ -+#ifndef OSTYPE -+#define 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,OSTYPE -+#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.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 -+ -+/* 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 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 (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 NETSNMP_DEFDISKMINIMUMSPACE 100000 -+ -+#define NETSNMP_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 NETSNMP_MAXREADCOUNT 100 /* max times to loop reading output from execs. */ -+ -+/* The original CMU code had this hardcoded as = 1 */ -+#define NETSNMP_SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */ -+ -+/* How long to wait before restarting the agent after a snmpset to -+ EXTENSIBLEMIB.NETSNMP_VERSIONMIBNUM.VERRESTARTAGENT. This is -+ necessary to finish the snmpset reply before restarting. */ -+#define NETSNMP_RESTARTSLEEP 5 -+ -+/* Number of community strings to store */ -+#define NETSNMP_NUM_COMMUNITIES 5 -+ -+/* UNdefine to allow specifying zero-length community string */ -+/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */ -+ -+#define NETSNMP_LASTFIELD -1 /* internal define */ -+ -+/* configure options specified */ -+#define NETSNMP_CONFIGURE_OPTIONS "" -+ -+/* got socklen_t? */ -+#ifdef HAVE_WIN32_PLATFORM_SDK -+#define HAVE_SOCKLEN_T 1 -+#endif -+ -+/* got in_addr_t? */ -+/* #undef HAVE_IN_ADDR_T */ -+ -+#ifdef __MINGW32__ -+/* got ssize_t? */ -+# define HAVE_SSIZE_T -+#elif defined(_MSC_VER) -+# ifdef _M_X64 -+typedef __int64 ssize_t; -+# else -+typedef __int32 ssize_t; -+# endif -+#endif -+ -+/* If you have openssl 0.9.7 or above, you likely have AES support. */ -+#define NETSNMP_USE_OPENSSL 1 -+ -+#ifdef NETSNMP_USE_OPENSSL -+ -+/* 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_AES_H 1 -+ -+/* Define to 1 if you have the `EVP_MD_CTX_create' function. */ -+#define HAVE_EVP_MD_CTX_CREATE 1 -+ -+/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ -+#define HAVE_EVP_MD_CTX_DESTROY 1 -+ -+/* Define to 1 if you have the `AES_cfb128_encrypt' function. */ -+#define HAVE_AES_CFB128_ENCRYPT 1 -+ -+#if defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT) -+#define HAVE_AES 1 -+#endif -+ -+#else /* ! NETSNMP_USE_OPENSSL */ -+ -+/* define if you are using the MD5 code ...*/ -+#define NETSNMP_USE_INTERNAL_MD5 1 -+ -+#endif /* ! NETSNMP_USE_OPENSSL */ -+ -+ -+/* 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 gethostbyaddr */ -+#define HAVE_GETHOSTBYADDR 1 -+ -+/* printing system */ -+/* #undef HAVE_LPSTAT */ -+/* #undef LPSTAT_PATH */ -+/* #undef HAVE_PRINTCAP */ -+ -+/* 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. */ -+/* #undef NETSNMP_TRANSPORT_UNIX_DOMAIN */ -+ -+/* 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 */ -+ -+/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ -+/* This is defined if support for the UDP/IPv6 transport domain is -+ available. */ -+/* #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ -+ -+/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ -+/* 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. */ -+/* #undef NETSNMP_TRANSPORT_ALIAS_DOMAIN */ -+ -+/* 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 we're using the new MIT crypto API */ -+/* #undef NETSNMP_USE_KERBEROS_MIT */ -+ -+/* define if you want to build with reentrant/threaded code (incomplete)*/ -+/* #undef NETSNMP_REENTRANT */ -+ -+/* 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_version_require(x) -+#define config_warning(x) -+#define config_error(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) -+#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; } -+ * -+ */ -+/* -+ * Win32 needs extern for inline function declarations in headers. -+ * See MS tech note Q123768: -+ * http://support.microsoft.com/default.aspx?scid=kb;EN-US;123768 -+ */ -+#define NETSNMP_INLINE extern inline -+#define NETSNMP_STATIC_INLINE static inline -+#define NETSNMP_ENABLE_INLINE 1 -+ -+#if notused -+#include NETSNMP_SYSTEM_INCLUDE_FILE -+#include NETSNMP_MACHINE_INCLUDE_FILE -+#endif -+ -+#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) -+# define NETSNMP_USE_INLINE 1 -+#else -+# undef NETSNMP_INLINE -+# define NETSNMP_INLINE -+# undef NETSNMP_STATIC_INLINE -+# define NETSNMP_STATIC_INLINE static -+#endif -+ -+#ifdef WIN32 -+ -+#ifndef __MINGW32__ -+typedef unsigned short mode_t; -+#endif -+#ifndef HAVE_STDINT_H -+typedef unsigned char uint8_t; -+typedef char int8_t; -+typedef unsigned __int16 uint16_t; -+typedef __int16 int16_t; -+typedef unsigned __int32 uint32_t; -+typedef __int32 int32_t; -+typedef unsigned __int64 uint64_t; -+typedef __int64 int64_t; -+typedef unsigned __int64 uintmax_t; -+typedef __int64 intmax_t; -+#else /* HAVE_STDINT_H */ -+#include -+#endif /* HAVE_STDINT_H */ -+ -+ -+/* (u)intptr_t should only be needed for MSVC 6 32-bit. */ -+/* SDK has it for 64-bit and newer MSVC should also have it in stddef.h. */ -+#ifndef _INTPTR_T_DEFINED -+#ifdef _M_X64 -+typedef __int64 intptr_t; -+#else -+typedef int intptr_t; -+#endif -+#define _INTPTR_T_DEFINED -+#endif -+ -+#ifndef _UINTPTR_T_DEFINED -+#ifdef _M_X64 -+typedef unsigned __int64 uintptr_t; -+#else -+typedef unsigned int uintptr_t; -+#endif -+#define _UINTPTR_T_DEFINED -+#endif -+ -+#ifndef __cplusplus -+#ifdef _MSC_VER -+#pragma warning(push) -+#pragma warning(disable: 4804) // '-' : unsafe use of type 'bool' in operation -+#endif -+enum { -+ netsnmp_compile_time_uintptr_t_size_check -+ = sizeof(struct netsnmp_compile_time_uintptr_t_size_check_s { int:-!(sizeof(uintptr_t) == sizeof(void*)); }) -+}; -+#ifdef _MSC_VER -+#pragma warning(pop) -+#endif -+#endif -+ -+/* Define if you have the closesocket function. */ -+#define HAVE_CLOSESOCKET 1 -+ -+/* Define if you have raise() instead of alarm() */ -+#define HAVE_RAISE 1 -+ -+/* define to 1 if you do not want to set global snmp_errno */ -+#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1 -+ -+/* Defining vsnprintf is not necessary for MSVC 2008 or later */ -+#if defined(_MSC_VER) && _MSC_VER < 1500 -+#define vsnprintf _vsnprintf -+#endif -+#if defined(_MSC_VER) && _MSC_VER < 1900 -+#define snprintf _snprintf -+#endif -+ -+#if defined(_MSC_VER) && _MSC_VER < 1600 -+#define EADDRINUSE WSAEADDRINUSE -+#endif -+ -+/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL */ -+/* #undef NETSNMP_USE_DLL */ -+ -+#if defined(NETSNMP_DLL) && !defined(NETSNMP_USE_DLL) -+#error NETSNMP_USE_DLL must be defined when building libsnmp as a DLL. -+#endif -+ -+/* -+ * DLL decoration, if used at all, must be consistent. -+ * This is why NETSNMP_IMPORT is really an export decoration -+ * when it is encountered in a header file that is included -+ * during the compilation of a library source file. -+ * NETSNMP_DLL is set by the MSVC libsnmp_dll project -+ * in order to signal that the library sources are being compiled. -+ * Not defining NETSNMP_USE_DLL ignores the preceding, and renders -+ * the NETSNMP_IMPORT definitions harmless. -+ */ -+ -+#ifdef NETSNMP_USE_DLL -+ #ifdef NETSNMP_DLL -+ #if defined(_MSC_VER) -+ #define NETSNMP_IMPORT __declspec(dllexport) -+ #endif -+ #else -+ #if defined(_MSC_VER) -+ #define NETSNMP_IMPORT __declspec(dllimport) -+ #endif -+ #endif /* NETSNMP_DLL */ -+#endif /* NETSNMP_USE_DLL */ -+ -+/* MSVC OpenSSL linker settings. */ -+#if defined(_MSC_VER) -+# if defined(NETSNMP_USE_OPENSSL) -+# pragma comment(lib, "libssl.lib") -+# pragma comment(lib, "libcrypto.lib") -+# pragma comment(lib, "gdi32.lib") -+# pragma comment(lib, "user32.lib") -+# pragma comment(lib, "advapi32.lib") -+# endif -+#endif -+ -+#endif /* WIN32 */ -+ -+#ifndef NETSNMP_IMPORT -+# define NETSNMP_IMPORT extern -+#endif -+ -+#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE) -+#define NETSNMP_CAN_USE_NLIST -+#endif -+ -+#if HAVE_DMALLOC_H -+#define DMALLOC_FUNC_CHECK -+#endif -+ -+/* #undef NETSNMP_ENABLE_LOCAL_SMUX */ -+ -+/* define if agentx transport is to use domain sockets only */ -+/* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */ -+ -+#ifndef LOG_DAEMON -+#define LOG_DAEMON (3<<3) /* system daemons */ -+#endif -+ -+#if UCD_COMPATIBLE -+/* old and in the way */ -+#define EXTENSIBLEMIB NETSNMP_UCDAVIS_MIB -+#endif -+ -+#ifdef _MSC_VER -+/* Windows Vista and higher have inet_ntop but older Windows does not. -+ * We'll use the Net-SNMP version instead. */ -+#undef HAVE_INET_NTOP -+#undef HAVE_INET_PTON -+ -+/* IPv6 transports */ -+#ifdef NETSNMP_ENABLE_IPV6 -+ #define NETSNMP_TRANSPORT_TCPIPV6_DOMAIN 1 -+ #define NETSNMP_TRANSPORT_UDPIPV6_DOMAIN 1 -+ #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 -+#else -+ #undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN -+ #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN -+#endif -+#endif -+ -+/* -+ * Although if_nametoindex() is available on Windows Vista, Windows Server -+ * 2008 and later in iphlpapi.dll, do not link with if_nametoindex() such -+ * that the Net-SNMP executable can be started on earlier Windows versions. -+ */ -+#undef HAVE_IF_NAMETOINDEX -+ -+#ifndef NI_MAXHOST -+#define NI_MAXHOST 1025 -+#endif -+ -+/* Define to 1 if you have the `strtoull' function. */ -+#if _MSC_VER >= 1800 -+#define HAVE_STRTOULL -+#else -+/* #undef HAVE_STRTOULL */ -+#endif -+ -+/* -+ * Module configuration and control starts here. -+ * -+ * Some of the defines herein are used to control -+ * groups of modules. The ones that have "CFG" -+ * are used especially to control the include files -+ * seen in {agent,mib}_module_includes.h, and the init entries -+ * which are invoked in {agent,mib}_module_inits.h. -+ * -+ * To disable a group, uncomment the associated define. -+ */ -+ -+/* CFG Define if compiling with the ucd_snmp module files. */ -+#define USING_UCD_SNMP_MODULE 1 -+ -+/* CFG Define if compiling with the agentx module files. */ -+#define USING_AGENTX_MODULE 1 -+ -+/* CFG Define if compiling with the host module files. */ -+/* #undef USING_HOST_MODULE */ -+ -+/* CFG Define if compiling with the Rmon module files. */ -+/* #undef USING_RMON_MODULE */ -+ -+/* CFG Define if compiling with the disman/event-mib module files. */ -+#define USING_DISMAN_EVENT_MIB_MODULE 1 -+ -+/* CFG Define if compiling with the smux module files. */ -+/* #undef USING_SMUX_MODULE */ -+ -+/* Define if compiling with the winExtDLL module. */ -+/* #undef USING_WINEXTDLL_MODULE */ -+ -+/* -+ * Module configuration and control ends here. -+ */ -+#define UDP_ADDRESSES_IN_HOST_ORDER 1 -+ -+/* Timeout in milliseconds for Win32 function WaitForSingleObject. -+ Used by agent pass. */ -+#define NETSNMP_TIMEOUT_WAITFORSINGLEOBJECT 5000 -+ -+#ifdef HAVE_WIN32_PLATFORM_SDK -+#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -+#endif -+ -+/* Size prefix to use to printf a uint32_t */ -+#define NETSNMP_PRI32 "" -+ -+#ifdef _MSC_VER -+#ifdef _WIN64 -+#define NETSNMP_PRIz "I64" -+#else -+#define NETSNMP_PRIz "" -+#endif -+#endif -+ -+#endif /* NET_SNMP_CONFIG_H */ -+ -diff --git a/win32/net-snmp/net-snmp-config.h.in b/win32/net-snmp/net-snmp-config.h.in -index 9693730..1030388 100644 ---- a/win32/net-snmp/net-snmp-config.h.in -+++ b/win32/net-snmp/net-snmp-config.h.in -@@ -1011,7 +1011,9 @@ - - /* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ -+#ifndef PHP_WIN32 - #define inline __inline -+#endif - - /* Define to `long' if does not define. */ - /* #undef off_t */ -@@ -1352,7 +1354,13 @@ - - #ifdef __MINGW32__ - /* got ssize_t? */ --#define HAVE_SSIZE_T -+# define HAVE_SSIZE_T -+#elif defined(_MSC_VER) -+# ifdef _M_X64 -+typedef __int64 ssize_t; -+# else -+typedef __int32 ssize_t; -+# endif - #endif - - /* If you have openssl 0.9.7 or above, you likely have AES support. */ -@@ -1644,7 +1652,7 @@ enum { - #if defined(_MSC_VER) && _MSC_VER < 1500 - #define vsnprintf _vsnprintf - #endif --#ifdef _MSC_VER -+#if defined(_MSC_VER) && _MSC_VER < 1900 - #define snprintf _snprintf - #endif - -@@ -1685,21 +1693,11 @@ enum { - /* MSVC OpenSSL linker settings. */ - #if defined(_MSC_VER) - # if defined(NETSNMP_USE_OPENSSL) --# ifdef _DLL --# ifdef _DEBUG --# pragma comment(lib, "libeay32MDd.lib") --# else --# pragma comment(lib, "libeay32MD.lib") --# endif --# else --# ifdef _DEBUG --# pragma comment(lib, "libeay32MTd.lib") --# else --# pragma comment(lib, "libeay32MT.lib") --# endif --# endif -+# pragma comment(lib, "libssl.lib") -+# pragma comment(lib, "libcrypto.lib") - # pragma comment(lib, "gdi32.lib") - # pragma comment(lib, "user32.lib") -+# pragma comment(lib, "advapi32.lib") - # endif - #endif - diff --git a/netsnmp-agent.pc.in b/netsnmp-agent.pc.in new file mode 100644 index 0000000..3a1c77b --- /dev/null +++ b/netsnmp-agent.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: netsnmp-agent (@PACKAGE_NAME@) +Description: SNMP (Simple Network Management Protocol) sub-agent SDK. +URL: http://www.net-snmp.org +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lnetsnmpmibs -lnetsnmpagent -lnetsnmp +Libs.private: @LDFLAGS@ @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@ diff --git a/netsnmp.pc.in b/netsnmp.pc.in new file mode 100644 index 0000000..0a1f578 --- /dev/null +++ b/netsnmp.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: netsnmp (@PACKAGE_NAME@) +Description: SNMP (Simple Network Management Protocol) daemon and applications. +URL: http://www.net-snmp.org +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lnetsnmp +Libs.private: @LDFLAGS@ @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@ diff --git a/perl/ASN/ASN.pm b/perl/ASN/ASN.pm index 008e97b..2b22e31 100644 --- a/perl/ASN/ASN.pm +++ b/perl/ASN/ASN.pm @@ -66,7 +66,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); ASN_UNSIGNED ASN_UNSIGNED64 ); -$VERSION = '5.0703'; +$VERSION = '5.0904'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/perl/ASN/ASN.xs b/perl/ASN/ASN.xs index e3f6181..9d9026b 100644 --- a/perl/ASN/ASN.xs +++ b/perl/ASN/ASN.xs @@ -1,7 +1,4 @@ /* -*- C -*- */ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif #include "EXTERN.h" #include "perl.h" diff --git a/perl/ASN/Makefile.PL b/perl/ASN/Makefile.PL index 4576781..1ccec57 100644 --- a/perl/ASN/Makefile.PL +++ b/perl/ASN/Makefile.PL @@ -1,19 +1,23 @@ +use strict; +use warnings; +use Config; +use Cwd 'abs_path'; use ExtUtils::MakeMaker; +use File::Basename; require 5; use Config; -use Getopt::Long; +use MakefileSubs; + my $lib_version; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -%MakeParams = InitMakeParams(); - -WriteMakefile(%MakeParams); +WriteMakefile(AsnInitMakeParams()); -Check_Version(); +Check_Version($lib_version); -sub InitMakeParams { +sub AsnInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::ASN', @@ -22,18 +26,17 @@ sub InitMakeParams { 'PREREQ_PM' => {}, ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -43,15 +46,15 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib"; + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -68,166 +71,21 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts(); - $Params{'LDDLFLAGS'} = "$Config{lddlflags} " . `$opts->{'nsconfig'} --ldflags`; - $Params{'LIBS'} = `$opts->{'nsconfig'} --libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../snmplib/.libs -L../../snmplib/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; - } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; + $Params{'LIBS'} = + "-L" . abs_path("../../snmplib/.libs") . + " -L" . abs_path("../../snmplib") . + " " . $Params{'LIBS'}; } } return (%Params); } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/ASN/test.pl b/perl/ASN/test.pl index 0429b6e..7007235 100644 --- a/perl/ASN/test.pl +++ b/perl/ASN/test.pl @@ -1,28 +1,25 @@ +#!./perl +# # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' -######################### We start with some black magic to print on failure. +use strict; +use warnings; +use Test; -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) +BEGIN { + $| = 1; + plan tests => 9; +} -BEGIN { $| = 1; print "1..9\n"; } -END {print "not ok 1\n" unless $loaded;} use NetSNMP::ASN (':all'); -$loaded = 1; -print "ok 1\n"; +ok(1); -######################### End of black magic. - -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - -print ((ASN_INTEGER == 2) ? "ok 2\n" : "not ok 2\n"); -print ((ASN_OCTET_STR == 4) ? "ok 3\n" : "not ok 3\bn"); -print ((ASN_COUNTER == 0x41) ? "ok 4\n" : "not ok 4\n"); -print ((ASN_UNSIGNED == 0x42) ? "ok 5\n" : "not ok 5\n"); -print ((ASN_COUNTER64 == 0x46) ? "ok 6\n" : "not ok 6\n"); -print ((ASN_IPADDRESS == 0x40) ? "ok 7\n" : "not ok 7\n"); -print ((ASN_NULL == 5) ? "ok 8\n" : "not ok 8\n"); -print ((ASN_TIMETICKS == 0x43) ? "ok 9\n" : "not ok 9\n"); +ok(ASN_INTEGER, 2); +ok(ASN_OCTET_STR, 4); +ok(ASN_COUNTER, 0x41); +ok(ASN_UNSIGNED, 0x42); +ok(ASN_COUNTER64, 0x46); +ok(ASN_IPADDRESS, 0x40); +ok(ASN_NULL, 5); +ok(ASN_TIMETICKS, 0x43); diff --git a/perl/AnyData_SNMP/Storage.pm b/perl/AnyData_SNMP/Storage.pm index 67c791f..04ef53a 100644 --- a/perl/AnyData_SNMP/Storage.pm +++ b/perl/AnyData_SNMP/Storage.pm @@ -6,7 +6,7 @@ package AnyData::Storage::SNMP; ## scalar sets? ## multi-hosts -$AnyData::Storage::VERSION = '5.0703'; +$AnyData::Storage::VERSION = '5.0904'; use strict; use warnings; diff --git a/perl/Makefile.PL b/perl/Makefile.PL index 31fdc40..63e6333 100644 --- a/perl/Makefile.PL +++ b/perl/Makefile.PL @@ -1,160 +1,14 @@ +use strict; +use warnings; use ExtUtils::MakeMaker; use Config; -use Getopt::Long; require 5; +use MakefileSubs; -%MakeParams = InitMakeParams(); +# Prevent that MakeMaker complains about unknown parameter names. +NetSNMPGetOpts(); -WriteMakefile(%MakeParams); - -sub InitMakeParams { - $nsconfig="net-snmp-config"; # in path by default - my %Params = ( - 'NAME' => 'Bundle::NetSNMP', - 'DIR' => [qw(default_store ASN OID agent SNMP TrapReceiver)], - ); - - # bogus, but these options need to be passed to the lower levels - $opts = NetSNMPGetOpts("./"); - - return(%Params); -} - -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} +WriteMakefile( + 'NAME' => 'Bundle::NetSNMP', + 'DIR' => [qw(default_store ASN OID agent SNMP TrapReceiver)], + ); diff --git a/perl/Makefile.makefiles b/perl/Makefile.makefiles deleted file mode 100644 index 073815b..0000000 --- a/perl/Makefile.makefiles +++ /dev/null @@ -1,12 +0,0 @@ -GENERATE_LIST=./Makefile.PL \ - ./default_store/Makefile.PL \ - ./ASN/Makefile.PL \ - ./OID/Makefile.PL \ - ./agent/Makefile.PL \ - ./agent/default_store/Makefile.PL \ - ./agent/Support/Makefile.PL \ - ./SNMP/Makefile.PL \ - ./TrapReceiver/Makefile.PL - -all: - perl make-perl-makefiles $(GENERATE_LIST) diff --git a/perl/Makefile.subs.pl b/perl/Makefile.subs.pl deleted file mode 100644 index e3c25ef..0000000 --- a/perl/Makefile.subs.pl +++ /dev/null @@ -1,136 +0,0 @@ -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/MakefileSubs.pm b/perl/MakefileSubs.pm new file mode 100644 index 0000000..0040fcf --- /dev/null +++ b/perl/MakefileSubs.pm @@ -0,0 +1,200 @@ +package MakefileSubs; + +use strict; +use warnings; +use Config; +use Cwd 'abs_path'; +use File::Basename; +use File::Spec; +use Getopt::Long; +use Exporter; +use vars qw(@ISA @EXPORT_OK); + +our $VERSION = 1.00; +our @ISA = qw(Exporter); +our @EXPORT = qw(NetSNMPGetOpts AddCommonParams find_files Check_Version + floatize_version); +our $basedir; + +BEGIN { + $basedir = abs_path($0); + while (1) { + my $basename = basename($basedir); + last if (length($basename) <= 2); + $basedir = dirname($basedir); + last if ($basename eq "perl"); + } + if ($Config{'osname'} eq 'MSWin32' && $basedir =~ / /) { + die "\nA space has been detected in the base directory. This is not " . + "supported\nPlease rename the folder and try again.\n\n"; + } +} + +sub NetSNMPGetOpts { + my %ret; + my $rootpath = $basedir; + + if ($ENV{'NET-SNMP-CONFIG'} && $ENV{'NET-SNMP-IN-SOURCE'}) { + # have env vars, pull from there + $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; + $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; + $ret{'define'} = $ENV{'NET-SNMP-DEFINE'}; + $ret{'inc'} = $ENV{'NET-SNMP-INC'}; + $ret{'cflags'} = $ENV{'NET-SNMP-CFLAGS'}; + # $ret{'prefix'} is not used on Windows. + } else { + # don't have env vars, pull from command line and put there + GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, + "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, + "NET-SNMP-DEFINE=s" => \$ret{'define'}, + "NET-SNMP-INC=s" => \$ret{'inc'}, + "NET-SNMP-CFLAGS=s" => \$ret{'cflags'}, + "NET-SNMP-PATH=s" => \$ret{'prefix'}); + + my $use_default_nsconfig; + + if ($ret{'insource'}) { + if (lc($ret{'insource'}) eq "true" && !defined($ret{'nsconfig'})) { + $use_default_nsconfig = 1; + } + } + + if ($use_default_nsconfig) { + $ret{'nsconfig'}="sh " . File::Spec->catfile(${rootpath}, "..", + "net-snmp-config"); + } elsif (!defined($ret{'nsconfig'})) { + $ret{'nsconfig'}="net-snmp-config"; + } + + $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; + $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; + $ENV{'NET-SNMP-DEFINE'} = $ret{'define'}; + $ENV{'NET-SNMP-INC'} = $ret{'inc'}; + $ENV{'NET-SNMP-CFLAGS'} = $ret{'cflags'}; + $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; + } + + $ret{'rootpath'} = $rootpath; + $ret{'debug'} = 'false'; + + \%ret; +} + +sub append { + if ($_[0] && $_[1]) { + $_[0] = $_[0] . " " . $_[1]; + } elsif ($_[1]) { + $_[0] = $_[1]; + } +} + +sub AddCommonParams { + my $Params = shift; + my $opts = NetSNMPGetOpts(); + + append($Params->{'DEFINE'}, $opts->{'define'}); + append($Params->{'INC'}, $opts->{'inc'}); + append($Params->{'CCFLAGS'}, $opts->{'cflags'}); + + if ($Config{'osname'} eq 'MSWin32') { + # Microsoft Visual Studio. + append($Params->{'DEFINE'}, "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"); + append($Params->{'INC'}, + "-I" . File::Spec->catdir($basedir, "include") . " " . + "-I" . File::Spec->catdir($basedir, "win32") . " "); + } else { + # Unix or MinGW. + append($Params->{'LDDLFLAGS'}, $Config{'lddlflags'}); + my $ldflags = `$opts->{'nsconfig'} --ldflags` or + die "net-snmp-config failed\n"; + chomp($ldflags); + append($Params->{'LDDLFLAGS'}, $ldflags); + append($Params->{'CCFLAGS'}, + "-I" . File::Spec->catdir($basedir, "include")); + my $cflags = `$opts->{'nsconfig'} --cflags` or + die "net-snmp-config failed\n"; + chomp($cflags); + # Remove -Wimplicit-fallthrough since it is not supported by older + # versions of gcc. + $cflags =~ s/-Wimplicit-fallthrough=[0-9]//g; + append($Params->{'CCFLAGS'}, $cflags); + append($Params->{'CCFLAGS'}, $Config{'ccflags'}); + # Suppress known Perl header shortcomings. + $Params->{'CCFLAGS'} =~ s/ -W(cast-qual|write-strings)//g; + append($Params->{'CCFLAGS'}, '-Wformat'); + } +} + +sub find_files { + my($f,$d) = @_; + my ($dir,$found,$file); + for $dir (@$d){ + $found = 0; + for $file (@$f) { + $found++ if -f "$dir/$file"; + } + if ($found == @$f) { + return $dir; + } + } +} + + +sub Check_Version { + my $lib_version = shift; + + if ($Config{'osname'} ne 'MSWin32') { + my $foundversion = 0; + return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); + open(I,") { + if (/^VERSION = (.*)/) { + my $perlver = $1; + my $srcver = $lib_version; + chomp($srcver); + my $srcfloat = floatize_version($srcver); + $perlver =~ s/pre/0./; + # we allow for perl/CPAN-only revisions beyond the default + # version formatting of net-snmp itself. + $perlver =~ s/(\.\d{5}).*/$1/; + $perlver =~ s/0*$//; + if ($srcfloat ne $perlver) { + if (!$foundversion) { + print STDERR "ERROR: +Net-SNMP installed version: $srcver => $srcfloat +Perl Module Version: $perlver + +These versions must match for perfect support of the module. It is possible +that different versions may work together, but it is strongly recommended +that you make these two versions identical. You can get the Net-SNMP +source code and the associated perl modules directly from + + http://www.net-snmp.org/ + +If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION +environmental variable to 1 and re-run the Makefile.PL script.\n"; + exit(1); + } + } + $foundversion = 1; + last; + } + } + close(I); + die "ERROR: Couldn't find version number of this module\n" + if (!$foundversion); + } +} + +sub floatize_version { + my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); + if (!$patch) { + $patch = 0; + } + if (!$opps) { + $opps = 0; + } + return $major + $minor/100 + $patch/10000 + $opps/100000; +} + +1; diff --git a/perl/OID/Makefile.PL b/perl/OID/Makefile.PL index 6bb1616..e217d51 100644 --- a/perl/OID/Makefile.PL +++ b/perl/OID/Makefile.PL @@ -1,20 +1,20 @@ # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. +use strict; +use warnings; use ExtUtils::MakeMaker; require 5; use Config; -use Getopt::Long; -my $lib_version; -my %MakeParams = (); +use MakefileSubs; -%MakeParams = InitMakeParams(); +my $lib_version; -WriteMakefile(%MakeParams); +WriteMakefile(OidInitMakeParams()); -Check_Version(); +Check_Version($lib_version); -sub InitMakeParams { +sub OidInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::OID', @@ -23,17 +23,17 @@ sub InitMakeParams { 'PREREQ_PM' => {}, ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -43,15 +43,15 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib"; + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -68,167 +68,22 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts(); - $Params{'LDDLFLAGS'} = "$Config{lddlflags} " . `$opts->{'nsconfig'} --ldflags`; - $Params{'LIBS'} = `$opts->{'nsconfig'} --libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../snmplib/.libs -L../../snmplib/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; + $Params{'LIBS'} = + "-L" . abs_path("../../snmplib/.libs") . + " -L" . abs_path("../../snmplib") . + " " . $Params{'LIBS'}; # } else { # $Params{'PREREQ_PM'} = {'SNMP' => '5.0'}; } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; - } } return(%Params); } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/OID/OID.pm b/perl/OID/OID.pm index b75bf1d..a990694 100644 --- a/perl/OID/OID.pm +++ b/perl/OID/OID.pm @@ -92,7 +92,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); snmp_oid_compare compare ); -$VERSION = '5.0703'; +$VERSION = '5.0904'; sub new { my $type = shift; diff --git a/perl/OID/OID.xs b/perl/OID/OID.xs index 10485f9..b2771ee 100644 --- a/perl/OID/OID.xs +++ b/perl/OID/OID.xs @@ -1,7 +1,4 @@ /* -*- C -*- */ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif #include "EXTERN.h" #include "perl.h" @@ -35,7 +32,7 @@ nso_newarrayptr(oid *name, size_t name_len) return RETVAL; } -static int __sprint_num_objid _((char *, oid *, int)); +static int __snprint_num_objid _((char *, size_t, const oid *, int)); /* stolen from SNMP.xs. Ug, this needs merging to snmplib */ /* XXX: this is only here because snmplib forces quotes around the @@ -45,13 +42,8 @@ static int __sprint_num_objid _((char *, oid *, int)); #define USE_ENUMS 1 #define USE_SPRINT_VALUE 2 static int -__snprint_value (buf, buf_len, var, tp, type, flag) -char * buf; -size_t buf_len; -netsnmp_variable_list * var; -struct tree * tp; -int type; -int flag; +__snprint_value(char *buf, size_t buf_len, netsnmp_variable_list *var, + struct tree *tp, int type, int flag) { int len = 0; u_char* ip; @@ -104,8 +96,8 @@ int flag; break; case ASN_OBJECT_ID: - __sprint_num_objid(buf, (oid *)(var->val.objid), - var->val_len/sizeof(oid)); + __snprint_num_objid(buf, buf_len, var->val.objid, + var->val_len / sizeof(oid)); len = strlen(buf); break; @@ -138,15 +130,18 @@ int flag; } static int -__sprint_num_objid (buf, objid, len) +__snprint_num_objid (buf, buf_len, objid, len) char *buf; -oid *objid; +size_t buf_len; +const oid *objid; int len; { + const char *const end = buf + buf_len; int i; + buf[0] = '\0'; for (i=0; i < len; i++) { - sprintf(buf,".%" NETSNMP_PRIo "u",*objid++); + snprintf(buf, end - buf, ".%" NETSNMP_PRIo "u", *objid++); buf += strlen(buf); } return SNMPERR_SUCCESS; @@ -236,7 +231,7 @@ nsop_to_array(oid1) int i; PPCODE: - EXTEND(SP, oid1->len); + EXTEND(SP, (int)oid1->len); for(i=0; i < (int)oid1->len; i++) { PUSHs(sv_2mortal(newSVnv(oid1->name[i]))); } @@ -249,7 +244,7 @@ nsop_get_indexes(oid1) struct tree *tp, *tpe, *tpnode, *indexnode; struct index_list *index; netsnmp_variable_list vbdata; - u_char *buf = NULL; + char *buf = NULL; size_t buf_len = 256, out_len = 0; oid name[MAX_OID_LEN]; size_t name_len = MAX_OID_LEN; @@ -370,7 +365,7 @@ nsop_get_indexes(oid1) 1, name, name_len, &vbdata); */ snmp_free_var_internals(&vbdata); - av_push(myret, newSVpv((char *)buf, out_len)); + av_push(myret, newSVpv(buf, out_len)); } netsnmp_free(buf); RETVAL = newRV((SV *)myret); diff --git a/perl/OID/netsnmp-feature-definitions.h b/perl/OID/netsnmp-feature-definitions.h index fb4ccdb..767328b 100644 --- a/perl/OID/netsnmp-feature-definitions.h +++ b/perl/OID/netsnmp-feature-definitions.h @@ -1,6 +1,6 @@ #include #include -netsnmp_feature_require(snprint_objid) -netsnmp_feature_require(snprint_value) +netsnmp_feature_require(snprint_objid); +netsnmp_feature_require(snprint_value); diff --git a/perl/OID/test.pl b/perl/OID/test.pl index aee410c..cd70813 100644 --- a/perl/OID/test.pl +++ b/perl/OID/test.pl @@ -1,12 +1,18 @@ +#!./perl +# # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' -######################### +use strict; +use warnings; +use Cwd qw(abs_path); +use Test; -# change 'tests => 1' to 'tests => last_test_to_print'; +BEGIN { + plan tests => 38; +} -use Test; -BEGIN { eval "use Cwd qw(abs_path)"; plan tests => 38 ; $ENV{'SNMPCONFPATH'} = 'nopath' ; $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); }; +require "../SNMP/t/readsnmptest.pl"; use NetSNMP::OID; ok(1); # If we made it this far, we're ok. @@ -70,7 +76,7 @@ $oid->append(".1.2.3"); ok("$oid" eq "directory.2.3"); -$oidmore = $oid + ".8.9.10"; +my $oidmore = $oid + ".8.9.10"; ok($oidmore == new NetSNMP::OID("directory.2.3.8.9.10")); ok("$oid" eq "directory.2.3"); ok(ref($oidmore) eq "NetSNMP::OID"); @@ -79,7 +85,7 @@ $oidmore += ".11"; ok($oidmore == new NetSNMP::OID("directory.2.3.8.9.10.11")); -$oidstr = $oidmore + "\"wes\""; +my $oidstr = $oidmore + "\"wes\""; ok($oidstr == new NetSNMP::OID("directory.2.3.8.9.10.11.3.119.101.115")); $oidstr = $oidmore + "\'wes\'"; @@ -123,7 +129,7 @@ $newtest = new NetSNMP::OID ("snmpNotifyRowStatus.105.110.116.101.114.110.97.108.48"); if ($newtest) { - $arrayback = $newtest->get_indexes(); + my $arrayback = $newtest->get_indexes(); ok($#$arrayback == 0 && $arrayback->[0] eq 'internal0' diff --git a/perl/SNMP/Makefile.PL b/perl/SNMP/Makefile.PL index e617cb7..b4cc961 100644 --- a/perl/SNMP/Makefile.PL +++ b/perl/SNMP/Makefile.PL @@ -1,23 +1,27 @@ +use strict; +use warnings; +use Carp; +use Config; +use Cwd 'abs_path'; use ExtUtils::MakeMaker; +use File::Spec; +use MakefileSubs; require 5; -use Config; -use Getopt::Long; + my $lib_version; -my %MakeParams = (); my $opts; +my $prefix; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -%MakeParams = InitMakeParams(); - -WriteMakefile(%MakeParams); +WriteMakefile(SnmpInitMakeParams()); -Check_Version(); +Check_Version($lib_version); GetTestInfo(); -sub InitMakeParams { +sub SnmpInitMakeParams { my %Params = ( NAME => 'SNMP', dist => { SUFFIX => "gz", COMPRESS => "gzip -9f"}, @@ -27,17 +31,17 @@ sub InitMakeParams { realclean => { FILES => 'host' }, ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -47,15 +51,15 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib"; + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -72,43 +76,29 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts(); - $Params{'LDDLFLAGS'} = "$Config{lddlflags} " . `$opts->{'nsconfig'} --ldflags`; if (!$ENV{'NETSNMP_LIBS'}) { - $Params{'LIBS'} = `$opts->{'nsconfig'} --libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); } else { $Params{'LIBS'} = $ENV{'NETSNMP_LIBS'}; } - if (!$ENV{'NETSNMP_CCFLAGS'}) { - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - } else { - $Params{'CCFLAGS'} = $ENV{'NETSNMP_CCFLAGS'}; - } - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../snmplib/.libs -L../../snmplib/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; + $Params{'LIBS'} = + "-L" . abs_path("../../snmplib/.libs") . + " -L" . abs_path("../../snmplib") . + " " . $Params{'LIBS'}; # } else { # $Params{'PREREQ_PM'} = { 'NetSNMP::default_store' => 0.01 }; } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if (!$ENV{'NETSNMP_PREFIX'}) { - $prefix = `$opts->{'nsconfig'} --prefix`; - chomp($prefix); - $sep = '/'; - } else { - $prefix = $ENV{'NETSNMP_PREFIX'}; - } - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; - } + $prefix = ($opts->{'prefix'} or `$opts->{'nsconfig'} --prefix` or + die "net-snmp-config failed\n"); + chomp($prefix); + $sep = '/'; } return(%Params); @@ -116,97 +106,73 @@ sub InitMakeParams { } sub GetTestInfo { - my $sep = ($^O =~ /win32/i ? '\\' : '/'); - my $info_file = "t${sep}snmptest.cmd"; - my $snmpd_path1 = "${prefix}${sep}sbin"; - my $snmpd_path2 = "${sep}usr${sep}sbin"; - my $snmpd_path3 = "${sep}usr${sep}bin"; - my $win32_snmpd_path = $ENV{'NET-SNMP-PATH'} . $sep . "bin"; + my $info_file = File::Spec->catfile("t", "snmptest.cmd"); open(H, ">$info_file") || die "Error: could not open file '$info_file'($!)"; my ($mibdir, $snmpd, $snmptrapd); - # Windows - if ($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '') { - if (lc ($opts->{'insource'}) eq "true") { - $mibdir = "../../mibs"; - if (lc($opts->{'debug'}) eq "true") { - $snmpd = "../../win32/bin/debug"; - $snmptrapd = "../../win32/bin/debug"; - } - else { - $snmpd = "../../win32/bin/release"; - $snmptrapd = "../../win32/bin/release"; - } - } else { - $mibdir = $ENV{'NET-SNMP-PATH'} . "${sep}share${sep}snmp${sep}mibs"; + # Windows + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { + if (lc ($opts->{'insource'}) eq "true") { + $mibdir = abs_path("../../mibs"); + my $cfg = lc($opts->{'debug'}) eq "true" ? "debug" : "release"; + $snmpd = abs_path("../../win32/bin/$cfg/snmpd.exe"); + $snmptrapd = abs_path("../../win32/bin/$cfg/snmptrapd.exe"); + } else { + my $win32_snmpd_path = File::Spec->catdir($ENV{'NET-SNMP-PATH'}, + "bin"); + $mibdir = File::Spec->catdir($ENV{'NET-SNMP-PATH'}, "share", + "snmp", "mibs"); $snmpd = find_files(["snmpd.exe"], [$win32_snmpd_path]); $snmptrapd = find_files(["snmptrapd.exe"], [$win32_snmpd_path]); - } - } - - # Unix - else { - if (lc($opts->{'insource'}) eq "true") { - $mibdir = "../../mibs"; - $snmpd = "../../agent/snmpd"; - $snmptrapd = "../../apps/snmptrapd"; - } else { - $mibdir = "${prefix}${sep}share${sep}snmp${sep}mibs"; + } + } + # Unix + else { + if (lc($opts->{'insource'}) eq "true") { + $mibdir = abs_path("../../mibs"); + $snmpd = abs_path("../../agent/snmpd"); + $snmptrapd = abs_path("../../apps/snmptrapd"); + } else { + croak "\$prefix has not been set" if (!defined($prefix)); + $mibdir = "${prefix}/share/snmp/mibs"; + my $snmpd_path1 = abs_path("${prefix}/sbin"); + my $snmpd_path2 = "/usr/sbin"; $snmpd = find_files(["snmpd"], [$snmpd_path1, $snmpd_path2]); $snmptrapd = find_files(["snmptrapd"], [$snmpd_path1, $snmpd_path2]); - } - } - - $mibdir = find_files(["NET-SNMP-MIB.txt"],[$mibdir]); + } + } - $mibdir ||= prompt("Unable to locate the MIBs, Please enter the path: ", - $mibdir); - $snmpd ||= prompt("Unable to locate \"snmpd\". Please enter the path: ", - $snmpd_path1); - $snmptrapd ||= - prompt("Unable to locate \"snmptrapd\". Please enter the path: ", - $snmpd_path1); + $mibdir = find_files(["NET-SNMP-MIB.txt"], [$mibdir]); - if ($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '') { - $snmpd = $snmpd . $sep . "snmpd.exe"; - $snmptrapd = $snmptrapd . $sep . "snmptrapd.exe"; - } - else { - if ($ENV{'OSTYPE'} eq 'msys') { - $snmpd =~ s/snmpd$/snmpd.exe/; - $snmptrapd =~ s/snmptrapd$/snmptrapd.exe/; - } - else - { - $snmpd =~ s/($sep)?(snmpd)?$/${sep}snmpd/; - $snmptrapd =~ s/($sep)?(snmptrapd)?$/${sep}snmptrapd/; - } - } + $mibdir ||= prompt("Unable to locate the MIBs, Please enter the path: ", + $mibdir); + $snmpd ||= prompt("Unable to locate \"snmpd\". Please enter the path: "); + $snmptrapd ||= + prompt("Unable to locate \"snmptrapd\". Please enter the path: "); - print H "SNMPD => $snmpd\n"; - print H "SNMPTRAPD => $snmptrapd\n"; - print H "MIBDIR => $mibdir\n"; + print H "SNMPD => $snmpd\n"; + print H "SNMPTRAPD => $snmptrapd\n"; + print H "MIBDIR => $mibdir\n"; - if (!(lc($opts->{'insource'}) eq "true")) { - if (-e $snmpd and -r $snmpd) { - if (not -x $snmpd) { - warn("Error: $snmpd not executable. 'make test' will not work.\n"); - } - } else { - warn("Error: $snmpd does not exist or is unreadable. 'make test' will not work.\n"); + if (!(lc($opts->{'insource'}) eq "true")) { + if (-e $snmpd and -r $snmpd) { + if (not -x $snmpd) { + warn("Error: $snmpd not executable. 'make test' will not work.\n"); } + } else { + warn("Error: $snmpd does not exist or is unreadable. 'make test' will not work.\n"); + } - if (-e $snmptrapd and -r $snmptrapd) { - if (not -x $snmptrapd) { - warn("Error: $snmptrapd not executable. 'make test' will not work.\n"); - } - } else { - warn("Error: $snmptrapd does not exist or is unreadable. 'make test' will not work.\n"); + if (-e $snmptrapd and -r $snmptrapd) { + if (not -x $snmptrapd) { + warn("Error: $snmptrapd not executable. 'make test' will not work.\n"); } + } else { + warn("Error: $snmptrapd does not exist or is unreadable. 'make test' will not work.\n"); } -# end of else + } close H; } @@ -223,141 +189,3 @@ sub HasSSL { close C; return $has_ssl; } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/SNMP/README b/perl/SNMP/README index 5d85aca..430ac94 100644 --- a/perl/SNMP/README +++ b/perl/SNMP/README @@ -142,16 +142,7 @@ Installation: C++ 6.0 and Microsoft Microsoft Development Environment 2003/2003 (MSVC 7.0/7.1). See the following sections for Cygwin and MinGW. - ActiveState Perl is required. - - Note: With ActiveState Perl (currently at 5.8.2 build 808) and possibly other - versions of Perl on Windows, if a Perl script modifies a - system environment variable and then calls a C function, the - C function will not see the new environment variable. This - problem can be seen with the failure of test #3 in the SNMP - conf test (perl/SNMP/t/conf.t). The change to the - SNMPCONFPATH env variable is not seen by the calls to the C - SNMP module. + Perl binaries build with MSVC++ are required. Note: The source code should *not* be in a folder that contains a space. For example, compiling in your 'My Documents' or your Desktop (usually @@ -294,94 +285,9 @@ Installation: example, compiling in your 'My Documents' or your Desktop (usually c:\Documents and Settings\xxxx\Desktop) is not supported. - These directions are for MinGW 3.1.0 with MSYS 1.0.9 and ActiveState Perl. - Compiling the Perl modules using a MinGW built Perl environment has not - been tested. - - Note: With ActiveState Perl (currently at 5.8.2 build 808) and - possibly other versions of Perl on Windows, if a Perl script - modifies a system environment variable and then calls a C - function, the C function will not see the new environment - variable. This problem can be seen with the failure of test - #3 in the SNMP conf test (perl/SNMP/t/conf.t). The change to - the SNMPCONFPATH env variable is not seen by the calls to the - C SNMP module. - - The main Net-SNMP package must be compiled with the regex library. - See Net-SNMP README.win32 for compiling with MinGW. - - The following additional software is required: - - dmake: - http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip - - ExtUtils-FakeConfig: - http://search.cpan.org/~mbarbon/ExtUtils-FakeConfig-0.05/ - - Note: A PPM package is available from ActiveState for - ExtUtils-FakeConfig, but it does not include the - make_implib.pl script. Downloading from CPAN is - recommended. - - Installing DMAKE and ExtUtils-FakeConfig: - ----------------------------------------- - - 1. Install DMAKE as described in the README.NOW contained in the DMAKE .ZIP - file ensuring the DMAKE program can be found in the system path. - - 2. Extract ExtUtils-FakeConfig-0.05.zip to a temporary folder. - - 3. Add the MinGW bin folder to your system path. - - 4. Open a Windows command prompt (cmd) and cd into - ExtUtils-FakeConfig-0.05 and typet he following to build and - install the ExtUtils-FakeConfig module: - - perl Makefile.PL - dmake - dmake install - - 5. A Perl import library needs to be created using the ExtUtils-FakeConfig - make_implib.pl script. - - For ActiveState Perl 5.6.x installed to c:\Perl, type the - following on one line: - perl script/make_implib.pl --output-dir=C:/Perl/lib/CORE - --output-lib=libperl56.a --target=mingw c:/Perl/bin/Perl56.dll - - For ActiveState Perl 5.8.x installed to c:\Perl, type the - following on one line: - - perl script/make_implib.pl --output-dir=C:/Perl/lib/CORE - --output-lib=libperl58.a --target=mingw c:/Perl/bin/Perl58.dll - - -Building the Perl module: -------------------------- - - 1. Complete the section titled 'Installing DMAKE and ExtUtils-FakeConfig' - - 2. Open an MSYS shell and cd into the net-snmp/Perl folder and type the - following on one line: - - perl -MConfig_m Makefile.PL -NET-SNMP-IN-SOURCE=true DEFINE=-DMINGW_PERL - - 3. Open a Windows command prompt (cmd) and cd into the net-snmp/perl folder - and type: - - dmake - dmake test - dmake install - - Note: 'dmake test' will automatically start and stop the agent(snmpd) and - trap receiver (snmptrapd) while testing the SNMP module. - - 4. Remove the MinGW bin folder to your system path if it was not already in - your path for step 3 of 'Installing DMAKE and ExtUtils-FakeConfig'. - - - Operational Description: +Operational Description: +------------------------ The basic operations of the SNMP protocol are provided by this module through an object oriented interface for modularity and ease of use. diff --git a/perl/SNMP/SNMP.pm b/perl/SNMP/SNMP.pm index a05cd38..ebd94b7 100644 --- a/perl/SNMP/SNMP.pm +++ b/perl/SNMP/SNMP.pm @@ -7,7 +7,7 @@ # modify it under the same terms as Perl itself. package SNMP; -$VERSION = '5.0703'; # current release version number +$VERSION = '5.0904'; # current release version number use strict; use warnings; @@ -223,10 +223,10 @@ sub translateObj { # Translate object identifier(tag or numeric) into alternate representation # (i.e., sysDescr => '.1.3.6.1.2.1.1.1' and '.1.3.6.1.2.1.1.1' => sysDescr) # when $SNMP::use_long_names or second arg is non-zero the translation will -# return longer textual identifiers (e.g., system.sysDescr). An optional +# return longer textual identifiers (e.g., system.sysDescr). An optional # third argument of non-zero will cause the module name to be prepended -# to the text name (e.g. 'SNMPv2-MIB::sysDescr'). If no Mib is loaded -# when called and $SNMP::auto_init_mib is enabled then the Mib will be +# to the text name (e.g. 'SNMPv2-MIB::sysDescr'). If no Mib is loaded +# when called and $SNMP::auto_init_mib is enabled then the Mib will be # loaded. Will return 'undef' upon failure. SNMP::init_snmp("perl"); my $obj = shift; @@ -350,17 +350,17 @@ sub snmp_trap { $sess->trap(@_); } -#--------------------------------------------------------------------- -# Preserves the ability to call MainLoop() with no args so we don't +#--------------------------------------------------------------------- +# Preserves the ability to call MainLoop() with no args so we don't # break old code # -# Alternately, MainLoop() could be called as an object method, -# ( $sess->MainLoop() ) , so that $self winds up in @_. Then it would +# Alternately, MainLoop() could be called as an object method, +# ( $sess->MainLoop() ) , so that $self winds up in @_. Then it would # be more like : # my $self = shift; -# .... +# .... # SNMP::_main_loop(......, $self->{SessPtr}); -#--------------------------------------------------------------------- +#--------------------------------------------------------------------- sub MainLoop { my $ss = shift if(&SNMP::_api_mode() == SNMP::SNMP_API_SINGLE()); my $time = shift; @@ -427,16 +427,16 @@ sub _tie { } sub split_vars { - # This sub holds the regex that is used throughout this module + # This sub holds the regex that is used throughout this module # to parse the base part of an OID from the IID. - # eg: portName.9.30 -> ['portName','9.30'] + # eg: portName.9.30 -> ['portName','9.30'] my $vars = shift; # The regex was changed to this simple form by patch 722075 for some reason. - # Testing shows now (2/05) that it is not needed, and that the long expression + # Testing shows now (2/05) that it is not needed, and that the long expression # works fine. AB # my ($tag, $iid) = ($vars =~ /^(.*?)\.?(\d+)+$/); - + # These following two are the same. Broken down for easier maintenance # my ($tag, $iid) = ($vars =~ /^((?:\.\d+)+|(?:\w+(?:\-*\w+)+))\.?(.*)$/); my ($tag, $iid) = @@ -471,8 +471,8 @@ sub new { $this->{ErrorStr} = ''; # if methods return undef check for expln. $this->{ErrorNum} = 0; # contains SNMP error return - $this->{Version} ||= - NetSNMP::default_store::netsnmp_ds_get_int(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID, + $this->{Version} ||= + NetSNMP::default_store::netsnmp_ds_get_int(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID, NetSNMP::default_store::NETSNMP_DS_LIB_SNMPVERSION) || SNMP::SNMP_DEFAULT_VERSION(); @@ -488,7 +488,7 @@ sub new { $this->{DestHost} ||= 'localhost'; # community defaults to public - $this->{Community} ||= NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + $this->{Community} ||= NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), NetSNMP::default_store::NETSNMP_DS_LIB_COMMUNITY()) || 'public'; # number of retries before giving up, defaults to SNMP_DEFAULT_RETRIES @@ -519,22 +519,22 @@ sub new { $this->{Timeout}, ); } elsif ($this->{Version} eq '3' ) { - $this->{SecName} ||= - NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), - NetSNMP::default_store::NETSNMP_DS_LIB_SECNAME()) || + $this->{SecName} ||= + NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + NetSNMP::default_store::NETSNMP_DS_LIB_SECNAME()) || 'initial'; if (!$this->{SecLevel}) { - $this->{SecLevel} = - NetSNMP::default_store::netsnmp_ds_get_int(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), - NetSNMP::default_store::NETSNMP_DS_LIB_SECLEVEL()) || + $this->{SecLevel} = + NetSNMP::default_store::netsnmp_ds_get_int(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + NetSNMP::default_store::NETSNMP_DS_LIB_SECLEVEL()) || $SNMP::V3_SEC_LEVEL_MAP{'noAuthNoPriv'}; } elsif ($this->{SecLevel} !~ /^\d+$/) { $this->{SecLevel} = $SNMP::V3_SEC_LEVEL_MAP{$this->{SecLevel}}; } $this->{SecEngineId} ||= ''; $this->{ContextEngineId} ||= $this->{SecEngineId}; - $this->{Context} ||= - NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + $this->{Context} ||= + NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), NetSNMP::default_store::NETSNMP_DS_LIB_CONTEXT()) || ''; if ($this->{DestHost} =~ /^(dtls|tls|ssh)/) { @@ -569,9 +569,9 @@ sub new { # USM specific parameters: $this->{AuthProto} ||= 'DEFAULT'; # use the library's default $this->{AuthPass} ||= - NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), NetSNMP::default_store::NETSNMP_DS_LIB_AUTHPASSPHRASE()) || - NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), NetSNMP::default_store::NETSNMP_DS_LIB_PASSPHRASE()) || ''; $this->{AuthMasterKey} ||= ''; @@ -581,9 +581,9 @@ sub new { $this->{PrivProto} ||= 'DEFAULT'; # use the library's default $this->{PrivPass} ||= - NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), NetSNMP::default_store::NETSNMP_DS_LIB_PRIVPASSPHRASE()) || - NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), + NetSNMP::default_store::netsnmp_ds_get_string(NetSNMP::default_store::NETSNMP_DS_LIBRARY_ID(), NetSNMP::default_store::NETSNMP_DS_LIB_PASSPHRASE()) || ''; $this->{EngineBoots} = 0 if not defined $this->{EngineBoots}; $this->{EngineTime} = 0 if not defined $this->{EngineTime}; @@ -622,9 +622,9 @@ sub new { SNMP::initMib($SNMP::auto_init_mib); # ensures that *some* mib is loaded - $this->{UseLongNames} = $SNMP::use_long_names + $this->{UseLongNames} = $SNMP::use_long_names unless exists $this->{UseLongNames}; - $this->{UseSprintValue} = $SNMP::use_sprint_value + $this->{UseSprintValue} = $SNMP::use_sprint_value unless exists $this->{UseSprintValue}; $this->{BestGuess} = $SNMP::best_guess unless exists $this->{BestGuess}; $this->{NonIncreasing} ||= $SNMP::non_increasing; @@ -651,9 +651,9 @@ sub update { @$this{keys %new_fields} = values %new_fields; - $this->{UseLongNames} = $SNMP::use_long_names + $this->{UseLongNames} = $SNMP::use_long_names unless exists $this->{UseLongNames}; - $this->{UseSprintValue} = $SNMP::use_sprint_value + $this->{UseSprintValue} = $SNMP::use_sprint_value unless exists $this->{UseSprintValue}; $this->{BestGuess} = $SNMP::best_guess unless exists $this->{BestGuess}; $this->{NonIncreasing} ||= $SNMP::non_increasing; @@ -754,7 +754,7 @@ sub gettable { return if (!$root_oid); # deficed if we're going to parse indexes - my $parse_indexes = (defined($state->{'options'}{'noindexes'})) ? + my $parse_indexes = (defined($state->{'options'}{'noindexes'})) ? 0 : $have_netsnmp_oid; # get the list of columns we should look at. @@ -811,7 +811,7 @@ sub gettable { } $vbl = $state->{'varbinds'}; - + my $repeatcount; if ($this->{Version} eq '1' || $state->{'options'}{nogetbulk}) { $state->{'repeatcount'} = 1; @@ -890,7 +890,7 @@ sub _gettable_do_it() { my $row_value = $vbl->[$i][2]; my $row_type = $vbl->[$i][3]; - if ($row_oid =~ + if ($row_oid =~ /^$state->{'stopconds'}[$i % ($#{$state->{'stopconds'}}+1)]/ && $row_value ne 'ENDOFMIBVIEW' ){ @@ -1185,7 +1185,7 @@ sub trap { $varbind_list_ref = $vars if ref($$vars[0]) =~ /ARRAY/; } - if ($this->{Version} eq '1') { + if ($this->{Version} =~ '^1') { my $enterprise = $param{enterprise} || 'ucdavis'; $enterprise = SNMP::translateObj($enterprise) unless $enterprise =~ /^[\.\d]+$/; @@ -1200,6 +1200,8 @@ sub trap { my $trap_oid = $param{oid} || $param{trapoid} || '.0.0'; my $uptime = $param{uptime} || SNMP::_sys_uptime(); @res = SNMP::_trapV2($this, $uptime, $trap_oid, $varbind_list_ref); + } else { + warn("error:trap: Unsupported SNMP version " . $this->{Version} . "\n"); } return(wantarray() ? @res : $res[0]); @@ -1234,7 +1236,7 @@ sub inform { my $trap_oid = $param{oid} || $param{trapoid}; my $uptime = $param{uptime} || SNMP::_sys_uptime(); - if($this->{Version} eq '3') { + if ($this->{Version} =~ '^[23]') { @res = SNMP::_inform($this, $uptime, $trap_oid, $varbind_list_ref, $cb); } else { warn("error:inform: This version doesn't support the command\n"); @@ -1621,7 +1623,7 @@ filename that holds the certificate. =item TheirIdentity -The remote server's identity to connect to, specified as eihter a +The remote server's identity to connect to, specified as either a fingerprint or a file name. Either this must be specified, or the hostname below along with a trust anchor. @@ -1634,10 +1636,10 @@ avoid man-in-the-middle attacks). =item TrustCert -A trusted certificate to use a trust anchor (like a CA certificate) +A trusted certificate to use as trust anchor (like a CA certificate) for verifying a remote server's certificate. If a CA certificate is used to validate a certificate then the TheirHostname parameter must -also be specified to ensure their presente hostname in the certificate +also be specified to ensure their presented hostname in the certificate matches. =back @@ -1661,7 +1663,9 @@ The default is 'noAuthNoPriv'. =item SecEngineId The SNMPv3 security engineID to use (if the snmpv3 security model -needs it; for example USM). +needs it; for example USM). The format is as a string without the leading '0x'. +So if snmptrapd.conf has C<-e 0x8000000001020304>, use C<< SecEngineId => +'8000000001020304' >>. The default is , security engineID and it will be probed if not supplied (v3) @@ -1719,12 +1723,16 @@ the keys instead of deriving them from a password as above). =head2 SNMPv1 and SNMPv2c Options +=over + =item Community For SNMPv1 and SNMPv2c, the clear-text community name to use. The default is 'public'. +=back + =head2 Other Configuration Options =over @@ -1784,8 +1792,8 @@ set so that the full OID is returned to the caller. defaults to the value of SNMP::best_guess at time of session creation. this setting controls how are parsed. setting to -0 causes a regular lookup. setting to 1 causes a regular expression -match (defined as -Ib in snmpcmd) and setting to 2 causes a random +0 causes a regular lookup. setting to 1 causes a regular expression +match (defined as -Ib in snmpcmd) and setting to 2 causes a random access lookup (defined as -IR in snmpcmd). =item NonIncreasing @@ -1935,7 +1943,7 @@ agent to include one additional (unrelated) variable that signals the end of the sub-tree, allowing bulkwalk() to determine that the request is complete. -=item $results = $sess->gettable(ETABLE OIDE, EOPTIONS) +=item $results = $sess->gettable(ETABLE OIDE, EOPTIONSE) This will retrieve an entire table of data and return a hash reference to that data. The returned hash reference will have indexes of the @@ -2017,7 +2025,7 @@ If a callback is specified, gettable will return quickly without returning results. When the results are finally retrieved the callback subroutine will be called (see the other sections defining callback behaviour and how to make use of SNMP::MainLoop which is -required fro this to work). An additional argument of the normal hash +required for this to work). An additional argument of the normal hash result will be added to the callback subroutine arguments. Note 1: internally, the gettable function uses it's own callbacks @@ -2247,7 +2255,7 @@ will be undef. to be used with async SNMP::Session calls. MainLoop must be called after initial async calls -so return packets from the agent will not be processed. +so return packets from the agent will be processed. If no args supplied this function enters an infinite loop so program must be exited in a callback or externally interrupted. If are -parsed. Setting to 0 causes a regular lookup. Setting -to 1 causes a regular expression match (defined as -Ib -in snmpcmd) and setting to 2 causes a random access -lookup (defined as -IR in snmpcmd). Can also be set +default '0'. This setting controls how are +parsed. Setting to 0 causes a regular lookup. Setting +to 1 causes a regular expression match (defined as -Ib +in snmpcmd) and setting to 2 causes a random access +lookup (defined as -IR in snmpcmd). Can also be set on a per session basis (see BestGuess) =item $SNMP::save_descriptions @@ -2522,16 +2530,16 @@ B<*Not Implemented*> will convert a text obj tag to an OID and vice-versa. Any iid suffix is retained numerically. Default behaviour when converting a numeric OID to text -form is to return leaf identifier only -(e.g.,'sysDescr') but when $SNMP::use_long_names -is non-zero or a non-zero second arg is supplied it -will return a longer textual identifier. An optional -third argument of non-zero will cause the module name -to be prepended to the text name (e.g. -'SNMPv2-MIB::sysDescr'). When converting a text obj, -the $SNMP::best_guess option is used. If no Mib is -loaded when called and $SNMP::auto_init_mib is enabled -then the Mib will be loaded. Will return 'undef' upon +form is to return leaf identifier only +(e.g.,'sysDescr') but when $SNMP::use_long_names +is non-zero or a non-zero second arg is supplied it +will return a longer textual identifier. An optional +third argument of non-zero will cause the module name +to be prepended to the text name (e.g. +'SNMPv2-MIB::sysDescr'). When converting a text obj, +the $SNMP::best_guess option is used. If no Mib is +loaded when called and $SNMP::auto_init_mib is enabled +then the Mib will be loaded. Will return 'undef' upon failure. =item &SNMP::getType() diff --git a/perl/SNMP/SNMP.xs b/perl/SNMP/SNMP.xs index 2a734e8..7fbd40d 100644 --- a/perl/SNMP/SNMP.xs +++ b/perl/SNMP/SNMP.xs @@ -7,10 +7,6 @@ This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. */ -#define WIN32SCK_IS_STDSCK -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif #include "EXTERN.h" #include "perl.h" @@ -91,11 +87,6 @@ static int mainloop_finish = 0; /* Internal flag to determine which API we're using */ static int api_mode = SNMP_API_TRADITIONAL; -/* these should be part of transform_oids.h ? */ -#define USM_AUTH_PROTO_MD5_LEN 10 -#define USM_AUTH_PROTO_SHA_LEN 10 -#define USM_PRIV_PROTO_DES_LEN 10 - /* why does ucd-snmp redefine sockaddr_in ??? */ #define SIN_ADDR(snmp_addr) (((struct sockaddr_in *) &(snmp_addr))->sin_addr) @@ -115,21 +106,17 @@ static int __translate_asn_type _((int)); static int __snprint_value _((char *, size_t, netsnmp_variable_list*, struct tree *, int, int)); -static int __sprint_num_objid _((char *, oid *, int)); +static int __snprint_num_objid _((char *, size_t, const oid *, int)); static int __scan_num_objid _((char *, oid *, size_t *)); static int __get_type_str _((int, char *)); static int __get_label_iid _((char *, char **, char **, int)); static int __oid_cmp _((oid *, size_t, oid *, size_t)); -static int __tp_sprint_num_objid _((char*,SnmpMibNode *)); +static int __tp_sprint_num_objid _((char*, size_t, const SnmpMibNode *)); static SnmpMibNode * __get_next_mib_node _((SnmpMibNode *)); static struct tree * __tag2oid _((char *, char *, oid *, size_t *, int *, int)); static int __concat_oid_str _((oid *, size_t *, char *)); static int __add_var_val_str _((netsnmp_pdu *, oid *, size_t, char *, int, int)); -static int __send_sync_pdu _((netsnmp_session *, netsnmp_pdu *, - netsnmp_pdu **, int , SV *, SV *, SV *)); -static int __snmp_xs_cb __P((int, netsnmp_session *, int, - netsnmp_pdu *, void *)); static SV* __push_cb_args2 _((SV * sv, SV * esv, SV * tsv)); #define __push_cb_args(a,b) __push_cb_args2(a,b,NULL) static int __call_callback _((SV * sv, int flags)); @@ -182,7 +169,7 @@ static int _bulkwalk_async_cb _((int op, SnmpSession *ss, int reqid, netsnmp_pdu *pdu, void *context_ptr)); /* Prototype for error handler */ -void snmp_return_err( struct snmp_session *ss, SV *err_str, SV *err_num, SV *err_ind ); +void snmp_return_err(void *ss, SV *err_str, SV *err_num, SV *err_ind); /* Structure to hold valid context sessions. */ struct valid_contexts { @@ -500,8 +487,8 @@ int flag; break; case ASN_OBJECT_ID: - __sprint_num_objid(buf, (oid *)(var->val.objid), - var->val_len/sizeof(oid)); + __snprint_num_objid(buf, buf_len, var->val.objid, + var->val_len / sizeof(oid)); len = strlen(buf); break; @@ -556,24 +543,28 @@ int flag; } static int -__sprint_num_objid (buf, objid, len) +__snprint_num_objid (buf, buf_len, objid, len) char *buf; -oid *objid; +size_t buf_len; +const oid *objid; int len; { + const char* const end = buf + buf_len; int i; + buf[0] = '\0'; for (i=0; i < len; i++) { - sprintf(buf,".%" NETSNMP_PRIo "u",*objid++); + snprintf(buf, end - buf, ".%" NETSNMP_PRIo "u", *objid++); buf += strlen(buf); } return SUCCESS; } static int -__tp_sprint_num_objid (buf, tp) +__tp_sprint_num_objid (buf, buf_len, tp) char *buf; -SnmpMibNode *tp; +size_t buf_len; +const SnmpMibNode *tp; { oid newname[MAX_OID_LEN], *op; /* code taken from get_node in snmp_client.c */ @@ -582,7 +573,7 @@ SnmpMibNode *tp; tp = tp->parent; if (tp == NULL) break; } - return __sprint_num_objid(buf, op, newname + MAX_OID_LEN - op); + return __snprint_num_objid(buf, buf_len, op, newname + MAX_OID_LEN - op); } static int @@ -984,8 +975,7 @@ __add_var_val_str(pdu, name, name_length, val, len, type) } vars->next_variable = NULL; - vars->name = netsnmp_malloc(name_length * sizeof(oid)); - memcpy((char *)vars->name, (char *)name, name_length * sizeof(oid)); + vars->name = netsnmp_memdup(name, name_length * sizeof(oid)); vars->name_length = name_length; switch (type) { case TYPE_INTEGER: @@ -1035,23 +1025,19 @@ as_uint: case TYPE_OPAQUE: vars->type = ASN_OCTET_STR; as_oct: - vars->val.string = netsnmp_malloc(len); + vars->val.string = netsnmp_memdup(val && len ? val : "", len ? len : 1); vars->val_len = len; - if (val && len) - memcpy((char *)vars->val.string, val, len); - else { + if (!val) ret = FAILURE; - vars->val.string = (u_char *) netsnmp_strdup(""); - vars->val_len = 0; - } break; case TYPE_IPADDR: vars->type = ASN_IPADDRESS; - vars->val.integer = netsnmp_malloc(sizeof(in_addr_t)); - if (val) - *((in_addr_t *)vars->val.integer) = inet_addr(val); - else { + if (val) { + const in_addr_t addr = inet_addr(val); + + vars->val.integer = netsnmp_memdup(&addr, sizeof(addr)); + } else { ret = FAILURE; *(vars->val.integer) = 0; } @@ -1068,8 +1054,7 @@ as_oct: ret = FAILURE; } else { vars->val_len *= sizeof(oid); - vars->val.objid = netsnmp_malloc(vars->val_len); - memcpy((char *)vars->val.objid, (char *)oidbuf, vars->val_len); + vars->val.objid = netsnmp_memdup(oidbuf, vars->val_len); } break; @@ -1086,15 +1071,9 @@ as_oct: /* takes ss and pdu as input and updates the 'response' argument */ /* the input 'pdu' argument will be freed */ static int -__send_sync_pdu(ss, pdu, response, retry_nosuch, - err_str_sv, err_num_sv, err_ind_sv) -netsnmp_session *ss; -netsnmp_pdu *pdu; -netsnmp_pdu **response; -int retry_nosuch; -SV * err_str_sv; -SV * err_num_sv; -SV * err_ind_sv; +__send_sync_pdu(void *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, + int retry_nosuch, SV *err_str_sv, SV *err_num_sv, + SV *err_ind_sv) { int status; long command = pdu->command; @@ -1120,6 +1099,7 @@ retry: if (*response) snmp_free_pdu(*response); goto retry; } + /* FALLTHROUGH */ /* Pv1, SNMPsec, Pv2p, v2c, v2u, v2*, and SNMPv3 PDUs */ case SNMP_ERR_TOOBIG: @@ -1166,12 +1146,8 @@ retry: } static int -__snmp_xs_cb (op, ss, reqid, pdu, cb_data) -int op; -netsnmp_session *ss; -int reqid; -netsnmp_pdu *pdu; -void *cb_data; +__snmp_xs_cb(int op, netsnmp_session *ss, int reqid, netsnmp_pdu *pdu, + void *cb_data) { SV *varlist_ref; AV *varlist; @@ -1231,12 +1207,8 @@ void *cb_data; reply_pdu->command = SNMP_MSG_RESPONSE; reply_pdu->reqid = pdu->reqid; reply_pdu->errstat = reply_pdu->errindex = 0; - if(api_mode == SNMP_API_SINGLE) - { - snmp_sess_send(ss, reply_pdu); - } else { - snmp_send(ss, reply_pdu); - } + if (!snmp_send(ss, reply_pdu)) + snmp_free_pdu(reply_pdu); } else { warn("Couldn't clone PDU for inform response"); } @@ -1768,7 +1740,7 @@ _bulkwalk_send_pdu(walk_context *context) */ SV **sess_ptr_sv = hv_fetch((HV*)SvRV(context->sess_ref), "SessPtr", 7, 1); - netsnmp_session *ss = (SnmpSession *)SvIV((SV*)SvRV(*sess_ptr_sv)); + void *ss = (void *)SvIV((SV*)SvRV(*sess_ptr_sv)); SV **err_str_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorStr", 8, 1); SV **err_num_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorNum", 8, 1); SV **err_ind_svp = hv_fetch((HV*)SvRV(context->sess_ref), "ErrorInd", 8, 1); @@ -1831,7 +1803,7 @@ _bulkwalk_send_pdu(walk_context *context) DBPRT(2,(DBOUT "bulkwalk_send_pdu(): snmp_async_send => 0x%08X\n", reqid)); if (reqid == 0) { - snmp_return_err(ss, *err_num_svp, *err_ind_svp, *err_str_svp); + snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); goto err; } @@ -2175,8 +2147,8 @@ _bulkwalk_recv_pdu(walk_context *context, netsnmp_pdu *pdu) __get_type_str(type, type_str); av_store(varbind, VARBIND_TYPE_F, newSVpv(type_str, strlen(type_str))); - len=__snprint_value(str_buf, sizeof(str_buf), - vars, tp, type, context->sprintval_f); + len = __snprint_value(str_buf, sizeof(str_buf) - 1, + vars, tp, type, context->sprintval_f); av_store(varbind, VARBIND_VAL_F, newSVpv(str_buf, len)); str_buf[len] = '\0'; @@ -2470,7 +2442,7 @@ not_there: snmp_error or snmp_sess_error to populate ErrorStr,ErrorNum, and ErrorInd in SNMP::Session objects */ -void snmp_return_err( struct snmp_session *ss, SV *err_str, SV *err_num, SV *err_ind ) +void snmp_return_err(void *ss, SV *err_str, SV *err_num, SV *err_ind) { int err; int liberr; @@ -2556,9 +2528,11 @@ snmp_new_session(version, community, peer, lport, retries, timeout) CODE: { SnmpSession session = {0}; - SnmpSession *ss = NULL; + void *ss = NULL; int verbose = SvIV(perl_get_sv("SNMP::verbose", 0x01 | 0x04)); + snmp_sess_init(&session); + __libraries_init("perl"); session.version = -1; @@ -2633,8 +2607,11 @@ snmp_new_v3_session(version, peer, retries, timeout, sec_name, sec_level, sec_en CODE: { SnmpSession session = {0}; - SnmpSession *ss = NULL; + void *ss = NULL; int verbose = SvIV(perl_get_sv("SNMP::verbose", 0x01 | 0x04)); + int auth_type, priv_type; + + snmp_sess_init(&session); __libraries_init("perl"); @@ -2664,25 +2641,25 @@ snmp_new_v3_session(version, peer, retries, timeout, sec_name, sec_level, sec_en (char **) &session.contextEngineID); session.engineBoots = eng_boots; session.engineTime = eng_time; -#ifndef NETSNMP_DISABLE_MD5 - if (!strcmp(auth_proto, "MD5")) { - session.securityAuthProto = - snmp_duplicate_objid(usmHMACMD5AuthProtocol, - USM_AUTH_PROTO_MD5_LEN); - session.securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN; - } else -#endif - if (!strcmp(auth_proto, "SHA")) { - session.securityAuthProto = - snmp_duplicate_objid(usmHMACSHA1AuthProtocol, - USM_AUTH_PROTO_SHA_LEN); - session.securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN; - } else if (!strcmp(auth_proto, "DEFAULT")) { + /* NETSNMP_USMAUTH_* */ + auth_type = usm_lookup_auth_type(auth_proto); + if (auth_type >= 0) { + const netsnmp_auth_alg_info *auth_alg_info = + sc_find_auth_alg_bytype(auth_type); + if (auth_alg_info) { + session.securityAuthProto = + snmp_duplicate_objid(auth_alg_info->alg_oid, + auth_alg_info->oid_len); + session.securityAuthProtoLen = auth_alg_info->oid_len; + } + } + if (strcmp(auth_proto, "DEFAULT") == 0) { const oid *theoid = get_default_authtype(&session.securityAuthProtoLen); session.securityAuthProto = snmp_duplicate_objid(theoid, session.securityAuthProtoLen); - } else { + } + if (session.securityAuthProto == NULL) { if (verbose) warn("error:snmp_new_v3_session:Unsupported authentication protocol(%s)\n", auth_proto); goto end; @@ -2714,25 +2691,24 @@ snmp_new_v3_session(version, peer, retries, timeout, sec_name, sec_level, sec_en } } } -#ifndef NETSNMP_DISABLE_DES - if (!strcmp(priv_proto, "DES")) { - session.securityPrivProto = - snmp_duplicate_objid(usmDESPrivProtocol, - USM_PRIV_PROTO_DES_LEN); - session.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; - } else -#endif - if (!strncmp(priv_proto, "AES", 3)) { - session.securityPrivProto = - snmp_duplicate_objid(usmAESPrivProtocol, - USM_PRIV_PROTO_AES_LEN); - session.securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN; - } else if (!strcmp(priv_proto, "DEFAULT")) { + priv_type = usm_lookup_priv_type(priv_proto); + if (priv_type >= 0) { + const netsnmp_priv_alg_info *priv_alg_info = + sc_get_priv_alg_bytype(priv_type); + if (priv_alg_info) { + session.securityPrivProto = + snmp_duplicate_objid(priv_alg_info->alg_oid, + priv_alg_info->oid_len); + session.securityPrivProtoLen = priv_alg_info->oid_len; + } + } + if (strcmp(priv_proto, "DEFAULT") == 0) { const oid *theoid = get_default_privtype(&session.securityPrivProtoLen); session.securityPrivProto = snmp_duplicate_objid(theoid, session.securityPrivProtoLen); - } else { + } + if (session.securityPrivProto == NULL) { if (verbose) warn("error:snmp_new_v3_session:Unsupported privacy protocol(%s)\n", priv_proto); goto end; @@ -2805,6 +2781,8 @@ snmp_new_tunneled_session(version, peer, retries, timeout, sec_name, sec_level, SnmpSession *ss = NULL; int verbose = SvIV(perl_get_sv("SNMP::verbose", 0x01 | 0x04)); + snmp_sess_init(&session); + __libraries_init("perl"); session.version = version; @@ -3056,7 +3034,7 @@ snmp_set(sess_ref, varlist_ref, perl_callback) AV *varbind; I32 varlist_len; I32 varlist_ind; - SnmpSession *ss; + void *ss; netsnmp_pdu *pdu, *response; struct tree *tp; oid *oid_arr; @@ -3173,7 +3151,7 @@ snmp_set(sess_ref, varlist_ref, perl_callback) XPUSHs(sv_2mortal(newSViv(status))); /* push the reqid?? */ } else { snmp_free_pdu(pdu); - snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); + snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); XPUSHs(&sv_undef); } goto done; @@ -3209,6 +3187,7 @@ snmp_catch(sess_ref, perl_callback) SV * perl_callback PPCODE: { + void *sess_ptr; netsnmp_session *ss; SV **sess_ptr_sv; SV **err_str_svp; @@ -3217,7 +3196,7 @@ snmp_catch(sess_ref, perl_callback) if (SvROK(sess_ref)) { sess_ptr_sv = hv_fetch((HV*)SvRV(sess_ref), "SessPtr", 7, 1); - ss = (SnmpSession *)SvIV((SV*)SvRV(*sess_ptr_sv)); + sess_ptr = (void *)SvIV((SV*)SvRV(*sess_ptr_sv)); err_str_svp = hv_fetch((HV*)SvRV(sess_ref), "ErrorStr", 8, 1); err_num_svp = hv_fetch((HV*)SvRV(sess_ref), "ErrorNum", 8, 1); err_ind_svp = hv_fetch((HV*)SvRV(sess_ref), "ErrorInd", 8, 1); @@ -3225,6 +3204,8 @@ snmp_catch(sess_ref, perl_callback) sv_setiv(*err_num_svp, 0); sv_setiv(*err_ind_svp, 0); + ss = api_mode == SNMP_API_SINGLE ? snmp_sess_session(sess_ptr) : + sess_ptr; ss->callback = NULL; ss->callback_magic = NULL; @@ -3262,7 +3243,7 @@ snmp_get(sess_ref, retry_nosuch, varlist_ref, perl_callback) AV *varbind; I32 varlist_len; I32 varlist_ind; - netsnmp_session *ss; + void *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; struct tree *tp; @@ -3363,7 +3344,7 @@ snmp_get(sess_ref, retry_nosuch, varlist_ref, perl_callback) XPUSHs(sv_2mortal(newSViv(status))); /* push the reqid?? */ } else { snmp_free_pdu(pdu); - snmp_return_err(ss, *err_num_svp, *err_ind_svp, *err_str_svp); + snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); XPUSHs(&sv_undef); } goto done; @@ -3488,7 +3469,7 @@ snmp_getnext(sess_ref, varlist_ref, perl_callback) AV *varbind; I32 varlist_len; I32 varlist_ind; - netsnmp_session *ss; + void *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; struct tree *tp; @@ -3604,7 +3585,7 @@ snmp_getnext(sess_ref, varlist_ref, perl_callback) XPUSHs(sv_2mortal(newSViv(status))); /* push the reqid?? */ } else { snmp_free_pdu(pdu); - snmp_return_err(ss, *err_num_svp, *err_ind_svp, *err_str_svp); + snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); XPUSHs(&sv_undef); } goto done; @@ -3740,7 +3721,7 @@ snmp_getbulk(sess_ref, nonrepeaters, maxrepetitions, varlist_ref, perl_callback) AV *varbind; I32 varlist_len; I32 varlist_ind; - netsnmp_session *ss; + void *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; struct tree *tp; @@ -3846,7 +3827,7 @@ snmp_getbulk(sess_ref, nonrepeaters, maxrepetitions, varlist_ref, perl_callback) XPUSHs(sv_2mortal(newSViv(status))); /* push the reqid?? */ } else { snmp_free_pdu(pdu); - snmp_return_err(ss, *err_num_svp, *err_ind_svp, *err_str_svp); + snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); XPUSHs(&sv_undef); } goto done; @@ -3979,7 +3960,7 @@ snmp_bulkwalk(sess_ref, nonrepeaters, maxrepetitions, varlist_ref,perl_callback) AV *varbind; I32 varlist_len; I32 varlist_ind; - netsnmp_session *ss; + void *ss; netsnmp_pdu *pdu = NULL; oid oid_arr[MAX_OID_LEN]; size_t oid_arr_len; @@ -4289,7 +4270,7 @@ snmp_trapV1(sess_ref,enterprise,agent,generic,specific,uptime,varlist_ref) AV *varbind; I32 varlist_len; I32 varlist_ind; - SnmpSession *ss; + void *ss; netsnmp_pdu *pdu = NULL; struct tree *tp; oid *oid_arr; @@ -4433,7 +4414,7 @@ snmp_trapV2(sess_ref,uptime,trap_oid,varlist_ref) AV *varbind; I32 varlist_len; I32 varlist_ind; - SnmpSession *ss; + void *ss; netsnmp_pdu *pdu = NULL; struct tree *tp; oid *oid_arr; @@ -4579,7 +4560,7 @@ snmp_inform(sess_ref,uptime,trap_oid,varlist_ref,perl_callback) AV *varbind; I32 varlist_len; I32 varlist_ind; - SnmpSession *ss; + void *ss; netsnmp_pdu *pdu = NULL; netsnmp_pdu *response; struct tree *tp; @@ -4707,7 +4688,7 @@ snmp_inform(sess_ref,uptime,trap_oid,varlist_ref,perl_callback) XPUSHs(sv_2mortal(newSViv(status))); /* push the reqid?? */ } else { snmp_free_pdu(pdu); - snmp_return_err(ss, *err_num_svp, *err_ind_svp, *err_str_svp); + snmp_return_err(ss, *err_str_svp, *err_num_svp, *err_ind_svp); XPUSHs(&sv_undef); } goto done; @@ -4774,7 +4755,7 @@ snmp_map_enum(tag, val, iflag, best_guess) { struct tree *tp = NULL; struct enum_list *ep; - char str_buf[STR_BUF_SIZE]; + static char str_buf[STR_BUF_SIZE]; int ival; RETVAL = NULL; @@ -4817,7 +4798,7 @@ snmp_translate_obj(var,mode,use_long,auto_init,best_guess,include_module_name) int include_module_name CODE: { - char str_buf[STR_BUF_SIZE]; + static char str_buf[STR_BUF_SIZE]; char str_buf_temp[STR_BUF_SIZE]; oid oid_arr[MAX_OID_LEN]; size_t oid_arr_len = MAX_OID_LEN; @@ -4844,7 +4825,7 @@ snmp_translate_obj(var,mode,use_long,auto_init,best_guess,include_module_name) if (!__tag2oid(var, NULL, oid_arr, &oid_arr_len, NULL, best_guess)) { if (verbose) warn("error:snmp_translate_obj:Unknown OID %s\n",var); } else { - status = __sprint_num_objid(str_buf, oid_arr, oid_arr_len); + status = __snprint_num_objid(str_buf, sizeof(str_buf), oid_arr, oid_arr_len); } break; case SNMP_XLATE_MODE_OID2TAG: @@ -4885,9 +4866,9 @@ snmp_translate_obj(var,mode,use_long,auto_init,best_guess,include_module_name) if (verbose) warn("snmp_translate_obj:unknown translation mode: %d\n", mode); } if (*str_buf) { - RETVAL = (char*)str_buf; + RETVAL = str_buf; } else { - RETVAL = (char*)NULL; + RETVAL = NULL; } netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, old_format); } @@ -4976,7 +4957,7 @@ snmp_main_loop(timeout_sec,timeout_usec,perl_callback,ss=(SnmpSession*)NULL) int timeout_sec int timeout_usec SV * perl_callback - SnmpSession *ss + void * ss CODE: { int numfds, fd_count; @@ -5213,11 +5194,11 @@ snmp_mib_node_FETCH(tp_ref, key) mib_hv = perl_get_hv("SNMP::MIB", FALSE); if (SvMAGICAL(mib_hv)) mg = mg_find((SV*)mib_hv, 'P'); if (mg) mib_tied_href = (SV*)mg->mg_obj; - next_node_href = newRV((SV*)newHV()); - __tp_sprint_num_objid(str_buf, tp); + __tp_sprint_num_objid(str_buf, sizeof(str_buf), tp); nn_hrefp = hv_fetch((HV*)SvRV(mib_tied_href), str_buf, strlen(str_buf), 1); if (!SvROK(*nn_hrefp)) { + next_node_href = newRV((SV*)newHV()); sv_setsv(*nn_hrefp, next_node_href); ENTER ; SAVETMPS ; @@ -5304,7 +5285,7 @@ snmp_mib_node_FETCH(tp_ref, key) mib_hv = perl_get_hv("SNMP::MIB", FALSE); if (SvMAGICAL(mib_hv)) mg = mg_find((SV*)mib_hv, 'P'); if (mg) mib_tied_href = (SV*)mg->mg_obj; - __tp_sprint_num_objid(str_buf, tp); + __tp_sprint_num_objid(str_buf, sizeof(str_buf), tp); nn_hrefp = hv_fetch((HV*)SvRV(mib_tied_href), str_buf, strlen(str_buf), 1); @@ -5329,7 +5310,7 @@ snmp_mib_node_FETCH(tp_ref, key) break; case 'o': /* objectID */ if (strncmp("objectID", key, strlen(key))) break; - __tp_sprint_num_objid(str_buf, tp); + __tp_sprint_num_objid(str_buf, sizeof(str_buf), tp); sv_setpv(ret,str_buf); break; case 'p': /* parent */ @@ -5342,11 +5323,11 @@ snmp_mib_node_FETCH(tp_ref, key) mib_hv = perl_get_hv("SNMP::MIB", FALSE); if (SvMAGICAL(mib_hv)) mg = mg_find((SV*)mib_hv, 'P'); if (mg) mib_tied_href = (SV*)mg->mg_obj; - next_node_href = newRV((SV*)newHV()); - __tp_sprint_num_objid(str_buf, tp); + __tp_sprint_num_objid(str_buf, sizeof(str_buf), tp); nn_hrefp = hv_fetch((HV*)SvRV(mib_tied_href), str_buf, strlen(str_buf), 1); if (!SvROK(*nn_hrefp)) { + next_node_href = newRV((SV*)newHV()); sv_setsv(*nn_hrefp, next_node_href); ENTER ; SAVETMPS ; @@ -5464,7 +5445,7 @@ snmp_session_DESTROY(sess_ptr) { if(api_mode == SNMP_API_SINGLE) { - snmp_sess_close( sess_ptr ); + snmp_sess_close( (struct session_list *) sess_ptr ); } else { snmp_close( sess_ptr ); } diff --git a/perl/SNMP/examples/bulkwalk.pl b/perl/SNMP/examples/bulkwalk.pl index 3ee2412..bb83199 100644 --- a/perl/SNMP/examples/bulkwalk.pl +++ b/perl/SNMP/examples/bulkwalk.pl @@ -29,12 +29,12 @@ # # The 'get' performed for non-repeaters is a "GETNEXT" (the non-repeater # requests are not fulfilled with SNMP GET's). This means that you must -# ask for the lexicographically preceeding variable for non-repeaters. +# ask for the lexicographically preceding variable for non-repeaters. # # For most branches (i.e. 'sysUpTime'), this "just works" -- be sure you # don't ask for an instance, and the response will be as expected. However, # if you want a specific variable instance (i.e. 'ifSpeed.5'), you must -# ask for the _preceeding_ variable ('ifSpeed.4' in this example). +# ask for the _preceding_ variable ('ifSpeed.4' in this example). # # See section 4.2.3 of RFC 1905 for more details on GETBULK PDU handling. # diff --git a/perl/SNMP/netsnmp-feature-definitions.h b/perl/SNMP/netsnmp-feature-definitions.h index adc642c..d402224 100644 --- a/perl/SNMP/netsnmp-feature-definitions.h +++ b/perl/SNMP/netsnmp-feature-definitions.h @@ -1,8 +1,8 @@ #include #include -netsnmp_feature_require(snprint_objid) -netsnmp_feature_require(snprint_value) -netsnmp_feature_require(find_module) -netsnmp_feature_require(get_tc_description) +netsnmp_feature_require(snprint_objid); +netsnmp_feature_require(snprint_value); +netsnmp_feature_require(find_module); +netsnmp_feature_require(get_tc_description); diff --git a/perl/SNMP/t/async.t b/perl/SNMP/t/async.t index f3fb38d..09c294b 100644 --- a/perl/SNMP/t/async.t +++ b/perl/SNMP/t/async.t @@ -1,20 +1,15 @@ #!./perl + +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); - - $skipped_tests = ($^O =~ /win32/i) ? 20 : 0; } use Test; -BEGIN {plan tests => 20 - $skipped_tests} +BEGIN {plan tests => ($^O =~ /win32/i) ? 0 : 20} use SNMP; -use vars qw($agent_port $comm $agent_host); if ($^O =~ /win32/i) { warn "Win32/Win64 detected - skipping async calls\n"; @@ -22,6 +17,7 @@ if ($^O =~ /win32/i) { } require "t/startagent.pl"; +use vars qw($agent_host $agent_port $comm); sub cb1; # forward reference diff --git a/perl/SNMP/t/bulkwalk.t b/perl/SNMP/t/bulkwalk.t index 2d13e7b..c94fba8 100644 --- a/perl/SNMP/t/bulkwalk.t +++ b/perl/SNMP/t/bulkwalk.t @@ -1,36 +1,25 @@ #!./perl # -# $Id$ -# # Test bulkwalk functionality. -BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } - eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); - $skipped_tests = ($^O =~ /win32/i) ? 21 : 0; -} +use strict; +use warnings; +use Cwd qw(abs_path); use Test; -BEGIN { $num = 62 - $skipped_tests; plan test => $num; } + +BEGIN { plan test => ($^O =~ /win32/i) ? 43 : 64; } use SNMP; require "t/startagent.pl"; - -use vars qw($agent_port $comm2 $agent_host); +use vars qw($agent_host $agent_port $comm2); $SNMP::debugging = 0; $SNMP::verbose = 0; -#print "1..$num\n"; - ###################################################################### # Fire up a session. -$s1 = new SNMP::Session( +my $s1 = new SNMP::Session( 'DestHost' => $agent_host, 'Community' => $comm2, 'RemotePort' => $agent_port, @@ -43,14 +32,13 @@ ok(defined($s1)); ###################################################################### # -# Attempt to use the bulkwalk method to get a few variables from the -# SNMP agent. -# test 1 -$vars = new SNMP::VarList ( ['sysUpTime'], ['ifNumber'], # NON-repeaters - ['ifSpeed'], ['ifDescr']); # Repeated variables. +print("# Attempt to use the bulkwalk method to get a few variables from the SNMP agent.\n"); +print("# test 1\n"); +my $vars = new SNMP::VarList(['sysUpTime'], ['ifNumber'], # NON-repeaters + ['ifSpeed'], ['ifDescr']); # Repeated variables. -$expect = scalar @$vars; -@list = $s1->bulkwalk(2, 16, $vars); +my $expect = scalar @$vars; +my @list = $s1->bulkwalk(2, 256, $vars); ok($s1->{ErrorNum} == 0); @@ -59,10 +47,10 @@ ok($s1->{ErrorNum} == 0); ok(scalar @list == $expect); if (defined($list[0][0])) { # Sanity check the returned values. list[0] is sysUptime nonrepeater. - ok($list[0][0]->tag eq ".1.3.6.1.2.1.1.3"); # check system.sysUptime OID - ok($list[0][0]->iid eq "0"); # check system.sysUptime.0 IID + ok($list[0][0]->tag, ".1.3.6.1.2.1.1.3"); # check system.sysUptime OID + ok($list[0][0]->iid, "0"); # check system.sysUptime.0 IID ok($list[0][0]->val =~ m/^\d+$/); # Uptime is numeric - ok($list[0][0]->type eq "TICKS"); # Uptime should be in ticks. + ok($list[0][0]->type, "TICKS"); # Uptime should be in ticks. } else { ok(0); @@ -70,13 +58,14 @@ else { ok(0); ok(0); } +my $ifaces = 0; if (defined($list[1][0])) { # Find out how many interfaces to expect. list[1] is ifNumber nonrepeater. - ok($list[1][0]->tag eq ".1.3.6.1.2.1.2.1"); # Should be system.ifNumber OID. - ok($list[1][0]->iid eq "0"); # system.ifNumber.0 IID. + ok($list[1][0]->tag, ".1.3.6.1.2.1.2.1"); # Should be system.ifNumber OID. + ok($list[1][0]->iid, "0"); # system.ifNumber.0 IID. ok($list[1][0]->val =~ m/^\d+$/); # Number is all numeric #XXX: test fails due SMIv1 codes being returned intstead of SMIv2... - #ok($list[1][0]->type eq "INTEGER32"); # Number should be integer. + #ok($list[1][0]->type, "INTEGER32"); # Number should be integer. $ifaces = $list[1][0]->val; } @@ -85,7 +74,9 @@ else { ok(0); ok(0); } - + +print("# Expecting $ifaces network interfaces.\n"); + # Make sure we got an ifSpeed for each interface. list[2] is ifSpeed repeater. ok(scalar @{$list[2]} == $ifaces); # Make sure we got an ifDescr for each interface. list[3] is ifDescr repeater. @@ -93,10 +84,10 @@ ok(scalar @{$list[3]} == $ifaces); if (defined($list[2][0])) { # Test for reasonable values from the agent. - ok($list[2][0]->tag eq ".1.3.6.1.2.1.2.2.1.5"); # Should be system.ifSpeed OID. - ok($list[2][0]->iid eq "1"); # Instance should be 1. + ok($list[2][0]->tag, ".1.3.6.1.2.1.2.2.1.5"); # Should be system.ifSpeed OID. + ok($list[2][0]->iid, "1"); # Instance should be 1. ok($list[2][0]->val =~ m/^\d+$/); # Number is all numeric - ok($list[2][0]->type eq "GAUGE"); # Number should be a gauge. + ok($list[2][0]->type, "GAUGE"); # Number should be a gauge. } else { ok(0); @@ -105,30 +96,23 @@ else { ok(0); } -if (defined($list[3][0])) { - ok($list[3][0]->tag eq ".1.3.6.1.2.1.2.2.1.2"); # Should be system.ifDescr OID. - ok($list[3][0]->iid eq "1"); # Instance should be 1. - - # The first interface is probably loopback. Check this. - ok($list[3][0]->type eq "OCTETSTR"); # Description is a string. - - # This might fail on systems that don't have lo0/loopback as their first - # interface. Please adjust accordingly. - $loopback = $list[3][0]->val; - if ($^O =~ /win32/i) { - ok(($loopback =~ /loopback/i)); - } elsif ($^O =~ /(irix|hpux)/i) { - # IRIX/HP-UX may have lo0 at the *end* of the interface list, - # so just check for a non-empty string - ok(($loopback ne '')); - } elsif ($^O eq 'freebsd') { - $loopback = $list[3][-1]->val; - ok(($loopback =~ /^lo/)); - } else { - ok(($loopback =~ /^lo/)); - } +print("# Looking up loopback network interface ...\n"); +ok(ref($list[3]), 'SNMP::VarList'); +my $found; +for my $ifdescr (@{$list[3]}) { + ok(ref($ifdescr), 'SNMP::Varbind'); + print("# " . $ifdescr->val . "\n"); + next if (!($ifdescr->val =~ /Software Loopback Interface/) and + !($ifdescr->val =~ /^lo/)); + $found = $ifdescr->val; + ok(1); + ok($ifdescr->tag, ".1.3.6.1.2.1.2.2.1.2"); # Should be system.ifDescr OID. + ok($ifdescr->iid =~ m/^\d+$/); # Instance should be 1. + ok($ifdescr->type, "OCTETSTR"); # Description is a string. + last; } -else { +if (!$found) { + ok(0); ok(0); ok(0); ok(0); @@ -136,13 +120,12 @@ else { } ############################################################################### -# Attempt to use the bulkwalk method to get only non-repeaters -# test 2 +print("# Attempt to use the bulkwalk method to get only non-repeaters.\n"); +print("# test 2\n"); $vars = new SNMP::VarList ( ['sysUpTime'], ['ifNumber'] ); # NON-repeaters $expect = scalar @$vars; @list = $s1->bulkwalk(2, 0, $vars); -#@list = $s1->bulkwalk(2, 16, $vars); ok($s1->{ErrorNum} == 0); # Did we get back the list of references to returned values? @@ -151,10 +134,10 @@ ok(scalar @list == $expect); if (defined($list[0][0])) { # Sanity check the returned values. list[0] is sysUptime nonrepeater. - ok($list[0][0]->tag eq ".1.3.6.1.2.1.1.3"); # check system.sysUptime OID - ok($list[0][0]->iid eq "0"); # check system.sysUptime.0 IID + ok($list[0][0]->tag, ".1.3.6.1.2.1.1.3"); # check system.sysUptime OID + ok($list[0][0]->iid, "0"); # check system.sysUptime.0 IID ok($list[0][0]->val =~ m/^\d+$/); # Uptime is numeric - ok($list[0][0]->type eq "TICKS"); # Uptime should be in ticks. + ok($list[0][0]->type, "TICKS"); # Uptime should be in ticks. } else { ok(0); @@ -165,11 +148,11 @@ else { if (defined($list[1][0])) { # Find out how many interfaces to expect. list[1] is ifNumber nonrepeater. - ok($list[1][0]->tag eq ".1.3.6.1.2.1.2.1"); # Should be system.ifNumber OID. - ok($list[1][0]->iid eq "0"); # system.ifNumber.0 IID. + ok($list[1][0]->tag, ".1.3.6.1.2.1.2.1"); # Should be system.ifNumber OID. + ok($list[1][0]->iid, "0"); # system.ifNumber.0 IID. ok($list[1][0]->val =~ m/^\d+$/); # Number is all numeric #XXX: test fails due SMIv1 codes being returned intstead of SMIv2... - #ok($list[1][0]->type eq "INTEGER32"); # Number should be integer. + #ok($list[1][0]->type, "INTEGER32"); # Number should be integer. $ifaces = $list[1][0]->val; } else { @@ -179,12 +162,12 @@ else { } ############################################################################### -# Attempt to use the bulkwalk method to get only repeated variables -# test 3 +print("# Attempt to use the bulkwalk method to get only repeated variables\n"); +print("# test 3\n"); $vars = new SNMP::VarList ( ['ifIndex'], ['ifSpeed'] ); # repeaters $expect = scalar @$vars; -@list = $s1->bulkwalk(0, 16, $vars); +@list = $s1->bulkwalk(0, 256, $vars); ok($s1->{ErrorNum} == 0); # Did we get back the list of references to returned values? @@ -199,11 +182,11 @@ ok(scalar @{$list[1]} == $ifaces); if (defined($list[0][0])) { # Test for reasonable values from the agent. - ok($list[0][0]->tag eq ".1.3.6.1.2.1.2.2.1.1"); # Should be system.ifIndex OID. - ok($list[0][0]->iid eq "1"); # Instance should be 1. + ok($list[0][0]->tag, ".1.3.6.1.2.1.2.2.1.1"); # Should be system.ifIndex OID. + ok($list[0][0]->iid, "1"); # Instance should be 1. ok($list[0][0]->val =~ m/^\d+$/); # Number is all numeric #XXX: test fails due SMIv1 codes being returned intstead of SMIv2... - #ok($list[0][0]->type eq "INTEGER32"); # Number should be an integer. + #ok($list[0][0]->type, "INTEGER32"); # Number should be an integer. } else { ok(0); @@ -212,10 +195,10 @@ else { } if (defined($list[1][0])) { - ok($list[1][0]->tag eq ".1.3.6.1.2.1.2.2.1.5"); # Should be system.ifSpeed OID. - ok($list[1][0]->iid eq "1"); # Instance should be 1. + ok($list[1][0]->tag, ".1.3.6.1.2.1.2.2.1.5"); # Should be system.ifSpeed OID. + ok($list[1][0]->iid, "1"); # Instance should be 1. ok($list[1][0]->val =~ m/^\d+$/); # Number is all numeric - ok($list[1][0]->type eq "GAUGE"); # Number should be a gauge. + ok($list[1][0]->type, "GAUGE"); # Number should be a gauge. } else { ok(0); @@ -228,9 +211,8 @@ else { # Asynchronous Bulkwalk Methods ###################################################################### # -# Attempt to use the bulkwalk method to get a few variables from the -# SNMP agent. -# test 4 +print("# Attempt to use the bulkwalk method to get a few variables from the SNMP agent.\n"); +print("# test 4\n"); sub async_cb1 { my ($vars, $list) = @_; ok(defined $list && ref($list) =~ m/ARRAY/); @@ -243,10 +225,10 @@ sub async_cb1 { if (defined($list->[0][0])) { # Sanity check the returned values. First is sysUptime nonrepeater. $vbr = $list->[0][0]; - ok($vbr->tag eq ".1.3.6.1.2.1.1.3"); # check system.sysUptime OID - ok($vbr->iid eq "0"); # check system.sysUptime.0 IID + ok($vbr->tag, ".1.3.6.1.2.1.1.3"); # check system.sysUptime OID + ok($vbr->iid, "0"); # check system.sysUptime.0 IID ok($vbr->val =~ m/^\d+$/); # Uptime is numeric - ok($vbr->type eq "TICKS"); # Uptime should be in ticks. + ok($vbr->type, "TICKS"); # Uptime should be in ticks. } else { ok(0); @@ -258,11 +240,11 @@ sub async_cb1 { if (defined($list->[1][0])) { # Find out how many interfaces to expect. Next is ifNumber nonrepeater. $vbr = $list->[1][0]; - ok($vbr->tag eq ".1.3.6.1.2.1.2.1"); # Should be system.ifNumber OID. - ok($vbr->iid eq "0"); # system.ifNumber.0 IID. + ok($vbr->tag, ".1.3.6.1.2.1.2.1"); # Should be system.ifNumber OID. + ok($vbr->iid, "0"); # system.ifNumber.0 IID. ok($vbr->val =~ m/^\d+$/); # Number is all numeric #XXX: test fails due SMIv1 codes being returned intstead of SMIv2... - # ok($vbr->type eq "INTEGER32"); # Number should be integer. + # ok($vbr->type, "INTEGER32"); # Number should be integer. $ifaces = $vbr->[2]; } else { @@ -276,10 +258,10 @@ sub async_cb1 { if (defined($list->[2][0])) { $vbr = $list->[2][0]; - ok($vbr->tag eq ".1.3.6.1.2.1.2.2.1.5"); # Should be ifSpeed OID - ok($vbr->iid eq "1"); # Instance should be 1. + ok($vbr->tag, ".1.3.6.1.2.1.2.2.1.5"); # Should be ifSpeed OID + ok($vbr->iid, "1"); # Instance should be 1. ok($vbr->val =~ m/^\d+$/); # Number is all numeric - ok($vbr->type eq "GAUGE"); # Should be a gauge. + ok($vbr->type, "GAUGE"); # Should be a gauge. ok(scalar @{$list->[3]} == $ifaces); } @@ -290,29 +272,18 @@ sub async_cb1 { ok(0); ok(0); } - - if (defined($list->[3][0])) { - $vbr = $list->[3][0]; - ok($vbr->tag eq ".1.3.6.1.2.1.2.2.1.2"); # Should be ifDescr OID - ok($vbr->iid eq "1"); # Instance should be 1. - - # The first interface is probably loopback. Check this. - ok($vbr->type eq "OCTETSTR"); - - # This might fail on systems that don't have lo0/loopback as their first - # interface. Please adjust accordingly. - if ($^O =~ /(irix|hpux)/i) { - # IRIX/HP-UX may have lo0 at the *end* of the interface list, - # so just check for a non-empty string - ok(($vbr->val ne '')); - } elsif ($^O eq 'freebsd') { - $vbr = $list->[3][-1]; - ok(($vbr->val =~ /^lo/)); - } else { - ok(($vbr->val =~ /^lo/)); - } + + for my $ifdescr (@{$list->[3]}) { + next if (!($ifdescr->val =~ /Software Loopback Interface/) and + !($ifdescr->val =~ /^lo/)); + ok(1); + # Should be system.ifDescr OID. + ok($ifdescr->tag, ".1.3.6.1.2.1.2.2.1.2"); + ok($ifdescr->iid >= 1); # Instance should be >= 1. + ok($ifdescr->type, "OCTETSTR"); # Description is a string. + last; } - else { + if (!defined($list->[3][0])) { ok(0); ok(0); ok(0); @@ -329,7 +300,7 @@ if ($^O =~ /win32/i) { warn "Win32/Win64 detected - skipping async calls\n"; } else { - @list = $s1->bulkwalk(2, 16, $vars, [ \&async_cb1, $vars ] ); + @list = $s1->bulkwalk(2, 256, $vars, [ \&async_cb1, $vars ] ); ok($s1->{ErrorNum} == 0); SNMP::MainLoop(); } diff --git a/perl/SNMP/t/conf.t b/perl/SNMP/t/conf.t index 9a37048..d9fe7e0 100644 --- a/perl/SNMP/t/conf.t +++ b/perl/SNMP/t/conf.t @@ -1,10 +1,9 @@ #!./perl +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } $ENV{'MIBS'} = ''; } @@ -13,12 +12,11 @@ BEGIN { # serious problem because they linked with static libraries instead of # shared ones as the memory space is different. +use Config; use Test; BEGIN {plan tests => 3} -my $envsep = ($^O =~ /win32/i) ? ';' : ':'; - -SNMP::setenv('SNMPCONFPATH', '.' . $envsep . 't', 1); +SNMP::setenv('SNMPCONFPATH', '.' . $Config{path_sep} . 't', 1); ok(1); # just start up @@ -26,8 +24,8 @@ use SNMP; use NetSNMP::default_store(':all'); # should be 0, as it's un-initialized -$myint = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_NUMERIC_TIMETICKS); +my $myint = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_NUMERIC_TIMETICKS); ok($myint == 0); diff --git a/perl/SNMP/t/dump-session.t b/perl/SNMP/t/dump-session.t index e94c9f2..6bb0cfe 100644 --- a/perl/SNMP/t/dump-session.t +++ b/perl/SNMP/t/dump-session.t @@ -1,23 +1,18 @@ #!./perl use strict; +use warnings; use Test; BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); plan tests => 1; } use SNMP; use Data::Dumper; -use vars qw($agent_port $comm $agent_host); require "t/startagent.pl"; +use vars qw($agent_host $agent_port $comm); # See also https://sourceforge.net/p/net-snmp/bugs/2488/ @@ -27,3 +22,5 @@ my $s = new SNMP::Session(DestHost=>$agent_host, Version=>1, Community=>$comm, print Dumper($s->get('anything')); ok(1); + +snmptest_cleanup(); diff --git a/perl/SNMP/t/get.t b/perl/SNMP/t/get.t index f88de65..e4228ae 100644 --- a/perl/SNMP/t/get.t +++ b/perl/SNMP/t/get.t @@ -1,19 +1,16 @@ #!./perl +use strict; +use warnings; +use Test; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); + plan tests => 17 } -use Test; -BEGIN { $n = 17; plan tests => $n } use SNMP; -use vars qw($agent_port $comm $agent_host); require "t/startagent.pl"; +use vars qw($agent_host $agent_port $comm); $SNMP::debugging = 0; $SNMP::verbose = 0; $SNMP::dump_packet = 0; @@ -26,7 +23,7 @@ my $name = "gmarzot\@nortelnetworks.com"; my $s1; # create list of varbinds for GETS, val field can be null or omitted -$vars = new SNMP::VarList ( +my $vars = new SNMP::VarList( ['sysDescr', '0', ''], ['sysObjectID', '0'], ['sysUpTime', '0'], @@ -86,7 +83,7 @@ $vars = new SNMP::VarList ( ###################################################################### # Get the standard Vars and check that we got some defined vars back -@ret = $s1->get($vars); +my @ret = $s1->get($vars); ok(!$s1->{ErrorStr} and defined($ret[0])); #print STDERR "Error string = $s1->{ErrorStr}:$s1->{ErrorInd}\n"; ###################################################################### @@ -96,7 +93,7 @@ ok($#ret == $#{$vars}); ################################################ # Test for a string -$contact = $s1->get('sysContact.0'); +my $contact = $s1->get('sysContact.0'); #print("contact is : $contact\n"); ok( defined($contact)); @@ -106,49 +103,49 @@ $name = $s1->get('sysName.0'); ok( defined($name)); -$location = $s1->get('sysLocation.0'); +my $location = $s1->get('sysLocation.0'); #print("Location is : $location\n"); ok( defined($location)); ######################################### # Test for an integer -$ttl = $s1->get('ipDefaultTTL.0'); +my $ttl = $s1->get('ipDefaultTTL.0'); #print("TTL is : $ttl\n"); ok( defined($ttl)); ######################################## # Test for a TimeTicks -$time = $s1->get('sysUpTime.0'); +my $time = $s1->get('sysUpTime.0'); #print("up time is : $time hundredths of a second\n"); ok( defined($time)); ######################################### #Test for a Counter32 type. -$totalDatagramsReceived = $s1->get('ipInHdrErrors.0'); +my $totalDatagramsReceived = $s1->get('ipInHdrErrors.0'); #print("totalDatagramsReceived is : $totalDatagramsReceived\n"); ok( defined($totalDatagramsReceived)); ################################################ #Test for a PhysicalAddr type -$physaddr = $s1->get('ipNetToMediaPhysAddress.0'); +my $physaddr = $s1->get('ipNetToMediaPhysAddress.0'); #print("physical addr is : $physaddr \n"); ok( defined($physaddr)); ############################################## #Test for a IpAddr type -$ipaddr = $s1->get('ipAdEntAddr.0'); +my $ipaddr = $s1->get('ipAdEntAddr.0'); #print("Ip address is : $ipaddr \n"); ok( defined($ipaddr)); ############################################## #Test for a OID type -$trapOID = $s1->get('snmpTrapOID.0'); +my $trapOID = $s1->get('snmpTrapOID.0'); #print("trap OID is : $trapOID $s1->{ErrorStr}\n"); ok( defined($trapOID)); ############################################## @@ -193,20 +190,20 @@ ok(defined($oid)); ############################################# # String test -$descr = $s1->get('sysORDescr.1'); +my $descr = $s1->get('sysORDescr.1'); #print("Sys Descr is : $descr\n"); ok(defined($descr)); ############################################# # string String test -$ifname = $s1->get('ifDescr.1'); +my $ifname = $s1->get('ifDescr.1'); #print("ifname is : $ifname $s1->{ErrorStr}\n"); ok(defined($ifname)); ############################################# # Try getting some unknown(wrong ?) data -$unknown = $s1->get('ifmyData.0'); +my $unknown = $s1->get('ifmyData.0'); ok(!defined($unknown)); ############################################## diff --git a/perl/SNMP/t/getnext.t b/perl/SNMP/t/getnext.t index 417ae91..d789bd7 100644 --- a/perl/SNMP/t/getnext.t +++ b/perl/SNMP/t/getnext.t @@ -1,20 +1,17 @@ #!./perl +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); } use Test; BEGIN { plan tests => 9 } use SNMP; -use vars qw($agent_port $comm $agent_host); require "t/startagent.pl"; +use vars qw($agent_host $agent_port $comm); my $junk_oid = ".1.3.6.1.2.1.1.1.1.1.1"; @@ -24,10 +21,6 @@ my $junk_host = 'no.host.here'; my $name = "gmarzot\@nortelnetworks.com"; $SNMP::debugging = 0; -my $n = 9; # Number of tests to run - -#print "1..$n\n"; -#if ($n == 0) { exit 0; } # create list of varbinds for GETS, val field can be null or omitted my $vars = new SNMP::VarList ( diff --git a/perl/SNMP/t/mib.t b/perl/SNMP/t/mib.t index f4ba91a..98f0103 100644 --- a/perl/SNMP/t/mib.t +++ b/perl/SNMP/t/mib.t @@ -2,14 +2,11 @@ # Written by John Stoffel (jfs@fluent.com) - 10/13/1997 +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); $ENV{'MIBS'} = 'ALL'; } @@ -17,31 +14,36 @@ BEGIN { $SNMP::save_descriptions = 1; use Test; -BEGIN {plan tests => 35} +BEGIN {plan tests => 38} use SNMP; +use Data::Dumper; $SNMP::verbose = 0; $SNMP::best_guess = 2; -use vars qw($bad_oid); require "t/startagent.pl"; +use vars qw($bad_name $bad_oid $name $name_long $name_module $name_module2 + $name_module_long $name_module_long2 $oid); +require "t/startagent.pl"; + +my $DEBUG; ############################# 1 ###################################### #check if my $res = $SNMP::MIB{sysDescr}{label}; -#print("Label is:$res\n"); +print STDERR ("Test 1: label is $res\n") if ($DEBUG); ok("sysDescr" eq $res); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ############################# 2 ###################################### $res = $SNMP::MIB{sysDescr}{objectID}; -#print("OID is: $res\n"); +print STDERR ("Test 2: OID is $res\n") if ($DEBUG); ok(defined($res)); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ############################# 3 ###################################### $res = $SNMP::MIB{sysDescr}{access}; -#print("access is: $res\n"); +print STDERR ("Test 3: access is $res\n") if ($DEBUG); ok($res eq 'ReadOnly'); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ############################## 4 ################################### $res = $SNMP::MIB{sysLocation}{access}; #$res = $SNMP::MIB{sysORIndex}{access}; @@ -51,60 +53,61 @@ $res = $SNMP::MIB{sysLocation}{type}; ok($res eq 'OCTETSTR'); ############################# 6 #################################### $res = $SNMP::MIB{sysLocation}{status}; -#print STDERR ("status is: $res\n"); +print STDERR ("Test 6: status is $res\n") if ($DEBUG); ok($res eq 'Current'); -#print STDERR ("\n"); +print STDERR ("\n") if ($DEBUG); ############################# 7 ################################# $res = $SNMP::MIB{sysORTable}{access}; -#print("access is: $res\n"); +print STDERR ("Test 7: access is $res\n") if ($DEBUG); ok($res eq 'NoAccess'); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ############################# 8 ############################### $res = $SNMP::MIB{sysLocation}{subID}; -#print("subID is: $res\n"); +print STDERR ("Test 8: subID is $res\n") if ($DEBUG); ok(defined($res)); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ############################ 9 ############################## $res = $SNMP::MIB{sysLocation}{syntax}; -#print("syntax is: $res\n"); +print STDERR ("Test 9: syntax is $res\n") if ($DEBUG); ok($res eq 'DisplayString'); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ############################ 10 ########################### $res = $SNMP::MIB{ipAdEntAddr}{syntax}; +print STDERR ("Test 10: syntax is $res\n") if ($DEBUG); ok($res eq 'IPADDR'); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ########################## 11 ########################## $res = $SNMP::MIB{atNetAddress}{syntax}; -#print ("syntax is: $res\n"); +print STDERR ("Test 11: syntax is $res\n") if ($DEBUG); ok($res eq 'NETADDR'); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ######################## 12 ############################### $res = $SNMP::MIB{ipReasmOKs}{syntax}; -#print("syntax is: $res\n"); +print STDERR ("Test 12: syntax is $res\n") if ($DEBUG); ok($res eq 'COUNTER'); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ###################### 13 ############################## $res = $SNMP::MIB{sysDescr}{moduleID}; -#print("Module ID is: $res\n"); +print STDERR ("Test 13: module ID is $res\n") if ($DEBUG); ok(defined($res)); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ###################### 14 ######################### -$des = $SNMP::MIB{atNetAddress}{description}; -#print("des is --> $des\n"); +my $des = $SNMP::MIB{atNetAddress}{description}; +print STDERR ("Test 14: des is $des\n") if ($DEBUG); ok(defined($des)); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ###################### 15 ######################### $res = $SNMP::MIB{atNetAddress}{nextNode}; -#print("res is --> $res\n"); +print STDERR ("Test 15: res is $res\n") if ($DEBUG); ok(ref($res) eq "HASH"); -#print("\n"); +print STDERR ("\n") if ($DEBUG); ######################## 16 ######################### $res = $SNMP::MIB{sysDescr}{children}; -#print("res is --> $res\n"); +print STDERR ("Test 16: res is " . Dumper($res) . "\n") if ($DEBUG); ok(ref($res) eq "ARRAY"); -#print("\n"); +print STDERR ("\n") if ($DEBUG); #################### 17 ######################### $res = $SNMP::MIB{sysDescr}{badField}; @@ -113,17 +116,15 @@ ok(!defined($res)); ###################### 18 ######################### $res = $SNMP::MIB{sysDescr}{hint}; -#print("res is --> $res\n"); -#XXX: test fails due SMIv1 codes being returned intstead of SMIv2... -#ok(defined($res) && $res =~ /^255a/); -#print("\n"); +print STDERR ("Test 18: res is " . Dumper($res) . "\n") if ($DEBUG); +ok(defined($res) && $res =~ /^255a/); +print STDERR ("\n") if ($DEBUG); ###################### 19 ######################### $res = $SNMP::MIB{ifPhysAddress}{hint}; -#print("res is --> $res\n"); -#XXX: test fails due SMIv1 codes being returned intstead of SMIv2... -#ok(defined($res) && $res =~ /^1x:/); -#print("\n"); +print STDERR ("Test 19: res is " . Dumper($res) . "\n") if ($DEBUG); +ok(defined($res) && $res =~ /^1x:/); +print STDERR ("\n") if ($DEBUG); ###################### some translate tests ####### @@ -139,8 +140,7 @@ ok(!defined($type1)); # getType() supports numeric OIDs now my $type2 = SNMP::getType($oid); -#XXX: test fails due SMIv1 codes being returned intstead of SMIv2... -#ok(defined($type2) && $type2 =~ /OCTETSTR/); +ok(defined($type2) && $type2 =~ /OCTETSTR/); ###################################################################### # This tests that sysDescr returns a valid type. @@ -151,7 +151,7 @@ ok(defined($type3)); ###################################################################### # Translation tests from Name -> OID # sysDescr to .1.3.6.1.2.1.1.1 -$oid_tag = SNMP::translateObj($name); +my $oid_tag = SNMP::translateObj($name); ok($oid eq $oid_tag); ###################################################################### @@ -176,7 +176,7 @@ ok(!defined($oid_tag)); ###################################################################### # OID -> name # .1.3.6.1.2.1.1.1 to sysDescr -$name_tag = SNMP::translateObj($oid); +my $name_tag = SNMP::translateObj($oid); ok($name eq $name_tag); ###################################################################### @@ -184,7 +184,6 @@ ok($name eq $name_tag); # .1.3.6.1.2.1.1.1 to RFC1213-MIB::sysDescr or # .1.3.6.1.2.1.1.1 to SNMPv2-MIB::sysDescr $name_tag = SNMP::translateObj($oid,0,1); -$name_module2 = $name_module2; # To eliminate 'only use once' variable warning ok(($name_module eq $name_tag) || ($name_module2 eq $name_tag)); ###################################################################### @@ -197,8 +196,6 @@ ok($name_long eq $name_tag); # OID -> name # .1.3.6.1.2.1.1.1 to RFC1213-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr or # .1.3.6.1.2.1.1.1 to SNMPv2-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr -$name_module_long = $name_module_long; # To eliminate 'only use once' variable warning -$name_module_long2 = $name_module_long2; # To eliminate 'only use once' variable warning $name_tag = SNMP::translateObj($oid,1,1); ok(($name_module_long eq $name_tag) || ($name_module_long2 eq $name_tag)); @@ -213,9 +210,9 @@ ok($name ne $name_tag); ###################################################################### # ranges -$node = $SNMP::MIB{snmpTargetAddrMMS}; +my $node = $SNMP::MIB{snmpTargetAddrMMS}; ok($node); -$ranges = $node->{ranges}; +my $ranges = $node->{ranges}; ok($ranges and ref $ranges eq 'ARRAY'); ok(@$ranges == 2); ok($$ranges[0]{low} == 0); diff --git a/perl/SNMP/t/mibload.t b/perl/SNMP/t/mibload.t index e44748a..330a010 100644 --- a/perl/SNMP/t/mibload.t +++ b/perl/SNMP/t/mibload.t @@ -1,54 +1,35 @@ #!./perl +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); } +use File::Spec; use Test; BEGIN {plan tests => 7} use SNMP; require "t/startagent.pl"; - use vars qw($mibdir); $SNMP::verbose = 0; -my $mib_file = 't/mib.txt'; +my $mib_file = File::Spec->catfile('t', 'mib.txt'); my $junk_mib_file = 'mib.txt'; -my $mibfile1; -my @mibdir; -my $mibfile2; - -if ($^O =~ /win32/i) { - $mibdir =~ s"/"\\"g; - $mibfile1 = "$mibdir\\TCP-MIB.txt"; - @mibdir = ("$mibdir"); - $mibfile2 = "$mibdir\\IPV6-TCP-MIB.txt"; -} -else { - $mibfile1 = "$mibdir/TCP-MIB.txt"; - @mibdir = ("$mibdir"); - $mibfile2 = "$mibdir/IPV6-TCP-MIB.txt"; -} - -if ($^O =~ /win32/i) { - $mibdir =~ s"/"\\"g; -} +my $mibfile1 = File::Spec->catfile($mibdir, "TCP-MIB.txt"); +my @mibdir = ("$mibdir"); +my $mibfile2 = File::Spec->catfile($mibdir, "IPV6-TCP-MIB.txt"); ###################################################################### # See if we can find a mib to use, return of 0 means the file wasn't # found or isn't readable. -$res = SNMP::setMib($junk_mib_file,1); +my $res = SNMP::setMib($junk_mib_file,1); ok(defined(!$res)); ###################################################################### # Now we give the right name @@ -81,9 +62,9 @@ ok(!defined($res)); ######################## 5 ############################ # add mib file -$res1 = SNMP::addMibFiles($mibfile1); +my $res1 = SNMP::addMibFiles($mibfile1); ok(defined($res1)); -$res2 = SNMP::addMibFiles($mibfile2); +my $res2 = SNMP::addMibFiles($mibfile2); ok(defined($res2)); $res = $SNMP::MIB{ipv6TcpConnState}{moduleID}; diff --git a/perl/SNMP/t/notify.t b/perl/SNMP/t/notify.t index 72600fa..963af6c 100644 --- a/perl/SNMP/t/notify.t +++ b/perl/SNMP/t/notify.t @@ -1,19 +1,17 @@ #!./perl +use strict; +use warnings; +use Test; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); + plan tests => 11; } -use Test; -BEGIN { $n = 11; plan tests => $n } use SNMP; -use vars qw($agent_port $comm $comm2 $trap_port $agent_host $sec_name $priv_pass $auth_pass $bad_name); require 't/startagent.pl'; +use vars qw($agent_host $agent_port $auth_pass $bad_name $comm $comm2 + $priv_pass $sec_name $trap_port); $SNMP::debugging = 0; my $res; @@ -30,7 +28,10 @@ ok(defined($s1)); ######################## 2 ############################ # test v1 trap if (defined($s1)) { - $res = $s1->trap(enterprise => $enterprise, agent=>$agent_host, generic=>$generic,[[sysContact, 0, 'root@localhost'], [sysLocation, 0, 'here']] ); + $res = $s1->trap(enterprise => $enterprise, agent=>$agent_host, + generic => $generic, + [['sysContact', 0, 'root@localhost'], + ['sysLocation', 0, 'here']] ); } ok($res =~ /^0 but true/); @@ -38,7 +39,8 @@ ok($res =~ /^0 but true/); # test with wrong varbind undef $res; if (defined($s1)) { - $res = $s1->trap([[$bad_name, 0, 'root@localhost'], [sysLocation, 0, 'here']] ); + $res = $s1->trap([[$bad_name, 0, 'root@localhost'], + ['sysLocation', 0, 'here']] ); #print("res is $res\n"); } ok(!defined($res)); @@ -54,7 +56,9 @@ ok(defined($s2)); # test v2 trap undef $res; if (defined($s2)) { - $res = $s2->trap(uptime=>200, trapoid=>'coldStart',[[sysContact, 0, 'root@localhost'], [sysLocation, 0, 'here']] ); + $res = $s2->trap(uptime=>200, trapoid=>'coldStart', + [['sysContact', 0, 'root@localhost'], + ['sysLocation', 0, 'here']] ); #print("res is $res\n"); } ok($res =~ /^0 but true/); @@ -62,7 +66,8 @@ ok($res =~ /^0 but true/); # no trapoid and uptime given. Should take defaults... my $ret; if (defined($s2)) { - $ret = $s2->trap([[sysContact, 0, 'root@localhost'], [sysLocation, 0, 'here']] ); + $ret = $s2->trap([['sysContact', 0, 'root@localhost'], + ['sysLocation', 0, 'here']] ); #print("res is $ret\n"); } ok(defined($ret)); @@ -85,20 +90,27 @@ ok(defined($s3)); ######################## 9 ############################ if (defined($s3)) { - $res = $s3->inform(uptime=>111, trapoid=>'coldStart', [[sysContact, 0, 'root@localhost'], [sysLocation, 0, 'here']] ); + $res = $s3->inform(uptime=>111, trapoid=>'coldStart', + [['sysContact', 0, 'root@localhost'], + ['sysLocation', 0, 'here']] ); } -ok($res =~ /^0 but true/); +ok(defined($res) && $res =~ /^0 but true/); ######################## 10 ############################ # Fire up a v3 trap session. -$s3 = new SNMP::Session(Version=>3, DestHost=> $agent_host, RemotePort=>$trap_port, SecName => $sec_name, SecLevel => authPriv, AuthPass => $auth_pass, PrivPass => $priv_pass); +$s3 = new SNMP::Session(Version => 3, DestHost=> $agent_host, + RemotePort => $trap_port, SecName => $sec_name, + SecLevel => 'authPriv', AuthPass => $auth_pass, + PrivPass => $priv_pass); ok(defined($s3)); ######################## 11 ############################ undef $res; if (defined($s3)) { - $res = $s3->inform(uptime=>111, trapoid=>'coldStart', [[sysContact, 0, 'root@localhost'], [sysLocation, 0, 'here']] ); - print "res = $res\n"; + $res = $s3->inform(uptime=>111, trapoid=>'coldStart', + [['sysContact', 0, 'root@localhost'], + ['sysLocation', 0, 'here']] ); + print "# res = " . ($res ? $res : "(undefined)") . "\n"; } ok(defined($res) && ($res =~ /^0 but true/)); diff --git a/perl/SNMP/t/readsnmptest.pl b/perl/SNMP/t/readsnmptest.pl new file mode 100644 index 0000000..db70f84 --- /dev/null +++ b/perl/SNMP/t/readsnmptest.pl @@ -0,0 +1,45 @@ +#!./perl + +use strict; +use warnings; +use Cwd qw(getcwd); +use Exporter; + +our @ISA = 'Exporter'; +our @EXPORT_OK = qw($agent_host $agent_port $mibdir $snmpd_cmd $snmptrapd_cmd); +our ($agent_host, $agent_port, $mibdir, $snmpd_cmd, $snmptrapd_cmd); + +if (open(CMD, "<../SNMP/t/snmptest.cmd")) { + while (my $line = ) { + if ($line =~ /HOST\s*=>\s*(.*?)\s+$/) { + $agent_host = $1; + } elsif ($line =~ /MIBDIR\s*=>\s*(.*?)\s+$/) { + $mibdir = $1; + } elsif ($line =~ /AGENT_PORT\s*=>\s*(.*?)\s+$/) { + $agent_port = $1; + } elsif ($line =~ /SNMPD\s*=>\s*(.*?)\s+$/) { + $snmpd_cmd = $1; + } elsif ($line =~ /SNMPTRAPD\s*=>\s*(.*?)\s+$/) { + $snmptrapd_cmd = $1; + } + } # end of while + close CMD; +} else { + die ("Could not start agent. Couldn't find snmptest.cmd file\n"); +} + +# On Windows %ENV changes only affect new processes but not the current +# process. Hence write the MIB dir into an snmp.conf file instead of setting +# $ENV{'MIBDIRS'}. +open(H, ">snmp.conf") or die "Failed to open snmp.conf: $!"; +print H "mibdirs +$mibdir\n"; +close(H); +# use SNMP; +# SNMP::register_debug_tokens("get_mib_directory"); +# SNMP::register_debug_tokens("read_config"); +use NetSNMP::default_store (':all'); +netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CONFIGURATION_DIR, + getcwd()) == 0 or + die "Failed to set configuration directory"; + +1; diff --git a/perl/SNMP/t/session.t b/perl/SNMP/t/session.t index 3f51386..9e0dcea 100644 --- a/perl/SNMP/t/session.t +++ b/perl/SNMP/t/session.t @@ -1,19 +1,17 @@ #!./perl +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); } use Test; BEGIN { plan tests => 5} use SNMP; -use vars qw($agent_port $comm $agent_host $bad_auth_pass $auth_pass $sec_name $bad_sec_name $bad_version $bad_priv_pass $priv_pass); require "t/startagent.pl"; +use vars qw($agent_host $agent_port $auth_pass $bad_auth_pass $bad_priv_pass + $bad_sec_name $bad_version $comm $priv_pass $sec_name); $SNMP::debugging = 0; @@ -50,10 +48,9 @@ ok(defined($s3)); #print STDERR "Error string1 = $s3->{ErrorStr}:$s3->{ErrorInd}\n"; #print("\n"); #####################=== 4 ====########################################### -#create a V3 session by setting an IP address/port not running an agent +#create a V3 session with an IP address/port not running an agent my $s4 = new SNMP::Session (Version => 3, RemotePort => 1002, Retries => 0); -# engineId discovery should fail resulting in session creation failure (undef) -ok(!defined($s4)); +ok(defined($s4)); #print STDERR "Error string1 = $s4->{ErrorStr}:$s4->{ErrorInd}\n"; #print("\n"); ###################### 5 ########################################### diff --git a/perl/SNMP/t/set.t b/perl/SNMP/t/set.t index 9925654..0d81cc3 100644 --- a/perl/SNMP/t/set.t +++ b/perl/SNMP/t/set.t @@ -1,19 +1,16 @@ #!./perl +use strict; +use warnings; + BEGIN { - unless(grep /blib/, @INC) { - chdir 't' if -d 't'; - @INC = '../lib' if -d '../lib'; - } eval "use Cwd qw(abs_path)"; - $ENV{'SNMPCONFPATH'} = 'nopath'; - $ENV{'MIBDIRS'} = '+' . abs_path("../../mibs"); } use Test; BEGIN { plan tests => 7 } use SNMP; -use vars qw($agent_port $comm $agent_host); require "t/startagent.pl"; +use vars qw($agent_host $agent_port $comm); my $junk_oid = ".1.3.6.1.2.1.1.1.1.1.1"; @@ -23,10 +20,6 @@ my $junk_host = 'no.host.here'; my $name = "gmarzot\@nortelnetworks.com"; $SNMP::debugging = 0; -$n = 15; # Number of tests to run - -#print "1..$n\n"; -if ($n == 0) { exit 0; } # create list of varbinds for GETS, val field can be null or omitted my $vars = new SNMP::VarList ( @@ -82,10 +75,10 @@ my $vars = new SNMP::VarList ( ####################### 2 ########################################## # Set some value and see if the value is set properly. -$originalLocation = $s1->get('sysLocation.0'); -$value = 'Router Management Labs'; +my $originalLocation = $s1->get('sysLocation.0'); +my $value = 'Router Management Labs'; $s1->set('sysLocation.0', $value); -$finalvalue = $s1->get('sysLocation.0'); +my $finalvalue = $s1->get('sysLocation.0'); ok($originalLocation ne $finalvalue); #print STDERR "Error string = $s1->{ErrorStr}:$s1->{ErrorInd}\n"; #print("set value is: $finalvalue\n\n"); @@ -111,9 +104,9 @@ $s1->set('sysLocation.0', $originalLocation); ####################### 4 ##################################### # Test for an integer (READ-ONLY) -$originalservice = $s1->get('sysServices.0'); +my $originalservice = $s1->get('sysServices.0'); #print("services is: $originalservice\n"); -$junk_service = "Nortel Networks"; +my $junk_service = "Nortel Networks"; $s1->set('sysServices.0', $junk_service); $finalvalue = $s1->get('sysServices.0'); @@ -130,9 +123,9 @@ $s1->set('sysServices.0',$originalservice); # If any other value is tried to be set, it doesn't set and # retains the old value. -$originalTrap = $s1->get('snmpEnableAuthenTraps.0'); +my $originalTrap = $s1->get('snmpEnableAuthenTraps.0'); #print("trap is -- $originalTrap\n"); -$junk_trap = "Nortel Networks"; +my $junk_trap = "Nortel Networks"; $s1->set('snmpEnableAuthenTraps.0', $junk_trap); $finalvalue = $s1->get('snmpEnableAuthenTraps.0'); #print("final trap is: $finalvalue\n"); @@ -201,9 +194,9 @@ ok($s1->{ErrorStr} =~ /^Bad/ ); # OID test my $oldoid = $s1->get("sysORID.1"); #print("OID is : $oldoid\n"); -$junk_OID = ".6.6.6.6.6.6"; +my $junk_OID = ".6.6.6.6.6.6"; $s1->set('sysORID.1', $junk_OID); -$newOID = $s1->get("sysORID.1"); +my $newOID = $s1->get("sysORID.1"); #print("new oid is $newOID\n"); ok($oldoid eq $newOID); #print STDERR "Error string = $s1->{ErrorStr}:$s1->{ErrorInd}\n"; @@ -211,7 +204,7 @@ ok($oldoid eq $newOID); ################ 14 ########################## # Try setting an unregistered OID. -$junk_data = 'hehehe'; +my $junk_data = 'hehehe'; $s1->set('ifmyData.0', $junk_data); #print STDERR "Error string = $s1->{ErrorStr}:$s1->{ErrorInd}\n"; diff --git a/perl/SNMP/t/startagent.pl b/perl/SNMP/t/startagent.pl index 3e92c12..fb61ec7 100644 --- a/perl/SNMP/t/startagent.pl +++ b/perl/SNMP/t/startagent.pl @@ -1,44 +1,61 @@ +#!./perl + +use strict; +use warnings; +use Exporter; + +#Open the snmptest.cmd file and get the info +require "t/readsnmptest.pl"; +use vars qw($agent_host $agent_port $mibdir $snmpd_cmd $snmptrapd_cmd); + +our @ISA = 'Exporter'; +our @EXPORT_OK = qw($agent_host $agent_port $mibdir +$trap_port $comm $comm2 $comm3 $sec_name $oid $name +$name_module $name_module2 $name_long $name_module_long $name_module_long2 +$auth_pass $priv_pass $bad_comm $bad_name $bad_oid $bad_port $bad_host +$bad_auth_pass $bad_priv_pass $bad_sec_name $bad_version); + # common parameters used in SNMP::Session creation and tests -$agent_host = 'localhost'; -$agent_port = 8765; -$trap_port = 8764; -$mibdir = '/usr/local/share/snmp/mibs'; -$comm = 'v1_private'; -$comm2 = 'v2c_private'; -$comm3 = 'v3_private'; -$sec_name = 'v3_user'; -$oid = '.1.3.6.1.2.1.1.1'; -$name = 'sysDescr'; -$name_module = 'RFC1213-MIB::sysDescr'; -$name_module2 = 'SNMPv2-MIB::sysDescr'; -$name_long = '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr'; -$name_module_long = 'RFC1213-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr'; -$name_module_long2 = 'SNMPv2-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr'; -$auth_pass = 'test_pass_auth'; -$priv_pass = 'test_pass_priv'; - -# don't use any .conf files other than those specified. -$ENV{'SNMPCONFPATH'} |= "bogus"; +$agent_host = 'localhost' if (!defined($agent_host)); +$agent_port = 8765 if (!defined($agent_port)); +our $trap_port = 8764; +$mibdir = '/usr/local/share/snmp/mibs' if (!defined($mibdir)); +our $comm = 'v1_private'; +our $comm2 = 'v2c_private'; +our $comm3 = 'v3_private'; +our $sec_name = 'v3_user'; +our $oid = '.1.3.6.1.2.1.1.1'; +our $name = 'sysDescr'; +our $name_module = 'RFC1213-MIB::sysDescr'; +our $name_module2 = 'SNMPv2-MIB::sysDescr'; +our $name_long = '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr'; +our $name_module_long = 'RFC1213-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr'; +our $name_module_long2 = 'SNMPv2-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr'; +our $auth_pass = 'test_pass_auth'; +our $priv_pass = 'test_pass_priv'; # erroneous input to test failure cases -$bad_comm = 'BAD_COMMUNITY'; -$bad_name = "badName"; -$bad_oid = ".1.3.6.1.2.1.1.1.1.1.1"; -$bad_host = 'bad.host.here'; -$bad_port = '9999999'; -$bad_auth_pass = 'bad_auth_pass'; -$bad_priv_pass = 'bad_priv_pass'; -$bad_sec_name = 'bad_sec_name'; -$bad_version = 7; - -local $snmpd_cmd; -local $snmptrapd_cmd; -my $line; +our $bad_comm = 'BAD_COMMUNITY'; +our $bad_name = "badName"; +our $bad_oid = ".1.3.6.1.2.1.1.1.1.1.1"; +our $bad_host = 'bad.host.here'; +our $bad_port = '9999999'; +our $bad_auth_pass = 'bad_auth_pass'; +our $bad_priv_pass = 'bad_priv_pass'; +our $bad_sec_name = 'bad_sec_name'; +our $bad_version = 7; if ($^O =~ /win32/i) { require Win32::Process; } +# Variant of sleep that accepts a floating point number as argument. +sub delay { + my ($timeout) = @_; + + select(undef, undef, undef, $timeout); +} + sub run_async { my ($pidfile, $cmd, @args) = @_; if (-r "$cmd" and -x "$cmd") { @@ -49,8 +66,8 @@ sub run_async { system "$cmd @args 2>&1"; } # Wait at most three seconds for the pid file to appear. - for ($i = 0; ($i < 3) && ! (-r "$pidfile"); ++$i) { - sleep 1; + for (my $i = 0; ($i < 30) && ! (-r "$pidfile"); ++$i) { + delay 0.1; } } else { warn "Couldn't run $cmd\n"; @@ -58,52 +75,40 @@ sub run_async { } sub snmptest_cleanup { - kill_by_pid_file("t/snmpd.pid"); + my $ignore_failures = shift; + + kill_by_pid_file("t/snmpd.pid", $ignore_failures); unlink("t/snmpd.pid"); - kill_by_pid_file("t/snmptrapd.pid"); + kill_by_pid_file("t/snmptrapd.pid", $ignore_failures); unlink("t/snmptrapd.pid"); } sub kill_by_pid_file { - if ((-e "$_[0]") && (-r "$_[0]")) { - if ($^O !~ /win32/i) { - # Unix or Windows + Cygwin. - system "kill `cat $_[0]` > /dev/null 2>&1"; - } else { - # Windows + MSVC or Windows + MinGW. - open(H, "<$_[0]"); - my $pid = (); - close (H); - if ($pid > 0) { - Win32::Process::KillProcess($pid, 0) - } - } + my $pidfile = shift; + my $ignore_failures = shift; + + if (!open(H, "<$pidfile")) { + return; + } + my $pid = (); + close (H); + if (!$pid) { + defined($ignore_failures) or die "Reading $pidfile failed\n"; + return; + } + if ($^O !~ /win32/i) { + # Unix or Windows + Cygwin. + system "kill $pid > /dev/null 2>&1"; + } else { + # Windows + MSVC or Windows + MinGW. + Win32::Process::KillProcess($pid, 0); } + return 1; } # Stop any processes started during a previous test. -snmptest_cleanup(); - -#Open the snmptest.cmd file and get the info -if (open(CMD, ") { - if ($line =~ /HOST\s*=>\s*(.*?)\s+$/) { - $agent_host = $1; - } elsif ($line =~ /MIBDIR\s*=>\s*(.*?)\s+$/) { - $mibdir = $1; - } elsif ($line =~ /AGENT_PORT\s*=>\s*(.*?)\s+$/) { - $agent_port = $1; - } elsif ($line =~ /SNMPD\s*=>\s*(.*?)\s+$/) { - $snmpd_cmd = $1; - } elsif ($line =~ /SNMPTRAPD\s*=>\s*(.*?)\s+$/) { - $snmptrapd_cmd = $1; - } - } # end of while - close CMD; -} else { - die ("Could not start agent. Couldn't find snmptest.cmd file\n"); -} +snmptest_cleanup(1); # Start snmpd and snmptrapd. diff --git a/perl/TrapReceiver/Makefile.PL b/perl/TrapReceiver/Makefile.PL index 874ee21..1852332 100644 --- a/perl/TrapReceiver/Makefile.PL +++ b/perl/TrapReceiver/Makefile.PL @@ -1,15 +1,15 @@ -use ExtUtils::MakeMaker; +use strict; +use warnings; +use File::Basename; require 5; use Config; -use Getopt::Long; -my $lib_version; -my %MakeParams = (); +use MakefileSubs; -%MakeParams = InitMakeParams(); +my $lib_version; -WriteMakefile(%MakeParams); +WriteMakefile(TrapReceiverInitMakeParams()); -Check_Version(); +Check_Version($lib_version); if (eval {require ExtUtils::Constant; 1}) { # If you edit these definitions to change the constants used by this module, @@ -37,13 +37,13 @@ if (eval {require ExtUtils::Constant; 1}) { } } -sub InitMakeParams { +sub TrapReceiverInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::TrapReceiver', 'VERSION_FROM' => 'TrapReceiver.pm', # finds $VERSION 'XSPROTOARG' => '-prototypes', - 'PREREQ_PM' => { NetSNMP::OID => 5.02 }, + 'PREREQ_PM' => { 'NetSNMP::OID' => 5.02 }, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'TrapReceiver.pm', AUTHOR => @@ -52,20 +52,20 @@ sub InitMakeParams { ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; - $agent_link_lib = 'netsnmpagent'; - $mibs_link_lib = 'netsnmpmibs'; - $trapd_link_lib = 'netsnmptrapd'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; + my $agent_link_lib = 'netsnmpagent'; + my $mibs_link_lib = 'netsnmpmibs'; + my $trapd_link_lib = 'netsnmptrapd'; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -75,16 +75,16 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib -l$agent_link_lib " . + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib -l$agent_link_lib " . "-l$mibs_link_lib -l$trapd_link_lib "; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -101,173 +101,28 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib -l$agent_link_lib -l$mibs_link_lib -l$trapd_link_lib "; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts(); - $Params{'LDDLFLAGS'} = "$Config{lddlflags} " . `$opts->{'nsconfig'} --ldflags`; - $Params{'LIBS'} = '-lnetsnmptrapd ' . `$opts->{'nsconfig'} --base-agent-libs`; + $Params{'LIBS'} = '-lnetsnmptrapd ' . `$opts->{'nsconfig'} --base-agent-libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - if (!$ENV{'NETSNMP_CCFLAGS'}) { - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - } else { - $Params{'CCFLAGS'} = $ENV{'NETSNMP_CCFLAGS'}; - } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../apps/.libs -L../../apps -L../../agent/.libs -L../../agent -L../../snmplib/.libs -L../../snmplib " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; + $Params{'LIBS'} = + "-L" . abs_path("../../apps/.libs") . + " -L" . abs_path("../../apps") . + " -L" . abs_path("../../agent/.libs") . + " -L" . abs_path("../../agent") . + " -L" . abs_path("../../snmplib/.libs") . + " -L" . abs_path("../../snmplib") . + " " . $Params{'LIBS'}; } else { $Params{'LIBS'} = `$opts->{'nsconfig'} --libdir` . " $Params{'LIBS'}"; } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; - } - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; } return(%Params); } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/TrapReceiver/TrapReceiver.pm b/perl/TrapReceiver/TrapReceiver.pm index 85a041a..b16d8c3 100644 --- a/perl/TrapReceiver/TrapReceiver.pm +++ b/perl/TrapReceiver/TrapReceiver.pm @@ -47,7 +47,7 @@ require NetSNMP::OID; NETSNMPTRAPD_PRE_HANDLER ); -$VERSION = '5.0703'; +$VERSION = '5.0904'; # sub new { # my $type = shift; @@ -116,7 +116,7 @@ been configured using --enable-embedded-perl. Registration of functions is then done through the snmptrapd.conf configuration file. This module can NOT be used in a normal perl script to receive traps. It is intended solely for embedded use within the -snmptrapd demon. +snmptrapd daemon. =head1 DESCRIPTION @@ -131,9 +131,12 @@ it came from, what SNMP user name or community name it was sent under, etc). The second argument is a reference to an array containing the variable bindings (OID and value information) that define the noification itself. Each variable is itself a reference to an array -containing three values: a NetSNMP::OID object, the value that came -associated with it, and the value's numeric type (see NetSNMP::ASN for -further details on SNMP typing information). +containing four values: a NetSNMP::OID object, a string representation +of the value that came associated with it, the value's numeric type (see +NetSNMP::ASN for further details on SNMP typing information), and the raw +value of the trap, encoded according to its type, 64-bit integer types are +returned as strings, integer types as integers, strings as strings, object +identifiers as NetSNMP::OID objects, and any other types as undefs. Registered functions should return one of the following values: @@ -141,18 +144,18 @@ Registered functions should return one of the following values: =item NETSNMPTRAPD_HANDLER_OK -Handling the trap succeeded, but lets the snmptrapd demon check for +Handling the trap succeeded, but lets the snmptrapd daemon check for further appropriate handlers. =item NETSNMPTRAPD_HANDLER_FAIL -Handling the trap failed, but lets the snmptrapd demon check for +Handling the trap failed, but lets the snmptrapd daemon check for further appropriate handlers. =item NETSNMPTRAPD_HANDLER_BREAK Stops evaluating the list of handlers for this specific trap, but lets -the snmptrapd demon apply global handlers. +the snmptrapd daemon apply global handlers. =item NETSNMPTRAPD_HANDLER_FINISH @@ -248,19 +251,51 @@ code gets executed: ifOperStatus.1 type=2 value=1 ifDescr type=4 value="eth0" +=head2 Passing Arguments + +If you need to pass arguments in to the script, you'll need to do it +by one of two methods: + +=head3 Using Subroutines + +You can either define a subroutine in the file rather than have +the file itself do something. IE, in the file if you put: + + sub foo { + print "$_[0]\n"; + } + +and then put these lines in the snmptrapd.conf file: + + perl do /path/to/script + perl foo("hello world"); + perl foo("now I am passing something different"); + +It'd call the foo function twice, and print the results to the console +where snmptrapd was started. + +=head3 Using Variables + +Or you could always set a variable ahead of time: + + perl $myVariable = 42; + perl do /path/to/script + +And have the script look for and use the $myVariable value in the script + =head1 EXPORT None by default. -# =head2 Exportable constants +=head2 Exportable constants -# NETSNMPTRAPD_AUTH_HANDLER -# NETSNMPTRAPD_HANDLER_BREAK -# NETSNMPTRAPD_HANDLER_FAIL -# NETSNMPTRAPD_HANDLER_FINISH -# NETSNMPTRAPD_HANDLER_OK -# NETSNMPTRAPD_POST_HANDLER -# NETSNMPTRAPD_PRE_HANDLER + NETSNMPTRAPD_AUTH_HANDLER + NETSNMPTRAPD_HANDLER_BREAK + NETSNMPTRAPD_HANDLER_FAIL + NETSNMPTRAPD_HANDLER_FINISH + NETSNMPTRAPD_HANDLER_OK + NETSNMPTRAPD_POST_HANDLER + NETSNMPTRAPD_PRE_HANDLER =head1 SEE ALSO diff --git a/perl/TrapReceiver/TrapReceiver.xs b/perl/TrapReceiver/TrapReceiver.xs index a4fc136..788963c 100644 --- a/perl/TrapReceiver/TrapReceiver.xs +++ b/perl/TrapReceiver/TrapReceiver.xs @@ -1,7 +1,4 @@ /* -*- c -*- */ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif #include "EXTERN.h" #include "perl.h" @@ -27,6 +24,56 @@ typedef struct netsnmp_oid_s { oid namebuf[ MAX_OID_LEN ]; } netsnmp_oid; +static SV* newSVoid(oid* sname, size_t slen) +{ + /*assert(slen < MAX_OID_LEN);*/ + netsnmp_oid *o = malloc(sizeof(netsnmp_oid)); + o->name = o->namebuf; + o->len = slen; + memcpy(o->name, sname, slen * sizeof(oid)); + +#undef CALL_EXTERNAL_OID_NEW + +#ifdef CALL_EXTERNAL_OID_NEW + { + SV *arg; + SV *rarg; + + PUSHMARK(sp); + + rarg = sv_2mortal(newSViv((IV) 0)); + arg = sv_2mortal(newSVrv(rarg, "netsnmp_oidPtr")); + sv_setiv(arg, (IV) o); + XPUSHs(rarg); + + PUTBACK; + i = perl_call_pv("NetSNMP::OID::newwithptr", G_SCALAR); + SPAGAIN; + + if (i != 1) { + snmp_log(LOG_ERR, "unhandled OID error.\n"); + /* ack XXX */ + } + /* get the value */ + { + SV *rv = POPs; + SvREFCNT_inc(rv); + PUTBACK; + return rv; + } + } +#else /* build it and bless ourselves */ + { + HV *hv = newHV(); + SV *rv = newRV_noinc((SV *) hv); + SV *rvsub = newRV_noinc((SV *) newSViv((UV) o)); + rvsub = sv_bless(rvsub, gv_stashpv("netsnmp_oidPtr", 1)); + (void)hv_store(hv, "oidptr", 6, rvsub, 0); + return sv_bless(rv, gv_stashpv("NetSNMP::OID", 1)); + } +#endif /* build oid ourselves */ +} + int perl_trapd_handler( netsnmp_pdu *pdu, netsnmp_transport *transport, netsnmp_trapd_handler *handler) @@ -34,7 +81,6 @@ int perl_trapd_handler( netsnmp_pdu *pdu, trapd_cb_data *cb_data; SV *pcallback; netsnmp_variable_list *vb; - netsnmp_oid *o; SV **tmparray; int i, c = 0; u_char *outbuf; @@ -113,50 +159,7 @@ int perl_trapd_handler( netsnmp_pdu *pdu, for(vb = pdu->variables; vb; vb = vb->next_variable) { /* get the oid */ - o = malloc(sizeof(netsnmp_oid)); - o->name = o->namebuf; - o->len = vb->name_length; - memcpy(o->name, vb->name, vb->name_length * sizeof(oid)); - -#undef CALL_EXTERNAL_OID_NEW - -#ifdef CALL_EXTERNAL_OID_NEW - { - SV *arg; - SV *rarg; - - PUSHMARK(sp); - - rarg = sv_2mortal(newSViv((IV) 0)); - arg = sv_2mortal(newSVrv(rarg, "netsnmp_oidPtr")); - sv_setiv(arg, (IV) o); - XPUSHs(rarg); - - PUTBACK; - i = perl_call_pv("NetSNMP::OID::newwithptr", G_SCALAR); - SPAGAIN; - - if (i != 1) { - snmp_log(LOG_ERR, "unhandled OID error.\n"); - /* ack XXX */ - } - /* get the value */ - tmparray[c++] = POPs; - SvREFCNT_inc(tmparray[c-1]); - PUTBACK; - } -#else /* build it and bless ourselves */ - { - HV *hv = newHV(); - SV *rv = newRV_noinc((SV *) hv); - SV *rvsub = newRV_noinc((SV *) newSViv((UV) o)); - rvsub = sv_bless(rvsub, gv_stashpv("netsnmp_oidPtr", 1)); - (void)hv_store(hv, "oidptr", 6, rvsub, 0); - rv = sv_bless(rv, gv_stashpv("NetSNMP::OID", 1)); - tmparray[c++] = rv; - } - -#endif /* build oid ourselves */ + tmparray[c++] = newSVoid(vb->name, vb->name_length); } /* @@ -180,6 +183,57 @@ int perl_trapd_handler( netsnmp_pdu *pdu, av_push(vba,newSVpvn((char *) outbuf, oo_len)); netsnmp_free(outbuf); av_push(vba,newSViv(vb->type)); + switch (vb->type) { + case ASN_INTEGER: + av_push(vba,newSViv((int32_t)*vb->val.integer)); + break; + case ASN_COUNTER: + case ASN_GAUGE: + case ASN_TIMETICKS: + case ASN_UINTEGER: /* from rfc1442 */ + av_push(vba,newSVuv((uint32_t)*vb->val.integer)); + break; + case ASN_IPADDRESS: + case ASN_OCTET_STR: + case ASN_OPAQUE: + case ASN_NSAP: + av_push(vba,newSVpvn((char*)vb->val.string,vb->val_len)); + break; + case ASN_BIT_STR: + av_push(vba,newSVpvn((char*)vb->val.bitstring,vb->val_len)); + break; + case ASN_OBJECT_ID: + av_push(vba,newSVoid(vb->val.objid,vb->val_len / sizeof(oid))); + break; +#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES + case ASN_OPAQUE_FLOAT: + av_push(vba,newSVnv(*vb->val.floatVal)); + break; + case ASN_OPAQUE_DOUBLE: + av_push(vba,newSVnv(*vb->val.doubleVal)); + break; + case ASN_OPAQUE_I64: + { + char buf[I64CHARSZ + 1]; + printI64(buf, vb->val.counter64); + av_push(vba,newSVpv(buf,0)); + } + break; + case ASN_OPAQUE_COUNTER64: + case ASN_OPAQUE_U64: +#endif + case ASN_COUNTER64: + { + char buf[I64CHARSZ + 1]; + printU64(buf, vb->val.counter64); + av_push(vba,newSVpv(buf,0)); + } + break; + case ASN_NULL: + default: + av_push(vba,newSV(0)); + break; + } av_push(varbinds, (SV *) newRV_noinc((SV *) vba)); } diff --git a/perl/TrapReceiver/netsnmp-feature-definitions.h b/perl/TrapReceiver/netsnmp-feature-definitions.h index bd331e3..26c3b59 100644 --- a/perl/TrapReceiver/netsnmp-feature-definitions.h +++ b/perl/TrapReceiver/netsnmp-feature-definitions.h @@ -1,6 +1,6 @@ #include #include -netsnmp_feature_require(netsnmp_add_default_traphandler) -netsnmp_feature_require(memory_free) +netsnmp_feature_require(netsnmp_add_default_traphandler); +netsnmp_feature_require(memory_free); diff --git a/perl/TrapReceiver/t/1.t b/perl/TrapReceiver/t/1.t index 2ece8f2..9cd4e25 100644 --- a/perl/TrapReceiver/t/1.t +++ b/perl/TrapReceiver/t/1.t @@ -1,13 +1,19 @@ +#!./perl +# # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### -# change 'tests => 2' to 'tests => last_test_to_print'; - +use strict; +use warnings; use Test; -BEGIN { plan tests => 2 }; -# use NetSNMP::TrapReceiver; # we can't include this directly in a module. + +BEGIN { + plan tests => 8 +} + +use NetSNMP::TrapReceiver; ok(1); # If we made it this far, we're ok. Bogus test! @@ -17,18 +23,17 @@ foreach my $constname (qw( NETSNMPTRAPD_HANDLER_FAIL NETSNMPTRAPD_HANDLER_FINISH NETSNMPTRAPD_HANDLER_OK NETSNMPTRAPD_POST_HANDLER NETSNMPTRAPD_PRE_HANDLER)) { - next if (eval "my \$a = $constname; 1"); - if ($@ =~ /^Your vendor has not defined NetSNMP::TrapReceiver macro $constname/) { - print "# pass: $@"; - } else { - print "# fail: $@"; - $fail = 1; - } -} -if ($fail) { - print "not ok 2\n"; -} else { - print "ok 2\n"; + if (eval "my \$a = $constname; 1") { + ok(1); + next; + } + if ($@ =~ /^Your vendor has not defined NetSNMP::TrapReceiver macro $constname/) { + print "# pass: $@"; + ok(1); + } else { + print "# fail: $@"; + ok(0); + } } ######################### diff --git a/perl/agent/Makefile.PL b/perl/agent/Makefile.PL index 4f7bee3..6c8c874 100644 --- a/perl/agent/Makefile.PL +++ b/perl/agent/Makefile.PL @@ -1,17 +1,17 @@ +use strict; +use warnings; use ExtUtils::MakeMaker; require 5; use Config; -use Getopt::Long; -my $lib_version; -my %MakeParams = (); +use MakefileSubs; -%MakeParams = InitMakeParams(); +my $lib_version; -WriteMakefile(%MakeParams); +WriteMakefile(AgentInitMakeParams()); -Check_Version(); +Check_Version($lib_version); -sub InitMakeParams { +sub AgentInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::agent', @@ -25,19 +25,19 @@ sub InitMakeParams { 'PREREQ_PM' => {}, ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; - $agent_link_lib = 'netsnmpagent'; - $mibs_link_lib = 'netsnmpmibs'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; + my $agent_link_lib = 'netsnmpagent'; + my $mibs_link_lib = 'netsnmpmibs'; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -47,16 +47,16 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib -l$agent_link_lib " . + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib -l$agent_link_lib " . "-l$mibs_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -73,168 +73,25 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib -l$agent_link_lib -l$mibs_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts(); - $Params{'LDDLFLAGS'} = "$Config{lddlflags} " . `$opts->{'nsconfig'} --ldflags`; - $Params{'LIBS'} = `$opts->{'nsconfig'} --base-agent-libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --base-agent-libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../snmplib/.libs -L../../snmplib/ -L../../agent/.libs -L../../agent/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; + $Params{'LIBS'} = + "-L" . abs_path("../../snmplib/.libs") . + " -L" . abs_path("../../snmplib") . + " -L" . abs_path("../../agent/.libs") . + " -L" . abs_path("../../agent") . + " " . $Params{'LIBS'}; # } else { $Params{'LIBS'} = `$opts->{'nsconfig'} --libdir` . $Params{'LIBS'}; # $Params{'PREREQ_PM'} = {'NetSNMP::OID' => '0.1'}; } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; - } } return(%Params); } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/agent/Support/Makefile.PL b/perl/agent/Support/Makefile.PL index 48815b6..df86ed4 100644 --- a/perl/agent/Support/Makefile.PL +++ b/perl/agent/Support/Makefile.PL @@ -1,20 +1,20 @@ +use strict; +use warnings; use ExtUtils::MakeMaker; require 5; use Config; -use Getopt::Long; +use MakefileSubs; + my $lib_version; -my %MakeParams = (); # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -%MakeParams = InitMakeParams(); - -WriteMakefile(%MakeParams); +WriteMakefile(SupportInitMakeParams()); -Check_Version(); +Check_Version($lib_version); -sub InitMakeParams { +sub SupportInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::agent::Support', @@ -23,18 +23,17 @@ sub InitMakeParams { 'PREREQ_PM' => {}, ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -44,15 +43,15 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib"; + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -63,167 +62,27 @@ sub InitMakeParams { else { @LibDirs = (); - @LibDirs[0] = prompt("The Net-SNMP library ($snmp_lib_file) could not be found.\nPlease enter the directory where it is located:"); - @LibDirs[0] =~ s/\\$//; + $LibDirs[0] = prompt("The Net-SNMP library ($snmp_lib_file) could not be found.\nPlease enter the directory where it is located:"); + $LibDirs[0] =~ s/\\$//; } } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts("../../"); - $Params{'LIBS'} = `$opts->{'nsconfig'} --libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../snmplib/.libs -L../../snmplib/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; - } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; + $Params{'LIBS'} = + "-L" . abs_path("../../../snmplib/.libs") . + " -L" . abs_path("../../../snmplib") . + " " . $Params{'LIBS'}; } } return (%Params); } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/agent/Support/Support.pm b/perl/agent/Support/Support.pm index 03f54d9..b348ab4 100644 --- a/perl/agent/Support/Support.pm +++ b/perl/agent/Support/Support.pm @@ -26,7 +26,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); @ISA = qw(Exporter getLeaf); @EXPORT = qw(registerAgent getOidElement setOidElement); @EXPORT_OK = qw(); -$VERSION = '5.0703'; +$VERSION = '5.0904'; use strict; use warnings; diff --git a/perl/agent/agent.pm b/perl/agent/agent.pm index 46500ff..8ccd074 100644 --- a/perl/agent/agent.pm +++ b/perl/agent/agent.pm @@ -87,7 +87,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); SNMP_ERR_AUTHORIZATIONERROR SNMP_ERR_NOTWRITABLE ); -$VERSION = '5.0703'; +$VERSION = '5.0904'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() @@ -229,7 +229,7 @@ NetSNMP::agent - Perl extension for the net-snmp agent. This module implements an API set to make a SNMP agent act as a snmp agent, a snmp subagent (using the AgentX subagent protocol) and/or -embedded perl-APIs directly within the traditional net-snmp agent demon. +embedded perl-APIs directly within the traditional net-snmp agent daemon. Also see the tutorial about the genaral Net-SNMP C API, which this module implements in a perl-way, and a perl specific tutorial at: diff --git a/perl/agent/agent.xs b/perl/agent/agent.xs index c7b5d9a..06f878e 100644 --- a/perl/agent/agent.xs +++ b/perl/agent/agent.xs @@ -1,7 +1,4 @@ /* -*- C -*- */ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif #include "EXTERN.h" #include "perl.h" @@ -601,6 +598,7 @@ nari_setValue(me, type, value) netsnmp_request_info *request; u_long utmp; long ltmp; + double dtmp; uint64_t ulltmp; struct counter64 c64; oid myoid[MAX_OID_LEN]; @@ -633,7 +631,21 @@ nari_setValue(me, type, value) RETVAL = 1; break; } - else if (SvPOKp(value)) { + else if (SvTYPE(value) == SVt_NV || SvNOK(value)) { + /* Might be ok - got a double that might be an actual integer */ + dtmp = SvNVX(value); + ltmp = SvIV(value); + if (dtmp != ltmp) { + snmp_log(LOG_ERR, "Could not convert double to integer in setValue: '%f'", dtmp); + RETVAL = 0; + break; + } + snmp_set_var_typed_value(request->requestvb, (u_char)type, + (u_char *) <mp, sizeof(ltmp)); + RETVAL = 1; + break; + } + else if (SvPOK(value)) { /* Might be OK - got a string, so try to convert it, allowing base 10, octal, and hex forms */ stringptr = SvPV(value, stringlen); ltmp = strtol( stringptr, NULL, 0 ); @@ -649,8 +661,8 @@ nari_setValue(me, type, value) break; } else { - snmp_log(LOG_ERR, "Non-integer value passed to setValue with ASN_INTEGER: type was %lu\n", - (unsigned long)SvTYPE(value)); + snmp_log(LOG_ERR, "Non-integer value passed to setValue with ASN_INTEGER: type was %lu flags %#lx\n", + (unsigned long)SvTYPE(value), (unsigned long)SvFLAGS(value)); RETVAL = 0; break; } @@ -669,7 +681,21 @@ nari_setValue(me, type, value) RETVAL = 1; break; } - else if (SvPOKp(value)) { + else if (SvTYPE(value) == SVt_NV || SvNOK(value)) { + /* Might be ok - got a double that might be an actual unsigned */ + dtmp = SvNVX(value); + utmp = SvIV(value); + if (dtmp != utmp) { + snmp_log(LOG_ERR, "Could not convert double to unsigned in setValue: '%f'", dtmp); + RETVAL = 0; + break; + } + snmp_set_var_typed_value(request->requestvb, (u_char)type, + (u_char *) &utmp, sizeof(utmp)); + RETVAL = 1; + break; + } + else if (SvPOK(value)) { /* Might be OK - got a string, so try to convert it, allowing base 10, octal, and hex forms */ stringptr = SvPV(value, stringlen); utmp = strtoul( stringptr, NULL, 0 ); @@ -685,8 +711,8 @@ nari_setValue(me, type, value) break; } else { - snmp_log(LOG_ERR, "Non-unsigned-integer value passed to setValue with ASN_UNSIGNED/ASN_COUNTER/ASN_TIMETICKS: type was %lu\n", - (unsigned long)SvTYPE(value)); + snmp_log(LOG_ERR, "Non-unsigned-integer value passed to setValue with ASN_UNSIGNED/ASN_COUNTER/ASN_TIMETICKS: type was %lu flags %#lx\n", + (unsigned long)SvTYPE(value), (unsigned long)SvFLAGS(value)); RETVAL = 0; break; } @@ -698,7 +724,21 @@ nari_setValue(me, type, value) ulltmp = SvIV(value); RETVAL = 1; } - else if (SvPOKp(value)) { + else if (SvTYPE(value) == SVt_NV || SvNOK(value)) { + /* Might be ok - got a double that might be an actual unsigned */ + dtmp = SvNVX(value); + ulltmp = SvIV(value); + if (dtmp != ulltmp) { + snmp_log(LOG_ERR, "Could not convert double to unsigned in setValue: '%f'", dtmp); + RETVAL = 0; + break; + } + snmp_set_var_typed_value(request->requestvb, (u_char)type, + (u_char *) &ulltmp, sizeof(ulltmp)); + RETVAL = 1; + break; + } + else if (SvPOK(value)) { /* Might be OK - got a string, so try to convert it, allowing base 10, octal, and hex forms */ stringptr = SvPV(value, stringlen); errno = 0; @@ -711,8 +751,8 @@ nari_setValue(me, type, value) RETVAL = 1; } else { - snmp_log(LOG_ERR, "Non-unsigned-integer value passed to setValue with ASN_COUNTER64: type was %lu\n", - (unsigned long)SvTYPE(value)); + snmp_log(LOG_ERR, "Non-unsigned-integer value passed to setValue with ASN_COUNTER64: type was %lu flags %#lx\n", + (unsigned long)SvTYPE(value), (unsigned long)SvFLAGS(value)); RETVAL = 0; } if (RETVAL) { @@ -727,9 +767,9 @@ nari_setValue(me, type, value) case ASN_BIT_STR: case ASN_OPAQUE: /* Check that we have been passed something with a string value (or a blessed scalar) */ - if (!SvPOKp(value) && (SvTYPE(value) != SVt_PVMG)) { - snmp_log(LOG_ERR, "Non-string value passed to setValue with ASN_OCTET_STR/ASN_BIT_STR: type was %lu\n", - (unsigned long)SvTYPE(value)); + if (!SvPOK(value) && (SvTYPE(value) != SVt_PVMG)) { + snmp_log(LOG_ERR, "Non-string value passed to setValue with ASN_OCTET_STR/ASN_BIT_STR: type was %lu flags %#lx\n", + (unsigned long)SvTYPE(value), (unsigned long)SvFLAGS(value)); RETVAL = 0; break; } @@ -754,9 +794,9 @@ nari_setValue(me, type, value) */ /* Check that we have been passed something with a string value (or a blessed scalar) */ - if (!SvPOKp(value) && (SvTYPE(value) != SVt_PVMG)) { - snmp_log(LOG_ERR, "Non-string value passed to setValue with ASN_IPADDRESS: type was %lu\n", - (unsigned long)SvTYPE(value)); + if (!SvPOK(value) && (SvTYPE(value) != SVt_PVMG)) { + snmp_log(LOG_ERR, "Non-string value passed to setValue with ASN_IPADDRESS: type was %lu flags %#lx\n", + (unsigned long)SvTYPE(value), (unsigned long)SvFLAGS(value)); RETVAL = 0; break; } @@ -781,9 +821,9 @@ nari_setValue(me, type, value) case ASN_OBJECT_ID: /* Check that we have been passed something with a string value (or a blessed scalar) */ - if (!SvPOKp(value) && (SvTYPE(value) != SVt_PVMG)) { - snmp_log(LOG_ERR, "Non-string value passed to setValue with ASN_OBJECT_ID: type was %lu\n", - (unsigned long)SvTYPE(value)); + if (!SvPOK(value) && (SvTYPE(value) != SVt_PVMG)) { + snmp_log(LOG_ERR, "Non-string value passed to setValue with ASN_OBJECT_ID: type was %lu flags %#lx\n", + (unsigned long)SvTYPE(value), (unsigned long)SvFLAGS(value)); RETVAL = 0; break; } diff --git a/perl/agent/default_store/Makefile.PL b/perl/agent/default_store/Makefile.PL index ed6483a..668d8a7 100644 --- a/perl/agent/default_store/Makefile.PL +++ b/perl/agent/default_store/Makefile.PL @@ -1,17 +1,17 @@ +use strict; +use warnings; use ExtUtils::MakeMaker; require 5; use Config; -use Getopt::Long; -my $lib_version; -my %MakeParams = (); +use MakefileSubs; -%MakeParams = InitMakeParams(); +my $lib_version; -WriteMakefile(%MakeParams); +WriteMakefile(AgentDefaultStoreInitMakeParams()); -Check_Version(); +Check_Version($lib_version); -sub InitMakeParams { +sub AgentDefaultStoreInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::agent::default_store', @@ -19,17 +19,17 @@ sub InitMakeParams { 'XSPROTOARG' => '-prototypes', ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -39,15 +39,15 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib"; + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -64,165 +64,20 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts("../../"); - $Params{'LIBS'} = `$opts->{'nsconfig'} --libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if ($opts->{'insource'} eq "true") { - $Params{'LIBS'} = "-L../../../snmplib/.libs -L../../../snmplib/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../../include " . $Params{'CCFLAGS'}; - } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; + $Params{'LIBS'} = + "-L" . abs_path("../../../snmplib/.libs") . + " -L" . abs_path("../../../snmplib") . + " " . $Params{'LIBS'}; } } return(%Params); } - -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/agent/default_store/default_store.pm b/perl/agent/default_store/default_store.pm index a8812eb..704193f 100644 --- a/perl/agent/default_store/default_store.pm +++ b/perl/agent/default_store/default_store.pm @@ -96,7 +96,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); NETSNMP_DS_AGENT_MAX_GETBULKREPEATS NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES ); -$VERSION = '5.0703'; +$VERSION = '5.0904'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/perl/agent/default_store/default_store.xs b/perl/agent/default_store/default_store.xs index bff1485..90df804 100644 --- a/perl/agent/default_store/default_store.xs +++ b/perl/agent/default_store/default_store.xs @@ -1,7 +1,3 @@ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif - #include "EXTERN.h" #include "perl.h" #include "XSUB.h" diff --git a/perl/agent/netsnmp-feature-definitions.h b/perl/agent/netsnmp-feature-definitions.h index 4f2630e..73af898 100644 --- a/perl/agent/netsnmp-feature-definitions.h +++ b/perl/agent/netsnmp-feature-definitions.h @@ -1,6 +1,6 @@ #include #include -netsnmp_feature_require(agent_check_and_process) -netsnmp_feature_require(snmp_enable_stderrlog) +netsnmp_feature_require(agent_check_and_process); +netsnmp_feature_require(snmp_enable_stderrlog); diff --git a/perl/default_store/Makefile.PL b/perl/default_store/Makefile.PL index 7c671b8..476e8c3 100644 --- a/perl/default_store/Makefile.PL +++ b/perl/default_store/Makefile.PL @@ -1,16 +1,16 @@ +use strict; +use warnings; use ExtUtils::MakeMaker; require 5; use Config; -use Getopt::Long; -my $lib_version; -my %MakeParams = (); - -%MakeParams = InitMakeParams(); +use Cwd 'abs_path'; +use MakefileSubs; -WriteMakefile(%MakeParams); +my $lib_version; +WriteMakefile(DefaultStoreInitMakeParams()); -sub InitMakeParams { +sub DefaultStoreInitMakeParams { my $opts; my %Params = ( 'NAME' => 'NetSNMP::default_store', @@ -18,17 +18,17 @@ sub InitMakeParams { 'XSPROTOARG' => '-prototypes', ); - if ($ENV{'OSTYPE'} eq 'msys') { - $Params{'DEFINE'} = "-DMINGW_PERL"; - } + AddCommonParams(\%Params); my ($snmp_lib, $snmp_llib, $sep); - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - $opts = NetSNMPGetOpts(); - $Params{'DEFINE'} = "-DMSVC_PERL -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS"; + + $opts = NetSNMPGetOpts(); + + if ($Config{'osname'} eq 'MSWin32' && !defined($ENV{'OSTYPE'})) { $sep = '\\'; - $snmp_lib_file = 'netsnmp.lib'; - $snmp_link_lib = 'netsnmp'; + my $snmp_lib_file = 'netsnmp.lib'; + my $snmp_link_lib = 'netsnmp'; + my $lib_dir; if (lc($opts->{'debug'}) eq "true") { $lib_dir = 'lib\\debug'; @@ -38,15 +38,15 @@ sub InitMakeParams { } if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L$basedir\\win32\\$lib_dir\\ -l$snmp_link_lib"; + $Params{'LIBS'} = "-L" . $MakefileSubs::basedir . "\\win32\\$lib_dir\\ -l$snmp_link_lib"; } else { - my @LibDirs = split (';',$ENV{LIB}); + my @LibDirs = split($Config{path_sep}, $ENV{LIB}); my $LibDir; if ($opts->{'prefix'}) { push (@LibDirs,"$ENV{'NET-SNMP-PATH'}${sep}lib"); } - $noLibDir = 1; + my $noLibDir = 1; while ($noLibDir) { $LibDir = find_files(["$snmp_lib_file"],\@LibDirs); if ($LibDir ne '') { @@ -63,165 +63,20 @@ sub InitMakeParams { } $Params{LIBS} = "-L$LibDir -l$snmp_link_lib"; } - - $Params{'INC'} = "-I$basedir\\include\\ -I$basedir\\include\\net-snmp\\ -I$basedir\\win32\\ "; } else { - $opts = NetSNMPGetOpts(); - $Params{'LDDLFLAGS'} = "$Config{lddlflags} " . `$opts->{'nsconfig'} --ldflags`; - $Params{'LIBS'} = `$opts->{'nsconfig'} --libs`; + $Params{'LIBS'} = `$opts->{'nsconfig'} --libs` or + die "net-snmp-config failed\n"; chomp($Params{'LIBS'}); - $Params{'CCFLAGS'} = `$opts->{'nsconfig'} --cflags`; - chomp($Params{'CCFLAGS'}); - $Params{'CCFLAGS'} .= " " . $Config{'ccflags'}; - $lib_version = `$opts->{'nsconfig'} --version`; + $lib_version = `$opts->{'nsconfig'} --version` or + die "net-snmp-config failed\n"; if (lc($opts->{'insource'}) eq "true") { - $Params{'LIBS'} = "-L../../snmplib/.libs -L../../snmplib/ " . $Params{'LIBS'}; - $Params{'CCFLAGS'} = "-I../../include " . $Params{'CCFLAGS'}; - } - $Params{'CCFLAGS'} =~ s/ -W(all|inline|strict-prototypes|write-strings|cast-qual|no-char-subscripts)//g; # ignore developer warnings - if ($Params{'LIBS'} eq "" || $Params{'CCFLAGS'} eq "") { - die "You need to install net-snmp first (I can't find net-snmp-config)"; + $Params{'LIBS'} = + "-L" . abs_path("../../snmplib/.libs") . + " -L" . abs_path("../../snmplib") . + " " . $Params{'LIBS'}; } } return(%Params); } -# common subroutines -- DO NOT EDIT. -# They are imported from the Makefile.subs.pl file -sub NetSNMPGetOpts { - my %ret; - my $rootpath = shift; - $rootpath = "../" if (!$rootpath); - $rootpath .= '/' if ($rootpath !~ /\/$/); - - if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { - - # Grab command line options first. Only used if environment variables are not set - GetOptions("NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}, - "NET-SNMP-PATH=s" => \$ret{'prefix'}, - "NET-SNMP-DEBUG=s" => \$ret{'debug'}); - - if ($ENV{'NET-SNMP-IN-SOURCE'}) - { - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - undef ($ret{'prefix'}); - } - elsif ($ENV{'NET-SNMP-PATH'}) - { - $ret{'prefix'} = $ENV{'NET-SNMP-PATH'}; - } - - if ($ENV{'NET-SNMP-DEBUG'}) - { - $ret{'debug'} = $ENV{'NET-SNMP-DEBUG'}; - } - - # Update environment variables in case they are needed - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - $ENV{'NET-SNMP-PATH'} = $ret{'prefix'}; - $ENV{'NET-SNMP-DEBUG'} = $ret{'debug'}; - - $basedir = `%COMSPEC% /c cd`; - chomp $basedir; - $basedir =~ /(.*?)\\perl.*/; - $basedir = $1; - print "Net-SNMP base directory: $basedir\n"; - if ($basedir =~ / /) { - die "\nA space has been detected in the base directory. This is not " . - "supported\nPlease rename the folder and try again.\n\n"; - } - } - else - { - if ($ENV{'NET-SNMP-CONFIG'} && - $ENV{'NET-SNMP-IN-SOURCE'}) { - # have env vars, pull from there - $ret{'nsconfig'} = $ENV{'NET-SNMP-CONFIG'}; - $ret{'insource'} = $ENV{'NET-SNMP-IN-SOURCE'}; - } else { - # don't have env vars, pull from command line and put there - GetOptions("NET-SNMP-CONFIG=s" => \$ret{'nsconfig'}, - "NET-SNMP-IN-SOURCE=s" => \$ret{'insource'}); - - if (lc($ret{'insource'}) eq "true" && $ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="sh ROOTPATH../net-snmp-config"; - } elsif ($ret{'nsconfig'} eq "") { - $ret{'nsconfig'}="net-snmp-config"; - } - - $ENV{'NET-SNMP-CONFIG'} = $ret{'nsconfig'}; - $ENV{'NET-SNMP-IN-SOURCE'} = $ret{'insource'}; - } - } - - $ret{'nsconfig'} =~ s/ROOTPATH/$rootpath/; - - $ret{'rootpath'} = $rootpath; - - \%ret; -} - -sub find_files { - my($f,$d) = @_; - my ($dir,$found,$file); - for $dir (@$d){ - $found = 0; - for $file (@$f) { - $found++ if -f "$dir/$file"; - } - if ($found == @$f) { - return $dir; - } - } -} - - -sub Check_Version { - if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} ne '')) { - my $foundversion = 0; - return if ($ENV{'NETSNMP_DONT_CHECK_VERSION'}); - open(I,") { - if (/^VERSION = (.*)/) { - my $perlver = $1; - my $srcver = $lib_version; - chomp($srcver); - my $srcfloat = floatize_version($srcver); - $perlver =~ s/pre/0./; - # we allow for perl/CPAN-only revisions beyond the default - # version formatting of net-snmp itself. - $perlver =~ s/(\.\d{5}).*/\1/; - $perlver =~ s/0*$//; - if ($srcfloat ne $perlver) { - if (!$foundversion) { - print STDERR "ERROR: -Net-SNMP installed version: $srcver => $srcfloat -Perl Module Version: $perlver - -These versions must match for perfect support of the module. It is possible -that different versions may work together, but it is strongly recommended -that you make these two versions identical. You can get the Net-SNMP -source code and the associated perl modules directly from - - http://www.net-snmp.org/ - -If you want to continue anyway please set the NETSNMP_DONT_CHECK_VERSION -environmental variable to 1 and re-run the Makefile.PL script.\n"; - exit(1); - } - } - $foundversion = 1; - last; - } - } - close(I); - die "ERROR: Couldn't find version number of this module\n" - if (!$foundversion); - } -} - -sub floatize_version { - my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); - return $major + $minor/100 + $patch/10000 + $opps/100000; -} diff --git a/perl/default_store/default_store.pm b/perl/default_store/default_store.pm index b898501..54a46cf 100644 --- a/perl/default_store/default_store.pm +++ b/perl/default_store/default_store.pm @@ -63,6 +63,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE NETSNMP_DS_LIB_APPEND_LOGFILES + NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT NETSNMP_DS_LIB_MIB_WARNINGS NETSNMP_DS_LIB_SECLEVEL NETSNMP_DS_LIB_SNMPVERSION @@ -161,6 +162,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE NETSNMP_DS_LIB_APPEND_LOGFILES + NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT NETSNMP_DS_LIB_MIB_WARNINGS NETSNMP_DS_LIB_SECLEVEL NETSNMP_DS_LIB_SNMPVERSION @@ -200,7 +202,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION $AUTOLOAD); NETSNMP_DS_LIB_KSM_SERVICE_NAME NETSNMP_DS_LIB_SBSM_LOCAL_PWD ); -$VERSION = '5.0703'; +$VERSION = '5.0904'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() @@ -299,6 +301,7 @@ None by default. NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE NETSNMP_DS_LIB_APPEND_LOGFILES + NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT NETSNMP_DS_LIB_MIB_WARNINGS NETSNMP_DS_LIB_SECLEVEL NETSNMP_DS_LIB_SNMPVERSION diff --git a/perl/default_store/default_store.xs b/perl/default_store/default_store.xs index ca252fb..7814ef8 100644 --- a/perl/default_store/default_store.xs +++ b/perl/default_store/default_store.xs @@ -1,7 +1,3 @@ -#if defined(_WIN32) && !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x501 -#endif - #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -1238,6 +1234,17 @@ __END__ #endif } break; + case 36: + if (memEQ(name, "NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT", 36)) { +#ifdef NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT + *iv_return = NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT; + return PERL_constant_ISIV; +#else + return PERL_constant_NOTDEF; +#endif + } + break; + case 38: return constant_38 (aTHX_ name, iv_return); break; @@ -1245,8 +1252,6 @@ __END__ return PERL_constant_NOTFOUND; } - - /* autogenerated by "gen" from const-xs.inc */ MODULE = NetSNMP::default_store PACKAGE = NetSNMP::default_store diff --git a/perl/default_store/test.pl b/perl/default_store/test.pl index b429c6b..06c647a 100644 --- a/perl/default_store/test.pl +++ b/perl/default_store/test.pl @@ -1,124 +1,119 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' +#!./perl -######################### We start with some black magic to print on failure. +use strict; +use warnings; +use Test; -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) +my %tests; -BEGIN { $| = 1; +BEGIN { + # Force a flush after every print statement. + $| = 1; - %tests = ( - "NETSNMP_DS_MAX_IDS" => 3, - "NETSNMP_DS_MAX_SUBIDS" => 48, - "NETSNMP_DS_LIBRARY_ID" => 0, - "NETSNMP_DS_APPLICATION_ID" => 1, - "NETSNMP_DS_TOKEN_ID" => 2, - "NETSNMP_DS_LIB_MIB_ERRORS" => 0, - "NETSNMP_DS_LIB_SAVE_MIB_DESCRS" => 1, - "NETSNMP_DS_LIB_MIB_COMMENT_TERM" => 2, - "NETSNMP_DS_LIB_MIB_PARSE_LABEL" => 3, - "NETSNMP_DS_LIB_DUMP_PACKET" => 4, - "NETSNMP_DS_LIB_LOG_TIMESTAMP" => 5, - "NETSNMP_DS_LIB_DONT_READ_CONFIGS" => 6, - "NETSNMP_DS_LIB_MIB_REPLACE" => 7, - "NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM" => 8, - "NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS" => 9, - "NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS" => 10, - "NETSNMP_DS_LIB_ALARM_DONT_USE_SIG" => 11, - "NETSNMP_DS_LIB_PRINT_FULL_OID" => 12, - "NETSNMP_DS_LIB_QUICK_PRINT" => 13, - "NETSNMP_DS_LIB_RANDOM_ACCESS" => 14, - "NETSNMP_DS_LIB_REGEX_ACCESS" => 15, - "NETSNMP_DS_LIB_DONT_CHECK_RANGE" => 16, - "NETSNMP_DS_LIB_NO_TOKEN_WARNINGS" => 17, - "NETSNMP_DS_LIB_NUMERIC_TIMETICKS" => 18, - "NETSNMP_DS_LIB_ESCAPE_QUOTES" => 19, - "NETSNMP_DS_LIB_REVERSE_ENCODE" => 20, - "NETSNMP_DS_LIB_PRINT_BARE_VALUE" => 21, - "NETSNMP_DS_LIB_EXTENDED_INDEX" => 22, - "NETSNMP_DS_LIB_PRINT_HEX_TEXT" => 23, - "NETSNMP_DS_LIB_PRINT_UCD_STYLE_OID" => 24, - "NETSNMP_DS_LIB_READ_UCD_STYLE_OID" => 25, - "NETSNMP_DS_LIB_HAVE_READ_PREMIB_CONFIG" => 26, - "NETSNMP_DS_LIB_HAVE_READ_CONFIG" => 27, - "NETSNMP_DS_LIB_QUICKE_PRINT" => 28, - "NETSNMP_DS_LIB_DONT_PRINT_UNITS" => 29, - "NETSNMP_DS_LIB_NO_DISPLAY_HINT" => 30, - "NETSNMP_DS_LIB_16BIT_IDS" => 31, - "NETSNMP_DS_LIB_DONT_PERSIST_STATE" => 32, - "NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT" => 33, - "NETSNMP_DS_LIB_IGNORE_NO_COMMUNITY" => 34, - "NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD" => 35, - "NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE" => 36, - "NETSNMP_DS_LIB_APPEND_LOGFILES" => 37, - "NETSNMP_DS_LIB_MIB_WARNINGS" => 0, - "NETSNMP_DS_LIB_SECLEVEL" => 1, - "NETSNMP_DS_LIB_SNMPVERSION" => 2, - "NETSNMP_DS_LIB_DEFAULT_PORT" => 3, - "NETSNMP_DS_LIB_OID_OUTPUT_FORMAT" => 4, - "NETSNMP_DS_LIB_STRING_OUTPUT_FORMAT" => 5, - "NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH" => 6, - "NETSNMP_DS_LIB_SERVERSENDBUF" => 7, - "NETSNMP_DS_LIB_SERVERRECVBUF" => 8, - "NETSNMP_DS_LIB_CLIENTSENDBUF" => 9, - "NETSNMP_DS_LIB_CLIENTRECVBUF" => 10, - "NETSNMP_DS_SNMP_VERSION_1" => 128, - "NETSNMP_DS_SNMP_VERSION_2c" => 1, - "NETSNMP_DS_SNMP_VERSION_3" => 3, - "NETSNMP_DS_LIB_SECNAME" => 0, - "NETSNMP_DS_LIB_CONTEXT" => 1, - "NETSNMP_DS_LIB_PASSPHRASE" => 2, - "NETSNMP_DS_LIB_AUTHPASSPHRASE" => 3, - "NETSNMP_DS_LIB_PRIVPASSPHRASE" => 4, - "NETSNMP_DS_LIB_OPTIONALCONFIG" => 5, - "NETSNMP_DS_LIB_APPTYPE" => 6, - "NETSNMP_DS_LIB_COMMUNITY" => 7, - "NETSNMP_DS_LIB_PERSISTENT_DIR" => 8, - "NETSNMP_DS_LIB_CONFIGURATION_DIR" => 9, - "NETSNMP_DS_LIB_SECMODEL" => 10, - "NETSNMP_DS_LIB_MIBDIRS" => 11, - "NETSNMP_DS_LIB_OIDSUFFIX" => 12, - "NETSNMP_DS_LIB_OIDPREFIX" => 13, - "NETSNMP_DS_LIB_CLIENT_ADDR" => 14, - "NETSNMP_DS_LIB_TEMP_FILE_PATTERN" => 15, - "NETSNMP_DS_LIB_AUTHMASTERKEY" => 16, - "NETSNMP_DS_LIB_PRIVMASTERKEY" => 17, - "NETSNMP_DS_LIB_AUTHLOCALIZEDKEY" => 18, - "NETSNMP_DS_LIB_PRIVLOCALIZEDKEY" => 19, - "NETSNMP_DS_LIB_APPTYPES" => 20, - "NETSNMP_DS_LIB_KSM_KEYTAB" => 21, - "NETSNMP_DS_LIB_KSM_SERVICE_NAME" => 22, - ); + %tests = ( + "NETSNMP_DS_MAX_IDS" => 3, + "NETSNMP_DS_MAX_SUBIDS" => 48, + "NETSNMP_DS_LIBRARY_ID" => 0, + "NETSNMP_DS_APPLICATION_ID" => 1, + "NETSNMP_DS_TOKEN_ID" => 2, + "NETSNMP_DS_LIB_MIB_ERRORS" => 0, + "NETSNMP_DS_LIB_SAVE_MIB_DESCRS" => 1, + "NETSNMP_DS_LIB_MIB_COMMENT_TERM" => 2, + "NETSNMP_DS_LIB_MIB_PARSE_LABEL" => 3, + "NETSNMP_DS_LIB_DUMP_PACKET" => 4, + "NETSNMP_DS_LIB_LOG_TIMESTAMP" => 5, + "NETSNMP_DS_LIB_DONT_READ_CONFIGS" => 6, + "NETSNMP_DS_LIB_MIB_REPLACE" => 7, + "NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM" => 8, + "NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS" => 9, + "NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS" => 10, + "NETSNMP_DS_LIB_ALARM_DONT_USE_SIG" => 11, + "NETSNMP_DS_LIB_PRINT_FULL_OID" => 12, + "NETSNMP_DS_LIB_QUICK_PRINT" => 13, + "NETSNMP_DS_LIB_RANDOM_ACCESS" => 14, + "NETSNMP_DS_LIB_REGEX_ACCESS" => 15, + "NETSNMP_DS_LIB_DONT_CHECK_RANGE" => 16, + "NETSNMP_DS_LIB_NO_TOKEN_WARNINGS" => 17, + "NETSNMP_DS_LIB_NUMERIC_TIMETICKS" => 18, + "NETSNMP_DS_LIB_ESCAPE_QUOTES" => 19, + "NETSNMP_DS_LIB_REVERSE_ENCODE" => 20, + "NETSNMP_DS_LIB_PRINT_BARE_VALUE" => 21, + "NETSNMP_DS_LIB_EXTENDED_INDEX" => 22, + "NETSNMP_DS_LIB_PRINT_HEX_TEXT" => 23, + "NETSNMP_DS_LIB_PRINT_UCD_STYLE_OID" => 24, + "NETSNMP_DS_LIB_READ_UCD_STYLE_OID" => 25, + "NETSNMP_DS_LIB_HAVE_READ_PREMIB_CONFIG" => 26, + "NETSNMP_DS_LIB_HAVE_READ_CONFIG" => 27, + "NETSNMP_DS_LIB_QUICKE_PRINT" => 28, + "NETSNMP_DS_LIB_DONT_PRINT_UNITS" => 29, + "NETSNMP_DS_LIB_NO_DISPLAY_HINT" => 30, + "NETSNMP_DS_LIB_16BIT_IDS" => 31, + "NETSNMP_DS_LIB_DONT_PERSIST_STATE" => 32, + "NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT" => 33, + "NETSNMP_DS_LIB_IGNORE_NO_COMMUNITY" => 34, + "NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD" => 35, + "NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE" => 36, + "NETSNMP_DS_LIB_APPEND_LOGFILES" => 37, + "NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT" => 42, + "NETSNMP_DS_LIB_MIB_WARNINGS" => 0, + "NETSNMP_DS_LIB_SECLEVEL" => 1, + "NETSNMP_DS_LIB_SNMPVERSION" => 2, + "NETSNMP_DS_LIB_DEFAULT_PORT" => 3, + "NETSNMP_DS_LIB_OID_OUTPUT_FORMAT" => 4, + "NETSNMP_DS_LIB_STRING_OUTPUT_FORMAT" => 5, + "NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH" => 6, + "NETSNMP_DS_LIB_SERVERSENDBUF" => 7, + "NETSNMP_DS_LIB_SERVERRECVBUF" => 8, + "NETSNMP_DS_LIB_CLIENTSENDBUF" => 9, + "NETSNMP_DS_LIB_CLIENTRECVBUF" => 10, + "NETSNMP_DS_SNMP_VERSION_1" => 128, + "NETSNMP_DS_SNMP_VERSION_2c" => 1, + "NETSNMP_DS_SNMP_VERSION_3" => 3, + "NETSNMP_DS_LIB_SECNAME" => 0, + "NETSNMP_DS_LIB_CONTEXT" => 1, + "NETSNMP_DS_LIB_PASSPHRASE" => 2, + "NETSNMP_DS_LIB_AUTHPASSPHRASE" => 3, + "NETSNMP_DS_LIB_PRIVPASSPHRASE" => 4, + "NETSNMP_DS_LIB_OPTIONALCONFIG" => 5, + "NETSNMP_DS_LIB_APPTYPE" => 6, + "NETSNMP_DS_LIB_COMMUNITY" => 7, + "NETSNMP_DS_LIB_PERSISTENT_DIR" => 8, + "NETSNMP_DS_LIB_CONFIGURATION_DIR" => 9, + "NETSNMP_DS_LIB_SECMODEL" => 10, + "NETSNMP_DS_LIB_MIBDIRS" => 11, + "NETSNMP_DS_LIB_OIDSUFFIX" => 12, + "NETSNMP_DS_LIB_OIDPREFIX" => 13, + "NETSNMP_DS_LIB_CLIENT_ADDR" => 14, + "NETSNMP_DS_LIB_TEMP_FILE_PATTERN" => 15, + "NETSNMP_DS_LIB_AUTHMASTERKEY" => 16, + "NETSNMP_DS_LIB_PRIVMASTERKEY" => 17, + "NETSNMP_DS_LIB_AUTHLOCALIZEDKEY" => 18, + "NETSNMP_DS_LIB_PRIVLOCALIZEDKEY" => 19, + "NETSNMP_DS_LIB_APPTYPES" => 20, + "NETSNMP_DS_LIB_KSM_KEYTAB" => 21, + "NETSNMP_DS_LIB_KSM_SERVICE_NAME" => 22, + ); + + plan tests => scalar(keys(%tests)) + 10; +} - print "1.." . (scalar(keys(%tests)) + 10) . "\n"; - } -END {print "not ok 1\n" unless $loaded;} use NetSNMP::default_store (':all'); -$loaded = 1; -print "ok 1\n"; +ok(1); ######################### End of black magic. -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - -print ((netsnmp_ds_set_string(1, 1, "hi there") == 0) ? "ok 2\n" : "not ok 2\n"); -print ((netsnmp_ds_get_string(1, 1) eq "hi there") ? "ok 3\n" : "not ok 3\n"); -print ((netsnmp_ds_set_int(1, 1, 42) == 0) ? "ok 4\n" : "not ok 4\n"); -print ((netsnmp_ds_get_int(1, 1) == 42) ? "ok 5\n" : "not ok 5\n"); -print ((netsnmp_ds_get_int(1, 2) == 0) ? "ok 6\n" : "not ok 6\n"); -print ((NETSNMP_DS_LIB_REGEX_ACCESS == 15) ? "ok 7\n" : "not ok 7\n"); -print ((netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, 1) == 42) ? "ok 8\n" : "not ok 8\n"); -print ((netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, DS_LIB_DEFAULT_PORT, 9161) == 0) ? "ok 9\n" : "not ok 9\n"); -print ((netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, DS_LIB_DEFAULT_PORT) == 9161) ? "ok 10\n" : "not ok 10\n"); +ok(netsnmp_ds_set_string(1, 1, "hi there") == 0); +ok(netsnmp_ds_get_string(1, 1) eq "hi there"); +ok(netsnmp_ds_set_int(1, 1, 42) == 0); +ok(netsnmp_ds_get_int(1, 1) == 42); +ok(netsnmp_ds_get_int(1, 2) == 0); +ok(NETSNMP_DS_LIB_REGEX_ACCESS == 15); +ok(netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, 1) == 42); +ok(netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DEFAULT_PORT, 9161) == 0); +ok(netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DEFAULT_PORT) == 9161); -$c = 10; foreach my $i (keys(%tests)) { - my $str = "NetSNMP::default_store::$i"; - my $val = eval $str; -# print "$i -> $val -> $tests{$i}\n"; - $c++; - print (($val eq $tests{$i})?"ok $c\n" : "not ok $c\n# error: name=$i value_expected=$tests{$i} value_got=$val \n"); + my $val = eval("NetSNMP::default_store::$i"); + # print "$i -> $val -> $tests{$i}\n"; + ok($val eq $tests{$i}); } diff --git a/perl/make-perl-makefiles b/perl/make-perl-makefiles deleted file mode 100644 index 8a96487..0000000 --- a/perl/make-perl-makefiles +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/perl - - -open(I, "Makefile.subs.pl"); -@stuff = ; - -foreach my $i (@ARGV) { - print "updating $i\n"; - open(I, $i); - open(O,">$i.new"); - while() { - # start replacement here - last if /common subroutines -- DO NOT EDIT/; - print O; - } - print O "# common subroutines -- DO NOT EDIT.\n"; - print O "# They are imported from the Makefile.subs.pl file\n"; - print O @stuff; - close(I); - close(O); - rename($i,"$i.bak"); - rename("$i.new", "$i"); -} diff --git a/python/netsnmp/__init__.py b/python/netsnmp/__init__.py index 1d20dac..421945b 100644 --- a/python/netsnmp/__init__.py +++ b/python/netsnmp/__init__.py @@ -1 +1 @@ -from client import * +from .client import * diff --git a/python/netsnmp/client.py b/python/netsnmp/client.py index 6fc4b2e..daf11a4 100644 --- a/python/netsnmp/client.py +++ b/python/netsnmp/client.py @@ -1,13 +1,13 @@ -import client_intf -import string +from __future__ import print_function import re -import types from sys import stderr +import netsnmp +import netsnmp.client_intf # control verbosity of error output verbose = 1 -secLevelMap = { 'noAuthNoPriv':1, 'authNoPriv':2, 'authPriv':3 } +secLevelMap = {'noAuthNoPriv':1, 'authNoPriv':2, 'authPriv':3} def _parse_session_args(kargs): sessArgs = { @@ -35,36 +35,42 @@ def _parse_session_args(kargs): 'TheirHostname':'', 'TrustCert':'' } - keys = kargs.keys() + keys = list(kargs.keys()) for key in keys: - if sessArgs.has_key(key): + if key in sessArgs: sessArgs[key] = kargs[key] else: - print >>stderr, "ERROR: unknown key", key + print("ERROR: unknown key", key, file=stderr) return sessArgs def STR(obj): if obj != None: obj = str(obj) return obj - + +def obj_to_str(obj): + return type(obj).__name__ + ":" + str(obj.__dict__) + class Varbind(object): - def __init__(self, tag=None, iid=None, val=None, type=None): + def __init__(self, tag=None, iid=None, val=None, type_arg=None): self.tag = STR(tag) self.iid = STR(iid) self.val = STR(val) - self.type = STR(type) + self.type = STR(type_arg) # parse iid out of tag if needed - if iid == None and tag != None: + if iid is None and tag is not None: regex = re.compile(r'^((?:\.\d+)+|(?:\w+(?:[-:]*\w+)+))\.?(.*)$') match = regex.match(tag) if match: - (self.tag, self.iid) = match.group(1,2) + (self.tag, self.iid) = match.group(1, 2) def __setattr__(self, name, val): self.__dict__[name] = STR(val) + def __str__(self): + return obj_to_str(self) + def print_str(self): return self.tag, self.iid, self.val, self.type @@ -81,7 +87,7 @@ def __init__(self, *vs): def __len__(self): return len(self.varbinds) - + def __getitem__(self, index): return self.varbinds[index] @@ -103,13 +109,15 @@ def __repr__(self): def __getslice__(self, i, j): return self.varbinds[i:j] - def append(self, *vars): - for var in vars: + def __str__(self): + return str([str(v) for v in self.varbinds]) + + def append(self, *varlist): + for var in varlist: if isinstance(var, netsnmp.client.Varbind): self.varbinds.append(var) else: raise TypeError - class Session(object): @@ -121,22 +129,20 @@ def __init__(self, **args): self.UseEnums = 0 self.BestGuess = 0 self.RetryNoSuch = 0 - self.ErrorStr = '' - self.ErrorNum = 0 - self.ErrorInd = 0 - + self._clear_error() + sess_args = _parse_session_args(args) - for k,v in sess_args.items(): + for k, v in list(sess_args.items()): self.__dict__[k] = v - + # check for transports that may be tunneled - transportCheck = re.compile('^(tls|dtls|ssh)'); + transportCheck = re.compile('^(tls|dtls|ssh)') match = transportCheck.match(sess_args['DestHost']) if match: - self.sess_ptr = client_intf.session_tunneled( + self.sess_ptr = netsnmp.client_intf.session_tunneled( sess_args['Version'], sess_args['DestHost'], sess_args['LocalPort'], @@ -150,9 +156,9 @@ def __init__(self, **args): sess_args['TheirIdentity'], sess_args['TheirHostname'], sess_args['TrustCert'], - ); + ) elif sess_args['Version'] == 3: - self.sess_ptr = client_intf.session_v3( + self.sess_ptr = netsnmp.client_intf.session_v3( sess_args['Version'], sess_args['DestHost'], sess_args['LocalPort'], @@ -170,42 +176,53 @@ def __init__(self, **args): sess_args['Engineboots'], sess_args['Enginetime']) else: - self.sess_ptr = client_intf.session( + self.sess_ptr = netsnmp.client_intf.session( sess_args['Version'], sess_args['Community'], sess_args['DestHost'], sess_args['LocalPort'], sess_args['Retries'], sess_args['Timeout']) - + + def _clear_error(self): + self.ErrorStr = '' + self.ErrorNum = 0 + self.ErrorInd = 0 + def get(self, varlist): - res = client_intf.get(self, varlist) + self._clear_error() + res = netsnmp.client_intf.get(self, varlist) return res def set(self, varlist): - res = client_intf.set(self, varlist) + self._clear_error() + res = netsnmp.client_intf.set(self, varlist) return res - + def getnext(self, varlist): - res = client_intf.getnext(self, varlist) + self._clear_error() + res = netsnmp.client_intf.getnext(self, varlist) return res def getbulk(self, nonrepeaters, maxrepetitions, varlist): + self._clear_error() if self.Version == 1: return None - res = client_intf.getbulk(self, nonrepeaters, maxrepetitions, varlist) + res = netsnmp.client_intf.getbulk(self, nonrepeaters, maxrepetitions, varlist) return res def walk(self, varlist): - res = client_intf.walk(self, varlist) + self._clear_error() + res = netsnmp.client_intf.walk(self, varlist) return res def __del__(self): - res = client_intf.delete_session(self) + res = netsnmp.client_intf.delete_session(self) return res -import netsnmp - + def __str__(self): + return obj_to_str(self) + def snmpget(*args, **kargs): sess = Session(**kargs) var_list = VarList() @@ -239,7 +256,7 @@ def snmpgetnext(*args, **kargs): res = sess.getnext(var_list) return res -def snmpgetbulk(nonrepeaters, maxrepetitions,*args, **kargs): +def snmpgetbulk(nonrepeaters, maxrepetitions, *args, **kargs): sess = Session(**kargs) var_list = VarList() for arg in args: @@ -263,4 +280,3 @@ def snmpwalk(*args, **kargs): var_list.append(Varbind(arg)) res = sess.walk(var_list) return res - diff --git a/python/netsnmp/client_intf.c b/python/netsnmp/client_intf.c index 8b8805d..a41f06b 100644 --- a/python/netsnmp/client_intf.c +++ b/python/netsnmp/client_intf.c @@ -1,3 +1,5 @@ +#define PY_SSIZE_T_CLEAN + #include #if PY_VERSION_HEX < 0x02050000 @@ -38,80 +40,58 @@ typedef int Py_ssize_t; #define NO_RETRY_NOSUCH 0 -/* these should be part of transform_oids.h ? */ -#define USM_AUTH_PROTO_MD5_LEN 10 -#define USM_AUTH_PROTO_SHA_LEN 10 -#define USM_PRIV_PROTO_DES_LEN 10 - #define STRLEN(x) (x ? strlen(x) : 0) -/* from perl/SNMP/perlsnmp.h: */ -#ifndef timeradd -#define timeradd(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ - if ((result)->tv_usec >= 1000000) \ - { \ - ++(result)->tv_sec; \ - (result)->tv_usec -= 1000000; \ - } \ - } while (0) -#endif - -#ifndef timersub -#define timersub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ - } while (0) -#endif typedef netsnmp_session SnmpSession; typedef struct tree SnmpMibNode; -static int __is_numeric_oid (char*); -static int __is_leaf (struct tree*); -static int __translate_appl_type (char*); -static int __translate_asn_type (int); -static int __snprint_value (char *, size_t, - netsnmp_variable_list*, struct tree *, - int, int); -static int __sprint_num_objid (char *, oid *, int); -static int __scan_num_objid (char *, oid *, size_t *); -static int __get_type_str (int, char *); -static int __get_label_iid (char *, char **, char **, int); -static struct tree * __tag2oid (char *, char *, oid *, int *, int *, int); -static int __concat_oid_str (oid *, int *, char *); -static int __add_var_val_str (netsnmp_pdu *, oid *, int, char *, - int, int); + #define USE_NUMERIC_OIDS 0x08 #define NON_LEAF_NAME 0x04 #define USE_LONG_NAMES 0x02 #define FAIL_ON_NULL_IID 0x01 #define NO_FLAGS 0x00 +static int _debug_level; -/* Wrapper around fprintf(stderr, ...) for clean and easy debug output. */ -static int _debug_level = 0; -#ifdef DEBUGGING -#define DBPRT(severity, otherargs) \ - do { \ - if (_debug_level && severity <= _debug_level) { \ - (void)printf(otherargs); \ - } \ - } while (/*CONSTCOND*/0) -#else /* DEBUGGING */ -#define DBPRT(severity, otherargs) /* Ignore */ -#endif /* DEBUGGING */ +struct type_table_entry { + uint8_t mib_type; + uint8_t asn_type; + int8_t cmp_len; + const char *name; +}; + +static const struct type_table_entry type_table[] = { + { TYPE_INTEGER32, 0, 8, "INTEGER32" }, + { TYPE_INTEGER, ASN_INTEGER, 3, "INTEGER" }, + { TYPE_UNSIGNED32, 0, 3, "UNSIGNED32" }, + /* -1 to use strcasecmp() to avoid matching COUNTER64 */ + { TYPE_COUNTER, ASN_COUNTER, -1, "COUNTER" }, + { TYPE_GAUGE, ASN_GAUGE, 3, "GAUGE" }, + { TYPE_IPADDR, ASN_IPADDRESS, 3, "IPADDR" }, + { TYPE_OCTETSTR, ASN_OCTET_STR, 3, "OCTETSTR" }, + { TYPE_TIMETICKS, ASN_TIMETICKS, 3, "TICKS" }, + { TYPE_OPAQUE, ASN_OPAQUE, 3, "OPAQUE" }, + { TYPE_OBJID, ASN_OBJECT_ID, 3, "OBJECTID" }, + { TYPE_NETADDR, 0, 3, "NETADDR" }, + { TYPE_COUNTER64, ASN_COUNTER64, 3, "COUNTER64" }, + { TYPE_NULL, ASN_NULL, 3, "NULL" }, + { TYPE_BITSTRING, ASN_BIT_STR, 3, "BITS" }, + /* historic - should not show up but it does? */ + { TYPE_UINTEGER, ASN_UINTEGER, 3, "UINTEGER" }, + { TYPE_NOTIFTYPE, 0, 3, "NOTIF" }, + { TYPE_TRAPTYPE, 0, 4, "TRAP" }, + + { SNMP_ENDOFMIBVIEW, SNMP_ENDOFMIBVIEW, 3, "ENDOFMIBVIEW" }, + { SNMP_NOSUCHOBJECT, SNMP_NOSUCHOBJECT, 7, "NOSUCHOBJECT" }, + { SNMP_NOSUCHINSTANCE, SNMP_NOSUCHINSTANCE, 7, "NOSUCHINSTANCE"}, + + { } +}; -#define SAFE_FREE(x) do {if (x != NULL) free(x);} while(/*CONSTCOND*/0) void -__libraries_init(char *appname) +__libraries_init(const char *appname) { static int have_inited = 0; @@ -119,162 +99,157 @@ __libraries_init(char *appname) return; have_inited = 1; - snmp_set_quick_print(1); + netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_QUICK_PRINT, 1); snmp_enable_stderrlog(); init_snmp(appname); - - netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS, 1); - netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY, 1); + + netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS, 1); + netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY, + 1); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, NETSNMP_OID_OUTPUT_SUFFIX); } static int -__is_numeric_oid (oidstr) -char* oidstr; +__is_numeric_oid(const char *oidstr) { - if (!oidstr) return 0; + if (!oidstr) + return 0; for (; *oidstr; oidstr++) { - if (isalpha((int)*oidstr)) return 0; + if (isalpha((unsigned char)*oidstr)) + return 0; } - return(1); + return 1; } static int -__is_leaf (tp) -struct tree* tp; +__get_type_str(int type, char *str) +{ + const struct type_table_entry *e; + + for (e = type_table; e->name; e++) { + if (type == e->mib_type) { + strcpy(str, e->name); + return SUCCESS; + } + } + + strcpy(str, ""); + if (_debug_level) + printf("__get_type_str:FAILURE(%d)\n", type); + + return FAILURE; +} + +static int +__is_leaf(struct tree* tp) { char buf[MAX_TYPE_NAME_LEN]; - return (tp && (__get_type_str(tp->type,buf) || - (tp->parent && __get_type_str(tp->parent->type,buf) ))); + + return tp && (__get_type_str(tp->type,buf) || + (tp->parent && __get_type_str(tp->parent->type,buf))); } +#ifndef NETSNMP_NO_WRITE_SUPPORT static int -__translate_appl_type(typestr) -char* typestr; +__translate_appl_type(const char *typestr) { - if (typestr == NULL || *typestr == '\0') return TYPE_UNKNOWN; - - if (!strncasecmp(typestr,"INTEGER32",8)) - return(TYPE_INTEGER32); - if (!strncasecmp(typestr,"INTEGER",3)) - return(TYPE_INTEGER); - if (!strncasecmp(typestr,"UNSIGNED32",3)) - return(TYPE_UNSIGNED32); - if (!strcasecmp(typestr,"COUNTER")) /* check all in case counter64 */ - return(TYPE_COUNTER); - if (!strncasecmp(typestr,"GAUGE",3)) - return(TYPE_GAUGE); - if (!strncasecmp(typestr,"IPADDR",3)) - return(TYPE_IPADDR); - if (!strncasecmp(typestr,"OCTETSTR",3)) - return(TYPE_OCTETSTR); - if (!strncasecmp(typestr,"TICKS",3)) - return(TYPE_TIMETICKS); - if (!strncasecmp(typestr,"OPAQUE",3)) - return(TYPE_OPAQUE); - if (!strncasecmp(typestr,"OBJECTID",3)) - return(TYPE_OBJID); - if (!strncasecmp(typestr,"NETADDR",3)) - return(TYPE_NETADDR); - if (!strncasecmp(typestr,"COUNTER64",3)) - return(TYPE_COUNTER64); - if (!strncasecmp(typestr,"NULL",3)) - return(TYPE_NULL); - if (!strncasecmp(typestr,"BITS",3)) - return(TYPE_BITSTRING); - if (!strncasecmp(typestr,"ENDOFMIBVIEW",3)) - return(SNMP_ENDOFMIBVIEW); - if (!strncasecmp(typestr,"NOSUCHOBJECT",7)) - return(SNMP_NOSUCHOBJECT); - if (!strncasecmp(typestr,"NOSUCHINSTANCE",7)) - return(SNMP_NOSUCHINSTANCE); - if (!strncasecmp(typestr,"UINTEGER",3)) - return(TYPE_UINTEGER); /* historic - should not show up */ - /* but it does? */ - if (!strncasecmp(typestr, "NOTIF", 3)) - return(TYPE_NOTIFTYPE); - if (!strncasecmp(typestr, "TRAP", 4)) - return(TYPE_TRAPTYPE); - return(TYPE_UNKNOWN); + const struct type_table_entry *e; + + if (typestr == NULL || *typestr == '\0') + return TYPE_UNKNOWN; + + for (e = type_table; e->name; e++) { + if ((e->cmp_len < 0 && strcasecmp(typestr, e->name) == 0) || + (e->cmp_len > 0 && strncasecmp(typestr, e->name, e->cmp_len) == 0)) + return e->mib_type; + } + + return TYPE_UNKNOWN; } +#endif /* NETSNMP_NO_WRITE_SUPPORT */ static int -__translate_asn_type(type) -int type; +__translate_asn_type(int asn_type) { - switch (type) { - case ASN_INTEGER: - return(TYPE_INTEGER); - case ASN_OCTET_STR: - return(TYPE_OCTETSTR); - case ASN_OPAQUE: - return(TYPE_OPAQUE); - case ASN_OBJECT_ID: - return(TYPE_OBJID); - case ASN_TIMETICKS: - return(TYPE_TIMETICKS); - case ASN_GAUGE: - return(TYPE_GAUGE); - case ASN_COUNTER: - return(TYPE_COUNTER); - case ASN_IPADDRESS: - return(TYPE_IPADDR); - case ASN_BIT_STR: - return(TYPE_BITSTRING); - case ASN_NULL: - return(TYPE_NULL); - /* no translation for these exception type values */ - case SNMP_ENDOFMIBVIEW: - case SNMP_NOSUCHOBJECT: - case SNMP_NOSUCHINSTANCE: - return(type); - case ASN_UINTEGER: - return(TYPE_UINTEGER); - case ASN_COUNTER64: - return(TYPE_COUNTER64); - default: - fprintf(stderr, "translate_asn_type: unhandled asn type (%d)\n",type); - return(TYPE_OTHER); - } + const struct type_table_entry *e; + + netsnmp_assert(asn_type != 0); + + for (e = type_table; e->name; e++) + if (asn_type == e->asn_type) + return e->mib_type; + + fprintf(stderr, "translate_asn_type: unhandled asn type (%d)\n", asn_type); + return TYPE_OTHER; +} + +static void *enlarge_buffer(char **buf, size_t *buf_len, size_t desired_len) +{ + void *new_buf; + + if (desired_len > *buf_len) { + new_buf = netsnmp_realloc(*buf, desired_len); + if (!new_buf) + return NULL; + *buf = new_buf; + *buf_len = desired_len; + } + return *buf; +} + +static int +__sprint_num_objid(char **buf, size_t *buf_len, const oid *objid, int len) +{ + char *p, *end; + int i; + + enlarge_buffer(buf, buf_len, len * 16); + p = *buf; + end = *buf + *buf_len; + (*buf)[0] = '\0'; + for (i = 0; i < len; i++) + p += snprintf(p, end - p, ".%" NETSNMP_PRIo "u", *objid++); + + return SUCCESS; } #define USE_BASIC 0 #define USE_ENUMS 1 #define USE_SPRINT_VALUE 2 static int -__snprint_value (buf, buf_len, var, tp, type, flag) -char * buf; -size_t buf_len; -netsnmp_variable_list * var; -struct tree * tp; -int type; -int flag; +__snprint_value(char **buf, size_t *buf_len, const netsnmp_variable_list *var, + const struct tree *tp, int type, int flag) { - int len = 0; + size_t out_len = 0, len = 0; u_char* ip; struct enum_list *ep; - - buf[0] = '\0'; + enlarge_buffer(buf, buf_len, 32); + (*buf)[0] = '\0'; if (flag == USE_SPRINT_VALUE) { - snprint_value(buf, buf_len, var->name, var->name_length, var); - len = STRLEN(buf); + if (sprint_realloc_value((u_char **)buf, buf_len, &out_len, 1, + var->name, var->name_length, var)) { + *buf_len = out_len; + len = STRLEN(*buf); + } } else { switch (var->type) { case ASN_INTEGER: if (flag == USE_ENUMS) { for(ep = tp->enums; ep; ep = ep->next) { if (ep->value == *var->val.integer) { - strlcpy(buf, ep->label, buf_len); - len = STRLEN(buf); + strlcpy(*buf, ep->label, *buf_len); + len = STRLEN(*buf); break; } } } if (!len) { - snprintf(buf, buf_len, "%ld", *var->val.integer); - len = STRLEN(buf); + snprintf(*buf, *buf_len, "%ld", *var->val.integer); + len = STRLEN(*buf); } break; @@ -282,41 +257,42 @@ int flag; case ASN_COUNTER: case ASN_TIMETICKS: case ASN_UINTEGER: - snprintf(buf, buf_len, "%lu", (unsigned long) *var->val.integer); - len = STRLEN(buf); + snprintf(*buf, *buf_len, "%lu", *var->val.integer); + len = STRLEN(*buf); break; case ASN_OCTET_STR: case ASN_OPAQUE: len = var->val_len; - if (len > buf_len) - len = buf_len; - memcpy(buf, (char*)var->val.string, len); + enlarge_buffer(buf, buf_len, len + 1); + if (len > *buf_len - 1) + len = *buf_len - 1; + memcpy(*buf, var->val.string, len); break; case ASN_IPADDRESS: ip = (u_char*)var->val.string; - snprintf(buf, buf_len, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); - len = STRLEN(buf); + snprintf(*buf, *buf_len, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); + len = STRLEN(*buf); break; case ASN_NULL: break; case ASN_OBJECT_ID: - __sprint_num_objid(buf, (oid *)(var->val.objid), - var->val_len/sizeof(oid)); - len = STRLEN(buf); + __sprint_num_objid(buf, buf_len, var->val.objid, + var->val_len / sizeof(oid)); + len = STRLEN(*buf); break; case SNMP_ENDOFMIBVIEW: - snprintf(buf, buf_len, "%s", "ENDOFMIBVIEW"); + snprintf(*buf, *buf_len, "%s", "ENDOFMIBVIEW"); break; case SNMP_NOSUCHOBJECT: - snprintf(buf, buf_len, "%s", "NOSUCHOBJECT"); + snprintf(*buf, *buf_len, "%s", "NOSUCHOBJECT"); break; case SNMP_NOSUCHINSTANCE: - snprintf(buf, buf_len, "%s", "NOSUCHINSTANCE"); + snprintf(*buf, *buf_len, "%s", "NOSUCHINSTANCE"); break; case ASN_COUNTER64: @@ -324,33 +300,36 @@ int flag; case ASN_OPAQUE_COUNTER64: case ASN_OPAQUE_U64: #endif - printU64(buf,(struct counter64 *)var->val.counter64); - len = STRLEN(buf); + printU64(*buf, var->val.counter64); + len = STRLEN(*buf); break; #ifdef OPAQUE_SPECIAL_TYPES case ASN_OPAQUE_I64: - printI64(buf,(struct counter64 *)var->val.counter64); - len = STRLEN(buf); + printI64(*buf, var->val.counter64); + len = STRLEN(*buf); break; #endif case ASN_BIT_STR: - snprint_bitstring(buf, buf_len, var, NULL, NULL, NULL); - len = STRLEN(buf); + if (sprint_realloc_bitstring((u_char **)buf, buf_len, &out_len, 1, + var, NULL, NULL, NULL)) { + *buf_len = out_len; + len = STRLEN(*buf); + } break; #ifdef OPAQUE_SPECIAL_TYPES case ASN_OPAQUE_FLOAT: if (var->val.floatVal) - snprintf(buf, buf_len, "%f", *var->val.floatVal); + snprintf(*buf, *buf_len, "%f", *var->val.floatVal); break; - + case ASN_OPAQUE_DOUBLE: if (var->val.doubleVal) - snprintf(buf, buf_len, "%f", *var->val.doubleVal); + snprintf(*buf, *buf_len, "%f", *var->val.doubleVal); break; #endif - + case ASN_NSAP: default: fprintf(stderr,"snprint_value: asn type not handled %d\n",var->type); @@ -360,135 +339,37 @@ int flag; } static int -__sprint_num_objid (buf, objid, len) -char *buf; -oid *objid; -int len; +__scan_num_objid(const char *buf, oid *objid, size_t *len) { - int i; - buf[0] = '\0'; - for (i=0; i < len; i++) { - sprintf(buf,".%lu",*objid++); - buf += STRLEN(buf); - } - return SUCCESS; -} + const char *cp; -static int -__scan_num_objid (buf, objid, len) -char *buf; -oid *objid; -size_t *len; -{ - char *cp; *len = 0; - if (*buf == '.') buf++; + if (*buf == '.') + buf++; cp = buf; while (*buf) { if (*buf++ == '.') { - sscanf(cp, "%lu", objid++); + sscanf(cp, "%" NETSNMP_PRIo "u", objid++); /* *objid++ = atoi(cp); */ (*len)++; cp = buf; } else { - if (isalpha((int)*buf)) { + if (isalpha((unsigned char)*buf)) { return FAILURE; } } } - sscanf(cp, "%lu", objid++); + sscanf(cp, "%" NETSNMP_PRIo "u", objid++); /* *objid++ = atoi(cp); */ (*len)++; return SUCCESS; } -static int -__get_type_str (type, str) -int type; -char * str; -{ - switch (type) { - case TYPE_OBJID: - strcpy(str, "OBJECTID"); - break; - case TYPE_OCTETSTR: - strcpy(str, "OCTETSTR"); - break; - case TYPE_INTEGER: - strcpy(str, "INTEGER"); - break; - case TYPE_INTEGER32: - strcpy(str, "INTEGER32"); - break; - case TYPE_UNSIGNED32: - strcpy(str, "UNSIGNED32"); - break; - case TYPE_NETADDR: - strcpy(str, "NETADDR"); - break; - case TYPE_IPADDR: - strcpy(str, "IPADDR"); - break; - case TYPE_COUNTER: - strcpy(str, "COUNTER"); - break; - case TYPE_GAUGE: - strcpy(str, "GAUGE"); - break; - case TYPE_TIMETICKS: - strcpy(str, "TICKS"); - break; - case TYPE_OPAQUE: - strcpy(str, "OPAQUE"); - break; - case TYPE_COUNTER64: - strcpy(str, "COUNTER64"); - break; - case TYPE_NULL: - strcpy(str, "NULL"); - break; - case SNMP_ENDOFMIBVIEW: - strcpy(str, "ENDOFMIBVIEW"); - break; - case SNMP_NOSUCHOBJECT: - strcpy(str, "NOSUCHOBJECT"); - break; - case SNMP_NOSUCHINSTANCE: - strcpy(str, "NOSUCHINSTANCE"); - break; - case TYPE_UINTEGER: - strcpy(str, "UINTEGER"); /* historic - should not show up */ - /* but it does? */ - break; - case TYPE_NOTIFTYPE: - strcpy(str, "NOTIF"); - break; - case TYPE_BITSTRING: - strcpy(str, "BITS"); - break; - case TYPE_TRAPTYPE: - strcpy(str, "TRAP"); - break; - case TYPE_OTHER: /* not sure if this is a valid leaf type?? */ - case TYPE_NSAPADDRESS: - default: /* unsupported types for now */ - strcpy(str, ""); - if (_debug_level) printf("__get_type_str:FAILURE(%d)\n", type); - - return(FAILURE); - } - return SUCCESS; -} - -/* does a destructive disection of .... returning +/* does a destructive dissection of .... returning and in seperate strings (note: will destructively alter input string, 'name') */ static int -__get_label_iid (name, last_label, iid, flag) -char * name; -char ** last_label; -char ** iid; -int flag; +__get_label_iid(char *name, const char **last_label, const char **iid, int flag) { char *lcp; char *icp; @@ -497,45 +378,45 @@ int flag; *last_label = *iid = NULL; - if (len == 0) return(FAILURE); + if (len == 0) + return FAILURE; /* Handle case where numeric oid's have been requested. The input 'name' ** in this case should be a numeric OID -- return failure if not. */ if ((flag & USE_NUMERIC_OIDS)) { if (!__is_numeric_oid(name)) - return(FAILURE); + return FAILURE; /* Walk backward through the string, looking for first two '.' chars */ lcp = &(name[len]); icp = NULL; while (lcp > name) { - if (*lcp == '.') { - - /* If this is the first occurence of '.', note it in icp. - ** Otherwise, this must be the second occurrence, so break - ** out of the loop. - */ - if (icp == NULL) - icp = lcp; - else - break; - } - lcp --; + if (*lcp == '.') { + /* If this is the first occurrence of '.', note it in icp. + ** Otherwise, this must be the second occurrence, so break + ** out of the loop. + */ + if (icp == NULL) + icp = lcp; + else + break; + } + lcp --; } /* Make sure we found at least a label and index. */ if (!icp) - return(FAILURE); + return FAILURE; /* Push forward past leading '.' chars and separate the strings. */ - lcp ++; - *icp ++ = '\0'; + lcp++; + *icp++ = '\0'; - *last_label = (flag & USE_LONG_NAMES) ? name : lcp; + *last_label = flag & USE_LONG_NAMES ? name : lcp; *iid = icp; - return(SUCCESS); + return SUCCESS; } lcp = icp = &(name[len]); @@ -549,12 +430,14 @@ int flag; icp = lcp; } } - if (!found_label && isalpha((int)*lcp)) found_label = 1; + if (!found_label && isalpha((unsigned char)*lcp)) + found_label = 1; lcp--; } - if (!found_label || (!isdigit((int)*(icp+1)) && (flag & FAIL_ON_NULL_IID))) - return(FAILURE); + if (!found_label || (!isdigit((unsigned char)*(icp+1)) && + (flag & FAIL_ON_NULL_IID))) + return FAILURE; if (flag & NON_LEAF_NAME) { /* dont know where to start instance id */ /* put the whole thing in label */ @@ -586,28 +469,58 @@ int flag; *iid = icp; - return(SUCCESS); + return SUCCESS; +} + +/* function: __concat_oid_str + * + * This function converts a dotted-decimal string, soid_str, to an array + * of oid types and concatenates them on doid_arr begining at the index + * specified by doid_arr_len. + * + * returns : SUCCESS, FAILURE + */ +static int +__concat_oid_str(oid *doid_arr, size_t *doid_arr_len, const char *soid_str) +{ + char *soid_buf; + char *cp; + char *st; + + if (!soid_str || !*soid_str) + return SUCCESS; /* successfully added nothing */ + if (*soid_str == '.') + soid_str++; + soid_buf = strdup(soid_str); + if (!soid_buf) + return FAILURE; + cp = strtok_r(soid_buf,".",&st); + while (cp) { + sscanf(cp, "%" NETSNMP_PRIo "u", &(doid_arr[(*doid_arr_len)++])); + /* doid_arr[(*doid_arr_len)++] = atoi(cp); */ + cp = strtok_r(NULL,".",&st); + } + free(soid_buf); + return SUCCESS; } /* Convert a tag (string) to an OID array */ /* Tag can be either a symbolic name, or an OID string */ static struct tree * -__tag2oid(tag, iid, oid_arr, oid_arr_len, type, best_guess) -char * tag; -char * iid; -oid * oid_arr; -int * oid_arr_len; -int * type; -int best_guess; +__tag2oid(const char *tag, const char *iid, oid *oid_arr, size_t *oid_arr_len, + int *type, int best_guess) { struct tree *tp = NULL; struct tree *rtp = NULL; oid newname[MAX_OID_LEN], *op; size_t newname_len = 0; - if (type) *type = TYPE_UNKNOWN; - if (oid_arr_len) *oid_arr_len = 0; - if (!tag) goto done; + if (type) + *type = TYPE_UNKNOWN; + if (oid_arr_len) + *oid_arr_len = 0; + if (!tag) + goto done; /*********************************************************/ /* best_guess = 0 - same as no switches (read_objid) */ @@ -624,7 +537,7 @@ int best_guess; /* full symbolic (2) */ /* module::single symbolic (2) */ /* module::partial full symbolic (2) */ - if (best_guess == 1 || best_guess == 2) { + if (best_guess == 1 || best_guess == 2) { if (!__scan_num_objid(tag, newname, &newname_len)) { /* make sure it's not a numeric tag */ newname_len = MAX_OID_LEN; if (best_guess == 2) { /* Random search -IR */ @@ -633,7 +546,7 @@ int best_guess; } } else if (best_guess == 1) { /* Regex search -Ib */ - clear_tree_flags(get_tree_head()); + clear_tree_flags(get_tree_head()); if (get_wild_node(tag, newname, &newname_len)) { rtp = tp = get_tree(newname, newname_len, get_tree_head()); } @@ -642,18 +555,20 @@ int best_guess; else { rtp = tp = get_tree(newname, newname_len, get_tree_head()); } - if (type) *type = (tp ? tp->type : TYPE_UNKNOWN); - if ((oid_arr == NULL) || (oid_arr_len == NULL)) return rtp; - memcpy(oid_arr,(char*)newname,newname_len*sizeof(oid)); + if (type) + *type = (tp ? tp->type : TYPE_UNKNOWN); + if ((oid_arr == NULL) || (oid_arr_len == NULL)) + return rtp; + memcpy(oid_arr, newname, newname_len * sizeof(oid)); *oid_arr_len = newname_len; } - + /* if best_guess is off and multi part tag or module::tag */ /* numeric scalar */ /* module::single symbolic */ /* module::partial full symbolic */ /* FULL symbolic OID */ - else if (strchr(tag,'.') || strchr(tag,':')) { + else if (strchr(tag,'.') || strchr(tag,':')) { if (!__scan_num_objid(tag, newname, &newname_len)) { /* make sure it's not a numeric tag */ newname_len = MAX_OID_LEN; if (read_objid(tag, newname, &newname_len)) { /* long name */ @@ -666,19 +581,23 @@ int best_guess; else { rtp = tp = get_tree(newname, newname_len, get_tree_head()); } - if (type) *type = (tp ? tp->type : TYPE_UNKNOWN); - if ((oid_arr == NULL) || (oid_arr_len == NULL)) return rtp; - memcpy(oid_arr,(char*)newname,newname_len*sizeof(oid)); + if (type) + *type = (tp ? tp->type : TYPE_UNKNOWN); + if ((oid_arr == NULL) || (oid_arr_len == NULL)) + return rtp; + memcpy(oid_arr, newname, newname_len*sizeof(oid)); *oid_arr_len = newname_len; } - + /* else best_guess is off and it is a single leaf */ /* single symbolic */ - else { + else { rtp = tp = find_node(tag, get_tree_head()); if (tp) { - if (type) *type = tp->type; - if ((oid_arr == NULL) || (oid_arr_len == NULL)) return rtp; + if (type) + *type = tp->type; + if ((oid_arr == NULL) || (oid_arr_len == NULL)) + return rtp; /* code taken from get_node in snmp_client.c */ for(op = newname + MAX_OID_LEN - 1; op >= newname; op--){ *op = tp->subid; @@ -698,50 +617,13 @@ int best_guess; return(rtp); } -/* function: __concat_oid_str - * - * This function converts a dotted-decimal string, soid_str, to an array - * of oid types and concatenates them on doid_arr begining at the index - * specified by doid_arr_len. - * - * returns : SUCCESS, FAILURE - */ -static int -__concat_oid_str(doid_arr, doid_arr_len, soid_str) -oid *doid_arr; -int *doid_arr_len; -char * soid_str; -{ - char *soid_buf; - char *cp; - char *st; - - if (!soid_str || !*soid_str) return SUCCESS;/* successfully added nothing */ - if (*soid_str == '.') soid_str++; - soid_buf = strdup(soid_str); - if (!soid_buf) - return FAILURE; - cp = strtok_r(soid_buf,".",&st); - while (cp) { - sscanf(cp, "%lu", &(doid_arr[(*doid_arr_len)++])); - /* doid_arr[(*doid_arr_len)++] = atoi(cp); */ - cp = strtok_r(NULL,".",&st); - } - free(soid_buf); - return(SUCCESS); -} - +#ifndef NETSNMP_NO_WRITE_SUPPORT /* * add a varbind to PDU */ static int -__add_var_val_str(pdu, name, name_length, val, len, type) - netsnmp_pdu *pdu; - oid *name; - int name_length; - char * val; - int len; - int type; +__add_var_val_str(netsnmp_pdu *pdu, const oid *name, int name_length, + const char *val, int len, int type) { netsnmp_variable_list *vars; oid oidbuf[MAX_OID_LEN]; @@ -811,11 +693,9 @@ __add_var_val_str(pdu, name, name_length, val, len, type) case TYPE_OPAQUE: vars->type = ASN_OCTET_STR; OCT: - vars->val.string = malloc(len); + vars->val.string = netsnmp_memdup(val, len); vars->val_len = len; - if (val && len) - memcpy((char *)vars->val.string, val, len); - else { + if (!vars->val.string && len) { ret = FAILURE; vars->val.string = (u_char*)strdup(""); vars->val_len = 0; @@ -833,7 +713,7 @@ __add_var_val_str(pdu, name, name_length, val, len, type) ret = FAILURE; addr = 0; } - vars->val.integer = netsnmp_memdup(&addr, sizeof(addr)); + vars->val.integer = netsnmp_memdup((u_char **)&addr, sizeof(addr)); vars->val_len = sizeof(addr); } break; @@ -861,12 +741,14 @@ __add_var_val_str(pdu, name, name_length, val, len, type) return ret; } +#endif /* NETSNMP_NO_WRITE_SUPPORT */ /* takes ss and pdu as input and updates the 'response' argument */ /* the input 'pdu' argument will be freed */ static int -__send_sync_pdu(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, - int retry_nosuch, char *err_str, int *err_num, int *err_ind) +__send_sync_pdu(struct session_list *ss, netsnmp_pdu *pdu, + netsnmp_pdu **response, int retry_nosuch, + char *err_str, int *err_num, int *err_ind) { int status = 0; long command = pdu->command; @@ -892,7 +774,8 @@ __send_sync_pdu(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, status = snmp_sess_synch_response(ss, pdu, response); Py_END_ALLOW_THREADS - if ((*response == NULL) && (status == STAT_SUCCESS)) status = STAT_ERROR; + if ((*response == NULL) && (status == STAT_SUCCESS)) + status = STAT_ERROR; switch (status) { case STAT_SUCCESS: @@ -902,9 +785,11 @@ __send_sync_pdu(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, case SNMP_ERR_NOSUCHNAME: if (retry_nosuch && (pdu = snmp_fix_pdu(*response, command))) { - if (*response) snmp_free_pdu(*response); + if (*response) + snmp_free_pdu(*response); goto retry; } + /* fall through */ /* Pv1, SNMPsec, Pv2p, v2c, v2u, v2*, and SNMPv3 PDUs */ case SNMP_ERR_TOOBIG: @@ -927,9 +812,9 @@ __send_sync_pdu(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, /* in SNMPv2c, SNMPv2u, SNMPv2*, and SNMPv3 PDUs */ case SNMP_ERR_INCONSISTENTNAME: default: - strlcpy(err_str, (char*)snmp_errstring((*response)->errstat), + strlcpy(err_str, snmp_errstring((*response)->errstat), STR_BUF_SIZE); - *err_num = (int)(*response)->errstat; + *err_num = (*response)->errstat; *err_ind = (*response)->errindex; status = (*response)->errstat; break; @@ -944,18 +829,19 @@ __send_sync_pdu(netsnmp_session *ss, netsnmp_pdu *pdu, netsnmp_pdu **response, default: strcat(err_str, "send_sync_pdu: unknown status"); - *err_num = ss->s_snmp_errno; + *err_num = ss->session->s_snmp_errno; break; } done: if (tmp_err_str) { free(tmp_err_str); } - if (_debug_level && *err_num) printf("XXX sync PDU: %s\n", err_str); + if (_debug_level && *err_num) + printf("XXX sync PDU: %s\n", err_str); return(status); } -static PyObject * +static PyObject * py_netsnmp_construct_varbind(void) { PyObject *module; @@ -963,40 +849,51 @@ py_netsnmp_construct_varbind(void) PyObject *callable; module = PyImport_ImportModule("netsnmp"); + if (!module) + return NULL; dict = PyModule_GetDict(module); - + if (!dict) + return NULL; callable = PyDict_GetItemString(dict, "Varbind"); - + if (!callable) + return NULL; return PyObject_CallFunction(callable, ""); } +/* + * Retrieve attribute @attr_name of @obj, store it in buffer @val and + * store its length in *@len. Terminate @val with '\0' if @len == NULL. + */ static int -py_netsnmp_attr_string(PyObject *obj, char * attr_name, char **val, - Py_ssize_t *len) +py_netsnmp_attr_string(PyObject *obj, const char *attr_name, const char **val, + Py_ssize_t *len) { *val = NULL; if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) { PyObject *attr = PyObject_GetAttrString(obj, attr_name); if (attr) { - int retval; - retval = PyString_AsStringAndSize(attr, val, len); + *val = PyUnicode_AsUTF8AndSize(attr, len); Py_DECREF(attr); - return retval; + return 0; } } return -1; } -static long long -py_netsnmp_attr_long(PyObject *obj, char * attr_name) +/* + * Retrieve attribute @attr_name of @obj and return it as a long. Returns -1 + * on error. + */ +static long +py_netsnmp_attr_long(PyObject *obj, const char *attr_name) { - long long val = -1; + long val = -1; - if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) { + if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) { PyObject *attr = PyObject_GetAttrString(obj, attr_name); if (attr) { - val = PyInt_AsLong(attr); + val = PyLong_AsLong(attr); Py_DECREF(attr); } } @@ -1004,12 +901,16 @@ py_netsnmp_attr_long(PyObject *obj, char * attr_name) return val; } +/* + * Retrieve attribute @attr_name of @obj and return it as a void ponter. + * Returns NULL on error. + */ static void * -py_netsnmp_attr_void_ptr(PyObject *obj, char * attr_name) +py_netsnmp_attr_void_ptr(PyObject *obj, const char *attr_name) { void *val = NULL; - if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) { + if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) { PyObject *attr = PyObject_GetAttrString(obj, attr_name); if (attr) { val = PyLong_AsVoidPtr(attr); @@ -1033,15 +934,34 @@ py_netsnmp_verbose(void) return verbose; } +static int is_hex(const char* str, int len) +{ + const unsigned char *cp = (const unsigned char *) str; + int i; + + for (i = 0; i < len; i++, cp++) + if (!isprint(*cp) && !isspace(*cp)) + return 1; + + return 0; +} + +/* + * Set attribute @attr_name of @obj to the string @val. + */ static int -py_netsnmp_attr_set_string(PyObject *obj, char *attr_name, - char *val, size_t len) +py_netsnmp_attr_set_string(PyObject *obj, const char *attr_name, + const char *val, size_t len) { int ret = -1; + if (obj && attr_name) { - PyObject* val_obj = (val ? - Py_BuildValue("s#", val, len) : - Py_BuildValue("")); + int hex = is_hex(val, len); + PyObject* val_obj = val ? Py_BuildValue(hex ? "y#" : "s#", val, len) : + Py_BuildValue(""); + + if (!val_obj) + return -1; ret = PyObject_SetAttrString(obj, attr_name, val_obj); Py_DECREF(val_obj); } @@ -1075,15 +995,19 @@ static void __py_netsnmp_update_session_errors(PyObject *session, char *err_str, int err_num, int err_ind) { - PyObject *tmp_for_conversion; + PyObject *tmp_for_conversion; py_netsnmp_attr_set_string(session, "ErrorStr", err_str, STRLEN(err_str)); - tmp_for_conversion = PyInt_FromLong(err_num); + tmp_for_conversion = PyLong_FromLong(err_num); + if (!tmp_for_conversion) + return; /* nothing better to do? */ PyObject_SetAttrString(session, "ErrorNum", tmp_for_conversion); Py_DECREF(tmp_for_conversion); - tmp_for_conversion = PyInt_FromLong(err_ind); + tmp_for_conversion = PyLong_FromLong(err_ind); + if (!tmp_for_conversion) + return; /* nothing better to do? */ PyObject_SetAttrString(session, "ErrorInd", tmp_for_conversion); Py_DECREF(tmp_for_conversion); } @@ -1098,11 +1022,11 @@ netsnmp_create_session(PyObject *self, PyObject *args) int retries; int timeout; SnmpSession session = {0}; - SnmpSession *ss = NULL; + struct session_list *ss = NULL; int verbose = py_netsnmp_verbose(); if (!PyArg_ParseTuple(args, "issiii", &version, - &community, &peer, &lport, + &community, &peer, &lport, &retries, &timeout)) return NULL; @@ -1141,11 +1065,11 @@ netsnmp_create_session(PyObject *self, PyObject *args) ss = snmp_sess_open(&session); if (ss == NULL) { - if (verbose) + if (verbose) printf("error:snmp_new_session: Couldn't open SNMP session"); } end: - return PyLong_FromVoidPtr((void *)ss); + return PyLong_FromVoidPtr(ss); } static PyObject * @@ -1165,17 +1089,18 @@ netsnmp_create_session_v3(PyObject *self, PyObject *args) char * auth_pass; char * priv_proto; char * priv_pass; + int priv_type; int eng_boots; int eng_time; SnmpSession session = {0}; - SnmpSession *ss = NULL; + struct session_list *ss = NULL; int verbose = py_netsnmp_verbose(); if (!PyArg_ParseTuple(args, "isiiisisssssssii", &version, &peer, &lport, &retries, &timeout, - &sec_name, &sec_level, &sec_eng_id, - &context_eng_id, &context, - &auth_proto, &auth_pass, + &sec_name, &sec_level, &sec_eng_id, + &context_eng_id, &context, + &auth_proto, &auth_pass, &priv_proto, &priv_pass, &eng_boots, &eng_time)) return NULL; @@ -1210,28 +1135,23 @@ netsnmp_create_session_v3(PyObject *self, PyObject *args) session.engineBoots = eng_boots; session.engineTime = eng_time; -#ifndef DISABLE_MD5 - if (!strcmp(auth_proto, "MD5")) { - session.securityAuthProto = - snmp_duplicate_objid(usmHMACMD5AuthProtocol, - USM_AUTH_PROTO_MD5_LEN); - session.securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN; - } else -#endif - if (!strcmp(auth_proto, "SHA")) { - session.securityAuthProto = - snmp_duplicate_objid(usmHMACSHA1AuthProtocol, - USM_AUTH_PROTO_SHA_LEN); - session.securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN; - } else if (!strcmp(auth_proto, "DEFAULT")) { - const oid* a = get_default_authtype(&session.securityAuthProtoLen); - session.securityAuthProto - = snmp_duplicate_objid(a, session.securityAuthProtoLen); - } else { + if (!strcmp(auth_proto, "DEFAULT")) { + const oid* a = get_default_authtype(&session.securityAuthProtoLen); + session.securityAuthProto + = snmp_duplicate_objid(a, session.securityAuthProtoLen); + } else { + const oid *auth_prot; + int auth_type = usm_lookup_auth_type(auth_proto); + if (auth_type < 0) { if (verbose) printf("error:snmp_new_v3_session:Unsupported authentication protocol(%s)\n", auth_proto); goto end; } + auth_prot = sc_get_auth_oid(auth_type, &session.securityAuthProtoLen); + if (auth_prot) + session.securityAuthProto = + snmp_duplicate_objid(auth_prot, session.securityAuthProtoLen); + } if (session.securityLevel >= SNMP_SEC_LEVEL_AUTHNOPRIV) { if (STRLEN(auth_pass) > 0) { session.securityAuthKeyLen = USM_AUTH_KU_LEN; @@ -1246,28 +1166,23 @@ netsnmp_create_session_v3(PyObject *self, PyObject *args) } } } -#ifndef DISABLE_DES - if (!strcmp(priv_proto, "DES")) { - session.securityPrivProto = - snmp_duplicate_objid(usmDESPrivProtocol, - USM_PRIV_PROTO_DES_LEN); - session.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; - } else -#endif - if (!strncmp(priv_proto, "AES", 3)) { - session.securityPrivProto = - snmp_duplicate_objid(usmAESPrivProtocol, - USM_PRIV_PROTO_AES_LEN); - session.securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN; - } else if (!strcmp(priv_proto, "DEFAULT")) { - const oid *p = get_default_privtype(&session.securityPrivProtoLen); - session.securityPrivProto - = snmp_duplicate_objid(p, session.securityPrivProtoLen); - } else { + if (!strcmp(priv_proto, "DEFAULT")) { + const oid *p = get_default_privtype(&session.securityPrivProtoLen); + session.securityPrivProto + = snmp_duplicate_objid(p, session.securityPrivProtoLen); + } else { + const oid *priv_prot; + priv_type = usm_lookup_priv_type(priv_proto); + if (priv_type < 0) { if (verbose) printf("error:snmp_new_v3_session:Unsupported privacy protocol(%s)\n", priv_proto); goto end; } + priv_prot = sc_get_priv_oid(priv_type, &session.securityPrivProtoLen); + if (priv_prot) + session.securityPrivProto = + snmp_duplicate_objid(priv_prot, session.securityPrivProtoLen); + } if (session.securityLevel >= SNMP_SEC_LEVEL_AUTHPRIV) { session.securityPrivKeyLen = USM_PRIV_KU_LEN; @@ -1281,19 +1196,19 @@ netsnmp_create_session_v3(PyObject *self, PyObject *args) goto end; } } - + ss = snmp_sess_open(&session); end: if (ss == NULL) { - if (verbose) + if (verbose) printf("error:v3_session: couldn't open SNMP session(%s).\n", snmp_api_errstring(snmp_errno)); } free (session.securityEngineID); free (session.contextEngineID); - return PyLong_FromVoidPtr((void *)ss); + return PyLong_FromVoidPtr(ss); } static PyObject * @@ -1313,14 +1228,14 @@ netsnmp_create_session_tunneled(PyObject *self, PyObject *args) char * their_hostname; char * trust_cert; SnmpSession session = {0}; - SnmpSession *ss = NULL; + struct session_list *ss; int verbose = py_netsnmp_verbose(); if (!PyArg_ParseTuple(args, "isiiisissssss", &version, &peer, &lport, &retries, &timeout, &sec_name, &sec_level, - &context_eng_id, &context, - &our_identity, &their_identity, + &context_eng_id, &context, + &our_identity, &their_identity, &their_hostname, &trust_cert)) return NULL; @@ -1377,252 +1292,87 @@ netsnmp_create_session_tunneled(PyObject *self, PyObject *args) CONTAINER_INSERT(session.transport_configuration, netsnmp_transport_create_config("trust_cert", trust_cert)); - - ss = snmp_sess_open(&session); - if (!ss) - return NULL; - /* - * Note: on a 64-bit system the statement below discards the upper 32 bits of - * "ss", which is most likely a bug. - */ - return Py_BuildValue("i", (int)(uintptr_t)ss); + ss = snmp_sess_open(&session); + return ss ? PyLong_FromVoidPtr(ss) : NULL; } static PyObject * netsnmp_delete_session(PyObject *self, PyObject *args) { PyObject *session; - SnmpSession *ss = NULL; + struct session_list *ss; if (!PyArg_ParseTuple(args, "O", &session)) { return NULL; } - ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr"); + ss = py_netsnmp_attr_void_ptr(session, "sess_ptr"); snmp_sess_close(ss); return (Py_BuildValue("")); } -static PyObject * -netsnmp_get(PyObject *self, PyObject *args) +static int build_python_varbind(PyObject *varbind, netsnmp_variable_list *vars, + int varlist_ind, int sprintval_flag, int *len, + char **str_buf, int getlabel_flag) { - PyObject *session; - PyObject *varlist; - PyObject *varbind; - PyObject *val_tuple = NULL; - int varlist_len = 0; - int varlist_ind; - netsnmp_session *ss; - netsnmp_pdu *pdu, *response; - netsnmp_variable_list *vars; - struct tree *tp; - int len; - oid *oid_arr; - int oid_arr_len = MAX_OID_LEN; - int type; - char type_str[MAX_TYPE_NAME_LEN]; - u_char str_buf[STR_BUF_SIZE], *str_bufp = str_buf; - size_t str_buf_len = sizeof(str_buf); - size_t out_len = 0; - int buf_over = 0; - char *tag; - char *iid; - int getlabel_flag = NO_FLAGS; - int sprintval_flag = USE_BASIC; - int verbose = py_netsnmp_verbose(); - int old_format; - int best_guess; - int retry_nosuch; - int err_ind; - int err_num; - char err_str[STR_BUF_SIZE]; - char *tmpstr; - Py_ssize_t tmplen; - - oid_arr = calloc(MAX_OID_LEN, sizeof(oid)); - - if (oid_arr && args) { - - if (!PyArg_ParseTuple(args, "OO", &session, &varlist)) { - goto done; - } - - ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr"); - - if (py_netsnmp_attr_string(session, "ErrorStr", &tmpstr, &tmplen) < 0) { - goto done; - } - - if (py_netsnmp_attr_long(session, "UseLongNames")) - getlabel_flag |= USE_LONG_NAMES; - if (py_netsnmp_attr_long(session, "UseNumeric")) - getlabel_flag |= USE_NUMERIC_OIDS; - if (py_netsnmp_attr_long(session, "UseEnums")) - sprintval_flag = USE_ENUMS; - if (py_netsnmp_attr_long(session, "UseSprintValue")) - sprintval_flag = USE_SPRINT_VALUE; - best_guess = py_netsnmp_attr_long(session, "BestGuess"); - retry_nosuch = py_netsnmp_attr_long(session, "RetryNoSuch"); - - pdu = snmp_pdu_create(SNMP_MSG_GET); - - if (varlist) { - PyObject *varlist_iter = PyObject_GetIter(varlist); - - while (varlist_iter && (varbind = PyIter_Next(varlist_iter))) { - if (py_netsnmp_attr_string(varbind, "tag", &tag, NULL) < 0 || - py_netsnmp_attr_string(varbind, "iid", &iid, NULL) < 0) - { - oid_arr_len = 0; - } else { - tp = __tag2oid(tag, iid, oid_arr, &oid_arr_len, NULL, best_guess); - } - - if (oid_arr_len) { - snmp_add_null_var(pdu, oid_arr, oid_arr_len); - varlist_len++; - } else { - if (verbose) - printf("error: get: unknown object ID (%s)", - (tag ? tag : "")); - snmp_free_pdu(pdu); - Py_DECREF(varbind); - goto done; - } - /* release reference when done */ - Py_DECREF(varbind); - } - - Py_DECREF(varlist_iter); - - if (PyErr_Occurred()) { - /* propagate error */ - if (verbose) - printf("error: get: unknown python error"); - snmp_free_pdu(pdu); - goto done; - } - } - - __send_sync_pdu(ss, pdu, &response, retry_nosuch, err_str, &err_num, - &err_ind); - __py_netsnmp_update_session_errors(session, err_str, err_num, err_ind); - - /* - ** Set up for numeric or full OID's, if necessary. Save the old - ** output format so that it can be restored when we finish -- this - ** is a library-wide global, and has to be set/restored for each - ** session. - */ - old_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_OID_OUTPUT_FORMAT); - - if (py_netsnmp_attr_long(session, "UseLongNames")) { - getlabel_flag |= USE_LONG_NAMES; - - netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, - NETSNMP_OID_OUTPUT_FULL); - } - /* Setting UseNumeric forces UseLongNames on so check for UseNumeric - after UseLongNames (above) to make sure the final outcome of - NETSNMP_DS_LIB_OID_OUTPUT_FORMAT is NETSNMP_OID_OUTPUT_NUMERIC */ - if (py_netsnmp_attr_long(session, "UseNumeric")) { - getlabel_flag |= USE_LONG_NAMES; - getlabel_flag |= USE_NUMERIC_OIDS; - - netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, - NETSNMP_OID_OUTPUT_NUMERIC); + struct tree *tp; + int type; + char type_str[MAX_TYPE_NAME_LEN]; + size_t str_buf_len = 0; + size_t out_len = 0; + int buf_over = 0; + const char *tag; + const char *iid; + + if (!PyObject_HasAttrString(varbind, "tag")) + return TYPE_OTHER; + + if (*str_buf == NULL) { + *str_buf = netsnmp_malloc(STR_BUF_SIZE); + str_buf_len = STR_BUF_SIZE; } - - val_tuple = PyTuple_New(varlist_len); - /* initialize return tuple */ - for (varlist_ind = 0; varlist_ind < varlist_len; varlist_ind++) { - PyTuple_SetItem(val_tuple, varlist_ind, Py_BuildValue("")); + strcpy(*str_buf, "."); + out_len = 0; + tp = netsnmp_sprint_realloc_objid_tree((u_char **)str_buf, &str_buf_len, + &out_len, 1, &buf_over, + vars->name, vars->name_length); + if (_debug_level) + printf("%s:str_buf:%s:%d:%d\n", __func__, *str_buf, (int)str_buf_len, + (int)out_len); + + if (__is_leaf(tp)) { + type = tp->type ? tp->type : tp->parent->type; + getlabel_flag &= ~NON_LEAF_NAME; + if (_debug_level) + printf("%s:is_leaf:%d\n", __func__, type); + } else { + getlabel_flag |= NON_LEAF_NAME; + type = __translate_asn_type(vars->type); + if (_debug_level) + printf("%s:!is_leaf:%d\n", __func__, tp->type); } + __get_label_iid(*str_buf, &tag, &iid, getlabel_flag); - for(vars = (response ? response->variables : NULL), varlist_ind = 0; - vars && (varlist_ind < varlist_len); - vars = vars->next_variable, varlist_ind++) { - - varbind = PySequence_GetItem(varlist, varlist_ind); - - if (PyObject_HasAttrString(varbind, "tag")) { - *str_buf = '.'; - *(str_buf+1) = '\0'; - out_len = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_bufp, &str_buf_len, - &out_len, 0, &buf_over, - vars->name,vars->name_length); - if (_debug_level) - printf("netsnmp_get:str_bufp:%s:%d:%d\n", str_bufp, - (int)str_buf_len, (int)out_len); - - str_buf[sizeof(str_buf)-1] = '\0'; - - if (__is_leaf(tp)) { - type = (tp->type ? tp->type : tp->parent->type); - getlabel_flag &= ~NON_LEAF_NAME; - if (_debug_level) printf("netsnmp_get:is_leaf:%d\n",type); - } else { - getlabel_flag |= NON_LEAF_NAME; - type = __translate_asn_type(vars->type); - if (_debug_level) printf("netsnmp_get:!is_leaf:%d\n",tp->type); - } - - if (_debug_level) printf("netsnmp_get:str_buf:%s\n",str_buf); - - __get_label_iid((char *) str_buf, &tag, &iid, getlabel_flag); - - py_netsnmp_attr_set_string(varbind, "tag", tag, STRLEN(tag)); - py_netsnmp_attr_set_string(varbind, "iid", iid, STRLEN(iid)); - - __get_type_str(type, type_str); - - py_netsnmp_attr_set_string(varbind, "type", type_str, strlen(type_str)); + py_netsnmp_attr_set_string(varbind, "tag", tag, STRLEN(tag)); + py_netsnmp_attr_set_string(varbind, "iid", iid, STRLEN(iid)); - len = __snprint_value((char *) str_buf, sizeof(str_buf), - vars, tp, type, sprintval_flag); - str_buf[len] = '\0'; - py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, len); + __get_type_str(type, type_str); - /* save in return tuple as well */ - if ((type == SNMP_ENDOFMIBVIEW) || - (type == SNMP_NOSUCHOBJECT) || - (type == SNMP_NOSUCHINSTANCE)) { - /* Translate error to None */ - PyTuple_SetItem(val_tuple, varlist_ind, - Py_BuildValue("")); - } else { - PyTuple_SetItem(val_tuple, varlist_ind, - Py_BuildValue("s#", str_buf, len)); - } - Py_DECREF(varbind); - } else { - printf("netsnmp_get: bad varbind (%d)\n", varlist_ind); - Py_XDECREF(varbind); - } - } + py_netsnmp_attr_set_string(varbind, "type", type_str, strlen(type_str)); - /* Reset the library's behavior for numeric/symbolic OID's. */ - netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, - old_format); - - if (response) snmp_free_pdu(response); - } - - done: - SAFE_FREE(oid_arr); - return (val_tuple ? val_tuple : Py_BuildValue("")); + *len = __snprint_value(str_buf, &str_buf_len, vars, tp, type, + sprintval_flag); + (*str_buf)[*len] = '\0'; + py_netsnmp_attr_set_string(varbind, "val", *str_buf, *len); + return type; } static PyObject * -netsnmp_getnext(PyObject *self, PyObject *args) +netsnmp_get_or_getnext(PyObject *self, PyObject *args, int pdu_type, + const char *func_name) { PyObject *session; PyObject *varlist; @@ -1630,21 +1380,16 @@ netsnmp_getnext(PyObject *self, PyObject *args) PyObject *val_tuple = NULL; int varlist_len = 0; int varlist_ind; - netsnmp_session *ss; + struct session_list *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; - struct tree *tp; int len; oid *oid_arr; - int oid_arr_len = MAX_OID_LEN; + size_t oid_arr_len = MAX_OID_LEN; int type; - char type_str[MAX_TYPE_NAME_LEN]; - u_char str_buf[STR_BUF_SIZE], *str_bufp = str_buf; - size_t str_buf_len = sizeof(str_buf); - size_t out_len = 0; - int buf_over = 0; - char *tag; - char *iid = NULL; + char *str_buf = NULL; + const char *tag; + const char *iid; int getlabel_flag = NO_FLAGS; int sprintval_flag = USE_BASIC; int verbose = py_netsnmp_verbose(); @@ -1654,9 +1399,11 @@ netsnmp_getnext(PyObject *self, PyObject *args) int err_ind; int err_num; char err_str[STR_BUF_SIZE]; - char *tmpstr; + const char *tmpstr; Py_ssize_t tmplen; - + + netsnmp_assert(pdu_type == SNMP_MSG_GET || pdu_type == SNMP_MSG_GETNEXT); + oid_arr = calloc(MAX_OID_LEN, sizeof(oid)); if (oid_arr && args) { @@ -1665,14 +1412,16 @@ netsnmp_getnext(PyObject *self, PyObject *args) goto done; } - ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr"); + ss = py_netsnmp_attr_void_ptr(session, "sess_ptr"); if (py_netsnmp_attr_string(session, "ErrorStr", &tmpstr, &tmplen) < 0) { goto done; } - memcpy(&err_str, tmpstr, tmplen); - err_num = py_netsnmp_attr_long(session, "ErrorNum"); - err_ind = py_netsnmp_attr_long(session, "ErrorInd"); + if (pdu_type == SNMP_MSG_GETNEXT) { + memcpy(&err_str, tmpstr, tmplen); + err_num = py_netsnmp_attr_long(session, "ErrorNum"); + err_ind = py_netsnmp_attr_long(session, "ErrorInd"); + } if (py_netsnmp_attr_long(session, "UseLongNames")) getlabel_flag |= USE_LONG_NAMES; @@ -1681,11 +1430,11 @@ netsnmp_getnext(PyObject *self, PyObject *args) if (py_netsnmp_attr_long(session, "UseEnums")) sprintval_flag = USE_ENUMS; if (py_netsnmp_attr_long(session, "UseSprintValue")) - sprintval_flag = USE_SPRINT_VALUE; + sprintval_flag = USE_SPRINT_VALUE; best_guess = py_netsnmp_attr_long(session, "BestGuess"); retry_nosuch = py_netsnmp_attr_long(session, "RetryNoSuch"); - - pdu = snmp_pdu_create(SNMP_MSG_GETNEXT); + + pdu = snmp_pdu_create(pdu_type); if (varlist) { PyObject *varlist_iter = PyObject_GetIter(varlist); @@ -1696,12 +1445,12 @@ netsnmp_getnext(PyObject *self, PyObject *args) { oid_arr_len = 0; } else { - tp = __tag2oid(tag, iid, oid_arr, &oid_arr_len, NULL, best_guess); + __tag2oid(tag, iid, oid_arr, &oid_arr_len, NULL, best_guess); } - if (_debug_level) - printf("netsnmp_getnext: filling request: %s:%s:%d:%d\n", - tag, iid, oid_arr_len,best_guess); + if (_debug_level) + printf("%s: filling request: %s:%s:%zd:%d\n", func_name, tag, iid, + oid_arr_len, best_guess); if (oid_arr_len) { snmp_add_null_var(pdu, oid_arr, oid_arr_len); @@ -1711,7 +1460,7 @@ netsnmp_getnext(PyObject *self, PyObject *args) printf("error: get: unknown object ID (%s)", (tag ? tag : "")); snmp_free_pdu(pdu); - Py_DECREF(varbind); + Py_DECREF(varbind); goto done; } /* release reference when done */ @@ -1750,7 +1499,7 @@ netsnmp_getnext(PyObject *self, PyObject *args) NETSNMP_OID_OUTPUT_FULL); } /* Setting UseNumeric forces UseLongNames on so check for UseNumeric - after UseLongNames (above) to make sure the final outcome of + after UseLongNames (above) to make sure the final outcome of NETSNMP_DS_LIB_OID_OUTPUT_FORMAT is NETSNMP_OID_OUTPUT_NUMERIC */ if (py_netsnmp_attr_long(session, "UseNumeric")) { getlabel_flag |= USE_LONG_NAMES; @@ -1763,7 +1512,6 @@ netsnmp_getnext(PyObject *self, PyObject *args) val_tuple = PyTuple_New(varlist_len); /* initialize return tuple */ - val_tuple = PyTuple_New(varlist_len); for (varlist_ind = 0; varlist_ind < varlist_len; varlist_ind++) { PyTuple_SetItem(val_tuple, varlist_ind, Py_BuildValue("")); } @@ -1772,59 +1520,31 @@ netsnmp_getnext(PyObject *self, PyObject *args) vars && (varlist_ind < varlist_len); vars = vars->next_variable, varlist_ind++) { - varbind = PySequence_GetItem(varlist, varlist_ind); - - if (PyObject_HasAttrString(varbind, "tag")) { - *str_buf = '.'; - *(str_buf+1) = '\0'; - out_len = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_bufp, &str_buf_len, - &out_len, 0, &buf_over, - vars->name,vars->name_length); - str_buf[sizeof(str_buf)-1] = '\0'; - - if (__is_leaf(tp)) { - type = (tp->type ? tp->type : tp->parent->type); - getlabel_flag &= ~NON_LEAF_NAME; - } else { - getlabel_flag |= NON_LEAF_NAME; - type = __translate_asn_type(vars->type); - } - - __get_label_iid((char *) str_buf, &tag, &iid, getlabel_flag); - - if (_debug_level) - printf("netsnmp_getnext: filling response: %s:%s\n", tag, iid); + if (err_ind >= 1 && varlist_ind >= err_ind - 1) + continue; - py_netsnmp_attr_set_string(varbind, "tag", tag, STRLEN(tag)); - py_netsnmp_attr_set_string(varbind, "iid", iid, STRLEN(iid)); - - __get_type_str(type, type_str); - - py_netsnmp_attr_set_string(varbind, "type", type_str, - strlen(type_str)); - - len = __snprint_value((char *) str_buf, sizeof(str_buf), - vars, tp, type, sprintval_flag); - str_buf[len] = '\0'; - - py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, len); - - /* save in return tuple as well */ - if ((type == SNMP_ENDOFMIBVIEW) || - (type == SNMP_NOSUCHOBJECT) || - (type == SNMP_NOSUCHINSTANCE)) { - /* Translate error to None */ - PyTuple_SetItem(val_tuple, varlist_ind, - Py_BuildValue("")); - } else { - PyTuple_SetItem(val_tuple, varlist_ind, - Py_BuildValue("s#", str_buf, len)); - } - Py_DECREF(varbind); + varbind = PySequence_GetItem(varlist, varlist_ind); + type = build_python_varbind(varbind, vars, varlist_ind, sprintval_flag, + &len, &str_buf, getlabel_flag); + if (type != TYPE_OTHER) { + /* save in return tuple as well */ + if ((type == SNMP_ENDOFMIBVIEW) || + (type == SNMP_NOSUCHOBJECT) || + (type == SNMP_NOSUCHINSTANCE)) { + /* Translate error to None */ + PyTuple_SetItem(val_tuple, varlist_ind, + Py_BuildValue("")); + } else { + const int hex = is_hex(str_buf, len); + + PyTuple_SetItem(val_tuple, varlist_ind, + Py_BuildValue(hex ? "y#" : "s#", + str_buf, len)); + } + Py_DECREF(varbind); } else { - printf("netsnmp_getnext: bad varbind (%d)\n", varlist_ind); - Py_XDECREF(varbind); + printf("%s: bad varbind (%d)\n", func_name, varlist_ind); + Py_XDECREF(varbind); } } @@ -1833,14 +1553,29 @@ netsnmp_getnext(PyObject *self, PyObject *args) NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, old_format); - if (response) snmp_free_pdu(response); + if (response) + snmp_free_pdu(response); } done: - SAFE_FREE(oid_arr); + free(oid_arr); + if (str_buf != NULL) + netsnmp_free(str_buf); return (val_tuple ? val_tuple : Py_BuildValue("")); } +static PyObject * +netsnmp_get(PyObject *self, PyObject *args) +{ + return netsnmp_get_or_getnext(self, args, SNMP_MSG_GET, __func__); +} + +static PyObject * +netsnmp_getnext(PyObject *self, PyObject *args) +{ + return netsnmp_get_or_getnext(self, args, SNMP_MSG_GETNEXT, __func__); +} + static PyObject * netsnmp_walk(PyObject *self, PyObject *args) { @@ -1852,25 +1587,19 @@ netsnmp_walk(PyObject *self, PyObject *args) PyObject *varbinds = NULL; int varlist_len = 0; int varlist_ind; - netsnmp_session *ss; + struct session_list *ss; netsnmp_pdu *pdu, *response; netsnmp_pdu *newpdu; netsnmp_variable_list *vars, *oldvars; - struct tree *tp; int len; oid **oid_arr = NULL; - int *oid_arr_len = NULL; + size_t *oid_arr_len = NULL; oid **oid_arr_broken_check = NULL; - int *oid_arr_broken_check_len = NULL; - int type; - char type_str[MAX_TYPE_NAME_LEN]; + size_t *oid_arr_broken_check_len = NULL; int status; - u_char str_buf[STR_BUF_SIZE], *str_bufp = str_buf; - size_t str_buf_len = sizeof(str_buf); - size_t out_len = 0; - int buf_over = 0; - char *tag; - char *iid = NULL; + char *str_buf = NULL; + const char *tag; + const char *iid = NULL; int getlabel_flag = NO_FLAGS; int sprintval_flag = USE_BASIC; int verbose = py_netsnmp_verbose(); @@ -1882,9 +1611,9 @@ netsnmp_walk(PyObject *self, PyObject *args) char err_str[STR_BUF_SIZE]; int notdone = 1; int result_count = 0; - char *tmpstr; + const char *tmpstr; Py_ssize_t tmplen; - + if (args) { if (!PyArg_ParseTuple(args, "OO", &session, &varlist)) { @@ -1898,7 +1627,7 @@ netsnmp_walk(PyObject *self, PyObject *args) if ((varbinds = PyObject_GetAttrString(varlist, "varbinds")) == NULL) { goto done; } - ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr"); + ss = py_netsnmp_attr_void_ptr(session, "sess_ptr"); if (py_netsnmp_attr_string(session, "ErrorStr", &tmpstr, &tmplen) < 0) { goto done; @@ -1914,12 +1643,12 @@ netsnmp_walk(PyObject *self, PyObject *args) if (py_netsnmp_attr_long(session, "UseEnums")) sprintval_flag = USE_ENUMS; if (py_netsnmp_attr_long(session, "UseSprintValue")) - sprintval_flag = USE_SPRINT_VALUE; + sprintval_flag = USE_SPRINT_VALUE; best_guess = py_netsnmp_attr_long(session, "BestGuess"); retry_nosuch = py_netsnmp_attr_long(session, "RetryNoSuch"); - + pdu = snmp_pdu_create(SNMP_MSG_GETNEXT); - + /* we need an initial count for memory allocation */ varlist_iter = PyObject_GetIter(varlist); varlist_len = 0; @@ -1928,8 +1657,9 @@ netsnmp_walk(PyObject *self, PyObject *args) } Py_DECREF(varlist_iter); - oid_arr_len = calloc(varlist_len, sizeof(int)); - oid_arr_broken_check_len = calloc(varlist_len, sizeof(int)); + oid_arr_len = calloc(varlist_len, sizeof(*oid_arr_len)); + oid_arr_broken_check_len = calloc(varlist_len, + sizeof(*oid_arr_broken_check_len)); oid_arr = calloc(varlist_len, sizeof(oid *)); oid_arr_broken_check = calloc(varlist_len, sizeof(oid *)); @@ -1953,14 +1683,13 @@ netsnmp_walk(PyObject *self, PyObject *args) { oid_arr_len[varlist_ind] = 0; } else { - tp = __tag2oid(tag, iid, - oid_arr[varlist_ind], &oid_arr_len[varlist_ind], - NULL, best_guess); + __tag2oid(tag, iid, oid_arr[varlist_ind], &oid_arr_len[varlist_ind], + NULL, best_guess); } - if (_debug_level) - printf("netsnmp_walk: filling request: %s:%s:%d:%d\n", - tag, iid, oid_arr_len[varlist_ind],best_guess); + if (_debug_level) + printf("netsnmp_walk: filling request: %s:%s:%zd:%d\n", + tag, iid, oid_arr_len[varlist_ind], best_guess); if (oid_arr_len[varlist_ind]) { snmp_add_null_var(pdu, oid_arr[varlist_ind], oid_arr_len[varlist_ind]); @@ -1969,7 +1698,7 @@ netsnmp_walk(PyObject *self, PyObject *args) printf("error: walk: unknown object ID (%s)", (tag ? tag : "")); snmp_free_pdu(pdu); - Py_DECREF(varbind); + Py_DECREF(varbind); goto done; } /* release reference when done */ @@ -1997,8 +1726,8 @@ netsnmp_walk(PyObject *self, PyObject *args) printf("error: walk: couldn't allocate a new value tuple"); snmp_free_pdu(pdu); goto done; - } - + } + /* ** Set up for numeric or full OID's, if necessary. Save the old ** output format so that it can be restored when we finish -- this @@ -2017,7 +1746,7 @@ netsnmp_walk(PyObject *self, PyObject *args) } /* Setting UseNumeric forces UseLongNames on so check for UseNumeric - after UseLongNames (above) to make sure the final outcome of + after UseLongNames (above) to make sure the final outcome of NETSNMP_DS_LIB_OID_OUTPUT_FORMAT is NETSNMP_OID_OUTPUT_NUMERIC */ if (py_netsnmp_attr_long(session, "UseNumeric")) { getlabel_flag |= USE_LONG_NAMES; @@ -2054,7 +1783,7 @@ netsnmp_walk(PyObject *self, PyObject *args) while(notdone) { - status = __send_sync_pdu(ss, pdu, &response, retry_nosuch, + status = __send_sync_pdu(ss, pdu, &response, retry_nosuch, err_str, &err_num, &err_ind); __py_netsnmp_update_session_errors(session, err_str, err_num, err_ind); @@ -2104,51 +1833,22 @@ netsnmp_walk(PyObject *self, PyObject *args) } varbind = py_netsnmp_construct_varbind(); + if (varbind && build_python_varbind(varbind, vars, varlist_ind, + sprintval_flag, &len, &str_buf, getlabel_flag) != + TYPE_OTHER) { + const int hex = is_hex(str_buf, len); - if (PyObject_HasAttrString(varbind, "tag")) { - str_buf[0] = '.'; - str_buf[1] = '\0'; - out_len = 0; - tp = netsnmp_sprint_realloc_objid_tree(&str_bufp, &str_buf_len, - &out_len, 0, &buf_over, - vars->name,vars->name_length); - str_buf[sizeof(str_buf)-1] = '\0'; - - if (__is_leaf(tp)) { - type = (tp->type ? tp->type : tp->parent->type); - getlabel_flag &= ~NON_LEAF_NAME; - } else { - getlabel_flag |= NON_LEAF_NAME; - type = __translate_asn_type(vars->type); - } - - __get_label_iid((char *) str_buf, &tag, &iid, getlabel_flag); - - if (_debug_level) printf("netsnmp_walk: filling response: %s:%s\n", tag, iid); - - py_netsnmp_attr_set_string(varbind, "tag", tag, STRLEN(tag)); - py_netsnmp_attr_set_string(varbind, "iid", iid, STRLEN(iid)); + py_netsnmp_attr_set_string(varbind, "val", str_buf, len); - __get_type_str(type, type_str); - - py_netsnmp_attr_set_string(varbind, "type", type_str, - strlen(type_str)); - - len = __snprint_value((char *) str_buf,sizeof(str_buf), - vars,tp,type,sprintval_flag); - str_buf[len] = '\0'; - - py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, - len); - /* push the varbind onto the return varbinds */ PyList_Append(varbinds, varbind); /* save in return tuple as well */ /* save in return tuple as well - steals ref */ _PyTuple_Resize(&val_tuple, result_count+1); - PyTuple_SetItem(val_tuple, result_count++, - Py_BuildValue("s#", str_buf, len)); + PyTuple_SetItem(val_tuple, result_count++, + Py_BuildValue(hex ? "y#" : "s#", str_buf, + len)); } else { /* Return None for this variable. */ _PyTuple_Resize(&val_tuple, result_count+1); @@ -2181,19 +1881,21 @@ netsnmp_walk(PyObject *self, PyObject *args) if (verbose) printf("error: walk response processing: unknown python error"); Py_DECREF(val_tuple); - } + } } done: Py_XDECREF(varbinds); - SAFE_FREE(oid_arr_len); - SAFE_FREE(oid_arr_broken_check_len); + free(oid_arr_len); + free(oid_arr_broken_check_len); for(varlist_ind = 0; varlist_ind < varlist_len; varlist_ind ++) { - SAFE_FREE(oid_arr[varlist_ind]); - SAFE_FREE(oid_arr_broken_check[varlist_ind]); + free(oid_arr[varlist_ind]); + free(oid_arr_broken_check[varlist_ind]); } - SAFE_FREE(oid_arr); - SAFE_FREE(oid_arr_broken_check); + free(oid_arr); + free(oid_arr_broken_check); + if (str_buf != NULL) + netsnmp_free(str_buf); return (val_tuple ? val_tuple : Py_BuildValue("")); } @@ -2210,21 +1912,15 @@ netsnmp_getbulk(PyObject *self, PyObject *args) PyObject *varbinds_iter; PyObject *val_tuple = NULL; int varbind_ind; - netsnmp_session *ss; + struct session_list *ss; netsnmp_pdu *pdu, *response; netsnmp_variable_list *vars; - struct tree *tp; int len; oid *oid_arr; - int oid_arr_len = MAX_OID_LEN; - int type; - char type_str[MAX_TYPE_NAME_LEN]; - u_char str_buf[STR_BUF_SIZE], *str_bufp = str_buf; - size_t str_buf_len = sizeof(str_buf); - size_t out_len = 0; - int buf_over = 0; - char *tag; - char *iid; + size_t oid_arr_len = MAX_OID_LEN; + char *str_buf = NULL; + const char *tag; + const char *iid; int getlabel_flag = NO_FLAGS; int sprintval_flag = USE_BASIC; int verbose = py_netsnmp_verbose(); @@ -2234,21 +1930,21 @@ netsnmp_getbulk(PyObject *self, PyObject *args) int err_ind; int err_num; char err_str[STR_BUF_SIZE]; - char *tmpstr; + const char *tmpstr; Py_ssize_t tmplen; - + oid_arr = calloc(MAX_OID_LEN, sizeof(oid)); if (oid_arr && args) { - if (!PyArg_ParseTuple(args, "OiiO", &session, &nonrepeaters, + if (!PyArg_ParseTuple(args, "OiiO", &session, &nonrepeaters, &maxrepetitions, &varlist)) { goto done; } if (varlist && (varbinds = PyObject_GetAttrString(varlist, "varbinds"))) { - - ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr"); + + ss = py_netsnmp_attr_void_ptr(session, "sess_ptr"); if (py_netsnmp_attr_string(session, "ErrorStr", &tmpstr, &tmplen) < 0) { goto done; @@ -2264,10 +1960,10 @@ netsnmp_getbulk(PyObject *self, PyObject *args) if (py_netsnmp_attr_long(session, "UseEnums")) sprintval_flag = USE_ENUMS; if (py_netsnmp_attr_long(session, "UseSprintValue")) - sprintval_flag = USE_SPRINT_VALUE; + sprintval_flag = USE_SPRINT_VALUE; best_guess = py_netsnmp_attr_long(session, "BestGuess"); retry_nosuch = py_netsnmp_attr_long(session, "RetryNoSuch"); - + pdu = snmp_pdu_create(SNMP_MSG_GETBULK); pdu->errstat = nonrepeaters; @@ -2281,7 +1977,7 @@ netsnmp_getbulk(PyObject *self, PyObject *args) { oid_arr_len = 0; } else { - tp = __tag2oid(tag, iid, oid_arr, &oid_arr_len, NULL, best_guess); + __tag2oid(tag, iid, oid_arr, &oid_arr_len, NULL, best_guess); } if (oid_arr_len) { @@ -2291,7 +1987,7 @@ netsnmp_getbulk(PyObject *self, PyObject *args) printf("error: get: unknown object ID (%s)", (tag ? tag : "")); snmp_free_pdu(pdu); - Py_DECREF(varbind); + Py_DECREF(varbind); goto done; } /* release reference when done */ @@ -2329,7 +2025,7 @@ netsnmp_getbulk(PyObject *self, PyObject *args) NETSNMP_OID_OUTPUT_FULL); } /* Setting UseNumeric forces UseLongNames on so check for UseNumeric - after UseLongNames (above) to make sure the final outcome of + after UseLongNames (above) to make sure the final outcome of NETSNMP_DS_LIB_OID_OUTPUT_FORMAT is NETSNMP_OID_OUTPUT_NUMERIC */ if (py_netsnmp_attr_long(session, "UseNumeric")) { getlabel_flag |= USE_LONG_NAMES; @@ -2355,53 +2051,22 @@ netsnmp_getbulk(PyObject *self, PyObject *args) goto done; } - for(vars = response->variables, varbind_ind=0; - vars; + for(vars = response->variables, varbind_ind=0; + vars; vars = vars->next_variable, varbind_ind++) { varbind = py_netsnmp_construct_varbind(); + if (varbind && build_python_varbind(varbind, vars, varbind_ind, + sprintval_flag, &len, &str_buf, getlabel_flag) != TYPE_OTHER) { + const int hex = is_hex(str_buf, len); - if (PyObject_HasAttrString(varbind, "tag")) { - *str_buf = '.'; - *(str_buf+1) = '\0'; - out_len = 0; - buf_over = 0; - str_bufp = str_buf; - tp = netsnmp_sprint_realloc_objid_tree(&str_bufp, &str_buf_len, - &out_len, 0, &buf_over, - vars->name,vars->name_length); - str_buf[sizeof(str_buf)-1] = '\0'; - if (__is_leaf(tp)) { - type = (tp->type ? tp->type : tp->parent->type); - getlabel_flag &= ~NON_LEAF_NAME; - } else { - getlabel_flag |= NON_LEAF_NAME; - type = __translate_asn_type(vars->type); - } - - __get_label_iid((char *) str_buf, &tag, &iid, getlabel_flag); - - py_netsnmp_attr_set_string(varbind, "tag", tag, STRLEN(tag)); - py_netsnmp_attr_set_string(varbind, "iid", iid, STRLEN(iid)); - - __get_type_str(type, type_str); - - py_netsnmp_attr_set_string(varbind, "type", type_str, - strlen(type_str)); - - len = __snprint_value((char *) str_buf, sizeof(str_buf), - vars, tp, type, sprintval_flag); - str_buf[len] = '\0'; - - py_netsnmp_attr_set_string(varbind, "val", (char *) str_buf, len); - - /* push varbind onto varbinds */ + /* push varbind onto varbinds */ PyList_Append(varbinds, varbind); /* save in return tuple as well - steals ref */ _PyTuple_Resize(&val_tuple, varbind_ind+1); - PyTuple_SetItem(val_tuple, varbind_ind, - Py_BuildValue("s#", str_buf, len)); + PyTuple_SetItem(val_tuple, varbind_ind, + Py_BuildValue(hex ? "y#" : "s#", str_buf, len)); Py_DECREF(varbind); @@ -2411,8 +2076,8 @@ netsnmp_getbulk(PyObject *self, PyObject *args) PyList_Append(varbinds, none); /* increments ref */ /* Return None for this variable. */ PyTuple_SetItem(val_tuple, varbind_ind, none); /* steals ref */ - Py_XDECREF(varbind); - } + Py_XDECREF(varbind); + } } } @@ -2421,7 +2086,8 @@ netsnmp_getbulk(PyObject *self, PyObject *args) NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, old_format); - if (response) snmp_free_pdu(response); + if (response) + snmp_free_pdu(response); Py_DECREF(varbinds); @@ -2438,29 +2104,32 @@ netsnmp_getbulk(PyObject *self, PyObject *args) } done: - SAFE_FREE(oid_arr); + free(oid_arr); + if (str_buf != NULL) + netsnmp_free(str_buf); return (val_tuple ? val_tuple : Py_BuildValue("")); } static PyObject * netsnmp_set(PyObject *self, PyObject *args) { + PyObject *ret = NULL; +#ifndef NETSNMP_NO_WRITE_SUPPORT PyObject *session; PyObject *varlist; - PyObject *varbind; - PyObject *ret = NULL; - netsnmp_session *ss; + PyObject *varbind = NULL; + struct session_list *ss; netsnmp_pdu *pdu, *response; struct tree *tp; - char *tag; - char *iid; - char *val; - char *type_str; + const char *tag; + const char *iid; + const char *val; + const char *type_str; int len; oid *oid_arr; - int oid_arr_len = MAX_OID_LEN; + size_t oid_arr_len = MAX_OID_LEN; int type; - u_char tmp_val_str[STR_BUF_SIZE]; + char* tmp_val_str = NULL; int use_enums; struct enum_list *ep; int verbose = py_netsnmp_verbose(); @@ -2469,9 +2138,9 @@ netsnmp_set(PyObject *self, PyObject *args) int err_ind; int err_num; char err_str[STR_BUF_SIZE]; - char *tmpstr; + const char *tmpstr; Py_ssize_t tmplen; - + oid_arr = calloc(MAX_OID_LEN, sizeof(oid)); if (oid_arr && args) { @@ -2480,7 +2149,7 @@ netsnmp_set(PyObject *self, PyObject *args) goto done; } - ss = (SnmpSession *)py_netsnmp_attr_void_ptr(session, "sess_ptr"); + ss = py_netsnmp_attr_void_ptr(session, "sess_ptr"); /* PyObject_SetAttrString(); */ if (py_netsnmp_attr_string(session, "ErrorStr", &tmpstr, &tmplen) < 0) { @@ -2488,9 +2157,9 @@ netsnmp_set(PyObject *self, PyObject *args) } use_enums = py_netsnmp_attr_long(session, "UseEnums"); - + best_guess = py_netsnmp_attr_long(session, "BestGuess"); - + pdu = snmp_pdu_create(SNMP_MSG_SET); if (varlist) { @@ -2531,23 +2200,20 @@ netsnmp_set(PyObject *self, PyObject *args) snmp_free_pdu(pdu); goto done; } - memset(tmp_val_str, 0, sizeof(tmp_val_str)); - if ( tmplen >= sizeof(tmp_val_str)) { - tmplen = sizeof(tmp_val_str)-1; - } - memcpy(tmp_val_str, val, tmplen); - if (type==TYPE_INTEGER && use_enums && tp && tp->enums) { - for(ep = tp->enums; ep; ep = ep->next) { + if (type == TYPE_INTEGER && use_enums && tp && tp->enums) { + for (ep = tp->enums; ep; ep = ep->next) { if (val && !strcmp(ep->label, val)) { - snprintf((char *) tmp_val_str, sizeof(tmp_val_str), "%d", - ep->value); + if (asprintf(&tmp_val_str, "%d", ep->value) < 0) + tmp_val_str = NULL; break; } } - } + } else { + tmp_val_str = netsnmp_memdup(val, tmplen); + } len = (int)tmplen; - status = __add_var_val_str(pdu, oid_arr, oid_arr_len, - (char *) tmp_val_str, len, type); + status = __add_var_val_str(pdu, oid_arr, oid_arr_len, tmp_val_str, len, + type); if (verbose && status == FAILURE) printf("error: set: adding variable/value to PDU"); @@ -2567,20 +2233,22 @@ netsnmp_set(PyObject *self, PyObject *args) } } - status = __send_sync_pdu(ss, pdu, &response, NO_RETRY_NOSUCH, + status = __send_sync_pdu(ss, pdu, &response, NO_RETRY_NOSUCH, err_str, &err_num, &err_ind); __py_netsnmp_update_session_errors(session, err_str, err_num, err_ind); - if (response) snmp_free_pdu(response); + if (response) + snmp_free_pdu(response); if (status == STAT_SUCCESS) ret = Py_BuildValue("i",1); /* success, return True */ else ret = Py_BuildValue("i",0); /* fail, return False */ - } + } done: - Py_XDECREF(varbind); - SAFE_FREE(oid_arr); + Py_XDECREF(varbind); + free(oid_arr); +#endif /* NETSNMP_NO_WRITE_SUPPORT */ return (ret ? ret : Py_BuildValue("")); } @@ -2607,11 +2275,26 @@ static PyMethodDef ClientMethods[] = { {NULL, NULL, 0, NULL} /* Sentinel */ }; +#if PY_VERSION_HEX < 0x03000000 PyMODINIT_FUNC initclient_intf(void) { (void) Py_InitModule("client_intf", ClientMethods); } +#else +static PyModuleDef module_def = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "client_intf", + .m_size = -1, + .m_methods = ClientMethods, +}; + +PyMODINIT_FUNC +PyInit_client_intf(void) +{ + return PyModule_Create(&module_def); +} +#endif diff --git a/python/netsnmp/netsnmp-feature-definitions.h b/python/netsnmp/netsnmp-feature-definitions.h index 389416a..e1647fe 100644 --- a/python/netsnmp/netsnmp-feature-definitions.h +++ b/python/netsnmp/netsnmp-feature-definitions.h @@ -1,6 +1,7 @@ #include #include -netsnmp_feature_require(snprint_value) -netsnmp_feature_require(enable_stderrlog) +netsnmp_feature_require(enable_stderrlog); +netsnmp_feature_require(memory_malloc); +netsnmp_feature_require(memory_free); diff --git a/python/netsnmp/tests/test.py b/python/netsnmp/tests/test.py index e3982f4..3d1d4ce 100644 --- a/python/netsnmp/tests/test.py +++ b/python/netsnmp/tests/test.py @@ -1,321 +1,602 @@ """ Runs all unit tests for the netsnmp package. """ # Copyright (c) 2006 Andy Gross. See LICENSE.txt for details. -import sys +import os import unittest import netsnmp -import time + +def snmp_dest(**kwargs): + """Return information about how to communicate with snmpd""" + dest = { + 'Version': 1, + 'DestHost': 'localhost:' + str(os.environ.get("SNMP_SNMPD_PORT", 161)), + # Both the community strings "public" and "private" + # cannot be used to set variables using "snmpset" + # operations. Run the "snmpset" tests after replacing + # the following 'Community' string with any other + # configured community string from the snmpd.conf file. + 'Community': 'public', + } + for key, value in kwargs.items(): + dest[key] = value + return dest + +def setup_v1(): + return netsnmp.Session(**snmp_dest()) + +def setup_v2(): + sess = netsnmp.Session(**snmp_dest(Version=2)) + sess.UseEnums = 1 + sess.UseLongNames = 1 + return sess + +def setup_v3(): + sess = netsnmp.Session(**snmp_dest(Version=3, + SecLevel='authPriv', + SecName='initial', + PrivPass='priv_pass', + AuthPass='auth_pass')) + sess.UseSprintValue = 1 + return sess class BasicTests(unittest.TestCase): - def testFuncs(self): - print "" + """Basic unit tests for the Net-SNMP Python interface""" + def test_varbind_creation(self): var = netsnmp.Varbind('sysDescr.0') - var = netsnmp.Varbind('sysDescr','0') + self.assertEqual(var.tag, 'sysDescr') + self.assertEqual(var.iid, '0') + + var = netsnmp.Varbind('sysDescr', '0') + self.assertEqual(var.tag, 'sysDescr') + self.assertEqual(var.iid, '0') + var = netsnmp.Varbind( - '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr','0') + '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr', '0') + self.assertEqual(var.tag, + '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr') + self.assertEqual(var.iid, '0') + var = netsnmp.Varbind( '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0') - var = netsnmp.Varbind('.1.3.6.1.2.1.1.1.0') + self.assertEqual(var.tag, + '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0') + self.assertEqual(var.iid, None) - var = netsnmp.Varbind('.1.3.6.1.2.1.1.1','0') - - print "---v1 GET tests -------------------------------------\n" - res = netsnmp.snmpget(var, - Version = 1, - DestHost='localhost', - Community='public') - - print "v1 snmpget result: ", res, "\n" - - print "v1 get var: ", var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v1 GETNEXT tests-------------------------------------\n" - res = netsnmp.snmpgetnext(var, - Version = 1, - DestHost='localhost', - Community='public') - - print "v1 snmpgetnext result: ", res, "\n" - - print "v1 getnext var: ", var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v1 SET tests-------------------------------------\n" - var = netsnmp.Varbind('sysLocation','0', 'my new location') - res = netsnmp.snmpset(var, - Version = 1, - DestHost='localhost', - Community='public') - - print "v1 snmpset result: ", res, "\n" - - print "v1 set var: ", var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v1 walk tests-------------------------------------\n" - vars = netsnmp.VarList(netsnmp.Varbind('system')) - - print "v1 varlist walk in: " - for var in vars: - print " ",var.tag, var.iid, "=", var.val, '(',var.type,')' - - res = netsnmp.snmpwalk(vars, - Version = 1, - DestHost='localhost', - Community='public') - print "v1 snmpwalk result: ", res, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - - - print "---v1 walk 2-------------------------------------\n" - - print "v1 varbind walk in: " + var = netsnmp.Varbind('.1.3.6.1.2.1.1.1.0') + self.assertEqual(var.tag, '.1.3.6.1.2.1.1.1.0') + self.assertEqual(var.iid, '') + + def test_v1_get(self): + print("\n") + print("---v1 GET tests -------------------------------------\n") + var = netsnmp.Varbind('.1.3.6.1.2.1.1.1', '0') + res = netsnmp.snmpget(var, **snmp_dest()) + + print("v1 snmpget result: ", res, "\n") + self.assertEqual(len(res), 1) + self.assertIsNotNone(res[0]) + self.assertNotEqual(len(res), '') + + print("v1 get var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertEqual(var.tag, 'sysDescr') + self.assertEqual(var.iid, '0') + self.assertEqual(var.val, res[0]) + self.assertEqual(var.type, 'OCTETSTR') + + def test_v1_get_no_such_oid(self): + print("\n") + print("---v1 GET test of nonexistent OID -------------------\n") + var = netsnmp.Varbind('.1.3.6.1.2.1.1.1.123', '0') + res = netsnmp.snmpget(var, **snmp_dest()) + + print("v1 snmpget result: ", res, "\n") + self.assertEqual(len(res), 1) + self.assertIsNone(res[0]) + + print("v1 get var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertIsNotNone(var.tag) + self.assertEqual(var.tag, '.1.3.6.1.2.1.1.1.123') + self.assertIsNotNone(var.iid) + self.assertEqual(var.iid, '0') + self.assertIsNone(var.val) + self.assertIsNone(var.type) + + + def test_v1_getnext(self): + print("\n") + print("---v1 GETNEXT tests-------------------------------------\n") + var = netsnmp.Varbind('.1.3.6.1.2.1.1.1', '0') + res = netsnmp.snmpgetnext(var, **snmp_dest()) + + print("v1 snmpgetnext result: ", res, "\n") + self.assertEqual(len(res), 1) + + print("v1 getnext var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertTrue(var.tag is not None) + self.assertTrue(var.iid is not None) + self.assertTrue(var.val is not None) + self.assertTrue(var.type is not None) + + def test_v1_set(self): + print("\n") + print("---v1 SET tests-------------------------------------\n") + # snmpset fails for the 'sysLocation' variable, + # as the syslocation token is configured in the + # snmpd.conf file, which disables write access + # to the variable. + # Hence using the 'sysName' variable for the set tests. + var = netsnmp.Varbind('sysName', '0', 'my new name') + res = netsnmp.snmpset(var, **snmp_dest()) + + print("v1 snmpset result: ", res, "\n") + self.assertEqual(res, 1) + + print("v1 set var: ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertEqual(var.tag, 'sysName') + self.assertEqual(var.iid, '0') + self.assertEqual(var.val, 'my new name') + self.assertTrue(var.type is None) + + def test_v1_walk(self): + print("\n") + print("---v1 walk tests-------------------------------------\n") + varlist = netsnmp.VarList(netsnmp.Varbind('system')) + + print("v1 varlist walk in: ") + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertEqual(var.iid, '') + self.assertIsNone(var.type) + self.assertIsNone(var.val) + print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + + res = netsnmp.snmpwalk(varlist, **snmp_dest()) + print("v1 snmpwalk result: ", res, "\n") + self.assertTrue(len(res) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + + def test_v1_walk_2(self): + print("\n") + print("---v1 walk 2-------------------------------------\n") + + print("v1 varbind walk in: ") var = netsnmp.Varbind('system') - res = netsnmp.snmpwalk(var, - Version = 1, - DestHost='localhost', - Community='public') - print "v1 snmpwalk result (should be = orig): ", res, "\n" - - print var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v1 multi-varbind test-------------------------------------\n" - sess = netsnmp.Session(Version=1, - DestHost='localhost', - Community='public') - - vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), - netsnmp.Varbind('sysContact', 0), - netsnmp.Varbind('sysLocation', 0)) - vals = sess.get(vars) - print "v1 sess.get result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - - vals = sess.getnext(vars) - print "v1 sess.getnext result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - - vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime'), - netsnmp.Varbind('sysORLastChange'), - netsnmp.Varbind('sysORID'), - netsnmp.Varbind('sysORDescr'), - netsnmp.Varbind('sysORUpTime')) - - vals = sess.getbulk(2, 8, vars) - print "v1 sess.getbulk result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v1 set2-------------------------------------\n" - - vars = netsnmp.VarList( - netsnmp.Varbind('sysLocation', '0', 'my newer location')) - res = sess.set(vars) - print "v1 sess.set result: ", res, "\n" - - print "---v1 walk3-------------------------------------\n" - vars = netsnmp.VarList(netsnmp.Varbind('system')) - - vals = sess.walk(vars) - print "v1 sess.walk result: ", vals, "\n" - - for var in vars: - print " ",var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v2c get-------------------------------------\n" - - sess = netsnmp.Session(Version=2, - DestHost='localhost', - Community='public') - - sess.UseEnums = 1 - sess.UseLongNames = 1 - - vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), - netsnmp.Varbind('sysContact', 0), - netsnmp.Varbind('sysLocation', 0)) - vals = sess.get(vars) - print "v2 sess.get result: ", vals, "\n" - - print "---v2c getnext-------------------------------------\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - vals = sess.getnext(vars) - print "v2 sess.getnext result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - print "---v2c getbulk-------------------------------------\n" - - vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime'), - netsnmp.Varbind('sysORLastChange'), - netsnmp.Varbind('sysORID'), - netsnmp.Varbind('sysORDescr'), - netsnmp.Varbind('sysORUpTime')) - - vals = sess.getbulk(2, 8, vars) - print "v2 sess.getbulk result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - print "---v2c set-------------------------------------\n" - - vars = netsnmp.VarList( - netsnmp.Varbind('sysLocation','0','my even newer location')) - - res = sess.set(vars) - print "v2 sess.set result: ", res, "\n" - - print "---v2c walk-------------------------------------\n" - vars = netsnmp.VarList(netsnmp.Varbind('system')) - - vals = sess.walk(vars) - print "v2 sess.walk result: ", vals, "\n" - - for var in vars: - print " ",var.tag, var.iid, "=", var.val, '(',var.type,')' - - print "---v3 setup-------------------------------------\n" - sess = netsnmp.Session(Version=3, - DestHost='localhost', - SecLevel='authPriv', - SecName='initial', - PrivPass='priv_pass', - AuthPass='auth_pass') - - sess.UseSprintValue = 1 - - vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), - netsnmp.Varbind('sysContact', 0), - netsnmp.Varbind('sysLocation', 0)) - print "---v3 get-------------------------------------\n" - vals = sess.get(vars) - print "v3 sess.get result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - print "---v3 getnext-------------------------------------\n" - - vals = sess.getnext(vars) - print "v3 sess.getnext result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime'), - netsnmp.Varbind('sysORLastChange'), - netsnmp.Varbind('sysORID'), - netsnmp.Varbind('sysORDescr'), - netsnmp.Varbind('sysORUpTime')) - - vals = sess.getbulk(2, 8, vars) - print "v3 sess.getbulk result: ", vals, "\n" - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - print "---v3 set-------------------------------------\n" - - vars = netsnmp.VarList( - netsnmp.Varbind('sysLocation','0', 'my final destination')) - res = sess.set(vars) - print "v3 sess.set result: ", res, "\n" - - print "---v3 walk-------------------------------------\n" - vars = netsnmp.VarList(netsnmp.Varbind('system')) - - vals = sess.walk(vars) - print "v3 sess.walk result: ", vals, "\n" - - for var in vars: - print " ",var.tag, var.iid, "=", var.val, '(',var.type,')' + self.assertEqual(var.tag, 'system') + self.assertEqual(var.iid, '') + self.assertEqual(var.val, None) + self.assertEqual(var.type, None) + res = netsnmp.snmpwalk(var, **snmp_dest()) + print("v1 snmpwalk result (should be = orig): ", res, "\n") + self.assertTrue(len(res) > 0) + + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertEqual(var.tag, 'system') + self.assertEqual(var.iid, '') + self.assertEqual(var.val, None) + self.assertEqual(var.type, None) + + def test_v1_mv_get(self): + print("\n") + print("---v1 multi-varbind test-------------------------------------\n") + sess = setup_v1() + + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), + netsnmp.Varbind('sysContact', 0), + netsnmp.Varbind('sysLocation', 0)) + vals = sess.get(varlist) + print("v1 sess.get result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + + vals = sess.getnext(varlist) + print("v1 sess.getnext result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime'), + netsnmp.Varbind('sysORLastChange'), + netsnmp.Varbind('sysORID'), + netsnmp.Varbind('sysORDescr'), + netsnmp.Varbind('sysORUpTime')) + + vals = sess.getbulk(2, 8, varlist) + print("v1 sess.getbulk result: ", vals, "\n") + self.assertEqual(vals, None) # GetBulk is not supported for v1 + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNone(var.type) + self.assertIsNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + + def test_v1_set_2(self): + print("\n") + print("---v1 set2-------------------------------------\n") + + sess = setup_v1() + # snmpset fails for the 'sysLocation' variable, + # as the syslocation token is configured in the + # snmpd.conf file, which disables write access + # to the variable. + # Hence using the 'sysName' variable for the set tests. + varlist = netsnmp.VarList( + netsnmp.Varbind('sysName', '0', 'my newer name')) + res = sess.set(varlist) + print("v1 sess.set result: ", res, "\n") + + def test_v1_walk_3(self): + print("\n") + print("---v1 walk3-------------------------------------\n") + + sess = setup_v1() + varlist = netsnmp.VarList(netsnmp.Varbind('system')) + + vals = sess.walk(varlist) + print("v1 sess.walk result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + + def test_v1_walk_4(self): + print("\n") + print("---v1 walk4-------------------------------------\n") + + sess = setup_v1() + varlist = netsnmp.VarList(netsnmp.Varbind('.1')) + + vals = sess.walk(varlist) + print("v1 sess.walk length: ", len(vals), "\n") + self.assertTrue(len(vals) > 0) + + def test_v2c_get(self): + print("\n") + print("---v2c get-------------------------------------\n") + + sess = setup_v2() + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), + netsnmp.Varbind('sysContact', 0), + netsnmp.Varbind('sysLocation', 0)) + vals = sess.get(varlist) + print("v2 sess.get result: ", vals, "\n") + self.assertEqual(len(vals), 3) + + def test_v2c_getnext(self): + print("\n") + print("---v2c getnext-------------------------------------\n") + + sess = setup_v2() + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), + netsnmp.Varbind('sysContact', 0), + netsnmp.Varbind('sysLocation', 0)) + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNone(var.type) + self.assertIsNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + vals = sess.getnext(varlist) + print("v2 sess.getnext result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertTrue(var.tag.find('.') >= 0) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + def test_v2c_getbulk(self): + print("\n") + print("---v2c getbulk-------------------------------------\n") + + sess = setup_v2() + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime'), + netsnmp.Varbind('sysORLastChange'), + netsnmp.Varbind('sysORID'), + netsnmp.Varbind('sysORDescr'), + netsnmp.Varbind('sysORUpTime')) + + vals = sess.getbulk(2, 8, varlist) + print("v2 sess.getbulk result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertTrue(var.tag.find('.') >= 0) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + def test_v2c_set(self): + print("\n") + print("---v2c set-------------------------------------\n") + + sess = setup_v2() + # snmpset fails for the 'sysLocation' variable, + # as the syslocation token is configured in the + # snmpd.conf file, which disables write access + # to the variable. + # Hence using the 'sysName' variable for the set tests. + varlist = netsnmp.VarList( + netsnmp.Varbind('sysName', '0', 'my even newer name')) + + res = sess.set(varlist) + print("v2 sess.set result: ", res, "\n") + self.assertEqual(res, 1) + + def test_v2c_walk(self): + print("\n") + print("---v2c walk-------------------------------------\n") + + sess = setup_v2() + + varlist = netsnmp.VarList(netsnmp.Varbind('system')) + + vals = sess.walk(varlist) + print("v2 sess.walk result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + + def test_v3_get(self): + print("\n") + sess = setup_v3(); + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), + netsnmp.Varbind('sysContact', 0), + netsnmp.Varbind('sysLocation', 0)) + print("---v3 get-------------------------------------\n") + vals = sess.get(varlist) + print("v3 sess.get result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + def test_v3_getnext(self): + print("\n") + print("---v3 getnext-------------------------------------\n") + + sess = setup_v3(); + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0), + netsnmp.Varbind('sysContact', 0), + netsnmp.Varbind('sysLocation', 0)) + vals = sess.getnext(varlist) + print("v3 sess.getnext result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + def test_v3_getbulk(self): + sess = setup_v3(); + varlist = netsnmp.VarList(netsnmp.Varbind('sysUpTime'), + netsnmp.Varbind('sysORLastChange'), + netsnmp.Varbind('sysORID'), + netsnmp.Varbind('sysORDescr'), + netsnmp.Varbind('sysORUpTime')) + + vals = sess.getbulk(2, 8, varlist) + print("v3 sess.getbulk result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + def test_v3_set(self): + print("\n") + print("---v3 set-------------------------------------\n") + + sess = setup_v3(); + # snmpset fails for the 'sysLocation' variable, + # as the syslocation token is configured in the + # snmpd.conf file, which disables write access + # to the variable. + # Hence using the 'sysName' variable for the set tests. + varlist = netsnmp.VarList( + netsnmp.Varbind('sysName', '0', 'my final name')) + res = sess.set(varlist) + print("v3 sess.set result: ", res, "\n") + self.assertEqual(res, 1) + + def test_v3_walk(self): + print("\n") + print("---v3 walk-------------------------------------\n") + sess = setup_v3(); + varlist = netsnmp.VarList(netsnmp.Varbind('system')) + + vals = sess.walk(varlist) + print("v3 sess.walk result: ", vals, "\n") + self.assertTrue(len(vals) > 0) + + for var in varlist: + print(" ", var.tag, var.iid, "=", var.val, '(', var.type, ')') class SetTests(unittest.TestCase): - def testFuncs(self): - print "\n-------------- SET Test Start ----------------------------\n" + """SNMP set tests for the Net-SNMP Python interface""" + def testFuncs(self): + """Test code""" + print("\n-------------- SET Test Start ----------------------------\n") - var = netsnmp.Varbind('sysUpTime','0') - res = netsnmp.snmpget(var, Version = 1, DestHost='localhost', - Community='public') - print "uptime = ", res[0] + var = netsnmp.Varbind('sysUpTime', '0') + res = netsnmp.snmpget(var, **snmp_dest()) + print("uptime = ", res[0]) + self.assertEqual(len(res), 1) - - var = netsnmp.Varbind('versionRestartAgent','0', 1) - res = netsnmp.snmpset(var, Version = 1, DestHost='localhost', - Community='public') - var = netsnmp.Varbind('sysUpTime','0') - res = netsnmp.snmpget(var, Version = 1, DestHost='localhost', - Community='public') - print "uptime = ", res[0] + var = netsnmp.Varbind('versionRestartAgent', '0', 1) + res = netsnmp.snmpset(var, **snmp_dest()) + self.assertEqual(res, 1) + + var = netsnmp.Varbind('sysUpTime', '0') + res = netsnmp.snmpget(var, **snmp_dest()) + print("uptime = ", res[0]) + self.assertEqual(len(res), 1) var = netsnmp.Varbind('nsCacheEntry') - res = netsnmp.snmpgetnext(var, Version = 1, DestHost='localhost', - Community='public') - print "var = ", var.tag, var.iid, "=", var.val, '(',var.type,')' + res = netsnmp.snmpgetnext(var, **snmp_dest()) + print("var = ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertEqual(len(res), 1) var.val = 65 - res = netsnmp.snmpset(var, Version = 1, DestHost='localhost', - Community='public') - res = netsnmp.snmpget(var, Version = 1, DestHost='localhost', - Community='public') - print "var = ", var.tag, var.iid, "=", var.val, '(',var.type,')' - - sess = netsnmp.Session(Version = 1, DestHost='localhost', - Community='public') - - vars = netsnmp.VarList(netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.2.116.101.115.116','','.1.3.6.1.6.1.1'), - netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.3.116.101.115.116','','1234'), - netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.9.116.101.115.116','', 4)) - res = sess.set(vars) - - print "res = ", res - - vars = netsnmp.VarList(netsnmp.Varbind('snmpTargetAddrTDomain'), - netsnmp.Varbind('snmpTargetAddrTAddress'), - netsnmp.Varbind('snmpTargetAddrRowStatus')) - - res = sess.getnext(vars) - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - vars = netsnmp.VarList(netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.9.116.101.115.116','', 6)) - - res = sess.set(vars) - - print "res = ", res - - vars = netsnmp.VarList(netsnmp.Varbind('snmpTargetAddrTDomain'), - netsnmp.Varbind('snmpTargetAddrTAddress'), - netsnmp.Varbind('snmpTargetAddrRowStatus')) - - res = sess.getnext(vars) - - for var in vars: - print var.tag, var.iid, "=", var.val, '(',var.type,')' - print "\n" - - print "\n-------------- SET Test End ----------------------------\n" - - -if __name__=='__main__': + res = netsnmp.snmpset(var, **snmp_dest()) + self.assertEqual(res, 1) + res = netsnmp.snmpget(var, **snmp_dest()) + print("var = ", var.tag, var.iid, "=", var.val, '(', var.type, ')') + self.assertEqual(len(res), 1) + self.assertEqual(res[0], '65'); + + sess = setup_v1() + + varlist = netsnmp.VarList( + netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.2.116.101.115.116', '', '.1.3.6.1.6.1.1'), + netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.3.116.101.115.116', '', '1234'), + netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.9.116.101.115.116', '', 4)) + res = sess.set(varlist) + + print("res = ", res) + self.assertEqual(res, 1) + + varlist = netsnmp.VarList(netsnmp.Varbind('snmpTargetAddrTDomain'), + netsnmp.Varbind('snmpTargetAddrTAddress'), + netsnmp.Varbind('snmpTargetAddrRowStatus')) + + res = sess.getnext(varlist) + self.assertEqual(len(res), 3) + self.assertEqual(varlist[0].tag, 'snmpTargetAddrTDomain') + self.assertEqual(varlist[0].iid, '116.101.115.116') + self.assertEqual(varlist[0].val, '.1.3.6.1.6.1.1') + self.assertEqual(varlist[1].tag, 'snmpTargetAddrTAddress') + self.assertEqual(varlist[1].iid, '116.101.115.116') + self.assertEqual(varlist[1].val, '1234') + self.assertEqual(varlist[2].tag, 'snmpTargetAddrRowStatus') + self.assertEqual(varlist[2].iid, '116.101.115.116') + self.assertEqual(varlist[2].val, '3') + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + varlist = netsnmp.VarList( + netsnmp.Varbind('.1.3.6.1.6.3.12.1.2.1.9.116.101.115.116', '', 6)) + + res = sess.set(varlist) + + print("res = ", res) + self.assertEqual(res, 1) + + varlist = netsnmp.VarList(netsnmp.Varbind('snmpTargetAddrTDomain'), + netsnmp.Varbind('snmpTargetAddrTAddress'), + netsnmp.Varbind('snmpTargetAddrRowStatus')) + + res = sess.getnext(varlist) + self.assertEqual(len(res), 3) + self.assertNotEqual(varlist[0].tag, 'snmpTargetAddrTDomain') + self.assertNotEqual(varlist[1].tag, 'snmpTargetAddrTAddress') + self.assertNotEqual(varlist[2].tag, 'snmpTargetAddrRowStatus') + + for var in varlist: + self.assertIsNotNone(var.tag) + self.assertIsNotNone(var.iid) + self.assertIsNotNone(var.type) + self.assertIsNotNone(var.val) + print(var.tag, var.iid, "=", var.val, '(', var.type, ')') + print("\n") + + print("\n-------------- SET Test End ----------------------------\n") + + +class HexStringGet(unittest.TestCase): + """SNMP hex string tests for the Net-SNMP Python interface""" + def testFunc(self): + """HexStringGet""" + session = setup_v2() + + # snmpEngineID.0 + varlist = netsnmp.VarList(netsnmp.Varbind('.1.3.6.1.6.3.10.2.1.1.0')) + session.get(varlist) + for var in varlist: + print(var) + self.assertEqual(varlist[0].iid, '0'); + self.assertEqual(varlist[0].type, 'OCTETSTR'); + +class HexStringGetNext(unittest.TestCase): + """SNMP hex string tests for the Net-SNMP Python interface""" + def testFunc(self): + """HexStringGetNext""" + session = setup_v2() + + varlist = netsnmp.VarList(netsnmp.Varbind('.1.3.6.1.6.3.10')) + session.walk(varlist) + for var in varlist: + print(var) + self.assertEqual(varlist[0].iid, '0'); + +class HexStringSet(unittest.TestCase): + """SNMP hex string tests for the Net-SNMP Python interface""" + def testFunc(self): + """HexStringSet""" + session = setup_v2() + + varlist = netsnmp.VarList(netsnmp.Varbind('.1.3.6.1.6.3.10.2.1.1.0')) + session.get(varlist) + print("varlist length =", len(varlist)) + for var in varlist: + print(var) + self.assertEqual(varlist[0].iid, '0'); + res = netsnmp.snmpset(var, **snmp_dest()); + print("first SNMP set result:", res) + self.assertEqual(res, 0) + var.val = "" + res = netsnmp.snmpset(var, **snmp_dest()); + print("second SNMP set result:", res) + self.assertEqual(res, 0) + +if __name__ == '__main__': unittest.main() diff --git a/python/setup.py b/python/setup.py index c520df9..ce4c86a 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,31 +1,29 @@ -from distutils.core import setup, Extension from setuptools import setup, Extension, find_packages import os import re -import string import sys intree=0 args = sys.argv[:] for arg in args: - if string.find(arg,'--basedir=') == 0: - basedir = string.split(arg,'=')[1] - sys.argv.remove(arg) + if arg.find('--basedir=') == 0: + basedir = arg.split('=')[1] + sys.argv.remove(arg) intree=1 if intree: netsnmp_libs = os.popen(basedir+'/net-snmp-config --libs').read() libdir = os.popen(basedir+'/net-snmp-config --build-lib-dirs '+basedir).read() - incdir = os.popen(basedir+'/net-snmp-config --build-includes '+basedir).read() - libs = re.findall(r"-l(\S+)", netsnmp_libs) - libdirs = re.findall(r"-L(\S+)", libdir) - incdirs = re.findall(r"-I(\S+)", incdir) + incdir = os.popen(basedir+'/net-snmp-config --build-includes '+basedir).read() + " " + os.popen(basedir+'/net-snmp-config --base-cflags '+basedir).read() + libs = re.findall(r"(?:^|\s+)-l(\S+)", netsnmp_libs) + libdirs = re.findall(r"(?:^|\s+)-L(\S+)", libdir) + incdirs = re.findall(r"(?:^|\s+)-I(\S+)", incdir) else: netsnmp_libs = os.popen('net-snmp-config --libs').read() - libdirs = re.findall(r"-L(\S+)", netsnmp_libs) + libdirs = re.findall(r"(?:^|\s+)-L(\S+)", netsnmp_libs) incdirs = [] - libs = re.findall(r"-l(\S+)", netsnmp_libs) + libs = re.findall(r"(?:^|\s+)-l(\S+)", netsnmp_libs) setup( name="netsnmp-python", version="1.0a1", diff --git a/sedscript.in b/sedscript.in index 7814ce9..0a9b6e4 100644 --- a/sedscript.in +++ b/sedscript.in @@ -52,7 +52,7 @@ s/MREMOVEMEEMSWAPMINIMUM/MEMSWAPMINIMUM/g #endif #ifdef USING_UCD_SNMP_DISK_MODULE -#include +#include s/DREMOVEMEEFDISKMINIMUMSPACE/DEFDISKMINIMUMSPACE/g s/DREMOVEMEEFDISKMINPERCENT/DEFDISKMAXIMUMPERCENT/g s/DREMOVEMEISKDEVICE/DISKDEVICE/g diff --git a/snmplib/Makefile.depend b/snmplib/Makefile.depend index 01f4557..33de485 100644 --- a/snmplib/Makefile.depend +++ b/snmplib/Makefile.depend @@ -4,6 +4,7 @@ ./asn1.lo: ../include/net-snmp/system/linux.h ./asn1.lo: ../include/net-snmp/system/sysv.h ./asn1.lo: ../include/net-snmp/system/generic.h +./asn1.lo: ../include/net-snmp/machine/generic.h ./asn1.lo: ../include/net-snmp/output_api.h ../include/net-snmp/types.h ./asn1.lo: ../include/net-snmp/library/oid.h ./asn1.lo: ../include/net-snmp/library/types.h @@ -27,6 +28,7 @@ ./asn1.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./asn1.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./asn1.lo: ../include/net-snmp/library/snmpIPXDomain.h +./asn1.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./asn1.lo: ../include/net-snmp/library/ucd_compat.h ./asn1.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./asn1.lo: ../include/net-snmp/library/parse.h @@ -35,6 +37,7 @@ ./asn1.lo: ../include/net-snmp/library/snmp_impl.h ./asn1.lo: ../include/net-snmp/library/snmp.h ./asn1.lo: ../include/net-snmp/library/snmp-tc.h +./asn1.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./asn1.lo: ../include/net-snmp/library/snmp_debug.h ./asn1.lo: ../include/net-snmp/library/snmp_logging.h ./asn1.lo: ../include/net-snmp/utilities.h @@ -46,17 +49,23 @@ ./asn1.lo: ../include/net-snmp/library/data_list.h ./asn1.lo: ../include/net-snmp/library/check_varbind.h ./asn1.lo: ../include/net-snmp/library/container.h -./asn1.lo: ../include/net-snmp/library/factory.h +./asn1.lo: factory.h ./asn1.lo: ../include/net-snmp/library/container_binary_array.h ./asn1.lo: ../include/net-snmp/library/container_list_ssll.h ./asn1.lo: ../include/net-snmp/library/container_iterator.h ./asn1.lo: ../include/net-snmp/library/container.h ./asn1.lo: ../include/net-snmp/library/snmp_assert.h ./asn1.lo: ../include/net-snmp/version.h +./asprintf.lo: ../include/net-snmp/net-snmp-config.h +./asprintf.lo: ../include/net-snmp/system/linux.h +./asprintf.lo: ../include/net-snmp/system/sysv.h +./asprintf.lo: ../include/net-snmp/system/generic.h +./asprintf.lo: ../include/net-snmp/machine/generic.h ./callback.lo: ../include/net-snmp/net-snmp-config.h ./callback.lo: ../include/net-snmp/system/linux.h ./callback.lo: ../include/net-snmp/system/sysv.h ./callback.lo: ../include/net-snmp/system/generic.h +./callback.lo: ../include/net-snmp/machine/generic.h ./callback.lo: ../include/net-snmp/net-snmp-features.h ./callback.lo: ../include/net-snmp/types.h ./callback.lo: ../include/net-snmp/library/oid.h @@ -68,6 +77,7 @@ ./callback.lo: ../include/net-snmp/pdu_api.h ./callback.lo: ../include/net-snmp/library/asn1.h ./callback.lo: ../include/net-snmp/output_api.h +./callback.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./callback.lo: ../include/net-snmp/library/snmp_debug.h ./callback.lo: ../include/net-snmp/library/snmp_logging.h ./callback.lo: ../include/net-snmp/session_api.h @@ -85,6 +95,7 @@ ./callback.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./callback.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./callback.lo: ../include/net-snmp/library/snmpIPXDomain.h +./callback.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./callback.lo: ../include/net-snmp/library/ucd_compat.h ./callback.lo: ../include/net-snmp/library/mib.h ./callback.lo: ../include/net-snmp/mib_api.h @@ -102,7 +113,7 @@ ./callback.lo: ../include/net-snmp/library/data_list.h ./callback.lo: ../include/net-snmp/library/check_varbind.h ./callback.lo: ../include/net-snmp/library/container.h -./callback.lo: ../include/net-snmp/library/factory.h +./callback.lo: factory.h ./callback.lo: ../include/net-snmp/library/container_binary_array.h ./callback.lo: ../include/net-snmp/library/container_list_ssll.h ./callback.lo: ../include/net-snmp/library/container_iterator.h @@ -113,11 +124,63 @@ ./cert_util.lo: ../include/net-snmp/system/linux.h ./cert_util.lo: ../include/net-snmp/system/sysv.h ./cert_util.lo: ../include/net-snmp/system/generic.h +./cert_util.lo: ../include/net-snmp/machine/generic.h ./cert_util.lo: ../include/net-snmp/net-snmp-features.h +./cert_util.lo: ../include/net-snmp/types.h +./cert_util.lo: ../include/net-snmp/library/oid.h +./cert_util.lo: ../include/net-snmp/library/types.h +./cert_util.lo: ../include/net-snmp/definitions.h +./cert_util.lo: ../include/net-snmp/library/snmp_api.h +./cert_util.lo: ../include/net-snmp/varbind_api.h +./cert_util.lo: ../include/net-snmp/library/snmp_client.h +./cert_util.lo: ../include/net-snmp/pdu_api.h +./cert_util.lo: ../include/net-snmp/library/asn1.h +./cert_util.lo: ../include/net-snmp/output_api.h +./cert_util.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./cert_util.lo: ../include/net-snmp/library/snmp_debug.h +./cert_util.lo: ../include/net-snmp/library/snmp_logging.h +./cert_util.lo: ../include/net-snmp/session_api.h +./cert_util.lo: ../include/net-snmp/library/callback.h +./cert_util.lo: ../include/net-snmp/library/snmp_transport.h +./cert_util.lo: ../include/net-snmp/library/snmp_service.h +./cert_util.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpUnixDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpUDPDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpTCPDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./cert_util.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./cert_util.lo: ../include/net-snmp/library/snmpIPXDomain.h +./cert_util.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./cert_util.lo: ../include/net-snmp/library/ucd_compat.h +./cert_util.lo: ../include/net-snmp/library/mib.h +./cert_util.lo: ../include/net-snmp/mib_api.h +./cert_util.lo: ../include/net-snmp/library/parse.h +./cert_util.lo: ../include/net-snmp/library/oid_stash.h +./cert_util.lo: ../include/net-snmp/library/snmp_impl.h +./cert_util.lo: ../include/net-snmp/library/snmp.h +./cert_util.lo: ../include/net-snmp/library/snmp-tc.h +./cert_util.lo: ../include/net-snmp/config_api.h +./cert_util.lo: ../include/net-snmp/library/read_config.h +./cert_util.lo: ../include/net-snmp/library/default_store.h +./cert_util.lo: ../include/net-snmp/net-snmp-config.h +./cert_util.lo: ../include/net-snmp/library/snmp_parse_args.h +./cert_util.lo: ../include/net-snmp/library/snmp_enum.h +./cert_util.lo: ../include/net-snmp/library/vacm.h +./cert_util.lo: ../include/net-snmp/library/snmp_assert.h +./cert_util.lo: ../include/net-snmp/library/system.h +./cert_util.lo: ../include/net-snmp/library/tools.h +./cert_util.lo: ../include/net-snmp/library/container.h +./cert_util.lo: factory.h +./cert_util.lo: ../include/net-snmp/library/data_list.h +./cert_util.lo: ../include/net-snmp/library/file_utils.h +./cert_util.lo: ../include/net-snmp/library/dir_utils.h +./cert_util.lo: ../include/net-snmp/library/cert_util.h +./cert_util.lo: ../include/net-snmp/library/snmp_openssl.h ./check_varbind.lo: ../include/net-snmp/net-snmp-config.h -./check_varbind.lo: ../include/net-snmp/system/linux.h -./check_varbind.lo: ../include/net-snmp/system/sysv.h -./check_varbind.lo: ../include/net-snmp/system/generic.h ./check_varbind.lo: ../include/net-snmp/net-snmp-includes.h ./check_varbind.lo: ../include/net-snmp/definitions.h ./check_varbind.lo: ../include/net-snmp/types.h @@ -129,6 +192,7 @@ ./check_varbind.lo: ../include/net-snmp/pdu_api.h ./check_varbind.lo: ../include/net-snmp/library/asn1.h ./check_varbind.lo: ../include/net-snmp/output_api.h +./check_varbind.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./check_varbind.lo: ../include/net-snmp/library/snmp_debug.h ./check_varbind.lo: ../include/net-snmp/library/snmp_logging.h ./check_varbind.lo: ../include/net-snmp/session_api.h @@ -146,6 +210,7 @@ ./check_varbind.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./check_varbind.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./check_varbind.lo: ../include/net-snmp/library/snmpIPXDomain.h +./check_varbind.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./check_varbind.lo: ../include/net-snmp/library/ucd_compat.h ./check_varbind.lo: ../include/net-snmp/library/mib.h ./check_varbind.lo: ../include/net-snmp/mib_api.h @@ -165,7 +230,7 @@ ./check_varbind.lo: ../include/net-snmp/library/data_list.h ./check_varbind.lo: ../include/net-snmp/library/check_varbind.h ./check_varbind.lo: ../include/net-snmp/library/container.h -./check_varbind.lo: ../include/net-snmp/library/factory.h +./check_varbind.lo: factory.h ./check_varbind.lo: ../include/net-snmp/library/container_binary_array.h ./check_varbind.lo: ../include/net-snmp/library/container_list_ssll.h ./check_varbind.lo: ../include/net-snmp/library/container_iterator.h @@ -175,7 +240,6 @@ ./check_varbind.lo: ../include/net-snmp/config_api.h ./check_varbind.lo: ../include/net-snmp/library/read_config.h ./check_varbind.lo: ../include/net-snmp/library/default_store.h -./check_varbind.lo: ../include/net-snmp/net-snmp-config.h ./check_varbind.lo: ../include/net-snmp/library/snmp_parse_args.h ./check_varbind.lo: ../include/net-snmp/library/snmp_enum.h ./check_varbind.lo: ../include/net-snmp/library/vacm.h @@ -187,8 +251,8 @@ ./check_varbind.lo: ../include/net-snmp/library/lcd_time.h ./check_varbind.lo: ../include/net-snmp/library/snmp_secmod.h ./check_varbind.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./check_varbind.lo: ../include/net-snmp/library/snmptsm.h ./check_varbind.lo: ../include/net-snmp/library/snmpusm.h +./check_varbind.lo: ../include/net-snmp/library/snmptsm.h ./closedir.lo: ../include/net-snmp/net-snmp-config.h ./closedir.lo: ../include/net-snmp/types.h ./closedir.lo: ../include/net-snmp/library/oid.h @@ -200,6 +264,7 @@ ./closedir.lo: ../include/net-snmp/pdu_api.h ./closedir.lo: ../include/net-snmp/library/asn1.h ./closedir.lo: ../include/net-snmp/output_api.h +./closedir.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./closedir.lo: ../include/net-snmp/library/snmp_debug.h ./closedir.lo: ../include/net-snmp/library/snmp_logging.h ./closedir.lo: ../include/net-snmp/session_api.h @@ -217,6 +282,7 @@ ./closedir.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./closedir.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./closedir.lo: ../include/net-snmp/library/snmpIPXDomain.h +./closedir.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./closedir.lo: ../include/net-snmp/library/ucd_compat.h ./closedir.lo: ../include/net-snmp/library/mib.h ./closedir.lo: ../include/net-snmp/mib_api.h @@ -227,77 +293,6 @@ ./closedir.lo: ../include/net-snmp/library/snmp.h ./closedir.lo: ../include/net-snmp/library/snmp-tc.h ./closedir.lo: ../include/net-snmp/library/system.h -./container_binary_array.lo: ../include/net-snmp/net-snmp-config.h -./container_binary_array.lo: ../include/net-snmp/net-snmp-includes.h -./container_binary_array.lo: ../include/net-snmp/definitions.h -./container_binary_array.lo: ../include/net-snmp/types.h -./container_binary_array.lo: ../include/net-snmp/library/oid.h -./container_binary_array.lo: ../include/net-snmp/library/types.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_api.h -./container_binary_array.lo: ../include/net-snmp/varbind_api.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_client.h -./container_binary_array.lo: ../include/net-snmp/pdu_api.h -./container_binary_array.lo: ../include/net-snmp/library/asn1.h -./container_binary_array.lo: ../include/net-snmp/output_api.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_debug.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_logging.h -./container_binary_array.lo: ../include/net-snmp/session_api.h -./container_binary_array.lo: ../include/net-snmp/library/callback.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_transport.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_service.h -./container_binary_array.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpUnixDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpUDPDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpTCPDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./container_binary_array.lo: ../include/net-snmp/library/snmpIPXDomain.h -./container_binary_array.lo: ../include/net-snmp/library/ucd_compat.h -./container_binary_array.lo: ../include/net-snmp/library/mib.h -./container_binary_array.lo: ../include/net-snmp/mib_api.h -./container_binary_array.lo: ../include/net-snmp/library/parse.h -./container_binary_array.lo: ../include/net-snmp/library/oid_stash.h -./container_binary_array.lo: ../include/net-snmp/net-snmp-features.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_impl.h -./container_binary_array.lo: ../include/net-snmp/library/snmp.h -./container_binary_array.lo: ../include/net-snmp/library/snmp-tc.h -./container_binary_array.lo: ../include/net-snmp/library/getopt.h -./container_binary_array.lo: ../include/net-snmp/utilities.h -./container_binary_array.lo: ../include/net-snmp/library/system.h -./container_binary_array.lo: ../include/net-snmp/library/tools.h -./container_binary_array.lo: ../include/net-snmp/library/int64.h -./container_binary_array.lo: ../include/net-snmp/library/mt_support.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_alarm.h -./container_binary_array.lo: ../include/net-snmp/library/data_list.h -./container_binary_array.lo: ../include/net-snmp/library/check_varbind.h -./container_binary_array.lo: ../include/net-snmp/library/container.h -./container_binary_array.lo: ../include/net-snmp/library/factory.h -./container_binary_array.lo: ../include/net-snmp/library/container_binary_array.h -./container_binary_array.lo: ../include/net-snmp/library/container_list_ssll.h -./container_binary_array.lo: ../include/net-snmp/library/container_iterator.h -./container_binary_array.lo: ../include/net-snmp/library/container.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_assert.h -./container_binary_array.lo: ../include/net-snmp/version.h -./container_binary_array.lo: ../include/net-snmp/config_api.h -./container_binary_array.lo: ../include/net-snmp/library/read_config.h -./container_binary_array.lo: ../include/net-snmp/library/default_store.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_parse_args.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_enum.h -./container_binary_array.lo: ../include/net-snmp/library/vacm.h -./container_binary_array.lo: ../include/net-snmp/snmpv3_api.h -./container_binary_array.lo: ../include/net-snmp/library/snmpv3.h -./container_binary_array.lo: ../include/net-snmp/library/transform_oids.h -./container_binary_array.lo: ../include/net-snmp/library/keytools.h -./container_binary_array.lo: ../include/net-snmp/library/scapi.h -./container_binary_array.lo: ../include/net-snmp/library/lcd_time.h -./container_binary_array.lo: ../include/net-snmp/library/snmp_secmod.h -./container_binary_array.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./container_binary_array.lo: ../include/net-snmp/library/snmptsm.h -./container_binary_array.lo: ../include/net-snmp/library/snmpusm.h ./container.lo: ../include/net-snmp/net-snmp-config.h ./container.lo: ../include/net-snmp/net-snmp-features.h ./container.lo: ../include/net-snmp/net-snmp-includes.h @@ -310,6 +305,7 @@ ./container.lo: ../include/net-snmp/pdu_api.h ./container.lo: ../include/net-snmp/library/asn1.h ./container.lo: ../include/net-snmp/output_api.h +./container.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./container.lo: ../include/net-snmp/library/snmp_debug.h ./container.lo: ../include/net-snmp/library/snmp_logging.h ./container.lo: ../include/net-snmp/session_api.h @@ -327,6 +323,7 @@ ./container.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./container.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./container.lo: ../include/net-snmp/library/snmpIPXDomain.h +./container.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./container.lo: ../include/net-snmp/library/ucd_compat.h ./container.lo: ../include/net-snmp/library/mib.h ./container.lo: ../include/net-snmp/mib_api.h @@ -345,7 +342,7 @@ ./container.lo: ../include/net-snmp/library/data_list.h ./container.lo: ../include/net-snmp/library/check_varbind.h ./container.lo: ../include/net-snmp/library/container.h -./container.lo: ../include/net-snmp/library/factory.h +./container.lo: factory.h ./container.lo: ../include/net-snmp/library/container_binary_array.h ./container.lo: ../include/net-snmp/library/container_list_ssll.h ./container.lo: ../include/net-snmp/library/container_iterator.h @@ -366,9 +363,82 @@ ./container.lo: ../include/net-snmp/library/lcd_time.h ./container.lo: ../include/net-snmp/library/snmp_secmod.h ./container.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./container.lo: ../include/net-snmp/library/snmptsm.h ./container.lo: ../include/net-snmp/library/snmpusm.h +./container.lo: ../include/net-snmp/library/snmptsm.h ./container.lo: ../include/net-snmp/library/container_null.h +./container_binary_array.lo: ../include/net-snmp/net-snmp-config.h +./container_binary_array.lo: ../include/net-snmp/net-snmp-includes.h +./container_binary_array.lo: ../include/net-snmp/definitions.h +./container_binary_array.lo: ../include/net-snmp/types.h +./container_binary_array.lo: ../include/net-snmp/library/oid.h +./container_binary_array.lo: ../include/net-snmp/library/types.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_api.h +./container_binary_array.lo: ../include/net-snmp/varbind_api.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_client.h +./container_binary_array.lo: ../include/net-snmp/pdu_api.h +./container_binary_array.lo: ../include/net-snmp/library/asn1.h +./container_binary_array.lo: ../include/net-snmp/output_api.h +./container_binary_array.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_debug.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_logging.h +./container_binary_array.lo: ../include/net-snmp/session_api.h +./container_binary_array.lo: ../include/net-snmp/library/callback.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_transport.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_service.h +./container_binary_array.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpUnixDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpUDPDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpTCPDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpIPXDomain.h +./container_binary_array.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./container_binary_array.lo: ../include/net-snmp/library/ucd_compat.h +./container_binary_array.lo: ../include/net-snmp/library/mib.h +./container_binary_array.lo: ../include/net-snmp/mib_api.h +./container_binary_array.lo: ../include/net-snmp/library/parse.h +./container_binary_array.lo: ../include/net-snmp/library/oid_stash.h +./container_binary_array.lo: ../include/net-snmp/net-snmp-features.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_impl.h +./container_binary_array.lo: ../include/net-snmp/library/snmp.h +./container_binary_array.lo: ../include/net-snmp/library/snmp-tc.h +./container_binary_array.lo: ../include/net-snmp/library/getopt.h +./container_binary_array.lo: ../include/net-snmp/utilities.h +./container_binary_array.lo: ../include/net-snmp/library/system.h +./container_binary_array.lo: ../include/net-snmp/library/tools.h +./container_binary_array.lo: ../include/net-snmp/library/int64.h +./container_binary_array.lo: ../include/net-snmp/library/mt_support.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_alarm.h +./container_binary_array.lo: ../include/net-snmp/library/data_list.h +./container_binary_array.lo: ../include/net-snmp/library/check_varbind.h +./container_binary_array.lo: ../include/net-snmp/library/container.h +./container_binary_array.lo: factory.h +./container_binary_array.lo: ../include/net-snmp/library/container_binary_array.h +./container_binary_array.lo: ../include/net-snmp/library/container_list_ssll.h +./container_binary_array.lo: ../include/net-snmp/library/container_iterator.h +./container_binary_array.lo: ../include/net-snmp/library/container.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_assert.h +./container_binary_array.lo: ../include/net-snmp/version.h +./container_binary_array.lo: ../include/net-snmp/config_api.h +./container_binary_array.lo: ../include/net-snmp/library/read_config.h +./container_binary_array.lo: ../include/net-snmp/library/default_store.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_parse_args.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_enum.h +./container_binary_array.lo: ../include/net-snmp/library/vacm.h +./container_binary_array.lo: ../include/net-snmp/snmpv3_api.h +./container_binary_array.lo: ../include/net-snmp/library/snmpv3.h +./container_binary_array.lo: ../include/net-snmp/library/transform_oids.h +./container_binary_array.lo: ../include/net-snmp/library/keytools.h +./container_binary_array.lo: ../include/net-snmp/library/scapi.h +./container_binary_array.lo: ../include/net-snmp/library/lcd_time.h +./container_binary_array.lo: ../include/net-snmp/library/snmp_secmod.h +./container_binary_array.lo: ../include/net-snmp/library/snmpv3-security-includes.h +./container_binary_array.lo: ../include/net-snmp/library/snmpusm.h +./container_binary_array.lo: ../include/net-snmp/library/snmptsm.h ./container_iterator.lo: ../include/net-snmp/net-snmp-config.h ./container_iterator.lo: ../include/net-snmp/net-snmp-features.h ./container_iterator.lo: ../include/net-snmp/net-snmp-includes.h @@ -382,6 +452,7 @@ ./container_iterator.lo: ../include/net-snmp/pdu_api.h ./container_iterator.lo: ../include/net-snmp/library/asn1.h ./container_iterator.lo: ../include/net-snmp/output_api.h +./container_iterator.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./container_iterator.lo: ../include/net-snmp/library/snmp_debug.h ./container_iterator.lo: ../include/net-snmp/library/snmp_logging.h ./container_iterator.lo: ../include/net-snmp/session_api.h @@ -399,6 +470,7 @@ ./container_iterator.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./container_iterator.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./container_iterator.lo: ../include/net-snmp/library/snmpIPXDomain.h +./container_iterator.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./container_iterator.lo: ../include/net-snmp/library/ucd_compat.h ./container_iterator.lo: ../include/net-snmp/library/mib.h ./container_iterator.lo: ../include/net-snmp/mib_api.h @@ -417,7 +489,7 @@ ./container_iterator.lo: ../include/net-snmp/library/data_list.h ./container_iterator.lo: ../include/net-snmp/library/check_varbind.h ./container_iterator.lo: ../include/net-snmp/library/container.h -./container_iterator.lo: ../include/net-snmp/library/factory.h +./container_iterator.lo: factory.h ./container_iterator.lo: ../include/net-snmp/library/container_binary_array.h ./container_iterator.lo: ../include/net-snmp/library/container_list_ssll.h ./container_iterator.lo: ../include/net-snmp/library/container_iterator.h @@ -438,8 +510,8 @@ ./container_iterator.lo: ../include/net-snmp/library/lcd_time.h ./container_iterator.lo: ../include/net-snmp/library/snmp_secmod.h ./container_iterator.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./container_iterator.lo: ../include/net-snmp/library/snmptsm.h ./container_iterator.lo: ../include/net-snmp/library/snmpusm.h +./container_iterator.lo: ../include/net-snmp/library/snmptsm.h ./container_list_ssll.lo: ../include/net-snmp/net-snmp-config.h ./container_list_ssll.lo: ../include/net-snmp/net-snmp-features.h ./container_list_ssll.lo: ../include/net-snmp/net-snmp-includes.h @@ -453,6 +525,7 @@ ./container_list_ssll.lo: ../include/net-snmp/pdu_api.h ./container_list_ssll.lo: ../include/net-snmp/library/asn1.h ./container_list_ssll.lo: ../include/net-snmp/output_api.h +./container_list_ssll.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./container_list_ssll.lo: ../include/net-snmp/library/snmp_debug.h ./container_list_ssll.lo: ../include/net-snmp/library/snmp_logging.h ./container_list_ssll.lo: ../include/net-snmp/session_api.h @@ -470,6 +543,7 @@ ./container_list_ssll.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./container_list_ssll.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./container_list_ssll.lo: ../include/net-snmp/library/snmpIPXDomain.h +./container_list_ssll.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./container_list_ssll.lo: ../include/net-snmp/library/ucd_compat.h ./container_list_ssll.lo: ../include/net-snmp/library/mib.h ./container_list_ssll.lo: ../include/net-snmp/mib_api.h @@ -488,7 +562,7 @@ ./container_list_ssll.lo: ../include/net-snmp/library/data_list.h ./container_list_ssll.lo: ../include/net-snmp/library/check_varbind.h ./container_list_ssll.lo: ../include/net-snmp/library/container.h -./container_list_ssll.lo: ../include/net-snmp/library/factory.h +./container_list_ssll.lo: factory.h ./container_list_ssll.lo: ../include/net-snmp/library/container_binary_array.h ./container_list_ssll.lo: ../include/net-snmp/library/container_list_ssll.h ./container_list_ssll.lo: ../include/net-snmp/library/container_iterator.h @@ -509,8 +583,8 @@ ./container_list_ssll.lo: ../include/net-snmp/library/lcd_time.h ./container_list_ssll.lo: ../include/net-snmp/library/snmp_secmod.h ./container_list_ssll.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./container_list_ssll.lo: ../include/net-snmp/library/snmptsm.h ./container_list_ssll.lo: ../include/net-snmp/library/snmpusm.h +./container_list_ssll.lo: ../include/net-snmp/library/snmptsm.h ./container_null.lo: ../include/net-snmp/net-snmp-config.h ./container_null.lo: ../include/net-snmp/net-snmp-features.h ./container_null.lo: ../include/net-snmp/net-snmp-includes.h @@ -524,6 +598,7 @@ ./container_null.lo: ../include/net-snmp/pdu_api.h ./container_null.lo: ../include/net-snmp/library/asn1.h ./container_null.lo: ../include/net-snmp/output_api.h +./container_null.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./container_null.lo: ../include/net-snmp/library/snmp_debug.h ./container_null.lo: ../include/net-snmp/library/snmp_logging.h ./container_null.lo: ../include/net-snmp/session_api.h @@ -541,6 +616,7 @@ ./container_null.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./container_null.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./container_null.lo: ../include/net-snmp/library/snmpIPXDomain.h +./container_null.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./container_null.lo: ../include/net-snmp/library/ucd_compat.h ./container_null.lo: ../include/net-snmp/library/mib.h ./container_null.lo: ../include/net-snmp/mib_api.h @@ -559,7 +635,7 @@ ./container_null.lo: ../include/net-snmp/library/data_list.h ./container_null.lo: ../include/net-snmp/library/check_varbind.h ./container_null.lo: ../include/net-snmp/library/container.h -./container_null.lo: ../include/net-snmp/library/factory.h +./container_null.lo: factory.h ./container_null.lo: ../include/net-snmp/library/container_binary_array.h ./container_null.lo: ../include/net-snmp/library/container_list_ssll.h ./container_null.lo: ../include/net-snmp/library/container_iterator.h @@ -580,8 +656,8 @@ ./container_null.lo: ../include/net-snmp/library/lcd_time.h ./container_null.lo: ../include/net-snmp/library/snmp_secmod.h ./container_null.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./container_null.lo: ../include/net-snmp/library/snmptsm.h ./container_null.lo: ../include/net-snmp/library/snmpusm.h +./container_null.lo: ../include/net-snmp/library/snmptsm.h ./container_null.lo: ../include/net-snmp/library/container_null.h ./data_list.lo: ../include/net-snmp/net-snmp-config.h ./data_list.lo: ../include/net-snmp/net-snmp-features.h @@ -595,6 +671,7 @@ ./data_list.lo: ../include/net-snmp/pdu_api.h ./data_list.lo: ../include/net-snmp/library/asn1.h ./data_list.lo: ../include/net-snmp/output_api.h +./data_list.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./data_list.lo: ../include/net-snmp/library/snmp_debug.h ./data_list.lo: ../include/net-snmp/library/snmp_logging.h ./data_list.lo: ../include/net-snmp/session_api.h @@ -612,6 +689,7 @@ ./data_list.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./data_list.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./data_list.lo: ../include/net-snmp/library/snmpIPXDomain.h +./data_list.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./data_list.lo: ../include/net-snmp/library/ucd_compat.h ./data_list.lo: ../include/net-snmp/library/mib.h ./data_list.lo: ../include/net-snmp/mib_api.h @@ -630,7 +708,7 @@ ./data_list.lo: ../include/net-snmp/library/data_list.h ./data_list.lo: ../include/net-snmp/library/check_varbind.h ./data_list.lo: ../include/net-snmp/library/container.h -./data_list.lo: ../include/net-snmp/library/factory.h +./data_list.lo: factory.h ./data_list.lo: ../include/net-snmp/library/container_binary_array.h ./data_list.lo: ../include/net-snmp/library/container_list_ssll.h ./data_list.lo: ../include/net-snmp/library/container_iterator.h @@ -651,8 +729,8 @@ ./data_list.lo: ../include/net-snmp/library/lcd_time.h ./data_list.lo: ../include/net-snmp/library/snmp_secmod.h ./data_list.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./data_list.lo: ../include/net-snmp/library/snmptsm.h ./data_list.lo: ../include/net-snmp/library/snmpusm.h +./data_list.lo: ../include/net-snmp/library/snmptsm.h ./default_store.lo: ../include/net-snmp/net-snmp-config.h ./default_store.lo: ../include/net-snmp/net-snmp-features.h ./default_store.lo: ../include/net-snmp/types.h @@ -665,6 +743,7 @@ ./default_store.lo: ../include/net-snmp/pdu_api.h ./default_store.lo: ../include/net-snmp/library/asn1.h ./default_store.lo: ../include/net-snmp/output_api.h +./default_store.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./default_store.lo: ../include/net-snmp/library/snmp_debug.h ./default_store.lo: ../include/net-snmp/library/snmp_logging.h ./default_store.lo: ../include/net-snmp/session_api.h @@ -682,6 +761,7 @@ ./default_store.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./default_store.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./default_store.lo: ../include/net-snmp/library/snmpIPXDomain.h +./default_store.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./default_store.lo: ../include/net-snmp/library/ucd_compat.h ./default_store.lo: ../include/net-snmp/library/mib.h ./default_store.lo: ../include/net-snmp/mib_api.h @@ -705,7 +785,7 @@ ./default_store.lo: ../include/net-snmp/library/data_list.h ./default_store.lo: ../include/net-snmp/library/check_varbind.h ./default_store.lo: ../include/net-snmp/library/container.h -./default_store.lo: ../include/net-snmp/library/factory.h +./default_store.lo: factory.h ./default_store.lo: ../include/net-snmp/library/container_binary_array.h ./default_store.lo: ../include/net-snmp/library/container_list_ssll.h ./default_store.lo: ../include/net-snmp/library/container_iterator.h @@ -724,6 +804,7 @@ ./dir_utils.lo: ../include/net-snmp/pdu_api.h ./dir_utils.lo: ../include/net-snmp/library/asn1.h ./dir_utils.lo: ../include/net-snmp/output_api.h +./dir_utils.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./dir_utils.lo: ../include/net-snmp/library/snmp_debug.h ./dir_utils.lo: ../include/net-snmp/library/snmp_logging.h ./dir_utils.lo: ../include/net-snmp/session_api.h @@ -741,6 +822,7 @@ ./dir_utils.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./dir_utils.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./dir_utils.lo: ../include/net-snmp/library/snmpIPXDomain.h +./dir_utils.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./dir_utils.lo: ../include/net-snmp/library/ucd_compat.h ./dir_utils.lo: ../include/net-snmp/library/mib.h ./dir_utils.lo: ../include/net-snmp/mib_api.h @@ -759,7 +841,7 @@ ./dir_utils.lo: ../include/net-snmp/library/data_list.h ./dir_utils.lo: ../include/net-snmp/library/check_varbind.h ./dir_utils.lo: ../include/net-snmp/library/container.h -./dir_utils.lo: ../include/net-snmp/library/factory.h +./dir_utils.lo: factory.h ./dir_utils.lo: ../include/net-snmp/library/container_binary_array.h ./dir_utils.lo: ../include/net-snmp/library/container_list_ssll.h ./dir_utils.lo: ../include/net-snmp/library/container_iterator.h @@ -780,8 +862,8 @@ ./dir_utils.lo: ../include/net-snmp/library/lcd_time.h ./dir_utils.lo: ../include/net-snmp/library/snmp_secmod.h ./dir_utils.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./dir_utils.lo: ../include/net-snmp/library/snmptsm.h ./dir_utils.lo: ../include/net-snmp/library/snmpusm.h +./dir_utils.lo: ../include/net-snmp/library/snmptsm.h ./dir_utils.lo: ../include/net-snmp/library/file_utils.h ./dir_utils.lo: ../include/net-snmp/library/dir_utils.h ./fd_event_manager.lo: ../include/net-snmp/net-snmp-config.h @@ -796,6 +878,7 @@ ./fd_event_manager.lo: ../include/net-snmp/pdu_api.h ./fd_event_manager.lo: ../include/net-snmp/library/asn1.h ./fd_event_manager.lo: ../include/net-snmp/output_api.h +./fd_event_manager.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./fd_event_manager.lo: ../include/net-snmp/library/snmp_debug.h ./fd_event_manager.lo: ../include/net-snmp/library/snmp_logging.h ./fd_event_manager.lo: ../include/net-snmp/session_api.h @@ -813,6 +896,7 @@ ./fd_event_manager.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./fd_event_manager.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./fd_event_manager.lo: ../include/net-snmp/library/snmpIPXDomain.h +./fd_event_manager.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./fd_event_manager.lo: ../include/net-snmp/library/ucd_compat.h ./fd_event_manager.lo: ../include/net-snmp/library/mib.h ./fd_event_manager.lo: ../include/net-snmp/mib_api.h @@ -832,7 +916,7 @@ ./fd_event_manager.lo: ../include/net-snmp/library/data_list.h ./fd_event_manager.lo: ../include/net-snmp/library/check_varbind.h ./fd_event_manager.lo: ../include/net-snmp/library/container.h -./fd_event_manager.lo: ../include/net-snmp/library/factory.h +./fd_event_manager.lo: factory.h ./fd_event_manager.lo: ../include/net-snmp/library/container_binary_array.h ./fd_event_manager.lo: ../include/net-snmp/library/container_list_ssll.h ./fd_event_manager.lo: ../include/net-snmp/library/container_iterator.h @@ -853,8 +937,8 @@ ./fd_event_manager.lo: ../include/net-snmp/library/lcd_time.h ./fd_event_manager.lo: ../include/net-snmp/library/snmp_secmod.h ./fd_event_manager.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./fd_event_manager.lo: ../include/net-snmp/library/snmptsm.h ./fd_event_manager.lo: ../include/net-snmp/library/snmpusm.h +./fd_event_manager.lo: ../include/net-snmp/library/snmptsm.h ./fd_event_manager.lo: ../include/net-snmp/library/fd_event_manager.h ./fd_event_manager.lo: ../include/net-snmp/library/large_fd_set.h ./file_utils.lo: ../include/net-snmp/net-snmp-config.h @@ -870,6 +954,7 @@ ./file_utils.lo: ../include/net-snmp/pdu_api.h ./file_utils.lo: ../include/net-snmp/library/asn1.h ./file_utils.lo: ../include/net-snmp/output_api.h +./file_utils.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./file_utils.lo: ../include/net-snmp/library/snmp_debug.h ./file_utils.lo: ../include/net-snmp/library/snmp_logging.h ./file_utils.lo: ../include/net-snmp/session_api.h @@ -887,6 +972,7 @@ ./file_utils.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./file_utils.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./file_utils.lo: ../include/net-snmp/library/snmpIPXDomain.h +./file_utils.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./file_utils.lo: ../include/net-snmp/library/ucd_compat.h ./file_utils.lo: ../include/net-snmp/library/mib.h ./file_utils.lo: ../include/net-snmp/mib_api.h @@ -905,7 +991,7 @@ ./file_utils.lo: ../include/net-snmp/library/data_list.h ./file_utils.lo: ../include/net-snmp/library/check_varbind.h ./file_utils.lo: ../include/net-snmp/library/container.h -./file_utils.lo: ../include/net-snmp/library/factory.h +./file_utils.lo: factory.h ./file_utils.lo: ../include/net-snmp/library/container_binary_array.h ./file_utils.lo: ../include/net-snmp/library/container_list_ssll.h ./file_utils.lo: ../include/net-snmp/library/container_iterator.h @@ -926,8 +1012,8 @@ ./file_utils.lo: ../include/net-snmp/library/lcd_time.h ./file_utils.lo: ../include/net-snmp/library/snmp_secmod.h ./file_utils.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./file_utils.lo: ../include/net-snmp/library/snmptsm.h ./file_utils.lo: ../include/net-snmp/library/snmpusm.h +./file_utils.lo: ../include/net-snmp/library/snmptsm.h ./file_utils.lo: ../include/net-snmp/library/file_utils.h ./getopt.lo: ../include/net-snmp/net-snmp-config.h ./getopt.lo: ../include/net-snmp/library/getopt.h @@ -942,6 +1028,7 @@ ./gettimeofday.lo: ../include/net-snmp/pdu_api.h ./gettimeofday.lo: ../include/net-snmp/library/asn1.h ./gettimeofday.lo: ../include/net-snmp/output_api.h +./gettimeofday.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./gettimeofday.lo: ../include/net-snmp/library/snmp_debug.h ./gettimeofday.lo: ../include/net-snmp/library/snmp_logging.h ./gettimeofday.lo: ../include/net-snmp/session_api.h @@ -959,6 +1046,7 @@ ./gettimeofday.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./gettimeofday.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./gettimeofday.lo: ../include/net-snmp/library/snmpIPXDomain.h +./gettimeofday.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./gettimeofday.lo: ../include/net-snmp/library/ucd_compat.h ./gettimeofday.lo: ../include/net-snmp/library/mib.h ./gettimeofday.lo: ../include/net-snmp/mib_api.h @@ -980,6 +1068,7 @@ ./inet_ntop.lo: ../include/net-snmp/pdu_api.h ./inet_ntop.lo: ../include/net-snmp/library/asn1.h ./inet_ntop.lo: ../include/net-snmp/output_api.h +./inet_ntop.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./inet_ntop.lo: ../include/net-snmp/library/snmp_debug.h ./inet_ntop.lo: ../include/net-snmp/library/snmp_logging.h ./inet_ntop.lo: ../include/net-snmp/session_api.h @@ -997,6 +1086,7 @@ ./inet_ntop.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./inet_ntop.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./inet_ntop.lo: ../include/net-snmp/library/snmpIPXDomain.h +./inet_ntop.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./inet_ntop.lo: ../include/net-snmp/library/ucd_compat.h ./inet_ntop.lo: ../include/net-snmp/library/mib.h ./inet_ntop.lo: ../include/net-snmp/mib_api.h @@ -1017,6 +1107,7 @@ ./inet_pton.lo: ../include/net-snmp/pdu_api.h ./inet_pton.lo: ../include/net-snmp/library/asn1.h ./inet_pton.lo: ../include/net-snmp/output_api.h +./inet_pton.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./inet_pton.lo: ../include/net-snmp/library/snmp_debug.h ./inet_pton.lo: ../include/net-snmp/library/snmp_logging.h ./inet_pton.lo: ../include/net-snmp/session_api.h @@ -1034,6 +1125,7 @@ ./inet_pton.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./inet_pton.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./inet_pton.lo: ../include/net-snmp/library/snmpIPXDomain.h +./inet_pton.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./inet_pton.lo: ../include/net-snmp/library/ucd_compat.h ./inet_pton.lo: ../include/net-snmp/library/mib.h ./inet_pton.lo: ../include/net-snmp/mib_api.h @@ -1053,6 +1145,7 @@ ./int64.lo: ../include/net-snmp/library/snmp_client.h ./int64.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./int64.lo: ../include/net-snmp/output_api.h +./int64.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./int64.lo: ../include/net-snmp/library/snmp_debug.h ./int64.lo: ../include/net-snmp/library/snmp_logging.h ./int64.lo: ../include/net-snmp/session_api.h @@ -1070,6 +1163,7 @@ ./int64.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./int64.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./int64.lo: ../include/net-snmp/library/snmpIPXDomain.h +./int64.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./int64.lo: ../include/net-snmp/library/ucd_compat.h ./int64.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./int64.lo: ../include/net-snmp/library/parse.h @@ -1092,6 +1186,7 @@ ./keytools.lo: ../include/net-snmp/pdu_api.h ./keytools.lo: ../include/net-snmp/library/asn1.h ./keytools.lo: ../include/net-snmp/output_api.h +./keytools.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./keytools.lo: ../include/net-snmp/library/snmp_debug.h ./keytools.lo: ../include/net-snmp/library/snmp_logging.h ./keytools.lo: ../include/net-snmp/session_api.h @@ -1109,6 +1204,7 @@ ./keytools.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./keytools.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./keytools.lo: ../include/net-snmp/library/snmpIPXDomain.h +./keytools.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./keytools.lo: ../include/net-snmp/library/ucd_compat.h ./keytools.lo: ../include/net-snmp/library/mib.h ./keytools.lo: ../include/net-snmp/mib_api.h @@ -1126,7 +1222,7 @@ ./keytools.lo: ../include/net-snmp/library/data_list.h ./keytools.lo: ../include/net-snmp/library/check_varbind.h ./keytools.lo: ../include/net-snmp/library/container.h -./keytools.lo: ../include/net-snmp/library/factory.h +./keytools.lo: factory.h ./keytools.lo: ../include/net-snmp/library/container_binary_array.h ./keytools.lo: ../include/net-snmp/library/container_list_ssll.h ./keytools.lo: ../include/net-snmp/library/container_iterator.h @@ -1136,6 +1232,8 @@ ./keytools.lo: ../include/net-snmp/library/scapi.h ./keytools.lo: ../include/net-snmp/library/keytools.h ./keytools.lo: ../include/net-snmp/library/transform_oids.h +./keytools.lo: ../include/net-snmp/library/snmp_secmod.h +./keytools.lo: ../include/net-snmp/library/snmpusm.h ./large_fd_set.lo: ../include/net-snmp/net-snmp-config.h ./large_fd_set.lo: ../include/net-snmp/net-snmp-includes.h ./large_fd_set.lo: ../include/net-snmp/definitions.h @@ -1148,6 +1246,7 @@ ./large_fd_set.lo: ../include/net-snmp/pdu_api.h ./large_fd_set.lo: ../include/net-snmp/library/asn1.h ./large_fd_set.lo: ../include/net-snmp/output_api.h +./large_fd_set.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./large_fd_set.lo: ../include/net-snmp/library/snmp_debug.h ./large_fd_set.lo: ../include/net-snmp/library/snmp_logging.h ./large_fd_set.lo: ../include/net-snmp/session_api.h @@ -1165,6 +1264,7 @@ ./large_fd_set.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./large_fd_set.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./large_fd_set.lo: ../include/net-snmp/library/snmpIPXDomain.h +./large_fd_set.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./large_fd_set.lo: ../include/net-snmp/library/ucd_compat.h ./large_fd_set.lo: ../include/net-snmp/library/mib.h ./large_fd_set.lo: ../include/net-snmp/mib_api.h @@ -1184,7 +1284,7 @@ ./large_fd_set.lo: ../include/net-snmp/library/data_list.h ./large_fd_set.lo: ../include/net-snmp/library/check_varbind.h ./large_fd_set.lo: ../include/net-snmp/library/container.h -./large_fd_set.lo: ../include/net-snmp/library/factory.h +./large_fd_set.lo: factory.h ./large_fd_set.lo: ../include/net-snmp/library/container_binary_array.h ./large_fd_set.lo: ../include/net-snmp/library/container_list_ssll.h ./large_fd_set.lo: ../include/net-snmp/library/container_iterator.h @@ -1205,13 +1305,12 @@ ./large_fd_set.lo: ../include/net-snmp/library/lcd_time.h ./large_fd_set.lo: ../include/net-snmp/library/snmp_secmod.h ./large_fd_set.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./large_fd_set.lo: ../include/net-snmp/library/snmptsm.h ./large_fd_set.lo: ../include/net-snmp/library/snmpusm.h +./large_fd_set.lo: ../include/net-snmp/library/snmptsm.h ./large_fd_set.lo: ../include/net-snmp/library/large_fd_set.h ./lcd_time.lo: ../include/net-snmp/net-snmp-config.h ./lcd_time.lo: ../include/net-snmp/net-snmp-features.h -./lcd_time.lo: ../include/net-snmp/types.h -./lcd_time.lo: ../include/net-snmp/library/oid.h +./lcd_time.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./lcd_time.lo: ../include/net-snmp/library/types.h ./lcd_time.lo: ../include/net-snmp/definitions.h ./lcd_time.lo: ../include/net-snmp/library/snmp_api.h @@ -1220,6 +1319,7 @@ ./lcd_time.lo: ../include/net-snmp/pdu_api.h ./lcd_time.lo: ../include/net-snmp/library/asn1.h ./lcd_time.lo: ../include/net-snmp/output_api.h +./lcd_time.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./lcd_time.lo: ../include/net-snmp/library/snmp_debug.h ./lcd_time.lo: ../include/net-snmp/library/snmp_logging.h ./lcd_time.lo: ../include/net-snmp/session_api.h @@ -1237,6 +1337,7 @@ ./lcd_time.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./lcd_time.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./lcd_time.lo: ../include/net-snmp/library/snmpIPXDomain.h +./lcd_time.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./lcd_time.lo: ../include/net-snmp/library/ucd_compat.h ./lcd_time.lo: ../include/net-snmp/library/mib.h ./lcd_time.lo: ../include/net-snmp/mib_api.h @@ -1254,7 +1355,7 @@ ./lcd_time.lo: ../include/net-snmp/library/data_list.h ./lcd_time.lo: ../include/net-snmp/library/check_varbind.h ./lcd_time.lo: ../include/net-snmp/library/container.h -./lcd_time.lo: ../include/net-snmp/library/factory.h +./lcd_time.lo: factory.h ./lcd_time.lo: ../include/net-snmp/library/container_binary_array.h ./lcd_time.lo: ../include/net-snmp/library/container_list_ssll.h ./lcd_time.lo: ../include/net-snmp/library/container_iterator.h @@ -1277,6 +1378,7 @@ ./md5.lo: ../include/net-snmp/library/snmp_client.h ./md5.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./md5.lo: ../include/net-snmp/output_api.h +./md5.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./md5.lo: ../include/net-snmp/library/snmp_debug.h ./md5.lo: ../include/net-snmp/library/snmp_logging.h ./md5.lo: ../include/net-snmp/session_api.h @@ -1294,6 +1396,7 @@ ./md5.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./md5.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./md5.lo: ../include/net-snmp/library/snmpIPXDomain.h +./md5.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./md5.lo: ../include/net-snmp/library/ucd_compat.h ./md5.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./md5.lo: ../include/net-snmp/library/parse.h @@ -1312,7 +1415,7 @@ ./md5.lo: ../include/net-snmp/library/data_list.h ./md5.lo: ../include/net-snmp/library/check_varbind.h ./md5.lo: ../include/net-snmp/library/container.h -./md5.lo: ../include/net-snmp/library/factory.h +./md5.lo: factory.h ./md5.lo: ../include/net-snmp/library/container_binary_array.h ./md5.lo: ../include/net-snmp/library/container_list_ssll.h ./md5.lo: ../include/net-snmp/library/container_iterator.h @@ -1331,13 +1434,12 @@ ./md5.lo: ../include/net-snmp/library/lcd_time.h ./md5.lo: ../include/net-snmp/library/snmp_secmod.h ./md5.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./md5.lo: ../include/net-snmp/library/snmptsm.h ./md5.lo: ../include/net-snmp/library/snmpusm.h +./md5.lo: ../include/net-snmp/library/snmptsm.h ./md5.lo: ../include/net-snmp/library/md5.h ./mib.lo: ../include/net-snmp/net-snmp-config.h ./mib.lo: ../include/net-snmp/net-snmp-features.h -./mib.lo: ../include/net-snmp/types.h -./mib.lo: ../include/net-snmp/library/oid.h +./mib.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./mib.lo: ../include/net-snmp/library/types.h ./mib.lo: ../include/net-snmp/definitions.h ./mib.lo: ../include/net-snmp/library/snmp_api.h @@ -1345,6 +1447,7 @@ ./mib.lo: ../include/net-snmp/library/snmp_client.h ./mib.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./mib.lo: ../include/net-snmp/output_api.h +./mib.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./mib.lo: ../include/net-snmp/library/snmp_debug.h ./mib.lo: ../include/net-snmp/library/snmp_logging.h ./mib.lo: ../include/net-snmp/session_api.h @@ -1362,6 +1465,7 @@ ./mib.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./mib.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./mib.lo: ../include/net-snmp/library/snmpIPXDomain.h +./mib.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./mib.lo: ../include/net-snmp/library/ucd_compat.h ./mib.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./mib.lo: ../include/net-snmp/library/parse.h @@ -1383,7 +1487,7 @@ ./mib.lo: ../include/net-snmp/library/data_list.h ./mib.lo: ../include/net-snmp/library/check_varbind.h ./mib.lo: ../include/net-snmp/library/container.h -./mib.lo: ../include/net-snmp/library/factory.h +./mib.lo: factory.h ./mib.lo: ../include/net-snmp/library/container_binary_array.h ./mib.lo: ../include/net-snmp/library/container_list_ssll.h ./mib.lo: ../include/net-snmp/library/container_iterator.h @@ -1404,6 +1508,7 @@ ./oid_stash.lo: ../include/net-snmp/pdu_api.h ./oid_stash.lo: ../include/net-snmp/library/asn1.h ./oid_stash.lo: ../include/net-snmp/output_api.h +./oid_stash.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./oid_stash.lo: ../include/net-snmp/library/snmp_debug.h ./oid_stash.lo: ../include/net-snmp/library/snmp_logging.h ./oid_stash.lo: ../include/net-snmp/session_api.h @@ -1421,6 +1526,7 @@ ./oid_stash.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./oid_stash.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./oid_stash.lo: ../include/net-snmp/library/snmpIPXDomain.h +./oid_stash.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./oid_stash.lo: ../include/net-snmp/library/ucd_compat.h ./oid_stash.lo: ../include/net-snmp/library/mib.h ./oid_stash.lo: ../include/net-snmp/mib_api.h @@ -1439,7 +1545,7 @@ ./oid_stash.lo: ../include/net-snmp/library/data_list.h ./oid_stash.lo: ../include/net-snmp/library/check_varbind.h ./oid_stash.lo: ../include/net-snmp/library/container.h -./oid_stash.lo: ../include/net-snmp/library/factory.h +./oid_stash.lo: factory.h ./oid_stash.lo: ../include/net-snmp/library/container_binary_array.h ./oid_stash.lo: ../include/net-snmp/library/container_list_ssll.h ./oid_stash.lo: ../include/net-snmp/library/container_iterator.h @@ -1460,8 +1566,8 @@ ./oid_stash.lo: ../include/net-snmp/library/lcd_time.h ./oid_stash.lo: ../include/net-snmp/library/snmp_secmod.h ./oid_stash.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./oid_stash.lo: ../include/net-snmp/library/snmptsm.h ./oid_stash.lo: ../include/net-snmp/library/snmpusm.h +./oid_stash.lo: ../include/net-snmp/library/snmptsm.h ./opendir.lo: ../include/net-snmp/net-snmp-config.h ./opendir.lo: ../include/net-snmp/types.h ./opendir.lo: ../include/net-snmp/library/oid.h @@ -1473,6 +1579,7 @@ ./opendir.lo: ../include/net-snmp/pdu_api.h ./opendir.lo: ../include/net-snmp/library/asn1.h ./opendir.lo: ../include/net-snmp/output_api.h +./opendir.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./opendir.lo: ../include/net-snmp/library/snmp_debug.h ./opendir.lo: ../include/net-snmp/library/snmp_logging.h ./opendir.lo: ../include/net-snmp/session_api.h @@ -1490,6 +1597,7 @@ ./opendir.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./opendir.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./opendir.lo: ../include/net-snmp/library/snmpIPXDomain.h +./opendir.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./opendir.lo: ../include/net-snmp/library/ucd_compat.h ./opendir.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./opendir.lo: ../include/net-snmp/library/parse.h @@ -1510,6 +1618,7 @@ ./parse.lo: ../include/net-snmp/library/snmp_client.h ./parse.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./parse.lo: ../include/net-snmp/output_api.h +./parse.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./parse.lo: ../include/net-snmp/library/snmp_debug.h ./parse.lo: ../include/net-snmp/library/snmp_logging.h ./parse.lo: ../include/net-snmp/session_api.h @@ -1527,6 +1636,7 @@ ./parse.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./parse.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./parse.lo: ../include/net-snmp/library/snmpIPXDomain.h +./parse.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./parse.lo: ../include/net-snmp/library/ucd_compat.h ./parse.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./parse.lo: ../include/net-snmp/library/parse.h @@ -1549,7 +1659,7 @@ ./parse.lo: ../include/net-snmp/library/data_list.h ./parse.lo: ../include/net-snmp/library/check_varbind.h ./parse.lo: ../include/net-snmp/library/container.h -./parse.lo: ../include/net-snmp/library/factory.h +./parse.lo: factory.h ./parse.lo: ../include/net-snmp/library/container_binary_array.h ./parse.lo: ../include/net-snmp/library/container_list_ssll.h ./parse.lo: ../include/net-snmp/library/container_iterator.h @@ -1569,6 +1679,7 @@ ./read_config.lo: ../include/net-snmp/pdu_api.h ./read_config.lo: ../include/net-snmp/library/asn1.h ./read_config.lo: ../include/net-snmp/output_api.h +./read_config.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./read_config.lo: ../include/net-snmp/library/snmp_debug.h ./read_config.lo: ../include/net-snmp/library/snmp_logging.h ./read_config.lo: ../include/net-snmp/session_api.h @@ -1586,6 +1697,7 @@ ./read_config.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./read_config.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./read_config.lo: ../include/net-snmp/library/snmpIPXDomain.h +./read_config.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./read_config.lo: ../include/net-snmp/library/ucd_compat.h ./read_config.lo: ../include/net-snmp/library/mib.h ./read_config.lo: ../include/net-snmp/mib_api.h @@ -1609,7 +1721,7 @@ ./read_config.lo: ../include/net-snmp/library/data_list.h ./read_config.lo: ../include/net-snmp/library/check_varbind.h ./read_config.lo: ../include/net-snmp/library/container.h -./read_config.lo: ../include/net-snmp/library/factory.h +./read_config.lo: factory.h ./read_config.lo: ../include/net-snmp/library/container_binary_array.h ./read_config.lo: ../include/net-snmp/library/container_list_ssll.h ./read_config.lo: ../include/net-snmp/library/container_iterator.h @@ -1627,6 +1739,7 @@ ./readdir.lo: ../include/net-snmp/pdu_api.h ./readdir.lo: ../include/net-snmp/library/asn1.h ./readdir.lo: ../include/net-snmp/output_api.h +./readdir.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./readdir.lo: ../include/net-snmp/library/snmp_debug.h ./readdir.lo: ../include/net-snmp/library/snmp_logging.h ./readdir.lo: ../include/net-snmp/session_api.h @@ -1644,6 +1757,7 @@ ./readdir.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./readdir.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./readdir.lo: ../include/net-snmp/library/snmpIPXDomain.h +./readdir.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./readdir.lo: ../include/net-snmp/library/ucd_compat.h ./readdir.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./readdir.lo: ../include/net-snmp/library/parse.h @@ -1655,6 +1769,7 @@ ./readdir.lo: ../include/net-snmp/library/system.h ./scapi.lo: ../include/net-snmp/net-snmp-config.h ./scapi.lo: ../include/net-snmp/net-snmp-features.h +./scapi.lo: memcheck.h ./scapi.lo: ../include/net-snmp/types.h ./scapi.lo: ../include/net-snmp/library/oid.h ./scapi.lo: ../include/net-snmp/library/types.h @@ -1664,6 +1779,7 @@ ./scapi.lo: ../include/net-snmp/library/snmp_client.h ./scapi.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./scapi.lo: ../include/net-snmp/output_api.h +./scapi.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./scapi.lo: ../include/net-snmp/library/snmp_debug.h ./scapi.lo: ../include/net-snmp/library/snmp_logging.h ./scapi.lo: ../include/net-snmp/session_api.h @@ -1681,6 +1797,7 @@ ./scapi.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./scapi.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./scapi.lo: ../include/net-snmp/library/snmpIPXDomain.h +./scapi.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./scapi.lo: ../include/net-snmp/library/ucd_compat.h ./scapi.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./scapi.lo: ../include/net-snmp/library/parse.h @@ -1697,7 +1814,7 @@ ./scapi.lo: ../include/net-snmp/library/data_list.h ./scapi.lo: ../include/net-snmp/library/check_varbind.h ./scapi.lo: ../include/net-snmp/library/container.h -./scapi.lo: ../include/net-snmp/library/factory.h +./scapi.lo: factory.h ./scapi.lo: ../include/net-snmp/library/container_binary_array.h ./scapi.lo: ../include/net-snmp/library/container_list_ssll.h ./scapi.lo: ../include/net-snmp/library/container_iterator.h @@ -1709,6 +1826,122 @@ ./scapi.lo: ../include/net-snmp/library/keytools.h ./scapi.lo: ../include/net-snmp/library/scapi.h ./scapi.lo: ../include/net-snmp/library/transform_oids.h +./sd-daemon.lo: ../include/net-snmp/net-snmp-config.h +./sd-daemon.lo: ../include/net-snmp/net-snmp-features.h +./sd-daemon.lo: ../include/net-snmp/types.h +./sd-daemon.lo: ../include/net-snmp/library/oid.h +./sd-daemon.lo: ../include/net-snmp/library/types.h +./sd-daemon.lo: ../include/net-snmp/definitions.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_api.h +./sd-daemon.lo: ../include/net-snmp/varbind_api.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_client.h +./sd-daemon.lo: ../include/net-snmp/pdu_api.h +./sd-daemon.lo: ../include/net-snmp/library/asn1.h +./sd-daemon.lo: ../include/net-snmp/output_api.h +./sd-daemon.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_debug.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_logging.h +./sd-daemon.lo: ../include/net-snmp/session_api.h +./sd-daemon.lo: ../include/net-snmp/library/callback.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_transport.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_service.h +./sd-daemon.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpUnixDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpUDPDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpTCPDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpIPXDomain.h +./sd-daemon.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./sd-daemon.lo: ../include/net-snmp/library/ucd_compat.h +./sd-daemon.lo: ../include/net-snmp/library/mib.h +./sd-daemon.lo: ../include/net-snmp/mib_api.h +./sd-daemon.lo: ../include/net-snmp/library/parse.h +./sd-daemon.lo: ../include/net-snmp/library/oid_stash.h +./sd-daemon.lo: ../include/net-snmp/library/snmp_impl.h +./sd-daemon.lo: ../include/net-snmp/library/snmp.h +./sd-daemon.lo: ../include/net-snmp/library/snmp-tc.h +./sd-daemon.lo: ../include/net-snmp/library/tools.h +./sd-daemon.lo: ../include/net-snmp/library/sd-daemon.h +./snmp-tc.lo: ../include/net-snmp/net-snmp-config.h +./snmp-tc.lo: ../include/net-snmp/net-snmp-features.h +./snmp-tc.lo: ../include/net-snmp/types.h +./snmp-tc.lo: ../include/net-snmp/library/oid.h +./snmp-tc.lo: ../include/net-snmp/library/types.h +./snmp-tc.lo: ../include/net-snmp/definitions.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_api.h +./snmp-tc.lo: ../include/net-snmp/varbind_api.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_client.h +./snmp-tc.lo: ../include/net-snmp/pdu_api.h +./snmp-tc.lo: ../include/net-snmp/library/asn1.h +./snmp-tc.lo: ../include/net-snmp/output_api.h +./snmp-tc.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_debug.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_logging.h +./snmp-tc.lo: ../include/net-snmp/session_api.h +./snmp-tc.lo: ../include/net-snmp/library/callback.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_transport.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_service.h +./snmp-tc.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp-tc.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmp-tc.lo: ../include/net-snmp/library/ucd_compat.h +./snmp-tc.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h +./snmp-tc.lo: ../include/net-snmp/library/parse.h +./snmp-tc.lo: ../include/net-snmp/library/oid_stash.h +./snmp-tc.lo: ../include/net-snmp/library/snmp_impl.h +./snmp-tc.lo: ../include/net-snmp/library/snmp.h +./snmp-tc.lo: ../include/net-snmp/library/snmp-tc.h +./snmp.lo: ../include/net-snmp/net-snmp-config.h +./snmp.lo: ../include/net-snmp/types.h +./snmp.lo: ../include/net-snmp/library/oid.h +./snmp.lo: ../include/net-snmp/library/types.h +./snmp.lo: ../include/net-snmp/definitions.h +./snmp.lo: ../include/net-snmp/library/snmp_api.h +./snmp.lo: ../include/net-snmp/varbind_api.h +./snmp.lo: ../include/net-snmp/library/snmp_client.h +./snmp.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h +./snmp.lo: ../include/net-snmp/output_api.h +./snmp.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmp.lo: ../include/net-snmp/library/snmp_debug.h +./snmp.lo: ../include/net-snmp/library/snmp_logging.h +./snmp.lo: ../include/net-snmp/session_api.h +./snmp.lo: ../include/net-snmp/library/callback.h +./snmp.lo: ../include/net-snmp/library/snmp_transport.h +./snmp.lo: ../include/net-snmp/library/snmp_service.h +./snmp.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmp.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmp.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmp.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmp.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmp.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmp.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmp.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmp.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmp.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmp.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmp.lo: ../include/net-snmp/library/ucd_compat.h +./snmp.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h +./snmp.lo: ../include/net-snmp/library/parse.h +./snmp.lo: ../include/net-snmp/library/oid_stash.h +./snmp.lo: ../include/net-snmp/net-snmp-features.h +./snmp.lo: ../include/net-snmp/library/snmp_impl.h +./snmp.lo: ../include/net-snmp/library/snmp.h +./snmp.lo: ../include/net-snmp/library/snmp-tc.h ./snmp_alarm.lo: ../include/net-snmp/net-snmp-config.h ./snmp_alarm.lo: ../include/net-snmp/types.h ./snmp_alarm.lo: ../include/net-snmp/library/oid.h @@ -1720,6 +1953,7 @@ ./snmp_alarm.lo: ../include/net-snmp/pdu_api.h ./snmp_alarm.lo: ../include/net-snmp/library/asn1.h ./snmp_alarm.lo: ../include/net-snmp/output_api.h +./snmp_alarm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_alarm.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_alarm.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_alarm.lo: ../include/net-snmp/session_api.h @@ -1737,6 +1971,7 @@ ./snmp_alarm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_alarm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_alarm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_alarm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_alarm.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_alarm.lo: ../include/net-snmp/library/mib.h ./snmp_alarm.lo: ../include/net-snmp/mib_api.h @@ -1761,7 +1996,7 @@ ./snmp_alarm.lo: ../include/net-snmp/library/data_list.h ./snmp_alarm.lo: ../include/net-snmp/library/check_varbind.h ./snmp_alarm.lo: ../include/net-snmp/library/container.h -./snmp_alarm.lo: ../include/net-snmp/library/factory.h +./snmp_alarm.lo: factory.h ./snmp_alarm.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_alarm.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_alarm.lo: ../include/net-snmp/library/container_iterator.h @@ -1780,6 +2015,7 @@ ./snmp_api.lo: ../include/net-snmp/pdu_api.h ./snmp_api.lo: ../include/net-snmp/library/asn1.h ./snmp_api.lo: ../include/net-snmp/output_api.h +./snmp_api.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_api.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_api.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_api.lo: ../include/net-snmp/session_api.h @@ -1797,6 +2033,7 @@ ./snmp_api.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_api.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_api.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_api.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_api.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_api.lo: ../include/net-snmp/library/mib.h ./snmp_api.lo: ../include/net-snmp/mib_api.h @@ -1820,7 +2057,7 @@ ./snmp_api.lo: ../include/net-snmp/library/data_list.h ./snmp_api.lo: ../include/net-snmp/library/check_varbind.h ./snmp_api.lo: ../include/net-snmp/library/container.h -./snmp_api.lo: ../include/net-snmp/library/factory.h +./snmp_api.lo: factory.h ./snmp_api.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_api.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_api.lo: ../include/net-snmp/library/container_iterator.h @@ -1835,8 +2072,7 @@ ./snmp_api.lo: ../agent/mibgroup/agentx/protocol.h ./snmp_api.lo: ../include/net-snmp/library/transform_oids.h ./snmp_auth.lo: ../include/net-snmp/net-snmp-config.h -./snmp_auth.lo: ../include/net-snmp/types.h -./snmp_auth.lo: ../include/net-snmp/library/oid.h +./snmp_auth.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./snmp_auth.lo: ../include/net-snmp/library/types.h ./snmp_auth.lo: ../include/net-snmp/definitions.h ./snmp_auth.lo: ../include/net-snmp/library/snmp_api.h @@ -1845,6 +2081,7 @@ ./snmp_auth.lo: ../include/net-snmp/pdu_api.h ./snmp_auth.lo: ../include/net-snmp/library/asn1.h ./snmp_auth.lo: ../include/net-snmp/output_api.h +./snmp_auth.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_auth.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_auth.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_auth.lo: ../include/net-snmp/session_api.h @@ -1862,6 +2099,7 @@ ./snmp_auth.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_auth.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_auth.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_auth.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_auth.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_auth.lo: ../include/net-snmp/library/mib.h ./snmp_auth.lo: ../include/net-snmp/mib_api.h @@ -1880,7 +2118,7 @@ ./snmp_auth.lo: ../include/net-snmp/library/data_list.h ./snmp_auth.lo: ../include/net-snmp/library/check_varbind.h ./snmp_auth.lo: ../include/net-snmp/library/container.h -./snmp_auth.lo: ../include/net-snmp/library/factory.h +./snmp_auth.lo: factory.h ./snmp_auth.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_auth.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_auth.lo: ../include/net-snmp/library/container_iterator.h @@ -1889,41 +2127,6 @@ ./snmp_auth.lo: ../include/net-snmp/version.h ./snmp_auth.lo: ../include/net-snmp/library/md5.h ./snmp_auth.lo: ../include/net-snmp/library/scapi.h -./snmp.lo: ../include/net-snmp/net-snmp-config.h -./snmp.lo: ../include/net-snmp/types.h -./snmp.lo: ../include/net-snmp/library/oid.h -./snmp.lo: ../include/net-snmp/library/types.h -./snmp.lo: ../include/net-snmp/definitions.h -./snmp.lo: ../include/net-snmp/library/snmp_api.h -./snmp.lo: ../include/net-snmp/varbind_api.h -./snmp.lo: ../include/net-snmp/library/snmp_client.h -./snmp.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h -./snmp.lo: ../include/net-snmp/output_api.h -./snmp.lo: ../include/net-snmp/library/snmp_debug.h -./snmp.lo: ../include/net-snmp/library/snmp_logging.h -./snmp.lo: ../include/net-snmp/session_api.h -./snmp.lo: ../include/net-snmp/library/callback.h -./snmp.lo: ../include/net-snmp/library/snmp_transport.h -./snmp.lo: ../include/net-snmp/library/snmp_service.h -./snmp.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./snmp.lo: ../include/net-snmp/library/snmpUnixDomain.h -./snmp.lo: ../include/net-snmp/library/snmpUDPDomain.h -./snmp.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmp.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmp.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./snmp.lo: ../include/net-snmp/library/snmpTCPDomain.h -./snmp.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmp.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmp.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmp.lo: ../include/net-snmp/library/snmpIPXDomain.h -./snmp.lo: ../include/net-snmp/library/ucd_compat.h -./snmp.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h -./snmp.lo: ../include/net-snmp/library/parse.h -./snmp.lo: ../include/net-snmp/library/oid_stash.h -./snmp.lo: ../include/net-snmp/net-snmp-features.h -./snmp.lo: ../include/net-snmp/library/snmp_impl.h -./snmp.lo: ../include/net-snmp/library/snmp.h -./snmp.lo: ../include/net-snmp/library/snmp-tc.h ./snmp_client.lo: ../include/net-snmp/net-snmp-config.h ./snmp_client.lo: ../include/net-snmp/net-snmp-features.h ./snmp_client.lo: ../include/net-snmp/types.h @@ -1936,6 +2139,7 @@ ./snmp_client.lo: ../include/net-snmp/pdu_api.h ./snmp_client.lo: ../include/net-snmp/library/asn1.h ./snmp_client.lo: ../include/net-snmp/output_api.h +./snmp_client.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_client.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_client.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_client.lo: ../include/net-snmp/session_api.h @@ -1953,6 +2157,7 @@ ./snmp_client.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_client.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_client.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_client.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_client.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_client.lo: ../include/net-snmp/library/mib.h ./snmp_client.lo: ../include/net-snmp/mib_api.h @@ -1966,6 +2171,7 @@ ./snmp_client.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_client.lo: ../include/net-snmp/library/snmpusm.h ./snmp_client.lo: ../include/net-snmp/library/snmp_assert.h +./snmp_client.lo: ../include/net-snmp/library/large_fd_set.h ./snmp_debug.lo: ../include/net-snmp/net-snmp-config.h ./snmp_debug.lo: ../include/net-snmp/types.h ./snmp_debug.lo: ../include/net-snmp/library/oid.h @@ -1977,6 +2183,7 @@ ./snmp_debug.lo: ../include/net-snmp/pdu_api.h ./snmp_debug.lo: ../include/net-snmp/library/asn1.h ./snmp_debug.lo: ../include/net-snmp/output_api.h +./snmp_debug.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_debug.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_debug.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_debug.lo: ../include/net-snmp/session_api.h @@ -1994,6 +2201,7 @@ ./snmp_debug.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_debug.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_debug.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_debug.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_debug.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_debug.lo: ../include/net-snmp/library/mib.h ./snmp_debug.lo: ../include/net-snmp/mib_api.h @@ -2018,7 +2226,7 @@ ./snmp_debug.lo: ../include/net-snmp/library/data_list.h ./snmp_debug.lo: ../include/net-snmp/library/check_varbind.h ./snmp_debug.lo: ../include/net-snmp/library/container.h -./snmp_debug.lo: ../include/net-snmp/library/factory.h +./snmp_debug.lo: factory.h ./snmp_debug.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_debug.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_debug.lo: ../include/net-snmp/library/container_iterator.h @@ -2037,6 +2245,7 @@ ./snmp_enum.lo: ../include/net-snmp/pdu_api.h ./snmp_enum.lo: ../include/net-snmp/library/asn1.h ./snmp_enum.lo: ../include/net-snmp/output_api.h +./snmp_enum.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_enum.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_enum.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_enum.lo: ../include/net-snmp/session_api.h @@ -2054,6 +2263,7 @@ ./snmp_enum.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_enum.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_enum.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_enum.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_enum.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_enum.lo: ../include/net-snmp/library/mib.h ./snmp_enum.lo: ../include/net-snmp/mib_api.h @@ -2069,71 +2279,8 @@ ./snmp_enum.lo: ../include/net-snmp/library/snmp_enum.h ./snmp_enum.lo: ../include/net-snmp/library/vacm.h ./snmp_enum.lo: ../include/net-snmp/library/tools.h +./snmp_enum.lo: ../include/net-snmp/library/system.h ./snmp_enum.lo: ../include/net-snmp/library/snmp_assert.h -./snmpksm.lo: ../include/net-snmp/net-snmp-config.h -./snmpksm.lo: ../include/net-snmp/output_api.h -./snmpksm.lo: ../include/net-snmp/types.h -./snmpksm.lo: ../include/net-snmp/library/oid.h -./snmpksm.lo: ../include/net-snmp/library/types.h -./snmpksm.lo: ../include/net-snmp/definitions.h -./snmpksm.lo: ../include/net-snmp/library/snmp_api.h -./snmpksm.lo: ../include/net-snmp/varbind_api.h -./snmpksm.lo: ../include/net-snmp/library/snmp_client.h -./snmpksm.lo: ../include/net-snmp/pdu_api.h -./snmpksm.lo: ../include/net-snmp/library/asn1.h -./snmpksm.lo: ../include/net-snmp/session_api.h -./snmpksm.lo: ../include/net-snmp/library/callback.h -./snmpksm.lo: ../include/net-snmp/library/snmp_transport.h -./snmpksm.lo: ../include/net-snmp/library/snmp_service.h -./snmpksm.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpUnixDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpUDPDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpTCPDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmpksm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmpksm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmpksm.lo: ../include/net-snmp/library/snmpIPXDomain.h -./snmpksm.lo: ../include/net-snmp/library/ucd_compat.h -./snmpksm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h -./snmpksm.lo: ../include/net-snmp/library/parse.h -./snmpksm.lo: ../include/net-snmp/library/oid_stash.h -./snmpksm.lo: ../include/net-snmp/net-snmp-features.h -./snmpksm.lo: ../include/net-snmp/library/snmp_impl.h -./snmpksm.lo: ../include/net-snmp/library/snmp.h -./snmpksm.lo: ../include/net-snmp/library/snmp-tc.h -./snmpksm.lo: ../include/net-snmp/library/snmp_debug.h -./snmpksm.lo: ../include/net-snmp/library/snmp_logging.h -./snmpksm.lo: ../include/net-snmp/config_api.h -./snmpksm.lo: ../include/net-snmp/library/read_config.h -./snmpksm.lo: ../include/net-snmp/library/default_store.h -./snmpksm.lo: ../include/net-snmp/library/snmp_parse_args.h -./snmpksm.lo: ../include/net-snmp/library/snmp_enum.h -./snmpksm.lo: ../include/net-snmp/library/vacm.h -./snmpksm.lo: ../include/net-snmp/utilities.h -./snmpksm.lo: ../include/net-snmp/library/system.h -./snmpksm.lo: ../include/net-snmp/library/tools.h -./snmpksm.lo: ../include/net-snmp/library/int64.h -./snmpksm.lo: ../include/net-snmp/library/mt_support.h -./snmpksm.lo: ../include/net-snmp/library/snmp_alarm.h -./snmpksm.lo: ../include/net-snmp/library/data_list.h -./snmpksm.lo: ../include/net-snmp/library/check_varbind.h -./snmpksm.lo: ../include/net-snmp/library/container.h -./snmpksm.lo: ../include/net-snmp/library/factory.h -./snmpksm.lo: ../include/net-snmp/library/container_binary_array.h -./snmpksm.lo: ../include/net-snmp/library/container_list_ssll.h -./snmpksm.lo: ../include/net-snmp/library/container_iterator.h -./snmpksm.lo: ../include/net-snmp/library/container.h -./snmpksm.lo: ../include/net-snmp/library/snmp_assert.h -./snmpksm.lo: ../include/net-snmp/version.h -./snmpksm.lo: ../include/net-snmp/library/keytools.h -./snmpksm.lo: ../include/net-snmp/library/snmpv3.h -./snmpksm.lo: ../include/net-snmp/library/lcd_time.h -./snmpksm.lo: ../include/net-snmp/library/scapi.h -./snmpksm.lo: ../include/net-snmp/library/snmp_secmod.h -./snmpksm.lo: ../include/net-snmp/library/snmpksm.h ./snmp_logging.lo: ../include/net-snmp/net-snmp-config.h ./snmp_logging.lo: ../include/net-snmp/net-snmp-features.h ./snmp_logging.lo: ../include/net-snmp/types.h @@ -2146,6 +2293,7 @@ ./snmp_logging.lo: ../include/net-snmp/pdu_api.h ./snmp_logging.lo: ../include/net-snmp/library/asn1.h ./snmp_logging.lo: ../include/net-snmp/output_api.h +./snmp_logging.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_logging.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_logging.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_logging.lo: ../include/net-snmp/session_api.h @@ -2163,6 +2311,7 @@ ./snmp_logging.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_logging.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_logging.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_logging.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_logging.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_logging.lo: ../include/net-snmp/library/mib.h ./snmp_logging.lo: ../include/net-snmp/mib_api.h @@ -2186,13 +2335,14 @@ ./snmp_logging.lo: ../include/net-snmp/library/data_list.h ./snmp_logging.lo: ../include/net-snmp/library/check_varbind.h ./snmp_logging.lo: ../include/net-snmp/library/container.h -./snmp_logging.lo: ../include/net-snmp/library/factory.h +./snmp_logging.lo: factory.h ./snmp_logging.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_logging.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_logging.lo: ../include/net-snmp/library/container_iterator.h ./snmp_logging.lo: ../include/net-snmp/library/container.h ./snmp_logging.lo: ../include/net-snmp/library/snmp_assert.h ./snmp_logging.lo: ../include/net-snmp/version.h +./snmp_logging.lo: snmp_syslog.h snprintf.h ./snmp_openssl.lo: ../include/net-snmp/net-snmp-config.h ./snmp_openssl.lo: ../include/net-snmp/net-snmp-includes.h ./snmp_openssl.lo: ../include/net-snmp/definitions.h @@ -2205,6 +2355,7 @@ ./snmp_openssl.lo: ../include/net-snmp/pdu_api.h ./snmp_openssl.lo: ../include/net-snmp/library/asn1.h ./snmp_openssl.lo: ../include/net-snmp/output_api.h +./snmp_openssl.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_openssl.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_openssl.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_openssl.lo: ../include/net-snmp/session_api.h @@ -2222,6 +2373,7 @@ ./snmp_openssl.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_openssl.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_openssl.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_openssl.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_openssl.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_openssl.lo: ../include/net-snmp/library/mib.h ./snmp_openssl.lo: ../include/net-snmp/mib_api.h @@ -2241,7 +2393,7 @@ ./snmp_openssl.lo: ../include/net-snmp/library/data_list.h ./snmp_openssl.lo: ../include/net-snmp/library/check_varbind.h ./snmp_openssl.lo: ../include/net-snmp/library/container.h -./snmp_openssl.lo: ../include/net-snmp/library/factory.h +./snmp_openssl.lo: factory.h ./snmp_openssl.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_openssl.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_openssl.lo: ../include/net-snmp/library/container_iterator.h @@ -2262,8 +2414,8 @@ ./snmp_openssl.lo: ../include/net-snmp/library/lcd_time.h ./snmp_openssl.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_openssl.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_openssl.lo: ../include/net-snmp/library/snmptsm.h ./snmp_openssl.lo: ../include/net-snmp/library/snmpusm.h +./snmp_openssl.lo: ../include/net-snmp/library/snmptsm.h ./snmp_parse_args.lo: ../include/net-snmp/net-snmp-config.h ./snmp_parse_args.lo: ../include/net-snmp/net-snmp-includes.h ./snmp_parse_args.lo: ../include/net-snmp/definitions.h @@ -2276,6 +2428,7 @@ ./snmp_parse_args.lo: ../include/net-snmp/pdu_api.h ./snmp_parse_args.lo: ../include/net-snmp/library/asn1.h ./snmp_parse_args.lo: ../include/net-snmp/output_api.h +./snmp_parse_args.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_parse_args.lo: ../include/net-snmp/session_api.h @@ -2293,6 +2446,7 @@ ./snmp_parse_args.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_parse_args.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_parse_args.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_parse_args.lo: ../include/net-snmp/library/mib.h ./snmp_parse_args.lo: ../include/net-snmp/mib_api.h @@ -2312,7 +2466,7 @@ ./snmp_parse_args.lo: ../include/net-snmp/library/data_list.h ./snmp_parse_args.lo: ../include/net-snmp/library/check_varbind.h ./snmp_parse_args.lo: ../include/net-snmp/library/container.h -./snmp_parse_args.lo: ../include/net-snmp/library/factory.h +./snmp_parse_args.lo: factory.h ./snmp_parse_args.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_parse_args.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_parse_args.lo: ../include/net-snmp/library/container_iterator.h @@ -2333,8 +2487,8 @@ ./snmp_parse_args.lo: ../include/net-snmp/library/lcd_time.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_parse_args.lo: ../include/net-snmp/library/snmptsm.h ./snmp_parse_args.lo: ../include/net-snmp/library/snmpusm.h +./snmp_parse_args.lo: ../include/net-snmp/library/snmptsm.h ./snmp_secmod.lo: ../include/net-snmp/net-snmp-config.h ./snmp_secmod.lo: ../include/net-snmp/types.h ./snmp_secmod.lo: ../include/net-snmp/library/oid.h @@ -2346,6 +2500,7 @@ ./snmp_secmod.lo: ../include/net-snmp/pdu_api.h ./snmp_secmod.lo: ../include/net-snmp/library/asn1.h ./snmp_secmod.lo: ../include/net-snmp/output_api.h +./snmp_secmod.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_secmod.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_secmod.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_secmod.lo: ../include/net-snmp/session_api.h @@ -2363,6 +2518,7 @@ ./snmp_secmod.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_secmod.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_secmod.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_secmod.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_secmod.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_secmod.lo: ../include/net-snmp/library/mib.h ./snmp_secmod.lo: ../include/net-snmp/mib_api.h @@ -2387,7 +2543,7 @@ ./snmp_secmod.lo: ../include/net-snmp/library/data_list.h ./snmp_secmod.lo: ../include/net-snmp/library/check_varbind.h ./snmp_secmod.lo: ../include/net-snmp/library/container.h -./snmp_secmod.lo: ../include/net-snmp/library/factory.h +./snmp_secmod.lo: factory.h ./snmp_secmod.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_secmod.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_secmod.lo: ../include/net-snmp/library/container_iterator.h @@ -2396,8 +2552,8 @@ ./snmp_secmod.lo: ../include/net-snmp/version.h ./snmp_secmod.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_secmod.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_secmod.lo: ../include/net-snmp/library/snmptsm.h -./snmp_secmod.lo: ../include/net-snmp/library/snmpusm.h snmpsm_init.h +./snmp_secmod.lo: ../include/net-snmp/library/snmpusm.h +./snmp_secmod.lo: ../include/net-snmp/library/snmptsm.h snmpsm_init.h ./snmp_secmod.lo: snmpsm_shutdown.h ./snmp_service.lo: ../include/net-snmp/net-snmp-config.h ./snmp_service.lo: ../include/net-snmp/net-snmp-includes.h @@ -2411,6 +2567,7 @@ ./snmp_service.lo: ../include/net-snmp/pdu_api.h ./snmp_service.lo: ../include/net-snmp/library/asn1.h ./snmp_service.lo: ../include/net-snmp/output_api.h +./snmp_service.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_service.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_service.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_service.lo: ../include/net-snmp/session_api.h @@ -2428,6 +2585,7 @@ ./snmp_service.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_service.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_service.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_service.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_service.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_service.lo: ../include/net-snmp/library/mib.h ./snmp_service.lo: ../include/net-snmp/mib_api.h @@ -2447,7 +2605,7 @@ ./snmp_service.lo: ../include/net-snmp/library/data_list.h ./snmp_service.lo: ../include/net-snmp/library/check_varbind.h ./snmp_service.lo: ../include/net-snmp/library/container.h -./snmp_service.lo: ../include/net-snmp/library/factory.h +./snmp_service.lo: factory.h ./snmp_service.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_service.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_service.lo: ../include/net-snmp/library/container_iterator.h @@ -2468,44 +2626,8 @@ ./snmp_service.lo: ../include/net-snmp/library/lcd_time.h ./snmp_service.lo: ../include/net-snmp/library/snmp_secmod.h ./snmp_service.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmp_service.lo: ../include/net-snmp/library/snmptsm.h ./snmp_service.lo: ../include/net-snmp/library/snmpusm.h -./snmp-tc.lo: ../include/net-snmp/net-snmp-config.h -./snmp-tc.lo: ../include/net-snmp/net-snmp-features.h -./snmp-tc.lo: ../include/net-snmp/types.h -./snmp-tc.lo: ../include/net-snmp/library/oid.h -./snmp-tc.lo: ../include/net-snmp/library/types.h -./snmp-tc.lo: ../include/net-snmp/definitions.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_api.h -./snmp-tc.lo: ../include/net-snmp/varbind_api.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_client.h -./snmp-tc.lo: ../include/net-snmp/pdu_api.h -./snmp-tc.lo: ../include/net-snmp/library/asn1.h -./snmp-tc.lo: ../include/net-snmp/output_api.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_debug.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_logging.h -./snmp-tc.lo: ../include/net-snmp/session_api.h -./snmp-tc.lo: ../include/net-snmp/library/callback.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_transport.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_service.h -./snmp-tc.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpUnixDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpUDPDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpTCPDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./snmp-tc.lo: ../include/net-snmp/library/snmpIPXDomain.h -./snmp-tc.lo: ../include/net-snmp/library/ucd_compat.h -./snmp-tc.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h -./snmp-tc.lo: ../include/net-snmp/library/parse.h -./snmp-tc.lo: ../include/net-snmp/library/oid_stash.h -./snmp-tc.lo: ../include/net-snmp/library/snmp_impl.h -./snmp-tc.lo: ../include/net-snmp/library/snmp.h -./snmp-tc.lo: ../include/net-snmp/library/snmp-tc.h +./snmp_service.lo: ../include/net-snmp/library/snmptsm.h ./snmp_transport.lo: ../include/net-snmp/net-snmp-config.h ./snmp_transport.lo: ../include/net-snmp/net-snmp-features.h ./snmp_transport.lo: ../include/net-snmp/types.h @@ -2518,6 +2640,7 @@ ./snmp_transport.lo: ../include/net-snmp/pdu_api.h ./snmp_transport.lo: ../include/net-snmp/library/asn1.h ./snmp_transport.lo: ../include/net-snmp/output_api.h +./snmp_transport.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmp_transport.lo: ../include/net-snmp/library/snmp_debug.h ./snmp_transport.lo: ../include/net-snmp/library/snmp_logging.h ./snmp_transport.lo: ../include/net-snmp/session_api.h @@ -2535,6 +2658,7 @@ ./snmp_transport.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmp_transport.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmp_transport.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmp_transport.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmp_transport.lo: ../include/net-snmp/library/ucd_compat.h ./snmp_transport.lo: ../include/net-snmp/library/mib.h ./snmp_transport.lo: ../include/net-snmp/mib_api.h @@ -2552,7 +2676,7 @@ ./snmp_transport.lo: ../include/net-snmp/library/data_list.h ./snmp_transport.lo: ../include/net-snmp/library/check_varbind.h ./snmp_transport.lo: ../include/net-snmp/library/container.h -./snmp_transport.lo: ../include/net-snmp/library/factory.h +./snmp_transport.lo: factory.h ./snmp_transport.lo: ../include/net-snmp/library/container_binary_array.h ./snmp_transport.lo: ../include/net-snmp/library/container_list_ssll.h ./snmp_transport.lo: ../include/net-snmp/library/container_iterator.h @@ -2566,11 +2690,77 @@ ./snmp_transport.lo: ../include/net-snmp/library/snmp_enum.h ./snmp_transport.lo: ../include/net-snmp/library/vacm.h ./snmp_transport.lo: transports/snmp_transport_inits.h +./snmp_version.lo: ../include/net-snmp/net-snmp-config.h +./snmp_version.lo: ../include/net-snmp/version.h +./snmpksm.lo: ../include/net-snmp/net-snmp-config.h +./snmpksm.lo: ../include/net-snmp/output_api.h ../include/net-snmp/types.h +./snmpksm.lo: ../include/net-snmp/library/oid.h +./snmpksm.lo: ../include/net-snmp/library/types.h +./snmpksm.lo: ../include/net-snmp/definitions.h +./snmpksm.lo: ../include/net-snmp/library/snmp_api.h +./snmpksm.lo: ../include/net-snmp/varbind_api.h +./snmpksm.lo: ../include/net-snmp/library/snmp_client.h +./snmpksm.lo: ../include/net-snmp/pdu_api.h +./snmpksm.lo: ../include/net-snmp/library/asn1.h +./snmpksm.lo: ../include/net-snmp/session_api.h +./snmpksm.lo: ../include/net-snmp/library/callback.h +./snmpksm.lo: ../include/net-snmp/library/snmp_transport.h +./snmpksm.lo: ../include/net-snmp/library/snmp_service.h +./snmpksm.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpUnixDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpUDPDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpTCPDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./snmpksm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./snmpksm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpksm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./snmpksm.lo: ../include/net-snmp/library/ucd_compat.h +./snmpksm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h +./snmpksm.lo: ../include/net-snmp/library/parse.h +./snmpksm.lo: ../include/net-snmp/library/oid_stash.h +./snmpksm.lo: ../include/net-snmp/net-snmp-features.h +./snmpksm.lo: ../include/net-snmp/library/snmp_impl.h +./snmpksm.lo: ../include/net-snmp/library/snmp.h +./snmpksm.lo: ../include/net-snmp/library/snmp-tc.h +./snmpksm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./snmpksm.lo: ../include/net-snmp/library/snmp_debug.h +./snmpksm.lo: ../include/net-snmp/library/snmp_logging.h +./snmpksm.lo: ../include/net-snmp/config_api.h +./snmpksm.lo: ../include/net-snmp/library/read_config.h +./snmpksm.lo: ../include/net-snmp/library/default_store.h +./snmpksm.lo: ../include/net-snmp/library/snmp_parse_args.h +./snmpksm.lo: ../include/net-snmp/library/snmp_enum.h +./snmpksm.lo: ../include/net-snmp/library/vacm.h +./snmpksm.lo: ../include/net-snmp/utilities.h +./snmpksm.lo: ../include/net-snmp/library/system.h +./snmpksm.lo: ../include/net-snmp/library/tools.h +./snmpksm.lo: ../include/net-snmp/library/int64.h +./snmpksm.lo: ../include/net-snmp/library/mt_support.h +./snmpksm.lo: ../include/net-snmp/library/snmp_alarm.h +./snmpksm.lo: ../include/net-snmp/library/data_list.h +./snmpksm.lo: ../include/net-snmp/library/check_varbind.h +./snmpksm.lo: ../include/net-snmp/library/container.h +./snmpksm.lo: factory.h +./snmpksm.lo: ../include/net-snmp/library/container_binary_array.h +./snmpksm.lo: ../include/net-snmp/library/container_list_ssll.h +./snmpksm.lo: ../include/net-snmp/library/container_iterator.h +./snmpksm.lo: ../include/net-snmp/library/container.h +./snmpksm.lo: ../include/net-snmp/library/snmp_assert.h +./snmpksm.lo: ../include/net-snmp/version.h +./snmpksm.lo: ../include/net-snmp/library/keytools.h +./snmpksm.lo: ../include/net-snmp/library/snmpv3.h +./snmpksm.lo: ../include/net-snmp/library/lcd_time.h +./snmpksm.lo: ../include/net-snmp/library/scapi.h +./snmpksm.lo: ../include/net-snmp/library/snmp_secmod.h +./snmpksm.lo: ../include/net-snmp/library/snmpksm.h ./snmptsm.lo: ../include/net-snmp/net-snmp-config.h ./snmptsm.lo: ../include/net-snmp/net-snmp-features.h ./snmptsm.lo: ../include/net-snmp/net-snmp-includes.h -./snmptsm.lo: ../include/net-snmp/definitions.h -./snmptsm.lo: ../include/net-snmp/types.h +./snmptsm.lo: ../include/net-snmp/definitions.h ../include/net-snmp/types.h ./snmptsm.lo: ../include/net-snmp/library/oid.h ./snmptsm.lo: ../include/net-snmp/library/types.h ./snmptsm.lo: ../include/net-snmp/library/snmp_api.h @@ -2579,6 +2769,7 @@ ./snmptsm.lo: ../include/net-snmp/pdu_api.h ./snmptsm.lo: ../include/net-snmp/library/asn1.h ./snmptsm.lo: ../include/net-snmp/output_api.h +./snmptsm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmptsm.lo: ../include/net-snmp/library/snmp_debug.h ./snmptsm.lo: ../include/net-snmp/library/snmp_logging.h ./snmptsm.lo: ../include/net-snmp/session_api.h @@ -2596,6 +2787,7 @@ ./snmptsm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmptsm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmptsm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmptsm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmptsm.lo: ../include/net-snmp/library/ucd_compat.h ./snmptsm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmptsm.lo: ../include/net-snmp/library/parse.h @@ -2613,7 +2805,7 @@ ./snmptsm.lo: ../include/net-snmp/library/data_list.h ./snmptsm.lo: ../include/net-snmp/library/check_varbind.h ./snmptsm.lo: ../include/net-snmp/library/container.h -./snmptsm.lo: ../include/net-snmp/library/factory.h +./snmptsm.lo: factory.h ./snmptsm.lo: ../include/net-snmp/library/container_binary_array.h ./snmptsm.lo: ../include/net-snmp/library/container_list_ssll.h ./snmptsm.lo: ../include/net-snmp/library/container_iterator.h @@ -2633,12 +2825,11 @@ ./snmptsm.lo: ../include/net-snmp/library/lcd_time.h ./snmptsm.lo: ../include/net-snmp/library/snmp_secmod.h ./snmptsm.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./snmptsm.lo: ../include/net-snmp/library/snmptsm.h ./snmptsm.lo: ../include/net-snmp/library/snmpusm.h +./snmptsm.lo: ../include/net-snmp/library/snmptsm.h ./snmpusm.lo: ../include/net-snmp/net-snmp-config.h ./snmpusm.lo: ../include/net-snmp/net-snmp-features.h -./snmpusm.lo: ../include/net-snmp/types.h -./snmpusm.lo: ../include/net-snmp/library/oid.h +./snmpusm.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./snmpusm.lo: ../include/net-snmp/library/types.h ./snmpusm.lo: ../include/net-snmp/definitions.h ./snmpusm.lo: ../include/net-snmp/library/snmp_api.h @@ -2647,6 +2838,7 @@ ./snmpusm.lo: ../include/net-snmp/pdu_api.h ./snmpusm.lo: ../include/net-snmp/library/asn1.h ./snmpusm.lo: ../include/net-snmp/output_api.h +./snmpusm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpusm.lo: ../include/net-snmp/library/snmp_debug.h ./snmpusm.lo: ../include/net-snmp/library/snmp_logging.h ./snmpusm.lo: ../include/net-snmp/session_api.h @@ -2664,6 +2856,7 @@ ./snmpusm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpusm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpusm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpusm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpusm.lo: ../include/net-snmp/library/ucd_compat.h ./snmpusm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmpusm.lo: ../include/net-snmp/library/parse.h @@ -2686,7 +2879,7 @@ ./snmpusm.lo: ../include/net-snmp/library/data_list.h ./snmpusm.lo: ../include/net-snmp/library/check_varbind.h ./snmpusm.lo: ../include/net-snmp/library/container.h -./snmpusm.lo: ../include/net-snmp/library/factory.h +./snmpusm.lo: factory.h ./snmpusm.lo: ../include/net-snmp/library/container_binary_array.h ./snmpusm.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpusm.lo: ../include/net-snmp/library/container_iterator.h @@ -2699,6 +2892,7 @@ ./snmpusm.lo: ../include/net-snmp/library/scapi.h ./snmpusm.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpusm.lo: ../include/net-snmp/library/snmpusm.h +./snmpusm.lo: ../include/net-snmp/library/transform_oids.h ./snmpv3.lo: ../include/net-snmp/net-snmp-config.h ./snmpv3.lo: ../include/net-snmp/types.h ./snmpv3.lo: ../include/net-snmp/library/oid.h @@ -2709,6 +2903,7 @@ ./snmpv3.lo: ../include/net-snmp/library/snmp_client.h ./snmpv3.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./snmpv3.lo: ../include/net-snmp/output_api.h +./snmpv3.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./snmpv3.lo: ../include/net-snmp/library/snmp_debug.h ./snmpv3.lo: ../include/net-snmp/library/snmp_logging.h ./snmpv3.lo: ../include/net-snmp/session_api.h @@ -2726,6 +2921,7 @@ ./snmpv3.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./snmpv3.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./snmpv3.lo: ../include/net-snmp/library/snmpIPXDomain.h +./snmpv3.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./snmpv3.lo: ../include/net-snmp/library/ucd_compat.h ./snmpv3.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./snmpv3.lo: ../include/net-snmp/library/parse.h @@ -2749,7 +2945,7 @@ ./snmpv3.lo: ../include/net-snmp/library/data_list.h ./snmpv3.lo: ../include/net-snmp/library/check_varbind.h ./snmpv3.lo: ../include/net-snmp/library/container.h -./snmpv3.lo: ../include/net-snmp/library/factory.h +./snmpv3.lo: factory.h ./snmpv3.lo: ../include/net-snmp/library/container_binary_array.h ./snmpv3.lo: ../include/net-snmp/library/container_list_ssll.h ./snmpv3.lo: ../include/net-snmp/library/container_iterator.h @@ -2763,9 +2959,8 @@ ./snmpv3.lo: ../include/net-snmp/library/snmp_secmod.h ./snmpv3.lo: ../include/net-snmp/library/snmpusm.h ./snmpv3.lo: ../include/net-snmp/library/transform_oids.h -./snmp_version.lo: ../include/net-snmp/net-snmp-config.h -./snmp_version.lo: ../include/net-snmp/version.h ./snprintf.lo: ../include/net-snmp/net-snmp-config.h +./snprintf.lo: snprintf.h ./strlcat.lo: ../include/net-snmp/net-snmp-config.h ./strlcat.lo: ../include/net-snmp/library/system.h ./strlcat.lo: ../include/net-snmp/types.h @@ -2778,6 +2973,7 @@ ./strlcat.lo: ../include/net-snmp/pdu_api.h ./strlcat.lo: ../include/net-snmp/library/asn1.h ./strlcat.lo: ../include/net-snmp/output_api.h +./strlcat.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./strlcat.lo: ../include/net-snmp/library/snmp_debug.h ./strlcat.lo: ../include/net-snmp/library/snmp_logging.h ./strlcat.lo: ../include/net-snmp/session_api.h @@ -2795,6 +2991,7 @@ ./strlcat.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./strlcat.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./strlcat.lo: ../include/net-snmp/library/snmpIPXDomain.h +./strlcat.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./strlcat.lo: ../include/net-snmp/library/ucd_compat.h ./strlcat.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./strlcat.lo: ../include/net-snmp/library/parse.h @@ -2815,6 +3012,7 @@ ./strlcpy.lo: ../include/net-snmp/pdu_api.h ./strlcpy.lo: ../include/net-snmp/library/asn1.h ./strlcpy.lo: ../include/net-snmp/output_api.h +./strlcpy.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./strlcpy.lo: ../include/net-snmp/library/snmp_debug.h ./strlcpy.lo: ../include/net-snmp/library/snmp_logging.h ./strlcpy.lo: ../include/net-snmp/session_api.h @@ -2832,6 +3030,7 @@ ./strlcpy.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./strlcpy.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./strlcpy.lo: ../include/net-snmp/library/snmpIPXDomain.h +./strlcpy.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./strlcpy.lo: ../include/net-snmp/library/ucd_compat.h ./strlcpy.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./strlcpy.lo: ../include/net-snmp/library/parse.h @@ -2852,6 +3051,7 @@ ./strtok_r.lo: ../include/net-snmp/pdu_api.h ./strtok_r.lo: ../include/net-snmp/library/asn1.h ./strtok_r.lo: ../include/net-snmp/output_api.h +./strtok_r.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./strtok_r.lo: ../include/net-snmp/library/snmp_debug.h ./strtok_r.lo: ../include/net-snmp/library/snmp_logging.h ./strtok_r.lo: ../include/net-snmp/session_api.h @@ -2869,6 +3069,7 @@ ./strtok_r.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./strtok_r.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./strtok_r.lo: ../include/net-snmp/library/snmpIPXDomain.h +./strtok_r.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./strtok_r.lo: ../include/net-snmp/library/ucd_compat.h ./strtok_r.lo: ../include/net-snmp/library/mib.h ./strtok_r.lo: ../include/net-snmp/mib_api.h @@ -2891,6 +3092,7 @@ ./strtoull.lo: ../include/net-snmp/pdu_api.h ./strtoull.lo: ../include/net-snmp/library/asn1.h ./strtoull.lo: ../include/net-snmp/output_api.h +./strtoull.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./strtoull.lo: ../include/net-snmp/library/snmp_debug.h ./strtoull.lo: ../include/net-snmp/library/snmp_logging.h ./strtoull.lo: ../include/net-snmp/session_api.h @@ -2908,6 +3110,7 @@ ./strtoull.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./strtoull.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./strtoull.lo: ../include/net-snmp/library/snmpIPXDomain.h +./strtoull.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./strtoull.lo: ../include/net-snmp/library/ucd_compat.h ./strtoull.lo: ../include/net-snmp/library/mib.h ./strtoull.lo: ../include/net-snmp/mib_api.h @@ -2920,8 +3123,7 @@ ./strtoull.lo: ../include/net-snmp/library/system.h ./system.lo: ../include/net-snmp/net-snmp-config.h ./system.lo: ../include/net-snmp/net-snmp-features.h -./system.lo: ../include/net-snmp/types.h -./system.lo: ../include/net-snmp/library/oid.h +./system.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./system.lo: ../include/net-snmp/library/types.h ./system.lo: ../include/net-snmp/definitions.h ./system.lo: ../include/net-snmp/library/snmp_api.h @@ -2929,6 +3131,7 @@ ./system.lo: ../include/net-snmp/library/snmp_client.h ./system.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./system.lo: ../include/net-snmp/output_api.h +./system.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./system.lo: ../include/net-snmp/library/snmp_debug.h ./system.lo: ../include/net-snmp/library/snmp_logging.h ./system.lo: ../include/net-snmp/session_api.h @@ -2946,6 +3149,7 @@ ./system.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./system.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./system.lo: ../include/net-snmp/library/snmpIPXDomain.h +./system.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./system.lo: ../include/net-snmp/library/ucd_compat.h ./system.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./system.lo: ../include/net-snmp/library/parse.h @@ -2962,7 +3166,7 @@ ./system.lo: ../include/net-snmp/library/data_list.h ./system.lo: ../include/net-snmp/library/check_varbind.h ./system.lo: ../include/net-snmp/library/container.h -./system.lo: ../include/net-snmp/library/factory.h +./system.lo: factory.h ./system.lo: ../include/net-snmp/library/container_binary_array.h ./system.lo: ../include/net-snmp/library/container_list_ssll.h ./system.lo: ../include/net-snmp/library/container_iterator.h @@ -2988,6 +3192,7 @@ ./text_utils.lo: ../include/net-snmp/pdu_api.h ./text_utils.lo: ../include/net-snmp/library/asn1.h ./text_utils.lo: ../include/net-snmp/output_api.h +./text_utils.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./text_utils.lo: ../include/net-snmp/library/snmp_debug.h ./text_utils.lo: ../include/net-snmp/library/snmp_logging.h ./text_utils.lo: ../include/net-snmp/session_api.h @@ -3005,6 +3210,7 @@ ./text_utils.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./text_utils.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./text_utils.lo: ../include/net-snmp/library/snmpIPXDomain.h +./text_utils.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./text_utils.lo: ../include/net-snmp/library/ucd_compat.h ./text_utils.lo: ../include/net-snmp/library/mib.h ./text_utils.lo: ../include/net-snmp/mib_api.h @@ -3023,7 +3229,7 @@ ./text_utils.lo: ../include/net-snmp/library/data_list.h ./text_utils.lo: ../include/net-snmp/library/check_varbind.h ./text_utils.lo: ../include/net-snmp/library/container.h -./text_utils.lo: ../include/net-snmp/library/factory.h +./text_utils.lo: factory.h ./text_utils.lo: ../include/net-snmp/library/container_binary_array.h ./text_utils.lo: ../include/net-snmp/library/container_list_ssll.h ./text_utils.lo: ../include/net-snmp/library/container_iterator.h @@ -3044,8 +3250,8 @@ ./text_utils.lo: ../include/net-snmp/library/lcd_time.h ./text_utils.lo: ../include/net-snmp/library/snmp_secmod.h ./text_utils.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./text_utils.lo: ../include/net-snmp/library/snmptsm.h ./text_utils.lo: ../include/net-snmp/library/snmpusm.h +./text_utils.lo: ../include/net-snmp/library/snmptsm.h ./text_utils.lo: ../include/net-snmp/library/file_utils.h ./text_utils.lo: ../include/net-snmp/library/text_utils.h ./tools.lo: ../include/net-snmp/net-snmp-config.h @@ -3059,6 +3265,7 @@ ./tools.lo: ../include/net-snmp/library/snmp_client.h ./tools.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./tools.lo: ../include/net-snmp/output_api.h +./tools.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./tools.lo: ../include/net-snmp/library/snmp_debug.h ./tools.lo: ../include/net-snmp/library/snmp_logging.h ./tools.lo: ../include/net-snmp/session_api.h @@ -3076,6 +3283,7 @@ ./tools.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./tools.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./tools.lo: ../include/net-snmp/library/snmpIPXDomain.h +./tools.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./tools.lo: ../include/net-snmp/library/ucd_compat.h ./tools.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./tools.lo: ../include/net-snmp/library/parse.h @@ -3092,7 +3300,7 @@ ./tools.lo: ../include/net-snmp/library/data_list.h ./tools.lo: ../include/net-snmp/library/check_varbind.h ./tools.lo: ../include/net-snmp/library/container.h -./tools.lo: ../include/net-snmp/library/factory.h +./tools.lo: factory.h ./tools.lo: ../include/net-snmp/library/container_binary_array.h ./tools.lo: ../include/net-snmp/library/container_list_ssll.h ./tools.lo: ../include/net-snmp/library/container_iterator.h @@ -3111,6 +3319,7 @@ ./ucd_compat.lo: ../include/net-snmp/pdu_api.h ./ucd_compat.lo: ../include/net-snmp/library/asn1.h ./ucd_compat.lo: ../include/net-snmp/output_api.h +./ucd_compat.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./ucd_compat.lo: ../include/net-snmp/library/snmp_debug.h ./ucd_compat.lo: ../include/net-snmp/library/snmp_logging.h ./ucd_compat.lo: ../include/net-snmp/session_api.h @@ -3128,6 +3337,7 @@ ./ucd_compat.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./ucd_compat.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./ucd_compat.lo: ../include/net-snmp/library/snmpIPXDomain.h +./ucd_compat.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./ucd_compat.lo: ../include/net-snmp/library/ucd_compat.h ./ucd_compat.lo: ../include/net-snmp/library/mib.h ./ucd_compat.lo: ../include/net-snmp/mib_api.h @@ -3142,9 +3352,9 @@ ./ucd_compat.lo: ../include/net-snmp/library/snmp_parse_args.h ./ucd_compat.lo: ../include/net-snmp/library/snmp_enum.h ./ucd_compat.lo: ../include/net-snmp/library/vacm.h +./ucd_compat.lo: ../include/ucd-snmp/default_store.h ./vacm.lo: ../include/net-snmp/net-snmp-config.h -./vacm.lo: ../include/net-snmp/types.h -./vacm.lo: ../include/net-snmp/library/oid.h +./vacm.lo: ../include/net-snmp/types.h ../include/net-snmp/library/oid.h ./vacm.lo: ../include/net-snmp/library/types.h ./vacm.lo: ../include/net-snmp/definitions.h ./vacm.lo: ../include/net-snmp/library/snmp_api.h @@ -3152,6 +3362,7 @@ ./vacm.lo: ../include/net-snmp/library/snmp_client.h ./vacm.lo: ../include/net-snmp/pdu_api.h ../include/net-snmp/library/asn1.h ./vacm.lo: ../include/net-snmp/output_api.h +./vacm.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./vacm.lo: ../include/net-snmp/library/snmp_debug.h ./vacm.lo: ../include/net-snmp/library/snmp_logging.h ./vacm.lo: ../include/net-snmp/session_api.h @@ -3169,6 +3380,7 @@ ./vacm.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./vacm.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./vacm.lo: ../include/net-snmp/library/snmpIPXDomain.h +./vacm.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./vacm.lo: ../include/net-snmp/library/ucd_compat.h ./vacm.lo: ../include/net-snmp/library/mib.h ../include/net-snmp/mib_api.h ./vacm.lo: ../include/net-snmp/library/parse.h @@ -3183,6 +3395,7 @@ ./vacm.lo: ../include/net-snmp/library/snmp_parse_args.h ./vacm.lo: ../include/net-snmp/library/snmp_enum.h ./vacm.lo: ../include/net-snmp/library/vacm.h +./vacm.lo: ../include/net-snmp/library/system.h ./vacm.lo: ../include/net-snmp/library/tools.h ./openssl/openssl_aes_cfb.lo: ../include/net-snmp/library/openssl_aes.h ./openssl/openssl_aes_cfb.lo: openssl/openssl_modes.h @@ -3208,21 +3421,22 @@ ./openssl/openssl_sha1.lo: ./openssl/openssl_md32_common.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h -./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/types.h +./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_transport.h +./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/oid.h +./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/types.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/types.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/definitions.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_api.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/varbind_api.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_client.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/pdu_api.h -./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/session_api.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/callback.h -./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_transport.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmp_service.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h ./transports/snmpAAL5PVCDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h @@ -3262,6 +3476,7 @@ ./transports/snmpAliasDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpAliasDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/session_api.h @@ -3279,6 +3494,7 @@ ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/mib_api.h @@ -3300,7 +3516,7 @@ ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/data_list.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/check_varbind.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/container.h -./transports/snmpAliasDomain.lo: ../include/net-snmp/library/factory.h +./transports/snmpAliasDomain.lo: factory.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/container_binary_array.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/container_list_ssll.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/container_iterator.h @@ -3321,8 +3537,8 @@ ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/lcd_time.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmp_secmod.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpv3-security-includes.h -./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmptsm.h ./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmpusm.h +./transports/snmpAliasDomain.lo: ../include/net-snmp/library/snmptsm.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/types.h @@ -3335,6 +3551,7 @@ ./transports/snmpCallbackDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/session_api.h @@ -3351,6 +3568,7 @@ ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/mib_api.h @@ -3375,7 +3593,7 @@ ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/data_list.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/check_varbind.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/container.h -./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/factory.h +./transports/snmpCallbackDomain.lo: factory.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/container_binary_array.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/container_list_ssll.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/container_iterator.h @@ -3383,46 +3601,47 @@ ./transports/snmpCallbackDomain.lo: ../include/net-snmp/library/snmp_assert.h ./transports/snmpCallbackDomain.lo: ../include/net-snmp/version.h ./transports/snmpDTLSUDPDomain.lo: ../include/net-snmp/net-snmp-config.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/net-snmp-config.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/types.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/oid.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/types.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/definitions.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_api.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/varbind_api.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_client.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/pdu_api.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/asn1.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/output_api.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_debug.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_logging.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/session_api.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/callback.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_transport.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_service.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/ucd_compat.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/mib.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/mib_api.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/parse.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/oid_stash.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/net-snmp-features.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_impl.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp-tc.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/default_store.h -./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/system.h -./transports/snmpIPv6BaseDomain.lo: ../include/net-snmp/net-snmp-config.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/net-snmp-config.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/types.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/oid.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/types.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/definitions.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_api.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/varbind_api.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_client.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/pdu_api.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/asn1.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_debug.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_logging.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/session_api.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/callback.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_transport.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_service.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/mib.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/mib_api.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/parse.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/oid_stash.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/net-snmp-features.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp_impl.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpIPBaseDomain.lo: ../include/net-snmp/library/system.h +./transports/snmpIPBaseDomain.lo: transports/snmpIPBaseDomain.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_transport.h @@ -3436,6 +3655,7 @@ ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_client.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpIPXDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/session_api.h @@ -3451,6 +3671,7 @@ ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/mib_api.h @@ -3466,51 +3687,56 @@ ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_parse_args.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_enum.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/vacm.h +./transports/snmpIPXDomain.lo: ../include/net-snmp/library/snmp_assert.h ./transports/snmpIPXDomain.lo: ../include/net-snmp/library/tools.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/net-snmp-config.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/types.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/oid.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/types.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/definitions.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_api.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/varbind_api.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_client.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/pdu_api.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/asn1.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/output_api.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_debug.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_logging.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/session_api.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/callback.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_transport.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_service.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/mib.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/mib_api.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/parse.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/oid_stash.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/net-snmp-features.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_impl.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp-tc.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/tools.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/default_store.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/system.h -./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_assert.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/net-snmp-config.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/types.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/oid.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/types.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/definitions.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_api.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/varbind_api.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_client.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/pdu_api.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/asn1.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_debug.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_logging.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/session_api.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/callback.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_transport.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_service.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/ucd_compat.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/mib.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/mib_api.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/parse.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/oid_stash.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/net-snmp-features.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_impl.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpIPv4BaseDomain.lo: transports/snmpIPBaseDomain.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_assert.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/default_store.h +./transports/snmpIPv4BaseDomain.lo: ../include/net-snmp/library/system.h +./transports/snmpIPv4BaseDomain.lo: inet_ntop.h +./transports/snmpIPv6BaseDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/net-snmp-features.h +./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp_assert.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpSSHDomain.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/types.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/oid.h @@ -3522,6 +3748,7 @@ ./transports/snmpSSHDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpSSHDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/session_api.h @@ -3539,6 +3766,7 @@ ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpSSHDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpSSHDomain.lo: ../include/net-snmp/mib_api.h @@ -3568,6 +3796,7 @@ ./transports/snmpSTDDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpSTDDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/session_api.h @@ -3585,6 +3814,7 @@ ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/mib_api.h @@ -3595,6 +3825,50 @@ ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/snmp-tc.h ./transports/snmpSTDDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/net-snmp-config.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/types.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/oid.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/types.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/definitions.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_api.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/varbind_api.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_client.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/pdu_api.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/asn1.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_debug.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_logging.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/session_api.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/callback.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_transport.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_service.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/mib.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/mib_api.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/parse.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/oid_stash.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/net-snmp-features.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_impl.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/default_store.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/system.h +./transports/snmpSocketBaseDomain.lo: ../include/net-snmp/library/snmp_assert.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/types.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/oid.h @@ -3606,6 +3880,7 @@ ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/session_api.h @@ -3623,6 +3898,7 @@ ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpTCPBaseDomain.lo: ../include/net-snmp/mib_api.h @@ -3644,6 +3920,7 @@ ./transports/snmpTCPDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpTCPDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/session_api.h @@ -3661,6 +3938,7 @@ ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/mib_api.h @@ -3670,29 +3948,30 @@ ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmp_impl.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpTCPDomain.lo: transports/snmpIPBaseDomain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/snmpTCPBaseDomain.h ./transports/snmpTCPDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpTCPDomain.lo: ../include/net-snmp/library/sd-daemon.h ./transports/snmpTCPIPv6Domain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/net-snmp-features.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpTLSBaseDomain.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_transport.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/asn1.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/oid.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/container.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/types.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/oid.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/types.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/definitions.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_api.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/varbind_api.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_client.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/pdu_api.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/session_api.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/callback.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_transport.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_service.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h @@ -3705,6 +3984,7 @@ ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/mib_api.h @@ -3713,49 +3993,54 @@ ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_impl.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp-tc.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/factory.h -./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpTLSBaseDomain.lo: ./memcheck.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/config_api.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/read_config.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/default_store.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_parse_args.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_enum.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/vacm.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/container.h +./transports/snmpTLSBaseDomain.lo: factory.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/tools.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/cert_util.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_openssl.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_assert.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmp_secmod.h ./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/system.h +./transports/snmpTLSBaseDomain.lo: ../include/net-snmp/library/snmpTLSBaseDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/net-snmp-features.h -./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpTLSTCPDomain.h -./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h -./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_transport.h -./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/asn1.h -./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/oid.h +./transports/snmpTLSTCPDomain.lo: ./memcheck.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/types.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/oid.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/types.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/definitions.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_api.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/varbind_api.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_client.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/pdu_api.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/session_api.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/callback.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_transport.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_service.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/mib_api.h @@ -3774,8 +4059,9 @@ ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpTLSBaseDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/container.h -./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/factory.h +./transports/snmpTLSTCPDomain.lo: factory.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmpTLSTCPDomain.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/system.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/cert_util.h ./transports/snmpTLSTCPDomain.lo: ../include/net-snmp/library/snmp_openssl.h @@ -3790,6 +4076,7 @@ ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/session_api.h @@ -3807,6 +4094,7 @@ ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpUDPBaseDomain.lo: ../include/net-snmp/mib_api.h @@ -3832,6 +4120,7 @@ ./transports/snmpUDPDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpUDPDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/session_api.h @@ -3849,6 +4138,7 @@ ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/mib_api.h @@ -3858,6 +4148,7 @@ ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmp_impl.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpUDPDomain.lo: transports/snmpIPBaseDomain.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/config_api.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/read_config.h ./transports/snmpUDPDomain.lo: ../include/net-snmp/library/default_store.h @@ -3879,6 +4170,7 @@ ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/session_api.h @@ -3896,6 +4188,7 @@ ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/mib_api.h @@ -3905,12 +4198,14 @@ ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_impl.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpUDPIPv4BaseDomain.lo: transports/snmpIPBaseDomain.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/tools.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmp_assert.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/default_store.h ./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h +./transports/snmpUDPIPv4BaseDomain.lo: ../include/net-snmp/library/sd-daemon.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/net-snmp-config.h -./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./transports/snmpUDPIPv6Domain.lo: transports/snmpIPBaseDomain.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/types.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/oid.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/types.h @@ -3921,6 +4216,7 @@ ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/asn1.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/output_api.h +./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/session_api.h @@ -3934,9 +4230,11 @@ ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpTCPDomain.h -./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/mib.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/mib_api.h @@ -3947,6 +4245,50 @@ ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmp.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/snmp-tc.h ./transports/snmpUDPIPv6Domain.lo: ../include/net-snmp/library/system.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/net-snmp-config.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/types.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/oid.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/types.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/definitions.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_api.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/varbind_api.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_client.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/pdu_api.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/asn1.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_debug.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_logging.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/session_api.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/callback.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_transport.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_service.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpCallbackDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpUDPDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpUDPIPv4BaseDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpIPv4BaseDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpUDPBaseDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpTCPDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpUDPIPv6Domain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/ucd_compat.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/mib.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/mib_api.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/parse.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/oid_stash.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/net-snmp-features.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_impl.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp-tc.h +./transports/snmpUDPsharedDomain.lo: transports/snmpIPBaseDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpUDPsharedDomain.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmp_assert.h +./transports/snmpUDPsharedDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/net-snmp-config.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/net-snmp-features.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpUnixDomain.h @@ -3961,6 +4303,7 @@ ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmp_client.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/pdu_api.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/output_api.h +./transports/snmpUnixDomain.lo: ../include/net-snmp/library/netsnmp-attribute-format.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmp_debug.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmp_logging.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/session_api.h @@ -3976,6 +4319,7 @@ ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpIPv6BaseDomain.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpTCPIPv6Domain.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpIPXDomain.h +./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpAAL5PVCDomain.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/ucd_compat.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/mib.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/mib_api.h @@ -3993,3 +4337,4 @@ ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/snmpSocketBaseDomain.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/system.h ./transports/snmpUnixDomain.lo: ../include/net-snmp/library/tools.h +./transports/snmpUnixDomain.lo: ../include/net-snmp/library/sd-daemon.h diff --git a/snmplib/Makefile.in b/snmplib/Makefile.in index 506b8d4..ecbfc4d 100644 --- a/snmplib/Makefile.in +++ b/snmplib/Makefile.in @@ -12,7 +12,6 @@ # Makefile for snmplib # -top_builddir=.. mysubdir=snmplib # use GNU vpath, if available, to only set a path for source and headers @@ -31,71 +30,71 @@ mysubdir=snmplib # headers INSTALLHEADERS=\ - net-snmp-includes.h \ config_api.h \ + definitions.h \ mib_api.h \ + net-snmp-includes.h \ output_api.h \ pdu_api.h \ session_api.h \ snmpv3_api.h \ - varbind_api.h \ types.h \ utilities.h \ - version.h \ - definitions.h + varbind_api.h \ + version.h INCLUDESUBDIR=library INCLUDESUBDIRHEADERS=README \ asn1.h \ callback.h \ cert_util.h \ + check_varbind.h \ container.h \ container_binary_array.h \ - container_list_ssll.h \ container_iterator.h \ + container_list_ssll.h \ container_null.h \ - factory.h \ data_list.h \ default_store.h \ dir_utils.h \ fd_event_manager.h \ file_utils.h \ + getopt.h \ int64.h \ keytools.h \ - mib.h \ + large_fd_set.h \ + lcd_time.h \ md5.h \ + mib.h \ + mt_support.h \ + netsnmp-attribute-format.h \ + oid.h \ + oid_stash.h \ parse.h \ read_config.h \ scapi.h \ + snmp-tc.h \ snmp.h \ snmp_alarm.h \ snmp_api.h \ - large_fd_set.h \ snmp_assert.h \ snmp_client.h \ snmp_debug.h \ + snmp_enum.h \ snmp_impl.h \ snmp_logging.h \ snmp_parse_args.h \ + snmp_secmod.h \ snmp_service.h \ - snmp-tc.h \ + snmp_transport.h \ snmpv3.h \ system.h \ text_utils.h \ tools.h \ transform_oids.h \ types.h \ - getopt.h \ - lcd_time.h \ - mt_support.h \ - oid.h \ - oid_stash.h \ - snmp_enum.h \ - snmp_secmod.h \ - ucd_compat.h \ - vacm.h \ - check_varbind.h \ - snmp_transport.h \ + ucd_compat.h \ + vacm.h \ winpipe.h \ winservice.h \ @transport_hdr_list@ \ @@ -105,28 +104,29 @@ INSTALLBUILTSUBDIRHEADERS=../include/net-snmp/library/snmpv3-security-includes.h INSTALLBUILTSUBDIR=library -INSTALLUCDHEADERS= asn1.h \ +INSTALLUCDHEADERS=\ + asn1.h \ callback.h \ default_store.h \ int64.h \ keytools.h \ + large_fd_set.h \ mib.h \ parse.h \ read_config.h \ scapi.h \ + snmp-tc.h \ + snmp.h \ snmp_alarm.h \ snmp_api.h \ - large_fd_set.h \ snmp_client.h \ snmp_debug.h \ - snmp.h \ snmp_impl.h \ snmp_logging.h \ snmp_parse_args.h \ - snmp-tc.h \ + snmp_vars.h \ snmpusm.h \ snmpv3.h \ - snmp_vars.h \ struct.h \ system.h \ tools.h \ @@ -152,7 +152,7 @@ CSRCS= snmp_client.c mib.c parse.c snmp_api.c snmp.c \ data_list.c oid_stash.c fd_event_manager.c \ check_varbind.c \ mt_support.c snmp_enum.c snmp-tc.c snmp_service.c \ - snprintf.c \ + snprintf.c asprintf.c \ snmp_transport.c @transport_src_list@ \ snmp_secmod.c @security_src_list@ snmp_version.c \ container_null.c container_list_ssll.c container_iterator.c \ @@ -171,7 +171,7 @@ OBJS= snmp_client.o mib.o parse.o snmp_api.o snmp.o \ data_list.o oid_stash.o fd_event_manager.o \ check_varbind.o \ mt_support.o snmp_enum.o snmp-tc.o snmp_service.o \ - snprintf.o \ + snprintf.o asprintf.o \ snmp_transport.o @transport_obj_list@ \ snmp_secmod.o @security_obj_list@ snmp_version.o \ container_null.o container_list_ssll.o container_iterator.o \ @@ -190,7 +190,7 @@ LOBJS= snmp_client.lo mib.lo parse.lo snmp_api.lo snmp.lo \ data_list.lo oid_stash.lo fd_event_manager.lo \ check_varbind.lo \ mt_support.lo snmp_enum.lo snmp-tc.lo snmp_service.lo \ - snprintf.lo \ + snprintf.lo asprintf.lo \ snmp_transport.lo @transport_lobj_list@ \ snmp_secmod.lo @security_lobj_list@ snmp_version.lo \ container.lo container_binary_array.lo \ @@ -208,7 +208,7 @@ FTOBJS= snmp_client.ft mib.ft parse.ft snmp_api.ft snmp.ft \ data_list.ft oid_stash.ft fd_event_manager.ft \ check_varbind.ft \ mt_support.ft snmp_enum.ft snmp-tc.ft snmp_service.ft \ - snprintf.ft \ + snprintf.ft asprintf.ft \ snmp_transport.ft @transport_ftobj_list@ \ snmp_secmod.ft @security_ftobj_list@ snmp_version.ft \ container.ft container_binary_array.ft \ @@ -230,11 +230,11 @@ all: standardall # how to build the libraries. libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) - $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ + $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ $(RANLIB) $@ libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) - $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ + $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ $(RANLIB) $@ # diff --git a/snmplib/asn1.c b/snmplib/asn1.c index bea8d0b..c675223 100644 --- a/snmplib/asn1.c +++ b/snmplib/asn1.c @@ -6,6 +6,14 @@ * * Encodes abstract data types into a machine independent stream of bytes. * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /********************************************************************** Copyright 1988, 1989, 1991, 1992 by Carnegie Mellon University @@ -159,7 +167,7 @@ SOFTWARE. #include "gw.h" #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -167,10 +175,13 @@ SOFTWARE. #include #include +#ifdef HAVE_STDINT_H +#include +#endif #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif @@ -178,10 +189,6 @@ SOFTWARE. #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include @@ -286,6 +293,79 @@ _asn_length_err(const char *str, size_t wrongsize, size_t rightsize) ERROR_MSG(ebuf); } +/** + * @internal + * output an error for a wrong length + * + * @param str error string + * @param wrongsize wrong length + * @param rightsize expected length + */ +static void +_asn_short_err(const char *str, size_t wrongsize, size_t rightsize) +{ + char ebuf[128]; + + snprintf(ebuf, sizeof(ebuf), "%s length %lu too short: need %lu", str, + (unsigned long)wrongsize, (unsigned long)rightsize); + ERROR_MSG(ebuf); +} + +/** + * @internal + * checks a buffer with a length + data to see if it is big enough for + * the length encoding and the data of the parsed length. + * + * @param IN pkt The buffer + * @param IN pkt_len The length of the bugger + * @param OUT data_len Pointer to size of data + * + * @return Pointer to start of data or NULL if pkt isn't long enough + * + * pkt = get_buf(..., &pkt_len); + * data = asn_parse_nlength(pkt, pkt_len, &data_len); + * if (NULL == data) { handle_error(); } + * + */ +u_char * +asn_parse_nlength(u_char *pkt, size_t pkt_len, u_long *data_len) +{ + int len_len; + + if (pkt_len < 1) + return NULL; /* always too short */ + + if (NULL == pkt || NULL == data_len || NULL == data_len) + return NULL; + + *data_len = 0; + + if (*pkt & 0x80) { + /* + * long length; first byte is length of length (after masking high bit) + */ + len_len = (int) ((*pkt & ~0x80) + 1); + if (pkt_len < len_len) + return NULL; /* still too short for length and data */ + + /* now we know we have enough data to parse length */ + if (NULL == asn_parse_length(pkt, data_len)) + return NULL; /* propagate error from asn_parse_length */ + } else { + /* + * short length; first byte is the length + */ + len_len = 1; + *data_len = *pkt; + } + + if ((*data_len + len_len) > pkt_len) + return NULL; + + return (pkt + len_len); +} + +#if 0 /** * @internal * call after asn_parse_length to verify result. @@ -293,8 +373,8 @@ _asn_length_err(const char *str, size_t wrongsize, size_t rightsize) * @param str error string * @param bufp start of buffer * @param data start of data - * @param plen ? - * @param dlen ? + * @param plen ? parsed length + * @param dlen ? data/buf length * * @return 1 on error 0 on success */ @@ -314,7 +394,7 @@ _asn_parse_length_check(const char *str, return 1; } header_len = bufp - data; - if (plen > 0x7fffffff || header_len > 0x7fffffff || + if (plen > SNMP_MAX_PACKET_LEN || header_len > SNMP_MAX_PACKET_LEN || ((size_t) plen + header_len) > dlen) { snprintf(ebuf, sizeof(ebuf), "%s: message overflow: %d len + %d delta > %d len", @@ -325,6 +405,7 @@ _asn_parse_length_check(const char *str, } return 0; } +#endif /** @@ -425,7 +506,8 @@ asn_check_packet(u_char * pkt, size_t len) */ if ((int) len < (int) (*(pkt + 1) & ~0x80) + 2) return 0; /* still to short, incomplete length */ - asn_parse_length(pkt + 1, &asn_length); + if (NULL == asn_parse_length(pkt + 1, &asn_length)) + return 0; /* propagate error from asn_parse_length() */ return (asn_length + 2 + (*(pkt + 1) & ~0x80)); } else { /* @@ -490,22 +572,39 @@ asn_parse_int(u_char * data, static const char *errpre = "parse int"; register u_char *bufp = data; u_long asn_length; - register long value = 0; + int i; + union { + long l; + unsigned char b[sizeof(long)]; + } value; + + if (NULL == data || NULL == datalength || NULL == type || NULL == intp) { + ERROR_MSG("parse int: NULL pointer"); + return NULL; + } if (intsize != sizeof(long)) { _asn_size_err(errpre, intsize, sizeof(long)); return NULL; } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; if (*type != ASN_INTEGER) { _asn_type_err(errpre, *type); return NULL; } - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check - (errpre, bufp, data, asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } if ((size_t) asn_length > intsize || (int) asn_length == 0) { _asn_length_err(errpre, (size_t) asn_length, intsize); @@ -513,19 +612,23 @@ asn_parse_int(u_char * data, } *datalength -= (int) asn_length + (bufp - data); - if (*bufp & 0x80) - value = -1; /* integer is negative */ DEBUGDUMPSETUP("recv", data, bufp - data + asn_length); - while (asn_length--) - value = (value << 8) | *bufp++; + memset(&value.b, *bufp & 0x80 ? 0xff : 0, sizeof(value.b)); + if (NETSNMP_BIGENDIAN) { + for (i = sizeof(long) - asn_length; asn_length--; i++) + value.b[i] = *bufp++; + } else { + for (i = asn_length - 1; asn_length--; i--) + value.b[i] = *bufp++; + } - CHECK_OVERFLOW_S(value,1); + CHECK_OVERFLOW_S(value.l, 1); - DEBUGMSG(("dumpv_recv", " Integer:\t%ld (0x%.2lX)\n", value, value)); + DEBUGMSG(("dumpv_recv", " Integer:\t%ld (0x%.2lX)\n", value.l, value.l)); - *intp = value; + *intp = value.l; return bufp; } @@ -564,20 +667,34 @@ asn_parse_unsigned_int(u_char * data, u_long asn_length; register u_long value = 0; + if (NULL == data || NULL == datalength || NULL == type || NULL == intp) { + ERROR_MSG("parse uint: NULL pointer"); + return NULL; + } + if (intsize != sizeof(long)) { _asn_size_err(errpre, intsize, sizeof(long)); return NULL; } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; if (*type != ASN_COUNTER && *type != ASN_GAUGE && *type != ASN_TIMETICKS && *type != ASN_UINTEGER) { _asn_type_err(errpre, *type); return NULL; } - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check - (errpre, bufp, data, asn_length, *datalength)) + + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } if ((asn_length > (intsize + 1)) || ((int) asn_length == 0) || ((asn_length == intsize + 1) && *bufp != 0x00)) { @@ -585,8 +702,6 @@ asn_parse_unsigned_int(u_char * data, return NULL; } *datalength -= (int) asn_length + (bufp - data); - if (*bufp & 0x80) - value = ~value; /* integer is negative */ DEBUGDUMPSETUP("recv", data, bufp - data + asn_length); @@ -635,9 +750,7 @@ asn_build_int(u_char * data, static const char *errpre = "build int"; register long integer; register u_long mask; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif if (intsize != sizeof(long)) { _asn_size_err(errpre, intsize, sizeof(long)); @@ -658,7 +771,7 @@ asn_build_int(u_char * data, while ((((integer & mask) == 0) || ((integer & mask) == mask)) && intsize > 1) { intsize--; - integer <<= 8; + integer = (u_long)integer << 8; } data = asn_build_header(data, datalength, type, intsize); if (_asn_build_header_check(errpre, data, *datalength, intsize)) @@ -667,11 +780,11 @@ asn_build_int(u_char * data, *datalength -= intsize; mask = ((u_long) 0xFF) << (8 * (sizeof(long) - 1)); /* - * mask is 0xFF000000 on a big-endian machine + * mask is 0xFF000000 if sizeof(long) == 4. */ while (intsize--) { *data++ = (u_char) ((integer & mask) >> (8 * (sizeof(long) - 1))); - integer <<= 8; + integer = (u_long)integer << 8; } DEBUGDUMPSETUP("send", initdatap, data - initdatap); DEBUGMSG(("dumpv_send", " Integer:\t%ld (0x%.2lX)\n", *intp, *intp)); @@ -715,9 +828,7 @@ asn_build_unsigned_int(u_char * data, register u_long integer; register u_long mask; int add_null_byte = 0; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif if (intsize != sizeof(long)) { _asn_size_err(errpre, intsize, sizeof(long)); @@ -812,6 +923,18 @@ asn_parse_string(u_char * data, u_char *bufp = data; u_long asn_length; + if (NULL == data || NULL == datalength || NULL == type || NULL == str || + NULL == strlength) { + ERROR_MSG("parse string: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; if (*type != ASN_OCTET_STR && *type != ASN_IPADDRESS && *type != ASN_OPAQUE && *type != ASN_NSAP) { @@ -819,9 +942,9 @@ asn_parse_string(u_char * data, return NULL; } - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check - (errpre, bufp, data, asn_length, *datalength)) { + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; } @@ -895,9 +1018,7 @@ asn_build_string(u_char * data, * cmpdstring ::= 0x24 asnlength string {string}* * This code will never send a compound string. */ -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif data = asn_build_header(data, datalength, type, strlength); if (_asn_build_header_check ("build string", data, *datalength, strlength)) @@ -916,8 +1037,9 @@ asn_build_string(u_char * data, u_char *buf = (u_char *) malloc(1 + strlength); size_t l = (buf != NULL) ? (1 + strlength) : 0, ol = 0; - if (sprint_realloc_asciistring - (&buf, &l, &ol, 1, str, strlength)) { + if (sprint_realloc_asciistring(&buf, &l, &ol, 1, + str ? str : (const u_char *)"", + strlength)) { DEBUGMSG(("dumpv_send", " String:\t%s\n", buf)); } else { if (buf == NULL) { @@ -959,12 +1081,20 @@ u_char * asn_parse_header(u_char * data, size_t * datalength, u_char * type) { register u_char *bufp; - u_long asn_length; + u_long asn_length = 0; + const char *errpre = "parse header"; if (!data || !datalength || !type) { ERROR_MSG("parse header: NULL pointer"); return NULL; } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + bufp = data; /* * this only works on data types < 30, i.e. no extension octets @@ -973,12 +1103,13 @@ asn_parse_header(u_char * data, size_t * datalength, u_char * type) ERROR_MSG("can't process ID >= 30"); return NULL; } - *type = *bufp; - bufp = asn_parse_length(bufp + 1, &asn_length); + *type = *bufp++; - if (_asn_parse_length_check - ("parse header", bufp, data, asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } #ifdef DUMP_PRINT_HEADERS DEBUGDUMPSETUP("recv", data, (bufp - data)); @@ -993,7 +1124,7 @@ asn_parse_header(u_char * data, size_t * datalength, u_char * type) #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES - if ((*type == ASN_OPAQUE) && (*bufp == ASN_OPAQUE_TAG1)) { + if ((asn_length > 2) && (*type == ASN_OPAQUE) && (*bufp == ASN_OPAQUE_TAG1)) { /* * check if 64-but counter @@ -1017,10 +1148,12 @@ asn_parse_header(u_char * data, size_t * datalength, u_char * type) /* * value is encoded as special format */ - bufp = asn_parse_length(bufp + 2, &asn_length); - if (_asn_parse_length_check("parse opaque header", bufp, data, - asn_length, *datalength)) + *datalength = (int) asn_length; + bufp = asn_parse_nlength(bufp+2, *datalength - 2, &asn_length); + if (NULL == bufp) { + _asn_short_err("parse opaque header", *datalength - 2, asn_length); return NULL; + } } #endif /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */ @@ -1165,6 +1298,9 @@ asn_build_sequence(u_char * data, * @return Returns a pointer to the first byte after this length * field (aka: the start of the data field). * Returns NULL on any error. + * + * WARNING: this function does not know the length of the data +* buffer, so it can go past the end of a short buffer. */ u_char * asn_parse_length(u_char * data, u_long * length) @@ -1331,15 +1467,27 @@ asn_parse_objid(u_char * data, u_long asn_length; size_t original_length = *objidlength; + if (NULL == data || NULL == datalength || NULL == type || NULL == objid) { + ERROR_MSG("parse objid: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; if (*type != ASN_OBJECT_ID) { _asn_type_err(errpre, *type); return NULL; } - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check("parse objid", bufp, data, - asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } *datalength -= (int) asn_length + (bufp - data); @@ -1379,7 +1527,7 @@ asn_parse_objid(u_char * data, *oidp++ = (oid) subidentifier; } - if (0 != length) { + if (length || oidp < objid + 1) { ERROR_MSG("OID length exceeds buffer size"); *objidlength = original_length; return NULL; @@ -1391,7 +1539,7 @@ asn_parse_objid(u_char * data, * X is the value of the first subidentifier. * Y is the value of the second subidentifier. */ - subidentifier = (u_long) objid[1]; + subidentifier = oidp - objid >= 2 ? objid[1] : 0; if (subidentifier == 0x2B) { objid[0] = 1; objid[1] = 3; @@ -1456,9 +1604,7 @@ asn_build_objid(u_char * data, register u_long objid_val; u_long first_objid_val; register int i; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif /* * check if there are at least 2 sub-identifiers @@ -1613,11 +1759,23 @@ asn_parse_null(u_char * data, size_t * datalength, u_char * type) */ register u_char *bufp = data; u_long asn_length; + static const char *errpre = "parse null"; + + if (NULL == data || NULL == datalength || NULL == type) { + ERROR_MSG("parse null: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which should be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } *type = *bufp++; - bufp = asn_parse_length(bufp, &asn_length); - if (bufp == NULL) { - ERROR_MSG("parse null: bad length"); + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; } if (asn_length != 0) { @@ -1660,9 +1818,7 @@ asn_build_null(u_char * data, size_t * datalength, u_char type) /* * ASN.1 null ::= 0x05 0x00 */ -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif data = asn_build_header(data, datalength, type, 0); DEBUGDUMPSETUP("send", initdatap, data - initdatap); DEBUGMSG(("dumpv_send", " NULL\n")); @@ -1704,15 +1860,29 @@ asn_parse_bitstring(u_char * data, register u_char *bufp = data; u_long asn_length; + if (NULL == data || NULL == datalength || NULL == type || + NULL == str || NULL == strlength) { + ERROR_MSG("parse bitstring: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; if (*type != ASN_BIT_STR) { _asn_type_err(errpre, *type); return NULL; } - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check(errpre, bufp, data, - asn_length, *datalength)) + + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } if ((size_t) asn_length > *strlength) { _asn_length_err(errpre, (size_t) asn_length, *strlength); @@ -1813,7 +1983,7 @@ u_char * asn_parse_unsigned_int64(u_char * data, size_t * datalength, u_char * type, - struct counter64 * cp, size_t countersize) + struct counter64 *cp, size_t countersize) { /* * ASN.1 integer ::= 0x02 asnlength byte {byte}* @@ -1828,6 +1998,18 @@ asn_parse_unsigned_int64(u_char * data, _asn_size_err(errpre, countersize, sizeof(struct counter64)); return NULL; } + + if (NULL == data || NULL == datalength || NULL == type || NULL == cp) { + ERROR_MSG("parse uint64: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; if (*type != ASN_COUNTER64 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES @@ -1837,13 +2019,20 @@ asn_parse_unsigned_int64(u_char * data, _asn_type_err(errpre, *type); return NULL; } - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check - (errpre, bufp, data, asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } - DEBUGDUMPSETUP("recv", data, bufp - data); + DEBUGDUMPSETUP("recv", data, bufp - data + asn_length); #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES + /** need at least 2 bytes: ASN_OPAQUE_TAG1 and ASN_OPAQUE_ */ + if ((*type == ASN_OPAQUE) && (asn_length < 2)) { + _asn_short_err(errpre, asn_length, 2); + return NULL; + } + /* * 64 bit counters as opaque */ @@ -1859,10 +2048,12 @@ asn_parse_unsigned_int64(u_char * data, /* * value is encoded as special format */ - bufp = asn_parse_length(bufp + 2, &asn_length); - if (_asn_parse_length_check("parse opaque uint64", bufp, data, - asn_length, *datalength)) + *datalength = asn_length; + bufp = asn_parse_nlength(bufp+2, *datalength - 2, &asn_length); + if (NULL == bufp) { + _asn_short_err("parse opaque uint64", *datalength - 2, asn_length); return NULL; + } } #endif /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */ if (((int) asn_length > uint64sizelimit) || @@ -1917,7 +2108,7 @@ u_char * asn_build_unsigned_int64(u_char * data, size_t * datalength, u_char type, - const struct counter64 * cp, size_t countersize) + const struct counter64 *cp, size_t countersize) { /* * ASN.1 integer ::= 0x02 asnlength byte {byte}* @@ -1927,9 +2118,7 @@ asn_build_unsigned_int64(u_char * data, register u_long mask, mask2; int add_null_byte = 0; size_t intsize; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif if (countersize != sizeof(struct counter64)) { _asn_size_err("build uint64", countersize, @@ -2071,7 +2260,7 @@ u_char * asn_parse_signed_int64(u_char * data, size_t * datalength, u_char * type, - struct counter64 * cp, size_t countersize) + struct counter64 *cp, size_t countersize) { static const char *errpre = "parse int64"; const int int64sizelimit = (4 * 2) + 1; @@ -2084,13 +2273,32 @@ asn_parse_signed_int64(u_char * data, _asn_size_err(errpre, countersize, sizeof(struct counter64)); return NULL; } + + if (NULL == data || NULL == datalength || NULL == type || NULL == cp) { + ERROR_MSG("parse int64: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check - (errpre, bufp, data, asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } - DEBUGDUMPSETUP("recv", data, bufp - data); + /** need at least 2 bytes: ASN_OPAQUE_TAG1 and ASN_OPAQUE_I64 */ + if (asn_length < 2) { + _asn_short_err(errpre, asn_length, 2); + return NULL; + } + + DEBUGDUMPSETUP("recv", data, bufp - data + asn_length); if ((*type == ASN_OPAQUE) && (asn_length <= ASN_OPAQUE_COUNTER64_MX_BER_LEN) && (*bufp == ASN_OPAQUE_TAG1) && (*(bufp + 1) == ASN_OPAQUE_I64)) { @@ -2101,10 +2309,12 @@ asn_parse_signed_int64(u_char * data, /* * value is encoded as special format */ - bufp = asn_parse_length(bufp + 2, &asn_length); - if (_asn_parse_length_check("parse opaque int64", bufp, data, - asn_length, *datalength)) + *datalength = asn_length; + bufp = asn_parse_nlength(bufp+2, *datalength - 2, &asn_length); + if (NULL == bufp) { + _asn_short_err("parse opaque int64", *datalength - 2, asn_length); return NULL; + } } /* * this should always have been true until snmp gets int64 PDU types @@ -2123,7 +2333,7 @@ asn_parse_signed_int64(u_char * data, return NULL; } *datalength -= (int) asn_length + (bufp - data); - if (*bufp & 0x80) { + if ((asn_length > 0) && (*bufp & 0x80)) { low = 0xFFFFFFFFU; /* first byte bit 1 means start the data with 1s */ high = 0xFFFFFF; } @@ -2175,7 +2385,7 @@ u_char * asn_build_signed_int64(u_char * data, size_t * datalength, u_char type, - const struct counter64 * cp, size_t countersize) + const struct counter64 *cp, size_t countersize) { /* * ASN.1 integer ::= 0x02 asnlength byte {byte}* @@ -2185,9 +2395,7 @@ asn_build_signed_int64(u_char * data, u_long low; long high; /* MUST be signed because of CHECK_OVERFLOW_S(). */ size_t intsize; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif if (countersize != sizeof(struct counter64)) { _asn_size_err("build int64", countersize, @@ -2285,11 +2493,24 @@ asn_parse_float(u_char * data, _asn_size_err("parse float", floatsize, sizeof(float)); return NULL; } + + if (NULL == data || NULL == datalength || NULL == type || NULL == floatp) { + ERROR_MSG("parse float: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check("parse float", bufp, data, - asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } DEBUGDUMPSETUP("recv", data, bufp - data + asn_length); /* @@ -2302,11 +2523,12 @@ asn_parse_float(u_char * data, /* * value is encoded as special format */ - bufp = asn_parse_length(bufp + 2, &asn_length); - if (_asn_parse_length_check("parse opaque float", bufp, data, - asn_length, *datalength)) + *datalength = asn_length; + bufp = asn_parse_nlength(bufp+2, *datalength - 2, &asn_length); + if (NULL == bufp) { + _asn_short_err("parse opaque float", *datalength - 2, asn_length); return NULL; - + } /* * change type to Float */ @@ -2370,9 +2592,7 @@ asn_build_float(u_char * data, int intVal; u_char c[sizeof(float)]; } fu; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif if (floatsize != sizeof(float)) { _asn_size_err("build float", floatsize, sizeof(float)); @@ -2458,16 +2678,34 @@ asn_parse_double(u_char * data, _asn_size_err("parse double", doublesize, sizeof(double)); return NULL; } + + if (NULL == data || NULL == datalength || NULL == type || NULL == doublep) { + ERROR_MSG("parse double: NULL pointer"); + return NULL; + } + + /** need at least 2 bytes to work with: type, length (which might be 0) */ + if (*datalength < 2) { + _asn_short_err(errpre, *datalength, 2); + return NULL; + } + *type = *bufp++; - bufp = asn_parse_length(bufp, &asn_length); - if (_asn_parse_length_check("parse double", bufp, data, - asn_length, *datalength)) + bufp = asn_parse_nlength(bufp, *datalength - 1, &asn_length); + if (NULL == bufp) { + _asn_short_err(errpre, *datalength - 1, asn_length); return NULL; + } DEBUGDUMPSETUP("recv", data, bufp - data + asn_length); /* * the double is encoded as an opaque */ + /** need at least 2 bytes: ASN_OPAQUE_TAG1 and ASN_OPAQUE_DOUBLE */ + if ((*type == ASN_OPAQUE) && (asn_length < 2)) { + _asn_short_err(errpre, asn_length, 2); + return NULL; + } if ((*type == ASN_OPAQUE) && (asn_length == ASN_OPAQUE_DOUBLE_BER_LEN) && (*bufp == ASN_OPAQUE_TAG1) && (*(bufp + 1) == ASN_OPAQUE_DOUBLE)) { @@ -2475,10 +2713,12 @@ asn_parse_double(u_char * data, /* * value is encoded as special format */ - bufp = asn_parse_length(bufp + 2, &asn_length); - if (_asn_parse_length_check("parse opaque double", bufp, data, - asn_length, *datalength)) + *datalength = asn_length; + bufp = asn_parse_nlength(bufp+2, *datalength - 2, &asn_length); + if (NULL == bufp) { + _asn_short_err("parse opaque double", *datalength - 2, asn_length); return NULL; + } /* * change type to Double @@ -2546,9 +2786,7 @@ asn_build_double(u_char * data, int intVal[2]; u_char c[sizeof(double)]; } fu; -#ifndef NETSNMP_NO_DEBUGGING u_char *initdatap = data; -#endif if (doublesize != sizeof(double)) { _asn_size_err("build double", doublesize, sizeof(double)); @@ -2860,7 +3098,8 @@ asn_realloc_rbuild_string(u_char ** pkt, size_t * pkt_len, } *offset += strlength; - memcpy(*pkt + *pkt_len - *offset, str, strlength); + if (str) + memcpy(*pkt + *pkt_len - *offset, str, strlength); if (asn_realloc_rbuild_header (pkt, pkt_len, offset, r, type, strlength)) { @@ -3474,9 +3713,6 @@ asn_realloc_rbuild_signed_int64(u_char ** pkt, size_t * pkt_len, return 0; } - CHECK_OVERFLOW_S(high,14); - CHECK_OVERFLOW_U(low,14); - /* * Encode the low 4 bytes first. */ diff --git a/snmplib/asprintf.c b/snmplib/asprintf.c new file mode 100644 index 0000000..003ceb6 --- /dev/null +++ b/snmplib/asprintf.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +#ifndef HAVE_ASPRINTF + +#ifdef va_copy +#elif defined(__va_copy) +#define va_copy __va_copy +#else +#define va_copy(dest, src) memcpy(&dest, &src, sizeof(va_list)) +#endif + +NETSNMP_IMPORT +int vasprintf(char **strp, const char *fmt, va_list ap) +{ + va_list ap_copy; + char *str; + int len; + + va_copy(ap_copy, ap); + len = vsnprintf(NULL, 0, fmt, ap_copy); + va_end(ap_copy); + + if (len < 0) + return len; + + len++; + str = malloc(len); + *strp = str; + return str ? vsnprintf(str, len, fmt, ap) : -1; +} + +NETSNMP_IMPORT +int asprintf(char **strp, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start(arg, fmt); + done = vasprintf(strp, fmt, arg); + va_end(arg); + + return done; +} + +#endif diff --git a/snmplib/callback.c b/snmplib/callback.c index dfe537a..4b26ea0 100644 --- a/snmplib/callback.c +++ b/snmplib/callback.c @@ -20,26 +20,23 @@ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #if !defined(mingw32) && defined(HAVE_SYS_TIME_H) @@ -53,10 +50,10 @@ #include #include -netsnmp_feature_child_of(callbacks_all, libnetsnmp) +netsnmp_feature_child_of(callbacks_all, libnetsnmp); -netsnmp_feature_child_of(callback_count, callbacks_all) -netsnmp_feature_child_of(callback_list, callbacks_all) +netsnmp_feature_child_of(callback_count, callbacks_all); +netsnmp_feature_child_of(callback_list, callbacks_all); /* * the inline callback methods use major/minor to index into arrays. @@ -121,7 +118,7 @@ NETSNMP_STATIC_INLINE int _callback_lock(int major, int minor, const char* warn, int do_assert) { int lock_holded=0; - struct timeval lock_time = { 0, 1000 }; + NETSNMP_SELECT_TIMEVAL lock_time = { 0, 1000 }; #ifdef NETSNMP_PARANOID_LEVEL_HIGH if (major >= MAX_CALLBACK_IDS || minor >= MAX_CALLBACK_SUBIDS) { @@ -442,13 +439,16 @@ int snmp_unregister_callback(int major, int minor, SNMPCallback * target, void *arg, int matchargs) { - struct snmp_gen_callback *scp = thecallbacks[major][minor]; - struct snmp_gen_callback **prevNext = &(thecallbacks[major][minor]); + struct snmp_gen_callback *scp; + struct snmp_gen_callback **prevNext; int count = 0; if (major >= MAX_CALLBACK_IDS || minor >= MAX_CALLBACK_SUBIDS) return SNMPERR_GENERR; + scp = thecallbacks[major][minor]; + prevNext = &(thecallbacks[major][minor]); + if (_callback_need_init) init_callbacks(); diff --git a/snmplib/cert_util.c b/snmplib/cert_util.c index 246a6c9..a4611be 100644 --- a/snmplib/cert_util.c +++ b/snmplib/cert_util.c @@ -1,29 +1,40 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include #include -#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) -netsnmp_feature_child_of(cert_util_all, libnetsnmp) -netsnmp_feature_child_of(cert_util, cert_util_all) +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && NETSNMP_TRANSPORT_TLSBASE_DOMAIN +netsnmp_feature_child_of(cert_util_all, libnetsnmp); +netsnmp_feature_child_of(cert_util, cert_util_all); #ifdef NETSNMP_FEATURE_REQUIRE_CERT_UTIL -netsnmp_feature_require(container_directory) -netsnmp_feature_require(container_fifo) -netsnmp_feature_require(container_dup) -netsnmp_feature_require(container_free_all) -netsnmp_feature_require(subcontainer_find) - -netsnmp_feature_child_of(cert_map_remove, netsnmp_unused) -netsnmp_feature_child_of(cert_map_find, netsnmp_unused) -netsnmp_feature_child_of(tlstmparams_external, cert_util_all) -netsnmp_feature_child_of(tlstmparams_container, tlstmparams_external) -netsnmp_feature_child_of(tlstmparams_remove, tlstmparams_external) -netsnmp_feature_child_of(tlstmparams_find, tlstmparams_external) -netsnmp_feature_child_of(tlstmAddr_remove, netsnmp_unused) -netsnmp_feature_child_of(tlstmaddr_external, cert_util_all) -netsnmp_feature_child_of(tlstmaddr_container, tlstmaddr_external) -netsnmp_feature_child_of(tlstmAddr_get_serverId, tlstmaddr_external) - -netsnmp_feature_child_of(cert_fingerprints, cert_util_all) -netsnmp_feature_child_of(tls_fingerprint_build, cert_util_all) +netsnmp_feature_require(container_directory); +netsnmp_feature_require(container_fifo); +netsnmp_feature_require(container_dup); +netsnmp_feature_require(container_free_all); +netsnmp_feature_require(subcontainer_find); + +netsnmp_feature_child_of(cert_map_remove, netsnmp_unused); +netsnmp_feature_child_of(cert_map_find, netsnmp_unused); +netsnmp_feature_child_of(tlstmparams_external, cert_util_all); +netsnmp_feature_child_of(tlstmparams_container, tlstmparams_external); +netsnmp_feature_child_of(tlstmparams_remove, tlstmparams_external); +netsnmp_feature_child_of(tlstmparams_find, tlstmparams_external); +netsnmp_feature_child_of(tlstmAddr_remove, netsnmp_unused); +netsnmp_feature_child_of(tlstmaddr_external, cert_util_all); +netsnmp_feature_child_of(tlstmaddr_container, tlstmaddr_external); +netsnmp_feature_child_of(tlstmAddr_get_serverId, tlstmaddr_external); + +netsnmp_feature_child_of(cert_fingerprints, cert_util_all); +netsnmp_feature_child_of(tls_fingerprint_build, cert_util_all); #endif /* NETSNMP_FEATURE_REQUIRE_CERT_UTIL */ @@ -31,40 +42,36 @@ netsnmp_feature_child_of(tls_fingerprint_build, cert_util_all) #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -137,7 +144,7 @@ void netsnmp_key_free(netsnmp_key *key); static int _certindex_add( const char *dirname, int i ); -static int _time_filter(netsnmp_file *f, struct stat *idx); +static int _time_filter(const void *text, void *ctx); static void _init_tlstmCertToTSN(void); #define TRUSTCERT_CONFIG_TOKEN "trustCert" @@ -193,7 +200,6 @@ _setup_trusted_certs(void) return; } _trusted_certs->container_name = strdup("trusted certificates"); - _trusted_certs->free_item = (netsnmp_container_obj_func*) free; _trusted_certs->compare = (netsnmp_container_compare*) strcmp; } @@ -436,8 +442,7 @@ _new_cert(const char *dirname, const char *filename, int certType, return NULL; } - DEBUGMSGT(("9:cert:struct:new","new cert 0x%#lx for %s\n", (u_long)cert, - filename)); + DEBUGMSGT(("9:cert:struct:new","new cert 0x%p for %s\n", cert, filename)); cert->info.dir = strdup(dirname); cert->info.filename = strdup(filename); @@ -474,11 +479,13 @@ _new_key(const char *dirname, const char *filename) return NULL; } - if ((fstat.st_mode & S_IROTH) || (fstat.st_mode & S_IROTH)) { +#if !defined(_MSC_VER) && !defined(__MINGW32__) + if ((fstat.st_mode & S_IROTH) || (fstat.st_mode & S_IWOTH)) { snmp_log(LOG_ERR, "refusing to read world readable or writable key %s\n", fn); return NULL; } +#endif key = SNMP_MALLOC_TYPEDEF(netsnmp_key); if (NULL == key) { @@ -487,8 +494,7 @@ _new_key(const char *dirname, const char *filename) return NULL; } - DEBUGMSGT(("cert:key:struct:new","new key 0x%#lx for %s\n", (u_long)key, - filename)); + DEBUGMSGT(("cert:key:struct:new","new key %p for %s\n", key, filename)); key->info.type = NS_CERT_TYPE_KEY; key->info.dir = strdup(dirname); @@ -504,8 +510,8 @@ netsnmp_cert_free(netsnmp_cert *cert) if (NULL == cert) return; - DEBUGMSGT(("9:cert:struct:free","freeing cert 0x%#lx, %s (fp %s; CN %s)\n", - (u_long)cert, cert->info.filename ? cert->info.filename : "UNK", + DEBUGMSGT(("9:cert:struct:free","freeing cert %p, %s (fp %s; CN %s)\n", + cert, cert->info.filename ? cert->info.filename : "UNK", cert->fingerprint ? cert->fingerprint : "UNK", cert->common_name ? cert->common_name : "UNK")); @@ -529,8 +535,8 @@ netsnmp_key_free(netsnmp_key *key) if (NULL == key) return; - DEBUGMSGT(("cert:key:struct:free","freeing key 0x%#lx, %s\n", - (u_long)key, key->info.filename ? key->info.filename : "UNK")); + DEBUGMSGT(("cert:key:struct:free","freeing key %p, %s\n", + key, key->info.filename ? key->info.filename : "UNK")); SNMP_FREE(key->info.dir); SNMP_FREE(key->info.filename); @@ -694,9 +700,9 @@ _type_from_filename(const char *filename) /* * filter functions; return 1 to include file, 0 to exclude */ -static int -_cert_cert_filter(const char *filename) +static int _cert_cert_filter(const void *text, void *ctx) { + const char *filename = text; int len = strlen(filename); const char *pos; @@ -932,7 +938,8 @@ netsnmp_ocert_get(netsnmp_cert *cert) if (NULL != ocert) break; (void)BIO_reset(certbio); - /** FALLTHROUGH: check for PEM if DER didn't work */ + /* Check for PEM if DER didn't work */ + /* FALLTHROUGH */ case NS_CERT_TYPE_PEM: ocert = PEM_read_bio_X509_AUX(certbio, NULL, NULL, NULL); @@ -1310,7 +1317,7 @@ _add_certfile(const char* dirname, const char* filename, FILE *index) if (index) { /** filename = NAME_MAX = 255 */ - /** fingerprint = 60 */ + /** fingerprint max = 64*3=192 for sha512 */ /** common name / CN = 64 */ if (cert) fprintf(index, "c:%s %d %d %s '%s' '%s'\n", filename, @@ -1330,7 +1337,7 @@ _cert_read_index(const char *dirname, struct stat *dirstat) char *idxname, *pos; struct stat idx_stat; char tmpstr[SNMP_MAXPATH + 5], filename[NAME_MAX]; - char fingerprint[60+1], common_name[64+1], type_str[15]; + char fingerprint[EVP_MAX_MD_SIZE*3], common_name[64+1], type_str[15]; char subject[SNMP_MAXBUF_SMALL], hash_str[15]; int count = 0, type, hash, version; netsnmp_cert *cert; @@ -1372,8 +1379,7 @@ _cert_read_index(const char *dirname, struct stat *dirstat) */ newer = netsnmp_directory_container_read_some(NULL, dirname, - (netsnmp_directory_filter*) - _time_filter,(void*)&idx_stat, + _time_filter, &idx_stat, NETSNMP_DIR_NSFILE | NETSNMP_DIR_NSFILE_STATS); if (newer) { @@ -1399,7 +1405,7 @@ _cert_read_index(const char *dirname, struct stat *dirstat) /* * check index format version */ - fgets(tmpstr, sizeof(tmpstr), index); + NETSNMP_IGNORE_RESULT(fgets(tmpstr, sizeof(tmpstr), index)); pos = strrchr(tmpstr, ' '); if (pos) { ++pos; @@ -1409,7 +1415,8 @@ _cert_read_index(const char *dirname, struct stat *dirstat) DEBUGMSGT(("cert:index:add", "missing or wrong index format!\n")); fclose(index); SNMP_FREE(idxname); - return -1; + count = -1; + goto free_cert_container; } while (1) { if (NULL == fgets(tmpstr, sizeof(tmpstr), index)) @@ -1432,8 +1439,8 @@ _cert_read_index(const char *dirname, struct stat *dirstat) } type = atoi(type_str); hash = atoi(hash_str); - cert = (void*)_new_cert(dirname, filename, type, hash, fingerprint, - common_name, subject); + cert = _new_cert(dirname, filename, type, hash, fingerprint, + common_name, subject); if (cert && 0 == CONTAINER_INSERT(found, cert)) ++count; else { @@ -1481,6 +1488,8 @@ _cert_read_index(const char *dirname, struct stat *dirstat) count)); } } + +free_cert_container: if (count < 0) CONTAINER_FREE_ALL(found, NULL); CONTAINER_FREE(found); @@ -1535,8 +1544,7 @@ _add_certdir(const char *dirname) */ cert_container = netsnmp_directory_container_read_some(NULL, dirname, - (netsnmp_directory_filter*) - &_cert_cert_filter, NULL, + _cert_cert_filter, NULL, NETSNMP_DIR_RELATIVE_PATH | NETSNMP_DIR_EMPTY_OK ); if (NULL == cert_container) { @@ -1605,6 +1613,8 @@ _cert_indexes_load(void) subdirs[0] = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CERT_EXTRA_SUBDIR); confpath_copy = strdup(confpath); + if (!confpath_copy) + return; for ( dir = strtok_r(confpath_copy, ENV_SEPARATOR, &st); dir; dir = strtok_r(NULL, ENV_SEPARATOR, &st)) { @@ -1725,7 +1735,7 @@ netsnmp_fp_lowercase_and_strip_colon(char *fp) for (++pos; *pos; ++pos) { if (':' == *pos) continue; - *dest++ = isalpha(0xFF & *pos) ? tolower(0xFF & *pos) : *pos; + *dest++ = tolower(0xFF & *pos); } *dest = *pos; /* nul termination */ } @@ -1736,8 +1746,8 @@ netsnmp_cert_find(int what, int where, void *hint) netsnmp_cert *result = NULL; char *fp, *hint_str; - DEBUGMSGT(("cert:find:params", "looking for %s(%d) in %s(0x%x), hint %lu\n", - _mode_str(what), what, _where_str(where), where, (u_long)hint)); + DEBUGMSGT(("cert:find:params", "looking for %s(%d) in %s(0x%x), hint %p\n", + _mode_str(what), what, _where_str(where), where, hint)); if (NS_CERTKEY_DEFAULT == where) { @@ -1965,7 +1975,7 @@ netsnmp_tls_fingerprint_build(int hash_type, const char *hex_fp, int realloc) { int hex_fp_len, rc; - size_t tls_fp_size; + size_t tls_fp_size = *tls_fp_len; size_t offset; netsnmp_require_ptr_LRV( hex_fp, SNMPERR_GENERR ); @@ -2069,7 +2079,7 @@ netsnmp_cert_trust_ca(SSL_CTX *ctx, netsnmp_cert *thiscert) DEBUGMSGTL(("cert:trust_ca", " up one to %p\n", thiscert)); } - /* Add the found top lever certificate to the store */ + /* Add the found top level certificate to the store */ return netsnmp_cert_trust(ctx, thiscert); } @@ -2131,7 +2141,7 @@ static netsnmp_cert * _cert_find_fp(const char *fingerprint) { netsnmp_cert cert, *result = NULL; - char fp[EVP_MAX_MD_SIZE]; + char fp[EVP_MAX_MD_SIZE*3]; if (NULL == fingerprint) return NULL; @@ -2383,8 +2393,11 @@ _key_find_fn(const char *filename) #endif static int -_time_filter(netsnmp_file *f, struct stat *idx) +_time_filter(const void *text, void *ctx) { + const netsnmp_file *f = text; + struct stat *idx = ctx; + /** include if mtime or ctime newer than index mtime */ if (f && idx && f->stats && ((f->stats->st_mtime >= idx->st_mtime) || @@ -2973,7 +2986,7 @@ netsnmp_tlstmParams_create(const char *name, int hashType, const char *fp, stp->hashType = hashType; if (fp) stp->fingerprint = strdup(fp); - DEBUGMSGT(("9:tlstmParams:create", "0x%lx: %s\n", (u_long)stp, + DEBUGMSGT(("9:tlstmParams:create", "%p: %s\n", stp, stp->name ? stp->name : "null")); return stp; @@ -2985,7 +2998,7 @@ netsnmp_tlstmParams_free(snmpTlstmParams *stp) if (NULL == stp) return; - DEBUGMSGT(("9:tlstmParams:release", "0x%lx %s\n", (u_long)stp, + DEBUGMSGT(("9:tlstmParams:release", "%p %s\n", stp, stp->name ? stp->name : "null")); SNMP_FREE(stp->name); SNMP_FREE(stp->fingerprint); @@ -3050,8 +3063,7 @@ netsnmp_tlstmParams_add(snmpTlstmParams *stp) if (NULL == stp) return -1; - DEBUGMSGTL(("tlstmParams:add", "adding entry 0x%lx %s\n", (u_long)stp, - stp->name)); + DEBUGMSGTL(("tlstmParams:add", "adding entry %p %s\n", stp, stp->name)); if (CONTAINER_INSERT(_tlstmParams, stp) != 0) { snmp_log(LOG_ERR, "error inserting tlstmParams %s", stp->name); @@ -3069,7 +3081,7 @@ netsnmp_tlstmParams_remove(snmpTlstmParams *stp) if (NULL == stp) return -1; - DEBUGMSGTL(("tlstmParams:remove", "removing entry 0x%lx %s\n", (u_long)stp, + DEBUGMSGTL(("tlstmParams:remove", "removing entry %p %s\n", stp, stp->name)); if (CONTAINER_REMOVE(_tlstmParams, stp) != 0) { @@ -3122,7 +3134,7 @@ _find_tlstmParams_fingerprint(const char *name) if ((NULL == result) || (NULL == result->fingerprint)) return NULL; - return strdup(result->fingerprint); + return result->fingerprint; } /* * END snmpTlstmParmsTable data @@ -3208,7 +3220,18 @@ netsnmp_tlstmAddr_restore_common(char **line, char *name, size_t *name_len, char *id, size_t *id_len, char *fp, size_t *fp_len, u_char *ht) { - size_t fp_len_save = *fp_len; + size_t fp_len_save = *fp_len - 1; + + /* + * Calling this function with name == NULL, fp == NULL or id == NULL would + * trigger a memory leak. + */ + if (!name || !fp || !id || *name_len == 0 || *id_len == 0 || *fp_len == 0) + return -1; + + (*name_len)--; + (*fp_len)--; + (*id_len)--; *line = read_config_read_octet_string(*line, (u_char **)&name, name_len); if (NULL == *line) { @@ -3261,8 +3284,8 @@ netsnmp_tlstmAddr_add(snmpTlstmAddr *entry) if (!entry) return -1; - DEBUGMSGTL(("tlstmAddr:add", "adding entry 0x%lx %s %s\n", - (u_long)entry, entry->name, entry->fingerprint)); + DEBUGMSGTL(("tlstmAddr:add", "adding entry %p %s %s\n", + entry, entry->name, entry->fingerprint)); if (CONTAINER_INSERT(_tlstmAddr, entry) != 0) { snmp_log(LOG_ERR, "could not insert addr %s", entry->name); netsnmp_tlstmAddr_free(entry); @@ -3364,4 +3387,4 @@ netsnmp_tlstmAddr_get_serverId(const char *name) netsnmp_feature_unused(cert_util); #endif /* NETSNMP_FEATURE_REMOVE_CERT_UTIL */ netsnmp_feature_unused(cert_util); -#endif /* defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) */ +#endif /* defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && NETSNMP_TRANSPORT_TLSBASE_DOMAIN */ diff --git a/snmplib/check_varbind.c b/snmplib/check_varbind.c index 12b7a52..dd7d65b 100644 --- a/snmplib/check_varbind.c +++ b/snmplib/check_varbind.c @@ -5,21 +5,24 @@ #include -netsnmp_feature_child_of(check_varbind_all, libnetsnmp) - -netsnmp_feature_child_of(check_vb_range, check_varbind_all) -netsnmp_feature_child_of(check_vb_size_range, check_varbind_all) -netsnmp_feature_child_of(check_vb_uint, check_varbind_all) -netsnmp_feature_child_of(check_vb_storagetype, check_varbind_all) -netsnmp_feature_child_of(check_vb_oid, check_varbind_all) -netsnmp_feature_child_of(check_vb_type_and_max_size, check_varbind_all) -netsnmp_feature_child_of(check_vb_type_and_max_size, check_varbind_all) -netsnmp_feature_child_of(check_vb_rowstatus_with_storagetype, check_varbind_all) -netsnmp_feature_child_of(check_vb_truthvalue, check_varbind_all) +netsnmp_feature_child_of(check_varbind_all, libnetsnmp); + +netsnmp_feature_child_of(check_vb_range, check_varbind_all); +netsnmp_feature_child_of(check_vb_size_range, check_varbind_all); +netsnmp_feature_child_of(check_vb_uint, check_varbind_all); +netsnmp_feature_child_of(check_vb_storagetype, check_varbind_all); +netsnmp_feature_child_of(check_vb_oid, check_varbind_all); +netsnmp_feature_child_of(check_vb_type_and_max_size, check_varbind_all); +netsnmp_feature_child_of(check_vb_type_and_max_size, check_varbind_all); +netsnmp_feature_child_of(check_vb_rowstatus_with_storagetype, check_varbind_all); +netsnmp_feature_child_of(check_vb_truthvalue, check_varbind_all); #ifdef NETSNMP_FEATURE_REQUIRE_CHECK_VB_ROWSTATUS_WITH_STORAGETYPE -netsnmp_feature_require(check_rowstatus_with_storagetype_transition) +netsnmp_feature_require(check_rowstatus_with_storagetype_transition); #endif /* NETSNMP_FEATURE_REQUIRES_CHECK_VB_ROWSTATUS_WITH_STORAGETYPE */ +#ifdef NETSNMP_FEATURE_REQUIRE_CHECK_VB_STORAGETYPE +netsnmp_feature_require(check_storage_transition); +#endif /* NETSNMP_FEATURE_REQUIRE_CHECK_VB_STORAGETYPE */ NETSNMP_INLINE int diff --git a/snmplib/closedir.c b/snmplib/closedir.c index 8c4c50e..6891ed5 100644 --- a/snmplib/closedir.c +++ b/snmplib/closedir.c @@ -7,6 +7,7 @@ #include #include #include +#include /* * free the memory allocated by opendir diff --git a/snmplib/container.c b/snmplib/container.c index b2ac97e..cb9d9bb 100644 --- a/snmplib/container.c +++ b/snmplib/container.c @@ -7,6 +7,11 @@ * Copyright (C) 2007 Apple, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include @@ -15,24 +20,27 @@ #include #include #include +#include "factory.h" + +#include -netsnmp_feature_child_of(container_all, libnetsnmp) +netsnmp_feature_child_of(container_all, libnetsnmp); -netsnmp_feature_child_of(container_factories, container_all) -netsnmp_feature_child_of(container_types, container_all) -netsnmp_feature_child_of(container_compare, container_all) -netsnmp_feature_child_of(container_dup, container_all) -netsnmp_feature_child_of(container_free_all, container_all) -netsnmp_feature_child_of(subcontainer_find, container_all) +netsnmp_feature_child_of(container_factories, container_all); +netsnmp_feature_child_of(container_types, container_all); +netsnmp_feature_child_of(container_compare, container_all); +netsnmp_feature_child_of(container_dup, container_all); +netsnmp_feature_child_of(container_free_all, container_all); +netsnmp_feature_child_of(subcontainer_find, container_all); -netsnmp_feature_child_of(container_ncompare_cstring, container_compare) -netsnmp_feature_child_of(container_compare_mem, container_compare) -netsnmp_feature_child_of(container_compare_long, container_compare) -netsnmp_feature_child_of(container_compare_ulong, container_compare) -netsnmp_feature_child_of(container_compare_int32, container_compare) -netsnmp_feature_child_of(container_compare_uint32, container_compare) +netsnmp_feature_child_of(container_ncompare_cstring, container_compare); +netsnmp_feature_child_of(container_compare_mem, container_compare); +netsnmp_feature_child_of(container_compare_long, container_compare); +netsnmp_feature_child_of(container_compare_ulong, container_compare); +netsnmp_feature_child_of(container_compare_int32, container_compare); +netsnmp_feature_child_of(container_compare_uint32, container_compare); -netsnmp_feature_child_of(container_find_factory, container_factories) +netsnmp_feature_child_of(container_find_factory, container_factories); /** @defgroup container container */ @@ -204,8 +212,10 @@ netsnmp_container_find_factory(const char *type_list) return NULL; list = strdup(type_list); + if (!list) + return NULL; entry = strtok_r(list, ":", &st); - while(entry) { + while (entry) { f = netsnmp_container_get_factory(entry); if (NULL != f) break; @@ -242,8 +252,10 @@ netsnmp_container_find_ct(const char *type_list) return NULL; list = strdup(type_list); + if (!list) + return NULL; entry = strtok_r(list, ":", &st); - while(entry) { + while (entry) { ct = netsnmp_container_get_ct(entry); if (NULL != ct) break; @@ -273,7 +285,15 @@ netsnmp_container_get(const char *type) return NULL; } -/*------------------------------------------------------------------ +/** + * Allocate a new container of a given type. + * + * @param type A colon-separated string with the container name, followed by + * a colon-separated list of container types. + * + * Creates a new container. The type of the container is the first type + * mentioned in @type for which a factory has been registered with + * netsnmp_container_register_with_compare() or netsnmp_container_register(). */ netsnmp_container * netsnmp_container_find(const char *type) @@ -282,13 +302,16 @@ netsnmp_container_find(const char *type) netsnmp_container *c = ct ? (netsnmp_container *)(ct->factory->produce()) : NULL; /* - * provide default compare + * provide default compare and ncompare */ if (c) { if (ct->compare) c->compare = ct->compare; else if (NULL == c->compare) c->compare = netsnmp_compare_netsnmp_index; + + if (NULL == c->ncompare) + c->ncompare = netsnmp_ncompare_netsnmp_index; } return c; @@ -314,10 +337,6 @@ netsnmp_container_add_index(netsnmp_container *primary, new_index->prev = curr; } -/*------------------------------------------------------------------ - * These functions should EXACTLY match the inline version in - * container.h. If you change one, change them both. - */ int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k) { while(x && x->insert_filter && x->insert_filter(x,k) == 1) @@ -337,10 +356,6 @@ int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k) return 0; } -/*------------------------------------------------------------------ - * These functions should EXACTLY match the inline version in - * container.h. If you change one, change them both. - */ int CONTAINER_INSERT(netsnmp_container* x, const void* k) { /** start at first container */ @@ -349,10 +364,24 @@ int CONTAINER_INSERT(netsnmp_container* x, const void* k) return CONTAINER_INSERT_HELPER(x, k); } -/*------------------------------------------------------------------ - * These functions should EXACTLY match the inline version in - * container.h. If you change one, change them both. - */ +int CONTAINER_INSERT_BEFORE(netsnmp_container *x, size_t pos, void *k) +{ + int rc = 0; + + if (NULL == x || NULL == x->insert_before) { + snmp_log(LOG_ERR, "container '%s' does not support insert_before\n", + x && x->container_name ? x->container_name : ""); + return -1; + } + + rc = x->insert_before(x, pos, k); + if (rc < 0) + snmp_log(LOG_ERR, "error on container '%s' insert_before %" NETSNMP_PRIz "d (%d)\n", + x->container_name ? x->container_name : "", pos, rc); + + return rc; +} + int CONTAINER_REMOVE(netsnmp_container *x, const void *k) { int rc2, rc = 0; @@ -374,10 +403,56 @@ int CONTAINER_REMOVE(netsnmp_container *x, const void *k) return rc; } -/*------------------------------------------------------------------ - * These functions should EXACTLY match the function version in - * container.c. If you change one, change them both. - */ +int CONTAINER_REMOVE_AT(netsnmp_container *x, size_t pos, void **k) +{ + int rc = 0; + netsnmp_container *orig = x; + + if (NULL == x || NULL == x->remove_at) { + snmp_log(LOG_ERR, "container '%s' does not support REMOVE_AT\n", + x && x->container_name ? x->container_name : ""); + return -1; + } + + /** start at given container */ + rc = x->remove_at(x, pos, k); + if (rc < 0) { + snmp_log(LOG_ERR, "error on container '%s' remove_at %" NETSNMP_PRIz "d (%d)\n", + x->container_name ? x->container_name : "", pos, rc); + return rc; + } else if (NULL == k || NULL == *k) + return rc; + + /** remove k from any other containers */ + while(x->prev) + x = x->prev; + for(; x; x = x->next) { + if (x == orig) + continue; + x->remove(x,*k); /** ignore remove errors in other containers */ + } + return rc; +} + +int CONTAINER_GET_AT(netsnmp_container *x, size_t pos, void **k) +{ + int rc = 0; + + if (NULL == x || NULL == x->get_at) { + snmp_log(LOG_ERR, "container '%s' does not support GET_AT\n", + x && x->container_name ? x->container_name : ""); + return -1; + } + + /** start at given container */ + rc = x->get_at(x, pos, k); + if (rc < 0) + snmp_log(LOG_ERR, "error on container '%s' get_at %" NETSNMP_PRIz "d (%d)\n", + x->container_name ? x->container_name : "", pos, rc); + + return rc; +} + #ifndef NETSNMP_FEATURE_REMOVE_CONTAINER_DUP netsnmp_container *CONTAINER_DUP(netsnmp_container *x, void *ctx, u_int flags) { @@ -390,14 +465,13 @@ netsnmp_container *CONTAINER_DUP(netsnmp_container *x, void *ctx, u_int flags) } #endif /* NETSNMP_FEATURE_REMOVE_CONTAINER_DUP */ -/*------------------------------------------------------------------ - * These functions should EXACTLY match the inline version in - * container.h. If you change one, change them both. - */ int CONTAINER_FREE(netsnmp_container *x) { int rc2, rc = 0; - + + if (!x) + return rc; + /** start at last container */ while(x->next) x = x->next; @@ -419,10 +493,6 @@ int CONTAINER_FREE(netsnmp_container *x) 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. @@ -454,10 +524,6 @@ void CONTAINER_FREE_ALL(netsnmp_container *x, void *c) #endif /* NETSNMP_FEATURE_REMOVE_CONTAINER_FREE_ALL */ #ifndef NETSNMP_FEATURE_REMOVE_SUBCONTAINER_FIND -/*------------------------------------------------------------------ - * 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 */ @@ -530,64 +596,62 @@ netsnmp_container_data_dup(netsnmp_container *dup, netsnmp_container *c) * */ int -netsnmp_compare_netsnmp_index(const void *lhs, const void *rhs) +netsnmp_compare_netsnmp_index(const void *lhs_arg, const void *rhs_arg) { + const netsnmp_index *lhs = lhs_arg; + const netsnmp_index *rhs = rhs_arg; int rc; - netsnmp_assert((NULL != lhs) && (NULL != rhs)); + + netsnmp_assert(lhs && rhs); DEBUGIF("compare:index") { DEBUGMSGT(("compare:index", "compare ")); - DEBUGMSGSUBOID(("compare:index", ((const netsnmp_index *) lhs)->oids, - ((const netsnmp_index *) lhs)->len)); + DEBUGMSGSUBOID(("compare:index", lhs->oids, lhs->len)); DEBUGMSG(("compare:index", " to ")); - DEBUGMSGSUBOID(("compare:index", ((const netsnmp_index *) rhs)->oids, - ((const netsnmp_index *) rhs)->len)); + DEBUGMSGSUBOID(("compare:index", rhs->oids, rhs->len)); DEBUGMSG(("compare:index", "\n")); } - rc = snmp_oid_compare(((const netsnmp_index *) lhs)->oids, - ((const netsnmp_index *) lhs)->len, - ((const netsnmp_index *) rhs)->oids, - ((const netsnmp_index *) rhs)->len); + rc = snmp_oid_compare(lhs->oids, lhs->len, rhs->oids, rhs->len); DEBUGMSGT(("compare:index", "result was %d\n", rc)); return rc; } int -netsnmp_ncompare_netsnmp_index(const void *lhs, const void *rhs) +netsnmp_ncompare_netsnmp_index(const void *lhs_arg, const void *rhs_arg) { + const netsnmp_index *lhs = lhs_arg; + const netsnmp_index *rhs = rhs_arg; int rc; - netsnmp_assert((NULL != lhs) && (NULL != rhs)); + + netsnmp_assert(lhs && rhs); DEBUGIF("compare:index") { DEBUGMSGT(("compare:index", "compare ")); - DEBUGMSGSUBOID(("compare:index", ((const netsnmp_index *) lhs)->oids, - ((const netsnmp_index *) lhs)->len)); + DEBUGMSGSUBOID(("compare:index", lhs->oids, lhs->len)); DEBUGMSG(("compare:index", " to ")); - DEBUGMSGSUBOID(("compare:index", ((const netsnmp_index *) rhs)->oids, - ((const netsnmp_index *) rhs)->len)); + DEBUGMSGSUBOID(("compare:index", rhs->oids, rhs->len)); DEBUGMSG(("compare:index", "\n")); } - rc = snmp_oid_ncompare(((const netsnmp_index *) lhs)->oids, - ((const netsnmp_index *) lhs)->len, - ((const netsnmp_index *) rhs)->oids, - ((const netsnmp_index *) rhs)->len, - ((const netsnmp_index *) rhs)->len); + rc = snmp_oid_ncompare(lhs->oids, lhs->len, rhs->oids, rhs->len, rhs->len); DEBUGMSGT(("compare:index", "result was %d\n", rc)); return rc; } int -netsnmp_compare_cstring(const void * lhs, const void * rhs) +netsnmp_compare_cstring(const void *lhs_arg, const void *rhs_arg) { - return strcmp(((const container_type*)lhs)->name, - ((const container_type*)rhs)->name); + const container_type *lhs = lhs_arg; + const container_type *rhs = rhs_arg; + + return strcmp(lhs->name, rhs->name); } #ifndef NETSNMP_FEATURE_REMOVE_CONTAINER_NCOMPARE_CSTRING int -netsnmp_ncompare_cstring(const void * lhs, const void * rhs) +netsnmp_ncompare_cstring(const void *lhs_arg, const void *rhs_arg) { - return strncmp(((const container_type*)lhs)->name, - ((const container_type*)rhs)->name, - strlen(((const container_type*)rhs)->name)); + const container_type *lhs = lhs_arg; + const container_type *rhs = rhs_arg; + + return strncmp(lhs->name, rhs->name, strlen(rhs->name)); } #endif /* NETSNMP_FEATURE_REMOVE_CONTAINER_NCOMPARE_CSTRING */ @@ -710,5 +774,5 @@ netsnmp_container_simple_free(void *data, void *context) DEBUGMSGTL(("verbose:container", "netsnmp_container_simple_free) called for %p/%p\n", data, context)); - free((void*)data); /* SNMP_FREE wasted on param */ + free(data); /* SNMP_FREE wasted on param */ } diff --git a/snmplib/container_binary_array.c b/snmplib/container_binary_array.c index 0f5cf62..9f07943 100644 --- a/snmplib/container_binary_array.c +++ b/snmplib/container_binary_array.c @@ -1,25 +1,32 @@ /* * container_binary_array.c - * $Id$ * * see comments in header file. * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -32,6 +39,7 @@ #include #include #include +#include "factory.h" typedef struct binary_array_table_s { size_t max_size; /* Size of the current data table */ @@ -48,48 +56,6 @@ typedef struct binary_array_iterator_s { static netsnmp_iterator *_ba_iterator_get(netsnmp_container *c); -/********************************************************************** - * - * - * - */ -static void -array_qsort(void **data, int first, int last, netsnmp_container_compare *f) -{ - int i, j; - void *mid, *tmp; - - i = first; - j = last; - mid = data[(first+last)/2]; - - do { - while (i < last && (*f)(data[i], mid) < 0) - ++i; - while (j > first && (*f)(mid, data[j]) < 0) - --j; - - if(i < j) { - tmp = data[i]; - data[i] = data[j]; - data[j] = tmp; - ++i; - --j; - } - else if (i == j) { - ++i; - --j; - break; - } - } while(i <= j); - - if (j > first) - array_qsort(data, first, j, f); - - if (i < last) - array_qsort(data, i, last, f); -} - static int Sort_Array(netsnmp_container *c) { @@ -104,8 +70,7 @@ Sort_Array(netsnmp_container *c) /* * Sort the table */ - if (t->count > 1) - array_qsort(t->data, 0, t->count - 1, c->compare); + qsort(t->data, t->count, sizeof(void *), c->compare); t->dirty = 0; /* @@ -134,27 +99,27 @@ linear_search(const void *val, netsnmp_container *c) for (; pos < t->count; ++pos) { if (c->compare(t->data[pos], val) == 0) - break; + return pos; } - if (pos >= t->count) - return -1; - - return pos; + return -1; } static int -binary_search(const void *val, netsnmp_container *c, int exact) +binary_search(const void *val, netsnmp_container *c, int exact, size_t *next) { binary_array_table *t = (binary_array_table*)c->container_data; size_t len = t->count; size_t half; - size_t middle = 0; size_t first = 0; - int result = 0; + size_t middle = 0; /* init not needed; keeps compiler happy */ + int result = 0; /* init not needed; keeps compiler happy */ - if (!len) + if (!len) { + if (NULL != next) + *next = 0; return -1; + } if (c->flags & CONTAINER_KEY_UNSORTED) { if (!exact) { @@ -170,39 +135,45 @@ binary_search(const void *val, netsnmp_container *c, int exact) while (len > 0) { half = len >> 1; - middle = first; - middle += half; - if ((result = - c->compare(t->data[middle], val)) < 0) { - first = middle; - ++first; + middle = first + half; + if ((result = c->compare(t->data[middle], val)) < 0) { + first = middle + 1; len = len - half - 1; + } else if (result == 0) { + first = middle; + break; } else { - if(result == 0) { - first = middle; - break; - } len = half; } } - if (first >= t->count) + if (first >= t->count) { + if (exact && NULL != next) + *next = t->count; return -1; + } - if(first != middle) { + if (first != middle) { /* last compare wasn't against first, so get actual result */ result = c->compare(t->data[first], val); } if(result == 0) { - if (!exact) { - if (++first == t->count) - first = -1; - } - } - else { - if(exact) + if (exact && NULL != next) + *next = first+1; + else if (!exact && ++first == t->count) { + if (NULL != next) + *next = first; first = -1; + } + } else if(exact) { + if (NULL != next) { + if (result > 0) + *next = first; + else + *next = t->count; + } + first = -1; } return first; @@ -234,20 +205,35 @@ netsnmp_binary_array_release(netsnmp_container *c) SNMP_FREE(c); } +/** + * Set or test the options of a binary array container. + * @param c: Container. + * @param set: Set (1) or test (0). + * @param flags: Zero or more CONTAINER_KEY_* flags. + */ int netsnmp_binary_array_options_set(netsnmp_container *c, int set, u_int flags) { #define BA_FLAGS (CONTAINER_KEY_ALLOW_DUPLICATES|CONTAINER_KEY_UNSORTED) if (set) { - if ((flags & BA_FLAGS) == flags) + if ((flags & BA_FLAGS) == flags) { + /** if turning off unsorted, do sort */ + int sort = ((c->flags & CONTAINER_KEY_UNSORTED) && + ! (flags & CONTAINER_KEY_UNSORTED)); c->flags = flags; - else - flags = (u_int)-1; /* unsupported flag */ - } - else + if (sort) { + binary_array_table *t = (binary_array_table*)c->container_data; + t->dirty = 1; /* force sort */ + Sort_Array(c); + } + return flags; + } else { + return -1; /* unsupported flag */ + } + } else { return ((c->flags & flags) == flags); - return flags; + } } NETSNMP_STATIC_INLINE size_t @@ -282,7 +268,7 @@ netsnmp_binary_array_get(netsnmp_container *c, const void *key, int exact) * if there is a key, search. Otherwise default is 0; */ if (key) { - if ((index = binary_search(key, c, exact)) == -1) + if ((index = binary_search(key, c, exact, NULL)) == -1) return NULL; if (!exact && c->flags & CONTAINER_KEY_ALLOW_DUPLICATES) { @@ -307,6 +293,47 @@ netsnmp_binary_array_get(netsnmp_container *c, const void *key, int exact) return t->data[index]; } +static int +netsnmp_binary_array_get_at(netsnmp_container *c, size_t pos, void **entry) +{ + binary_array_table *t = (binary_array_table*)c->container_data; + + /* + * if there is no data, return NULL; + */ + if (!t->count || pos >= t->count || NULL == entry) + return -1; + + *entry = t->data[pos]; + + return 0; +} + +/** + * Returns 1 if and only if the elements in @c are sorted in ascending order. + * + * To do: stop calling this function after + * https://github.com/net-snmp/net-snmp/issues/107 and + * https://github.com/net-snmp/net-snmp/issues/293 have been fixed. + */ +static int _ba_is_sorted(const netsnmp_container *c) +{ + /* + * The code below has been commented out because it negatively affects + * performance. + */ +#if 0 + const binary_array_table *t = c->container_data; + int i; + + for (i = 0; i + 1 < t->count; ++i) + if (c->compare(t->data[i], t->data[i + 1]) > 0) + return 0; +#endif + + return 1; +} + int netsnmp_binary_array_remove_at(netsnmp_container *c, size_t index, void **save) { @@ -319,7 +346,7 @@ netsnmp_binary_array_remove_at(netsnmp_container *c, size_t index, void **save) * if there is no data, return NULL; */ if (!t->count) - return 0; + return -1; /* * find old data and save it, if ptr provided @@ -341,8 +368,11 @@ netsnmp_binary_array_remove_at(netsnmp_container *c, size_t index, void **save) ++c->sync; } + netsnmp_assert(t->dirty || _ba_is_sorted(c)); + return 0; } + int netsnmp_binary_array_remove(netsnmp_container *c, const void *key, void **save) { @@ -367,7 +397,7 @@ netsnmp_binary_array_remove(netsnmp_container *c, const void *key, void **save) /* * search */ - if ((index = binary_search(key, c, 1)) == -1) + if ((index = binary_search(key, c, 1, NULL)) == -1) return -1; return netsnmp_binary_array_remove_at(c, (size_t)index, save); @@ -407,61 +437,130 @@ netsnmp_binary_array_clear(netsnmp_container *c, ++c->sync; } -NETSNMP_STATIC_INLINE int -netsnmp_binary_array_insert(netsnmp_container *c, const void *entry) +static int +_ba_resize_check(binary_array_table *t) { - binary_array_table *t = (binary_array_table*)c->container_data; - int was_dirty = 0; + size_t new_max; + void ** new_data; + if (t->max_size > t->count) + return 0; /* resize not needed */ + /* - * check for duplicates + * Table is full, so extend it to double the size, or use 10 elements + * if it is empty. */ - if (! (c->flags & CONTAINER_KEY_ALLOW_DUPLICATES)) { - was_dirty = t->dirty; - if (NULL != netsnmp_binary_array_get(c, entry, 1)) { - DEBUGMSGTL(("container","not inserting duplicate key\n")); - return -1; - } + new_max = t->max_size > 0 ? 2 * t->max_size : 10; + new_data = (void**) realloc(t->data, new_max * sizeof(void*)); + if (new_data == NULL) { + snmp_log(LOG_ERR, "malloc failed in _ba_resize_check\n"); + return -1; /* error */ } - - /* - * check if we need to resize the array - */ - if (t->max_size <= t->count) { - /* - * Table is full, so extend it to double the size, or use 10 elements - * if it is empty. - */ - size_t const new_max = t->max_size > 0 ? 2 * t->max_size : 10; - void ** const new_data = - (void**) realloc(t->data, new_max * sizeof(void*)); - if (new_data == NULL) - return -1; + memset(new_data + t->max_size, 0x0, + (new_max - t->max_size) * sizeof(void*)); + + t->data = new_data; + t->max_size = new_max; - memset(new_data + t->max_size, 0x0, - (new_max - t->max_size) * sizeof(void*)); + return 1; /* resized */ +} + +static int +netsnmp_binary_array_insert_before(netsnmp_container *c, size_t index, + const void *entry, int dirty) +{ + binary_array_table *t = (binary_array_table*)c->container_data; + + if (NULL == entry) + return -1; - t->data = new_data; - t->max_size = new_max; + if (index > t->count) { + DEBUGMSGTL(("container:insert:before", "index out of range\n")); + return -1; } + /* + * check if we need to resize the array + */ + _ba_resize_check(t); + + netsnmp_assert(t->count < t->max_size); + /* - * Insert the new entry into the data array + * shift array */ - t->data[t->count++] = NETSNMP_REMOVE_CONST(void *, entry); - t->dirty = 1; + memmove(&t->data[index+1], &t->data[index], + sizeof(void*) * (t->count - index)); /* - * if array was dirty before we called get, sync was incremented when - * get called SortArray. If we didn't call get or the array wasn't dirty, - * bump sync now. + * Insert the new entry into the data array */ - if (!was_dirty) - ++c->sync; + t->data[index] = NETSNMP_REMOVE_CONST(void *, entry); + ++t->count; + + netsnmp_assert(index < t->count); + netsnmp_assert(t->count <= t->max_size); + + if (dirty) + t->dirty = 1; + + netsnmp_assert(t->dirty || _ba_is_sorted(c)); + + ++c->sync; return 0; } +NETSNMP_STATIC_INLINE int +netsnmp_binary_array_insert(netsnmp_container *c, const void *const_entry) +{ + binary_array_table *t = (binary_array_table*)c->container_data; + const int duplicates_allowed = c->flags & CONTAINER_KEY_ALLOW_DUPLICATES; + const int sorted = !(c->flags & CONTAINER_KEY_UNSORTED); + int i = -2; + size_t next, pos; + void *entry = NETSNMP_REMOVE_CONST(void *, const_entry); + + if (NULL == entry) + return -1; + + /* + * check key if we have at least 1 item and duplicates aren't allowed + */ + if (!duplicates_allowed && t->count) { + i = binary_search(entry, c, 1, &next); + if (i >= 0) { + DEBUGMSGTL(("container","not inserting duplicate key\n")); + return -1; + } + } + + /* + * if unsorted, just add at the end + */ + if (!sorted) { + pos = t->count; + } else { + /** if we haven't searched for key yet, do it now */ + if (-2 == i) { + if (0 == t->count) { + next = 0; + i = -1; + } else { + i = binary_search(entry, c, 1, &next); + } + } + + pos = next; + /* if key found, advance past any duplicates */ + if (duplicates_allowed && i >= 0) + while (pos < t->count && c->compare(t->data[pos], entry) == 0) + ++pos; + } + + return netsnmp_binary_array_insert_before(c, pos, entry, !sorted); +} + /********************************************************************** * * Special case support for subsets @@ -485,11 +584,9 @@ binary_search_for_start(netsnmp_index *val, netsnmp_container *c) while (len > 0) { half = len >> 1; - middle = first; - middle += half; + middle = first + half; if ((result = c->ncompare(t->data[middle], val)) < 0) { - first = middle; - ++first; + first = middle + 1; len = len - half - 1; } else len = half; @@ -513,12 +610,12 @@ netsnmp_binary_array_get_subset(netsnmp_container *c, void *key, int *len) /* * if there is no data, return NULL; */ - if (!c || !key) + if (!c || !key || !len) return NULL; t = (binary_array_table*)c->container_data; netsnmp_assert(c->ncompare); - if (!t->count | !c->ncompare) + if (!t->count || !c->ncompare) return NULL; /* @@ -541,6 +638,9 @@ netsnmp_binary_array_get_subset(netsnmp_container *c, void *key, int *len) } *len = end - start + 1; + if (*len <= 0) + return NULL; + subset = (void **)malloc((*len) * sizeof(void*)); if (subset) memcpy(subset, &t->data[start], sizeof(void*) * (*len)); @@ -571,6 +671,13 @@ _ba_insert(netsnmp_container *container, const void *data) return netsnmp_binary_array_insert(container, data); } +static int +_ba_insert_before(netsnmp_container *container, size_t index, void *data) +{ + /** don't trust users direct-acces inserts, mark array dirty */ + return netsnmp_binary_array_insert_before(container, index, data, 1); +} + static int _ba_remove(netsnmp_container *container, const void *data) { @@ -612,13 +719,12 @@ _ba_get_subset(netsnmp_container *container, void *data) int len; rtn = netsnmp_binary_array_get_subset(container, data, &len); - if ((NULL==rtn) || (len <=0)) + if (NULL==rtn) return NULL; va = SNMP_MALLOC_TYPEDEF(netsnmp_void_array); - if (NULL==va) - { - free (rtn); + if (va == NULL) { + free(rtn); return NULL; } @@ -708,7 +814,10 @@ netsnmp_container_get_binary_array(void) c->clear = _ba_clear; c->options = _ba_options; c->duplicate = _ba_duplicate; - + c->get_at = netsnmp_binary_array_get_at; + c->remove_at = netsnmp_binary_array_remove_at; + c->insert_before = _ba_insert_before; + return c; } @@ -716,7 +825,6 @@ netsnmp_factory * netsnmp_container_get_binary_array_factory(void) { static netsnmp_factory f = { "binary_array", - (netsnmp_factory_produce_f*) netsnmp_container_get_binary_array }; return &f; diff --git a/snmplib/container_iterator.c b/snmplib/container_iterator.c index 41b14ff..579e2b8 100644 --- a/snmplib/container_iterator.c +++ b/snmplib/container_iterator.c @@ -7,14 +7,14 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -29,7 +29,7 @@ #include -netsnmp_feature_child_of(container_iterator, container_types) +netsnmp_feature_child_of(container_iterator, container_types); #ifndef NETSNMP_FEATURE_REMOVE_CONTAINER_ITERATOR /** @@ -285,18 +285,21 @@ _iterator_get_next(iterator_info *ii, const void *key) * container * **********************************************************************/ -static void -_iterator_free(iterator_info *ii) +static int _iterator_free(netsnmp_container *c) { + iterator_info *ii = (iterator_info *)c; + DEBUGMSGT(("container_iterator",">%s\n", "_iterator_free")); if(NULL == ii) - return; + return 0; if(ii->user_ctx) ii->free_user_ctx(ii->user_ctx,ii->user_ctx); free(ii); + + return 0; } static void * @@ -463,7 +466,7 @@ netsnmp_container_iterator_get(void *iterator_user_ctx, /* * init container structure with iterator functions */ - ii->c.cfree = (netsnmp_container_rc*)_iterator_free; + ii->c.cfree = _iterator_free; ii->c.compare = compare; ii->c.get_size = (netsnmp_container_size*)_iterator_size; ii->c.init = NULL; diff --git a/snmplib/container_list_ssll.c b/snmplib/container_list_ssll.c index 7ff01c4..ef3e8e7 100644 --- a/snmplib/container_list_ssll.c +++ b/snmplib/container_list_ssll.c @@ -7,14 +7,14 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -28,17 +28,18 @@ #include #include +#include "factory.h" -netsnmp_feature_child_of(container_linked_list, container_types) -netsnmp_feature_child_of(container_fifo, container_types) -netsnmp_feature_child_of(container_lifo, container_types) +netsnmp_feature_child_of(container_linked_list, container_types); +netsnmp_feature_child_of(container_fifo, container_types); +netsnmp_feature_child_of(container_lifo, container_types); /* this is a fancy way of cleaning up ifdefs */ #ifdef NETSNMP_FEATURE_REQUIRE_CONTAINER_FIFO -netsnmp_feature_require(container_linked_list) +netsnmp_feature_require(container_linked_list); #endif /* NETSNMP_FEATURE_REQUIRE_CONTAINER_FIFO */ #ifdef NETSNMP_FEATURE_REQUIRE_CONTAINER_LIFO -netsnmp_feature_require(container_linked_list) +netsnmp_feature_require(container_linked_list); #endif /* NETSNMP_FEATURE_REQUIRE_CONTAINER_LIFO */ #ifndef NETSNMP_FEATURE_REMOVE_CONTAINER_LINKED_LIST @@ -69,37 +70,33 @@ static netsnmp_iterator *_ssll_iterator_get(netsnmp_container *c); static void * -_get(netsnmp_container *c, const void *key, int exact) +_get(netsnmp_container *c, const void *key, int return_next) { - sl_container *sl = (sl_container*)c; - sl_node *curr = sl->head; + sl_container *sl = (sl_container *)c; + sl_node *curr = sl->head; int rc = 0; - - /* - * note: get-next on unsorted list is meaningless. we - * don't try to search whole array, looking for the next highest. - */ - if( (NULL != curr) && (NULL != key)) { - while (curr) { - rc = sl->c.compare(curr->data, key); - if (rc == 0) - break; - else if (rc > 0) { - if (0 == sl->unsorted) { - /* - * if sorted, we can stop. - */ - break; - } - } - curr = curr->next; + + /* If the key is NULL, return the first item in the container. */ + if (!key) + return curr ? curr->data : NULL; + + for ( ; curr; curr = curr->next) { + rc = sl->c.compare(curr->data, key); + if (rc < 0) + continue; + if (rc == 0) { + if (return_next) + curr = curr->next; + break; } - - if((curr) && (!exact) && (rc == 0)) { - curr = curr->next; + if (!sl->unsorted) { + /* If sorted, we can stop. */ + if (!return_next) + curr = NULL; + break; } } - + return curr ? curr->data : NULL; } @@ -123,7 +120,7 @@ _ssll_find(netsnmp_container *c, const void *data) if((NULL == c) || (NULL == data)) return NULL; - return _get(c, data, 1); + return _get(c, data, 0); } static void * @@ -132,20 +129,22 @@ _ssll_find_next(netsnmp_container *c, const void *data) if(NULL == c) return NULL; - return _get(c, data, 0); + return _get(c, data, 1); } static int _ssll_insert(netsnmp_container *c, const void *data) { sl_container *sl = (sl_container*)c; - sl_node *new_node, *curr = sl->head; + sl_node *new_node, *curr; - if(NULL == c) + if (c == NULL) return -1; - + + curr = sl->head; + new_node = SNMP_MALLOC_TYPEDEF(sl_node); - if(NULL == new_node) + if (new_node == NULL) return -1; new_node->data = NETSNMP_REMOVE_CONST(void *, data); ++sl->count; @@ -208,11 +207,15 @@ static int _ssll_remove(netsnmp_container *c, const void *data) { sl_container *sl = (sl_container*)c; - sl_node *curr = sl->head; + sl_node *curr; - if((NULL == c) || (NULL == curr)) + if (c == NULL) return -1; - + + curr = sl->head; + if (curr == NULL) + return -1; + /* * special case for NULL data, act like stack */ @@ -333,21 +336,9 @@ netsnmp_container_get_ssll(void) sl->c.for_each = _ssll_for_each; sl->c.clear = _ssll_clear; - - return (netsnmp_container*)sl; + return &sl->c; } -netsnmp_factory * -netsnmp_container_get_ssll_factory(void) -{ - static netsnmp_factory f = {"sorted_singly_linked_list", - (netsnmp_factory_produce_f*) - netsnmp_container_get_ssll }; - - return &f; -} - - netsnmp_container * netsnmp_container_get_usll(void) { @@ -381,37 +372,26 @@ netsnmp_container_get_fifo(void) return netsnmp_container_get_singly_linked_list(1); } -netsnmp_factory * -netsnmp_container_get_usll_factory(void) -{ - static netsnmp_factory f = {"unsorted_singly_linked_list-lifo", - (netsnmp_factory_produce_f*) - netsnmp_container_get_usll }; - - return &f; -} - -netsnmp_factory * -netsnmp_container_get_fifo_factory(void) -{ - static netsnmp_factory f = {"unsorted_singly_linked_list-fifo", - (netsnmp_factory_produce_f*) - netsnmp_container_get_fifo }; - - return &f; -} - void netsnmp_container_ssll_init(void) { - netsnmp_container_register("sorted_singly_linked_list", - netsnmp_container_get_ssll_factory()); - netsnmp_container_register("unsorted_singly_linked_list", - netsnmp_container_get_usll_factory()); - netsnmp_container_register("lifo", - netsnmp_container_get_usll_factory()); - netsnmp_container_register("fifo", - netsnmp_container_get_fifo_factory()); + static netsnmp_factory ssll = { + "sorted_singly_linked_list", + netsnmp_container_get_ssll + }; + static netsnmp_factory usll = { + "unsorted_singly_linked_list-lifo", + netsnmp_container_get_usll + }; + static netsnmp_factory fifo = { + "unsorted_singly_linked_list-fifo", + netsnmp_container_get_fifo + }; + + netsnmp_container_register("sorted_singly_linked_list", &ssll); + netsnmp_container_register("unsorted_singly_linked_list", &usll); + netsnmp_container_register("lifo", &usll); + netsnmp_container_register("fifo", &fifo); } @@ -490,12 +470,9 @@ _ssll_iterator_last(ssll_iterator *it) if (NULL == n) return NULL; - while(n->next) + while (n->next) n = n->next; - if (NULL == n) - return NULL; - it->last = n; return it->last->data; diff --git a/snmplib/container_null.c b/snmplib/container_null.c index 1f4870e..18fc743 100644 --- a/snmplib/container_null.c +++ b/snmplib/container_null.c @@ -9,18 +9,18 @@ #include #include -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -33,8 +33,9 @@ #include #include #include +#include "factory.h" -netsnmp_feature_child_of(container_null, container_types) +netsnmp_feature_child_of(container_null, container_types); /** @defgroup null_container null_container * Helps you implement specialized containers. @@ -171,7 +172,6 @@ netsnmp_factory * netsnmp_container_get_null_factory(void) { static netsnmp_factory f = { "null", - (netsnmp_factory_produce_f*) netsnmp_container_get_null}; DEBUGMSGTL(("container:null:get_null_factory","in\n")); diff --git a/snmplib/data_list.c b/snmplib/data_list.c index 505d4fc..2d3cce3 100644 --- a/snmplib/data_list.c +++ b/snmplib/data_list.c @@ -1,16 +1,23 @@ /* * netsnmp_data_list.c * - * $Id$ + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include -netsnmp_feature_child_of(data_list_all, libnetsnmp) +netsnmp_feature_child_of(data_list_all, libnetsnmp); -netsnmp_feature_child_of(data_list_add_data, data_list_all) -netsnmp_feature_child_of(data_list_get_list_node, data_list_all) +netsnmp_feature_child_of(data_list_add_data, data_list_all); +netsnmp_feature_child_of(data_list_get_list_node, data_list_all); /** @defgroup data_list generic linked-list data handling with a string as a key. * @ingroup library @@ -87,6 +94,9 @@ netsnmp_data_list_add_node(netsnmp_data_list **head, netsnmp_data_list *node) netsnmp_assert(NULL != head); netsnmp_assert(NULL != node); + if (!head || !node) + return; + netsnmp_assert(NULL != node->name); DEBUGMSGTL(("data_list","adding key '%s'\n", node->name)); @@ -379,5 +389,12 @@ netsnmp_read_data_callback(const char *token, char *line) { return; } + +void +shutdown_data_list(void) +{ + netsnmp_free_all_list_data(saveHead); +} + /** @} */ diff --git a/snmplib/default_store.c b/snmplib/default_store.c index 8dbc9bc..422f5ac 100644 --- a/snmplib/default_store.c +++ b/snmplib/default_store.c @@ -128,27 +128,24 @@ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -158,9 +155,9 @@ #include -netsnmp_feature_child_of(default_store_all, libnetsnmp) +netsnmp_feature_child_of(default_store_all, libnetsnmp); -netsnmp_feature_child_of(default_store_void, default_store_all) +netsnmp_feature_child_of(default_store_void, default_store_all); #ifndef NETSNMP_FEATURE_REMOVE_DEFAULT_STORE_VOID #endif /* NETSNMP_FEATURE_REMOVE_DEFAULT_STORE_VOID */ @@ -186,11 +183,6 @@ static char *netsnmp_ds_strings[NETSNMP_DS_MAX_IDS][NETSNMP_DS_MAX_SUBIDS]; static void *netsnmp_ds_voids[NETSNMP_DS_MAX_IDS][NETSNMP_DS_MAX_SUBIDS]; #endif /* NETSNMP_FEATURE_REMOVE_DEFAULT_STORE_VOID */ -/* - * Prototype definitions - */ -void netsnmp_ds_handle_config(const char *token, char *line); - /** * Stores "true" or "false" given an int value for value into * netsnmp_ds_booleans[store][which] slot. @@ -298,11 +290,13 @@ netsnmp_ds_set_string(int storeid, int which, const char *value) */ if (netsnmp_ds_strings[storeid][which] == value) return SNMPERR_SUCCESS; - + + snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); if (netsnmp_ds_strings[storeid][which] != NULL) { free(netsnmp_ds_strings[storeid][which]); netsnmp_ds_strings[storeid][which] = NULL; } + snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); if (value) { netsnmp_ds_strings[storeid][which] = strdup(value); @@ -545,6 +539,7 @@ netsnmp_ds_shutdown(void) netsnmp_ds_read_config *drsp; int i, j; + snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); for (drsp = netsnmp_ds_configs; drsp; drsp = netsnmp_ds_configs) { netsnmp_ds_configs = drsp->next; @@ -568,5 +563,6 @@ netsnmp_ds_shutdown(void) } } } + snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); } /** @} */ diff --git a/snmplib/dir_utils.c b/snmplib/dir_utils.c index d35e700..40db11c 100644 --- a/snmplib/dir_utils.c +++ b/snmplib/dir_utils.c @@ -14,44 +14,44 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H # include #else # include #endif #include -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_DIRENT_H -#include +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen #endif #include -#if HAVE_DMALLOC_H -# include -#endif - #include #include #include #include -netsnmp_feature_child_of(container_directory, container_types) +netsnmp_feature_child_of(container_directory, container_types); #ifdef NETSNMP_FEATURE_REQUIRE_CONTAINER_DIRECTORY -netsnmp_feature_require(file_utils) -netsnmp_feature_require(container_free_all) +netsnmp_feature_require(file_utils); +netsnmp_feature_require(container_free_all); #endif /* NETSNMP_FEATURE_REQUIRE_CONTAINER_DIRECTORY */ #ifndef NETSNMP_FEATURE_REMOVE_CONTAINER_DIRECTORY @@ -136,8 +136,7 @@ netsnmp_directory_container_read_some(netsnmp_container *user_container, /** iterate over dir */ while ((file = readdir(dir))) { - - if ((file->d_name == NULL) || (file->d_name[0] == 0)) + if (file->d_name[0] == 0) continue; /** skip '.' and '..' */ diff --git a/snmplib/factory.h b/snmplib/factory.h new file mode 100644 index 0000000..903fe2c --- /dev/null +++ b/snmplib/factory.h @@ -0,0 +1,26 @@ +#ifndef NETSNMP_FACTORY_H +#define NETSNMP_FACTORY_H + +#ifdef __cplusplus +extern "C" { +#elif 0 +} +#endif + +typedef struct netsnmp_factory_s { + /* + * a string describing the product the factory creates + */ + const char *product; + + /* + * a function to allocate a new container + */ + netsnmp_container * (*produce)(void); +} netsnmp_factory; + +#ifdef __cplusplus +} +#endif + +#endif /* NETSNMP_FACTORY_H */ diff --git a/snmplib/fd_event_manager.c b/snmplib/fd_event_manager.c index f9cf08e..4184567 100644 --- a/snmplib/fd_event_manager.c +++ b/snmplib/fd_event_manager.c @@ -10,7 +10,7 @@ #include #include -netsnmp_feature_child_of(fd_event_manager, libnetsnmp) +netsnmp_feature_child_of(fd_event_manager, libnetsnmp); #ifndef NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER int external_readfd[NUM_EXTERNAL_FDS], external_readfdlen = 0; diff --git a/snmplib/file_utils.c b/snmplib/file_utils.c index 5261431..d29ace9 100644 --- a/snmplib/file_utils.c +++ b/snmplib/file_utils.c @@ -2,15 +2,18 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H # include #else # include @@ -18,7 +21,7 @@ #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H # include #endif #ifdef HAVE_SYS_STAT_H @@ -30,17 +33,13 @@ #include -#if HAVE_DMALLOC_H -# include -#endif - #include #include #include -netsnmp_feature_child_of(file_utils_all, libnetsnmp) -netsnmp_feature_child_of(file_utils, file_utils_all) -netsnmp_feature_child_of(file_close, file_utils_all) +netsnmp_feature_child_of(file_utils_all, libnetsnmp); +netsnmp_feature_child_of(file_utils, file_utils_all); +netsnmp_feature_child_of(file_close, file_utils_all); #ifndef NETSNMP_FEATURE_REMOVE_FILE_UTILS /*------------------------------------------------------------------ diff --git a/snmplib/getopt.c b/snmplib/getopt.c index 1e8e9c3..b2baa06 100644 --- a/snmplib/getopt.c +++ b/snmplib/getopt.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -/* - * static char sccsid[] = "from: @(#)getopt.c 8.2 (Berkeley) 4/2/94"; - */ -static char *rcsid = - "$Id$"; -#endif /* LIBC_SCCS and not lint */ - #include #include diff --git a/snmplib/gettimeofday.c b/snmplib/gettimeofday.c index df5c0a0..c8d07ae 100644 --- a/snmplib/gettimeofday.c +++ b/snmplib/gettimeofday.c @@ -8,11 +8,11 @@ #ifdef HAVE_SYS_TIMEB_H # include /* _ftime() */ #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include diff --git a/snmplib/inet_ntop.c b/snmplib/inet_ntop.c index 05bafbe..5037b2a 100644 --- a/snmplib/inet_ntop.c +++ b/snmplib/inet_ntop.c @@ -19,13 +19,17 @@ #include -#if HAVE_ARPA_NAMESER_H +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_ARPA_NAMESER_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/snmplib/inet_pton.c b/snmplib/inet_pton.c index 47fe3ec..dc4e1e7 100644 --- a/snmplib/inet_pton.c +++ b/snmplib/inet_pton.c @@ -21,13 +21,17 @@ #include -#if HAVE_ARPA_NAMESER_H +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_ARPA_NAMESER_H #include #endif #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/snmplib/int64.c b/snmplib/int64.c index 51f1f32..3b1f705 100644 --- a/snmplib/int64.c +++ b/snmplib/int64.c @@ -11,7 +11,10 @@ #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STRING_H #include #else #include @@ -33,7 +36,7 @@ * @param[out] puR Remainder. */ void -divBy10(U64 u64, U64 * pu64Q, unsigned int *puR) +divBy10(struct counter64 u64, struct counter64 *pu64Q, unsigned int *puR) { unsigned long ulT; unsigned long ulQ; @@ -83,7 +86,7 @@ divBy10(U64 u64, U64 * pu64Q, unsigned int *puR) * @param[out] pu64P Product. */ void -multBy10(U64 u64, U64 * pu64P) +multBy10(struct counter64 u64, struct counter64 *pu64P) { unsigned long ulT; unsigned long ulP; @@ -130,7 +133,7 @@ multBy10(U64 u64, U64 * pu64P) * */ void -incrByU16(U64 * pu64, unsigned int u16) +incrByU16(struct counter64 *pu64, unsigned int u16) { incrByU32(pu64, u16); } @@ -143,7 +146,7 @@ incrByU16(U64 * pu64, unsigned int u16) * */ void -incrByU32(U64 * pu64, unsigned int u32) +incrByU32(struct counter64 *pu64, unsigned int u32) { uint32_t tmp; @@ -161,7 +164,8 @@ incrByU32(U64 * pu64, unsigned int u32) * @param[out] pu64out pu64one - pu64two. */ void -u64Subtract(const U64 * pu64one, const U64 * pu64two, U64 * pu64out) +u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two, + struct counter64 *pu64out) { int carry; @@ -177,7 +181,7 @@ u64Subtract(const U64 * pu64one, const U64 * pu64two, U64 * pu64out) * @param[in,out] pu64out pu64out += pu64one. */ void -u64Incr(U64 * pu64out, const U64 * pu64one) +u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one) { pu64out->high = (uint32_t)(pu64out->high + pu64one->high); incrByU32(pu64out, pu64one->low); @@ -191,15 +195,16 @@ u64Incr(U64 * pu64out, const U64 * pu64one) * @param[out] pu64out pu64out += (pu64one - pu64two) */ void -u64UpdateCounter(U64 * pu64out, const U64 * pu64one, const U64 * pu64two) +u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one, + const struct counter64 *pu64two) { - U64 tmp; + struct counter64 tmp; u64Subtract(pu64one, pu64two, &tmp); u64Incr(pu64out, &tmp); } -netsnmp_feature_child_of(u64copy, netsnmp_unused) +netsnmp_feature_child_of(u64copy, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_U64COPY /** * Copy a 64-bit number. @@ -208,7 +213,7 @@ netsnmp_feature_child_of(u64copy, netsnmp_unused) * @param[out] pu64one Where to store the copy - *pu64one = *pu64two. */ void -u64Copy(U64 * pu64one, const U64 * pu64two) +u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two) { *pu64one = *pu64two; } @@ -220,7 +225,7 @@ u64Copy(U64 * pu64one, const U64 * pu64two) * @param[in] pu64 Number to be zeroed. */ void -zeroU64(U64 * pu64) +zeroU64(struct counter64 *pu64) { pu64->low = 0; pu64->high = 0; @@ -232,7 +237,7 @@ zeroU64(U64 * pu64) * @param[in] pu64 Number to be checked. */ int -isZeroU64(const U64 * pu64) +isZeroU64(const struct counter64 *pu64) { return pu64->low == 0 && pu64->high == 0; } @@ -261,7 +266,7 @@ isZeroU64(const U64 * pu64) * @retval -2 : unexpected high value (changed by more than 1) */ int -netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_val, +netsnmp_c64_check_for_32bit_wrap(const struct counter64 *old_val, struct counter64 *new_val, int adjust) { @@ -333,8 +338,10 @@ netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_val, * @retval -2 : look like we have 64 bit values, but sums aren't consistent */ int -netsnmp_c64_check32_and_update(struct counter64 *prev_val, struct counter64 *new_val, - struct counter64 *old_prev_val, int *need_wrap_check) +netsnmp_c64_check32_and_update(struct counter64 *prev_val, + struct counter64 *new_val, + const struct counter64 *old_prev_val, + int *need_wrap_check) { int rc; @@ -345,7 +352,7 @@ netsnmp_c64_check32_and_update(struct counter64 *prev_val, struct counter64 *new * prev->stats += (new->stats - prev->old_stats) */ if ((NULL == need_wrap_check) || (0 != *need_wrap_check)) { - rc = netsnmp_c64_check_for_32bit_wrap(old_prev_val,new_val, 1); + rc = netsnmp_c64_check_for_32bit_wrap(old_prev_val, new_val, 1); if (rc < 0) { DEBUGMSGTL(("c64","32 bit check failed\n")); return -1; @@ -367,7 +374,8 @@ netsnmp_c64_check32_and_update(struct counter64 *prev_val, struct counter64 *new * check wrap incremented high, so reset it. (Because having * high set for a 32 bit counter will confuse us in the next update). */ - netsnmp_assert(1 == new_val->high); + if (1 != new_val->high) + DEBUGMSGTL(("c64", "error expanding to 64 bits: new_val->high != 1")); new_val->high = 0; } else if (64 == rc) { @@ -390,10 +398,10 @@ netsnmp_c64_check32_and_update(struct counter64 *prev_val, struct counter64 *new /** Convert an unsigned 64-bit number to ASCII. */ void printU64(char *buf, /* char [I64CHARSZ+1]; */ - const U64 * pu64) + const struct counter64 *pu64) { - U64 u64a; - U64 u64b; + struct counter64 u64a; + struct counter64 u64b; char aRes[I64CHARSZ + 1]; unsigned int u; @@ -414,9 +422,9 @@ printU64(char *buf, /* char [I64CHARSZ+1]; */ /** Convert a signed 64-bit number to ASCII. */ void printI64(char *buf, /* char [I64CHARSZ+1]; */ - const U64 * pu64) + const struct counter64 *pu64) { - U64 u64a; + struct counter64 u64a; if (pu64->high & 0x80000000) { u64a.high = (uint32_t) ~pu64->high; @@ -429,11 +437,11 @@ printI64(char *buf, /* char [I64CHARSZ+1]; */ } } -/** Convert a signed 64-bit integer from ASCII to U64. */ +/** Convert a signed 64-bit integer from ASCII to struct counter64. */ int -read64(U64 * i64, const char *str) +read64(struct counter64 *i64, const char *str) { - U64 i64p; + struct counter64 i64p; unsigned int u; int sign = 0; int ok = 0; diff --git a/snmplib/keytools.c b/snmplib/keytools.c index 0ccb3a6..388e655 100644 --- a/snmplib/keytools.c +++ b/snmplib/keytools.c @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* @@ -24,18 +29,17 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif + +#include #include #include @@ -63,8 +67,11 @@ #include -netsnmp_feature_child_of(usm_support, libnetsnmp) -netsnmp_feature_child_of(usm_keytools, usm_support) +#include +#include + +netsnmp_feature_child_of(usm_support, libnetsnmp); +netsnmp_feature_child_of(usm_keytools, usm_support); #ifndef NETSNMP_FEATURE_REMOVE_USM_KEYTOOLS @@ -107,7 +114,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, #if defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { int rval = SNMPERR_SUCCESS, - nbytes = USM_LENGTH_EXPANDED_PASSPHRASE; + nbytes = USM_LENGTH_EXPANDED_PASSPHRASE, auth_type; #if !defined(NETSNMP_USE_OPENSSL) && \ defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_INTERNAL_CRYPTO) int ret; @@ -119,7 +126,8 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, #ifdef NETSNMP_USE_OPENSSL EVP_MD_CTX *ctx = NULL; -#elif NETSNMP_USE_INTERNAL_CRYPTO + const EVP_MD *hashfn = NULL; +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) SHA_CTX csha1; MD5_CTX cmd5; char cryptotype = 0; @@ -131,8 +139,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, /* * Sanity check. */ - if (!hashtype || !P || !Ku || !kulen || (*kulen <= 0) - || (hashtype_len != USM_LENGTH_OID_TRANSFORM)) { + if (!hashtype || !P || !Ku || !kulen || (*kulen <= 0)) { QUITFUN(SNMPERR_GENERR, generate_Ku_quit); } @@ -143,39 +150,58 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, QUITFUN(SNMPERR_GENERR, generate_Ku_quit); } + auth_type = sc_get_authtype(hashtype, hashtype_len); + if (SNMPERR_GENERR == auth_type) { + snmp_log(LOG_ERR, "Error: unknown authtype"); + snmp_set_detail("unknown authtype"); + QUITFUN(SNMPERR_GENERR, generate_Ku_quit); + } /* * Setup for the transform type. */ #ifdef NETSNMP_USE_OPENSSL -#ifdef HAVE_EVP_MD_CTX_CREATE + if (*kulen < EVP_MAX_MD_SIZE) { + snmp_log(LOG_ERR, "Internal Error: ku buffer too small (min=%d).\n", + EVP_MAX_MD_SIZE); + snmp_set_detail("Internal Error: ku buffer too small."); + QUITFUN(SNMPERR_GENERR, generate_Ku_quit); + } + + /** get hash function */ + hashfn = sc_get_openssl_hashfn(auth_type); + if (NULL == hashfn) { + snmp_log(LOG_ERR, "Error: no hashfn for authtype"); + snmp_set_detail("no hashfn for authtype"); + QUITFUN(SNMPERR_GENERR, generate_Ku_quit); + } + +#if defined(HAVE_EVP_MD_CTX_NEW) + ctx = EVP_MD_CTX_new(); +#elif defined(HAVE_EVP_MD_CTX_CREATE) ctx = EVP_MD_CTX_create(); #else ctx = malloc(sizeof(*ctx)); - if (!EVP_MD_CTX_init(ctx)) - return SNMPERR_GENERR; -#endif -#ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { - if (!EVP_DigestInit(ctx, EVP_md5())) - return SNMPERR_GENERR; - } else + if (!EVP_MD_CTX_init(ctx)) { + rval = SNMPERR_GENERR; + goto generate_Ku_quit; + } #endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) { - if (!EVP_DigestInit(ctx, EVP_sha1())) - return SNMPERR_GENERR; - } else - QUITFUN(SNMPERR_GENERR, generate_Ku_quit); -#elif NETSNMP_USE_INTERNAL_CRYPTO + if (!EVP_DigestInit(ctx, hashfn)) { + rval = SNMPERR_GENERR; + goto generate_Ku_quit; + } + +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { + if (NETSNMP_USMAUTH_HMACMD5 == auth_type) { if (!MD5_Init(&cmd5)) return SNMPERR_GENERR; cryptotype = TYPE_MD5; } else #endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) { + if (NETSNMP_USMAUTH_HMACSHA1 == auth_type) { if (!SHA1_Init(&csha1)) return SNMPERR_GENERR; cryptotype = TYPE_SHA1; @@ -193,7 +219,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, } #ifdef NETSNMP_USE_OPENSSL EVP_DigestUpdate(ctx, buf, USM_LENGTH_KU_HASHBLOCK); -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) if (TYPE_SHA1 == cryptotype) { rval = !SHA1_Update(&csha1, buf, USM_LENGTH_KU_HASHBLOCK); } else { @@ -202,7 +228,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, if (rval != 0) { return SNMPERR_USM_ENCRYPTIONERROR; } -#elif NETSNMP_USE_INTERNAL_MD5 +#elif defined(NETSNMP_USE_INTERNAL_MD5) if (MDupdate(&MD, buf, USM_LENGTH_KU_HASHBLOCK * 8)) { rval = SNMPERR_USM_ENCRYPTIONERROR; goto md5_fin; @@ -222,7 +248,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, * what about free() */ } -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) if (TYPE_SHA1 == cryptotype) { SHA1_Final(Ku, &csha1); } else { @@ -232,7 +258,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, if (ret == SNMPERR_GENERR) return SNMPERR_GENERR; *kulen = ret; -#elif NETSNMP_USE_INTERNAL_MD5 +#elif defined(NETSNMP_USE_INTERNAL_MD5) if (MDupdate(&MD, buf, 0)) { rval = SNMPERR_USM_ENCRYPTIONERROR; goto md5_fin; @@ -248,7 +274,8 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, #ifdef NETSNMP_ENABLE_TESTING_CODE - DEBUGMSGTL(("generate_Ku", "generating Ku (from %s): ", P)); + DEBUGMSGTL(("generate_Ku", "generating Ku (%s from %s): ", + usm_lookup_auth_str(auth_type), P)); for (i = 0; i < *kulen; i++) DEBUGMSG(("generate_Ku", "%02x", Ku[i])); DEBUGMSG(("generate_Ku", "\n")); @@ -259,7 +286,9 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, memset(buf, 0, sizeof(buf)); #ifdef NETSNMP_USE_OPENSSL if (ctx) { -#ifdef HAVE_EVP_MD_CTX_DESTROY +#if defined(HAVE_EVP_MD_CTX_FREE) + EVP_MD_CTX_free(ctx); +#elif defined(HAVE_EVP_MD_CTX_DESTROY) EVP_MD_CTX_destroy(ctx); #else EVP_MD_CTX_cleanup(ctx); @@ -270,15 +299,14 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, return rval; } /* end generate_Ku() */ -#elif NETSNMP_USE_PKCS11 +#elif defined(NETSNMP_USE_PKCS11) { - int rval = SNMPERR_SUCCESS; + int rval = SNMPERR_SUCCESS, auth_type;; /* * Sanity check. */ - if (!hashtype || !P || !Ku || !kulen || (*kulen <= 0) - || (hashtype_len != USM_LENGTH_OID_TRANSFORM)) { + if (!hashtype || !P || !Ku || !kulen || (*kulen <= 0)) { QUITFUN(SNMPERR_GENERR, generate_Ku_quit); } @@ -289,16 +317,24 @@ generate_Ku(const oid * hashtype, u_int hashtype_len, QUITFUN(SNMPERR_GENERR, generate_Ku_quit); } + auth_type = sc_get_authtype(hashtype, hashtype_len); + if (SNMPERR_GENERR == auth_type) { + snmp_log(LOG_ERR, "Error: unknown authtype"); + snmp_set_detail("unknown authtype"); + QUITFUN(SNMPERR_GENERR, generate_Ku_quit); + } + + /* * Setup for the transform type. */ #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) + if (NETSNMP_USMAUTH_HMACMD5 == auth_type) return pkcs_generate_Ku(CKM_MD5, P, pplen, Ku, kulen); else #endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) + if (NETSNMP_USMAUTH_HMACSHA1 == auth_type) return pkcs_generate_Ku(CKM_SHA_1, P, pplen, Ku, kulen); else { return (SNMPERR_GENERR); @@ -356,7 +392,7 @@ generate_kul(const oid * hashtype, u_int hashtype_len, u_char * Kul, size_t * kul_len) #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { - int rval = SNMPERR_SUCCESS; + int rval = SNMPERR_SUCCESS, auth_type; u_int nbytes = 0; size_t properlength; int iproperlength; @@ -371,13 +407,15 @@ generate_kul(const oid * hashtype, u_int hashtype_len, * Sanity check. */ if (!hashtype || !engineID || !Ku || !Kul || !kul_len - || (engineID_len <= 0) || (ku_len <= 0) || (*kul_len <= 0) - || (hashtype_len != USM_LENGTH_OID_TRANSFORM)) { + || (engineID_len <= 0) || (ku_len <= 0) || (*kul_len <= 0)) { QUITFUN(SNMPERR_GENERR, generate_kul_quit); } + auth_type = sc_get_authtype(hashtype, hashtype_len); + if (SNMPERR_GENERR == auth_type) + QUITFUN(SNMPERR_GENERR, generate_kul_quit); - iproperlength = sc_get_properlength(hashtype, hashtype_len); + iproperlength = sc_get_proper_auth_length_bytype(auth_type); if (iproperlength == SNMPERR_GENERR) QUITFUN(SNMPERR_GENERR, generate_kul_quit); @@ -402,7 +440,8 @@ generate_kul(const oid * hashtype, u_int hashtype_len, rval = sc_hash(hashtype, hashtype_len, buf, nbytes, Kul, kul_len); #ifdef NETSNMP_ENABLE_TESTING_CODE - DEBUGMSGTL(("generate_kul", "generating Kul (from Ku): ")); + DEBUGMSGTL(("generate_kul", "generating Kul (%s from Ku): ", + usm_lookup_auth_str(auth_type) )); for (i = 0; i < *kul_len; i++) DEBUGMSG(("generate_kul", "%02x", Kul[i])); DEBUGMSG(("generate_kul", "keytools\n")); @@ -419,6 +458,310 @@ generate_kul(const oid * hashtype, u_int hashtype_len, #else _KEYTOOLS_NOT_AVAILABLE #endif /* internal or openssl */ + +/*******************************************************************-o-****** + * _kul_extend_blumenthal + * + * Parameters: + * *hashoid MIB OID for the hash transform type. + * hashoid_len Length of the MIB OID hash transform type. + * *origKul original kul (localized; IN/OUT) + * *origKulLen Length of original kul in bytes (IN/OUT) + * origKulSize Size of original kul buffer + * needKeyLen Size needed for key + * + * Returns: + * SNMPERR_SUCCESS Success. + * SNMPERR_GENERR All errors. + */ +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 +static int +_kul_extend_blumenthal(int needKeyLen, oid *hashoid, u_int hashoid_len, + u_char *origKul, size_t *origKulLen, int origKulSize) +{ + u_char newKul[USM_LENGTH_KU_HASHBLOCK]; + size_t newKulLen; + int count, hashBits, hashBytes, authtype, i, saveLen; + + DEBUGMSGTL(("usm:extend_kul", " blumenthal called\n")); + + if (NULL == hashoid || NULL == origKul || NULL == origKulLen || + needKeyLen > origKulSize) { + DEBUGMSGTL(("usm:extend_kul", "bad parameters\n")); + return SNMPERR_GENERR; + } + + authtype = sc_get_authtype(hashoid, hashoid_len); + if (authtype < 0 ) { + DEBUGMSGTL(("usm:extend_kul", "unknown authtype\n")); + return SNMPERR_GENERR; + } + + saveLen = *origKulLen; + needKeyLen -= *origKulLen; /* subtract bytes we already have */ + + /* + * 3.1.2.1: + * 1)Let Hnnn() the hash function of the authentication protocol for + * the user U on the SNMP authoritative engine E. nnn being the size + * of the output of the hash function (e.g. nnn=128 bits for MD5, or + * nnn=160 bits for SHA1). + */ + hashBytes = sc_get_proper_auth_length_bytype(authtype); + hashBits = 8 * hashBytes; + + /* 3.1.2.1: + * 2)Set c = ceil ( 256 / nnn ) + */ + count = ceil( (double)256 / (double)hashBits ); + DEBUGMSGTL(("9:usm:extend_kul:blumenthal", "count ceiling %d\n", count)); + + /* 3.1.2.1: + * 3)For i = 1, 2, ..., c + * a.Set Kul = Kul || Hnnn(Kul); Where Hnnn() is the hash + * function of the authentication protocol defined for that user + */ + for(i = 0; i < count; ++i) { + int copyLen, rc; + + newKulLen = sizeof(newKul); + rc = sc_hash_type( authtype, origKul, *origKulLen, newKul, &newKulLen); + if (SNMPERR_SUCCESS != rc) { + DEBUGMSGTL(("usm:extend_kul", "error from sc_hash_type\n")); + return SNMPERR_GENERR; + } + + copyLen = SNMP_MIN(needKeyLen, newKulLen); + memcpy(origKul + *origKulLen, newKul, copyLen); + needKeyLen -= copyLen; + *origKulLen += copyLen; + + /** not part of the draft, but stop if we already have enought bits */ + if (needKeyLen <= 0) + break; + } + + DEBUGMSGTL(("usm:extend_kul:blumenthal", + "orig len %d, new len %" NETSNMP_PRIz "d\n", + saveLen, *origKulLen)); + + return SNMPERR_SUCCESS; +} +#endif /* NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ + +/*******************************************************************-o-****** + * _kul_extend_reeder + * + * Parameters: + * *hashoid MIB OID for the hash transform type. + * hashoid_len Length of the MIB OID hash transform type. + * *engineID engineID + * engineIDLen Length of engineID + * *origKul original kul (localized; IN/OUT) + * *origKulLen Length of original kul in bytes (IN/OUT) + * origKulSize Size of original kul buffer + * + * Returns: + * SNMPERR_SUCCESS Success. + * SNMPERR_GENERR All errors. + */ +#if defined(NETSNMP_DRAFT_REEDER_3DES) || defined(NETSNMP_DRAFT_BLUMENTHAL_AES_04) +static int +_kul_extend_reeder(int needKeyLen, oid *hashoid, u_int hashoid_len, + u_char *engineID, int engineIDLen, + u_char *origKul, size_t *origKulLen, int origKulSize) +{ + u_char newKu[USM_LENGTH_KU_HASHBLOCK], newKul[USM_LENGTH_KU_HASHBLOCK]; + size_t newKuLen, newKulLen, saveLen; + int authType, copylen; + + DEBUGMSGTL(("usm:extend_kul", " reeder called\n")); + + if (NULL == hashoid || NULL == engineID || NULL == origKul || + NULL == origKulLen || needKeyLen > origKulSize) + return SNMPERR_GENERR; + + authType = sc_get_authtype(hashoid, hashoid_len); + if (SNMPERR_GENERR == authType) + return SNMPERR_GENERR; + newKulLen = sc_get_proper_auth_length_bytype(authType); + saveLen = *origKulLen; + needKeyLen -= *origKulLen; /* subtract bytes we already have */ + while (needKeyLen > 0) { + + newKuLen = sizeof(newKu); + /* + * hash the existing key using the passphrase to Ku algorithm. + * [ Ku' = Ku(kul) ] + */ + if (generate_Ku(hashoid, hashoid_len, origKul, *origKulLen, + newKu, &newKuLen) != SNMPERR_SUCCESS) + return SNMPERR_GENERR; + + /* + * localize the new key generated from current localized key + * and append it to the current localized key. + * [ kul' = kul || kul(Ku') ] + */ + newKulLen = sizeof(newKul); + if(generate_kul(hashoid, hashoid_len, engineID, engineIDLen, + newKu, newKuLen, newKul, + &newKulLen) != SNMPERR_SUCCESS) + return SNMPERR_GENERR; + + copylen = SNMP_MIN(needKeyLen, newKulLen); + memcpy(origKul + *origKulLen, newKul, copylen); + needKeyLen -= copylen; + *origKulLen += copylen; + } + + DEBUGMSGTL(("usm:extend_kul:reeder", + "orig len %" NETSNMP_PRIz "d, new len %" NETSNMP_PRIz "d\n", + saveLen, *origKulLen)); + return SNMPERR_SUCCESS; +} +#endif /* NETSNMP_DRAFT_REEDER_3DES || NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ + +/*******************************************************************-o-****** + * netsnmp_extend_key + * + * Extend a kul buffer to the needed key size. if the passed kulBuf + * is not large enough, a new one will be allocated and the old one + * will be freed. + * + * Parameters: + * neededKeyLen The neede key length + * *hashoid MIB OID for the hash transform type. + * hashoid_len Length of the MIB OID hash transform type. + * privType Privay algorithm type + * engineID engineID + * engineIDLen Length of engineID + * **kulBuf Pointer to a buffer pointer + * *kulBufLen Length of current kul buffer + * kulBufSize Allocated size of current kul buffer + * + * OUT: + * **kulBuf New kulBuf pointer (if it needed to be expanded) + * *kulBufLen Length of new kul buffer + * + * Returns: + * SNMPERR_SUCCESS Success. + * SNMPERR_GENERR All errors. + */ +int +netsnmp_extend_kul(u_int needKeyLen, oid *hashoid, u_int hashoid_len, + int privType, u_char *engineID, u_int engineIDLen, + u_char **kulBuf, size_t *kulBufLen, u_int kulBufSize) +{ + int ret; + u_char *newKul; + size_t newKulLen; + + DEBUGMSGTL(("9:usm:extend_kul", " called\n")); + + if (*kulBufLen >= needKeyLen) { + DEBUGMSGTL(("usm:extend_kul", " key already big enough\n")); + return SNMPERR_SUCCESS; /* already have enough key material */ + } + + switch (privType & (USM_PRIV_MASK_ALG | USM_PRIV_MASK_VARIANT)) { +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + case USM_CREATE_USER_PRIV_AES192: + case USM_CREATE_USER_PRIV_AES256: + break; +#endif +#if defined(NETSNMP_DRAFT_REEDER_3DES) || defined(NETSNMP_DRAFT_BLUMENTHAL_AES_04) + case USM_CREATE_USER_PRIV_3DES: + break; +#endif + default: + DEBUGMSGTL(("usm:extend_kul", + "no extension method defined for priv type 0x%x\n", + privType)); + return SNMPERR_SUCCESS; + } + + DEBUGMSGTL(("usm:extend_kul", " have %" NETSNMP_PRIz "d bytes; need %d\n", + *kulBufLen, needKeyLen)); + + if (kulBufSize < needKeyLen) { + newKul = calloc(1, needKeyLen); + if (NULL == newKul) + return SNMPERR_GENERR; + memcpy(newKul, *kulBuf, *kulBufLen); + newKulLen = *kulBufLen; + kulBufSize = needKeyLen; + } + else { + newKul = *kulBuf; + newKulLen = *kulBufLen; + } + +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGIF("9:usm:extend_kul") { + int i; + DEBUGMSG(("9:usm:extend_kul", + "key: key=0x")); + for (i = 0; i < newKulLen; i++) + DEBUGMSG(("9:usm:extend_kul", "%02x", newKul[i] & 0xff)); + DEBUGMSG(("9:usm:extend_kul", " (%ld)\n", newKulLen)); + } +#endif /* NETSNMP_ENABLE_TESTING_CODE */ + ret = SNMPERR_SUCCESS; /* most privTypes don't need extended kul */ + switch (privType & (USM_PRIV_MASK_ALG | USM_PRIV_MASK_VARIANT)) { +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + case USM_CREATE_USER_PRIV_AES192: + case USM_CREATE_USER_PRIV_AES256: + { + int reeder = privType & USM_AES_REEDER_FLAG; + if (reeder) + ret = _kul_extend_reeder(needKeyLen, hashoid, hashoid_len, + engineID, engineIDLen, + newKul, &newKulLen, kulBufSize); + else + ret = _kul_extend_blumenthal(needKeyLen, hashoid, hashoid_len, + newKul, &newKulLen, kulBufSize); + } + break; +#endif +#if defined(NETSNMP_DRAFT_REEDER_3DES) + case USM_CREATE_USER_PRIV_3DES: + ret = _kul_extend_reeder(needKeyLen, hashoid, hashoid_len, + engineID, engineIDLen, + newKul, &newKulLen, kulBufSize); + break; +#endif + default: + DEBUGMSGTL(("usm:extend_kul", + "unknown priv type 0x%x\n", privType)); + ret = SNMPERR_GENERR; + } + + if (SNMPERR_SUCCESS == ret) { + *kulBufLen = newKulLen; + if (newKul != *kulBuf) { + free(*kulBuf); + *kulBuf = newKul; + } + } + else { + if (newKul != *kulBuf) + free(newKul); + } +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGIF("9:usm:extend_kul") { + int i; + DEBUGMSG(("usm:extend_kul", + "key: key=0x")); + for (i = 0; i < newKulLen; i++) + DEBUGMSG(("usm:extend_kul", "%02x", newKul[i] & 0xff)); + DEBUGMSG(("usm:extend_kul", " (%ld)\n", newKulLen)); + } +#endif /* NETSNMP_ENABLE_TESTING_CODE */ + + return ret; +} + /*******************************************************************-o-****** * encode_keychange * @@ -456,6 +799,133 @@ _KEYTOOLS_NOT_AVAILABLE * * XXX FIX: Does not handle varibable length keys. * XXX FIX: Does not handle keys larger than the hash algorithm used. + * +KeyChange ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Every definition of an object with this syntax must identify + a protocol P, a secret key K, and a hash algorithm H + that produces output of L octets. + + The object's value is a manager-generated, partially-random + value which, when modified, causes the value of the secret + key K, to be modified via a one-way function. + + The value of an instance of this object is the concatenation + of two components: first a 'random' component and then a + 'delta' component. + + The lengths of the random and delta components + are given by the corresponding value of the protocol P; + if P requires K to be a fixed length, the length of both the + random and delta components is that fixed length; if P + allows the length of K to be variable up to a particular + maximum length, the length of the random component is that + maximum length and the length of the delta component is any + length less than or equal to that maximum length. + For example, usmHMACMD5AuthProtocol requires K to be a fixed + length of 16 octets and L - of 16 octets. + usmHMACSHAAuthProtocol requires K to be a fixed length of + 20 octets and L - of 20 octets. Other protocols may define + other sizes, as deemed appropriate. + + When a requester wants to change the old key K to a new + key keyNew on a remote entity, the 'random' component is + obtained from either a true random generator, or from a + pseudorandom generator, and the 'delta' component is + computed as follows: + + - a temporary variable is initialized to the existing value + of K; + - if the length of the keyNew is greater than L octets, + then: + - the random component is appended to the value of the + temporary variable, and the result is input to the + the hash algorithm H to produce a digest value, and + the temporary variable is set to this digest value; + - the value of the temporary variable is XOR-ed with + the first (next) L-octets (16 octets in case of MD5) + of the keyNew to produce the first (next) L-octets + (16 octets in case of MD5) of the 'delta' component. + - the above two steps are repeated until the unused + portion of the keyNew component is L octets or less, + - the random component is appended to the value of the + temporary variable, and the result is input to the + hash algorithm H to produce a digest value; + - this digest value, truncated if necessary to be the same + length as the unused portion of the keyNew, is XOR-ed + with the unused portion of the keyNew to produce the + (final portion of the) 'delta' component. + + For example, using MD5 as the hash algorithm H: + + iterations = (lenOfDelta - 1)/16; -- integer division + temp = keyOld; + for (i = 0; i < iterations; i++) { + temp = MD5 (temp || random); + delta[i*16 .. (i*16)+15] = + temp XOR keyNew[i*16 .. (i*16)+15]; + } + temp = MD5 (temp || random); + delta[i*16 .. lenOfDelta-1] = + temp XOR keyNew[i*16 .. lenOfDelta-1]; + + The 'random' and 'delta' components are then concatenated as + described above, and the resulting octet string is sent to + the recipient as the new value of an instance of this object. + + At the receiver side, when an instance of this object is set + to a new value, then a new value of K is computed as follows: + + - a temporary variable is initialized to the existing value + of K; + - if the length of the delta component is greater than L + octets, then: + - the random component is appended to the value of the + temporary variable, and the result is input to the + hash algorithm H to produce a digest value, and the + temporary variable is set to this digest value; + - the value of the temporary variable is XOR-ed with + the first (next) L-octets (16 octets in case of MD5) + of the delta component to produce the first (next) + L-octets (16 octets in case of MD5) of the new value + of K. + - the above two steps are repeated until the unused + portion of the delta component is L octets or less, + - the random component is appended to the value of the + temporary variable, and the result is input to the + hash algorithm H to produce a digest value; + - this digest value, truncated if necessary to be the same + length as the unused portion of the delta component, is + XOR-ed with the unused portion of the delta component to + produce the (final portion of the) new value of K. + + For example, using MD5 as the hash algorithm H: + + iterations = (lenOfDelta - 1)/16; -- integer division + temp = keyOld; + for (i = 0; i < iterations; i++) { + temp = MD5 (temp || random); + keyNew[i*16 .. (i*16)+15] = + temp XOR delta[i*16 .. (i*16)+15]; + } + temp = MD5 (temp || random); + keyNew[i*16 .. lenOfDelta-1] = + temp XOR delta[i*16 .. lenOfDelta-1]; + + The value of an object with this syntax, whenever it is + retrieved by the management protocol, is always the zero + length string. + + Note that the keyOld and keyNew are the localized keys. + + Note that it is probably wise that when an SNMP entity sends + a SetRequest to change a key, that it keeps a copy of the old + key until it has confirmed that the key change actually + succeeded. + " + SYNTAX OCTET STRING + * */ int encode_keychange(const oid * hashtype, u_int hashtype_len, @@ -464,38 +934,35 @@ encode_keychange(const oid * hashtype, u_int hashtype_len, u_char * kcstring, size_t * kcstring_len) #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { - int rval = SNMPERR_SUCCESS; - int iproperlength; - size_t properlength; - size_t nbytes = 0; - - u_char *tmpbuf = NULL; - + u_char tmpbuf[SNMP_MAXBUF_SMALL], digest[SNMP_MAXBUF_SMALL]; + u_char delta[SNMP_MAXBUF_SMALL]; + u_char *tmpp = tmpbuf, *randp; + int rval = SNMPERR_SUCCESS, auth_type; + int iauth_length, tmp_len; + size_t auth_length, rand_len, digest_len, delta_len = 0; /* * Sanity check. */ - if (!kcstring || !kcstring_len) - return SNMPERR_GENERR; - - if (!hashtype || !oldkey || !newkey || !kcstring || !kcstring_len - || (oldkey_len <= 0) || (newkey_len <= 0) || (*kcstring_len <= 0) - || (hashtype_len != USM_LENGTH_OID_TRANSFORM)) { + if (!hashtype || !oldkey || !newkey || !kcstring + || (oldkey_len != newkey_len ) || (newkey_len == 0) + || (*kcstring_len < (2 * newkey_len))) { QUITFUN(SNMPERR_GENERR, encode_keychange_quit); } /* * Setup for the transform type. */ - iproperlength = sc_get_properlength(hashtype, hashtype_len); - if (iproperlength == SNMPERR_GENERR) + auth_type = sc_get_authtype(hashtype, hashtype_len); + iauth_length = sc_get_proper_auth_length_bytype(auth_type); + if (iauth_length == SNMPERR_GENERR) QUITFUN(SNMPERR_GENERR, encode_keychange_quit); - if ((oldkey_len != newkey_len) || (*kcstring_len < (2 * oldkey_len))) { - QUITFUN(SNMPERR_GENERR, encode_keychange_quit); - } + auth_length = SNMP_MIN(oldkey_len, (size_t)iauth_length); - properlength = SNMP_MIN(oldkey_len, (size_t)iproperlength); + DEBUGMSGTL(("encode_keychange", + "oldkey_len %" NETSNMP_PRIz "d, newkey_len %" NETSNMP_PRIz "d, auth_length %" NETSNMP_PRIz "d\n", + oldkey_len, newkey_len, auth_length)); /* * Use the old key and some random bytes to encode the new key @@ -506,45 +973,131 @@ encode_keychange(const oid * hashtype, u_int hashtype_len, * * Getting the wrong number of random bytes is considered an error. */ - nbytes = properlength; + randp = kcstring; + rand_len = oldkey_len; + memset(randp, 0x0, rand_len); + /* + * KeyChange ::= TEXTUAL-CONVENTION + * STATUS current + * DESCRIPTION + * [...] + * When a requester wants to change the old key K to a new + * key keyNew on a remote entity, the 'random' component is + * obtained from either a true random generator, or from a + * pseudorandom generator, ... + */ #if defined(NETSNMP_ENABLE_TESTING_CODE) && defined(RANDOMZEROS) - memset(kcstring, 0, nbytes); + memset(randp, 0, rand_len); DEBUGMSG(("encode_keychange", "** Using all zero bits for \"random\" delta of )" "the keychange string! **\n")); #else /* !NETSNMP_ENABLE_TESTING_CODE */ - rval = sc_random(kcstring, &nbytes); + rval = sc_random(randp, &rand_len); QUITFUN(rval, encode_keychange_quit); - if (nbytes != properlength) { + if (rand_len != oldkey_len) { QUITFUN(SNMPERR_GENERR, encode_keychange_quit); } #endif /* !NETSNMP_ENABLE_TESTING_CODE */ +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGIF("encode_keychange") { + int i; + DEBUGMSG(("encode_keychange", + "rand: key=0x")); + for (i = 0; i < rand_len; i++) + DEBUGMSG(("encode_keychange", "%02x", randp[i] & 0xff)); + DEBUGMSG(("encode_keychange", " (%ld)\n", rand_len)); + } +#endif /* NETSNMP_ENABLE_TESTING_CODE */ - tmpbuf = (u_char *) malloc(properlength * 2); - if (tmpbuf) { - memcpy(tmpbuf, oldkey, properlength); - memcpy(tmpbuf + properlength, kcstring, properlength); - - *kcstring_len -= properlength; - rval = sc_hash(hashtype, hashtype_len, tmpbuf, properlength * 2, - kcstring + properlength, kcstring_len); - + /* + * ... and the 'delta' component is + * computed as follows: + * + * - a temporary variable is initialized to the existing value + * of K; + */ + memcpy(tmpbuf, oldkey, oldkey_len); + tmp_len = oldkey_len; + tmpp = tmpbuf + tmp_len; + + delta_len = 0; + while (delta_len < newkey_len) { + DEBUGMSGTL(("encode_keychange", "%" NETSNMP_PRIz "d < %" NETSNMP_PRIz "d\n", delta_len, + newkey_len)); + + /* + * - the random component is appended to the value of the + * temporary variable, + */ + memcpy(tmpp, randp, rand_len); + tmp_len += rand_len; + + /* + * and the result is input to the + * the hash algorithm H to produce a digest value, and + * the temporary variable is set to this digest value; + */ + digest_len = sizeof(digest); + rval = sc_hash(hashtype, hashtype_len, tmpbuf, tmp_len, + digest, &digest_len); QUITFUN(rval, encode_keychange_quit); - - *kcstring_len = (properlength * 2); - - kcstring += properlength; - nbytes = 0; - while ((nbytes++) < properlength) { - *kcstring++ ^= *newkey++; + DEBUGMSGTL(("encode_keychange", "digest_len %" NETSNMP_PRIz "d\n", digest_len)); + + memcpy(tmpbuf, digest, digest_len); + tmp_len = digest_len; + tmpp = tmpbuf; + /* + * - the value of the temporary variable is XOR-ed with + * the first (next) L-octets (16 octets in case of MD5) + * of the keyNew to produce the first (next) L-octets + * (16 octets in case of MD5) of the 'delta' component. + * - the above two steps are repeated until the unused + * portion of the keyNew component is L octets or less, + */ + while ((delta_len < newkey_len) && (digest_len-- > 0)) { + delta[delta_len] = *tmpp ^ newkey[delta_len]; + DEBUGMSGTL(("encode_keychange", + "d[%" NETSNMP_PRIz "d] 0x%0x = 0x%0x ^ 0x%0x\n", + delta_len, delta[delta_len], *tmpp, newkey[delta_len])); + ++tmpp; + ++delta_len; } + DEBUGMSGTL(("encode_keychange", "delta_len %" NETSNMP_PRIz "d\n", delta_len)); } + /** copy results */ + memcpy(kcstring + rand_len, delta, delta_len); + *kcstring_len = rand_len + delta_len; + +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGIF("encode_keychange") { + int i; + DEBUGMSG(("encode_keychange", + "oldkey: key=0x")); + for (i = 0; i < oldkey_len; i++) + DEBUGMSG(("encode_keychange", "%02x", oldkey[i] & 0xff)); + DEBUGMSG(("encode_keychange", " (%ld)\n", oldkey_len)); + + DEBUGMSG(("encode_keychange", + "newkey: key=0x")); + for (i = 0; i < newkey_len; i++) + DEBUGMSG(("encode_keychange", "%02x", newkey[i] & 0xff)); + DEBUGMSG(("encode_keychange", " (%ld)\n", newkey_len)); + + DEBUGMSG(("encode_keychange", + "kcstring: key=0x")); + for (i = 0; i < *kcstring_len; i++) + DEBUGMSG(("encode_keychange", "%02x", kcstring[i] & 0xff)); + DEBUGMSG(("encode_keychange", " (%ld)\n", *kcstring_len)); + } +#endif /* NETSNMP_ENABLE_TESTING_CODE */ encode_keychange_quit: - if (rval != SNMPERR_SUCCESS) + if (kcstring && rval != SNMPERR_SUCCESS) memset(kcstring, 0, *kcstring_len); - SNMP_FREE(tmpbuf); + memset(tmpbuf, 0, sizeof(tmpbuf)); + memset(digest, 0, sizeof(digest)); + memset(delta, 0, sizeof(delta)); return rval; @@ -579,86 +1132,265 @@ _KEYTOOLS_NOT_AVAILABLE * * * ASSUMES Old key is exactly 1/2 the length of the KeyChange buffer, - * although this length may be less than the hash transform + * although this length may not be equal to the hash transform * output. Thus the new key length will be equal to the old * key length. + * +KeyChange ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Every definition of an object with this syntax must identify + a protocol P, a secret key K, and a hash algorithm H + that produces output of L octets. + + The object's value is a manager-generated, partially-random + value which, when modified, causes the value of the secret + key K, to be modified via a one-way function. + + The value of an instance of this object is the concatenation + of two components: first a 'random' component and then a + 'delta' component. + + The lengths of the random and delta components + are given by the corresponding value of the protocol P; + if P requires K to be a fixed length, the length of both the + random and delta components is that fixed length; if P + allows the length of K to be variable up to a particular + maximum length, the length of the random component is that + maximum length and the length of the delta component is any + length less than or equal to that maximum length. + For example, usmHMACMD5AuthProtocol requires K to be a fixed + length of 16 octets and L - of 16 octets. + usmHMACSHAAuthProtocol requires K to be a fixed length of + 20 octets and L - of 20 octets. Other protocols may define + other sizes, as deemed appropriate. + + When a requester wants to change the old key K to a new + [... see encode_keychange above ...] + + At the receiver side, when an instance of this object is set + to a new value, then a new value of K is computed as follows: + + - a temporary variable is initialized to the existing value + of K; + - if the length of the delta component is greater than L + octets, then: + - the random component is appended to the value of the + temporary variable, and the result is input to the + hash algorithm H to produce a digest value, and the + temporary variable is set to this digest value; + - the value of the temporary variable is XOR-ed with + the first (next) L-octets (16 octets in case of MD5) + of the delta component to produce the first (next) + L-octets (16 octets in case of MD5) of the new value + of K. + - the above two steps are repeated until the unused + portion of the delta component is L octets or less, + - the random component is appended to the value of the + temporary variable, and the result is input to the + hash algorithm H to produce a digest value; + - this digest value, truncated if necessary to be the same + length as the unused portion of the delta component, is + XOR-ed with the unused portion of the delta component to + produce the (final portion of the) new value of K. + + For example, using MD5 as the hash algorithm H: + + iterations = (lenOfDelta - 1)/16; -- integer division + temp = keyOld; + for (i = 0; i < iterations; i++) { + temp = MD5 (temp || random); + keyNew[i*16 .. (i*16)+15] = + temp XOR delta[i*16 .. (i*16)+15]; + } + temp = MD5 (temp || random); + keyNew[i*16 .. lenOfDelta-1] = + temp XOR delta[i*16 .. lenOfDelta-1]; + + The value of an object with this syntax, whenever it is + retrieved by the management protocol, is always the zero + length string. + + Note that the keyOld and keyNew are the localized keys. + + Note that it is probably wise that when an SNMP entity sends + a SetRequest to change a key, that it keeps a copy of the old + key until it has confirmed that the key change actually + succeeded. + " + SYNTAX OCTET STRING */ /* * XXX: if the newkey is not long enough, it should be freed and remalloced */ 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) +decode_keychange(const oid *hashtype, u_int hashtype_len, + const u_char *oldkey, size_t oldkey_len, + const u_char *kcstring, size_t kcstring_len, + u_char *newkey, size_t *newkey_len) #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { - int rval = SNMPERR_SUCCESS; - size_t properlength = 0; - int iproperlength = 0; + int rval = SNMPERR_SUCCESS, auth_type; + size_t hash_len = 0, key_len = 0; + int ihash_len = 0; u_int nbytes = 0; - u_char *bufp, tmp_buf[SNMP_MAXBUF]; - size_t tmp_buf_len = SNMP_MAXBUF; + const u_char *deltap; + u_char hash[SNMP_MAXBUF]; + size_t delta_len, tmpbuf_len; u_char *tmpbuf = NULL; - - +#ifdef NETSNMP_ENABLE_TESTING_CODE + u_char *newkey_save = newkey; +#endif /* * Sanity check. */ if (!hashtype || !oldkey || !kcstring || !newkey || !newkey_len - || (oldkey_len <= 0) || (kcstring_len <= 0) || (*newkey_len <= 0) - || (hashtype_len != USM_LENGTH_OID_TRANSFORM)) { + || (oldkey_len == 0) || (kcstring_len == 0) || (*newkey_len == 0)) { + DEBUGMSGTL(("decode_keychange", "bad args\n")); QUITFUN(SNMPERR_GENERR, decode_keychange_quit); } - /* * Setup for the transform type. */ - iproperlength = sc_get_properlength(hashtype, hashtype_len); - if (iproperlength == SNMPERR_GENERR) + auth_type = sc_get_authtype(hashtype, hashtype_len); + ihash_len = sc_get_proper_auth_length_bytype(auth_type); + if (ihash_len == SNMPERR_GENERR) { + DEBUGMSGTL(("decode_keychange", "proper length err\n")); QUITFUN(SNMPERR_GENERR, decode_keychange_quit); - - properlength = (size_t) iproperlength; + } + hash_len = (size_t) ihash_len; + DEBUGMSGTL(("decode_keychange", + "oldkey_len %" NETSNMP_PRIz "d, newkey_len %" NETSNMP_PRIz "d, kcstring_len %" NETSNMP_PRIz "d, hash_len %" NETSNMP_PRIz "d\n", + oldkey_len, *newkey_len, kcstring_len, hash_len)); if (((oldkey_len * 2) != kcstring_len) || (*newkey_len < oldkey_len)) { + DEBUGMSGTL(("decode_keychange", "keylen error\n")); QUITFUN(SNMPERR_GENERR, decode_keychange_quit); } - properlength = oldkey_len; - *newkey_len = properlength; + /*********** handle hash len > keylen ******************/ + + key_len = oldkey_len; + *newkey_len = oldkey_len; + +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGIF("decode_keychange") { + int i; + DEBUGMSG(("decode_keychange", + "oldkey: key=0x")); + for (i = 0; i < oldkey_len; i++) + DEBUGMSG(("decode_keychange", "%02x", oldkey[i] & 0xff)); + DEBUGMSG(("decode_keychange", " (%ld)\n", oldkey_len)); + + DEBUGMSG(("decode_keychange", + "kcstring: key=0x")); + for (i = 0; i < kcstring_len; i++) + DEBUGMSG(("decode_keychange", "%02x", kcstring[i] & 0xff)); + DEBUGMSG(("decode_keychange", " (%ld)\n", kcstring_len)); + } +#endif /* NETSNMP_ENABLE_TESTING_CODE */ /* - * Use the old key and the given KeyChange TC string to recover - * the new key: - * . Hash (oldkey | random_bytes) (into newkey), - * . XOR hash and encoded (second) half of kcstring (into newkey). + * KeyChange ::= TEXTUAL-CONVENTION + * STATUS current + * DESCRIPTION + * [...] + * At the receiver side, when an instance of this object is set + * to a new value, then a new value of K is computed as follows: + * + * - a temporary variable is initialized to the existing value + * of K; */ - tmpbuf = (u_char *) malloc(properlength * 2); - if (tmpbuf) { - memcpy(tmpbuf, oldkey, properlength); - memcpy(tmpbuf + properlength, kcstring, properlength); + tmpbuf = (u_char *) malloc(key_len * 2); + if (NULL == tmpbuf) { + DEBUGMSGTL(("decode_keychange", "malloc failed\n")); + QUITFUN(SNMPERR_GENERR, decode_keychange_quit); + } + memcpy(tmpbuf, oldkey, key_len); + tmpbuf_len = key_len; - rval = sc_hash(hashtype, hashtype_len, tmpbuf, properlength * 2, - tmp_buf, &tmp_buf_len); + /* + * key=0xe27c077c47d4cb4e4473aeac969ba9fa622486e0|d7440406892e0941175cb5ee + * key=0xe27c077c47d4cb4e4473aeac969ba9fa622486e0|4fa8e081a6cb2f089f40949c + */ + delta_len = 0; + deltap = kcstring + key_len; + while (delta_len < key_len) { + + /* + * - if the length of the delta component is greater than L + * octets, then: + * - the random component is appended to the value of the + * temporary variable, ... + */ + DEBUGMSGTL(("decode_keychange", + "append random tmpbuf_len %" NETSNMP_PRIz "d key_len %" NETSNMP_PRIz "d\n", + tmpbuf_len, key_len)); + memcpy(tmpbuf + tmpbuf_len, kcstring, key_len); + tmpbuf_len += key_len; + + /* + * ... and the result is input to the + * hash algorithm H to produce a digest value, ... + */ + hash_len = sizeof(hash); + DEBUGMSGTL(("decode_keychange", "get hash\n")); + rval = sc_hash(hashtype, hashtype_len, tmpbuf, tmpbuf_len, + hash, &hash_len); QUITFUN(rval, decode_keychange_quit); + if (hash_len > key_len) { + DEBUGMSGTL(("decode_keychange", + "truncating hash to key_len\n")); + hash_len = key_len; + } - memcpy(newkey, tmp_buf, properlength); - bufp = kcstring + properlength; + /* + * ... and the + * temporary variable is set to this digest value; + */ + DEBUGMSGTL(("decode_keychange", "copy %" NETSNMP_PRIz "d hash bytes to tmp\n", + hash_len)); + memcpy(tmpbuf, hash, hash_len); + tmpbuf_len = hash_len; + + /* + * - the value of the temporary variable is XOR-ed with + * the first (next) L-octets (16 octets in case of MD5) + * of the delta component to produce the first (next) + * L-octets (16 octets in case of MD5) of the new value + * of K. + */ + DEBUGMSGTL(("decode_keychange", + "xor to get new key; hash_len %" NETSNMP_PRIz "d delta_len %" NETSNMP_PRIz "d\n", + hash_len, delta_len)); nbytes = 0; - while ((nbytes++) < properlength) { - *newkey++ ^= *bufp++; + while ((nbytes < hash_len) && (delta_len < key_len)) { + newkey[delta_len] = tmpbuf[nbytes++] ^ deltap[delta_len]; + ++delta_len; } } +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGIF("decode_keychange") { + int i; + DEBUGMSG(("decode_keychange", + "newkey: key=0x")); + for (i = 0; i < *newkey_len; i++) + DEBUGMSG(("decode_keychange", "%02x", newkey_save[i] & 0xff)); + DEBUGMSG(("decode_keychange", " (%ld)\n", *newkey_len)); + } +#endif /* NETSNMP_ENABLE_TESTING_CODE */ + decode_keychange_quit: if (rval != SNMPERR_SUCCESS) { + DEBUGMSGTL(("decode_keychange", "error %d\n", rval)); if (newkey) - memset(newkey, 0, properlength); + memset(newkey, 0, key_len); } - memset(tmp_buf, 0, SNMP_MAXBUF); + memset(hash, 0, SNMP_MAXBUF); SNMP_FREE(tmpbuf); return rval; diff --git a/snmplib/large_fd_set.c b/snmplib/large_fd_set.c index 88dd481..9a099f0 100644 --- a/snmplib/large_fd_set.c +++ b/snmplib/large_fd_set.c @@ -2,18 +2,26 @@ * @file large_fd_set.c * * @brief Macro's and functions for manipulation of large file descriptor sets. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ - #include -#include -#include /* memset(), which is invoked by FD_ZERO() */ - #ifdef HAVE_STDLIB_H #include +#else +#error broken #endif +#include +#include /* memset(), which is invoked by FD_ZERO() */ + +#include + #include #include #include @@ -32,18 +40,18 @@ netsnmp_large_fd_setfd(SOCKET fd, netsnmp_large_fd_set * fdset) netsnmp_assert(fd != INVALID_SOCKET); - if (fdset->lfs_set.fd_count == fdset->lfs_setsize) + if (fdset->lfs_setptr->fd_count == fdset->lfs_setsize) netsnmp_large_fd_set_resize(fdset, 2 * (fdset->lfs_setsize + 1)); - for (i = 0; i < fdset->lfs_set.fd_count; i++) { - if (fdset->lfs_set.fd_array[i] == (SOCKET) (fd)) + for (i = 0; i < fdset->lfs_setptr->fd_count; i++) { + if (fdset->lfs_setptr->fd_array[i] == fd) break; } - if (i == fdset->lfs_set.fd_count - && fdset->lfs_set.fd_count < fdset->lfs_setsize) { - fdset->lfs_set.fd_count++; - fdset->lfs_set.fd_array[i] = fd; + if (i == fdset->lfs_setptr->fd_count && + fdset->lfs_setptr->fd_count < fdset->lfs_setsize) { + fdset->lfs_setptr->fd_count++; + fdset->lfs_setptr->fd_array[i] = fd; } } @@ -54,14 +62,14 @@ netsnmp_large_fd_clr(SOCKET fd, netsnmp_large_fd_set * fdset) netsnmp_assert(fd != INVALID_SOCKET); - for (i = 0; i < fdset->lfs_set.fd_count; i++) { - if (fdset->lfs_set.fd_array[i] == fd) { - while (i < fdset->lfs_set.fd_count - 1) { - fdset->lfs_set.fd_array[i] = - fdset->lfs_set.fd_array[i + 1]; + for (i = 0; i < fdset->lfs_setptr->fd_count; i++) { + if (fdset->lfs_setptr->fd_array[i] == fd) { + while (i < fdset->lfs_setptr->fd_count - 1) { + fdset->lfs_setptr->fd_array[i] = + fdset->lfs_setptr->fd_array[i + 1]; i++; } - fdset->lfs_set.fd_count--; + fdset->lfs_setptr->fd_count--; break; } } @@ -74,8 +82,8 @@ netsnmp_large_fd_is_set(SOCKET fd, netsnmp_large_fd_set * fdset) netsnmp_assert(fd != INVALID_SOCKET); - for (i = 0; i < fdset->lfs_set.fd_count; i++) { - if (fdset->lfs_set.fd_array[i] == fd) + for (i = 0; i < fdset->lfs_setptr->fd_count; i++) { + if (fdset->lfs_setptr->fd_array[i] == fd) return 1; } return 0; @@ -83,13 +91,29 @@ netsnmp_large_fd_is_set(SOCKET fd, netsnmp_large_fd_set * fdset) #else -/* - * Recent versions of glibc trigger abort() if FD_SET(), FD_CLR() or - * FD_ISSET() is invoked with n >= FD_SETSIZE. Hence these replacement macros. - */ -#define LFD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1ULL << ((n) % NFDBITS))) -#define LFD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1ULL << ((n) % NFDBITS))) -#define LFD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1ULL << ((n) % NFDBITS))) +NETSNMP_STATIC_INLINE void LFD_SET(unsigned n, fd_set *p) +{ + enum { nfdbits = 8 * sizeof(p->fds_bits[0]) }; + NETSNMP_FD_MASK_TYPE *fds_array = p->fds_bits; + + fds_array[n / nfdbits] |= (1ULL << (n % nfdbits)); +} + +NETSNMP_STATIC_INLINE void LFD_CLR(unsigned n, fd_set *p) +{ + enum { nfdbits = 8 * sizeof(p->fds_bits[0]) }; + NETSNMP_FD_MASK_TYPE *fds_array = p->fds_bits; + + fds_array[n / nfdbits] &= ~(1ULL << (n % nfdbits)); +} + +NETSNMP_STATIC_INLINE unsigned LFD_ISSET(unsigned n, const fd_set *p) +{ + enum { nfdbits = 8 * sizeof(p->fds_bits[0]) }; + const NETSNMP_FD_MASK_TYPE *fds_array = p->fds_bits; + + return (fds_array[n / nfdbits] & (1ULL << (n % nfdbits))) != 0; +} void netsnmp_large_fd_setfd(int fd, netsnmp_large_fd_set * fdset) @@ -139,6 +163,12 @@ netsnmp_large_fd_set_select(int numfds, netsnmp_large_fd_set *readfds, netsnmp_large_fd_set *exceptfds, struct timeval *timeout) { + NETSNMP_SELECT_TIMEVAL tmo; + + if (timeout) { + tmo.tv_sec = timeout->tv_sec; + tmo.tv_usec = timeout->tv_usec; + } #if defined(cygwin) || !defined(HAVE_WINSOCK_H) /* Bit-set representation: make sure all fds have at least size 'numfds'. */ if (readfds && readfds->lfs_setsize < numfds) @@ -151,11 +181,10 @@ netsnmp_large_fd_set_select(int numfds, netsnmp_large_fd_set *readfds, /* Array representation: no resizing is necessary. */ #endif - return select(numfds, - readfds ? readfds->lfs_setptr : NULL, - writefds ? writefds->lfs_setptr : NULL, - exceptfds ? exceptfds->lfs_setptr : NULL, - timeout); + return select(numfds, (readfds) ? readfds->lfs_setptr : NULL, + (writefds) ? writefds->lfs_setptr : NULL, + (exceptfds) ? exceptfds->lfs_setptr : NULL, + timeout ? &tmo : NULL); } int @@ -204,8 +233,8 @@ netsnmp_large_fd_set_resize(netsnmp_large_fd_set * fdset, int setsize) fdset->lfs_setsize = setsize; #if !defined(cygwin) && defined(HAVE_WINSOCK_H) - if (setsize < fdset->lfs_set.fd_count) - fdset->lfs_set.fd_count = setsize; + if (setsize < fdset->lfs_setptr->fd_count) + fdset->lfs_setptr->fd_count = setsize; #endif success: return 1; @@ -213,7 +242,7 @@ netsnmp_large_fd_set_resize(netsnmp_large_fd_set * fdset, int setsize) out_of_mem: fdset->lfs_setsize = 0; #if !defined(cygwin) && defined(HAVE_WINSOCK_H) - fdset->lfs_set.fd_count = 0; + fdset->lfs_setptr->fd_count = 0; #endif return 0; } diff --git a/snmplib/lcd_time.c b/snmplib/lcd_time.c index 2bfa549..5c30cd1 100644 --- a/snmplib/lcd_time.c +++ b/snmplib/lcd_time.c @@ -13,16 +13,16 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -32,12 +32,9 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -53,8 +50,8 @@ #include -netsnmp_feature_child_of(usm_support, libnetsnmp) -netsnmp_feature_child_of(usm_lcd_time, usm_support) +netsnmp_feature_child_of(usm_support, libnetsnmp); +netsnmp_feature_child_of(usm_lcd_time, usm_support); #ifndef NETSNMP_FEATURE_REMOVE_USM_LCD_TIME @@ -544,7 +541,7 @@ hash_engineID(const u_char * engineID, u_int engineID_len) void dump_etimelist_entry(Enginetime e, int count) { - u_int buflen; + size_t buflen; char tabs[SNMP_MAXBUF], *t = tabs, *s; @@ -556,13 +553,9 @@ dump_etimelist_entry(Enginetime e, int count) buflen = e->engineID_len; -#ifdef NETSNMP_ENABLE_TESTING_CODE if (!(s = dump_snmpEngineID(e->engineID, &buflen))) { -#endif binary_to_hex(e->engineID, e->engineID_len, &s); -#ifdef NETSNMP_ENABLE_TESTING_CODE } -#endif DEBUGMSGTL(("dump_etimelist", "%s\n", tabs)); DEBUGMSGTL(("dump_etimelist", "%s%s (len=%d) <%d,%d>\n", tabs, diff --git a/snmplib/md5.c b/snmplib/md5.c index 1ce0727..96b1eaf 100644 --- a/snmplib/md5.c +++ b/snmplib/md5.c @@ -24,22 +24,6 @@ * ** -- You can print out the digest using MDprint(&MD) */ -/* - * Implementation notes: - * ** This implementation assumes that ints are 32-bit quantities. - * ** If the machine stores the least-significant byte of an int in the - * ** least-addressed byte (eg., VAX and 8086), then LOWBYTEFIRST should be - * ** set to TRUE. Otherwise (eg., SUNS), LOWBYTEFIRST should be set to - * ** FALSE. Note that on machines with LOWBYTEFIRST FALSE the routine - * ** MDupdate modifies has a side-effect on its input array (the order of bytes - * ** in each word are reversed). If this is undesired a call to MDreverse(X) can - * ** reverse the bytes of X back into order after each call to MDupdate. - */ - -/* - * code uses WORDS_BIGENDIAN defined by configure now -- WH 9/27/95 - */ - /* * Compile-time includes */ @@ -49,14 +33,17 @@ #ifndef NETSNMP_DISABLE_MD5 #include +#ifdef HAVE_INTTYPES_H +#include +#endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif @@ -89,6 +76,22 @@ #define is4 21 +/* + * Read four bytes starting from address p and interpret these four bytes + * as a 32-bits little endian integer. + */ +NETSNMP_STATIC_INLINE uint32_t le32(const uint32_t *p) +{ + uint32_t res = *p; + + if (NETSNMP_BIGENDIAN) { + uint32_t t = (res << 16) | (res >> 16); + res = ((t & 0xFF00FF00) >> 8) | ((t & 0x00FF00FF) << 8); + } + + return res; +} + /* * Compile-time macro declarations for MD5. * ** Note: The ``rot'' operator uses the variable ``tmp''. @@ -100,10 +103,10 @@ #define h(X,Y,Z) (X^Y^Z) #define i_(X,Y,Z) (Y ^ ((X) | (~Z))) #define rot(X,S) (tmp=X,(tmp<>(32-S))) -#define ff(A,B,C,D,i,s,lp) A = rot((A + f(B,C,D) + X[i] + lp),s) + B -#define gg(A,B,C,D,i,s,lp) A = rot((A + g(B,C,D) + X[i] + lp),s) + B -#define hh(A,B,C,D,i,s,lp) A = rot((A + h(B,C,D) + X[i] + lp),s) + B -#define ii(A,B,C,D,i,s,lp) A = rot((A + i_(B,C,D) + X[i] + lp),s) + B +#define ff(A,B,C,D,i,s,lp) A = rot((A + f(B,C,D) + le32(&X[i]) + lp),s) + B +#define gg(A,B,C,D,i,s,lp) A = rot((A + g(B,C,D) + le32(&X[i]) + lp),s) + B +#define hh(A,B,C,D,i,s,lp) A = rot((A + h(B,C,D) + le32(&X[i]) + lp),s) + B +#define ii(A,B,C,D,i,s,lp) A = rot((A + i_(B,C,D) + le32(&X[i]) + lp),s) + B #ifdef STDC_HEADERS #define Uns(num) num##U @@ -111,9 +114,6 @@ #define Uns(num) num #endif /* STDC_HEADERS */ -void MDreverse(unsigned int *); -static void MDblock(MDptr, const unsigned int *); - #ifdef NETSNMP_ENABLE_TESTING_CODE /* * MDprint(MDp) @@ -152,37 +152,6 @@ MDbegin(MDptr MDp) MDp->done = 0; } -/* - * MDreverse(X) - * ** Reverse the byte-ordering of every int in X. - * ** Assumes X is an array of 16 ints. - * ** The macro revx reverses the byte-ordering of the next word of X. - */ -#define revx { t = (*X << 16) | (*X >> 16); \ - *X++ = ((t & 0xFF00FF00) >> 8) | ((t & 0x00FF00FF) << 8); } - -void -MDreverse(unsigned int *X) -{ - register unsigned int t; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; - revx; -} - /* * MDblock(MDp,X) * ** Update message digest buffer MDp->buffer using 16-word data block X. @@ -194,9 +163,7 @@ static void MDblock(MDptr MDp, const unsigned int *X) { register unsigned int tmp, A, B, C, D; /* hpux sysv sun */ -#ifdef WORDS_BIGENDIAN - MDreverse(X); -#endif + A = MDp->buffer[0]; B = MDp->buffer[1]; C = MDp->buffer[2]; @@ -274,9 +241,6 @@ MDblock(MDptr MDp, const unsigned int *X) MDp->buffer[1] += B; MDp->buffer[2] += C; MDp->buffer[3] += D; -#ifdef WORDS_BIGENDIAN - MDreverse(X); -#endif } /* diff --git a/snmplib/memcheck.h b/snmplib/memcheck.h new file mode 100644 index 0000000..ffb171f --- /dev/null +++ b/snmplib/memcheck.h @@ -0,0 +1,11 @@ +#ifndef _MEMCHECK_H_ +#define _MEMCHECK_H_ + +#ifdef HAVE_VALGRIND_MEMCHECK_H +#include +#define MAKE_MEM_DEFINED(ptr, len) VALGRIND_MAKE_MEM_DEFINED(ptr, len) +#else +#define MAKE_MEM_DEFINED(ptr, len) do { } while (0) +#endif + +#endif /* _MEMCHECK_H_ */ diff --git a/snmplib/mib.c b/snmplib/mib.c index e790878..662f0ee 100644 --- a/snmplib/mib.c +++ b/snmplib/mib.c @@ -36,6 +36,11 @@ SOFTWARE. * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include @@ -44,54 +49,54 @@ SOFTWARE. #include #include -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -105,18 +110,18 @@ SOFTWARE. #include #include -netsnmp_feature_child_of(mib_api, libnetsnmp) -netsnmp_feature_child_of(mib_strings_all, mib_api) +netsnmp_feature_child_of(mib_api, libnetsnmp); +netsnmp_feature_child_of(mib_strings_all, mib_api); -netsnmp_feature_child_of(mib_snprint, mib_strings_all) -netsnmp_feature_child_of(mib_snprint_description, mib_strings_all) -netsnmp_feature_child_of(mib_snprint_variable, mib_strings_all) -netsnmp_feature_child_of(mib_string_conversions, mib_strings_all) -netsnmp_feature_child_of(print_mib, mib_strings_all) -netsnmp_feature_child_of(snprint_objid, mib_strings_all) -netsnmp_feature_child_of(snprint_value, mib_strings_all) +netsnmp_feature_child_of(mib_snprint, mib_strings_all); +netsnmp_feature_child_of(mib_snprint_description, mib_strings_all); +netsnmp_feature_child_of(mib_snprint_variable, mib_strings_all); +netsnmp_feature_child_of(mib_string_conversions, mib_strings_all); +netsnmp_feature_child_of(print_mib, mib_strings_all); +netsnmp_feature_child_of(snprint_objid, mib_strings_all); +netsnmp_feature_child_of(snprint_value, mib_strings_all); -netsnmp_feature_child_of(mib_to_asn_type, mib_api) +netsnmp_feature_child_of(mib_to_asn_type, mib_api); /** @defgroup mib_utilities mib parsing and datatype manipulation routines. * @ingroup library @@ -126,6 +131,7 @@ netsnmp_feature_child_of(mib_to_asn_type, mib_api) static char *uptimeString(u_long, char *, size_t); +#ifndef NETSNMP_DISABLE_MIB_LOADING static struct tree *_get_realloc_symbol(const oid * objid, size_t objidlen, struct tree *subtree, u_char ** buf, size_t * buf_len, @@ -141,6 +147,7 @@ static int print_tree_node(u_char ** buf, size_t * buf_len, static void handle_mibdirs_conf(const char *token, char *line); static void handle_mibs_conf(const char *token, char *line); static void handle_mibfile_conf(const char *token, char *line); +#endif /*NETSNMP_DISABLE_MIB_LOADING */ static void _oid_finish_printing(const oid * objid, size_t objidlen, u_char ** buf, size_t * buf_len, @@ -150,8 +157,8 @@ static void _oid_finish_printing(const oid * objid, size_t objidlen, /* * helper functions for get_module_node */ -static int node_to_oid(struct tree *, oid *, size_t *); #ifndef NETSNMP_DISABLE_MIB_LOADING +static int node_to_oid(struct tree *, oid *, size_t *); static int _add_strings_to_oid(struct tree *, char *, oid *, size_t *, size_t); #else @@ -167,13 +174,14 @@ NETSNMP_IMPORT struct tree *Mib; struct tree *Mib; /* Backwards compatibility */ #endif /* NETSNMP_DISABLE_MIB_LOADING */ -oid RFC1213_MIB[] = { 1, 3, 6, 1, 2, 1 }; static char Standard_Prefix[] = ".1.3.6.1.2.1"; /* * Set default here as some uses of read_objid require valid pointer. */ +#ifndef NETSNMP_DISABLE_MIB_LOADING static char *Prefix = &Standard_Prefix[0]; +#endif /* NETSNMP_DISABLE_MIB_LOADING */ typedef struct _PrefixList { const char *str; int len; @@ -354,8 +362,8 @@ sprint_realloc_hexstring(u_char ** buf, size_t * buf_len, size_t * out_len, { int line_len = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH); - if (!line_len) - line_len=len; + if (line_len <= 0) + line_len = len; for (; (int)len > line_len; len -= line_len) { if(!_sprint_hexstring_line(buf, buf_len, out_len, allow_realloc, cp, line_len)) @@ -570,10 +578,21 @@ sprint_realloc_octet_string(u_char ** buf, size_t * buf_len, break; case 't': /* new in rfc 3411 */ case 'a': + /* A string hint gives the max size - we may not need this much */ cnt = SNMP_MIN(width, ecp - cp); - if (!sprint_realloc_asciistring(buf, buf_len, out_len, - allow_realloc, cp, cnt)) + while ((*out_len + cnt + 1) > *buf_len) { + if (!allow_realloc || !snmp_realloc(buf, buf_len)) + return 0; + } + if (memchr(cp, '\0', cnt) == NULL) { + /* No embedded '\0' - use memcpy() to preserve UTF-8 */ + memcpy(*buf + *out_len, cp, cnt); + *out_len += cnt; + *(*buf + *out_len) = '\0'; + } else if (!sprint_realloc_asciistring(buf, buf_len, + out_len, allow_realloc, cp, cnt)) { return 0; + } cp += cnt; break; default: @@ -741,6 +760,8 @@ sprint_realloc_float(u_char ** buf, size_t * buf_len, const struct enum_list *enums, const char *hint, const char *units) { + char *printf_format_string = NULL; + if (var->type != ASN_OPAQUE_FLOAT) { if (!netsnmp_ds_get_boolean( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) { @@ -771,7 +792,12 @@ sprint_realloc_float(u_char ** buf, size_t * buf_len, } } - sprintf((char *) (*buf + *out_len), "%f", *var->val.floatVal); + printf_format_string = make_printf_format_string("%f"); + if (!printf_format_string) { + return 0; + } + snprintf((char *)(*buf + *out_len), 128, printf_format_string, *var->val.floatVal); + free(printf_format_string); *out_len += strlen((char *) (*buf + *out_len)); if (units) { @@ -811,6 +837,8 @@ sprint_realloc_double(u_char ** buf, size_t * buf_len, const struct enum_list *enums, const char *hint, const char *units) { + char *printf_format_string = NULL; + if (var->type != ASN_OPAQUE_DOUBLE) { if (!netsnmp_ds_get_boolean( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) { @@ -840,7 +868,12 @@ sprint_realloc_double(u_char ** buf, size_t * buf_len, } } - sprintf((char *) (*buf + *out_len), "%f", *var->val.doubleVal); + printf_format_string = make_printf_format_string("%f"); + if (!printf_format_string) { + return 0; + } + snprintf((char *)(*buf + *out_len), 128, printf_format_string, *var->val.doubleVal); + free(printf_format_string); *out_len += strlen((char *) (*buf + *out_len)); if (units) { @@ -1164,7 +1197,7 @@ sprint_realloc_timeticks(u_char ** buf, size_t * buf_len, size_t * out_len, if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_NUMERIC_TIMETICKS)) { char str[32]; - sprintf(str, "%lu", *(u_long *) var->val.integer); + snprintf(str, sizeof(str), "%lu", *(u_long *) var->val.integer); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) str)) { return 0; @@ -1173,7 +1206,8 @@ sprint_realloc_timeticks(u_char ** buf, size_t * buf_len, size_t * out_len, } if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT)) { char str[32]; - sprintf(str, "Timeticks: (%lu) ", *(u_long *) var->val.integer); + snprintf(str, sizeof(str), "Timeticks: (%lu) ", + *(u_long *) var->val.integer); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) str)) { return 0; @@ -1224,25 +1258,34 @@ sprint_realloc_hinted_integer(u_char ** buf, size_t * buf_len, char fmt[10] = "%l@", tmp[256]; int shift = 0, len, negative = 0; - if (hint[0] == 'd') { + if (!strchr("bdoux", decimaltype)) { + snmp_log(LOG_ERR, "Invalid decimal type '%c'\n", decimaltype); + return 0; + } + + switch (hint[0]) { + case 'd': /* * We might *actually* want a 'u' here. */ - if (hint[1] == '-') + if (hint[1] == '-') { shift = atoi(hint + 2); + if (shift < 0) + shift = 0; + } fmt[2] = decimaltype; if (val < 0) { negative = 1; val = -val; } - } else { - /* - * DISPLAY-HINT character is 'b', 'o', or 'x'. - */ + snprintf(tmp, sizeof(tmp), fmt, val); + break; + case 'o': + case 'x': fmt[2] = hint[0]; - } - - if (hint[0] == 'b') { + snprintf(tmp, sizeof(tmp), fmt, val); + break; + case 'b': { unsigned long int bit = 0x80000000LU; char *bp = tmp; while (bit) { @@ -1250,9 +1293,11 @@ sprint_realloc_hinted_integer(u_char ** buf, size_t * buf_len, bit >>= 1; } *bp = 0; + break; + } + default: + return 0; } - else - sprintf(tmp, fmt, val); if (shift != 0) { len = strlen(tmp); @@ -1263,7 +1308,7 @@ sprint_realloc_hinted_integer(u_char ** buf, size_t * buf_len, len--; } tmp[len] = '.'; - } else { + } else if (shift < sizeof(tmp) - 1) { tmp[shift + 1] = 0; while (shift) { if (len-- > 0) { @@ -1354,7 +1399,7 @@ sprint_realloc_integer(u_char ** buf, size_t * buf_len, size_t * out_len, } } else { char str[32]; - sprintf(str, "%ld", *var->val.integer); + snprintf(str, sizeof(str), "%ld", *var->val.integer); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) str)) { @@ -1369,7 +1414,7 @@ sprint_realloc_integer(u_char ** buf, size_t * buf_len, size_t * out_len, } } else { char str[32]; - sprintf(str, "(%ld)", *var->val.integer); + snprintf(str, sizeof(str), "(%ld)", *var->val.integer); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) enum_string)) { @@ -1451,7 +1496,7 @@ sprint_realloc_uinteger(u_char ** buf, size_t * buf_len, size_t * out_len, } } else { char str[32]; - sprintf(str, "%lu", *var->val.integer); + snprintf(str, sizeof(str), "%lu", *var->val.integer); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) str)) { @@ -1466,7 +1511,7 @@ sprint_realloc_uinteger(u_char ** buf, size_t * buf_len, size_t * out_len, } } else { char str[32]; - sprintf(str, "(%lu)", *var->val.integer); + snprintf(str, sizeof(str), "(%lu)", *var->val.integer); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) enum_string)) { @@ -1875,7 +1920,7 @@ sprint_realloc_bitstring(u_char ** buf, size_t * buf_len, size_t * out_len, netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM)) { char str[32]; - sprintf(str, "%d ", (len * 8) + bit); + snprintf(str, sizeof(str), "%d ", (len * 8) + bit); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) str)) { @@ -1883,7 +1928,7 @@ sprint_realloc_bitstring(u_char ** buf, size_t * buf_len, size_t * out_len, } } else { char str[32]; - sprintf(str, "(%d) ", (len * 8) + bit); + snprintf(str, sizeof(str), "(%d) ", (len * 8) + bit); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) enum_string)) { @@ -2062,6 +2107,74 @@ sprint_realloc_by_type(u_char ** buf, size_t * buf_len, size_t * out_len, } } +/** + * Generates a prinf format string. + * + * The original format string is combined with the optional + * NETSNMP_DS_LIB_OUTPUT_PRECISION string (the -Op parameter). + * + * Example: + * If the original format string is "%f", and the NETSNMP_DS_LIB_OUTPUT_PRECISION + * is "5.2", the returned format string will be "%5.2f". + * + * The PRECISION string is inserted after the '%' of the original format string. + * To prevent buffer overflow if NETSNMP_DS_LIB_OUTPUT_PRECISION is set to an + * illegal size (e.g. with -Op 10000) snprintf should be used to prevent buffer + * overflow. + * + * @param printf_format_default The format string used by the original printf. + * + * @return The address of of the new allocated format string (which must be freed + * if no longer used), or NULL if any error (malloc). + */ +char * +make_printf_format_string(const char *printf_format_default) +{ + const char *cp_printf_format_default; + const char *printf_precision; + const char *cp_printf_precision; + char *printf_format_string; + char *cp_out; + char c; + + printf_precision = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OUTPUT_PRECISION); + if (!printf_precision) { + printf_precision = ""; + } + + /* reserve new format string buffer */ + printf_format_string = (char *) malloc(strlen(printf_format_default)+strlen(printf_precision)+1); + if (!printf_format_string) + { + DEBUGMSGTL(("make_printf_format_string", "malloc failed\n")); + return NULL; + } + + /* copy default format string, including the '%' */ + cp_out = printf_format_string; + cp_printf_format_default = printf_format_default; + while((c = *cp_printf_format_default) != '\0') + { + *cp_out++ = c; + cp_printf_format_default++; + if (c == '%') break; + } + + /* insert the precision string */ + cp_printf_precision = printf_precision; + while ((c = *cp_printf_precision++) != '\0') + { + *cp_out++ = c; + } + + /* copy the remaining default format string, including the terminating '\0' */ + strcpy(cp_out, cp_printf_format_default); + + DEBUGMSGTL(("make_printf_format_string", "\"%s\"+\"%s\"->\"%s\"\n", + printf_format_default, printf_precision, printf_format_string)); + return printf_format_string; +} + #ifndef NETSNMP_DISABLE_MIB_LOADING /** @@ -2121,15 +2234,17 @@ handle_mibs_conf(const char *token, char *line) if (confmibs) { if ((*line == '+') || (*line == '-')) { - ctmp = (char *) malloc(strlen(confmibs) + strlen(line) + 2); - if (!ctmp) { + int res; + + res = *line++ == '+' ? + /* Add specified dirs after existing ones */ + asprintf(&ctmp, "%s%c%s", confmibs, ENV_SEPARATOR_CHAR, line) : + /* Add specified dirs before existing ones */ + asprintf(&ctmp, "%s%c%s", line, ENV_SEPARATOR_CHAR, confmibs); + if (res < 0) { DEBUGMSGTL(("read_config:initmib", "mibs conf malloc failed")); return; } - if(*line++ == '+') - sprintf(ctmp, "%s%c%s", confmibs, ENV_SEPARATOR_CHAR, line); - else - sprintf(ctmp, "%s%c%s", line, ENV_SEPARATOR_CHAR, confmibdir); } else { ctmp = strdup(line); if (!ctmp) { @@ -2175,8 +2290,8 @@ handle_print_numeric(const char *token, char *line) } } -char * -snmp_out_toggle_options(char *options) +char * +snmp_out_options(char *options, int argc, char *const *argv) { while (*options) { switch (*options++) { @@ -2205,6 +2320,19 @@ snmp_out_toggle_options(char *options) netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, NETSNMP_OID_OUTPUT_NUMERIC); break; + case 'p': + /* What if argc/argv are null ? */ + if (!*(options)) { + if (optind == argc) { + fprintf(stderr, "Missing precision for -Op\n"); + return options-1; + } + options = argv[optind++]; + } + netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_OUTPUT_PRECISION, + options); + return NULL; /* -Op... is a standalone option, so we're done here */ case 'q': netsnmp_ds_toggle_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT); break; @@ -2250,6 +2378,12 @@ snmp_out_toggle_options(char *options) return NULL; } +char * +snmp_out_toggle_options(char *options) +{ + return snmp_out_options( options, 0, NULL ); +} + void snmp_out_toggle_options_usage(const char *lead, FILE * outf) { @@ -2260,6 +2394,7 @@ snmp_out_toggle_options_usage(const char *lead, FILE * outf) fprintf(outf, "%sE: escape quotes in string indices\n", lead); fprintf(outf, "%sf: print full OIDs on output\n", lead); fprintf(outf, "%sn: print OIDs numerically\n", lead); + fprintf(outf, "%sp PRECISION: display floating point values with specified PRECISION (printf format string)\n", lead); fprintf(outf, "%sq: quick print for easier parsing\n", lead); fprintf(outf, "%sQ: quick print with equal-signs\n", lead); /* @@JDW */ fprintf(outf, "%ss: print only last symbolic element of OID\n", lead); @@ -2306,7 +2441,7 @@ snmp_in_options(char *optarg, int argc, char *const *argv) netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OIDSUFFIX, cp); - return NULL; + return NULL; /* -Is... is a standalone option, so we're done here */ case 'S': /* What if argc/argv are null ? */ @@ -2315,7 +2450,7 @@ snmp_in_options(char *optarg, int argc, char *const *argv) netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OIDPREFIX, cp); - return NULL; + return NULL; /* -IS... is a standalone option, so we're done here */ default: /* @@ -2371,7 +2506,7 @@ register_mib_handlers(void) "[mib-dirs|+mib-dirs|-mib-dirs]"); register_prenetsnmp_mib_handler("snmp", "mibs", handle_mibs_conf, NULL, - "[mib-tokens|+mib-tokens]"); + "[mib-tokens|+mib-tokens|-mib-tokens]"); register_config_handler("snmp", "mibfile", handle_mibfile_conf, NULL, "mibfile-to-read"); /* @@ -2598,7 +2733,8 @@ netsnmp_init_mib(void) */ netsnmp_fixup_mib_directory(); env_var = strdup(netsnmp_get_mib_directory()); - netsnmp_mibindex_load(); + if (!env_var) + return; DEBUGMSGTL(("init_mib", "Seen MIBDIRS: Looking in '%s' for mib dirs ...\n", @@ -2618,7 +2754,7 @@ netsnmp_init_mib(void) else entry = strtok_r(env_var, ENV_SEPARATOR, &st); while (entry) { - add_mibfile(entry, NULL, NULL); + add_mibfile(entry, NULL); entry = strtok_r(NULL, ENV_SEPARATOR, &st); } } @@ -2769,139 +2905,6 @@ init_mib(void) #endif -/* - * Handle MIB indexes centrally - */ -static int _mibindex = 0; /* Last index in use */ -static int _mibindex_max = 0; /* Size of index array */ -char **_mibindexes = NULL; - -int _mibindex_add( const char *dirname, int i ); -void -netsnmp_mibindex_load( void ) -{ - DIR *dir; - struct dirent *file; - FILE *fp; - char tmpbuf[ 300]; - char tmpbuf2[300]; - int i; - char *cp; - - /* - * Open the MIB index directory, or create it (empty) - */ - snprintf( tmpbuf, sizeof(tmpbuf), "%s/mib_indexes", - get_persistent_directory()); - tmpbuf[sizeof(tmpbuf)-1] = 0; - dir = opendir( tmpbuf ); - if ( dir == NULL ) { - DEBUGMSGTL(("mibindex", "load: (new)\n")); - mkdirhier( tmpbuf, NETSNMP_AGENT_DIRECTORY_MODE, 0); - return; - } - - /* - * Create a list of which directory each file refers to - */ - while ((file = readdir( dir ))) { - if ( !isdigit((unsigned char)(file->d_name[0]))) - continue; - i = atoi( file->d_name ); - - snprintf( tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d", - get_persistent_directory(), i ); - tmpbuf[sizeof(tmpbuf)-1] = 0; - fp = fopen( tmpbuf, "r" ); - if (!fp) - continue; - cp = fgets( tmpbuf2, sizeof(tmpbuf2), fp ); - if ( !cp ) { - DEBUGMSGTL(("mibindex", "Empty MIB index (%d)\n", i)); - fclose(fp); - continue; - } - tmpbuf2[strlen(tmpbuf2)-1] = 0; - DEBUGMSGTL(("mibindex", "load: (%d) %s\n", i, tmpbuf2)); - (void)_mibindex_add( tmpbuf2+4, i ); /* Skip 'DIR ' */ - fclose( fp ); - } - closedir( dir ); -} - -char * -netsnmp_mibindex_lookup( const char *dirname ) -{ - int i; - static char tmpbuf[300]; - - for (i=0; i<_mibindex; i++) { - if ( _mibindexes[i] && - strcmp( _mibindexes[i], dirname ) == 0) { - snprintf(tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d", - get_persistent_directory(), i); - tmpbuf[sizeof(tmpbuf)-1] = 0; - DEBUGMSGTL(("mibindex", "lookup: %s (%d) %s\n", dirname, i, tmpbuf )); - return tmpbuf; - } - } - DEBUGMSGTL(("mibindex", "lookup: (none)\n")); - return NULL; -} - -int -_mibindex_add( const char *dirname, int i ) -{ - const int old_mibindex_max = _mibindex_max; - - DEBUGMSGTL(("mibindex", "add: %s (%d)\n", dirname, i )); - if ( i == -1 ) - i = _mibindex++; - if ( i >= _mibindex_max ) { - /* - * If the index array is full (or non-existent) - * then expand (or create) it - */ - _mibindex_max = i + 10; - _mibindexes = realloc(_mibindexes, - _mibindex_max * sizeof(_mibindexes[0])); - netsnmp_assert(_mibindexes); - memset(_mibindexes + old_mibindex_max, 0, - (_mibindex_max - old_mibindex_max) * sizeof(_mibindexes[0])); - } - - _mibindexes[ i ] = strdup( dirname ); - if ( i >= _mibindex ) - _mibindex = i+1; - - DEBUGMSGTL(("mibindex", "add: %d/%d/%d\n", i, _mibindex, _mibindex_max )); - return i; -} - -FILE * -netsnmp_mibindex_new( const char *dirname ) -{ - FILE *fp; - char tmpbuf[300]; - char *cp; - int i; - - cp = netsnmp_mibindex_lookup( dirname ); - if (!cp) { - i = _mibindex_add( dirname, -1 ); - snprintf( tmpbuf, sizeof(tmpbuf), "%s/mib_indexes/%d", - get_persistent_directory(), i ); - tmpbuf[sizeof(tmpbuf)-1] = 0; - cp = tmpbuf; - } - DEBUGMSGTL(("mibindex", "new: %s (%s)\n", dirname, cp )); - fp = fopen( cp, "w" ); - if (fp) - fprintf( fp, "DIR %s\n", dirname ); - return fp; -} - - /** * Unloads all mibs. */ @@ -2916,15 +2919,6 @@ shutdown_mib(void) } tree_head = NULL; Mib = NULL; - if (_mibindexes) { - int i; - for (i = 0; i < _mibindex; ++i) - SNMP_FREE(_mibindexes[i]); - free(_mibindexes); - _mibindex = 0; - _mibindex_max = 0; - _mibindexes = NULL; - } if (Prefix != NULL && Prefix != &Standard_Prefix[0]) SNMP_FREE(Prefix); if (Prefix) @@ -3029,7 +3023,7 @@ set_function(struct tree *subtree) * When called, out_len must hold the maximum length of the output array. * * @param input the input string. - * @param output the oid wirte. + * @param output the oid write. * @param out_len number of subid's in output. * * @return 1 if successful. @@ -3040,11 +3034,11 @@ set_function(struct tree *subtree) */ int read_objid(const char *input, oid * output, size_t * out_len) -{ /* number of subid's in "output" */ +{ #ifndef NETSNMP_DISABLE_MIB_LOADING struct tree *root = tree_top; -#endif /* NETSNMP_DISABLE_MIB_LOADING */ char buf[SPRINT_MAX_LEN]; +#endif /* NETSNMP_DISABLE_MIB_LOADING */ int ret, max_out_len; char *name, ch; const char *cp; @@ -3743,9 +3737,21 @@ build_oid_segment(netsnmp_variable_list * var) } +/** + * Concatenate a prefix and the OIDs of a variable list. + * + * @param[out] in Output buffer. + * @param[in] in_len Maximum number of OID components that fit in @p in. + * @param[out] out_len Number of OID components of the result. + * @param[in] prefix OID to be copied to the start of the output buffer. + * @param[in] prefix_len Number of OID components to copy from @p prefix. + * @param[in,out] indexes Variable list for which var->name should be set + * for each variable var in the list and whose OIDs + * should be appended to @p in. + */ int build_oid_noalloc(oid * in, size_t in_len, size_t * out_len, - oid * prefix, size_t prefix_len, + const oid * prefix, size_t prefix_len, netsnmp_variable_list * indexes) { netsnmp_variable_list *var; @@ -3792,7 +3798,7 @@ build_oid(oid ** out, size_t * out_len, * * then see if it fits in existing buffer, or realloc buffer. */ - if (build_oid_noalloc(tmpout, sizeof(tmpout), out_len, + if (build_oid_noalloc(tmpout, sizeof(tmpout) / sizeof(tmpout[0]), out_len, prefix, prefix_len, indexes) != SNMPERR_SUCCESS) return SNMPERR_GENERR; @@ -4036,7 +4042,7 @@ dump_realloc_oid_to_inetaddress(const int addr_type, const oid * objid, size_t o return 1; for (i = 0; i < objidlen; i++) - if (objid[i] < 0 || objid[i] > 255) + if (objid[i] > 255) return 2; p = intbuf; @@ -4215,6 +4221,31 @@ _oid_finish_printing(const oid * objid, size_t objidlen, } #ifndef NETSNMP_DISABLE_MIB_LOADING +static void +_get_realloc_symbol_octet_string(size_t numids, const oid * objid, + u_char ** buf, size_t * buf_len, + size_t * out_len, int allow_realloc, + int *buf_overflow, struct tree* tp) +{ + netsnmp_variable_list var = { 0 }; + u_char buffer[1024]; + size_t i; + + for (i = 0; i < numids; i++) + buffer[i] = (u_char) objid[i]; + var.type = ASN_OCTET_STR; + var.val.string = buffer; + var.val_len = numids; + if (!*buf_overflow) { + if (!sprint_realloc_octet_string(buf, buf_len, out_len, + allow_realloc, &var, + NULL, tp->hint, + NULL)) { + *buf_overflow = 1; + } + } +} + static struct tree * _get_realloc_symbol(const oid * objid, size_t objidlen, struct tree *subtree, @@ -4228,6 +4259,7 @@ _get_realloc_symbol(const oid * objid, size_t objidlen, int output_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT); char intbuf[64]; + struct tree *orgtree = subtree; if (!objid || !buf) { return NULL; @@ -4288,7 +4320,6 @@ _get_realloc_symbol(const oid * objid, size_t objidlen, } } - if (end_of_known) { *end_of_known = *out_len; } @@ -4297,6 +4328,18 @@ _get_realloc_symbol(const oid * objid, size_t objidlen, * Subtree not found. */ + if (orgtree && in_dices && objidlen > 0) { + sprintf(intbuf, "%" NETSNMP_PRIo "u.", *objid); + if (!*buf_overflow + && !snmp_strcat(buf, buf_len, out_len, + allow_realloc, + (const u_char *) intbuf)) { + *buf_overflow = 1; + } + objid++; + objidlen--; + } + while (in_dices && (objidlen > 0) && (NETSNMP_OID_OUTPUT_NUMERIC != output_format) && !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS)) { @@ -4326,11 +4369,6 @@ _get_realloc_symbol(const oid * objid, size_t objidlen, switch (tp->type) { case TYPE_OCTETSTR: if (extended_index && tp->hint) { - netsnmp_variable_list var; - u_char buffer[1024]; - int i; - - memset(&var, 0, sizeof var); if (in_dices->isimplied) { numids = objidlen; if (numids > objidlen) @@ -4349,19 +4387,9 @@ _get_realloc_symbol(const oid * objid, size_t objidlen, } if (numids > objidlen) goto finish_it; - for (i = 0; i < (int) numids; i++) - buffer[i] = (u_char) objid[i]; - var.type = ASN_OCTET_STR; - var.val.string = buffer; - var.val_len = numids; - if (!*buf_overflow) { - if (!sprint_realloc_octet_string(buf, buf_len, out_len, - allow_realloc, &var, - NULL, tp->hint, - NULL)) { - *buf_overflow = 1; - } - } + _get_realloc_symbol_octet_string(numids, objid, buf, buf_len, + out_len, allow_realloc, + buf_overflow, tp); } else if (in_dices->isimplied) { numids = objidlen; if (numids > objidlen) @@ -4932,9 +4960,9 @@ print_tree_node(u_char ** buf, size_t * buf_len, cp = NULL; break; } -#if NETSNMP_ENABLE_TESTING_CODE +#ifdef NETSNMP_ENABLE_TESTING_CODE if (!cp && (tp->ranges || tp->enums)) { /* ranges without type ? */ - sprintf(str, "?0 with %s %s ?", + snprintf(str, sizeof(str), "?0 with %s %s ?", tp->ranges ? "Range" : "", tp->enums ? "Enum" : ""); cp = str; } @@ -4954,21 +4982,23 @@ print_tree_node(u_char ** buf, size_t * buf_len, case TYPE_INTEGER: case TYPE_INTEGER32: if (rp->low == rp->high) - sprintf(str, "%s%d", (first ? "" : " | "), rp->low ); + snprintf(str, sizeof(str), "%s%d", first ? "" : " | ", + rp->low ); else - sprintf(str, "%s%d..%d", (first ? "" : " | "), - rp->low, rp->high); + snprintf(str, sizeof(str), "%s%d..%d", + first ? "" : " | ", rp->low, rp->high); break; case TYPE_UNSIGNED32: case TYPE_OCTETSTR: case TYPE_GAUGE: case TYPE_UINTEGER: if (rp->low == rp->high) - sprintf(str, "%s%u", (first ? "" : " | "), + snprintf(str, sizeof(str), "%s%u", first ? "" : " | ", (unsigned)rp->low ); else - sprintf(str, "%s%u..%u", (first ? "" : " | "), - (unsigned)rp->low, (unsigned)rp->high); + snprintf(str, sizeof(str), "%s%u..%u", + first ? "" : " | ", (unsigned)rp->low, + (unsigned)rp->high); break; default: /* No other range types allowed */ @@ -5050,7 +5080,7 @@ print_tree_node(u_char ** buf, size_t * buf_len, cp = NULL; break; default: - sprintf(str, "access_%d", tp->access); + snprintf(str, sizeof(str), "access_%d", tp->access); cp = str; } if (cp) @@ -5079,12 +5109,13 @@ print_tree_node(u_char ** buf, size_t * buf_len, cp = NULL; break; default: - sprintf(str, "status_%d", tp->status); + snprintf(str, sizeof(str), "status_%d", tp->status); cp = str; } -#if NETSNMP_ENABLE_TESTING_CODE +#ifdef NETSNMP_ENABLE_TESTING_CODE if (!cp && (tp->indexes)) { /* index without status ? */ - sprintf(str, "?0 with %s ?", tp->indexes ? "Index" : ""); + snprintf(str, sizeof(str), "?0 with %s ?", + tp->indexes ? "Index" : ""); cp = str; } #endif /* NETSNMP_ENABLE_TESTING_CODE */ @@ -5258,13 +5289,13 @@ get_module_node(const char *fname, static int node_to_oid(struct tree *tp, oid * objid, size_t * objidlen) { - int numids, lenids; + size_t numids, lenids; oid *op; if (!tp || !objid || !objidlen) return 0; - lenids = (int) *objidlen; + lenids = *objidlen; op = objid + lenids; /* points after the last element */ for (numids = 0; tp; tp = tp->parent, numids++) { @@ -5274,7 +5305,7 @@ node_to_oid(struct tree *tp, oid * objid, size_t * objidlen) *op = tp->subid; } - *objidlen = (size_t) numids; + *objidlen = numids; if (numids > lenids) { return 0; } @@ -5282,9 +5313,8 @@ node_to_oid(struct tree *tp, oid * objid, size_t * objidlen) if (numids < lenids) memmove(objid, op, numids * sizeof(oid)); - return (numids); + return numids; } -#endif /* NETSNMP_DISABLE_MIB_LOADING */ /* * Replace \x with x stop at eos_marker @@ -5318,6 +5348,7 @@ static char *_apply_escapes(char *src, char eos_marker) return src; } } +#endif /* NETSNMP_DISABLE_MIB_LOADING */ static int #ifndef NETSNMP_DISABLE_MIB_LOADING @@ -5329,18 +5360,17 @@ _add_strings_to_oid(void *tp, char *cp, #endif /* NETSNMP_DISABLE_MIB_LOADING */ { oid subid; - int len_index = 1000000; -#ifndef NETSNMP_DISABLE_MIB_LOADING - struct tree *tp2 = NULL; - struct index_list *in_dices = NULL; -#endif /* NETSNMP_DISABLE_MIB_LOADING */ char *fcp, *ecp, *cp2 = NULL; char doingquote; - int len = -1, pos = -1; + int len = -1; #ifndef NETSNMP_DISABLE_MIB_LOADING + struct tree *tp2 = NULL; + struct index_list *in_dices = NULL; + int pos = -1; int check = !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DONT_CHECK_RANGE); int do_hint = !netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_NO_DISPLAY_HINT); + int len_index = 1000000; while (cp && tp && tp->child_list) { fcp = cp; @@ -5668,6 +5698,8 @@ _add_strings_to_oid(void *tp, char *cp, case '"': case '\'': doingquote = *cp++; + if (*cp == '\0') + goto bad_id; /* * insert length if requested */ @@ -5678,8 +5710,6 @@ _add_strings_to_oid(void *tp, char *cp, (*objidlen)++; } - if (!cp) - goto bad_id; while (*cp && *cp != doingquote) { if (*objidlen >= maxlen) goto bad_id; @@ -6077,9 +6107,10 @@ uptime_string_n(u_long timeticks, char *buf, size_t buflen) oid * snmp_parse_oid(const char *argv, oid * root, size_t * rootlen) { +#ifndef NETSNMP_DISABLE_MIB_LOADING size_t savlen = *rootlen; - static size_t tmpbuf_len = 0; - static char *tmpbuf; +#endif /* NETSNMP_DISABLE_MIB_LOADING */ + char *tmpbuf = NULL; const char *suffix, *prefix; suffix = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, @@ -6091,47 +6122,48 @@ snmp_parse_oid(const char *argv, oid * root, size_t * rootlen) suffix = ""; if (!prefix) prefix = ""; - if ((strlen(suffix) + strlen(prefix) + strlen(argv) + 2) > tmpbuf_len) { - tmpbuf_len = strlen(suffix) + strlen(argv) + strlen(prefix) + 2; - tmpbuf = (char *)realloc(tmpbuf, tmpbuf_len); + if (asprintf(&tmpbuf, "%s%s%s%s", prefix, argv, + suffix[0] == '.' || suffix[0] == '\0' ? "" : ".", + suffix) < 0) { + DEBUGMSGTL(("snmp_parse_oid", "Out of memory\n")); + return NULL; } - snprintf(tmpbuf, tmpbuf_len, "%s%s%s%s", prefix, argv, - ((suffix[0] == '.' || suffix[0] == '\0') ? "" : "."), - suffix); argv = tmpbuf; DEBUGMSGTL(("snmp_parse_oid","Parsing: %s\n",argv)); } #ifndef NETSNMP_DISABLE_MIB_LOADING - if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RANDOM_ACCESS) + if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_RANDOM_ACCESS) || strchr(argv, ':')) { - if (get_node(argv, root, rootlen)) { - return root; - } - } else if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REGEX_ACCESS)) { + if (get_node(argv, root, rootlen)) + goto out; + } else if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_REGEX_ACCESS)) { clear_tree_flags(tree_head); - if (get_wild_node(argv, root, rootlen)) { - return root; - } + if (get_wild_node(argv, root, rootlen)) + goto out; } else { #endif /* NETSNMP_DISABLE_MIB_LOADING */ - if (read_objid(argv, root, rootlen)) { - return root; - } + if (read_objid(argv, root, rootlen)) + goto out; #ifndef NETSNMP_DISABLE_MIB_LOADING *rootlen = savlen; - if (get_node(argv, root, rootlen)) { - return root; - } + if (get_node(argv, root, rootlen)) + goto out; *rootlen = savlen; DEBUGMSGTL(("parse_oid", "wildly parsing\n")); clear_tree_flags(tree_head); - if (get_wild_node(argv, root, rootlen)) { - return root; - } + if (get_wild_node(argv, root, rootlen)) + goto out; } #endif /* NETSNMP_DISABLE_MIB_LOADING */ - return NULL; + + root = NULL; + +out: + free(tmpbuf); + return root; } #ifndef NETSNMP_DISABLE_MIB_LOADING diff --git a/snmplib/mt_support.c b/snmplib/mt_support.c index d28ebe4..376cedb 100644 --- a/snmplib/mt_support.c +++ b/snmplib/mt_support.c @@ -43,7 +43,7 @@ static int snmp_res_init_mutex(mutex_type *mutex) { int rc = 0; -#if HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD_H pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); @@ -84,7 +84,7 @@ snmp_res_destroy_mutex(int groupID, int resourceID) return EFAULT; } -#if HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD_H rc = pthread_mutex_destroy(mutex); #elif defined(WIN32) DeleteCriticalSection(mutex); @@ -103,7 +103,7 @@ snmp_res_lock(int groupID, int resourceID) return EFAULT; } -#if HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD_H rc = pthread_mutex_lock(mutex); #elif defined(WIN32) EnterCriticalSection(mutex); @@ -122,7 +122,7 @@ snmp_res_unlock(int groupID, int resourceID) return EFAULT; } -#if HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD_H rc = pthread_mutex_unlock(mutex); #elif defined(WIN32) LeaveCriticalSection(mutex); diff --git a/snmplib/oid_stash.c b/snmplib/oid_stash.c index 8a79897..db5ae06 100644 --- a/snmplib/oid_stash.c +++ b/snmplib/oid_stash.c @@ -8,9 +8,9 @@ #include #include -netsnmp_feature_child_of(oid_stash_all, libnetsnmp) -netsnmp_feature_child_of(oid_stash, oid_stash_all) -netsnmp_feature_child_of(oid_stash_no_free, oid_stash_all) +netsnmp_feature_child_of(oid_stash_all, libnetsnmp); +netsnmp_feature_child_of(oid_stash, oid_stash_all); +netsnmp_feature_child_of(oid_stash_no_free, oid_stash_all); #ifndef NETSNMP_FEATURE_REMOVE_OID_STASH @@ -75,7 +75,7 @@ netsnmp_oid_stash_create_node(void) return netsnmp_oid_stash_create_sized_node(OID_STASH_CHILDREN_SIZE); } -netsnmp_feature_child_of(oid_stash_add_data, oid_stash_all) +netsnmp_feature_child_of(oid_stash_add_data, oid_stash_all); #ifndef NETSNMP_FEATURE_REMOVE_OID_STASH_ADD_DATA /** adds data to the stash at a given oid. @@ -197,7 +197,7 @@ netsnmp_oid_stash_get_node(netsnmp_oid_stash_node *root, * @param lookup the oid to look up a node for. * @param lookup_len the length of the lookup oid */ -netsnmp_feature_child_of(oid_stash_iterate, oid_stash_all) +netsnmp_feature_child_of(oid_stash_iterate, oid_stash_all); #ifndef NETSNMP_FEATURE_REMOVE_OID_STASH_ITERATE netsnmp_oid_stash_node * netsnmp_oid_stash_getnext_node(netsnmp_oid_stash_node *root, @@ -282,7 +282,7 @@ netsnmp_oid_stash_getnext_node(netsnmp_oid_stash_node *root, } #endif /* NETSNMP_FEATURE_REMOVE_OID_STASH_ITERATE */ -netsnmp_feature_child_of(oid_stash_get_data, oid_stash_all) +netsnmp_feature_child_of(oid_stash_get_data, oid_stash_all); #ifndef NETSNMP_FEATURE_REMOVE_OID_STASH_GET_DATA /** returns a data pointer associated with a given OID. @@ -305,7 +305,7 @@ netsnmp_oid_stash_get_data(netsnmp_oid_stash_node *root, } #endif /* NETSNMP_FEATURE_REMOVE_OID_STASH_GET_DATA */ -netsnmp_feature_child_of(oid_stash_store_all, oid_stash_all) +netsnmp_feature_child_of(oid_stash_store_all, oid_stash_all); #ifndef NETSNMP_FEATURE_REMOVE_OID_STASH_STORE_ALL /** a wrapper around netsnmp_oid_stash_store for use with a snmp_alarm. * when calling snmp_alarm, you can list this as a callback. The diff --git a/snmplib/opendir.c b/snmplib/opendir.c index 6cb8e06..6a6b518 100644 --- a/snmplib/opendir.c +++ b/snmplib/opendir.c @@ -8,6 +8,7 @@ #include #include #include +#include #ifdef HAVE_SYS_STAT_H #include #endif diff --git a/snmplib/openssl/openssl_des_local.h b/snmplib/openssl/openssl_des_local.h index f91d844..4b03232 100644 --- a/snmplib/openssl/openssl_des_local.h +++ b/snmplib/openssl/openssl_des_local.h @@ -110,20 +110,27 @@ l|=((DES_LONG)(*((c)++)))<<24L) /* NOTE - c is not incremented as per c2l */ -#define c2ln(c,l1,l2,n) { \ - c+=n; \ - l1=l2=0; \ - switch (n) { \ - case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \ - case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \ - case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \ - case 5: l2|=((DES_LONG)(*(--(c)))); \ - case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \ - case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \ - case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \ - case 1: l1|=((DES_LONG)(*(--(c)))); \ - } \ - } +#define c2ln(c,l1,l2,n) { \ + c+=n; \ + l1=l2=0; \ + switch (n) { \ + case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \ + /* fall through */ \ + case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \ + /* fall through */ \ + case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \ + /* fall through */ \ + case 5: l2|=((DES_LONG)(*(--(c)))); \ + /* fall through */ \ + case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \ + /* fall through */ \ + case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \ + /* fall through */ \ + case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \ + /* fall through */ \ + case 1: l1|=((DES_LONG)(*(--(c)))); \ + } \ + } #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ @@ -145,19 +152,27 @@ *((c)++)=(unsigned char)(((l) )&0xff)) /* NOTE - c is not incremented as per l2c */ -#define l2cn(l1,l2,c,n) { \ - c+=n; \ - switch (n) { \ - case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ - case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ - case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ - case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ - case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ - case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ - case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ - case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ - } \ - } +#define l2cn(l1,l2,c,n) { \ + c+=n; \ + switch (n) { \ + case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ + /* fall through */ \ + case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ + /* fall through */ \ + case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ + /* fall through */ \ + case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ + /* fall through */ \ + case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ + /* fall through */ \ + case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ + /* fall through */ \ + case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ + /* fall through */ \ + case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ + /* fall through */ \ + } \ + } #if (defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)) || defined(__ICC) #define ROTATE(a,n) (_lrotr(a,n)) diff --git a/snmplib/openssl/openssl_md32_common.h b/snmplib/openssl/openssl_md32_common.h index 279916f..6a07525 100644 --- a/snmplib/openssl/openssl_md32_common.h +++ b/snmplib/openssl/openssl_md32_common.h @@ -162,7 +162,7 @@ */ # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) # define ROTATE(a,n) ({ register unsigned int ret; \ - asm ( \ + __asm__ ( \ "roll %1,%0" \ : "=r"(ret) \ : "I"(n), "0"(a) \ @@ -172,7 +172,7 @@ # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) # define ROTATE(a,n) ({ register unsigned int ret; \ - asm ( \ + __asm__ ( \ "rlwinm %0,%1,%2,0,31" \ : "=r"(ret) \ : "r"(a), "I"(n)); \ @@ -180,7 +180,7 @@ }) # elif defined(__s390x__) # define ROTATE(a,n) ({ register unsigned int ret; \ - asm ("rll %0,%1,%2" \ + __asm__ ("rll %0,%1,%2" \ : "=r"(ret) \ : "r"(a), "I"(n)); \ ret; \ @@ -207,33 +207,31 @@ * unaligned data without raising an exception. */ # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ - asm ("bswapl %0":"=r"(r):"0"(r)); \ + __asm__ ("bswapl %0":"=r"(r):"0"(r)); \ (c)+=4; (l)=r; }) # define HOST_l2c(l,c) ({ unsigned int r=(l); \ - asm ("bswapl %0":"=r"(r):"0"(r)); \ - *((unsigned int *)(c))=r; (c)+=4; r; }) + __asm__ ("bswapl %0":"=r"(r):"0"(r)); \ + *((unsigned int *)(c))=r; (c)+=4; }) # endif # endif # endif #endif #if defined(__s390__) || defined(__s390x__) -# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, (l)) -# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l)) +# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4) +# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4) #endif #ifndef HOST_c2l #define HOST_c2l(c,l) (l =(((unsigned long)(*((c)++)))<<24), \ l|=(((unsigned long)(*((c)++)))<<16), \ l|=(((unsigned long)(*((c)++)))<< 8), \ - l|=(((unsigned long)(*((c)++))) ), \ - l) + l|=(((unsigned long)(*((c)++))) )) #endif #ifndef HOST_l2c #define HOST_l2c(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \ *((c)++)=(unsigned char)(((l)>>16)&0xff), \ *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ - *((c)++)=(unsigned char)(((l) )&0xff), \ - l) + *((c)++)=(unsigned char)(((l) )&0xff)) #endif #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) @@ -241,20 +239,20 @@ #ifndef PEDANTIC # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if defined(__s390x__) -# define HOST_c2l(c,l) ({ asm ("lrv %0,0(%1)" \ +# define HOST_c2l(c,l) ({ __asm__ ("lrv %0,0(%1)" \ :"=r"(l) : "r"(c)); \ - (c)+=4; (l); }) -# define HOST_l2c(l,c) ({ asm ("strv %0,0(%1)" \ + (c)+=4; }) +# define HOST_l2c(l,c) ({ __asm__ ("strv %0,0(%1)" \ : : "r"(l),"r"(c) : "memory"); \ - (c)+=4; (l); }) + (c)+=4; }) # endif # endif #endif #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) # ifndef B_ENDIAN /* See comment in DATA_ORDER_IS_BIG_ENDIAN section. */ -# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, l) -# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, l) +# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4) +# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4) # endif #endif @@ -362,11 +360,11 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c) p += HASH_CBLOCK-8; #if defined(DATA_ORDER_IS_BIG_ENDIAN) - (void)HOST_l2c(c->Nh,p); - (void)HOST_l2c(c->Nl,p); + HOST_l2c(c->Nh,p); + HOST_l2c(c->Nl,p); #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) - (void)HOST_l2c(c->Nl,p); - (void)HOST_l2c(c->Nh,p); + HOST_l2c(c->Nl,p); + HOST_l2c(c->Nh,p); #endif p -= HASH_CBLOCK; HASH_BLOCK_DATA_ORDER (c,p,1); diff --git a/snmplib/parse.c b/snmplib/parse.c index 4d44d88..69f8e0e 100644 --- a/snmplib/parse.c +++ b/snmplib/parse.c @@ -37,65 +37,62 @@ SOFTWARE. #ifndef NETSNMP_DISABLE_MIB_LOADING -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include #include -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H #include #endif /* * Wow. This is ugly. -- Wes */ -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #if defined(HAVE_REGEX_H) && defined(HAVE_REGCOMP) #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include @@ -109,8 +106,8 @@ SOFTWARE. #include #include -netsnmp_feature_child_of(find_module, mib_api) -netsnmp_feature_child_of(get_tc_description, mib_api) +netsnmp_feature_child_of(find_module, mib_api); +netsnmp_feature_child_of(get_tc_description, mib_api); /* * A linked list of nodes. @@ -150,7 +147,7 @@ struct subid_s { char *label; }; -#define MAXTC 4096 +#define TC_INCR 100 struct tc { /* textual conventions */ int type; int modid; @@ -159,7 +156,8 @@ struct tc { /* textual conventions */ struct enum_list *enums; struct range_list *ranges; char *description; -} tclist[MAXTC]; +} *tclist; +int tc_alloc; int mibLine = 0; const char *File = "(none)"; @@ -537,7 +535,7 @@ static struct module_compatability module_map[] = { #define MODULE_SYNTAX_ERROR 4 int gMibError = 0,gLoop = 0; -char *gpMibErrorString = NULL; +static char *gpMibErrorString; char gMibNames[STRINGMAX]; #define HASHSIZE 32 @@ -582,7 +580,6 @@ static void init_tree_roots(void); static void merge_anon_children(struct tree *, struct tree *); static void unlink_tbucket(struct tree *); static void unlink_tree(struct tree *); -static int getoid(FILE *, struct subid_s *, int); static struct node *parse_objectid(FILE *, char *); static int get_tc(const char *, int, int *, struct enum_list **, struct range_list **, char **); @@ -607,8 +604,6 @@ static int read_module_replacements(const char *); static int read_import_replacements(const char *, struct module_import *); -static void new_module(const char *, const char *); - static struct node *merge_parse_objectid(struct node *, FILE *, char *); static struct index_list *getIndexes(FILE * fp, struct index_list **); static struct varbind_list *getVarbinds(FILE * fp, struct varbind_list **); @@ -749,7 +744,8 @@ netsnmp_init_mib_internals(void) memset(nbuckets, 0, sizeof(nbuckets)); memset(tbuckets, 0, sizeof(tbuckets)); - memset(tclist, 0, MAXTC * sizeof(struct tc)); + tc_alloc = TC_INCR; + tclist = calloc(tc_alloc, sizeof(struct tc)); build_translation_table(); init_tree_roots(); /* Set up initial roots */ /* @@ -783,7 +779,7 @@ init_node_hash(struct node *nodes) static int erroneousMibs = 0; -netsnmp_feature_child_of(parse_get_error_count, netsnmp_unused) +netsnmp_feature_child_of(parse_get_error_count, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_PARSE_GET_ERROR_COUNT int get_mib_parse_error_count(void) @@ -797,6 +793,9 @@ static void print_error(const char *str, const char *token, int type) { erroneousMibs++; + if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_MIB_ERRORS)) + return; DEBUGMSGTL(("parse-mibs", "\n")); if (type == ENDOFFILE) snmp_log(LOG_ERR, "%s (EOF): At line %d in %s\n", str, mibLine, @@ -827,13 +826,16 @@ static struct node * alloc_node(int modid) { struct node *np; - np = (struct node *) calloc(1, sizeof(struct node)); - if (np) { - np->tc_index = -1; - np->modid = modid; - np->filename = strdup(File); - np->lineno = mibLine; - } + + np = calloc(1, sizeof(struct node)); + if (!np) + return NULL; + + np->tc_index = -1; + np->modid = modid; + np->filename = strdup(File); + np->lineno = mibLine; + return np; } @@ -933,25 +935,16 @@ free_node(struct node *np) free_ranges(&np->ranges); free_indexes(&np->indexes); free_varbinds(&np->varbinds); - if (np->label) - free(np->label); - if (np->hint) - free(np->hint); - if (np->units) - free(np->units); - if (np->description) - free(np->description); - if (np->reference) - free(np->reference); - if (np->defaultValue) - free(np->defaultValue); - if (np->parent) - free(np->parent); - if (np->augments) - free(np->augments); - if (np->filename) - free(np->filename); - free((char *) np); + free(np->label); + free(np->hint); + free(np->units); + free(np->description); + free(np->reference); + free(np->defaultValue); + free(np->parent); + free(np->augments); + free(np->filename); + free(np); } static void @@ -1760,6 +1753,7 @@ do_linkup(struct module *mp, struct node *np) continue; tp = find_tree_node(mip->label, mip->modid); if (!tp) { + if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_MIB_ERRORS)) snmp_log(LOG_WARNING, "Did not find '%s' in module %s (%s)\n", mip->label, module_name(mip->modid, modbuf), @@ -1801,6 +1795,7 @@ do_linkup(struct module *mp, struct node *np) op->next = np->next; else nbuckets[hash] = np->next; + DEBUGMSGTL(("parse-mibs", "Moving %s to orphanage", np->label)); np->next = orphan_nodes; orphan_nodes = np; op = NULL; @@ -1864,18 +1859,22 @@ do_linkup(struct module *mp, struct node *np) } -/* +/** + * Read an OID from a file. + * @param[in] file File to read from. + * @param[out] id_arg Array to store the OID in. + * @param[in] length Number of elements in the @id_arg array. + * * Takes a list of the form: * { iso org(3) dod(6) 1 } * and creates several nodes, one for each parent-child pair. * Returns 0 on error. */ static int -getoid(FILE * fp, struct subid_s *id, /* an array of subids */ - int length) -{ /* the length of the array */ - register int count; - int type; +getoid(FILE * fp, struct subid_s *id_arg, int length) +{ + struct subid_s *id = id_arg; + int i, count, type; char token[MAXTOKEN]; if ((type = get_token(fp, token, MAXTOKEN)) != LEFTBRACKET) { @@ -1903,11 +1902,11 @@ getoid(FILE * fp, struct subid_s *id, /* an array of subids */ get_token(fp, token, MAXTOKEN)) != RIGHTPAREN) { print_error("Expected a closing parenthesis", token, type); - return 0; + goto free_labels; } } else { print_error("Expected a number", token, type); - return 0; + goto free_labels; } } else { continue; @@ -1919,11 +1918,19 @@ getoid(FILE * fp, struct subid_s *id, /* an array of subids */ id->subid = strtoul(token, NULL, 10); } else { print_error("Expected label or number", token, type); - return 0; + goto free_labels; } type = get_token(fp, token, MAXTOKEN); } print_error("Too long OID", token, type); + --count; + +free_labels: + for (i = 0; i <= count; i++) { + free(id_arg[i].label); + id_arg[i].label = NULL; + } + return 0; } @@ -2010,9 +2017,14 @@ parse_objectid(FILE * fp, char *name) if (op->label && (nop->label || (nop->subid != -1))) { np = alloc_node(nop->modid); if (np == NULL) - return (NULL); - if (root == NULL) + goto err; + if (root == NULL) { root = np; + } else { + netsnmp_assert(oldnp); + oldnp->next = np; + } + oldnp = np; np->parent = strdup(op->label); if (count == (length - 2)) { @@ -2020,20 +2032,12 @@ parse_objectid(FILE * fp, char *name) * The name for this node is the label for this entry */ np->label = strdup(name); - if (np->label == NULL) { - SNMP_FREE(np->parent); - SNMP_FREE(np); - return (NULL); - } + if (np->label == NULL) + goto err; } else { if (!nop->label) { - nop->label = (char *) malloc(20 + ANON_LEN); - if (nop->label == NULL) { - SNMP_FREE(np->parent); - SNMP_FREE(np); - return (NULL); - } - sprintf(nop->label, "%s%d", ANON, anonymous++); + if (asprintf(&nop->label, "%s%d", ANON, anonymous++) < 0) + goto err; } np->label = strdup(nop->label); } @@ -2042,25 +2046,26 @@ parse_objectid(FILE * fp, char *name) else print_error("Warning: This entry is pretty silly", np->label, CONTINUE); - - /* - * set up next entry - */ - if (oldnp) - oldnp->next = np; - oldnp = np; } /* end if(op->label... */ } +out: /* * free the loid array */ for (count = 0, op = loid; count < length; count++, op++) { - if (op->label) - free(op->label); + free(op->label); + op->label = NULL; } return root; + +err: + for (; root; root = np) { + np = root->next; + free_node(root); + } + goto out; } static int @@ -2127,7 +2132,7 @@ get_tc_index(const char *descriptor, int modid) } - for (i = 0, tcp = tclist; i < MAXTC; i++, tcp++) { + for (i = 0, tcp = tclist; i < tc_alloc; i++, tcp++) { if (tcp->type == 0) break; if (!label_compare(descriptor, tcp->descriptor) && @@ -2146,9 +2151,9 @@ get_tc_index(const char *descriptor, int modid) const char * get_tc_descriptor(int tc_index) { - if (tc_index < 0 || tc_index >= MAXTC) + if (tc_index < 0 || tc_index >= tc_alloc) return NULL; - return (tclist[tc_index].descriptor); + return tclist[tc_index].descriptor; } #ifndef NETSNMP_FEATURE_REMOVE_GET_TC_DESCRIPTION @@ -2156,9 +2161,9 @@ get_tc_descriptor(int tc_index) const char * get_tc_description(int tc_index) { - if (tc_index < 0 || tc_index >= MAXTC) + if (tc_index < 0 || tc_index >= tc_alloc) return NULL; - return (tclist[tc_index].description); + return tclist[tc_index].description; } #endif /* NETSNMP_FEATURE_REMOVE_GET_TC_DESCRIPTION */ @@ -2274,7 +2279,7 @@ parse_ranges(FILE * fp, struct range_list **retp) if (size) { if (nexttype != RIGHTPAREN) print_error("Expected \")\" after SIZE", nexttoken, nexttype); - nexttype = get_token(fp, nexttoken, nexttype); + nexttype = get_token(fp, nexttoken, MAXTOKEN); } if (nexttype != RIGHTPAREN) print_error("Expected \")\"", nexttoken, nexttype); @@ -2349,9 +2354,7 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) *ntype); return NULL; } - /* - * fall through - */ + /* FALL THROUGH */ case INTEGER: *ntype = get_token(fp, ntoken, MAXTOKEN); do { @@ -2386,20 +2389,24 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) while (type != SYNTAX && type != ENDOFFILE) { if (type == DISPLAYHINT) { type = get_token(fp, token, MAXTOKEN); - if (type != QUOTESTRING) + if (type != QUOTESTRING) { print_error("DISPLAY-HINT must be string", token, type); - else + } else { + free(hint); hint = strdup(token); + } } else if (type == DESCRIPTION && netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_SAVE_MIB_DESCRS)) { type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); - if (type != QUOTESTRING) + if (type != QUOTESTRING) { print_error("DESCRIPTION must be string", token, type); - else + } else { + free(descr); descr = strdup(quoted_string_buffer); + } } else type = get_token(fp, quoted_string_buffer, MAXQUOTESTR); @@ -2409,8 +2416,7 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) type = get_token(fp, token, MAXTOKEN); if (type != IDENTIFIER) { print_error("Expected IDENTIFIER", token, type); - SNMP_FREE(hint); - return NULL; + goto err; } type = OBJID; } @@ -2418,7 +2424,7 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) type = get_token(fp, token, MAXTOKEN); if (type != IDENTIFIER) { print_error("Expected IDENTIFIER", token, type); - return NULL; + goto err; } type = OBJID; } @@ -2430,21 +2436,20 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) /* * textual convention */ - for (i = 0; i < MAXTC; i++) { + for (i = 0; i < tc_alloc; i++) { if (tclist[i].type == 0) break; } - if (i == MAXTC) { - print_error("Too many textual conventions", token, type); - SNMP_FREE(hint); - return NULL; + if (i == tc_alloc) { + tclist = realloc(tclist, (tc_alloc + TC_INCR)*sizeof(struct tc)); + memset(tclist+tc_alloc, 0, TC_INCR*sizeof(struct tc)); + tc_alloc += TC_INCR; } if (!(type & SYNTAX_MASK)) { print_error("Textual convention doesn't map to real type", token, type); - SNMP_FREE(hint); - return NULL; + goto err; } tcp = &tclist[i]; tcp->modid = current_module; @@ -2465,6 +2470,11 @@ parse_asntype(FILE * fp, char *name, int *ntype, char *ntoken) } return NULL; } + +err: + SNMP_FREE(descr); + SNMP_FREE(hint); + return NULL; } @@ -2716,6 +2726,15 @@ parse_objecttype(FILE * fp, char *name) return NULL; } + /* + * Ensure strlen(defbuf) is above zero + */ + if (strlen(defbuf) == 0) { + print_error("Bad DEFAULTVALUE", quoted_string_buffer, + type); + free_node(np); + return NULL; + } defbuf[strlen(defbuf) - 1] = 0; np->defaultValue = strdup(defbuf); } @@ -3627,14 +3646,16 @@ parse_imports(FILE * fp) register int type; char token[MAXTOKEN]; char modbuf[256]; -#define MAX_IMPORTS 256 - struct module_import import_list[MAX_IMPORTS]; +#define MAX_IMPORTS 512 + struct module_import *import_list; int this_module; struct module *mp; int import_count = 0; /* Total number of imported descriptors */ int i = 0, old_i; /* index of first import from each module */ + import_list = malloc(MAX_IMPORTS * sizeof(*import_list)); + type = get_token(fp, token, MAXTOKEN); /* @@ -3647,7 +3668,7 @@ parse_imports(FILE * fp) do { type = get_token(fp, token, MAXTOKEN); } while (type != SEMI && type != ENDOFFILE); - return; + goto out; } import_list[import_count++].label = strdup(token); } else if (type == FROM) { @@ -3676,14 +3697,18 @@ parse_imports(FILE * fp) type = get_token(fp, token, MAXTOKEN); } + /* Initialize modid in case the module name was missing. */ + for (; i < import_count; ++i) + import_list[i].modid = -1; + /* * Save the import information * in the global module table */ - for (mp = module_head; mp; mp = mp->next) + for (mp = module_head; mp; mp = mp->next) { if (mp->modid == current_module) { if (import_count == 0) - return; + goto out; if (mp->imports && (mp->imports != root_imports)) { /* * this can happen if all modules are in one source file. @@ -3693,14 +3718,14 @@ parse_imports(FILE * fp) "#### freeing Module %d '%s' %d\n", mp->modid, mp->imports[i].label, mp->imports[i].modid)); - free((char *) mp->imports[i].label); + free(mp->imports[i].label); } - free((char *) mp->imports); + free(mp->imports); } mp->imports = (struct module_import *) calloc(import_count, sizeof(struct module_import)); if (mp->imports == NULL) - return; + goto out; for (i = 0; i < import_count; ++i) { mp->imports[i].label = import_list[i].label; mp->imports[i].modid = import_list[i].modid; @@ -3709,13 +3734,17 @@ parse_imports(FILE * fp) mp->imports[i].label, mp->imports[i].modid)); } mp->no_imports = import_count; - return; + goto out; } + } /* * Shouldn't get this far */ print_module_not_found(module_name(current_module, modbuf)); + +out: + free(import_list); return; } @@ -3777,7 +3806,7 @@ module_name(int modid, char *cp) * or those relating to a specified identifier (read_import_replacements) * plus an interface to add new replacement requirements */ -netsnmp_feature_child_of(parse_add_module_replacement, netsnmp_unused) +netsnmp_feature_child_of(parse_add_module_replacement, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_PARSE_ADD_MODULE_REPLACEMENT void add_module_replacement(const char *old_module, @@ -4064,7 +4093,8 @@ unload_module_by_ID(int modID, struct tree *tree_top) tp->number_modules = cnt; switch (cnt) { case 0: - tp->module_list[0] = -1; /* Mark unused, and FALL THROUGH */ + tp->module_list[0] = -1; /* Mark unused, */ + /* FALL THROUGH */ case 1: /* save the remaining module */ if (&(tp->modid) != tp->module_list) { @@ -4184,7 +4214,7 @@ unload_all_mibs(void) * tree nodes are cleared */ - for (i = 0, ptc = tclist; i < MAXTC; i++, ptc++) { + for (i = 0, ptc = tclist; i < tc_alloc; i++, ptc++) { if (ptc->type == 0) continue; free_enums(&ptc->enums); @@ -4195,7 +4225,7 @@ unload_all_mibs(void) if (ptc->description) free(ptc->description); } - memset(tclist, 0, MAXTC * sizeof(struct tc)); + memset(tclist, 0, tc_alloc * sizeof(struct tc)); memset(buckets, 0, sizeof(buckets)); memset(nbuckets, 0, sizeof(nbuckets)); @@ -4596,6 +4626,7 @@ parse(FILE * fp, struct node *root) static int is_labelchar(int ich) { + netsnmp_assert(ich == EOF || (0 <= ich && ich < 256)); if ((isalnum(ich)) || (ich == '-')) return 1; if (ich == '_' && netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, @@ -4627,7 +4658,7 @@ static int netsnmp_getc(FILE *stream) * Warning: this method may recurse. */ static int -get_token(FILE * fp, char *token, int maxtlen) +get_token(FILE *const fp, char *const token, const int maxtlen) { register int ch, ch_next; register char *cp = token; @@ -4660,6 +4691,7 @@ get_token(FILE * fp, char *token, int maxtlen) if (ch == '0' || ch == '1') break; seenSymbols = xdigits; + /* FALL THROUGH */ case xdigits: if (isxdigit(ch)) break; @@ -4832,7 +4864,7 @@ get_token(FILE * fp, char *token, int maxtlen) } } -netsnmp_feature_child_of(parse_get_token, netsnmp_unused) +netsnmp_feature_child_of(parse_get_token, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_PARSE_GET_TOKEN int snmp_get_token(FILE * fp, char *token, int maxtlen) @@ -4842,7 +4874,7 @@ snmp_get_token(FILE * fp, char *token, int maxtlen) #endif /* NETSNMP_FEATURE_REMOVE_PARSE_GET_TOKEN */ int -add_mibfile(const char* tmpstr, const char* d_name, FILE *ip ) +add_mibfile(const char* tmpstr, const char* d_name) { FILE *fp; char token[MAXTOKEN], token2[MAXTOKEN]; @@ -4867,8 +4899,6 @@ add_mibfile(const char* tmpstr, const char* d_name, FILE *ip ) */ if (get_token(fp, token2, MAXTOKEN) == DEFINITIONS) { new_module(token, tmpstr); - if (ip) - fprintf(ip, "%s %s\n", token, d_name); fclose(fp); return 0; } else { @@ -4877,6 +4907,80 @@ add_mibfile(const char* tmpstr, const char* d_name, FILE *ip ) } } +static int elemcmp(const void *a, const void *b) +{ + const char *const *s1 = a, *const *s2 = b; + + return strcmp(*s1, *s2); +} + +/* + * Scan a directory and return all filenames found as an array of pointers to + * directory entries (@result). + */ +static int scan_directory(char ***result, const char *dirname) +{ + DIR *dir, *dir2; + struct dirent *file; + char **filenames = NULL; + int fname_len, i, filename_count = 0, array_size = 0; + char *tmpstr; + + *result = NULL; + + dir = opendir(dirname); + if (!dir) + return -1; + + while ((file = readdir(dir))) { + /* + * Only parse file names that don't begin with a '.' + * Also skip files ending in '~', or starting/ending + * with '#' which are typically editor backup files. + */ + fname_len = strlen(file->d_name); + if (fname_len > 0 && file->d_name[0] != '.' + && file->d_name[0] != '#' + && file->d_name[fname_len-1] != '#' + && file->d_name[fname_len-1] != '~') { + if (asprintf(&tmpstr, "%s/%s", dirname, file->d_name) < 0) + continue; + dir2 = opendir(tmpstr); + if (dir2) { + /* file is a directory, don't read it */ + closedir(dir2); + } else { + if (filename_count >= array_size) { + char **new_filenames; + + array_size = (array_size + 16) * 2; + new_filenames = realloc(filenames, + array_size * sizeof(filenames[0])); + if (!new_filenames) { + free(tmpstr); + for (i = 0; i < filename_count; i++) + free(filenames[i]); + free(filenames); + closedir(dir); + return -1; + } + filenames = new_filenames; + } + filenames[filename_count++] = tmpstr; + tmpstr = NULL; + } + free(tmpstr); + } + } + closedir(dir); + + if (filenames) + qsort(filenames, filename_count, sizeof(filenames[0]), elemcmp); + *result = filenames; + + return filename_count; +} + /* For Win32 platforms, the directory does not maintain a last modification * date that we can compare with the modification date of the .index file. * Therefore there is no way to know whether any .index file is valid. @@ -4886,92 +4990,23 @@ add_mibfile(const char* tmpstr, const char* d_name, FILE *ip ) int add_mibdir(const char *dirname) { - FILE *ip; - DIR *dir, *dir2; const char *oldFile = File; - struct dirent *file; - char tmpstr[300]; + char **filenames; int count = 0; - int fname_len = 0; -#if !(defined(WIN32) || defined(cygwin)) - char *token; - char space; - char newline; - struct stat dir_stat, idx_stat; - char tmpstr1[300]; -#endif + int filename_count, i; DEBUGMSGTL(("parse-mibs", "Scanning directory %s\n", dirname)); -#if !(defined(WIN32) || defined(cygwin)) - token = netsnmp_mibindex_lookup( dirname ); - if (token && stat(token, &idx_stat) == 0 && stat(dirname, &dir_stat) == 0) { - if (dir_stat.st_mtime < idx_stat.st_mtime) { - DEBUGMSGTL(("parse-mibs", "The index is good\n")); - if ((ip = fopen(token, "r")) != NULL) { - fgets(tmpstr, sizeof(tmpstr), ip); /* Skip dir line */ - while (fscanf(ip, "%127s%c%299s%c", token, &space, tmpstr, - &newline) == 4) { - - /* - * If an overflow of the token or tmpstr buffers has been - * found log a message and break out of the while loop, - * thus the rest of the file tokens will be ignored. - */ - if (space != ' ' || newline != '\n') { - snmp_log(LOG_ERR, - "add_mibdir: strings scanned in from %s/%s " \ - "are too large. count = %d\n ", dirname, - ".index", count); - break; - } - - snprintf(tmpstr1, sizeof(tmpstr1), "%s/%s", dirname, tmpstr); - tmpstr1[ sizeof(tmpstr1)-1 ] = 0; - new_module(token, tmpstr1); - count++; - } - fclose(ip); - return count; - } else - DEBUGMSGTL(("parse-mibs", "Can't read index\n")); - } else - DEBUGMSGTL(("parse-mibs", "Index outdated\n")); - } else - DEBUGMSGTL(("parse-mibs", "No index\n")); -#endif - if ((dir = opendir(dirname))) { - ip = netsnmp_mibindex_new( dirname ); - while ((file = readdir(dir))) { - /* - * Only parse file names that don't begin with a '.' - * Also skip files ending in '~', or starting/ending - * with '#' which are typically editor backup files. - */ - if (file->d_name != NULL) { - fname_len = strlen( file->d_name ); - if (fname_len > 0 && file->d_name[0] != '.' - && file->d_name[0] != '#' - && file->d_name[fname_len-1] != '#' - && file->d_name[fname_len-1] != '~') { - snprintf(tmpstr, sizeof(tmpstr), "%s/%s", dirname, file->d_name); - tmpstr[ sizeof(tmpstr)-1 ] = 0; - if ((dir2 = opendir(tmpstr))) { - /* - * file is a directory, don't read it - */ - closedir(dir2); - } else { - if ( !add_mibfile( tmpstr, file->d_name, ip )) - count++; - } - } - } + filename_count = scan_directory(&filenames, dirname); + + if (filename_count >= 0) { + for (i = 0; i < filename_count; i++) { + if (add_mibfile(filenames[i], strrchr(filenames[i], '/')) == 0) + count++; + free(filenames[i]); } File = oldFile; - closedir(dir); - if (ip) - fclose(ip); + free(filenames); return (count); } else @@ -5025,14 +5060,12 @@ read_all_mibs(void) /* If entered the syntax error loop in "read_module()" */ if (gLoop == 1) { gLoop = 0; - if (gpMibErrorString != NULL) { - SNMP_FREE(gpMibErrorString); - } - gpMibErrorString = (char *) calloc(1, MAXQUOTESTR); - if (gpMibErrorString == NULL) { - snmp_log(LOG_CRIT, "failed to allocated memory for gpMibErrorString\n"); - } else { - snprintf(gpMibErrorString, sizeof(gpMibErrorString)-1, "Error in parsing MIB module(s): %s ! Unable to load corresponding MIB(s)", gMibNames); + free(gpMibErrorString); + gpMibErrorString = NULL; + if (asprintf(&gpMibErrorString, "Error in parsing MIB module(s): %s !" + " Unable to load corresponding MIB(s)", gMibNames) < 0) { + snmp_log(LOG_CRIT, + "failed to allocated memory for gpMibErrorString\n"); } } @@ -5334,7 +5367,7 @@ find_node(const char *name, struct tree *subtree) return (find_tree_node(name, -1)); } -netsnmp_feature_child_of(parse_find_node2, netsnmp_unused) +netsnmp_feature_child_of(parse_find_node2, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_PARSE_FIND_NODE2 struct tree * find_node2(const char *name, const char *module) diff --git a/snmplib/read_config.c b/snmplib/read_config.c index 3167674..54a7c11 100644 --- a/snmplib/read_config.c +++ b/snmplib/read_config.c @@ -69,26 +69,26 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -97,44 +97,43 @@ #ifdef HAVE_SYS_STAT_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif #include +#ifdef HAVE_IO_H +#include +#endif -#if HAVE_DIRENT_H +#ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H +# ifdef HAVE_SYS_NDIR_H # include # endif -# if HAVE_SYS_DIR_H +# ifdef HAVE_SYS_DIR_H # include # endif -# if HAVE_NDIR_H +# ifdef HAVE_NDIR_H # include # endif #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -146,11 +145,10 @@ #include #include -netsnmp_feature_child_of(read_config_all, libnetsnmp) +netsnmp_feature_child_of(read_config_all, libnetsnmp); -netsnmp_feature_child_of(unregister_app_config_handler, read_config_all) -netsnmp_feature_child_of(read_config_register_app_prenetsnmp_mib_handler, netsnmp_unused) -netsnmp_feature_child_of(read_config_register_const_config_handler, netsnmp_unused) +netsnmp_feature_child_of(unregister_app_config_handler, read_config_all); +netsnmp_feature_child_of(read_config_register_app_prenetsnmp_mib_handler, netsnmp_unused); static int config_errors; @@ -314,7 +312,6 @@ register_config_handler(const char *type, help, NORMAL_CONFIG); } -#ifndef NETSNMP_FEATURE_REMOVE_READ_CONFIG_REGISTER_CONST_CONFIG_HANDLER struct config_line * register_const_config_handler(const char *type, const char *token, @@ -326,7 +323,6 @@ register_const_config_handler(const char *type, parser, releaser, help, NORMAL_CONFIG); } -#endif /* NETSNMP_FEATURE_REMOVE_READ_CONFIG_REGISTER_CONST_CONFIG_HANDLER */ struct config_line * register_app_config_handler(const char *token, @@ -516,6 +512,8 @@ read_config_find_handler(struct config_line *line_handlers, { struct config_line *lptr; + netsnmp_assert(token); + for (lptr = line_handlers; lptr != NULL; lptr = lptr->next) { if (!strcasecmp(token, lptr->config_token)) { return lptr; @@ -533,6 +531,9 @@ run_config_handler(struct config_line *lptr, const char *token, char *cptr, int when) { char *cp; + + netsnmp_assert(token); + lptr = read_config_find_handler(lptr, token); if (lptr != NULL) { if (when == EITHER_CONFIG || lptr->config_time == when) { @@ -613,6 +614,7 @@ snmp_config_when(char *line, int when) return SNMPERR_GENERR; } cptr = strtok_r(NULL, SNMP_CONFIG_DELIMETERS, &st); + netsnmp_assert(cptr); lptr = read_config_find_handler(lptr, cptr); } else { /* @@ -763,6 +765,9 @@ read_config(const char *filename, char *line = NULL; /* current line buffer */ size_t linesize = 0; /* allocated size of line */ + netsnmp_assert(line_handler); + netsnmp_assert(line_handler->config_token); + /* reset file counter when recursion depth is 0 */ if (depth == 0) files = 0; @@ -837,7 +842,7 @@ read_config(const char *filename, linelen += strlen(line + linelen); - if (line[linelen - 1] == '\n') { + if (linelen && line[linelen - 1] == '\n') { line[linelen - 1] = '\0'; break; } @@ -1020,6 +1025,8 @@ read_configs_optional(const char *optional_config, int when) "reading optional configuration tokens for %s\n", type)); newp = strdup(optional_config); /* strtok_r messes it up */ + if (!newp) + return ret; cp = strtok_r(newp, ",", &st); while (cp) { struct stat statbuf; @@ -1538,9 +1545,35 @@ read_config_store(const char *type, const char *line) if (line[strlen(line)] != '\n') fprintf(fout, "\n"); DEBUGMSGTL(("read_config:store", "storing: %s\n", line)); + fflush(fout); +#if defined(HAVE_FSYNC) + fsync(fileno(fout)); +#elif defined(HAVE__GET_OSFHANDLE) + { + int fd; + HANDLE h; + + fd = fileno(fout); + netsnmp_assert(fd != -1); + /* + * Use size_t instead of uintptr_t because not all supported + * Windows compilers support uintptr_t. + */ + h = (HANDLE)(size_t)_get_osfhandle(fd); + netsnmp_assert(h != INVALID_HANDLE_VALUE); + FlushFileBuffers(h); + } +#endif fclose(fout); } else { - snmp_log(LOG_ERR, "read_config_store open failure on %s\n", filep); + if (strcmp(NETSNMP_APPLICATION_CONFIG_TYPE, type) != 0) { + /* + * Ignore this error in client utilities, they can run with random + * UID/GID and typically cannot write to /var. Error message just + * confuses people. + */ + snmp_log(LOG_ERR, "read_config_store open failure on %s\n", filep); + } } #ifdef NETSNMP_PERSISTENT_MASK umask(oldmask); @@ -1984,7 +2017,7 @@ read_config_read_octet_string_const(const char *readfrom, u_char ** str, if (ilen % 2) { snmp_log(LOG_WARNING,"invalid hex string: wrong length\n"); DEBUGMSGTL(("read_config_read_octet_string", - "invalid hex string: wrong length")); + "invalid hex string: wrong length\n")); return NULL; } ilen = ilen / 2; @@ -2004,7 +2037,7 @@ read_config_read_octet_string_const(const char *readfrom, u_char ** str, snmp_log(LOG_WARNING,"buffer too small to read octet string (%lu < %lu)\n", (unsigned long)*len, (unsigned long)ilen); DEBUGMSGTL(("read_config_read_octet_string", - "buffer too small (%lu < %lu)", (unsigned long)*len, (unsigned long)ilen)); + "buffer too small (%lu < %lu)\n", (unsigned long)*len, (unsigned long)ilen)); *len = 0; cptr1 = skip_not_white_const(readfrom); return skip_white_const(cptr1); @@ -2120,7 +2153,7 @@ read_config_read_objid_const(const char *readfrom, oid ** objid, size_t * len) copy_nword_const(readfrom, buf, sizeof(buf)); if (!read_objid(buf, *objid, len)) { - DEBUGMSGTL(("read_config_read_objid", "Invalid OID")); + DEBUGMSGTL(("read_config_read_objid", "Invalid OID\n")); *len = 0; return NULL; } @@ -2199,7 +2232,7 @@ read_config_read_data(int type, char *readfrom, void *dataptr, return read_config_read_objid(readfrom, oidpp, len); default: - DEBUGMSGTL(("read_config_read_data", "Fail: Unknown type: %d", + DEBUGMSGTL(("read_config_read_data", "Fail: Unknown type: %d\n", type)); return NULL; } @@ -2270,15 +2303,15 @@ read_config_read_memory(int type, char *readfrom, return readfrom; case ASN_COUNTER64: - if (*len < sizeof(U64)) + if (*len < sizeof(struct counter64)) return NULL; - *len = sizeof(U64); - read64((U64 *) dataptr, readfrom); + *len = sizeof(struct counter64); + read64((struct counter64 *) dataptr, readfrom); readfrom = skip_token(readfrom); return readfrom; } - DEBUGMSGTL(("read_config_read_memory", "Fail: Unknown type: %d", type)); + DEBUGMSGTL(("read_config_read_memory", "Fail: Unknown type: %d\n", type)); return NULL; } @@ -2357,7 +2390,7 @@ read_config_store_data_prefix(char prefix, int type, char *storeto, default: DEBUGMSGTL(("read_config_store_data_prefix", - "Fail: Unknown type: %d", type)); + "Fail: Unknown type: %d\n", type)); return NULL; } return NULL; diff --git a/snmplib/scapi.c b/snmplib/scapi.c index 16ac829..ac77004 100644 --- a/snmplib/scapi.c +++ b/snmplib/scapi.c @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* @@ -17,20 +22,23 @@ #include #include +#ifdef HAVE_INTTYPES_H +#include +#endif #include #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -40,25 +48,24 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif +#include "memcheck.h" #include #include #include -netsnmp_feature_child_of(usm_support, libnetsnmp) -netsnmp_feature_child_of(usm_scapi, usm_support) +netsnmp_feature_child_of(usm_support, libnetsnmp); +netsnmp_feature_child_of(usm_scapi, usm_support); #ifndef NETSNMP_FEATURE_REMOVE_USM_SCAPI #ifdef NETSNMP_USE_INTERNAL_MD5 #include #endif +#include #include #include #include @@ -107,11 +114,12 @@ netsnmp_feature_child_of(usm_scapi, usm_support) #ifdef QUITFUN #undef QUITFUN -#define QUITFUN(e, l) \ +#define QUITFUN(e, l) do { \ if (e != SNMPERR_SUCCESS) { \ rval = SNMPERR_SC_GENERAL_FAILURE; \ goto l ; \ - } + } \ + } while (0) #endif #ifdef NETSNMP_USE_INTERNAL_CRYPTO @@ -124,6 +132,341 @@ int MD5_hmac(const u_char * data, size_t len, u_char * mac, size_t maclen, const u_char * secret, size_t secretlen); #endif +static const netsnmp_auth_alg_info _auth_alg_info[] = { + { NETSNMP_USMAUTH_NOAUTH, "usmNoAuthProtocol", usmNoAuthProtocol, + OID_LENGTH(usmNoAuthProtocol), 0, 0 }, + { NETSNMP_USMAUTH_HMACSHA1, "usmHMACSHA1AuthProtocol", + usmHMACSHA1AuthProtocol, OID_LENGTH(usmHMACSHA1AuthProtocol), + BYTESIZE(SNMP_TRANS_AUTHLEN_HMACSHA1), USM_MD5_AND_SHA_AUTH_LEN }, +#ifndef NETSNMP_DISABLE_MD5 + { NETSNMP_USMAUTH_HMACMD5, "usmHMACMD5AuthProtocol", + usmHMACMD5AuthProtocol, OID_LENGTH(usmHMACMD5AuthProtocol), + BYTESIZE(SNMP_TRANS_AUTHLEN_HMACMD5), USM_MD5_AND_SHA_AUTH_LEN }, +#endif +#ifdef HAVE_EVP_SHA224 + { NETSNMP_USMAUTH_HMAC128SHA224, "usmHMAC128SHA224AuthProtocol", + usmHMAC128SHA224AuthProtocol, OID_LENGTH(usmHMAC128SHA224AuthProtocol), + BYTESIZE(SNMP_TRANS_AUTHLEN_HMAC128SHA224), USM_HMAC128SHA224_AUTH_LEN }, + { NETSNMP_USMAUTH_HMAC192SHA256, "usmHMAC192SHA256AuthProtocol", + usmHMAC192SHA256AuthProtocol, OID_LENGTH(usmHMAC192SHA256AuthProtocol), + BYTESIZE(SNMP_TRANS_AUTHLEN_HMAC192SHA256), USM_HMAC192SHA256_AUTH_LEN }, +#endif +#ifdef HAVE_EVP_SHA384 + { NETSNMP_USMAUTH_HMAC256SHA384, "usmHMAC256SHA384AuthProtocol", + usmHMAC256SHA384AuthProtocol, OID_LENGTH(usmHMAC256SHA384AuthProtocol), + BYTESIZE(SNMP_TRANS_AUTHLEN_HMAC256SHA384), USM_HMAC256SHA384_AUTH_LEN }, + { NETSNMP_USMAUTH_HMAC384SHA512, "usmHMAC384SHA512AuthProtocol", + usmHMAC384SHA512AuthProtocol, OID_LENGTH(usmHMAC384SHA512AuthProtocol), + BYTESIZE(SNMP_TRANS_AUTHLEN_HMAC384SHA512), USM_HMAC384SHA512_AUTH_LEN }, +#endif + { -1, "unknown", NULL, 0, 0, 0 } +}; + +static const netsnmp_priv_alg_info _priv_alg_info[] = { + { USM_CREATE_USER_PRIV_NONE, "usmNoPrivProtocol", + usmNoPrivProtocol, OID_LENGTH(usmNoPrivProtocol), 0, 0, 0 }, +#ifndef NETSNMP_DISABLE_DES + { USM_CREATE_USER_PRIV_DES, "usmDESPrivProtocol", + usmDESPrivProtocol, OID_LENGTH(usmDESPrivProtocol), + BYTESIZE(SNMP_TRANS_PRIVLEN_1DES), + BYTESIZE(SNMP_TRANS_PRIVLEN_1DES_IV), + BYTESIZE(SNMP_TRANS_PRIVLEN_1DES) }, +#endif +#ifdef HAVE_AES + { USM_CREATE_USER_PRIV_AES, "usmAESPrivProtocol", + usmAESPrivProtocol, OID_LENGTH(usmAESPrivProtocol), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES_IV), + 0 }, +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + { USM_CREATE_USER_PRIV_AES192, "usmAES192PrivProtocol", + usmAES192PrivProtocol, OID_LENGTH(usmAES192PrivProtocol), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES192), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES192_IV), + 0 }, + { USM_CREATE_USER_PRIV_AES192_CISCO, "usmAES192CiscoPrivProtocol", + usmAES192CiscoPrivProtocol, OID_LENGTH(usmAES192CiscoPrivProtocol), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES192), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES192_IV), + 0 }, + { USM_CREATE_USER_PRIV_AES256, "usmAES256PrivProtocol", + usmAES256PrivProtocol, OID_LENGTH(usmAES256PrivProtocol), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES256), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES256_IV), + 0 }, + { USM_CREATE_USER_PRIV_AES256_CISCO, "usmAES256CiscoPrivProtocol", + usmAES256CiscoPrivProtocol, OID_LENGTH(usmAES256CiscoPrivProtocol), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES256), + BYTESIZE(SNMP_TRANS_PRIVLEN_AES256_IV), + 0 }, +#endif +#endif + { -1, NULL, NULL, 0 , 0, 0, 0 }, +}; + + +/* + * sc_get_priv_alg(oid *privoid, u_int len) + * + * returns a pointer to a netsnmp_priv_alg_info struct + */ +const netsnmp_priv_alg_info * +sc_get_priv_alg_byoid(const oid *privoid, u_int len) +{ + int i = 0; + + DEBUGTRACE; + + if ((NULL == privoid) || (0 == len)) + return NULL; + + for( ; _priv_alg_info[i].type != -1; ++i) { + if (len != _priv_alg_info[i].oid_len) + continue; + if (snmp_oid_compare(_priv_alg_info[i].alg_oid, + _priv_alg_info[i].oid_len, + privoid, len) == 0 ) + return(&_priv_alg_info[i]); + } + + DEBUGMSGTL(("scapi", "no match for OID ")); + DEBUGMSGOID(("scapi", privoid, len)); + DEBUGMSG(("scapi", "\n")); + return NULL; +} + +/* + * sc_get_priv_alg_bytype(u_int type) + * + * returns a pointer to a netsnmp_priv_alg_info struct + */ +const netsnmp_priv_alg_info * +sc_get_priv_alg_bytype(u_int type) +{ + int i = 0; + + DEBUGTRACE; + + for( ; _priv_alg_info[i].type != -1; ++i) { + if (type != _priv_alg_info[i].type) + continue; + return(&_priv_alg_info[i]); + } + + return NULL; +} + +/* + * sc_find_auth_alg(oid *authoid, u_int len) + * + * returns a pointer to a netsnmp_auth_alg_info struct + */ +const netsnmp_auth_alg_info * +sc_find_auth_alg_byoid(const oid *authoid, u_int len) +{ + int i = 0; + + DEBUGTRACE; + + if ((NULL == authoid) || (0 == len)) + return NULL; + + for( ; _auth_alg_info[i].type != -1; ++i) { + if (len != _auth_alg_info[i].oid_len) + continue; + if (snmp_oid_compare(_auth_alg_info[i].alg_oid, + _auth_alg_info[i].oid_len, + authoid, len) == 0 ) + return(&_auth_alg_info[i]); + } + +/* DEBUGMSGTL(("scapi", "No auth alg found for")); + DEBUGMSGOID(("scapi", authoid, len ));*/ + + return NULL; +} + +/* + * sc_get_auth_alg_byindex(u_int index) + * + * returns a pointer to a netsnmp_auth_alg_info struct + */ +const netsnmp_auth_alg_info * +sc_get_auth_alg_byindex(u_int index) +{ + DEBUGTRACE; + + if (index >= (sizeof(_auth_alg_info)) / (sizeof(_auth_alg_info[0])) || + -1 == _auth_alg_info[index].type) + return NULL; + + return(&_auth_alg_info[index]); +} + +/* + * sc_find_auth_alg_bytype(u_int type) + * + * returns a pointer to a netsnmp_auth_alg_info struct + */ +const netsnmp_auth_alg_info * +sc_find_auth_alg_bytype(u_int type) +{ + int i = 0; + + DEBUGTRACE; + + for( ; _auth_alg_info[i].type != -1; ++i) { + if (type != _auth_alg_info[i].type) + continue; + return(&_auth_alg_info[i]); + } + + return NULL; +} + +/* + * sc_get_authtype(oid *hashtype, u_int hashtype_len): + * + * Given a hashing type ("hashtype" and its length hashtype_len), return + * its type (the last suboid). NETSNMP_USMAUTH_* constants are defined in + * transform_oids.h. + * + * Returns SNMPERR_GENERR for an unknown hashing type. + */ +int +sc_get_authtype(const oid * hashtype, u_int hashtype_len) +{ + const netsnmp_auth_alg_info *aai; + + DEBUGTRACE; + + aai = sc_find_auth_alg_byoid(hashtype, hashtype_len); + if (NULL == aai) + return SNMPERR_GENERR; + + return aai->type; +} + +int +sc_get_privtype(const oid * privtype, u_int privtype_len) +{ + const netsnmp_priv_alg_info *pai; + + DEBUGTRACE; + + pai = sc_get_priv_alg_byoid(privtype, privtype_len); + if (NULL == pai) + return SNMPERR_GENERR; + + return pai->type; +} + +/* + * sc_get_auth_maclen(int hashtype): + * + * Given a hash type, return its MAC length, which may be shorter than + * the full hash length. + * + * Returns 0 for an unknown hash type. + */ +int +sc_get_auth_maclen(int hashtype) +{ + const netsnmp_auth_alg_info *aai; + + DEBUGTRACE; + + aai = sc_find_auth_alg_bytype(hashtype); + if (NULL == aai) + return 0; + + return aai->mac_length; +} + +/* + * sc_get_proper_auth_length_bytype(int hashtype): + * + * Given a hashing type, return the length of the hash result. + * + * Returns either the length or SNMPERR_GENERR for an unknown hashing type. + */ +int +sc_get_proper_auth_length_bytype(int hashtype) +{ + const netsnmp_auth_alg_info *aai; + + DEBUGTRACE; + + aai = sc_find_auth_alg_bytype(hashtype); + if (NULL == aai) + return SNMPERR_GENERR; + + return aai->proper_length; +} + +/* + * sc_get_auth_oid(int hashtype, int *oid_len): + * + * Given a type, return the OID and optionally set OID length. + */ +oid * +sc_get_auth_oid(int type, size_t *oid_len) +{ + const netsnmp_auth_alg_info *ai; + + DEBUGTRACE; + + ai = sc_find_auth_alg_bytype(type); + if (NULL == ai) + return NULL; + + if (NULL != oid_len) + *oid_len = ai->oid_len; + + return ai->alg_oid; +} + +/* + * sc_get_auth_name(int hashtype): + * + * Given a type, return the name string + */ +const char* +sc_get_auth_name(int type) +{ + const netsnmp_auth_alg_info *ai; + + DEBUGTRACE; + + ai = sc_find_auth_alg_bytype(type); + if (NULL == ai) + return NULL; + + return ai->name; +} + +/* + * sc_get_priv_oid(int type, int *oid_len): + * + * Given a type, return the OID and optionally set OID length. + */ +oid * +sc_get_priv_oid(int type, size_t *oid_len) +{ + const netsnmp_priv_alg_info *ai; + + DEBUGTRACE; + + ai = sc_get_priv_alg_bytype(type); + if (NULL == ai) + return NULL; + + if (NULL != oid_len) + *oid_len = ai->oid_len; + + return ai->alg_oid; +} + /* * sc_get_properlength(oid *hashtype, u_int hashtype_len): * @@ -139,37 +482,58 @@ sc_get_properlength(const oid * hashtype, u_int hashtype_len) /* * Determine transform type hash length. */ -#ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { - return BYTESIZE(SNMP_TRANS_AUTHLEN_HMACMD5); - } else -#endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) { - return BYTESIZE(SNMP_TRANS_AUTHLEN_HMACSHA1); - } - return SNMPERR_GENERR; + return sc_get_proper_auth_length_bytype( + sc_get_authtype(hashtype, hashtype_len)); } -netsnmp_feature_child_of(scapi_get_proper_priv_length, netsnmp_unused) +netsnmp_feature_child_of(scapi_get_proper_priv_length, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_SCAPI_GET_PROPER_PRIV_LENGTH int sc_get_proper_priv_length(const oid * privtype, u_int privtype_len) { - int properlength = 0; -#ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(privtype, DESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES); - } -#endif -#ifdef HAVE_AES - if (ISTRANSFORM(privtype, AESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_AES); - } -#endif - return properlength; + const netsnmp_priv_alg_info *pai; + + DEBUGTRACE; + + pai = sc_get_priv_alg_byoid(privtype, privtype_len); + if (NULL == pai) + return 0; + + return pai->proper_length; } #endif /* NETSNMP_FEATURE_REMOVE_SCAPI_GET_PROPER_PRIV_LENGTH */ +/* + * sc_get_priv_alg_byindex(u_int index) + * + * returns a pointer to a netsnmp_priv_alg_info struct + */ +const netsnmp_priv_alg_info * +sc_get_priv_alg_byindex(u_int index) +{ + DEBUGTRACE; + + if (index >= (sizeof(_priv_alg_info)) / (sizeof(_priv_alg_info[0])) || + -1 == _priv_alg_info[index].type) + return NULL; + + return(&_priv_alg_info[index]); +} + +int +sc_get_proper_priv_length_bytype(int privtype) +{ + const netsnmp_priv_alg_info *pai; + + DEBUGTRACE; + + pai = sc_get_priv_alg_bytype(privtype); + if (NULL == pai) + return 0; + + return pai->proper_length; +} + /*******************************************************************-o-****** * sc_init @@ -190,8 +554,8 @@ sc_init(void) gettimeofday(&tv, (struct timezone *) 0); - srandom((unsigned)(tv.tv_sec ^ tv.tv_usec)); -#elif NETSNMP_USE_PKCS11 + netsnmp_srandom((unsigned)(tv.tv_sec ^ tv.tv_usec)); +#elif defined(NETSNMP_USE_PKCS11) DEBUGTRACE; rval = pkcs_init(); #else @@ -202,6 +566,7 @@ sc_init(void) * * XXX ogud: seed random number generator */ #endif /* ifndef NETSNMP_USE_OPENSSL */ + return rval; } /* end sc_init() */ @@ -230,7 +595,8 @@ sc_random(u_char * buf, size_t * buflen) #ifdef NETSNMP_USE_OPENSSL RAND_bytes(buf, *buflen); /* will never fail */ -#elif NETSNMP_USE_PKCS11 /* NETSNMP_USE_PKCS11 */ + MAKE_MEM_DEFINED(buf, *buflen); +#elif defined(NETSNMP_USE_PKCS11) /* NETSNMP_USE_PKCS11 */ pkcs_random(buf, *buflen); #else /* NETSNMP_USE_INTERNAL_MD5 */ /* @@ -240,12 +606,12 @@ sc_random(u_char * buf, size_t * buflen) */ rval = *buflen - *buflen % sizeof(rndval); for (i = 0; i < rval; i += sizeof(rndval)) { - rndval = random(); + rndval = netsnmp_random(); memcpy(ucp, &rndval, sizeof(rndval)); ucp += sizeof(rndval); } - rndval = random(); + rndval = netsnmp_random(); memcpy(ucp, &rndval, *buflen % sizeof(rndval)); rval = SNMPERR_SUCCESS; @@ -257,6 +623,78 @@ sc_random(u_char * buf, size_t * buflen) #else _SCAPI_NOT_CONFIGURED #endif /* */ + + +#ifdef NETSNMP_USE_OPENSSL +const EVP_MD * +sc_get_openssl_hashfn(int auth_type) +{ + const EVP_MD *hashfn = NULL; + + DEBUGTRACE; + + switch (auth_type) { +#ifndef NETSNMP_DISABLE_MD5 + case NETSNMP_USMAUTH_HMACMD5: + hashfn = (const EVP_MD *) EVP_md5(); + break; +#endif + case NETSNMP_USMAUTH_HMACSHA1: + hashfn = (const EVP_MD *) EVP_sha1(); + break; + +#ifdef HAVE_EVP_SHA224 + case NETSNMP_USMAUTH_HMAC128SHA224: + hashfn = (const EVP_MD *) EVP_sha224(); + break; + + case NETSNMP_USMAUTH_HMAC192SHA256: + hashfn = (const EVP_MD *) EVP_sha256(); + break; +#endif /* HAVE_EVP_SHA224 */ + +#ifdef HAVE_EVP_SHA384 + case NETSNMP_USMAUTH_HMAC256SHA384: + hashfn = (const EVP_MD *) EVP_sha384(); + break; + + case NETSNMP_USMAUTH_HMAC384SHA512: + hashfn = (const EVP_MD *) EVP_sha512(); + break; +#endif /* HAVE_EVP_SHA384 */ + } + + return hashfn; +} + +const EVP_CIPHER * +sc_get_openssl_privfn(int priv_type) +{ + const EVP_CIPHER *fn = NULL; + + DEBUGTRACE; + + switch(priv_type & (USM_PRIV_MASK_ALG | USM_PRIV_MASK_VARIANT)) { +#ifdef HAVE_AES + case USM_CREATE_USER_PRIV_AES: + fn = (const EVP_CIPHER *)EVP_aes_128_cfb(); + break; +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + case USM_CREATE_USER_PRIV_AES192: + fn = (const void*)EVP_aes_192_cfb(); + break; + case USM_CREATE_USER_PRIV_AES256: + fn = (const void*)EVP_aes_256_cfb(); + break; +#endif +#endif /* HAVE_AES */ + } + + return fn; +} +#endif /* openssl */ + + /*******************************************************************-o-****** * sc_generate_keyed_hash * @@ -285,20 +723,24 @@ _SCAPI_NOT_CONFIGURED * ASSUMED that the number of hash bits is a multiple of 8. */ int -sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, +sc_generate_keyed_hash(const oid * authtypeOID, size_t authtypeOIDlen, const u_char * key, u_int keylen, const u_char * message, u_int msglen, u_char * MAC, size_t * maclen) #if defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { - int rval = SNMPERR_SUCCESS; + int rval = SNMPERR_SUCCESS, auth_type; int iproperlength; size_t properlength; - u_char buf[SNMP_MAXBUF_SMALL]; #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_PKCS11) unsigned int buf_len = sizeof(buf); #endif +#ifdef NETSNMP_USE_OPENSSL + const EVP_MD *hashfn; +#elif defined(NETSNMP_USE_PKCS11) + u_long ck_type; +#endif DEBUGTRACE; @@ -316,33 +758,31 @@ sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, /* * Sanity check. */ - if (!authtype || !key || !message || !MAC || !maclen - || (keylen <= 0) || (msglen <= 0) || (*maclen <= 0) - || (authtypelen != USM_LENGTH_OID_TRANSFORM)) { + if (!authtypeOID || !key || !message || !MAC || !maclen + || (keylen <= 0) || (msglen <= 0) || (*maclen <= 0)) { QUITFUN(SNMPERR_GENERR, sc_generate_keyed_hash_quit); } - iproperlength = sc_get_properlength(authtype, authtypelen); + auth_type = sc_get_authtype(authtypeOID, authtypeOIDlen); + iproperlength = sc_get_auth_maclen(auth_type); if (iproperlength == SNMPERR_GENERR) return SNMPERR_GENERR; properlength = (size_t)iproperlength; if (keylen < properlength) { QUITFUN(SNMPERR_GENERR, sc_generate_keyed_hash_quit); } -#ifdef NETSNMP_USE_OPENSSL - /* - * Determine transform type. - */ -#ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(authtype, HMACMD5Auth)) - HMAC(EVP_md5(), key, keylen, message, msglen, buf, &buf_len); - else +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGMSGTL(("scapi", "iproperlength: %d, maclen:%" NETSNMP_PRIz "d\n", iproperlength, + *maclen)); #endif - if (ISTRANSFORM(authtype, HMACSHA1Auth)) - HMAC(EVP_sha1(), key, keylen, message, msglen, buf, &buf_len); - else { +#ifdef NETSNMP_USE_OPENSSL + /** get hash function */ + hashfn = sc_get_openssl_hashfn(auth_type); + if (NULL == hashfn) { QUITFUN(SNMPERR_GENERR, sc_generate_keyed_hash_quit); } + + HMAC(hashfn, key, keylen, message, msglen, buf, &buf_len); if (buf_len != properlength) { QUITFUN(rval, sc_generate_keyed_hash_quit); } @@ -350,17 +790,17 @@ sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, *maclen = buf_len; memcpy(MAC, buf, *maclen); -#elif NETSNMP_USE_PKCS11 /* NETSNMP_USE_PKCS11 */ +#elif defined(NETSNMP_USE_PKCS11) /* NETSNMP_USE_PKCS11 */ #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(authtype, HMACMD5Auth)) { + if (NETSNMP_USMAUTH_HMACMD5 == auth_type) { if (pkcs_sign(CKM_MD5_HMAC,key, keylen, message, msglen, buf, &buf_len) != SNMPERR_SUCCESS) { QUITFUN(SNMPERR_GENERR, sc_generate_keyed_hash_quit); } } else #endif - if (ISTRANSFORM(authtype, HMACSHA1Auth)) { + if (NETSNMP_USMAUTH_HMACSHA1 == auth_type) { if (pkcs_sign(CKM_SHA_1_HMAC,key, keylen, message, msglen, buf, &buf_len) != SNMPERR_SUCCESS) { QUITFUN(SNMPERR_GENERR, sc_generate_keyed_hash_quit); @@ -376,15 +816,15 @@ sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, *maclen = buf_len; memcpy(MAC, buf, *maclen); -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) if (*maclen > properlength) *maclen = properlength; #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(authtype, HMACMD5Auth)) + if (NETSNMP_USMAUTH_HMACMD5 == auth_type) rval = MD5_hmac(message, msglen, MAC, *maclen, key, keylen); else #endif - if (ISTRANSFORM(authtype, HMACSHA1Auth)) + if (NETSNMP_USMAUTH_HMACSHA1 == auth_type) rval = SHA1_hmac(message, msglen, MAC, *maclen, key, keylen); else { QUITFUN(SNMPERR_GENERR, sc_generate_keyed_hash_quit); @@ -421,7 +861,7 @@ sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, #else _SCAPI_NOT_CONFIGURED #endif /* */ -/* +/*******************************************************************-o-****** * sc_hash(): a generic wrapper around whatever hashing package we are using. * * IN: @@ -443,6 +883,44 @@ sc_generate_keyed_hash(const oid * authtype, size_t authtypelen, int sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, size_t buf_len, u_char * MAC, size_t * MAC_len) +{ + int auth_type; + + DEBUGTRACE; + + if (hashtype == NULL) + return (SNMPERR_GENERR); + + auth_type = sc_get_authtype(hashtype, hashtypelen); + if (auth_type < 0 ) + return (SNMPERR_GENERR); + + return sc_hash_type(auth_type, buf, buf_len, MAC, MAC_len); +} + +/*******************************************************************-o-****** + * sc_hash_type(): + * a generic wrapper around whatever hashing package we are using. + * + * IN: + * hashtype - oid pointer to a hash type + * hashtypelen - length of oid pointer + * buf - u_char buffer to be hashed + * buf_len - integer length of buf data + * MAC_len - length of the passed MAC buffer size. + * + * OUT: + * MAC - pre-malloced space to store hash output. + * MAC_len - length of MAC output to the MAC buffer. + * + * Returns: + * SNMPERR_SUCCESS Success. + * SNMP_SC_GENERAL_FAILURE Any error. + * SNMPERR_SC_NOT_CONFIGURED Hash type not supported. + */ +int +sc_hash_type(int auth_type, const u_char * buf, size_t buf_len, u_char * MAC, + size_t * MAC_len) #if defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) @@ -463,10 +941,10 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, #endif DEBUGTRACE; - if (hashtype == NULL || buf == NULL || buf_len <= 0 || - MAC == NULL || MAC_len == NULL ) + if (buf == NULL || buf_len <= 0 || MAC == NULL || MAC_len == NULL ) return (SNMPERR_GENERR); - ret = sc_get_properlength(hashtype, hashtypelen); + + ret = sc_get_proper_auth_length_bytype(auth_type); if (( ret < 0 ) || (*MAC_len < (size_t)ret )) return (SNMPERR_GENERR); @@ -474,19 +952,14 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, /* * Determine transform type. */ -#ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { - hashfn = (const EVP_MD *) EVP_md5(); - } else -#endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) { - hashfn = (const EVP_MD *) EVP_sha1(); - } else { - return (SNMPERR_GENERR); - } + hashfn = sc_get_openssl_hashfn(auth_type); + if (NULL == hashfn) + return SNMPERR_GENERR; /** initialize the pointer */ -#ifdef HAVE_EVP_MD_CTX_CREATE +#if defined(HAVE_EVP_MD_CTX_NEW) + cptr = EVP_MD_CTX_new(); +#elif defined(HAVE_EVP_MD_CTX_CREATE) cptr = EVP_MD_CTX_create(); #else cptr = malloc(sizeof(*cptr)); @@ -498,7 +971,8 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, #endif if (!EVP_DigestInit(cptr, hashfn)) { /* requested hash function is not available */ - return SNMPERR_SC_NOT_CONFIGURED; + rval = SNMPERR_SC_NOT_CONFIGURED; + goto sc_hash_type_quit; } /** pass the data */ @@ -507,7 +981,11 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, /** do the final pass */ EVP_DigestFinal(cptr, MAC, &tmp_len); *MAC_len = tmp_len; -#ifdef HAVE_EVP_MD_CTX_DESTROY + +sc_hash_type_quit: +#if defined(HAVE_EVP_MD_CTX_FREE) + EVP_MD_CTX_free(cptr); +#elif defined(HAVE_EVP_MD_CTX_DESTROY) EVP_MD_CTX_destroy(cptr); #else #if !defined(OLD_DES) @@ -517,21 +995,21 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, #endif return (rval); -#elif NETSNMP_USE_INTERNAL_CRYPTO +#elif defined(NETSNMP_USE_INTERNAL_CRYPTO) #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { + if (NETSNMP_USMAUTH_HMACMD5 == auth_type) { if (*MAC_len < MD5_DIGEST_LENGTH) return (SNMPERR_GENERR); /* the buffer isn't big enough */ - MD5_Init(&cmd5); + MD5_Init(&cmd5); MD5_Update(&cmd5, buf, buf_len); MD5_Final(MAC, &cmd5); *MAC_len = MD5_DIGEST_LENGTH; } else #endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) { + if (NETSNMP_USMAUTH_HMACSHA1 == auth_type) { if (*MAC_len < SHA_DIGEST_LENGTH) return (SNMPERR_GENERR); /* the buffer isn't big enough */ - SHA1_Init(&csha1); + SHA1_Init(&csha1); SHA1_Update(&csha1, buf, buf_len); SHA1_Final(MAC, &csha1); *MAC_len = SHA_DIGEST_LENGTH; @@ -540,16 +1018,16 @@ sc_hash(const oid * hashtype, size_t hashtypelen, const u_char * buf, return (SNMPERR_GENERR); } return (rval); -#elif NETSNMP_USE_PKCS11 /* NETSNMP_USE_PKCS11 */ +#elif defined(NETSNMP_USE_PKCS11) /* NETSNMP_USE_PKCS11 */ #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { - rval = pkcs_digest(CKM_MD5, buf, buf_len, MAC, &tmp_len); + if (NETSNMP_USMAUTH_HMACMD5 == auth_type) { + rval = pkcs_digest(CKM_MD5, buf, buf_len, MAC, &tmp_len); *MAC_len = tmp_len; } else #endif - if (ISTRANSFORM(hashtype, HMACSHA1Auth)) { - rval = pkcs_digest(CKM_SHA_1, buf, buf_len, MAC, &tmp_len); + if (NETSNMP_USMAUTH_HMACSHA1 == auth_type) { + rval = pkcs_digest(CKM_SHA_1, buf, buf_len, MAC, &tmp_len); *MAC_len = tmp_len; } else { return (SNMPERR_GENERR); @@ -595,13 +1073,13 @@ _SCAPI_NOT_CONFIGURED * length of the hash transform output. */ int -sc_check_keyed_hash(const oid * authtype, size_t authtypelen, +sc_check_keyed_hash(const oid * authtypeOID, size_t authtypeOIDlen, const u_char * key, u_int keylen, const u_char * message, u_int msglen, const u_char * MAC, u_int maclen) #if defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_PKCS11) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { - int rval = SNMPERR_SUCCESS; + int rval = SNMPERR_SUCCESS, auth_type, auth_size; size_t buf_len = SNMP_MAXBUF_SMALL; u_char buf[SNMP_MAXBUF_SMALL]; @@ -621,24 +1099,26 @@ sc_check_keyed_hash(const oid * authtype, size_t authtypelen, /* * Sanity check. */ - if (!authtype || !key || !message || !MAC - || (keylen <= 0) || (msglen <= 0) || (maclen <= 0) - || (authtypelen != USM_LENGTH_OID_TRANSFORM)) { + if (!authtypeOID || !key || !message || !MAC + || (keylen <= 0) || (msglen <= 0) || (maclen <= 0)) { QUITFUN(SNMPERR_GENERR, sc_check_keyed_hash_quit); } + auth_type = sc_get_authtype(authtypeOID, authtypeOIDlen); + if (auth_type < 0 ) + return (SNMPERR_GENERR); - if (maclen != USM_MD5_AND_SHA_AUTH_LEN) { + auth_size = sc_get_auth_maclen(auth_type); + if (0 == auth_size || maclen != auth_size) { QUITFUN(SNMPERR_GENERR, sc_check_keyed_hash_quit); } - + /* * Generate a full hash of the message, then compare - * the result with the given MAC which may shorter than + * the result with the given MAC which may be shorter than * the full hash length. */ - rval = sc_generate_keyed_hash(authtype, authtypelen, - key, keylen, + rval = sc_generate_keyed_hash(authtypeOID, authtypeOIDlen, key, keylen, message, msglen, buf, &buf_len); QUITFUN(rval, sc_check_keyed_hash_quit); @@ -694,24 +1174,19 @@ sc_encrypt(const oid * privtype, size_t privtypelen, #if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_INTERNAL_CRYPTO) { int rval = SNMPERR_SUCCESS; - u_int properlength = 0, properlength_iv = 0; u_char pad_block[128]; /* bigger than anything I need */ u_char my_iv[128]; /* ditto */ - int pad, plast, pad_size = 0; - int have_trans; + const netsnmp_priv_alg_info *pai = NULL; #ifndef NETSNMP_DISABLE_DES + int pad, plast, pad_size = 0; #ifdef OLD_DES DES_key_schedule key_sch; #else DES_key_schedule key_sched_store; DES_key_schedule *key_sch = &key_sched_store; -#endif +#endif /* OLD_DES */ DES_cblock key_struct; -#endif -#ifdef HAVE_AES - AES_KEY aes_key; - int new_ivlen = 0; -#endif +#endif /* NETSNMP_DISABLE_DES */ DEBUGTRACE; @@ -719,15 +1194,17 @@ sc_encrypt(const oid * privtype, size_t privtypelen, * Sanity check. */ #if !defined(NETSNMP_ENABLE_SCAPI_AUTHPRIV) - snmp_log(LOG_ERR, "Encryption support not enabled.\n"); + snmp_log(LOG_ERR, "Encryption support not enabled.(2)\n"); return SNMPERR_SC_NOT_CONFIGURED; #endif if (!privtype || !key || !iv || !plaintext || !ciphertext || !ctlen - || (keylen <= 0) || (ivlen <= 0) || (ptlen <= 0) || (*ctlen <= 0) - || (privtypelen != USM_LENGTH_OID_TRANSFORM)) { + || (keylen <= 0) || (ivlen <= 0) || (ivlen > sizeof(my_iv)) + || (ptlen <= 0) || (*ctlen <= 0)) { + DEBUGMSGTL(("scapi:encrypt", "bad arguments 1\n")); QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); } else if (ptlen > *ctlen) { + DEBUGMSGTL(("scapi:encrypt", "bad arguments 2\n")); QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); } #ifdef NETSNMP_ENABLE_TESTING_CODE @@ -738,16 +1215,16 @@ sc_encrypt(const oid * privtype, size_t privtypelen, if (buf != NULL) { if (sprint_realloc_hexstring(&buf, &buf_len, &out_len, 1, iv, ivlen)) { - DEBUGMSGTL(("scapi", "encrypt: IV: %s/", buf)); + DEBUGMSGTL(("scapi", "encrypt: IV: %s\n", buf)); } else { - DEBUGMSGTL(("scapi", "encrypt: IV: %s [TRUNCATED]/", buf)); + DEBUGMSGTL(("scapi", "encrypt: IV: %s [TRUNCATED]\n", buf)); } out_len = 0; if (sprint_realloc_hexstring(&buf, &buf_len, &out_len, 1, key, keylen)) { - DEBUGMSG(("scapi", "%s\n", buf)); + DEBUGMSG(("scapi", "key: %s\n", buf)); } else { - DEBUGMSG(("scapi", "%s [TRUNCATED]\n", buf)); + DEBUGMSG(("scapi", "key: %s [TRUNCATED]\n", buf)); } out_len = 0; if (sprint_realloc_hexstring(&buf, &buf_len, &out_len, 1, @@ -769,43 +1246,35 @@ sc_encrypt(const oid * privtype, size_t privtypelen, /* * Determine privacy transform. */ - have_trans = 0; -#ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(privtype, DESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES); - properlength_iv = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES_IV); - pad_size = properlength; - have_trans = 1; - } -#endif -#ifdef HAVE_AES - if (ISTRANSFORM(privtype, AESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_AES); - properlength_iv = BYTESIZE(SNMP_TRANS_PRIVLEN_AES_IV); - have_trans = 1; - } -#endif - if (!have_trans) { - QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); - } + pai = sc_get_priv_alg_byoid(privtype, privtypelen); + if (NULL == pai || + (keylen < pai->proper_length) || (ivlen < pai->iv_length)) { + DEBUGMSGTL(("scapi:encrypt", + "bad arguments 3 pai %p, keylen %d ivlen %d\n", + pai, keylen, ivlen)); + if (pai) + DEBUGMSGTL(("scapi:encrypt", " pai: properlen %d, ivlen %d\n", + pai->proper_length, pai->iv_length)); - if ((keylen < properlength) || (ivlen < properlength_iv)) { QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); } memset(my_iv, 0, sizeof(my_iv)); #ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(privtype, DESPriv)) { + if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) { /* * now calculate the padding needed */ + + pad_size = pai->pad_size; pad = pad_size - (ptlen % pad_size); plast = (int) ptlen - (pad_size - pad); if (pad == pad_size) pad = 0; if (ptlen + pad > *ctlen) { + DEBUGMSGTL(("scapi:encrypt", "not enough space\n")); QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); /* not enough space */ } if (pad > 0) { /* copy data into pad block if needed */ @@ -834,16 +1303,50 @@ sc_encrypt(const oid * privtype, size_t privtypelen, } } #endif -#ifdef HAVE_AES - if (ISTRANSFORM(privtype, AESPriv)) { - (void) AES_set_encrypt_key(key, properlength*8, &aes_key); +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_AES) + if (USM_CREATE_USER_PRIV_AES == (pai->type & USM_PRIV_MASK_ALG)) { + EVP_CIPHER_CTX *ctx; + const EVP_CIPHER *cipher; + int len, rc, enclen; + + cipher = sc_get_openssl_privfn(pai->type); + if (NULL == cipher) { + DEBUGMSGTL(("scapi:encrypt", "cipher not found\n")); + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } memcpy(my_iv, iv, ivlen); /* * encrypt the data */ - AES_cfb128_encrypt(plaintext, ciphertext, ptlen, - &aes_key, my_iv, &new_ivlen, AES_ENCRYPT); + ctx = EVP_CIPHER_CTX_new(); + if (!ctx) { + DEBUGMSGTL(("scapi:encrypt", "openssl error: ctx_new\n")); + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } + rc = EVP_EncryptInit(ctx, cipher, key, my_iv); + if (rc != 1) { + DEBUGMSGTL(("scapi:encrypt", "openssl error: init\n")); + EVP_CIPHER_CTX_free(ctx); + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } + rc = EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, ptlen); + if (rc != 1) { + DEBUGMSGTL(("scapi:encrypt", "openssl error: update\n")); + EVP_CIPHER_CTX_free(ctx); + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } + enclen = len; + rc = EVP_EncryptFinal(ctx, ciphertext + len, &len); + if (rc != 1) { + DEBUGMSGTL(("scapi:encrypt", "openssl error: final\n")); + EVP_CIPHER_CTX_free(ctx); + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } + enclen += len; + ptlen = enclen; + /* Clean up */ + EVP_CIPHER_CTX_free(ctx); *ctlen = ptlen; } #endif @@ -860,18 +1363,15 @@ sc_encrypt(const oid * privtype, size_t privtypelen, #else memset(&key_sched_store, 0, sizeof(key_sched_store)); #endif -#endif -#ifdef HAVE_AES - memset(&aes_key,0,sizeof(aes_key)); #endif return rval; } /* end sc_encrypt() */ #elif defined(NETSNMP_USE_PKCS11) { - int rval = SNMPERR_SUCCESS; - u_int properlength, properlength_iv; + int rval = SNMPERR_SUCCESS, priv_type u_char pkcs_des_key[8]; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; @@ -879,13 +1379,12 @@ sc_encrypt(const oid * privtype, size_t privtypelen, * Sanity check. */ #if !defined(NETSNMP_ENABLE_SCAPI_AUTHPRIV) - snmp_log(LOG_ERR, "Encryption support not enabled.\n"); + snmp_log(LOG_ERR, "Encryption support not enabled.(1)\n"); return SNMPERR_SC_NOT_CONFIGURED; #endif if (!privtype || !key || !iv || !plaintext || !ciphertext || !ctlen - || (keylen <= 0) || (ivlen <= 0) || (ptlen <= 0) || (*ctlen <= 0) - || (privtypelen != USM_LENGTH_OID_TRANSFORM)) { + || (keylen <= 0) || (ivlen <= 0) || (ptlen <= 0) || (*ctlen <= 0)) { QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); } else if (ptlen > *ctlen) { QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); @@ -894,24 +1393,17 @@ sc_encrypt(const oid * privtype, size_t privtypelen, /* * Determine privacy transform. */ - if (ISTRANSFORM(privtype, DESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES); - properlength_iv = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES_IV); - } else { + pai = sc_get_priv_alg_byoid(privtype, privtypelen); + if (NULL == pai || USM_CREATE_USER_PRIV_DES != priv_type || + (keylen < pai->proper_length) || (ivlen < pai->iv_length)) { QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); } - if ((keylen < properlength) || (ivlen < properlength_iv)) { - QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); - } - - if (ISTRANSFORM(privtype, DESPriv)) { - memset(pkcs_des_key, 0, sizeof(pkcs_des_key)); - memcpy(pkcs_des_key, key, sizeof(pkcs_des_key)); - rval = pkcs_encrpyt(CKM_DES_CBC, pkcs_des_key, - sizeof(pkcs_des_key), iv, ivlen, plaintext, ptlen, - ciphertext, ctlen); - } + memset(pkcs_des_key, 0, sizeof(pkcs_des_key)); + memcpy(pkcs_des_key, key, sizeof(pkcs_des_key)); + rval = pkcs_encrpyt(CKM_DES_CBC, pkcs_des_key, + sizeof(pkcs_des_key), iv, ivlen, plaintext, ptlen, + ciphertext, ctlen); sc_encrypt_quit: return rval; @@ -920,7 +1412,7 @@ sc_encrypt(const oid * privtype, size_t privtypelen, { # if NETSNMP_USE_INTERNAL_MD5 { - snmp_log(LOG_ERR, "Encryption support not enabled.\n"); + snmp_log(LOG_ERR, "Encryption support not enabled.(3)\n"); DEBUGMSGTL(("scapi", "Encrypt function not defined.\n")); return SNMPERR_SC_GENERAL_FAILURE; } @@ -978,18 +1470,13 @@ sc_decrypt(const oid * privtype, size_t privtypelen, #endif DES_cblock key_struct; #endif - u_int properlength = 0, properlength_iv = 0; - int have_transform; -#ifdef HAVE_AES - int new_ivlen = 0; - AES_KEY aes_key; -#endif + const netsnmp_priv_alg_info *pai = NULL; DEBUGTRACE; if (!privtype || !key || !iv || !plaintext || !ciphertext || !ptlen - || (ctlen <= 0) || (*ptlen <= 0) || (*ptlen < ctlen) - || (privtypelen != USM_LENGTH_OID_TRANSFORM)) { + || (ctlen <= 0) || (*ptlen <= 0) || (*ptlen < ctlen)) { + DEBUGMSGTL(("scapi", "decrypt: arg sanity checks failed\n")); QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); } #ifdef NETSNMP_ENABLE_TESTING_CODE @@ -1000,16 +1487,16 @@ sc_decrypt(const oid * privtype, size_t privtypelen, if (buf != NULL) { if (sprint_realloc_hexstring(&buf, &buf_len, &out_len, 1, iv, ivlen)) { - DEBUGMSGTL(("scapi", "decrypt: IV: %s/", buf)); + DEBUGMSGTL(("scapi", "decrypt: IV: %s\n", buf)); } else { - DEBUGMSGTL(("scapi", "decrypt: IV: %s [TRUNCATED]/", buf)); + DEBUGMSGTL(("scapi", "decrypt: IV: %s [TRUNCATED]\n", buf)); } out_len = 0; if (sprint_realloc_hexstring(&buf, &buf_len, &out_len, 1, key, keylen)) { - DEBUGMSG(("scapi", "%s\n", buf)); + DEBUGMSG(("scapi", "key: %s\n", buf)); } else { - DEBUGMSG(("scapi", "%s\n", buf)); + DEBUGMSG(("scapi", "key: %s [TRUNCATED]\n", buf)); } free(buf); } else { @@ -1022,32 +1509,15 @@ sc_decrypt(const oid * privtype, size_t privtypelen, /* * Determine privacy transform. */ - have_transform = 0; -#ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(privtype, DESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES); - properlength_iv = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES_IV); - have_transform = 1; - } -#endif -#ifdef HAVE_AES - if (ISTRANSFORM(privtype, AESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_AES); - properlength_iv = BYTESIZE(SNMP_TRANS_PRIVLEN_AES_IV); - have_transform = 1; - } -#endif - if (!have_transform) { - QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); - } - - if ((keylen < properlength) || (ivlen < properlength_iv)) { + pai = sc_get_priv_alg_byoid(privtype, privtypelen); + if (NULL == pai || + (keylen < pai->proper_length) || (ivlen < pai->iv_length)) { QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); } memset(my_iv, 0, sizeof(my_iv)); #ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(privtype, DESPriv)) { + if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) { memcpy(key_struct, key, sizeof(key_struct)); (void) DES_key_sched(&key_struct, key_sch); @@ -1057,16 +1527,41 @@ sc_decrypt(const oid * privtype, size_t privtypelen, *ptlen = ctlen; } #endif -#ifdef HAVE_AES - if (ISTRANSFORM(privtype, AESPriv)) { - (void) AES_set_encrypt_key(key, properlength*8, &aes_key); +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_AES) + if (USM_CREATE_USER_PRIV_AES == (pai->type & USM_PRIV_MASK_ALG)) { + EVP_CIPHER_CTX *ctx; + const EVP_CIPHER *cipher; + int len, rc; + + cipher = sc_get_openssl_privfn(pai->type); + if (NULL == cipher) + QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); memcpy(my_iv, iv, ivlen); /* - * encrypt the data + * decrypt the data */ - AES_cfb128_encrypt(ciphertext, plaintext, ctlen, - &aes_key, my_iv, &new_ivlen, AES_DECRYPT); + ctx = EVP_CIPHER_CTX_new(); + if (!ctx) { + QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); + } + rc = EVP_DecryptInit(ctx, cipher, key, my_iv); + if (rc != 1) { + EVP_CIPHER_CTX_free(ctx); + QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); + } + rc = EVP_DecryptUpdate(ctx, plaintext, &len, ciphertext, ctlen); + if (rc != 1) { + EVP_CIPHER_CTX_free(ctx); + QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); + } + rc = EVP_DecryptFinal(ctx, plaintext + len, &len); + if (rc != 1) { + EVP_CIPHER_CTX_free(ctx); + QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); + } + /* Clean up */ + EVP_CIPHER_CTX_free(ctx); *ptlen = ctlen; } #endif @@ -1086,42 +1581,34 @@ sc_decrypt(const oid * privtype, size_t privtypelen, memset(my_iv, 0, sizeof(my_iv)); return rval; } /* USE OPEN_SSL */ -#elif NETSNMP_USE_PKCS11 /* USE PKCS */ +#elif defined(NETSNMP_USE_PKCS11) /* USE PKCS */ { int rval = SNMPERR_SUCCESS; - u_int properlength, properlength_iv; u_char pkcs_des_key[8]; + const netsnmp_priv_alg_info *pai; DEBUGTRACE; if (!privtype || !key || !iv || !plaintext || !ciphertext || !ptlen - || (ctlen <= 0) || (*ptlen <= 0) || (*ptlen < ctlen) - || (privtypelen != USM_LENGTH_OID_TRANSFORM)) { + || (ctlen <= 0) || (*ptlen <= 0) || (*ptlen < ctlen)) { QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); } /* * Determine privacy transform. */ - if (ISTRANSFORM(privtype, DESPriv)) { - properlength = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES); - properlength_iv = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES_IV); - } else { + pai = sc_get_priv_alg_byoid(privtype, privtypelen); + if (NULL == pai || USM_CREATE_USER_PRIV_DES != priv_type || + (keylen < pai->proper_length) || (ivlen < pai->iv_length)) { QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); } - if ((keylen < properlength) || (ivlen < properlength_iv)) { - QUITFUN(SNMPERR_GENERR, sc_decrypt_quit); - } - - if (ISTRANSFORM(privtype, DESPriv)) { - memset(pkcs_des_key, 0, sizeof(pkcs_des_key)); - memcpy(pkcs_des_key, key, sizeof(pkcs_des_key)); - rval = pkcs_decrpyt(CKM_DES_CBC, pkcs_des_key, - sizeof(pkcs_des_key), iv, ivlen, ciphertext, - ctlen, plaintext, ptlen); - *ptlen = ctlen; - } + memset(pkcs_des_key, 0, sizeof(pkcs_des_key)); + memcpy(pkcs_des_key, key, sizeof(pkcs_des_key)); + rval = pkcs_decrpyt(CKM_DES_CBC, pkcs_des_key, + sizeof(pkcs_des_key), iv, ivlen, ciphertext, + ctlen, plaintext, ptlen); + *ptlen = ctlen; sc_decrypt_quit: return rval; @@ -1129,7 +1616,7 @@ sc_decrypt(const oid * privtype, size_t privtypelen, #else { #if !defined(NETSNMP_ENABLE_SCAPI_AUTHPRIV) - snmp_log(LOG_ERR, "Encryption support not enabled.\n"); + snmp_log(LOG_ERR, "Encryption support not enabled.(4)\n"); return SNMPERR_SC_NOT_CONFIGURED; #else # if NETSNMP_USE_INTERNAL_MD5 @@ -1181,6 +1668,8 @@ MD5_hmac(const u_char * data, size_t len, u_char * mac, size_t maclen, u_char *newdata = NULL; int rc = 0; + DEBUGTRACE; + /* * memset(K1,0,MD5_HASHKEYLEN); * memset(K2,0,MD5_HASHKEYLEN); @@ -1279,6 +1768,8 @@ SHA1_hmac(const u_char * data, size_t len, u_char * mac, size_t maclen, u_char *newdata = NULL; int rc = 0; + DEBUGTRACE; + /* * memset(K1,0,SHA1_HASHKEYLEN); * memset(K2,0,SHA1_HASHKEYLEN); diff --git a/snmplib/sd-daemon.c b/snmplib/sd-daemon.c new file mode 100644 index 0000000..b1efbce --- /dev/null +++ b/snmplib/sd-daemon.c @@ -0,0 +1,410 @@ +/* + * Systemd integration parts. + * + * Most of this file is directly copied from systemd sources. + * Changes: + * - all exported functions were renamed to have a netsnmp_ prefix + * - all nonexported functions were made static + * - includes were changed to match Net-SNMP style. + * - removed gcc export macros + * - removed POSIX message queues + * - removed log level macros + * - removed unused functions + * - made SD_LISTEN_FDS_START as it is only used internally + */ + +#include +#include +#include +#include +#include + +#ifndef NETSNMP_NO_SYSTEMD + +/*** + Copyright 2010 Lennart Poettering + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +***/ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* The first passed file descriptor is fd 3 */ +#define SD_LISTEN_FDS_START 3 + +int netsnmp_sd_listen_fds(int unset_environment) { + + int r, fd; + const char *e; + char *p = NULL; + unsigned long l; + + if (!(e = getenv("LISTEN_PID"))) { + r = 0; + goto finish; + } + + errno = 0; + l = strtoul(e, &p, 10); + + if (errno != 0) { + r = -errno; + goto finish; + } + + if (!p || *p || l <= 0) { + r = -EINVAL; + goto finish; + } + + /* Is this for us? */ + if (getpid() != (pid_t) l) { + r = 0; + goto finish; + } + + if (!(e = getenv("LISTEN_FDS"))) { + r = 0; + goto finish; + } + + errno = 0; + l = strtoul(e, &p, 10); + + if (errno != 0 || l != (int)l) { + r = errno ? -errno : -EINVAL; + goto finish; + } + + if (!p || *p) { + r = -EINVAL; + goto finish; + } + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) { + int flags; + + if ((flags = fcntl(fd, F_GETFD)) < 0) { + r = -errno; + goto finish; + } + + if (flags & FD_CLOEXEC) + continue; + + if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) { + r = -errno; + goto finish; + } + } + + r = (int) l; + +finish: + if (unset_environment) { + unsetenv("LISTEN_PID"); + unsetenv("LISTEN_FDS"); + } + + return r; +} + +static int sd_is_socket_internal(int fd, int type, int listening) { + struct stat st_fd; + + if (fd < 0 || type < 0) + return -EINVAL; + + if (fstat(fd, &st_fd) < 0) + return -errno; + + if (!S_ISSOCK(st_fd.st_mode)) + return 0; + + if (type != 0) { + int other_type = 0; + socklen_t l = sizeof(other_type); + + if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0) + return -errno; + + if (l != sizeof(other_type)) + return -EINVAL; + + if (other_type != type) + return 0; + } + + if (listening >= 0) { + int accepting = 0; + socklen_t l = sizeof(accepting); + + if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0) + return -errno; + + if (l != sizeof(accepting)) + return -EINVAL; + + if (!accepting != !listening) + return 0; + } + + return 1; +} + +union sockaddr_union { + struct sockaddr sa; + struct sockaddr_in in4; + struct sockaddr_in6 in6; + struct sockaddr_un un; + struct sockaddr_storage storage; +}; + +static int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) { + union sockaddr_union sockaddr; + socklen_t l; + int r; + + if (family != 0 && family != AF_INET && family != AF_INET6) + return -EINVAL; + + if ((r = sd_is_socket_internal(fd, type, listening)) <= 0) + return r; + + memset(&sockaddr, 0, sizeof(sockaddr)); + l = sizeof(sockaddr); + + if (getsockname(fd, &sockaddr.sa, &l) < 0) + return -errno; + + if (l < sizeof(sa_family_t)) + return -EINVAL; + + if (sockaddr.sa.sa_family != AF_INET && + sockaddr.sa.sa_family != AF_INET6) + return 0; + + if (family > 0) + if (sockaddr.sa.sa_family != family) + return 0; + + if (port > 0) { + if (sockaddr.sa.sa_family == AF_INET) { + if (l < sizeof(struct sockaddr_in)) + return -EINVAL; + + return htons(port) == sockaddr.in4.sin_port; + } else { + if (l < sizeof(struct sockaddr_in6)) + return -EINVAL; + + return htons(port) == sockaddr.in6.sin6_port; + } + } + + return 1; +} + +static int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) { + union sockaddr_union sockaddr; + socklen_t l; + int r; + + if ((r = sd_is_socket_internal(fd, type, listening)) <= 0) + return r; + + memset(&sockaddr, 0, sizeof(sockaddr)); + l = sizeof(sockaddr); + + if (getsockname(fd, &sockaddr.sa, &l) < 0) + return -errno; + + if (l < sizeof(sa_family_t)) + return -EINVAL; + + if (sockaddr.sa.sa_family != AF_UNIX) + return 0; + + if (path) { + if (length <= 0) + length = strlen(path); + + if (length <= 0) + /* Unnamed socket */ + return l == offsetof(struct sockaddr_un, sun_path); + + if (path[0]) + /* Normal path socket */ + return + (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) && + memcmp(path, sockaddr.un.sun_path, length+1) == 0; + else + /* Abstract namespace socket */ + return + (l == offsetof(struct sockaddr_un, sun_path) + length) && + memcmp(path, sockaddr.un.sun_path, length) == 0; + } + + return 1; +} + +int netsnmp_sd_notify(int unset_environment, const char *state) { + int fd = -1, r; + struct msghdr msghdr; + struct iovec iovec; + union sockaddr_union sockaddr; + const char *e; + + if (!state) { + r = -EINVAL; + goto finish; + } + + if (!(e = getenv("NOTIFY_SOCKET"))) + return 0; + + /* Must be an abstract socket, or an absolute path */ + if ((e[0] != '@' && e[0] != '/') || e[1] == 0) { + r = -EINVAL; + goto finish; + } + + if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) { + r = -errno; + goto finish; + } + + memset(&sockaddr, 0, sizeof(sockaddr)); + sockaddr.sa.sa_family = AF_UNIX; + strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path)); + + if (sockaddr.un.sun_path[0] == '@') + sockaddr.un.sun_path[0] = 0; + + memset(&iovec, 0, sizeof(iovec)); + iovec.iov_base = NETSNMP_REMOVE_CONST(char *, state); + iovec.iov_len = strlen(state); + + memset(&msghdr, 0, sizeof(msghdr)); + msghdr.msg_name = &sockaddr; + msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e); + + if (msghdr.msg_namelen > sizeof(struct sockaddr_un)) + msghdr.msg_namelen = sizeof(struct sockaddr_un); + + msghdr.msg_iov = &iovec; + msghdr.msg_iovlen = 1; + + if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) { + r = -errno; + goto finish; + } + + r = 1; + +finish: + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + if (fd >= 0) + close(fd); + + return r; +} + +/* End of original sd-daemon.c from systemd sources */ + +int +netsnmp_sd_find_inet_socket(int family, int type, int listening, int port) +{ + int count, fd; + + count = netsnmp_sd_listen_fds(0); + if (count <= 0) { + DEBUGMSGTL(("systemd:find_inet_socket", "No LISTEN_FDS found.\n")); + return -1; + } + DEBUGMSGTL(("systemd:find_inet_socket", "LISTEN_FDS reports %d sockets.\n", + count)); + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + count; fd++) { + int rc = sd_is_socket_inet(fd, family, type, listening, port); + if (rc < 0) + DEBUGMSGTL(("systemd:find_inet_socket", + "sd_is_socket_inet error: %d\n", rc)); + if (rc > 0) { + DEBUGMSGTL(("systemd:find_inet_socket", + "Found the socket in LISTEN_FDS\n")); + return fd; + } + } + DEBUGMSGTL(("systemd:find_inet_socket", "Socket not found in LISTEN_FDS\n")); + return -1; +} + +int +netsnmp_sd_find_unix_socket(int type, int listening, const char *path) +{ + int count, fd; + + count = netsnmp_sd_listen_fds(0); + if (count <= 0) { + DEBUGMSGTL(("systemd:find_unix_socket", "No LISTEN_FDS found.\n")); + return -1; + } + DEBUGMSGTL(("systemd:find_unix_socket", "LISTEN_FDS reports %d sockets.\n", + count)); + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + count; fd++) { + int rc = sd_is_socket_unix(fd, type, listening, path, 0); + if (rc < 0) + DEBUGMSGTL(("systemd:find_unix_socket", + "sd_is_socket_unix error: %d\n", rc)); + if (rc > 0) { + DEBUGMSGTL(("systemd:find_unix_socket", + "Found the socket in LISTEN_FDS\n")); + return fd; + } + } + DEBUGMSGTL(("systemd:find_unix_socket", "Socket not found in LISTEN_FDS\n")); + return -1; +} + +#endif /* ! NETSNMP_NO_SYSTEMD */ diff --git a/snmplib/snmp-tc.c b/snmplib/snmp-tc.c index 891c3a0..fad40e5 100644 --- a/snmplib/snmp-tc.c +++ b/snmplib/snmp-tc.c @@ -7,22 +7,22 @@ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -33,12 +33,12 @@ #include /* for "internal" definitions */ #include -netsnmp_feature_child_of(snmp_tc_all, libnetsnmp) +netsnmp_feature_child_of(snmp_tc_all, libnetsnmp); -netsnmp_feature_child_of(netsnmp_dateandtime_set_buf_from_vars, netsnmp_unused) -netsnmp_feature_child_of(date_n_time, snmp_tc_all) -netsnmp_feature_child_of(ctime_to_timet, snmp_tc_all) -netsnmp_feature_child_of(check_rowstatus_with_storagetype_transition, snmp_tc_all) +netsnmp_feature_child_of(netsnmp_dateandtime_set_buf_from_vars, netsnmp_unused); +netsnmp_feature_child_of(date_n_time, snmp_tc_all); +netsnmp_feature_child_of(ctime_to_timet, snmp_tc_all); +netsnmp_feature_child_of(check_rowstatus_with_storagetype_transition, snmp_tc_all); #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_DATEANDTIME_SET_BUF_FROM_VARS /* @@ -163,7 +163,7 @@ date_n_time(const time_t * when, size_t * length) string[7] = 0; *length = 8; -#if defined(HAVE_STRUCT_TM_TM_GMTOFF) || defined(HAVE_TIMEZONE_VARIABLE) +#if defined(HAVE_STRUCT_TM_TM_GMTOFF) || HAVE_DECL_TIMEZONE /* * Timezone offset */ @@ -254,11 +254,15 @@ ctime_to_timet(const char *str) * Cope with timezone and DST */ -#ifdef SYSV - if (daylight) - tm.tm_isdst = 1; - +#ifdef HAVE_STRUCT_TM_TM_ISDST +#if HAVE_DECL_DAYLIGHT==1 + tm.tm_isdst = !!daylight; +#else + tm.tm_isdst = 0; +#endif +#if defined(HAVE_DECL_TIMEZONE) && defined(HAVE_SCALAR_TIMEZONE) tm.tm_sec -= timezone; +#endif #endif return (mktime(&tm)); @@ -431,7 +435,7 @@ check_rowstatus_with_storagetype_transition(int oldValue, int newValue, } #endif /* NETSNMP_FEATURE_REMOVE_CHECK_ROWSTATUS_WITH_STORAGETYPE_TRANSITION */ -netsnmp_feature_child_of(check_storage_transition, snmp_tc_all) +netsnmp_feature_child_of(check_storage_transition, snmp_tc_all); #ifndef NETSNMP_FEATURE_REMOVE_CHECK_STORAGE_TRANSITION char check_storage_transition(int oldValue, int newValue) diff --git a/snmplib/snmp.c b/snmplib/snmp.c index c3763e9..40e501b 100644 --- a/snmplib/snmp.c +++ b/snmplib/snmp.c @@ -45,7 +45,7 @@ SOFTWARE. #else #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_SYS_SELECT_H @@ -55,10 +55,6 @@ SOFTWARE. #define NULL 0 #endif -#if HAVE_DMALLOC_H -#include -#endif - #ifdef vms #include #endif @@ -78,7 +74,7 @@ SOFTWARE. incomplete, but when combined with the manual page set and tutorials forms a pretty comprehensive starting point. - @section Starting out + @section Starting_out Starting out The best places to start learning are the @e Net-SNMP @e tutorial (http://www.Net-SNMP.org/tutorial-5/) and the @e Modules and @e @@ -92,6 +88,11 @@ xdump(const void * data, size_t length, const char *prefix) const u_char * const cp = (const u_char*)data; int col, count; char *buffer; +#ifndef NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL + int debug_log_level = netsnmp_get_debug_log_level(); +#else +#define debug_log_level LOG_DEBUG +#endif /* NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL */ buffer = (char *) malloc(strlen(prefix) + 80); if (!buffer) { @@ -122,10 +123,10 @@ xdump(const void * data, size_t length, const char *prefix) } buffer[col + 60] = '\n'; buffer[col + 60 + 1] = 0; - snmp_log(LOG_DEBUG, "%s", buffer); + snmp_log(debug_log_level, "%s", buffer); count += col; } - snmp_log(LOG_DEBUG, "\n"); + snmp_log(debug_log_level, "\n"); free(buffer); } /* end xdump() */ diff --git a/snmplib/snmp_alarm.c b/snmplib/snmp_alarm.c index af4800f..50eec8c 100644 --- a/snmplib/snmp_alarm.c +++ b/snmplib/snmp_alarm.c @@ -18,36 +18,32 @@ */ #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c index 191debf..25e8f79 100644 --- a/snmplib/snmp_api.c +++ b/snmplib/snmp_api.c @@ -29,6 +29,11 @@ SOFTWARE. * Copyright 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup library The Net-SNMP library @@ -42,53 +47,53 @@ SOFTWARE. #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_NET_IF_DL_H +#ifdef HAVE_NET_IF_DL_H #ifndef dynix #include #else @@ -97,14 +102,10 @@ SOFTWARE. #endif #include -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #define SNMP_NEED_REQUEST_LIST #include #include @@ -135,17 +136,16 @@ SOFTWARE. #include #include #include - -netsnmp_feature_child_of(statistics, libnetsnmp) -netsnmp_feature_child_of(snmp_api, libnetsnmp) -netsnmp_feature_child_of(oid_is_subtree, snmp_api) -netsnmp_feature_child_of(snmpv3_probe_contextEngineID_rfc5343, snmp_api) - #if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) -extern void netsnmp_certs_init(void); -extern void netsnmp_certs_shutdown(void); +#include +#include #endif +netsnmp_feature_child_of(statistics, libnetsnmp); +netsnmp_feature_child_of(snmp_api, libnetsnmp); +netsnmp_feature_child_of(oid_is_subtree, snmp_api); +netsnmp_feature_child_of(snmpv3_probe_contextEngineID_rfc5343, snmp_api); + static void _init_snmp(void); static int _snmp_store_needed = 0; @@ -167,7 +167,6 @@ static int _snmp_store_needed = 0; /* * Globals. */ -#define MAX_PACKET_LENGTH (0x7fffffff) #ifndef NETSNMP_STREAM_QUEUE_LEN #define NETSNMP_STREAM_QUEUE_LEN 5 #endif @@ -176,17 +175,6 @@ static int _snmp_store_needed = 0; #define BSD4_2 #endif -#ifndef FD_SET - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((p), 0, sizeof(*(p))) -#endif - static oid default_enterprise[] = { 1, 3, 6, 1, 4, 1, 3, 1, 1 }; /* * enterprises.cmu.systems.cmuSNMP @@ -199,12 +187,6 @@ static oid default_enterprise[] = { 1, 3, 6, 1, 4, 1, 3, 1, 1 }; #define DEFAULT_ENTERPRISE default_enterprise #define DEFAULT_TIME 0 -/* - * don't set higher than 0x7fffffff, and I doubt it should be that high - * * = 4 gig snmp messages max - */ -#define MAXIMUM_PACKET_SIZE 0x7fffffff - /* * Internal information about the state of the snmp session. */ @@ -225,10 +207,26 @@ struct snmp_internal_session { netsnmp_pdu *(*hook_create_pdu) (netsnmp_transport *, void *, size_t); - u_char *packet; - size_t packet_len, packet_size; + u_char *packet; /* curr rcv packet data (may be incomplete) */ + size_t packet_len; /* length of data received so far */ + size_t packet_size; /* size of buffer for packet data */ + + u_char *obuf; /* send packet buffer */ + size_t obuf_size; /* size of buffer for packet data */ + u_char *opacket; /* send packet data (within obuf) */ + size_t opacket_len; /* length of data */ }; +/* + * information about received packet + */ +typedef struct snmp_rcv_packet_s { + u_char *packet; + size_t packet_len; + void *opaque; + int olength; +} snmp_rcv_packet; + static const char *api_errors[-SNMPERR_MAX + 1] = { "No error", /* SNMPERR_SUCCESS */ "Generic error", /* SNMPERR_GENERR */ @@ -340,12 +338,6 @@ static int snmp_detail_f = 0; /* * Prototypes. */ -int snmp_build(u_char ** pkt, size_t * pkt_len, - size_t * offset, netsnmp_session * pss, - netsnmp_pdu *pdu); -static int snmp_parse(void *, netsnmp_session *, netsnmp_pdu *, - u_char *, size_t); - static void snmpv3_calc_msg_flags(int, int, u_char *); static int snmpv3_verify_msg(netsnmp_request_list *, netsnmp_pdu *); static int snmpv3_build(u_char ** pkt, size_t * pkt_len, @@ -353,15 +345,29 @@ static int snmpv3_build(u_char ** pkt, size_t * pkt_len, netsnmp_pdu *pdu); static int snmp_parse_version(u_char *, size_t); static int snmp_resend_request(struct session_list *slp, + netsnmp_request_list *orp, netsnmp_request_list *rp, int incr_retries); static void register_default_handlers(void); static struct session_list *snmp_sess_copy(netsnmp_session * pss); -int snmp_get_errno(void); -NETSNMP_IMPORT -void snmp_synch_reset(netsnmp_session * notused); -NETSNMP_IMPORT -void snmp_synch_setup(netsnmp_session * notused); + +/* + * return configured max message size for outgoing packets + */ +int +netsnmp_max_send_msg_size(void) +{ + u_int max = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_MSG_SEND_MAX); + if (0 == max) + max = SNMP_MAX_PACKET_LEN; + else if (max < SNMP_MIN_MAX_LEN) + max = SNMP_MIN_MAX_LEN; /* minimum max size per SNMP specs */ + else if (max > SNMP_MAX_PACKET_LEN) + max = SNMP_MAX_PACKET_LEN; + + return max; +} #ifndef HAVE_STRERROR const char * @@ -393,6 +399,8 @@ snmp_pdu_type(int type) #endif /* !NETSNMP_NO_WRITE_SUPPORT */ case SNMP_MSG_RESPONSE: return "RESPONSE"; + case SNMP_MSG_TRAP: + return "TRAP"; case SNMP_MSG_INFORM: return "INFORM"; case SNMP_MSG_TRAP2: @@ -627,7 +635,51 @@ snmp_sess_perror(const char *prog_string, netsnmp_session * ss) netsnmp_sess_log_error(LOG_ERR, prog_string, ss); } +long int netsnmp_random(void) +{ +#if defined(HAVE_RANDOM) + /* + * The function random() is a more sophisticated random number generator + * which uses nonlinear feedback and an internal table that is 124 bytes + * (992 bits) long. The function returns random values that are 32 bits in + * length. All of the bits generated by random() are usable. The random() + * function is adequate for simulations and games, but should not be used + * for security related applications such as picking cryptographic keys or + * simulating one-time pads. + */ + return random(); +#elif defined(HAVE_LRAND48) + /* + * As with random(), lrand48() provides excellent random numbers for + * simulations and games, but should not be used for security-related + * applications such as picking cryptographic keys or simulating one-time + * pads; linear congruential algorithms are too easy to break. + */ + return lrand48(); +#elif defined(HAVE_RAND) + /* + * The original UNIX random number generator, rand(), is not a very good + * random number generator. It uses a 32-bit seed and maintains a 32-bit + * internal state. + */ + return rand(); +#else +#error "Neither random(), nor lrand48() nor rand() are available" +#endif +} +void netsnmp_srandom(unsigned int seed) +{ +#if defined(HAVE_SRANDOM) + srandom(seed); +#elif defined(HAVE_SRAND48) + srand48(seed); +#elif defined(HAVE_SRAND) + srand(seed); +#else +#error "Neither srandom(), nor srand48() nor srand() are available" +#endif +} /* * Primordial SNMP library initialization. @@ -666,15 +718,9 @@ _init_snmp(void) /* * get pseudo-random values for request ID and message ID */ -#ifdef SVR4 - srand48(tv.tv_sec ^ tv.tv_usec); - tmpReqid = lrand48(); - tmpMsgid = lrand48(); -#else - srandom((unsigned)(tv.tv_sec ^ tv.tv_usec)); - tmpReqid = random(); - tmpMsgid = random(); -#endif + netsnmp_srandom((unsigned)(tv.tv_sec ^ tv.tv_usec)); + tmpReqid = netsnmp_random(); + tmpMsgid = netsnmp_random(); /* * don't allow zero value to repeat init @@ -709,6 +755,8 @@ _init_snmp(void) NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH, 16); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RETRIES, DEFAULT_RETRIES); + netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_MIB_ERRORS, 1); #ifdef NETSNMP_USE_REVERSE_ASNENCODING netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, @@ -732,12 +780,12 @@ snmp_sess_init(netsnmp_session * session) */ memset(session, 0, sizeof(netsnmp_session)); - session->remote_port = SNMP_DEFAULT_REMPORT; session->timeout = SNMP_DEFAULT_TIMEOUT; session->retries = SNMP_DEFAULT_RETRIES; session->version = SNMP_DEFAULT_VERSION; session->securityModel = SNMP_DEFAULT_SECMODEL; - session->rcvMsgMaxSize = SNMP_MAX_MSG_SIZE; + session->rcvMsgMaxSize = netsnmp_max_send_msg_size(); + session->sndMsgMaxSize = netsnmp_max_send_msg_size(); session->flags |= SNMP_FLAGS_DONT_PROBE; } @@ -751,10 +799,24 @@ register_default_handlers(void) NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REVERSE_ENCODE); netsnmp_ds_register_config(ASN_INTEGER, "snmp", "defaultPort", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DEFAULT_PORT); +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION + netsnmp_ds_register_config(ASN_BOOLEAN, "snmp", "disableSNMPv3", + NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DISABLE_V3); +#endif /* NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION */ #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) +#ifndef NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION +#if !defined(NETSNMP_DISABLE_SNMPV1) + netsnmp_ds_register_config(ASN_BOOLEAN, "snmp", "disableSNMPv1", + NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DISABLE_V1); +#endif +#if !defined(NETSNMP_DISABLE_SNMPV2C) + netsnmp_ds_register_config(ASN_BOOLEAN, "snmp", "disableSNMPv2c", + NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DISABLE_V2c); +#endif +#endif /* NETSNMP_FEATURE_REMOVE_RUNTIME_DISABLE_VERSION */ netsnmp_ds_register_config(ASN_OCTET_STR, "snmp", "defCommunity", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_COMMUNITY); -#endif +#endif /* !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) */ netsnmp_ds_register_premib(ASN_BOOLEAN, "snmp", "noTokenWarnings", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_NO_TOKEN_WARNINGS); netsnmp_ds_register_config(ASN_BOOLEAN, "snmp", "noRangeCheck", @@ -769,6 +831,8 @@ register_default_handlers(void) NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_16BIT_IDS); netsnmp_ds_register_premib(ASN_OCTET_STR, "snmp", "clientaddr", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENT_ADDR); + netsnmp_ds_register_premib(ASN_BOOLEAN, "snmp", "clientaddrUsesPort", + NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT); netsnmp_ds_register_config(ASN_INTEGER, "snmp", "serverSendBuf", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_SERVERSENDBUF); netsnmp_ds_register_config(ASN_INTEGER, "snmp", "serverRecvBuf", @@ -777,6 +841,9 @@ register_default_handlers(void) NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENTSENDBUF); netsnmp_ds_register_config(ASN_INTEGER, "snmp", "clientRecvBuf", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENTRECVBUF); + netsnmp_ds_register_config(ASN_INTEGER, "snmp", "sendMessageMaxSize", + NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_MSG_SEND_MAX); netsnmp_ds_register_config(ASN_BOOLEAN, "snmp", "noPersistentLoad", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD); netsnmp_ds_register_config(ASN_BOOLEAN, "snmp", "noPersistentSave", @@ -789,6 +856,9 @@ register_default_handlers(void) NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_TIMEOUT); netsnmp_ds_register_config(ASN_INTEGER, "snmp", "retries", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RETRIES); + netsnmp_ds_register_config(ASN_OCTET_STR, "snmp", "outputPrecision", + NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OUTPUT_PRECISION); + netsnmp_register_service_handlers(); } @@ -843,7 +913,7 @@ init_snmp(const char *type) init_snmp_alarm(); init_snmp_enum(type); init_vacm(); -#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && NETSNMP_TRANSPORT_TLSBASE_DOMAIN netsnmp_certs_init(); #endif #ifdef DNSSEC_LOCAL_VALIDATION @@ -912,8 +982,11 @@ snmp_shutdown(const char *type) #ifndef NETSNMP_DISABLE_MIB_LOADING shutdown_mib(); #endif /* NETSNMP_DISABLE_MIB_LOADING */ -#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) +#if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && NETSNMP_TRANSPORT_TLSBASE_DOMAIN netsnmp_certs_shutdown(); +#endif +#if !defined(NETSNMP_FEATURE_REMOVE_FILTER_SOURCE) + netsnmp_transport_filter_cleanup(); #endif unregister_all_config_handlers(); netsnmp_container_free_list(); @@ -925,11 +998,27 @@ snmp_shutdown(const char *type) netsnmp_clear_default_target(); netsnmp_clear_default_domain(); shutdown_secmod(); + shutdown_snmp_transport(); + shutdown_data_list(); + snmp_debug_shutdown(); /* should be done last */ init_snmp_init_done = 0; _init_snmp_init_done = 0; } +/* + * inserts session into session list + */ +void snmp_session_insert(struct session_list *slp) +{ + if (NULL == slp) + return; + + snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); + slp->next = Sessions; + Sessions = slp; + snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); +} /* * Sets up the session with the snmp_session information provided by the user. @@ -947,10 +1036,7 @@ snmp_open(netsnmp_session *session) return NULL; } - snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); - slp->next = Sessions; - Sessions = slp; - snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); + snmp_session_insert(slp); return (slp->session); } @@ -958,7 +1044,7 @@ snmp_open(netsnmp_session *session) /* * extended open */ -netsnmp_feature_child_of(snmp_open_ex, netsnmp_unused) +netsnmp_feature_child_of(snmp_open_ex, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_SNMP_OPEN_EX netsnmp_session * snmp_open_ex(netsnmp_session *session, @@ -987,10 +1073,7 @@ snmp_open_ex(netsnmp_session *session, slp->internal->hook_realloc_build = frbuild; slp->internal->check_packet = fcheck; - snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); - slp->next = Sessions; - Sessions = slp; - snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); + snmp_session_insert(slp); return (slp->session); } @@ -1058,13 +1141,14 @@ _sess_copy(netsnmp_session * in_session) */ if (in_session->peername != NULL) { - session->peername = (char *)malloc(strlen(in_session->peername) + 1); + session->peername = + netsnmp_strdup_and_null((u_char*)in_session->peername, + strlen(in_session->peername)); if (session->peername == NULL) { snmp_sess_close(slp); in_session->s_snmp_errno = SNMPERR_MALLOC; return (NULL); } - strcpy(session->peername, in_session->peername); } /* @@ -1079,9 +1163,7 @@ _sess_copy(netsnmp_session * in_session) if ((cp = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_COMMUNITY)) != NULL) { session->community_len = strlen(cp); - ucp = (u_char *) malloc(session->community_len); - if (ucp) - memmove(ucp, cp, session->community_len); + ucp = (u_char *) strdup(cp); } else { #ifdef NETSNMP_NO_ZEROLENGTH_COMMUNITY session->community_len = strlen(DEFAULT_COMMUNITY); @@ -1261,7 +1343,9 @@ snmp_sess_copy(netsnmp_session * pss) * multiple future security models. E.G. both SSH and DTLS. */ int -snmpv3_probe_contextEngineID_rfc5343(void *slp, netsnmp_session *session) { +snmpv3_probe_contextEngineID_rfc5343(struct session_list *slp, + netsnmp_session *session) +{ netsnmp_pdu *pdu = NULL, *response = NULL; static oid snmpEngineIDoid[] = { 1,3,6,1,6,3,10,2,1,1,0}; static size_t snmpEngineIDoid_len = 11; @@ -1434,7 +1518,7 @@ netsnmp_sess_config_transport(netsnmp_container *transport_configuration, if (transport->f_config) { netsnmp_iterator *iter; netsnmp_transport_config *config_data; - int ret; + int ret = 0; iter = CONTAINER_ITERATOR(transport_configuration); if (NULL == iter) { @@ -1445,10 +1529,12 @@ netsnmp_sess_config_transport(netsnmp_container *transport_configuration, config_data = (netsnmp_transport_config*)ITERATOR_NEXT(iter)) { ret = transport->f_config(transport, config_data->key, config_data->value); - if (ret) { - return SNMPERR_TRANSPORT_CONFIG_ERROR; - } + if (ret) + break; } + ITERATOR_RELEASE(iter); + if (ret) + return SNMPERR_TRANSPORT_CONFIG_ERROR; } else { return SNMPERR_TRANSPORT_NO_CONFIG; } @@ -1506,13 +1592,28 @@ netsnmp_sess_config_and_open_transport(netsnmp_session *in_session, transport = transport->f_open(transport); if (transport == NULL) { - DEBUGMSGTL(("snmp_sess", "couldn't interpret peername\n")); + DEBUGMSGTL(("snmp_sess", "couldn't open transport connection\n")); in_session->s_snmp_errno = SNMPERR_BAD_ADDRESS; in_session->s_errno = errno; snmp_set_detail(in_session->peername); return SNMPERR_BAD_ADDRESS; } + /** if transport has a max size, make sure session is the same (or less) */ + if (in_session->rcvMsgMaxSize > transport->msgMaxSize) { + DEBUGMSGTL(("snmp_sess", + "limiting session rcv size (%" NETSNMP_PRIz "d) to transport max (%" NETSNMP_PRIz "d)\n", + in_session->rcvMsgMaxSize, transport->msgMaxSize)); + in_session->rcvMsgMaxSize = transport->msgMaxSize; + } + + if (in_session->sndMsgMaxSize > transport->msgMaxSize) { + DEBUGMSGTL(("snmp_sess", + "limiting session snd size (%" NETSNMP_PRIz "d) to transport max (%" NETSNMP_PRIz "d)\n", + in_session->sndMsgMaxSize, transport->msgMaxSize)); + in_session->sndMsgMaxSize = transport->msgMaxSize; + } + transport->flags |= NETSNMP_TRANSPORT_FLAG_OPENED; DEBUGMSGTL(("snmp_sess", "done opening transport: %x\n", transport->flags & NETSNMP_TRANSPORT_FLAG_OPENED)); return SNMPERR_SUCCESS; @@ -1548,6 +1649,9 @@ _sess_open(netsnmp_session * in_session) clientaddr_save = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENT_ADDR); + if (clientaddr_save) + clientaddr_save = strdup(clientaddr_save); + netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENT_ADDR, in_session->localname); @@ -1565,9 +1669,10 @@ _sess_open(netsnmp_session * in_session) NULL); } - if (NULL != clientaddr_save) + if (NULL != in_session->localname) netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_CLIENT_ADDR, clientaddr_save); + free(clientaddr_save); } if (transport == NULL) { @@ -1635,10 +1740,7 @@ snmp_add(netsnmp_session * in_session, return NULL; } - snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); - slp->next = Sessions; - Sessions = slp; - snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); + snmp_session_insert(slp); return (slp->session); } @@ -1671,10 +1773,7 @@ snmp_add_full(netsnmp_session * in_session, return NULL; } - snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); - slp->next = Sessions; - Sessions = slp; - snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); + snmp_session_insert(slp); return (slp->session); } @@ -1706,6 +1805,13 @@ snmp_sess_add_ex(netsnmp_session * in_session, if (transport == NULL) return NULL; + if (NULL != in_session && (in_session->rcvMsgMaxSize < SNMP_MIN_MAX_LEN || + in_session->sndMsgMaxSize < SNMP_MIN_MAX_LEN)) { + DEBUGMSGTL(("snmp_sess_add", + "invalid session (msg sizes). need snmp_sess_init")); + in_session = NULL; /* force transport cleanup below */ + } + if (in_session == NULL) { transport->f_close(transport); netsnmp_transport_free(transport); @@ -1745,7 +1851,19 @@ snmp_sess_add_ex(netsnmp_session * in_session, slp->internal->check_packet = fcheck; slp->internal->hook_create_pdu = fcreate_pdu; - slp->session->rcvMsgMaxSize = transport->msgMaxSize; + /** don't let session max exceed transport max */ + if (slp->session->rcvMsgMaxSize > transport->msgMaxSize) { + DEBUGMSGTL(("snmp_sess_add", + "limiting session rcv size (%" NETSNMP_PRIz "d) to transport max (%" NETSNMP_PRIz "d)\n", + slp->session->rcvMsgMaxSize, transport->msgMaxSize)); + slp->session->rcvMsgMaxSize = transport->msgMaxSize; + } + if (slp->session->sndMsgMaxSize > transport->msgMaxSize) { + DEBUGMSGTL(("snmp_sess_add", + "limiting session snd size (%" NETSNMP_PRIz "d) to transport max (%" NETSNMP_PRIz "d)\n", + slp->session->sndMsgMaxSize, transport->msgMaxSize)); + slp->session->sndMsgMaxSize = transport->msgMaxSize; + } if (slp->session->version == SNMP_VERSION_3) { DEBUGMSGTL(("snmp_sess_add", @@ -1799,6 +1917,25 @@ create_user_from_session(netsnmp_session * session) { #endif } +/* Free the memory owned by a session but not the session object itself. */ +void netsnmp_cleanup_session(netsnmp_session *s) +{ + SNMP_FREE(s->localname); + SNMP_FREE(s->peername); + SNMP_FREE(s->community); + SNMP_FREE(s->contextEngineID); + SNMP_FREE(s->contextName); + SNMP_FREE(s->securityEngineID); + SNMP_FREE(s->securityName); + SNMP_FREE(s->securityAuthProto); + SNMP_FREE(s->securityAuthLocalKey); + SNMP_FREE(s->securityPrivProto); + SNMP_FREE(s->securityPrivLocalKey); + SNMP_FREE(s->paramName); +#ifndef NETSNMP_NO_TRAP_STATS + SNMP_FREE(s->trap_stats); +#endif /* NETSNMP_NO_TRAP_STATS */ +} /* * Do a "deep free()" of a netsnmp_session. @@ -1806,28 +1943,18 @@ create_user_from_session(netsnmp_session * session) { * CAUTION: SHOULD ONLY BE USED FROM snmp_sess_close() OR SIMILAR. * (hence it is static) */ - static void snmp_free_session(netsnmp_session * s) { if (s) { - SNMP_FREE(s->localname); - SNMP_FREE(s->peername); - SNMP_FREE(s->community); - SNMP_FREE(s->contextEngineID); - SNMP_FREE(s->contextName); - SNMP_FREE(s->securityEngineID); - SNMP_FREE(s->securityName); - SNMP_FREE(s->securityAuthProto); - SNMP_FREE(s->securityPrivProto); - SNMP_FREE(s->paramName); + netsnmp_cleanup_session(s); /* * clear session from any callbacks */ netsnmp_callback_clear_client_arg(s, 0, 0); - free((char *) s); + free(s); } } @@ -1876,10 +2003,10 @@ snmp_sess_close(void *sessp) orp->pdu, orp->cb_data); } snmp_free_pdu(orp->pdu); - free((char *) orp); + free(orp); } - free((char *) isp); + free(isp); } transport = slp->transport; @@ -1913,7 +2040,7 @@ snmp_sess_close(void *sessp) } snmp_free_session(sesp); - free((char *) slp); + free(slp); return 1; } @@ -1997,11 +2124,15 @@ snmpv3_verify_msg(netsnmp_request_list *rp, netsnmp_pdu *pdu) if (rpdu->securityLevel != pdu->securityLevel) return 0; - if (rpdu->contextEngineIDLen != pdu->contextEngineIDLen || + if (rpdu->contextEngineIDLen != pdu->contextEngineIDLen) + return 0; + if (pdu->contextEngineIDLen && memcmp(rpdu->contextEngineID, pdu->contextEngineID, pdu->contextEngineIDLen)) return 0; - if (rpdu->contextNameLen != pdu->contextNameLen || + if (rpdu->contextNameLen != pdu->contextNameLen) + return 0; + if (pdu->contextNameLen && memcmp(rpdu->contextName, pdu->contextName, pdu->contextNameLen)) return 0; @@ -2046,9 +2177,8 @@ snmpv3_build(u_char ** pkt, size_t * pkt_len, size_t * offset, case SNMP_MSG_TRAP2: case SNMP_MSG_REPORT: netsnmp_assert(0 == (pdu->flags & UCD_MSG_FLAG_EXPECT_RESPONSE)); - /* - * Fallthrough - */ + /* FALL THROUGH */ + case SNMP_MSG_INFORM: #ifndef NETSNMP_NOTIFY_ONLY case SNMP_MSG_GET: case SNMP_MSG_GETNEXT: @@ -2056,7 +2186,6 @@ snmpv3_build(u_char ** pkt, size_t * pkt_len, size_t * offset, #ifndef NETSNMP_NO_WRITE_SUPPORT case SNMP_MSG_SET: #endif /* !NETSNMP_NO_WRITE_SUPPORT */ - case SNMP_MSG_INFORM: if (pdu->errstat == SNMP_DEFAULT_ERRSTAT) pdu->errstat = 0; if (pdu->errindex == SNMP_DEFAULT_ERRINDEX) @@ -2165,7 +2294,7 @@ snmpv3_build(u_char ** pkt, size_t * pkt_len, size_t * offset, DEBUGDUMPSECTION("send", "SNMPv3 Message"); #ifdef NETSNMP_USE_REVERSE_ASNENCODING - if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REVERSE_ENCODE)) { + if (!(pdu->flags & UCD_MSG_FLAG_FORWARD_ENCODE)) { ret = snmpv3_packet_realloc_rbuild(pkt, pkt_len, offset, session, pdu, NULL, 0); } else { @@ -2251,8 +2380,10 @@ snmpv3_header_build(netsnmp_session * session, netsnmp_pdu *pdu, /* * msgMaxSize */ - max_size = session->rcvMsgMaxSize; - DEBUGDUMPHEADER("send", "msgMaxSize"); + max_size = netsnmp_max_send_msg_size(); + if (session->rcvMsgMaxSize < max_size) + max_size = session->rcvMsgMaxSize; + DEBUGDUMPHEADER("send:msgMaxSize1", "msgMaxSize"); cp = asn_build_int(cp, out_length, (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER), &max_size, @@ -2354,8 +2485,10 @@ snmpv3_header_realloc_rbuild(u_char ** pkt, size_t * pkt_len, /* * msgMaxSize. */ - max_size = session->rcvMsgMaxSize; - DEBUGDUMPHEADER("send", "msgMaxSize"); + max_size = netsnmp_max_send_msg_size(); + if (session->rcvMsgMaxSize < max_size) + max_size = session->rcvMsgMaxSize; + DEBUGDUMPHEADER("send:msgMaxSize2", "msgMaxSize"); rc = asn_realloc_rbuild_int(pkt, pkt_len, offset, 1, (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER), &max_size, @@ -2627,7 +2760,7 @@ snmpv3_packet_build(netsnmp_session * session, netsnmp_pdu *pdu, /* * build a scopedPDU structure into spdu_buf */ - spdu_buf_len = SNMP_MAX_MSG_SIZE; + spdu_buf_len = sizeof(spdu_buf); DEBUGDUMPSECTION("send", "ScopedPdu"); cp = snmpv3_scopedPDU_header_build(pdu, spdu_buf, &spdu_buf_len, &spdu_hdr_e); @@ -2639,6 +2772,11 @@ snmpv3_packet_build(netsnmp_session * session, netsnmp_pdu *pdu, */ DEBUGPRINTPDUTYPE("send", ((pdu_data) ? *pdu_data : 0x00)); if (pdu_data) { + if (cp + pdu_data_len > spdu_buf + sizeof(spdu_buf)) { + snmp_log(LOG_ERR, "%s: PDU too big (%" NETSNMP_PRIz "d > %" NETSNMP_PRIz "d)\n", + NETSNMP_FUNCTION, pdu_data_len, sizeof(spdu_buf)); + return -1; + } memcpy(cp, pdu_data, pdu_data_len); cp += pdu_data_len; } else { @@ -2652,7 +2790,7 @@ snmpv3_packet_build(netsnmp_session * session, netsnmp_pdu *pdu, * re-encode the actual ASN.1 length of the scopedPdu */ spdu_len = cp - spdu_hdr_e; /* length of scopedPdu minus ASN.1 headers */ - spdu_buf_len = SNMP_MAX_MSG_SIZE; + spdu_buf_len = sizeof(spdu_buf); if (asn_build_sequence(spdu_buf, &spdu_buf_len, (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), spdu_len) == NULL) @@ -2665,7 +2803,7 @@ snmpv3_packet_build(netsnmp_session * session, netsnmp_pdu *pdu, * message - the entire message to transmitted on the wire is returned */ cp = NULL; - *out_length = SNMP_MAX_MSG_SIZE; + *out_length = sizeof(spdu_buf); DEBUGDUMPSECTION("send", "SM msgSecurityParameters"); sptr = find_sec_mod(pdu->securityModel); if (sptr && sptr->encode_forward) { @@ -2723,14 +2861,29 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, size_t start_offset = *offset; long version; int rc = 0; + size_t length; #endif /* support for community based SNMP */ - + u_char *cp; - size_t length; + + if (NETSNMP_RUNTIME_PROTOCOL_SKIP(pdu->version)) { + DEBUGMSGTL(("snmp_send", "build packet (version 0x%02x disabled)\n", + (u_int)pdu->version)); + session->s_snmp_errno = SNMPERR_BAD_VERSION; + return -1; + } session->s_snmp_errno = 0; session->s_errno = 0; +#ifdef NETSNMP_USE_REVERSE_ASNENCODING + if ((pdu->flags & UCD_MSG_FLAG_BULK_TOOBIG) || + (0 == netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_REVERSE_ENCODE))) { + pdu->flags |= UCD_MSG_FLAG_FORWARD_ENCODE; + } +#endif /* NETSNMP_USE_REVERSE_ASNENCODING */ + if (pdu->version == SNMP_VERSION_3) { return snmpv3_build(pkt, pkt_len, offset, session, pdu); } @@ -2738,12 +2891,11 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, switch (pdu->command) { case SNMP_MSG_RESPONSE: netsnmp_assert(0 == (pdu->flags & UCD_MSG_FLAG_EXPECT_RESPONSE)); - /* - * Fallthrough - */ #ifndef NETSNMP_NOTIFY_ONLY + /* FALL THROUGH */ case SNMP_MSG_GET: case SNMP_MSG_GETNEXT: + /* FALL THROUGH */ #endif /* ! NETSNMP_NOTIFY_ONLY */ #ifndef NETSNMP_NO_WRITE_SUPPORT case SNMP_MSG_SET: @@ -2763,9 +2915,7 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, case SNMP_MSG_TRAP2: netsnmp_assert(0 == (pdu->flags & UCD_MSG_FLAG_EXPECT_RESPONSE)); - /* - * Fallthrough - */ + /* FALL THROUGH */ case SNMP_MSG_INFORM: #ifndef NETSNMP_DISABLE_SNMPV1 /* @@ -2846,7 +2996,9 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, /* * save length */ +#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) length = *pkt_len; +#endif /* * setup administrative fields based on version @@ -2906,7 +3058,7 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, DEBUGMSGTL(("snmp_send", "Building SNMPv%ld message...\n", (1 + pdu->version))); #ifdef NETSNMP_USE_REVERSE_ASNENCODING - if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REVERSE_ENCODE)) { + if (!(pdu->flags & UCD_MSG_FLAG_FORWARD_ENCODE)) { DEBUGPRINTPDUTYPE("send", pdu->command); rc = snmp_pdu_realloc_rbuild(pkt, pkt_len, offset, pdu); if (rc == 0) { @@ -3067,11 +3219,22 @@ _snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, return 0; } +/** + * Serialize a PDU into ASN format. + * @param pkt [out] Serialized PDU. + * @param pkt_len [out] Size of pkt. + * @param offset [out] Number of bytes written into *pkt. + * @param pss [in] Session pointer. + * @param pdu [in] PDU to serialize. + * + * @returns 0 upon success; -1 upon failure. + */ int snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, netsnmp_session * pss, netsnmp_pdu *pdu) { int rc; + rc = _snmp_build(pkt, pkt_len, offset, pss, pdu); if (rc) { if (!pss->s_snmp_errno) { @@ -3090,9 +3253,9 @@ snmp_build(u_char ** pkt, size_t * pkt_len, size_t * offset, u_char * snmp_pdu_build(netsnmp_pdu *pdu, u_char * cp, size_t * out_length) { - u_char *h1, *h1e, *h2, *h2e; - netsnmp_variable_list *vp; - size_t length; + u_char *h1, *h1e, *h2, *h2e, *save_ptr; + netsnmp_variable_list *vp, *save_vp = NULL; + size_t length, save_length; length = *out_length; /* @@ -3106,7 +3269,7 @@ snmp_pdu_build(netsnmp_pdu *pdu, u_char * cp, size_t * out_length) h1e = cp; /* - * store fields in the PDU preceeding the variable-bindings sequence + * store fields in the PDU preceding the variable-bindings sequence */ if (pdu->command != SNMP_MSG_TRAP) { /* @@ -3233,16 +3396,54 @@ snmp_pdu_build(netsnmp_pdu *pdu, u_char * cp, size_t * out_length) */ DEBUGDUMPSECTION("send", "VarBindList"); for (vp = pdu->variables; vp; vp = vp->next_variable) { + /* + * if estimated getbulk response size exceeded packet max size, + * processing was stopped before bulk cache was filled and type + * was set to ASN_PRIV_STOP, indicating that the rest of the varbinds + * in the cache are empty and we can stop encoding them. + */ + if (ASN_PRIV_STOP == vp->type) + break; + + /* + * save current ptr and length so that if we exceed the packet length + * encoding this varbind and this is a bulk response, we can drop + * the failed varbind (and any that follow it) and continue encoding + * the (shorter) bulk response. + */ + save_ptr = cp; + save_length = *out_length; + DEBUGDUMPSECTION("send", "VarBind"); cp = snmp_build_var_op(cp, vp->name, &vp->name_length, vp->type, vp->val_len, (u_char *) vp->val.string, out_length); DEBUGINDENTLESS(); - if (cp == NULL) - return NULL; + if (cp == NULL) { + if (save_vp && (pdu->flags & UCD_MSG_FLAG_BULK_TOOBIG)) { + DEBUGDUMPSECTION("send", + "VarBind would exceed packet size; dropped"); + cp = save_ptr; + *out_length = save_length; + break; + } else + return NULL; + } + save_vp = vp; } DEBUGINDENTLESS(); + /** did we run out of room? (should only happen for bulk reponses) */ + if (vp && save_vp) { + save_vp->next_variable = NULL; /* truncate variable list */ + /** count remaining varbinds in list, then free them */ + save_vp = vp; + for(save_length = 0; save_vp; save_vp = save_vp->next_variable) + ++save_length; + DEBUGMSGTL(("send", "trimmed %" NETSNMP_PRIz "d variables\n", save_length)); + snmp_free_varbind(vp); + } + /* * insert actual length of variable-bindings sequence */ @@ -3277,6 +3478,14 @@ snmp_pdu_realloc_rbuild(u_char ** pkt, size_t * pkt_len, size_t * offset, DEBUGMSGTL(("snmp_pdu_realloc_rbuild", "starting\n")); for (vp = pdu->variables, i = VPCACHE_SIZE - 1; vp; vp = vp->next_variable, i--) { + /* + * if estimated getbulk response size exceeded packet max size, + * processing was stopped before bulk cache was filled and type + * was set to ASN_PRIV_STOP, indicating that the rest of the varbinds + * in the cache are empty and we can stop encoding them. + */ + if (ASN_PRIV_STOP == vp->type) + break; if (i < 0) { wrapped = notdone = 1; i = VPCACHE_SIZE - 1; @@ -3351,7 +3560,7 @@ snmp_pdu_realloc_rbuild(u_char ** pkt, size_t * pkt_len, size_t * offset, *offset - start_offset); /* - * Store fields in the PDU preceeding the variable-bindings sequence. + * Store fields in the PDU preceding the variable-bindings sequence. */ if (pdu->command != SNMP_MSG_TRAP) { /* @@ -3510,7 +3719,7 @@ snmpv3_parse(netsnmp_pdu *pdu, u_char ** after_header, netsnmp_session * sess) { u_char type, msg_flags; - long ver, msg_max_size, msg_sec_model; + long ver, msg_sec_model; size_t max_size_response; u_char tmp_buf[SNMP_MAX_MSG_SIZE]; size_t tmp_buf_len; @@ -3600,7 +3809,7 @@ snmpv3_parse(netsnmp_pdu *pdu, * field is out of bounds). */ - if (pdu->msgid < 0 || pdu->msgid > 0x7fffffff) { + if (pdu->msgid < 0 || pdu->msgid > SNMP_MAX_PACKET_LEN) { snmp_log(LOG_ERR, "Received bad msgID (%ld %s %s).\n", pdu->msgid, (pdu->msgid < 0) ? "<" : ">", (pdu->msgid < 0) ? "0" : "2^31 - 1"); @@ -3612,9 +3821,9 @@ snmpv3_parse(netsnmp_pdu *pdu, /* * msgMaxSize */ - DEBUGDUMPHEADER("recv", "msgMaxSize"); - data = asn_parse_int(data, length, &type, &msg_max_size, - sizeof(msg_max_size)); + DEBUGDUMPHEADER("recv:msgMaxSize", "msgMaxSize"); + data = asn_parse_int(data, length, &type, &pdu->msgMaxSize, + sizeof(pdu->msgMaxSize)); DEBUGINDENTLESS(); if (data == NULL || type != ASN_INTEGER) { ERROR_MSG("error parsing msgMaxSize"); @@ -3629,29 +3838,30 @@ snmpv3_parse(netsnmp_pdu *pdu, * 2572, para. 7.2, section 2 -- note that a bad msgMaxSize means that the * received message is NOT a serialiization of an SNMPv3Message, since the * msgMaxSize field is out of bounds). - * - * Note we store the msgMaxSize on a per-session basis which also seems - * reasonable; it could vary from PDU to PDU but that would be strange - * (also since we deal with a PDU at a time, it wouldn't make any - * difference to our responses, if any). */ - if (msg_max_size < 484) { + if (pdu->msgMaxSize < SNMP_MIN_MAX_LEN) { snmp_log(LOG_ERR, "Received bad msgMaxSize (%lu < 484).\n", - msg_max_size); + pdu->msgMaxSize); snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); DEBUGINDENTADD(-4); return SNMPERR_ASN_PARSE_ERR; - } else if (msg_max_size > 0x7fffffff) { + } else if (pdu->msgMaxSize > SNMP_MAX_PACKET_LEN) { snmp_log(LOG_ERR, "Received bad msgMaxSize (%lu > 2^31 - 1).\n", - msg_max_size); + pdu->msgMaxSize); snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); DEBUGINDENTADD(-4); return SNMPERR_ASN_PARSE_ERR; } else { - DEBUGMSGTL(("snmpv3_parse", "msgMaxSize %lu received\n", - msg_max_size)); - sess->sndMsgMaxSize = msg_max_size; + DEBUGMSGTL(("snmpv3_parse:msgMaxSize", "msgMaxSize %lu received\n", + pdu->msgMaxSize)); + /** don't increase max msg size if we've already got one */ + if (sess->sndMsgMaxSize < pdu->msgMaxSize) { + DEBUGMSGTL(("snmpv3_parse:msgMaxSize", + "msgMaxSize %" NETSNMP_PRIz "d greater than session max %ld; reducing\n", + sess->sndMsgMaxSize, pdu->msgMaxSize)); + pdu->msgMaxSize = sess->sndMsgMaxSize; + } } /* @@ -3754,7 +3964,7 @@ snmpv3_parse(netsnmp_pdu *pdu, if (sptr->decode) { struct snmp_secmod_incoming_params parms; parms.msgProcModel = pdu->msgParseModel; - parms.maxMsgSize = msg_max_size; + parms.maxMsgSize = pdu->msgMaxSize; parms.secParams = sec_params; parms.secModel = msg_sec_model; parms.secLevel = pdu->securityLevel; @@ -3807,6 +4017,9 @@ snmpv3_parse(netsnmp_pdu *pdu, DEBUGDUMPSECTION("recv", "ScopedPDU"); data = snmpv3_scopedPDU_parse(pdu, cp, length); if (data == NULL) { + snmp_log(LOG_WARNING, "security service %ld error parsing ScopedPDU\n", + msg_sec_model); + ERROR_MSG("error parsing PDU"); snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); DEBUGINDENTADD(-4); SNMP_FREE(mallocbuf); @@ -3830,6 +4043,8 @@ snmpv3_parse(netsnmp_pdu *pdu, } if (ret != SNMPERR_SUCCESS) { + snmp_log(LOG_WARNING, "security service %ld error parsing ScopedPDU\n", + msg_sec_model); ERROR_MSG("error parsing PDU"); snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); SNMP_FREE(mallocbuf); @@ -3840,6 +4055,31 @@ snmpv3_parse(netsnmp_pdu *pdu, return SNMPERR_SUCCESS; } /* end snmpv3_parse() */ +static void +free_securityStateRef(netsnmp_pdu* pdu) +{ + struct snmp_secmod_def *sptr; + + if (!pdu->securityStateRef) + return; + + sptr = find_sec_mod(pdu->securityModel); + if (sptr) { + if (sptr->pdu_free_state_ref) { + (*sptr->pdu_free_state_ref) (pdu->securityStateRef); + } else { + snmp_log(LOG_ERR, + "Security Model %d can't free state references\n", + pdu->securityModel); + } + } else { + snmp_log(LOG_ERR, + "Can't find security model to free ptr: %d\n", + pdu->securityModel); + } + pdu->securityStateRef = NULL; +} + #define ERROR_STAT_LENGTH 11 int @@ -3860,37 +4100,50 @@ snmpv3_make_report(netsnmp_pdu *pdu, int error) { 1, 3, 6, 1, 6, 3, 15, 1, 1, 6, 0 }; oid *err_var; int err_var_len; +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS int stat_ind; - struct snmp_secmod_def *sptr; +#endif switch (error) { case SNMPERR_USM_UNKNOWNENGINEID: +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS stat_ind = STAT_USMSTATSUNKNOWNENGINEIDS; +#endif /* !NETSNMP_FEATURE_REMOVE_STATISTICS */ err_var = unknownEngineID; err_var_len = ERROR_STAT_LENGTH; break; case SNMPERR_USM_UNKNOWNSECURITYNAME: +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS stat_ind = STAT_USMSTATSUNKNOWNUSERNAMES; +#endif /* !NETSNMP_FEATURE_REMOVE_STATISTICS */ err_var = unknownUserName; err_var_len = ERROR_STAT_LENGTH; break; case SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL: +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS stat_ind = STAT_USMSTATSUNSUPPORTEDSECLEVELS; +#endif /* !NETSNMP_FEATURE_REMOVE_STATISTICS */ err_var = unknownSecurityLevel; err_var_len = ERROR_STAT_LENGTH; break; case SNMPERR_USM_AUTHENTICATIONFAILURE: +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS stat_ind = STAT_USMSTATSWRONGDIGESTS; +#endif /* !NETSNMP_FEATURE_REMOVE_STATISTICS */ err_var = wrongDigest; err_var_len = ERROR_STAT_LENGTH; break; case SNMPERR_USM_NOTINTIMEWINDOW: +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS stat_ind = STAT_USMSTATSNOTINTIMEWINDOWS; +#endif /* !NETSNMP_FEATURE_REMOVE_STATISTICS */ err_var = notInTimeWindow; err_var_len = ERROR_STAT_LENGTH; break; case SNMPERR_USM_DECRYPTIONERROR: +#ifndef NETSNMP_FEATURE_REMOVE_STATISTICS stat_ind = STAT_USMSTATSDECRYPTIONERRORS; +#endif /* !NETSNMP_FEATURE_REMOVE_STATISTICS */ err_var = decryptionError; err_var_len = ERROR_STAT_LENGTH; break; @@ -3921,23 +4174,7 @@ snmpv3_make_report(netsnmp_pdu *pdu, int error) * FIX - yes they should but USM needs to follow new EoP to determine * which cached values to use */ - if (pdu->securityStateRef) { - sptr = find_sec_mod(pdu->securityModel); - if (sptr) { - if (sptr->pdu_free_state_ref) { - (*sptr->pdu_free_state_ref) (pdu->securityStateRef); - } else { - snmp_log(LOG_ERR, - "Security Model %d can't free state references\n", - pdu->securityModel); - } - } else { - snmp_log(LOG_ERR, - "Can't find security model to free ptr: %d\n", - pdu->securityModel); - } - pdu->securityStateRef = NULL; - } + free_securityStateRef(pdu); if (error == SNMPERR_USM_NOTINTIMEWINDOW) { pdu->securityLevel = SNMP_SEC_LEVEL_AUTHNOPRIV; @@ -4078,13 +4315,14 @@ _snmp_parse(void *sessp, } switch (pdu->version) { +#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) #ifndef NETSNMP_DISABLE_SNMPV1 case SNMP_VERSION_1: #endif #ifndef NETSNMP_DISABLE_SNMPV2C case SNMP_VERSION_2c: #endif -#if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) + NETSNMP_RUNTIME_PROTOCOL_CHECK_V1V2(pdu->version,unsupported_version); DEBUGMSGTL(("snmp_api", "Parsing SNMPv%ld message...\n", (1 + pdu->version))); @@ -4155,6 +4393,7 @@ _snmp_parse(void *sessp, #endif /* support for community based SNMP */ case SNMP_VERSION_3: + NETSNMP_RUNTIME_PROTOCOL_CHECK_V3(SNMP_VERSION_3,unsupported_version); result = snmpv3_parse(pdu, data, &length, NULL, session); DEBUGMSGTL(("snmp_parse", "Parsed SNMPv3 message (secName:%s, secLevel:%s): %s\n", @@ -4177,12 +4416,7 @@ _snmp_parse(void *sessp, result, pdu); } } - if (pdu->securityStateRef != NULL) { - if (secmod && secmod->pdu_free_state_ref) { - secmod->pdu_free_state_ref(pdu->securityStateRef); - pdu->securityStateRef = NULL; - } - } + free_securityStateRef(pdu); } /* Implement RFC5343 here for two reasons: @@ -4304,6 +4538,8 @@ _snmp_parse(void *sessp, snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); session->s_snmp_errno = SNMPERR_BAD_VERSION; break; + + unsupported_version: /* goto label */ case SNMP_VERSION_sec: case SNMP_VERSION_2u: case SNMP_VERSION_2star: @@ -4326,14 +4562,24 @@ _snmp_parse(void *sessp, return result; } -static int -snmp_parse(void *sessp, +/** + * Parse a PDU. + * @param slp [in] Session pointer (struct session_list). + * @param pss [in] Session pointer (netsnmp_session). + * @param pdu [out] Parsed PDU. + * @param data [in] PDU to parse. + * @param length [in] Length of data. + * + * @returns 0 upon success; -1 upon failure. + */ +int +snmp_parse(struct session_list *slp, netsnmp_session * pss, netsnmp_pdu *pdu, u_char * data, size_t length) { int rc; - rc = _snmp_parse(sessp, pss, pdu, data, length); + rc = _snmp_parse(slp, pss, pdu, data, length); if (rc) { if (!pss->s_snmp_errno) { pss->s_snmp_errno = SNMPERR_BAD_PARSE; @@ -4350,10 +4596,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) u_char type; u_char msg_type; u_char *var_val; - int badtype = 0; size_t len; size_t four; - netsnmp_variable_list *vp = NULL; + netsnmp_variable_list *vp = NULL, *vplast = NULL; oid objid[MAX_OID_LEN]; u_char *p; @@ -4368,7 +4613,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) pdu->flags &= (~UCD_MSG_FLAG_RESPONSE_PDU); /* - * get the fields in the PDU preceeding the variable-bindings sequence + * get the fields in the PDU preceding the variable-bindings sequence */ switch (pdu->command) { case SNMP_MSG_TRAP: @@ -4427,10 +4672,10 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) case SNMP_MSG_RESPONSE: case SNMP_MSG_REPORT: pdu->flags |= UCD_MSG_FLAG_RESPONSE_PDU; - /* - * fallthrough - */ + /* FALL THROUGH */ + case SNMP_MSG_TRAP2: + case SNMP_MSG_INFORM: #ifndef NETSNMP_NOTIFY_ONLY case SNMP_MSG_GET: case SNMP_MSG_GETNEXT: @@ -4439,8 +4684,6 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) #ifndef NETSNMP_NO_WRITE_SUPPORT case SNMP_MSG_SET: #endif /* !NETSNMP_NO_WRITE_SUPPORT */ - case SNMP_MSG_TRAP2: - case SNMP_MSG_INFORM: /* * PDU is not an SNMPv1 TRAP */ @@ -4493,40 +4736,26 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) (ASN_SEQUENCE | ASN_CONSTRUCTOR), "varbinds"); if (data == NULL) - return -1; + goto fail; /* * get each varBind sequence */ while ((int) *length > 0) { - netsnmp_variable_list *vptemp; - vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp)); - if (NULL == vptemp) { - return -1; - } - if (NULL == vp) { - pdu->variables = vptemp; - } else { - vp->next_variable = vptemp; - } - vp = vptemp; + vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list); + if (NULL == vp) + goto fail; - vp->next_variable = NULL; - vp->val.string = NULL; vp->name_length = MAX_OID_LEN; - vp->name = NULL; - vp->index = 0; - vp->data = NULL; - vp->dataFreeHook = NULL; DEBUGDUMPSECTION("recv", "VarBind"); data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type, &vp->val_len, &var_val, length); if (data == NULL) - return -1; + goto fail; if (snmp_set_var_objid(vp, objid, vp->name_length)) - return -1; + goto fail; - len = MAX_PACKET_LENGTH; + len = SNMP_MAX_PACKET_LEN; DEBUGDUMPHEADER("recv", "Value"); switch ((short) vp->type) { case ASN_INTEGER: @@ -4536,7 +4765,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) (long *) vp->val.integer, sizeof(*vp->val.integer)); if (!p) - return -1; + goto fail; break; case ASN_COUNTER: case ASN_GAUGE: @@ -4548,7 +4777,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) (u_long *) vp->val.integer, vp->val_len); if (!p) - return -1; + goto fail; break; #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES case ASN_OPAQUE_COUNTER64: @@ -4561,7 +4790,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) (struct counter64 *) vp->val. counter64, vp->val_len); if (!p) - return -1; + goto fail; break; #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES case ASN_OPAQUE_FLOAT: @@ -4570,7 +4799,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) p = asn_parse_float(var_val, &len, &vp->type, vp->val.floatVal, vp->val_len); if (!p) - return -1; + goto fail; break; case ASN_OPAQUE_DOUBLE: vp->val.doubleVal = (double *) vp->buf; @@ -4578,7 +4807,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) p = asn_parse_double(var_val, &len, &vp->type, vp->val.doubleVal, vp->val_len); if (!p) - return -1; + goto fail; break; case ASN_OPAQUE_I64: vp->val.counter64 = (struct counter64 *) vp->buf; @@ -4588,12 +4817,12 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) sizeof(*vp->val.counter64)); if (!p) - return -1; + goto fail; break; #endif /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */ case ASN_IPADDRESS: if (vp->val_len != 4) - return -1; + goto fail; /* fallthrough */ case ASN_OCTET_STR: case ASN_OPAQUE: @@ -4604,22 +4833,22 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) vp->val.string = (u_char *) malloc(vp->val_len); } if (vp->val.string == NULL) { - return -1; + goto fail; } p = asn_parse_string(var_val, &len, &vp->type, vp->val.string, &vp->val_len); if (!p) - return -1; + goto fail; break; case ASN_OBJECT_ID: vp->val_len = MAX_OID_LEN; p = asn_parse_objid(var_val, &len, &vp->type, objid, &vp->val_len); if (!p) - return -1; + goto fail; vp->val_len *= sizeof(oid); vp->val.objid = (oid *) malloc(vp->val_len); if (vp->val.objid == NULL) { - return -1; + goto fail; } memmove(vp->val.objid, objid, vp->val_len); break; @@ -4631,21 +4860,40 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) case ASN_BIT_STR: vp->val.bitstring = (u_char *) malloc(vp->val_len); if (vp->val.bitstring == NULL) { - return -1; + goto fail; } p = asn_parse_bitstring(var_val, &len, &vp->type, vp->val.bitstring, &vp->val_len); if (!p) - return -1; + goto fail; break; default: snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type); - badtype = -1; + goto fail; break; } DEBUGINDENTADD(-4); + + if (NULL == vplast) { + pdu->variables = vp; + } else { + vplast->next_variable = vp; + } + vplast = vp; + vp = NULL; + } + return 0; + + fail: + { + const char *errstr = snmp_api_errstring(SNMPERR_SUCCESS); + DEBUGMSGTL(("recv", "error while parsing VarBindList:%s\n", errstr)); } - return badtype; + /** if we were parsing a var, remove it from the pdu and free it */ + if (vp) + snmp_free_var(vp); + + return -1; } /* @@ -4724,78 +4972,77 @@ snmpv3_scopedPDU_parse(netsnmp_pdu *pdu, u_char * cp, size_t * length) return data; } -/* - * These functions send PDUs using an active session: - * snmp_send - traditional API, no callback - * snmp_async_send - traditional API, with callback - * snmp_sess_send - single session API, no callback - * snmp_sess_async_send - single session API, with callback + +/* =========================================================================== * - * Call snmp_build to create a serialized packet (the pdu). - * If necessary, set some of the pdu data from the - * session defaults. - * If there is an expected response for this PDU, - * queue a corresponding request on the list - * of outstanding requests for this session, - * and store the callback vectors in the request. - * - * Send the pdu to the target identified by this session. - * Return on success: - * The request id of the pdu is returned, and the pdu is freed. - * Return on failure: - * Zero (0) is returned. - * The caller must call snmp_free_pdu if 0 is returned. + * build pdu packet */ int -snmp_send(netsnmp_session * session, netsnmp_pdu *pdu) +netsnmp_build_packet(struct snmp_internal_session *isp, netsnmp_session *sp, + netsnmp_pdu *pdu, u_char **pktbuf_p, + size_t *pktbuf_len_p, u_char **pkt_p, size_t *len_p) { - return snmp_async_send(session, pdu, NULL, NULL); -} + size_t offset = 0; + int result; + + if (isp && isp->hook_realloc_build) { + result = isp->hook_realloc_build(sp, pdu, pktbuf_p, pktbuf_len_p, + &offset); + + *pkt_p = *pktbuf_p; + *len_p = offset; + } else if (isp && isp->hook_build) { + *pkt_p = *pktbuf_p; + *len_p = *pktbuf_len_p; + result = isp->hook_build(sp, pdu, *pktbuf_p, len_p); + } else { +#ifdef NETSNMP_USE_REVERSE_ASNENCODING + if (!(pdu->flags & UCD_MSG_FLAG_FORWARD_ENCODE)) { + result = snmp_build(pktbuf_p, pktbuf_len_p, &offset, sp, pdu); + *pkt_p = *pktbuf_p + *pktbuf_len_p - offset; + *len_p = offset; + } else { +#endif + *pkt_p = *pktbuf_p; + *len_p = *pktbuf_len_p; + result = snmp_build(pktbuf_p, len_p, &offset, sp, pdu); +#ifdef NETSNMP_USE_REVERSE_ASNENCODING + } +#endif + } -int -snmp_sess_send(void *sessp, netsnmp_pdu *pdu) -{ - return snmp_sess_async_send(sessp, pdu, NULL, NULL); + return result; } int -snmp_async_send(netsnmp_session * session, - netsnmp_pdu *pdu, snmp_callback callback, void *cb_data) -{ - void *sessp = snmp_sess_pointer(session); - return snmp_sess_async_send(sessp, pdu, callback, cb_data); -} - -static int -_sess_async_send(void *sessp, - netsnmp_pdu *pdu, snmp_callback callback, void *cb_data) +_build_initial_pdu_packet(struct session_list *slp, netsnmp_pdu *pdu, int bulk) { - struct session_list *slp = (struct session_list *) sessp; netsnmp_session *session; struct snmp_internal_session *isp; netsnmp_transport *transport = NULL; u_char *pktbuf = NULL, *packet = NULL; - size_t pktbuf_len = 0, offset = 0, length = 0; - int result; - long reqid; + size_t pktbuf_len = 0, offset = 0, length = 0, orig_length = 0; + int result, orig_count = 0, curr_count = 0; if (slp == NULL) { - return 0; - } else { - session = slp->session; - isp = slp->internal; - transport = slp->transport; - if (!session || !isp || !transport) { - DEBUGMSGTL(("sess_async_send", "send fail: closing...\n")); - return 0; - } + return SNMPERR_GENERR; + } + session = slp->session; + + isp = slp->internal; + transport = slp->transport; + if (!session || !isp || !transport) { + DEBUGMSGTL(("sess_async_send", "send fail: closing...\n")); + return SNMPERR_GENERR; } if (pdu == NULL) { session->s_snmp_errno = SNMPERR_NULL_PDU; - return 0; + return SNMPERR_GENERR; } + SNMP_FREE(isp->obuf); /* should already be NULL */ + session->s_snmp_errno = 0; session->s_errno = 0; @@ -4805,7 +5052,7 @@ _sess_async_send(void *sessp, if (pdu->version == SNMP_DEFAULT_VERSION) { if (session->version == SNMP_DEFAULT_VERSION) { session->s_snmp_errno = SNMPERR_BAD_VERSION; - return 0; + return SNMPERR_GENERR; } pdu->version = session->version; } else if (session->version == SNMP_DEFAULT_VERSION) { @@ -4817,7 +5064,12 @@ _sess_async_send(void *sessp, * ENHANCE: we should support multi-lingual sessions */ session->s_snmp_errno = SNMPERR_BAD_VERSION; - return 0; + return SNMPERR_GENERR; + } + if (NETSNMP_RUNTIME_PROTOCOL_SKIP(pdu->version)) { + DEBUGMSGTL(("sess_async_send", "version disabled at runtime\n")); + session->s_snmp_errno = SNMPERR_BAD_VERSION; + return SNMPERR_GENERR; } /* @@ -4853,16 +5105,33 @@ _sess_async_send(void *sessp, return 0; /* s_snmp_errno already set */ } - if ((pktbuf = (u_char *)malloc(2048)) == NULL) { + /* + * determine max packet size + */ + if (pdu->msgMaxSize == 0) { + pdu->msgMaxSize = netsnmp_max_send_msg_size(); + if (pdu->msgMaxSize > transport->msgMaxSize) + pdu->msgMaxSize = transport->msgMaxSize; + if (pdu->msgMaxSize > session->sndMsgMaxSize) + pdu->msgMaxSize = session->sndMsgMaxSize; + DEBUGMSGTL(("sess_async_send", "max PDU size: %ld\n", + pdu->msgMaxSize)); + } + netsnmp_assert(pdu->msgMaxSize > 0); + + /* + * allocate initial packet buffer. Buffer will be grown as needed + * while building the packet. + */ + pktbuf_len = SNMP_MIN_MAX_LEN; + if ((pktbuf = (u_char *)malloc(pktbuf_len)) == NULL) { DEBUGMSGTL(("sess_async_send", "couldn't malloc initial packet buffer\n")); session->s_snmp_errno = SNMPERR_MALLOC; - return 0; - } else { - pktbuf_len = 2048; + return SNMPERR_MALLOC; } -#if TEMPORARILY_DISABLED +#ifdef TEMPORARILY_DISABLED /* * NULL variable are allowed in certain PDU types. * In particular, SNMPv3 engineID probes are of this form. @@ -4884,7 +5153,7 @@ _sess_async_send(void *sessp, case SNMP_MSG_REPORT: case SNMP_MSG_INFORM: session->s_snmp_errno = snmp_errno = SNMPERR_NO_VARS; - return 0; + return SNMPERR_NO_VARS; case SNMP_MSG_TRAP: break; } @@ -4893,66 +5162,196 @@ _sess_async_send(void *sessp, /* - * Build the message to send. + * Build the message to send. If a bulk response is too big, switch to + * forward encoding and set a flag to drop varbinds to make it fit. */ - if (isp->hook_realloc_build) { - result = isp->hook_realloc_build(session, pdu, - &pktbuf, &pktbuf_len, &offset); - packet = pktbuf; - length = offset; - } else if (isp->hook_build) { + do { packet = pktbuf; - length = pktbuf_len; - result = isp->hook_build(session, pdu, pktbuf, &length); - } else { -#ifdef NETSNMP_USE_REVERSE_ASNENCODING - if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REVERSE_ENCODE)) { - result = - snmp_build(&pktbuf, &pktbuf_len, &offset, session, pdu); - packet = pktbuf + pktbuf_len - offset; - length = offset; - } else { -#endif - packet = pktbuf; - length = pktbuf_len; - result = snmp_build(&pktbuf, &length, &offset, session, pdu); -#ifdef NETSNMP_USE_REVERSE_ASNENCODING + length = offset = 0; + result = netsnmp_build_packet(isp, session, pdu, &pktbuf, &pktbuf_len, + &packet, &length); + if (0 != result) + break; + + if (orig_count) { /* 2nd pass, see how many varbinds remain */ + curr_count = count_varbinds(pdu->variables); + DEBUGMSGTL(("sess_async_send", " vb count: %d -> %d\n", orig_count, + curr_count)); + DEBUGMSGTL(("sess_async_send", " pdu_len: %" NETSNMP_PRIz "d -> %" NETSNMP_PRIz "d (max %ld)\n", + orig_length, length, pdu->msgMaxSize)); } -#endif + + /** if length is less than max size, we're done (success). */ + if (length <= pdu->msgMaxSize) + break; + + DEBUGMSGTL(("sess_async_send", "length %" NETSNMP_PRIz "d exceeds maximum %ld\n", + length, pdu->msgMaxSize)); + + /** packet too big. if this is not a bulk request, we're done (err). */ + if (!bulk) { + session->s_snmp_errno = SNMPERR_TOO_LONG; + break; + } + + /** rebuild bulk response with truncation and fixed size */ + pdu->flags |= UCD_MSG_FLAG_FORWARD_ENCODE | UCD_MSG_FLAG_BULK_TOOBIG; + pktbuf_len = pdu->msgMaxSize; + + /** save original number of vabinds & length */ + if (0 == orig_count) { + curr_count = orig_count = count_varbinds(pdu->variables); + orig_length = length; + } + + } while(1); + + DEBUGMSGTL(("sess_async_send", + "final pktbuf_len after building packet %" NETSNMP_PRIz "u\n", + pktbuf_len)); + if (curr_count != orig_count) + DEBUGMSGTL(("sess_async_send", + "sending %d of %d varbinds (-%d) from bulk response\n", + curr_count, orig_count, orig_count - curr_count)); + + if (length > pdu->msgMaxSize) { + DEBUGMSGTL(("sess_async_send", + "length of packet (%" NETSNMP_PRIz "u) exceeded pdu maximum (%lu)\n", + length, pdu->msgMaxSize)); + netsnmp_assert(SNMPERR_TOO_LONG == session->s_snmp_errno); } - if (result < 0) { + if ((SNMPERR_TOO_LONG == session->s_snmp_errno) || (result < 0)) { DEBUGMSGTL(("sess_async_send", "encoding failure\n")); SNMP_FREE(pktbuf); - return 0; + return SNMPERR_GENERR; } - /* - * Make sure we don't send something that is bigger than the msgMaxSize - * specified in the received PDU. - */ + isp->obuf = pktbuf; + isp->obuf_size = pktbuf_len; + isp->opacket = packet; + isp->opacket_len = length; - if (pdu->version == SNMP_VERSION_3 && session->sndMsgMaxSize != 0 && length > session->sndMsgMaxSize) { - DEBUGMSGTL(("sess_async_send", - "length of packet (%lu) exceeds session maximum (%lu)\n", - (unsigned long)length, (unsigned long)session->sndMsgMaxSize)); - session->s_snmp_errno = SNMPERR_TOO_LONG; - SNMP_FREE(pktbuf); + return SNMPERR_SUCCESS; +} + +/* + * These functions send PDUs using an active session: + * snmp_send - traditional API, no callback + * snmp_async_send - traditional API, with callback + * snmp_sess_send - single session API, no callback + * snmp_sess_async_send - single session API, with callback + * + * Call snmp_build to create a serialized packet (the pdu). + * If necessary, set some of the pdu data from the + * session defaults. + * If there is an expected response for this PDU, + * queue a corresponding request on the list + * of outstanding requests for this session, + * and store the callback vectors in the request. + * + * Send the pdu to the target identified by this session. + * Return on success: + * The request id of the pdu is returned, and the pdu is freed. + * Return on failure: + * Zero (0) is returned. + * The caller must call snmp_free_pdu if 0 is returned. + */ +int +snmp_send(netsnmp_session * session, netsnmp_pdu *pdu) +{ + return snmp_async_send(session, pdu, NULL, NULL); +} + +int +snmp_sess_send(void *sessp, netsnmp_pdu *pdu) +{ + return snmp_sess_async_send(sessp, pdu, NULL, NULL); +} + +int +snmp_async_send(netsnmp_session * session, + netsnmp_pdu *pdu, snmp_callback callback, void *cb_data) +{ + void *sessp = snmp_sess_pointer(session); + return snmp_sess_async_send(sessp, pdu, callback, cb_data); +} + +/** + * Send a PDU asynchronously. + * + * @param[in] slp Session pointer. + * @param[in] pdu PDU to send. + * @param[in] callback Callback function called after processing of the PDU + * finished. This function is called if the PDU has not + * been sent or after a response has been received. Must + * not free @pdu. + * @param[in] cb_data Will be passed as fifth argument to @callback. + * + * @return If successful, returns the request id of @pdu and frees @pdu. + * If not successful, returns zero and expects the caller to free @pdu. + */ +static int +_sess_async_send(void *sessp, + netsnmp_pdu *pdu, snmp_callback callback, void *cb_data) +{ + struct session_list *slp = (struct session_list *) sessp; + netsnmp_session *session; + struct snmp_internal_session *isp; + netsnmp_transport *transport = NULL; + int result; + long reqid; + + if (slp == NULL || NULL == slp->session || NULL ==slp->internal || + NULL == slp->transport) { return 0; } - /* - * Check that the underlying transport is capable of sending a packet as - * large as length. - */ + session = slp->session; + isp = slp->internal; + transport = slp->transport; - if (transport->msgMaxSize != 0 && length > transport->msgMaxSize) { - DEBUGMSGTL(("sess_async_send", - "length of packet (%lu) exceeds transport maximum (%lu)\n", - (unsigned long)length, (unsigned long)transport->msgMaxSize)); - session->s_snmp_errno = SNMPERR_TOO_LONG; - SNMP_FREE(pktbuf); - return 0; + if (NULL == isp->opacket) { + result = _build_initial_pdu_packet(slp, pdu, 0); + if ((SNMPERR_SUCCESS != result) || (NULL == isp->opacket)) { + if (callback) { + switch (session->s_snmp_errno) { + /* + * some of these probably don't make sense here, but + * it's a rough first cut. + */ + case SNMPERR_BAD_ENG_ID: + case SNMPERR_BAD_SEC_LEVEL: + case SNMPERR_UNKNOWN_SEC_MODEL: + case SNMPERR_UNKNOWN_ENG_ID: + case SNMPERR_UNKNOWN_USER_NAME: + case SNMPERR_UNSUPPORTED_SEC_LEVEL: + case SNMPERR_AUTHENTICATION_FAILURE: + case SNMPERR_NOT_IN_TIME_WINDOW: + case SNMPERR_USM_GENERICERROR: + case SNMPERR_USM_UNKNOWNSECURITYNAME: + case SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL: + case SNMPERR_USM_ENCRYPTIONERROR: + case SNMPERR_USM_AUTHENTICATIONFAILURE: + case SNMPERR_USM_PARSEERROR: + case SNMPERR_USM_UNKNOWNENGINEID: + case SNMPERR_USM_NOTINTIMEWINDOW: + callback(NETSNMP_CALLBACK_OP_SEC_ERROR, session, + pdu->reqid, pdu, cb_data); + break; + case SNMPERR_TIMEOUT: /* engineID probe timed out */ + callback(NETSNMP_CALLBACK_OP_TIMED_OUT, session, + pdu->reqid, pdu, cb_data); + break; + default: + callback(NETSNMP_CALLBACK_OP_SEND_FAILED, session, + pdu->reqid, pdu, cb_data); + break; + } + } + /** no packet to send?? */ + return 0; + } } /* @@ -4960,21 +5359,38 @@ _sess_async_send(void *sessp, */ DEBUGMSGTL(("sess_process_packet", "sending message id#%ld reqid#%ld len %" - NETSNMP_PRIz "u\n", pdu->msgid, pdu->reqid, length)); - result = netsnmp_transport_send(transport, packet, length, + NETSNMP_PRIz "u\n", pdu->msgid, pdu->reqid, isp->opacket_len)); + result = netsnmp_transport_send(transport, isp->opacket, isp->opacket_len, &(pdu->transport_data), &(pdu->transport_data_length)); - SNMP_FREE(pktbuf); + SNMP_FREE(isp->obuf); + isp->opacket = NULL; /* opacket was in obuf, so no free needed */ + isp->opacket_len = 0; if (result < 0) { session->s_snmp_errno = SNMPERR_BAD_SENDTO; session->s_errno = errno; + if (callback) + callback(NETSNMP_CALLBACK_OP_SEND_FAILED, session, + pdu->reqid, pdu, cb_data); return 0; } reqid = pdu->reqid; + /* + * Bug 2387: 0 is a valid request id, so since reqid is used as a return + * code with 0 meaning an error, set reqid to 1 if there is no error. This + * does not affect the request id in the packet and fixes a memory leak + * for incoming PDUs with a request id of 0. This could cause some + * confusion if the caller is expecting the request id to match the + * return code, as the documentation states it will. Most example code + * just checks for non-zero, so hopefully this wont be an issue. + */ + if (0 == reqid && (SNMPERR_SUCCESS == session->s_snmp_errno)) + ++reqid; + /* * Add to pending requests list if we expect a response. */ @@ -5036,6 +5452,20 @@ _sess_async_send(void *sessp, return reqid; } +/** + * Send a PDU asynchronously. + * + * @param[in] sessp Session pointer. + * @param[in] pdu PDU to send. + * @param[in] callback Callback function called after processing of the PDU + * finished. This function is called if the PDU has not + * been sent or after a response has been received. Must + * not free @p pdu. + * @param[in] cb_data Will be passed as fifth argument to @p callback. + * + * @return If successful, returns the request id of @p pdu and frees @p pdu. + * If not successful, returns zero and expects the caller to free @p pdu. + */ int snmp_sess_async_send(void *sessp, netsnmp_pdu *pdu, @@ -5089,7 +5519,7 @@ void snmp_free_var(netsnmp_variable_list * var) { snmp_free_var_internals(var); - free((char *) var); + free(var); } void @@ -5114,40 +5544,21 @@ snmp_free_pdu(netsnmp_pdu *pdu) if (!pdu) return; - /* - * If the command field is empty, that probably indicates - * that this PDU structure has already been freed. - * Log a warning and return (rather than freeing things again) - * - * Note that this does not pick up dual-frees where the - * memory is set to random junk, which is probably more serious. - * - * rks: while this is a good idea, there are two problems. - * 1) agentx sets command to 0 in some cases - * 2) according to Wes, a bad decode of a v3 message could - * result in a 0 at this offset. - * so I'm commenting it out until a better solution is found. - * note that I'm leaving the memset, below.... - * - if (pdu->command == 0) { - snmp_log(LOG_WARNING, "snmp_free_pdu probably called twice\n"); - return; - } - */ + free_securityStateRef(pdu); + if ((sptr = find_sec_mod(pdu->securityModel)) != NULL && sptr->pdu_free != NULL) { (*sptr->pdu_free) (pdu); } snmp_free_varbind(pdu->variables); - SNMP_FREE(pdu->enterprise); - SNMP_FREE(pdu->community); - SNMP_FREE(pdu->contextEngineID); - SNMP_FREE(pdu->securityEngineID); - SNMP_FREE(pdu->contextName); - SNMP_FREE(pdu->securityName); - SNMP_FREE(pdu->transport_data); - memset(pdu, 0, sizeof(netsnmp_pdu)); - free((char *) pdu); + free(pdu->enterprise); + free(pdu->community); + free(pdu->contextEngineID); + free(pdu->securityEngineID); + free(pdu->contextName); + free(pdu->securityName); + free(pdu->transport_data); + free(pdu); } netsnmp_pdu * @@ -5174,35 +5585,67 @@ snmp_create_sess_pdu(netsnmp_transport *transport, void *opaque, /* - * This function processes a complete (according to asn_check_packet or the - * AgentX equivalent) packet, parsing it into a PDU and calling the relevant - * callbacks. On entry, packetptr points at the packet in the session's - * buffer and length is the length of the packet. + * This function parses a packet into a PDU */ - -static int -_sess_process_packet(void *sessp, netsnmp_session * sp, - struct snmp_internal_session *isp, - netsnmp_transport *transport, - void *opaque, int olength, - u_char * packetptr, int length) +static netsnmp_pdu * +_sess_process_packet_parse_pdu(void *sessp, netsnmp_session * sp, + struct snmp_internal_session *isp, + netsnmp_transport *transport, + void *opaque, int olength, + u_char * packetptr, int length) { - struct session_list *slp = (struct session_list *) sessp; netsnmp_pdu *pdu; - netsnmp_request_list *rp, *orp = NULL; - struct snmp_secmod_def *sptr; - int ret = 0, handled = 0; + int ret = 0; + int dump = 0, filter = 0; + + debug_indent_reset(); DEBUGMSGTL(("sess_process_packet", "session %p fd %d pkt %p length %d\n", sessp, transport->sock, packetptr, length)); - if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,NETSNMP_DS_LIB_DUMP_PACKET)) { + dump = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DUMP_PACKET); +#ifndef NETSNMP_FEATURE_REMOVE_FILTER_SOURCE + filter = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_FILTER_TYPE); +#endif + if (dump || filter) { + int filtered = 0; char *addrtxt = netsnmp_transport_peer_string(transport, opaque, olength); snmp_log(LOG_DEBUG, "\nReceived %d byte packet from %s\n", length, addrtxt); + + if (dump) + xdump(packetptr, length, ""); + +#ifndef NETSNMP_FEATURE_REMOVE_FILTER_SOURCE + if (filter) { + char *sourceaddr = NULL, *c = strchr(addrtxt, '['); + const char *dropstr = NULL; + if (c) { + sourceaddr = ++c; + c = strchr(sourceaddr, ']'); + if (c) + *c = 0; + filtered = netsnmp_transport_filter_check(sourceaddr); + } + if ((filter == -1) && filtered) + dropstr = "matched blocklist"; + else if ((filter == 1) && !filtered) + dropstr = "didn't match acceptlist"; + if (dropstr) { + DEBUGMSGTL(("sess_process_packet:filter", + "packet from %s %s\n", + sourceaddr ? sourceaddr : "UNKNOWN", dropstr)); + SNMP_FREE(opaque); + SNMP_FREE(addrtxt); + return NULL; + } + } +#endif + SNMP_FREE(addrtxt); - xdump(packetptr, length, ""); } /* @@ -5213,7 +5656,7 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, if (isp->hook_pre(sp, transport, opaque, olength) == 0) { DEBUGMSGTL(("sess_process_packet", "pre-parse fail\n")); SNMP_FREE(opaque); - return -1; + return NULL; } } @@ -5226,7 +5669,7 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, if (pdu == NULL) { snmp_log(LOG_ERR, "pdu failed to be created\n"); SNMP_FREE(opaque); - return -1; + return NULL; } /* if the transport was a magic tunnel, mark the PDU as having come @@ -5256,51 +5699,44 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, } if (ret != SNMP_ERR_NOERROR) { - /* - * Call the security model to free any securityStateRef supplied w/ msg. - */ - if (pdu->securityStateRef != NULL) { - sptr = find_sec_mod(pdu->securityModel); - if (sptr != NULL) { - if (sptr->pdu_free_state_ref != NULL) { - (*sptr->pdu_free_state_ref) (pdu->securityStateRef); - } else { - snmp_log(LOG_ERR, - "Security Model %d can't free state references\n", - pdu->securityModel); - } - } else { - snmp_log(LOG_ERR, - "Can't find security model to free ptr: %d\n", - pdu->securityModel); - } - pdu->securityStateRef = NULL; - } snmp_free_pdu(pdu); - return -1; + return NULL; } + return pdu; +} + +/* Remove request @rp from session @isp. @orp is the request before @rp. */ +static void +remove_request(struct snmp_internal_session *isp, + netsnmp_request_list *orp, netsnmp_request_list *rp) +{ + if (orp) + orp->next_request = rp->next_request; + else + isp->requests = rp->next_request; + if (isp->requestsEnd == rp) + isp->requestsEnd = orp; + snmp_free_pdu(rp->pdu); +} + +/* + * This function processes a PDU and calls the relevant callbacks. + */ +static int +_sess_process_packet_handle_pdu(void *sessp, netsnmp_session * sp, + struct snmp_internal_session *isp, + netsnmp_transport *transport, netsnmp_pdu *pdu) +{ + struct session_list *slp = (struct session_list *) sessp; + netsnmp_request_list *rp, *orp = NULL; + int handled = 0; + if (pdu->flags & UCD_MSG_FLAG_RESPONSE_PDU) { /* * Call USM to free any securityStateRef supplied with the message. */ - if (pdu->securityStateRef) { - sptr = find_sec_mod(pdu->securityModel); - if (sptr) { - if (sptr->pdu_free_state_ref) { - (*sptr->pdu_free_state_ref) (pdu->securityStateRef); - } else { - snmp_log(LOG_ERR, - "Security Model %d can't free state references\n", - pdu->securityModel); - } - } else { - snmp_log(LOG_ERR, - "Can't find security model to free ptr: %d\n", - pdu->securityModel); - } - pdu->securityStateRef = NULL; - } + free_securityStateRef(pdu); for (rp = isp->requests; rp; orp = rp, rp = rp->next_request) { snmp_callback callback; @@ -5356,20 +5792,22 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, * * inifinite resend */ if (rp->retries <= sp->retries) { - snmp_resend_request(slp, rp, TRUE); + snmp_resend_request(slp, orp, rp, TRUE); break; } else { /* We're done with retries, so no longer waiting for a response */ - if (magic) { - ((struct synch_state*)magic)->waiting = 0; + if (callback) { + callback(NETSNMP_CALLBACK_OP_SEC_ERROR, sp, + pdu->reqid, pdu, magic); } } } else { if (SNMPV3_IGNORE_UNAUTH_REPORTS) { break; - } else { /* Set the state to no longer be waiting, since we're done with retries */ - if (magic) { - ((struct synch_state*)magic)->waiting = 0; + } else { /* We're done with retries */ + if (callback) { + callback(NETSNMP_CALLBACK_OP_SEC_ERROR, sp, + pdu->reqid, pdu, magic); } } } @@ -5384,7 +5822,9 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, /* * TODO FIX: recover after message callback *? */ - return -1; + snmp_log(LOG_ERR, "malloc failed handling pdu\n"); + snmp_free_pdu(pdu); + return -1; } memcpy(sp->securityEngineID, pdu->securityEngineID, pdu->securityEngineIDLen); @@ -5397,6 +5837,8 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, /* * TODO FIX: recover after message callback *? */ + snmp_log(LOG_ERR, "malloc failed handling pdu\n"); + snmp_free_pdu(pdu); return -1; } memcpy(sp->contextEngineID, @@ -5411,13 +5853,7 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, /* * Successful, so delete request. */ - if (orp) - orp->next_request = rp->next_request; - else - isp->requests = rp->next_request; - if (isp->requestsEnd == rp) - isp->requestsEnd = orp; - snmp_free_pdu(rp->pdu); + remove_request(isp, orp, rp); free(rp); /* * There shouldn't be any more requests with the same reqid. @@ -5442,29 +5878,9 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, } } - /* - * Call USM to free any securityStateRef supplied with the message. - */ - if (pdu != NULL && pdu->securityStateRef && - pdu->command == SNMP_MSG_TRAP2) { - sptr = find_sec_mod(pdu->securityModel); - if (sptr) { - if (sptr->pdu_free_state_ref) { - (*sptr->pdu_free_state_ref) (pdu->securityStateRef); - } else { - snmp_log(LOG_ERR, - "Security Model %d can't free state references\n", - pdu->securityModel); - } - } else { - snmp_log(LOG_ERR, - "Can't find security model to free ptr: %d\n", - pdu->securityModel); - } - pdu->securityStateRef = NULL; - } - if (!handled) { + if (sp->flags & SNMP_FLAGS_SHARED_SOCKET) + return -2; snmp_increment_statistic(STAT_SNMPUNKNOWNPDUHANDLERS); DEBUGMSGTL(("sess_process_packet", "unhandled PDU\n")); } @@ -5473,6 +5889,62 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, return 0; } +/* + * This function processes a complete (according to asn_check_packet or the + * AgentX equivalent) packet, parsing it into a PDU and calling the relevant + * callbacks. On entry, packetptr points at the packet in the session's + * buffer and length is the length of the packet. Return codes: + * 0: pdu handled (pdu deleted) + * -1: parse error (pdu deleted) + * -2: pdu not found for shared session (pdu NOT deleted) + */ +static int +_sess_process_packet(void *sessp, netsnmp_session * sp, + struct snmp_internal_session *isp, + netsnmp_transport *transport, + void *opaque, int olength, + u_char * packetptr, int length) +{ + struct session_list *slp = (struct session_list *) sessp; + netsnmp_pdu *pdu; + int rc; + + pdu = _sess_process_packet_parse_pdu(sessp, sp, isp, transport, opaque, + olength, packetptr, length); + if (NULL == pdu) + return -1; + + /* + * find session to process pdu. usually that will be the current session, + * but with the introduction of shared transports, another session may + * have the same socket. + */ + do { + rc = _sess_process_packet_handle_pdu(sessp, sp, isp, transport, pdu); + if (-2 != rc || !(transport->flags & NETSNMP_TRANSPORT_FLAG_SHARED)) + break; + + /** -2 means pdu not in request list. check other sessions */ + do { + slp = slp->next; + } while (slp && slp->transport->sock != transport->sock); + if (!slp) + break; /* no more sessions with same socket */ + + sp = slp->session; + isp = slp->internal; + transport = slp->transport; + } while(slp); + + if (-2 == rc) { /* did not find session for pdu */ + snmp_increment_statistic(STAT_SNMPUNKNOWNPDUHANDLERS); + DEBUGMSGTL(("sess_process_packet", "unhandled PDU\n")); + snmp_free_pdu(pdu); + } + + return rc; +} + /* * 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 @@ -5502,6 +5974,158 @@ snmp_read2(netsnmp_large_fd_set * fdset) snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); } +/* + * accept new connections + * returns 0 if success, -1 if fail + */ +static int +_sess_read_accept(void *sessp) +{ + struct session_list *slp = (struct session_list *) sessp; + netsnmp_session *sp = slp ? slp->session : NULL; + struct snmp_internal_session *isp = slp ? slp->internal : NULL; + netsnmp_transport *transport = slp ? slp->transport : NULL; + netsnmp_transport *new_transport; + struct session_list *nslp; + int data_sock; + + if (NULL == sessp || NULL == sp || NULL == transport || NULL == isp || + !(transport->flags & NETSNMP_TRANSPORT_FLAG_LISTEN)) + return -1; + + data_sock = transport->f_accept(transport); + if (data_sock < 0) { + sp->s_snmp_errno = SNMPERR_BAD_RECVFROM; + sp->s_errno = errno; + snmp_set_detail(strerror(errno)); + return -1; + } + + /* + * We've successfully accepted a new stream-based connection. + * It's not too clear what should happen here if we are using the + * single-session API at this point. Basically a "session + * accepted" callback is probably needed to hand the new session + * over to the application. + * + * However, for now, as in th original snmp_api, we will ASSUME + * that we're using the traditional API, and simply add the new + * session to the list. Note we don't have to get the Session + * list lock here, because under that assumption we already hold + * it (this is also why we don't just use snmp_add). + * + * The moral of the story is: don't use listening stream-based + * transports in a multi-threaded environment because something + * will go HORRIBLY wrong (and also that SNMP/TCP is not trivial). + * + * Another open issue: what should happen to sockets that have + * been accept()ed from a listening socket when that original + * socket is closed? If they are left open, then attempting to + * re-open the listening socket will fail, which is semantically + * confusing. Perhaps there should be some kind of chaining in + * the transport structure so that they can all be closed. + * Discuss. ;-) + */ + new_transport=netsnmp_transport_copy(transport); + if (new_transport == NULL) { + sp->s_snmp_errno = SNMPERR_MALLOC; + sp->s_errno = errno; + snmp_set_detail(strerror(errno)); + return -1; + } + nslp = NULL; + + new_transport->sock = data_sock; + new_transport->flags &= ~NETSNMP_TRANSPORT_FLAG_LISTEN; + + nslp = (struct session_list *) + snmp_sess_add_ex(sp, new_transport, isp->hook_pre, isp->hook_parse, + isp->hook_post, isp->hook_build, + isp->hook_realloc_build, isp->check_packet, + isp->hook_create_pdu); + + if (nslp != NULL) { + snmp_session_insert(nslp); + /** Tell the new session about its existance if possible. */ + DEBUGMSGTL(("sess_read", + "perform callback with op=CONNECT\n")); + (void)nslp->session->callback(NETSNMP_CALLBACK_OP_CONNECT, + nslp->session, 0, NULL, + sp->callback_magic); + } + + return 0; +} + +/* + * Same as snmp_read, but works just one non-stream session. + * returns 0 if success, -1 if protocol err, -2 if no packet to process + * MTR: can't lock here and at snmp_read + * Beware recursive send maybe inside snmp_read callback function. + */ +static int +_sess_read_dgram_packet(void *sessp, netsnmp_large_fd_set * fdset, + snmp_rcv_packet *rcvp) +{ + struct session_list *slp = (struct session_list *) sessp; + netsnmp_session *sp = slp ? slp->session : NULL; + struct snmp_internal_session *isp = slp ? slp->internal : NULL; + netsnmp_transport *transport = slp ? slp->transport : NULL; + + if (!sp || !isp || !transport || !rcvp ) { + DEBUGMSGTL(("sess_read_packet", "missing arguments\n")); + return -2; + } + + if (transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM) + return -2; + + if (NULL != rcvp->packet) { + snmp_log(LOG_WARNING, "overwriting existing saved packet; sess %p\n", + sp); + SNMP_FREE(rcvp->packet); + } + + if ((rcvp->packet = (u_char *) malloc(SNMP_MAX_RCV_MSG_SIZE)) == NULL) { + DEBUGMSGTL(("sess_read_packet", "can't malloc %u bytes for packet\n", + SNMP_MAX_RCV_MSG_SIZE)); + return -2; + } + + rcvp->packet_len = netsnmp_transport_recv(transport, rcvp->packet, + SNMP_MAX_RCV_MSG_SIZE, + &rcvp->opaque, &rcvp->olength); + if (rcvp->packet_len == -1) { + sp->s_snmp_errno = SNMPERR_BAD_RECVFROM; + sp->s_errno = errno; + snmp_set_detail(strerror(errno)); + SNMP_FREE(rcvp->packet); + SNMP_FREE(rcvp->opaque); + return -1; + } + + /** clear so any other sess sharing this socket won't try reading again */ + NETSNMP_LARGE_FD_CLR(transport->sock, fdset); + + if (0 == rcvp->packet_len && + transport->flags & NETSNMP_TRANSPORT_FLAG_EMPTY_PKT) { + /* this allows for a transport that needs to return from + * packet processing that doesn't necessarily have any + * consumable data in it. */ + + /* reset the flag since it's a per-message flag */ + transport->flags &= (~NETSNMP_TRANSPORT_FLAG_EMPTY_PKT); + + /** free packet */ + SNMP_FREE(rcvp->packet); + SNMP_FREE(rcvp->opaque); + + return -2; + } + + return 0; +} + /* * Same as snmp_read, but works just one session. * returns 0 if success, -1 if fail @@ -5515,19 +6139,20 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) netsnmp_session *sp = slp ? slp->session : NULL; struct snmp_internal_session *isp = slp ? slp->internal : NULL; netsnmp_transport *transport = slp ? slp->transport : NULL; - size_t pdulen = 0, rxbuf_len = 65536; + size_t pdulen = 0, rxbuf_len = SNMP_MAX_RCV_MSG_SIZE; u_char *rxbuf = NULL; int length = 0, olength = 0, rc = 0; void *opaque = NULL; - if (!sp || !isp || !transport) { - DEBUGMSGTL(("sess_read", "read fail: closing...\n")); - return 0; + if (NULL == slp || NULL == sp || NULL == isp || NULL == transport) { + snmp_log(LOG_ERR, "bad parameters to _sess_read\n"); + return SNMPERR_GENERR; } /* to avoid subagent crash */ if (transport->sock < 0) { - snmp_log (LOG_INFO, "transport->sock got negative fd value %d\n", transport->sock); + snmp_log (LOG_INFO, "transport->sock got negative fd value %d\n", + transport->sock); return 0; } @@ -5542,81 +6167,30 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) sp->s_snmp_errno = 0; sp->s_errno = 0; - if (transport->flags & NETSNMP_TRANSPORT_FLAG_LISTEN) { - int data_sock = transport->f_accept(transport); - - if (data_sock >= 0) { - /* - * We've successfully accepted a new stream-based connection. - * It's not too clear what should happen here if we are using the - * single-session API at this point. Basically a "session - * accepted" callback is probably needed to hand the new session - * over to the application. - * - * However, for now, as in the original snmp_api, we will ASSUME - * that we're using the traditional API, and simply add the new - * session to the list. Note we don't have to get the Session - * list lock here, because under that assumption we already hold - * it (this is also why we don't just use snmp_add). - * - * The moral of the story is: don't use listening stream-based - * transports in a multi-threaded environment because something - * will go HORRIBLY wrong (and also that SNMP/TCP is not trivial). - * - * Another open issue: what should happen to sockets that have - * been accept()ed from a listening socket when that original - * socket is closed? If they are left open, then attempting to - * re-open the listening socket will fail, which is semantically - * confusing. Perhaps there should be some kind of chaining in - * the transport structure so that they can all be closed. - * Discuss. ;-) - */ + if (transport->flags & NETSNMP_TRANSPORT_FLAG_LISTEN) + return _sess_read_accept(sessp); - netsnmp_transport *new_transport=netsnmp_transport_copy(transport); - if (new_transport != NULL) { - struct session_list *nslp = NULL; + if (!(transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM)) { + snmp_rcv_packet rcvp; + memset(&rcvp, 0x0, sizeof(rcvp)); - new_transport->sock = data_sock; - new_transport->flags &= ~NETSNMP_TRANSPORT_FLAG_LISTEN; - - nslp = (struct session_list *)snmp_sess_add_ex(sp, - new_transport, isp->hook_pre, isp->hook_parse, - isp->hook_post, isp->hook_build, - isp->hook_realloc_build, isp->check_packet, - isp->hook_create_pdu); - - if (nslp != NULL) { - nslp->next = Sessions; - Sessions = nslp; - /* - * Tell the new session about its existance if possible. - */ - DEBUGMSGTL(("sess_read", - "perform callback with op=CONNECT\n")); - (void)nslp->session->callback(NETSNMP_CALLBACK_OP_CONNECT, - nslp->session, 0, NULL, - sp->callback_magic); - } - return 0; - } else { - sp->s_snmp_errno = SNMPERR_MALLOC; - sp->s_errno = errno; - snmp_set_detail(strerror(errno)); - return -1; - } - } else { - sp->s_snmp_errno = SNMPERR_BAD_RECVFROM; - sp->s_errno = errno; - snmp_set_detail(strerror(errno)); + /** read the packet */ + rc = _sess_read_dgram_packet(sessp, fdset, &rcvp); + if (-1 == rc) /* protocol error */ return -1; - } + else if (-2 == rc) /* no packet to process */ + return 0; + + rc = _sess_process_packet(sessp, sp, isp, transport, + rcvp.opaque, rcvp.olength, + rcvp.packet, rcvp.packet_len); + SNMP_FREE(rcvp.packet); + /** opaque is freed in _sess_process_packet */ + return rc; } - /* - * Work out where to receive the data to. - */ + /** stream transport */ - if (transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM) { if (isp->packet == NULL) { /* * We have no saved packet. Allocate one. @@ -5657,26 +6231,10 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) rxbuf_len = isp->packet_size - isp->packet_len; } } - } else { - if ((rxbuf = (u_char *) malloc(rxbuf_len)) == NULL) { - DEBUGMSGTL(("sess_read", "can't malloc %" NETSNMP_PRIz - "u bytes for rxbuf\n", rxbuf_len)); - return 0; - } - } length = netsnmp_transport_recv(transport, rxbuf, rxbuf_len, &opaque, &olength); - if (length == -1 && !(transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM)) { - sp->s_snmp_errno = SNMPERR_BAD_RECVFROM; - sp->s_errno = errno; - snmp_set_detail(strerror(errno)); - SNMP_FREE(rxbuf); - SNMP_FREE(opaque); - return -1; - } - if (0 == length && transport->flags & NETSNMP_TRANSPORT_FLAG_EMPTY_PKT) { /* this allows for a transport that needs to return from * packet processing that doesn't necessarily have any @@ -5691,8 +6249,7 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) /* * Remote end closed connection. */ - - if (length <= 0 && transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM) { + if (length <= 0) { /* * Alert the application if possible. */ @@ -5711,7 +6268,7 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) return -1; } - if (transport->flags & NETSNMP_TRANSPORT_FLAG_STREAM) { + { u_char *pptr = isp->packet; void *ocopy = NULL; @@ -5733,7 +6290,7 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) " loop packet_len %" NETSNMP_PRIz "u, PDU length %" NETSNMP_PRIz "u\n", isp->packet_len, pdulen)); - if (pdulen > MAX_PACKET_LENGTH) { + if (pdulen > SNMP_MAX_PACKET_LEN) { /* * Illegal length, drop the connection. */ @@ -5818,7 +6375,7 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) SNMP_FREE(opaque); - if (isp->packet_len >= MAXIMUM_PACKET_SIZE) { + if (isp->packet_len >= SNMP_MAX_PACKET_LEN) { /* * Obviously this should never happen! */ @@ -5867,13 +6424,9 @@ _sess_read(void *sessp, netsnmp_large_fd_set * fdset) isp->packet = rxbuf; isp->packet_size = isp->packet_len; } - return rc; - } else { - rc = _sess_process_packet(sessp, sp, isp, transport, opaque, - olength, rxbuf, length); - SNMP_FREE(rxbuf); - return rc; } + + return rc; } @@ -6173,14 +6726,14 @@ snmp_timeout(void) } static int -snmp_resend_request(struct session_list *slp, netsnmp_request_list *rp, - int incr_retries) +snmp_resend_request(struct session_list *slp, netsnmp_request_list *orp, + netsnmp_request_list *rp, int incr_retries) { struct snmp_internal_session *isp; netsnmp_session *sp; netsnmp_transport *transport; u_char *pktbuf = NULL, *packet = NULL; - size_t pktbuf_len = 0, offset = 0, length = 0; + size_t pktbuf_len = 0, length = 0; struct timeval tv, now; int result = 0; @@ -6209,33 +6762,8 @@ snmp_resend_request(struct session_list *slp, netsnmp_request_list *rp, */ rp->pdu->msgid = rp->message_id = snmp_get_next_msgid(); - if (isp->hook_realloc_build) { - result = isp->hook_realloc_build(sp, rp->pdu, - &pktbuf, &pktbuf_len, &offset); - - packet = pktbuf; - length = offset; - } else if (isp->hook_build) { - packet = pktbuf; - length = pktbuf_len; - result = isp->hook_build(sp, rp->pdu, pktbuf, &length); - } else { -#ifdef NETSNMP_USE_REVERSE_ASNENCODING - if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_REVERSE_ENCODE)) { - result = - snmp_build(&pktbuf, &pktbuf_len, &offset, sp, rp->pdu); - packet = pktbuf + pktbuf_len - offset; - length = offset; - } else { -#endif - packet = pktbuf; - length = pktbuf_len; - result = snmp_build(&pktbuf, &length, &offset, sp, rp->pdu); -#ifdef NETSNMP_USE_REVERSE_ASNENCODING - } -#endif - } - + result = netsnmp_build_packet(isp, sp, rp->pdu, &pktbuf, &pktbuf_len, + &packet, &length); if (result < 0) { /* * This should never happen. @@ -6266,6 +6794,11 @@ snmp_resend_request(struct session_list *slp, netsnmp_request_list *rp, sp->s_snmp_errno = SNMPERR_BAD_SENDTO; sp->s_errno = errno; snmp_set_detail(strerror(errno)); + if (rp->callback) { + rp->callback(NETSNMP_CALLBACK_OP_SEND_FAILED, sp, + rp->pdu->reqid, rp->pdu, rp->cb_data); + remove_request(isp, orp, rp); + } return -1; } else { netsnmp_get_monotonic_clock(&now); @@ -6275,6 +6808,9 @@ snmp_resend_request(struct session_list *slp, netsnmp_request_list *rp, tv.tv_sec += tv.tv_usec / 1000000L; tv.tv_usec %= 1000000L; rp->expireM = tv; + if (rp->callback) + rp->callback(NETSNMP_CALLBACK_OP_RESEND, sp, + rp->pdu->reqid, rp->pdu, rp->cb_data); } return 0; } @@ -6310,7 +6846,7 @@ snmp_sess_timeout(void *sessp) /* * frees rp's after the for loop goes on to the next_request */ - free((char *) freeme); + free(freeme); freeme = NULL; } @@ -6342,17 +6878,11 @@ snmp_sess_timeout(void *sessp) callback(NETSNMP_CALLBACK_OP_TIMED_OUT, sp, rp->pdu->reqid, rp->pdu, magic); } - if (orp) - orp->next_request = rp->next_request; - else - isp->requests = rp->next_request; - if (isp->requestsEnd == rp) - isp->requestsEnd = orp; - snmp_free_pdu(rp->pdu); + remove_request(isp, orp, rp); freeme = rp; continue; /* don't update orp below */ } else { - if (snmp_resend_request(slp, rp, TRUE)) { + if (snmp_resend_request(slp, orp, rp, TRUE)) { break; } } @@ -6361,7 +6891,7 @@ snmp_sess_timeout(void *sessp) } if (freeme != NULL) { - free((char *) freeme); + free(freeme); freeme = NULL; } } @@ -6429,7 +6959,13 @@ snmp_oid_ncompare(const oid * in_name1, return 0; } -/** lexicographical compare two object identifiers. +/** + * Lexicographically compare two object identifiers. + * + * @param[in] in_name1 Left hand side OID. + * @param[in] len1 Length of LHS OID. + * @param[in] in_name2 Rigth and side OID. + * @param[in] len2 Length of RHS OID. * * Caution: this method is called often by * command responder applications (ie, agent). @@ -6478,17 +7014,24 @@ snmp_oid_compare(const oid * in_name1, return 0; } -/** lexicographical compare two object identifiers and return the point where they differ +/** + * Lexicographically compare two object identifiers. + * + * @param[in] in_name1 Left hand side OID. + * @param[in] len1 Length of LHS OID. + * @param[in] in_name2 Rigth and side OID. + * @param[in] len2 Length of RHS OID. + * @param[out] offpt First offset at which the two OIDs differ. * - * Caution: this method is called often by - * command responder applications (ie, agent). + * Caution: this method is called often by command responder applications (ie, + * agent). * - * @return -1 if name1 < name2, 0 if name1 = name2, 1 if name1 > name2 and offpt = len where name1 != name2 + * @return -1 if name1 < name2, 0 if name1 = name2, 1 if name1 > name2 and + * offpt = len where name1 != name2 */ int -netsnmp_oid_compare_ll(const oid * in_name1, - size_t len1, const oid * in_name2, size_t len2, - size_t *offpt) +netsnmp_oid_compare_ll(const oid * in_name1, size_t len1, const oid * in_name2, + size_t len2, size_t *offpt) { register int len; register const oid *name1 = in_name1; @@ -6542,18 +7085,18 @@ int snmp_oidtree_compare(const oid * in_name1, size_t len1, const oid * in_name2, size_t len2) { - int len = ((len1 < len2) ? len1 : len2); + int len = len1 < len2 ? len1 : len2; - return (snmp_oid_compare(in_name1, len, in_name2, len)); + return snmp_oid_compare(in_name1, len, in_name2, len); } int snmp_oidsubtree_compare(const oid * in_name1, size_t len1, const oid * in_name2, size_t len2) { - int len = ((len1 < len2) ? len1 : len2); + int len = len1 < len2 ? len1 : len2; - return (snmp_oid_compare(in_name1, len1, in_name2, len)); + return snmp_oid_compare(in_name1, len1, in_name2, len); } /** Compares 2 OIDs to determine if they are exactly equal. @@ -6655,6 +7198,7 @@ netsnmp_oid_find_prefix(const oid * in_name1, size_t len1, Return its length. */ } +#ifndef NETSNMP_DISABLE_MIB_LOADING static int _check_range(struct tree *tp, long ltmp, int *resptr, const char *errmsg) { @@ -6669,7 +7213,7 @@ static int _check_range(struct tree *tp, long ltmp, int *resptr, while (rp) { if (rp->low <= ltmp && ltmp <= rp->high) break; /* Allow four digits per range value */ - temp_len += ((rp->low != rp->high) ? 14 : 8 ); + temp_len += ((rp->low != rp->high) ? 27 : 15 ); rp = rp->next; } if (!rp) { @@ -6697,7 +7241,7 @@ static int _check_range(struct tree *tp, long ltmp, int *resptr, free(temp); return 1; } - +#endif /* NETSNMP_DISABLE_MIB_LOADING */ /* * Add a variable with the requested name to the end of the list of @@ -6786,14 +7330,14 @@ snmp_add_var(netsnmp_pdu *pdu, NETSNMP_DS_LIB_NO_DISPLAY_HINT); u_char *hintptr; struct tree *tp; + struct enum_list *ep; + int itmp; #endif /* NETSNMP_DISABLE_MIB_LOADING */ u_char *buf = NULL; const u_char *buf_ptr = NULL; size_t buf_len = 0, value_len = 0, tint; in_addr_t atmp; long ltmp; - int itmp; - struct enum_list *ep; #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES double dtmp; float ftmp; @@ -7039,8 +7583,6 @@ snmp_add_var(netsnmp_pdu *pdu, snmp_set_detail(value); break; } - /* initialize itmp value so that range check below works */ - itmp = value_len; buf_ptr = buf; } else if (type == 's') { buf_ptr = (const u_char *)value; @@ -7084,6 +7626,10 @@ snmp_add_var(netsnmp_pdu *pdu, #endif /* NETSNMP_DISABLE_MIB_LOADING */ vp = strdup(value); + if (!vp) { + SNMP_FREE(buf); + goto fail; + } for (cp = strtok_r(vp, " ,\t", &st); cp; cp = strtok_r(NULL, " ,\t", &st)) { int ix, bit; @@ -7091,7 +7637,7 @@ snmp_add_var(netsnmp_pdu *pdu, if (*ecp != 0) { #ifndef NETSNMP_DISABLE_MIB_LOADING for (ep = tp ? tp->enums : NULL; ep != NULL; ep = ep->next) { - if (strncmp(ep->label, cp, strlen(ep->label)) == 0) { + if (strcmp(ep->label, cp) == 0) { break; } } @@ -7313,6 +7859,32 @@ snmp_sess_session_lookup(void *sessp) } +/* + * returns NULL or internal pointer to session + * use this pointer for the other snmp_sess* routines, + * which guarantee action will occur ONLY for this given session. + */ +netsnmp_session * +snmp_sess_lookup_by_name(const char *paramName) +{ + struct session_list *slp; + + snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION); + for (slp = Sessions; slp; slp = slp->next) { + if (NULL == slp->session->paramName) + continue; + if (strcmp(paramName, slp->session->paramName) == 0) + break; + } + snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION); + + if (slp == NULL) + return NULL; + + return slp->session; +} + + /* * snmp_sess_transport: takes an opaque pointer (as returned by * snmp_sess_open or snmp_sess_pointer) and returns the corresponding diff --git a/snmplib/snmp_auth.c b/snmplib/snmp_auth.c index 4b408f1..824af0b 100644 --- a/snmplib/snmp_auth.c +++ b/snmplib/snmp_auth.c @@ -33,41 +33,38 @@ SOFTWARE. #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #ifdef vms #include diff --git a/snmplib/snmp_client.c b/snmplib/snmp_client.c index ab7a58c..99f47c8 100644 --- a/snmplib/snmp_client.c +++ b/snmplib/snmp_client.c @@ -32,6 +32,11 @@ SOFTWARE. * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup snmp_client various PDU processing routines @@ -44,48 +49,47 @@ SOFTWARE. #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include @@ -97,29 +101,20 @@ SOFTWARE. #include #include #include +#include #include -netsnmp_feature_child_of(snmp_client_all, libnetsnmp) +netsnmp_feature_child_of(snmp_client_all, libnetsnmp); -netsnmp_feature_child_of(snmp_split_pdu, snmp_client_all) -netsnmp_feature_child_of(snmp_reset_var_types, snmp_client_all) -netsnmp_feature_child_of(query_set_default_session, snmp_client_all) -netsnmp_feature_child_of(row_create, snmp_client_all) +netsnmp_feature_child_of(snmp_split_pdu, snmp_client_all); +netsnmp_feature_child_of(snmp_reset_var_types, snmp_client_all); +netsnmp_feature_child_of(query_set_default_session, snmp_client_all); +netsnmp_feature_child_of(row_create, snmp_client_all); #ifndef BSD4_3 #define BSD4_2 #endif -#ifndef FD_SET - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((p), 0, sizeof(*(p))) -#endif /* * Prototype definitions @@ -216,12 +211,24 @@ snmp_synch_input(int op, state->status = STAT_TIMEOUT; session->s_snmp_errno = SNMPERR_TIMEOUT; SET_SNMP_ERROR(SNMPERR_TIMEOUT); + } else if (op == NETSNMP_CALLBACK_OP_SEC_ERROR) { + state->pdu = NULL; + /* + * If we already have an error in status, then leave it alone. + */ + if (state->status == STAT_SUCCESS) { + state->status = STAT_ERROR; + session->s_snmp_errno = SNMPERR_GENERR; + SET_SNMP_ERROR(SNMPERR_GENERR); + } } else if (op == NETSNMP_CALLBACK_OP_DISCONNECT) { state->pdu = NULL; state->status = STAT_ERROR; session->s_snmp_errno = SNMPERR_ABORT; SET_SNMP_ERROR(SNMPERR_ABORT); } + DEBUGMSGTL(("snmp_synch", "status = %d errno = %d\n", + state->status, session->s_snmp_errno)); return 1; } @@ -352,6 +359,9 @@ _clone_pdu_header(netsnmp_pdu *pdu) struct snmp_secmod_def *sptr; int ret; + if (!pdu) + return NULL; + newpdu = (netsnmp_pdu *) malloc(sizeof(netsnmp_pdu)); if (!newpdu) return NULL; @@ -391,27 +401,16 @@ _clone_pdu_header(netsnmp_pdu *pdu) return NULL; } - if (pdu != NULL && pdu->securityStateRef && - pdu->command == SNMP_MSG_TRAP2) { - - ret = usm_clone_usmStateReference((struct usmStateReference *) pdu->securityStateRef, - (struct usmStateReference **) &newpdu->securityStateRef ); - - if (ret) - { + sptr = find_sec_mod(newpdu->securityModel); + if (sptr && sptr->pdu_clone) { + /* call security model if it needs to know about this */ + ret = sptr->pdu_clone(pdu, newpdu); + if (ret) { snmp_free_pdu(newpdu); - return 0; + return NULL; } } - if ((sptr = find_sec_mod(newpdu->securityModel)) != NULL && - sptr->pdu_clone != NULL) { - /* - * call security model if it needs to know about this - */ - (*sptr->pdu_clone) (pdu, newpdu); - } - return newpdu; } @@ -430,6 +429,8 @@ _copy_varlist(netsnmp_variable_list * var, /* source varList */ while (var && (copy_count-- > 0)) { /* * Drop the specified variable (if applicable) + * xxx hmm, is it intentional that dropping the errindex + * counts towards copy_count? */ if (++ii == errindex) { var = var->next_variable; @@ -443,7 +444,7 @@ _copy_varlist(netsnmp_variable_list * var, /* source varList */ malloc(sizeof(netsnmp_variable_list)); if (snmp_clone_var(var, newvar)) { if (newvar) - free((char *) newvar); + free(newvar); snmp_free_varbind(newhead); return NULL; } @@ -490,7 +491,7 @@ _copy_pdu_vars(netsnmp_pdu *pdu, /* source PDU */ int copy_count) { /* !=0 number of variables to copy */ netsnmp_variable_list *var; -#if TEMPORARILY_DISABLED +#ifdef TEMPORARILY_DISABLED int copied; #endif int drop_idx; @@ -507,24 +508,24 @@ _copy_pdu_vars(netsnmp_pdu *pdu, /* source PDU */ while (var && (skip_count-- > 0)) /* skip over pdu variables */ var = var->next_variable; -#if TEMPORARILY_DISABLED +#ifdef TEMPORARILY_DISABLED copied = 0; if (pdu->flags & UCD_MSG_FLAG_FORCE_PDU_COPY) copied = 1; /* We're interested in 'empty' responses too */ #endif newpdu->variables = _copy_varlist(var, drop_idx, copy_count); -#if TEMPORARILY_DISABLED +#ifdef TEMPORARILY_DISABLED if (newpdu->variables) copied = 1; #endif -#if ALSO_TEMPORARILY_DISABLED +#ifdef ALSO_TEMPORARILY_DISABLED /* * Error if bad errindex or if target PDU has no variables copied */ if ((drop_err && (ii < pdu->errindex)) -#if TEMPORARILY_DISABLED +#ifdef TEMPORARILY_DISABLED /* * SNMPv3 engineID probes are allowed to be empty. * See the comment in snmp_api.c for further details @@ -553,7 +554,10 @@ netsnmp_pdu * _clone_pdu(netsnmp_pdu *pdu, int drop_err) { netsnmp_pdu *newpdu; + newpdu = _clone_pdu_header(pdu); + if (!newpdu) + return newpdu; newpdu = _copy_pdu_vars(pdu, newpdu, drop_err, 0, 10000); /* skip none, copy all */ return newpdu; @@ -599,7 +603,10 @@ netsnmp_pdu * snmp_split_pdu(netsnmp_pdu *pdu, int skip_count, int copy_count) { netsnmp_pdu *newpdu; + newpdu = _clone_pdu_header(pdu); + if (!newpdu) + return newpdu; newpdu = _copy_pdu_vars(pdu, newpdu, 0, /* don't drop any variables */ skip_count, copy_count); @@ -744,7 +751,7 @@ count_varbinds(netsnmp_variable_list * var_ptr) return count; } -netsnmp_feature_child_of(count_varbinds_of_type, netsnmp_unused) +netsnmp_feature_child_of(count_varbinds_of_type, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_COUNT_VARBINDS_OF_TYPE int count_varbinds_of_type(netsnmp_variable_list * var_ptr, u_char type) @@ -759,7 +766,7 @@ count_varbinds_of_type(netsnmp_variable_list * var_ptr, u_char type) } #endif /* NETSNMP_FEATURE_REMOVE_COUNT_VARBINDS_OF_TYPE */ -netsnmp_feature_child_of(find_varind_of_type, netsnmp_unused) +netsnmp_feature_child_of(find_varind_of_type, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_FIND_VARIND_OF_TYPE netsnmp_variable_list * find_varbind_of_type(netsnmp_variable_list * var_ptr, u_char type) @@ -846,7 +853,8 @@ snmp_set_var_value(netsnmp_variable_list * vars, = (const u_long *) value; *(vars->val.integer) = *val_ulong; if (*(vars->val.integer) > 0xffffffff) { - snmp_log(LOG_ERR,"truncating integer value > 32 bits\n"); + NETSNMP_LOGONCE((LOG_INFO, + "truncating integer value > 32 bits\n")); *(vars->val.integer) &= 0xffffffff; } } @@ -858,7 +866,8 @@ snmp_set_var_value(netsnmp_variable_list * vars, = (const unsigned long long *) value; *(vars->val.integer) = (long) *val_ullong; if (*(vars->val.integer) > 0xffffffff) { - snmp_log(LOG_ERR,"truncating integer value > 32 bits\n"); + NETSNMP_LOGONCE((LOG_INFO, + "truncating integer value > 32 bits\n")); *(vars->val.integer) &= 0xffffffff; } } @@ -870,7 +879,8 @@ snmp_set_var_value(netsnmp_variable_list * vars, = (const uintmax_t *) value; *(vars->val.integer) = (long) *val_uintmax_t; if (*(vars->val.integer) > 0xffffffff) { - snmp_log(LOG_ERR,"truncating integer value > 32 bits\n"); + NETSNMP_LOGONCE((LOG_INFO, + "truncating integer value > 32 bits\n")); *(vars->val.integer) &= 0xffffffff; } } @@ -890,8 +900,8 @@ snmp_set_var_value(netsnmp_variable_list * vars, #endif else if (vars->val_len == sizeof(char)) { if (ASN_INTEGER == vars->type) { - const char *val_char - = (const char *) value; + const signed char *val_char + = (const signed char *) value; *(vars->val.integer) = (long) *val_char; } else { const u_char *val_uchar @@ -925,7 +935,7 @@ snmp_set_var_value(netsnmp_variable_list * vars, if (4 != vars->val_len) { netsnmp_assert("ipaddress length == 4"); } - /** FALL THROUGH */ + /* FALL THROUGH */ case ASN_PRIV_IMPLIED_OCTET_STR: case ASN_OCTET_STR: case ASN_BIT_STR: @@ -960,7 +970,7 @@ snmp_set_var_value(netsnmp_variable_list * vars, case ASN_OPAQUE_I64: #endif /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */ case ASN_COUNTER64: - if (largeval) { + if (largeval || vars->val_len != sizeof(struct counter64)) { snmp_log(LOG_ERR,"bad size for counter 64 (%d)\n", (int)vars->val_len); return (1); @@ -1029,13 +1039,13 @@ snmp_synch_response_cb(netsnmp_session * ss, netsnmp_pdu *pdu, netsnmp_pdu **response, snmp_callback pcb) { - struct synch_state lstate, *state; - snmp_callback cbsav; - void *cbmagsav; - int numfds, count; - fd_set fdset; - struct timeval timeout, *tvp; - int block; + struct synch_state lstate, *state; + snmp_callback cbsav; + void *cbmagsav; + int numfds, count; + netsnmp_large_fd_set fdset; + struct timeval timeout, *tvp; + int block; memset((void *) &lstate, 0, sizeof(lstate)); state = &lstate; @@ -1043,26 +1053,29 @@ snmp_synch_response_cb(netsnmp_session * ss, cbmagsav = ss->callback_magic; ss->callback = pcb; ss->callback_magic = (void *) state; + netsnmp_large_fd_set_init(&fdset, FD_SETSIZE); - if ((state->reqid = snmp_send(ss, pdu)) == 0) { + if (snmp_send(ss, pdu) == 0) { snmp_free_pdu(pdu); state->status = STAT_ERROR; - } else + } else { + state->reqid = pdu->reqid; state->waiting = 1; + } while (state->waiting) { numfds = 0; - FD_ZERO(&fdset); + NETSNMP_LARGE_FD_ZERO(&fdset); block = NETSNMP_SNMPBLOCK; tvp = &timeout; timerclear(tvp); - snmp_sess_select_info_flags(0, &numfds, &fdset, tvp, &block, - NETSNMP_SELECT_NOALARMS); + snmp_sess_select_info2_flags(NULL, &numfds, &fdset, tvp, &block, + NETSNMP_SELECT_NOALARMS); if (block == 1) tvp = NULL; /* block without timeout */ - count = select(numfds, &fdset, NULL, NULL, tvp); + count = netsnmp_large_fd_set_select(numfds, &fdset, NULL, NULL, tvp); if (count > 0) { - snmp_read(&fdset); + snmp_read2(&fdset); } else { switch (count) { case 0: @@ -1082,9 +1095,7 @@ snmp_synch_response_cb(netsnmp_session * ss, */ snmp_set_detail(strerror(errno)); } - /* - * FALLTHRU - */ + /* FALLTHRU */ default: state->status = STAT_ERROR; state->waiting = 0; @@ -1101,6 +1112,7 @@ snmp_synch_response_cb(netsnmp_session * ss, *response = state->pdu; ss->callback = cbsav; ss->callback_magic = cbmagsav; + netsnmp_large_fd_set_cleanup(&fdset); return state->status; } @@ -1115,14 +1127,14 @@ int snmp_sess_synch_response(void *sessp, netsnmp_pdu *pdu, netsnmp_pdu **response) { - netsnmp_session *ss; - struct synch_state lstate, *state; - snmp_callback cbsav; - void *cbmagsav; - int numfds, count; - fd_set fdset; - struct timeval timeout, *tvp; - int block; + netsnmp_session *ss; + struct synch_state lstate, *state; + snmp_callback cbsav; + void *cbmagsav; + int numfds, count; + netsnmp_large_fd_set fdset; + struct timeval timeout, *tvp; + int block; ss = snmp_sess_session(sessp); if (ss == NULL) { @@ -1135,26 +1147,29 @@ snmp_sess_synch_response(void *sessp, cbmagsav = ss->callback_magic; ss->callback = snmp_synch_input; ss->callback_magic = (void *) state; + netsnmp_large_fd_set_init(&fdset, FD_SETSIZE); - if ((state->reqid = snmp_sess_send(sessp, pdu)) == 0) { + if (snmp_sess_send(sessp, pdu) == 0) { snmp_free_pdu(pdu); state->status = STAT_ERROR; - } else + } else { state->waiting = 1; + state->reqid = pdu->reqid; + } while (state->waiting) { numfds = 0; - FD_ZERO(&fdset); + NETSNMP_LARGE_FD_ZERO(&fdset); block = NETSNMP_SNMPBLOCK; tvp = &timeout; timerclear(tvp); - snmp_sess_select_info_flags(sessp, &numfds, &fdset, tvp, &block, - NETSNMP_SELECT_NOALARMS); + snmp_sess_select_info2_flags(sessp, &numfds, &fdset, tvp, &block, + NETSNMP_SELECT_NOALARMS); if (block == 1) tvp = NULL; /* block without timeout */ - count = select(numfds, &fdset, NULL, NULL, tvp); + count = netsnmp_large_fd_set_select(numfds, &fdset, NULL, NULL, tvp); if (count > 0) { - snmp_sess_read(sessp, &fdset); + snmp_sess_read2(sessp, &fdset); } else switch (count) { case 0: @@ -1174,9 +1189,7 @@ snmp_sess_synch_response(void *sessp, */ snmp_set_detail(strerror(errno)); } - /* - * FALLTHRU - */ + /* FALLTHRU */ default: state->status = STAT_ERROR; state->waiting = 0; @@ -1185,6 +1198,7 @@ snmp_sess_synch_response(void *sessp, *response = state->pdu; ss->callback = cbsav; ss->callback_magic = cbmagsav; + netsnmp_large_fd_set_cleanup(&fdset); return state->status; } @@ -1281,17 +1295,37 @@ static int _query(netsnmp_variable_list *list, int request, netsnmp_session *session) { - netsnmp_pdu *pdu = snmp_pdu_create( request ); + netsnmp_pdu *pdu; netsnmp_pdu *response = NULL; netsnmp_variable_list *vb1, *vb2, *vtmp; int ret, count; DEBUGMSGTL(("iquery", "query on session %p\n", session)); + + if (NULL == list) { + snmp_log(LOG_ERR, "empty variable list in _query\n"); + return SNMP_ERR_GENERR; + } + + pdu = snmp_pdu_create( request ); + if (NULL == pdu) { + snmp_log(LOG_ERR, "could not allocate pdu\n"); + return SNMP_ERR_GENERR; + } + /* * Clone the varbind list into the request PDU... */ pdu->variables = snmp_clone_varbind( list ); + if (NULL == pdu->variables) { + snmp_log(LOG_ERR, "could not clone variable list\n"); + snmp_free_pdu(pdu); + return SNMP_ERR_GENERR; + } + +#ifndef NETSNMP_NO_WRITE_SUPPORT retry: +#endif if ( session ) ret = snmp_synch_response( session, pdu, &response ); else if (_def_query_session) @@ -1355,7 +1389,7 @@ static int _query(netsnmp_variable_list *list, } vtmp = vb2->next_variable; snmp_free_var_internals( vb2 ); - snmp_clone_var( vb1, vb2 ); + snmp_clone_var( vb1, vb2 ); /* xxx: check return? */ vb2->next_variable = vtmp; } } diff --git a/snmplib/snmp_debug.c b/snmplib/snmp_debug.c index 27ce233..1b684e0 100644 --- a/snmplib/snmp_debug.c +++ b/snmplib/snmp_debug.c @@ -1,26 +1,43 @@ +/* + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #include +#define SYSLOG_NAMES + #include #include -#if HAVE_STDLIB_H +#ifndef HAVE_PRIORITYNAMES +#include +#endif +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include + +#ifdef HAVE_PRIORITYNAMES +#include #endif #include @@ -31,6 +48,7 @@ #include #include +#include #define SNMP_DEBUG_DISABLED 0 #define SNMP_DEBUG_ACTIVE 1 @@ -41,11 +59,16 @@ static int dodebug = NETSNMP_ALWAYS_DEBUG; int debug_num_tokens = 0; static int debug_print_everything = 0; +#ifndef NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL +static int debug_log_level = LOG_DEBUG; +#else +#define debug_log_level LOG_DEBUG +#endif /* NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL */ netsnmp_token_descr dbg_tokens[MAX_DEBUG_TOKENS]; /* - * Number of spaces to indent debug outpur. Valid range is [0,INT_MAX] + * Number of spaces to indent debug output. Valid range is [0,INT_MAX] */ static int debugindent = 0; @@ -58,15 +81,15 @@ debug_indent_get(void) const char* debug_indent(void) { -#define SPACES " " \ - " " + static const char SPACES[] = " " + " "; + if ((sizeof(SPACES) - 1) < (unsigned int)debugindent) { snmp_log(LOG_ERR, "Too deep indentation for debug_indent. " "Consider using \"%%*s\", debug_indent_get(), \"\" instead."); return SPACES; } - return SPACES + sizeof(SPACES) - 1 - debugindent; -#undef SPACES + return &SPACES[sizeof(SPACES) - 1 - debugindent]; } void @@ -74,11 +97,20 @@ debug_indent_add(int amount) { if (-debugindent <= amount && amount <= INT_MAX - debugindent) debugindent += amount; + netsnmp_assert( debugindent >= 0 ); /* no negative indents */ } NETSNMP_IMPORT void debug_config_register_tokens(const char *configtoken, char *tokens); +void +debug_indent_reset(void) +{ + if (debugindent != 0) + DEBUGMSGTL(("dump_indent","indent reset from %d\n", debugindent)); + debugindent = 0; +} + void debug_config_register_tokens(const char *configtoken, char *tokens) { @@ -94,6 +126,59 @@ debug_config_turn_on_debugging(const char *configtoken, char *line) snmp_set_do_debugging(atoi(line)); } +#ifndef NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL + +void +netsnmp_set_debug_log_level(int val) +{ + if (val < LOG_EMERG) + val = LOG_EMERG; + else if (val > LOG_DEBUG) + val = LOG_DEBUG; + debug_log_level = val; +} + +int +netsnmp_get_debug_log_level(void) +{ + return debug_log_level; +} + +static void +debug_config_debug_log_level(const char *configtoken, char *line) +{ +#ifndef HAVE_PRIORITYNAMES + static const struct strval_s { + const char *c_name; + int c_val; + } prioritynames[] = { + { "alert", LOG_ALERT }, + { "crit", LOG_CRIT }, + { "debug", LOG_DEBUG }, + { "emerg", LOG_EMERG }, + { "err", LOG_ERR }, + { "info", LOG_INFO }, + { "notice", LOG_NOTICE }, + { "warning", LOG_WARNING }, + { NULL, 0 } + }; +#endif + int i = 0, len_l, len_p; + + len_l = strlen(line); + for(;prioritynames[i].c_name;++i) { + len_p = strlen(prioritynames[i].c_name); + if ((len_p != len_l) || + (strcasecmp(line,prioritynames[i].c_name) != 0)) + continue; + netsnmp_set_debug_log_level(prioritynames[i].c_val); + return; + } + config_perror("unknown debug log level, using debug"); + netsnmp_set_debug_log_level(LOG_DEBUG); +} +#endif /* NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL */ + void debug_register_tokens(const char *tokens) { @@ -105,6 +190,8 @@ debug_register_tokens(const char *tokens) return; newp = strdup(tokens); /* strtok_r messes it up */ + if (!newp) + return; cp = strtok_r(newp, DEBUG_TOKEN_DELIMITER, &st); while (cp) { if (strlen(cp) < MAX_DEBUG_TOKEN_LEN) { @@ -113,7 +200,7 @@ debug_register_tokens(const char *tokens) } else if (debug_num_tokens < MAX_DEBUG_TOKENS) { if ('-' == *cp) { ++cp; - status = SNMP_DEBUG_EXCLUDED; + status = SNMP_DEBUG_DISABLED; } else status = SNMP_DEBUG_ACTIVE; @@ -249,7 +336,7 @@ debugmsg(const char *token, const char *format, ...) va_list debugargs; va_start(debugargs, format); - snmp_vlog(LOG_DEBUG, format, debugargs); + snmp_vlog(debug_log_level, format, debugargs); va_end(debugargs); } } @@ -441,8 +528,8 @@ debug_combo_nc(const char *token, const char *format, ...) va_list debugargs; va_start(debugargs, format); - snmp_log(LOG_DEBUG, "%s: ", token); - snmp_vlog(LOG_DEBUG, format, debugargs); + snmp_log(debug_log_level, "%s: ", token); + snmp_vlog(debug_log_level, format, debugargs); va_end(debugargs); } @@ -461,38 +548,61 @@ snmp_get_do_debugging(void) return dodebug; } -#else /* ! NETSNMP_NO_DEBUGGING */ +void +snmp_debug_shutdown(void) +{ + int i; -#if __GNUC__ > 2 -#define UNUSED __attribute__((unused)) -#else -#define UNUSED -#endif + for (i = 0; i < debug_num_tokens; i++) + SNMP_FREE(dbg_tokens[i].token_name); +} + +#else /* ! NETSNMP_NO_DEBUGGING */ int debug_indent_get(void) { return 0; } const char* debug_indent(void) { return ""; } -void debug_indent_add(int amount UNUSED) { } +void debug_indent_add(int amount) +{ } NETSNMP_IMPORT void debug_config_register_tokens(const char *configtoken, char *tokens); void -debug_config_register_tokens(const char *configtoken UNUSED, - char *tokens UNUSED) +debug_indent_reset(void) +{ } + +void +debug_config_register_tokens(const char *configtoken, char *tokens) +{ } + +#ifndef NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL +static void +debug_config_debug_log_level(const char *configtoken NETSNMP_ATTRIBUTE_UNUSED, + char *tokens NETSNMP_ATTRIBUTE_UNUSED) +{ } + +NETSNMP_IMPORT void +netsnmp_set_debug_log_level(int val NETSNMP_ATTRIBUTE_UNUSED) { } +NETSNMP_IMPORT int +netsnmp_get_debug_log_level(void) +{ + return 0; +} +#endif /* NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL */ + NETSNMP_IMPORT void debug_config_turn_on_debugging(const char *configtoken, char *line); void -debug_config_turn_on_debugging(const char *configtoken UNUSED, - char *line UNUSED) +debug_config_turn_on_debugging(const char *configtokenu, char *line) { } void -debug_register_tokens(const char *tokens UNUSED) +debug_register_tokens(const char *tokens) { } void @@ -501,61 +611,61 @@ debug_print_registered_tokens(void) int -debug_enable_token_logs (const char *token UNUSED) -{ return SNMPERR_GENERR; } +debug_enable_token_logs (const char *token) +{ + return SNMPERR_GENERR; +} int -debug_disable_token_logs (const char *token UNUSED) -{ return SNMPERR_GENERR; } +debug_disable_token_logs (const char *token) +{ + return SNMPERR_GENERR; +} int -debug_is_token_registered(const char *token UNUSED) -{ return SNMPERR_GENERR; } +debug_is_token_registered(const char *token) +{ + return SNMPERR_GENERR; +} void -debugmsg(const char *token UNUSED, const char *format UNUSED, ...) +debugmsg(const char *token, const char *format, ...) { } -void -debugmsg_oid(const char *token UNUSED, const oid * theoid UNUSED, - size_t len UNUSED) +void debugmsg_oid(const char *token, const oid * theoid, size_t len) { } void -debugmsg_suboid(const char *token UNUSED, const oid * theoid UNUSED, - size_t len UNUSED) +debugmsg_suboid(const char *token, const oid * theoid, size_t len) { } void -debugmsg_var(const char *token UNUSED, netsnmp_variable_list * var UNUSED) +debugmsg_var(const char *token, netsnmp_variable_list * var) { } void -debugmsg_oidrange(const char *token UNUSED, const oid * theoid UNUSED, - size_t len UNUSED, size_t var_subid UNUSED, - oid range_ubound UNUSED) +debugmsg_oidrange(const char *token, const oid * theoid, size_t len, + size_t var_subid, oid range_ubound) { } void -debugmsg_hex(const char *token UNUSED, const u_char * thedata UNUSED, - size_t len UNUSED) +debugmsg_hex(const char *token, const u_char * thedata, size_t len) { } void -debugmsg_hextli(const char *token UNUSED, const u_char * thedata UNUSED, - size_t len UNUSED) +debugmsg_hextli(const char *token, const u_char * thedata, size_t len) { } void -debugmsgtoken(const char *token UNUSED, const char *format UNUSED, ...) +debugmsgtoken(const char *token, const char *format, ...) { } void -debug_combo_nc(const char *token UNUSED, const char *format UNUSED, ...) +debug_combo_nc(const char *token, const char *format, ...) { } void -snmp_set_do_debugging(int val UNUSED) +snmp_set_do_debugging(int val) { } int @@ -564,6 +674,10 @@ snmp_get_do_debugging(void) return 0; } +void +snmp_debug_shutdown(void) +{ } + #endif /* NETSNMP_NO_DEBUGGING */ void @@ -575,4 +689,10 @@ snmp_debug_init(void) register_prenetsnmp_mib_handler("snmp", "debugTokens", debug_config_register_tokens, NULL, "token[,token...]"); +#ifndef NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL + register_prenetsnmp_mib_handler("snmp", "debugLogLevel", + debug_config_debug_log_level, NULL, + "(emerg|alert|crit|err|warning|notice|info|debug)"); +#endif /* NETSNMP_DISABLE_DYNAMIC_LOG_LEVEL */ } + diff --git a/snmplib/snmp_enum.c b/snmplib/snmp_enum.c index 8a6bd38..c7c77cc 100644 --- a/snmplib/snmp_enum.c +++ b/snmplib/snmp_enum.c @@ -1,19 +1,23 @@ #include #include +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + #ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -21,14 +25,15 @@ #include #include +#include /* strcasecmp() */ #include -netsnmp_feature_child_of(snmp_enum_all, libnetsnmp) +netsnmp_feature_child_of(snmp_enum_all, libnetsnmp); -netsnmp_feature_child_of(se_find_free_value_in_slist, snmp_enum_all) -netsnmp_feature_child_of(snmp_enum_store_list, snmp_enum_all) -netsnmp_feature_child_of(snmp_enum_store_slist, snmp_enum_all) -netsnmp_feature_child_of(snmp_enum_clear, snmp_enum_all) +netsnmp_feature_child_of(se_find_free_value_in_slist, snmp_enum_all); +netsnmp_feature_child_of(snmp_enum_store_list, snmp_enum_all); +netsnmp_feature_child_of(snmp_enum_store_slist, snmp_enum_all); +netsnmp_feature_child_of(snmp_enum_clear, snmp_enum_all); struct snmp_enum_list_str { char *name; @@ -67,7 +72,7 @@ init_snmp_enum(const char *type) } current_min_num = SE_MAX_SUBIDS; - register_config_handler(type, "enum", se_read_conf, NULL, NULL); + register_const_config_handler(type, "enum", se_read_conf, NULL, NULL); return SE_OK; } @@ -94,11 +99,11 @@ se_store_in_list(struct snmp_enum_list *new_list, } void -se_read_conf(const char *word, char *cptr) +se_read_conf(const char *word, const char *cptr) { int major, minor; int value; - char *cp, *cp2; + const char *cp, *cp2; char e_name[BUFSIZ]; char e_enum[ BUFSIZ]; @@ -109,8 +114,8 @@ se_read_conf(const char *word, char *cptr) * Extract the first token * (which should be the name of the list) */ - cp = copy_nword(cptr, e_name, sizeof(e_name)); - cp = skip_white(cp); + cp = copy_nword_const(cptr, e_name, sizeof(e_name)); + cp = skip_white_const(cp); if (!cp || *cp=='\0') return; @@ -124,7 +129,7 @@ se_read_conf(const char *word, char *cptr) * Numeric major/minor style */ while (1) { - cp = copy_nword(cp, e_enum, sizeof(e_enum)); + cp = copy_nword_const(cp, e_enum, sizeof(e_enum)); if (sscanf(e_enum, "%d:", &value) != 1) { break; } @@ -140,7 +145,7 @@ se_read_conf(const char *word, char *cptr) * Named enumeration */ while (1) { - cp = copy_nword(cp, e_enum, sizeof(e_enum)); + cp = copy_nword_const(cp, e_enum, sizeof(e_enum)); if (sscanf(e_enum, "%d:", &value) != 1) { break; } @@ -220,6 +225,20 @@ se_find_value_in_list(struct snmp_enum_list *list, const char *label) return SE_DNE; /* XXX: um, no good solution here */ } +int +se_find_casevalue_in_list(struct snmp_enum_list *list, const char *label) +{ + if (!list) + return SE_DNE; /* XXX: um, no good solution here */ + while (list) { + if (strcasecmp(list->label, label) == 0) + return (list->value); + list = list->next; + } + + return SE_DNE; /* XXX: um, no good solution here */ +} + int se_find_free_value_in_list(struct snmp_enum_list *list) { @@ -347,6 +366,12 @@ se_find_value_in_slist(const char *listname, const char *label) return (se_find_value_in_list(se_find_slist(listname), label)); } +int +se_find_casevalue_in_slist(const char *listname, const char *label) +{ + return (se_find_casevalue_in_list(se_find_slist(listname), label)); +} + #ifndef NETSNMP_FEATURE_REMOVE_SE_FIND_FREE_VALUE_IN_SLIST int se_find_free_value_in_slist(const char *listname) diff --git a/snmplib/snmp_logging.c b/snmplib/snmp_logging.c index a2cd55a..8a66ef5 100644 --- a/snmplib/snmp_logging.c +++ b/snmplib/snmp_logging.c @@ -11,6 +11,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /** @defgroup snmp_logging generic logging for net-snmp * @ingroup library @@ -20,50 +25,47 @@ #include #include #include -#if HAVE_MALLOC_H +#ifdef HAVE_MALLOC_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include #include #include #include -#if HAVE_SYSLOG_H +#ifdef HAVE_SYSLOG_H #include #ifndef LOG_CONS /* Interesting Ultrix feature */ #include #endif #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -72,7 +74,8 @@ #include #include -#define LOGLENGTH 1024 + +#include "snmp_syslog.h" #ifdef va_copy #define NEED_VA_END_AFTER_VA_COPY @@ -84,22 +87,25 @@ #define va_copy(dest, src) memcpy (&dest, &src, sizeof (va_list)) #endif #endif +#ifndef HAVE_VSNPRINTF +#include "snprintf.h" +#endif -netsnmp_feature_child_of(logging_all, libnetsnmp) +netsnmp_feature_child_of(logging_all, libnetsnmp); -netsnmp_feature_child_of(logging_outputs, logging_all) -netsnmp_feature_child_of(logging_file, logging_outputs) -netsnmp_feature_child_of(logging_stdio, logging_outputs) -netsnmp_feature_child_of(logging_syslog, logging_outputs) -netsnmp_feature_child_of(logging_external, logging_all) +netsnmp_feature_child_of(logging_outputs, logging_all); +netsnmp_feature_child_of(logging_file, logging_outputs); +netsnmp_feature_child_of(logging_stdio, logging_outputs); +netsnmp_feature_child_of(logging_syslog, logging_outputs); +netsnmp_feature_child_of(logging_external, logging_all); -netsnmp_feature_child_of(enable_stderrlog, logging_all) +netsnmp_feature_child_of(enable_stderrlog, logging_all); -netsnmp_feature_child_of(logging_enable_calllog, netsnmp_unused) -netsnmp_feature_child_of(logging_enable_loghandler, netsnmp_unused) +netsnmp_feature_child_of(logging_enable_calllog, netsnmp_unused); +netsnmp_feature_child_of(logging_enable_loghandler, netsnmp_unused); /* default to the file/stdio/syslog set */ -netsnmp_feature_want(logging_outputs) +netsnmp_feature_want(logging_outputs); /* * logh_head: A list of all log handlers, in increasing order of priority @@ -113,6 +119,17 @@ static int logh_enabled = 0; static char syslogname[64] = DEFAULT_LOG_ID; #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG */ +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO +netsnmp_log_handler * +netsnmp_register_stdio_loghandler(int is_stdout, int priority, int priority_max, + const char *tok); +#endif +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_FILE +netsnmp_log_handler * +netsnmp_register_filelog_handler(const char* logfilename, int priority, + int priority_max, int dont_zero_log); +#endif + void netsnmp_disable_this_loghandler(netsnmp_log_handler *logh) { @@ -137,14 +154,6 @@ void netsnmp_enable_filelog(netsnmp_log_handler *logh, int dont_zero_log); #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_FILE */ -#ifndef HAVE_VSNPRINTF - /* - * Need to use the UCD-provided one - */ -int vsnprintf(char *str, size_t count, const char *fmt, - va_list arg); -#endif - void parse_config_logOption(const char *token, char *cptr) { @@ -172,48 +181,6 @@ shutdown_snmp_logging(void) netsnmp_remove_loghandler( logh_head ); } -/* - * These definitions handle 4.2 systems without additional syslog facilities. - */ -#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG -#ifndef LOG_CONS -#define LOG_CONS 0 /* Don't bother if not defined... */ -#endif -#ifndef LOG_PID -#define LOG_PID 0 /* Don't bother if not defined... */ -#endif -#ifndef LOG_LOCAL0 -#define LOG_LOCAL0 0 -#endif -#ifndef LOG_LOCAL1 -#define LOG_LOCAL1 0 -#endif -#ifndef LOG_LOCAL2 -#define LOG_LOCAL2 0 -#endif -#ifndef LOG_LOCAL3 -#define LOG_LOCAL3 0 -#endif -#ifndef LOG_LOCAL4 -#define LOG_LOCAL4 0 -#endif -#ifndef LOG_LOCAL5 -#define LOG_LOCAL5 0 -#endif -#ifndef LOG_LOCAL6 -#define LOG_LOCAL6 0 -#endif -#ifndef LOG_LOCAL7 -#define LOG_LOCAL7 0 -#endif -#ifndef LOG_DAEMON -#define LOG_DAEMON 0 -#endif -#ifndef LOG_USER -#define LOG_USER 0 -#endif -#endif /* NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG */ - /* Set line buffering mode for a stream. */ void netsnmp_set_line_buffering(FILE *stream) @@ -240,7 +207,7 @@ netsnmp_set_line_buffering(FILE *stream) * OUT - points to last character after the decoded priority * @param pri_max - OUT - maximum priority (i.e. 0x7 from "0-7") */ -int +static int decode_priority( char **optarg, int *pri_max ) { int pri_low = LOG_DEBUG; @@ -309,7 +276,7 @@ decode_priority( char **optarg, int *pri_max ) } #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG -int +static int decode_facility( char *optarg ) { if (optarg == NULL) @@ -411,12 +378,7 @@ snmp_log_options(char *optarg, int argc, char *const *argv) optind++; /* Fallthrough */ case 'e': - logh = netsnmp_register_loghandler(NETSNMP_LOGHANDLER_STDERR, priority); - if (logh) { - netsnmp_set_line_buffering(stderr); - logh->pri_max = pri_max; - logh->token = strdup("stderr"); - } + logh = netsnmp_register_stdio_loghandler(0, priority, pri_max, "stderr"); break; /* @@ -429,25 +391,21 @@ snmp_log_options(char *optarg, int argc, char *const *argv) optind++; /* Fallthrough */ case 'o': - logh = netsnmp_register_loghandler(NETSNMP_LOGHANDLER_STDERR, priority); - if (logh) { - netsnmp_set_line_buffering(stdout); - logh->pri_max = pri_max; - logh->token = strdup("stdout"); - logh->imagic = 1; /* stdout, not stderr */ - } + logh = netsnmp_register_stdio_loghandler( 1, priority, pri_max, "stdout" ); break; #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_STDIO */ /* * Log to a named file */ +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_FILE case 'F': priority = decode_priority( &optarg, &pri_max ); - if (priority == -1 || !argv) return -1; - optarg = argv[++optind]; - /* Fallthrough */ -#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_FILE + if (priority == -1) return -1; + while (*optarg == ' ') optarg++; + if (!*optarg && !argv) return -1; + else if (!*optarg) optarg = argv[++optind]; + /* FALL THROUGH */ case 'f': if (inc_optind) optind++; @@ -455,14 +413,9 @@ snmp_log_options(char *optarg, int argc, char *const *argv) fprintf(stderr, "Missing log file\n"); return -1; } - logh = netsnmp_register_loghandler(NETSNMP_LOGHANDLER_FILE, priority); - if (logh) { - logh->pri_max = pri_max; - logh->token = strdup(optarg); - netsnmp_enable_filelog(logh, - netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_APPEND_LOGFILES)); - } + DEBUGMSGTL(("logging:options", "%d-%d: '%s'\n", priority, pri_max, optarg)); + logh = netsnmp_register_filelog_handler(optarg, priority, pri_max, + -1); break; #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_FILE */ @@ -491,7 +444,10 @@ snmp_log_options(char *optarg, int argc, char *const *argv) logh = netsnmp_register_loghandler(NETSNMP_LOGHANDLER_SYSLOG, priority); if (logh) { int facility = decode_facility(optarg); - if (facility == -1) return -1; + if (facility == -1) { + netsnmp_remove_loghandler(logh); + return -1; + } logh->pri_max = pri_max; logh->token = strdup(snmp_log_syslogname(NULL)); logh->magic = (void *)(intptr_t)facility; @@ -642,9 +598,7 @@ snmp_disable_filelog_entry(netsnmp_log_handler *logh) } netsnmp_disable_this_loghandler(logh); } -#endif /* NETSNMP_FEATURE_REMOVE_LOGGING_FILE */ -#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_FILE void snmp_disable_filelog(void) { @@ -657,6 +611,28 @@ snmp_disable_filelog(void) #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_FILE */ #ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO + +netsnmp_log_handler * +netsnmp_register_stdio_loghandler(int is_stdout, int priority, int priority_max, + const char *tok) +{ + netsnmp_log_handler *logh = + netsnmp_register_loghandler(NETSNMP_LOGHANDLER_STDERR, priority); + if (NULL == logh) { + return NULL; + } + if (is_stdout) { + netsnmp_set_line_buffering(stdout); + logh->imagic = 1; /* stdout, not stderr */ + } else + netsnmp_set_line_buffering(stderr); + + logh->pri_max = priority_max; + if (tok) + logh->token = strdup(tok); + return logh; +} + /* * returns that status of stderr logging * @@ -729,7 +705,9 @@ void netsnmp_logging_restart(void) { netsnmp_log_handler *logh; +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG int doneone = 0; +#endif /* NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG */ for (logh = logh_head; logh; logh = logh->next) { if (0 == logh->enabled) @@ -775,7 +753,7 @@ snmp_enable_syslog_ident(const char *ident, const int facility) void *eventlog_h = NULL; #endif - snmp_disable_syslog(); /* ??? */ + snmp_disable_syslog(); /* only one syslog at a time */ #ifdef WIN32 eventlog_h = OpenEventLog(NULL, ident); if (eventlog_h == NULL) { @@ -783,8 +761,8 @@ snmp_enable_syslog_ident(const char *ident, const int facility) * Hmmm..... * Maybe disable this handler, and log the error ? */ - fprintf(stderr, "Could not open event log for %s. " - "Last error: 0x%x\n", ident, GetLastError()); + fprintf(stderr, "Could not open event log for %s. Last error: %u\n", + ident, (unsigned int)GetLastError()); enable = 0; } #else @@ -839,6 +817,24 @@ netsnmp_enable_filelog(netsnmp_log_handler *logh, int dont_zero_log) netsnmp_enable_this_loghandler(logh); } +netsnmp_log_handler * +netsnmp_register_filelog_handler(const char* logfilename, int priority, + int priority_max, int dont_zero_log) +{ + netsnmp_log_handler *logh = + netsnmp_register_loghandler(NETSNMP_LOGHANDLER_FILE, + priority ); + if (NULL == logh) + return NULL; + logh->pri_max = priority_max; + logh->token = strdup(logfilename); + if (-1 == dont_zero_log) + dont_zero_log = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_APPEND_LOGFILES); + netsnmp_enable_filelog(logh, dont_zero_log); + return logh; +} + void snmp_enable_filelog(const char *logfilename, int dont_zero_log) { @@ -854,13 +850,10 @@ snmp_enable_filelog(const char *logfilename, int dont_zero_log) if (logfilename) { logh = netsnmp_find_loghandler( logfilename ); - if (!logh) { - logh = netsnmp_register_loghandler(NETSNMP_LOGHANDLER_FILE, - LOG_DEBUG ); - if (logh) - logh->token = strdup(logfilename); - } - if (logh) + if (!logh) + logh = netsnmp_register_filelog_handler( logfilename, LOG_DEBUG, + 0, dont_zero_log ); + else netsnmp_enable_filelog(logh, dont_zero_log); } else { for (logh = logh_head; logh; logh = logh->next) @@ -995,13 +988,19 @@ netsnmp_register_loghandler( int type, int priority ) DEBUGMSGT(("logging:register", "registering log type %d with pri %d\n", type, priority)); + if (priority > LOG_DEBUG) { + DEBUGMSGT(("logging:register", " limiting pri %d to %d\n", priority, + LOG_DEBUG)); + priority = LOG_DEBUG; + } logh->type = type; switch ( type ) { +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO case NETSNMP_LOGHANDLER_STDOUT: logh->imagic = 1; - /* fallthrough */ -#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_STDIO + logh->handler = log_handler_stdouterr; + break; case NETSNMP_LOGHANDLER_STDERR: logh->handler = log_handler_stdouterr; break; @@ -1078,7 +1077,8 @@ netsnmp_remove_loghandler( netsnmp_log_handler *logh ) logh->next->prev = logh->prev; for (i=LOG_EMERG; i<=logh->priority; i++) - logh_priorities[i] = NULL; + if (logh == logh_priorities[i]) + logh_priorities[i] = logh->next; free(NETSNMP_REMOVE_CONST(char*, logh->token)); SNMP_FREE(logh); @@ -1170,8 +1170,8 @@ log_handler_syslog( netsnmp_log_handler* logh, int pri, const char *str) * Hmmm..... * Maybe disable this handler, and log the error ? */ - fprintf(stderr, "Could not report event. Last error: 0x%x\n", - GetLastError()); + fprintf(stderr, "Could not report event. Last error: %u\n", + (unsigned int)GetLastError()); return 0; } return 1; @@ -1211,6 +1211,7 @@ log_handler_file( netsnmp_log_handler* logh, int pri, const char *str) { FILE *fhandle; char sbuf[40]; + int len = strlen( str ); /* * We use imagic to save information about whether the next output @@ -1239,7 +1240,11 @@ log_handler_file( netsnmp_log_handler* logh, int pri, const char *str) } fprintf(fhandle, "%s%s", sbuf, str); fflush(fhandle); - logh->imagic = str[strlen(str) - 1] == '\n'; + if (len > 0) { + logh->imagic = str[len - 1] == '\n'; + } else { + logh->imagic = 0; + } return 1; } #endif /* NETSNMP_FEATURE_REMOVE_LOGGING_FILE */ @@ -1312,6 +1317,8 @@ snmp_log_string(int priority, const char *str) /* * Start at the given priority, and work "upwards".... */ + if (priority > LOG_DEBUG) + priority = LOG_DEBUG; logh = logh_priorities[priority]; for ( ; logh; logh = logh->next ) { /* @@ -1362,53 +1369,17 @@ snmp_log_string(int priority, const char *str) int snmp_vlog(int priority, const char *format, va_list ap) { - char buffer[LOGLENGTH]; + char *buffer = NULL; int length; - char *dynamic; - va_list aq; - - va_copy(aq, ap); - length = vsnprintf(buffer, LOGLENGTH, format, ap); - va_end(ap); - if (length == 0) { -#ifdef NEED_VA_END_AFTER_VA_COPY - va_end(aq); -#endif - return (0); /* Empty string */ - } - - if (length == -1) { + length = vasprintf(&buffer, format, ap); + if (length < 0) { snmp_log_string(LOG_ERR, "Could not format log-string\n"); -#ifdef NEED_VA_END_AFTER_VA_COPY - va_end(aq); -#endif - return (-1); - } - - if (length < LOGLENGTH) { - snmp_log_string(priority, buffer); -#ifdef NEED_VA_END_AFTER_VA_COPY - va_end(aq); -#endif - return (0); - } - - dynamic = (char *) malloc(length + 1); - if (dynamic == NULL) { - snmp_log_string(LOG_ERR, - "Could not allocate memory for log-message\n"); - snmp_log_string(priority, buffer); -#ifdef NEED_VA_END_AFTER_VA_COPY - va_end(aq); -#endif - return (-2); + return -1; } - vsnprintf(dynamic, length + 1, format, aq); - snmp_log_string(priority, dynamic); - free(dynamic); - va_end(aq); + snmp_log_string(priority, buffer); + free(buffer); return 0; } diff --git a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c index 3b0eaa8..77f46c1 100644 --- a/snmplib/snmp_openssl.c +++ b/snmplib/snmp_openssl.c @@ -1,5 +1,14 @@ /* * snmp_openssl.c + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -8,14 +17,79 @@ #include +/** OpenSSL compat functions for apps */ +#if defined(NETSNMP_USE_OPENSSL) + +#include +#include +#include + +#ifndef HAVE_DH_GET0_PQG +void +DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) +{ + if (p != NULL) + *p = dh->p; + if (q != NULL) + *q = dh->q; + if (g != NULL) + *g = dh->g; +} +#endif + +#ifndef HAVE_DH_GET0_KEY +void +DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) +{ + if (pub_key != NULL) + *pub_key = dh->pub_key; + if (priv_key != NULL) + *priv_key = dh->priv_key; +} +#endif + +#ifndef HAVE_DH_SET0_PQG +int +DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + /* If the fields p and g in d are NULL, the corresponding input + * parameters MUST be non-NULL. q may remain NULL. + */ + if ((dh->p == NULL && p == NULL) + || (dh->g == NULL && g == NULL)) + return 0; + + if (p != NULL) { + BN_free(dh->p); + dh->p = p; + } + if (q != NULL) { + BN_free(dh->q); + dh->q = q; + } + if (g != NULL) { + BN_free(dh->g); + dh->g = g; + } + + if (q != NULL) { + dh->length = BN_num_bits(q); + } + + return 1; +} +#endif +#endif /* defined(NETSNMP_USE_OPENSSL) */ + +/** TLS/DTLS certificatte support */ #if defined(NETSNMP_USE_OPENSSL) && defined(HAVE_LIBSSL) && !defined(NETSNMP_FEATURE_REMOVE_CERT_UTIL) -netsnmp_feature_require(container_free_all) +netsnmp_feature_require(container_free_all); -netsnmp_feature_child_of(openssl_cert_get_subjectAltNames, netsnmp_unused) -netsnmp_feature_child_of(openssl_ht2nid, netsnmp_unused) -netsnmp_feature_child_of(openssl_err_log, netsnmp_unused) -netsnmp_feature_child_of(cert_dump_names, netsnmp_unused) +netsnmp_feature_child_of(openssl_cert_get_subjectAltNames, netsnmp_unused); +netsnmp_feature_child_of(openssl_ht2nid, netsnmp_unused); +netsnmp_feature_child_of(openssl_err_log, netsnmp_unused); +netsnmp_feature_child_of(cert_dump_names, netsnmp_unused); #include @@ -47,10 +121,18 @@ void netsnmp_init_openssl(void) { DEBUGMSGTL(("snmp_openssl", "initializing\n")); /* Initializing OpenSSL */ +#ifdef HAVE_SSL_LIBRARY_INIT SSL_library_init(); +#endif +#ifdef HAVE_SSL_LOAD_ERROR_STRINGS SSL_load_error_strings(); +#endif +#ifdef HAVE_ERR_LOAD_BIO_STRINGS ERR_load_BIO_strings(); +#endif +#ifdef HAVE_OPENSSL_ADD_ALL_ALGORITHMS OpenSSL_add_all_algorithms(); +#endif } /** netsnmp_openssl_cert_get_name: get subject name field from cert @@ -141,6 +223,7 @@ netsnmp_openssl_cert_get_commonName(X509 *ocert, char **buf, int *len) } #ifndef NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES + /** netsnmp_openssl_cert_dump_name: dump subject names in cert */ void @@ -148,6 +231,7 @@ netsnmp_openssl_cert_dump_names(X509 *ocert) { int i, onid; X509_NAME_ENTRY *oname_entry; + ASN1_STRING *oname_value; X509_NAME *osubj_name; const char *prefix_short, *prefix_long; @@ -163,12 +247,13 @@ netsnmp_openssl_cert_dump_names(X509 *ocert) for (i = 0; i < X509_NAME_entry_count(osubj_name); i++) { oname_entry = X509_NAME_get_entry(osubj_name, i); netsnmp_assert(NULL != oname_entry); + oname_value = X509_NAME_ENTRY_get_data(oname_entry); - if (oname_entry->value->type != V_ASN1_PRINTABLESTRING) + if (oname_value->type != V_ASN1_PRINTABLESTRING) continue; /** get NID */ - onid = OBJ_obj2nid(oname_entry->object); + onid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(oname_entry)); if (onid == NID_undef) { prefix_long = prefix_short = "UNKNOWN"; } @@ -179,9 +264,9 @@ netsnmp_openssl_cert_dump_names(X509 *ocert) DEBUGMSGT(("9:cert:dump:names", "[%02d] NID type %d, ASN type %d\n", i, onid, - oname_entry->value->type)); + oname_value->type)); DEBUGMSGT(("9:cert:dump:names", "%s/%s: '%s'\n", prefix_long, - prefix_short, ASN1_STRING_data(oname_entry->value))); + prefix_short, ASN1_STRING_get0_data(oname_value))); } } #endif /* NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES */ @@ -204,31 +289,30 @@ _cert_get_extension(X509_EXTENSION *oext, char **buf, int *len, int flags) } if (X509V3_EXT_print(bio, oext, 0, 0) != 1) { snmp_log(LOG_ERR, "could not print extension!\n"); - BIO_vfree(bio); - return NULL; + goto out; } space = BIO_get_mem_data(bio, &data); if (buf && *buf) { - if (*len < space) - buf_ptr = NULL; - else - buf_ptr = *buf; + if (*len < space + 1) { + snmp_log(LOG_ERR, "not enough buffer space to print extension\n"); + goto out; + } + buf_ptr = *buf; + } else { + buf_ptr = calloc(1, space + 1); } - else - buf_ptr = calloc(1,space + 1); if (!buf_ptr) { - snmp_log(LOG_ERR, - "not enough space or error in allocation for extenstion\n"); - BIO_vfree(bio); - return NULL; + snmp_log(LOG_ERR, "error in allocation for extension\n"); + goto out; } memcpy(buf_ptr, data, space); buf_ptr[space] = 0; if (len) *len = space; +out: BIO_vfree(bio); return buf_ptr; @@ -303,6 +387,7 @@ _cert_get_extension_id(X509 *ocert, int which, char **buf, int *len, int flags) return _cert_get_extension_at(ocert, pos, buf, len, flags); } +#ifndef NETSNMP_FEATURE_REMOVE_OPENSSL_CERT_GET_SUBJECTALTNAMES /** _cert_get_extension_id_str: get extension field from cert * @internal */ @@ -325,6 +410,7 @@ _cert_get_extension_id_str(X509 *ocert, int which, char **buf, int *len, return _cert_get_extension_str_at(ocert, pos, buf, len, flags); } +#endif /* NETSNMP_FEATURE_REMOVE_OPENSSL_CERT_GET_SUBJECTALTNAMES */ static char * _extract_oname(const GENERAL_NAME *oname) @@ -397,7 +483,7 @@ netsnmp_openssl_cert_dump_extensions(X509 *ocert) { X509_EXTENSION *extension; const char *extension_name; - char buf[SNMP_MAXBUF_SMALL], *buf_ptr = buf, *str, *lf; + char buf[SNMP_MAXBUF], *buf_ptr = buf, *str, *lf; int i, num_extensions, buf_len, nid; if (NULL == ocert) @@ -417,6 +503,11 @@ netsnmp_openssl_cert_dump_extensions(X509 *ocert) extension_name = OBJ_nid2sn(nid); buf_len = sizeof(buf); str = _cert_get_extension_str_at(ocert, i, &buf_ptr, &buf_len, 0); + if (!str) { + DEBUGMSGT(("9:cert:dump", " %2d: %s\n", i, + extension_name)); + continue; + } lf = strchr(str, '\n'); /* look for multiline strings */ if (NULL != lf) *lf = '\0'; /* only log first line of multiline here */ @@ -435,18 +526,54 @@ netsnmp_openssl_cert_dump_extensions(X509 *ocert) } } -static int _htmap[NS_HASH_MAX + 1] = { - 0, NID_md5WithRSAEncryption, NID_sha1WithRSAEncryption, - NID_sha224WithRSAEncryption, NID_sha256WithRSAEncryption, - NID_sha384WithRSAEncryption, NID_sha512WithRSAEncryption }; +static const struct { + uint16_t nid; + uint16_t ht; +} _htmap[] = { + { 0, NS_HASH_NONE }, +#ifdef NID_md5WithRSAEncryption + { NID_md5WithRSAEncryption, NS_HASH_MD5 }, +#endif +#ifdef NID_sha1WithRSAEncryption + { NID_sha1WithRSAEncryption, NS_HASH_SHA1 }, +#endif +#ifdef NID_ecdsa_with_SHA1 + { NID_ecdsa_with_SHA1, NS_HASH_SHA1 }, +#endif +#ifdef NID_sha224WithRSAEncryption + { NID_sha224WithRSAEncryption, NS_HASH_SHA224 }, +#endif +#ifdef NID_ecdsa_with_SHA224 + { NID_ecdsa_with_SHA224, NS_HASH_SHA224 }, +#endif +#ifdef NID_sha256WithRSAEncryption + { NID_sha256WithRSAEncryption, NS_HASH_SHA256 }, +#endif +#ifdef NID_ecdsa_with_SHA256 + { NID_ecdsa_with_SHA256, NS_HASH_SHA256 }, +#endif +#ifdef NID_sha384WithRSAEncryption + { NID_sha384WithRSAEncryption, NS_HASH_SHA384 }, +#endif +#ifdef NID_ecdsa_with_SHA384 + { NID_ecdsa_with_SHA384, NS_HASH_SHA384 }, +#endif +#ifdef NID_sha512WithRSAEncryption + { NID_sha512WithRSAEncryption, NS_HASH_SHA512 }, +#endif +#ifdef NID_ecdsa_with_SHA512 + { NID_ecdsa_with_SHA512, NS_HASH_SHA512 }, +#endif +}; int _nid2ht(int nid) { int i; - for (i=1; i<= NS_HASH_MAX; ++i) { - if (nid == _htmap[i]) - return i; + + for (i = 0; i < sizeof(_htmap) / sizeof(_htmap[0]); i++) { + if (_htmap[i].nid == nid) + return _htmap[i].ht; } return 0; } @@ -455,9 +582,13 @@ _nid2ht(int nid) int _ht2nid(int ht) { - if ((ht < 0) || (ht > NS_HASH_MAX)) - return 0; - return _htmap[ht]; + int i; + + for (i = 0; i < sizeof(_htmap) / sizeof(_htmap[0]); i++) { + if (_htmap[i].ht == ht) + return _htmap[i].nid; + } + return 0; } #endif /* NETSNMP_FEATURE_REMOVE_OPENSSL_HT2NID */ @@ -470,7 +601,7 @@ netsnmp_openssl_cert_get_hash_type(X509 *ocert) if (NULL == ocert) return 0; - return _nid2ht(OBJ_obj2nid(ocert->sig_alg->algorithm)); + return _nid2ht(X509_get_signature_nid(ocert)); } /** @@ -487,7 +618,7 @@ netsnmp_openssl_cert_get_fingerprint(X509 *ocert, int alg) if (NULL == ocert) return NULL; - nid = OBJ_obj2nid(ocert->sig_alg->algorithm); + nid = X509_get_signature_nid(ocert); DEBUGMSGT(("9:openssl:fingerprint", "alg %d, cert nid %d (%d)\n", alg, nid, _nid2ht(nid))); @@ -502,7 +633,7 @@ netsnmp_openssl_cert_get_fingerprint(X509 *ocert, int alg) case NS_HASH_NONE: snmp_log(LOG_ERR, "hash type none not supported. using SHA1\n"); - /** fall through */ + /* FALLTHROUGH */ case NS_HASH_SHA1: digest = EVP_sha1(); @@ -563,11 +694,12 @@ netsnmp_openssl_get_cert_chain(SSL *ssl) char *fingerprint; netsnmp_container *chain_map; netsnmp_cert_map *cert_map; - int i; + int i, sk_num_res; netsnmp_assert_or_return(ssl != NULL, NULL); - - if (NULL == (ocert = SSL_get_peer_certificate(ssl))) { + + ocert = SSL_get_peer_certificate(ssl); + if (!ocert) { /** no peer cert */ snmp_log(LOG_ERR, "SSL peer has no certificate\n"); return NULL; @@ -605,7 +737,8 @@ netsnmp_openssl_get_cert_chain(SSL *ssl) /** check for a chain to a CA */ ochain = SSL_get_peer_cert_chain(ssl); - if ((NULL == ochain) || (0 == sk_num((const void *)ochain))) { + sk_num_res = sk_num((const void *)ochain); + if (!ochain || sk_num_res == 0) { DEBUGMSGT(("ssl:cert:chain", "peer has no cert chain\n")); } else { @@ -613,10 +746,10 @@ netsnmp_openssl_get_cert_chain(SSL *ssl) * loop over chain, adding fingerprint / cert for each */ DEBUGMSGT(("ssl:cert:chain", "examining cert chain\n")); - for(i = 0; i < sk_num((const void *)ochain); ++i) { + sk_num_res = sk_num((const void *)ochain); + for(i = 0; i < sk_num_res; ++i) { ocert_tmp = (X509*)sk_value((const void *)ochain,i); - fingerprint = netsnmp_openssl_cert_get_fingerprint(ocert_tmp, - NS_HASH_SHA1); + fingerprint = netsnmp_openssl_cert_get_fingerprint(ocert_tmp, -1); if (NULL == fingerprint) break; cert_map = netsnmp_cert_map_alloc(NULL, ocert); @@ -632,7 +765,7 @@ netsnmp_openssl_get_cert_chain(SSL *ssl) /* * if we broke out of loop before finishing, clean up */ - if (i < sk_num((const void *)ochain)) + if (i < sk_num_res) CONTAINER_FREE_ALL(chain_map, NULL); } /* got peer chain */ @@ -706,15 +839,16 @@ _cert_get_san_type(X509 *ocert, int mapType) if (GEN_DNS == oname->type) { if ((TSNM_tlstmCertSANDNSName == mapType) || (TSNM_tlstmCertSANAny == mapType)) { - lower = buf = _extract_oname( oname );; + lower = buf = _extract_oname( oname ); break; } } else if (GEN_IPADD == oname->type) { if ((TSNM_tlstmCertSANIpAddress == mapType) || - (TSNM_tlstmCertSANAny == mapType)) + (TSNM_tlstmCertSANAny == mapType)) { buf = _extract_oname(oname); break; + } } else if (GEN_EMAIL == oname->type) { if ((TSNM_tlstmCertSANRFC822Name == mapType) || @@ -736,8 +870,7 @@ _cert_get_san_type(X509 *ocert, int mapType) if (lower) for ( ; *lower; ++lower ) - if (isascii(*lower)) - *lower = tolower(0xFF & *lower); + *lower = tolower(0xFF & *lower); DEBUGMSGT(("openssl:cert:extension:san", "#%d type %d: %s\n", i, oname ? oname->type : -1, buf ? buf : "NULL")); @@ -819,8 +952,8 @@ netsnmp_openssl_err_log(const char *prefix) unsigned long err; for (err = ERR_get_error(); err; err = ERR_get_error()) { snmp_log(LOG_ERR,"%s: %ld\n", prefix ? prefix: "openssl error", err); - snmp_log(LOG_ERR, "library=%d, function=%d, reason=%d\n", - ERR_GET_LIB(err), ERR_GET_FUNC(err), ERR_GET_REASON(err)); + snmp_log(LOG_ERR, "library=%d, reason=%d\n", ERR_GET_LIB(err), + ERR_GET_REASON(err)); } } #endif /* NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG */ @@ -876,4 +1009,50 @@ netsnmp_openssl_null_checks(SSL *ssl, int *null_auth, int *null_cipher) } } +#ifndef HAVE_X509_GET_SIGNATURE_NID +int X509_get_signature_nid(const X509 *x) +{ + return OBJ_obj2nid(x->sig_alg->algorithm); +} +#endif + +#ifndef HAVE_ASN1_STRING_GET0_DATA +const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x) +{ + return x->data; +} +#endif + +#ifndef HAVE_X509_NAME_ENTRY_GET_OBJECT +ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne) +{ + if (ne == NULL) + return NULL; + return ne->object; +} +#endif + +#ifndef HAVE_X509_NAME_ENTRY_GET_DATA +ASN1_STRING *X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne) +{ + if (ne == NULL) + return NULL; + return ne->value; +} +#endif + +#ifndef HAVE_TLS_METHOD +const SSL_METHOD *TLS_method(void) +{ + return TLSv1_method(); +} +#endif + +#ifndef HAVE_DTLS_METHOD +const SSL_METHOD *DTLS_method(void) +{ + return DTLSv1_method(); +} +#endif + #endif /* NETSNMP_USE_OPENSSL && HAVE_LIBSSL && !defined(NETSNMP_FEATURE_REMOVE_CERT_UTIL) */ diff --git a/snmplib/snmp_parse_args.c b/snmplib/snmp_parse_args.c index 6842d0e..1e30eaa 100644 --- a/snmplib/snmp_parse_args.c +++ b/snmplib/snmp_parse_args.c @@ -10,48 +10,53 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -59,6 +64,7 @@ #include #include #include +#include #include /* for "internal" definitions */ #include @@ -73,8 +79,6 @@ #include #include -int random_access = 0; - void snmp_parse_args_usage(FILE * outf) { @@ -99,7 +103,7 @@ snmp_parse_args_descriptions(FILE * outf) #endif /* support for community based SNMP */ fprintf(outf, "SNMP Version 3 specific\n"); fprintf(outf, - " -a PROTOCOL\t\tset authentication protocol (MD5|SHA)\n"); + " -a PROTOCOL\t\tset authentication protocol (MD5|SHA|SHA-224|SHA-256|SHA-384|SHA-512)\n"); fprintf(outf, " -A PASSPHRASE\t\tset authentication protocol pass phrase\n"); fprintf(outf, @@ -111,7 +115,11 @@ snmp_parse_args_descriptions(FILE * outf) fprintf(outf, " -n CONTEXT\t\tset context name (e.g. bridge1)\n"); fprintf(outf, " -u USER-NAME\t\tset security name (e.g. bert)\n"); #ifdef HAVE_AES - fprintf(outf, " -x PROTOCOL\t\tset privacy protocol (DES|AES)\n"); + fprintf(outf, " -x PROTOCOL\t\tset privacy protocol (DES|AES" +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + "|AES-192|AES-256" +#endif + ")\n"); #else fprintf(outf, " -x PROTOCOL\t\tset privacy protocol (DES)\n"); #endif @@ -186,10 +194,6 @@ handle_long_opt(const char *myoptarg) free(cp); } -extern int snmpv3_options(char *optarg, netsnmp_session * session, - char **Apsz, char **Xpsz, int argc, - char *const *argv); - int netsnmp_parse_args(int argc, char **argv, @@ -197,20 +201,20 @@ netsnmp_parse_args(int argc, void (*proc) (int, char *const *, int), int flags) { - static char *sensitive[4] = { NULL, NULL, NULL, NULL }; - int arg, sp = 0, testcase = 0; + int arg, ret, sp = 0; char *cp; char *Apsz = NULL; char *Xpsz = NULL; char *Cpsz = NULL; char Opts[BUF_SIZE]; int zero_sensitive = !( flags & NETSNMP_PARSE_ARGS_NOZERO ); + char *backup_NETSNMP_DS_LIB_OUTPUT_PRECISION = NULL; /* * initialize session to default values */ snmp_sess_init(session); - strcpy(Opts, "Y:VhHm:M:O:I:P:D:dv:r:t:c:Z:e:E:n:u:l:x:X:a:A:p:T:-:3:L:"); + strcpy(Opts, "Y:VhHm:M:O:I:P:D:dv:r:t:c:Z:e:E:n:u:l:x:X:a:A:p:T:-:3:L:s:"); if (localOpts) { if (strlen(localOpts) + strlen(Opts) >= sizeof(Opts)) { snmp_log(LOG_ERR, "Too many localOpts in snmp_parse_args()\n"); @@ -229,15 +233,18 @@ netsnmp_parse_args(int argc, optind = 1; while ((arg = getopt(argc, argv, Opts)) != EOF) { - DEBUGMSGTL(("snmp_parse_args", "handling (#%d): %c\n", optind, arg)); + DEBUGMSGTL(("snmp_parse_args", "handling (#%d): %c (optarg %s) (sp %d)\n", + optind, arg, optarg, sp)); switch (arg) { case '-': if (strcasecmp(optarg, "help") == 0) { - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } if (strcasecmp(optarg, "version") == 0) { fprintf(stderr,"NET-SNMP version: %s\n",netsnmp_get_version()); - return (NETSNMP_PARSE_ARGS_SUCCESS_EXIT); + ret = NETSNMP_PARSE_ARGS_SUCCESS_EXIT; + goto out; } handle_long_opt(optarg); @@ -245,17 +252,19 @@ netsnmp_parse_args(int argc, case 'V': fprintf(stderr, "NET-SNMP version: %s\n", netsnmp_get_version()); - return (NETSNMP_PARSE_ARGS_SUCCESS_EXIT); + ret = NETSNMP_PARSE_ARGS_SUCCESS_EXIT; + goto out; case 'h': - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - break; + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; case 'H': - init_snmp("snmpapp"); + init_snmp(NETSNMP_APPLICATION_CONFIG_TYPE); fprintf(stderr, "Configuration directives understood:\n"); read_config_print_usage(" "); - return (NETSNMP_PARSE_ARGS_SUCCESS_EXIT); + ret = NETSNMP_PARSE_ARGS_SUCCESS_EXIT; + goto out; case 'Y': netsnmp_config_remember(optarg); @@ -273,11 +282,12 @@ netsnmp_parse_args(int argc, #endif /* NETSNMP_DISABLE_MIB_LOADING */ case 'O': - cp = snmp_out_toggle_options(optarg); + cp = snmp_out_options(optarg, argc, argv); if (cp != NULL) { fprintf(stderr, "Unknown output option passed to -O: %c.\n", *cp); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; @@ -286,7 +296,8 @@ netsnmp_parse_args(int argc, if (cp != NULL) { fprintf(stderr, "Unknown input option passed to -I: %c.\n", *cp); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; @@ -296,7 +307,8 @@ netsnmp_parse_args(int argc, if (cp != NULL) { fprintf(stderr, "Unknown parsing option passed to -P: %c.\n", *cp); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; #endif /* NETSNMP_DISABLE_MIB_LOADING */ @@ -304,7 +316,8 @@ netsnmp_parse_args(int argc, case 'D': #ifdef NETSNMP_NO_DEBUGGING fprintf(stderr, "Debug not configured in\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; #else debug_register_tokens(optarg); snmp_set_do_debugging(1); @@ -316,6 +329,10 @@ netsnmp_parse_args(int argc, NETSNMP_DS_LIB_DUMP_PACKET, 1); break; + case 's': + session->localname = strdup(optarg); + break; + case 'v': session->version = -1; #ifndef NETSNMP_DISABLE_SNMPV1 @@ -335,15 +352,16 @@ netsnmp_parse_args(int argc, fprintf(stderr, "Invalid version specified after -v flag: %s\n", optarg); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; case 'p': fprintf(stderr, "Warning: -p option is no longer used - "); fprintf(stderr, "specify the remote host as HOST:PORT\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - break; + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; case 'T': { @@ -355,7 +373,9 @@ netsnmp_parse_args(int argc, tmpcp = strchr(tmpopt, '='); if (!tmpcp) { fprintf(stderr, "-T expects a NAME=VALUE pair.\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + free(tmpopt); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } *tmpcp++ = '\0'; @@ -367,7 +387,8 @@ netsnmp_parse_args(int argc, if (!session->transport_configuration) { fprintf(stderr, "failed to initialize the transport configuration container\n"); free(tmpopt); - return (NETSNMP_PARSE_ARGS_ERROR); + ret = NETSNMP_PARSE_ARGS_ERROR; + goto out; } session->transport_configuration->compare = @@ -390,7 +411,8 @@ netsnmp_parse_args(int argc, session->timeout = (long)(atof(optarg) * 1000000L); if (session->timeout <= 0) { fprintf(stderr, "Invalid timeout in seconds after -t flag.\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; @@ -398,244 +420,66 @@ netsnmp_parse_args(int argc, session->retries = atoi(optarg); if (session->retries < 0 || !isdigit((unsigned char)(optarg[0]))) { fprintf(stderr, "Invalid number of retries after -r flag.\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; case 'c': if (zero_sensitive) { - if ((sensitive[sp] = strdup(optarg)) != NULL) { - Cpsz = sensitive[sp]; + SNMP_FREE(Cpsz); /* free any previous value */ + if ((Cpsz = strdup(optarg)) != NULL) { memset(optarg, '\0', strlen(optarg)); - sp++; } else { fprintf(stderr, "malloc failure processing -c flag.\n"); - return NETSNMP_PARSE_ARGS_ERROR; + ret = NETSNMP_PARSE_ARGS_ERROR; + goto out; } } else { - Cpsz = optarg; + Cpsz = strdup(optarg); } break; case '3': - /* TODO: This needs to zero things too. */ - if (snmpv3_options(optarg, session, &Apsz, &Xpsz, argc, argv) < 0){ - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + if (snmpv3_parse_args(optarg, session, &Apsz, &Xpsz, argc, argv, + flags) < 0){ + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; case 'L': if (snmp_log_options(optarg, argc, argv) < 0) { - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } break; #define SNMPV3_CMD_OPTIONS #ifdef SNMPV3_CMD_OPTIONS case 'Z': - errno = 0; - session->engineBoots = strtoul(optarg, &cp, 10); - if (errno || cp == optarg) { - fprintf(stderr, "Need engine boots value after -Z flag.\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - if (*cp == ',') { - char *endptr; - cp++; - session->engineTime = strtoul(cp, &endptr, 10); - if (errno || cp == endptr) { - fprintf(stderr, "Need engine time after \"-Z engineBoot,\".\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - } - /* - * Handle previous '-Z boot time' syntax - */ - else if (optind < argc) { - session->engineTime = strtoul(argv[optind], &cp, 10); - if (errno || cp == argv[optind]) { - fprintf(stderr, "Need engine time after \"-Z engineBoot\".\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - } else { - fprintf(stderr, "Need engine time after \"-Z engineBoot\".\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - break; - - case 'e':{ - size_t ebuf_len = 32, eout_len = 0; - u_char *ebuf = (u_char *)malloc(ebuf_len); - - if (ebuf == NULL) { - fprintf(stderr, "malloc failure processing -e flag.\n"); - return (NETSNMP_PARSE_ARGS_ERROR); - } - if (!snmp_hex_to_binary - (&ebuf, &ebuf_len, &eout_len, 1, optarg)) { - fprintf(stderr, "Bad engine ID value after -e flag.\n"); - free(ebuf); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - if ((eout_len < 5) || (eout_len > 32)) { - fprintf(stderr, "Invalid engine ID value after -e flag.\n"); - free(ebuf); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - session->securityEngineID = ebuf; - session->securityEngineIDLen = eout_len; - break; - } - - case 'E':{ - size_t ebuf_len = 32, eout_len = 0; - u_char *ebuf = (u_char *)malloc(ebuf_len); - - if (ebuf == NULL) { - fprintf(stderr, "malloc failure processing -E flag.\n"); - return (NETSNMP_PARSE_ARGS_ERROR); - } - if (!snmp_hex_to_binary(&ebuf, &ebuf_len, - &eout_len, 1, optarg)) { - fprintf(stderr, "Bad engine ID value after -E flag.\n"); - free(ebuf); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - if ((eout_len < 5) || (eout_len > 32)) { - fprintf(stderr, "Invalid engine ID value after -E flag.\n"); - free(ebuf); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - session->contextEngineID = ebuf; - session->contextEngineIDLen = eout_len; - break; - } - + case 'e': + case 'E': case 'n': - session->contextName = optarg; - session->contextNameLen = strlen(optarg); - break; - - case 'u': - if (zero_sensitive) { - if ((sensitive[sp] = strdup(optarg)) != NULL) { - session->securityName = sensitive[sp]; - session->securityNameLen = strlen(sensitive[sp]); - memset(optarg, '\0', strlen(optarg)); - sp++; - } else { - fprintf(stderr, "malloc failure processing -u flag.\n"); - return NETSNMP_PARSE_ARGS_ERROR; - } - } else { - session->securityName = optarg; - session->securityNameLen = strlen(optarg); - } - break; - case 'l': - if (!strcasecmp(optarg, "noAuthNoPriv") || !strcmp(optarg, "1") - || !strcasecmp(optarg, "noauth") - || !strcasecmp(optarg, "nanp")) { - session->securityLevel = SNMP_SEC_LEVEL_NOAUTH; - } else if (!strcasecmp(optarg, "authNoPriv") - || !strcmp(optarg, "2") - || !strcasecmp(optarg, "auth") - || !strcasecmp(optarg, "anp")) { - session->securityLevel = SNMP_SEC_LEVEL_AUTHNOPRIV; - } else if (!strcasecmp(optarg, "authPriv") - || !strcmp(optarg, "3") - || !strcasecmp(optarg, "priv") - || !strcasecmp(optarg, "ap")) { - session->securityLevel = SNMP_SEC_LEVEL_AUTHPRIV; - } else { - fprintf(stderr, - "Invalid security level specified after -l flag: %s\n", - optarg); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - - break; - + case 'u': #ifdef NETSNMP_SECMOD_USM case 'a': -#ifndef NETSNMP_DISABLE_MD5 - if (!strcasecmp(optarg, "MD5")) { - session->securityAuthProto = usmHMACMD5AuthProtocol; - session->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN; - } else -#endif - if (!strcasecmp(optarg, "SHA")) { - session->securityAuthProto = usmHMACSHA1AuthProtocol; - session->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN; - } else { - fprintf(stderr, - "Invalid authentication protocol specified after -a flag: %s\n", - optarg); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - break; - case 'x': - testcase = 0; -#ifndef NETSNMP_DISABLE_DES - if (!strcasecmp(optarg, "DES")) { - testcase = 1; - session->securityPrivProto = usmDESPrivProtocol; - session->securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; - } -#endif -#ifdef HAVE_AES - if (!strcasecmp(optarg, "AES128") || - !strcasecmp(optarg, "AES")) { - testcase = 1; - session->securityPrivProto = usmAESPrivProtocol; - session->securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN; - } -#endif - if (testcase == 0) { - fprintf(stderr, - "Invalid privacy protocol specified after -x flag: %s\n", - optarg); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - } - break; - case 'A': - if (zero_sensitive) { - if ((sensitive[sp] = strdup(optarg)) != NULL) { - Apsz = sensitive[sp]; - memset(optarg, '\0', strlen(optarg)); - sp++; - } else { - fprintf(stderr, "malloc failure processing -A flag.\n"); - return NETSNMP_PARSE_ARGS_ERROR; - } - } else { - Apsz = optarg; - } - break; - case 'X': - if (zero_sensitive) { - if ((sensitive[sp] = strdup(optarg)) != NULL) { - Xpsz = sensitive[sp]; - memset(optarg, '\0', strlen(optarg)); - sp++; - } else { - fprintf(stderr, "malloc failure processing -X flag.\n"); - return NETSNMP_PARSE_ARGS_ERROR; - } - } else { - Xpsz = optarg; - } +#endif /* NETSNMP_SECMOD_USM */ + if (snmpv3_parse_arg(arg, optarg, session, &Apsz, &Xpsz, argc, + argv, flags) < 0){ + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; + } break; #endif /* SNMPV3_CMD_OPTIONS */ -#endif /* NETSNMP_SECMOD_USM */ case '?': - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); - break; + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; default: proc(argc, argv, arg); @@ -645,9 +489,26 @@ netsnmp_parse_args(int argc, DEBUGMSGTL(("snmp_parse_args", "finished: %d/%d\n", optind, argc)); /* - * read in MIB database and initialize the snmp library + * save command line parameters which should have precedence above config file settings + * (There ought to be a more scalable approach than this....) + */ + if (netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OUTPUT_PRECISION)) { + backup_NETSNMP_DS_LIB_OUTPUT_PRECISION = + strdup(netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OUTPUT_PRECISION)); + } + + /* + * read in MIB database and initialize the snmp library, read the config file */ - init_snmp("snmpapp"); + init_snmp(NETSNMP_APPLICATION_CONFIG_TYPE); + + /* + * restore command line parameters which should have precedence above config file settings + */ + if(backup_NETSNMP_DS_LIB_OUTPUT_PRECISION) { + netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OUTPUT_PRECISION, backup_NETSNMP_DS_LIB_OUTPUT_PRECISION); + free(backup_NETSNMP_DS_LIB_OUTPUT_PRECISION); + } /* * session default version @@ -710,20 +571,10 @@ netsnmp_parse_args(int argc, snmp_duplicate_objid(def, session->securityAuthProtoLen); } if (session->securityAuthProto == NULL) { -#ifndef NETSNMP_DISABLE_MD5 - /* - * assume MD5 - */ session->securityAuthProto = - snmp_duplicate_objid(usmHMACMD5AuthProtocol, - USM_AUTH_PROTO_MD5_LEN); - session->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN; -#else - session->securityAuthProto = - snmp_duplicate_objid(usmHMACSHA1AuthProtocol, - USM_AUTH_PROTO_SHA_LEN); - session->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN; -#endif + snmp_duplicate_objid(SNMP_DEFAULT_AUTH_PROTO, + SNMP_DEFAULT_AUTH_PROTOLEN); + session->securityAuthProtoLen = SNMP_DEFAULT_AUTH_PROTOLEN; } if (generate_Ku(session->securityAuthProto, session->securityAuthProtoLen, @@ -733,8 +584,11 @@ netsnmp_parse_args(int argc, snmp_perror(argv[0]); fprintf(stderr, "Error generating a key (Ku) from the supplied authentication pass phrase. \n"); - return (NETSNMP_PARSE_ARGS_ERROR); + ret = NETSNMP_PARSE_ARGS_ERROR; + goto out; } + free(Apsz); + Apsz = NULL; } if (Xpsz) { session->securityPrivKeyLen = USM_PRIV_KU_LEN; @@ -748,21 +602,10 @@ netsnmp_parse_args(int argc, snmp_duplicate_objid(def, session->securityPrivProtoLen); } if (session->securityPrivProto == NULL) { - /* - * assume DES - */ -#ifndef NETSNMP_DISABLE_DES - session->securityPrivProto = - snmp_duplicate_objid(usmDESPrivProtocol, - USM_PRIV_PROTO_DES_LEN); - session->securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; -#else session->securityPrivProto = - snmp_duplicate_objid(usmAESPrivProtocol, - USM_PRIV_PROTO_AES_LEN); - session->securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN; -#endif - + snmp_duplicate_objid(SNMP_DEFAULT_PRIV_PROTO, + SNMP_DEFAULT_PRIV_PROTOLEN); + session->securityPrivProtoLen = SNMP_DEFAULT_PRIV_PROTOLEN; } if (generate_Ku(session->securityAuthProto, session->securityAuthProtoLen, @@ -772,8 +615,11 @@ netsnmp_parse_args(int argc, snmp_perror(argv[0]); fprintf(stderr, "Error generating a key (Ku) from the supplied privacy pass phrase. \n"); - return (NETSNMP_PARSE_ARGS_ERROR); + ret = NETSNMP_PARSE_ARGS_ERROR; + goto out; } + free(Xpsz); + Xpsz = NULL; } #endif /* NETSNMP_SECMOD_USM */ @@ -782,9 +628,10 @@ netsnmp_parse_args(int argc, */ if (optind == argc) { fprintf(stderr, "No hostname specified.\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } - session->peername = argv[optind++]; /* hostname */ + session->peername = strdup(argv[optind++]); /* hostname */ #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) /* @@ -816,17 +663,27 @@ netsnmp_parse_args(int argc, session->community_len = 0; } else { fprintf(stderr, "No community name specified.\n"); - return (NETSNMP_PARSE_ARGS_ERROR_USAGE); + ret = NETSNMP_PARSE_ARGS_ERROR_USAGE; + goto out; } - } + } else { + Cpsz = NULL; + } } else { session->community = (unsigned char *)Cpsz; session->community_len = strlen(Cpsz); + Cpsz = NULL; } } #endif /* support for community based SNMP */ - return optind; + ret = optind; + +out: + free(Apsz); + free(Xpsz); + free(Cpsz); + return ret; } int diff --git a/snmplib/snmp_secmod.c b/snmplib/snmp_secmod.c index 9e60a42..1362a68 100644 --- a/snmplib/snmp_secmod.c +++ b/snmplib/snmp_secmod.c @@ -1,26 +1,31 @@ /* * security service wrapper to support pluggable security models + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -63,9 +68,9 @@ int register_sec_mod(int secmod, const char *modname, struct snmp_secmod_def *newdef) { - int result; + int result = 0; struct snmp_secmod_list *sptr; - char *othername; + char *othername, *modname2 = NULL; for (sptr = registered_services; sptr; sptr = sptr->next) { if (sptr->securityModel == secmod) { @@ -79,9 +84,12 @@ register_sec_mod(int secmod, const char *modname, sptr->securityModel = secmod; sptr->next = registered_services; registered_services = sptr; - if ((result = - se_add_pair_to_slist("snmp_secmods", strdup(modname), secmod)) - != SE_OK) { + modname2 = strdup(modname); + if (!modname2) + result = SE_NOMEM; + else + result = se_add_pair_to_slist("snmp_secmods", modname2, secmod); + if (result != SE_OK) { switch (result) { case SE_NOMEM: snmp_log(LOG_CRIT, "snmp_secmod: no memory\n"); @@ -106,7 +114,7 @@ register_sec_mod(int secmod, const char *modname, return SNMPERR_SUCCESS; } -netsnmp_feature_child_of(unregister_sec_mod, netsnmp_unused) +netsnmp_feature_child_of(unregister_sec_mod, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_UNREGISTER_SEC_MOD int unregister_sec_mod(int secmod) diff --git a/snmplib/snmp_syslog.h b/snmplib/snmp_syslog.h new file mode 100644 index 0000000..80c5857 --- /dev/null +++ b/snmplib/snmp_syslog.h @@ -0,0 +1,46 @@ +#ifndef _SNMP_SYSLOG_H_ +#define _SNMP_SYSLOG_H_ + +/* + * These definitions handle 4.2 systems without additional syslog facilities. + */ +#ifndef NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG +#ifndef LOG_CONS +#define LOG_CONS 0 /* Don't bother if not defined... */ +#endif +#ifndef LOG_PID +#define LOG_PID 0 /* Don't bother if not defined... */ +#endif +#ifndef LOG_LOCAL0 +#define LOG_LOCAL0 0 +#endif +#ifndef LOG_LOCAL1 +#define LOG_LOCAL1 0 +#endif +#ifndef LOG_LOCAL2 +#define LOG_LOCAL2 0 +#endif +#ifndef LOG_LOCAL3 +#define LOG_LOCAL3 0 +#endif +#ifndef LOG_LOCAL4 +#define LOG_LOCAL4 0 +#endif +#ifndef LOG_LOCAL5 +#define LOG_LOCAL5 0 +#endif +#ifndef LOG_LOCAL6 +#define LOG_LOCAL6 0 +#endif +#ifndef LOG_LOCAL7 +#define LOG_LOCAL7 0 +#endif +#ifndef LOG_DAEMON +#define LOG_DAEMON 0 +#endif +#ifndef LOG_USER +#define LOG_USER 0 +#endif +#endif /* NETSNMP_FEATURE_REMOVE_LOGGING_SYSLOG */ + +#endif /* _SNMP_SYSLOG_H_ */ diff --git a/snmplib/snmp_transport.c b/snmplib/snmp_transport.c index ada4781..d2fcf46 100644 --- a/snmplib/snmp_transport.c +++ b/snmplib/snmp_transport.c @@ -1,3 +1,9 @@ +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include #include @@ -5,25 +11,22 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -67,15 +70,19 @@ #ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN #include #endif +#ifdef NETSNMP_TRANSPORT_UDPSHARED_DOMAIN +#include +#endif #include #include #include -netsnmp_feature_child_of(transport_all, libnetsnmp) +netsnmp_feature_child_of(transport_all, libnetsnmp); -netsnmp_feature_child_of(tdomain_support, transport_all) -netsnmp_feature_child_of(tdomain_transport_oid, transport_all) -netsnmp_feature_child_of(sockaddr_size, transport_all) +netsnmp_feature_child_of(tdomain_support, transport_all); +netsnmp_feature_child_of(tdomain_transport_oid, transport_all); +netsnmp_feature_child_of(sockaddr_size, transport_all); +netsnmp_feature_child_of(transport_cache, transport_all); /* * Our list of supported transport domains. @@ -100,11 +107,17 @@ size_t netsnmpDDPDomain_len = OID_LENGTH(netsnmpDDPDomain); oid netsnmpIPXDomain[] = { 1, 3, 6, 1, 6, 1, 5 }; size_t netsnmpIPXDomain_len = OID_LENGTH(netsnmpIPXDomain); +static netsnmp_container *_container = NULL; static void netsnmp_tdomain_dump(void); +#if !defined(NETSNMP_FEATURE_REMOVE_FILTER_SOURCE) +static netsnmp_container * filtered = NULL; + +void netsnmp_transport_parse_filter(const char *word, char *cptr); +#endif /* NETSNMP_FEATURE_REMOVE_FILTER_SOURCE */ void init_snmp_transport(void) @@ -113,13 +126,30 @@ init_snmp_transport(void) "snmp", "dontLoadHostConfig", NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DONT_LOAD_HOST_FILES); +#ifndef NETSNMP_FEATURE_REMOVE_FILTER_SOURCE + register_app_config_handler("sourceFilterType", + netsnmp_transport_parse_filterType, + NULL, "none|acceptlist|blocklist"); + register_app_config_handler("sourceFilterAddress", + netsnmp_transport_parse_filter, + netsnmp_transport_filter_cleanup, + "host"); +#endif /* NETSNMP_FEATURE_REMOVE_FILTER_SOURCE */ +} + +void +shutdown_snmp_transport(void) +{ +#ifndef NETSNMP_FEATURE_REMOVE_FILTER_SOURCE + netsnmp_transport_filter_cleanup(); +#endif } /* * Make a deep copy of an netsnmp_transport. */ netsnmp_transport * -netsnmp_transport_copy(netsnmp_transport *t) +netsnmp_transport_copy(const netsnmp_transport *t) { netsnmp_transport *n = NULL; @@ -141,39 +171,36 @@ netsnmp_transport_copy(netsnmp_transport *t) } if (t->local != NULL) { - n->local = (u_char *) malloc(t->local_length); + n->local = netsnmp_memdup(t->local, t->local_length); if (n->local == NULL) { netsnmp_transport_free(n); return NULL; } n->local_length = t->local_length; - memcpy(n->local, t->local, t->local_length); } else { n->local = NULL; n->local_length = 0; } if (t->remote != NULL) { - n->remote = (u_char *) malloc(t->remote_length); + n->remote = netsnmp_memdup(t->remote, t->remote_length); if (n->remote == NULL) { netsnmp_transport_free(n); return NULL; } n->remote_length = t->remote_length; - memcpy(n->remote, t->remote, t->remote_length); } else { n->remote = NULL; n->remote_length = 0; } if (t->data != NULL && t->data_length > 0) { - n->data = malloc(t->data_length); + n->data = netsnmp_memdup(t->data, t->data_length); if (n->data == NULL) { netsnmp_transport_free(n); return NULL; } n->data_length = t->data_length; - memcpy(n->data, t->data, t->data_length); } else { n->data = NULL; n->data_length = 0; @@ -206,6 +233,12 @@ netsnmp_transport_free(netsnmp_transport *t) if (NULL == t) return; +#ifndef FEATURE_REMOVE_TRANSPORT_CACHE + /** don't free a transport that is currently shared */ + if (netsnmp_transport_cache_remove(t) == 1) + return; +#endif + SNMP_FREE(t->local); SNMP_FREE(t->remote); SNMP_FREE(t->data); @@ -222,7 +255,7 @@ netsnmp_transport_free(netsnmp_transport *t) * caller is responsible for freeing the allocated string. */ char * -netsnmp_transport_peer_string(netsnmp_transport *t, void *data, int len) +netsnmp_transport_peer_string(netsnmp_transport *t, const void *data, int len) { char *str; @@ -237,9 +270,118 @@ netsnmp_transport_peer_string(netsnmp_transport *t, void *data, int len) return str; } +#if !defined(NETSNMP_FEATURE_REMOVE_FILTER_SOURCE) +static int _transport_filter_init(void) +{ + if (filtered) + return 0; + + filtered = netsnmp_container_find("transport_filter:cstring"); + if (NULL == filtered) { + NETSNMP_LOGONCE((LOG_WARNING, + "couldn't allocate container for transport_filter list\n")); + return -1; + } + filtered->container_name = strdup("transport_filter list"); + + return 0; +} + +int +netsnmp_transport_filter_add(const char *addrtxt) +{ + char *tmp; + + /* + * create the container, if needed + */ + if (!filtered && _transport_filter_init()) { + snmp_log(LOG_ERR,"netsnmp_transport_filter_add %s failed\n", + addrtxt); + return (-1); + } + tmp = strdup(addrtxt); + if (NULL == tmp) { + snmp_log(LOG_ERR,"netsnmp_transport_filter_add strdup failed\n"); + return(-1); + } + return CONTAINER_INSERT(filtered, tmp); +} + +int +netsnmp_transport_filter_remove(const char *addrtxt) +{ + /* + * create the container, if needed + */ + if (NULL == filtered) + return -1; + return CONTAINER_REMOVE(filtered, addrtxt); +} + +/* + * netsnmp_transport_filter_check + * + * returns 1 if the specified address string is in the filter list + */ +int +netsnmp_transport_filter_check(const char *addrtxt) +{ + char *addr; + if (NULL == filtered) + return 0; + addr = CONTAINER_FIND(filtered, addrtxt); + return addr ? 1 : 0; +} + +void +netsnmp_transport_parse_filterType(const char *word, char *cptr) +{ + int type = 42; + if (strcmp(cptr,"acceptlist") == 0) + type = 1; + else if (strcmp(cptr,"whitelist") == 0) { + netsnmp_config_warn("Deprecated configuration term found -- Please use 'acceptlist' instead"); + type = 1; + } else if (strcmp(cptr,"blocklist") == 0) + type = -1; + else if (strcmp(cptr,"blacklist") == 0) { + netsnmp_config_warn("Deprecated configuration term found -- Please use 'blocklist' instead"); + type = -1; + } else if (strcmp(cptr,"none") == 0) + type = 0; + else + netsnmp_config_error("unknown source filter type: %s", cptr); + + if (type != 42) { + DEBUGMSGTL(("transport:filterType", "set to %d\n", type)); + netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_FILTER_TYPE, type); + } +} + +void +netsnmp_transport_parse_filter(const char *word, char *cptr) +{ + if (netsnmp_transport_filter_add(cptr)) + netsnmp_config_error("cannot create source filter: %s", cptr); +} + +void +netsnmp_transport_filter_cleanup(void) +{ + if (NULL == filtered) + return; + CONTAINER_CLEAR(filtered, filtered->free_item, NULL); + CONTAINER_FREE(filtered); + filtered = NULL; +} +#endif /* NETSNMP_FEATURE_REMOVE_FILTER_SOURCE */ + + #ifndef NETSNMP_FEATURE_REMOVE_SOCKADDR_SIZE int -netsnmp_sockaddr_size(struct sockaddr *sa) +netsnmp_sockaddr_size(const struct sockaddr *sa) { if (NULL == sa) return 0; @@ -260,7 +402,7 @@ netsnmp_sockaddr_size(struct sockaddr *sa) #endif /* NETSNMP_FEATURE_REMOVE_SOCKADDR_SIZE */ int -netsnmp_transport_send(netsnmp_transport *t, void *packet, int length, +netsnmp_transport_send(netsnmp_transport *t, const void *packet, int length, void **opaque, int *olength) { int dumpPacket, debugLength; @@ -358,6 +500,8 @@ netsnmp_tdomain_init(void) #include "transports/snmp_transport_inits.h" netsnmp_tdomain_dump(); + + } void @@ -424,7 +568,7 @@ netsnmp_tdomain_register(netsnmp_tdomain *n) -netsnmp_feature_child_of(tdomain_unregister, netsnmp_unused) +netsnmp_feature_child_of(tdomain_unregister, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_TDOMAIN_UNREGISTER int netsnmp_tdomain_unregister(netsnmp_tdomain *n) @@ -488,23 +632,32 @@ netsnmp_is_fqdn(const char *thename) * it. */ netsnmp_transport * -netsnmp_tdomain_transport_full(const char *application, - const char *str, int local, - const char *default_domain, - const char *default_target) +netsnmp_tdomain_transport_tspec(netsnmp_tdomain_spec *tspec) { + const char *application, *str, *default_domain, *default_target, *source; + int local; netsnmp_tdomain *match = NULL; const char *addr = NULL; const char * const *spec = NULL; int any_found = 0; char buf[SNMP_MAXPATH]; - char **lspec = 0; + const char **lspec = NULL; + char *tokenized_domain = NULL; + + application = tspec->application; + str = tspec->target; + local = tspec->flags & NETSNMP_TSPEC_LOCAL; + default_domain = tspec->default_domain; + default_target = tspec->default_target; + source = tspec->source; + /** transport_config = tspec->transport_config; not used yet */ DEBUGMSGTL(("tdomain", - "tdomain_transport_full(\"%s\", \"%s\", %d, \"%s\", \"%s\")\n", + "tdomain_transport_spec(\"%s\", \"%s\", %d, \"%s\", \"%s\", \"%s\")\n", application, str ? str : "[NIL]", local, default_domain ? default_domain : "[NIL]", - default_target ? default_target : "[NIL]")); + default_target ? default_target : "[NIL]", + source ? source : "[NIL]")); /* see if we can load a host-name specific set of conf files */ if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, @@ -593,15 +746,16 @@ netsnmp_tdomain_transport_full(const char *application, else { int commas = 0; const char *cp = default_domain; - char *dup = strdup(default_domain); + char *ptr = NULL; + tokenized_domain = strdup(default_domain); while (*++cp) if (*cp == ',') commas++; lspec = calloc(commas+2, sizeof(char *)); commas = 1; - lspec[0] = strtok(dup, ","); - while ((lspec[commas++] = strtok(NULL, ","))) + lspec[0] = strtok_r(tokenized_domain, ",", &ptr); + while ((lspec[commas++] = strtok_r(NULL, ",", &ptr))) ; - spec = (const char * const *)lspec; + spec = lspec; } } else { spec = netsnmp_lookup_default_domains(application); @@ -642,17 +796,32 @@ netsnmp_tdomain_transport_full(const char *application, "default address \"%s\"\n", match->prefix[0], addr ? addr : "[NIL]", addr2 ? addr2 : "[NIL]")); - if (match->f_create_from_tstring) { + if (match->f_create_from_tspec) { + netsnmp_tdomain_spec tspec_tmp; + memcpy(&tspec_tmp, tspec, sizeof(tspec_tmp)); + /** if we didn't have a default target but looked one up, + * copy the spec and use the found default. */ + if ((default_target == NULL) && (addr2 != NULL)) + tspec_tmp.default_target = addr2; + if (addr != tspec_tmp.target) + tspec_tmp.target = addr; + t = match->f_create_from_tspec(&tspec_tmp); + } + else { +#if 0 /** remove warning until all transports implement tspec */ NETSNMP_LOGONCE((LOG_WARNING, - "transport domain %s uses deprecated f_create_from_tstring\n", + "transport domain %s uses deprecated f_create function\n", match->prefix[0])); - t = match->f_create_from_tstring(addr, local); +#endif + if (match->f_create_from_tstring) { + t = match->f_create_from_tstring(addr, local); + } + else + t = match->f_create_from_tstring_new(addr, local, addr2); } - else - t = match->f_create_from_tstring_new(addr, local, addr2); if (t) { if (lspec) { - free(lspec[0]); + free(tokenized_domain); free(lspec); } return t; @@ -667,23 +836,54 @@ netsnmp_tdomain_transport_full(const char *application, if (!any_found) snmp_log(LOG_ERR, "No support for any checked transport domain\n"); if (lspec) { - free(lspec[0]); + free(tokenized_domain); free(lspec); } return NULL; } +netsnmp_transport * +netsnmp_tdomain_transport_full(const char *application, + const char *str, int local, + const char *default_domain, + const char *default_target) +{ + netsnmp_tdomain_spec tspec; + memset(&tspec, 0x0, sizeof(tspec)); + tspec.application = application; + tspec.target = str; + if (local) + tspec.flags |= NETSNMP_TSPEC_LOCAL; + tspec.default_domain = default_domain; + tspec.default_target = default_target; + tspec.source = NULL; + tspec.transport_config = NULL; + return netsnmp_tdomain_transport_tspec(&tspec); +} netsnmp_transport * netsnmp_tdomain_transport(const char *str, int local, const char *default_domain) { - return netsnmp_tdomain_transport_full("snmp", str, local, default_domain, - NULL); + netsnmp_tdomain_spec tspec; + memset(&tspec, 0x0, sizeof(tspec)); + tspec.application = "snmp"; + tspec.target = str; + if (local) + tspec.flags |= NETSNMP_TSPEC_LOCAL; + tspec.default_domain = default_domain; + tspec.default_target = NULL; + tspec.source = NULL; + tspec.transport_config = NULL; + return netsnmp_tdomain_transport_tspec(&tspec); } - #ifndef NETSNMP_FEATURE_REMOVE_TDOMAIN_TRANSPORT_OID +/* + * The format of @dom and @o follows the TDomain and TAddress textual + * conventions from RFC 2579. For the actual TAddress format definitions, + * see e.g. SnmpUDPAddress in RFC 1906. + */ netsnmp_transport * netsnmp_tdomain_transport_oid(const oid * dom, size_t dom_len, @@ -782,10 +982,360 @@ netsnmp_transport_config_compare(netsnmp_transport_config *left, } netsnmp_transport_config * -netsnmp_transport_create_config(char *key, char *value) { +netsnmp_transport_create_config(const char *key, const char *value) +{ netsnmp_transport_config *entry = SNMP_MALLOC_TYPEDEF(netsnmp_transport_config); entry->key = strdup(key); entry->value = strdup(value); return entry; } + +#ifndef FEATURE_REMOVE_TRANSPORT_CACHE + +/* ************************************************************************* + * transport caching by address family, type and use + */ +typedef struct trans_cache_s { + netsnmp_transport *t; + int af; + int type; + int local; + netsnmp_sockaddr_storage bind_addr; + int count; /* number of times this transport has been returned */ +} trans_cache; + +static void _tc_free_item(trans_cache *tc, void *context); +static int _tc_compare(trans_cache *lhs, trans_cache *rhs); + +/** initialize transport cache */ +static int +_tc_init(void) +{ + DEBUGMSGTL(("transport:cache:init", "%p\n", _container)); + + /** prevent double init */ + if (NULL != _container) + return 0; + + _container = netsnmp_container_find("trans_cache:binary_array"); + if (NULL == _container) { + snmp_log(LOG_ERR, "failed to allocate trans_cache container\n"); + return 1; + } + + _container->container_name = strdup("trans_cache"); + _container->free_item = (netsnmp_container_obj_func*) _tc_free_item; + _container->compare = (netsnmp_container_compare*) _tc_compare; + + return 0; +} + +/* + * container compare function + * + * sort by af, type, local + */ +static int +_tc_compare(trans_cache *lhs, trans_cache *rhs) +{ + netsnmp_assert((lhs != NULL) && (rhs != NULL)); + + DEBUGMSGTL(("9:transport:cache:compare", "%p/%p\n", lhs, rhs)); + + if (lhs->af < rhs->af) + return -1; + else if (lhs->af > rhs->af) + return 1; + + if (lhs->type < rhs->type) + return -1; + else if (lhs->type > rhs->type) + return 1; + + if (lhs->local < rhs->local) + return -1; + else if (lhs->local > rhs->local) + return 1; + + if (AF_INET == lhs->af) { + struct sockaddr_in *lha = &lhs->bind_addr.sin, + *rha = &rhs->bind_addr.sin; + if (lha->sin_addr.s_addr < rha->sin_addr.s_addr) + return -1; + else if (lha->sin_addr.s_addr > rha->sin_addr.s_addr) + return 1; + + if (lha->sin_port < rha->sin_port) + return -1; + else if (lha->sin_port > rha->sin_port) + return 1; + } +#ifdef NETSNMP_ENABLE_IPV6 + else if (AF_INET6 == lhs->af) { + struct sockaddr_in6 *lha = &lhs->bind_addr.sin6, + *rha = &rhs->bind_addr.sin6; + int rc = memcmp(lha->sin6_addr.s6_addr, rha->sin6_addr.s6_addr, + sizeof(rha->sin6_addr.s6_addr)); + if (rc) + return rc; + + if (lha->sin6_port < rha->sin6_port) + return -1; + else if (lha->sin6_port > rha->sin6_port) + return 1; + + if (lha->sin6_flowinfo < rha->sin6_flowinfo) + return -1; + else if (lha->sin6_flowinfo > rha->sin6_flowinfo) + return 1; + + if (lha->sin6_scope_id < rha->sin6_scope_id) + return -1; + else if (lha->sin6_scope_id > rha->sin6_scope_id) + return 1; + } +#endif + return 0; +} + +static void +_tc_free(trans_cache *tc) +{ + if (NULL == tc) + return; + + DEBUGMSGTL(("transport:cache:free", "%p %d/%d/%d/%p %d\n", tc, tc->af, + tc->type, tc->local, tc->t, tc->count)); + netsnmp_transport_free(tc->t); + memset(tc, 0x0, sizeof(*tc)); + free(tc); +} + +static void +_tc_free_item(trans_cache *tc, void *context) +{ + _tc_free(tc); +} + +static void +_tc_remove(trans_cache *tc) +{ + if (NULL == tc || NULL == _container) + return; + + DEBUGMSGTL(("transport:cache:remove", "%p\n", tc)); + + CONTAINER_REMOVE(_container, tc); +} + +static trans_cache * +_tc_create(int af, int type, int local, const netsnmp_sockaddr_storage *addr, + netsnmp_transport *t) +{ + trans_cache *tc = SNMP_MALLOC_TYPEDEF(trans_cache); + if (NULL == tc) { + snmp_log(LOG_ERR, "failed to allocate trans_cache\n"); + return NULL; + } + DEBUGMSGTL(("transport:cache:create", "%p\n", tc)); + tc->af = af; + tc->type = type; + tc->local = local; + tc->t = t; + if (addr) + memcpy(&tc->bind_addr, addr, sizeof(tc->bind_addr)); + /** we only understand ipv6 and ipv6 sockaddrs in compare */ + if (AF_INET != tc->af && AF_INET6 != tc->af) + NETSNMP_LOGONCE((LOG_WARNING, "transport cache not tested for af %d\n", + tc->af)); + return tc; +} + +static trans_cache * +_tc_add(int af, int type, int local, const netsnmp_sockaddr_storage *addr, + netsnmp_transport *t) +{ + trans_cache *tc; + int rc; + + DEBUGMSGTL(("transport:cache:add", "%d/%d/%d/%p\n", af, type, local, t)); + + if (NULL == _container) { + _tc_init(); + if (NULL == _container) + return NULL; + } + + tc = _tc_create(af, type, local, addr, t); + if (NULL == tc) { + DEBUGMSGTL(("transport:cache:add", + "could not create transport cache\n")); + return NULL; + } + + rc = CONTAINER_INSERT(_container, tc); + if (rc) { + DEBUGMSGTL(("transport:cache:add", "container insert failed\n")); + _tc_free(tc); + return NULL; + } + + return tc; +} + +trans_cache * +_tc_find(int af, int type, int local, const netsnmp_sockaddr_storage *addr) +{ + trans_cache tc, *rtn; + + DEBUGMSGTL(("transport:cache:find", "%d/%d/%d\n", af, type, local)); + + if (NULL == _container) + return NULL; + + memset(&tc, 0x00, sizeof(tc)); + tc.af = af; + tc.type = type; + tc.local = local; + if (addr) + memcpy(&tc.bind_addr, addr, sizeof(tc.bind_addr)); + + rtn = CONTAINER_FIND(_container, &tc); + DEBUGMSGTL(("transport:cache:find", "%p\n", rtn)); + return rtn; +} + +trans_cache * +_tc_find_transport(netsnmp_transport *t) +{ + /* + * we shouldn't really have that many transports, so instead of + * using an additional key, just iterate over the whole container. + */ + netsnmp_iterator *itr; + trans_cache *tc; + + DEBUGMSGTL(("transport:cache:find_transport", "%p\n", t)); + + if (NULL == _container) + return NULL; + + itr = CONTAINER_ITERATOR(_container); + if (NULL == itr) { + snmp_log(LOG_ERR, "could not get iterator for transport cache\n"); + return NULL; + } + + tc = ITERATOR_FIRST(itr); + for( ; tc; tc = ITERATOR_NEXT(itr)) + if (tc->t == t) + break; + ITERATOR_RELEASE(itr); + + DEBUGMSGT(("transport:cache:find_transport","found %p\n", tc)); + + return tc; +} + +int +netsnmp_transport_cache_remove(netsnmp_transport *t) +{ + trans_cache *tc; + + DEBUGMSGTL(("transport:cache:close", "%p\n", t)); + + if (NULL == t) + return 0; + + /** transport in cache? */ + tc = _tc_find_transport(t); + if (NULL == tc) { + DEBUGMSGTL(("transport:cache:close", "%p not found in cache\n", t)); + return 0; + } + + --tc->count; + + /** still in use? */ + if (tc->count > 0) { + DEBUGMSGTL(("transport:cache:close", "still %d user(s) of %p\n", + tc->count, t)); + return 1; + } + + /** unbalanced get/close? */ + if (tc->count < 0) + snmp_log(LOG_WARNING, "transport cache get/close mismatch\n"); + + _tc_remove(tc); + _tc_free(tc); /* also does close */ + + return 0; +} + +/* + * netsnmp_transport_get: get a (possibly duplicate, cached) transport + */ +netsnmp_transport * +netsnmp_transport_cache_get(int af, int type, int local, + const netsnmp_sockaddr_storage *bind_addr) +{ + trans_cache *tc; + netsnmp_transport *t; + + DEBUGMSGTL(("transport:cache:get", "%d/%d/%d\n", af, type, local)); + +#define USE_CACHE 1 + +#ifdef USE_CACHE + /** check for existing transport */ + tc = _tc_find(af, type, local, bind_addr); + if (tc) { + DEBUGMSGTL(("transport:cache:get", "using existing transport %p\n", + tc->t)); + ++tc->count; + return tc->t; + } +#endif + /** get transport */ + t = NULL; /* _transport(af, type, 0);*/ + if (NULL == t) { + snmp_log(LOG_ERR, "could not get new transport for %d/%d/%d\n", af, + type, local); + return NULL; + } + DEBUGMSGTL(("transport:cache:get", "new transport %p\n", t)); + +#ifdef USE_CACHE + /** create transport cache for new transport */ + tc = _tc_add(af, type, local, bind_addr, t); + if (NULL == tc) { + DEBUGMSGTL(("transport:cache:get", "could not create transport cache\n")); + /* + * hmmm.. this isn't really a critical error, is it? We have a + * transport, just no cache for it. Let's continue on and hope for the + * best. + */ + /** return -1; */ + } + tc->count = 1; +#endif + + return t; +} + +int +netsnmp_transport_cache_save(int af, int type, int local, + const netsnmp_sockaddr_storage *addr, + netsnmp_transport *t) +{ + if (NULL == t) + return 1; + + if (NULL == _tc_add(af, type, local, addr, t)) + return 1; + + return 0; +} +#endif /* FEATURE_REMOVE_TRANSPORT_CACHE */ diff --git a/snmplib/snmpksm.c b/snmplib/snmpksm.c index 7d30612..249ff5b 100644 --- a/snmplib/snmpksm.c +++ b/snmplib/snmpksm.c @@ -13,17 +13,17 @@ #ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -34,10 +34,6 @@ #include -#if HAVE_DMALLOC_H -#include -#endif - #ifdef NETSNMP_USE_KERBEROS_HEIMDAL #ifndef NETSNMP_USE_KERBEROS_MIT #define OLD_HEIMDAL @@ -66,10 +62,12 @@ #define TICKET_CLIENT(x) (x)->enc_part2->client #endif /* NETSNMP_USE_KERBEROS_HEIMDAL */ -#if HAVE_ET_COM_ERR_H +#ifdef HAVE_ET_COM_ERR_H #include -#elif HAVE_COM_ERR_H +#elif defined(HAVE_COM_ERR_H) #include +#else +static const char *error_message(int ret) { return "(?)"; } #endif #include @@ -115,6 +113,10 @@ krb5_error_code krb5_auth_con_getsendsubkey(krb5_context context, return krb5_auth_con_getlocalsubkey(context, auth_context, keyblock); } +#endif + +#if !defined(HAVE_KRB5_AUTH_CON_GETRECVSUBKEY) /* Heimdal */ + krb5_error_code krb5_auth_con_getrecvsubkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock **keyblock) @@ -479,7 +481,10 @@ ksm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) #else /* NETSNMP_USE_KERBEROS_MIT */ krb5_encrypt_block eblock; #endif /* NETSNMP_USE_KERBEROS_MIT */ - size_t blocksize, encrypted_length; +#ifndef OLD_HEIMDAL + size_t blocksize; +#endif + size_t encrypted_length; unsigned char *encrypted_data = NULL; long zero = 0, tmp; int i; @@ -1242,7 +1247,10 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms) size_t length = parms->wholeMsgLen - (u_int) (parms->secParams - parms->wholeMsg); u_char *current = parms->secParams, type; - size_t cksumlength, blocksize; +#ifndef OLD_HEIMDAL + size_t blocksize; +#endif + size_t cksumlength; long hint; char *cname; struct ksm_secStateRef *ksm_state; @@ -1762,7 +1770,7 @@ ksm_process_in_msg(struct snmp_secmod_incoming_params *parms) retcode = krb5_decrypt(kcontext, heim_crypto, KSM_KEY_USAGE_ENCRYPTION, current, length, &output); if (retcode == 0) { - *parms->scopedPdu = (char *) output.data; + *parms->scopedPdu = (u_char *) output.data; *parms->scopedPduLen = output.length; krb5_data_zero(&output); } diff --git a/snmplib/snmptsm.c b/snmplib/snmptsm.c index 42de682..d7a9333 100644 --- a/snmplib/snmptsm.c +++ b/snmplib/snmptsm.c @@ -27,10 +27,8 @@ #include #endif -netsnmp_feature_require(snmpv3_probe_contextEngineID_rfc5343) -netsnmp_feature_require(row_create) - -#include +netsnmp_feature_require(snmpv3_probe_contextEngineID_rfc5343); +netsnmp_feature_require(row_create); static int tsm_session_init(netsnmp_session *); static void tsm_free_state_ref(void *); @@ -104,12 +102,11 @@ tsm_session_init(netsnmp_session * sess) static void tsm_free_state_ref(void *ptr) { - netsnmp_tsmSecurityReference *tsmRef; + netsnmp_tsmSecurityReference *tsmRef = ptr; - if (NULL == ptr) + if (!tsmRef) return; - tsmRef = (netsnmp_tsmSecurityReference *) ptr; /* the tmStateRef is always taken care of by the normal PDU, since this is just a reference to that one */ /* DON'T DO: SNMP_FREE(tsmRef->tmStateRef); */ @@ -138,21 +135,26 @@ tsm_clone_pdu(netsnmp_pdu *pdu, netsnmp_pdu *pdu2) return SNMPERR_SUCCESS; newref = SNMP_MALLOC_TYPEDEF(netsnmp_tsmSecurityReference); + netsnmp_assert_or_return(NULL != newref, SNMPERR_GENERR); DEBUGMSGTL(("tsm", "cloned as pdu=%p, ref=%p (oldref=%p)\n", - pdu2, newref, pdu2->securityStateRef)); - if (!newref) - return SNMPERR_GENERR; + pdu2, newref, pdu2->securityStateRef)); memcpy(newref, oldref, sizeof(*oldref)); - pdu2->securityStateRef = newref; - /* the tm state reference is just a link to the one in the pdu, which was already copied by snmp_clone_pdu before handing it to us. */ newref->tmStateRef = netsnmp_memdup(oldref->tmStateRef, sizeof(*oldref->tmStateRef)); + if (!newref->tmStateRef) { + snmp_log(LOG_ERR, "tsm: malloc failure\n"); + free(newref); + return SNMPERR_GENERR; + } + + pdu2->securityStateRef = newref; + return SNMPERR_SUCCESS; } @@ -344,7 +346,7 @@ tsm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) and tmStateReference are returned to the calling Message Processing Model with the statusInformation set to success. */ - /* For the Net-SNMP implemantion that actually means we start + /* For the Net-SNMP implementation that actually means we start encoding the full packet sequence from here before returning it */ /* @@ -368,12 +370,15 @@ tsm_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) /* put the transport state reference into the PDU for the transport */ parms->pdu->transport_data = netsnmp_memdup(tmStateRef, sizeof(*tmStateRef)); - if (!parms->pdu->transport_data) + if (tmStateRefLocal) + SNMP_FREE(tmStateRef); + + if (!parms->pdu->transport_data) { snmp_log(LOG_ERR, "tsm: malloc failure\n"); + return SNMPERR_GENERR; + } parms->pdu->transport_data_length = sizeof(*tmStateRef); - if (tmStateRefLocal) - SNMP_FREE(tmStateRef); DEBUGMSGTL(("tsm", "TSM processing completed.\n")); return SNMPERR_SUCCESS; } @@ -458,11 +463,6 @@ tsm_process_in_msg(struct snmp_secmod_incoming_params *parms) |--------------------+-------| */ - if (tmStateRef->transportDomain == NULL) { - /* XXX: snmpTsmInvalidCaches++ ??? */ - return SNMPERR_GENERR; - } - /* XXX: cache in session! */ #ifdef NETSNMP_TRANSPORT_SSH_DOMAIN if (netsnmp_oid_equals(netsnmp_snmpSSHDomain, diff --git a/snmplib/snmpusm.c b/snmplib/snmpusm.c index 6a9cec3..5f024c7 100644 --- a/snmplib/snmpusm.c +++ b/snmplib/snmpusm.c @@ -4,7 +4,12 @@ */ /* * Portions of this file are copyrighted by: - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. */ @@ -29,17 +34,17 @@ #ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -48,18 +53,16 @@ #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include #include #include +#include #include #include #include @@ -71,26 +74,136 @@ #include #include #include +#include +#include -netsnmp_feature_child_of(usm_all, libnetsnmp) -netsnmp_feature_child_of(usm_support, usm_all) - -netsnmp_feature_require(usm_support) +#ifdef HAVE_OPENSSL_DH_H +#include +#endif -oid usmNoAuthProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 1, 1 }; +netsnmp_feature_child_of(usm_all, libnetsnmp); +netsnmp_feature_child_of(usm_support, usm_all); + +netsnmp_feature_require(usm_support); + +struct usmStateReference { + int refcnt; + 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; +}; + +oid usmNoAuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_NOAUTH }; #ifndef NETSNMP_DISABLE_MD5 -oid usmHMACMD5AuthProtocol[10] = - { 1, 3, 6, 1, 6, 3, 10, 1, 1, 2 }; +oid usmHMACMD5AuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_HMACMD5 }; #endif -oid usmHMACSHA1AuthProtocol[10] = - { 1, 3, 6, 1, 6, 3, 10, 1, 1, 3 }; +oid usmHMACSHA1AuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_HMACSHA1 }; + +#ifdef HAVE_EVP_SHA384 +oid usmHMAC384SHA512AuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_HMAC384SHA512 }; +oid usmHMAC256SHA384AuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_HMAC256SHA384 }; +#endif /* HAVE_EVP_SHA384 */ + +#ifdef HAVE_EVP_SHA224 +oid usmHMAC192SHA256AuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_HMAC192SHA256 }; +oid usmHMAC128SHA224AuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID, + NETSNMP_USMAUTH_HMAC128SHA224 }; +#endif /* HAVE_EVP_SHA384 */ + oid usmNoPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 1 }; + #ifndef NETSNMP_DISABLE_DES oid usmDESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 2 }; #endif -oid usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 }; + + +oid usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 }; /* backwards compat */ -oid *usmAES128PrivProtocol = usmAESPrivProtocol; +oid *usmAES128PrivProtocol = usmAESPrivProtocol; + +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + /* OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt */ +oid usmAES192PrivProtocol[9] = { 1,3,6,1,4,1,14832,1,3 }; +oid usmAES256PrivProtocol[9] = { 1,3,6,1,4,1,14832,1,4 }; + /* OIDs from CISCO MIB */ +oid usmAES192CiscoPrivProtocol[11] = { 1,3,6,1,4,1,9,12,6,1,1 }; +oid usmAES256CiscoPrivProtocol[11] = { 1,3,6,1,4,1,9,12,6,1,2 }; +/* + * these OIDs are in pySNMP source as OIDs for AES+Reeder. We'll just + * use OIDS from CISCO-SNMP-USM-OIDS-MIB + * +oid usmAES192Cisco2PrivProtocol[11] = { 1,3,6,1,4,1,9,12,6,1,101 }; +oid usmAES256Cisco2PrivProtocol[11] = { 1,3,6,1,4,1,9,12,6,1,102 }; + */ +#endif /* NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ + +typedef struct usm_alg_type_s { + const char *label; + int value; +} usm_alg_type_t; + +static const usm_alg_type_t usm_auth_type[] = { + { "NOAUTH", NETSNMP_USMAUTH_NOAUTH }, + { "SHA", NETSNMP_USMAUTH_HMACSHA1 }, + { "SHA-1", NETSNMP_USMAUTH_HMACSHA1 }, + { "SHA1", NETSNMP_USMAUTH_HMACSHA1 }, +#ifndef NETSNMP_DISABLE_MD5 + { "MD5", NETSNMP_USMAUTH_HMACMD5 }, +#endif +#ifdef HAVE_EVP_SHA224 + { "SHA-224", NETSNMP_USMAUTH_HMAC128SHA224 }, + { "SHA224", NETSNMP_USMAUTH_HMAC128SHA224 }, + { "SHA-256", NETSNMP_USMAUTH_HMAC192SHA256 }, + { "SHA256", NETSNMP_USMAUTH_HMAC192SHA256 }, +#endif +#ifdef HAVE_EVP_SHA384 + { "SHA-384", NETSNMP_USMAUTH_HMAC256SHA384 }, + { "SHA384", NETSNMP_USMAUTH_HMAC256SHA384 }, + { "SHA-512", NETSNMP_USMAUTH_HMAC384SHA512 }, + { "SHA512", NETSNMP_USMAUTH_HMAC384SHA512 }, +#endif + { NULL, -1 } +}; + +static const usm_alg_type_t usm_priv_type[] = { + { "NOPRIV", USM_CREATE_USER_PRIV_NONE }, +#ifndef NETSNMP_DISABLE_DES + { "DES", USM_CREATE_USER_PRIV_DES }, +#endif +#ifdef HAVE_AES + { "AES", USM_CREATE_USER_PRIV_AES }, + { "AES-128", USM_CREATE_USER_PRIV_AES }, + { "AES128", USM_CREATE_USER_PRIV_AES }, +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + { "AES-192", USM_CREATE_USER_PRIV_AES192 }, + { "AES192", USM_CREATE_USER_PRIV_AES192 }, + { "AES-256", USM_CREATE_USER_PRIV_AES256 }, + { "AES256", USM_CREATE_USER_PRIV_AES256 }, + /** cisco / pysnmp variations */ + { "AES-192-C", USM_CREATE_USER_PRIV_AES192_CISCO }, + { "AES192C", USM_CREATE_USER_PRIV_AES192_CISCO }, + { "AES-256-C", USM_CREATE_USER_PRIV_AES256_CISCO }, + { "AES256C", USM_CREATE_USER_PRIV_AES256_CISCO }, +#endif +#endif + { NULL, -1 }, +}; static u_int dummy_etime, dummy_eboot; /* For ISENGINEKNOWN(). */ @@ -121,27 +234,6 @@ static struct usmUser *noNameUser = NULL; */ static struct usmUser *userList = NULL; -/* - * Prototypes - */ -int - usm_check_secLevel_vs_protocols(int level, - const oid * authProtocol, - u_int authProtocolLen, - const oid * privProtocol, - u_int privProtocolLen); -int - usm_calc_offsets(size_t globalDataLen, - int secLevel, size_t secEngineIDLen, - size_t secNameLen, size_t scopedPduLen, - u_long engineboots, long engine_time, - size_t * theTotalLength, - size_t * authParamsOffset, - size_t * privParamsOffset, - size_t * dataOffset, size_t * datalen, - size_t * msgAuthParmLen, - size_t * msgPrivParmLen, size_t * otstlen, - size_t * seq_len, size_t * msgSecParmLen); /* * Set a given field of the secStateRef. * @@ -150,31 +242,30 @@ int * * Return 0 on success, -1 otherwise. */ -#define MAKE_ENTRY( type, item, len, field, field_len ) \ -{ \ - if (ref == NULL) \ - return -1; \ - if (ref->field != NULL) { \ - SNMP_ZERO(ref->field, ref->field_len); \ - SNMP_FREE(ref->field); \ - } \ - ref->field_len = 0; \ - if (len == 0 || item == NULL) { \ - return 0; \ - } \ - if ((ref->field = (type*) malloc (len * sizeof(type))) == NULL) \ - { \ - return -1; \ - } \ - \ - memcpy (ref->field, item, len * sizeof(type)); \ - ref->field_len = len; \ - \ - return 0; \ -} +#define MAKE_ENTRY(ref, type, item, len, field, field_len) \ +do { \ + if (ref == NULL) \ + return -1; \ + if (ref->field != NULL) { \ + SNMP_ZERO(ref->field, ref->field_len); \ + SNMP_FREE(ref->field); \ + } \ + ref->field_len = 0; \ + if (len == 0 || item == NULL) \ + return 0; \ + ref->field = netsnmp_memdup(item, len * sizeof(type)); \ + if (ref->field == NULL) \ + return -1; \ + \ + ref->field_len = len; \ + return 0; \ +} while (0) +static int +usm_clone_usmStateReference(struct usmStateReference *from, + struct usmStateReference **to); -int +static int free_enginetime_on_shutdown(int majorid, int minorid, void *serverarg, void *clientarg) { @@ -189,42 +280,66 @@ free_enginetime_on_shutdown(int majorid, int minorid, void *serverarg, return 0; } -struct usmStateReference * +static struct usmStateReference * usm_malloc_usmStateReference(void) { - struct usmStateReference *retval = (struct usmStateReference *) - calloc(1, sizeof(struct usmStateReference)); + struct usmStateReference *retval; + + retval = calloc(1, sizeof(struct usmStateReference)); + if (retval) + retval->refcnt = 1; return retval; } /* end usm_malloc_usmStateReference() */ +static int +usm_clone(netsnmp_pdu *pdu, netsnmp_pdu *new_pdu) +{ + struct usmStateReference *ref = pdu->securityStateRef; + struct usmStateReference **new_ref = + (struct usmStateReference **)&new_pdu->securityStateRef; + int ret = 0; -void + if (!ref) + return ret; + + if (pdu->command == SNMP_MSG_TRAP2) { + netsnmp_assert(pdu->securityModel == SNMP_DEFAULT_SECMODEL); + ret = usm_clone_usmStateReference(ref, new_ref); + } else { + netsnmp_assert(ref == *new_ref); + ref->refcnt++; + } + + return ret; +} + +static void usm_free_usmStateReference(void *old) { - struct usmStateReference *old_ref = (struct usmStateReference *) old; + struct usmStateReference *ref = old; - if (old_ref) { - - SNMP_FREE(old_ref->usr_name); - SNMP_FREE(old_ref->usr_engine_id); - SNMP_FREE(old_ref->usr_auth_protocol); - SNMP_FREE(old_ref->usr_priv_protocol); + if (!ref) + return; - if (old_ref->usr_auth_key) { - SNMP_ZERO(old_ref->usr_auth_key, old_ref->usr_auth_key_length); - SNMP_FREE(old_ref->usr_auth_key); - } - if (old_ref->usr_priv_key) { - SNMP_ZERO(old_ref->usr_priv_key, old_ref->usr_priv_key_length); - SNMP_FREE(old_ref->usr_priv_key); - } + if (--ref->refcnt > 0) + return; - SNMP_ZERO(old_ref, sizeof(*old_ref)); - SNMP_FREE(old_ref); + SNMP_FREE(ref->usr_name); + SNMP_FREE(ref->usr_engine_id); + SNMP_FREE(ref->usr_auth_protocol); + SNMP_FREE(ref->usr_priv_protocol); + if (ref->usr_auth_key_length && ref->usr_auth_key) { + SNMP_ZERO(ref->usr_auth_key, ref->usr_auth_key_length); + SNMP_FREE(ref->usr_auth_key); + } + if (ref->usr_priv_key_length && ref->usr_priv_key) { + SNMP_ZERO(ref->usr_priv_key, ref->usr_priv_key_length); + SNMP_FREE(ref->usr_priv_key); } + SNMP_FREE(ref); } /* end usm_free_usmStateReference() */ struct usmUser * @@ -233,57 +348,57 @@ usm_get_userList(void) return userList; } -int +static int usm_set_usmStateReference_name(struct usmStateReference *ref, char *name, size_t name_len) { - MAKE_ENTRY(char, name, name_len, usr_name, usr_name_length); + MAKE_ENTRY(ref, char, name, name_len, usr_name, usr_name_length); } -int +static int usm_set_usmStateReference_engine_id(struct usmStateReference *ref, u_char * engine_id, size_t engine_id_len) { - MAKE_ENTRY(u_char, engine_id, engine_id_len, + MAKE_ENTRY(ref, u_char, engine_id, engine_id_len, usr_engine_id, usr_engine_id_length); } -int +static int usm_set_usmStateReference_auth_protocol(struct usmStateReference *ref, oid * auth_protocol, size_t auth_protocol_len) { - MAKE_ENTRY(oid, auth_protocol, auth_protocol_len, + MAKE_ENTRY(ref, oid, auth_protocol, auth_protocol_len, usr_auth_protocol, usr_auth_protocol_length); } -int +static int usm_set_usmStateReference_auth_key(struct usmStateReference *ref, u_char * auth_key, size_t auth_key_len) { - MAKE_ENTRY(u_char, auth_key, auth_key_len, + MAKE_ENTRY(ref, u_char, auth_key, auth_key_len, usr_auth_key, usr_auth_key_length); } -int +static int usm_set_usmStateReference_priv_protocol(struct usmStateReference *ref, oid * priv_protocol, size_t priv_protocol_len) { - MAKE_ENTRY(oid, priv_protocol, priv_protocol_len, + MAKE_ENTRY(ref, oid, priv_protocol, priv_protocol_len, usr_priv_protocol, usr_priv_protocol_length); } -int +static int usm_set_usmStateReference_priv_key(struct usmStateReference *ref, u_char * priv_key, size_t priv_key_len) { - MAKE_ENTRY(u_char, priv_key, priv_key_len, + MAKE_ENTRY(ref, u_char, priv_key, priv_key_len, usr_priv_key, usr_priv_key_length); } -int +static int usm_set_usmStateReference_sec_level(struct usmStateReference *ref, int sec_level) { @@ -293,8 +408,9 @@ usm_set_usmStateReference_sec_level(struct usmStateReference *ref, return 0; } -int -usm_clone_usmStateReference(struct usmStateReference *from, struct usmStateReference **to) +static int +usm_clone_usmStateReference(struct usmStateReference *from, + struct usmStateReference **to) { struct usmStateReference *cloned_usmStateRef; @@ -357,101 +473,424 @@ emergency_print(u_char * field, u_int length) } /* end emergency_print() */ #endif /* NETSNMP_ENABLE_TESTING_CODE */ - -/*******************************************************************-o-****** - * asn_predict_int_length - * - * Parameters: - * type (UNUSED) - * number - * len - * - * Returns: - * Number of bytes necessary to store the ASN.1 encoded value of 'number'. - * - * - * This gives the number of bytes that the ASN.1 encoder (in asn1.c) will - * use to encode a particular integer value. - * - * Returns the length of the integer -- NOT THE HEADER! - * - * Do this the same way as asn_build_int()... - */ -int -asn_predict_int_length(int type, long number, size_t len) +static struct usmUser * +usm_get_user_from_list(const u_char *engineID, size_t engineIDLen, + const char *name, struct usmUser *puserList, + int use_default) { - register u_long mask; - + struct usmUser *ptr; - if (len != sizeof(long)) - return -1; + if (name == NULL) + name = ""; + for (ptr = puserList; ptr != NULL; ptr = ptr->next) { + if (ptr->name && !strcmp(ptr->name, name)) { + DEBUGMSGTL(("usm", "match on user %s\n", ptr->name)); + if (ptr->engineIDLen == engineIDLen && + ((ptr->engineID == NULL && engineID == NULL) || + (ptr->engineID != NULL && engineID != NULL && + memcmp(ptr->engineID, engineID, engineIDLen) == 0))) + return ptr; + DEBUGMSGTL(("usm", "no match on engineID (")); + if (engineID) { + DEBUGMSGHEX(("usm", engineID, engineIDLen)); + } else { + DEBUGMSGTL(("usm", "Empty EngineID")); + } + DEBUGMSG(("usm", ")\n")); + } + } - mask = ((u_long) 0x1FF) << ((8 * (sizeof(long) - 1)) - 1); /* - * mask is 0xFF800000 on a big-endian machine + * return "" user used to facilitate engineID discovery */ + if (use_default && !strcmp(name, "")) + return noNameUser; + return NULL; +} - while ((((number & mask) == 0) || ((number & mask) == mask)) - && len > 1) { - len--; - number <<= 8; - } - - return len; +/* + * usm_get_user(): Returns a user from userList based on the engineID, + * engineIDLen and name of the requested user. + */ +struct usmUser * +usm_get_user(const u_char *engineID, size_t engineIDLen, const char *name) +{ + DEBUGMSGTL(("usm", "getting user %s\n", name)); + return usm_get_user_from_list(engineID, engineIDLen, name, userList, + 1); +} -} /* end asn_predict_length() */ +static struct usmUser * +usm_add_user_to_list(struct usmUser *user, struct usmUser *puserList) +{ + struct usmUser *nptr, *pptr, *optr; + /* + * loop through puserList till we find the proper, sorted place to + * insert the new user + */ + /* XXX - how to handle a NULL user->name ?? */ + /* XXX - similarly for a NULL nptr->name ?? */ + for (nptr = puserList, pptr = NULL; nptr != NULL; + pptr = nptr, nptr = nptr->next) { + if (nptr->engineIDLen > user->engineIDLen) + break; + if (user->engineID == NULL && nptr->engineID != NULL) + break; + if (nptr->engineIDLen == user->engineIDLen && + (nptr->engineID != NULL && user->engineID != NULL && + memcmp(nptr->engineID, user->engineID, + user->engineIDLen) > 0)) + break; -/*******************************************************************-o-****** - * asn_predict_length - * - * Parameters: - * type - * *ptr - * u_char_len - * - * Returns: - * Length in bytes: 1 + + , where - * - * 1 For the ASN.1 type. - * # of bytes to store length of data. - * Length of data associated with ASN.1 type. - * - * This gives the number of bytes that the ASN.1 encoder (in asn1.c) will - * use to encode a particular integer value. This is as broken as the - * currently used encoder. - * - * XXX How is chosen, exactly?? - */ -int -asn_predict_length(int type, u_char * ptr, size_t u_char_len) -{ + if (!(nptr->engineID == NULL && user->engineID != NULL)) { + if (nptr->engineIDLen == user->engineIDLen && + ((nptr->engineID == NULL && user->engineID == NULL) || + memcmp(nptr->engineID, user->engineID, + user->engineIDLen) == 0) + && strlen(nptr->name) > strlen(user->name)) + break; - if (type & ASN_SEQUENCE) - return 1 + 3 + u_char_len; + if (nptr->engineIDLen == user->engineIDLen && + ((nptr->engineID == NULL && user->engineID == NULL) || + memcmp(nptr->engineID, user->engineID, + user->engineIDLen) == 0) + && strlen(nptr->name) == strlen(user->name) + && strcmp(nptr->name, user->name) > 0) + break; - if (type & ASN_INTEGER) { - u_long value; - memcpy(&value, ptr, u_char_len); - u_char_len = asn_predict_int_length(type, value, u_char_len); + if (nptr->engineIDLen == user->engineIDLen && + ((nptr->engineID == NULL && user->engineID == NULL) || + memcmp(nptr->engineID, user->engineID, + user->engineIDLen) == 0) + && strlen(nptr->name) == strlen(user->name) + && strcmp(nptr->name, user->name) == 0) { + /* + * the user is an exact match of a previous entry. + * Credentials may be different, though, so remove + * the old entry (and add the new one)! + */ + if (pptr) { /* change prev's next pointer */ + pptr->next = nptr->next; + } + if (nptr->next) { /* change next's prev pointer */ + nptr->next->prev = pptr; + } + optr = nptr; + nptr = optr->next; /* add new user at this position */ + /* free the old user */ + optr->next=NULL; + optr->prev=NULL; + usm_free_user(optr); + break; /* new user will be added below */ + } + } } - if (u_char_len < 0x80) - return 1 + 1 + u_char_len; - else if (u_char_len < 0xFF) - return 1 + 2 + u_char_len; - else - return 1 + 3 + u_char_len; + /* + * nptr should now point to the user that we need to add ourselves + * in front of, and pptr should be our new 'prev'. + */ -} /* end asn_predict_length() */ + /* + * change our pointers + */ + user->prev = pptr; + user->next = nptr; + /* + * change the next's prev pointer + */ + if (user->next) + user->next->prev = user; + /* + * change the prev's next pointer + */ + if (user->prev) + user->prev->next = user; + /* + * rewind to the head of the list and return it (since the new head + * could be us, we need to notify the above routine who the head now is. + */ + for (pptr = user; pptr->prev != NULL; pptr = pptr->prev); + return pptr; +} -/*******************************************************************-o-****** - * usm_calc_offsets +/* + * usm_add_user(): Add's a user to the userList, sorted by the + * engineIDLength then the engineID then the name length then the name + * to facilitate getNext calls on a usmUser table which is indexed by + * these values. + * + * returns the head of the list (which could change due to this add). + */ + +struct usmUser * +usm_add_user(struct usmUser *user) +{ + struct usmUser *uptr; + uptr = usm_add_user_to_list(user, userList); + if (uptr != NULL) + userList = uptr; + return uptr; +} + +/* + * usm_remove_usmUser_from_list remove user from (optional) list + * + * if list is not specified, defaults to global userList. + * + * returns SNMPERR_SUCCESS or SNMPERR_USM_UNKNOWNSECURITYNAME + */ +static int +usm_remove_usmUser_from_list(struct usmUser *user, struct usmUser **ppuserList) +{ + struct usmUser *nptr, *pptr; + + /* + * NULL pointers aren't allowed + */ + if (ppuserList == NULL) + ppuserList = &userList; + + if (*ppuserList == NULL) + return SNMPERR_USM_UNKNOWNSECURITYNAME; + + /* + * find the user in the list + */ + for (nptr = *ppuserList, pptr = NULL; nptr != NULL; + pptr = nptr, nptr = nptr->next) { + if (nptr == user) + break; + } + + if (nptr) { + /* + * remove the user from the linked list + */ + if (pptr) { + pptr->next = nptr->next; + } + if (nptr->next) { + nptr->next->prev = pptr; + } + } else { + /* + * user didn't exist + */ + return SNMPERR_USM_UNKNOWNSECURITYNAME; + } + if (nptr == *ppuserList) /* we're the head of the list, need to change + * * the head to the next user */ + *ppuserList = nptr->next; + return SNMPERR_SUCCESS; +} /* end usm_remove_usmUser_from_list() */ + +/* + * usm_remove_user_from_list + * + * removes user from list. + * + * returns new list head on success, or NULL on error. + * + * NOTE: if there was only one user in the list, list head will be NULL. + * So NULL can also mean success. Use the newer usm_remove_usmUser() for + * more specific return codes. This function is kept for backwards + * compatability with this ambiguous behaviour. + */ +static struct usmUser * +usm_remove_user_from_list(struct usmUser *user, + struct usmUser **ppuserList) +{ + int rc = usm_remove_usmUser_from_list(user, ppuserList); + if (rc != SNMPERR_SUCCESS || NULL == ppuserList) + return NULL; + + return *ppuserList; +} /* end usm_remove_user_from_list() */ + +/* + * usm_remove_user(): finds and removes a user from a list + */ +struct usmUser * +usm_remove_user(struct usmUser *user) +{ + return usm_remove_user_from_list(user, &userList); +} + +/* + * usm_free_user(): calls free() on all needed parts of struct usmUser and + * the user himself. + * + * Note: This should *not* be called on an object in a list (IE, + * remove it from the list first, and set next and prev to NULL), but + * will try to reconnect the list pieces again if it is called this + * way. If called on the head of the list, the entire list will be + * lost. + */ +struct usmUser * +usm_free_user(struct usmUser *user) +{ + if (user == NULL) + return NULL; + + SNMP_FREE(user->engineID); + SNMP_FREE(user->name); + SNMP_FREE(user->secName); + SNMP_FREE(user->cloneFrom); + SNMP_FREE(user->userPublicString); + SNMP_FREE(user->authProtocol); + SNMP_FREE(user->privProtocol); + + if (user->authKey != NULL) { + SNMP_ZERO(user->authKey, user->authKeyLen); + SNMP_FREE(user->authKey); + } + + if (user->privKey != NULL) { + SNMP_ZERO(user->privKey, user->privKeyLen); + SNMP_FREE(user->privKey); + } + + if (user->authKeyKu != NULL) { + SNMP_ZERO(user->authKeyKu, user->authKeyKuLen); + SNMP_FREE(user->authKeyKu); + } + + if (user->privKeyKu != NULL) { + SNMP_ZERO(user->privKeyKu, user->privKeyKuLen); + SNMP_FREE(user->privKeyKu); + } + +#ifdef NETSNMP_USE_OPENSSL + if (user->usmDHUserAuthKeyChange) + { + DH_free(user->usmDHUserAuthKeyChange); + user->usmDHUserAuthKeyChange = NULL; + } + + if (user->usmDHUserPrivKeyChange) + { + DH_free(user->usmDHUserPrivKeyChange); + user->usmDHUserPrivKeyChange = NULL; + } +#endif + + /* + * FIX Why not put this check *first?* + */ + if (user->prev != NULL && user->prev != (struct usmUser *)-1) { /* ack, this shouldn't happen */ + user->prev->next = user->next; + } + if (user->next != NULL && user->next != (struct usmUser *)-1) { + user->next->prev = user->prev; + if (user->prev != NULL) /* ack this is really bad, because it means + * * we'll loose the head of some structure tree */ + DEBUGMSGTL(("usm", + "Severe: Asked to free the head of a usmUser tree somewhere.")); + } + + + SNMP_ZERO(user, sizeof(*user)); + SNMP_FREE(user); + + return NULL; /* for convenience to returns from calling functions */ + +} /* end usm_free_user() */ + +/*******************************************************************-o-****** + * asn_predict_int_length + * + * Parameters: + * type (UNUSED) + * number + * len + * + * Returns: + * Number of bytes necessary to store the ASN.1 encoded value of 'number'. + * + * + * This gives the number of bytes that the ASN.1 encoder (in asn1.c) will + * use to encode a particular integer value. + * + * Returns the length of the integer -- NOT THE HEADER! + * + * Do this the same way as asn_build_int()... + */ +static int +asn_predict_int_length(int type, long number, size_t len) +{ + register u_long mask; + + + if (len != sizeof(long)) + return -1; + + mask = ((u_long) 0x1FF) << ((8 * (sizeof(long) - 1)) - 1); + /* + * mask is 0xFF800000 on a big-endian machine + */ + + while ((((number & mask) == 0) || ((number & mask) == mask)) + && len > 1) { + len--; + number <<= 8; + } + + return len; + +} /* end asn_predict_length() */ + +/*******************************************************************-o-****** + * asn_predict_length + * + * Parameters: + * type + * *ptr + * u_char_len + * + * Returns: + * Length in bytes: 1 + + , where + * + * 1 For the ASN.1 type. + * # of bytes to store length of data. + * Length of data associated with ASN.1 type. + * + * This gives the number of bytes that the ASN.1 encoder (in asn1.c) will + * use to encode a particular integer value. This is as broken as the + * currently used encoder. + * + * XXX How is chosen, exactly?? + */ +static int +asn_predict_length(int type, u_char * ptr, size_t u_char_len) +{ + + if (type & ASN_SEQUENCE) + return 1 + 3 + u_char_len; + + if (type & ASN_INTEGER) { + u_long value; + memcpy(&value, ptr, u_char_len); + u_char_len = asn_predict_int_length(type, value, u_char_len); + } + + if (u_char_len < 0x80) + return 1 + 1 + u_char_len; + else if (u_char_len < 0xFF) + return 1 + 2 + u_char_len; + else + return 1 + 3 + u_char_len; + +} /* end asn_predict_length() */ + +/*******************************************************************-o-****** + * usm_calc_offsets * * Parameters: * (See list below...) @@ -505,7 +944,7 @@ asn_predict_length(int type, u_char * ptr, size_t u_char_len) * [11] = theTotalLength - the length of the header itself * [12] = theTotalLength */ -int +static int usm_calc_offsets(size_t globalDataLen, /* SNMPv3Message + HeaderData */ int secLevel, size_t secEngineIDLen, size_t secNameLen, size_t scopedPduLen, /* An BER encoded sequence. */ u_long engineboots, /* XXX (asn1.c works in long, not int.) */ @@ -627,10 +1066,6 @@ usm_calc_offsets(size_t globalDataLen, /* SNMPv3Message + HeaderData */ } /* end usm_calc_offsets() */ - - - - #ifndef NETSNMP_DISABLE_DES /*******************************************************************-o-****** * usm_set_salt @@ -657,7 +1092,7 @@ usm_calc_offsets(size_t globalDataLen, /* SNMPv3Message + HeaderData */ * portion of the private key (last 8 bytes). * The IV result is returned individually for further use. */ -int +static int usm_set_salt(u_char * iv, size_t * iv_length, u_char * priv_salt, size_t priv_salt_length, u_char * msgSalt) @@ -729,7 +1164,7 @@ usm_set_salt(u_char * iv, * The resulting salt is copied into the salt buffer. * The IV result is returned individually for further use. */ -int +static int usm_set_aes_iv(u_char * iv, size_t * iv_length, u_int net_boots, @@ -763,26 +1198,65 @@ usm_set_aes_iv(u_char * iv, memcpy(salt, iv+8, 8); /* only copy the needed portion */ return 0; -} /* end usm_set_salt() */ +} /* end usm_set_aes_iv() */ #endif /* HAVE_AES */ -int -usm_secmod_generate_out_msg(struct snmp_secmod_outgoing_params *parms) -{ - if (!parms) - return SNMPERR_GENERR; - - return usm_generate_out_msg(parms->msgProcModel, - parms->globalData, parms->globalDataLen, - parms->maxMsgSize, parms->secModel, - parms->secEngineID, parms->secEngineIDLen, - parms->secName, parms->secNameLen, - parms->secLevel, - parms->scopedPdu, parms->scopedPduLen, - parms->secStateRef, - parms->secParams, parms->secParamsLen, - parms->wholeMsg, parms->wholeMsgLen); -} +/*******************************************************************-o-****** + * usm_check_secLevel_vs_protocols + * + * Parameters: + * level + * *authProtocol + * authProtocolLen + * *privProtocol + * privProtocolLen + * + * Returns: + * 0 On success, + * 1 Otherwise. + * + * Same as above but with explicitly named transform types instead of taking + * from the usmUser structure. + */ +static int +usm_check_secLevel_vs_protocols(int level, + const oid * authProtocol, + u_int authProtocolLen, + const oid * privProtocol, + u_int privProtocolLen) +{ + + if (level == SNMP_SEC_LEVEL_AUTHPRIV + && + (netsnmp_oid_equals + (privProtocol, privProtocolLen, usmNoPrivProtocol, + sizeof(usmNoPrivProtocol) / sizeof(oid)) == 0)) { + DEBUGMSGTL(("usm", "Level: %d\n", level)); + DEBUGMSGTL(("usm", "Auth Protocol: ")); + DEBUGMSGOID(("usm", authProtocol, authProtocolLen)); + DEBUGMSG(("usm", ", Priv Protocol: ")); + DEBUGMSGOID(("usm", privProtocol, privProtocolLen)); + DEBUGMSG(("usm", "\n")); + return 1; + } + if ((level == SNMP_SEC_LEVEL_AUTHPRIV + || level == SNMP_SEC_LEVEL_AUTHNOPRIV) + && + (netsnmp_oid_equals + (authProtocol, authProtocolLen, usmNoAuthProtocol, + sizeof(usmNoAuthProtocol) / sizeof(oid)) == 0)) { + DEBUGMSGTL(("usm", "Level: %d\n", level)); + DEBUGMSGTL(("usm", "Auth Protocol: ")); + DEBUGMSGOID(("usm", authProtocol, authProtocolLen)); + DEBUGMSG(("usm", ", Priv Protocol: ")); + DEBUGMSGOID(("usm", privProtocol, privProtocolLen)); + DEBUGMSG(("usm", "\n")); + return 1; + } + + return 0; + +} /* end usm_check_secLevel_vs_protocols() */ /*******************************************************************-o-****** * usm_generate_out_msg @@ -804,7 +1278,7 @@ usm_secmod_generate_out_msg(struct snmp_secmod_outgoing_params *parms) * * XXX Beware of misnomers! */ -int +static int usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ u_char * globalData, /* IN */ /* @@ -823,12 +1297,12 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ size_t globalDataLen, /* IN - Length of msg header data. */ int maxMsgSize, /* (UNUSED) */ int secModel, /* (UNUSED) */ - u_char * secEngineID, /* IN - Pointer snmpEngineID. */ - size_t secEngineIDLen, /* IN - SnmpEngineID length. */ - char *secName, /* IN - Pointer to securityName. */ - size_t secNameLen, /* IN - SecurityName length. */ - int secLevel, /* IN - AuthNoPriv, authPriv etc. */ - u_char * scopedPdu, /* IN */ + const u_char *secEngineID, /* IN - Pointer snmpEngineID. */ + size_t secEngineIDLen, /* IN - SnmpEngineID length. */ + const char *secName, /* IN - Pointer to securityName.*/ + size_t secNameLen, /* IN - SecurityName length. */ + int secLevel, /* IN - AuthNoPriv, authPriv etc. */ + const u_char *scopedPdu, /* IN */ /* * Pointer to scopedPdu will be encrypted by USM if needed * * and written to packet buffer immediately following @@ -836,7 +1310,7 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ * * USM if needed. */ size_t scopedPduLen, /* IN - scopedPdu length. */ - void *secStateRef, /* IN */ + const void *secStateRef, /* IN */ /* * secStateRef, pointer to cached info provided only for * * Response, otherwise NULL. @@ -887,9 +1361,9 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ * actual prarmeter list or the user list. */ - char *theName = NULL; + const char *theName = NULL; u_int theNameLength = 0; - u_char *theEngineID = NULL; + const u_char *theEngineID = NULL; u_int theEngineIDLength = 0; u_char *theAuthKey = NULL; u_int theAuthKeyLength = 0; @@ -909,8 +1383,7 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ /* * To hush the compiler for now. XXX */ - struct usmStateReference *ref - = (struct usmStateReference *) secStateRef; + const struct usmStateReference *ref = secStateRef; theName = ref->usr_name; theNameLength = ref->usr_name_length; @@ -946,7 +1419,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ if ((user = usm_get_user(secEngineID, secEngineIDLen, secName)) == NULL && secLevel != SNMP_SEC_LEVEL_NOAUTH) { DEBUGMSGTL(("usm", "Unknown User(%s)\n", secName)); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_UNKNOWNSECURITYNAME; } @@ -998,7 +1470,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ thePrivProtocolLength) == 1) { DEBUGMSGTL(("usm", "Unsupported Security Level (%d)\n", theSecLevel)); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL; } @@ -1028,7 +1499,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ &msgAuthParmLen, &msgPrivParmLen, &otstlen, &seq_len, &msgSecParmLen) == -1) { DEBUGMSGTL(("usm", "Failed calculating offsets.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_GENERICERROR; } @@ -1050,7 +1520,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ ptr = *wholeMsg = globalData; if (theTotalLength > *wholeMsgLen) { DEBUGMSGTL(("usm", "Message won't fit in buffer.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_GENERICERROR; } @@ -1067,31 +1536,30 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ size_t encrypted_length = theTotalLength - dataOffset; size_t salt_length = BYTESIZE(USM_MAX_SALT_LENGTH); u_char salt[BYTESIZE(USM_MAX_SALT_LENGTH)]; - - /* - * XXX Hardwired to seek into a 1DES private key! - */ + int priv_type = sc_get_privtype(thePrivProtocol, + thePrivProtocolLength); #ifdef HAVE_AES - if (ISTRANSFORM(thePrivProtocol, AESPriv)) { + if (USM_CREATE_USER_PRIV_AES == (priv_type & USM_PRIV_MASK_ALG)) { if (!thePrivKey || usm_set_aes_iv(salt, &salt_length, htonl(boots_uint), htonl(time_uint), &ptr[privParamsOffset]) == -1) { DEBUGMSGTL(("usm", "Can't set AES iv.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_GENERICERROR; } - } + } #endif #ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(thePrivProtocol, DESPriv)) { + /* + * XXX Hardwired to seek into a 1DES private key! + */ + if (USM_CREATE_USER_PRIV_DES == (priv_type & USM_PRIV_MASK_ALG)) { if (!thePrivKey || (usm_set_salt(salt, &salt_length, thePrivKey + 8, thePrivKeyLength - 8, &ptr[privParamsOffset]) == -1)) { DEBUGMSGTL(("usm", "Can't set DES-CBC salt.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_GENERICERROR; } } @@ -1104,7 +1572,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ &ptr[dataOffset], &encrypted_length) != SNMP_ERR_NOERROR) { DEBUGMSGTL(("usm", "encryption error.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_ENCRYPTIONERROR; } #ifdef NETSNMP_ENABLE_TESTING_CODE @@ -1132,7 +1599,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ if ((encrypted_length != (theTotalLength - dataOffset)) || (salt_length != msgPrivParmLen)) { DEBUGMSGTL(("usm", "encryption length error.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_ENCRYPTIONERROR; } @@ -1191,7 +1657,7 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ DEBUGDUMPHEADER("send", "msgUserName"); asn_build_string(&ptr[offSet], &remaining, (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | - ASN_OCTET_STR), (u_char *) theName, + ASN_OCTET_STR), (const u_char *) theName, theNameLength); DEBUGINDENTLESS(); @@ -1268,7 +1734,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ if (temp_sig == NULL) { DEBUGMSGTL(("usm", "Out of memory.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_GENERICERROR; } @@ -1282,7 +1747,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ SNMP_ZERO(temp_sig, temp_sig_len); SNMP_FREE(temp_sig); DEBUGMSGTL(("usm", "Signing failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_AUTHENTICATIONFAILURE; } @@ -1290,7 +1754,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ SNMP_ZERO(temp_sig, temp_sig_len); SNMP_FREE(temp_sig); DEBUGMSGTL(("usm", "Signing lengths failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_AUTHENTICATIONFAILURE; } @@ -1304,7 +1767,6 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ /* * endif -- create keyed hash */ - usm_free_usmStateReference(secStateRef); DEBUGMSGTL(("usm", "USM processing completed.\n")); @@ -1312,26 +1774,26 @@ usm_generate_out_msg(int msgProcModel, /* (UNUSED) */ } /* end usm_generate_out_msg() */ -#ifdef NETSNMP_USE_REVERSE_ASNENCODING -int -usm_secmod_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) +static int +usm_secmod_generate_out_msg(struct snmp_secmod_outgoing_params *parms) { if (!parms) return SNMPERR_GENERR; - return usm_rgenerate_out_msg(parms->msgProcModel, - parms->globalData, parms->globalDataLen, - parms->maxMsgSize, parms->secModel, - parms->secEngineID, parms->secEngineIDLen, - parms->secName, parms->secNameLen, - parms->secLevel, - parms->scopedPdu, parms->scopedPduLen, - parms->secStateRef, - parms->wholeMsg, parms->wholeMsgLen, - parms->wholeMsgOffset); + return usm_generate_out_msg(parms->msgProcModel, + parms->globalData, parms->globalDataLen, + parms->maxMsgSize, parms->secModel, + parms->secEngineID, parms->secEngineIDLen, + parms->secName, parms->secNameLen, + parms->secLevel, + parms->scopedPdu, parms->scopedPduLen, + parms->secStateRef, + parms->secParams, parms->secParamsLen, + parms->wholeMsg, parms->wholeMsgLen); } -int +#ifdef NETSNMP_USE_REVERSE_ASNENCODING +static int usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ u_char * globalData, /* IN */ /* @@ -1341,12 +1803,12 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ size_t globalDataLen, /* IN - Length of msg header data. */ int maxMsgSize, /* (UNUSED) */ int secModel, /* (UNUSED) */ - u_char * secEngineID, /* IN - Pointer snmpEngineID. */ - size_t secEngineIDLen, /* IN - SnmpEngineID length. */ - char *secName, /* IN - Pointer to securityName. */ - size_t secNameLen, /* IN - SecurityName length. */ - int secLevel, /* IN - AuthNoPriv, authPriv etc. */ - u_char * scopedPdu, /* IN */ + const u_char *secEngineID, /* IN - Pointer snmpEngineID.*/ + size_t secEngineIDLen, /* IN - SnmpEngineID length. */ + const char *secName, /* IN - Pointer to securityName.*/ + size_t secNameLen, /* IN - SecurityName length. */ + int secLevel, /* IN - AuthNoPriv, authPriv etc. */ + const u_char *scopedPdu, /* IN */ /* * Pointer to scopedPdu will be encrypted by USM if needed * * and written to packet buffer immediately following @@ -1354,7 +1816,7 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * * USM if needed. */ size_t scopedPduLen, /* IN - scopedPdu length. */ - void *secStateRef, /* IN */ + const void *secStateRef, /* IN */ /* * secStateRef, pointer to cached info provided only for * * Response, otherwise NULL. @@ -1369,7 +1831,7 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * Length of the entire packet buffer, **not** the length of the * packet. */ - size_t * offset /* IN/OUT */ + size_t * offset /* IN/OUT */ /* * Offset from the end of the packet buffer to the start of the packet, * also known as the packet length. @@ -1377,10 +1839,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ ) { size_t msgAuthParmLen = 0; -#ifdef NETSNMP_ENABLE_TESTING_CODE - size_t theTotalLength; -#endif - u_int boots_uint; u_int time_uint; long boots_long; @@ -1394,9 +1852,9 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * actual parameter list or the user list. */ - char *theName = NULL; + const char *theName = NULL; u_int theNameLength = 0; - u_char *theEngineID = NULL; + const u_char *theEngineID = NULL; u_int theEngineIDLength = 0; u_char *theAuthKey = NULL; u_int theAuthKeyLength = 0; @@ -1421,8 +1879,7 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ /* * To hush the compiler for now. XXX */ - struct usmStateReference *ref - = (struct usmStateReference *) secStateRef; + const struct usmStateReference *ref = secStateRef; theName = ref->usr_name; theNameLength = ref->usr_name_length; @@ -1458,7 +1915,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ if ((user = usm_get_user(secEngineID, secEngineIDLen, secName)) == NULL && secLevel != SNMP_SEC_LEVEL_NOAUTH) { DEBUGMSGTL(("usm", "Unknown User\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_UNKNOWNSECURITYNAME; } @@ -1511,7 +1967,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ DEBUGMSGTL(("usm", "Unsupported Security Level or type (%d)\n", theSecLevel)); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL; } @@ -1539,12 +1994,13 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ */ u_char *ciphertext = NULL; size_t ciphertextlen = scopedPduLen + 64; + int priv_type = sc_get_privtype(thePrivProtocol, + thePrivProtocolLength); if ((ciphertext = (u_char *) malloc(ciphertextlen)) == NULL) { DEBUGMSGTL(("usm", "couldn't malloc %d bytes for encrypted PDU\n", (int)ciphertextlen)); - usm_free_usmStateReference(secStateRef); return SNMPERR_MALLOC; } @@ -1552,7 +2008,7 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * XXX Hardwired to seek into a 1DES private key! */ #ifdef HAVE_AES - if (ISTRANSFORM(thePrivProtocol, AESPriv)) { + if (USM_CREATE_USER_PRIV_AES == (priv_type & USM_PRIV_MASK_ALG)) { salt_length = BYTESIZE(USM_AES_SALT_LENGTH); save_salt_length = BYTESIZE(USM_AES_SALT_LENGTH)/2; if (!thePrivKey || @@ -1560,14 +2016,13 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ htonl(boots_uint), htonl(time_uint), iv) == -1) { DEBUGMSGTL(("usm", "Can't set AES iv.\n")); - usm_free_usmStateReference(secStateRef); SNMP_FREE(ciphertext); return SNMPERR_USM_GENERICERROR; } } #endif #ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(thePrivProtocol, DESPriv)) { + if (USM_CREATE_USER_PRIV_DES == (priv_type & USM_PRIV_MASK_ALG)) { salt_length = BYTESIZE(USM_DES_SALT_LENGTH); save_salt_length = BYTESIZE(USM_DES_SALT_LENGTH); if (!thePrivKey || (usm_set_salt(salt, &salt_length, @@ -1575,7 +2030,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ thePrivKeyLength - 8, iv) == -1)) { DEBUGMSGTL(("usm", "Can't set DES-CBC salt.\n")); - usm_free_usmStateReference(secStateRef); SNMP_FREE(ciphertext); return SNMPERR_USM_GENERICERROR; } @@ -1594,7 +2048,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ scopedPdu, scopedPduLen, ciphertext, &ciphertextlen) != SNMP_ERR_NOERROR) { DEBUGMSGTL(("usm", "encryption error.\n")); - usm_free_usmStateReference(secStateRef); SNMP_FREE(ciphertext); return SNMPERR_USM_ENCRYPTIONERROR; } @@ -1603,9 +2056,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * Write the encrypted scopedPdu back into the packet buffer. */ -#ifdef NETSNMP_ENABLE_TESTING_CODE - theTotalLength = *wholeMsgLen; -#endif *offset = 0; rc = asn_realloc_rbuild_string(wholeMsg, wholeMsgLen, offset, 1, (u_char) (ASN_UNIVERSAL | @@ -1614,7 +2064,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ ciphertext, ciphertextlen); if (rc == 0) { DEBUGMSGTL(("usm", "Encryption failed.\n")); - usm_free_usmStateReference(secStateRef); SNMP_FREE(ciphertext); return SNMPERR_USM_ENCRYPTIONERROR; } @@ -1654,18 +2103,19 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ DEBUGINDENTLESS(); if (rc == 0) { DEBUGMSGTL(("usm", "building privParams failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } DEBUGDUMPHEADER("send", "msgAuthenticationParameters"); /* - * msgAuthenticationParameters (warnings assumes 0x00 by 12). + * msgAuthenticationParameters. */ if (theSecLevel == SNMP_SEC_LEVEL_AUTHNOPRIV || theSecLevel == SNMP_SEC_LEVEL_AUTHPRIV) { - memset(authParams, 0, USM_MD5_AND_SHA_AUTH_LEN); - msgAuthParmLen = USM_MD5_AND_SHA_AUTH_LEN; + memset(authParams, 0, sizeof(authParams)); + msgAuthParmLen = + sc_get_auth_maclen(sc_get_authtype(theAuthProtocol, + theAuthProtocolLength)); } rc = asn_realloc_rbuild_string(wholeMsg, wholeMsgLen, offset, 1, @@ -1675,16 +2125,15 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ DEBUGINDENTLESS(); if (rc == 0) { DEBUGMSGTL(("usm", "building authParams failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } /* * Remember where to put the actual HMAC we calculate later on. An * encoded OCTET STRING of length USM_MD5_AND_SHA_AUTH_LEN has an ASN.1 - * header of length 2, hence the fudge factor. + * header of length 2, hence the fudge factor. This works as long as + * auth lengths stay < 127. */ - mac_offset = *offset - 2; /* @@ -1694,11 +2143,10 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ rc = asn_realloc_rbuild_string(wholeMsg, wholeMsgLen, offset, 1, (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OCTET_STR), - (u_char *) theName, theNameLength); + (const u_char *) theName, theNameLength); DEBUGINDENTLESS(); if (rc == 0) { DEBUGMSGTL(("usm", "building authParams failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1714,7 +2162,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ if (rc == 0) { DEBUGMSGTL(("usm", "building msgAuthoritativeEngineTime failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1730,7 +2177,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ if (rc == 0) { DEBUGMSGTL(("usm", "building msgAuthoritativeEngineBoots failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1742,7 +2188,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ DEBUGINDENTLESS(); if (rc == 0) { DEBUGMSGTL(("usm", "building msgAuthoritativeEngineID failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1755,7 +2200,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ *offset - sp_offset); if (rc == 0) { DEBUGMSGTL(("usm", "building usm security parameters failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1769,7 +2213,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ if (rc == 0) { DEBUGMSGTL(("usm", "building msgSecurityParameters failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1779,7 +2222,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ while ((*wholeMsgLen - *offset) < globalDataLen) { if (!asn_realloc(wholeMsg, wholeMsgLen)) { DEBUGMSGTL(("usm", "building global data failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } } @@ -1795,7 +2237,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ ASN_CONSTRUCTOR), *offset); if (rc == 0) { DEBUGMSGTL(("usm", "building master packet sequence failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_TOO_LONG; } @@ -1813,7 +2254,6 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ if (temp_sig == NULL) { DEBUGMSGTL(("usm", "Out of memory.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_GENERICERROR; } @@ -1824,14 +2264,12 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ != SNMP_ERR_NOERROR) { SNMP_FREE(temp_sig); DEBUGMSGTL(("usm", "Signing failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_AUTHENTICATIONFAILURE; } if (temp_sig_len != msgAuthParmLen) { SNMP_FREE(temp_sig); DEBUGMSGTL(("usm", "Signing lengths failed.\n")); - usm_free_usmStateReference(secStateRef); return SNMPERR_USM_AUTHENTICATIONFAILURE; } @@ -1842,14 +2280,28 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ /* * endif -- create keyed hash */ - usm_free_usmStateReference(secStateRef); DEBUGMSGTL(("usm", "USM processing completed.\n")); return SNMPERR_SUCCESS; } /* end usm_rgenerate_out_msg() */ -#endif /* */ - +static int +usm_secmod_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms) +{ + if (!parms) + return SNMPERR_GENERR; + return usm_rgenerate_out_msg(parms->msgProcModel, + parms->globalData, parms->globalDataLen, + parms->maxMsgSize, parms->secModel, + parms->secEngineID, parms->secEngineIDLen, + parms->secName, parms->secNameLen, + parms->secLevel, + parms->scopedPdu, parms->scopedPduLen, + parms->secStateRef, + parms->wholeMsg, parms->wholeMsgLen, + parms->wholeMsgOffset); +} +#endif /* */ /*******************************************************************-o-****** * usm_parse_security_parameters @@ -1866,7 +2318,7 @@ usm_rgenerate_out_msg(int msgProcModel, /* (UNUSED) */ * Extracts values from the security header and data portions of the * incoming buffer. */ -int +static int usm_parse_security_parameters(u_char * secParams, size_t remaining, u_char * secEngineID, @@ -2120,7 +2572,7 @@ usm_parse_security_parameters(u_char * secParams, * * Performs the incoming timeliness checking and setting. */ -int +static int usm_check_and_update_timeliness(u_char * secEngineID, size_t secEngineIDLen, u_int boots_uint, @@ -2262,31 +2714,61 @@ usm_check_and_update_timeliness(u_char * secEngineID, } /* end usm_check_and_update_timeliness() */ +/*******************************************************************-o-****** + * usm_check_secLevel + * + * Parameters: + * level + * *user + * + * Returns: + * 0 On success, + * -1 Otherwise. + * + * Checks that a given security level is valid for a given user. + */ +static int +usm_check_secLevel(int level, struct usmUser *user) +{ + if (user->userStatus != RS_ACTIVE) + return -1; -int -usm_secmod_process_in_msg(struct snmp_secmod_incoming_params *parms) -{ - if (!parms) - return SNMPERR_GENERR; + DEBUGMSGTL(("comparex", "Comparing: %" NETSNMP_PRIo "u %" NETSNMP_PRIo "u ", + usmNoPrivProtocol[0], usmNoPrivProtocol[1])); + DEBUGMSGOID(("comparex", usmNoPrivProtocol, + sizeof(usmNoPrivProtocol) / sizeof(oid))); + DEBUGMSG(("comparex", "\n")); + if (level == SNMP_SEC_LEVEL_AUTHPRIV + && (netsnmp_oid_equals(user->privProtocol, user->privProtocolLen, + usmNoPrivProtocol, + sizeof(usmNoPrivProtocol) / sizeof(oid)) == + 0)) { + DEBUGMSGTL(("usm", "Level: %d\n", level)); + DEBUGMSGTL(("usm", "User (%s) Auth Protocol: ", user->name)); + DEBUGMSGOID(("usm", user->authProtocol, user->authProtocolLen)); + DEBUGMSG(("usm", ", User Priv Protocol: ")); + DEBUGMSGOID(("usm", user->privProtocol, user->privProtocolLen)); + DEBUGMSG(("usm", "\n")); + return 1; + } + if ((level == SNMP_SEC_LEVEL_AUTHPRIV + || level == SNMP_SEC_LEVEL_AUTHNOPRIV) + && + (netsnmp_oid_equals + (user->authProtocol, user->authProtocolLen, usmNoAuthProtocol, + sizeof(usmNoAuthProtocol) / sizeof(oid)) == 0)) { + DEBUGMSGTL(("usm", "Level: %d\n", level)); + DEBUGMSGTL(("usm", "User (%s) Auth Protocol: ", user->name)); + DEBUGMSGOID(("usm", user->authProtocol, user->authProtocolLen)); + DEBUGMSG(("usm", ", User Priv Protocol: ")); + DEBUGMSGOID(("usm", user->privProtocol, user->privProtocolLen)); + DEBUGMSG(("usm", "\n")); + return 1; + } - return usm_process_in_msg(parms->msgProcModel, - parms->maxMsgSize, - parms->secParams, - parms->secModel, - parms->secLevel, - parms->wholeMsg, - parms->wholeMsgLen, - parms->secEngineID, - parms->secEngineIDLen, - parms->secName, - parms->secNameLen, - parms->scopedPdu, - parms->scopedPduLen, - parms->maxSizeResponse, - parms->secStateRef, - parms->sess, parms->msg_flags); -} + return 0; +} /* end usm_check_secLevel() */ /*******************************************************************-o-****** * usm_process_in_msg @@ -2307,11 +2789,8 @@ usm_secmod_process_in_msg(struct snmp_secmod_incoming_params *parms) * * * ASSUMES size of decrypt_buf will always be >= size of encrypted sPDU. - * - * FIX Memory leaks if secStateRef is allocated and a return occurs - * without cleaning up. May contain secrets... */ -int +static int usm_process_in_msg(int msgProcModel, /* (UNUSED) */ size_t maxMsgSize, /* IN - Used to calc maxSizeResponse. */ u_char * secParams, /* IN - BER encoded securityParameters. */ @@ -2340,8 +2819,11 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ #ifdef HAVE_AES u_int net_boots, net_time; #endif - u_char signature[BYTESIZE(USM_MAX_KEYEDHASH_LENGTH)]; - size_t signature_length = BYTESIZE(USM_MAX_KEYEDHASH_LENGTH); +#ifndef NETSNMP_DISABLE_DES + int i; +#endif + u_char signature[USM_MAX_AUTHSIZE]; + size_t signature_length = USM_MAX_AUTHSIZE; u_char salt[BYTESIZE(USM_MAX_SALT_LENGTH)]; size_t salt_length = BYTESIZE(USM_MAX_SALT_LENGTH); u_char iv[BYTESIZE(USM_MAX_SALT_LENGTH)]; @@ -2351,7 +2833,7 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ u_char type_value; u_char *end_of_overhead = NULL; int error; - int i, rc = 0; + int rc = 0; struct usmStateReference **secStateRef = (struct usmStateReference **) secStateRf; @@ -2360,17 +2842,15 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ DEBUGMSGTL(("usm", "USM processing begun...\n")); + netsnmp_assert(secStateRef); - if (secStateRef) { - usm_free_usmStateReference(*secStateRef); - *secStateRef = usm_malloc_usmStateReference(); - if (*secStateRef == NULL) { - DEBUGMSGTL(("usm", "Out of memory.\n")); - return SNMPERR_USM_GENERICERROR; - } + usm_free_usmStateReference(*secStateRef); + *secStateRef = usm_malloc_usmStateReference(); + if (*secStateRef == NULL) { + DEBUGMSGTL(("usm", "Out of memory.\n")); + return SNMPERR_USM_GENERICERROR; } - /* * Make sure the *secParms is an OCTET STRING. * Extract the user name, engine ID, and security level. @@ -2388,10 +2868,12 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ * This indicates a decryptionError. */ snmp_increment_statistic(STAT_USMSTATSDECRYPTIONERRORS); - return SNMPERR_USM_DECRYPTIONERROR; + error = SNMPERR_USM_DECRYPTIONERROR; + } else { + snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); + error = SNMPERR_USM_PARSEERROR; } - snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); - return SNMPERR_USM_PARSEERROR; + goto err; } /* @@ -2402,7 +2884,8 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ */ if ((secLevel == SNMP_SEC_LEVEL_AUTHPRIV) && (salt_length != 8)) { snmp_increment_statistic(STAT_USMSTATSDECRYPTIONERRORS); - return SNMPERR_USM_DECRYPTIONERROR; + error = SNMPERR_USM_DECRYPTIONERROR; + goto err; } if (secLevel != SNMP_SEC_LEVEL_AUTHPRIV) { @@ -2414,30 +2897,30 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ end_of_overhead = data_ptr; } - if (secStateRef) { - /* - * Cache the name, engine ID, and security level, - * * per step 2 (section 3.2) - */ - if (usm_set_usmStateReference_name - (*secStateRef, secName, *secNameLen) == -1) { - DEBUGMSGTL(("usm", "%s\n", "Couldn't cache name.")); - return SNMPERR_USM_GENERICERROR; - } - - if (usm_set_usmStateReference_engine_id - (*secStateRef, secEngineID, *secEngineIDLen) == -1) { - DEBUGMSGTL(("usm", "%s\n", "Couldn't cache engine id.")); - return SNMPERR_USM_GENERICERROR; - } + /* + * Cache the name, engine ID, and security level, + * * per step 2 (section 3.2) + */ + if (usm_set_usmStateReference_name + (*secStateRef, secName, *secNameLen) == -1) { + DEBUGMSGTL(("usm", "%s\n", "Couldn't cache name.")); + error = SNMPERR_USM_GENERICERROR; + goto err; + } - if (usm_set_usmStateReference_sec_level(*secStateRef, secLevel) == - -1) { - DEBUGMSGTL(("usm", "%s\n", "Couldn't cache security level.")); - return SNMPERR_USM_GENERICERROR; - } + if (usm_set_usmStateReference_engine_id + (*secStateRef, secEngineID, *secEngineIDLen) == -1) { + DEBUGMSGTL(("usm", "%s\n", "Couldn't cache engine id.")); + error = SNMPERR_USM_GENERICERROR; + goto err; } + if (usm_set_usmStateReference_sec_level(*secStateRef, secLevel) == + -1) { + DEBUGMSGTL(("usm", "%s\n", "Couldn't cache security level.")); + error = SNMPERR_USM_GENERICERROR; + goto err; + } /* * Locate the engine ID record. @@ -2450,13 +2933,15 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ if (ISENGINEKNOWN(secEngineID, *secEngineIDLen) == FALSE) { DEBUGMSGTL(("usm", "Unknown Engine ID.\n")); snmp_increment_statistic(STAT_USMSTATSUNKNOWNENGINEIDS); - return SNMPERR_USM_UNKNOWNENGINEID; + error = SNMPERR_USM_UNKNOWNENGINEID; + goto err; } } else { if (ENSURE_ENGINE_RECORD(secEngineID, *secEngineIDLen) != SNMPERR_SUCCESS) { DEBUGMSGTL(("usm", "%s\n", "Couldn't ensure engine record.")); - return SNMPERR_USM_GENERICERROR; + error = SNMPERR_USM_GENERICERROR; + goto err; } } @@ -2474,13 +2959,15 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ == NULL) { DEBUGMSGTL(("usm", "Unknown User(%s)\n", secName)); snmp_increment_statistic(STAT_USMSTATSUNKNOWNUSERNAMES); - return SNMPERR_USM_UNKNOWNSECURITYNAME; + error = SNMPERR_USM_UNKNOWNSECURITYNAME; + goto err; } /* ensure the user is active */ if (user->userStatus != RS_ACTIVE) { DEBUGMSGTL(("usm", "Attempt to use an inactive user.\n")); - return SNMPERR_USM_UNKNOWNSECURITYNAME; + error = SNMPERR_USM_UNKNOWNSECURITYNAME; + goto err; } /* @@ -2492,10 +2979,12 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ DEBUGMSGTL(("usm", "Unsupported Security Level (%d).\n", secLevel)); snmp_increment_statistic(STAT_USMSTATSUNSUPPORTEDSECLEVELS); - return SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL; + error = SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL; + goto err; } else if (rc != 0) { DEBUGMSGTL(("usm", "Unknown issue.\n")); - return SNMPERR_USM_GENERICERROR; + error = SNMPERR_USM_GENERICERROR; + goto err; } /* @@ -2512,7 +3001,8 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ snmp_increment_statistic(STAT_USMSTATSWRONGDIGESTS); snmp_log(LOG_WARNING, "Authentication failed for %s\n", user->name); - return SNMPERR_USM_AUTHENTICATIONFAILURE; + error = SNMPERR_USM_AUTHENTICATIONFAILURE; + goto err; } DEBUGMSGTL(("usm", "Verification succeeded.\n")); @@ -2525,41 +3015,41 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ * * Cache the keys and protocol oids, per step 11 (s3.2). */ - if (secStateRef) { - if (usm_set_usmStateReference_auth_protocol(*secStateRef, - user->authProtocol, - user-> - authProtocolLen) == - -1) { - DEBUGMSGTL(("usm", "%s\n", - "Couldn't cache authentication protocol.")); - return SNMPERR_USM_GENERICERROR; - } + if (usm_set_usmStateReference_auth_protocol(*secStateRef, + user->authProtocol, + user-> + authProtocolLen) == -1) { + DEBUGMSGTL(("usm", "%s\n", + "Couldn't cache authentication protocol.")); + error = SNMPERR_USM_GENERICERROR; + goto err; + } - if (usm_set_usmStateReference_auth_key(*secStateRef, - user->authKey, - user->authKeyLen) == -1) { - DEBUGMSGTL(("usm", "%s\n", - "Couldn't cache authentication key.")); - return SNMPERR_USM_GENERICERROR; - } + if (usm_set_usmStateReference_auth_key(*secStateRef, + user->authKey, + user->authKeyLen) == -1) { + DEBUGMSGTL(("usm", "%s\n", + "Couldn't cache authentication key.")); + error = SNMPERR_USM_GENERICERROR; + goto err; + } - if (usm_set_usmStateReference_priv_protocol(*secStateRef, - user->privProtocol, - user-> - privProtocolLen) == - -1) { - DEBUGMSGTL(("usm", "%s\n", - "Couldn't cache privacy protocol.")); - return SNMPERR_USM_GENERICERROR; - } + if (usm_set_usmStateReference_priv_protocol(*secStateRef, + user->privProtocol, + user-> + privProtocolLen) == -1) { + DEBUGMSGTL(("usm", "%s\n", + "Couldn't cache privacy protocol.")); + error = SNMPERR_USM_GENERICERROR; + goto err; + } - if (usm_set_usmStateReference_priv_key(*secStateRef, - user->privKey, - user->privKeyLen) == -1) { - DEBUGMSGTL(("usm", "%s\n", "Couldn't cache privacy key.")); - return SNMPERR_USM_GENERICERROR; - } + if (usm_set_usmStateReference_priv_key(*secStateRef, + user->privKey, + user->privKeyLen) == -1) { + DEBUGMSGTL(("usm", "%s\n", "Couldn't cache privacy key.")); + error = SNMPERR_USM_GENERICERROR; + goto err; } @@ -2571,7 +3061,7 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ if (usm_check_and_update_timeliness(secEngineID, *secEngineIDLen, boots_uint, time_uint, &error) == -1) { - return error; + goto err; } } #ifdef LCD_TIME_SYNC_OPT @@ -2591,6 +3081,8 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ * If needed, decrypt the scoped PDU. */ if (secLevel == SNMP_SEC_LEVEL_AUTHPRIV) { + int priv_type = sc_get_privtype(user->privProtocol, + user->privProtocolLen); remaining = wholeMsgLen - (data_ptr - wholeMsg); if ((value_ptr = asn_parse_sequence(data_ptr, &remaining, @@ -2603,11 +3095,12 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ snmp_increment_statistic(STAT_SNMPINASNPARSEERRS); usm_free_usmStateReference(*secStateRef); *secStateRef = NULL; - return SNMPERR_USM_PARSEERROR; + error = SNMPERR_USM_PARSEERROR; + goto err; } #ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(user->privProtocol, DESPriv)) { + if (USM_CREATE_USER_PRIV_DES == (priv_type & USM_PRIV_MASK_ALG)) { /* * From RFC2574: * @@ -2624,7 +3117,8 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ snmp_increment_statistic(STAT_USMSTATSDECRYPTIONERRORS); usm_free_usmStateReference(*secStateRef); *secStateRef = NULL; - return SNMPERR_USM_DECRYPTIONERROR; + error = SNMPERR_USM_DECRYPTIONERROR; + goto err; } end_of_overhead = value_ptr; @@ -2634,7 +3128,8 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ snmp_increment_statistic(STAT_USMSTATSDECRYPTIONERRORS); usm_free_usmStateReference(*secStateRef); *secStateRef = NULL; - return SNMPERR_USM_DECRYPTIONERROR; + error = SNMPERR_USM_DECRYPTIONERROR; + goto err; } /* @@ -2647,7 +3142,7 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ } #endif #ifdef HAVE_AES - if (ISTRANSFORM(user->privProtocol, AESPriv)) { + if (USM_CREATE_USER_PRIV_AES == (priv_type & USM_PRIV_MASK_ALG)) { iv_length = BYTESIZE(USM_AES_SALT_LENGTH); net_boots = ntohl(boots_uint); net_time = ntohl(time_uint); @@ -2656,7 +3151,15 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ memcpy(iv+8, salt, salt_length); } #endif - + +#ifdef NETSNMP_ENABLE_TESTING_CODE + if (debug_is_token_registered("usm/dump") == SNMPERR_SUCCESS) { + dump_chunk("usm/dump", "Cypher Text", value_ptr, remaining); + dump_chunk("usm/dump", "salt + Encrypted form:", + salt, salt_length); + dump_chunk("usm/dump", "IV + Encrypted form:", iv, iv_length); + } +#endif if (sc_decrypt(user->privProtocol, user->privProtocolLen, user->privKey, user->privKeyLen, iv, iv_length, @@ -2664,14 +3167,11 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ != SNMP_ERR_NOERROR) { DEBUGMSGTL(("usm", "%s\n", "Failed decryption.")); snmp_increment_statistic(STAT_USMSTATSDECRYPTIONERRORS); - return SNMPERR_USM_DECRYPTIONERROR; + error = SNMPERR_USM_DECRYPTIONERROR; + goto err; } #ifdef NETSNMP_ENABLE_TESTING_CODE if (debug_is_token_registered("usm/dump") == SNMPERR_SUCCESS) { - dump_chunk("usm/dump", "Cypher Text", value_ptr, remaining); - dump_chunk("usm/dump", "salt + Encrypted form:", - salt, salt_length); - dump_chunk("usm/dump", "IV + Encrypted form:", iv, iv_length); dump_chunk("usm/dump", "Decrypted chunk:", *scopedPdu, *scopedPduLen); } @@ -2700,10 +3200,39 @@ usm_process_in_msg(int msgProcModel, /* (UNUSED) */ return SNMPERR_SUCCESS; +err: + usm_free_usmStateReference(*secStateRef); + *secStateRef = NULL; + netsnmp_assert(error != SNMPERR_SUCCESS); + return error; } /* end usm_process_in_msg() */ -void -usm_handle_report(void *sessp, +static int +usm_secmod_process_in_msg(struct snmp_secmod_incoming_params *parms) +{ + if (!parms) + return SNMPERR_GENERR; + + return usm_process_in_msg(parms->msgProcModel, + parms->maxMsgSize, + parms->secParams, + parms->secModel, + parms->secLevel, + parms->wholeMsg, + parms->wholeMsgLen, + parms->secEngineID, + parms->secEngineIDLen, + parms->secName, + parms->secNameLen, + parms->scopedPdu, + parms->scopedPduLen, + parms->maxSizeResponse, + parms->secStateRef, + parms->sess, parms->msg_flags); +} + +static void +usm_handle_report(struct session_list *slp, netsnmp_transport *transport, netsnmp_session *session, int result, netsnmp_pdu *pdu) { @@ -2744,7 +3273,7 @@ usm_handle_report(void *sessp, pdu2 = snmp_clone_pdu(pdu); pdu->flags = pdu2->flags = flags; snmpv3_make_report(pdu2, result); - if (0 == snmp_sess_send(sessp, pdu2)) { + if (0 == snmp_sess_send(slp, pdu2)) { snmp_free_pdu(pdu2); /* * TODO: indicate error @@ -2755,8 +3284,33 @@ usm_handle_report(void *sessp, } } -/* sets up initial default session parameters */ +/** utility function to call netsnmp_extend_kul for a usmUser */ int +usm_extend_user_kul(struct usmUser *user, u_int privKeyBufSize) +{ + const netsnmp_priv_alg_info *pai; + + DEBUGMSGTL(("usm", "extending key\n")); + + if (NULL == user) { + DEBUGMSGTL(("usm", "null user!\n")); + return SNMPERR_GENERR; + } + + pai = sc_get_priv_alg_byoid(user->privProtocol, user->privProtocolLen); + if (NULL == pai) { + DEBUGMSGTL(("usm", "privProtocol lookup failed!\n")); + return SNMPERR_GENERR; + } + + return netsnmp_extend_kul(pai->proper_length, user->authProtocol, + user->authProtocolLen, pai->type, user->engineID, + user->engineIDLen, &user->privKey, + &user->privKeyLen, privKeyBufSize); +} + +/* sets up initial default session parameters */ +static int usm_session_init(netsnmp_session *in_session, netsnmp_session *session) { char *cp; @@ -2852,6 +3406,44 @@ usm_session_init(netsnmp_session *in_session, netsnmp_session *session) return SNMPERR_SUCCESS; } +static int usm_build_user(struct usmUser **result, + const netsnmp_session *session) +{ + struct usmUser *user; + + DEBUGMSGTL(("usm", "Building user %s...\n", session->securityName)); + /* + * user doesn't exist so we create and add it + */ + user = calloc(1, sizeof(struct usmUser)); + if (user == NULL) + goto err; + + /* + * copy in the securityName + */ + if (session->securityName) { + user->name = strdup(session->securityName); + user->secName = strdup(session->securityName); + if (user->name == NULL || user->secName == NULL) + goto err; + } + + /* + * copy in the engineID + */ + user->engineID = netsnmp_memdup(session->securityEngineID, + session->securityEngineIDLen); + if (session->securityEngineID && !user->engineID) + goto err; + user->engineIDLen = session->securityEngineIDLen; + *result = user; + return SNMPERR_SUCCESS; + +err: + usm_free_user(user); + return SNMPERR_GENERR; +} /* * usm_create_user_from_session(netsnmp_session *session): @@ -2896,40 +3488,11 @@ usm_create_user_from_session(netsnmp_session * session) session->securityEngineIDLen, session->securityName, usm_get_userList(), 0); - DEBUGMSGTL(("usm", "user exists? x=%p\n", user)); - if (user == NULL) { - DEBUGMSGTL(("usm", "Building user %s...\n", - session->securityName)); - /* - * user doesn't exist so we create and add it - */ - user = (struct usmUser *) calloc(1, sizeof(struct usmUser)); - if (user == NULL) - return SNMPERR_GENERR; - - /* - * copy in the securityName - */ - if (session->securityName) { - user->name = strdup(session->securityName); - user->secName = strdup(session->securityName); - if (user->name == NULL || user->secName == NULL) { - usm_free_user(user); - return SNMPERR_GENERR; - } - } - - /* - * copy in the engineID - */ - user->engineID = netsnmp_memdup(session->securityEngineID, - session->securityEngineIDLen); - if (session->securityEngineID && !user->engineID) { - usm_free_user(user); + if (NULL != user) { + DEBUGMSGTL(("usm", "user exists x=%p\n", user)); + } else { + if (usm_build_user(&user, session) != SNMPERR_SUCCESS) return SNMPERR_GENERR; - } - user->engineIDLen = session->securityEngineIDLen; - user_just_created = 1; } @@ -2978,18 +3541,13 @@ usm_create_user_from_session(netsnmp_session * session) return SNMPERR_GENERR; } user->authKeyLen = session->securityAuthLocalKeyLen; - } else if (session->securityAuthKey != NULL - && session->securityAuthKeyLen != 0) { + } else if (session->securityAuthKeyLen != 0) { SNMP_FREE(user->authKey); user->authKey = (u_char *) calloc(1, USM_LENGTH_KU_HASHBLOCK); - if (user->authKey == NULL) { - usm_free_user(user); - return SNMPERR_GENERR; - } user->authKeyLen = USM_LENGTH_KU_HASHBLOCK; - if (generate_kul(user->authProtocol, user->authProtocolLen, - session->securityEngineID, - session->securityEngineIDLen, + if ((user->authKey == NULL) || + generate_kul(user->authProtocol, user->authProtocolLen, + user->engineID, user->engineIDLen, session->securityAuthKey, session->securityAuthKeyLen, user->authKey, &user->authKeyLen) != SNMPERR_SUCCESS) { @@ -3003,7 +3561,8 @@ usm_create_user_from_session(netsnmp_session * session) user->authKey = (u_char *)malloc(buflen); /* max length needed */ user->authKeyLen = 0; /* it will be a hex string */ - if (!snmp_hex_to_binary(&user->authKey, &buflen, &user->authKeyLen, + if ((NULL == user->authKey) || + !snmp_hex_to_binary(&user->authKey, &buflen, &user->authKeyLen, 0, cp)) { usm_free_user(user); return SNMPERR_GENERR; @@ -3015,6 +3574,10 @@ usm_create_user_from_session(netsnmp_session * session) * copy in the privacy Key. If not localized, localize it */ if (user->privKey == NULL) { + /** save buffer size in case we need to extend key */ + int keyBufSize = USM_PRIV_KU_LEN; + + DEBUGMSGTL(("usm", "copying privKey\n")); if (session->securityPrivLocalKey != NULL && session->securityPrivLocalKeyLen != 0) { /* already localized key passed in. use it */ @@ -3025,19 +3588,14 @@ usm_create_user_from_session(netsnmp_session * session) usm_free_user(user); return SNMPERR_GENERR; } - user->privKeyLen = session->securityPrivLocalKeyLen; - } else if (session->securityPrivKey != NULL - && session->securityPrivKeyLen != 0) { + keyBufSize = user->privKeyLen = session->securityPrivLocalKeyLen; + } else if (session->securityPrivKeyLen != 0) { SNMP_FREE(user->privKey); - user->privKey = (u_char *) calloc(1, USM_LENGTH_KU_HASHBLOCK); - if (user->privKey == NULL) { - usm_free_user(user); - return SNMPERR_GENERR; - } - user->privKeyLen = USM_LENGTH_KU_HASHBLOCK; - if (generate_kul(user->authProtocol, user->authProtocolLen, - session->securityEngineID, - session->securityEngineIDLen, + user->privKey = (u_char *) calloc(1, keyBufSize); + user->privKeyLen = keyBufSize; + if ((user->privKey == NULL) || + generate_kul(user->authProtocol, user->authProtocolLen, + user->engineID, user->engineIDLen, session->securityPrivKey, session->securityPrivKeyLen, user->privKey, &user->privKeyLen) != SNMPERR_SUCCESS) { @@ -3046,17 +3604,21 @@ usm_create_user_from_session(netsnmp_session * session) } } else if ((cp = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRIVLOCALIZEDKEY))) { - size_t buflen = USM_PRIV_KU_LEN; - SNMP_FREE(user->privKey); + size_t buflen = keyBufSize; user->privKey = (u_char *)malloc(buflen); /* max length needed */ user->privKeyLen = 0; /* it will be a hex string */ - if (!snmp_hex_to_binary(&user->privKey, &buflen, &user->privKeyLen, + if ((NULL == user->privKey) || + !snmp_hex_to_binary(&user->privKey, &buflen, &user->privKeyLen, 0, cp)) { usm_free_user(user); return SNMPERR_GENERR; } } + if (usm_extend_user_kul(user, keyBufSize) != SNMPERR_SUCCESS) { + usm_free_user(user); + return SNMPERR_GENERR; + } } if (user_just_created) { @@ -3067,6 +3629,7 @@ usm_create_user_from_session(netsnmp_session * session) user->userStorageType = ST_READONLY; usm_add_user(user); } + DEBUGMSGTL(("9:usm", "user created\n")); return SNMPERR_SUCCESS; @@ -3074,8 +3637,9 @@ usm_create_user_from_session(netsnmp_session * session) } /* A wrapper around the hook */ -int -usm_create_user_from_session_hook(void *slp, netsnmp_session *session) +static int +usm_create_user_from_session_hook(struct session_list *slp, + netsnmp_session *session) { DEBUGMSGTL(("usm", "potentially bootstrapping the USM table from session data\n")); return usm_create_user_from_session(session); @@ -3124,10 +3688,11 @@ usm_build_probe_pdu(netsnmp_pdu **pdu) return 0; } -int usm_discover_engineid(void *slpv, netsnmp_session *session) { +static int usm_discover_engineid(struct session_list *slp, + netsnmp_session *session) +{ netsnmp_pdu *pdu = NULL, *response = NULL; int status, i; - struct session_list *slp = (struct session_list *) slpv; if (usm_build_probe_pdu(&pdu) != 0) { DEBUGMSGTL(("snmp_api", "unable to create probe PDU\n")); @@ -3193,176 +3758,55 @@ int usm_discover_engineid(void *slpv, netsnmp_session *session) { return SNMPERR_SUCCESS; } -void -init_usm(void) +static int +usm_lookup_alg_type(const char *str, const usm_alg_type_t *types) { - struct snmp_secmod_def *def; - char *type; - - DEBUGMSGTL(("init_usm", "unit_usm: %" NETSNMP_PRIo "u %" NETSNMP_PRIo "u\n", - usmNoPrivProtocol[0], usmNoPrivProtocol[1])); - - sc_init(); /* initalize scapi code */ - - /* - * register ourselves as a security service - */ - def = SNMP_MALLOC_STRUCT(snmp_secmod_def); - if (def == NULL) - return; - /* - * XXX: def->init_sess_secmod move stuff from snmp_api.c - */ - def->encode_reverse = usm_secmod_rgenerate_out_msg; - def->encode_forward = usm_secmod_generate_out_msg; - def->decode = usm_secmod_process_in_msg; - def->pdu_free_state_ref = usm_free_usmStateReference; - def->session_setup = usm_session_init; - def->handle_report = usm_handle_report; - def->probe_engineid = usm_discover_engineid; - def->post_probe_engineid = usm_create_user_from_session_hook; - register_sec_mod(USM_SEC_MODEL_NUMBER, "usm", def); - - snmp_register_callback(SNMP_CALLBACK_LIBRARY, - SNMP_CALLBACK_POST_PREMIB_READ_CONFIG, - init_usm_post_config, NULL); - - snmp_register_callback(SNMP_CALLBACK_LIBRARY, - SNMP_CALLBACK_SHUTDOWN, - deinit_usm_post_config, NULL); - - snmp_register_callback(SNMP_CALLBACK_LIBRARY, - SNMP_CALLBACK_SHUTDOWN, - free_engineID, NULL); - - register_config_handler("snmp", "defAuthType", snmpv3_authtype_conf, - NULL, "MD5|SHA"); - register_config_handler("snmp", "defPrivType", snmpv3_privtype_conf, - NULL, -#ifdef HAVE_AES - "DES|AES" -#else - "DES (AES support not available)" -#endif - ); - - /* - * Free stuff at shutdown time - */ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, - SNMP_CALLBACK_SHUTDOWN, - free_enginetime_on_shutdown, NULL); - - - type = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_APPTYPE); + int i, l; + l = strlen(str); + for (i = 0; types[i].label; ++i) { + if (0 == strncasecmp(types[i].label, str, l)) + return types[i].value; + } - register_config_handler(type, "userSetAuthPass", usm_set_password, - NULL, NULL); - register_config_handler(type, "userSetPrivPass", usm_set_password, - NULL, NULL); - register_config_handler(type, "userSetAuthKey", usm_set_password, NULL, - NULL); - register_config_handler(type, "userSetPrivKey", usm_set_password, NULL, - NULL); - register_config_handler(type, "userSetAuthLocalKey", usm_set_password, - NULL, NULL); - register_config_handler(type, "userSetPrivLocalKey", usm_set_password, - NULL, NULL); + return -1; } -void -init_usm_conf(const char *app) +static const char * +usm_lookup_alg_str(int value, const usm_alg_type_t *types) { - register_config_handler(app, "usmUser", - usm_parse_config_usmUser, NULL, NULL); - register_config_handler(app, "createUser", - usm_parse_create_usmUser, NULL, - "username [-e ENGINEID] (MD5|SHA) authpassphrase [DES [privpassphrase]]"); + int i; + for (i = 0; types[i].label; ++i) + if (value == types[i].value) + return types[i].label; - /* - * we need to be called back later - */ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, - usm_store_users, NULL); + return NULL; } -/* - * initializations for the USM. - * - * Should be called after the (engineid) configuration files have been read. - * - * Set "arbitrary" portion of salt to a random number. - */ int -init_usm_post_config(int majorid, int minorid, void *serverarg, - void *clientarg) +usm_lookup_auth_type(const char *str) { - size_t salt_integer_len = sizeof(salt_integer); - - if (sc_random((u_char *) & salt_integer, &salt_integer_len) != - SNMPERR_SUCCESS) { - DEBUGMSGTL(("usm", "sc_random() failed: using time() as salt.\n")); - salt_integer = (u_int) time(NULL); - } - -#ifdef HAVE_AES - salt_integer_len = sizeof (salt_integer64_1); - if (sc_random((u_char *) & salt_integer64_1, &salt_integer_len) != - SNMPERR_SUCCESS) { - DEBUGMSGTL(("usm", "sc_random() failed: using time() as aes1 salt.\n")); - salt_integer64_1 = (u_int) time(NULL); - } - salt_integer_len = sizeof (salt_integer64_1); - if (sc_random((u_char *) & salt_integer64_2, &salt_integer_len) != - SNMPERR_SUCCESS) { - DEBUGMSGTL(("usm", "sc_random() failed: using time() as aes2 salt.\n")); - salt_integer64_2 = (u_int) time(NULL); - } -#endif - -#ifndef NETSNMP_DISABLE_MD5 - noNameUser = usm_create_initial_user("", usmHMACMD5AuthProtocol, - USM_LENGTH_OID_TRANSFORM, -#ifndef NETSNMP_DISABLE_DES - usmDESPrivProtocol, -#else - usmAESPrivProtocol, -#endif - USM_LENGTH_OID_TRANSFORM); -#else - noNameUser = usm_create_initial_user("", usmHMACSHA1AuthProtocol, - USM_LENGTH_OID_TRANSFORM, -#ifndef NETSNMP_DISABLE_DES - usmDESPrivProtocol, -#else - usmAESPrivProtocol, -#endif - USM_LENGTH_OID_TRANSFORM); -#endif - - if ( noNameUser ) { - SNMP_FREE(noNameUser->engineID); - noNameUser->engineIDLen = 0; - } - - return SNMPERR_SUCCESS; -} /* end init_usm_post_config() */ + return usm_lookup_alg_type(str, usm_auth_type ); +} int -deinit_usm_post_config(int majorid, int minorid, void *serverarg, - void *clientarg) +usm_lookup_priv_type(const char *str) { - if (usm_free_user(noNameUser) != NULL) { - DEBUGMSGTL(("deinit_usm_post_config", "could not free initial user\n")); - return SNMPERR_GENERR; - } - noNameUser = NULL; + return usm_lookup_alg_type(str, usm_priv_type ); +} - DEBUGMSGTL(("deinit_usm_post_config", "initial user removed\n")); - return SNMPERR_SUCCESS; -} /* end deinit_usm_post_config() */ +const char * +usm_lookup_auth_str(int value) +{ + return usm_lookup_alg_str(value, usm_auth_type ); +} -void +const char * +usm_lookup_priv_str(int value) +{ + return usm_lookup_alg_str(value, usm_priv_type ); +} + +static void clear_user_list(void) { struct usmUser *tmp = userList, *next = NULL; @@ -3376,425 +3820,15 @@ clear_user_list(void) } -void -shutdown_usm(void) +#ifndef NETSNMP_NO_WRITE_SUPPORT +/* + * take a given user and clone the security info into another + */ +struct usmUser * +usm_cloneFrom_user(struct usmUser *from, struct usmUser *to) { - free_etimelist(); - clear_user_list(); -} + to->flags = from->flags; -/*******************************************************************-o-****** - * usm_check_secLevel - * - * Parameters: - * level - * *user - * - * Returns: - * 0 On success, - * -1 Otherwise. - * - * Checks that a given security level is valid for a given user. - */ -int -usm_check_secLevel(int level, struct usmUser *user) -{ - - if (user->userStatus != RS_ACTIVE) - return -1; - - DEBUGMSGTL(("comparex", "Comparing: %" NETSNMP_PRIo "u %" NETSNMP_PRIo "u ", - usmNoPrivProtocol[0], usmNoPrivProtocol[1])); - DEBUGMSGOID(("comparex", usmNoPrivProtocol, - sizeof(usmNoPrivProtocol) / sizeof(oid))); - DEBUGMSG(("comparex", "\n")); - if (level == SNMP_SEC_LEVEL_AUTHPRIV - && (netsnmp_oid_equals(user->privProtocol, user->privProtocolLen, - usmNoPrivProtocol, - sizeof(usmNoPrivProtocol) / sizeof(oid)) == - 0)) { - DEBUGMSGTL(("usm", "Level: %d\n", level)); - DEBUGMSGTL(("usm", "User (%s) Auth Protocol: ", user->name)); - DEBUGMSGOID(("usm", user->authProtocol, user->authProtocolLen)); - DEBUGMSG(("usm", ", User Priv Protocol: ")); - DEBUGMSGOID(("usm", user->privProtocol, user->privProtocolLen)); - DEBUGMSG(("usm", "\n")); - return 1; - } - if ((level == SNMP_SEC_LEVEL_AUTHPRIV - || level == SNMP_SEC_LEVEL_AUTHNOPRIV) - && - (netsnmp_oid_equals - (user->authProtocol, user->authProtocolLen, usmNoAuthProtocol, - sizeof(usmNoAuthProtocol) / sizeof(oid)) == 0)) { - DEBUGMSGTL(("usm", "Level: %d\n", level)); - DEBUGMSGTL(("usm", "User (%s) Auth Protocol: ", user->name)); - DEBUGMSGOID(("usm", user->authProtocol, user->authProtocolLen)); - DEBUGMSG(("usm", ", User Priv Protocol: ")); - DEBUGMSGOID(("usm", user->privProtocol, user->privProtocolLen)); - DEBUGMSG(("usm", "\n")); - return 1; - } - - return 0; - -} /* end usm_check_secLevel() */ - - - - -/*******************************************************************-o-****** - * usm_check_secLevel_vs_protocols - * - * Parameters: - * level - * *authProtocol - * authProtocolLen - * *privProtocol - * privProtocolLen - * - * Returns: - * 0 On success, - * 1 Otherwise. - * - * Same as above but with explicitly named transform types instead of taking - * from the usmUser structure. - */ -int -usm_check_secLevel_vs_protocols(int level, - const oid * authProtocol, - u_int authProtocolLen, - const oid * privProtocol, - u_int privProtocolLen) -{ - - if (level == SNMP_SEC_LEVEL_AUTHPRIV - && - (netsnmp_oid_equals - (privProtocol, privProtocolLen, usmNoPrivProtocol, - sizeof(usmNoPrivProtocol) / sizeof(oid)) == 0)) { - DEBUGMSGTL(("usm", "Level: %d\n", level)); - DEBUGMSGTL(("usm", "Auth Protocol: ")); - DEBUGMSGOID(("usm", authProtocol, authProtocolLen)); - DEBUGMSG(("usm", ", Priv Protocol: ")); - DEBUGMSGOID(("usm", privProtocol, privProtocolLen)); - DEBUGMSG(("usm", "\n")); - return 1; - } - if ((level == SNMP_SEC_LEVEL_AUTHPRIV - || level == SNMP_SEC_LEVEL_AUTHNOPRIV) - && - (netsnmp_oid_equals - (authProtocol, authProtocolLen, usmNoAuthProtocol, - sizeof(usmNoAuthProtocol) / sizeof(oid)) == 0)) { - DEBUGMSGTL(("usm", "Level: %d\n", level)); - DEBUGMSGTL(("usm", "Auth Protocol: ")); - DEBUGMSGOID(("usm", authProtocol, authProtocolLen)); - DEBUGMSG(("usm", ", Priv Protocol: ")); - DEBUGMSGOID(("usm", privProtocol, privProtocolLen)); - DEBUGMSG(("usm", "\n")); - return 1; - } - - return 0; - -} /* end usm_check_secLevel_vs_protocols() */ - - - - -/* - * usm_get_user(): Returns a user from userList based on the engineID, - * engineIDLen and name of the requested user. - */ - -struct usmUser * -usm_get_user(u_char * engineID, size_t engineIDLen, char *name) -{ - DEBUGMSGTL(("usm", "getting user %s\n", name)); - return usm_get_user_from_list(engineID, engineIDLen, name, userList, - 1); -} - -struct usmUser * -usm_get_user_from_list(u_char * engineID, size_t engineIDLen, - char *name, struct usmUser *puserList, - int use_default) -{ - struct usmUser *ptr; - char noName[] = ""; - if (name == NULL) - name = noName; - for (ptr = puserList; ptr != NULL; ptr = ptr->next) { - if (ptr->name && !strcmp(ptr->name, name)) { - DEBUGMSGTL(("usm", "match on user %s\n", ptr->name)); - if (ptr->engineIDLen == engineIDLen && - ((ptr->engineID == NULL && engineID == NULL) || - (ptr->engineID != NULL && engineID != NULL && - memcmp(ptr->engineID, engineID, engineIDLen) == 0))) - return ptr; - DEBUGMSGTL(("usm", "no match on engineID (")); - if (engineID) { - DEBUGMSGHEX(("usm", engineID, engineIDLen)); - } else { - DEBUGMSGTL(("usm", "Empty EngineID")); - } - DEBUGMSG(("usm", ")\n")); - } - } - - /* - * return "" user used to facilitate engineID discovery - */ - if (use_default && !strcmp(name, "")) - return noNameUser; - return NULL; -} - -/* - * usm_add_user(): Add's a user to the userList, sorted by the - * engineIDLength then the engineID then the name length then the name - * to facilitate getNext calls on a usmUser table which is indexed by - * these values. - * - * returns the head of the list (which could change due to this add). - */ - -struct usmUser * -usm_add_user(struct usmUser *user) -{ - struct usmUser *uptr; - uptr = usm_add_user_to_list(user, userList); - if (uptr != NULL) - userList = uptr; - return uptr; -} - -struct usmUser * -usm_add_user_to_list(struct usmUser *user, struct usmUser *puserList) -{ - struct usmUser *nptr, *pptr, *optr; - - /* - * loop through puserList till we find the proper, sorted place to - * insert the new user - */ - /* XXX - how to handle a NULL user->name ?? */ - /* XXX - similarly for a NULL nptr->name ?? */ - for (nptr = puserList, pptr = NULL; nptr != NULL; - pptr = nptr, nptr = nptr->next) { - if (nptr->engineIDLen > user->engineIDLen) - break; - - if (user->engineID == NULL && nptr->engineID != NULL) - break; - - if (nptr->engineIDLen == user->engineIDLen && - (nptr->engineID != NULL && user->engineID != NULL && - memcmp(nptr->engineID, user->engineID, - user->engineIDLen) > 0)) - break; - - if (!(nptr->engineID == NULL && user->engineID != NULL)) { - if (nptr->engineIDLen == user->engineIDLen && - ((nptr->engineID == NULL && user->engineID == NULL) || - memcmp(nptr->engineID, user->engineID, - user->engineIDLen) == 0) - && strlen(nptr->name) > strlen(user->name)) - break; - - if (nptr->engineIDLen == user->engineIDLen && - ((nptr->engineID == NULL && user->engineID == NULL) || - memcmp(nptr->engineID, user->engineID, - user->engineIDLen) == 0) - && strlen(nptr->name) == strlen(user->name) - && strcmp(nptr->name, user->name) > 0) - break; - - if (nptr->engineIDLen == user->engineIDLen && - ((nptr->engineID == NULL && user->engineID == NULL) || - memcmp(nptr->engineID, user->engineID, - user->engineIDLen) == 0) - && strlen(nptr->name) == strlen(user->name) - && strcmp(nptr->name, user->name) == 0) { - /* - * the user is an exact match of a previous entry. - * Credentials may be different, though, so remove - * the old entry (and add the new one)! - */ - if (pptr) { /* change prev's next pointer */ - pptr->next = nptr->next; - } - if (nptr->next) { /* change next's prev pointer */ - nptr->next->prev = pptr; - } - optr = nptr; - nptr = optr->next; /* add new user at this position */ - /* free the old user */ - optr->next=NULL; - optr->prev=NULL; - usm_free_user(optr); - break; /* new user will be added below */ - } - } - } - - /* - * nptr should now point to the user that we need to add ourselves - * in front of, and pptr should be our new 'prev'. - */ - - /* - * change our pointers - */ - user->prev = pptr; - user->next = nptr; - - /* - * change the next's prev pointer - */ - if (user->next) - user->next->prev = user; - - /* - * change the prev's next pointer - */ - if (user->prev) - user->prev->next = user; - - /* - * rewind to the head of the list and return it (since the new head - * could be us, we need to notify the above routine who the head now is. - */ - for (pptr = user; pptr->prev != NULL; pptr = pptr->prev); - return pptr; -} - -/* - * usm_remove_user(): finds and removes a user from a list - */ -struct usmUser * -usm_remove_user(struct usmUser *user) -{ - return usm_remove_user_from_list(user, &userList); -} - -struct usmUser * -usm_remove_user_from_list(struct usmUser *user, - struct usmUser **ppuserList) -{ - struct usmUser *nptr, *pptr; - - /* - * NULL pointers aren't allowed - */ - if (ppuserList == NULL) - return NULL; - - if (*ppuserList == NULL) - return NULL; - - /* - * find the user in the list - */ - for (nptr = *ppuserList, pptr = NULL; nptr != NULL; - pptr = nptr, nptr = nptr->next) { - if (nptr == user) - break; - } - - if (nptr) { - /* - * remove the user from the linked list - */ - if (pptr) { - pptr->next = nptr->next; - } - if (nptr->next) { - nptr->next->prev = pptr; - } - } else { - /* - * user didn't exist - */ - return NULL; - } - if (nptr == *ppuserList) /* we're the head of the list, need to change - * * the head to the next user */ - *ppuserList = nptr->next; - return *ppuserList; -} /* end usm_remove_user_from_list() */ - - - - -/* - * usm_free_user(): calls free() on all needed parts of struct usmUser and - * the user himself. - * - * Note: This should *not* be called on an object in a list (IE, - * remove it from the list first, and set next and prev to NULL), but - * will try to reconnect the list pieces again if it is called this - * way. If called on the head of the list, the entire list will be - * lost. - */ -struct usmUser * -usm_free_user(struct usmUser *user) -{ - if (user == NULL) - return NULL; - - SNMP_FREE(user->engineID); - SNMP_FREE(user->name); - SNMP_FREE(user->secName); - SNMP_FREE(user->cloneFrom); - SNMP_FREE(user->userPublicString); - SNMP_FREE(user->authProtocol); - SNMP_FREE(user->privProtocol); - - if (user->authKey != NULL) { - SNMP_ZERO(user->authKey, user->authKeyLen); - SNMP_FREE(user->authKey); - } - - if (user->privKey != NULL) { - SNMP_ZERO(user->privKey, user->privKeyLen); - SNMP_FREE(user->privKey); - } - - - /* - * FIX Why not put this check *first?* - */ - if (user->prev != NULL) { /* ack, this shouldn't happen */ - user->prev->next = user->next; - } - if (user->next != NULL) { - user->next->prev = user->prev; - if (user->prev != NULL) /* ack this is really bad, because it means - * * we'll loose the head of some structure tree */ - DEBUGMSGTL(("usm", - "Severe: Asked to free the head of a usmUser tree somewhere.")); - } - - - SNMP_ZERO(user, sizeof(*user)); - SNMP_FREE(user); - - return NULL; /* for convenience to returns from calling functions */ - -} /* end usm_free_user() */ - - - - -#ifndef NETSNMP_NO_WRITE_SUPPORT -/* - * take a given user and clone the security info into another - */ -struct usmUser * -usm_cloneFrom_user(struct usmUser *from, struct usmUser *to) -{ /* * copy the authProtocol oid row pointer */ @@ -3823,6 +3857,20 @@ usm_cloneFrom_user(struct usmUser *from, struct usmUser *to) to->authKeyLen = 0; } + /* + * copy the authKeyKu + */ + SNMP_FREE(to->authKeyKu); + + if (from->authKeyKuLen > 0 && + (to->authKeyKu = (u_char *) malloc(from->authKeyKuLen)) != NULL) { + to->authKeyKuLen = from->authKeyKuLen; + memcpy(to->authKeyKu, from->authKeyKu, to->authKeyKuLen); + } else { + to->authKeyKu = NULL; + to->authKeyKuLen = 0; + } + /* * copy the privProtocol oid row pointer @@ -3850,6 +3898,19 @@ usm_cloneFrom_user(struct usmUser *from, struct usmUser *to) to->privKey = NULL; to->privKeyLen = 0; } + + /* + * copy the privKeyKu + */ + SNMP_FREE(to->privKeyKu); + if (from->privKeyKuLen > 0 && + (to->privKeyKu = (u_char *) malloc(from->privKeyKuLen)) != NULL) { + to->privKeyKuLen = from->privKeyKuLen; + memcpy(to->privKeyKu, from->privKeyKu, to->privKeyKuLen); + } else { + to->privKeyKu = NULL; + to->privKeyKuLen = 0; + } return to; } #endif /* NETSNMP_NO_WRITE_SUPPORT */ @@ -3897,15 +3958,12 @@ usm_create_user(void) } /* end usm_clone_user() */ - - - /* * usm_create_initial_user(void): * creates an initial user, filled with the defaults defined in the * USM document. */ -struct usmUser * +static struct usmUser * usm_create_initial_user(const char *name, const oid * authProtocol, size_t authProtocolLen, const oid * privProtocol, size_t privProtocolLen) @@ -3952,58 +4010,10 @@ usm_create_initial_user(const char *name, return newUser; } -/* - * this is a callback that can store all known users based on a - * previously registered application ID - */ -int -usm_store_users(int majorID, int minorID, void *serverarg, void *clientarg) -{ - /* - * figure out our application name - */ - char *appname = (char *) clientarg; - if (appname == NULL) { - appname = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_APPTYPE); - } - - /* - * save the user base - */ - usm_save_users("usmUser", appname); - - /* - * never fails - */ - return SNMPERR_SUCCESS; -} - - -/* - * usm_save_users(): saves a list of users to the persistent cache - */ -void -usm_save_users(const char *token, const char *type) -{ - usm_save_users_from_list(userList, token, type); -} - -void -usm_save_users_from_list(struct usmUser *puserList, const char *token, - const char *type) -{ - struct usmUser *uptr; - for (uptr = puserList; uptr != NULL; uptr = uptr->next) { - if (uptr->userStorageType == ST_NONVOLATILE) - usm_save_user(uptr, token, type); - } -} - /* * usm_save_user(): saves a user to the persistent cache */ -void +static void usm_save_user(struct usmUser *user, const char *token, const char *type) { char line[4096]; @@ -4049,16 +4059,62 @@ usm_save_user(struct usmUser *user, const char *token, const char *type) read_config_store(type, line); } +static void +usm_save_users_from_list(struct usmUser *puserList, const char *token, + const char *type) +{ + struct usmUser *uptr; + for (uptr = puserList; uptr != NULL; uptr = uptr->next) { + if (uptr->userStorageType == ST_NONVOLATILE) + usm_save_user(uptr, token, type); + } +} + +/* + * usm_save_users(): saves a list of users to the persistent cache + */ +static void +usm_save_users(const char *token, const char *type) +{ + usm_save_users_from_list(userList, token, type); +} + +/* + * this is a callback that can store all known users based on a + * previously registered application ID + */ +static int +usm_store_users(int majorID, int minorID, void *serverarg, void *clientarg) +{ + /* + * figure out our application name + */ + char *appname = (char *) clientarg; + if (appname == NULL) { + appname = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_APPTYPE); + } + + /* + * save the user base + */ + usm_save_users("usmUser", appname); + + /* + * never fails + */ + return SNMPERR_SUCCESS; +} + /* * usm_parse_user(): reads in a line containing a saved user profile * and returns a pointer to a newly created struct usmUser. */ -struct usmUser * +static struct usmUser * usm_read_user(const char *line) { struct usmUser *user; - size_t len; - size_t expected_privKeyLen = 0; + size_t len, proper_length, privtype; user = usm_create_user(); if (user == NULL) @@ -4103,20 +4159,14 @@ usm_read_user(const char *line) &user->privProtocolLen); line = read_config_read_octet_string(line, &user->privKey, &user->privKeyLen); -#ifndef NETSNMP_DISABLE_DES - if (ISTRANSFORM(user->privProtocol, DESPriv)) { - /* DES uses a 128 bit key, 64 bits of which is a salt */ - expected_privKeyLen = 16; - } -#endif -#ifdef HAVE_AES - if (ISTRANSFORM(user->privProtocol, AESPriv)) { - expected_privKeyLen = 16; - } -#endif + + privtype = sc_get_privtype(user->privProtocol, user->privProtocolLen); + proper_length = sc_get_proper_priv_length_bytype(privtype); + if (USM_CREATE_USER_PRIV_DES == privtype) + proper_length *= 2; /* ?? we store salt with key */ /* For backwards compatibility */ - if (user->privKeyLen > expected_privKeyLen) { - user->privKeyLen = expected_privKeyLen; + if (user->privKeyLen > proper_length) { + user->privKeyLen = proper_length; } line = read_config_read_octet_string(line, &user->userPublicString, @@ -4137,9 +4187,6 @@ usm_parse_config_usmUser(const char *token, char *line) usm_add_user(uptr); } - - - /*******************************************************************-o-****** * usm_set_password * @@ -4160,7 +4207,7 @@ usm_parse_config_usmUser(const char *token, char *line) * * ASSUMES Passwords are null-terminated printable strings. */ -void +static void usm_set_password(const char *token, char *line) { char *cp; @@ -4281,6 +4328,16 @@ usm_set_user_password(struct usmUser *user, const char *token, char *line) config_perror("setting key failed (in sc_genKu())"); return; } + /* save master key */ + if (user->flags & USMUSER_FLAG_KEEP_MASTER_KEY) { + if (userKey == user->privKey) { + user->privKeyKu = netsnmp_memdup(userKey, userKeyLen); + user->privKeyKuLen = userKeyLen; + } else if (userKey == user->authKey) { + user->authKeyKu = netsnmp_memdup(userKey, userKeyLen); + user->authKeyKuLen = userKeyLen; + } + } } else if (type == 1) { cp = read_config_read_octet_string(cp, &userKeyP, &userKeyLen); @@ -4312,33 +4369,83 @@ usm_set_user_password(struct usmUser *user, const char *token, char *line) */ cp = read_config_read_octet_string(cp, key, keyLen); - if (cp == NULL) { - config_perror("invalid localized user key"); + if (cp == NULL) { + config_perror("invalid localized user key"); + return; + } + } + + if (key == &user->privKey) { + ret = usm_extend_user_kul(user, *keyLen); + if (SNMPERR_SUCCESS != ret) { + config_perror("error extending localized user key"); return; } } } /* end usm_set_password() */ -void -usm_parse_create_usmUser(const char *token, char *line) +/* + * create a usm user from a string. + * + * The format for the string is described in the createUser + * secion of the snmpd.conf man page. + * + * On success, a pointer to the created usmUser struct is returned. + * On error, a NULL pointer is returned. In this case, if a pointer to a + * char pointer is provided in errorMsg, an error string is returned. + * This error string points to a static message, and should not be + * freed. + */ +static struct usmUser * +usm_create_usmUser_from_string(char *line, const char **errorMsg) { char *cp; + const char *dummy; char buf[SNMP_MAXBUF_MEDIUM]; struct usmUser *newuser; u_char userKey[SNMP_MAXBUF_SMALL], *tmpp; size_t userKeyLen = SNMP_MAXBUF_SMALL; - size_t privKeyLen = 0; + size_t privKeySize; size_t ret; - int ret2; - int testcase; + int ret2, properLen, properPrivKeyLen; + const oid *def_auth_prot, *def_priv_prot; + size_t def_auth_prot_len, def_priv_prot_len; + const netsnmp_priv_alg_info *pai; + + def_auth_prot = get_default_authtype(&def_auth_prot_len); + def_priv_prot = get_default_privtype(&def_priv_prot_len); + + if (NULL == line) + return NULL; + +#ifdef NETSNMP_ENABLE_TESTING_CODE + DEBUGMSGTL(("usmUser", "new user %s\n", line)); /* logs passphrases */ +#endif + + if (NULL == errorMsg) + errorMsg = &dummy; + *errorMsg = NULL; /* no errors yet */ newuser = usm_create_user(); + if (newuser == NULL) { + *errorMsg = "malloc failure creating new user"; + goto fail; + } /* * READ: Security Name */ cp = copy_nword(line, buf, sizeof(buf)); + /* + * check for (undocumented) 'keep master key' flag. so far, this is + * just used for users for informs (who need non-localized keys). + */ + if (strcmp(buf, "-M") == 0) { + newuser->flags |= USMUSER_FLAG_KEEP_MASTER_KEY; + cp = copy_nword(cp, buf, sizeof(buf)); + } + /* * might be a -e ENGINEID argument */ @@ -4347,9 +4454,8 @@ usm_parse_create_usmUser(const char *token, char *line) u_char *ebuf = (u_char *) malloc(ebuf_len); if (ebuf == NULL) { - config_perror("malloc failure processing -e flag"); - usm_free_user(newuser); - return; + *errorMsg = "malloc failure processing -e flag"; + goto fail; } /* @@ -4357,10 +4463,9 @@ usm_parse_create_usmUser(const char *token, char *line) */ cp = copy_nword(cp, buf, sizeof(buf)); if (!snmp_hex_to_binary(&ebuf, &ebuf_len, &eout_len, 1, buf)) { - config_perror("invalid EngineID argument to -e"); - usm_free_user(newuser); + *errorMsg = "invalid EngineID argument to -e"; SNMP_FREE(ebuf); - return; + goto fail; } newuser->engineID = ebuf; @@ -4369,8 +4474,7 @@ usm_parse_create_usmUser(const char *token, char *line) } else { newuser->engineID = snmpv3_generate_engineID(&ret); if (ret == 0) { - usm_free_user(newuser); - return; + goto fail; } newuser->engineIDLen = ret; } @@ -4378,37 +4482,70 @@ usm_parse_create_usmUser(const char *token, char *line) newuser->secName = strdup(buf); newuser->name = strdup(buf); - if (!cp) + if (!cp) { +#ifdef NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV + /** no passwords ok iff defaults are noauth/nopriv */ + if (snmp_oid_compare(usmNoAuthProtocol, OID_LENGTH(usmNoAuthProtocol), + def_auth_prot, def_auth_prot_len) != 0) { + *errorMsg = "no authentication pass phrase"; + goto fail; + } + if (snmp_oid_compare(usmNoPrivProtocol, OID_LENGTH(usmNoPrivProtocol), + def_priv_prot, def_priv_prot_len) != 0) { + *errorMsg = "no privacy pass phrase"; + goto fail; + } +#endif /* NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV */ goto add; /* no authentication or privacy type */ + } /* * READ: Authentication Type */ -#ifndef NETSNMP_DISABLE_MD5 - if (strncmp(cp, "MD5", 3) == 0) { - memcpy(newuser->authProtocol, usmHMACMD5AuthProtocol, - sizeof(usmHMACMD5AuthProtocol)); - } else -#endif - if (strncmp(cp, "SHA", 3) == 0) { - memcpy(newuser->authProtocol, usmHMACSHA1AuthProtocol, - sizeof(usmHMACSHA1AuthProtocol)); + newuser->authProtocol[0] = 0; + cp = copy_nword(cp, buf, sizeof(buf)); + if ((strncmp(cp, "default", 7) == 0) && (NULL != def_auth_prot)) { + SNMP_FREE(newuser->authProtocol); + newuser->authProtocol = snmp_duplicate_objid(def_auth_prot, + def_auth_prot_len); + if (newuser->authProtocol == NULL) { + *errorMsg = "malloc failed"; + goto fail; + } + newuser->authProtocolLen = def_auth_prot_len; } else { - config_perror("Unknown authentication protocol"); - usm_free_user(newuser); - return; + const oid *auth_prot; + int auth_type = usm_lookup_auth_type(buf); + if (auth_type < 0) { + *errorMsg = "unknown authProtocol"; + goto fail; + } + auth_prot = sc_get_auth_oid(auth_type, &newuser->authProtocolLen); + if (auth_prot) { + SNMP_FREE(newuser->authProtocol); + newuser->authProtocol = + snmp_duplicate_objid(auth_prot, newuser->authProtocolLen); + } + if (newuser->authProtocol == NULL) { + *errorMsg = "malloc failed"; + goto fail; + } } - - cp = skip_token(cp); + if (0 == newuser->authProtocol[0]) { + *errorMsg = "Unknown authentication protocol"; + goto fail; + } +#ifdef NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV + if (snmp_oid_compare(newuser->authProtocol, newuser->authProtocolLen, + def_auth_prot, def_auth_prot_len) != 0) { + *errorMsg = "auth protocol does not match system policy"; + goto fail; + } +#endif /* NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV */ /* * READ: Authentication Pass Phrase or key */ - if (!cp) { - config_perror("no authentication pass phrase"); - usm_free_user(newuser); - return; - } cp = copy_nword(cp, buf, sizeof(buf)); if (strcmp(buf,"-m") == 0) { /* a master key is specified */ @@ -4417,9 +4554,13 @@ usm_parse_create_usmUser(const char *token, char *line) tmpp = userKey; userKeyLen = 0; if (!snmp_hex_to_binary(&tmpp, &ret, &userKeyLen, 0, buf)) { - config_perror("invalid key value argument to -m"); - usm_free_user(newuser); - return; + *errorMsg = "invalid key value argument to -m"; + goto fail; + } + /* save master key */ + if (newuser->flags & USMUSER_FLAG_KEEP_MASTER_KEY) { + newuser->authKeyKu = netsnmp_memdup(userKey, userKeyLen); + newuser->authKeyKuLen = userKeyLen; } } else if (strcmp(buf,"-l") != 0) { /* a password is specified */ @@ -4427,87 +4568,125 @@ usm_parse_create_usmUser(const char *token, char *line) ret2 = generate_Ku(newuser->authProtocol, newuser->authProtocolLen, (u_char *) buf, strlen(buf), userKey, &userKeyLen); if (ret2 != SNMPERR_SUCCESS) { - config_perror("could not generate the authentication key from the " - "supplied pass phrase."); - usm_free_user(newuser); - return; + *errorMsg = "could not generate the authentication key from the supplied pass phrase."; + goto fail; + } + /* save master key */ + if (newuser->flags & USMUSER_FLAG_KEEP_MASTER_KEY) { + newuser->authKeyKu = netsnmp_memdup(userKey, userKeyLen); + newuser->authKeyKuLen = userKeyLen; } } /* * And turn it into a localized key */ - ret2 = sc_get_properlength(newuser->authProtocol, - newuser->authProtocolLen); - if (ret2 <= 0) { - config_perror("Could not get proper authentication protocol key length"); - usm_free_user(newuser); - return; + properLen = sc_get_proper_auth_length_bytype( + sc_get_authtype(newuser->authProtocol, newuser->authProtocolLen)); + if (properLen <= 0) { + *errorMsg = "Could not get proper authentication protocol key length"; + goto fail; } - newuser->authKey = (u_char *) malloc(ret2); + newuser->authKey = (u_char *) malloc(properLen); + newuser->authKeyLen = properLen; if (strcmp(buf,"-l") == 0) { /* a local key is directly specified */ cp = copy_nword(cp, buf, sizeof(buf)); + ret = newuser->authKeyLen; newuser->authKeyLen = 0; - ret = ret2; if (!snmp_hex_to_binary(&newuser->authKey, &ret, &newuser->authKeyLen, 0, buf)) { - config_perror("invalid key value argument to -l"); - usm_free_user(newuser); - return; + *errorMsg = "invalid key value argument to -l"; + goto fail; } - if (ret != newuser->authKeyLen) { - config_perror("improper key length to -l"); - usm_free_user(newuser); - return; + if (properLen != newuser->authKeyLen) { + *errorMsg = "improper key length to -l"; + goto fail; } } else { - newuser->authKeyLen = ret2; ret2 = generate_kul(newuser->authProtocol, newuser->authProtocolLen, newuser->engineID, newuser->engineIDLen, userKey, userKeyLen, newuser->authKey, &newuser->authKeyLen); if (ret2 != SNMPERR_SUCCESS) { - config_perror("could not generate localized authentication key " - "(Kul) from the master key (Ku)."); - usm_free_user(newuser); - return; + *errorMsg = "could not generate localized authentication key (Kul) from the master key (Ku)."; + goto fail; } } - if (!cp) + if (!cp) { +#ifndef NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV goto add; /* no privacy type (which is legal) */ +#else + if (snmp_oid_compare(usmNoPrivProtocol, OID_LENGTH(usmNoPrivProtocol), + def_priv_prot, def_priv_prot_len) == 0) + goto add; + else { + *errorMsg = "priv protocol does not match system policy"; + goto fail; + } +#endif /* NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV */ + } /* * READ: Privacy Type */ - testcase = 0; -#ifndef NETSNMP_DISABLE_DES - if (strncmp(cp, "DES", 3) == 0) { - memcpy(newuser->privProtocol, usmDESPrivProtocol, - sizeof(usmDESPrivProtocol)); - testcase = 1; - /* DES uses a 128 bit key, 64 bits of which is a salt */ - privKeyLen = 16; + newuser->privProtocol[0] = 0; + cp = copy_nword(cp, buf, sizeof(buf)); + if ((strncmp(buf, "default", 7) == 0) && (NULL != def_priv_prot)) { + SNMP_FREE(newuser->privProtocol); + newuser->privProtocol = + snmp_duplicate_objid(def_priv_prot, def_priv_prot_len); + if (newuser->privProtocol == NULL) { + *errorMsg = "malloc failed"; + goto fail; + } + newuser->privProtocolLen = def_priv_prot_len; + pai = sc_get_priv_alg_byoid(newuser->privProtocol, + newuser->privProtocolLen); + } else { + int priv_type = usm_lookup_priv_type(buf); + if (priv_type < 0) { + *errorMsg = "unknown privProtocol"; + DEBUGMSGTL(("usmUser", "%s %s\n", *errorMsg, buf)); + goto fail; + } + DEBUGMSGTL(("9:usmUser", "privProtocol %s\n", buf)); + pai = sc_get_priv_alg_bytype(priv_type); + if (pai) { + SNMP_FREE(newuser->privProtocol); + newuser->privProtocolLen = pai->oid_len; + newuser->privProtocol = + snmp_duplicate_objid(pai->alg_oid, newuser->privProtocolLen); + DEBUGMSGTL(("9:usmUser", "pai %s\n", pai->name)); + if (newuser->privProtocol == NULL) { + *errorMsg = "malloc failed"; + goto fail; + } + } } -#endif -#ifdef HAVE_AES - if (strncmp(cp, "AES128", 6) == 0 || - strncmp(cp, "AES", 3) == 0) { - memcpy(newuser->privProtocol, usmAESPrivProtocol, - sizeof(usmAESPrivProtocol)); - testcase = 1; - privKeyLen = 16; + if (NULL == pai) { + *errorMsg = "priv protocol lookup failed"; + goto fail; } -#endif - if (testcase == 0) { - config_perror("Unknown privacy protocol"); - usm_free_user(newuser); - return; + + if (0 == newuser->privProtocol[0] && NULL == *errorMsg) + *errorMsg = "Unknown privacy protocol"; + if (NULL != *errorMsg) + goto fail; +#ifdef NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV + if (snmp_oid_compare(newuser->privProtocol, newuser->privProtocolLen, + def_priv_prot, def_priv_prot_len) != 0) { + *errorMsg = "priv protocol does not match system policy"; + goto fail; } +#endif /* NETSNMP_FORCE_SYSTEM_V3_AUTHPRIV */ + + properPrivKeyLen = pai->proper_length; + if (USM_CREATE_USER_PRIV_DES == pai->type) + properPrivKeyLen *= 2; /* ?? we store salt with key */ - cp = skip_token(cp); /* * READ: Encryption Pass Phrase or key */ @@ -4517,7 +4696,12 @@ usm_parse_create_usmUser(const char *token, char *line) */ newuser->privKey = netsnmp_memdup(newuser->authKey, newuser->authKeyLen); - newuser->privKeyLen = newuser->authKeyLen; + privKeySize = newuser->privKeyLen = newuser->authKeyLen; + if (newuser->flags & USMUSER_FLAG_KEEP_MASTER_KEY) { + newuser->privKeyKu = netsnmp_memdup(newuser->authKeyKu, + newuser->authKeyKuLen); + newuser->privKeyKuLen = newuser->authKeyKuLen; + } } else { cp = copy_nword(cp, buf, sizeof(buf)); @@ -4528,69 +4712,79 @@ usm_parse_create_usmUser(const char *token, char *line) tmpp = userKey; userKeyLen = 0; if (!snmp_hex_to_binary(&tmpp, &ret, &userKeyLen, 0, buf)) { - config_perror("invalid key value argument to -m"); - usm_free_user(newuser); - return; + *errorMsg = "invalid key value argument to -m"; + goto fail; + } + /* save master key */ + if (newuser->flags & USMUSER_FLAG_KEEP_MASTER_KEY) { + newuser->privKeyKu = netsnmp_memdup(userKey, userKeyLen); + newuser->privKeyKuLen = userKeyLen; } } else if (strcmp(buf,"-l") != 0) { /* a password is specified */ userKeyLen = sizeof(userKey); ret2 = generate_Ku(newuser->authProtocol, newuser->authProtocolLen, - (u_char *) buf, strlen(buf), userKey, &userKeyLen); + (u_char*)buf, strlen(buf), userKey, &userKeyLen); if (ret2 != SNMPERR_SUCCESS) { - config_perror("could not generate the privacy key from the " - "supplied pass phrase."); - usm_free_user(newuser); - return; + *errorMsg = "could not generate the privacy key from the supplied pass phrase."; + goto fail; } - } - + /* save master key */ + if (newuser->flags & USMUSER_FLAG_KEEP_MASTER_KEY) { + newuser->privKeyKu = netsnmp_memdup(userKey, userKeyLen); + newuser->privKeyKuLen = userKeyLen; + } + } + /* - * And turn it into a localized key + * And turn it into a localized key + * Allocate enough space for greater of auth mac and privKey len. */ - ret2 = sc_get_properlength(newuser->authProtocol, - newuser->authProtocolLen); - if (ret2 < 0) { - config_perror("could not get proper key length to use for the " - "privacy algorithm."); - usm_free_user(newuser); - return; - } - newuser->privKey = (u_char *) malloc(ret2); + privKeySize = SNMP_MAX(properPrivKeyLen, properLen); + newuser->privKey = (u_char *) malloc(privKeySize); + newuser->privKeyLen = privKeySize; if (strcmp(buf,"-l") == 0) { /* a local key is directly specified */ cp = copy_nword(cp, buf, sizeof(buf)); - ret = ret2; + ret = newuser->privKeyLen; newuser->privKeyLen = 0; if (!snmp_hex_to_binary(&newuser->privKey, &ret, &newuser->privKeyLen, 0, buf)) { - config_perror("invalid key value argument to -l"); - usm_free_user(newuser); - return; + *errorMsg = "invalid key value argument to -l"; + goto fail; } } else { - newuser->privKeyLen = ret2; ret2 = generate_kul(newuser->authProtocol, newuser->authProtocolLen, newuser->engineID, newuser->engineIDLen, userKey, userKeyLen, newuser->privKey, &newuser->privKeyLen); if (ret2 != SNMPERR_SUCCESS) { - config_perror("could not generate localized privacy key " - "(Kul) from the master key (Ku)."); - usm_free_user(newuser); - return; + *errorMsg = "could not generate localized privacy key (Kul) from the master key (Ku)."; + goto fail; + } + } + + if (newuser->privKeyLen < properPrivKeyLen) { + ret = usm_extend_user_kul(newuser, properPrivKeyLen); + if (ret != SNMPERR_SUCCESS) { + *errorMsg = "could not extend localized privacy key to required length."; + goto fail; } } } - if ((newuser->privKeyLen >= privKeyLen) || (privKeyLen == 0)){ - newuser->privKeyLen = privKeyLen; + if ((newuser->privKeyLen >= properPrivKeyLen) || (properPrivKeyLen == 0)){ + DEBUGMSGTL(("9:usmUser", "truncating privKeyLen from %" NETSNMP_PRIz "d to %d\n", + newuser->privKeyLen, properPrivKeyLen)); + newuser->privKeyLen = properPrivKeyLen; } else { - /* The privKey length is smaller than required by privProtocol */ - usm_free_user(newuser); - return; + DEBUGMSGTL(("usmUser", + "privKey length %" NETSNMP_PRIz "d < %d required by privProtocol\n", + newuser->privKeyLen, properPrivKeyLen)); + *errorMsg = "privKey length is less than required by privProtocol"; + goto fail; } add: @@ -4598,21 +4792,30 @@ usm_parse_create_usmUser(const char *token, char *line) DEBUGMSGTL(("usmUser", "created a new user %s at ", newuser->secName)); DEBUGMSGHEX(("usmUser", newuser->engineID, newuser->engineIDLen)); DEBUGMSG(("usmUser", "\n")); + + return newuser; + + fail: + usm_free_user(newuser); + return NULL; } void +usm_parse_create_usmUser(const char *token, char *line) +{ + const char *error = NULL; + usm_create_usmUser_from_string(line, &error); + if (error) + config_perror(error); +} + +static void snmpv3_authtype_conf(const char *word, char *cptr) { -#ifndef NETSNMP_DISABLE_MD5 - if (strcasecmp(cptr, "MD5") == 0) - defaultAuthType = usmHMACMD5AuthProtocol; - else -#endif - if (strcasecmp(cptr, "SHA") == 0) - defaultAuthType = usmHMACSHA1AuthProtocol; - else + int auth_type = usm_lookup_auth_type(cptr); + if (auth_type < 0) config_perror("Unknown authentication type"); - defaultAuthTypeLen = USM_LENGTH_OID_TRANSFORM; + defaultAuthType = sc_get_auth_oid(auth_type, &defaultAuthTypeLen); DEBUGMSGTL(("snmpv3", "set default authentication type: %s\n", cptr)); } @@ -4628,29 +4831,13 @@ get_default_authtype(size_t * len) return defaultAuthType; } -void +static void snmpv3_privtype_conf(const char *word, char *cptr) { - int testcase = 0; - -#ifndef NETSNMP_DISABLE_DES - if (strcasecmp(cptr, "DES") == 0) { - testcase = 1; - defaultPrivType = usmDESPrivProtocol; - } -#endif - -#if HAVE_AES - /* XXX AES: assumes oid length == des oid length */ - if (strcasecmp(cptr, "AES128") == 0 || - strcasecmp(cptr, "AES") == 0) { - testcase = 1; - defaultPrivType = usmAES128PrivProtocol; - } -#endif - if (testcase == 0) + int priv_type = usm_lookup_priv_type(cptr); + if (priv_type < 0) config_perror("Unknown privacy type"); - defaultPrivTypeLen = SNMP_DEFAULT_PRIV_PROTOLEN; + defaultPrivType = sc_get_priv_oid(priv_type, &defaultPrivTypeLen); DEBUGMSGTL(("snmpv3", "set default privacy type: %s\n", cptr)); } @@ -4658,15 +4845,187 @@ const oid * get_default_privtype(size_t * len) { if (defaultPrivType == NULL) { -#ifndef NETSNMP_DISABLE_DES - defaultPrivType = usmDESPrivProtocol; -#else - defaultPrivType = usmAESPrivProtocol; -#endif - defaultPrivTypeLen = USM_LENGTH_OID_TRANSFORM; + defaultPrivType = SNMP_DEFAULT_PRIV_PROTO; + defaultPrivTypeLen = SNMP_DEFAULT_PRIV_PROTOLEN; } if (len) *len = defaultPrivTypeLen; return defaultPrivType; } +void +init_usm_conf(const char *app) +{ + register_config_handler(app, "usmUser", + usm_parse_config_usmUser, NULL, NULL); + register_config_handler(app, "createUser", + usm_parse_create_usmUser, NULL, + "username [-e ENGINEID] (MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224|default) authpassphrase [(DES|AES|default) [privpassphrase]]"); + + /* + * we need to be called back later + */ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, + usm_store_users, NULL); +} + +/* + * initializations for the USM. + * + * Should be called after the (engineid) configuration files have been read. + * + * Set "arbitrary" portion of salt to a random number. + */ +static int +init_usm_post_config(int majorid, int minorid, void *serverarg, + void *clientarg) +{ + size_t salt_integer_len = sizeof(salt_integer); + + if (sc_random((u_char *) & salt_integer, &salt_integer_len) != + SNMPERR_SUCCESS) { + DEBUGMSGTL(("usm", "sc_random() failed: using time() as salt.\n")); + salt_integer = (u_int) time(NULL); + } + +#ifdef HAVE_AES + salt_integer_len = sizeof (salt_integer64_1); + if (sc_random((u_char *) & salt_integer64_1, &salt_integer_len) != + SNMPERR_SUCCESS) { + DEBUGMSGTL(("usm", "sc_random() failed: using time() as aes1 salt.\n")); + salt_integer64_1 = (u_int) time(NULL); + } + salt_integer_len = sizeof (salt_integer64_1); + if (sc_random((u_char *) & salt_integer64_2, &salt_integer_len) != + SNMPERR_SUCCESS) { + DEBUGMSGTL(("usm", "sc_random() failed: using time() as aes2 salt.\n")); + salt_integer64_2 = (u_int) time(NULL); + } +#endif + +#ifndef NETSNMP_DISABLE_MD5 + noNameUser = usm_create_initial_user("", usmHMACMD5AuthProtocol, + OID_LENGTH(usmHMACMD5AuthProtocol), + SNMP_DEFAULT_PRIV_PROTO, + SNMP_DEFAULT_PRIV_PROTOLEN); +#else + noNameUser = usm_create_initial_user("", usmHMACSHA1AuthProtocol, + OID_LENGTH(usmHMACSHA1AuthProtocol), + SNMP_DEFAULT_PRIV_PROTO, + SNMP_DEFAULT_PRIV_PROTOLEN); +#endif + + if ( noNameUser ) { + SNMP_FREE(noNameUser->engineID); + noNameUser->engineIDLen = 0; + } + + return SNMPERR_SUCCESS; +} /* end init_usm_post_config() */ + +static int +deinit_usm_post_config(int majorid, int minorid, void *serverarg, + void *clientarg) +{ + if (usm_free_user(noNameUser) != NULL) { + DEBUGMSGTL(("deinit_usm_post_config", "could not free initial user\n")); + return SNMPERR_GENERR; + } + noNameUser = NULL; + + DEBUGMSGTL(("deinit_usm_post_config", "initial user removed\n")); + return SNMPERR_SUCCESS; +} /* end deinit_usm_post_config() */ + +void +init_usm(void) +{ + struct snmp_secmod_def *def; + char *type; + + DEBUGMSGTL(("init_usm", "unit_usm: %" NETSNMP_PRIo "u %" NETSNMP_PRIo "u\n", + usmNoPrivProtocol[0], usmNoPrivProtocol[1])); + + sc_init(); /* initalize scapi code */ + + /* + * register ourselves as a security service + */ + def = SNMP_MALLOC_STRUCT(snmp_secmod_def); + if (def == NULL) + return; + /* + * XXX: def->init_sess_secmod move stuff from snmp_api.c + */ + def->encode_reverse = usm_secmod_rgenerate_out_msg; + def->encode_forward = usm_secmod_generate_out_msg; + def->decode = usm_secmod_process_in_msg; + def->pdu_clone = usm_clone; + def->pdu_free_state_ref = usm_free_usmStateReference; + def->session_setup = usm_session_init; + def->handle_report = usm_handle_report; + def->probe_engineid = usm_discover_engineid; + def->post_probe_engineid = usm_create_user_from_session_hook; + if (register_sec_mod(USM_SEC_MODEL_NUMBER, "usm", def) != SNMPERR_SUCCESS) { + SNMP_FREE(def); + snmp_log(LOG_ERR, "could not register usm sec mod\n"); + return; + } + + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_POST_PREMIB_READ_CONFIG, + init_usm_post_config, NULL); + + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_SHUTDOWN, + deinit_usm_post_config, NULL); + + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_SHUTDOWN, + free_engineID, NULL); + + register_config_handler("snmp", "defAuthType", snmpv3_authtype_conf, + NULL, "MD5|SHA|SHA-512|SHA-384|SHA-256|SHA-224"); + register_config_handler("snmp", "defPrivType", snmpv3_privtype_conf, + NULL, + "DES" +#ifdef HAVE_AES + "|AES|AES-128" +#ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04 + "|AES-192|AES-256" +#endif /* NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ +#else + " (AES support not available)" +#endif + ); + + /* + * Free stuff at shutdown time + */ + snmp_register_callback(SNMP_CALLBACK_LIBRARY, + SNMP_CALLBACK_SHUTDOWN, + free_enginetime_on_shutdown, NULL); + + + type = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_APPTYPE); + + register_config_handler(type, "userSetAuthPass", usm_set_password, + NULL, NULL); + register_config_handler(type, "userSetPrivPass", usm_set_password, + NULL, NULL); + register_config_handler(type, "userSetAuthKey", usm_set_password, NULL, + NULL); + register_config_handler(type, "userSetPrivKey", usm_set_password, NULL, + NULL); + register_config_handler(type, "userSetAuthLocalKey", usm_set_password, + NULL, NULL); + register_config_handler(type, "userSetPrivLocalKey", usm_set_password, + NULL, NULL); +} + +void +shutdown_usm(void) +{ + free_etimelist(); + clear_user_list(); +} diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c index 435cafd..be9256f 100644 --- a/snmplib/snmpv3.c +++ b/snmplib/snmpv3.c @@ -1,47 +1,59 @@ /* * snmpv3.c + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include +#ifdef HAVE_INTTYPES_H +#include +#endif #ifdef HAVE_LIMITS_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_SYS_TIMES_H +#ifdef HAVE_SYS_TIMES_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H # include #endif @@ -55,10 +67,6 @@ # include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -135,46 +143,15 @@ snmpv3_secLevel_conf(const char *word, char *cptr) } -NETSNMP_IMPORT int -snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, - char **Xpsz, int argc, char *const *argv); int -snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, - char **Xpsz, int argc, char *const *argv) +snmpv3_parse_arg(int arg, char *optarg, netsnmp_session *session, char **Apsz, + char **Xpsz, int argc, char *const *argv, int flags) { - char *cp = optarg; - int testcase; - optarg++; - /* - * Support '... -3x=value ....' syntax - */ - if (*optarg == '=') { - optarg++; - } - /* - * and '.... "-3x value" ....' (*with* the quotes) - */ - while (*optarg && isspace((unsigned char)(*optarg))) { - optarg++; - } - /* - * Finally, handle ".... -3x value ...." syntax - * (*without* surrounding quotes) - */ - if (!*optarg) { - /* - * We've run off the end of the argument - * so move on the the next. - */ - optarg = argv[optind++]; - if (optind > argc) { - fprintf(stderr, - "Missing argument after SNMPv3 '-3%c' option.\n", *cp); - return (-1); - } - } + int priv_type; + char *cp; + int zero_sensitive = !( flags & NETSNMP_PARSE_ARGS_NOZERO ); - switch (*cp) { + switch (arg) { case 'Z': errno=0; @@ -191,6 +168,16 @@ snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, fprintf(stderr, "Need engine time after \"-3Z engineBoot,\".\n"); return (-1); } + } + /* + * Handle previous '-Z boot time' syntax + */ + else if (optind < argc) { + session->engineTime = strtoul(argv[optind], &cp, 10); + if (errno || cp == argv[optind]) { + fprintf(stderr, "Need engine time after \"-Z engineBoot\".\n"); + return (-1); + } } else { fprintf(stderr, "Need engine time after \"-3Z engineBoot,\".\n"); return (-1); @@ -211,6 +198,11 @@ snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, SNMP_FREE(ebuf); return (-1); } + if ((eout_len < 5) || (eout_len > 32)) { + fprintf(stderr, "Invalid engine ID value after -e flag.\n"); + free(ebuf); + return (-1); + } session->securityEngineID = ebuf; session->securityEngineIDLen = eout_len; break; @@ -230,29 +222,36 @@ snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, SNMP_FREE(ebuf); return (-1); } + if ((eout_len < 5) || (eout_len > 32)) { + fprintf(stderr, "Invalid engine ID value after -E flag.\n"); + free(ebuf); + return (-1); + } session->contextEngineID = ebuf; session->contextEngineIDLen = eout_len; break; } case 'n': - session->contextName = optarg; + session->contextName = strdup(optarg); session->contextNameLen = strlen(optarg); break; case 'u': - session->securityName = optarg; + session->securityName = strdup(optarg); session->securityNameLen = strlen(optarg); break; case 'l': if (!strcasecmp(optarg, "noAuthNoPriv") || !strcmp(optarg, "1") || - !strcasecmp(optarg, "nanp")) { + !strcasecmp(optarg, "noauth") || !strcasecmp(optarg, "nanp")) { session->securityLevel = SNMP_SEC_LEVEL_NOAUTH; } else if (!strcasecmp(optarg, "authNoPriv") + || !strcasecmp(optarg, "auth") || !strcmp(optarg, "2") || !strcasecmp(optarg, "anp")) { session->securityLevel = SNMP_SEC_LEVEL_AUTHNOPRIV; } else if (!strcasecmp(optarg, "authPriv") || !strcmp(optarg, "3") + || !strcasecmp(optarg, "priv") || !strcasecmp(optarg, "ap")) { session->securityLevel = SNMP_SEC_LEVEL_AUTHPRIV; } else { @@ -261,59 +260,62 @@ snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, optarg); return (-1); } - break; #ifdef NETSNMP_SECMOD_USM - case 'a': -#ifndef NETSNMP_DISABLE_MD5 - if (!strcasecmp(optarg, "MD5")) { - session->securityAuthProto = usmHMACMD5AuthProtocol; - session->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN; - } else -#endif - if (!strcasecmp(optarg, "SHA")) { - session->securityAuthProto = usmHMACSHA1AuthProtocol; - session->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN; - } else { + case 'a': { + int auth_type = usm_lookup_auth_type(optarg); + if (auth_type > 0) { + const oid *auth_proto; + + auth_proto = sc_get_auth_oid(auth_type, + &session->securityAuthProtoLen); + session->securityAuthProto = snmp_duplicate_objid(auth_proto, + session->securityAuthProtoLen); + } else { fprintf(stderr, "Invalid authentication protocol specified after -3a flag: %s\n", optarg); return (-1); } + } break; - case 'x': - testcase = 0; -#ifndef NETSNMP_DISABLE_DES - if (!strcasecmp(optarg, "DES")) { - session->securityPrivProto = usmDESPrivProtocol; - session->securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; - testcase = 1; - } -#endif -#ifdef HAVE_AES - if (!strcasecmp(optarg, "AES128") || - strcasecmp(optarg, "AES")) { - session->securityPrivProto = usmAES128PrivProtocol; - session->securityPrivProtoLen = USM_PRIV_PROTO_AES128_LEN; - testcase = 1; - } -#endif - if (testcase == 0) { + case 'x': { + const oid *priv_proto; + + priv_type = usm_lookup_priv_type(optarg); + if (priv_type < 0) { fprintf(stderr, "Invalid privacy protocol specified after -3x flag: %s\n", optarg); return (-1); } + priv_proto = sc_get_priv_oid(priv_type, &session->securityPrivProtoLen); + session->securityPrivProto = snmp_duplicate_objid(priv_proto, + session->securityPrivProtoLen); break; - + } case 'A': - *Apsz = optarg; + *Apsz = strdup(optarg); + if (NULL == *Apsz) { + fprintf(stderr, "malloc failure processing -%c flag.\n", + (char)arg); + return -1; + } + if (zero_sensitive) + memset(optarg, 0x0, strlen(optarg)); break; case 'X': - *Xpsz = optarg; + *Xpsz = strdup(optarg); + if (NULL == *Xpsz) { + fprintf(stderr, "malloc failure processing -%c flag.\n", + (char)arg); + return -1; + } + if (zero_sensitive) + memset(optarg, 0x0, strlen(optarg)); break; #endif /* NETSNMP_SECMOD_USM */ @@ -378,12 +380,51 @@ snmpv3_options(char *optarg, netsnmp_session * session, char **Apsz, } default: - fprintf(stderr, "Unknown SNMPv3 option passed to -3: %c.\n", *cp); + fprintf(stderr, "Unknown SNMPv3 option passed to -3: %c.\n", arg); return -1; } return 0; } +int +snmpv3_parse_args(char *optarg, netsnmp_session * session, char **Apsz, + char **Xpsz, int argc, char *const *argv, int flags) +{ + char *cp = optarg; + optarg++; + /* + * Support '... -3x=value ....' syntax + */ + if (*optarg == '=') { + optarg++; + } + /* + * and '.... "-3x value" ....' (*with* the quotes) + */ + while (*optarg && isspace((unsigned char)(*optarg))) { + optarg++; + } + /* + * Finally, handle ".... -3x value ...." syntax + * (*without* surrounding quotes) + */ + if (!*optarg) { + /* + * We've run off the end of the argument + * so move on the the next. + */ + if (optind >= argc) { + fprintf(stderr, + "Missing argument after SNMPv3 '-3%c' option.\n", *cp); + return (-1); + } + optarg = argv[optind++]; + } + + return snmpv3_parse_arg(*cp, optarg, session, Apsz, Xpsz, argc, argv, + flags); +} + /*******************************************************************-o-****** * setup_engineID * @@ -523,7 +564,7 @@ setup_engineID(u_char ** eidp, const char *text) /* * Allocate memory and store enterprise ID. */ - if ((bufp = (u_char *) malloc(len)) == NULL) { + if ((bufp = (u_char *) calloc(1, len)) == NULL) { snmp_log_perror("setup_engineID malloc"); return -1; } @@ -563,7 +604,7 @@ setup_engineID(u_char ** eidp, const char *text) * seed at startup, but few OSes should have that problem. */ bufp[4] = ENGINEID_TYPE_NETSNMP_RND; - tmpint = random(); + tmpint = netsnmp_random(); memcpy(bufp + 5, &tmpint, sizeof(tmpint)); tmptime = time(NULL); memcpy(bufp + 5 + sizeof(tmpint), &tmptime, sizeof(tmptime)); @@ -577,7 +618,8 @@ setup_engineID(u_char ** eidp, const char *text) #ifdef AF_INET6 case ENGINEID_TYPE_IPV6: bufp[4] = ENGINEID_TYPE_IPV6; - memcpy(bufp + 5, hent->h_addr_list[0], hent->h_length); + if (hent) + memcpy(bufp + 5, hent->h_addr_list[0], hent->h_length); break; #endif #endif @@ -820,9 +862,50 @@ version_conf(const char *word, char *cptr) void oldengineID_conf(const char *word, char *cptr) { + if (oldEngineID) { + free(oldEngineID); + oldEngineID = NULL; + oldEngineIDLength = 0; + } read_config_read_octet_string(cptr, &oldEngineID, &oldEngineIDLength); } +/* + * set_exact_engineID_conf(const oid *, size_t): + * + * Specifies an exact engineID OID. + */ +int +set_exact_engineID(const u_char *id, size_t len) +{ + int rc = SNMPERR_SUCCESS; + u_char *newID = NULL; + + if (NULL == id || 0 == len) + return SNMPERR_GENERR; + + if (len > MAX_ENGINEID_LENGTH) + return SNMPERR_TOO_LONG; + + newID = malloc(len+1); + if (NULL == newID) { + snmp_log(LOG_ERR, "malloc failed for engineID\n"); + return SNMPERR_GENERR; + } + if (NULL != engineID) + free(engineID); + + memcpy(newID, id, len); + newID[len] = 0; + + engineID = newID; + engineIDLength = len; + engineIDIsSet = 1; + engineIDType = ENGINEID_TYPE_EXACT; + + return rc; +} + /* * exactEngineID_conf(const char *, char *): * @@ -832,23 +915,27 @@ oldengineID_conf(const char *word, char *cptr) void exactEngineID_conf(const char *word, char *cptr) { - read_config_read_octet_string(cptr, &engineID, &engineIDLength); - if (engineIDLength > MAX_ENGINEID_LENGTH) { + /** we want buf > max so we know if there is truncation */ + u_char new_engineID[MAX_ENGINEID_LENGTH+2], + *new_engineIDptr = new_engineID; + size_t new_engineIDLength = sizeof(new_engineID); + + read_config_read_octet_string(cptr, &new_engineIDptr, &new_engineIDLength); + if (new_engineIDLength > MAX_ENGINEID_LENGTH) { + new_engineIDLength = MAX_ENGINEID_LENGTH; netsnmp_config_error( "exactEngineID '%s' too long; truncating to %d bytes", cptr, MAX_ENGINEID_LENGTH); - engineID[MAX_ENGINEID_LENGTH - 1] = '\0'; - engineIDLength = MAX_ENGINEID_LENGTH; } - engineIDIsSet = 1; - engineIDType = ENGINEID_TYPE_EXACT; + + set_exact_engineID( new_engineIDptr, new_engineIDLength); } /* * merely call */ -netsnmp_feature_child_of(get_enginetime_alarm, netsnmp_unused) +netsnmp_feature_child_of(get_enginetime_alarm, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_GET_ENGINETIME_ALARM void get_enginetime_alarm(unsigned int regnum, void *clientargs) @@ -1148,13 +1235,11 @@ snmpv3_generate_engineID(size_t * length) if (newID) { *length = snmpv3_get_engineID(newID, engineIDLength); + if (*length == 0) { + SNMP_FREE(newID); + newID = NULL; + } } - - if (*length == 0) { - SNMP_FREE(newID); - newID = NULL; - } - return newID; } /* end snmpv3_generate_engineID() */ diff --git a/snmplib/snprintf.c b/snmplib/snprintf.c index 726c4f4..82bc658 100644 --- a/snmplib/snprintf.c +++ b/snmplib/snprintf.c @@ -3,6 +3,11 @@ * This code is based on code written by Patrick Powell (papowell@astart.com) * It may be used for any purpose as long as this notice remains intact * on all source code distributions + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /************************************************************** @@ -55,7 +60,7 @@ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -63,7 +68,9 @@ #include #include -# include +#include +#include "snprintf.h" + # define VA_LOCAL_DECL va_list ap # define VA_START(f) va_start(ap, f) # define VA_SHIFT(v,t) ; /* no-op for ANSI */ @@ -75,10 +82,6 @@ #define LDOUBLE double #endif -int snprintf(char *str, size_t count, const char *fmt, ...); -int vsnprintf(char *str, size_t count, const char *fmt, - va_list arg); - static void dopr(char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr(char *buffer, size_t * currlen, size_t maxlen, @@ -243,7 +246,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) case 'd': case 'i': if (cflags == DP_C_SHORT) - value = va_arg(args, short int); + value = va_arg(args, long); else if (cflags == DP_C_LONG) value = va_arg(args, long int); else @@ -254,7 +257,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg(args, unsigned short int); + value = va_arg(args, unsigned long); else if (cflags == DP_C_LONG) value = va_arg(args, unsigned long int); else @@ -265,7 +268,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg(args, unsigned short int); + value = va_arg(args, unsigned long); else if (cflags == DP_C_LONG) value = va_arg(args, unsigned long int); else @@ -278,7 +281,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg(args, unsigned short int); + value = va_arg(args, unsigned long); else if (cflags == DP_C_LONG) value = va_arg(args, unsigned long int); else @@ -379,10 +382,11 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args) static void fmtstr(char *buffer, size_t * currlen, size_t maxlen, - char *value, int flags, int min, int max) + char *valuein, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; + const char *value = valuein; if (value == 0) { value = ""; @@ -524,7 +528,7 @@ abs_val(LDOUBLE value) } static LDOUBLE -pow10(int exp) +ns_pow10(int exp) { LDOUBLE result = 1; @@ -537,7 +541,7 @@ pow10(int exp) } static long -round(LDOUBLE value) +ns_round(LDOUBLE value) { long intpart; @@ -599,11 +603,11 @@ fmtfp(char *buffer, size_t * currlen, size_t maxlen, * We "cheat" by converting the fractional part to integer by * * multiplying by a factor of 10 */ - fracpart = round((pow10(max)) * (ufvalue - intpart)); + fracpart = ns_round((ns_pow10(max)) * (ufvalue - intpart)); - if (fracpart >= pow10(max)) { + if (fracpart >= ns_pow10(max)) { intpart++; - fracpart -= pow10(max); + fracpart -= ns_pow10(max); } #ifdef DEBUG_SNPRINTF dprint(1, diff --git a/snmplib/snprintf.h b/snmplib/snprintf.h new file mode 100644 index 0000000..c9a1eba --- /dev/null +++ b/snmplib/snprintf.h @@ -0,0 +1,2 @@ +int snprintf(char *str, size_t count, const char *fmt, ...); +int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); diff --git a/snmplib/strlcat.c b/snmplib/strlcat.c index 4325410..f495c6a 100644 --- a/snmplib/strlcat.c +++ b/snmplib/strlcat.c @@ -20,7 +20,7 @@ #ifndef HAVE_STRLCAT -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/snmplib/strlcpy.c b/snmplib/strlcpy.c index 0235a30..c5ec5a1 100644 --- a/snmplib/strlcpy.c +++ b/snmplib/strlcpy.c @@ -5,7 +5,7 @@ */ #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include diff --git a/snmplib/strtol.c b/snmplib/strtol.c index c71f8ba..ad9f410 100644 --- a/snmplib/strtol.c +++ b/snmplib/strtol.c @@ -29,16 +29,12 @@ #include -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91"; -#endif /* LIBC_SCCS and not lint */ - -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/snmplib/strtoul.c b/snmplib/strtoul.c index 7aea330..d819ba9 100644 --- a/snmplib/strtoul.c +++ b/snmplib/strtoul.c @@ -29,16 +29,12 @@ #include -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ - -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif diff --git a/snmplib/system.c b/snmplib/system.c index cc7cf3c..826196f 100644 --- a/snmplib/system.c +++ b/snmplib/system.c @@ -37,6 +37,11 @@ SOFTWARE. * Copyright (C) 2007 Apple, Inc. All rights reserved. * Use is subject to license terms specified in the COPYING file * distributed with the Net-SNMP package. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* * System dependent routines go here @@ -47,24 +52,27 @@ SOFTWARE. #include #include -#if HAVE_IO_H +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_IO_H #include #endif -#if HAVE_DIRECT_H +#ifdef HAVE_DIRECT_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -73,26 +81,26 @@ SOFTWARE. #include -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_SOCKIO_H +#ifdef HAVE_SYS_SOCKIO_H #include #endif -#if HAVE_SYS_IOCTL_H +#ifdef HAVE_SYS_IOCTL_H #include #endif @@ -100,35 +108,36 @@ SOFTWARE. #include #endif -#if HAVE_SYS_FILE_H +#ifdef HAVE_SYS_FILE_H #include #endif -#if HAVE_KSTAT_H +#ifdef HAVE_KSTAT_H #include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYS_SYSCTL_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_DMALLOC_H -#include +#ifdef WIN32 +#include /* wcsncmp() */ +#include /* PERF_DATA_BLOCK */ #endif #ifdef HAVE_SYS_STAT_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif @@ -136,34 +145,38 @@ SOFTWARE. #include #endif -#if HAVE_SYS_UTSNAME_H +#ifdef HAVE_SYS_UTSNAME_H #include #endif -#if HAVE_SYS_SYSTEMCFG_H +#ifdef HAVE_SYS_SYSTEMCFG_H #include #endif -#if HAVE_SYS_SYSTEMINFO_H +#ifdef HAVE_SYS_SYSTEMINFO_H #include #endif -#if defined(darwin9) +#ifdef HAVE_CRT_EXTERNS_H #include /* for _NSGetArgv() */ #endif -#if HAVE_PWD_H +#ifdef HAVE_MACH_O_DYLD_H +#include +#endif + +#ifdef HAVE_PWD_H #include #endif -#if HAVE_GRP_H +#ifdef HAVE_GRP_H #include #endif -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif @@ -189,10 +202,10 @@ SOFTWARE. /* NetSNMP and DNSSEC-Tools both define FREE. We'll not use either here. */ #undef FREE -netsnmp_feature_child_of(system_all, libnetsnmp) +netsnmp_feature_child_of(system_all, libnetsnmp); -netsnmp_feature_child_of(user_information, system_all) -netsnmp_feature_child_of(calculate_sectime_diff, system_all) +netsnmp_feature_child_of(user_information, system_all); +netsnmp_feature_child_of(calculate_sectime_diff, system_all); #ifndef IFF_LOOPBACK # define IFF_LOOPBACK 0 @@ -212,26 +225,33 @@ netsnmp_feature_child_of(calculate_sectime_diff, system_all) static void _daemon_prep(int stderr_log) { + int fd; + /* Avoid keeping any directory in use. */ - chdir("/"); + NETSNMP_IGNORE_RESULT(chdir("/")); if (stderr_log) return; + fd = open("/dev/null", O_RDWR); + /* * Close inherited file descriptors to avoid * keeping unnecessary references. */ - close(0); - close(1); - close(2); + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); /* * Redirect std{in,out,err} to /dev/null, just in case. */ - open("/dev/null", O_RDWR); - dup(0); - dup(0); + if (fd >= 0) { + dup2(fd, STDIN_FILENO); + dup2(fd, STDOUT_FILENO); + dup2(fd, STDERR_FILENO); + close(fd); + } } #endif @@ -262,8 +282,8 @@ netsnmp_daemonize(int quit_immediately, int stderr_log) { int i = 0; DEBUGMSGT(("daemonize","deamonizing...\n")); -#if HAVE_FORK -#if defined(darwin9) +#ifdef HAVE_FORK +#ifdef HAVE__NSGETEXECUTABLEPATH char path [PATH_MAX] = ""; uint32_t size = sizeof (path); @@ -283,7 +303,11 @@ netsnmp_daemonize(int quit_immediately, int stderr_log) * Fork to return control to the invoking process and to * guarantee that we aren't a process group leader. */ +#ifdef HAVE_FORKALL + i = forkall(); +#else i = fork(); +#endif if (i != 0) { /* Parent. */ DEBUGMSGT(("daemonize","first fork returned %d.\n", i)); @@ -305,7 +329,12 @@ netsnmp_daemonize(int quit_immediately, int stderr_log) /* * Fork to let the process/session group leader exit. */ - if ((i = fork()) != 0) { +#ifdef HAVE_FORKALL + i = forkall(); +#else + i = fork(); +#endif + if (i != 0) { DEBUGMSGT(("daemonize","second fork returned %d.\n", i)); if(i == -1) { snmp_log(LOG_ERR,"second fork failed (errno %d) in " @@ -320,7 +349,7 @@ netsnmp_daemonize(int quit_immediately, int stderr_log) DEBUGMSGT(("daemonize","child continuing\n")); -#if ! defined(darwin9) +#if !defined(HAVE__NSGETARGV) _daemon_prep(stderr_log); #else /* @@ -613,7 +642,7 @@ get_boottime(void) #if defined(hpux10) || defined(hpux11) pstat_getstatic(&pst_buf, sizeof(struct pst_static), 1, 0); boottime_csecs = pst_buf.boot_time * 100; -#elif NETSNMP_CAN_USE_SYSCTL +#elif defined(NETSNMP_CAN_USE_SYSCTL) mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME; @@ -676,11 +705,12 @@ get_uptime(void) u_long lbolt = 0; if (ksc) { - ks = kstat_lookup(ksc, "unix", -1, "system_misc"); + ks = kstat_lookup(ksc, NETSNMP_REMOVE_CONST(char *, "unix"), -1, + NETSNMP_REMOVE_CONST(char *, "system_misc")); if (ks) { kid = kstat_read(ksc, ks, NULL); if (kid != -1) { - named = kstat_data_lookup(ks, "lbolt"); + named = kstat_data_lookup(ks, NETSNMP_REMOVE_CONST(char *, "lbolt")); if (named) { #ifdef KSTAT_DATA_UINT32 lbolt = named->value.ui32; @@ -741,7 +771,7 @@ netsnmp_validator_context(void) int netsnmp_gethostbyname_v4(const char* name, in_addr_t *addr_out) { -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO struct addrinfo *addrs = NULL; struct addrinfo hint; int err; @@ -768,7 +798,7 @@ netsnmp_gethostbyname_v4(const char* name, in_addr_t *addr_out) } return 0; -#elif HAVE_GETHOSTBYNAME +#elif defined(HAVE_GETHOSTBYNAME) struct hostent *hp = NULL; hp = netsnmp_gethostbyname(name); @@ -787,7 +817,7 @@ netsnmp_gethostbyname_v4(const char* name, in_addr_t *addr_out) } return 0; -#elif HAVE_GETIPNODEBYNAME +#elif defined(HAVE_GETIPNODEBYNAME) struct hostent *hp = NULL; int err; @@ -811,7 +841,7 @@ int netsnmp_getaddrinfo(const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **res) { -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO struct addrinfo *addrs = NULL; struct addrinfo hint; int err; @@ -829,7 +859,11 @@ netsnmp_getaddrinfo(const char *name, const char *service, DEBUGMSG(("dns:getaddrinfo", ":\"%s\"", service)); if (hints) - DEBUGMSG(("dns:getaddrinfo", " with hint ({ ... })")); + DEBUGMSG(("dns:getaddrinfo", + " with hints ({.ai_flags = %#x, .ai_family = %s})", + hints->ai_flags, hints->ai_family == 0 ? "0" : + hints->ai_family == AF_INET ? "AF_INET" : + hints->ai_family == AF_INET6 ? "AF_INET6" : "?")); else DEBUGMSG(("dns:getaddrinfo", " with no hint")); @@ -876,10 +910,34 @@ netsnmp_getaddrinfo(const char *name, const char *service, #endif /* DNSSEC_LOCAL_VALIDATION */ *res = addrs; - if ((0 == err) && addrs && addrs->ai_addr) { - DEBUGMSGTL(("dns:getaddrinfo", "answer { AF_INET, %s:%hu }\n", - inet_ntoa(((struct sockaddr_in*)addrs->ai_addr)->sin_addr), - ntohs(((struct sockaddr_in*)addrs->ai_addr)->sin_port))); + DEBUGIF("dns:getaddrinfo") { + if (err == 0 && addrs && addrs->ai_addr) { + const char *fam = "?"; + char dst[64] = "?"; + uint16_t port = 0; + + switch (addrs->ai_addr->sa_family) { + case AF_INET: { + struct sockaddr_in *sin = (struct sockaddr_in *)addrs->ai_addr; + + fam = "AF_INET"; + inet_ntop(AF_INET, &sin->sin_addr, dst, sizeof(dst)); + port = ntohs(sin->sin_port); + break; + } + case AF_INET6: { + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) + addrs->ai_addr; + + fam = "AF_INET6"; + inet_ntop(AF_INET6, &sin6->sin6_addr, dst, sizeof(dst)); + port = ntohs(sin6->sin6_port); + break; + } + } + DEBUGMSGTL(("dns:getaddrinfo", "answer { %s, %s:%hu }\n", fam, dst, + port)); + } } return err; #else @@ -891,7 +949,7 @@ netsnmp_getaddrinfo(const char *name, const char *service, struct hostent * netsnmp_gethostbyname(const char *name) { -#if HAVE_GETHOSTBYNAME +#ifdef HAVE_GETHOSTBYNAME #ifdef DNSSEC_LOCAL_VALIDATION val_status_t val_status; #endif @@ -924,9 +982,18 @@ netsnmp_gethostbyname(const char *name) if (hp == NULL) { DEBUGMSGTL(("dns:gethostbyname", "couldn't resolve %s\n", name)); - } else if (hp->h_addrtype != AF_INET) { + } else if (hp->h_addrtype != AF_INET +#ifdef AF_INET6 + && hp->h_addrtype != AF_INET6 +#endif + ) { +#ifdef AF_INET6 + DEBUGMSGTL(("dns:gethostbyname", + "warning: response for %s not AF_INET/AF_INET6!\n", name)); +#else DEBUGMSGTL(("dns:gethostbyname", "warning: response for %s not AF_INET!\n", name)); +#endif } else { DEBUGMSGTL(("dns:gethostbyname", "%s resolved okay\n", name)); @@ -954,7 +1021,7 @@ netsnmp_gethostbyname(const char *name) struct hostent * netsnmp_gethostbyaddr(const void *addr, socklen_t len, int type) { -#if HAVE_GETHOSTBYADDR +#ifdef HAVE_GETHOSTBYADDR struct hostent *hp = NULL; char buf[64]; @@ -999,7 +1066,7 @@ netsnmp_gethostbyaddr(const void *addr, socklen_t len, int type) /*******************************************************************/ -#ifndef HAVE_STRNCASECMP +#if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp) /* * test for NULL pointers before and NULL characters after @@ -1048,7 +1115,7 @@ strcasecmp(const char *s1, const char *s2) return strncasecmp(s1, s2, 1000000); } -#endif /* HAVE_STRNCASECMP */ +#endif /* !defined(HAVE_STRNCASECMP) && !defined(strncasecmp) */ #ifndef HAVE_STRDUP @@ -1089,7 +1156,7 @@ setenv(const char *name, const char *value, int overwrite) } #endif /* HAVE_SETENV */ -netsnmp_feature_child_of(calculate_time_diff, netsnmp_unused) +netsnmp_feature_child_of(calculate_time_diff, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_CALCULATE_TIME_DIFF /** * Compute (*now - *then) in centiseconds. @@ -1112,7 +1179,7 @@ calculate_sectime_diff(const struct timeval *now, const struct timeval *then) struct timeval diff; NETSNMP_TIMERSUB(now, then, &diff); - return diff.tv_sec + (diff.tv_usec >= 500000L); + return (u_int)(diff.tv_sec + (diff.tv_usec >= 500000L)); } #endif /* NETSNMP_FEATURE_REMOVE_CALCULATE_SECTIME_DIFF */ @@ -1317,7 +1384,7 @@ int netsnmp_os_prematch(const char *ospmname, const char *ospmrelprefix) { -#if HAVE_SYS_UTSNAME_H +#ifdef HAVE_SYS_UTSNAME_H static int printOSonce = 1; struct utsname utsbuf; if ( 0 > uname(&utsbuf)) @@ -1370,7 +1437,7 @@ netsnmp_os_kernel_width(void) #endif } -netsnmp_feature_child_of(str_to_uid, user_information) +netsnmp_feature_child_of(str_to_uid, user_information); #ifndef NETSNMP_FEATURE_REMOVE_STR_TO_UID /** * Convert a user name or number into numeric form. @@ -1383,14 +1450,14 @@ netsnmp_feature_child_of(str_to_uid, user_information) */ int netsnmp_str_to_uid(const char *useroruid) { int uid; -#if HAVE_GETPWNAM && HAVE_PWD_H +#if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) struct passwd *pwd; #endif uid = atoi(useroruid); if (uid == 0) { -#if HAVE_GETPWNAM && HAVE_PWD_H +#if defined(HAVE_GETPWNAM) && defined(HAVE_PWD_H) pwd = getpwnam(useroruid); uid = pwd ? pwd->pw_uid : 0; endpwent(); @@ -1403,7 +1470,7 @@ int netsnmp_str_to_uid(const char *useroruid) { } #endif /* NETSNMP_FEATURE_REMOVE_STR_TO_UID */ -netsnmp_feature_child_of(str_to_gid, user_information) +netsnmp_feature_child_of(str_to_gid, user_information); #ifndef NETSNMP_FEATURE_REMOVE_STR_TO_GID /** * Convert a group name or number into numeric form. @@ -1421,7 +1488,7 @@ int netsnmp_str_to_gid(const char *grouporgid) gid = atoi(grouporgid); if (gid == 0) { -#if HAVE_GETGRNAM && HAVE_GRP_H +#if defined(HAVE_GETGRNAM) && defined(HAVE_GRP_H) struct group *grp; grp = getgrnam(grouporgid); diff --git a/snmplib/text_utils.c b/snmplib/text_utils.c index 32596be..47e88b9 100644 --- a/snmplib/text_utils.c +++ b/snmplib/text_utils.c @@ -4,13 +4,13 @@ #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H # include #else # include @@ -18,10 +18,10 @@ #include -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H # include #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H # include #endif #ifdef HAVE_SYS_STAT_H @@ -33,21 +33,17 @@ #include -#if HAVE_DMALLOC_H -# include -#endif - #include #include #include #include #include -netsnmp_feature_child_of(text_utils, libnetsnmp) +netsnmp_feature_child_of(text_utils, libnetsnmp); -netsnmp_feature_provide(text_utils) +netsnmp_feature_provide(text_utils); #ifdef NETSNMP_FEATURE_REQUIRE_TEXT_UTILS -netsnmp_feature_require(file_utils) +netsnmp_feature_require(file_utils); #endif /* NETSNMP_FEATURE_REQUIRE_TEXT_UTILS */ #ifndef NETSNMP_FEATURE_REMOVE_TEXT_UTILS @@ -59,12 +55,13 @@ netsnmp_feature_require(file_utils) /* * parse methods */ -void +static void _pm_save_index_string_string(FILE *f, netsnmp_container *cin, int flags); -void +static void _pm_save_everything(FILE *f, netsnmp_container *cin, int flags); -void + +static void _pm_user_function(FILE *f, netsnmp_container *cin, netsnmp_line_process_info *lpi, int flags); @@ -72,8 +69,9 @@ _pm_user_function(FILE *f, netsnmp_container *cin, /* * line processors */ -int _process_line_tvi(netsnmp_line_info *line_info, void *mem, - struct netsnmp_line_process_info_s* lpi); +static int +_process_line_tvi(netsnmp_line_info *line_info, void *mem, + struct netsnmp_line_process_info_s* lpi); @@ -155,7 +153,7 @@ netsnmp_file_text_parse(netsnmp_file *f, netsnmp_container *cin, return c; } -netsnmp_feature_child_of(text_token_container_from_file, netsnmp_unused) +netsnmp_feature_child_of(text_token_container_from_file, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE_TEXT_TOKEN_CONTAINER_FROM_FILE netsnmp_container * netsnmp_text_token_container_from_file(const char *file, u_int flags, @@ -222,7 +220,7 @@ netsnmp_text_token_container_from_file(const char *file, u_int flags, * @internal * parse mode: save everything */ -void +static void _pm_save_everything(FILE *f, netsnmp_container *cin, int flags) { char line[STRINGMAX], *ptr; @@ -258,9 +256,9 @@ _pm_save_everything(FILE *f, netsnmp_container *cin, int flags) /** * @internal - * parse mode: + * parse mode: */ -void +static void _pm_save_index_string_string(FILE *f, netsnmp_container *cin, int flags) { @@ -315,9 +313,9 @@ _pm_save_index_string_string(FILE *f, netsnmp_container *cin, /** * @internal - * parse mode: + * parse mode: */ -void +static void _pm_user_function(FILE *f, netsnmp_container *cin, netsnmp_line_process_info *lpi, int flags) { @@ -441,7 +439,7 @@ _pm_user_function(FILE *f, netsnmp_container *cin, * @internal * process token value index line */ -int +static int _process_line_tvi(netsnmp_line_info *line_info, void *mem, struct netsnmp_line_process_info_s* lpi) { diff --git a/snmplib/tools.c b/snmplib/tools.c index 29e5fef..7575666 100644 --- a/snmplib/tools.c +++ b/snmplib/tools.c @@ -1,5 +1,10 @@ /* * tools.c + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #define NETSNMP_TOOLS_C 1 /* dont re-define malloc wrappers here */ @@ -17,13 +22,16 @@ #include #include +#ifdef HAVE_INTTYPES_H +#include +#endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -38,7 +46,7 @@ #ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include @@ -52,16 +60,13 @@ #ifdef HAVE_VALGRIND_MEMCHECK_H #include #endif -#ifdef cygwin +#if defined(cygwin) || defined(mingw32) #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #include @@ -72,23 +77,23 @@ #include #include -netsnmp_feature_child_of(tools_all, libnetsnmp) +netsnmp_feature_child_of(tools_all, libnetsnmp); -netsnmp_feature_child_of(memory_wrappers, tools_all) -netsnmp_feature_child_of(valgrind, tools_all) -netsnmp_feature_child_of(string_time_to_secs, tools_all) -netsnmp_feature_child_of(netsnmp_check_definedness, valgrind) +netsnmp_feature_child_of(memory_wrappers, tools_all); +netsnmp_feature_child_of(valgrind, tools_all); +netsnmp_feature_child_of(string_time_to_secs, tools_all); +netsnmp_feature_child_of(netsnmp_check_definedness, valgrind); -netsnmp_feature_child_of(uatime_ready, netsnmp_unused) -netsnmp_feature_child_of(timeval_tticks, netsnmp_unused) +netsnmp_feature_child_of(uatime_ready, netsnmp_unused); +netsnmp_feature_child_of(timeval_tticks, netsnmp_unused); -netsnmp_feature_child_of(memory_strdup, memory_wrappers) -netsnmp_feature_child_of(memory_calloc, memory_wrappers) -netsnmp_feature_child_of(memory_malloc, memory_wrappers) -netsnmp_feature_child_of(memory_realloc, memory_wrappers) -netsnmp_feature_child_of(memory_free, memory_wrappers) +netsnmp_feature_child_of(memory_strdup, memory_wrappers); +netsnmp_feature_child_of(memory_calloc, memory_wrappers); +netsnmp_feature_child_of(memory_malloc, memory_wrappers); +netsnmp_feature_child_of(memory_realloc, memory_wrappers); +netsnmp_feature_child_of(memory_free, memory_wrappers); -#ifndef NETSNMP_FEATURE_REMOVE_MEMORY_WRAPPERS +#ifndef NETSNMP_FEATURE_REMOVE_MEMORY_STRDUP /** * This function is a wrapper for the strdup function. * @@ -284,6 +289,38 @@ void *netsnmp_memdup(const void *from, size_t size) return to; } /* end netsnmp_memdup() */ +/** + * Duplicates a memory block, adding a NULL at the end. + * + * NOTE: the returned size DOES NOT include the extra byte for the NULL + * termination, just the raw data (i.e. from_size). + * + * This is mainly to protect agains code that uses str* functions on + * a fixed buffer that may not have a terminating NULL. + * + * @param[in] from Pointer to copy memory from. + * @param[in] from_size Size of the data to be copied. + * @param[out] to_size Pointer to size var for new block (OPTIONAL) + * + * @return Pointer to the duplicated memory block, or NULL if memory allocation + * failed. + */ +void *netsnmp_memdup_nt(const void *from, size_t from_size, size_t *to_size) +{ + char *to = NULL; + + if (from) { + to = malloc(from_size+1); + if (to) { + memcpy(to, from, from_size); + to[from_size] = 0; + if (to_size) + *to_size = from_size; + } + } + return to; +} /* end netsnmp_memdupNT() */ + #ifndef NETSNMP_FEATURE_REMOVE_NETSNMP_CHECK_DEFINEDNESS /** * When running under Valgrind, check whether all bytes in the range [packet, @@ -325,18 +362,13 @@ netsnmp_strdup_and_null(const u_char * from, size_t from_len) { char *ret; - if (from_len == 0 || from[from_len - 1] != '\0') { - ret = (char *)malloc(from_len + 1); - if (!ret) - return NULL; + if (from_len > 0 && from[from_len - 1] == '\0') + from_len--; + ret = malloc(from_len + 1); + if (ret) { + memcpy(ret, from, from_len); ret[from_len] = '\0'; - } else { - ret = (char *)malloc(from_len); - if (!ret) - return NULL; - ret[from_len - 1] = '\0'; } - memcpy(ret, from, from_len); return ret; } @@ -706,7 +738,7 @@ dump_snmpEngineID(const u_char * estring, size_t * estring_len) { #define eb(b) ( *(esp+b) & 0xff ) - int rval = SNMPERR_SUCCESS, gotviolation = 0, slen = 0; + int gotviolation = 0, slen = 0; u_int remaining_len; char buf[SNMP_MAXBUF], *s = NULL, *t; @@ -720,7 +752,7 @@ dump_snmpEngineID(const u_char * estring, size_t * estring_len) * Sanity check. */ if (!estring || (*estring_len <= 0)) { - QUITFUN(SNMPERR_GENERR, dump_snmpEngineID_quit); + goto dump_snmpEngineID_quit; } remaining_len = *estring_len; memset(buf, 0, SNMP_MAXBUF); @@ -823,6 +855,7 @@ dump_snmpEngineID(const u_char * estring, size_t * estring_len) */ gotviolation = 1; s += sprintf(s, "!!! "); + /* FALLTHROUGH */ default: /* Unknown encoding. */ @@ -1286,29 +1319,29 @@ int netsnmp_setenv(const char *envname, const char *envval, int overwrite) int netsnmp_addrstr_hton(char *ptr, size_t len) { -#ifndef WORDS_BIGENDIAN char tmp[8]; - if (8 == len) { - tmp[0] = ptr[6]; - tmp[1] = ptr[7]; - tmp[2] = ptr[4]; - tmp[3] = ptr[5]; - tmp[4] = ptr[2]; - tmp[5] = ptr[3]; - tmp[6] = ptr[0]; - tmp[7] = ptr[1]; - memcpy (ptr, &tmp, 8); - } - else if (32 == len) { - netsnmp_addrstr_hton(ptr , 8); - netsnmp_addrstr_hton(ptr+8 , 8); - netsnmp_addrstr_hton(ptr+16, 8); - netsnmp_addrstr_hton(ptr+24, 8); + if (!NETSNMP_BIGENDIAN) { + if (8 == len) { + tmp[0] = ptr[6]; + tmp[1] = ptr[7]; + tmp[2] = ptr[4]; + tmp[3] = ptr[5]; + tmp[4] = ptr[2]; + tmp[5] = ptr[3]; + tmp[6] = ptr[0]; + tmp[7] = ptr[1]; + memcpy(ptr, &tmp, 8); + } + else if (32 == len) { + netsnmp_addrstr_hton(ptr, 8); + netsnmp_addrstr_hton(ptr + 8, 8); + netsnmp_addrstr_hton(ptr + 16, 8); + netsnmp_addrstr_hton(ptr + 24, 8); + } + else + return -1; } - else - return -1; -#endif return 0; } diff --git a/snmplib/transports/snmpAAL5PVCDomain.c b/snmplib/transports/snmpAAL5PVCDomain.c index 5ac69a1..e89ce1b 100644 --- a/snmplib/transports/snmpAAL5PVCDomain.c +++ b/snmplib/transports/snmpAAL5PVCDomain.c @@ -7,26 +7,22 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #include -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -45,27 +41,47 @@ static netsnmp_tdomain aal5pvcDomain; */ static char * -netsnmp_aal5pvc_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_aal5pvc_fmtaddr(netsnmp_transport *t, const void *data, int len) { - struct sockaddr_atmpvc *to = NULL; + const struct sockaddr_atmpvc *to = NULL; if (data != NULL && len == sizeof(struct sockaddr_atmpvc)) { - to = (struct sockaddr_atmpvc *) data; + to = (const struct sockaddr_atmpvc *) data; } else if (t != NULL && t->data != NULL && t->data_length == sizeof(struct sockaddr_atmpvc)) { - to = (struct sockaddr_atmpvc *) t->data; + to = (const struct sockaddr_atmpvc *) t->data; } if (to == NULL) { return strdup("AAL5 PVC: unknown"); } else { - char tmp[64]; - sprintf(tmp, "AAL5 PVC: %hd.%hd.%d", to->sap_addr.itf, - to->sap_addr.vpi, to->sap_addr.vci); - return strdup(tmp); + char *tmp; + + if (asprintf(&tmp, "AAL5 PVC: %hd.%hd.%d", to->sap_addr.itf, + to->sap_addr.vpi, to->sap_addr.vci) < 0) + tmp = NULL; + return tmp; } } - +static void +netsnmp_aal5pvc_get_taddr(netsnmp_transport *t, void **addr, size_t *addr_len) +{ + struct sockaddr_atmpvc *sa = t->remote; + unsigned char *p; + + *addr_len = 8; + if (!(*addr = malloc(*addr_len))) + return; + p = *addr; + p[0] = sa->sap_addr.itf >> 8; + p[1] = sa->sap_addr.itf >> 0; + p[2] = sa->sap_addr.vpi >> 8; + p[3] = sa->sap_addr.vpi >> 0; + p[4] = sa->sap_addr.vci >> 24; + p[5] = sa->sap_addr.vci >> 16; + p[6] = sa->sap_addr.vci >> 8; + p[7] = sa->sap_addr.vci >> 0; +} /* * You can write something into opaque that will subsequently get passed back @@ -108,23 +124,23 @@ netsnmp_aal5pvc_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_aal5pvc_send(netsnmp_transport *t, void *buf, int size, - void **opaque, int *olength) +netsnmp_aal5pvc_send(netsnmp_transport *t, const void *buf, int size, + void **opaque, int *olength) { int rc = -1; - struct sockaddr *to = NULL; + const struct sockaddr *to = NULL; if (opaque != NULL && *opaque != NULL && *olength == sizeof(struct sockaddr_atmpvc)) { - to = (struct sockaddr *) (*opaque); + to = (const struct sockaddr *) (*opaque); } else if (t != NULL && t->data != NULL && t->data_length == sizeof(struct sockaddr_atmpvc)) { - to = (struct sockaddr *) (t->data); + to = (const struct sockaddr *) (t->data); } if (to != NULL && t != NULL && t->sock >= 0) { DEBUGIF("netsnmp_aal5pvc") { - char *str = netsnmp_aal5pvc_fmtaddr(NULL, (void *)to, + char *str = netsnmp_aal5pvc_fmtaddr(NULL, to, sizeof(struct sockaddr_atmpvc)); DEBUGMSGTL(("netsnmp_aal5pvc", "send %d bytes from %p to %s on fd %d\n", @@ -169,7 +185,7 @@ netsnmp_aal5pvc_close(netsnmp_transport *t) */ netsnmp_transport * -netsnmp_aal5pvc_transport(struct sockaddr_atmpvc *addr, int local) +netsnmp_aal5pvc_transport(const struct sockaddr_atmpvc *addr, int local) { netsnmp_transport *t = NULL; @@ -188,7 +204,7 @@ netsnmp_aal5pvc_transport(struct sockaddr_atmpvc *addr, int local) } DEBUGIF("netsnmp_aal5pvc") { - char *str = netsnmp_aal5pvc_fmtaddr(NULL, (void *) addr, + char *str = netsnmp_aal5pvc_fmtaddr(NULL, addr, sizeof(struct sockaddr_atmpvc)); DEBUGMSGTL(("netsnmp_aal5pvc", "open %s %s\n", local ? "local" : "remote", str)); @@ -229,22 +245,14 @@ netsnmp_aal5pvc_transport(struct sockaddr_atmpvc *addr, int local) if (local) { #ifndef NETSNMP_NO_LISTEN_SUPPORT - t->local = (unsigned char*)malloc(8); + t->local_length = sizeof(*addr); + t->local = netsnmp_memdup(addr, sizeof(*addr)); if (t->local == NULL) { netsnmp_transport_free(t); return NULL; } - t->local[0] = (addr->sap_addr.itf & 0xff00) >> 8; - t->local[1] = (addr->sap_addr.itf & 0x00ff) >> 0; - t->local[2] = (addr->sap_addr.vpi & 0xff00) >> 8; - t->local[3] = (addr->sap_addr.vpi & 0x00ff) >> 0; - t->local[4] = (addr->sap_addr.vci & 0xff000000) >> 24; - t->local[5] = (addr->sap_addr.vci & 0x00ff0000) >> 16; - t->local[6] = (addr->sap_addr.vci & 0x0000ff00) >> 8; - t->local[7] = (addr->sap_addr.vci & 0x000000ff) >> 0; - t->local_length = 8; - - if (bind(t->sock, (struct sockaddr *) addr, + + if (bind(t->sock, (const struct sockaddr *)addr, sizeof(struct sockaddr_atmpvc)) < 0) { DEBUGMSGTL(("netsnmp_aal5pvc", "bind failed (%s)\n", strerror(errno))); @@ -256,22 +264,14 @@ netsnmp_aal5pvc_transport(struct sockaddr_atmpvc *addr, int local) return NULL; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ } else { - t->remote = (unsigned char*)malloc(8); + t->remote_length = sizeof(*addr); + t->remote = netsnmp_memdup(addr, sizeof(*addr)); if (t->remote == NULL) { netsnmp_transport_free(t); return NULL; } - t->remote[0] = (addr->sap_addr.itf & 0xff00) >> 8; - t->remote[1] = (addr->sap_addr.itf & 0x00ff) >> 0; - t->remote[2] = (addr->sap_addr.vpi & 0xff00) >> 8; - t->remote[3] = (addr->sap_addr.vpi & 0x00ff) >> 0; - t->remote[4] = (addr->sap_addr.vci & 0xff000000) >> 24; - t->remote[5] = (addr->sap_addr.vci & 0x00ff0000) >> 16; - t->remote[6] = (addr->sap_addr.vci & 0x0000ff00) >> 8; - t->remote[7] = (addr->sap_addr.vci & 0x000000ff) >> 0; - t->remote_length = 8; - - if (connect(t->sock, (struct sockaddr *) addr, + + if (connect(t->sock, (const struct sockaddr *)addr, sizeof(struct sockaddr_atmpvc)) < 0) { DEBUGMSGTL(("netsnmp_aal5pvc", "connect failed (%s)\n", strerror(errno))); @@ -299,6 +299,7 @@ netsnmp_aal5pvc_transport(struct sockaddr_atmpvc *addr, int local) t->f_close = netsnmp_aal5pvc_close; t->f_accept = NULL; t->f_fmtaddr = netsnmp_aal5pvc_fmtaddr; + t->f_get_taddr = netsnmp_aal5pvc_get_taddr; return t; } @@ -336,22 +337,29 @@ netsnmp_aal5pvc_create_tstring(const char *str, int local, } } +static int netsnmp_aal5pvc_ostring_to_sockaddr(struct sockaddr_atmpvc *sa, + const void *o, size_t o_len) +{ + const unsigned char *p = o; + + if (o_len != 8) + return 0; + memset(sa, 0, sizeof(*sa)); + sa->sap_family = AF_ATMPVC; + sa->sap_addr.itf = (p[0] << 8) + (p[1] << 0); + sa->sap_addr.vpi = (p[2] << 8) + (p[3] << 0); + sa->sap_addr.vci = (p[4] << 24) + (p[5] << 16) + (p[6] << 8) + (p[7] << 0); + return 1; +} netsnmp_transport * -netsnmp_aal5pvc_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_aal5pvc_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_atmpvc addr; - - if (o_len == 8) { - addr.sap_family = AF_ATMPVC; - addr.sap_addr.itf = (o[0] << 8) + (o[1] << 0); - addr.sap_addr.vpi = (o[2] << 8) + (o[3] << 0); - addr.sap_addr.vci = - (o[4] << 24) + (o[5] << 16) + (o[6] << 8) + (o[7] << 0); - return netsnmp_aal5pvc_transport(&addr, local); - } + struct sockaddr_atmpvc sa; + if (netsnmp_aal5pvc_ostring_to_sockaddr(&sa, o, o_len)) + return netsnmp_aal5pvc_transport(&sa, local); return NULL; } @@ -366,7 +374,6 @@ netsnmp_aal5pvc_ctor(void) aal5pvcDomain.prefix[0] = "aal5pvc"; aal5pvcDomain.prefix[1] = "pvc"; - aal5pvcDomain.f_create_from_tstring = NULL; aal5pvcDomain.f_create_from_tstring_new = netsnmp_aal5pvc_create_tstring; aal5pvcDomain.f_create_from_ostring = netsnmp_aal5pvc_create_ostring; diff --git a/snmplib/transports/snmpAliasDomain.c b/snmplib/transports/snmpAliasDomain.c index eb50cad..cda8a49 100644 --- a/snmplib/transports/snmpAliasDomain.c +++ b/snmplib/transports/snmpAliasDomain.c @@ -7,22 +7,18 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -91,7 +87,7 @@ netsnmp_alias_create_tstring(const char *str, int local, netsnmp_transport * -netsnmp_alias_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_alias_create_ostring(const void *o, size_t o_len, int local) { fprintf(stderr, "make ostring\n"); return NULL; @@ -105,7 +101,6 @@ netsnmp_alias_ctor(void) aliasDomain.prefix = (const char **)calloc(2, sizeof(char *)); aliasDomain.prefix[0] = "alias"; - aliasDomain.f_create_from_tstring = NULL; aliasDomain.f_create_from_tstring_new = netsnmp_alias_create_tstring; aliasDomain.f_create_from_ostring = netsnmp_alias_create_ostring; diff --git a/snmplib/transports/snmpCallbackDomain.c b/snmplib/transports/snmpCallbackDomain.c index 95018b8..0f7d251 100644 --- a/snmplib/transports/snmpCallbackDomain.c +++ b/snmplib/transports/snmpCallbackDomain.c @@ -10,34 +10,30 @@ #ifdef WIN32 #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif -#if HAVE_IO_H +#ifdef HAVE_IO_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -73,11 +69,14 @@ callback_queue *thequeue; static netsnmp_transport * find_transport_from_callback_num(int num) { - static netsnmp_transport_list *ptr; - for (ptr = trlist; ptr; ptr = ptr->next) - if (((netsnmp_callback_info *) ptr->transport->data)-> - callback_num == num) + netsnmp_transport_list *ptr; + netsnmp_callback_info *ci; + + for (ptr = trlist; ptr; ptr = ptr->next) { + ci = ptr->transport->data; + if (ci->callback_num == num) return ptr->transport; + } return NULL; } @@ -153,22 +152,19 @@ callback_pop_queue(int num) */ char * -netsnmp_callback_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_callback_fmtaddr(netsnmp_transport *t, const void *data, int len) { - char buf[SPRINT_MAX_LEN]; + char *buf; netsnmp_callback_info *mystuff; - if (!t) + if (!t || !t->data) return strdup("callback: unknown"); - mystuff = (netsnmp_callback_info *) t->data; - - if (!mystuff) - return strdup("callback: unknown"); - - snprintf(buf, SPRINT_MAX_LEN, "callback: %d on fd %d", - mystuff->callback_num, mystuff->pipefds[0]); - return strdup(buf); + mystuff = t->data; + if (asprintf(&buf, "callback: %d on fd %d", mystuff->callback_num, + mystuff->pipefds[0]) < 0) + buf = NULL; + return buf; } @@ -185,7 +181,7 @@ netsnmp_callback_recv(netsnmp_transport *t, void *buf, int size, { int rc = -1; char newbuf[1]; - netsnmp_callback_info *mystuff = (netsnmp_callback_info *) t->data; + netsnmp_callback_info *mystuff = t->data; DEBUGMSGTL(("transport_callback", "hook_recv enter\n")); @@ -211,8 +207,7 @@ netsnmp_callback_recv(netsnmp_transport *t, void *buf, int size, * malloc the space here, but it's filled in by * snmp_callback_created_pdu() below */ - int *returnnum = (int *) calloc(1, sizeof(int)); - *opaque = returnnum; + *opaque = calloc(1, sizeof(int)); *olength = sizeof(int); } DEBUGMSGTL(("transport_callback", "hook_recv exit\n")); @@ -222,19 +217,20 @@ netsnmp_callback_recv(netsnmp_transport *t, void *buf, int size, int -netsnmp_callback_send(netsnmp_transport *t, void *buf, int size, +netsnmp_callback_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int from, rc = -1; - netsnmp_callback_info *mystuff = (netsnmp_callback_info *) t->data; + netsnmp_callback_info *mystuff = t->data, *theirstuff; netsnmp_callback_pass *cp; /* * extract the pdu from the hacked buffer */ netsnmp_transport *other_side; - callback_hack *ch = (callback_hack *) * opaque; + callback_hack *ch = *opaque; netsnmp_pdu *pdu = ch->pdu; + *opaque = ch->orig_transport_data; SNMP_FREE(ch); @@ -274,12 +270,12 @@ netsnmp_callback_send(netsnmp_transport *t, void *buf, int size, return -1; } + theirstuff = other_side->data; while (rc < 0) { #ifdef WIN32 - rc = sendto(((netsnmp_callback_info*) other_side->data)->pipefds[1], " ", 1, 0, NULL, 0); + rc = sendto(theirstuff->pipefds[1], " ", 1, 0, NULL, 0); #else - rc = write(((netsnmp_callback_info *)other_side->data)->pipefds[1], - " ", 1); + rc = write(theirstuff->pipefds[1], " ", 1); #endif if (rc < 0 && errno != EINTR) { break; @@ -305,12 +301,12 @@ netsnmp_callback_send(netsnmp_transport *t, void *buf, int size, SNMP_FREE(cp); return -1; } + theirstuff = other_side->data; while (rc < 0) { #ifdef WIN32 - rc = sendto(((netsnmp_callback_info*) other_side->data)->pipefds[1], " ", 1, 0, NULL, 0); + rc = sendto(theirstuff->pipefds[1], " ", 1, 0, NULL, 0); #else - rc = write(((netsnmp_callback_info *)other_side->data)->pipefds[1], - " ", 1); + rc = write(theirstuff->pipefds[1], " ", 1); #endif if (rc < 0 && errno != EINTR) { break; @@ -329,10 +325,10 @@ int netsnmp_callback_close(netsnmp_transport *t) { int rc; - netsnmp_callback_info *mystuff = (netsnmp_callback_info *) t->data; + netsnmp_callback_info *mystuff = t->data; DEBUGMSGTL(("transport_callback", "hook_close enter\n")); -#ifdef WIN32 +#ifdef HAVE_CLOSESOCKET rc = closesocket(mystuff->pipefds[0]); rc |= closesocket(mystuff->pipefds[1]); #else @@ -399,14 +395,21 @@ netsnmp_callback_transport(int to) #else rc = pipe(mydata->pipefds); #endif - t->sock = mydata->pipefds[0]; if (rc) { - SNMP_FREE(mydata); - SNMP_FREE(t); + netsnmp_transport_free(t); return NULL; } + netsnmp_assert(mydata->pipefds[0] != -1); + t->sock = mydata->pipefds[0]; + + /* + * Message size is not limited by this transport (hence msgMaxSize + * is equal to the maximum legal size of an SNMP message). + */ + + t->msgMaxSize = SNMP_MAX_PACKET_LEN; t->f_recv = netsnmp_callback_recv; t->f_send = netsnmp_callback_send; t->f_close = netsnmp_callback_close; @@ -469,9 +472,7 @@ netsnmp_callback_hook_build(netsnmp_session * sp, case SNMP_MSG_TRAP: case SNMP_MSG_TRAP2: pdu->flags &= (~UCD_MSG_FLAG_EXPECT_RESPONSE); - /* - * Fallthrough - */ + /* FALL THROUGH */ default: if (pdu->errstat == SNMP_DEFAULT_ERRSTAT) pdu->errstat = 0; @@ -496,7 +497,7 @@ netsnmp_callback_hook_build(netsnmp_session * sp, sp->s_snmp_errno = SNMPERR_BAD_COMMUNITY; return -1; } - pdu->community = (u_char *) malloc(sp->community_len); + pdu->community = malloc(sp->community_len); if (pdu->community == NULL) { sp->s_snmp_errno = SNMPERR_MALLOC; return -1; @@ -509,7 +510,7 @@ netsnmp_callback_hook_build(netsnmp_session * sp, #endif case SNMP_VERSION_3: if (pdu->securityNameLen == 0) { - pdu->securityName = (char *)malloc(sp->securityNameLen); + pdu->securityName = malloc(sp->securityNameLen); if (pdu->securityName == NULL) { sp->s_snmp_errno = SNMPERR_MALLOC; return -1; @@ -583,7 +584,6 @@ netsnmp_callback_open(int attach_to, } else { callback_sess.isAuthoritative = SNMP_SESS_AUTHORITATIVE; } - callback_sess.remote_port = 0; callback_sess.retries = 0; callback_sess.timeout = 30000000; callback_sess.version = SNMP_DEFAULT_VERSION; /* (mostly) bogus */ diff --git a/snmplib/transports/snmpDTLSUDPDomain.c b/snmplib/transports/snmpDTLSUDPDomain.c index b7dc767..a987c53 100644 --- a/snmplib/transports/snmpDTLSUDPDomain.c +++ b/snmplib/transports/snmpDTLSUDPDomain.c @@ -20,47 +20,47 @@ #include -netsnmp_feature_require(cert_util) -netsnmp_feature_require(sockaddr_size) +netsnmp_feature_require(cert_util); +netsnmp_feature_require(sockaddr_size); +#include "snmpIPBaseDomain.h" #include #include +#include #include #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_UIO_H +#ifdef HAVE_SYS_UIO_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif +#include "../memcheck.h" #include #include @@ -114,14 +114,16 @@ typedef struct bio_cache_s { /** bio_cache flags */ #define NETSNMP_BIO_HAVE_COOKIE 0x0001 /* verified cookie */ -#define NETSNMP_BIO_CONNECTED 0x0002 /* recieved decoded data */ +#define NETSNMP_BIO_CONNECTED 0x0002 /* received decoded data */ #define NETSNMP_BIO_DISCONNECTED 0x0004 /* peer shutdown */ static bio_cache *biocache = NULL; static int openssl_addr_index = 0; -static int netsnmp_dtls_verify_cookie(SSL *ssl, unsigned char *cookie, +static int netsnmp_dtls_verify_cookie(SSL *ssl, + SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER + unsigned char *cookie, unsigned int cookie_len); static int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len); @@ -131,10 +133,11 @@ static int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, /* XXX: handle state issues for new connections to reduce DOS issues */ /* (TLS should do this, but openssl can't do more than one ctx per sock */ /* XXX: put a timer on the cache for expirary purposes */ -static bio_cache *find_bio_cache(netsnmp_sockaddr_storage *from_addr) { +static bio_cache *find_bio_cache(const netsnmp_sockaddr_storage *from_addr) +{ bio_cache *cachep = NULL; - for(cachep = biocache; cachep; cachep = cachep->next) { + for (cachep = biocache; cachep; cachep = cachep->next) { if (cachep->sas.sa.sa_family != from_addr->sa.sa_family) continue; @@ -162,10 +165,12 @@ static bio_cache *find_bio_cache(netsnmp_sockaddr_storage *from_addr) { /* removes a single cache entry and returns SUCCESS on finding and removing it. */ -static int remove_bio_cache(bio_cache *thiscache) { +static int remove_bio_cache(bio_cache *thiscache) +{ bio_cache *cachep = NULL, *prevcache = NULL; + cachep = biocache; - while(cachep) { + while (cachep) { if (cachep == thiscache) { /* remove it from the list */ @@ -185,18 +190,20 @@ static int remove_bio_cache(bio_cache *thiscache) { } /* frees the contents of a bio_cache */ -static void free_bio_cache(bio_cache *cachep) { +static void free_bio_cache(bio_cache *cachep) +{ /* These are freed by the SSL_free() call */ /* BIO_free(cachep->read_bio); BIO_free(cachep->write_bio); */ DEBUGMSGTL(("9:dtlsudp:bio_cache", "releasing %p\n", cachep)); - SNMP_FREE(cachep->write_cache); - netsnmp_tlsbase_free_tlsdata(cachep->tlsdata); + SNMP_FREE(cachep->write_cache); + netsnmp_tlsbase_free_tlsdata(cachep->tlsdata); } -static void remove_and_free_bio_cache(bio_cache *cachep) { +static void remove_and_free_bio_cache(bio_cache *cachep) +{ /** no debug, remove_bio_cache does it */ remove_bio_cache(cachep); free_bio_cache(cachep); @@ -208,8 +215,9 @@ static void remove_and_free_bio_cache(bio_cache *cachep) { static bio_cache * start_new_cached_connection(netsnmp_transport *t, - netsnmp_sockaddr_storage *remote_addr, - int we_are_client) { + const netsnmp_sockaddr_storage *remote_addr, + int we_are_client) +{ bio_cache *cachep = NULL; _netsnmpTLSBaseData *tlsdata; @@ -315,12 +323,12 @@ start_new_cached_connection(netsnmp_transport *t, DEBUGMSGTL(("dtlsudp", "starting a new connection as a client to sock: %d\n", t->sock)); - tlsdata->ssl = SSL_new(sslctx_client_setup(DTLSv1_method(), tlsdata)); + tlsdata->ssl = SSL_new(sslctx_client_setup(DTLS_method(), tlsdata)); /* XXX: session setting 735 */ } else { /* we're the server */ - SSL_CTX *ctx = sslctx_server_setup(DTLSv1_method()); + SSL_CTX *ctx = sslctx_server_setup(DTLS_method()); if (!ctx) { BIO_free(cachep->read_bio); BIO_free(cachep->write_bio); @@ -369,7 +377,7 @@ start_new_cached_connection(netsnmp_transport *t, failures and an unexpected presented certificate identity. */ /* Implementation notes: - + Because we're working asyncronously the real "end" point of + + Because we're working asynchronously the real "end" point of opening a connection doesn't occur here as certificate verification and other things needs to happen first in the verify callback, etc. See the netsnmp_dtlsudp_recv() @@ -407,9 +415,11 @@ start_new_cached_connection(netsnmp_transport *t, static bio_cache * find_or_create_bio_cache(netsnmp_transport *t, - netsnmp_sockaddr_storage *from_addr, - int we_are_client) { + const netsnmp_sockaddr_storage *from_addr, + int we_are_client) +{ bio_cache *cachep = find_bio_cache(from_addr); + if (NULL == cachep) { /* none found; need to start a new context */ cachep = start_new_cached_connection(t, from_addr, we_are_client); @@ -422,38 +432,47 @@ find_or_create_bio_cache(netsnmp_transport *t, return cachep; } -static netsnmp_indexed_addr_pair * -_extract_addr_pair(netsnmp_transport *t, void *opaque, int olen) +static const netsnmp_indexed_addr_pair * +_extract_addr_pair(netsnmp_transport *t, const void *opaque, int olen) { - netsnmp_indexed_addr_pair *addr_pair = NULL; + if (opaque) { + switch (olen) { + case sizeof(netsnmp_tmStateReference): { + const netsnmp_tmStateReference *tmStateRef = opaque; - if (opaque && olen == sizeof(netsnmp_tmStateReference)) { - netsnmp_tmStateReference *tmStateRef = - (netsnmp_tmStateReference *) opaque; - - if (tmStateRef->have_addresses) - addr_pair = &(tmStateRef->addresses); + if (tmStateRef->have_addresses) + return &tmStateRef->addresses; + break; + } + default: + netsnmp_assert(0); + } } - if ((NULL == addr_pair) && (NULL != t)) { - if (t->data != NULL && - t->data_length == sizeof(netsnmp_indexed_addr_pair)) - addr_pair = (netsnmp_indexed_addr_pair *) (t->data); - else if (t->data != NULL && - t->data_length == sizeof(_netsnmpTLSBaseData)) { - _netsnmpTLSBaseData *tlsdata = (_netsnmpTLSBaseData *) t->data; - addr_pair = (netsnmp_indexed_addr_pair *) (tlsdata->addr); + if (t && t->data) { + switch (t->data_length) { + case sizeof(netsnmp_indexed_addr_pair): + return t->data; + case sizeof(_netsnmpTLSBaseData): { + _netsnmpTLSBaseData *tlsdata = t->data; + + return tlsdata->addr; + } + default: + netsnmp_assert(0); } } - return addr_pair; + return NULL; } -static struct sockaddr * -_find_remote_sockaddr(netsnmp_transport *t, void *opaque, int olen, int *socklen) +static const struct sockaddr * +_find_remote_sockaddr(netsnmp_transport *t, const void *opaque, int olen, + int *socklen) { - netsnmp_indexed_addr_pair *addr_pair = _extract_addr_pair(t, opaque, olen); - struct sockaddr *sa = NULL; + const netsnmp_indexed_addr_pair *addr_pair; + const struct sockaddr *sa = NULL; + addr_pair = _extract_addr_pair(t, opaque, olen); if (NULL == addr_pair) return NULL; @@ -468,9 +487,10 @@ _find_remote_sockaddr(netsnmp_transport *t, void *opaque, int olen, int *socklen * queued packets out the UDP port */ static int -_netsnmp_send_queued_dtls_pkts(netsnmp_transport *t, bio_cache *cachep) { +_netsnmp_send_queued_dtls_pkts(netsnmp_transport *t, bio_cache *cachep) +{ int outsize, rc2; - u_char outbuf[65535]; + void *outbuf; DEBUGTRACETOK("9:dtlsudp"); @@ -478,24 +498,32 @@ _netsnmp_send_queued_dtls_pkts(netsnmp_transport *t, bio_cache *cachep) { buffer (ie, the packet to go out) and send it out the udp port manually */ - outsize = BIO_read(cachep->write_bio, outbuf, sizeof(outbuf)); - if (outsize > 0) { + outsize = BIO_ctrl_pending(cachep->write_bio); + outbuf = malloc(outsize); + if (outsize > 0 && outbuf) { + int socksize; + void *sa; + DEBUGMSGTL(("dtlsudp", "have %d bytes to send\n", outsize)); - /* should always be true. */ - int socksize; - struct sockaddr *sa; - sa = _find_remote_sockaddr(t, NULL, 0, &socksize); + outsize = BIO_read(cachep->write_bio, outbuf, outsize); + MAKE_MEM_DEFINED(outbuf, outsize); + sa = NETSNMP_REMOVE_CONST(struct sockaddr *, + _find_remote_sockaddr(t, NULL, 0, &socksize)); if (NULL == sa) sa = &cachep->sas.sa; socksize = netsnmp_sockaddr_size(sa); - rc2 = t->base_transport->f_send(t, outbuf, outsize, (void**)&sa, - &socksize); + rc2 = t->base_transport->f_send(t, outbuf, outsize, &sa, &socksize); if (rc2 == -1) { snmp_log(LOG_ERR, "failed to send a DTLS specific packet\n"); } - } else + } else if (outsize == 0) { DEBUGMSGTL(("9:dtlsudp", "have 0 bytes to send\n")); + } else { + DEBUGMSGTL(("9:dtlsudp", "buffer allocation failed\n")); + } + + free(outbuf); return outsize; } @@ -508,7 +536,8 @@ _netsnmp_send_queued_dtls_pkts(netsnmp_transport *t, bio_cache *cachep) { /* returns SNMPERR_SUCCESS if we succeeded in getting the data out */ /* returns SNMPERR_GENERR if we still need more time */ static int -_netsnmp_bio_try_and_write_buffered(netsnmp_transport *t, bio_cache *cachep) { +_netsnmp_bio_try_and_write_buffered(netsnmp_transport *t, bio_cache *cachep) +{ int rc; _netsnmpTLSBaseData *tlsdata; @@ -544,10 +573,8 @@ _netsnmp_bio_try_and_write_buffered(netsnmp_transport *t, bio_cache *cachep) { /* If want_read/write but failed to actually send anything then we need to wait for the other side, so quit */ - if ((errnum == SSL_ERROR_WANT_READ || - errnum == SSL_ERROR_WANT_WRITE) && - bytesout <= 0) { - /* we've failed; must need to wait longer */ + if (bytesout <= 0) { + /* sending failed; must wait longer */ return SNMPERR_GENERR; } @@ -571,7 +598,8 @@ _netsnmp_bio_try_and_write_buffered(netsnmp_transport *t, bio_cache *cachep) { } static int -_netsnmp_add_buffered_data(bio_cache *cachep, char *buf, size_t size) { +_netsnmp_add_buffered_data(bio_cache *cachep, const char *buf, size_t size) +{ if (cachep->write_cache && cachep->write_cache_len > 0) { size_t newsize = cachep->write_cache_len + size; @@ -605,7 +633,6 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, { int rc = -1; netsnmp_indexed_addr_pair *addr_pair = NULL; - struct sockaddr *from; netsnmp_tmStateReference *tmStateRef = NULL; _netsnmpTLSBaseData *tlsdata; bio_cache *cachep; @@ -632,14 +659,17 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, addr_pair = &tmStateRef->addresses; tmStateRef->have_addresses = 1; - from = (struct sockaddr *) &(addr_pair->remote_addr); while (rc < 0) { - char *opaque = NULL; + void *opaque = NULL; int olen; - rc = t->base_transport->f_recv(t, buf, size, (void**)&opaque, &olen); - if (rc > 0) - memcpy(from, opaque, olen); + rc = t->base_transport->f_recv(t, buf, size, &opaque, &olen); + if (rc > 0) { + if (olen > sizeof(*addr_pair)) + snmp_log(LOG_ERR, "%s: from address length %d > %d\n", + NETSNMP_FUNCTION, olen, (int)sizeof(*addr_pair)); + memcpy(addr_pair, opaque, SNMP_MIN(sizeof(*addr_pair), olen)); + } SNMP_FREE(opaque); if (rc < 0 && errno != EINTR) { break; @@ -750,6 +780,9 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, net-snmp select loop because it's already been pulled out; need to deal with this) */ rc = SSL_read(tlsdata->ssl, buf, size); + MAKE_MEM_DEFINED(&rc, sizeof(rc)); + if (rc > 0) + MAKE_MEM_DEFINED(buf, rc); /* * moved netsnmp_openssl_null_checks to netsnmp_tlsbase_wrapup_recv. @@ -776,14 +809,15 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, /* If want_read/write but failed to actually send anything then we need to wait for the other side, so quit */ - if ((errnum == SSL_ERROR_WANT_READ || - errnum == SSL_ERROR_WANT_WRITE) && - bytesout <= 0) + if (bytesout <= 0) break; /* retry reading */ DEBUGMSGTL(("9:dtlsudp", "recalling ssl_read\n")); rc = SSL_read(tlsdata->ssl, buf, size); + MAKE_MEM_DEFINED(&rc, sizeof(rc)); + if (rc > 0) + MAKE_MEM_DEFINED(buf, rc); } if (rc == -1) { @@ -792,7 +826,7 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, DEBUGMSGTL(("9:dtlsudp", "no decoded data from dtls\n")); if (SSL_get_error(tlsdata->ssl, rc) == SSL_ERROR_WANT_READ) { - DEBUGMSGTL(("9dtlsudp","here: want read!\n")); + DEBUGMSGTL(("9:dtlsudp", "ssl error want read\n")); /* see if we have buffered write date to send out first */ if (cachep->write_cache) { @@ -1007,7 +1041,7 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, IN tmStateReference -- transport info ) */ - /* Implementation notes: those pamateres are all passed outward + /* Implementation notes: those parameters are all passed outward using the functions arguments and the return code below (the length) */ return rc; @@ -1016,17 +1050,17 @@ netsnmp_dtlsudp_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, - void **opaque, int *olength) +netsnmp_dtlsudp_send(netsnmp_transport *t, const void *buf, int size, + void **opaque, int *olength) { int rc = -1; - netsnmp_indexed_addr_pair *addr_pair = NULL; + const netsnmp_indexed_addr_pair *addr_pair = NULL; bio_cache *cachep = NULL; - netsnmp_tmStateReference *tmStateRef = NULL; - u_char outbuf[65535]; + const netsnmp_tmStateReference *tmStateRef = NULL; + void *outbuf; _netsnmpTLSBaseData *tlsdata = NULL; int socksize; - struct sockaddr *sa; + void *sa; DEBUGTRACETOK("9:dtlsudp"); DEBUGMSGTL(("dtlsudp", "sending %d bytes\n", size)); @@ -1069,7 +1103,7 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, */ if (opaque != NULL && *opaque != NULL && olength != NULL && *olength == sizeof(netsnmp_tmStateReference)) - tmStateRef = (netsnmp_tmStateReference *) *opaque; + tmStateRef = *opaque; /* RFC5953: section 5.2, step 3: @@ -1125,7 +1159,7 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, tlsdata = cachep->tlsdata; if (NULL == tlsdata || NULL == tlsdata->ssl) { - /** xxx mem lean? free created bio cache? */ + /** xxx mem leak? free created bio cache? */ snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONNOSESSIONS); snmp_log(LOG_ERR, "bad tls data or ssl ptr in netsnmp_dtlsudp_send\n"); return -1; @@ -1141,6 +1175,14 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, if (SNMPERR_GENERR == _netsnmp_bio_try_and_write_buffered(t, cachep)) { /* we still have data that can't get out in the buffer */ + DEBUGIF ("9:dtlsudp") { + char *str = t->base_transport->f_fmtaddr(t, addr_pair, + sizeof(netsnmp_indexed_addr_pair)); + DEBUGMSGTL(("9:dtlsudp", "cached %d bytes for %s on fd %d\n", + size, str, t->sock)); + free(str); + } + /* add the new data to the end of the existing cache */ if (_netsnmp_add_buffered_data(cachep, buf, size) != SNMPERR_SUCCESS) { @@ -1151,7 +1193,7 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, } DEBUGIF ("9:dtlsudp") { - char *str = t->base_transport->f_fmtaddr(t, (void *) addr_pair, + char *str = t->base_transport->f_fmtaddr(t, addr_pair, sizeof(netsnmp_indexed_addr_pair)); DEBUGMSGTL(("9:dtlsudp", "send %d bytes from %p to %s on fd %d\n", size, buf, str, t->sock)); @@ -1185,14 +1227,15 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, /* If want_read/write but failed to actually send anything then we need to wait for the other side, so quit */ - if ((errnum == SSL_ERROR_WANT_READ || - errnum == SSL_ERROR_WANT_WRITE) && - bytesout <= 0) { + if (bytesout <= 0) { /* We need more data written to or read from the socket but we're failing to do so and need to wait till the socket is ready again; unfortunately this means we need to buffer the SNMP data temporarily in the mean time */ + DEBUGMSGTL(("9:dtlsudp", "cached %d bytes for fd %d\n", size, + t->sock)); + /* remember the packet */ if (_netsnmp_add_buffered_data(cachep, buf, size) != SNMPERR_SUCCESS) { @@ -1201,7 +1244,7 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, return -1; } - /* exit out of the loop until we get caled again from + /* exit out of the loop until we get called again from socket data */ break; } @@ -1214,14 +1257,20 @@ netsnmp_dtlsudp_send(netsnmp_transport *t, void *buf, int size, /* for memory bios, we now read from openssl's write buffer (ie, the packet to go out) and send it out the udp port manually */ - rc = BIO_read(cachep->write_bio, outbuf, sizeof(outbuf)); + rc = BIO_ctrl_pending(cachep->write_bio); if (rc <= 0) { /* in theory an ok thing */ return 0; } + outbuf = malloc(rc); + if (!outbuf) + return -1; + rc = BIO_read(cachep->write_bio, outbuf, rc); + MAKE_MEM_DEFINED(outbuf, rc); socksize = netsnmp_sockaddr_size(&cachep->sas.sa); sa = &cachep->sas.sa; - rc = t->base_transport->f_send(t, outbuf, rc, (void**)&sa, &socksize); + rc = t->base_transport->f_send(t, outbuf, rc, &sa, &socksize); + free(outbuf); return rc; } @@ -1253,7 +1302,7 @@ netsnmp_dtlsudp_close(netsnmp_transport *t) + Our session id is stored as the t->data pointer */ if (NULL != t->data && t->data_length == sizeof(_netsnmpTLSBaseData)) { - tlsbase = (_netsnmpTLSBaseData *) t->data; + tlsbase = t->data; if (tlsbase->addr) cachep = find_bio_cache(&tlsbase->addr->remote_addr); @@ -1266,7 +1315,7 @@ netsnmp_dtlsudp_close(netsnmp_transport *t) if (NULL == cachep) return netsnmp_socketbase_close(t); - /* if we have any remaining packtes to send, try to send them */ + /* if we have any remaining packets to send, try to send them */ if (cachep->write_cache_len > 0) { int i = 0; char buf[8192]; @@ -1274,7 +1323,7 @@ netsnmp_dtlsudp_close(netsnmp_transport *t) void *opaque = NULL; int opaque_len = 0; fd_set readfs; - struct timeval tv; + NETSNMP_SELECT_TIMEVAL tv; DEBUGMSGTL(("dtlsudp:close", "%" NETSNMP_PRIz "d bytes remain in write_cache\n", @@ -1284,7 +1333,7 @@ netsnmp_dtlsudp_close(netsnmp_transport *t) * if negotiations have completed and we've received data, try and * send any queued packets. */ - if (cachep->flags & NETSNMP_BIO_CONNECTED) { + if (1) { /* make configurable: - do this at all? - retries @@ -1304,10 +1353,12 @@ netsnmp_dtlsudp_close(netsnmp_transport *t) tv.tv_usec = 50000; rc = select(t->sock+1, &readfs, NULL, NULL, &tv); if (rc > 0) { - /* junk recv for catching negotations still in play */ + /* junk recv for catching negotiations still in play */ opaque_len = 0; - netsnmp_dtlsudp_recv(t, buf, sizeof(buf), - &opaque, &opaque_len); + rc = netsnmp_dtlsudp_recv(t, buf, sizeof(buf), + &opaque, &opaque_len); + DEBUGMSGTL(("dtlsudp:close", + "netsnmp_dtlsudp_recv() returned %d\n", rc)); SNMP_FREE(opaque); } } /* for loop */ @@ -1343,17 +1394,64 @@ netsnmp_dtlsudp_close(netsnmp_transport *t) return netsnmp_socketbase_close(t); } -char * -netsnmp_dtlsudp_fmtaddr(netsnmp_transport *t, void *data, int len) +static char * +netsnmp_dtlsudp_fmtaddr(netsnmp_transport *t, const void *data, int len, + const char *pfx, + char *(*fmt_base_addr)(const char *pfx, + netsnmp_transport *t, + const void *data, int len)) { - int sa_len; - struct sockaddr *sa = _find_remote_sockaddr(t, data, len, &sa_len); - if (sa) { - data = sa; - len = sa_len; + if (!data) { + data = t->data; + len = t->data_length; } - return netsnmp_ipv4_fmtaddr("DTLSUDP", t, data, len); + switch (data ? len : 0) { + case sizeof(netsnmp_indexed_addr_pair): + return netsnmp_ipv4_fmtaddr(pfx, t, data, len); + case sizeof(netsnmp_tmStateReference): { + const netsnmp_tmStateReference *r = data; + const netsnmp_indexed_addr_pair *p = &r->addresses; + netsnmp_transport *bt = t->base_transport; + + if (r->have_addresses) { + return fmt_base_addr("DTLSUDP", t, p, sizeof(*p)); + } else if (bt && t->data_length == sizeof(_netsnmpTLSBaseData)) { + _netsnmpTLSBaseData *tlsdata = t->data; + netsnmp_indexed_addr_pair *tls_addr = tlsdata->addr; + + return bt->f_fmtaddr(bt, tls_addr, sizeof(*tls_addr)); + } else if (bt) { + return bt->f_fmtaddr(bt, t->data, t->data_length); + } else { + return strdup("DTLSUDP: unknown"); + } + } + case sizeof(_netsnmpTLSBaseData): { + const _netsnmpTLSBaseData *b = data; + char *buf; + + if (asprintf(&buf, "DTLSUDP: %s", b->addr_string) < 0) + buf = NULL; + return buf; + } + case 0: + return strdup("DTLSUDP: unknown"); + default: { + char *buf; + + if (asprintf(&buf, "DTLSUDP: len %d", len) < 0) + buf = NULL; + return buf; + } + } +} + +static char * +netsnmp_dtlsudp4_fmtaddr(netsnmp_transport *t, const void *data, int len) +{ + return netsnmp_dtlsudp_fmtaddr(t, data, len, "DTLSUDP", + netsnmp_ipv4_fmtaddr); } /* @@ -1406,7 +1504,8 @@ _transport_common(netsnmp_transport *t, int local) t->f_config = netsnmp_tlsbase_config; t->f_setup_session = netsnmp_tlsbase_session_init; t->f_accept = NULL; - t->f_fmtaddr = netsnmp_dtlsudp_fmtaddr; + t->f_fmtaddr = netsnmp_dtlsudp4_fmtaddr; + t->f_get_taddr = netsnmp_ipv4_get_taddr; t->flags = NETSNMP_TRANSPORT_FLAG_TUNNELED; @@ -1414,41 +1513,40 @@ _transport_common(netsnmp_transport *t, int local) } netsnmp_transport * -netsnmp_dtlsudp_transport(struct sockaddr_in *addr, int local) +netsnmp_dtlsudp_transport(const struct netsnmp_ep *ep, int local) { - netsnmp_transport *t = NULL; + const struct sockaddr_in *addr = &ep->a.sin; + netsnmp_transport *t, *t2; DEBUGTRACETOK("dtlsudp"); - t = netsnmp_udp_transport(addr, local); + t = netsnmp_udp_transport(ep, local); if (NULL == t) return NULL; - _transport_common(t, local); + t2 = _transport_common(t, local); + if (!t2) { + netsnmp_transport_free(t); + return NULL; + } if (!local) { /* dtls needs to bind the socket for SSL_write to work */ - if (connect(t->sock, (struct sockaddr *) addr, sizeof(*addr)) == -1) + if (connect(t->sock, (const struct sockaddr *)addr, sizeof(*addr)) < 0) snmp_log(LOG_ERR, "dtls: failed to connect\n"); } - return t; + return t2; } #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN -char * -netsnmp_dtlsudp6_fmtaddr(netsnmp_transport *t, void *data, int len) +static char * +netsnmp_dtlsudp6_fmtaddr(netsnmp_transport *t, const void *data, int len) { - int sa_len; - struct sockaddr *sa = _find_remote_sockaddr(t, data, len, &sa_len); - if (sa) { - data = sa; - len = sa_len; - } - - return netsnmp_ipv6_fmtaddr("DTLSUDP6", t, data, len); + return netsnmp_dtlsudp_fmtaddr(t, data, len, "DTLSUDP6", + netsnmp_ipv6_fmtaddr); } /* @@ -1458,30 +1556,36 @@ netsnmp_dtlsudp6_fmtaddr(netsnmp_transport *t, void *data, int len) */ netsnmp_transport * -netsnmp_dtlsudp6_transport(struct sockaddr_in6 *addr, int local) +netsnmp_dtlsudp6_transport(const struct netsnmp_ep *ep, int local) { - netsnmp_transport *t = NULL; + const struct sockaddr_in6 *addr = &ep->a.sin6; + netsnmp_transport *t, *t2; DEBUGTRACETOK("dtlsudp"); - t = netsnmp_udp6_transport(addr, local); + t = netsnmp_udp6_transport(ep, local); if (NULL == t) return NULL; - _transport_common(t, local); + t2 = _transport_common(t, local); + if (!t2) { + netsnmp_transport_free(t); + return NULL; + } if (!local) { /* dtls needs to bind the socket for SSL_write to work */ - if (connect(t->sock, (struct sockaddr *) addr, sizeof(*addr)) == -1) + if (connect(t->sock, (const struct sockaddr *)addr, sizeof(*addr)) < 0) snmp_log(LOG_ERR, "dtls: failed to connect\n"); } /* XXX: Potentially set sock opts here (SO_SNDBUF/SO_RCV_BUF) */ /* XXX: and buf size */ - t->f_fmtaddr = netsnmp_dtlsudp6_fmtaddr; + t2->f_fmtaddr = netsnmp_dtlsudp6_fmtaddr; + t2->f_get_taddr = netsnmp_ipv6_get_taddr; - return t; + return t2; } #endif @@ -1490,19 +1594,16 @@ netsnmp_transport * netsnmp_dtlsudp_create_tstring(const char *str, int isserver, const char *default_target) { -#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN - struct sockaddr_in6 addr6; -#endif - struct sockaddr_in addr; + struct netsnmp_ep ep; netsnmp_transport *t; _netsnmpTLSBaseData *tlsdata; char buf[SPRINT_MAX_LEN], *cp; - if (netsnmp_sockaddr_in2(&addr, str, default_target)) - t = netsnmp_dtlsudp_transport(&addr, isserver); + if (netsnmp_sockaddr_in3(&ep, str, default_target)) + t = netsnmp_dtlsudp_transport(&ep, isserver); #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN - else if (netsnmp_sockaddr_in6_2(&addr6, str, default_target)) - t = netsnmp_dtlsudp6_transport(&addr6, isserver); + else if (netsnmp_sockaddr_in6_3(&ep, str, default_target)) + t = netsnmp_dtlsudp6_transport(&ep, isserver); #endif else return NULL; @@ -1510,7 +1611,7 @@ netsnmp_dtlsudp_create_tstring(const char *str, int isserver, /* see if we can extract the remote hostname */ if (!isserver && t && t->data && str) { - tlsdata = (_netsnmpTLSBaseData *) t->data; + tlsdata = t->data; /* search for a : */ if (NULL != (cp = strrchr(str, ':'))) { sprintf(buf, "%.*s", (int) SNMP_MIN(cp - str, sizeof(buf) - 1), @@ -1526,34 +1627,25 @@ netsnmp_dtlsudp_create_tstring(const char *str, int isserver, netsnmp_transport * -netsnmp_dtlsudp_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_dtlsudp_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_in addr; - - if (o_len == 6) { - unsigned short porttmp = (o[4] << 8) + o[5]; - addr.sin_family = AF_INET; - memcpy((u_char *) & (addr.sin_addr.s_addr), o, 4); - addr.sin_port = htons(porttmp); - return netsnmp_dtlsudp_transport(&addr, local); - } + struct netsnmp_ep ep; + + memset(&ep, 0, sizeof(ep)); + if (netsnmp_ipv4_ostring_to_sockaddr(&ep.a.sin, o, o_len)) + return netsnmp_dtlsudp_transport(&ep, local); #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN - else if (o_len == 18) { - struct sockaddr_in6 addr6; - unsigned short porttmp = (o[16] << 8) + o[17]; - addr6.sin6_family = AF_INET6; - memcpy((u_char *) & (addr6.sin6_addr.s6_addr), o, 4); - addr6.sin6_port = htons(porttmp); - return netsnmp_dtlsudp6_transport(&addr6, local); - } + else if (netsnmp_ipv6_ostring_to_sockaddr(&ep.a.sin6, o, o_len)) + return netsnmp_dtlsudp6_transport(&ep, local); #endif - return NULL; + else + return NULL; } void netsnmp_dtlsudp_ctor(void) { - char indexname[] = "_netsnmp_addr_info"; + static const char indexname[] = "_netsnmp_addr_info"; static const char *prefixes[] = { "dtlsudp", "dtls" #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN , "dtlsudp6", "dtls6" @@ -1561,7 +1653,7 @@ netsnmp_dtlsudp_ctor(void) }; int i, num_prefixes = sizeof(prefixes) / sizeof(char *); #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN - char indexname6[] = "_netsnmp_addr_info6"; + static const char indexname6[] = "_netsnmp_addr_info6"; #endif DEBUGMSGTL(("dtlsudp", "registering DTLS constructor\n")); @@ -1571,23 +1663,23 @@ netsnmp_dtlsudp_ctor(void) #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN if (!openssl_addr_index6) openssl_addr_index6 = - SSL_get_ex_new_index(0, indexname6, NULL, NULL, NULL); + SSL_get_ex_new_index(0, NETSNMP_REMOVE_CONST(void *, indexname6), + NULL, NULL, NULL); #endif dtlsudpDomain.name = netsnmpDTLSUDPDomain; dtlsudpDomain.name_length = netsnmpDTLSUDPDomain_len; - dtlsudpDomain.prefix = (const char**)calloc(num_prefixes + 1, - sizeof(char *)); + dtlsudpDomain.prefix = calloc(num_prefixes + 1, sizeof(char *)); for (i = 0; i < num_prefixes; ++ i) dtlsudpDomain.prefix[i] = prefixes[i]; - dtlsudpDomain.f_create_from_tstring = NULL; dtlsudpDomain.f_create_from_tstring_new = netsnmp_dtlsudp_create_tstring; dtlsudpDomain.f_create_from_ostring = netsnmp_dtlsudp_create_ostring; if (!openssl_addr_index) openssl_addr_index = - SSL_get_ex_new_index(0, indexname, NULL, NULL, NULL); + SSL_get_ex_new_index(0, NETSNMP_REMOVE_CONST(void *, indexname), + NULL, NULL, NULL); netsnmp_tdomain_register(&dtlsudpDomain); } @@ -1600,21 +1692,13 @@ netsnmp_dtlsudp_ctor(void) int cookie_initialized=0; unsigned char cookie_secret[NETSNMP_COOKIE_SECRET_LENGTH]; -typedef union { - struct sockaddr sa; - struct sockaddr_in s4; -#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN - struct sockaddr_in6 s6; -#endif -} _peer_union; - int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len) { unsigned char *buffer, result[EVP_MAX_MD_SIZE]; unsigned int length, resultlength; bio_cache *cachep = NULL; - _peer_union *peer; + const netsnmp_sockaddr_storage *peer; /* Initialize a random secret */ if (!cookie_initialized) { @@ -1622,6 +1706,7 @@ int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, snmp_log(LOG_ERR, "dtls: error setting random cookie secret\n"); return 0; } + MAKE_MEM_DEFINED(cookie_secret, NETSNMP_COOKIE_SECRET_LENGTH); cookie_initialized = 1; } @@ -1633,19 +1718,19 @@ int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, snmp_log(LOG_ERR, "dtls: failed to get the peer address\n"); return 0; } - peer = (_peer_union *)&cachep->sas; + peer = &cachep->sas; /* Create buffer with peer's address and port */ length = 0; switch (peer->sa.sa_family) { case AF_INET: length += sizeof(struct in_addr); - length += sizeof(peer->s4.sin_port); + length += sizeof(peer->sin.sin_port); break; #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN case AF_INET6: length += sizeof(struct in6_addr); - length += sizeof(peer->s6.sin6_port); + length += sizeof(peer->sin6.sin6_port); break; #endif default: @@ -1662,31 +1747,32 @@ int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, switch (peer->sa.sa_family) { case AF_INET: memcpy(buffer, - &peer->s4.sin_port, - sizeof(peer->s4.sin_port)); - memcpy(buffer + sizeof(peer->s4.sin_port), - &peer->s4.sin_addr, + &peer->sin.sin_port, + sizeof(peer->sin.sin_port)); + memcpy(buffer + sizeof(peer->sin.sin_port), + &peer->sin.sin_addr, sizeof(struct in_addr)); break; #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN case AF_INET6: memcpy(buffer, - &peer->s6.sin6_port, - sizeof(peer->s6.sin6_port)); - memcpy(buffer + sizeof(peer->s6.sin6_port), - &peer->s6.sin6_addr, + &peer->sin6.sin6_port, + sizeof(peer->sin6.sin6_port)); + memcpy(buffer + sizeof(peer->sin6.sin6_port), + &peer->sin6.sin6_addr, sizeof(struct in6_addr)); break; #endif default: snmp_log(LOG_ERR, "dtls: unknown address family generating a cookie\n"); + free(buffer); return 0; } /* Calculate HMAC of buffer using the secret */ HMAC(EVP_sha1(), cookie_secret, NETSNMP_COOKIE_SECRET_LENGTH, buffer, length, result, &resultlength); - OPENSSL_free(buffer); + free(buffer); memcpy(cookie, result, resultlength); *cookie_len = resultlength; @@ -1696,13 +1782,15 @@ int netsnmp_dtls_gen_cookie(SSL *ssl, unsigned char *cookie, return 1; } -int netsnmp_dtls_verify_cookie(SSL *ssl, unsigned char *cookie, +int netsnmp_dtls_verify_cookie(SSL *ssl, + SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER + unsigned char *cookie, unsigned int cookie_len) { unsigned char *buffer, result[EVP_MAX_MD_SIZE]; unsigned int length, resultlength, rc; bio_cache *cachep = NULL; - _peer_union *peer; + const netsnmp_sockaddr_storage *peer; /* If secret isn't initialized yet, the cookie can't be valid */ if (!cookie_initialized) @@ -1715,19 +1803,19 @@ int netsnmp_dtls_verify_cookie(SSL *ssl, unsigned char *cookie, snmp_log(LOG_ERR, "dtls: failed to get the peer address\n"); return 0; } - peer = (_peer_union *)&cachep->sas; + peer = &cachep->sas; /* Create buffer with peer's address and port */ length = 0; switch (peer->sa.sa_family) { case AF_INET: length += sizeof(struct in_addr); - length += sizeof(peer->s4.sin_port); + length += sizeof(peer->sin.sin_port); break; #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN case AF_INET6: length += sizeof(struct in6_addr); - length += sizeof(peer->s6.sin6_port); + length += sizeof(peer->sin6.sin6_port); break; #endif default: @@ -1745,19 +1833,19 @@ int netsnmp_dtls_verify_cookie(SSL *ssl, unsigned char *cookie, switch (peer->sa.sa_family) { case AF_INET: memcpy(buffer, - &peer->s4.sin_port, - sizeof(peer->s4.sin_port)); - memcpy(buffer + sizeof(peer->s4.sin_port), - &peer->s4.sin_addr, + &peer->sin.sin_port, + sizeof(peer->sin.sin_port)); + memcpy(buffer + sizeof(peer->sin.sin_port), + &peer->sin.sin_addr, sizeof(struct in_addr)); break; #ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN case AF_INET6: memcpy(buffer, - &peer->s6.sin6_port, - sizeof(peer->s6.sin6_port)); - memcpy(buffer + sizeof(peer->s6.sin6_port), - &peer->s6.sin6_addr, + &peer->sin6.sin6_port, + sizeof(peer->sin6.sin6_port)); + memcpy(buffer + sizeof(peer->sin6.sin6_port), + &peer->sin6.sin6_addr, sizeof(struct in6_addr)); break; #endif @@ -1765,13 +1853,14 @@ int netsnmp_dtls_verify_cookie(SSL *ssl, unsigned char *cookie, snmp_log(LOG_ERR, "dtls: unknown address family %d generating a cookie\n", peer->sa.sa_family); + free(buffer); return 0; } /* Calculate HMAC of buffer using the secret */ HMAC(EVP_sha1(), cookie_secret, NETSNMP_COOKIE_SECRET_LENGTH, buffer, length, result, &resultlength); - OPENSSL_free(buffer); + free(buffer); if (cookie_len != resultlength || memcmp(result, cookie, resultlength) != 0) rc = 0; diff --git a/snmplib/transports/snmpIPBaseDomain.c b/snmplib/transports/snmpIPBaseDomain.c new file mode 100644 index 0000000..f6b3ad2 --- /dev/null +++ b/snmplib/transports/snmpIPBaseDomain.c @@ -0,0 +1,126 @@ +#include +#include +#include +#include "snmpIPBaseDomain.h" +#include +#include +#include +#include + +static int netsnmp_isnumber(const char *cp) +{ + if (!*cp) + return 0; + + while (isdigit((unsigned char)*cp)) + cp++; + return *cp == '\0'; +} + +/** + * Parse a Net-SNMP endpoint name. + * @ep_str: Parsed endpoint name. + * @endpoint: Endpoint specification in the format + *
[@]:[],
[@] or . + * + * Only overwrite those fields of *@ep_str that have been set in + * @endpoint. Returns 1 upon success and 0 upon failure. + */ +int netsnmp_parse_ep_str(struct netsnmp_ep_str *ep_str, const char *endpoint) +{ + char *dup, *cp, *addrstr = NULL, *iface = NULL, *portstr = NULL; + unsigned port; + + if (!endpoint) + return 0; + + dup = strdup(endpoint); + if (!dup) + return 0; + + cp = dup; + if (netsnmp_isnumber(cp)) { + portstr = cp; + } else { + if (*cp == '[') { + addrstr = cp + 1; + cp = strchr(cp, ']'); + if (cp) { + cp[0] = '\0'; + cp++; + } else { + goto err; + } + } else if (*cp != '@' && (*cp != ':' || cp[1] == ':')) { + addrstr = cp; + cp = strchr(addrstr, '@'); + if (!cp) { + cp = strrchr(addrstr, ':'); + if (cp && strchr(dup, ':') < cp) + cp = NULL; + } + } + if (cp && *cp == '@') { + *cp = '\0'; + iface = cp + 1; + cp = strchr(cp + 1, ':'); + } + if (cp && *cp == ':') { + *cp++ = '\0'; + portstr = cp; + if (!netsnmp_isnumber(cp)) + goto err; + } else if (cp && *cp) { + goto err; + } + } + + if (addrstr) { + ep_str->addr = strdup(addrstr); + if (!ep_str->addr) + goto err; + } + if (iface) + strlcpy(ep_str->iface, iface, sizeof(ep_str->iface)); + if (portstr) { + port = atoi(portstr); + if (port <= 0xffff) + strlcpy(ep_str->port, portstr, sizeof(ep_str->port)); + else + goto err; + } + + free(dup); + return 1; + +err: + free(ep_str->addr); + ep_str->addr = NULL; + free(dup); + return 0; +} + +int netsnmp_bindtodevice(int fd, const char *iface) +{ + /* If no interface name has been specified, report success. */ + if (!iface || iface[0] == '\0') + return 0; + +#ifdef HAVE_SO_BINDTODEVICE + /* + * +1 to work around the Linux kernel bug that the passed in name is not + * '\0'-terminated. + */ + int ifacelen = strlen(iface) + 1; + int ret; + + ret = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, iface, ifacelen); + if (ret < 0) + snmp_log(LOG_ERR, "Binding socket to interface %s failed: %s\n", iface, + strerror(errno)); + return ret; +#else + errno = EINVAL; + return -1; +#endif +} diff --git a/snmplib/transports/snmpIPBaseDomain.h b/snmplib/transports/snmpIPBaseDomain.h new file mode 100644 index 0000000..e644832 --- /dev/null +++ b/snmplib/transports/snmpIPBaseDomain.h @@ -0,0 +1,41 @@ +#ifndef _SNMPIPBASEDOMAIN_H_ +#define _SNMPIPBASEDOMAIN_H_ + +#include +#ifdef HAVE_NETINET_IN_H +#include +#endif + +/** + * SNMP endpoint specification. + * @param a Address family, network address and port number. + * @param iface Network interface name in ASCII format. May be empty. + */ +struct netsnmp_ep { + union { + struct sockaddr_in sin; +#if defined(NETSNMP_TRANSPORT_UDPIPV6_DOMAIN) || \ + defined(NETSNMP_TRANSPORT_TCPIPV6_DOMAIN) + struct sockaddr_in6 sin6; +#endif + } a; + char iface[16]; +}; + +/** + * SNMP endpoint with the network name in ASCII format. + * @param addr Network address or host name as an ASCII string. + * @param iface Network interface, e.g. "lo". + * @param port Port number. "" means that no port number has been specified. "0" + * means "bind to any port". + */ +struct netsnmp_ep_str { + char *addr; + char iface[16]; + char port[6]; +}; + +int netsnmp_parse_ep_str(struct netsnmp_ep_str *ep_str, const char *endpoint); +int netsnmp_bindtodevice(int fd, const char *iface); + +#endif /* _SNMPIPBASEDOMAIN_H_ */ diff --git a/snmplib/transports/snmpIPXDomain.c b/snmplib/transports/snmpIPXDomain.c index 1346156..5eb2887 100644 --- a/snmplib/transports/snmpIPXDomain.c +++ b/snmplib/transports/snmpIPXDomain.c @@ -7,32 +7,29 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include +#include #include #include @@ -45,28 +42,45 @@ static netsnmp_tdomain ipxDomain; */ static char * -netsnmp_ipx_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_ipx_fmtaddr(netsnmp_transport *t, const void *data, int len) { - struct sockaddr_ipx *to = NULL; + const struct sockaddr_ipx *to = NULL; if (data != NULL && len == sizeof(struct sockaddr_ipx)) { - to = (struct sockaddr_ipx *) data; + to = (const struct sockaddr_ipx *) data; } else if (t != NULL && t->data != NULL) { - to = (struct sockaddr_ipx *) t->data; + to = (const struct sockaddr_ipx *) t->data; } if (to == NULL) { return strdup("IPX: unknown"); } else { - char tmp[64]; - sprintf(tmp, "IPX: %08X:%02X%02X%02X%02X%02X%02X/%hu", - ntohl(to->sipx_network), to->sipx_node[0], - to->sipx_node[1], to->sipx_node[2], to->sipx_node[3], - to->sipx_node[4], to->sipx_node[5], ntohs(to->sipx_port)); - return strdup(tmp); + char *tmp; + + if (asprintf(&tmp, "IPX: %08X:%02X%02X%02X%02X%02X%02X/%hu", + ntohl(to->sipx_network), to->sipx_node[0], + to->sipx_node[1], to->sipx_node[2], to->sipx_node[3], + to->sipx_node[4], to->sipx_node[5], ntohs(to->sipx_port)) + < 0) + tmp = NULL; + return tmp; } } +static void netsnmp_ipx_get_taddr(struct netsnmp_transport_s *t, + void **addr, size_t *addr_len) +{ + struct sockaddr_ipx *sa = t->remote; + + netsnmp_assert(t->remote_length == sizeof(*sa)); + *addr_len = 12; + if ((*addr = malloc(*addr_len))) { + unsigned char *p = *addr; + memcpy(p + 0, &sa->sipx_network, 4); + memcpy(p + 4, &sa->sipx_node, 6); + memcpy(p + 10, &sa->sipx_port, 2); + } +} /* * You can write something into opaque that will subsequently get passed back @@ -120,23 +134,23 @@ netsnmp_ipx_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_ipx_send(netsnmp_transport *t, void *buf, int size, +netsnmp_ipx_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; - struct sockaddr *to = NULL; + const struct sockaddr *to = NULL; if (opaque != NULL && *opaque != NULL && *olength == sizeof(struct sockaddr_ipx)) { - to = (struct sockaddr *) (*opaque); + to = (const struct sockaddr *) (*opaque); } else if (t != NULL && t->data != NULL && t->data_length == sizeof(struct sockaddr_ipx)) { - to = (struct sockaddr *) (t->data); + to = (const struct sockaddr *) (t->data); } if (to != NULL && t != NULL && t->sock >= 0) { DEBUGIF("netsnmp_ipx") { - char *str = netsnmp_ipx_fmtaddr(NULL, (void *)to, + char *str = netsnmp_ipx_fmtaddr(NULL, to, sizeof(struct sockaddr_ipx)); DEBUGMSGTL(("netsnmp_ipx", "send %d bytes from %p to %s on fd %d\n", size, buf, str, t->sock)); @@ -178,7 +192,7 @@ netsnmp_ipx_close(netsnmp_transport *t) */ netsnmp_transport * -netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local) +netsnmp_ipx_transport(const struct sockaddr_ipx *addr, int local) { netsnmp_transport *t = NULL; int rc = 0; @@ -198,7 +212,7 @@ netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local) } DEBUGIF("netsnmp_ipx") { - char *str = netsnmp_ipx_fmtaddr(NULL, (void *)addr, + char *str = netsnmp_ipx_fmtaddr(NULL, addr, sizeof(struct sockaddr_ipx)); DEBUGMSGTL(("netsnmp_ipx", "open %s %s\n", local ? "local" : "remote", str)); @@ -216,15 +230,12 @@ netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local) if (local) { #ifndef NETSNMP_NO_LISTEN_SUPPORT - t->local = (unsigned char*)malloc(12); + t->local_length = sizeof(*addr); + t->local = netsnmp_memdup(addr, sizeof(*addr)); if (t->local == NULL) { netsnmp_transport_free(t); return NULL; } - memcpy(&(t->local[00]), (u_char *) & (addr->sipx_network), 4); - memcpy(&(t->local[04]), (u_char *) & (addr->sipx_node), 6); - memcpy(&(t->local[10]), (u_char *) & (addr->sipx_port), 2); - t->local_length = 12; /* * This session is inteneded as a server, so we must bind on to the @@ -232,8 +243,7 @@ netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local) * address, but definitely includes a port number). */ - rc = bind(t->sock, (struct sockaddr *) addr, - sizeof(struct sockaddr)); + rc = bind(t->sock, addr, sizeof(struct sockaddr)); if (rc != 0) { netsnmp_ipx_close(t); netsnmp_transport_free(t); @@ -245,15 +255,12 @@ netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local) return NULL; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ } else { - t->remote = (unsigned char*)malloc(12); + t->remote_length = sizeof(*addr); + t->remote = netsnmp_memdup(addr, sizeof(*addr)); if (t->remote == NULL) { netsnmp_transport_free(t); return NULL; } - memcpy(&(t->remote[00]), (u_char *) & (addr->sipx_network), 4); - memcpy(&(t->remote[04]), (u_char *) & (addr->sipx_node), 6); - memcpy(&(t->remote[10]), (u_char *) & (addr->sipx_port), 2); - t->remote_length = 12; /* * This is a client session. Save the address in the @@ -280,6 +287,7 @@ netsnmp_ipx_transport(struct sockaddr_ipx *addr, int local) t->f_close = netsnmp_ipx_close; t->f_accept = NULL; t->f_fmtaddr = netsnmp_ipx_fmtaddr; + t->f_get_taddr = netsnmp_ipx_get_taddr; return t; } @@ -434,20 +442,30 @@ netsnmp_ipx_create_tstring(const char *str, int local, } } +static int netsnmp_ipx_ostring_to_sockaddr(struct sockaddr_ipx *sa, + const void *o, size_t o_len) +{ + const char *p = o; + if (o_len != 12) + return 0; + + memset(sa, 0, sizeof(*sa)); + sa->sipx_family = AF_IPX; + memcpy(&sa->sipx_network, p + 0, 4); + memcpy(&sa->sipx_node, p + 4, 6); + memcpy(&sa->sipx_port, p + 10, 2); + return 1; +} netsnmp_transport * -netsnmp_ipx_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_ipx_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_ipx addr; + struct sockaddr_ipx sa; + + if (netsnmp_ipx_ostring_to_sockaddr(&sa, o, o_len)) + return netsnmp_ipx_transport(&sa, local); - if (o_len == 12) { - addr.sipx_family = AF_IPX; - memcpy((u_char *) & (addr.sipx_network), &(o[00]), 4); - memcpy((u_char *) & (addr.sipx_node), &(o[04]), 6); - memcpy((u_char *) & (addr.sipx_port), &(o[10]), 2); - return netsnmp_ipx_transport(&addr, local); - } return NULL; } @@ -461,7 +479,6 @@ netsnmp_ipx_ctor(void) ipxDomain.prefix = (const char**)calloc(2, sizeof(char *)); ipxDomain.prefix[0] = "ipx"; - ipxDomain.f_create_from_tstring = NULL; ipxDomain.f_create_from_tstring_new = netsnmp_ipx_create_tstring; ipxDomain.f_create_from_ostring = netsnmp_ipx_create_ostring; diff --git a/snmplib/transports/snmpIPv4BaseDomain.c b/snmplib/transports/snmpIPv4BaseDomain.c index 05e150b..d43f987 100644 --- a/snmplib/transports/snmpIPv4BaseDomain.c +++ b/snmplib/transports/snmpIPv4BaseDomain.c @@ -4,30 +4,32 @@ #include #include +#include "snmpIPBaseDomain.h" #include +#include #include #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif @@ -36,6 +38,7 @@ #include #include +#include "inet_ntop.h" #ifndef INADDR_NONE #define INADDR_NONE -1 @@ -54,122 +57,75 @@ int netsnmp_sockaddr_in2(struct sockaddr_in *addr, const char *inpeername, const char *default_target) { + struct netsnmp_ep ep; int ret; - if (addr == NULL) { + ret = netsnmp_sockaddr_in3(&ep, inpeername, default_target); + if (ret == 0) + return 0; + *addr = ep.a.sin; + return ret; +} + +int +netsnmp_sockaddr_in3(struct netsnmp_ep *ep, + const char *inpeername, const char *default_target) +{ + struct sockaddr_in *addr = &ep->a.sin; + struct netsnmp_ep_str ep_str; + int port, ret; + + if (!ep) return 0; - } DEBUGMSGTL(("netsnmp_sockaddr_in", "addr %p, inpeername \"%s\", default_target \"%s\"\n", - addr, inpeername ? inpeername : "[NIL]", + ep, inpeername ? inpeername : "[NIL]", default_target ? default_target : "[NIL]")); - memset(addr, 0, sizeof(struct sockaddr_in)); + memset(ep, 0, sizeof(*ep)); addr->sin_addr.s_addr = htonl(INADDR_ANY); addr->sin_family = AF_INET; addr->sin_port = htons((u_short)SNMP_PORT); - { - int port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_DEFAULT_PORT); - - if (port != 0) { - addr->sin_port = htons((u_short)port); - } else if (default_target != NULL) - netsnmp_sockaddr_in2(addr, default_target, NULL); - } - - if (inpeername != NULL && *inpeername != '\0') { - const char *host, *port; - char *peername = NULL; - char *cp; - /* - * Duplicate the peername because we might want to mank around with - * it. - */ - - peername = strdup(inpeername); - if (peername == NULL) { + memset(&ep_str, 0, sizeof(ep_str)); + port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DEFAULT_PORT); + if (port != 0) + snprintf(ep_str.port, sizeof(ep_str.port), "%d", port); + else if (default_target && + !netsnmp_parse_ep_str(&ep_str, default_target)) + snmp_log(LOG_ERR, "Invalid default target %s\n", + default_target); + if (inpeername && *inpeername != '\0') { + if (ep_str.addr) { + free(ep_str.addr); /* free default target */ + ep_str.addr = NULL; + } + if (!netsnmp_parse_ep_str(&ep_str, inpeername)) return 0; - } - - /* - * Try and extract an appended port number. - */ - cp = strchr(peername, ':'); - if (cp != NULL) { - *cp = '\0'; - port = cp + 1; - host = peername; - } else { - host = NULL; - port = peername; - } - - /* - * Try to convert the user port specifier - */ - if (port && *port == '\0') - port = NULL; - - if (port != NULL) { - long int l; - char* ep; - - DEBUGMSGTL(("netsnmp_sockaddr_in", "check user service %s\n", - port)); - - l = strtol(port, &ep, 10); - if (ep != port && *ep == '\0' && 0 <= l && l <= 0x0ffff) - addr->sin_port = htons((u_short)l); - else { - if (host == NULL) { - DEBUGMSGTL(("netsnmp_sockaddr_in", - "servname not numeric, " - "check if it really is a destination)\n")); - host = port; - port = NULL; - } else { - DEBUGMSGTL(("netsnmp_sockaddr_in", - "servname not numeric\n")); - free(peername); - return 0; - } - } - } + } + if (ep_str.port[0]) + addr->sin_port = htons(atoi(ep_str.port)); + if (ep_str.iface[0]) + strlcpy(ep->iface, ep_str.iface, sizeof(ep->iface)); + if (ep_str.addr && strcmp(ep_str.addr, "255.255.255.255") == 0) { /* - * Try to convert the user host specifier + * The explicit broadcast address hack */ - if (host && *host == '\0') - host = NULL; - - if (host != NULL) { + DEBUGMSGTL(("netsnmp_sockaddr_in", "Explicit UDP broadcast\n")); + addr->sin_addr.s_addr = INADDR_NONE; + } else if (ep_str.addr && strcmp(ep_str.addr, "") != 0) { + ret = netsnmp_gethostbyname_v4(ep_str.addr, &addr->sin_addr.s_addr); + if (ret < 0) { DEBUGMSGTL(("netsnmp_sockaddr_in", - "check destination %s\n", host)); - - - if (strcmp(peername, "255.255.255.255") == 0 ) { - /* - * The explicit broadcast address hack - */ - DEBUGMSGTL(("netsnmp_sockaddr_in", "Explicit UDP broadcast\n")); - addr->sin_addr.s_addr = INADDR_NONE; - } else { - ret = - netsnmp_gethostbyname_v4(peername, &addr->sin_addr.s_addr); - if (ret < 0) { - DEBUGMSGTL(("netsnmp_sockaddr_in", - "couldn't resolve hostname\n")); - free(peername); - return 0; - } - DEBUGMSGTL(("netsnmp_sockaddr_in", - "hostname (resolved okay)\n")); - } + "couldn't resolve hostname \"%s\"\n", ep_str.addr)); + free(ep_str.addr); + return 0; } - free(peername); + DEBUGMSGTL(("netsnmp_sockaddr_in", + "hostname (resolved okay)\n")); } /* @@ -178,46 +134,96 @@ netsnmp_sockaddr_in2(struct sockaddr_in *addr, DEBUGMSGTL(("netsnmp_sockaddr_in", "return { AF_INET, %s:%hu }\n", inet_ntoa(addr->sin_addr), ntohs(addr->sin_port))); + free(ep_str.addr); return 1; } char * netsnmp_ipv4_fmtaddr(const char *prefix, netsnmp_transport *t, - void *data, int len) + const void *data, int len) { - netsnmp_indexed_addr_pair *addr_pair = NULL; + const netsnmp_indexed_addr_pair *addr_pair; + const struct sockaddr_in *from, *to; struct hostent *host; - char tmp[64]; + char *tmp; - if (data != NULL && len == sizeof(netsnmp_indexed_addr_pair)) { - addr_pair = (netsnmp_indexed_addr_pair *) data; - } else if (t != NULL && t->data != NULL) { - addr_pair = (netsnmp_indexed_addr_pair *) t->data; + if (t && !data) { + data = t->data; + len = t->data_length; } - if (addr_pair == NULL) { - snprintf(tmp, sizeof(tmp), "%s: unknown", prefix); + switch (data ? len : 0) { + case sizeof(netsnmp_indexed_addr_pair): + addr_pair = data; + break; + case sizeof(struct sockaddr_in): { + char a[16]; + + to = data; + if (asprintf(&tmp, "%s: [%s]:%hu", prefix, + inet_ntop(AF_INET, &to->sin_addr, a, sizeof(a)), + ntohs(to->sin_port)) < 0) + tmp = NULL; + return tmp; + } + default: + netsnmp_assert(0); + if (asprintf(&tmp, "%s: unknown", prefix) < 0) + tmp = NULL; + return tmp; + } + + from = (const struct sockaddr_in *)&addr_pair->local_addr; + to = (const struct sockaddr_in *)&addr_pair->remote_addr; + netsnmp_assert(from->sin_family == 0 || from->sin_family == AF_INET); + netsnmp_assert(to->sin_family == 0 || to->sin_family == AF_INET); + if (t && t->flags & NETSNMP_TRANSPORT_FLAG_HOSTNAME) { + /* XXX: hmm... why isn't this prefixed */ + /* assuming intentional */ + host = netsnmp_gethostbyaddr(&to->sin_addr, sizeof(struct in_addr), AF_INET); + return (host ? strdup(host->h_name) : NULL); } else { - struct sockaddr_in *to = NULL; - to = (struct sockaddr_in *) &(addr_pair->remote_addr); - if (to == NULL) { - snprintf(tmp, sizeof(tmp), "%s: unknown->[%s]:%hu", prefix, - inet_ntoa(addr_pair->local_addr.sin.sin_addr), - ntohs(addr_pair->local_addr.sin.sin_port)); - } else if ( t && t->flags & NETSNMP_TRANSPORT_FLAG_HOSTNAME ) { - /* XXX: hmm... why isn't this prefixed */ - /* assuming intentional */ - host = netsnmp_gethostbyaddr((char *)&to->sin_addr, sizeof(struct in_addr), AF_INET); - return (host ? strdup(host->h_name) : NULL); - } else { - snprintf(tmp, sizeof(tmp), "%s: [%s]:%hu->", prefix, - inet_ntoa(to->sin_addr), ntohs(to->sin_port)); - snprintf(tmp + strlen(tmp), sizeof(tmp)-strlen(tmp), "[%s]:%hu", - inet_ntoa(addr_pair->local_addr.sin.sin_addr), - ntohs(addr_pair->local_addr.sin.sin_port)); - } + char a1[16]; + char a2[16]; + + if (asprintf(&tmp, "%s: [%s]:%hu->[%s]:%hu", prefix, + inet_ntop(AF_INET, &to->sin_addr, a1, sizeof(a1)), + ntohs(to->sin_port), + inet_ntop(AF_INET, &from->sin_addr, a2, sizeof(a2)), + ntohs(from->sin_port)) < 0) + tmp = NULL; + } + + return tmp; +} + +void netsnmp_ipv4_get_taddr(struct netsnmp_transport_s *t, void **addr, + size_t *addr_len) +{ + struct sockaddr_in *sin = t->remote; + + netsnmp_assert(t->remote_length == sizeof(*sin)); + + *addr_len = 6; + if ((*addr = malloc(*addr_len))) { + unsigned char *p = *addr; + + memcpy(p, &sin->sin_addr, 4); + memcpy(p + 4, &sin->sin_port, 2); } - tmp[sizeof(tmp)-1] = '\0'; - return strdup(tmp); } +int netsnmp_ipv4_ostring_to_sockaddr(struct sockaddr_in *sin, const void *o, + size_t o_len) +{ + const char *p = o; + + if (o_len != 6) + return 0; + + memset(sin, 0, sizeof(*sin)); + sin->sin_family = AF_INET; + memcpy(&sin->sin_addr, p + 0, 4); + memcpy(&sin->sin_port, p + 4, 2); + return 1; +} diff --git a/snmplib/transports/snmpIPv6BaseDomain.c b/snmplib/transports/snmpIPv6BaseDomain.c index 1ad6888..01ded90 100644 --- a/snmplib/transports/snmpIPv6BaseDomain.c +++ b/snmplib/transports/snmpIPv6BaseDomain.c @@ -1,4 +1,13 @@ /* IPV6 base transport support functions + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -6,41 +15,39 @@ #ifdef NETSNMP_ENABLE_IPV6 #include +#include "snmpIPBaseDomain.h" #include #include +#include #include #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -56,17 +63,24 @@ #if defined(HAVE_WINSOCK_H) && !defined(mingw32) -static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; +static const struct in6_addr in6addr_any; /*IN6ADDR_ANY_INIT*/ #endif +#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID static unsigned netsnmp_if_nametoindex(const char *ifname) { #if defined(WIN32) return atoi(ifname); #elif defined(HAVE_IF_NAMETOINDEX) - return if_nametoindex(ifname); + int res; + + res = if_nametoindex(ifname); + if (res == 0) + res = atoi(ifname); + + return res; #else return 0; #endif @@ -84,329 +98,231 @@ netsnmp_if_indextoname(unsigned ifindex, char *ifname) return NULL; #endif } +#endif /* HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID */ char * netsnmp_ipv6_fmtaddr(const char *prefix, netsnmp_transport *t, - void *data, int len) + const void *data, int len) { - struct sockaddr_in6 *to = NULL; + const struct sockaddr_in6 *to; + char scope_id[IF_NAMESIZE + 1] = ""; char addr[INET6_ADDRSTRLEN]; - char tmp[INET6_ADDRSTRLEN + 18]; + char *tmp; DEBUGMSGTL(("netsnmp_ipv6", "fmtaddr: t = %p, data = %p, len = %d\n", t, data, len)); - if (data != NULL && len == sizeof(struct sockaddr_in6)) { - to = (struct sockaddr_in6 *) data; - } else if (t != NULL && t->data != NULL) { - to = (struct sockaddr_in6 *) t->data; + + if (t && !data) { + data = t->data; + len = t->data_length; } - if (to == NULL) { - snprintf(tmp, sizeof(tmp), "%s: unknown", prefix); - } else { - char scope_id[IF_NAMESIZE + 1] = ""; + switch (data ? len : 0) { + case sizeof(struct sockaddr_in6): + to = data; + break; + case sizeof(netsnmp_indexed_addr_pair): { + const netsnmp_indexed_addr_pair *addr_pair = data; + + to = (const struct sockaddr_in6 *)&addr_pair->remote_addr; + break; + } + default: + netsnmp_assert(0); + if (asprintf(&tmp, "%s: unknown", prefix) < 0) + tmp = NULL; + return tmp; + } + + netsnmp_assert(to->sin6_family == AF_INET6); + + if (t && t->flags & NETSNMP_TRANSPORT_FLAG_HOSTNAME) { + struct hostent *host; + host = netsnmp_gethostbyaddr(&to->sin6_addr, sizeof(struct in6_addr), AF_INET6); + return (host ? strdup(host->h_name) : NULL); + } else { #if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID) - if (to->sin6_scope_id - && netsnmp_if_indextoname(to->sin6_scope_id, &scope_id[1])) { + if (to->sin6_scope_id && + netsnmp_if_indextoname(to->sin6_scope_id, &scope_id[1])) scope_id[0] = '%'; - } #endif - snprintf(tmp, sizeof(tmp), "%s: [%s%s]:%hu", prefix, - inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, - INET6_ADDRSTRLEN), scope_id, ntohs(to->sin6_port)); + inet_ntop(AF_INET6, &to->sin6_addr, addr, sizeof(addr)); + if (asprintf(&tmp, "%s: [%s%s]:%hu", prefix, addr, scope_id, + ntohs(to->sin6_port)) < 0) + tmp = NULL; } - tmp[sizeof(tmp)-1] = '\0'; - return strdup(tmp); + return tmp; } -int -netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr, - const char *inpeername, const char *default_target) +void netsnmp_ipv6_get_taddr(struct netsnmp_transport_s *t, void **addr, + size_t *addr_len) { - char *cp = NULL, *peername = NULL; - char debug_addr[INET6_ADDRSTRLEN]; -#if HAVE_GETADDRINFO - struct addrinfo *addrs = NULL; - int err; -#elif HAVE_GETIPNODEBYNAME - struct hostent *hp = NULL; - int err; -#elif HAVE_GETHOSTBYNAME - struct hostent *hp = NULL; -#endif - int portno; + struct sockaddr_in6 *sin6 = t->remote; - if (addr == NULL) { - return 0; - } + netsnmp_assert(t->remote_length == sizeof(*sin6)); - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "addr %p, peername \"%s\", default_target \"%s\"\n", - addr, inpeername ? inpeername : "[NIL]", - default_target ? default_target : "[NIL]")); + *addr_len = 18; + if ((*addr = malloc(*addr_len))) { + unsigned char *p = *addr; - memset(addr, 0, sizeof(struct sockaddr_in6)); - addr->sin6_family = AF_INET6; - addr->sin6_addr = in6addr_any; - addr->sin6_port = htons((u_short)SNMP_PORT); - - { - int port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_DEFAULT_PORT); - if (port != 0) - addr->sin6_port = htons((u_short)port); - else if (default_target != NULL) - netsnmp_sockaddr_in6_2(addr, default_target, NULL); + memcpy(p, &sin6->sin6_addr, 16); + memcpy(p + 16, &sin6->sin6_port, 2); } +} - if (inpeername != NULL) { - /* - * Duplicate the peername because we might want to mank around with - * it. - */ +int netsnmp_ipv6_ostring_to_sockaddr(struct sockaddr_in6 *sin6, const void *o, + size_t o_len) +{ + const char *p = o; - peername = strdup(inpeername); - if (peername == NULL) { - return 0; - } + if (o_len != 18) + return 0; - cp = peername; - if (*cp == ':') cp++; - portno = atoi(cp); - while (*cp && isdigit((unsigned char) *cp)) cp++; - if (!*cp && portno != 0) { - /* - * Okay, it looks like JUST a port number. - */ - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "totally numeric: %d\n", - portno)); - addr->sin6_port = htons((u_short)portno); - goto resolved; - } + memset(sin6, 0, sizeof(*sin6)); + sin6->sin6_family = AF_INET6; + memcpy(&sin6->sin6_addr, p + 0, 16); + memcpy(&sin6->sin6_port, p + 16, 2); + return 1; +} - /* - * See if it is an IPv6 address covered with square brackets. Also check - * for an appended :port. - */ - if (*peername == '[') { - cp = strchr(peername, ']'); - if (cp != NULL) { - /* - * See if it is an IPv6 link-local address with interface - * name as , like fe80::1234%eth0. - * Please refer to the internet draft, IPv6 Scoped Address Architecture - * http://www.ietf.org/internet-drafts/draft-ietf-ipngwg-scoping-arch-04.txt - * - */ - char *scope_id; - unsigned int if_index = 0; - *cp = '\0'; - scope_id = strchr(peername + 1, '%'); - if (scope_id != NULL) { - *scope_id = '\0'; - if_index = netsnmp_if_nametoindex(scope_id + 1); - } - if (*(cp + 1) == ':') { - portno = atoi(cp+2); - if (portno != 0 && - inet_pton(AF_INET6, peername + 1, - (void *) &(addr->sin6_addr))) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "IPv6 address with port suffix :%d\n", - portno)); - if (portno > 0 && portno <= 0xffff) { - addr->sin6_port = htons((u_short)portno); - } else { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "invalid port number: %d", portno)); - return 0; - } +static int netsnmp_resolve_v6_hostname(struct in6_addr *addr, + const char *hostname) +{ +#ifdef HAVE_GETADDRINFO + struct addrinfo hint = { 0 }; + struct addrinfo *addrs; + int err; -#if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID) - addr->sin6_scope_id = if_index; -#endif - goto resolved; - } - } else { - if (inet_pton - (AF_INET6, peername + 1, - (void *) &(addr->sin6_addr))) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "IPv6 address with square brackets\n")); - portno = ntohs(addr->sin6_port); - if (portno == 0) - portno = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_DEFAULT_PORT); - if (portno <= 0) - portno = SNMP_PORT; - addr->sin6_port = htons((u_short)portno); -#if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID) - addr->sin6_scope_id = if_index; -#endif - goto resolved; - } - } - if (scope_id != NULL) { - *scope_id = '%'; - } - *cp = ']'; - } - } + hint.ai_family = PF_INET6; + hint.ai_socktype = SOCK_DGRAM; + err = netsnmp_getaddrinfo(hostname, NULL, &hint, &addrs); + if (err) + return 0; - cp = strrchr(peername, ':'); - if (cp != NULL) { - char *scope_id; - unsigned int if_index = 0; - *cp = '\0'; - scope_id = strchr(peername + 1, '%'); - if (scope_id != NULL) { - *scope_id = '\0'; - if_index = netsnmp_if_nametoindex(scope_id + 1); - } - portno = atoi(cp + 1); - if (portno != 0 && - inet_pton(AF_INET6, peername, - (void *) &(addr->sin6_addr))) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "IPv6 address with port suffix :%d\n", - atoi(cp + 1))); - if (portno > 0 && portno <= 0xffff) { - addr->sin6_port = htons((u_short)portno); - } else { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "invalid port number: %d", portno)); - return 0; - } + if (addrs) { + DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (resolved okay)\n")); + *addr = ((struct sockaddr_in6 *)addrs->ai_addr)->sin6_addr; + freeaddrinfo(addrs); + } else { + DEBUGMSGTL(("netsnmp_sockaddr_in6", "Failed to resolve IPv6 hostname\n")); + } + return 1; +#elif defined(HAVE_GETIPNODEBYNAME) + struct hostent *hp; + int err; -#if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID) - addr->sin6_scope_id = if_index; -#endif - goto resolved; - } - if (scope_id != NULL) { - *scope_id = '%'; - } - *cp = ':'; - } + hp = getipnodebyname(hostname, AF_INET6, 0, &err); + if (hp == NULL) { + DEBUGMSGTL(("netsnmp_sockaddr_in6", + "hostname (couldn't resolve = %d)\n", err)); + return 0; + } + DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (resolved okay)\n")); + memcpy(addr, hp->h_addr, hp->h_length); + return 1; +#elif defined(HAVE_GETHOSTBYNAME) + struct hostent *hp; - /* - * See if it is JUST an IPv6 address. - */ - if (inet_pton(AF_INET6, peername, (void *) &(addr->sin6_addr))) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "just IPv6 address\n")); - goto resolved; - } + hp = netsnmp_gethostbyname(hostname); + if (hp == NULL) { + DEBUGMSGTL(("netsnmp_sockaddr_in6", + "hostname (couldn't resolve)\n")); + return 0; + } + if (hp->h_addrtype != AF_INET6) { + DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (not AF_INET6!)\n")); + return 0; + } + DEBUGMSGTL(("netsnmp_sockaddr_in6", "hostname (resolved okay)\n")); + memcpy(addr, hp->h_addr, hp->h_length); + return 1; +#else /*HAVE_GETHOSTBYNAME */ + /* + * There is no name resolving function available. + */ + snmp_log(LOG_ERR, + "no getaddrinfo()/getipnodebyname()/gethostbyname()\n"); + return 0; +#endif /*HAVE_GETHOSTBYNAME */ +} - /* - * Well, it must be a hostname then, possibly with an appended :port. - * Sort that out first. - */ - - cp = strrchr(peername, ':'); - if (cp != NULL) { - *cp = '\0'; - portno = atoi(cp + 1); - if (portno != 0) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "hostname(?) with port suffix :%d\n", - portno)); - if (portno > 0 && portno <= 0xffff) { - addr->sin6_port = htons((u_short)portno); - } else { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "invalid port number: %d", portno)); - return 0; - } - - } else { - /* - * No idea, looks bogus but we might as well pass the full thing to - * the name resolver below. - */ - *cp = ':'; - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "hostname(?) with embedded ':'?\n")); - } - /* - * Fall through. - */ - } +int +netsnmp_sockaddr_in6_2(struct sockaddr_in6 *addr, + const char *inpeername, const char *default_target) +{ + struct netsnmp_ep ep; + int ret; - if (peername[0] == '\0') { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "empty hostname\n")); - free(peername); - return 0; - } + ret = netsnmp_sockaddr_in6_3(&ep, inpeername, default_target); + if (ret == 0) + return 0; + *addr = ep.a.sin6; + return ret; +} -#if HAVE_GETADDRINFO - { - struct addrinfo hint = { 0 }; - hint.ai_flags = 0; - hint.ai_family = PF_INET6; - hint.ai_socktype = SOCK_DGRAM; - hint.ai_protocol = 0; +int +netsnmp_sockaddr_in6_3(struct netsnmp_ep *ep, + const char *inpeername, const char *default_target) +{ + struct sockaddr_in6 *addr = &ep->a.sin6; + struct netsnmp_ep_str ep_str; + char debug_addr[INET6_ADDRSTRLEN]; + int port; - err = netsnmp_getaddrinfo(peername, NULL, &hint, &addrs); - } - if (err != 0) { - free(peername); - return 0; - } - if (addrs != NULL) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "hostname (resolved okay)\n")); - memcpy(&addr->sin6_addr, - &((struct sockaddr_in6 *) addrs->ai_addr)->sin6_addr, - sizeof(struct in6_addr)); - freeaddrinfo(addrs); - } - else { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "Failed to resolve IPv6 hostname\n")); - } -#elif HAVE_GETIPNODEBYNAME - hp = getipnodebyname(peername, AF_INET6, 0, &err); - if (hp == NULL) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "hostname (couldn't resolve = %d)\n", err)); - free(peername); - return 0; + if (!ep) + return 0; + + DEBUGMSGTL(("netsnmp_sockaddr_in6", + "ep %p, peername \"%s\", default_target \"%s\"\n", + ep, inpeername ? inpeername : "[NIL]", + default_target ? default_target : "[NIL]")); + + memset(ep, 0, sizeof(*ep)); + addr->sin6_family = AF_INET6; + addr->sin6_addr = in6addr_any; + addr->sin6_port = htons(SNMP_PORT); + + memset(&ep_str, 0, sizeof(ep_str)); + port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_DEFAULT_PORT); + if (port != 0) + snprintf(ep_str.port, sizeof(ep_str.port), "%d", port); + else if (default_target && + !netsnmp_parse_ep_str(&ep_str, default_target)) + snmp_log(LOG_ERR, "Invalid default target %s\n", + default_target); + + if (!inpeername || !netsnmp_parse_ep_str(&ep_str, inpeername)) + return 0; + + if (ep_str.port[0]) + addr->sin6_port = htons(atoi(ep_str.port)); + if (ep_str.iface[0]) + strlcpy(ep->iface, ep_str.iface, sizeof(ep->iface)); + if (ep_str.addr && ep_str.addr[0]) { + char *scope_id; + + scope_id = strchr(ep_str.addr, '%'); + if (scope_id) { + *scope_id = '\0'; +#if defined(HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID) + addr->sin6_scope_id = netsnmp_if_nametoindex(scope_id + 1); +#endif } - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "hostname (resolved okay)\n")); - memcpy(&(addr->sin6_addr), hp->h_addr, hp->h_length); -#elif HAVE_GETHOSTBYNAME - hp = netsnmp_gethostbyname(peername); - if (hp == NULL) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "hostname (couldn't resolve)\n")); - free(peername); + if (!inet_pton(AF_INET6, ep_str.addr, &addr->sin6_addr) && + !netsnmp_resolve_v6_hostname(&addr->sin6_addr, ep_str.addr)) { + DEBUGMSGTL(("netsnmp_sockaddr_in6", "failed to parse %s\n", + ep_str.addr)); + free(ep_str.addr); return 0; - } else { - if (hp->h_addrtype != AF_INET6) { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "hostname (not AF_INET6!)\n")); - free(peername); - return 0; - } else { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", - "hostname (resolved okay)\n")); - memcpy(&(addr->sin6_addr), hp->h_addr, hp->h_length); - } } -#else /*HAVE_GETHOSTBYNAME */ - /* - * There is no name resolving function available. - */ - snmp_log(LOG_ERR, - "no getaddrinfo()/getipnodebyname()/gethostbyname()\n"); - free(peername); - return 0; -#endif /*HAVE_GETHOSTBYNAME */ - } else { - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "NULL peername")); - return 0; } - resolved: - DEBUGMSGTL(("netsnmp_sockaddr_in6_2", "return { AF_INET6, [%s]:%hu }\n", + DEBUGMSGTL(("netsnmp_sockaddr_in6", "return { AF_INET6, [%s%%%d]:%hu }\n", inet_ntop(AF_INET6, &addr->sin6_addr, debug_addr, - sizeof(debug_addr)), ntohs(addr->sin6_port))); - free(peername); + sizeof(debug_addr)), (int)addr->sin6_scope_id, + ntohs(addr->sin6_port))); + free(ep_str.addr); return 1; } diff --git a/snmplib/transports/snmpSSHDomain.c b/snmplib/transports/snmpSSHDomain.c index a9ed81f..6768ac2 100644 --- a/snmplib/transports/snmpSSHDomain.c +++ b/snmplib/transports/snmpSSHDomain.c @@ -1,6 +1,7 @@ #include #include +#include #include #include @@ -13,40 +14,37 @@ #ifdef HAVE_SYS_PARAM_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif #include #ifndef MAXPATHLEN -#warn no system max path length detected +#warning no system max path length detected #define MAXPATHLEN 2048 #endif @@ -61,7 +59,7 @@ #include #include -netsnmp_feature_require(user_information) +netsnmp_feature_require(user_information); #define MAX_NAME_LENGTH 127 @@ -99,33 +97,42 @@ netsnmp_sockaddr_in2(struct sockaddr_in *addr, */ static char * -netsnmp_ssh_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_ssh_fmtaddr(netsnmp_transport *t, const void *data, int len) { - netsnmp_ssh_addr_pair *addr_pair = NULL; + const netsnmp_ssh_addr_pair *addr_pair = NULL; if (data != NULL && len == sizeof(netsnmp_ssh_addr_pair)) { - addr_pair = (netsnmp_ssh_addr_pair *) data; + addr_pair = (const netsnmp_ssh_addr_pair *) data; } else if (t != NULL && t->data != NULL) { - addr_pair = (netsnmp_ssh_addr_pair *) t->data; + addr_pair = (const netsnmp_ssh_addr_pair *) t->data; } if (addr_pair == NULL) { return strdup("SSH: unknown"); } else { - struct sockaddr_in *to = NULL; - char tmp[64]; - to = (struct sockaddr_in *) &(addr_pair->remote_addr); - if (to == NULL) { - return strdup("SSH: unknown"); - } - - sprintf(tmp, "SSH: [%s]:%hd", - inet_ntoa(to->sin_addr), ntohs(to->sin_port)); - return strdup(tmp); + const struct sockaddr_in *to; + char *tmp; + + to = (const struct sockaddr_in *) &(addr_pair->remote_addr); + if (asprintf(&tmp, "SSH: [%s]:%hd", + inet_ntoa(to->sin_addr), ntohs(to->sin_port)) < 0) + tmp = NULL; + return tmp; } } - +static void netsnmp_ssh_get_taddr(struct netsnmp_transport_s *t, + void **addr, size_t *addr_len) +{ + switch (t->remote_length) { + case sizeof(struct sockaddr_in): + netsnmp_ipv4_get_taddr(t, addr, addr_len); + break; + default: + *addr = NULL; + netsnmp_assert(0); + } +} /* * You can write something into opaque that will subsequently get passed back @@ -185,7 +192,7 @@ netsnmp_ssh_recv(netsnmp_transport *t, void *buf, int size, return -1; }; - if (addr_pair->username[0] == '\0') { + if (addr_pair && addr_pair->username[0] == '\0') { /* we don't have a username yet, so this is the first message */ struct ucred *remoteuser; struct msghdr msg; @@ -362,13 +369,13 @@ netsnmp_ssh_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_ssh_send(netsnmp_transport *t, void *buf, int size, +netsnmp_ssh_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; netsnmp_ssh_addr_pair *addr_pair = NULL; - netsnmp_tmStateReference *tmStateRef = NULL; + const netsnmp_tmStateReference *tmStateRef = NULL; if (t != NULL && t->data != NULL) { addr_pair = (netsnmp_ssh_addr_pair *) t->data; @@ -376,7 +383,7 @@ netsnmp_ssh_send(netsnmp_transport *t, void *buf, int size, if (opaque != NULL && *opaque != NULL && *olength == sizeof(netsnmp_tmStateReference)) { - tmStateRef = (netsnmp_tmStateReference *) *opaque; + tmStateRef = (const netsnmp_tmStateReference *) *opaque; } if (!tmStateRef) { @@ -463,12 +470,7 @@ netsnmp_ssh_close(netsnmp_transport *t) #ifdef SNMPSSHDOMAIN_USE_EXTERNAL_PIPE - close(t->sock); - if (!addr_pair->session && !addr_pair->channel) { - /* unix socket based connection */ - close(t->sock); - /* XXX: make configurable */ unlink(addr_pair->socket_path); } @@ -522,13 +524,6 @@ netsnmp_ssh_accept(netsnmp_transport *t) newsock = accept(t->sock, farend, &farendlen); - /* set the SO_PASSCRED option so we can receive the remote uid */ - { - int one = 1; - setsockopt(newsock, SOL_SOCKET, SO_PASSCRED, (void *) &one, - sizeof(one)); - } - if (newsock < 0) { DEBUGMSGTL(("ssh","accept failed rc %d errno %d \"%s\"\n", newsock, errno, strerror(errno))); @@ -536,6 +531,13 @@ netsnmp_ssh_accept(netsnmp_transport *t) return newsock; } + /* set the SO_PASSCRED option so we can receive the remote uid */ + { + int one = 1; + setsockopt(newsock, SOL_SOCKET, SO_PASSCRED, (void *) &one, + sizeof(one)); + } + if (t->data != NULL) { free(t->data); } @@ -569,7 +571,7 @@ netsnmp_ssh_accept(netsnmp_transport *t) */ netsnmp_transport * -netsnmp_ssh_transport(struct sockaddr_in *addr, int local) +netsnmp_ssh_transport(const struct sockaddr_in *addr, int local) { netsnmp_transport *t = NULL; netsnmp_ssh_addr_pair *addr_pair = NULL; @@ -629,8 +631,9 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) sockpath = tmpsockpath; } - strcpy(unaddr->sun_path, sockpath); - strcpy(addr_pair->socket_path, sockpath); + snprintf(unaddr->sun_path, sizeof(unaddr->sun_path), "%s", sockpath); + snprintf(addr_pair->socket_path, sizeof(addr_pair->socket_path), "%s", + sockpath); t->sock = socket(PF_UNIX, SOCK_STREAM, 0); if (t->sock < 0) { @@ -646,7 +649,7 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) } unlink(unaddr->sun_path); - rc = bind(t->sock, (struct sockaddr *) unaddr, SUN_LEN(unaddr)); + rc = bind(t->sock, unaddr, SUN_LEN(unaddr)); if (rc != 0) { DEBUGMSGTL(("netsnmp_ssh_transport", "couldn't bind \"%s\", errno %d (%s)\n", @@ -720,6 +723,7 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) t->sock = STDIN_FILENO; #endif /* ! SNMPSSHDOMAIN_USE_EXTERNAL_PIPE */ #else /* NETSNMP_NO_LISTEN_SUPPORT */ + netsnmp_transport_free(t); return NULL; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ } else { @@ -733,6 +737,7 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) NETSNMP_DS_LIB_SSH_USERNAME); if (!username || 0 == *username) { snmp_log(LOG_ERR, "You must specify a ssh username to use. See the snmp.conf manual page\n"); + netsnmp_transport_free(t); return NULL; } @@ -742,6 +747,7 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) if (!keyfilepub || 0 == *keyfilepub) { /* XXX: default to ~/.ssh/id_rsa.pub */ snmp_log(LOG_ERR, "You must specify a ssh public key file to use. See the snmp.conf manual page\n"); + netsnmp_transport_free(t); return NULL; } @@ -751,6 +757,7 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) if (!keyfilepriv || 0 == *keyfilepriv) { /* XXX: default to keyfilepub without the .pub suffix */ snmp_log(LOG_ERR, "You must specify a ssh private key file to use. See the snmp.conf manual page\n"); + netsnmp_transport_free(t); return NULL; } @@ -765,16 +772,13 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) return NULL; } - t->remote = (u_char *)malloc(6); - if (t->remote == NULL) { + t->remote_length = sizeof(*addr); + t->remote = netsnmp_memdup(addr, sizeof(*addr)); + if (!t->remote) { netsnmp_ssh_close(t); netsnmp_transport_free(t); return NULL; } - memcpy(t->remote, (u_char *) & (addr->sin_addr.s_addr), 4); - t->remote[4] = (htons(addr->sin_port) & 0xff00) >> 8; - t->remote[5] = (htons(addr->sin_port) & 0x00ff) >> 0; - t->remote_length = 6; /* * This is a client-type session, so attempt to connect to the far @@ -783,8 +787,7 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) * had completed. So this can block. */ - rc = connect(t->sock, (struct sockaddr *)addr, - sizeof(struct sockaddr)); + rc = connect(t->sock, addr, sizeof(struct sockaddr)); if (rc < 0) { netsnmp_ssh_close(t); @@ -883,12 +886,13 @@ netsnmp_ssh_transport(struct sockaddr_in *addr, int local) * is equal to the maximum legal size of an SNMP message). */ - t->msgMaxSize = 0x7fffffff; + t->msgMaxSize = SNMP_MAX_PACKET_LEN; t->f_recv = netsnmp_ssh_recv; t->f_send = netsnmp_ssh_send; t->f_close = netsnmp_ssh_close; t->f_accept = netsnmp_ssh_accept; t->f_fmtaddr = netsnmp_ssh_fmtaddr; + t->f_get_taddr = netsnmp_ssh_get_taddr; return t; } @@ -911,17 +915,14 @@ netsnmp_ssh_create_tstring(const char *str, int local, netsnmp_transport * -netsnmp_ssh_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_ssh_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_in addr; + struct sockaddr_in sin; - if (o_len == 6) { - unsigned short porttmp = (o[4] << 8) + o[5]; - addr.sin_family = AF_INET; - memcpy((u_char *) & (addr.sin_addr.s_addr), o, 4); - addr.sin_port = htons(porttmp); - return netsnmp_ssh_transport(&addr, local); - } + if (netsnmp_ipv4_ostring_to_sockaddr(&sin, o, o_len)) + return netsnmp_ssh_transport(&sin, local); + else + netsnmp_assert(0); return NULL; } @@ -979,7 +980,6 @@ netsnmp_ssh_ctor(void) sshDomain.prefix = (const char **)calloc(2, sizeof(char *)); sshDomain.prefix[0] = "ssh"; - sshDomain.f_create_from_tstring = NULL; sshDomain.f_create_from_tstring_new = netsnmp_ssh_create_tstring; sshDomain.f_create_from_ostring = netsnmp_ssh_create_ostring; diff --git a/snmplib/transports/snmpSTDDomain.c b/snmplib/transports/snmpSTDDomain.c index 0a1c3f9..1c77143 100644 --- a/snmplib/transports/snmpSTDDomain.c +++ b/snmplib/transports/snmpSTDDomain.c @@ -7,22 +7,18 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include @@ -38,23 +34,27 @@ static netsnmp_tdomain stdDomain; */ static char * -netsnmp_std_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_std_fmtaddr(netsnmp_transport *t, const void *data, int len) { - char *buf; DEBUGMSGTL(("domain:std","formatting addr. data=%p\n",t->data)); if (t->data) { netsnmp_std_data *data = (netsnmp_std_data*)t->data; - buf = (char*)malloc(SNMP_MAXBUF_MEDIUM); - if (!buf) - return strdup("STDInOut"); - snprintf(buf, SNMP_MAXBUF_MEDIUM, "STD:%s", data->prog); + char *buf; + + if (asprintf(&buf, "STD:%s", data->prog) < 0) + buf = NULL; DEBUGMSGTL(("domain:std"," formatted:=%s\n",buf)); return buf; } return strdup("STDInOut"); } - +static void +netsnmp_std_get_taddr(netsnmp_transport *t, void **addr, size_t *addr_len) +{ + *addr_len = t->remote_length; + *addr = netsnmp_memdup(t->remote, *addr_len); +} /* * You can write something into opaque that will subsequently get passed back @@ -90,7 +90,7 @@ netsnmp_std_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_std_send(netsnmp_transport *t, void *buf, int size, +netsnmp_std_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; @@ -128,8 +128,8 @@ netsnmp_std_close(netsnmp_transport *t) /* XXX: set an alarm to kill harder the child */ } else { /* close stdout/in */ - close(1); - close(0); + close(STDOUT_FILENO); + close(STDIN_FILENO); } return 0; } @@ -163,7 +163,7 @@ netsnmp_std_transport(const char *instring, size_t instring_len, t->domain_length = sizeof(netsnmp_snmpSTDDomain) / sizeof(netsnmp_snmpSTDDomain[0]); - t->sock = 0; + t->sock = -1; t->flags = NETSNMP_TRANSPORT_FLAG_STREAM | NETSNMP_TRANSPORT_FLAG_TUNNELED; /* @@ -171,12 +171,13 @@ netsnmp_std_transport(const char *instring, size_t instring_len, * is equal to the maximum legal size of an SNMP message). */ - t->msgMaxSize = 0x7fffffff; + t->msgMaxSize = SNMP_MAX_PACKET_LEN; t->f_recv = netsnmp_std_recv; t->f_send = netsnmp_std_send; t->f_close = netsnmp_std_close; t->f_accept = netsnmp_std_accept; t->f_fmtaddr = netsnmp_std_fmtaddr; + t->f_get_taddr = netsnmp_std_get_taddr; /* * if instring is not null length, it specifies a path to a prog @@ -226,30 +227,18 @@ netsnmp_std_transport(const char *instring, size_t instring_len, } else { /* we're in the child */ - /* close stdin */ - close(0); - /* copy pipe output to stdout */ - dup(infd[0]); + dup2(infd[0], STDIN_FILENO); + dup2(outfd[1], STDOUT_FILENO); - /* close stdout */ - close(1); - /* copy pipe output to stdin */ - dup(outfd[1]); - /* close all the pipes themselves */ close(infd[0]); close(infd[1]); close(outfd[0]); close(outfd[1]); - /* call exec */ - system(instring); + NETSNMP_IGNORE_RESULT(system(instring)); /* XXX: TODO: use exec form instead; needs args */ /* execv(instring, NULL); */ - exit(0); - - /* ack... we should never ever get here */ - snmp_log(LOG_ERR, "STD transport returned after execv()\n"); } } @@ -264,9 +253,9 @@ netsnmp_std_create_tstring(const char *instring, int local, } netsnmp_transport * -netsnmp_std_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_std_create_ostring(const void *o, size_t o_len, int local) { - return netsnmp_std_transport((const char*)o, o_len, NULL); + return netsnmp_std_transport(o, o_len, NULL); } void @@ -277,7 +266,6 @@ netsnmp_std_ctor(void) stdDomain.prefix = (const char **)calloc(2, sizeof(char *)); stdDomain.prefix[0] = "std"; - stdDomain.f_create_from_tstring = NULL; stdDomain.f_create_from_tstring_new = netsnmp_std_create_tstring; stdDomain.f_create_from_ostring = netsnmp_std_create_ostring; diff --git a/snmplib/transports/snmpSocketBaseDomain.c b/snmplib/transports/snmpSocketBaseDomain.c index 3fb6632..3fa9da9 100644 --- a/snmplib/transports/snmpSocketBaseDomain.c +++ b/snmplib/transports/snmpSocketBaseDomain.c @@ -11,23 +11,23 @@ #include #include -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif #include @@ -345,7 +345,7 @@ int netsnmp_set_non_blocking_mode(int sock, int non_blocking_mode) { #ifdef WIN32 - u_long arg; + NETSNMP_IOCTLSOCKET_ARG arg; arg = non_blocking_mode; return ioctlsocket(sock, FIONBIO, &arg); diff --git a/snmplib/transports/snmpTCPBaseDomain.c b/snmplib/transports/snmpTCPBaseDomain.c index fc70dba..88291cf 100644 --- a/snmplib/transports/snmpTCPBaseDomain.c +++ b/snmplib/transports/snmpTCPBaseDomain.c @@ -7,34 +7,30 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include @@ -83,7 +79,7 @@ int netsnmp_tcpbase_recv(netsnmp_transport *t, void *buf, int size, return rc; } -int netsnmp_tcpbase_send(netsnmp_transport *t, void *buf, int size, +int netsnmp_tcpbase_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; diff --git a/snmplib/transports/snmpTCPDomain.c b/snmplib/transports/snmpTCPDomain.c index 7feb028..18318e5 100644 --- a/snmplib/transports/snmpTCPDomain.c +++ b/snmplib/transports/snmpTCPDomain.c @@ -1,40 +1,37 @@ #include #include +#include "snmpIPBaseDomain.h" #include #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include @@ -43,6 +40,10 @@ #include #include +#ifndef NETSNMP_NO_SYSTEMD +#include +#endif + /* * needs to be in sync with the definitions in snmplib/snmpUDPDomain.c * and perl/agent/agent.xs @@ -66,7 +67,7 @@ netsnmp_sockaddr_in2(struct sockaddr_in *addr, */ static char * -netsnmp_tcp_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_tcp_fmtaddr(netsnmp_transport *t, const void *data, int len) { return netsnmp_ipv4_fmtaddr("TCP", t, data, len); } @@ -77,9 +78,9 @@ netsnmp_tcp_accept(netsnmp_transport *t) struct sockaddr *farend = NULL; netsnmp_udp_addr_pair *addr_pair = NULL; int newsock = -1; - socklen_t farendlen = sizeof(netsnmp_udp_addr_pair); + socklen_t farendlen; - addr_pair = (netsnmp_udp_addr_pair *)malloc(farendlen); + addr_pair = malloc(sizeof(*addr_pair)); if (addr_pair == NULL) { /* * Indicate that the acceptance of this socket failed. @@ -89,9 +90,10 @@ netsnmp_tcp_accept(netsnmp_transport *t) } memset(addr_pair, 0, sizeof *addr_pair); farend = &addr_pair->remote_addr.sa; + farendlen = sizeof(addr_pair->remote_addr.sa); if (t != NULL && t->sock >= 0) { - newsock = accept(t->sock, farend, &farendlen); + newsock = (int) accept(t->sock, farend, &farendlen); if (newsock < 0) { DEBUGMSGTL(("netsnmp_tcp", "accept failed rc %d errno %d \"%s\"\n", @@ -144,11 +146,13 @@ netsnmp_tcp_accept(netsnmp_transport *t) */ netsnmp_transport * -netsnmp_tcp_transport(struct sockaddr_in *addr, int local) +netsnmp_tcp_transport(const struct netsnmp_ep *ep, int local) { + const struct sockaddr_in *addr = &ep->a.sin; netsnmp_transport *t = NULL; netsnmp_udp_addr_pair *addr_pair = NULL; int rc = 0; + int socket_initialized = 0; #ifdef NETSNMP_NO_LISTEN_SUPPORT if (local) @@ -164,11 +168,10 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) return NULL; } + t->sock = -1; addr_pair = (netsnmp_udp_addr_pair *)malloc(sizeof(netsnmp_udp_addr_pair)); - if (addr_pair == NULL) { - netsnmp_transport_free(t); - return NULL; - } + if (addr_pair == NULL) + goto err; memset(addr_pair, 0, sizeof *addr_pair); t->data = addr_pair; t->data_length = sizeof(netsnmp_udp_addr_pair); @@ -178,11 +181,21 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) t->domain_length = sizeof(netsnmp_snmpTCPDomain) / sizeof(netsnmp_snmpTCPDomain[0]); - t->sock = socket(PF_INET, SOCK_STREAM, 0); - if (t->sock < 0) { - netsnmp_transport_free(t); - return NULL; +#ifndef NETSNMP_NO_SYSTEMD + /* + * Maybe the socket was already provided by systemd... + */ + if (local) { + t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_STREAM, 1, + ntohs(addr->sin_port)); + if (t->sock >= 0) + socket_initialized = 1; } +#endif + if (!socket_initialized) + t->sock = (int) socket(PF_INET, SOCK_STREAM, 0); + if (t->sock < 0) + goto err; t->flags = NETSNMP_TRANSPORT_FLAG_STREAM; @@ -197,16 +210,10 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) */ t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN; - t->local = (u_char *)malloc(6); - if (t->local == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->local, (u_char *) & (addr->sin_addr.s_addr), 4); - t->local[4] = (ntohs(addr->sin_port) & 0xff00) >> 8; - t->local[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0; - t->local_length = 6; + t->local_length = sizeof(*addr); + t->local = netsnmp_memdup(addr, sizeof(*addr)); + if (!t->local) + goto err; /* * We should set SO_REUSEADDR too. @@ -215,11 +222,17 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt)); - rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr)); - if (rc != 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; + if (!socket_initialized) { + rc = netsnmp_bindtodevice(t->sock, ep->iface); + if (rc != 0) { + DEBUGMSGTL(("netsnmp_tcpbase", + "failed to bind to iface %s: %s\n", + ep->iface, strerror(errno))); + goto err; + } + rc = bind(t->sock, (const struct sockaddr *)addr, sizeof(*addr)); + if (rc != 0) + goto err; } /* @@ -235,12 +248,10 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) /* * Now sit here and wait for connections to arrive. */ - - rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN); - if (rc != 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; + if (!socket_initialized) { + rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN); + if (rc != 0) + goto err; } /* @@ -250,16 +261,10 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) return NULL; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ } else { - t->remote = (u_char *)malloc(6); - if (t->remote == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->remote, (u_char *) & (addr->sin_addr.s_addr), 4); - t->remote[4] = (ntohs(addr->sin_port) & 0xff00) >> 8; - t->remote[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0; - t->remote_length = 6; + t->remote_length = sizeof(*addr); + t->remote = netsnmp_memdup(addr, sizeof(*addr)); + if (!t->remote) + goto err; /* * This is a client-type session, so attempt to connect to the far @@ -268,14 +273,9 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) * had completed. So this can block. */ - rc = connect(t->sock, (struct sockaddr *)addr, - sizeof(struct sockaddr)); - - if (rc < 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } + rc = connect(t->sock, (const struct sockaddr *)addr, sizeof(*addr)); + if (rc < 0) + goto err; /* * Allow user to override the send and receive buffers. Default is @@ -291,14 +291,20 @@ netsnmp_tcp_transport(struct sockaddr_in *addr, int local) * is equal to the maximum legal size of an SNMP message). */ - t->msgMaxSize = 0x7fffffff; + t->msgMaxSize = SNMP_MAX_PACKET_LEN; t->f_recv = netsnmp_tcpbase_recv; t->f_send = netsnmp_tcpbase_send; t->f_close = netsnmp_socketbase_close; t->f_accept = netsnmp_tcp_accept; t->f_fmtaddr = netsnmp_tcp_fmtaddr; + t->f_get_taddr = netsnmp_ipv4_get_taddr; return t; + +err: + netsnmp_socketbase_close(t); + netsnmp_transport_free(t); + return NULL; } @@ -307,10 +313,10 @@ netsnmp_transport * netsnmp_tcp_create_tstring(const char *str, int local, const char *default_target) { - struct sockaddr_in addr; + struct netsnmp_ep ep; - if (netsnmp_sockaddr_in2(&addr, str, default_target)) { - return netsnmp_tcp_transport(&addr, local); + if (netsnmp_sockaddr_in3(&ep, str, default_target)) { + return netsnmp_tcp_transport(&ep, local); } else { return NULL; } @@ -319,17 +325,13 @@ netsnmp_tcp_create_tstring(const char *str, int local, netsnmp_transport * -netsnmp_tcp_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_tcp_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_in addr; - - if (o_len == 6) { - unsigned short porttmp = (o[4] << 8) + o[5]; - addr.sin_family = AF_INET; - memcpy((u_char *) & (addr.sin_addr.s_addr), o, 4); - addr.sin_port = htons(porttmp); - return netsnmp_tcp_transport(&addr, local); - } + struct netsnmp_ep ep; + + memset(&ep, 0, sizeof(ep)); + if (netsnmp_ipv4_ostring_to_sockaddr(&ep.a.sin, o, o_len)) + return netsnmp_tcp_transport(&ep, local); return NULL; } @@ -343,7 +345,6 @@ netsnmp_tcp_ctor(void) tcpDomain.prefix = (const char **)calloc(2, sizeof(char *)); tcpDomain.prefix[0] = "tcp"; - tcpDomain.f_create_from_tstring = NULL; tcpDomain.f_create_from_tstring_new = netsnmp_tcp_create_tstring; tcpDomain.f_create_from_ostring = netsnmp_tcp_create_ostring; diff --git a/snmplib/transports/snmpTCPIPv6Domain.c b/snmplib/transports/snmpTCPIPv6Domain.c index d2e0a2d..6d6fa1f 100644 --- a/snmplib/transports/snmpTCPIPv6Domain.c +++ b/snmplib/transports/snmpTCPIPv6Domain.c @@ -3,43 +3,40 @@ #ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN #include +#include "snmpIPBaseDomain.h" #include #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -49,6 +46,10 @@ #include #include +#ifndef NETSNMP_NO_SYSTEMD +#include +#endif + #include "inet_ntop.h" oid netsnmp_TCPIPv6Domain[] = { TRANSPORT_DOMAIN_TCP_IPV6 }; @@ -60,7 +61,7 @@ static netsnmp_tdomain tcp6Domain; */ static char * -netsnmp_tcp6_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_tcp6_fmtaddr(netsnmp_transport *t, const void *data, int len) { return netsnmp_ipv6_fmtaddr("TCP/IPv6", t, data, len); } @@ -83,7 +84,7 @@ netsnmp_tcp6_accept(netsnmp_transport *t) } if (t != NULL && t->sock >= 0) { - newsock = accept(t->sock, (struct sockaddr *) farend, &farendlen); + newsock = (int) accept(t->sock, (struct sockaddr *) farend, &farendlen); if (newsock < 0) { DEBUGMSGTL(("netsnmp_tcp6","accept failed rc %d errno %d \"%s\"\n", @@ -136,10 +137,12 @@ netsnmp_tcp6_accept(netsnmp_transport *t) */ netsnmp_transport * -netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) +netsnmp_tcp6_transport(const struct netsnmp_ep *ep, int local) { + const struct sockaddr_in6 *addr = &ep->a.sin6; netsnmp_transport *t = NULL; int rc = 0; + int socket_initialized = 0; #ifdef NETSNMP_NO_LISTEN_SUPPORT if (local) @@ -156,29 +159,38 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) } DEBUGIF("netsnmp_tcp6") { - char *str = netsnmp_tcp6_fmtaddr(NULL, (void *)addr, - sizeof(struct sockaddr_in6)); + char *str = netsnmp_tcp6_fmtaddr(NULL, addr, + sizeof(struct sockaddr_in6)); DEBUGMSGTL(("netsnmp_tcp6", "open %s %s\n", local ? "local" : "remote", str)); free(str); } + t->sock = -1; t->data = malloc(sizeof(netsnmp_indexed_addr_pair)); - if (t->data == NULL) { - netsnmp_transport_free(t); - return NULL; - } + if (t->data == NULL) + goto err; t->data_length = sizeof(netsnmp_indexed_addr_pair); memcpy(t->data, addr, sizeof(struct sockaddr_in6)); t->domain = netsnmp_TCPIPv6Domain; t->domain_length = sizeof(netsnmp_TCPIPv6Domain) / sizeof(oid); - t->sock = socket(PF_INET6, SOCK_STREAM, 0); - if (t->sock < 0) { - netsnmp_transport_free(t); - return NULL; +#ifndef NETSNMP_NO_SYSTEMD + /* + * Maybe the socket was already provided by systemd... + */ + if (local) { + t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_STREAM, 1, + ntohs(addr->sin6_port)); + if (t->sock >= 0) + socket_initialized = 1; } +#endif + if (!socket_initialized) + t->sock = (int) socket(PF_INET6, SOCK_STREAM, 0); + if (t->sock < 0) + goto err; t->flags = NETSNMP_TRANSPORT_FLAG_STREAM; @@ -203,16 +215,10 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) #endif t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN; - t->local = (unsigned char*)malloc(18); - if (t->local == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->local, addr->sin6_addr.s6_addr, 16); - t->local[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8; - t->local[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0; - t->local_length = 18; + t->local_length = sizeof(*addr); + t->local = netsnmp_memdup(addr, sizeof(*addr)); + if (!t->local) + goto err; /* * We should set SO_REUSEADDR too. @@ -220,12 +226,16 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt)); - rc = bind(t->sock, (struct sockaddr *) addr, - sizeof(struct sockaddr_in6)); - if (rc != 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; + if (!socket_initialized) { + rc = netsnmp_bindtodevice(t->sock, ep->iface); + if (rc != 0) { + DEBUGMSGTL(("netsnmp_tcp6", "failed to bind to iface %s: %s\n", + ep->iface, strerror(errno))); + goto err; + } + rc = bind(t->sock, (const struct sockaddr *)addr, sizeof(*addr)); + if (rc != 0) + goto err; } /* @@ -242,11 +252,10 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) * Now sit here and wait for connections to arrive. */ - rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN); - if (rc != 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; + if (!socket_initialized) { + rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN); + if (rc != 0) + goto err; } /* @@ -256,16 +265,10 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) return NULL; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ } else { - t->remote = (unsigned char*)malloc(18); - if (t->remote == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->remote, addr->sin6_addr.s6_addr, 16); - t->remote[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8; - t->remote[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0; - t->remote_length = 18; + t->remote_length = sizeof(*addr); + t->remote = netsnmp_memdup(addr, sizeof(*addr)); + if (!t->remote) + goto err; /* * This is a client-type session, so attempt to connect to the far @@ -274,16 +277,10 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) * had completed. So this can block. */ - rc = connect(t->sock, (struct sockaddr *) addr, - sizeof(struct sockaddr_in6)); - + rc = connect(t->sock, (const struct sockaddr *)addr, sizeof(*addr)); DEBUGMSGTL(("netsnmp_tcp6", "connect returns %d\n", rc)); - - if (rc < 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } + if (rc < 0) + goto err; /* * Allow user to override the send and receive buffers. Default is @@ -299,30 +296,30 @@ netsnmp_tcp6_transport(struct sockaddr_in6 *addr, int local) * is equal to the maximum legal size of an SNMP message). */ - t->msgMaxSize = 0x7fffffff; + t->msgMaxSize = SNMP_MAX_PACKET_LEN; t->f_recv = netsnmp_tcpbase_recv; t->f_send = netsnmp_tcpbase_send; t->f_close = netsnmp_socketbase_close; t->f_accept = netsnmp_tcp6_accept; t->f_fmtaddr = netsnmp_tcp6_fmtaddr; + t->f_get_taddr = netsnmp_ipv6_get_taddr; return t; -} -/* - * Not extern but still defined in snmpUDPIPv6Domain.c - */ -extern int -netsnmp_sockaddr_in6_2(struct sockaddr_in6*, const char*, const char*); +err: + netsnmp_socketbase_close(t); + netsnmp_transport_free(t); + return NULL; +} netsnmp_transport * netsnmp_tcp6_create_tstring(const char *str, int local, const char *default_target) { - struct sockaddr_in6 addr; + struct netsnmp_ep ep; - if (netsnmp_sockaddr_in6_2(&addr, str, default_target)) { - return netsnmp_tcp6_transport(&addr, local); + if (netsnmp_sockaddr_in6_3(&ep, str, default_target)) { + return netsnmp_tcp6_transport(&ep, local); } else { return NULL; } @@ -339,17 +336,13 @@ netsnmp_tcp6_create_tstring(const char *str, int local, */ netsnmp_transport * -netsnmp_tcp6_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_tcp6_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_in6 addr; - - if (o_len == 18) { - memset((u_char *) & addr, 0, sizeof(struct sockaddr_in6)); - addr.sin6_family = AF_INET6; - memcpy((u_char *) & (addr.sin6_addr.s6_addr), o, 16); - addr.sin6_port = htons((o[16] << 8) + o[17]); - return netsnmp_tcp6_transport(&addr, local); - } + struct netsnmp_ep ep; + + memset(&ep, 0, sizeof(ep)); + if (netsnmp_ipv6_ostring_to_sockaddr(&ep.a.sin6, o, o_len)) + return netsnmp_tcp6_transport(&ep, local); return NULL; } @@ -359,7 +352,6 @@ netsnmp_tcpipv6_ctor(void) { tcp6Domain.name = netsnmp_TCPIPv6Domain; tcp6Domain.name_length = sizeof(netsnmp_TCPIPv6Domain) / sizeof(oid); - tcp6Domain.f_create_from_tstring = NULL; tcp6Domain.f_create_from_tstring_new = netsnmp_tcp6_create_tstring; tcp6Domain.f_create_from_ostring = netsnmp_tcp6_create_ostring; tcp6Domain.prefix = (const char**)calloc(4, sizeof(char *)); diff --git a/snmplib/transports/snmpTLSBaseDomain.c b/snmplib/transports/snmpTLSBaseDomain.c index c54d6ad..ff2e551 100644 --- a/snmplib/transports/snmpTLSBaseDomain.c +++ b/snmplib/transports/snmpTLSBaseDomain.c @@ -1,33 +1,29 @@ #include - #include +#include -netsnmp_feature_require(cert_util) - -#include +netsnmp_feature_require(cert_util); -#if HAVE_DMALLOC_H -#include -#endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif #include #include +#include "../memcheck.h" /* OpenSSL Includes */ #include @@ -37,8 +33,8 @@ netsnmp_feature_require(cert_util) #include #include -#include #include +#include #include #include #include @@ -52,12 +48,24 @@ netsnmp_feature_require(cert_util) #include #include #include +#include #define LOGANDDIE(msg) do { snmp_log(LOG_ERR, "%s\n", msg); return 0; } while(0) int openssl_local_index; -/* this is called during negotiationn */ +#ifndef HAVE_ERR_GET_ERROR_ALL +/* A backport of the OpenSSL 1.1.1e ERR_get_error_all() function. */ +static unsigned long ERR_get_error_all(const char **file, int *line, + const char **func, + const char **data, int *flags) +{ + *func = "(?)"; + return ERR_get_error_line_data(file, line, data, flags); +} +#endif + +/* this is called during negotiation */ int verify_callback(int ok, X509_STORE_CTX *ctx) { int err, depth; char buf[1024], *fingerprint; @@ -90,7 +98,6 @@ int verify_callback(int ok, X509_STORE_CTX *ctx) { locally known fingerprint and then accept it */ if (!ok && (X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT == err || - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY == err || X509_V_ERR_CERT_UNTRUSTED == err || X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE == err || X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN == err)) { @@ -116,6 +123,11 @@ int verify_callback(int ok, X509_STORE_CTX *ctx) { return 0; } +#if 0 + /* + * This code is unreachable because of the return statements above. + * Comment it out to avoid that Coverity complains about this code. + */ if (0 == depth && verify_info && (verify_info->flags & VRFY_PARENT_WAS_OK)) { DEBUGMSGTL(("tls_x509:verify", "verify_callback called with: ok=%d ctx=%p depth=%d err=%i:%s\n", ok, ctx, depth, err, X509_verify_cert_error_string(err))); @@ -123,6 +135,7 @@ int verify_callback(int ok, X509_STORE_CTX *ctx) { SNMP_FREE(fingerprint); return 1; /* we'll check the hostname later at this level */ } +#endif } if (0 == ok) @@ -209,8 +222,9 @@ netsnmp_tlsbase_verify_server_cert(SSL *ssl, _netsnmpTLSBaseData *tlsdata) { netsnmp_assert_or_return(ssl != NULL, SNMPERR_GENERR); netsnmp_assert_or_return(tlsdata != NULL, SNMPERR_GENERR); - - if (NULL == (remote_cert = SSL_get_peer_certificate(ssl))) { + + remote_cert = SSL_get_peer_certificate(ssl); + if (!remote_cert) { /* no peer cert */ DEBUGMSGTL(("tls_x509:verify", "remote connection provided no certificate (yet)\n")); @@ -263,11 +277,9 @@ netsnmp_tlsbase_verify_server_cert(SSL *ssl, _netsnmpTLSBaseData *tlsdata) { oname->d.ia5); /* convert to lowercase for comparisons */ - for (j = 0 ; - *check_name && j < sizeof(buf)-1; - ++check_name, ++j ) { - if (isascii(*check_name)) - buf[j] = tolower(0xFF & *check_name); + for (j = 0; *check_name && j < sizeof(buf)-1; + ++check_name, ++j) { + buf[j] = tolower(0xFF & *check_name); } if (j < sizeof(buf)) buf[j] = '\0'; @@ -296,10 +308,13 @@ netsnmp_tlsbase_verify_server_cert(SSL *ssl, _netsnmpTLSBaseData *tlsdata) { if (is_wildcarded) { /* we *only* allow passing till the first '.' */ /* ie *.example.com can't match a.b.example.com */ - check_name = strchr(check_name, '.') + 1; + if (check_name) + check_name = strchr(check_name, '.'); + if (check_name) + check_name++; } - if (strcmp(compare_to, check_name) == 0) { + if (check_name && strcmp(compare_to, check_name) == 0) { DEBUGMSGTL(("tls_x509:verify", "Successful match on a common name of %s\n", check_name)); return SNMPERR_SUCCESS; } @@ -339,7 +354,8 @@ netsnmp_tlsbase_verify_client_cert(SSL *ssl, _netsnmpTLSBaseData *tlsdata) { above. + fingerprint verification happens below. */ - if (NULL == (remote_cert = SSL_get_peer_certificate(ssl))) { + remote_cert = SSL_get_peer_certificate(ssl); + if (!remote_cert) { /* no peer cert */ DEBUGMSGTL(("tls_x509:verify", "remote connection provided no certificate (yet)\n")); @@ -434,7 +450,7 @@ _trust_this_cert(SSL_CTX *the_ctx, char *certspec) { LOGANDDIE("failed to find requested certificate to trust"); /* Add the certificate to the context */ - if (netsnmp_cert_trust_ca(the_ctx, trustcert) != SNMPERR_SUCCESS) + if (netsnmp_cert_trust(the_ctx, trustcert) != SNMPERR_SUCCESS) LOGANDDIE("failed to load trust certificate"); return 1; @@ -474,7 +490,7 @@ _sslctx_common_setup(SSL_CTX *the_ctx, _netsnmpTLSBaseData *tlsbase) { NETSNMP_DS_LIB_X509_CRL_FILE); if (NULL != crlFile) { cert_store = SSL_CTX_get_cert_store(the_ctx); - DEBUGMSGTL(("sslctx_client", "loading CRL: %s\n", crlFile)); + DEBUGMSGTL(("sslctx_common", "loading CRL: %s\n", crlFile)); if (!cert_store) LOGANDDIE("failed to find certificate store"); if (!(lookup = X509_STORE_add_lookup(cert_store, X509_LOOKUP_file()))) @@ -501,6 +517,7 @@ SSL_CTX * sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { netsnmp_cert *id_cert, *peer_cert; SSL_CTX *the_ctx; + X509 *ocert; /*********************************************************************** * Set up the client context @@ -510,6 +527,7 @@ sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { snmp_log(LOG_ERR, "ack: %p\n", the_ctx); LOGANDDIE("can't create a new context"); } + MAKE_MEM_DEFINED(the_ctx, 256/*sizeof(*the_ctx)*/); SSL_CTX_set_read_ahead (the_ctx, 1); /* Required for DTLS */ SSL_CTX_set_verify(the_ctx, @@ -539,13 +557,24 @@ sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { id_cert->key->info.filename)); if (SSL_CTX_use_certificate(the_ctx, id_cert->ocert) <= 0) - LOGANDDIE("failed to set the certificate to use"); + LOGANDDIE("failed to set the client certificate to use"); if (SSL_CTX_use_PrivateKey(the_ctx, id_cert->key->okey) <= 0) - LOGANDDIE("failed to set the private key to use"); + LOGANDDIE("failed to set the client private key to use"); if (!SSL_CTX_check_private_key(the_ctx)) - LOGANDDIE("public and private keys incompatible"); + LOGANDDIE("client public and private keys incompatible"); + + while (id_cert->issuer_cert) { + id_cert = id_cert->issuer_cert; + if (id_cert->ocert) + { + ocert = X509_dup(id_cert->ocert); + DEBUGMSGTL(("sslctx_client", "adding cert-chain certificate %p", ocert)); + if (!ocert || !SSL_CTX_add_extra_chain_cert(the_ctx, ocert)) + LOGANDDIE("failed to add intermediate client certificate"); + } + } if (tlsbase->their_identity) peer_cert = netsnmp_cert_find(NS_CERT_REMOTE_PEER, @@ -559,11 +588,11 @@ sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { peer_cert ? peer_cert->info.filename : "none")); /* Trust the expected certificate */ - if (netsnmp_cert_trust_ca(the_ctx, peer_cert) != SNMPERR_SUCCESS) + if (netsnmp_cert_trust(the_ctx, peer_cert) != SNMPERR_SUCCESS) LOGANDDIE ("failed to set verify paths"); } - /* trust a certificate (possibly a CA) aspecifically passed in */ + /* trust a certificate (possibly a CA) specifically passed in */ if (tlsbase->trust_cert) { if (!_trust_this_cert(the_ctx, tlsbase->trust_cert)) return 0; @@ -575,6 +604,7 @@ sslctx_client_setup(const SSL_METHOD *method, _netsnmpTLSBaseData *tlsbase) { SSL_CTX * sslctx_server_setup(const SSL_METHOD *method) { netsnmp_cert *id_cert; + X509 *ocert; /*********************************************************************** * Set up the server context @@ -582,15 +612,16 @@ sslctx_server_setup(const SSL_METHOD *method) { /* setting up for ssl */ SSL_CTX *the_ctx = SSL_CTX_new(NETSNMP_REMOVE_CONST(SSL_METHOD *, method)); if (!the_ctx) { - LOGANDDIE("can't create a new context"); + LOGANDDIE("can't create a new server context"); } + MAKE_MEM_DEFINED(the_ctx, 256/*sizeof(*the_ctx)*/); id_cert = netsnmp_cert_find(NS_CERT_IDENTITY, NS_CERTKEY_DEFAULT, NULL); if (!id_cert) LOGANDDIE ("error finding server identity keys"); if (!id_cert->key || !id_cert->key->okey) - LOGANDDIE("failed to load private key"); + LOGANDDIE("failed to load server private key"); DEBUGMSGTL(("sslctx_server", "using public key: %s\n", id_cert->info.filename)); @@ -598,13 +629,24 @@ sslctx_server_setup(const SSL_METHOD *method) { id_cert->key->info.filename)); if (SSL_CTX_use_certificate(the_ctx, id_cert->ocert) <= 0) - LOGANDDIE("failed to set the certificate to use"); + LOGANDDIE("failed to set the server certificate to use"); if (SSL_CTX_use_PrivateKey(the_ctx, id_cert->key->okey) <= 0) - LOGANDDIE("failed to set the private key to use"); + LOGANDDIE("failed to set the server private key to use"); if (!SSL_CTX_check_private_key(the_ctx)) - LOGANDDIE("public and private keys incompatible"); + LOGANDDIE("server public and private keys incompatible"); + + while (id_cert->issuer_cert) { + id_cert = id_cert->issuer_cert; + if (id_cert->ocert) + { + ocert = X509_dup(id_cert->ocert); + DEBUGMSGTL(("sslctx_server", "adding cert-chain certificate %p", ocert)); + if (!ocert || !SSL_CTX_add_extra_chain_cert(the_ctx, ocert)) + LOGANDDIE("failed to add intermediate server certificate"); + } + } SSL_CTX_set_read_ahead(the_ctx, 1); /* XXX: DTLS only? */ @@ -710,7 +752,7 @@ tls_bootstrap(int majorid, int minorid, void *serverarg, void *clientarg) { } int -tls_get_verify_info_index() { +tls_get_verify_info_index(void) { return openssl_local_index; } @@ -934,7 +976,7 @@ int netsnmp_tlsbase_wrapup_recv(netsnmp_tmStateReference *tmStateRef, return SNMPERR_SUCCESS; } -netsnmp_feature_child_of(_x509_get_error, netsnmp_unused) +netsnmp_feature_child_of(_x509_get_error, netsnmp_unused); #ifndef NETSNMP_FEATURE_REMOVE__X509_GET_ERROR const char * _x509_get_error(int x509failvalue, const char *location) { static const char *reason = NULL; @@ -1094,7 +1136,7 @@ const char * _x509_get_error(int x509failvalue, const char *location) { #endif /* NETSNMP_FEATURE_REMOVE__X509_GET_ERROR */ void _openssl_log_error(int rc, SSL *con, const char *location) { - const char *reason, *file, *data; + const char *reason, *file, *func, *data; unsigned long numerical_reason; int flags, line; @@ -1160,24 +1202,17 @@ void _openssl_log_error(int rc, SSL *con, const char *location) { /* other errors */ while ((numerical_reason = - ERR_get_error_line_data(&file, &line, &data, &flags)) != 0) { - snmp_log(LOG_ERR, " error: #%lu (file %s, line %d)\n", - numerical_reason, file, line); + ERR_get_error_all(&file, &line, &func, &data, &flags)) != 0) { + snmp_log(LOG_ERR, "%s (file %s, func %s, line %d)\n", + ERR_error_string(numerical_reason, NULL), file, func, line); /* if we have a text translation: */ if (data && (flags & ERR_TXT_STRING)) { snmp_log(LOG_ERR, " Textual Error: %s\n", data); - /* - * per openssl man page: If it has been allocated by - * OPENSSL_malloc(), *flags&ERR_TXT_MALLOCED is true. - * - * arggh... stupid openssl prototype for ERR_get_error_line_data - * wants a const char **, but returns something that we might - * need to free?? - */ - if (flags & ERR_TXT_MALLOCED) - OPENSSL_free(NETSNMP_REMOVE_CONST(void *, data)); } + } } - + /* clear openssl error ring buffer */ + ERR_clear_error(); + snmp_log(LOG_ERR, "---- End of OpenSSL Errors ----\n"); } diff --git a/snmplib/transports/snmpTLSTCPDomain.c b/snmplib/transports/snmpTLSTCPDomain.c index 473d02c..abb0902 100644 --- a/snmplib/transports/snmpTLSTCPDomain.c +++ b/snmplib/transports/snmpTLSTCPDomain.c @@ -11,49 +11,45 @@ #include -netsnmp_feature_require(cert_util) - -#include +netsnmp_feature_require(cert_util); #include #include #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_UIO_H +#ifdef HAVE_SYS_UIO_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif +#include "../memcheck.h" #include #include @@ -62,6 +58,7 @@ netsnmp_feature_require(cert_util) #include #include #include +#include #include #include #include @@ -90,20 +87,49 @@ static netsnmp_tdomain tlstcpDomain; */ static char * -netsnmp_tlstcp_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_tlstcp_fmtaddr(netsnmp_transport *t, const void *data, int len) { - if (NULL == data || 0 == len || 0 == ((char *) data)[0]) - return strdup("TLSTCP: unknown"); - else if (len == sizeof(netsnmp_indexed_addr_pair) || - len == sizeof(struct sockaddr_in)) + if (t && !data) { + data = t->data; + len = t->data_length; + } + + switch (data ? len : 0) { + case sizeof(netsnmp_indexed_addr_pair): return netsnmp_ipv4_fmtaddr("TLSTCP", t, data, len); - else { - /* an already ascii formatted string */ - char buf[1024]; - snprintf(buf, sizeof(buf)-1, "TLSTCP: %s", (char *) data); - return strdup(buf); + case sizeof(netsnmp_tmStateReference): { + const netsnmp_tmStateReference *r = data; + const netsnmp_indexed_addr_pair *p = &r->addresses; + + return netsnmp_ipv4_fmtaddr("TLSTCP", t, p, sizeof(*p)); } + case sizeof(_netsnmpTLSBaseData): { + const _netsnmpTLSBaseData *b = data; + char *buf; + + if (asprintf(&buf, "TLSTCP: %s", b->addr_string) < 0) + buf = NULL; + return buf; + } + case 0: + return strdup("TLSTCP: unknown"); + default: { + char *buf; + + if (asprintf(&buf, "TLSTCP: len %d", len) < 0) + buf = NULL; + return buf; + } + } +} + +static void netsnmp_tlstcp_get_taddr(struct netsnmp_transport_s *t, + void **addr, size_t *addr_len) +{ + *addr_len = t->remote_length; + *addr = netsnmp_memdup(t->remote, *addr_len); } + /* * You can write something into opaque that will subsequently get passed back * to your send function if you like. For instance, you might want to @@ -111,7 +137,7 @@ netsnmp_tlstcp_fmtaddr(netsnmp_transport *t, void *data, int len) */ static int -netsnmp_tlstcp_copy(netsnmp_transport *oldt, netsnmp_transport *newt) +netsnmp_tlstcp_copy(const netsnmp_transport *oldt, netsnmp_transport *newt) { _netsnmpTLSBaseData *oldtlsdata = (_netsnmpTLSBaseData *) oldt->data; _netsnmpTLSBaseData *newtlsdata = (_netsnmpTLSBaseData *) newt->data; @@ -153,7 +179,9 @@ netsnmp_tlstcp_recv(netsnmp_transport *t, void *buf, int size, "tlstcp received an invalid invocation with missing data\n"); DEBUGMSGTL(("tlstcp", "recvfrom fd %d err %d (\"%s\")\n", (t ? t->sock : -1), errno, strerror(errno))); - DEBUGMSGTL(("tlstcp", " tdata = %p\n", t->data)); + if (t) + DEBUGMSGTL(("tlstcp", " tdata = %p", t->data)); + DEBUGMSGTL(("tlstcp", "\n")); return -1; } @@ -250,6 +278,9 @@ netsnmp_tlstcp_recv(netsnmp_transport *t, void *buf, int size, /* read the packet from openssl */ do { rc = SSL_read(tlsdata->ssl, buf, size); + MAKE_MEM_DEFINED(&rc, sizeof(rc)); + if (rc > 0) + MAKE_MEM_DEFINED(buf, rc); if (rc == 0) { /* XXX closed connection */ DEBUGMSGTL(("tlstcp", "remote side closed connection\n")); @@ -298,11 +329,11 @@ netsnmp_tlstcp_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_tlstcp_send(netsnmp_transport *t, void *buf, int size, - void **opaque, int *olength) +netsnmp_tlstcp_send(netsnmp_transport *t, const void *buf, int size, + void **opaque, int *olength) { int rc = -1; - netsnmp_tmStateReference *tmStateRef = NULL; + const netsnmp_tmStateReference *tmStateRef = NULL; _netsnmpTLSBaseData *tlsdata; DEBUGTRACETOK("tlstcp"); @@ -318,7 +349,7 @@ netsnmp_tlstcp_send(netsnmp_transport *t, void *buf, int size, /* Implementation Notes: the tmStateReference is stored in the opaque ptr */ if (opaque != NULL && *opaque != NULL && *olength == sizeof(netsnmp_tmStateReference)) { - tmStateRef = (netsnmp_tmStateReference *) *opaque; + tmStateRef = (const netsnmp_tmStateReference *) *opaque; } else { snmp_log(LOG_ERR, "TLSTCP was called with an invalid state; possibly the wrong security model is in use. It should be 'tsm'.\n"); snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONINVALIDCACHES); @@ -507,7 +538,7 @@ netsnmp_tlstcp_accept(netsnmp_transport *t) tlsdata->accepted_bio = accepted_bio = BIO_pop(tlsdata->accept_bio); if (!accepted_bio) { - snmp_log(LOG_ERR, "Failed to pop an accepted bio off the bio staack\n"); + snmp_log(LOG_ERR, "Failed to pop an accepted bio off the bio stack\n"); /* XXX: need to close the listening connection here? */ return -1; } @@ -596,7 +627,7 @@ netsnmp_tlstcp_accept(netsnmp_transport *t) if ((rc = netsnmp_tlsbase_verify_client_cert(ssl, tlsdata)) != SNMPERR_SUCCESS) { /* XXX: free needed memory */ - snmp_log(LOG_ERR, "TLSTCP: Falied checking client certificate\n"); + snmp_log(LOG_ERR, "TLSTCP: Failed checking client certificate\n"); snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONINVALIDCLIENTCERTIFICATES); SSL_shutdown(tlsdata->ssl); SSL_free(tlsdata->ssl); @@ -630,271 +661,294 @@ netsnmp_tlstcp_accept(netsnmp_transport *t) return BIO_get_fd(tlsdata->accepted_bio, NULL); } - -netsnmp_transport * -netsnmp_tlstcp_open(netsnmp_transport *t) +static netsnmp_transport * +netsnmp_tlstcp_open_client(netsnmp_transport *t) { - _netsnmpTLSBaseData *tlsdata; + _netsnmpTLSBaseData *tlsdata = t->data; BIO *bio; SSL_CTX *ctx; SSL *ssl; int rc = 0; _netsnmp_verify_info *verify_info; - netsnmp_assert_or_return(t != NULL, NULL); - netsnmp_assert_or_return(t->data != NULL, NULL); - netsnmp_assert_or_return(sizeof(_netsnmpTLSBaseData) == t->data_length, - NULL); + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + * 1) The snmpTlstmSessionOpens counter is incremented. + */ + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENS); + + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 2) The client selects the appropriate certificate and cipher_suites + for the key agreement based on the tmSecurityName and the + tmRequestedSecurityLevel for the session. For sessions being + established as a result of a SNMP-TARGET-MIB based operation, the + certificate will potentially have been identified via the + snmpTlstmParamsTable mapping and the cipher_suites will have to + be taken from system-wide or implementation-specific + configuration. If no row in the snmpTlstmParamsTable exists then + implementations MAY choose to establish the connection using a + default client certificate available to the application. + Otherwise, the certificate and appropriate cipher_suites will + need to be passed to the openSession() ASI as supplemental + information or configured through an implementation-dependent + mechanism. It is also implementation-dependent and possibly + policy-dependent how tmRequestedSecurityLevel will be used to + influence the security capabilities provided by the (D)TLS + connection. However this is done, the security capabilities + provided by (D)TLS MUST be at least as high as the level of + security indicated by the tmRequestedSecurityLevel parameter. + The actual security level of the session is reported in the + tmStateReference cache as tmSecurityLevel. For (D)TLS to provide + strong authentication, each principal acting as a command + generator SHOULD have its own certificate. + */ + /* + Implementation notes: we do most of this in the + sslctx_client_setup The transport should have been + f_config()ed with the proper fingerprints to use (which is + stored in tlsdata), or we'll use the default identity + fingerprint if that can be found. + */ - tlsdata = t->data; - - if (tlsdata->flags & NETSNMP_TLSBASE_IS_CLIENT) { - /* Is the client */ - - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - * 1) The snmpTlstmSessionOpens counter is incremented. - */ - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENS); - - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 2) The client selects the appropriate certificate and cipher_suites - for the key agreement based on the tmSecurityName and the - tmRequestedSecurityLevel for the session. For sessions being - established as a result of a SNMP-TARGET-MIB based operation, the - certificate will potentially have been identified via the - snmpTlstmParamsTable mapping and the cipher_suites will have to - be taken from system-wide or implementation-specific - configuration. If no row in the snmpTlstmParamsTable exists then - implementations MAY choose to establish the connection using a - default client certificate available to the application. - Otherwise, the certificate and appropriate cipher_suites will - need to be passed to the openSession() ASI as supplemental - information or configured through an implementation-dependent - mechanism. It is also implementation-dependent and possibly - policy-dependent how tmRequestedSecurityLevel will be used to - influence the security capabilities provided by the (D)TLS - connection. However this is done, the security capabilities - provided by (D)TLS MUST be at least as high as the level of - security indicated by the tmRequestedSecurityLevel parameter. - The actual security level of the session is reported in the - tmStateReference cache as tmSecurityLevel. For (D)TLS to provide - strong authentication, each principal acting as a command - generator SHOULD have its own certificate. - */ - /* - Implementation notes: we do most of this in the - sslctx_client_setup The transport should have been - f_config()ed with the proper fingerprints to use (which is - stored in tlsdata), or we'll use the default identity - fingerprint if that can be found. - */ - - /* XXX: check securityLevel and ensure no NULL fingerprints are used */ - - /* set up the needed SSL context */ - tlsdata->ssl_context = ctx = - sslctx_client_setup(TLSv1_method(), tlsdata); - if (!ctx) { - snmp_log(LOG_ERR, "failed to create TLS context\n"); - return NULL; - } + /* XXX: check securityLevel and ensure no NULL fingerprints are used */ - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 3) Using the destTransportDomain and destTransportAddress values, - the client will initiate the (D)TLS handshake protocol to - establish session keys for message integrity and encryption. - */ - /* Implementation note: - The transport domain and address are pre-processed by this point - */ - - /* Create a BIO connection for it */ - DEBUGMSGTL(("tlstcp", "connecting to tlstcp %s\n", - tlsdata->addr_string)); - t->remote = (void *) strdup(tlsdata->addr_string); - t->remote_length = strlen(tlsdata->addr_string) + 1; - - bio = BIO_new_connect(tlsdata->addr_string); - - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 3) continued: - If the attempt to establish a session is unsuccessful, then - snmpTlstmSessionOpenErrors is incremented, an error indication is - returned, and processing stops. - */ - - if (NULL == bio) { - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); - snmp_log(LOG_ERR, "tlstcp: failed to create bio\n"); - _openssl_log_error(rc, NULL, "BIO creation"); - return NULL; - } - - - /* Tell the BIO to actually do the connection */ - if ((rc = BIO_do_connect(bio)) <= 0) { - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); - snmp_log(LOG_ERR, "tlstcp: failed to connect to %s\n", - tlsdata->addr_string); - _openssl_log_error(rc, NULL, "BIO_do_connect"); - BIO_free(bio); - return NULL; - } + /* set up the needed SSL context */ + tlsdata->ssl_context = ctx = sslctx_client_setup(TLS_method(), tlsdata); + if (!ctx) { + snmp_log(LOG_ERR, "failed to create TLS context\n"); + return NULL; + } - /* Create the SSL layer on top of the socket bio */ - ssl = tlsdata->ssl = SSL_new(ctx); - if (NULL == ssl) { - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); - snmp_log(LOG_ERR, "tlstcp: failed to create a SSL connection\n"); - BIO_free(bio); - return NULL; - } - - /* Bind the SSL layer to the BIO */ - SSL_set_bio(ssl, bio, bio); - SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); - - verify_info = SNMP_MALLOC_TYPEDEF(_netsnmp_verify_info); - if (NULL == verify_info) { - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); - snmp_log(LOG_ERR, "tlstcp: failed to create a SSL connection\n"); - SSL_shutdown(ssl); - BIO_free(bio); - return NULL; - } +#ifdef SSL_CTX_set_max_proto_version + SSL_CTX_set_max_proto_version(tlsdata->ssl_context, TLS1_VERSION); +#endif - SSL_set_ex_data(ssl, tls_get_verify_info_index(), verify_info); + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 3) Using the destTransportDomain and destTransportAddress values, + the client will initiate the (D)TLS handshake protocol to + establish session keys for message integrity and encryption. + */ + /* Implementation note: + The transport domain and address are pre-processed by this point + */ - /* Then have SSL do it's connection over the BIO */ - if ((rc = SSL_connect(ssl)) <= 0) { - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); - snmp_log(LOG_ERR, "tlstcp: failed to ssl_connect\n"); - BIO_free(bio); - return NULL; - } + /* Create a BIO connection for it */ + DEBUGMSGTL(("tlstcp", "connecting to tlstcp %s\n", + tlsdata->addr_string)); + t->remote = strdup(tlsdata->addr_string); + t->remote_length = strlen(tlsdata->addr_string) + 1; - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 3) continued: - If the session failed to open because the presented - server certificate was unknown or invalid then the - snmpTlstmSessionUnknownServerCertificate or - snmpTlstmSessionInvalidServerCertificates MUST be - incremented and a snmpTlstmServerCertificateUnknown or - snmpTlstmServerInvalidCertificate notification SHOULD be - sent as appropriate. Reasons for server certificate - invalidation includes, but is not limited to, - cryptographic validation failures and an unexpected - presented certificate identity. - */ - - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 4) The (D)TLS client MUST then verify that the (D)TLS server's - presented certificate is the expected certificate. The (D)TLS - client MUST NOT transmit SNMP messages until the server - certificate has been authenticated, the client certificate has - been transmitted and the TLS connection has been fully - established. - - If the connection is being established from configuration based - on SNMP-TARGET-MIB configuration, then the snmpTlstmAddrTable - DESCRIPTION clause describes how the verification is done (using - either a certificate fingerprint, or an identity authenticated - via certification path validation). - - If the connection is being established for reasons other than - configuration found in the SNMP-TARGET-MIB then configuration and - procedures outside the scope of this document should be followed. - Configuration mechanisms SHOULD be similar in nature to those - defined in the snmpTlstmAddrTable to ensure consistency across - management configuration systems. For example, a command-line - tool for generating SNMP GETs might support specifying either the - server's certificate fingerprint or the expected host name as a - command line argument. - */ - - /* Implementation notes: - - All remote certificate fingerprints are expected to be - stored in the transport's config information. This is - true both for CLI clients and TARGET-MIB sessions. - - netsnmp_tlsbase_verify_server_cert implements these checks - */ - if (netsnmp_tlsbase_verify_server_cert(ssl, tlsdata) != SNMPERR_SUCCESS) { - /* XXX: unknown vs invalid; two counters */ - snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONUNKNOWNSERVERCERTIFICATE); - snmp_log(LOG_ERR, "tlstcp: failed to verify ssl certificate\n"); - SSL_shutdown(ssl); - BIO_free(bio); - return NULL; - } + bio = BIO_new_connect(tlsdata->addr_string); - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 5) (D)TLS provides assurance that the authenticated identity has - been signed by a trusted configured certification authority. If - verification of the server's certificate fails in any way (for - example because of failures in cryptographic verification or the - presented identity did not match the expected named entity) then - the session establishment MUST fail, the - snmpTlstmSessionInvalidServerCertificates object is incremented. - If the session can not be opened for any reason at all, including - cryptographic verification failures, then the - snmpTlstmSessionOpenErrors counter is incremented and processing - stops. - - */ - /* XXX: add snmpTlstmSessionInvalidServerCertificates on - crypto failure */ - - /* RFC5953 Section 5.3.1: Establishing a Session as a Client - 6) The TLSTM-specific session identifier (tlstmSessionID) is set in - the tmSessionID of the tmStateReference passed to the TLS - Transport Model to indicate that the session has been established - successfully and to point to a specific (D)TLS connection for - future use. The tlstmSessionID is also stored in the LCD for - later lookup during processing of incoming messages - (Section 5.1.2). - */ - /* Implementation notes: - - the tlsdata pointer is used as our session identifier, as - noted in the netsnmp_tlstcp_recv() function comments. - */ - - t->sock = BIO_get_fd(bio, NULL); + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 3) continued: + If the attempt to establish a session is unsuccessful, then + snmpTlstmSessionOpenErrors is incremented, an error indication is + returned, and processing stops. + */ + + if (NULL == bio) { + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); + snmp_log(LOG_ERR, "tlstcp: failed to create bio\n"); + _openssl_log_error(rc, NULL, "BIO creation"); + return NULL; + } + + /* Tell the BIO to actually do the connection */ + rc = BIO_do_connect(bio); + if (rc <= 0) { + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); + snmp_log(LOG_ERR, "tlstcp: failed to connect to %s\n", + tlsdata->addr_string); + _openssl_log_error(rc, NULL, "BIO_do_connect"); + BIO_free(bio); + return NULL; + } + + /* Create the SSL layer on top of the socket bio */ + ssl = tlsdata->ssl = SSL_new(ctx); + if (NULL == ssl) { + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); + snmp_log(LOG_ERR, "tlstcp: failed to create a SSL connection\n"); + BIO_free(bio); + return NULL; + } + + /* Bind the SSL layer to the BIO */ + SSL_set_bio(ssl, bio, bio); + SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + + verify_info = SNMP_MALLOC_TYPEDEF(_netsnmp_verify_info); + if (NULL == verify_info) { + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); + snmp_log(LOG_ERR, "tlstcp: failed to create a SSL connection\n"); + SSL_shutdown(ssl); + BIO_free(bio); + return NULL; + } + + SSL_set_ex_data(ssl, tls_get_verify_info_index(), verify_info); + + /* Then have SSL do it's connection over the BIO */ + rc = SSL_connect(ssl); + if (rc <= 0) { + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONOPENERRORS); + snmp_log(LOG_ERR, "tlstcp: failed to ssl_connect\n"); + BIO_free(bio); + return NULL; + } + + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 3) continued: + If the session failed to open because the presented + server certificate was unknown or invalid then the + snmpTlstmSessionUnknownServerCertificate or + snmpTlstmSessionInvalidServerCertificates MUST be + incremented and a snmpTlstmServerCertificateUnknown or + snmpTlstmServerInvalidCertificate notification SHOULD be + sent as appropriate. Reasons for server certificate + invalidation includes, but is not limited to, + cryptographic validation failures and an unexpected + presented certificate identity. + */ + + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 4) The (D)TLS client MUST then verify that the (D)TLS server's + presented certificate is the expected certificate. The (D)TLS + client MUST NOT transmit SNMP messages until the server + certificate has been authenticated, the client certificate has + been transmitted and the TLS connection has been fully + established. + + If the connection is being established from configuration based + on SNMP-TARGET-MIB configuration, then the snmpTlstmAddrTable + DESCRIPTION clause describes how the verification is done (using + either a certificate fingerprint, or an identity authenticated + via certification path validation). + + If the connection is being established for reasons other than + configuration found in the SNMP-TARGET-MIB then configuration and + procedures outside the scope of this document should be followed. + Configuration mechanisms SHOULD be similar in nature to those + defined in the snmpTlstmAddrTable to ensure consistency across + management configuration systems. For example, a command-line + tool for generating SNMP GETs might support specifying either the + server's certificate fingerprint or the expected host name as a + command line argument. + */ + + /* Implementation notes: + - All remote certificate fingerprints are expected to be + stored in the transport's config information. This is + true both for CLI clients and TARGET-MIB sessions. + - netsnmp_tlsbase_verify_server_cert implements these checks + */ + if (netsnmp_tlsbase_verify_server_cert(ssl, tlsdata) != SNMPERR_SUCCESS) { + /* XXX: unknown vs invalid; two counters */ + snmp_increment_statistic(STAT_TLSTM_SNMPTLSTMSESSIONUNKNOWNSERVERCERTIFICATE); + snmp_log(LOG_ERR, "tlstcp: failed to verify ssl certificate\n"); + SSL_shutdown(ssl); + BIO_free(bio); + return NULL; + } + + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 5) (D)TLS provides assurance that the authenticated identity has + been signed by a trusted configured certification authority. If + verification of the server's certificate fails in any way (for + example because of failures in cryptographic verification or the + presented identity did not match the expected named entity) then + the session establishment MUST fail, the + snmpTlstmSessionInvalidServerCertificates object is incremented. + If the session can not be opened for any reason at all, including + cryptographic verification failures, then the + snmpTlstmSessionOpenErrors counter is incremented and processing + stops. + + */ + /* XXX: add snmpTlstmSessionInvalidServerCertificates on + crypto failure */ + + /* RFC5953 Section 5.3.1: Establishing a Session as a Client + 6) The TLSTM-specific session identifier (tlstmSessionID) is set in + the tmSessionID of the tmStateReference passed to the TLS + Transport Model to indicate that the session has been established + successfully and to point to a specific (D)TLS connection for + future use. The tlstmSessionID is also stored in the LCD for + later lookup during processing of incoming messages + (Section 5.1.2). + */ + /* Implementation notes: + - the tlsdata pointer is used as our session identifier, as + noted in the netsnmp_tlstcp_recv() function comments. + */ + + t->sock = BIO_get_fd(bio, NULL); + + return t; +} + +static netsnmp_transport * +netsnmp_tlstcp_open_server(netsnmp_transport *t) +{ + _netsnmpTLSBaseData *tlsdata; + int rc; + + tlsdata = t->data; - } else { #ifndef NETSNMP_NO_LISTEN_SUPPORT - /* Is the server */ - - /* Create the socket bio */ - DEBUGMSGTL(("tlstcp", "listening on tlstcp port %s\n", - tlsdata->addr_string)); - tlsdata->accept_bio = BIO_new_accept(tlsdata->addr_string); - t->local = (void *) strdup(tlsdata->addr_string); - t->local_length = strlen(tlsdata->addr_string)+1; - if (NULL == tlsdata->accept_bio) { - snmp_log(LOG_ERR, "TLSTCP: Falied to create a accept BIO\n"); - return NULL; - } + /* Create the socket bio */ + DEBUGMSGTL(("tlstcp", "listening on tlstcp port %s\n", + tlsdata->addr_string)); + tlsdata->accept_bio = BIO_new_accept(tlsdata->addr_string); + t->local = strdup(tlsdata->addr_string); + t->local_length = strlen(tlsdata->addr_string) + 1; + if (NULL == tlsdata->accept_bio) { + snmp_log(LOG_ERR, "TLSTCP: Failed to create a accept BIO\n"); + return NULL; + } - /* openssl requires an initial accept to bind() the socket */ - if (BIO_do_accept(tlsdata->accept_bio) <= 0) { - _openssl_log_error(rc, tlsdata->ssl, "BIO_do__accept"); - snmp_log(LOG_ERR, "TLSTCP: Falied to do first accept on the TLS accept BIO\n"); - return NULL; - } + /* openssl requires an initial accept to bind() the socket */ + rc = BIO_do_accept(tlsdata->accept_bio); + if (rc <= 0) { + _openssl_log_error(rc, tlsdata->ssl, "BIO_do_accept"); + snmp_log(LOG_ERR, "TLSTCP: Failed to do first accept on the TLS accept BIO\n"); + return NULL; + } - /* create the OpenSSL TLS context */ - tlsdata->ssl_context = - sslctx_server_setup(TLSv1_method()); + /* create the OpenSSL TLS context */ + tlsdata->ssl_context = sslctx_server_setup(TLS_method()); +#ifdef SSL_CTX_set_max_proto_version + if (tlsdata->ssl_context) + SSL_CTX_set_max_proto_version(tlsdata->ssl_context, TLS1_VERSION); +#endif - t->sock = BIO_get_fd(tlsdata->accept_bio, NULL); - t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN; + t->sock = BIO_get_fd(tlsdata->accept_bio, NULL); + t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN; #else /* NETSNMP_NO_LISTEN_SUPPORT */ - return NULL; + return NULL; #endif /* NETSNMP_NO_LISTEN_SUPPORT */ - } + return t; } +netsnmp_transport * +netsnmp_tlstcp_open(netsnmp_transport *t) +{ + _netsnmpTLSBaseData *tlsdata; + + netsnmp_assert_or_return(t != NULL, NULL); + netsnmp_assert_or_return(t->data != NULL, NULL); + netsnmp_assert_or_return(sizeof(_netsnmpTLSBaseData) == t->data_length, + NULL); + + tlsdata = t->data; + + if (tlsdata->flags & NETSNMP_TLSBASE_IS_CLIENT) + return netsnmp_tlstcp_open_client(t); + else + return netsnmp_tlstcp_open_server(t); +} + /* * Create a TLS-based transport for SNMP. Local is TRUE if addr is the local * address to bind to (i.e. this is a server-type session); otherwise addr is @@ -966,6 +1020,7 @@ netsnmp_tlstcp_transport(const char *addr_string, int isserver) t->f_config = netsnmp_tlsbase_config; t->f_setup_session = netsnmp_tlsbase_session_init; t->f_fmtaddr = netsnmp_tlstcp_fmtaddr; + t->f_get_taddr = netsnmp_tlstcp_get_taddr; t->flags |= NETSNMP_TRANSPORT_FLAG_TUNNELED | NETSNMP_TRANSPORT_FLAG_STREAM; @@ -1006,7 +1061,7 @@ netsnmp_tlstcp_create_tstring(const char *str, int local, netsnmp_transport * -netsnmp_tlstcp_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_tlstcp_create_ostring(const void *o, size_t o_len, int local) { char buf[SPRINT_MAX_LEN]; @@ -1033,7 +1088,6 @@ netsnmp_tlstcp_ctor(void) tlstcpDomain.prefix[0] = "tlstcp"; tlstcpDomain.prefix[1] = "tls"; - tlstcpDomain.f_create_from_tstring = NULL; tlstcpDomain.f_create_from_tstring_new = netsnmp_tlstcp_create_tstring; tlstcpDomain.f_create_from_ostring = netsnmp_tlstcp_create_ostring; diff --git a/snmplib/transports/snmpUDPBaseDomain.c b/snmplib/transports/snmpUDPBaseDomain.c index 8497f71..cd6b15e 100644 --- a/snmplib/transports/snmpUDPBaseDomain.c +++ b/snmplib/transports/snmpUDPBaseDomain.c @@ -1,4 +1,13 @@ /* UDP base transport support functions + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include @@ -10,24 +19,27 @@ #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_UIO_H +#ifdef HAVE_SYS_UIO_H #include #endif #ifdef WIN32 @@ -48,10 +60,6 @@ #define MSG_DONTWAIT 0 #endif -#ifndef MSG_NOSIGNAL -#define MSG_NOSIGNAL 0 -#endif - void _netsnmp_udp_sockopt_set(int fd, int local) { @@ -100,10 +108,7 @@ _netsnmp_udp_sockopt_set(int fd, int local) netsnmp_sock_buffer_set(fd, SO_RCVBUF, local, 0); } -#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) -# if defined(IP_RECVDSTADDR) && !defined(IP_SENDSRCADDR) -# define IP_SENDSRCADDR IP_RECVDSTADDR /* DragonFly BSD */ -# endif +#if defined(HAVE_IP_PKTINFO) || (defined(HAVE_IP_RECVDSTADDR) && defined(HAVE_IP_SENDSRCADDR)) #define netsnmp_udpbase_recvfrom_sendto_defined @@ -229,19 +234,22 @@ netsnmp_udpbase_recvfrom(int s, void *buf, int len, struct sockaddr *from, return r; } -int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, - struct sockaddr *remote, void *data, int len) -{ #if !defined(WIN32) +int netsnmp_udpbase_sendto_unix(int fd, const struct in_addr *srcip, + int if_index, const struct sockaddr *remote, + const void *data, int len) +{ struct iovec iov; - struct msghdr m = { 0 }; + struct msghdr m = { NULL }; char cmsg[CMSG_SPACE(cmsg_data_size)]; int rc; + char iface[IFNAMSIZ]; + socklen_t ifacelen = IFNAMSIZ; - iov.iov_base = data; + iov.iov_base = NETSNMP_REMOVE_CONST(void *, data); iov.iov_len = len; - m.msg_name = remote; + m.msg_name = NETSNMP_REMOVE_CONST(void *, remote); m.msg_namelen = sizeof(struct sockaddr_in); m.msg_iov = &iov; m.msg_iovlen = 1; @@ -249,8 +257,8 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, if (srcip && srcip->s_addr != INADDR_ANY) { struct cmsghdr *cm; - - DEBUGMSGTL(("udpbase:sendto", "sending from %s\n", inet_ntoa(*srcip))); + struct in_pktinfo ipi; + int use_sendto = FALSE; memset(cmsg, 0, sizeof(cmsg)); @@ -264,29 +272,50 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, cm->cmsg_level = SOL_IP; cm->cmsg_type = IP_PKTINFO; - { - struct in_pktinfo ipi; + memset(&ipi, 0, sizeof(ipi)); +#ifdef HAVE_SO_BINDTODEVICE + /* + * For asymmetric multihomed users, we only set ifindex to 0 to + * let kernel handle return if there was no iface bound to the + * socket. + */ + if (getsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, iface, + &ifacelen) != 0) { + DEBUGMSGTL(("udpbase:sendto", + "getsockopt SO_BINDTODEVICE failed: %s\n", + strerror(errno))); + } else if (ifacelen == 0) { + DEBUGMSGTL(("udpbase:sendto", + "sendto: SO_BINDTODEVICE not set\n")); + } else { + DEBUGMSGTL(("udpbase:sendto", + "sendto: SO_BINDTODEVICE dev=%s using ifindex=%d\n", + iface, if_index)); + use_sendto = TRUE; + } +#endif /* HAVE_SO_BINDTODEVICE */ - memset(&ipi, 0, sizeof(ipi)); - /* - * Except in the case of responding - * to a broadcast, setting the ifindex - * when responding results in incorrect - * behavior of changing the source address - * that the manager sees the response - * come from. - */ - ipi.ipi_ifindex = 0; -#if defined(cygwin) - ipi.ipi_addr.s_addr = srcip->s_addr; +#ifdef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST + DEBUGMSGTL(("udpbase:sendto", "sending from %s\n", + inet_ntoa(*srcip))); + ipi.ipi_spec_dst.s_addr = srcip->s_addr; #else - ipi.ipi_spec_dst.s_addr = srcip->s_addr; + DEBUGMSGTL(("udpbase:sendto", "ignoring from address %s\n", + inet_ntoa(*srcip))); #endif - memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi)); - } + memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi)); - rc = sendmsg(fd, &m, MSG_NOSIGNAL|MSG_DONTWAIT); - if (rc >= 0 || errno != EINVAL) + /* + * For Linux and VRF, use sendto() instead of sendmsg(). Do not pass a + * cmsg with IP_PKTINFO set because that would override the bind to + * VRF which is set by 'vrf exec' command. That would break VRF. + */ + if (use_sendto) + rc = sendto(fd, data, len, MSG_DONTWAIT, remote, + sizeof(struct sockaddr)); + else + rc = sendmsg(fd, &m, MSG_DONTWAIT); + if (rc >= 0 || (errno != EINVAL && errno != ENETUNREACH)) return rc; /* @@ -302,19 +331,17 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, memset(&ipi, 0, sizeof(ipi)); ipi.ipi_ifindex = if_index; -#if defined(cygwin) - ipi.ipi_addr.s_addr = INADDR_ANY; -#else +#ifdef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST ipi.ipi_spec_dst.s_addr = INADDR_ANY; #endif memcpy(CMSG_DATA(cm), &ipi, sizeof(ipi)); } -#elif defined(IP_SENDSRCADDR) +#elif defined(HAVE_IP_SENDSRCADDR) cm->cmsg_level = IPPROTO_IP; cm->cmsg_type = IP_SENDSRCADDR; memcpy((struct in_addr *)CMSG_DATA(cm), srcip, sizeof(struct in_addr)); #endif - rc = sendmsg(fd, &m, MSG_NOSIGNAL|MSG_DONTWAIT); + rc = sendmsg(fd, &m, MSG_DONTWAIT); if (rc >= 0 || errno != EINVAL) return rc; @@ -323,19 +350,24 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, m.msg_controllen = 0; } - return sendmsg(fd, &m, MSG_NOSIGNAL|MSG_DONTWAIT); + return sendmsg(fd, &m, MSG_DONTWAIT); +} #else /* !defined(WIN32) */ +int netsnmp_udpbase_sendto_win32(int fd, const struct in_addr *srcip, + int if_index, const struct sockaddr *remote, + const void *data, int len) +{ WSABUF wsabuf; WSAMSG m; char cmsg[WSA_CMSG_SPACE(sizeof(struct in_pktinfo))]; DWORD bytes_sent; int rc; - wsabuf.buf = data; + wsabuf.buf = NETSNMP_REMOVE_CONST(void *, data); wsabuf.len = len; memset(&m, 0, sizeof(m)); - m.name = remote; + m.name = NETSNMP_REMOVE_CONST(struct sockaddr *, remote); m.namelen = sizeof(struct sockaddr_in); m.lpBuffers = &wsabuf; m.dwBufferCount = 1; @@ -371,6 +403,17 @@ int netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, } rc = sendto(fd, data, len, 0, remote, sizeof(struct sockaddr)); return rc; +} +#endif /* !defined(WIN32) */ + +int netsnmp_udpbase_sendto(int fd, const struct in_addr *srcip, int if_index, + const struct sockaddr *remote, const void *data, + int len) +{ +#if !defined(WIN32) + return netsnmp_udpbase_sendto_unix(fd, srcip, if_index, remote, data, len); +#else /* !defined(WIN32) */ + return netsnmp_udpbase_sendto_win32(fd, srcip, if_index, remote, data, len); #endif /* !defined(WIN32) */ } #endif /* HAVE_IP_PKTINFO || HAVE_IP_RECVDSTADDR */ @@ -391,21 +434,19 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void *buf, int size, struct sockaddr *from; if (t != NULL && t->sock >= 0) { - addr_pair = (netsnmp_indexed_addr_pair *) malloc(sizeof(netsnmp_indexed_addr_pair)); + addr_pair = SNMP_MALLOC_TYPEDEF(netsnmp_indexed_addr_pair); if (addr_pair == NULL) { *opaque = NULL; *olength = 0; return -1; - } else { - memset(addr_pair, 0, sizeof(netsnmp_indexed_addr_pair)); + } else from = &addr_pair->remote_addr.sa; - } while (rc < 0) { #ifdef netsnmp_udpbase_recvfrom_sendto_defined socklen_t local_addr_len = sizeof(addr_pair->local_addr); rc = netsnmp_udp_recvfrom(t->sock, buf, size, from, &fromlen, - (struct sockaddr*)&(addr_pair->local_addr), + &addr_pair->local_addr.sa, &local_addr_len, &(addr_pair->if_index)); #else rc = recvfrom(t->sock, buf, size, MSG_DONTWAIT, from, &fromlen); @@ -437,27 +478,35 @@ netsnmp_udpbase_recv(netsnmp_transport *t, void *buf, int size, int -netsnmp_udpbase_send(netsnmp_transport *t, void *buf, int size, +netsnmp_udpbase_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; - netsnmp_indexed_addr_pair *addr_pair = NULL; - struct sockaddr *to = NULL; + const netsnmp_indexed_addr_pair *addr_pair = NULL; + const struct sockaddr *to = NULL; - if (opaque != NULL && *opaque != NULL && + if (opaque != NULL && *opaque != NULL && NULL != olength && ((*olength == sizeof(netsnmp_indexed_addr_pair) || (*olength == sizeof(struct sockaddr_in))))) { - addr_pair = (netsnmp_indexed_addr_pair *) (*opaque); + addr_pair = (const netsnmp_indexed_addr_pair *) (*opaque); } else if (t != NULL && t->data != NULL && t->data_length == sizeof(netsnmp_indexed_addr_pair)) { addr_pair = (netsnmp_indexed_addr_pair *) (t->data); + } else { + int len = -1; + if (opaque != NULL && *opaque != NULL && NULL != olength) + len = *olength; + else if (t != NULL && t->data != NULL) + len = t->data_length; + snmp_log(LOG_ERR, "unknown addr type of size %d\n", len); + return SNMPERR_GENERR; } to = &addr_pair->remote_addr.sa; if (to != NULL && t != NULL && t->sock >= 0) { DEBUGIF("netsnmp_udp") { - char *str = netsnmp_udp_fmtaddr(NULL, (void *) addr_pair, + char *str = netsnmp_udp_fmtaddr(NULL, addr_pair, sizeof(netsnmp_indexed_addr_pair)); DEBUGMSGTL(("netsnmp_udp", "send %d bytes from %p to %s on fd %d\n", size, buf, str, t->sock)); @@ -491,6 +540,8 @@ netsnmp_udp_base_ctor(void) DWORD nbytes; int result; + netsnmp_static_assert(sizeof(in_addr_t) == + sizeof((struct sockaddr_in *)NULL)->sin_addr); netsnmp_assert(s != SOCKET_ERROR); /* WSARecvMsg(): Windows XP / Windows Server 2003 and later */ result = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, diff --git a/snmplib/transports/snmpUDPDomain.c b/snmplib/transports/snmpUDPDomain.c index a0abd8c..9f88340 100644 --- a/snmplib/transports/snmpUDPDomain.c +++ b/snmplib/transports/snmpUDPDomain.c @@ -7,11 +7,17 @@ * Copyright 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include +#include "snmpIPBaseDomain.h" #include #include @@ -21,37 +27,33 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_SYS_UIO_H +#ifdef HAVE_SYS_UIO_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -80,11 +82,6 @@ static netsnmp_tdomain udpDomain; */ typedef netsnmp_indexed_addr_pair netsnmp_udp_addr_pair; -/* - * not static, since snmpUDPIPv6Domain needs it, but not public, either. - * (ie don't put it in a public header.) - */ -void _netsnmp_udp_sockopt_set(int fd, int server); int netsnmp_sockaddr_in2(struct sockaddr_in *addr, const char *inpeername, const char *default_target); @@ -95,41 +92,36 @@ netsnmp_sockaddr_in2(struct sockaddr_in *addr, */ char * -netsnmp_udp_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_udp_fmtaddr(netsnmp_transport *t, const void *data, int len) { return netsnmp_ipv4_fmtaddr("UDP", t, data, len); } -#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) +#if defined(HAVE_IP_PKTINFO) || (defined(HAVE_IP_RECVDSTADDR) && defined(HAVE_IP_SENDSRCADDR)) int netsnmp_udp_recvfrom(int s, void *buf, int len, struct sockaddr *from, socklen_t *fromlen, struct sockaddr *dstip, socklen_t *dstlen, int *if_index) { - /** udpiv4 just calls udpbase. should we skip directly to there? */ + /** udpipv4 just calls udpbase. should we skip directly to there? */ return netsnmp_udpipv4_recvfrom(s, buf, len, from, fromlen, dstip, dstlen, if_index); } -int netsnmp_udp_sendto(int fd, struct in_addr *srcip, int if_index, struct sockaddr *remote, - void *data, int len) +int netsnmp_udp_sendto(int fd, const struct in_addr *srcip, int if_index, + const struct sockaddr *remote, const void *data, int len) { - /** udpiv4 just calls udpbase. should we skip directly to there? */ + /** udpipv4 just calls udpbase. should we skip directly to there? */ return netsnmp_udpipv4_sendto(fd, srcip, if_index, remote, data, len); } #endif /* HAVE_IP_PKTINFO || HAVE_IP_RECVDSTADDR */ /* - * Open a UDP-based transport for SNMP. Local is TRUE if addr is the local - * address to bind to (i.e. this is a server-type session); otherwise addr is - * the remote address to send things to. + * Common initialization of udp transport. */ -netsnmp_transport * -netsnmp_udp_transport(struct sockaddr_in *addr, int local) +static netsnmp_transport * +netsnmp_udp_transport_base(netsnmp_transport *t) { - netsnmp_transport *t = NULL; - - t = netsnmp_udpipv4base_transport(addr, local); if (NULL == t) { return NULL; } @@ -151,10 +143,47 @@ netsnmp_udp_transport(struct sockaddr_in *addr, int local) t->f_close = netsnmp_socketbase_close; t->f_accept = NULL; t->f_fmtaddr = netsnmp_udp_fmtaddr; + t->f_get_taddr = netsnmp_ipv4_get_taddr; + + return t; +} + +/* + * Open a UDP-based transport for SNMP. Local is TRUE if addr is the local + * address to bind to (i.e. this is a server-type session); otherwise addr is + * the remote address to send things to. + */ +netsnmp_transport * +netsnmp_udp_transport(const struct netsnmp_ep *ep, int local) +{ + netsnmp_transport *t = NULL; + t = netsnmp_udpipv4base_transport(ep, local); + if (NULL != t) { + netsnmp_udp_transport_base(t); + } return t; } +/* + * Open a UDP-based transport for SNMP. Local is TRUE if addr is the local + * address to bind to (i.e. this is a server-type session); otherwise addr is + * the remote address to send things to and src_addr is the optional addr + * to send from. + */ +netsnmp_transport * +netsnmp_udp_transport_with_source(const struct netsnmp_ep *ep, int local, + const struct netsnmp_ep *src_addr) + +{ + netsnmp_transport *t = NULL; + + t = netsnmp_udpipv4base_transport_with_source(ep, local, src_addr); + if (NULL != t) { + netsnmp_udp_transport_base(t); + } + return t; +} #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) /* * The following functions provide the "com2sec" configuration token @@ -164,28 +193,119 @@ netsnmp_udp_transport(struct sockaddr_in *addr, int local) #define EXAMPLE_NETWORK "NETWORK" #define EXAMPLE_COMMUNITY "COMMUNITY" -typedef struct com2SecEntry_s { +struct com2SecEntry_s { const char *secName; const char *contextName; struct com2SecEntry_s *next; in_addr_t network; in_addr_t mask; + int negate; const char community[1]; -} com2SecEntry; +}; static com2SecEntry *com2SecList = NULL, *com2SecListLast = NULL; +int +netsnmp_udp_com2SecEntry_create(com2SecEntry **entryp, const char *community, + const char *secName, const char *contextName, + struct in_addr *network, struct in_addr *mask, + int negate) +{ + int communityLen, secNameLen, contextNameLen, len; + com2SecEntry* e; + char* last; + struct in_addr dflt_network, dflt_mask; + + if (NULL != entryp) + *entryp = NULL; + + if (NULL == community || NULL == secName) + return C2SE_ERR_MISSING_ARG; + + if (NULL == network) { + network = &dflt_network; + dflt_network.s_addr = 0; + } + if (NULL == mask) { + mask = &dflt_mask; + dflt_mask.s_addr = 0; + } + + /** Check that the network and mask are consistent. */ + if (network->s_addr & ~mask->s_addr) + return C2SE_ERR_MASK_MISMATCH; + + communityLen = strlen(community); + if (communityLen > COMMUNITY_MAX_LEN) + return C2SE_ERR_COMMUNITY_TOO_LONG; + + secNameLen = strlen(secName); + if (secNameLen > VACM_MAX_STRING) + return C2SE_ERR_SECNAME_TOO_LONG; + + contextNameLen = contextName ? strlen(contextName) : 0; + if (contextNameLen > VACM_MAX_STRING) + return C2SE_ERR_CONTEXT_TOO_LONG; + + /** alloc space for struct + 3 strings with NULLs */ + len = offsetof(com2SecEntry, community) + communityLen + secNameLen + + contextNameLen + 3; + e = (com2SecEntry*)calloc(len, 1); + if (e == NULL) + return C2SE_ERR_MEMORY; + last = ((char*)e) + offsetof(com2SecEntry, community); + + DEBUGIF("netsnmp_udp_parse_security") { + char buf1[INET_ADDRSTRLEN]; + char buf2[INET_ADDRSTRLEN]; + DEBUGMSGTL(("netsnmp_udp_parse_security", + "<\"%s\", %s/%s> => \"%s\"\n", community, + inet_ntop(AF_INET, network, buf1, sizeof(buf1)), + inet_ntop(AF_INET, mask, buf2, sizeof(buf2)), + secName)); + } + + memcpy(last, community, communityLen); + last += communityLen + 1; + memcpy(last, secName, secNameLen); + e->secName = last; + last += secNameLen + 1; + if (contextNameLen) { + memcpy(last, contextName, contextNameLen); + e->contextName = last; + } else + e->contextName = last - 1; + e->network = network->s_addr; + e->mask = mask->s_addr; + e->negate = negate; + e->next = NULL; + + if (com2SecListLast != NULL) { + com2SecListLast->next = e; + com2SecListLast = e; + } else { + com2SecListLast = com2SecList = e; + } + + if (NULL != entryp) + *entryp = e; + + return C2SE_ERR_SUCCESS; +} + void netsnmp_udp_parse_security(const char *token, char *param) { - char secName[VACMSTRINGLEN + 1]; - size_t secNameLen; - char contextName[VACMSTRINGLEN + 1]; - size_t contextNameLen; - char community[COMMUNITY_MAX_LEN + 1]; - size_t communityLen; - char source[270]; /* dns-name(253)+/(1)+mask(15)+\0(1) */ + /** copy_nword does null term, so we need vars of max size + 2. */ + /** (one for null, one to detect param too long */ + char secName[VACMSTRINGLEN]; /* == VACM_MAX_STRING + 2 */ + char contextName[VACMSTRINGLEN]; + char community[COMMUNITY_MAX_LEN + 2]; + char source[271]; /* !(1)+dns-name(253)+/(1)+mask(15)+\0(1) */ + char *sourcep; struct in_addr network, mask; + int negate; + int rc; /* * Get security, source address/netmask and community strings. @@ -198,27 +318,17 @@ netsnmp_udp_parse_security(const char *token, char *param) return; } param = copy_nword( param, contextName, sizeof(contextName)); - contextNameLen = strlen(contextName) + 1; - if (contextNameLen > VACMSTRINGLEN) { - config_perror("context name too long"); - return; - } if (!param) { config_perror("missing NAME parameter"); return; } param = copy_nword( param, secName, sizeof(secName)); - } else { - contextNameLen = 0; - } + } else + contextName[0] = '\0'; - secNameLen = strlen(secName) + 1; - if (secNameLen == 1) { + if (secName[0] == '\0') { config_perror("empty NAME parameter"); return; - } else if (secNameLen > VACMSTRINGLEN) { - config_perror("security name too long"); - return; } if (!param) { @@ -244,12 +354,7 @@ netsnmp_udp_parse_security(const char *token, char *param) config_perror("empty COMMUNITY parameter"); return; } - communityLen = strlen(community) + 1; - if (communityLen >= COMMUNITY_MAX_LEN) { - config_perror("community name too long"); - return; - } - if (communityLen == sizeof(EXAMPLE_COMMUNITY) && + if ((strlen(community) + 1) == sizeof(EXAMPLE_COMMUNITY) && memcmp(community, EXAMPLE_COMMUNITY, sizeof(EXAMPLE_COMMUNITY)) == 0) { config_perror("example config COMMUNITY not properly configured"); return; @@ -259,19 +364,29 @@ netsnmp_udp_parse_security(const char *token, char *param) if (strcmp(source, "default") == 0) { network.s_addr = 0; mask.s_addr = 0; + negate = 0; } else { + char *strmask; + if (*source == '!') { + negate = 1; + sourcep = source + 1; + } else { + negate = 0; + sourcep = source; + } + /* Split the source/netmask parts */ - char *strmask = strchr(source, '/'); + strmask = strchr(sourcep, '/'); if (strmask != NULL) /* Mask given. */ *strmask++ = '\0'; /* Try interpreting as a dotted quad. */ - if (inet_pton(AF_INET, source, &network) == 0) { + if (inet_pton(AF_INET, sourcep, &network) == 0) { /* Nope, wasn't a dotted quad. Must be a hostname. */ - int ret = netsnmp_gethostbyname_v4(source, &network.s_addr); + int ret = netsnmp_gethostbyname_v4(sourcep, &network.s_addr); if (ret < 0) { - config_perror("cannot resolve source hostname"); + config_perror("cannot resolve IPv4 source hostname"); return; } } @@ -287,7 +402,7 @@ netsnmp_udp_parse_security(const char *token, char *param) if (*cp == '\0') { if (0 < maskLen && maskLen <= 32) mask.s_addr = htonl((in_addr_t)(~0UL << (32 - maskLen))); - else if (maskLen == 0) + else if (0 == maskLen) mask.s_addr = 0; else { config_perror("bad mask length"); @@ -308,54 +423,60 @@ netsnmp_udp_parse_security(const char *token, char *param) } } - { - void* v = malloc(offsetof(com2SecEntry, community) + communityLen + - secNameLen + contextNameLen); + /* + * Everything is okay. Copy the parameters to the structure allocated + * above and add it to END of the list. + */ + rc = netsnmp_udp_com2SecEntry_create(NULL, community, secName, contextName, + &network, &mask, negate); + switch(rc) { + case C2SE_ERR_SUCCESS: + break; + case C2SE_ERR_CONTEXT_TOO_LONG: + config_perror("context name too long"); + break; + case C2SE_ERR_COMMUNITY_TOO_LONG: + config_perror("community name too long"); + break; + case C2SE_ERR_SECNAME_TOO_LONG: + config_perror("security name too long"); + break; + case C2SE_ERR_MASK_MISMATCH: + config_perror("source/mask mismatch"); + break; + case C2SE_ERR_MISSING_ARG: + default: + config_perror("unexpected error; could not create com2SecEntry"); + } +} - com2SecEntry* e = (com2SecEntry*)v; - char* last = ((char*)v) + offsetof(com2SecEntry, community); +void +netsnmp_udp_com2Sec_free(com2SecEntry *e) +{ + free(e); +} - if (v == NULL) { - config_perror("memory error"); - return; - } +int +netsnmp_udp_com2SecList_remove(com2SecEntry *e) +{ + com2SecEntry *c = com2SecList, *p = NULL; + for (; c != NULL; p = c, c = c->next) { + if (e == c) + break; + } + if (NULL == c) + return 1; - /* - * Everything is okay. Copy the parameters to the structure allocated - * above and add it to END of the list. - */ + if (NULL == p) + com2SecList = e->next; + else + p->next = e->next; + e->next = NULL; - { - char buf1[INET_ADDRSTRLEN]; - char buf2[INET_ADDRSTRLEN]; - DEBUGMSGTL(("netsnmp_udp_parse_security", - "<\"%s\", %s/%s> => \"%s\"\n", community, - inet_ntop(AF_INET, &network, buf1, sizeof(buf1)), - inet_ntop(AF_INET, &mask, buf2, sizeof(buf2)), - secName)); - } + if (e == com2SecListLast) + com2SecListLast = p; - memcpy(last, community, communityLen); - last += communityLen; - memcpy(last, secName, secNameLen); - e->secName = last; - last += secNameLen; - if (contextNameLen) { - memcpy(last, contextName, contextNameLen); - e->contextName = last; - } else - e->contextName = last - 1; - e->network = network.s_addr; - e->mask = mask.s_addr; - e->next = NULL; - - if (com2SecListLast != NULL) { - com2SecListLast->next = e; - com2SecListLast = e; - } else { - com2SecListLast = com2SecList = e; - } - } + return 0; } void @@ -365,7 +486,7 @@ netsnmp_udp_com2SecList_free(void) while (e != NULL) { com2SecEntry *tmp = e; e = e->next; - free(tmp); + netsnmp_udp_com2Sec_free(tmp); } com2SecList = com2SecListLast = NULL; } @@ -455,6 +576,14 @@ netsnmp_udp_getSecName(void *opaque, int olength, (memcmp(community, c->community, community_len) == 0) && ((from->sin_addr.s_addr & c->mask) == c->network)) { DEBUGMSG(("netsnmp_udp_getSecName", "... SUCCESS\n")); + if (c->negate) { + /* + * If we matched a negative entry, then we are done - claim that we + * matched nothing. + */ + DEBUGMSG(("netsnmp_udp_getSecName", "... \n")); + break; + } if (secName != NULL) { *secName = c->secName; *contextName = c->contextName; @@ -475,28 +604,34 @@ netsnmp_transport * netsnmp_udp_create_tstring(const char *str, int local, const char *default_target) { - struct sockaddr_in addr; + struct netsnmp_ep addr; - if (netsnmp_sockaddr_in2(&addr, str, default_target)) { + if (netsnmp_sockaddr_in3(&addr, str, default_target)) { return netsnmp_udp_transport(&addr, local); } else { return NULL; } } +netsnmp_transport * +netsnmp_udp_create_tspec(netsnmp_tdomain_spec *tspec) +{ + netsnmp_transport *t = netsnmp_udpipv4base_tspec_transport(tspec); + if (NULL != t) { + netsnmp_udp_transport_base(t); + } + return t; + +} netsnmp_transport * -netsnmp_udp_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_udp_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_in addr; + struct netsnmp_ep ep; - if (o_len == 6) { - unsigned short porttmp = (o[4] << 8) + o[5]; - addr.sin_family = AF_INET; - memcpy((u_char *) & (addr.sin_addr.s_addr), o, 4); - addr.sin_port = htons(porttmp); - return netsnmp_udp_transport(&addr, local); - } + memset(&ep, 0, sizeof(ep)); + if (netsnmp_ipv4_ostring_to_sockaddr(&ep.a.sin, o, o_len)) + return netsnmp_udp_transport(&ep, local); return NULL; } @@ -509,8 +644,8 @@ netsnmp_udp_ctor(void) udpDomain.prefix = (const char**)calloc(2, sizeof(char *)); udpDomain.prefix[0] = "udp"; - udpDomain.f_create_from_tstring = NULL; udpDomain.f_create_from_tstring_new = netsnmp_udp_create_tstring; + udpDomain.f_create_from_tspec = netsnmp_udp_create_tspec; udpDomain.f_create_from_ostring = netsnmp_udp_create_ostring; netsnmp_tdomain_register(&udpDomain); diff --git a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c index 8c0fb05..1e15a2f 100644 --- a/snmplib/transports/snmpUDPIPv4BaseDomain.c +++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c @@ -1,33 +1,43 @@ /* IPV4 base transport support functions + * + * 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 (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ #include #include +#include "snmpIPBaseDomain.h" #include #include #include #include #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif #include @@ -37,10 +47,15 @@ #include #include #include +#include #include -#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) +#ifndef NETSNMP_NO_SYSTEMD +#include +#endif + +#if defined(HAVE_IP_PKTINFO) || (defined(HAVE_IP_RECVDSTADDR) && defined(HAVE_IP_SENDSRCADDR)) int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from, socklen_t *fromlen, struct sockaddr *dstip, socklen_t *dstlen, int *if_index) @@ -49,95 +64,124 @@ int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from, if_index); } -int netsnmp_udpipv4_sendto(int fd, struct in_addr *srcip, int if_index, - struct sockaddr *remote, void *data, int len) +int netsnmp_udpipv4_sendto(int fd, const struct in_addr *srcip, int if_index, + const struct sockaddr *remote, const void *data, + int len) { return netsnmp_udpbase_sendto(fd, srcip, if_index, remote, data, len); } #endif /* HAVE_IP_PKTINFO || HAVE_IP_RECVDSTADDR */ netsnmp_transport * -netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local) +netsnmp_udpipv4base_transport_init(const struct netsnmp_ep *ep, int local) { - netsnmp_transport *t = NULL; - int rc = 0, rc2; - char *client_socket = NULL; - netsnmp_indexed_addr_pair addr_pair; - socklen_t local_addr_len; - -#ifdef NETSNMP_NO_LISTEN_SUPPORT - if (local) - return NULL; -#endif /* NETSNMP_NO_LISTEN_SUPPORT */ + netsnmp_transport *t; + const struct sockaddr_in *addr = &ep->a.sin; + u_char *addr_ptr; if (addr == NULL || addr->sin_family != AF_INET) { return NULL; } - memset(&addr_pair, 0, sizeof(netsnmp_indexed_addr_pair)); - memcpy(&(addr_pair.remote_addr), addr, sizeof(struct sockaddr_in)); - t = SNMP_MALLOC_TYPEDEF(netsnmp_transport); - netsnmp_assert_or_return(t != NULL, NULL); + if (NULL == t) + return NULL; + + t->sock = -1; + + addr_ptr = netsnmp_memdup(addr, sizeof(*addr)); + if (NULL == addr_ptr) { + free(t); + return NULL; + } + + if (local) { + /** This is a server session. */ + t->local_length = sizeof(*addr); + t->local = addr_ptr; + } else { + /** This is a client session. */ + t->remote = addr_ptr; + t->remote_length = sizeof(*addr); + } DEBUGIF("netsnmp_udpbase") { - char *str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair, - sizeof(netsnmp_indexed_addr_pair)); + netsnmp_indexed_addr_pair addr_pair; + char *str; + memset(&addr_pair, 0, sizeof(netsnmp_indexed_addr_pair)); + memcpy(&(addr_pair.remote_addr), addr, sizeof(*addr)); + str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair, + sizeof(netsnmp_indexed_addr_pair)); DEBUGMSGTL(("netsnmp_udpbase", "open %s %s\n", local ? "local" : "remote", str)); free(str); } - t->sock = socket(PF_INET, SOCK_DGRAM, 0); - DEBUGMSGTL(("UDPBase", "openned socket %d as local=%d\n", t->sock, local)); - if (t->sock < 0) { - netsnmp_transport_free(t); - return NULL; - } - - _netsnmp_udp_sockopt_set(t->sock, local); + if (!local) { + netsnmp_indexed_addr_pair *addr_pair; - if (local) { -#ifndef NETSNMP_NO_LISTEN_SUPPORT /* - * This session is inteneded as a server, so we must bind on to the - * given IP address, which may include an interface address, or could - * be INADDR_ANY, but certainly includes a port number. + * allocate space to save the (remote) address in the + * transport-specific data pointer for later use by netsnmp_udp_send. */ - - t->local = (u_char *) malloc(6); - if (t->local == NULL) { + t->data = calloc(1, sizeof(netsnmp_indexed_addr_pair)); + if (NULL == t->data) { netsnmp_transport_free(t); return NULL; } - memcpy(t->local, (u_char *) & (addr->sin_addr.s_addr), 4); - t->local[4] = (ntohs(addr->sin_port) & 0xff00) >> 8; - t->local[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0; - t->local_length = 6; + t->data_length = sizeof(netsnmp_indexed_addr_pair); + + addr_pair = (netsnmp_indexed_addr_pair *)t->data; + memcpy(&addr_pair->remote_addr, addr, sizeof(*addr)); + } + return t; +} + +int +netsnmp_udpipv4base_transport_socket(int flags) +{ + int local = flags & NETSNMP_TSPEC_LOCAL; + int sock = socket(PF_INET, SOCK_DGRAM, 0); + + DEBUGMSGTL(("UDPBase", "opened socket %d as local=%d\n", sock, local)); + if (sock < 0) + return -1; + + _netsnmp_udp_sockopt_set(sock, local); + + return sock; +} + +int +netsnmp_udpipv4base_transport_bind(netsnmp_transport *t, + const struct netsnmp_ep *ep, + int flags) +{ + const struct sockaddr_in *addr = &ep->a.sin; +#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR) + int sockopt = 1; +#endif + int rc; + if (flags & NETSNMP_TSPEC_LOCAL) { +#ifdef NETSNMP_NO_LISTEN_SUPPORT + return NULL; +#endif /* NETSNMP_NO_LISTEN_SUPPORT */ #ifndef WIN32 #if defined(HAVE_IP_PKTINFO) - { - int sockopt = 1; - if (setsockopt(t->sock, SOL_IP, IP_PKTINFO, &sockopt, sizeof sockopt) == -1) { - DEBUGMSGTL(("netsnmp_udpbase", "couldn't set IP_PKTINFO: %s\n", - strerror(errno))); - netsnmp_transport_free(t); - return NULL; - } - DEBUGMSGTL(("netsnmp_udpbase", "set IP_PKTINFO\n")); + if (setsockopt(t->sock, SOL_IP, IP_PKTINFO, &sockopt, sizeof sockopt) == -1) { + DEBUGMSGTL(("netsnmp_udpbase", "couldn't set IP_PKTINFO: %s\n", + strerror(errno))); + return 1; } + DEBUGMSGTL(("netsnmp_udpbase", "set IP_PKTINFO\n")); #elif defined(HAVE_IP_RECVDSTADDR) - { - int sockopt = 1; - if (setsockopt(t->sock, IPPROTO_IP, IP_RECVDSTADDR, &sockopt, sizeof sockopt) == -1) { - DEBUGMSGTL(("netsnmp_udp", "couldn't set IP_RECVDSTADDR: %s\n", - strerror(errno))); - netsnmp_transport_free(t); - return NULL; - } - DEBUGMSGTL(("netsnmp_udp", "set IP_RECVDSTADDR\n")); + if (setsockopt(t->sock, IPPROTO_IP, IP_RECVDSTADDR, &sockopt, sizeof sockopt) == -1) { + DEBUGMSGTL(("netsnmp_udp", "couldn't set IP_RECVDSTADDR: %s\n", + strerror(errno))); + return 1; } + DEBUGMSGTL(("netsnmp_udp", "set IP_RECVDSTADDR\n")); #endif #else /* !defined(WIN32) */ { @@ -151,71 +195,198 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local) } } #endif /* !defined(WIN32) */ - rc = bind(t->sock, (struct sockaddr *) addr, - sizeof(struct sockaddr)); - if (rc != 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - t->data = NULL; - t->data_length = 0; -#else /* NETSNMP_NO_LISTEN_SUPPORT */ - return NULL; -#endif /* NETSNMP_NO_LISTEN_SUPPORT */ - } else { - /* - * This is a client session. If we've been given a - * client address to send from, then bind to that. - * Otherwise the send will use "something sensible". - */ - client_socket = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, - NETSNMP_DS_LIB_CLIENT_ADDR); - if (client_socket) { - struct sockaddr_in client_addr; - netsnmp_sockaddr_in2(&client_addr, client_socket, NULL); - client_addr.sin_port = 0; - DEBUGMSGTL(("netsnmp_udpbase", "binding socket: %d\n", t->sock)); - rc = bind(t->sock, (struct sockaddr *)&client_addr, - sizeof(struct sockaddr)); - if ( rc != 0 ) { - DEBUGMSGTL(("netsnmp_udpbase", "failed to bind for clientaddr: %d %s\n", - errno, strerror(errno))); - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - local_addr_len = sizeof(addr_pair.local_addr); - rc2 = getsockname(t->sock, (struct sockaddr*)&addr_pair.local_addr, - &local_addr_len); - netsnmp_assert(rc2 == 0); - } + } - DEBUGIF("netsnmp_udpbase") { - char *str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair, - sizeof(netsnmp_indexed_addr_pair)); - DEBUGMSGTL(("netsnmp_udpbase", "client open %s\n", str)); - free(str); - } + DEBUGIF("netsnmp_udpbase") { + netsnmp_indexed_addr_pair addr_pair; + char *str; + memset(&addr_pair, 0x0, sizeof(addr_pair)); + memcpy(&(addr_pair.local_addr), addr, sizeof(*addr)); + str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair, + sizeof(netsnmp_indexed_addr_pair)); + DEBUGMSGTL(("netsnmp_udpbase", "binding socket: %d to %s\n", + t->sock, str)); + free(str); + } + if (flags & NETSNMP_TSPEC_PREBOUND) { + DEBUGMSGTL(("netsnmp_udpbase", "socket %d is prebound, nothing to do\n", + t->sock)); + return 0; + } + rc = netsnmp_bindtodevice(t->sock, ep->iface); + if (rc != 0) { + DEBUGMSGTL(("netsnmp_udpbase", "failed to bind to iface %s: %s\n", + ep->iface, strerror(errno))); + goto err; + } + rc = bind(t->sock, (const struct sockaddr *)addr, sizeof(*addr)); + if ( rc != 0 ) { + DEBUGMSGTL(("netsnmp_udpbase", + "failed to bind for clientaddr: %d %s\n", + errno, strerror(errno))); + goto err; + } + + return 0; + +err: + netsnmp_socketbase_close(t); + return 1; +} + +void +netsnmp_udpipv4base_transport_get_bound_addr(netsnmp_transport *t) +{ + netsnmp_indexed_addr_pair *addr_pair; + socklen_t local_addr_len = sizeof(addr_pair->local_addr); + int rc; + + /** only for client transports: must have data and not local */ + if (NULL == t || NULL != t->local || NULL == t->data || + t->data_length < local_addr_len) { + snmp_log(LOG_ERR, "bad parameters for get bound addr\n"); + return; + } + + addr_pair = (netsnmp_indexed_addr_pair *)t->data; + + /** get local socket address for client session */ + rc = getsockname(t->sock, (struct sockaddr*)&addr_pair->local_addr, + &local_addr_len); + netsnmp_assert(rc == 0); + DEBUGIF("netsnmp_udpbase") { + char *str; + str = netsnmp_udp_fmtaddr(NULL, (void *)addr_pair, + sizeof(netsnmp_indexed_addr_pair)); + DEBUGMSGTL(("netsnmp_udpbase", "socket %d bound to %s\n", + t->sock, str)); + free(str); + } +} +netsnmp_transport * +netsnmp_udpipv4base_transport_with_source(const struct netsnmp_ep *ep, + int local, + const struct netsnmp_ep *src_addr) +{ + netsnmp_transport *t = NULL; + const struct netsnmp_ep *bind_addr; + int rc, flags = 0; + + t = netsnmp_udpipv4base_transport_init(ep, local); + if (NULL == t) + return NULL; + + if (local) { + bind_addr = ep; + flags |= NETSNMP_TSPEC_LOCAL; + +#ifndef NETSNMP_NO_SYSTEMD /* - * Save the (remote) address in the - * transport-specific data pointer for later use by netsnmp_udp_send. + * Maybe the socket was already provided by systemd... */ + t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_DGRAM, -1, + ntohs(ep->a.sin.sin_port)); + if (t->sock >= 0) + flags |= NETSNMP_TSPEC_PREBOUND; +#endif + } + else + bind_addr = src_addr; - t->data = malloc(sizeof(netsnmp_indexed_addr_pair)); - t->remote = (u_char *)malloc(6); - if (t->data == NULL || t->remote == NULL) { - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->remote, (u_char *) & (addr->sin_addr.s_addr), 4); - t->remote[4] = (ntohs(addr->sin_port) & 0xff00) >> 8; - t->remote[5] = (ntohs(addr->sin_port) & 0x00ff) >> 0; - t->remote_length = 6; - memcpy(t->data, &addr_pair, sizeof(netsnmp_indexed_addr_pair)); - t->data_length = sizeof(netsnmp_indexed_addr_pair); + if (-1 == t->sock) + t->sock = netsnmp_udpipv4base_transport_socket(flags); + if (t->sock < 0) { + netsnmp_transport_free(t); + return NULL; } + /* + * If we've been given an address to bind to, then bind to it. + * Otherwise the OS will use "something sensible". + */ + if (NULL == bind_addr) + return t; + + /* for Linux VRF Traps we try to bind the iface if clientaddr is not set */ + if (ep && ep->iface[0]) { + rc = netsnmp_bindtodevice(t->sock, ep->iface); + if (rc) + DEBUGMSGTL(("netsnmp_udpbase", "VRF: Could not bind socket %d to %s\n", + t->sock, ep->iface)); + else + DEBUGMSGTL(("netsnmp_udpbase", "VRF: Bound socket %d to %s\n", + t->sock, ep->iface)); + } + + rc = netsnmp_udpipv4base_transport_bind(t, bind_addr, flags); + if (rc) { + netsnmp_transport_free(t); + t = NULL; + } + else if (!local) + netsnmp_udpipv4base_transport_get_bound_addr(t); + return t; } + +netsnmp_transport * +netsnmp_udpipv4base_tspec_transport(netsnmp_tdomain_spec *tspec) +{ + struct netsnmp_ep addr; + int local; + + if (NULL == tspec) + return NULL; + + local = tspec->flags & NETSNMP_TSPEC_LOCAL; + + /** get address from target */ + if (!netsnmp_sockaddr_in3(&addr, tspec->target, tspec->default_target)) + return NULL; + + if (NULL != tspec->source) { + struct netsnmp_ep src_addr; + + /** get sockaddr from source */ + if (!netsnmp_sockaddr_in3(&src_addr, tspec->source, ":0")) + return NULL; + return netsnmp_udpipv4base_transport_with_source(&addr, local, + &src_addr); + } + + /** no source and default client address ok */ + return netsnmp_udpipv4base_transport(&addr, local); +} + +netsnmp_transport * +netsnmp_udpipv4base_transport(const struct netsnmp_ep *ep, int local) +{ + struct netsnmp_ep client_ep; + const char *client_addr; + int uses_port; + + memset(&client_ep, 0, sizeof(client_ep)); + client_ep.a.sin.sin_family = AF_INET; + + if (local) + goto out; + + client_addr = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR); + if (!client_addr) + goto out; + + if (netsnmp_sockaddr_in3(&client_ep, client_addr, ":0") < 0) { + snmp_log(LOG_ERR, "Parsing clientaddr %s failed\n", client_addr); + goto out; + } + + uses_port = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT); + if (!uses_port) + client_ep.a.sin.sin_port = 0; + +out: + return netsnmp_udpipv4base_transport_with_source(ep, local, &client_ep); +} diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c index 18de876..335fbd5 100644 --- a/snmplib/transports/snmpUDPIPv6Domain.c +++ b/snmplib/transports/snmpUDPIPv6Domain.c @@ -1,5 +1,12 @@ +/* + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ #include +#include "snmpIPBaseDomain.h" #include #include @@ -12,53 +19,40 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif - -#if defined(HAVE_WINSOCK_H) && !defined(mingw32) -static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; -#endif - -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H #include #endif -#if HAVE_NETDB_H +#ifdef HAVE_NETDB_H #include #endif -#if HAVE_NET_IF_H +#ifdef HAVE_NET_IF_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - -#if HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY #define SS_FAMILY ss_family -#elif HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY +#elif defined(HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY) #define SS_FAMILY __ss_family #endif -#if defined(darwin) -#include /* for uint8_t */ -#endif - #include #include #include @@ -66,6 +60,11 @@ static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; #include #include #include +#include + +#ifndef NETSNMP_NO_SYSTEMD +#include +#endif #include "inet_ntop.h" #include "inet_pton.h" @@ -73,19 +72,13 @@ static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; oid netsnmp_UDPIPv6Domain[] = { TRANSPORT_DOMAIN_UDP_IPV6 }; static netsnmp_tdomain udp6Domain; -/* - * from snmpUDPDomain. not static, but not public, either. - * (ie don't put it in a public header.) - */ -extern void _netsnmp_udp_sockopt_set(int fd, int server); - /* * Return a string representing the address in data, or else the "far end" * address if data is NULL. */ static char * -netsnmp_udp6_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_udp6_fmtaddr(netsnmp_transport *t, const void *data, int len) { return netsnmp_ipv6_fmtaddr("UDP/IPv6", t, data, len); } @@ -144,24 +137,24 @@ netsnmp_udp6_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_udp6_send(netsnmp_transport *t, void *buf, int size, +netsnmp_udp6_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; - struct sockaddr *to = NULL; + const struct sockaddr *to = NULL; if (opaque != NULL && *opaque != NULL && *olength == sizeof(struct sockaddr_in6)) { - to = (struct sockaddr *) (*opaque); + to = (const struct sockaddr *) (*opaque); } else if (t != NULL && t->data != NULL && ((t->data_length == sizeof(struct sockaddr_in6)) || (t->data_length == sizeof(netsnmp_indexed_addr_pair)))) { - to = (struct sockaddr *) (t->data); + to = (const struct sockaddr *) (t->data); } if (to != NULL && t != NULL && t->sock >= 0) { DEBUGIF("netsnmp_udp6") { - char *str = netsnmp_udp6_fmtaddr(NULL, (void *)to, + char *str = netsnmp_udp6_fmtaddr(NULL, to, sizeof(struct sockaddr_in6)); DEBUGMSGTL(("netsnmp_udp6", "send %d bytes from %p to %s on fd %d\n", @@ -180,16 +173,18 @@ netsnmp_udp6_send(netsnmp_transport *t, void *buf, int size, /* - * Open a UDP/IPv6-based transport for SNMP. Local is TRUE if addr is the + * Initialize a UDP/IPv6-based transport for SNMP. Local is TRUE if addr is the * local address to bind to (i.e. this is a server-type session); otherwise * addr is the remote address to send things to. */ netsnmp_transport * -netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local) +netsnmp_udp6_transport_init(const struct netsnmp_ep *ep, int flags) { + const struct sockaddr_in6 *addr = &ep->a.sin6; netsnmp_transport *t = NULL; - int rc = 0; + int local = flags & NETSNMP_TSPEC_LOCAL; + u_char *addr_ptr; #ifdef NETSNMP_NO_LISTEN_SUPPORT if (local) @@ -205,25 +200,75 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local) return NULL; } + t->sock = -1; + + addr_ptr = netsnmp_memdup(addr, sizeof(*addr)); + if (addr_ptr == NULL) { + free(t); + return NULL; + } + if (local) { + /** This is a server session. */ + t->local_length = sizeof(*addr); + t->local = addr_ptr; + } else { + /** This is a client session. */ + t->remote = addr_ptr; + t->remote_length = sizeof(*addr); + } + DEBUGIF("netsnmp_udp6") { - char *str = netsnmp_udp6_fmtaddr(NULL, (void *) addr, - sizeof(struct sockaddr_in6)); + char *str = netsnmp_udp6_fmtaddr(NULL, addr, sizeof(*addr)); DEBUGMSGTL(("netsnmp_udp6", "open %s %s\n", local ? "local" : "remote", str)); free(str); } + if (!local) { + netsnmp_indexed_addr_pair *addr_pair; + + /* + * allocate space to save the (remote) address in the + * transport-specific data pointer for later use by netsnmp_udp_send. + */ + t->data = calloc(1, sizeof(netsnmp_indexed_addr_pair)); + if (NULL == t->data) { + netsnmp_transport_free(t); + return NULL; + } + t->data_length = sizeof(netsnmp_indexed_addr_pair); + + addr_pair = (netsnmp_indexed_addr_pair *)t->data; + memcpy(&addr_pair->remote_addr, addr, sizeof(*addr)); + } + + /* + * 16-bit length field, 8 byte UDP header, 40 byte IPv6 header. + */ + + t->msgMaxSize = 0xffff - 8 - 40; + t->f_recv = netsnmp_udp6_recv; + t->f_send = netsnmp_udp6_send; + t->f_close = netsnmp_socketbase_close; + t->f_accept = NULL; + t->f_fmtaddr = netsnmp_udp6_fmtaddr; + t->f_get_taddr = netsnmp_ipv6_get_taddr; + t->domain = netsnmp_UDPIPv6Domain; t->domain_length = sizeof(netsnmp_UDPIPv6Domain) / sizeof(netsnmp_UDPIPv6Domain[0]); - t->sock = socket(PF_INET6, SOCK_DGRAM, 0); - if (t->sock < 0) { - netsnmp_transport_free(t); - return NULL; - } + return t; +} - _netsnmp_udp_sockopt_set(t->sock, local); +int +netsnmp_udp6_transport_bind(netsnmp_transport *t, + const struct netsnmp_ep *ep, + int flags) +{ + const struct sockaddr_in6 *addr = &ep->a.sin6; + int local = flags & NETSNMP_TSPEC_LOCAL; + int rc = 0; if (local) { #ifndef NETSNMP_NO_LISTEN_SUPPORT @@ -242,69 +287,200 @@ netsnmp_udp6_transport(struct sockaddr_in6 *addr, int local) } } #endif +#else /* NETSNMP_NO_LISTEN_SUPPORT */ + return -1; +#endif /* NETSNMP_NO_LISTEN_SUPPORT */ + } - rc = bind(t->sock, (struct sockaddr *) addr, - sizeof(struct sockaddr_in6)); - if (rc != 0) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - t->local = (unsigned char*)malloc(18); - if (t->local == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); + DEBUGIF("netsnmp_udp6") { + char *str; + str = netsnmp_udp6_fmtaddr(NULL, addr, sizeof(*addr)); + DEBUGMSGTL(("netsnmp_udp6", "binding socket: %d to %s\n", + t->sock, str)); + free(str); + } + if (flags & NETSNMP_TSPEC_PREBOUND) { + DEBUGMSGTL(("netsnmp_udp6", "socket %d is prebound, nothing to do\n", + t->sock)); + return 0; + } + rc = netsnmp_bindtodevice(t->sock, ep->iface); + if (rc != 0) { + DEBUGMSGTL(("netsnmp_udp6", "failed to bind to iface %s: %s\n", + ep->iface, strerror(errno))); + goto err; + } + rc = bind(t->sock, (const struct sockaddr *)addr, sizeof(*addr)); + if (rc != 0) { + DEBUGMSGTL(("netsnmp_udp6", "failed to bind for clientaddr: %d %s\n", + errno, strerror(errno))); + goto err; + } + + return 0; + +err: + netsnmp_socketbase_close(t); + return -1; +} + +int +netsnmp_udp6_transport_socket(int flags) +{ + int local = flags & NETSNMP_TSPEC_LOCAL; + int sock = socket(PF_INET6, SOCK_DGRAM, 0); + + DEBUGMSGTL(("UDPBase", "opened socket %d as local=%d\n", sock, local)); + if (sock < 0) + return -1; + + _netsnmp_udp_sockopt_set(sock, local); + + return sock; +} + +void +netsnmp_udp6_transport_get_bound_addr(netsnmp_transport *t) +{ + netsnmp_indexed_addr_pair *addr_pair; + socklen_t local_addr_len = sizeof(addr_pair->local_addr); + int rc; + + /** only for client transports: must have data and not local */ + if (NULL == t || NULL != t->local || NULL == t->data || + t->data_length < local_addr_len) { + snmp_log(LOG_ERR, "bad parameters for get bound addr\n"); + return; + } + + addr_pair = (netsnmp_indexed_addr_pair *)t->data; + + /** get local socket address for client session */ + local_addr_len = sizeof(addr_pair->local_addr); + rc = getsockname(t->sock, (struct sockaddr*)&addr_pair->local_addr, + &local_addr_len); + netsnmp_assert(rc == 0); + DEBUGIF("netsnmp_udpbase") { + char *str = netsnmp_udp6_fmtaddr(NULL, (void *)&addr_pair->local_addr, + sizeof(addr_pair->local_addr)); + DEBUGMSGTL(("netsnmp_udpbase", "socket %d bound to %s\n", + t->sock, str)); + free(str); + } +} + +netsnmp_transport * +netsnmp_udpipv6base_tspec_transport(netsnmp_tdomain_spec *tspec) +{ + struct netsnmp_ep ep; + int local; + + if (NULL == tspec) + return NULL; + + local = tspec->flags & NETSNMP_TSPEC_LOCAL; + + /** get address from target */ + if (!netsnmp_sockaddr_in6_3(&ep, tspec->target, tspec->default_target)) + return NULL; + + if (NULL != tspec->source) { + struct netsnmp_ep src_addr; + + /** get sockaddr from source */ + if (!netsnmp_sockaddr_in6_3(&src_addr, tspec->source, ":0")) return NULL; - } - memcpy(t->local, addr->sin6_addr.s6_addr, 16); - t->local[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8; - t->local[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0; - t->local_length = 18; - t->data = NULL; - t->data_length = 0; -#else /* NETSNMP_NO_LISTEN_SUPPORT */ + return netsnmp_udp6_transport_with_source(&ep, local, &src_addr); + } + + /** no source and default client address ok */ + return netsnmp_udp6_transport(&ep, local); +} + +netsnmp_transport * +netsnmp_udp6_transport_with_source(const struct netsnmp_ep *ep, + int local, const struct netsnmp_ep *src_addr) +{ + netsnmp_transport *t = NULL; + const struct netsnmp_ep *bind_addr; + int rc, flags = 0; + + t = netsnmp_udp6_transport_init(ep, local); + if (NULL == t) return NULL; -#endif /* NETSNMP_NO_LISTEN_SUPPORT */ - } else { + + if (local) { + bind_addr = ep; + flags |= NETSNMP_TSPEC_LOCAL; + +#ifndef NETSNMP_NO_SYSTEMD /* - * This is a client session. Save the address in the - * transport-specific data pointer for later use by netsnmp_udp6_send. + * Maybe the socket was already provided by systemd... */ + t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_DGRAM, -1, + ntohs(ep->a.sin6.sin6_port)); + if (t->sock >= 0) + flags |= NETSNMP_TSPEC_PREBOUND; +#endif + } + else + bind_addr = src_addr; - t->data = malloc(sizeof(netsnmp_indexed_addr_pair)); - if (t->data == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->data, addr, sizeof(struct sockaddr_in6)); - t->data_length = sizeof(netsnmp_indexed_addr_pair); - t->remote = (unsigned char*)malloc(18); - if (t->remote == NULL) { - netsnmp_socketbase_close(t); - netsnmp_transport_free(t); - return NULL; - } - memcpy(t->remote, addr->sin6_addr.s6_addr, 16); - t->remote[16] = (ntohs(addr->sin6_port) & 0xff00) >> 8; - t->remote[17] = (ntohs(addr->sin6_port) & 0x00ff) >> 0; - t->remote_length = 18; + if (-1 == t->sock) + t->sock = netsnmp_udp6_transport_socket(flags); + if (t->sock < 0) { + netsnmp_transport_free(t); + return NULL; } /* - * 16-bit length field, 8 byte UDP header, 40 byte IPv6 header. + * If we've been given an address to bind to, then bind to it. + * Otherwise the OS will use "something sensible". */ + if (NULL == bind_addr) + return t; - t->msgMaxSize = 0xffff - 8 - 40; - t->f_recv = netsnmp_udp6_recv; - t->f_send = netsnmp_udp6_send; - t->f_close = netsnmp_socketbase_close; - t->f_accept = NULL; - t->f_fmtaddr = netsnmp_udp6_fmtaddr; + rc = netsnmp_udp6_transport_bind(t, bind_addr, flags); + if (rc) { + netsnmp_transport_free(t); + t = NULL; + } + else if (!local) + netsnmp_udp6_transport_get_bound_addr(t); return t; } +/* + * Open a UDP/IPv6-based transport for SNMP. Local is TRUE if addr is the + * local address to bind to (i.e. this is a server-type session); otherwise + * addr is the remote address to send things to. + */ + +netsnmp_transport * +netsnmp_udp6_transport(const struct netsnmp_ep *ep, int local) +{ + struct netsnmp_ep client_ep; + const char *client_addr; + + memset(&client_ep, 0, sizeof(client_ep)); + client_ep.a.sin6.sin6_family = AF_INET6; + + if (local) + goto out; + + client_addr = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_LIB_CLIENT_ADDR); + if (!client_addr) + goto out; + + if (netsnmp_sockaddr_in6_3(&client_ep, client_addr, ":0") < 0) + snmp_log(LOG_ERR, "Parsing clientaddr %s failed\n", client_addr); + +out: + return netsnmp_udp6_transport_with_source(ep, local, &client_ep); +} + #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) /* @@ -321,6 +497,7 @@ typedef struct com2Sec6Entry_s { struct com2Sec6Entry_s *next; struct in6_addr network; struct in6_addr mask; + int negate; const char community[1]; } com2Sec6Entry; @@ -336,6 +513,7 @@ create_com2Sec6Entry(const struct addrinfo* const run, const size_t contextNameLen, const char* const community, const size_t communityLen, + int negate, com2Sec6Entry** const begin, com2Sec6Entry** const end) { @@ -393,6 +571,7 @@ create_com2Sec6Entry(const struct addrinfo* const run, memcpy(&e->network, &run_addr->sin6_addr, sizeof(struct in6_addr)); memcpy(&e->mask, mask, sizeof(struct in6_addr)); + e->negate = negate; e->next = NULL; if (*end != NULL) { (*end)->next = e; @@ -407,14 +586,18 @@ create_com2Sec6Entry(const struct addrinfo* const run, void netsnmp_udp6_parse_security(const char *token, char *param) { - char secName[VACMSTRINGLEN + 1]; + /** copy_nword does null term, so we need vars of max size + 2. */ + /** (one for null, one to detect param too long */ + char secName[VACMSTRINGLEN]; /* == VACM_MAX_STRING + 2 */ size_t secNameLen; - char contextName[VACMSTRINGLEN + 1]; + char contextName[VACMSTRINGLEN]; size_t contextNameLen; - char community[COMMUNITY_MAX_LEN + 1]; + char community[COMMUNITY_MAX_LEN + 2];/* overflow + null char */ size_t communityLen; - char source[300]; /* dns-name(253)+/(1)+mask(45)+\0(1) */ + char source[301]; /* !(1)+dns-name(253)+/(1)+mask(45)+\0(1) */ + char *sourcep; struct in6_addr mask; + int negate; /* * Get security, source address/netmask and community strings. @@ -427,8 +610,8 @@ netsnmp_udp6_parse_security(const char *token, char *param) return; } param = copy_nword( param, contextName, sizeof(contextName)); - contextNameLen = strlen(contextName) + 1; - if (contextNameLen > VACMSTRINGLEN) { + contextNameLen = strlen(contextName); + if (contextNameLen > VACM_MAX_STRING) { config_perror("context name too long"); return; } @@ -436,19 +619,21 @@ netsnmp_udp6_parse_security(const char *token, char *param) config_perror("missing NAME parameter"); return; } + ++contextNameLen; /* null termination */ param = copy_nword( param, secName, sizeof(secName)); } else { contextNameLen = 0; } - secNameLen = strlen(secName) + 1; - if (secNameLen == 1) { + secNameLen = strlen(secName); + if (secNameLen == 0) { config_perror("empty NAME parameter"); return; - } else if (secNameLen > VACMSTRINGLEN) { + } else if (secNameLen > VACM_MAX_STRING) { config_perror("security name too long"); return; } + ++secNameLen; /* null termination */ if (!param) { config_perror("missing SOURCE parameter"); @@ -473,11 +658,12 @@ netsnmp_udp6_parse_security(const char *token, char *param) config_perror("empty COMMUNITY parameter"); return; } - communityLen = strlen(community) + 1; - if (communityLen >= COMMUNITY_MAX_LEN) { + communityLen = strlen(community); + if (communityLen > COMMUNITY_MAX_LEN) { config_perror("community name too long"); return; } + ++communityLen; /* null termination */ if (communityLen == sizeof(EXAMPLE_COMMUNITY) && memcmp(community, EXAMPLE_COMMUNITY, sizeof(EXAMPLE_COMMUNITY)) == 0) { config_perror("example config COMMUNITY not properly configured"); @@ -496,9 +682,20 @@ netsnmp_udp6_parse_security(const char *token, char *param) if (isdefault) { memset(mask.s6_addr, '\0', sizeof(mask.s6_addr)); + negate = 0; + sourcep = NULL; /* gcc gets confused about sourcep being used */ } else { + char *strmask; + if (*source == '!') { + negate = 1; + sourcep = source + 1; + } else { + negate = 0; + sourcep = source; + } + /* Split the source/netmask parts */ - char *strmask = strchr(source, '/'); + strmask = strchr(sourcep, '/'); if (strmask != NULL) /* Mask given. */ *strmask++ = '\0'; @@ -506,7 +703,7 @@ netsnmp_udp6_parse_security(const char *token, char *param) /* Try to interpret the mask */ if (strmask == NULL || *strmask == '\0') { /* No mask was given. Assume /128 */ - memset(mask.s6_addr, '\xff', sizeof(mask.s6_addr)); + memset(mask.s6_addr, 0xff, sizeof(mask.s6_addr)); } else { /* Try to interpret mask as a "number of 1 bits". */ char* cp; @@ -515,9 +712,10 @@ netsnmp_udp6_parse_security(const char *token, char *param) if (0 <= masklength && masklength <= 128) { const int j = masklength / 8; const int jj = masklength % 8; - memset(mask.s6_addr, '\xff', j); + + memset(mask.s6_addr, 0xff, j); if (j < 16) { - mask.s6_addr[j] = ((uint8_t)~0U << (8 - jj)); + mask.s6_addr[j] = (0xffu << (8 - jj)); memset(mask.s6_addr + j + 1, '\0', 15 - j); } } else { @@ -543,14 +741,22 @@ netsnmp_udp6_parse_security(const char *token, char *param) if (isdefault) { memset(&pton_addr.sin6_addr.s6_addr, '\0', sizeof(struct in6_addr)); - } else if (inet_pton(AF_INET6, source, &pton_addr.sin6_addr) != 1) { - /* Nope, wasn't a numeric address. Must be a hostname. */ -#if HAVE_GETADDRINFO + } else if (inet_pton(AF_INET6, sourcep, &pton_addr.sin6_addr) != 1) { + /* Nope, wasn't a numeric IPv6 address. Must be IPv4 or a hostname. */ + + /* Try interpreting as dotted quad - IPv4 */ + struct in_addr network; + if (inet_pton(AF_INET, sourcep, &network) > 0){ + /* Yes, it's IPv4 - so it's already parsed and we can return. */ + DEBUGMSGTL(("com2sec6", "IPv4 detected for IPv6 parser. Skipping.\n")); + return; + } +#ifdef HAVE_GETADDRINFO int gai_error; hints.ai_family = AF_INET6; hints.ai_socktype = SOCK_DGRAM; - gai_error = netsnmp_getaddrinfo(source, NULL, &hints, &res); + gai_error = netsnmp_getaddrinfo(sourcep, NULL, &hints, &res); if (gai_error != 0) { config_perror(gai_strerror(gai_error)); return; @@ -577,7 +783,7 @@ netsnmp_udp6_parse_security(const char *token, char *param) create_com2Sec6Entry(run, &mask, secName, secNameLen, contextName, contextNameLen, - community, communityLen, + community, communityLen, negate, &begin, &end); if (failed) { @@ -595,7 +801,7 @@ netsnmp_udp6_parse_security(const char *token, char *param) com2Sec6ListLast = end; } } -#if HAVE_GETADDRINFO +#ifdef HAVE_GETADDRINFO if (res != &hints) freeaddrinfo(res); #endif @@ -703,6 +909,14 @@ netsnmp_udp6_getSecName(void *opaque, int olength, ok = 0; if (ok) { DEBUGMSG(("netsnmp_udp6_getSecName", "... SUCCESS\n")); + if (c->negate) { + /* + * If we matched a negative entry, then we are done - claim that we + * matched nothing. + */ + DEBUGMSG(("netsnmp_udp6_getSecName", "... \n")); + break; + } if (secName != NULL) { *secName = c->secName; *contextName = c->contextName; @@ -726,15 +940,23 @@ netsnmp_transport * netsnmp_udp6_create_tstring(const char *str, int local, const char *default_target) { - struct sockaddr_in6 addr; + struct netsnmp_ep ep; - if (netsnmp_sockaddr_in6_2(&addr, str, default_target)) { - return netsnmp_udp6_transport(&addr, local); + if (netsnmp_sockaddr_in6_3(&ep, str, default_target)) { + return netsnmp_udp6_transport(&ep, local); } else { return NULL; } } +netsnmp_transport * +netsnmp_udp6_create_tspec(netsnmp_tdomain_spec *tspec) +{ + netsnmp_transport *t = netsnmp_udpipv6base_tspec_transport(tspec); + return t; + +} + /* * See: @@ -746,17 +968,13 @@ netsnmp_udp6_create_tstring(const char *str, int local, */ netsnmp_transport * -netsnmp_udp6_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_udp6_create_ostring(const void *o, size_t o_len, int local) { - struct sockaddr_in6 addr; + struct netsnmp_ep ep; - if (o_len == 18) { - memset((u_char *) & addr, 0, sizeof(struct sockaddr_in6)); - addr.sin6_family = AF_INET6; - memcpy((u_char *) & (addr.sin6_addr.s6_addr), o, 16); - addr.sin6_port = htons((o[16] << 8) + o[17]); - return netsnmp_udp6_transport(&addr, local); - } + memset(&ep, 0, sizeof(ep)); + if (netsnmp_ipv6_ostring_to_sockaddr(&ep.a.sin6, o, o_len)) + return netsnmp_udp6_transport(&ep, local); return NULL; } @@ -766,8 +984,8 @@ netsnmp_udpipv6_ctor(void) { udp6Domain.name = netsnmp_UDPIPv6Domain; udp6Domain.name_length = sizeof(netsnmp_UDPIPv6Domain) / sizeof(oid); - udp6Domain.f_create_from_tstring = NULL; udp6Domain.f_create_from_tstring_new = netsnmp_udp6_create_tstring; + udp6Domain.f_create_from_tspec = netsnmp_udp6_create_tspec; udp6Domain.f_create_from_ostring = netsnmp_udp6_create_ostring; udp6Domain.prefix = (const char**)calloc(5, sizeof(char *)); udp6Domain.prefix[0] = "udp6"; diff --git a/snmplib/transports/snmpUDPsharedDomain.c b/snmplib/transports/snmpUDPsharedDomain.c new file mode 100644 index 0000000..bc0c9fe --- /dev/null +++ b/snmplib/transports/snmpUDPsharedDomain.c @@ -0,0 +1,466 @@ +/* UDPshared transport support functions + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. + */ + +#include + +#include +#include "snmpIPBaseDomain.h" +#include + +#include +#include +#include +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#else +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#include + +#include +#include +#include +#include + +#include +#include +#include + +netsnmp_feature_require(transport_cache); + +oid netsnmpUDPsharedDomain[] = { 1,3,6,1,2,1,100,1,999 }; /** made up */ +size_t netsnmpUDPsharedDomain_len = OID_LENGTH(netsnmpUDPsharedDomain); + +/* *************************************************************************** + */ +static int +_udpshared_close(netsnmp_transport *t) +{ + netsnmp_transport *b = t? t->base_transport : NULL; + + DEBUGMSGTL(("udpshared:close", "%p/%p\n", t,b )); + + /** we don't really have a socket - base transport does */ + if (NULL == t || NULL == b) + return -1; + + t->base_transport = NULL; + t->sock = -1; /* we just had a copy of base's fd */ + + /** remove base transport. if it is still in use, return. */ + if (netsnmp_transport_cache_remove(b) == 1) + DEBUGMSGTL(("udpshared:close", "keeping socket open for %d user(s)\n", + b->local_length)); + else + b->f_close(b); /** close base transport */ + + return 0; +} + +static int +_udpshared_recv(netsnmp_transport *t, void *buf, int size, + void **opaque, int *olength) +{ + if (NULL == t || NULL == t->base_transport) + return -1; + + return t->base_transport->f_recv(t->base_transport, buf, size, opaque, + olength); +} + +static int +_udpshared_send(netsnmp_transport *t, const void *buf, int size, + void **opaque, int *olength) +{ + void *_opaque, **_opaque_p = &_opaque; + int _olength, *_olength_p = &_olength; + + if (NULL == t || NULL == t->base_transport) + return -1; + + /* + * opaque points to an address pair to use to send, overriding the + * address pair in the transport. So if no address was specified by + * the caller, use the udpshared transport address, overriding the + * empty base_transport address. + */ + if (NULL == opaque || NULL == *opaque) { + _opaque = t->data; + _olength = t->data_length; + } else { + _opaque_p = opaque; + _olength_p = olength; + } + return t->base_transport->f_send(t->base_transport, buf, size, _opaque_p, + _olength_p); +} + +static char * +_udpshared_fmtaddr(netsnmp_transport *t, const void *data, int len) +{ + if (NULL == t || NULL == t->base_transport || + NULL == t->base_transport->f_fmtaddr) + return strdup(""); + + return t->base_transport->f_fmtaddr(t->base_transport, data, len); +} + +static int +_setup_session(netsnmp_transport *t, netsnmp_session *session) +{ + if (NULL == t || NULL == session) + return -1; + + session->flags |= SNMP_FLAGS_SHARED_SOCKET; + + return 0; +} + +static netsnmp_transport * +_transport_common(netsnmp_transport *t) +{ + void *save_data; + int save_data_len; + + DEBUGTRACETOK("9:udpshared"); + + if (NULL == t) + return NULL; + + /* + * t->data contains remote addr, which can/will vary, so don't + * copy it to base transport + */ + save_data = t->data; + save_data_len = t->data_length; + t->data = NULL; + t->data_length = 0; + + /** save base transport for clients; need in send/recv functions later */ + t->base_transport = netsnmp_transport_copy(t); + if (NULL == t->base_transport) { + free(save_data); + netsnmp_transport_free(t); + return NULL; + } + + /** restore remote addr */ + t->data = save_data; + t->data_length = save_data_len; + + /** Set UDPsharedDomain specifics */ + t->domain = netsnmpUDPsharedDomain; + t->domain_length = netsnmpUDPsharedDomain_len; + + t->f_recv = _udpshared_recv; + t->f_send = _udpshared_send; + t->f_close = _udpshared_close; + t->f_fmtaddr = _udpshared_fmtaddr; + t->f_setup_session = _setup_session; + t->flags = NETSNMP_TRANSPORT_FLAG_SHARED; + if (t->base_transport->domain == netsnmpUDPDomain) + t->f_get_taddr = netsnmp_ipv4_get_taddr; + else if (t->base_transport->domain == netsnmp_UDPIPv6Domain) + t->f_get_taddr = netsnmp_ipv6_get_taddr; + else + netsnmp_assert(0); + + return t; +} + +netsnmp_transport * +netsnmp_udpshared_transport(const struct netsnmp_ep *ep, int local) +{ + netsnmp_transport *t = NULL; + + t = netsnmp_udp_transport(ep, local); + if (NULL == t) + return NULL; + + t = _transport_common(t); + + return t; +} + +netsnmp_transport * +netsnmp_udpshared_transport_with_source(const struct netsnmp_ep *ep, + int flags, + const struct netsnmp_ep *src_addr) +{ + netsnmp_transport *t = NULL, *b = NULL; + int local = flags & NETSNMP_TSPEC_LOCAL; + + DEBUGMSGTL(("udpshared:create", "from addr with source\n")); + + /** init common parts of parent transport */ + t = netsnmp_udpipv4base_transport_init(ep, local); + if (NULL == t) + return NULL; + + if (!_transport_common(t)) + return NULL; + + if (!local && src_addr) { + /** check for existing base transport */ + b = netsnmp_transport_cache_get(PF_INET, SOCK_DGRAM, local, + (const void *)src_addr); + if (NULL != b && NULL != b->local) { + /* + * uh-oh. we've assumed sharedudp is just for clients, and we're + * using local_length as a reference count. + */ + snmp_log(LOG_ERR, + "sharedudp transport is only for client/remote\n"); + netsnmp_transport_free(t); + return NULL; + } + } + + /** if no base transport found, create one */ + if (NULL == b) { + b = netsnmp_udp_transport_with_source(ep, local, src_addr); + if (NULL == b) { + netsnmp_transport_free(t); + return NULL; + } + } + ++b->local_length; /* reference count */ + t->base_transport = b; + t->msgMaxSize = b->msgMaxSize; + t->flags |= NETSNMP_TRANSPORT_FLAG_SHARED; + + /** get local socket address */ + if (!local) { + t->sock = b->sock; + netsnmp_udpipv4base_transport_get_bound_addr(t); + } + + /** cache base transport for future use */ + if (!local && src_addr && 1 == b->local_length) { + netsnmp_transport_cache_save(PF_INET, SOCK_DGRAM, local, + (const void *)src_addr, b); + } + + return t; +} + +#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN + +/* + * Open a shared UDP transport for SNMP. Local is TRUE if addr is the local + * address to bind to (i.e. this is a server-type session); otherwise addr is + * the remote address to send things to. + */ +netsnmp_transport * +netsnmp_udpshared6_transport(const struct netsnmp_ep *ep, int local) +{ + netsnmp_transport *t = NULL; + + t = netsnmp_udp6_transport(ep, local); + if (NULL != t) + t = _transport_common(t); + + return t; +} + +netsnmp_transport * +netsnmp_udpshared6_transport_with_source(const struct netsnmp_ep *ep, + int flags, + const struct netsnmp_ep *src_addr6) +{ + netsnmp_transport *t = NULL, *b = NULL; + int local = flags & NETSNMP_TSPEC_LOCAL; + + DEBUGMSGTL(("udpshared:create", "from addr6 with source\n")); + + /** init common parts of parent transport */ + t = netsnmp_udp6_transport_init(ep, local); + if (NULL == t) + return NULL; + + if (!_transport_common(t)) + return NULL; + + if (!local && src_addr6) { + /** check for existing base transport */ + b = netsnmp_transport_cache_get(PF_INET6, SOCK_DGRAM, local, + (const void *)src_addr6); + if (NULL != b && NULL != b->local) { + /* + * uh-oh. we've assumed sharedudp is just for clients, and we're + * using local_length as a reference count. + */ + snmp_log(LOG_ERR, + "sharedudp transport is only for client/remote\n"); + netsnmp_transport_free(t); + return NULL; + } + } + + /** if no base transport found, create one */ + if (NULL == b) { + b = netsnmp_udp6_transport_with_source(ep, local, src_addr6); + if (NULL == b) { + netsnmp_transport_free(t); + return NULL; + } + } + ++b->local_length; /* reference count */ + t->base_transport = b; + t->flags |= NETSNMP_TRANSPORT_FLAG_SHARED; + + /** get local socket address */ + if (!local) { + t->sock = b->sock; + netsnmp_udp6_transport_get_bound_addr(t); + } + + /** cache base transport for future use */ + if (!local && src_addr6 && 1 == b->local_length) { + netsnmp_transport_cache_save(PF_INET6, SOCK_DGRAM, local, + (const void *)src_addr6, b); + } + + return t; +} +#endif /* NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ + +netsnmp_transport * +netsnmp_udpshared_create_ostring(const void *o, size_t o_len, int local) +{ + struct netsnmp_ep ep; + + DEBUGMSGTL(("udpshared:create", "from ostring\n")); + + memset(&ep, 0, sizeof(ep)); + if (netsnmp_ipv4_ostring_to_sockaddr(&ep.a.sin, o, o_len)) + return netsnmp_udpshared_transport(&ep, local); +#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN + else if (netsnmp_ipv6_ostring_to_sockaddr(&ep.a.sin6, o, o_len)) + return netsnmp_udpshared6_transport(&ep, local); +#endif + return NULL; +} + +netsnmp_transport * +netsnmp_udpshared_create_tstring(const char *str, int isserver, + const char *default_target) +{ + struct netsnmp_ep ep; + netsnmp_transport *t; + + DEBUGMSGTL(("udpshared:create", "from tstring %s\n", str)); + + if (netsnmp_sockaddr_in3(&ep, str, default_target)) + t = netsnmp_udpshared_transport(&ep, isserver); +#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN + else if (netsnmp_sockaddr_in6_3(&ep, str, default_target)) + t = netsnmp_udpshared6_transport(&ep, isserver); +#endif + else + return NULL; + + return t; +} + +static netsnmp_transport * +_tspec_v4(const struct netsnmp_ep *ep, netsnmp_tdomain_spec *tspec) +{ + int local = tspec->flags & NETSNMP_TSPEC_LOCAL; + + if (NULL != tspec->source) { + struct netsnmp_ep src_addr; + + /** get sockaddr from source */ + if (!netsnmp_sockaddr_in3(&src_addr, tspec->source, NULL)) + return NULL; + return netsnmp_udpshared_transport_with_source(ep, local, &src_addr); + } + + /** no source and default client address ok */ + return netsnmp_udpshared_transport(ep, local); +} + +#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN +static netsnmp_transport * +_tspec_v6(const struct netsnmp_ep *ep, netsnmp_tdomain_spec *tspec) +{ + int local = tspec->flags & NETSNMP_TSPEC_LOCAL; + + if (NULL != tspec->source) { + struct netsnmp_ep src_addr; + + /** get sockaddr from source */ + if (!netsnmp_sockaddr_in6_3(&src_addr, tspec->source, NULL)) + return NULL; + return netsnmp_udpshared6_transport_with_source(ep, local, &src_addr); + } + + /** no source and default client address ok */ + return netsnmp_udpshared6_transport(ep, local); +} +#endif /* NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ + +netsnmp_transport * +netsnmp_udpshared_create_tspec(netsnmp_tdomain_spec *tspec) +{ + struct netsnmp_ep ep; + + DEBUGMSGTL(("udpshared:create", "from tspec\n")); + + if (NULL == tspec) + return NULL; + + if (netsnmp_sockaddr_in3(&ep, tspec->target, tspec->default_target)) + return _tspec_v4(&ep, tspec); +#ifdef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN + else if (netsnmp_sockaddr_in6_3(&ep, tspec->target, tspec->default_target)) + return _tspec_v6(&ep, tspec); +#endif + + return NULL; +} + +void +netsnmp_udpshared_ctor(void) +{ + static netsnmp_tdomain domain; + static int done = 0; + + if (done) + return; + done = 1; + + domain.name = netsnmpUDPsharedDomain; + domain.name_length = netsnmpUDPsharedDomain_len; + + domain.prefix = (const char**)calloc(2, sizeof(char *)); + domain.prefix[0] = "udpshared"; + + domain.f_create_from_tstring_new = netsnmp_udpshared_create_tstring; + domain.f_create_from_tspec = netsnmp_udpshared_create_tspec; + domain.f_create_from_ostring = netsnmp_udpshared_create_ostring; + + netsnmp_tdomain_register(&domain); +} diff --git a/snmplib/transports/snmpUnixDomain.c b/snmplib/transports/snmpUnixDomain.c index 47dffc1..fb2f1af 100644 --- a/snmplib/transports/snmpUnixDomain.c +++ b/snmplib/transports/snmpUnixDomain.c @@ -9,25 +9,21 @@ #include #include -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif -#if HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_SOCKET_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif - #include #include #include @@ -37,8 +33,12 @@ #include /* mkdirhier */ #include -netsnmp_feature_child_of(transport_unix_socket_all, transport_all) -netsnmp_feature_child_of(unix_socket_paths, transport_unix_socket_all) +#ifndef NETSNMP_NO_SYSTEMD +#include +#endif + +netsnmp_feature_child_of(transport_unix_socket_all, transport_all); +netsnmp_feature_child_of(unix_socket_paths, transport_unix_socket_all); #ifndef NETSNMP_STREAM_QUEUE_LEN #define NETSNMP_STREAM_QUEUE_LEN 5 @@ -73,16 +73,14 @@ typedef struct _sockaddr_un_pair { */ static char * -netsnmp_unix_fmtaddr(netsnmp_transport *t, void *data, int len) +netsnmp_unix_fmtaddr(netsnmp_transport *t, const void *data, int len) { - struct sockaddr_un *to = NULL; + const struct sockaddr_un *to = NULL; - if (data != NULL) { - to = (struct sockaddr_un *) data; - } else if (t != NULL && t->data != NULL) { - to = &(((sockaddr_un_pair *) t->data)->server); - len = SUN_LEN(to); - } + if (data != NULL) + to = (const struct sockaddr_un *) data; + else if (t != NULL && t->data != NULL) + to = &(((const sockaddr_un_pair *) t->data)->server); if (to == NULL) { /* * "Local IPC" is the Posix.1g term for Unix domain protocols, @@ -97,15 +95,20 @@ netsnmp_unix_fmtaddr(netsnmp_transport *t, void *data, int len) */ return strdup("Local IPC: abstract"); } else { - char *tmp = (char *) malloc(16 + len); - if (tmp != NULL) { - sprintf(tmp, "Local IPC: %s", to->sun_path); - } + char *tmp; + + if (asprintf(&tmp, "Local IPC: %s", to->sun_path) < 0) + tmp = NULL; return tmp; } } - +static void +netsnmp_unix_get_taddr(netsnmp_transport *t, void **addr, size_t *addr_len) +{ + *addr_len = t->remote_length; + *addr = netsnmp_memdup(t->remote, *addr_len); +} /* * You can write something into opaque that will subsequently get passed back @@ -159,7 +162,7 @@ netsnmp_unix_recv(netsnmp_transport *t, void *buf, int size, static int -netsnmp_unix_send(netsnmp_transport *t, void *buf, int size, +netsnmp_unix_send(netsnmp_transport *t, const void *buf, int size, void **opaque, int *olength) { int rc = -1; @@ -290,11 +293,12 @@ void netsnmp_unix_dont_create_path(void) */ netsnmp_transport * -netsnmp_unix_transport(struct sockaddr_un *addr, int local) +netsnmp_unix_transport(const struct sockaddr_un *addr, int local) { netsnmp_transport *t = NULL; sockaddr_un_pair *sup = NULL; int rc = 0; + int socket_initialized = 0; #ifdef NETSNMP_NO_LISTEN_SUPPORT /* SPECIAL CIRCUMSTANCE: We still want AgentX to be able to operate, @@ -313,7 +317,7 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local) } DEBUGIF("netsnmp_unix") { - char *str = netsnmp_unix_fmtaddr(NULL, (void *)addr, + char *str = netsnmp_unix_fmtaddr(NULL, addr, sizeof(struct sockaddr_un)); DEBUGMSGTL(("netsnmp_unix", "open %s %s\n", local ? "local" : "remote", str)); @@ -333,7 +337,18 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local) t->data_length = sizeof(sockaddr_un_pair); sup = (sockaddr_un_pair *) t->data; - t->sock = socket(PF_UNIX, SOCK_STREAM, 0); +#ifndef NETSNMP_NO_SYSTEMD + /* + * Maybe the socket was already provided by systemd... + */ + if (local) { + t->sock = netsnmp_sd_find_unix_socket(SOCK_STREAM, 1, addr->sun_path); + if (t->sock >= 0) + socket_initialized = 1; + } +#endif + if (!socket_initialized) + t->sock = socket(PF_UNIX, SOCK_STREAM, 0); if (t->sock < 0) { netsnmp_transport_free(t); return NULL; @@ -342,13 +357,12 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local) t->flags = NETSNMP_TRANSPORT_FLAG_STREAM; if (local) { - t->local = (u_char *)malloc(strlen(addr->sun_path)); + t->local_length = strlen(addr->sun_path); + t->local = strdup(addr->sun_path); if (t->local == NULL) { netsnmp_transport_free(t); return NULL; } - memcpy(t->local, addr->sun_path, strlen(addr->sun_path)); - t->local_length = strlen(addr->sun_path); /* * This session is inteneded as a server, so we must bind to the given @@ -357,25 +371,27 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local) t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN; - unlink(addr->sun_path); - rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr)); - - if (rc != 0 && errno == ENOENT && create_path) { - rc = mkdirhier(addr->sun_path, create_mode, 1); + if (!socket_initialized) { + unlink(addr->sun_path); + rc = bind(t->sock, (const struct sockaddr *)addr, SUN_LEN(addr)); + if (rc != 0 && errno == ENOENT && create_path) { + rc = mkdirhier(addr->sun_path, create_mode, 1); + if (rc != 0) { + netsnmp_unix_close(t); + netsnmp_transport_free(t); + return NULL; + } + rc = bind(t->sock, (const struct sockaddr *)addr, + SUN_LEN(addr)); + } if (rc != 0) { + DEBUGMSGTL(("netsnmp_unix_transport", + "couldn't bind \"%s\", errno %d (%s)\n", + addr->sun_path, errno, strerror(errno))); netsnmp_unix_close(t); netsnmp_transport_free(t); return NULL; } - rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr)); - } - if (rc != 0) { - DEBUGMSGTL(("netsnmp_unix_transport", - "couldn't bind \"%s\", errno %d (%s)\n", - addr->sun_path, errno, strerror(errno))); - netsnmp_unix_close(t); - netsnmp_transport_free(t); - return NULL; } /* @@ -391,27 +407,27 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local) * Now sit here and listen for connections to arrive. */ - rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN); - if (rc != 0) { - DEBUGMSGTL(("netsnmp_unix_transport", - "couldn't listen to \"%s\", errno %d (%s)\n", - addr->sun_path, errno, strerror(errno))); - netsnmp_unix_close(t); - netsnmp_transport_free(t); - return NULL; + if (!socket_initialized) { + rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN); + if (rc != 0) { + DEBUGMSGTL(("netsnmp_unix_transport", + "couldn't listen to \"%s\", errno %d (%s)\n", + addr->sun_path, errno, strerror(errno))); + netsnmp_unix_close(t); + netsnmp_transport_free(t); + return NULL; + } } - } else { - t->remote = (u_char *)malloc(strlen(addr->sun_path)); + t->remote_length = strlen(addr->sun_path); + t->remote = strdup(addr->sun_path); if (t->remote == NULL) { netsnmp_transport_free(t); return NULL; } - memcpy(t->remote, addr->sun_path, strlen(addr->sun_path)); - t->remote_length = strlen(addr->sun_path); - rc = connect(t->sock, (struct sockaddr *) addr, - sizeof(struct sockaddr_un)); + rc = connect(t->sock, (const struct sockaddr *)addr, + sizeof(struct sockaddr_un)); if (rc != 0) { DEBUGMSGTL(("netsnmp_unix_transport", "couldn't connect to \"%s\", errno %d (%s)\n", @@ -438,12 +454,13 @@ netsnmp_unix_transport(struct sockaddr_un *addr, int local) * is equal to the maximum legal size of an SNMP message). */ - t->msgMaxSize = 0x7fffffff; + t->msgMaxSize = SNMP_MAX_PACKET_LEN; t->f_recv = netsnmp_unix_recv; t->f_send = netsnmp_unix_send; t->f_close = netsnmp_unix_close; t->f_accept = netsnmp_unix_accept; t->f_fmtaddr = netsnmp_unix_fmtaddr; + t->f_get_taddr = netsnmp_unix_get_taddr; return t; } @@ -476,14 +493,14 @@ netsnmp_unix_create_tstring(const char *string, int local, netsnmp_transport * -netsnmp_unix_create_ostring(const u_char * o, size_t o_len, int local) +netsnmp_unix_create_ostring(const void *ostring, size_t o_len, int local) { struct sockaddr_un addr; if (o_len > 0 && o_len < (sizeof(addr.sun_path) - 1)) { addr.sun_family = AF_UNIX; memset(addr.sun_path, 0, sizeof(addr.sun_path)); - strlcpy(addr.sun_path, (const char *)o, sizeof(addr.sun_path)); + strlcpy(addr.sun_path, ostring, sizeof(addr.sun_path)); return netsnmp_unix_transport(&addr, local); } else { if (o_len > 0) { @@ -503,7 +520,6 @@ netsnmp_unix_ctor(void) unixDomain.prefix = (const char**)calloc(2, sizeof(char *)); unixDomain.prefix[0] = "unix"; - unixDomain.f_create_from_tstring = NULL; unixDomain.f_create_from_tstring_new = netsnmp_unix_create_tstring; unixDomain.f_create_from_ostring = netsnmp_unix_create_ostring; diff --git a/snmplib/ucd-snmp-includes.h b/snmplib/ucd-snmp-includes.h index 717cadf..e79e6be 100644 --- a/snmplib/ucd-snmp-includes.h +++ b/snmplib/ucd-snmp-includes.h @@ -4,13 +4,6 @@ #include #include -/* - * uncomment if you don't have in_addr_t in netinet/in.h - */ -/* - * typedef u_int in_addr_t; - */ - #include #include #include diff --git a/snmplib/ucd_compat.c b/snmplib/ucd_compat.c index 64c1e13..16ea576 100644 --- a/snmplib/ucd_compat.c +++ b/snmplib/ucd_compat.c @@ -3,6 +3,8 @@ * previous versions of the UCD library only. */ +#define UCD_COMPATIBLE + #include #include @@ -12,7 +14,9 @@ #include /* for OID O/P format enums */ #include -netsnmp_feature_child_of(ucd_compatibility, libnetsnmp) +#include + +netsnmp_feature_child_of(ucd_compatibility, libnetsnmp); #ifndef NETSNMP_FEATURE_REMOVE_UCD_COMPATIBILITY /* diff --git a/snmplib/vacm.c b/snmplib/vacm.c index c639785..0e24e3c 100644 --- a/snmplib/vacm.c +++ b/snmplib/vacm.c @@ -7,6 +7,11 @@ * 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. + * + * Portions of this file are copyrighted by: + * Copyright (c) 2016 VMware, Inc. All rights reserved. + * Use is subject to license terms specified in the COPYING file + * distributed with the Net-SNMP package. */ /* @@ -17,43 +22,42 @@ #include -#if HAVE_STDLIB_H +#ifdef HAVE_STDLIB_H #include #endif -#if HAVE_STRING_H +#ifdef HAVE_STRING_H #include #else #include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif -#if HAVE_NETINET_IN_H +#ifdef HAVE_NETINET_IN_H #include #endif -#if HAVE_DMALLOC_H -#include -#endif +#include #include #include #include #include +#include /* strlcpy() */ #include #include @@ -177,7 +181,7 @@ vacm_parse_config_view(const char *token, const char *line) len = sizeof(view.viewName); line = read_config_read_octet_string(line, (u_char **) & viewName, &len); - view.viewSubtreeLen = MAX_OID_LEN; + view.viewSubtreeLen = MAX_OID_LEN + 1; line = read_config_read_objid_const(line, (oid **) & viewSubtree, &view.viewSubtreeLen); @@ -439,7 +443,7 @@ netsnmp_view_get(struct vacm_viewEntry *head, const char *viewName, if (glen < 0 || glen > VACM_MAX_STRING) return NULL; view[0] = glen; - strcpy(view + 1, viewName); + strlcpy(view + 1, viewName, sizeof(view) - 1); for (vp = head; vp; vp = vp->next) { if (!memcmp(view, vp->viewName, glen + 1) && viewSubtreeLen >= (vp->viewSubtreeLen - 1)) { @@ -491,6 +495,38 @@ netsnmp_view_get(struct vacm_viewEntry *head, const char *viewName, return vpret; } +/*******************************************************************o-o****** + * netsnmp_view_exists + * + * Check to see if a view with the given name exists. + * + * Parameters: + * viewName - Name of view to check + * + * Returns 0 if the view does not exist. Otherwise, it returns the number + * of OID rows for the given name. + */ +int +netsnmp_view_exists(struct vacm_viewEntry *head, const char *viewName) +{ + struct vacm_viewEntry *vp; + char view[VACMSTRINGLEN]; + int len, count = 0; + + len = (int) strlen(viewName); + if (len < 0 || len > VACM_MAX_STRING) + return 0; + view[0] = len; + strcpy(view + 1, viewName); + DEBUGMSGTL(("9:vacm:view_exists", "checking %s\n", viewName)); + for (vp = head; vp; vp = vp->next) { + if (memcmp(view, vp->viewName, len + 1) == 0) + ++count; + } + + return count; +} + /*******************************************************************o-o****** * vacm_checkSubtree * @@ -522,7 +558,7 @@ netsnmp_view_subtree_check(struct vacm_viewEntry *head, const char *viewName, if (glen < 0 || glen > VACM_MAX_STRING) return VACM_NOTINVIEW; view[0] = glen; - strcpy(view + 1, viewName); + strlcpy(view + 1, viewName, sizeof(view) - 1); DEBUGMSGTL(("9:vacm:checkSubtree", "view %s\n", viewName)); for (vp = head; vp; vp = vp->next) { if (!memcmp(view, vp->viewName, glen + 1)) { @@ -675,7 +711,7 @@ netsnmp_view_create(struct vacm_viewEntry **head, const char *viewName, int cmp, cmp2, glen; glen = (int) strlen(viewName); - if (glen < 0 || glen > VACM_MAX_STRING) + if (glen < 0 || glen > VACM_MAX_STRING || viewSubtreeLen > MAX_OID_LEN) return NULL; vp = (struct vacm_viewEntry *) calloc(1, sizeof(struct vacm_viewEntry)); @@ -689,7 +725,7 @@ netsnmp_view_create(struct vacm_viewEntry **head, const char *viewName, } vp->viewName[0] = glen; - strcpy(vp->viewName + 1, viewName); + strlcpy(vp->viewName + 1, viewName, sizeof(vp->viewName) - 1); vp->viewSubtree[0] = viewSubtreeLen; memcpy(vp->viewSubtree + 1, viewSubtree, viewSubtreeLen * sizeof(oid)); vp->viewSubtreeLen = viewSubtreeLen + 1; @@ -768,7 +804,7 @@ vacm_getGroupEntry(int securityModel, const char *securityName) if (glen < 0 || glen > VACM_MAX_STRING) return NULL; secname[0] = glen; - strcpy(secname + 1, securityName); + strlcpy(secname + 1, securityName, sizeof(secname) - 1); for (vp = groupList; vp; vp = vp->next) { if ((securityModel == vp->securityModel @@ -817,7 +853,7 @@ vacm_createGroupEntry(int securityModel, const char *securityName) gp->securityModel = securityModel; gp->securityName[0] = glen; - strcpy(gp->securityName + 1, securityName); + strlcpy(gp->securityName + 1, securityName, sizeof(gp->securityName) - 1); lg = groupList; og = NULL; @@ -842,7 +878,6 @@ vacm_createGroupEntry(int securityModel, const char *securityName) return gp; } -#ifndef NETSNMP_NO_WRITE_SUPPORT void vacm_destroyGroupEntry(int securityModel, const char *securityName) { @@ -868,7 +903,7 @@ vacm_destroyGroupEntry(int securityModel, const char *securityName) free(vp); return; } -#endif /* NETSNMP_NO_WRITE_SUPPORT */ + void vacm_destroyAllGroupEntries(void) @@ -939,9 +974,9 @@ vacm_getAccessEntry(const char *groupName, return NULL; group[0] = glen; - strcpy(group + 1, groupName); + strlcpy(group + 1, groupName, sizeof(group) - 1); context[0] = clen; - strcpy(context + 1, contextPrefix); + strlcpy(context + 1, contextPrefix, sizeof(context) - 1); for (vp = accessList; vp; vp = vp->next) { if ((securityModel == vp->securityModel || vp->securityModel == SNMP_SEC_MODEL_ANY) @@ -1006,9 +1041,10 @@ vacm_createAccessEntry(const char *groupName, vp->securityModel = securityModel; vp->securityLevel = securityLevel; vp->groupName[0] = glen; - strcpy(vp->groupName + 1, groupName); + strlcpy(vp->groupName + 1, groupName, sizeof(vp->groupName) - 1); vp->contextPrefix[0] = clen; - strcpy(vp->contextPrefix + 1, contextPrefix); + strlcpy(vp->contextPrefix + 1, contextPrefix, + sizeof(vp->contextPrefix) - 1); lp = accessList; while (lp) { @@ -1040,7 +1076,6 @@ vacm_createAccessEntry(const char *groupName, return vp; } -#ifndef NETSNMP_NO_WRITE_SUPPORT void vacm_destroyAccessEntry(const char *groupName, const char *contextPrefix, @@ -1072,7 +1107,6 @@ vacm_destroyAccessEntry(const char *groupName, free(vp); return; } -#endif /* NETSNMP_NO_WRITE_SUPPORT */ void vacm_destroyAllAccessEntries(void) @@ -1146,14 +1180,12 @@ vacm_createViewEntry(const char *viewName, viewSubtreeLen); } -#ifndef NETSNMP_NO_WRITE_SUPPORT void vacm_destroyViewEntry(const char *viewName, oid * viewSubtree, size_t viewSubtreeLen) { netsnmp_view_destroy( &viewList, viewName, viewSubtree, viewSubtreeLen); } -#endif /* NETSNMP_NO_WRITE_SUPPORT */ void vacm_destroyAllViewEntries(void) @@ -1161,3 +1193,163 @@ vacm_destroyAllViewEntries(void) netsnmp_view_clear( &viewList ); } +/* + * vacm simple api + */ + +int +netsnmp_vacm_simple_usm_add(const char *user, int rw, int authLevel, + const char *view, oid *oidView, size_t oidViewLen, + const char *context) +{ + struct vacm_viewEntry *vacmEntry = NULL; + struct vacm_groupEntry *groupEntry = NULL; + struct vacm_accessEntry *accessEntry = NULL; + char *tmp, localContext[VACMSTRINGLEN]; + int exact = 1; /* exact context match */ + + if (NULL == user) + return SNMPERR_GENERR; + + if (authLevel < SNMP_SEC_LEVEL_NOAUTH || + authLevel > SNMP_SEC_LEVEL_AUTHPRIV) + return SNMPERR_GENERR; + + if (NULL != view) { + /* + * if we are given a view name, it is an error if + * - it exists and we have an oid + * - it doesn't exist and we don't have an oid + */ + if (netsnmp_view_exists(viewList, view) != 0) { + if (NULL != oidView || oidViewLen > 0) { + DEBUGMSGTL(("vacm:simple_usm", "can't modify existing view")); + return SNMPERR_GENERR; + } + } else { + if (NULL == oidView || oidViewLen == 0) { + DEBUGMSGTL(("vacm:simple_usm", "can't create view w/out oid")); + return SNMPERR_GENERR; + } + /** try and create view for oid */ + vacmEntry = vacm_createViewEntry(view, oidView, oidViewLen); + if (NULL == vacmEntry) { + DEBUGMSGTL(("vacm:simple_usm", "createViewEntry failed")); + return SNMPERR_GENERR; + } + SNMP_FREE(vacmEntry->reserved); + } + } else if (0 == oidViewLen || NULL == oidView) { + view = "_all_"; /* no oid either, just use _all_ */ + } else { + DEBUGMSGTL(("vacm:simple_usm", "need view name for new views")); + return SNMPERR_GENERR; + } + + /* + * group + * grpv3user usm \"v3user\"\000prefix\000_all_\000_all_\000_all_\000\060" + * vacm_createGroupEntry() also automatically inserts into group list. + */ + groupEntry = vacm_createGroupEntry(SNMP_SEC_MODEL_USM, user); + if (NULL == groupEntry) { + DEBUGMSGTL(("vacm:simple_usm", "createViewEntry failed")); + goto bail; + } + snprintf(groupEntry->groupName, sizeof(groupEntry->groupName)-2, + "grp%.28s", user); + for (tmp=groupEntry->groupName; *tmp; tmp++) + if (!isalnum((unsigned char)(*tmp))) + *tmp = '_'; + groupEntry->storageType = SNMP_STORAGE_PERMANENT; + groupEntry->status = SNMP_ROW_ACTIVE; + SNMP_FREE(groupEntry->reserved); + + /* + * access + * grpv3user myctx usm noauth exact _all_ none none + */ + if (NULL == context) { + localContext[0] = 0; + context = localContext; + } else { + /** check for wildcard in context */ + int contextLen = strlen(context); + if ('*' == context[contextLen - 1]) { + strlcpy(localContext, context, sizeof(localContext)); + localContext[contextLen - 1] = 0; + context = localContext; + exact = 2; /* not exact, have context prefix */ + } + } + accessEntry = vacm_createAccessEntry(groupEntry->groupName, context, + SNMP_SEC_MODEL_USM, authLevel); + if (NULL == accessEntry) { + DEBUGMSGTL(("vacm:simple_usm", "createViewEntry failed")); + goto bail; + } + strlcpy(accessEntry->views[VACM_VIEW_READ], view, + sizeof(accessEntry->views[VACM_VIEW_READ])); + if (0 == rw) + view = "none"; + strlcpy(accessEntry->views[VACM_VIEW_WRITE], view, + sizeof(accessEntry->views[VACM_VIEW_WRITE])); + strlcpy(accessEntry->views[VACM_VIEW_NOTIFY], view, + sizeof(accessEntry->views[VACM_VIEW_NOTIFY])); + + accessEntry->contextMatch = exact; + accessEntry->storageType = SNMP_STORAGE_PERMANENT; + accessEntry->status = SNMP_ROW_ACTIVE; + SNMP_FREE(accessEntry->reserved); + + return SNMPERR_SUCCESS; + +bail: + if (NULL != groupEntry) + vacm_destroyGroupEntry(SNMP_SEC_MODEL_USM, user); + + if (NULL != vacmEntry) + vacm_destroyViewEntry(vacmEntry->viewName+1, vacmEntry->viewSubtree, + vacmEntry->viewSubtreeLen); + + return SNMPERR_GENERR; +} + +int +netsnmp_vacm_simple_usm_del(const char *user, int authLevel, + const char *view, oid *oidView, size_t oidViewLen, + const char *context) +{ + char localContext[VACMSTRINGLEN]; + char group[VACMSTRINGLEN]; + + /* + * only delete simple views (one OID) for which we have an OID. + * never delete '_all_'. + */ + if ((NULL != view) && (NULL != oidView) && (oidViewLen > 0) && + (strcmp(view, "_all_") != 0) && + (netsnmp_view_exists(viewList, view) == 1)) { + vacm_destroyViewEntry(view, oidView, oidViewLen); + } + + vacm_destroyGroupEntry(SNMP_SEC_MODEL_USM, user); + + snprintf(group, sizeof(group)-2, "grp%.28s", user); + if (NULL == context) { + localContext[0] = 0; + context = localContext; + } else { + /** check for wildcard in context */ + int contextLen = strlen(context); + if ('*' == context[contextLen - 1]) { + strlcpy(localContext, context, sizeof(localContext)); + localContext[contextLen - 1] = 0; + context = localContext; + } + } + + vacm_destroyAccessEntry(group, context, SNMP_SEC_MODEL_USM, authLevel); + + return SNMPERR_SUCCESS; +} diff --git a/snmplib/winpipe.c b/snmplib/winpipe.c index bbe37f1..cc57531 100644 --- a/snmplib/winpipe.c +++ b/snmplib/winpipe.c @@ -130,7 +130,7 @@ int create_winpipe_transport(int *pipefds) SOCKET socketpair[2]; struct sockaddr_in socketaddress[2]; - struct timeval waittime = {0, 200000}; + NETSNMP_SELECT_TIMEVAL waittime = {0, 200000}; fd_set readset; if (InitUPDSocket(&socketpair[0], &socketaddress[0])) diff --git a/snmplib/winservice.c b/snmplib/winservice.c index bc27f8c..2ccd465 100644 --- a/snmplib/winservice.c +++ b/snmplib/winservice.c @@ -1,29 +1,25 @@ -/* - * Windows Service related function definitions - * By Raju Krishnappa(raju_krishnappa@yahoo.com) - * - */ +/* Windows Service related function definitions. */ #ifdef WIN32 #include +#include +#include /* calloc() */ +#include /* sprintf() */ #include -#include - -#include /* sprintf */ -#include /* beginthreadex */ +#include /* _beginthreadex() */ #include -#ifdef mingw32 /* MinGW doesn't fully support exception handling. */ +#ifdef mingw32 /* MinGW doesn't fully support exception handling. */ #define TRY if(1) #define LEAVE goto labelFIN -#define FINALLY do { \ -labelFIN: \ - ; \ -} while(0); if(1) +#define FINALLY do { \ +labelFIN: \ + ; \ + } while(0); if(1) #else @@ -31,1080 +27,1123 @@ labelFIN: \ #define LEAVE __leave #define FINALLY __finally -#endif /* mingw32 */ - - -#define CountOf(arr) ( sizeof(arr) / sizeof(arr[0]) ) +#endif /* mingw32 */ #if defined(WIN32) && defined(HAVE_WIN32_PLATFORM_SDK) && !defined(mingw32) #pragma comment(lib, "iphlpapi.lib") -#endif -#if defined(WIN32) && !defined(mingw32) +#endif +#if defined(WIN32) && !defined(mingw32) #ifdef USING_WINEXTDLL_MODULE #pragma comment(lib, "snmpapi.lib") #pragma comment(lib, "mgmtapi.lib") #endif #endif - - /* - * External global variables used here - */ - - /* - * Application Name - * This should be declared by the application, which wants to register as - * windows service - */ -extern LPTSTR app_name_long; +/* + * Error levels returned when registering or unregistering the service + */ +enum service_status { + SERVICE_ERROR_NONE = 0, + SERVICE_ERROR_SCM_OPEN = 1, /* Can not open SCM */ + SERVICE_ERROR_CREATE_SERVICE = 2, /* Can not create service */ + SERVICE_ERROR_CREATE_REGISTRY_ENTRIES = 3, /* Can not create registry entries */ + SERVICE_ERROR_OPEN_SERVICE = 4, /* Can not open service (service does not exist) */ +}; - /* - * Declare global variable - */ +/* + * Define Message catalog ID + * MessageId: DISPLAY_MSG + * MessageText: %1. + */ +enum { DISPLAY_MSG = 0x00000064L }; - /* - * Flag to indicate whether process is running as Service - */ -BOOL g_fRunningAsService = FALSE; +/* + * Hint Value to SCM to wait before sending successive commands to service + */ +enum { SCM_WAIT_INTERVAL = 7000 }; - /* - * Variable to maintain Current Service status - */ -static SERVICE_STATUS ServiceStatus; - /* - * Service Handle - */ -static SERVICE_STATUS_HANDLE hServiceStatus = 0L; +static void WINAPI ServiceMain(DWORD argc, char *argv[]); +static void WINAPI ControlHandler(DWORD dwControl); +static void ProcessServiceStop(void); +static void ProcessServicePause(void); +static void ProcessServiceContinue(void); +static void ProcessServiceInterrogate(void); +static BOOL SetSimpleSecurityAttributes(SECURITY_ATTRIBUTES + *pSecurityAttr); +static void FreeSecurityAttributes(SECURITY_ATTRIBUTES *pSecurityAttr); +static unsigned WINAPI ThreadFunction(void *lpParam); - /* - * Service Table Entry - */ -SERVICE_TABLE_ENTRY ServiceTableEntry[] = { - {NULL, ServiceMain}, /* Service Main function */ - {NULL, NULL} -}; - /* - * Handle to Thread, to implement Pause, Resume and Stop functions - */ -static HANDLE hServiceThread = NULL; /* Thread Handle */ +/* + * External global variables used here + */ - /* - * Holds calling partys Function Entry point, that should start - * when entering service mode - */ -static INT (*ServiceEntryPoint) (INT Argc, LPTSTR Argv[]) = 0L; +/* + * Application Name + * This should be declared by the application, which wants to register as + * windows service + */ +extern char *app_name_long; - /* - * To hold Stop Function address, to be called when STOP request - * received from the SCM - */ -static VOID (*StopFunction) (VOID) = 0L; +/* + * Declare global variable + */ +/* + * Flag to indicate whether process is running as Service + */ +static BOOL g_fRunningAsService; - /* - * To update windows service status to SCM - */ -static BOOL UpdateServiceStatus (DWORD dwStatus, DWORD dwErrorCode, - DWORD dwWaitHint); +/* + * Variable to maintain Current Service status + */ +static SERVICE_STATUS ServiceStatus; - /* - * To Report current service status to SCM - */ -static BOOL ReportCurrentServiceStatus (VOID); +/* + * Service Handle + */ +static SERVICE_STATUS_HANDLE hServiceStatus; -VOID -ProcessError (WORD eventLogType, LPCTSTR pszMessage, int useGetLastError, int quiet); +/* + * Service Table Entry + */ +SERVICE_TABLE_ENTRY ServiceTableEntry[] = { + {NULL, ServiceMain}, /* Service Main function */ + {NULL, NULL} +}; - /* - * To register as Windows Service with SCM(Service Control Manager) - * Input - Service Name, Service Display Name,Service Description and - * Service startup arguments - */ -int -RegisterService (LPCTSTR lpszServiceName, LPCTSTR lpszServiceDisplayName, - LPCTSTR lpszServiceDescription, - InputParams * StartUpArg, int quiet) /* Startup argument to the service */ -{ - TCHAR szServicePath[MAX_PATH]; /* To hold module File name */ - TCHAR MsgErrorString[MAX_STR_SIZE]; /* Message or Error string */ - TCHAR szServiceCommand[MAX_PATH + 9]; /* Command to execute */ - SC_HANDLE hSCManager = NULL; - SC_HANDLE hService = NULL; - TCHAR szRegAppLogKey[] = - _T("SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\"); - TCHAR szRegKey[512]; - HKEY hKey = NULL; /* Key to registry entry */ - HKEY hParamKey = NULL; /* To store startup parameters */ - DWORD dwData; /* Type of logging supported */ - DWORD i, j; /* Loop variables */ - int exitStatus = 0; - GetModuleFileName (NULL, szServicePath, MAX_PATH); - TRY - { +/* + * Handle to Thread, to implement Pause, Resume and Stop functions + */ +static HANDLE hServiceThread = NULL; /* Thread Handle */ - /* - * Open Service Control Manager handle - */ - hSCManager = OpenSCManager (NULL, NULL, SC_MANAGER_CREATE_SERVICE); - if (hSCManager == NULL) - { - ProcessError (EVENTLOG_ERROR_TYPE, _T ("Can't open SCM (Service Control Manager)"), 1, quiet); - exitStatus = SERVICE_ERROR_SCM_OPEN; - LEAVE; - } +/* + * Holds calling partys Function Entry point, that should start + * when entering service mode + */ +static int (*ServiceEntryPoint)(int Argc, char *Argv[]); - /* - * Generate the command to be executed by the SCM - */ - _sntprintf (szServiceCommand, CountOf(szServiceCommand), _T("%s %s"), szServicePath, _T ("-service")); +/* + * To hold Stop Function address, to be called when STOP request + * received from the SCM + */ +static void (*StopFunction)(void); - /* - * Create the desired service - */ - hService = CreateService (hSCManager, lpszServiceName, lpszServiceDisplayName, - SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, - SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, szServiceCommand, - NULL, /* load-order group */ - NULL, /* group member tag */ - NULL, /* dependencies */ - NULL, /* account */ - NULL); /* password */ - if (hService == NULL) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), - _T ("Can't create service"), lpszServiceDisplayName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); - - exitStatus = SERVICE_ERROR_CREATE_SERVICE; - LEAVE; - } - /* - * Create registry entries for the event log - */ - /* - * Create registry Application event log key - */ - _tcscpy (szRegKey, szRegAppLogKey); - _tcscat (szRegKey, lpszServiceName); +/* + * To update windows service status to SCM + */ +static BOOL UpdateServiceStatus(DWORD dwStatus, DWORD dwErrorCode, + DWORD dwWaitHint); - /* - * Create registry key - */ - if (RegCreateKey (HKEY_LOCAL_MACHINE, szRegKey, &hKey) != ERROR_SUCCESS) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), - _T ("is unable to create registry entries"), lpszServiceDisplayName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); - exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; - LEAVE; - } +/* + * To Report current service status to SCM + */ +static BOOL ReportCurrentServiceStatus(void); - /* - * Add Event ID message file name to the 'EventMessageFile' subkey - */ - RegSetValueEx (hKey, _T("EventMessageFile"), 0, REG_EXPAND_SZ, - (CONST BYTE *) szServicePath, - _tcslen (szServicePath) + sizeof (TCHAR)); +void ProcessError(WORD eventLogType, const char *pszMessage, + int useGetLastError, int quiet); - /* - * Set the supported types flags. - */ - dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE; - RegSetValueEx (hKey, _T("TypesSupported"), 0, REG_DWORD, - (CONST BYTE *) & dwData, sizeof (DWORD)); +#ifndef HAVE__BEGINTHREADEX +static uintptr_t +_beginthreadex(void *security, unsigned stack_size, + unsigned (__stdcall *start_address) (void *), void *arglist, + unsigned initflag, unsigned *thrdaddr) +{ + return (uintptr_t) CreateThread(security, stack_size, + (LPTHREAD_START_ROUTINE)start_address, + arglist, initflag, (LPDWORD)thrdaddr); +} - /* - * Close Registry key - */ - RegCloseKey (hKey); +#if 0 +static void +_endthreadex(unsigned retval) +{ + ExitThread(retval); +} +#endif +#endif - /* - * Set Service Description String and save startup parameters if present - */ - if (lpszServiceDescription != NULL || StartUpArg->Argc > 2) - { - /* - * Create Registry Key path - */ - _tcscpy (szRegKey, _T ("SYSTEM\\CurrentControlSet\\Services\\")); - _tcscat (szRegKey, app_name_long); - hKey = NULL; - - /* - * Open Registry key using Create and Set access. - */ - if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_WRITE, - &hKey) != ERROR_SUCCESS) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), - _T ("is unable to create registry entries"), - lpszServiceDisplayName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); +/* + * To register as Windows Service with SCM(Service Control Manager) + * Input - Service Name, Service Display Name,Service Description and + * Service startup arguments + */ +int +RegisterService(const char *lpszServiceName, + const char *lpszServiceDisplayName, + const char *lpszServiceDescription, + InputParams *StartUpArg, int quiet) +{ /* Startup argument to the service */ + char szServicePath[MAX_PATH]; /* To hold module File name */ + char MsgErrorString[1024]; /* Message or Error string */ + char szServiceCommand[MAX_PATH + 9]; /* Command to execute */ + SC_HANDLE hSCManager = NULL; + SC_HANDLE hService = NULL; + static const char szRegAppLogKey[] = + "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\"; + char szRegKey[512]; + HKEY hKey = NULL; /* Key to registry entry */ + HKEY hParamKey = NULL; /* To store startup parameters */ + DWORD dwData; /* Type of logging supported */ + int i, j; /* Loop variables */ + int exitStatus = 0; + GetModuleFileName(NULL, szServicePath, MAX_PATH); + TRY { + + /* + * Open Service Control Manager handle + */ + hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE); + if (hSCManager == NULL) { + ProcessError(EVENTLOG_ERROR_TYPE, + "Can't open SCM (Service Control Manager)", 1, + quiet); + exitStatus = SERVICE_ERROR_SCM_OPEN; + LEAVE; + } + + /* + * Generate the command to be executed by the SCM + */ + snprintf(szServiceCommand, sizeof(szServiceCommand), + "\"%s\" %s", szServicePath, "-service"); + + /* + * Create the desired service + */ + hService = CreateService(hSCManager, lpszServiceName, lpszServiceDisplayName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, szServiceCommand, NULL, /* load-order group */ + NULL, /* group member tag */ + NULL, /* dependencies */ + NULL, /* account */ + NULL); /* password */ + if (hService == NULL) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", "Can't create service", + lpszServiceDisplayName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); + + exitStatus = SERVICE_ERROR_CREATE_SERVICE; + LEAVE; + } + + /* + * Create registry entries for the event log + */ + /* + * Create registry Application event log key + */ + snprintf(szRegKey, sizeof(szRegKey), "%s%s", szRegAppLogKey, + lpszServiceName); + + /* + * Create registry key + */ + if (RegCreateKey(HKEY_LOCAL_MACHINE, szRegKey, &hKey) != + ERROR_SUCCESS) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", + "is unable to create registry entries", + lpszServiceDisplayName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; - LEAVE; - } - - /* - * Create description subkey and the set value - */ - if (lpszServiceDescription != NULL) - { - if (RegSetValueEx (hKey, _T("Description"), 0, REG_SZ, - (CONST BYTE *) lpszServiceDescription, - _tcslen (lpszServiceDescription) + - sizeof (TCHAR)) != ERROR_SUCCESS) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), - _T ("is unable to create registry entries"), - lpszServiceDisplayName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); - exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; - LEAVE; - }; - } - - /* - * Save startup arguments if they are present - */ - if (StartUpArg->Argc > 2) - { - /* - * Create Subkey parameters - */ - if (RegCreateKeyEx - (hKey, _T("Parameters"), 0, NULL, - REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, - &hParamKey, NULL) != ERROR_SUCCESS) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), - _T ("is unable to create registry entries"), - lpszServiceDisplayName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); + LEAVE; + } + + /* + * Add Event ID message file name to the 'EventMessageFile' subkey + */ + RegSetValueEx(hKey, "EventMessageFile", 0, REG_EXPAND_SZ, + (const void *) szServicePath, + strlen(szServicePath) + sizeof(char)); + + /* + * Set the supported types flags. + */ + dwData = + EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | + EVENTLOG_INFORMATION_TYPE; + RegSetValueEx(hKey, "TypesSupported", 0, REG_DWORD, + (const void *) &dwData, sizeof(dwData)); + + /* + * Close Registry key + */ + RegCloseKey(hKey); + + /* + * Set Service Description String and save startup parameters if present + */ + if (lpszServiceDescription != NULL || StartUpArg->Argc > 2) { + /* + * Create Registry Key path + */ + snprintf(szRegKey, sizeof(szRegKey), + "SYSTEM\\CurrentControlSet\\Services\\%s", + app_name_long); + hKey = NULL; + + /* + * Open Registry key using Create and Set access. + */ + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_WRITE, + &hKey) != ERROR_SUCCESS) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", + "is unable to create registry entries", + lpszServiceDisplayName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 1, + quiet); exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; LEAVE; - } - - /* - * Save parameters - */ - - /* - * Loop through arguments - */ - if (quiet) /* Make sure we don't store -quiet arg */ - i = 3; - else - i = 2; - - for (j = 1; i < StartUpArg->Argc; i++, j++) - { - _sntprintf (szRegKey, CountOf(szRegKey), _T("%s%d"), _T ("Param"), j); - - /* - * Create registry key - */ - if (RegSetValueEx - (hParamKey, szRegKey, 0, REG_SZ, - (CONST BYTE *) StartUpArg->Argv[i], - _tcslen (StartUpArg->Argv[i]) + - sizeof (TCHAR)) != ERROR_SUCCESS) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), - _T ("is unable to create registry entries"), - lpszServiceDisplayName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); + } + + /* + * Create description subkey and the set value + */ + if (lpszServiceDescription != NULL) { + if (RegSetValueEx(hKey, "Description", 0, REG_SZ, + (const void *) lpszServiceDescription, + strlen(lpszServiceDescription) + + sizeof(char)) != ERROR_SUCCESS) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", + "is unable to create registry entries", + lpszServiceDisplayName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 1, + quiet); exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; - LEAVE; - }; - } - } - - /* - * Everything is set, delete hKey - */ - RegCloseKey (hParamKey); - RegCloseKey (hKey); - } - - /* - * Ready to log messages - */ + LEAVE; + }; + } + + /* + * Save startup arguments if they are present + */ + if (StartUpArg->Argc > 2) { + /* + * Create Subkey parameters + */ + if (RegCreateKeyEx + (hKey, "Parameters", 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, + &hParamKey, NULL) != ERROR_SUCCESS) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", + "is unable to create registry entries", + lpszServiceDisplayName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 1, + quiet); + exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; + LEAVE; + } - /* - * Successfully registered as service - */ - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), lpszServiceName, - _T ("successfully registered as a service")); + /* + * Save parameters + */ + + /* + * Loop through arguments + */ + if (quiet) /* Make sure we don't store -quiet arg */ + i = 3; + else + i = 2; + + for (j = 1; i < StartUpArg->Argc; i++, j++) { + snprintf(szRegKey, sizeof(szRegKey), "%s%d", "Param", + j); + + /* + * Create registry key + */ + if (RegSetValueEx + (hParamKey, szRegKey, 0, REG_SZ, + (const void *) StartUpArg->Argv[i], + strlen(StartUpArg->Argv[i]) + + sizeof(char)) != ERROR_SUCCESS) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", + "is unable to create registry entries", + lpszServiceDisplayName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, + 1, quiet); + exitStatus = SERVICE_ERROR_CREATE_REGISTRY_ENTRIES; + LEAVE; + }; + } + } + + /* + * Everything is set, delete hKey + */ + RegCloseKey(hParamKey); + RegCloseKey(hKey); + } + + /* + * Ready to log messages + */ + + /* + * Successfully registered as service + */ + snprintf(MsgErrorString, sizeof(MsgErrorString), "%s %s", + lpszServiceName, "successfully registered as a service"); + + /* + * Log message to eventlog + */ + ProcessError(EVENTLOG_INFORMATION_TYPE, MsgErrorString, 0, quiet); + } - /* - * Log message to eventlog - */ - ProcessError (EVENTLOG_INFORMATION_TYPE, MsgErrorString, 0, quiet); - } - - FINALLY - { - if (hSCManager) - CloseServiceHandle (hSCManager); - if (hService) - CloseServiceHandle (hService); - if (hKey) - RegCloseKey (hKey); - if (hParamKey) - RegCloseKey (hParamKey); - } - return (exitStatus); + FINALLY { + if (hSCManager) + CloseServiceHandle(hSCManager); + if (hService) + CloseServiceHandle(hService); + if (hKey) + RegCloseKey(hKey); + if (hParamKey) + RegCloseKey(hParamKey); + } + return (exitStatus); } - /* - * Unregister the service with the Windows SCM - * Input - ServiceName - */ +/* + * Unregister the service with the Windows SCM + * Input - ServiceName + */ int -UnregisterService (LPCTSTR lpszServiceName, int quiet) +UnregisterService(const char *lpszServiceName, int quiet) { - TCHAR MsgErrorString[MAX_STR_SIZE]; /* Message or Error string */ - SC_HANDLE hSCManager = NULL; /* SCM handle */ - SC_HANDLE hService = NULL; /* Service Handle */ - SERVICE_STATUS sStatus; - TCHAR szRegAppLogKey[] = - _T("SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\"); - TCHAR szRegKey[512]; - int exitStatus = 0; -/* HKEY hKey = NULL; ?* Key to registry entry */ - TRY - { - /* - * Open Service Control Manager - */ - hSCManager = OpenSCManager (NULL, NULL, SC_MANAGER_CREATE_SERVICE); - if (hSCManager == NULL) - { - ProcessError (EVENTLOG_ERROR_TYPE, _T ("Can't open SCM (Service Control Manager)"), 1, quiet); - exitStatus = SERVICE_ERROR_SCM_OPEN; - LEAVE; - } - - /* - * Open registered service - */ - hService = OpenService (hSCManager, lpszServiceName, SERVICE_ALL_ACCESS); - if (hService == NULL) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), _T ("Can't open service"), - lpszServiceName); - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); - exitStatus = SERVICE_ERROR_OPEN_SERVICE; - LEAVE; - } - - /* - * Query service status - * If running stop before deleting - */ - if (QueryServiceStatus (hService, &sStatus)) - { - if (sStatus.dwCurrentState == SERVICE_RUNNING - || sStatus.dwCurrentState == SERVICE_PAUSED) - { - ControlService (hService, SERVICE_CONTROL_STOP, &sStatus); - } - }; - + char MsgErrorString[1024]; /* Message or Error string */ + SC_HANDLE hSCManager = NULL; /* SCM handle */ + SC_HANDLE hService = NULL; /* Service Handle */ + SERVICE_STATUS sStatus; + static const char szRegAppLogKey[] = + "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\"; + char szRegKey[512]; + int exitStatus = 0; /* - * Delete the service + * HKEY hKey = NULL; ?* Key to registry entry */ - if (DeleteService (hService) == FALSE) - { - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), _T ("Can't delete service"), - lpszServiceName); - - /* - * Log message to eventlog - */ - ProcessError (EVENTLOG_ERROR_TYPE, MsgErrorString, 0, quiet); - LEAVE; - } - - /* - * Log "Service deleted successfully " message to eventlog - */ - _sntprintf (MsgErrorString, CountOf(MsgErrorString), _T("%s %s"), lpszServiceName, _T ("service deleted")); - ProcessError (EVENTLOG_INFORMATION_TYPE, MsgErrorString, 0, quiet); + TRY { + /* + * Open Service Control Manager + */ + hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE); + if (hSCManager == NULL) { + ProcessError(EVENTLOG_ERROR_TYPE, + "Can't open SCM (Service Control Manager)", 1, + quiet); + exitStatus = SERVICE_ERROR_SCM_OPEN; + LEAVE; + } + + /* + * Open registered service + */ + hService = + OpenService(hSCManager, lpszServiceName, SERVICE_ALL_ACCESS); + if (hService == NULL) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", "Can't open service", lpszServiceName); + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 1, quiet); + exitStatus = SERVICE_ERROR_OPEN_SERVICE; + LEAVE; + } + + /* + * Query service status + * If running stop before deleting + */ + if (QueryServiceStatus(hService, &sStatus)) { + if (sStatus.dwCurrentState == SERVICE_RUNNING + || sStatus.dwCurrentState == SERVICE_PAUSED) { + ControlService(hService, SERVICE_CONTROL_STOP, &sStatus); + } + }; + + /* + * Delete the service + */ + if (DeleteService(hService) == FALSE) { + snprintf(MsgErrorString, sizeof(MsgErrorString), + "%s %s", "Can't delete service", lpszServiceName); + + /* + * Log message to eventlog + */ + ProcessError(EVENTLOG_ERROR_TYPE, MsgErrorString, 0, quiet); + LEAVE; + } + + /* + * Log "Service deleted successfully " message to eventlog + */ + snprintf(MsgErrorString, sizeof(MsgErrorString), "%s %s", + lpszServiceName, "service deleted"); + ProcessError(EVENTLOG_INFORMATION_TYPE, MsgErrorString, 0, quiet); + + /* + * Delete registry entries for EventLog + */ + snprintf(szRegKey, sizeof(szRegKey), "%s%s", szRegAppLogKey, + lpszServiceName); + RegDeleteKey(HKEY_LOCAL_MACHINE, szRegKey); + } /* - * Delete registry entries for EventLog + * Delete the handles */ - _tcscpy (szRegKey, szRegAppLogKey); - _tcscat (szRegKey, lpszServiceName); - RegDeleteKey (HKEY_LOCAL_MACHINE, szRegKey); - } - - /* - * Delete the handles - */ - FINALLY - { - if (hService) - CloseServiceHandle (hService); - if (hSCManager) - CloseServiceHandle (hSCManager); - } - return (exitStatus); + FINALLY { + if (hService) + CloseServiceHandle(hService); + if (hSCManager) + CloseServiceHandle(hSCManager); + } + return (exitStatus); } - /* - * Write a message to the Windows event log. - */ -VOID -WriteToEventLog (WORD wType, LPCTSTR pszFormat, ...) +/* + * Write a message to the Windows event log. + */ +static void +WriteToEventLog(WORD wType, const char *pszFormat, ...) { - TCHAR szMessage[512]; - LPCTSTR LogStr[1]; - va_list ArgList; - HANDLE hEventSource = NULL; - - va_start (ArgList, pszFormat); - _vsntprintf (szMessage, CountOf(szMessage), pszFormat, ArgList); - va_end (ArgList); - LogStr[0] = szMessage; - hEventSource = RegisterEventSource (NULL, app_name_long); - if (hEventSource == NULL) - return; - ReportEvent (hEventSource, wType, 0, - DISPLAY_MSG, - NULL, 1, 0, LogStr, NULL); - DeregisterEventSource (hEventSource); + char szMessage[512]; + const char *LogStr[1]; + va_list ArgList; + HANDLE hEventSource = NULL; + + va_start(ArgList, pszFormat); + vsnprintf(szMessage, sizeof(szMessage), pszFormat, ArgList); + va_end(ArgList); + LogStr[0] = szMessage; + hEventSource = RegisterEventSource(NULL, app_name_long); + if (hEventSource == NULL) + return; + ReportEvent(hEventSource, wType, 0, + DISPLAY_MSG, NULL, 1, 0, LogStr, NULL); + DeregisterEventSource(hEventSource); } - /* - * Pre-process the second command-line argument from the user. - * Service related options are: - * -register - registers the service - * -unregister - unregisters the service - * -service - run as service - * other command-line arguments are ignored here. - * - * Return: Type indicating the option specified - */ -INT -ParseCmdLineForServiceOption (int argc, TCHAR * argv[], int *quiet) +/* + * Pre-process the second command-line argument from the user. + * Service related options are: + * -register - registers the service + * -unregister - unregisters the service + * -service - run as service + * other command-line arguments are ignored here. + * + * Return: Type indicating the option specified + */ +enum net_snmp_cmd_line_action +ParseCmdLineForServiceOption(int argc, char *argv[], int *quiet) { - int nReturn = RUN_AS_CONSOLE; /* default is to run as a console application */ - - if (argc >= 2) - { - - /* - * second argument present - */ - if (lstrcmpi (_T ("-register"), argv[1]) == 0) - { - nReturn = REGISTER_SERVICE; - } - - else if (lstrcmpi (_T ("-unregister"), argv[1]) == 0) - { - nReturn = UN_REGISTER_SERVICE; - } - - else if (lstrcmpi (_T ("-service"), argv[1]) == 0) - { - nReturn = RUN_AS_SERVICE; - } + enum net_snmp_cmd_line_action nReturn = RUN_AS_CONSOLE; /* default is to run as a console application */ + + if (argc >= 2) { + + /* + * second argument present + */ + if (strcasecmp("-register", argv[1]) == 0) { + nReturn = REGISTER_SERVICE; + } + + else if (strcasecmp("-unregister", argv[1]) == 0) { + nReturn = UN_REGISTER_SERVICE; + } + + else if (strcasecmp("-service", argv[1]) == 0) { + nReturn = RUN_AS_SERVICE; + } } - if (argc >= 3) - { - /* - * third argument present - */ - if (lstrcmpi (_T ("-quiet"), argv[2]) == 0) - { - *quiet = 1; + if (argc >= 3) { + /* + * third argument present + */ + if (strcasecmp("-quiet", argv[2]) == 0) { + *quiet = 1; + } } - } - - return nReturn; + + return nReturn; } +/* + * Write error message to event log, console or pop-up window. + * + * If useGetLastError is 1, the last error returned from GetLastError() + * is appended to pszMessage, separated by a ": ". + * + * eventLogType: MessageBox equivalent: + * + * EVENTLOG_INFORMATION_TYPE MB_ICONASTERISK + * EVENTLOG_WARNING_TYPE MB_ICONEXCLAMATION + * EVENTLOG_ERROR_TYPE MB_ICONSTOP + * + */ +void +ProcessError(WORD eventLogType, const char *pszMessage, + int useGetLastError, int quiet) +{ + HANDLE hEventSource = NULL; + char pszMessageFull[1024]; /* Combined pszMessage and GetLastError */ + /* - * Write error message to event log, console or pop-up window. - * - * If useGetLastError is 1, the last error returned from GetLastError() - * is appended to pszMessage, separated by a ": ". - * - * eventLogType: MessageBox equivalent: - * - * EVENTLOG_INFORMATION_TYPE MB_ICONASTERISK - * EVENTLOG_WARNING_TYPE MB_ICONEXCLAMATION - * EVENTLOG_ERROR_TYPE MB_ICONSTOP - * + * If useGetLastError enabled, generate text from GetLastError() and append to + * pszMessageFull */ -VOID -ProcessError (WORD eventLogType, LPCTSTR pszMessage, int useGetLastError, int quiet) -{ - HANDLE hEventSource = NULL; - TCHAR pszMessageFull[MAX_STR_SIZE]; /* Combined pszMessage and GetLastError */ - - /* - * If useGetLastError enabled, generate text from GetLastError() and append to - * pszMessageFull - */ - if (useGetLastError) { - LPTSTR pErrorMsgTemp = NULL; - FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (), - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) & pErrorMsgTemp, 0, NULL); - - _sntprintf (pszMessageFull, CountOf(pszMessageFull), _T("%s: %s"), pszMessage, pErrorMsgTemp); - if (pErrorMsgTemp) { - LocalFree (pErrorMsgTemp); - pErrorMsgTemp = NULL; - } - } - else { - _sntprintf (pszMessageFull, CountOf(pszMessageFull), _T("%s"), pszMessage); - } - - hEventSource = RegisterEventSource (NULL, app_name_long); - if (hEventSource != NULL) { - LPCTSTR LogStr[1]; - LogStr[0] = pszMessageFull; - - if (ReportEvent (hEventSource, - eventLogType, - 0, - DISPLAY_MSG, /* just output the text to the event log */ - NULL, - 1, - 0, - LogStr, - NULL)) { - } - else { - LPTSTR pErrorMsgTemp = NULL; - FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (), - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) & pErrorMsgTemp, 0, NULL); - _ftprintf(stderr,_T("Could NOT lot to Event Log. Error returned from ReportEvent(): %s\n"),pErrorMsgTemp); - if (pErrorMsgTemp) { - LocalFree (pErrorMsgTemp); - pErrorMsgTemp = NULL; - } + if (useGetLastError) { + char *pErrorMsgTemp = NULL; + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &pErrorMsgTemp, 0, NULL); + + snprintf(pszMessageFull, sizeof(pszMessageFull), "%s: %s", + pszMessage, pErrorMsgTemp); + if (pErrorMsgTemp) { + LocalFree(pErrorMsgTemp); + pErrorMsgTemp = NULL; + } + } else { + snprintf(pszMessageFull, sizeof(pszMessageFull), "%s", pszMessage); } - DeregisterEventSource (hEventSource); + + hEventSource = RegisterEventSource(NULL, app_name_long); + if (hEventSource != NULL) { + const char *LogStr[1]; + LogStr[0] = pszMessageFull; + + if (ReportEvent(hEventSource, eventLogType, 0, DISPLAY_MSG, /* just output the text to the event log */ + NULL, 1, 0, LogStr, NULL)) { + } else { + char *pErrorMsgTemp = NULL; + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &pErrorMsgTemp, 0, NULL); + fprintf(stderr, + "Could NOT lot to Event Log. Error returned from ReportEvent(): %s\n", + pErrorMsgTemp); + if (pErrorMsgTemp) { + LocalFree(pErrorMsgTemp); + pErrorMsgTemp = NULL; + } + } + DeregisterEventSource(hEventSource); } - if (quiet) { - _ftprintf(stderr,_T("%s\n"),pszMessageFull); - } - else { - switch (eventLogType) { - case EVENTLOG_INFORMATION_TYPE: - MessageBox (NULL, pszMessageFull, app_name_long, MB_ICONASTERISK); - break; - case EVENTLOG_WARNING_TYPE: - MessageBox (NULL, pszMessageFull, app_name_long, MB_ICONEXCLAMATION); - break; - case EVENTLOG_ERROR_TYPE: - MessageBox (NULL, pszMessageFull, app_name_long, MB_ICONSTOP); - break; - default: - MessageBox (NULL, pszMessageFull, app_name_long, EVENTLOG_WARNING_TYPE); - break; - } + if (quiet) { + fprintf(stderr, "%s\n", pszMessageFull); + } else { + switch (eventLogType) { + case EVENTLOG_INFORMATION_TYPE: + MessageBox(NULL, pszMessageFull, app_name_long, + MB_ICONASTERISK); + break; + case EVENTLOG_WARNING_TYPE: + MessageBox(NULL, pszMessageFull, app_name_long, + MB_ICONEXCLAMATION); + break; + case EVENTLOG_ERROR_TYPE: + MessageBox(NULL, pszMessageFull, app_name_long, MB_ICONSTOP); + break; + default: + MessageBox(NULL, pszMessageFull, app_name_long, + EVENTLOG_WARNING_TYPE); + break; + } } } - /* - * Update current service status. - * Sends the current service status to the SCM. Also updates - * the global service status structure. - */ +/* + * Update current service status. + * Sends the current service status to the SCM. Also updates + * the global service status structure. + */ static BOOL -UpdateServiceStatus (DWORD dwStatus, DWORD dwErrorCode, DWORD dwWaitHint) +UpdateServiceStatus(DWORD dwStatus, DWORD dwErrorCode, DWORD dwWaitHint) { - DWORD static dwCheckpoint = 1; - DWORD dwControls = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PAUSE_CONTINUE; - if (g_fRunningAsService == FALSE) - return FALSE; - ZeroMemory (&ServiceStatus, sizeof (ServiceStatus)); - ServiceStatus.dwServiceType = SERVICE_WIN32; - ServiceStatus.dwCurrentState = dwStatus; - ServiceStatus.dwWaitHint = dwWaitHint; - if (dwErrorCode) - { - ServiceStatus.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR; - ServiceStatus.dwServiceSpecificExitCode = dwErrorCode; + static DWORD dwCheckpoint = 1; + DWORD dwControls = + SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PAUSE_CONTINUE; + if (g_fRunningAsService == FALSE) + return FALSE; + ZeroMemory(&ServiceStatus, sizeof(ServiceStatus)); + ServiceStatus.dwServiceType = SERVICE_WIN32; + ServiceStatus.dwCurrentState = dwStatus; + ServiceStatus.dwWaitHint = dwWaitHint; + if (dwErrorCode) { + ServiceStatus.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR; + ServiceStatus.dwServiceSpecificExitCode = dwErrorCode; } - /* - * special cases that depend on the new state - */ - switch (dwStatus) - { + /* + * special cases that depend on the new state + */ + switch (dwStatus) { case SERVICE_START_PENDING: - dwControls = 0; - break; + dwControls = 0; + break; case SERVICE_RUNNING: case SERVICE_STOPPED: - dwCheckpoint = 0; - break; + dwCheckpoint = 0; + break; } - ServiceStatus.dwCheckPoint = dwCheckpoint++; - ServiceStatus.dwControlsAccepted = dwControls; - return ReportCurrentServiceStatus (); + ServiceStatus.dwCheckPoint = dwCheckpoint++; + ServiceStatus.dwControlsAccepted = dwControls; + return ReportCurrentServiceStatus(); } - /* - * Reports current service status to SCM - */ +/* + * Reports current service status to SCM + */ static BOOL -ReportCurrentServiceStatus () +ReportCurrentServiceStatus() { - return SetServiceStatus (hServiceStatus, &ServiceStatus); + return SetServiceStatus(hServiceStatus, &ServiceStatus); } +/* + * ServiceMain function. + */ +static void WINAPI +ServiceMain(DWORD argc, char *argv[]) +{ + SECURITY_ATTRIBUTES SecurityAttributes; + unsigned threadId; + /* - * ServiceMain function. + * Input arguments */ -VOID WINAPI -ServiceMain (DWORD argc, LPTSTR argv[]) -{ - SECURITY_ATTRIBUTES SecurityAttributes; - unsigned threadId; - - /* - * Input arguments - */ - DWORD ArgCount = 0; - LPTSTR *ArgArray = NULL; - TCHAR szRegKey[512]; - HKEY hParamKey = NULL; - DWORD TotalParams = 0; - DWORD i; - InputParams ThreadInputParams; - - /* - * Build the Input parameters to pass to worker thread - */ - - /* - * SCM sends Service Name as first arg, increment to point - * arguments user specified while starting control agent - */ - - /* - * Read registry parameter - */ - ArgCount = 1; - - /* - * Create registry key path - */ - _sntprintf (szRegKey, CountOf(szRegKey), _T("%s%s\\%s"), - _T ("SYSTEM\\CurrentControlSet\\Services\\"), app_name_long, - _T("Parameters")); - if (RegOpenKeyEx - (HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_ALL_ACCESS, &hParamKey) == ERROR_SUCCESS) - { - - /* - * Read startup configuration information - */ - /* - * Find number of subkeys inside parameters - */ - if (RegQueryInfoKey (hParamKey, NULL, NULL, 0, - NULL, NULL, NULL, &TotalParams, - NULL, NULL, NULL, NULL) == ERROR_SUCCESS) - { - if (TotalParams != 0) - { - ArgCount += TotalParams; - - /* - * Allocate memory to hold strings - */ - ArgArray = calloc(ArgCount, sizeof(ArgArray[0])); - if (ArgArray == 0) - { - WriteToEventLog (EVENTLOG_ERROR_TYPE, - _T ("Resource failure")); - return; + DWORD ArgCount = 0; + char **ArgArray = NULL; + char szRegKey[512]; + HKEY hParamKey = NULL; + DWORD TotalParams = 0; + int i; + InputParams ThreadInputParams; + + /* + * Build the Input parameters to pass to worker thread + */ + + /* + * SCM sends Service Name as first arg, increment to point + * arguments user specified while starting control agent + */ + + /* + * Read registry parameter + */ + ArgCount = 1; + + /* + * Create registry key path + */ + snprintf(szRegKey, sizeof(szRegKey), "%s%s\\%s", + "SYSTEM\\CurrentControlSet\\Services\\", app_name_long, + "Parameters"); + if (RegOpenKeyEx + (HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_ALL_ACCESS, + &hParamKey) == ERROR_SUCCESS) { + + /* + * Read startup configuration information + */ + /* + * Find number of subkeys inside parameters + */ + if (RegQueryInfoKey(hParamKey, NULL, NULL, 0, + NULL, NULL, NULL, &TotalParams, + NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { + if (TotalParams != 0) { + ArgCount += TotalParams; + + /* + * Allocate memory to hold strings + */ + ArgArray = calloc(ArgCount, sizeof(ArgArray[0])); + if (ArgArray == 0) { + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Resource failure"); + return; } - /* - * Copy first argument - */ - ArgArray[0] = _tcsdup (argv[0]); - for (i = 1; i <= TotalParams; i++) - { - DWORD dwErrorcode; - DWORD nSize; - DWORD nRegkeyType; - TCHAR *szValue; - - /* - * Create Subkey value name - */ - _sntprintf (szRegKey, CountOf(szRegKey), _T("%s%d"), _T("Param"), i); - - /* - * Query subkey. - */ - nSize = 0; - dwErrorcode = RegQueryValueEx(hParamKey, szRegKey, NULL, - &nRegkeyType, NULL, &nSize); - if (dwErrorcode == ERROR_SUCCESS) { - if (nRegkeyType == REG_SZ || nRegkeyType == REG_EXPAND_SZ) { - szValue = malloc(nSize + sizeof(szValue[0])); - if (szValue) { - dwErrorcode = RegQueryValueEx(hParamKey, szRegKey, NULL, - &nRegkeyType, (LPBYTE)szValue, &nSize); - if (dwErrorcode == ERROR_SUCCESS) { - szValue[nSize] = 0; - ArgArray[i] = szValue; - } else { - free(szValue); - WriteToEventLog(EVENTLOG_ERROR_TYPE, _T("Querying registry key %s failed: error code %ld"), szRegKey, dwErrorcode); - } - } else - WriteToEventLog(EVENTLOG_ERROR_TYPE, _T("Querying registry key %s failed: out of memory"), szRegKey); + /* + * Copy first argument + */ + ArgArray[0] = strdup(argv[0]); + for (i = 1; i <= TotalParams; i++) { + DWORD dwErrorcode; + DWORD nSize; + DWORD nRegkeyType; + char *szValue; + + /* + * Create Subkey value name + */ + snprintf(szRegKey, sizeof(szRegKey), "%s%d", "Param", + i); + + /* + * Query subkey. + */ + nSize = 0; + dwErrorcode = + RegQueryValueEx(hParamKey, szRegKey, NULL, + &nRegkeyType, NULL, &nSize); + if (dwErrorcode == ERROR_SUCCESS) { + if (nRegkeyType == REG_SZ + || nRegkeyType == REG_EXPAND_SZ) { + szValue = malloc(nSize + sizeof(szValue[0])); + if (szValue) { + dwErrorcode = + RegQueryValueEx(hParamKey, szRegKey, + NULL, &nRegkeyType, + (void *) szValue, + &nSize); + if (dwErrorcode == ERROR_SUCCESS) { + szValue[nSize] = 0; + ArgArray[i] = szValue; + } else { + free(szValue); + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Querying registry key %s failed: error code %ld", + szRegKey, dwErrorcode); + } + } else + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Querying registry key %s failed: out of memory", + szRegKey); + } else + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Type %ld of registry key %s is incorrect", + nRegkeyType, szRegKey); } else - WriteToEventLog(EVENTLOG_ERROR_TYPE, _T("Type %ld of registry key %s is incorrect"), nRegkeyType, szRegKey); - } else - WriteToEventLog(EVENTLOG_ERROR_TYPE, _T("Querying registry key %s failed: error code %ld"), szRegKey, dwErrorcode); - - if (!ArgArray[i]) { - TotalParams = ArgCount = i; - break; - } - } - } - } - RegCloseKey (hParamKey); - } - if (ArgCount == 1) - { - - /* - * No startup args are given - */ - ThreadInputParams.Argc = argc; - ThreadInputParams.Argv = argv; + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Querying registry key %s failed: error code %ld", + szRegKey, dwErrorcode); + + if (!ArgArray[i]) { + TotalParams = ArgCount = i; + break; + } + } + } + } + RegCloseKey(hParamKey); } + if (ArgCount == 1) { - else - { - ThreadInputParams.Argc = ArgCount; - ThreadInputParams.Argv = ArgArray; + /* + * No startup args are given + */ + ThreadInputParams.Argc = argc; + ThreadInputParams.Argv = argv; } - /* - * Register Service Control Handler - */ - hServiceStatus = RegisterServiceCtrlHandler (app_name_long, ControlHandler); - if (hServiceStatus == 0) - { - WriteToEventLog (EVENTLOG_ERROR_TYPE, - _T ("RegisterServiceCtrlHandler failed")); - return; + else { + ThreadInputParams.Argc = ArgCount; + ThreadInputParams.Argv = ArgArray; } - /* - * Update the service status to START_PENDING. - */ - UpdateServiceStatus (SERVICE_START_PENDING, NO_ERROR, SCM_WAIT_INTERVAL); - - /* - * Start the worker thread, which does the majority of the work . - */ - TRY - { - if (SetSimpleSecurityAttributes (&SecurityAttributes) == FALSE) - { - WriteToEventLog (EVENTLOG_ERROR_TYPE, - _T ("Couldn't init security attributes")); - LEAVE; - } - hServiceThread = - (void *) _beginthreadex (&SecurityAttributes, 0, - ThreadFunction, - (void *) &ThreadInputParams, 0, &threadId); - if (hServiceThread == NULL) - { - WriteToEventLog (EVENTLOG_ERROR_TYPE, _T ("Couldn't start worker thread")); - LEAVE; - } + /* + * Register Service Control Handler + */ + hServiceStatus = + RegisterServiceCtrlHandler(app_name_long, ControlHandler); + if (hServiceStatus == 0) { + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "RegisterServiceCtrlHandler failed"); + return; + } /* - * Set service status to SERVICE_RUNNING. + * Update the service status to START_PENDING. */ - UpdateServiceStatus (SERVICE_RUNNING, NO_ERROR, SCM_WAIT_INTERVAL); + UpdateServiceStatus(SERVICE_START_PENDING, NO_ERROR, + SCM_WAIT_INTERVAL); /* - * Wait until the worker thread finishes. + * Start the worker thread, which does the majority of the work . */ - WaitForSingleObject (hServiceThread, INFINITE); - } - FINALLY - { + TRY { + if (SetSimpleSecurityAttributes(&SecurityAttributes) == FALSE) { + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Couldn't init security attributes"); + LEAVE; + } + hServiceThread = + (void *) _beginthreadex(&SecurityAttributes, 0, + ThreadFunction, + (void *) &ThreadInputParams, 0, + &threadId); + if (hServiceThread == NULL) { + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Couldn't start worker thread"); + LEAVE; + } + + /* + * Set service status to SERVICE_RUNNING. + */ + UpdateServiceStatus(SERVICE_RUNNING, NO_ERROR, SCM_WAIT_INTERVAL); + + /* + * Wait until the worker thread finishes. + */ + WaitForSingleObject(hServiceThread, INFINITE); + } + FINALLY { + /* + * Release resources + */ + UpdateServiceStatus(SERVICE_STOPPED, NO_ERROR, SCM_WAIT_INTERVAL); + if (hServiceThread) + CloseHandle(hServiceThread); + FreeSecurityAttributes(&SecurityAttributes); + + /* + * Free allocated argument list + */ + if (ArgCount > 1 && ArgArray != NULL) { + /* + * Free all strings + */ + for (i = 0; i < ArgCount; i++) { + free(ArgArray[i]); + } + free(ArgArray); + } + } +} + +/* + * Function to start as Windows service + * The calling party should specify their entry point as input parameter + * Returns TRUE if the Service is started successfully + */ +BOOL +RunAsService(int (*ServiceFunction)(int, char **)) +{ + /* - * Release resources + * Set the ServiceEntryPoint */ - UpdateServiceStatus (SERVICE_STOPPED, NO_ERROR, SCM_WAIT_INTERVAL); - if (hServiceThread) - CloseHandle (hServiceThread); - FreeSecurityAttributes (&SecurityAttributes); + ServiceEntryPoint = ServiceFunction; /* - * Free allocated argument list + * By default, mark as Running as a service */ - if (ArgCount > 1 && ArgArray != NULL) - { - /* - * Free all strings - */ - for (i = 0; i < ArgCount; i++) - { - free (ArgArray[i]); - } - free (ArgArray); - } - } -} + g_fRunningAsService = TRUE; /* - * Function to start as Windows service - * The calling party should specify their entry point as input parameter - * Returns TRUE if the Service is started successfully + * Initialize ServiceTableEntry table */ -BOOL -RunAsService (INT (*ServiceFunction) (INT, LPTSTR *)) -{ + ServiceTableEntry[0].lpServiceName = app_name_long; /* Application Name */ - /* - * Set the ServiceEntryPoint - */ - ServiceEntryPoint = ServiceFunction; - - /* - * By default, mark as Running as a service - */ - g_fRunningAsService = TRUE; - - /* - * Initialize ServiceTableEntry table - */ - ServiceTableEntry[0].lpServiceName = app_name_long; /* Application Name */ - - /* - * Call SCM via StartServiceCtrlDispatcher to run as Service - * * If the function returns TRUE we are running as Service, - */ - if (StartServiceCtrlDispatcher (ServiceTableEntry) == FALSE) - { - g_fRunningAsService = FALSE; - - /* - * Some other error has occurred. - */ - WriteToEventLog (EVENTLOG_ERROR_TYPE, - _T ("Couldn't start service - %s"), app_name_long); + /* + * Call SCM via StartServiceCtrlDispatcher to run as Service + * * If the function returns TRUE we are running as Service, + */ + if (StartServiceCtrlDispatcher(ServiceTableEntry) == FALSE) { + g_fRunningAsService = FALSE; + + /* + * Some other error has occurred. + */ + WriteToEventLog(EVENTLOG_ERROR_TYPE, + "Couldn't start service - %s", app_name_long); } - return g_fRunningAsService; + return g_fRunningAsService; } - /* - * Service control handler function - * Responds to SCM commands/requests - * This service handles 4 commands - * - interrogate, pause, continue and stop. - */ -VOID WINAPI -ControlHandler (DWORD dwControl) +/* + * Service control handler function + * Responds to SCM commands/requests + * This service handles 4 commands + * - interrogate, pause, continue and stop. + */ +void WINAPI +ControlHandler(DWORD dwControl) { - switch (dwControl) - { + switch (dwControl) { case SERVICE_CONTROL_INTERROGATE: - ProcessServiceInterrogate (); - break; + ProcessServiceInterrogate(); + break; case SERVICE_CONTROL_PAUSE: - ProcessServicePause (); - break; + ProcessServicePause(); + break; case SERVICE_CONTROL_CONTINUE: - ProcessServiceContinue (); - break; + ProcessServiceContinue(); + break; case SERVICE_CONTROL_STOP: - ProcessServiceStop (); - break; + ProcessServiceStop(); + break; } } - /* - * To stop the service. - * If a stop function was registered, invoke it, - * otherwise terminate the worker thread. - * After stopping, Service status is set to STOP in - * main loop - */ -VOID -ProcessServiceStop (VOID) +/* + * To stop the service. + * If a stop function was registered, invoke it, + * otherwise terminate the worker thread. + * After stopping, Service status is set to STOP in + * main loop + */ +void +ProcessServiceStop(void) { - UpdateServiceStatus (SERVICE_STOP_PENDING, NO_ERROR, SCM_WAIT_INTERVAL); + UpdateServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, SCM_WAIT_INTERVAL); - if (StopFunction != NULL) - { - (*StopFunction) (); + if (StopFunction != NULL) { + (*StopFunction) (); } - else - { - TerminateThread (hServiceThread, 0); + else { + TerminateThread(hServiceThread, 0); } } - /* - * Returns the current state of the service to the SCM. - */ -VOID -ProcessServiceInterrogate (VOID) +/* + * Returns the current state of the service to the SCM. + */ +void +ProcessServiceInterrogate(void) { - ReportCurrentServiceStatus (); + ReportCurrentServiceStatus(); } - /* - * To Create a security descriptor with a NULL ACL, which - * allows unlimited access. Returns a SECURITY_ATTRIBUTES - * structure that contains the security descriptor. - * The structure contains a dynamically allocated security - * descriptor that must be freed either manually, or by - * calling FreeSecurityAttributes - */ +/* + * To Create a security descriptor with a NULL ACL, which + * allows unlimited access. Returns a SECURITY_ATTRIBUTES + * structure that contains the security descriptor. + * The structure contains a dynamically allocated security + * descriptor that must be freed either manually, or by + * calling FreeSecurityAttributes + */ BOOL -SetSimpleSecurityAttributes (SECURITY_ATTRIBUTES * pSecurityAttr) +SetSimpleSecurityAttributes(SECURITY_ATTRIBUTES *pSecurityAttr) { - BOOL fReturn = FALSE; - SECURITY_DESCRIPTOR *pSecurityDesc = NULL; - - /* - * If an invalid address is passed as a parameter, return - * FALSE right away. - */ - if (!pSecurityAttr) - return FALSE; - pSecurityDesc = - (SECURITY_DESCRIPTOR *) LocalAlloc (LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); - if (!pSecurityDesc) - return FALSE; - fReturn = - InitializeSecurityDescriptor (pSecurityDesc, SECURITY_DESCRIPTOR_REVISION); - if (fReturn != FALSE) - { - fReturn = SetSecurityDescriptorDacl (pSecurityDesc, TRUE, NULL, FALSE); + BOOL fReturn = FALSE; + SECURITY_DESCRIPTOR *pSecurityDesc = NULL; + + /* + * If an invalid address is passed as a parameter, return + * FALSE right away. + */ + if (!pSecurityAttr) + return FALSE; + pSecurityDesc = + (SECURITY_DESCRIPTOR *) LocalAlloc(LPTR, + SECURITY_DESCRIPTOR_MIN_LENGTH); + if (!pSecurityDesc) + return FALSE; + fReturn = + InitializeSecurityDescriptor(pSecurityDesc, + SECURITY_DESCRIPTOR_REVISION); + if (fReturn != FALSE) { + fReturn = + SetSecurityDescriptorDacl(pSecurityDesc, TRUE, NULL, FALSE); } - if (fReturn != FALSE) - { - pSecurityAttr->nLength = sizeof (SECURITY_ATTRIBUTES); - pSecurityAttr->lpSecurityDescriptor = pSecurityDesc; - pSecurityAttr->bInheritHandle = TRUE; + if (fReturn != FALSE) { + pSecurityAttr->nLength = sizeof(SECURITY_ATTRIBUTES); + pSecurityAttr->lpSecurityDescriptor = pSecurityDesc; + pSecurityAttr->bInheritHandle = TRUE; } - else - { - /* - * Couldn't initialize or set security descriptor. - */ - LocalFree (pSecurityDesc); + else { + /* + * Couldn't initialize or set security descriptor. + */ + LocalFree(pSecurityDesc); } - return fReturn; + return fReturn; } - /* - * This function Frees the security descriptor, if any was created. - */ -VOID -FreeSecurityAttributes (SECURITY_ATTRIBUTES * pSecurityAttr) +/* + * This function Frees the security descriptor, if any was created. + */ +void +FreeSecurityAttributes(SECURITY_ATTRIBUTES *pSecurityAttr) { - if (pSecurityAttr && pSecurityAttr->lpSecurityDescriptor) - LocalFree (pSecurityAttr->lpSecurityDescriptor); + if (pSecurityAttr && pSecurityAttr->lpSecurityDescriptor) + LocalFree(pSecurityAttr->lpSecurityDescriptor); } - /* - * This function runs in the worker thread - * until an exit is forced, or until the SCM issues the STOP command. - * Invokes registered service function - * Returns when called registered function returns - * - * Input: - * lpParam contains argc and argv, pass to service main function - */ +/* + * This function runs in the worker thread + * until an exit is forced, or until the SCM issues the STOP command. + * Invokes registered service function + * Returns when called registered function returns + * + * Input: + * lpParam contains argc and argv, pass to service main function + */ unsigned WINAPI -ThreadFunction (LPVOID lpParam) +ThreadFunction(void *lpParam) { - InputParams * pInputArg = (InputParams *) lpParam; - return (*ServiceEntryPoint) (pInputArg->Argc, pInputArg->Argv); + InputParams *pInputArg = (InputParams *) lpParam; + return (*ServiceEntryPoint) (pInputArg->Argc, pInputArg->Argv); } - /* - * This function is called to register an application-specific function - * which is invoked when the SCM stops the worker thread. - */ -VOID -RegisterStopFunction (VOID (*StopFunc) (VOID)) +/* + * This function is called to register an application-specific function + * which is invoked when the SCM stops the worker thread. + */ +void +RegisterStopFunction(void (*StopFunc)(void)) { - StopFunction = StopFunc; + StopFunction = StopFunc; } - /* - * SCM pause command invokes this function - * If the service is not running, this function does nothing. - * Otherwise, suspend the worker thread and update the status. - */ -VOID -ProcessServicePause (VOID) +/* + * SCM pause command invokes this function + * If the service is not running, this function does nothing. + * Otherwise, suspend the worker thread and update the status. + */ +void +ProcessServicePause(void) { - if (ServiceStatus.dwCurrentState == SERVICE_RUNNING) - { - UpdateServiceStatus (SERVICE_PAUSE_PENDING, NO_ERROR, SCM_WAIT_INTERVAL); - - if (SuspendThread (hServiceThread) != -1) - { - UpdateServiceStatus (SERVICE_PAUSED, NO_ERROR, SCM_WAIT_INTERVAL); - } + if (ServiceStatus.dwCurrentState == SERVICE_RUNNING) { + UpdateServiceStatus(SERVICE_PAUSE_PENDING, NO_ERROR, + SCM_WAIT_INTERVAL); + + if (SuspendThread(hServiceThread) != -1) { + UpdateServiceStatus(SERVICE_PAUSED, NO_ERROR, + SCM_WAIT_INTERVAL); + } } } - /* - * SCM resume command invokes this function - * If the service is not paused, this function does nothing. - * Otherwise, resume the worker thread and update the status. - */ -VOID -ProcessServiceContinue (VOID) +/* + * SCM resume command invokes this function + * If the service is not paused, this function does nothing. + * Otherwise, resume the worker thread and update the status. + */ +void +ProcessServiceContinue(void) { - if (ServiceStatus.dwCurrentState == SERVICE_PAUSED) - { - UpdateServiceStatus (SERVICE_CONTINUE_PENDING, NO_ERROR, SCM_WAIT_INTERVAL); - - if (ResumeThread (hServiceThread) != -1) - { - UpdateServiceStatus (SERVICE_RUNNING, NO_ERROR, SCM_WAIT_INTERVAL); - } + if (ServiceStatus.dwCurrentState == SERVICE_PAUSED) { + UpdateServiceStatus(SERVICE_CONTINUE_PENDING, NO_ERROR, + SCM_WAIT_INTERVAL); + + if (ResumeThread(hServiceThread) != -1) { + UpdateServiceStatus(SERVICE_RUNNING, NO_ERROR, + SCM_WAIT_INTERVAL); + } } } -#endif /* WIN32 */ - - +#endif /* WIN32 */ diff --git a/testing/Makefile.in b/testing/Makefile.in index 2a64137..79d069d 100644 --- a/testing/Makefile.in +++ b/testing/Makefile.in @@ -31,6 +31,7 @@ all: @echo "Also see the RUNFULLTESTS script for details" test: + @$(srcdir)/check_for_pskill @if test "x$(PERL)" = "x" \ -o "x@PERL_SYSTEM_INVOKES_POSIX_SHELL@" != xyes \ || { ! $(PERL) -e 'require TAP::Harness;' >/dev/null 2>&1 \ diff --git a/testing/RUNFULLTESTS b/testing/RUNFULLTESTS index 40a40b8..112717e 100644 --- a/testing/RUNFULLTESTS +++ b/testing/RUNFULLTESTS @@ -1,10 +1,12 @@ #!/usr/bin/env perl +use strict; +use warnings; use Getopt::Long; #use Data::Dumper; use File::Basename; +use File::Spec; use Cwd qw(abs_path); -use strict; ######################################## # Globals and Command Line options @@ -23,6 +25,7 @@ GetOptions(\%opts, "quiet|q", "groups|g=s", "r=s", + "exclude|e=s", "debug", "srcdir|D=s", "builddir|d=s", @@ -69,6 +72,12 @@ if (!$ENV{'MIBDIRS'}) { $ENV{'MIBDIRS'} = "$opts{srcdir}/mibs"; } +my $cfp_path = File::Spec->catfile(dirname(abs_path($0)), "check_for_pskill"); +my $rc = system($cfp_path); +if ($rc != 0) { + die "$cfp_path failed with error code $rc\n"; +} + ######################################## # Protection measures $ENV{'SNMPCONFPATH'} = "/dev/null"; @@ -118,7 +127,7 @@ if ($opts{'f'}) { push @tests, build_test($_); } } else { - @tests = gather_tests($opts{'groups'}, $opts{'r'}); + @tests = gather_tests($opts{'groups'}, $opts{'r'}, $opts{'exclude'}); } ######################################## @@ -131,6 +140,15 @@ if ($opts{'f'}) { DEBUG("Running tests:\n"); DEBUG("-" x 78, "\n"); +$ENV{'PATH'}="$opts{'builddir'}/agent/.libs:$opts{'builddir'}/apps/.libs:$opts{'builddir'}:$ENV{'PATH'}"; +my $orig_ld_lib = $ENV{'LD_LIBRARY_PATH'}; +$orig_ld_lib = "" if !defined($orig_ld_lib); +$ENV{'LD_LIBRARY_PATH'}=`find $opts{'builddir'} -name '*.so' | grep -v NetSNMP/agent/default_store | sed 's,/[^/]*\$,,' | sort -u | tr '\n' :` . $orig_ld_lib; +$ENV{'PERL5LIB'}="$opts{'srcdir'}/perl:$opts{'srcdir'}/perl/SNMP:$opts{'srcdir'}/perl/blib/lib:$opts{'srcdir'}/testing/fulltests/perl:$opts{'srcdir'}/testing/fulltests/support"; +DEBUG("PATH: $ENV{'PATH'}\n"); +DEBUG("LD_LIBRARY_PATH: $ENV{'LD_LIBRARY_PATH'}\n"); +DEBUG("PERL5LIB: $ENV{'PERL5LIB'}\n"); + my $results; if ($harness) { $results = $harness->runtests(@tests); @@ -170,6 +188,9 @@ sub decide_exec { # 1) Parse the $testfile argument. my ($dirname, $groupname, $basename, $app_extension, $file_extension) = ($testfile =~ /([^\/]+)\/([^\/]+)\/([^\/]+)_([^\/_]+)\.*([^\/\.]*)$/); + if (!defined($app_extension)) { + return undef; + } $app_extension =~ s/$opts{'exeext'}\$//; # 2) we have a RUN_TYPE file in the same directory @@ -186,8 +207,24 @@ sub decide_exec { return undef; } +sub configured_with { + my ($opt) = @_; + my $cfglog = "$opts{'builddir'}/config.log"; + + if (open my $fh, $cfglog) { + while (my $line = <$fh>) { + if ($line =~ $opt) { + return 1; + } + } + } else { + print "Failed to open $cfglog\n" + } + return 0; +} + sub gather_tests { - my ( $groups, $regexp ) = @_; + my ( $groups, $incl_regexp, $excl_regexp ) = @_; my @groups; # figure out the list of groups we need to search through @@ -216,19 +253,27 @@ sub gather_tests { next; } + if (($group eq 'perl' && !configured_with("PERLTARGS='perlmodules'")) || + ($group eq 'python' && !configured_with('with-python-modules'))) { + DEBUG("Skipping group $group\n"); + next; + } + # push on all files that start with T[NUM]* - push_or_skip(\@tests, $regexp, glob("$opts{'srcdir'}/testing/$opts{'master-directory'}/$group/T[0-9]*")); + push_or_skip(\@tests, $incl_regexp, $excl_regexp, + glob("$opts{'srcdir'}/testing/$opts{'master-directory'}/$group/T[0-9]*")); } return @tests; } sub push_or_skip { - my ($array, $regexp, @files) = @_; + my ($array, $incl_regexp, $excl_regexp, @files) = @_; foreach my $file (@files) { next if ($file =~ /.(bak|old|orig|rej)$/); next if ($file =~ /~$/); - next if (defined($regexp) && $file !~ /$regexp/i); + next if (defined($excl_regexp) && $file =~ /$excl_regexp/i); + next if (defined($incl_regexp) && $file !~ /$incl_regexp/i); DEBUG(" Adding file $file\n"); push @$array, build_test($file); } @@ -446,6 +491,7 @@ sub usage { print " --group GROUP\n"; print "\t\t\t(use 'all' to run all tests)\n"; print " -r REGEXP\t\tOnly run test files matching this regexp\n"; + print " -e REGEXP\t\tExclude test files matching this regexp\n"; print " -f\t\t\tRun only the failed tests from the last run\n"; print " -F\t\t\tDon't create the failed_tests file\n"; print " --failed-file FILE\tThe location of the failed state file\n"; diff --git a/testing/RUNTESTS b/testing/RUNTESTS index 4933307..6715831 100644 --- a/testing/RUNTESTS +++ b/testing/RUNTESTS @@ -10,19 +10,7 @@ if [ "x$MIBDIRS" = "x" ]; then export MIBDIRS fi -# Make sure MinGW / MSYS users have the pskill.exe program to stop the agent and -# snmptrapd -if [ "x$OSTYPE" = "xmsys" ]; then - for e in pskill.exe pslist.exe; do - if [ "x`type $e 2>/dev/null`" = "x" ]; then - echo "Could not find $e. Aborting tests." - echo "$e can be installed as follows:" - echo "- Download PSTools.zip from http://technet.microsoft.com/en-us/sysinternals/default." - echo "- Copy $e to C:\\MinGW\\msys\\1.0\\bin." - exit 1 - fi - done -fi +"`dirname "$0"`/check_for_pskill" success_count=0 failed_count=0 diff --git a/testing/check_for_pskill b/testing/check_for_pskill new file mode 100644 index 0000000..a6e91d1 --- /dev/null +++ b/testing/check_for_pskill @@ -0,0 +1,17 @@ +#!/bin/sh + +# Make sure MinGW32 users have the pskill.exe program to stop the agent and +# snmptrapd +case $(uname) in +MINGW32*) + for e in pskill.exe pslist.exe; do + if [ "x`type $e 2>/dev/null`" = "x" ]; then + echo "Could not find $e. Aborting tests." + echo "$e can be installed as follows:" + echo -- "- Download PSTools.zip from http://technet.microsoft.com/en-us/sysinternals/default." + echo -- "- Copy $e to C:\\MinGW\\msys\\1.0\\bin." + exit 1 + fi + done + ;; +esac diff --git a/testing/fulltests/default/S180trapaddrinfra b/testing/fulltests/default/S180trapaddrinfra new file mode 100644 index 0000000..0b8e0eb --- /dev/null +++ b/testing/fulltests/default/S180trapaddrinfra @@ -0,0 +1,68 @@ +# +# The T18* tests have a great deal of commonality. +# We factor that out into this file. +# +# Usage: +# HEADER ... +# INITV4 or INITV6 +# CONFIGAGENT ... +# RUNTEST +# + +INIT() { + # We need to set $SNMP_TEST_DEST to a real IP address; we have a helper script + # to determine this + MYIP=`perl ../support/myip $1` + if [ $? -ne 0 ] + then + SKIP "can not determine my IP" + fi + + if [ "$1" = "ipv6" ] + then + SNMP_TEST_DEST="[${MYIP}]": + else + SNMP_TEST_DEST=${MYIP}: + fi + + # Standard V2c configuration + . ./Sv2cconfig + + CONFIGTRAPD authcommunity log public + CONFIGTRAPD agentxsocket /dev/null + + # Tracing that helps understand what is being done + AGENT_FLAGS="$AGENT_FLAGS -Dtdomain,netsnmp_sockaddr,netsnmp_udp" +} + +INITV4() { + localhost=127.0.0.1 + snmptrapd_log_regex="UDP: \[${localhost}\]:[0-9]*->\[" + INIT +} + +INITV6() { + localhost=::1 + snmptrapd_log_regex="\[UDP/IPv6: \[${localhost}\]:[0-9]*\]" + SNMP_TRANSPORT_SPEC=udp6 + INIT ipv6 +} + +RUNTEST() { + STARTTRAPD + + STARTAGENT + + # We just rely on the coldstart trap, so there is no active test here. + + STOPAGENT + + STOPTRAPD + + # Check that the coldstart trap packet was sourced from localhost + # (IPv4 uses ->; IPv6 uses just [UDP/IPv6: ], + # so match either "-" or "]" after the port.) + CHECKTRAPDCOUNT atleastone "${snmptrapd_log_regex}" + + FINISHED +} diff --git a/testing/fulltests/default/Sv3vacmconfigMD5 b/testing/fulltests/default/Sv3vacmconfigMD5 new file mode 100644 index 0000000..7f0c880 --- /dev/null +++ b/testing/fulltests/default/Sv3vacmconfigMD5 @@ -0,0 +1,28 @@ +#!/bin/sh + +# generically set up the user "initial1" and "initial2" for snmp v3 +# access to the agent. + +# Configuration: +#initial1 can access .1.3.6.1.2.1.1.1, deny others +#initial2 can access all except .1.3.6.1.2.1.1.1 + +# XXX: do autoselection of supported algorithms +SKIPIF NETSNMP_DISABLE_MD5 +SKIPIFNOT NETSNMP_SECMOD_USM + +CONFIGAGENT [snmp] persistentdir $SNMP_TMP_PERSISTENTDIR + +CONFIGAGENT createUser initial1 MD5 initial_test_pass_auth +CONFIGAGENT createUser initial2 MD5 initial_test_pass_auth + + +CONFIGAGENT group testcommunitygroup1 usm initial1 +CONFIGAGENT group testcommunitygroup2 usm initial2 + +CONFIGAGENT view system1 included .1.3.6.1.2.1.1.1 +CONFIGAGENT view system2 included .1 +CONFIGAGENT view system2 excluded .1.3.6.1.2.1.1.1 +CONFIGAGENT 'access testcommunitygroup1 "" any auth exact system1 none none' +CONFIGAGENT 'access testcommunitygroup2 "" any auth exact system2 none none' + diff --git a/testing/fulltests/default/T000configure_simple b/testing/fulltests/default/T000configure_simple index 2e2b4ef..d3cd6db 100644 --- a/testing/fulltests/default/T000configure_simple +++ b/testing/fulltests/default/T000configure_simple @@ -14,7 +14,7 @@ HEADER Checking the Net-SNMP configure script validity VERSIONNEEDED=`cat $versionfile` -CHECKORDIE "^# Generated by GNU Autoconf $VERSIONNEEDED for Net-SNMP " \ +CHECKORDIE "^# Generated by GNU Autoconf $VERSIONNEEDED for Net-SNMP" \ "$configurefile" SAVE_RESULTS diff --git a/testing/fulltests/default/T0142snmpv2csetnull_simple b/testing/fulltests/default/T0142snmpv2csetnull_simple new file mode 100644 index 0000000..0f1b8f3 --- /dev/null +++ b/testing/fulltests/default/T0142snmpv2csetnull_simple @@ -0,0 +1,31 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER SNMPv2c set of system.sysContact.0 with NULL varbind + +SKIPIF NETSNMP_DISABLE_SET_SUPPORT +SKIPIF NETSNMP_NO_WRITE_SUPPORT +SKIPIF NETSNMP_DISABLE_SNMPV2C +SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE + +# +# Begin test +# + +# standard V2C configuration: testcomunnity +snmp_write_access='all' +. ./Sv2cconfig +STARTAGENT + +CAPTURE "snmpget -On $SNMP_FLAGS -c testcommunity -v 2c $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0" + +CHECK ".1.3.6.1.2.1.1.4.0 = STRING:" + +CAPTURE "snmpset -On $SNMP_FLAGS -c testcommunity -v 2c $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0 n x" + +CHECK "Reason: wrongType" + +STOPAGENT + +FINISHED diff --git a/testing/fulltests/default/T0221snmpbulkget_large_simple b/testing/fulltests/default/T0221snmpbulkget_large_simple new file mode 100644 index 0000000..d3bff5d --- /dev/null +++ b/testing/fulltests/default/T0221snmpbulkget_large_simple @@ -0,0 +1,28 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER large SNMPv3 bulkget + +SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE + +# +# Begin test +# + +# standard V3 configuration: +. ./Sv3config + +AGENT_FLAGS="$AGENT_FLAGS -Dsnmp_api,recv,send,snmp_build,dumpx_send,dumpv_send,dumph_send,snmp_sess,sess_async_send,snmpv3_parse:msgMaxSize" +SNMP_FLAGS="$SNMP_FLAGS -Dsnmp_api,recv,send,snmp_build,dumpx_send,dumpv_send,dumph_send,snmp_sess,sess_async_send,snmpv3_parse:msgMaxSize" + +STARTAGENT + +CAPTURE "snmpbulkget $SNMP_FLAGS -On -Cn5 -Cr50 $NOAUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT sysUpTime sysUpTime sysUpTime sysUpTime sysUpTime .1" + +STOPAGENT + +CHECKCOUNT atleastone "^\.1\.3\.6\.1\.2\.1\.1\.3\.0 = Timeticks: " +CHECKCOUNT 55 "^\.1\." + +FINISHED diff --git a/testing/fulltests/default/T0222snmpv3bulkget_simple b/testing/fulltests/default/T0222snmpv3bulkget_simple new file mode 100644 index 0000000..bc9225f --- /dev/null +++ b/testing/fulltests/default/T0222snmpv3bulkget_simple @@ -0,0 +1,24 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER SNMPv3 bulkget of sysServices + +SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE + +# +# Begin test +# + +# standard V3 configuration: +. ./Sv3config + +STARTAGENT + +CAPTURE "snmpbulkget $SNMP_FLAGS -On -Cn1 -Cr1472 $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.5 .1.3.6.1.2.1.1.7" + +STOPAGENT + +CHECKORDIE ".1.3.6.1.2.1.1.5.0 = STRING:" + +FINISHED diff --git a/testing/fulltests/default/T023snmpv3getMD5AES_simple b/testing/fulltests/default/T023snmpv3getMD5AES_simple index 985b2a4..781dab1 100644 --- a/testing/fulltests/default/T023snmpv3getMD5AES_simple +++ b/testing/fulltests/default/T023snmpv3getMD5AES_simple @@ -6,6 +6,7 @@ HEADER SNMPv3 get using MD5/AES of .1.3.6.1.2.1.1.3.0 SKIPIFNOT NETSNMP_CAN_DO_CRYPTO SKIPIFNOT NETSNMP_ENABLE_SCAPI_AUTHPRIV +SKIPIFNOT HAVE_OPENSSL_AES_H SKIPIFNOT HAVE_AES_CFB128_ENCRYPT SKIPIF NETSNMP_DISABLE_MD5 diff --git a/testing/fulltests/default/T023snmpv3getMD5DES_simple b/testing/fulltests/default/T023snmpv3getMD5DES_simple index 000478a..633a810 100644 --- a/testing/fulltests/default/T023snmpv3getMD5DES_simple +++ b/testing/fulltests/default/T023snmpv3getMD5DES_simple @@ -7,6 +7,7 @@ HEADER SNMPv3 get using MD5/DES of .1.3.6.1.2.1.1.3.0 SKIPIFNOT NETSNMP_CAN_DO_CRYPTO SKIPIFNOT NETSNMP_ENABLE_SCAPI_AUTHPRIV SKIPIF NETSNMP_DISABLE_MD5 +SKIPIF NETSNMP_DISABLE_DES # # Begin test diff --git a/testing/fulltests/default/T024snmpv3getSHA512_simple b/testing/fulltests/default/T024snmpv3getSHA512_simple new file mode 100644 index 0000000..45fb759 --- /dev/null +++ b/testing/fulltests/default/T024snmpv3getSHA512_simple @@ -0,0 +1,26 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER SNMPv3 get using SHA512/noPriv of .1.3.6.1.2.1.1.3.0 + +SKIPIFNOT NETSNMP_CAN_DO_CRYPTO +SKIPIFNOT HAVE_EVP_SHA384 + +# +# Begin test +# + +# standard V3 configuration for templateSHA user +DEFAUTHTYPE="SHA512" +. ./Sv3config + +STARTAGENT + +CAPTURE "snmpget -On $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0" + +STOPAGENT + +CHECK ".1.3.6.1.2.1.1.3.0 = Timeticks:" + +FINISHED diff --git a/testing/fulltests/default/T035snmpv3trapdusermgmt_simple b/testing/fulltests/default/T035snmpv3trapdusermgmt_simple index be7aab6..4107e3f 100644 --- a/testing/fulltests/default/T035snmpv3trapdusermgmt_simple +++ b/testing/fulltests/default/T035snmpv3trapdusermgmt_simple @@ -9,6 +9,7 @@ SKIPIFNOT USING_AGENTX_SUBAGENT_MODULE SKIPIFNOT USING_SNMPV3_USMUSER_MODULE SKIPIF NETSNMP_SNMPTRAPD_DISABLE_AGENTX SKIPIF NETSNMP_DISABLE_SET_SUPPORT +SKIPIFNOT NETSNMP_USE_OPENSSL SKIPIF NETSNMP_NO_WRITE_SUPPORT SKIPIFNOT NETSNMP_CAN_DO_CRYPTO SKIPIFNOT NETSNMP_ENABLE_SCAPI_AUTHPRIV diff --git a/testing/fulltests/default/T053trapforwardloop_simple b/testing/fulltests/default/T053trapforwardloop_simple new file mode 100644 index 0000000..8577567 --- /dev/null +++ b/testing/fulltests/default/T053trapforwardloop_simple @@ -0,0 +1,37 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER trap forwarding loops are detected by snmptrapd + +SKIPIFNOT USING_EXAMPLES_EXAMPLE_MODULE +SKIPIFNOT HAVE_SIGHUP + +# +# Begin test +# + +# standard V1 configuration: testcomunnity +. ./Sv3config +CONFIGAGENT trapsink ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} public + +CONFIGTRAPD authcommunity log,execute,net public +CONFIGTRAPD agentxsocket /dev/null +CONFIGTRAPD forward default 127.0.0.1:${SNMP_SNMPTRAPD_PORT} +CONFIGTRAPD addForwarderInfo yes + +STARTTRAPD + +AGENT_FLAGS="$AGENT_FLAGS -Dexample,header_generic,add_trap" +STARTAGENT + +CAPTURE "snmpset -On $SNMP_FLAGS $AUTHTESTARGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.4.1.2021.254.7.0 i 1" + +STOPAGENT + +STOPTRAPD + +CHECKAGENT "write_exampletrap trap sent" +CHECKTRAPDCOUNT 3 "Forwarding loop detected,.*already has.*IP address=127.0.0.1, not forwarding this trap" + +FINISHED diff --git a/testing/fulltests/default/T065agentextend_oid_simple b/testing/fulltests/default/T065agentextend_oid_simple new file mode 100644 index 0000000..1610de0 --- /dev/null +++ b/testing/fulltests/default/T065agentextend_oid_simple @@ -0,0 +1,33 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER "extending agent functionality with extend OID" + +SKIPIF NETSNMP_DISABLE_SNMPV2C +SKIPIFNOT USING_AGENT_EXTEND_MODULE +SKIPIFNOT USING_UTILITIES_EXECUTE_MODULE + +# make sure snmpwalk can be executed +SNMPWALK="${SNMP_UPDIR}/apps/snmpwalk" +[ -x "$SNMPWALK" ] || SKIP snmpwalk not compiled + +snmp_version=v2c +TESTCOMMUNITY=testcommunity +. ./Sv2cconfig + +# +# Begin test +# + +oid=.1.3.6.1.4.1.2021.8 + +CONFIGAGENT extend "${oid}" mpstat /usr/bin/mpstat -P ALL + +STARTAGENT + +# NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."hello" = STRING: "hello_world" +CAPTURE "$SNMPWALK $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${oid}" + +STOPAGENT +FINISHED diff --git a/testing/fulltests/default/T065agentextend_sh_simple b/testing/fulltests/default/T065agentextend_sh_simple index 52ea826..c3be1d7 100644 --- a/testing/fulltests/default/T065agentextend_sh_simple +++ b/testing/fulltests/default/T065agentextend_sh_simple @@ -34,7 +34,7 @@ number1=111 number2=222 rm -f $echo_two_numbers cat <$echo_two_numbers -#!$(if [ "x$MSYS_SH" != x ]; then echo "$MSYS_SH"; else echo /bin/sh; fi) +#!${MSYS_SH:-/bin/sh} echo $number1 echo $number2 EOF diff --git a/testing/fulltests/default/T067passpersist_simple b/testing/fulltests/default/T067passpersist_simple index 40f1333..970fa8a 100644 --- a/testing/fulltests/default/T067passpersist_simple +++ b/testing/fulltests/default/T067passpersist_simple @@ -44,6 +44,8 @@ CHECKORDIE "NET-SNMP-PASS-MIB::netSnmpPassTimeTicks.0 = Timeticks: (363136200) 4 CHECKORDIE "NET-SNMP-PASS-MIB::netSnmpPassIpAddress.0 = IpAddress: 127.0.0.1" CHECKORDIE "NET-SNMP-PASS-MIB::netSnmpPassCounter.0 = Counter32: 1" CHECKORDIE "NET-SNMP-PASS-MIB::netSnmpPassGauge.0 = Gauge32: 42" +CHECKORDIE "NET-SNMP-PASS-MIB::netSnmpPassCounter64.0 = Counter64: 9223372036854775806" +CHECKORDIE "NET-SNMP-PASS-MIB::netSnmpPassInteger64.0 = Opaque: Int64: 9223372036854775807" #COMMENT A couple of spot checks of GET requests. CAPTURE "$SNMPGET $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT NET-SNMP-PASS-MIB::netSnmpPassInteger.1" diff --git a/testing/fulltests/default/T069exechup_simple b/testing/fulltests/default/T069exechup_simple new file mode 100644 index 0000000..b29e6b8 --- /dev/null +++ b/testing/fulltests/default/T069exechup_simple @@ -0,0 +1,67 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER "eval configuration constency after SIGHUP" + +SKIPIFNOT USING_UCD_SNMP_EXTENSIBLE_MODULE +SKIPIF NETSNMP_DISABLE_SNMPV2C + +# make sure snmpset and snmpwalk can be executed +SNMPSET="${builddir}/apps/snmpset" +[ -x "$SNMPSET" ] || SKIP snmpset not compiled +SNMPWALK="${builddir}/apps/snmpwalk" +[ -x "$SNMPWALK" ] || SKIP snmpwalk not compiled + +snmp_version=v2c +snmp_write_access='all' +TESTCOMMUNITY=testcommunity +. ./Sv2cconfig + +# +# Begin test +# +if [ "x$OSTYPE" = xmsys ]; then + cmd1="true" + cmd2="false" + echo="echo" +else + cmd1="$(which true)" + cmd2="$(which false)" + echo="$(which echo)" +fi +CONFIGAGENT exec true-command $cmd1 +CONFIGAGENT exec false-command $cmd2 + +STARTAGENT + +# Check a full walk of UCD-SNMP-MIB::extTable +CAPTURE "$SNMPWALK $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT UCD-SNMP-MIB::extEntry" +CHECK 'UCD-SNMP-MIB::extNames.1 = STRING: true-command$' +CHECK 'UCD-SNMP-MIB::extCommand.1 = STRING: '"$cmd1" +CHECK 'UCD-SNMP-MIB::extResult.1 = INTEGER: 0$' +CHECK 'UCD-SNMP-MIB::extOutput.1 = STRING: $' +CHECK 'UCD-SNMP-MIB::extNames.2 = STRING: false-command$' +CHECK 'UCD-SNMP-MIB::extCommand.2 = STRING: '"$cmd2"'$' +CHECK 'UCD-SNMP-MIB::extResult.2 = INTEGER: 1$' +CHECK 'UCD-SNMP-MIB::extOutput.2 = STRING: $' + +# Send HUP +HUPAGENT + +# Check a full walk of UCD-SNMP-MIB::extTable +CAPTURE "$SNMPWALK $SNMP_FLAGS -$snmp_version -c $TESTCOMMUNITY $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT UCD-SNMP-MIB::extEntry" +CHECK 'UCD-SNMP-MIB::extNames.1 = STRING: true-command$' +CHECK 'UCD-SNMP-MIB::extCommand.1 = STRING: '"$cmd1" +CHECK 'UCD-SNMP-MIB::extResult.1 = INTEGER: 0$' +CHECK 'UCD-SNMP-MIB::extOutput.1 = STRING: $' +CHECK 'UCD-SNMP-MIB::extNames.2 = STRING: false-command$' +CHECK 'UCD-SNMP-MIB::extCommand.2 = STRING: '"$cmd2"'$' +CHECK 'UCD-SNMP-MIB::extResult.2 = INTEGER: 1$' +CHECK 'UCD-SNMP-MIB::extOutput.2 = STRING: $' +# We shouldn't have more rows. +CHECKANDDIE 'UCD-SNMP-MIB::extNames.3' +CHECKANDDIE 'UCD-SNMP-MIB::extNames.4' + +STOPAGENT +FINISHED diff --git a/testing/fulltests/default/T070com2sec_simple b/testing/fulltests/default/T070com2sec_simple index 9f76fcd..6c07f74 100644 --- a/testing/fulltests/default/T070com2sec_simple +++ b/testing/fulltests/default/T070com2sec_simple @@ -15,19 +15,19 @@ SKIPIF NETSNMP_NO_DEBUGGING CONFIGAGENT 'com2sec -Cn' # 401b Test empty CONTEXT CONFIGAGENT 'com2sec -Cn ""' -# 401c Test overlong CONTEXT (34 chars) -CONFIGAGENT 'com2sec -Cn 1234567890123456789012345678901234' +# 401c Test overlong CONTEXT (33 chars) +CONFIGAGENT 'com2sec -Cn 123456789012345678901234567890123 secname default com' # 402a Test missing secName CONFIGAGENT 'com2sec' # 402b Test empty secName CONFIGAGENT 'com2sec ""' -# 402c Test overlong secName (34 chars) -CONFIGAGENT 'com2sec 1234567890123456789012345678901234' +# 402c Test overlong secName (33 chars) +CONFIGAGENT 'com2sec 123456789012345678901234567890123 default com' # 402d Test valid context and missing secName -CONFIGAGENT 'com2sec -Cn 123456789012345678901234567890123' +CONFIGAGENT 'com2sec -Cn 12345678901234567890123456789012' # 402e Test valid context and empty secName -CONFIGAGENT 'com2sec -Cn 123456789012345678901234567890123 ""' +CONFIGAGENT 'com2sec -Cn 12345678901234567890123456789012 ""' # 403a Test missing network address CONFIGAGENT 'com2sec t403a' @@ -43,9 +43,9 @@ CONFIGAGENT 'com2sec t404b default ""' # 404c Test forbidden value (now why it is forbidden...) CONFIGAGENT 'com2sec t404c default COMMUNITY' # 404d Test overlong community (255 chars) -CONFIGAGENT 'com2sec t404d default 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345' +CONFIGAGENT 'com2sec t404d default 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567' # 404e Test valid community -CONFIGAGENT 'com2sec t404e default 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234' +CONFIGAGENT 'com2sec t404e default 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456' # 405a Test 'default' configuration CONFIGAGENT 'com2sec t405a default c405a' @@ -82,9 +82,9 @@ CONFIGAGENT 'com2sec t407b a2345678901234567890123456789012345678901234567890123 # 408 Lookup tests, require network access # 408a Test lookup returning a single host -CONFIGAGENT 'com2sec t408a www.ietf.org c408a' +CONFIGAGENT 'com2sec t408a onea.net-snmp.org c408a' # 408a Test lookup returning multiple hosts -CONFIGAGENT 'com2sec t408b www.google.com c408b' +CONFIGAGENT 'com2sec t408b twoa.net-snmp.org c408b' # Default agent setup CONFIGAGENT "[snmp] persistentdir $SNMP_TMP_PERSISTENTDIR" @@ -117,7 +117,7 @@ SAVECHECKAGENT 'line 12: Error: missing COMMUNITY parameter' SAVECHECKAGENT 'line 13: Error: empty COMMUNITY parameter' SAVECHECKAGENT 'line 14: Error: example config COMMUNITY not properly configured' SAVECHECKAGENT 'line 15: Error: community name too long' -SAVECHECKAGENT '<"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", 0.0.0.0/0.0.0.0> => "t404e"' +SAVECHECKAGENT '<"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456", 0.0.0.0/0.0.0.0> => "t404e"' SAVECHECKAGENT '<"c405a", 0.0.0.0/0.0.0.0> => "t405a"' SAVECHECKAGENT '<"c405b", 10.0.0.0/255.255.255.255> => "t405b"' SAVECHECKAGENT '<"c405c", 10.0.0.0/255.0.0.0> => "t405c"' @@ -134,26 +134,34 @@ SAVECHECKAGENT '<"c406a", 255.255.255.255/255.255.255.255> => "t406a"' SAVECHECKAGENT 'line 30: Error:' # msg from h_strerror so it varies SAVECHECKAGENT 'line 31: Error:' # msg from h_strerror so it varies -CHECKAGENT '<"c408a"' -if [ "$snmp_last_test_result" -eq 0 ] ; then - CHECKAGENT 'line 32: Error:' - if [ "$snmp_last_test_result" -ne 1 ] ; then +if false; then + # The two tests below have been disabled because these rely on resolving a + # domain name into a local IP address. Such DNS replies are filtered out by + # many security devices because to avoid DNS rebinding attacks. See also + # https://en.wikipedia.org/wiki/DNS_rebinding. + + CHECKAGENT '<"c408a"' + if [ "$snmp_last_test_result" -eq 0 ] ; then + CHECKAGENT 'line 32: Error:' + if [ "$snmp_last_test_result" -ne 1 ] ; then + return_value=1 + FINISHED + fi + elif [ "$snmp_last_test_result" -ne 1 ] ; then return_value=1 FINISHED fi -elif [ "$snmp_last_test_result" -ne 1 ] ; then - return_value=1 - FINISHED -fi -CHECKAGENT '<"c408b"' -if [ "$snmp_last_test_result" -eq 0 ] ; then - CHECKAGENT 'line 33: Error:' - if [ "$snmp_last_test_result" -ne 1 ] ; then + CHECKAGENT '<"c408b"' + if [ "$snmp_last_test_result" -eq 0 ] ; then + CHECKAGENT 'line 33: Error:' + if [ "$snmp_last_test_result" -ne 1 ] ; then + return_value=1 + fi + elif [ "$snmp_last_test_result" -ne 1 ] ; then return_value=1 fi -elif [ "$snmp_last_test_result" -ne 1 ] ; then - return_value=1 + fi FINISHED diff --git a/testing/fulltests/default/T071com2sec6_simple b/testing/fulltests/default/T071com2sec6_simple index 8c90ad0..76da70b 100644 --- a/testing/fulltests/default/T071com2sec6_simple +++ b/testing/fulltests/default/T071com2sec6_simple @@ -15,19 +15,19 @@ SKIPIF NETSNMP_NO_DEBUGGING CONFIGAGENT 'com2sec6 -Cn' # 601b Test empty CONTEXT CONFIGAGENT 'com2sec6 -Cn ""' -# 601c Test overlong CONTEXT (34 chars) -CONFIGAGENT 'com2sec6 -Cn 1234567890123456789012345678901234' +# 601c Test overlong CONTEXT (33 chars) +CONFIGAGENT 'com2sec6 -Cn 123456789012345678901234567890123' # 602a Test missing secName CONFIGAGENT 'com2sec6' # 602b Test empty secName CONFIGAGENT 'com2sec6 ""' -# 602c Test overlong secName (34 chars) -CONFIGAGENT 'com2sec6 1234567890123456789012345678901234' +# 602c Test overlong secName (33 chars) +CONFIGAGENT 'com2sec6 123456789012345678901234567890123' # 602d Test valid context and missing secName -CONFIGAGENT 'com2sec6 -Cn 123456789012345678901234567890123' +CONFIGAGENT 'com2sec6 -Cn 12345678901234567890123456789012' # 602e Test valid context and empty secName -CONFIGAGENT 'com2sec6 -Cn 123456789012345678901234567890123 ""' +CONFIGAGENT 'com2sec6 -Cn 12345678901234567890123456789012 ""' # 603a Test missing network address CONFIGAGENT 'com2sec6 t603a' @@ -41,9 +41,9 @@ CONFIGAGENT 'com2sec6 t604a default' # 604b 'Error: empty COMMUNITY parameter' CONFIGAGENT 'com2sec6 t604b default ""' # 604c Test overlong COMMUNITY -CONFIGAGENT 'com2sec6 t604c default 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345' +CONFIGAGENT 'com2sec6 t604c default 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567' # 604d Test barely valid community -CONFIGAGENT 'com2sec6 t604d default 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234' +CONFIGAGENT 'com2sec6 t604d default 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456' # 604e Test forbidden value CONFIGAGENT 'com2sec6 t604e default COMMUNITY' @@ -76,9 +76,9 @@ CONFIGAGENT 'com2sec6 t607b a234567890123456789012345678901234567890123456789012 # 608 Lookup tests, require network access # 608a Test lookup returning a single host -CONFIGAGENT 'com2sec6 t608a oneaaaa.net-snmp.org c608a' +CONFIGAGENT 'com2sec6 t608a oneAAAA.net-snmp.org c608a' # 608b Test lookup returning multiple hosts -CONFIGAGENT 'com2sec6 t608b twoaaaa.net-snmp.org c608b' +CONFIGAGENT 'com2sec6 t608b twoAAAA.net-snmp.org c608b' # Default agent setup CONFIGAGENT "[snmp] persistentdir $SNMP_TMP_PERSISTENTDIR" @@ -114,7 +114,7 @@ SAVECHECKAGENT 'line 11: Error: example config NETWORK not properly configured' SAVECHECKAGENT 'line 12: Error: missing COMMUNITY parameter' SAVECHECKAGENT 'line 13: Error: empty COMMUNITY parameter' SAVECHECKAGENT 'line 14: Error: community name too long' -SAVECHECKAGENT '<"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", ::/::> => "t604d"' +SAVECHECKAGENT '<"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456", ::/::> => "t604d"' SAVECHECKAGENT 'line 16: Error: example config COMMUNITY not properly configured' # 605 SAVECHECKAGENT '<"c605a", ::/::> => "t605a"' @@ -132,23 +132,30 @@ SAVECHECKAGENT '<"c606a", ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/ffff:ffff:ffff SAVECHECKAGENT 'line 27: Error:' SAVECHECKAGENT 'line 28: Error:' -# 608 -CHECKAGENT '<"c608a"' -if [ "$snmp_last_test_result" -eq 0 ] ; then - CHECKAGENT 'line 29: Error:' - errnum=`expr $errnum - 1` - if [ "$snmp_last_test_result" -ne 1 ] ; then +if false; then + # The two tests below have been disabled because these rely on resolving a + # domain name into a local IP address. Such DNS replies are filtered out by + # many security devices because to avoid DNS rebinding attacks. See also + # https://en.wikipedia.org/wiki/DNS_rebinding. + + # 608 + CHECKAGENT '<"c608a"' + if [ "$snmp_last_test_result" -eq 0 ] ; then + CHECKAGENT 'line 29: Error:' + errnum=`expr $errnum - 1` + if [ "$snmp_last_test_result" -ne 1 ] ; then + FINISHED + fi + elif [ "$snmp_last_test_result" -ne 1 ] ; then FINISHED fi -elif [ "$snmp_last_test_result" -ne 1 ] ; then - FINISHED -fi -CHECKAGENTCOUNT atleastone '<"c608b"' -if [ "$snmp_last_test_result" -eq 0 ] ; then - CHECKAGENT 'line 30: Error:' - if [ "$snmp_last_test_result" -eq 1 ] ; then - errnum=`expr $errnum - 1` + CHECKAGENTCOUNT atleastone '<"c608b"' + if [ "$snmp_last_test_result" -eq 0 ] ; then + CHECKAGENT 'line 30: Error:' + if [ "$snmp_last_test_result" -eq 1 ] ; then + errnum=`expr $errnum - 1` + fi fi fi diff --git a/testing/fulltests/default/T113agentxtrap_simple b/testing/fulltests/default/T113agentxtrap_simple index 4fa5e2f..e4c6c92 100644 --- a/testing/fulltests/default/T113agentxtrap_simple +++ b/testing/fulltests/default/T113agentxtrap_simple @@ -13,7 +13,7 @@ SKIPIFNOT NETSNMP_SECMOD_USM # Begin test # -# start the trap demon +# start the trap daemon CONFIGTRAPD authcommunity log public STARTTRAPD @@ -72,7 +72,7 @@ fi # stop the master agent STOPAGENT -# stop the trap demon +# stop the trap daemon STOPTRAPD # all done (whew) diff --git a/testing/fulltests/default/T114agentxagentxtrap_simple b/testing/fulltests/default/T114agentxagentxtrap_simple index 58475d0..a814236 100644 --- a/testing/fulltests/default/T114agentxagentxtrap_simple +++ b/testing/fulltests/default/T114agentxagentxtrap_simple @@ -5,14 +5,13 @@ HEADER AgentX trap sending support using agentxtrap SKIPIFNOT USING_AGENTX_MASTER_MODULE -SKIPIFNOT NETSNMP_SECMOD_USM # # Begin test # -# start the trap demon -CONFIGTRAPD authcommunity log public +# start the trap daemon +CONFIGTRAPD disableAuthorization yes STARTTRAPD # standard V3 configuration for initial user @@ -29,12 +28,12 @@ fi AGENT_FLAGS="$AGENT_FLAGS $AGENTX_SERVER" STARTAGENT -CAPTURE "agentxtrap $AGENTX_SERVER 0.0 0.0 s mostly_harmless" +CAPTURE "agentxtrap $AGENTX_SERVER 1.3.6.1.4.1.8072.9999.9999.0 0.0 s mostly_harmless" # stop the master agent STOPAGENT -# stop the trap demon +# stop the trap daemon STOPTRAPD # Check that the trap was received diff --git a/testing/fulltests/default/T124proxywalkself_simple b/testing/fulltests/default/T124proxywalkself_simple new file mode 100644 index 0000000..b8178c8 --- /dev/null +++ b/testing/fulltests/default/T124proxywalkself_simple @@ -0,0 +1,54 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Proxy GETNEXT support: walk when proxying to self + +SKIPIFNOT USING_UCD_SNMP_PROXY_MODULE +SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE +SKIPIF NETSNMP_DISABLE_SNMPV2C + +# XXX: ucd-snmp/proxy doesn't properly support TCP -- remove this once it does +[ "x$SNMP_TRANSPORT_SPEC" = "xtcp" -o "x$SNMP_TRANSPORT_SPEC" = "xtcp6" ] && SKIP Test does not support TCP + +# +# Begin test +# + +OID=.1.3.6.1.4.1.8072.42 + +# standard v2c configuration +. ./Sv2cconfig +# config the proxy to proxy to itself +CONFIGAGENT proxy -v 2c -c testcommunity $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT $OID .1.3.6.1.2.1.1 + +# Start the agent with proxy debugging +ORIG_AGENT_FLAGS="$AGENT_FLAGS" +AGENT_FLAGS="$ORIG_AGENT_FLAGS -Dproxy" +STARTAGENT + +# Check that we get a string from the proxied sysObjectID +CAPTURE "snmpgetnext -On $SNMP_FLAGS -v 2c -c testcommunity $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT $OID" + +# TODO: can we compare with the real sysDescr? +CHECK "${OID}.1.0 = STRING: " + +# Check that we can walk without a non-increasing error +CAPTURE "snmpwalk -On $SNMP_FLAGS -v 2c -c testcommunity $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT $OID" + +CHECKANDDIE "Error: OID not increasing" +CHECKCOUNT atleastone "^${OID}" + +# Also check the same for a table underneath the proxy OID itself +# using the sysORTable +CAPTURE "snmpwalk -On $SNMP_FLAGS -v 2c -c testcommunity $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT ${OID}.9" + +CHECKANDDIE "Error: OID not increasing" +CHECKCOUNT atleastone "^${OID}.9." + + +# stop the agent +STOPAGENT + +# all done (whew) +FINISHED diff --git a/testing/fulltests/default/T132snmpv3vacmget_simple b/testing/fulltests/default/T132snmpv3vacmget_simple index 004d0dd..6c3e120 100644 --- a/testing/fulltests/default/T132snmpv3vacmget_simple +++ b/testing/fulltests/default/T132snmpv3vacmget_simple @@ -14,7 +14,7 @@ HEADER SNMPv3 vacm acceptance support #This case test for successful access snmp_version=v3 -. ./Sv3vacmconfig +. ./Sv3vacmconfigMD5 STARTAGENT diff --git a/testing/fulltests/default/T142snmpv3vacmgetfail_simple b/testing/fulltests/default/T142snmpv3vacmgetfail_simple index cfc000b..d2fda21 100644 --- a/testing/fulltests/default/T142snmpv3vacmgetfail_simple +++ b/testing/fulltests/default/T142snmpv3vacmgetfail_simple @@ -14,7 +14,7 @@ HEADER SNMPv3 vacm denial support #This case test for denied access snmp_version=v3 -. ./Sv3vacmconfig +. ./Sv3vacmconfigMD5 STARTAGENT diff --git a/testing/fulltests/default/T154dismanpingmib_simple b/testing/fulltests/default/T154dismanpingmib_simple index 45cffe0..5c794bb 100644 --- a/testing/fulltests/default/T154dismanpingmib_simple +++ b/testing/fulltests/default/T154dismanpingmib_simple @@ -4,9 +4,9 @@ HEADER DISMAN PING MIB -[ "$UID" = 0 ] || SKIP "Not permitted to create raw sockets" SKIPIFNOT USING_DISMAN_PING_MIB_MODULE SKIPIF NETSNMP_DISABLE_SNMPV1 +[ "$UID" = 0 ] || SKIP "Not permitted to create raw sockets" # SNMPv2-TC active=1 diff --git a/testing/fulltests/default/T155dismanexprmib_simple b/testing/fulltests/default/T155dismanexprmib_simple new file mode 100644 index 0000000..a35be8a --- /dev/null +++ b/testing/fulltests/default/T155dismanexprmib_simple @@ -0,0 +1,89 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER DISMAN EXPRESSION MIB + +ISDEFINED USING_DISMAN_EXPRESSION_EXPEXPRESSIONTABLE_MODULE || +ISDEFINED USING_DISMAN_EXPRESSION_MODULE || +SKIP "DISMAN EXPRESSION MIB is not available" + +# SNMPv2-TC +active=1 +createAndWait=5 +destroy=6 +# Test configuration +# expExpressionOwner and expExpressionName +on='"foo"."bar"' + +# +# Begin test +# + +# standard V3 configuration +snmp_write_access='all' +. ./Sv3config + +CONFIGAGENT "createUser internal" +CONFIGAGENT "iquerySecName internal" +CONFIGAGENT "rouser internal" + +AGENT_FLAGS="$AGENT_FLAGS -DexpValueTable -Ddisman:expr:run" + +STARTAGENT + +capture_snmpset() { + CAPTURE "snmpset $SNMP_FLAGS $NOAUTHTESTARGS \ + $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT $*" +} + +capture_snmpget() { + CAPTURE "snmpget $SNMP_FLAGS $NOAUTHTESTARGS \ + $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT $*" +} + +capture_snmpwalk() { + CAPTURE "snmpwalk $SNMP_FLAGS $NOAUTHTESTARGS \ + $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT $*" +} + +capture_snmpset DISMAN-EXPRESSION-MIB::expExpressionEntryStatus."${on}" \ + i $destroy +CHECK "^DISMAN-EXPRESSION-MIB::expExpressionEntryStatus.${on} = INTEGER: destroy(6)" +capture_snmpset DISMAN-EXPRESSION-MIB::expExpressionEntryStatus."${on}" \ + i $createAndWait +CHECK "^DISMAN-EXPRESSION-MIB::expExpressionEntryStatus.${on} = INTEGER: createAndWait(5)" +capture_snmpset DISMAN-EXPRESSION-MIB::expExpression."${on}" \ + = '$1+$2*($1+$2*($1+$2))' +CHECK "^DISMAN-EXPRESSION-MIB::expExpression.${on} = STRING: " +capture_snmpset DISMAN-EXPRESSION-MIB::expExpressionValueType."${on}" \ + = counter32 +CHECK "^DISMAN-EXPRESSION-MIB::expExpressionValueType.${on} = INTEGER: counter32(1)" +capture_snmpset DISMAN-EXPRESSION-MIB::expExpressionEntryStatus."${on}" \ + i $active +CHECK "^DISMAN-EXPRESSION-MIB::expExpressionEntryStatus.${on} = INTEGER: active(1)" + +i=1 +for e in IF-MIB::ifIndex.1 IF-MIB::ifIndex.2; do + capture_snmpset DISMAN-EXPRESSION-MIB::expObjectEntryStatus."${on}".$i \ + i $destroy + CHECK "^DISMAN-EXPRESSION-MIB::expObjectEntryStatus.${on}.$i = INTEGER: destroy(6)" + capture_snmpset DISMAN-EXPRESSION-MIB::expObjectEntryStatus."${on}".$i \ + = createAndWait + CHECK "^DISMAN-EXPRESSION-MIB::expObjectEntryStatus.${on}.$i = INTEGER: createAndWait(5)" + capture_snmpset DISMAN-EXPRESSION-MIB::expObjectID."${on}".$i \ + = $e + CHECK "^DISMAN-EXPRESSION-MIB::expObjectID.${on}.$i = OID: $e" + capture_snmpset DISMAN-EXPRESSION-MIB::expObjectEntryStatus."${on}".$i \ + i $active + CHECK "^DISMAN-EXPRESSION-MIB::expObjectEntryStatus.${on}.$i = INTEGER: active(1)" + i=`expr $i + 1` +done + +capture_snmpget DISMAN-EXPRESSION-MIB::expValueCounter32Val."${on}".0.0.0 + +CHECK "^DISMAN-EXPRESSION-MIB::expValueCounter32Val.${on}.0.0.0 = Counter32: 15" + +STOPAGENT + +FINISHED diff --git a/testing/fulltests/default/T180trap2sinkclientaddr_simple b/testing/fulltests/default/T180trap2sinkclientaddr_simple new file mode 100644 index 0000000..4fe0f66 --- /dev/null +++ b/testing/fulltests/default/T180trap2sinkclientaddr_simple @@ -0,0 +1,16 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Agent uses clientaddr for trapsink source + +SKIPIF NETSNMP_DISABLE_SNMPV2C + +. ./S180trapaddrinfra + +INITV4 + +CONFIGAGENT "[snmp] clientaddr ${localhost}" +CONFIGAGENT trap2sink ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} public + +RUNTEST diff --git a/testing/fulltests/default/T181trap2sinkclientaddr6_simple b/testing/fulltests/default/T181trap2sinkclientaddr6_simple new file mode 100644 index 0000000..7459a37 --- /dev/null +++ b/testing/fulltests/default/T181trap2sinkclientaddr6_simple @@ -0,0 +1,16 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Agent uses clientaddr for v6 trapsink source + +SKIPIF NETSNMP_DISABLE_SNMPV2C + +. ./S180trapaddrinfra + +INITV6 + +CONFIGAGENT "[snmp] clientaddr ${localhost}" +CONFIGAGENT trap2sink ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} public + +RUNTEST diff --git a/testing/fulltests/default/T182trapsessclientaddr_simple b/testing/fulltests/default/T182trapsessclientaddr_simple new file mode 100644 index 0000000..5fffd5e --- /dev/null +++ b/testing/fulltests/default/T182trapsessclientaddr_simple @@ -0,0 +1,16 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Agent uses clientaddr for trapsess source + +SKIPIF NETSNMP_DISABLE_SNMPV2C + +. ./S180trapaddrinfra + +INITV4 + +CONFIGAGENT "[snmp] clientaddr ${localhost}" +CONFIGAGENT trapsess -v 2c -c public ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} + +RUNTEST diff --git a/testing/fulltests/default/T183trapsessclientaddr6_simple b/testing/fulltests/default/T183trapsessclientaddr6_simple new file mode 100644 index 0000000..d7d9c41 --- /dev/null +++ b/testing/fulltests/default/T183trapsessclientaddr6_simple @@ -0,0 +1,16 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Agent uses clientaddr for v6 trapsess source + +SKIPIF NETSNMP_DISABLE_SNMPV2C + +. ./S180trapaddrinfra + +INITV6 + +CONFIGAGENT "[snmp] clientaddr ${localhost}" +CONFIGAGENT trapsess -v 2c -c public ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} + +RUNTEST diff --git a/testing/fulltests/default/T184trapsesssource_simple b/testing/fulltests/default/T184trapsesssource_simple new file mode 100644 index 0000000..ea12c88 --- /dev/null +++ b/testing/fulltests/default/T184trapsesssource_simple @@ -0,0 +1,16 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Agent uses -s argument for trapsess source + +SKIPIF NETSNMP_DISABLE_SNMPV2C + +. ./S180trapaddrinfra + +INITV4 + +CONFIGAGENT trapsess -s ${localhost} -v 2c -c public ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} + +RUNTEST + diff --git a/testing/fulltests/default/T185trapsesssource6_simple b/testing/fulltests/default/T185trapsesssource6_simple new file mode 100644 index 0000000..60079ab --- /dev/null +++ b/testing/fulltests/default/T185trapsesssource6_simple @@ -0,0 +1,15 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER Agent uses -s argument for v6 trapsess source + +SKIPIF NETSNMP_DISABLE_SNMPV2C + +. ./S180trapaddrinfra + +INITV6 + +CONFIGAGENT trapsess -s ${localhost} -v 2c -c public ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} + +RUNTEST diff --git a/testing/fulltests/perl/NetSNMPTestTransport.pm b/testing/fulltests/perl/NetSNMPTestTransport.pm index 38bcfee..bd86868 100644 --- a/testing/fulltests/perl/NetSNMPTestTransport.pm +++ b/testing/fulltests/perl/NetSNMPTestTransport.pm @@ -1,15 +1,7 @@ -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/support"; - } elsif (-d "fulltests/support") { - push @INC, "fulltests/support"; - } elsif (-d "../support") { - push @INC, "../support"; - } -} - package NetSNMPTestTransport; +use strict; +use warnings; use NetSNMPTest; use Test; use SNMP; @@ -41,7 +33,7 @@ sub run_tests { ###################################################################### # GET test if (ref($session) eq 'SNMP::Session') { - $value = $session->get('sysContact.0'); + my $value = $session->get('sysContact.0'); ok($value, 'itworked'); } diff --git a/testing/fulltests/perl/T001basic.t b/testing/fulltests/perl/T001basic.t index c7af105..d16276e 100644 --- a/testing/fulltests/perl/T001basic.t +++ b/testing/fulltests/perl/T001basic.t @@ -2,16 +2,8 @@ # HEADER Basic perl functionality to a UDP agent -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/support"; - } elsif (-d "fulltests/support") { - push @INC, "fulltests/support"; - } elsif (-d "../support") { - push @INC, "../support"; - } -} - +use strict; +use warnings; use NetSNMPTest; use Test; use SNMP; @@ -70,7 +62,7 @@ $value = $session->set($varbind); ok(($value == 0), 1, 'return value from set was a success'); -my $value = $session->get('sysLocation.0'); +$value = $session->get('sysLocation.0'); ok($value, 'yep'); diff --git a/testing/fulltests/perl/T101udp.t b/testing/fulltests/perl/T101udp.t index 5f015d2..048d10d 100644 --- a/testing/fulltests/perl/T101udp.t +++ b/testing/fulltests/perl/T101udp.t @@ -2,15 +2,8 @@ # HEADER Perl UDP IPv4 Test -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/perl"; - } elsif (-d "fulltests/perl") { - push @INC, "fulltests/perl"; - } elsif (-d "../perl") { - push @INC, "../perl"; - } -} +use strict; +use warnings; use NetSNMPTestTransport; my $test = new NetSNMPTestTransport(agentaddress => "udp:localhost:9875"); diff --git a/testing/fulltests/perl/T102tcp.t b/testing/fulltests/perl/T102tcp.t index 2fa07ac..a2c1d96 100644 --- a/testing/fulltests/perl/T102tcp.t +++ b/testing/fulltests/perl/T102tcp.t @@ -2,15 +2,8 @@ # HEADER Perl TCP IPv4 Test -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/perl"; - } elsif (-d "fulltests/perl") { - push @INC, "fulltests/perl"; - } elsif (-d "../perl") { - push @INC, "../perl"; - } -} +use strict; +use warnings; use NetSNMPTestTransport; my $test = new NetSNMPTestTransport(agentaddress => "tcp:localhost:9875"); diff --git a/testing/fulltests/perl/T103udp6.t b/testing/fulltests/perl/T103udp6.t index 3ecb332..ff510f4 100644 --- a/testing/fulltests/perl/T103udp6.t +++ b/testing/fulltests/perl/T103udp6.t @@ -2,15 +2,8 @@ # HEADER Perl UDP IPv6 Test -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/perl"; - } elsif (-d "fulltests/perl") { - push @INC, "fulltests/perl"; - } elsif (-d "../perl") { - push @INC, "../perl"; - } -} +use strict; +use warnings; use NetSNMPTestTransport; my $test = new NetSNMPTestTransport(agentaddress => "udp6:[::1]:9875"); diff --git a/testing/fulltests/perl/T104tcp6.t b/testing/fulltests/perl/T104tcp6.t index 58222d0..b17a93b 100644 --- a/testing/fulltests/perl/T104tcp6.t +++ b/testing/fulltests/perl/T104tcp6.t @@ -2,15 +2,8 @@ # HEADER Perl TCP IPv6 Test -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/perl"; - } elsif (-d "fulltests/perl") { - push @INC, "fulltests/perl"; - } elsif (-d "../perl") { - push @INC, "../perl"; - } -} +use strict; +use warnings; use NetSNMPTestTransport; my $test = new NetSNMPTestTransport(agentaddress => "tcp6:[::1]:9875"); diff --git a/testing/fulltests/perl/T105unix.t b/testing/fulltests/perl/T105unix.t index 3c01719..8e120d6 100644 --- a/testing/fulltests/perl/T105unix.t +++ b/testing/fulltests/perl/T105unix.t @@ -2,15 +2,8 @@ # HEADER Perl Unix Domain Socket Test -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/perl"; - } elsif (-d "fulltests/perl") { - push @INC, "fulltests/perl"; - } elsif (-d "../perl") { - push @INC, "../perl"; - } -} +use strict; +use warnings; use NetSNMPTestTransport; my $test = new NetSNMPTestTransport(agentaddress => "bogus"); diff --git a/testing/fulltests/snmpv3/T010scapitest_capp.c b/testing/fulltests/snmpv3/T010scapitest_capp.c index ee794a7..d42ab76 100644 --- a/testing/fulltests/snmpv3/T010scapitest_capp.c +++ b/testing/fulltests/snmpv3/T010scapitest_capp.c @@ -29,6 +29,7 @@ #ifdef HAVE_NETINET_IN_H #include #endif +#include #include #include @@ -39,14 +40,12 @@ #include #include #include +#include #include - -extern char *optarg; -extern int optind, optopt, opterr; - -#define DEBUG /* */ - +#ifdef HAVE_UNISTD_H +#include +#endif /* @@ -68,23 +67,38 @@ int doalltests = 0, docrypt = 0, dokeyedhash = 0, dorandom = 0; #define LOCAL_MAXBUF (1024 * 8) #define NL "\n" -#define OUTPUT(o) printf("# %s\n", o); +/* #define OUTPUT(o) printf("# %s\n", o); */ +int +output(const char *format, ...) +{ + va_list ap; + char *buffer = NULL; + int length; + va_start(ap, format); + length = vasprintf(&buffer, format, ap); + va_end(ap); + if (length < 0) { + fprintf(stderr, "could not allocate output string\n"); + exit(127); + } -#define SUCCESS(s) \ -{ \ - printf("# Done with %s\n", s); \ + printf("# %s\n", buffer); + free(buffer); + return 0; } -#define FAILED(e, f) \ -{ \ - if (e != SNMPERR_SUCCESS) { \ - printf("not ok: %d - %s\n", ++testcount, f); \ - failcount += 1; \ - } else { \ - printf("ok: %d - %s\n", ++testcount, f); \ - } \ - fflush(stdout); \ -} +#define TEST_SUCCEEDED(s) do { printf("# Done with %s\n", (s)); } while (0) + +#define TEST_FAILED(e, f) \ +do { \ + if ((e) != SNMPERR_SUCCESS) { \ + printf("not ok: %d - %s\n", ++testcount, (f)); \ + failcount += 1; \ + } else { \ + printf("ok: %d - %s\n", ++testcount, (f)); \ + } \ + fflush(stdout); \ +} while (0) #define BIGSTRING \ (const u_char *) \ @@ -107,26 +121,34 @@ int doalltests = 0, docrypt = 0, dokeyedhash = 0, dorandom = 0; #define BIGSECRET \ (const u_char *) \ - "Shhhh... Don't tell *anyone* about this. Not a soul." + "Shhhh... Don't tell *anyone* about this. Not even a single soul." #define BKWDSECRET \ (const u_char *) \ - ".luos a toN .siht tuoba *enoyna* llet t'noD ...hhhhS" - -#define MLCOUNT_MAX 6 /* MAC Length Count Maximum. */ + ".luos elgnis a neve toN .siht tuoba *enoyna* llet t'noD ...hhhhS" +static void +usage(void) +{ + printf( USAGE + "" NL + " -a All tests." NL + " -c Test of sc_encrypt()/sc_decrypt()." + NL + " -h Help." + NL + " -H Test sc_{generate,check}_keyed_hash()." + NL + " -r Test sc_random()." + NL "" NL, local_progname); -/* - * Prototypes. - */ -void usage(void); - -int test_docrypt(void); -int test_dokeyedhash(void); -int test_dorandom(void); +} /* end usage() */ +static int test_docrypt(void); +static int test_dokeyedhash(void); +static int test_dorandom(void); int main(int argc, char **argv) @@ -155,6 +177,7 @@ main(int argc, char **argv) break; case 'h': rval = 0; + /* fall through */ default: usage(); exit(rval); @@ -178,7 +201,7 @@ main(int argc, char **argv) * Test stuff. */ rval = sc_init(); - FAILED(rval, "sc_init() return code"); + TEST_FAILED(rval, "sc_init() return code"); if (docrypt || doalltests) { @@ -199,26 +222,6 @@ main(int argc, char **argv) -void -usage(void) -{ - printf( USAGE - "" NL - " -a All tests." NL - " -c Test of sc_encrypt()/sc_decrypt()." - NL - " -h Help." - NL - " -H Test sc_{generate,check}_keyed_hash()." - NL - " -r Test sc_random()." - NL "" NL, local_progname); - -} /* end usage() */ - - - - /*******************************************************************-o-****** * test_dorandom * @@ -238,38 +241,38 @@ test_dorandom(void) size_t nbytes = origrequest; u_char buf[LOCAL_MAXBUF]; - OUTPUT("Random test -- large request:"); + output("Random test -- large request:"); rval = sc_random(buf, &nbytes); - FAILED(rval, "sc_random() return code"); + TEST_FAILED(rval, "sc_random() return code"); if (nbytes != origrequest) { - FAILED(SNMPERR_GENERR, - "sc_random() returned different than requested."); + TEST_FAILED(SNMPERR_GENERR, + "sc_random() returned different than requested."); } dump_chunk("scapitest", NULL, buf, nbytes); - SUCCESS("Random test -- large request."); + TEST_SUCCEEDED("Random test -- large request."); - OUTPUT("Random test -- short requests:"); + output("Random test -- short requests:"); origrequest_short = 16; for (i = 0; i < shortcount; i++) { nbytes = origrequest_short; rval = sc_random(buf, &nbytes); - FAILED(rval, "sc_random() return code"); + TEST_FAILED(rval, "sc_random() return code"); if (nbytes != origrequest_short) { - FAILED(SNMPERR_GENERR, - "sc_random() returned different " "than requested."); + TEST_FAILED(SNMPERR_GENERR, + "sc_random() returned different " "than requested."); } dump_chunk("scapitest", NULL, buf, nbytes); } /* endfor */ - SUCCESS("Random test -- short requests."); + TEST_SUCCEEDED("Random test -- short requests."); return failcount; @@ -291,7 +294,6 @@ test_dorandom(void) * NOTE Both tests intentionally use the same secret * * FIX Get input or output from some other package which hashes... - * XXX Could cut this in half with a little indirection... */ int test_dokeyedhash(void) @@ -299,15 +301,17 @@ test_dokeyedhash(void) int rval = SNMPERR_SUCCESS, bigstring_len = strlen((const char *) BIGSTRING), secret_len = strlen((const char *) BIGSECRET), - properlength, + auth_idx = 0, mlcount = 0; /* MAC Length count. */ size_t hblen; /* Hash Buffer length. */ - - u_int hashbuf_len[MLCOUNT_MAX] = { + const netsnmp_auth_alg_info *ai; + u_int hashbuf_len[] = { LOCAL_MAXBUF, USM_MD5_AND_SHA_AUTH_LEN, - USM_MD5_AND_SHA_AUTH_LEN, - USM_MD5_AND_SHA_AUTH_LEN, + USM_HMAC128SHA224_AUTH_LEN, + USM_HMAC192SHA256_AUTH_LEN, + USM_HMAC256SHA384_AUTH_LEN, + USM_HMAC384SHA512_AUTH_LEN, 7, 0, }; @@ -315,89 +319,67 @@ test_dokeyedhash(void) u_char hashbuf[LOCAL_MAXBUF]; char *s; - test_dokeyedhash_again: - - OUTPUT("Starting Keyed hash test using MD5 --"); - - memset(hashbuf, 0, LOCAL_MAXBUF); - hblen = hashbuf_len[mlcount]; - properlength = BYTESIZE(SNMP_TRANS_AUTHLEN_HMACMD5); - - rval = - sc_generate_keyed_hash(usmHMACMD5AuthProtocol, - USM_LENGTH_OID_TRANSFORM, BIGSECRET, - secret_len, BIGSTRING, - bigstring_len, - hashbuf, &hblen); - FAILED(rval, "sc_generate_keyed_hash() return code"); - - if (hashbuf_len[mlcount] > properlength) { - if (hblen != properlength) { - FAILED(SNMPERR_GENERR, "Wrong MD5 hash length returned. (1)"); - } + while(1) { - } else if (hblen != hashbuf_len[mlcount]) { - FAILED(SNMPERR_GENERR, "Wrong MD5 hash length returned. (2)"); - } - - rval = - sc_check_keyed_hash(usmHMACMD5AuthProtocol, - USM_LENGTH_OID_TRANSFORM, BIGSECRET, - secret_len, BIGSTRING, bigstring_len, hashbuf, - hblen); - FAILED(rval, "sc_check_keyed_hash() return code"); + ai = sc_get_auth_alg_byindex(++auth_idx); + if (NULL == ai) + break; - binary_to_hex(hashbuf, hblen, &s); - printf("# hash buffer (len=%" NETSNMP_PRIz "u, request=%d): %s\n", - hblen, hashbuf_len[mlcount], s); - SNMP_FREE(s); + mlcount = 0; + test_dokeyedhash_again: + hblen = hashbuf_len[mlcount]; - OUTPUT("Starting Keyed hash test using SHA1 --"); + if (ai->mac_length > hblen) { + output("Skipping Keyed hash test (len %d, proplen %d maclen %d) using %s --", hblen, ai->proper_length, ai->mac_length, ai->name); + goto skip; + } memset(hashbuf, 0, LOCAL_MAXBUF); - hblen = hashbuf_len[mlcount]; - properlength = BYTESIZE(SNMP_TRANS_AUTHLEN_HMACSHA1); + + output("Starting Keyed hash test (len %d, proplen %d, maclen %d) using %s --", hblen, ai->proper_length, ai->mac_length, ai->name); rval = - sc_generate_keyed_hash(usmHMACSHA1AuthProtocol, - USM_LENGTH_OID_TRANSFORM, BIGSECRET, - secret_len, BIGSTRING, bigstring_len, + sc_generate_keyed_hash(ai->alg_oid, ai->oid_len, BIGSECRET, + secret_len, BIGSTRING, + bigstring_len, hashbuf, &hblen); - FAILED(rval, "sc_generate_keyed_hash() return code"); + TEST_FAILED(rval, "sc_generate_keyed_hash() return code"); - if (hashbuf_len[mlcount] > properlength) { - if (hblen != properlength) { - FAILED(SNMPERR_GENERR, - "Wrong SHA1 hash length returned. (1)"); + if (hashbuf_len[mlcount] > ai->proper_length) { + if (hblen != ai->proper_length) { + TEST_FAILED(SNMPERR_GENERR, "Wrong hash length returned. (1)"); } - } else if (hblen != hashbuf_len[mlcount]) { - FAILED(SNMPERR_GENERR, "Wrong SHA1 hash length returned. (2)"); + TEST_FAILED(SNMPERR_GENERR, "Wrong hash length returned. (2)"); + } + if (hblen > ai->mac_length) { + printf("# TRUNCATING %d length hash to %s mac length %d\n", (int)hblen, + ai->name, ai->mac_length); + hblen = ai->mac_length; } rval = - sc_check_keyed_hash(usmHMACSHA1AuthProtocol, - USM_LENGTH_OID_TRANSFORM, BIGSECRET, + sc_check_keyed_hash(ai->alg_oid, ai->oid_len, BIGSECRET, secret_len, BIGSTRING, bigstring_len, hashbuf, hblen); - FAILED(rval, "sc_check_keyed_hash() return code"); + TEST_FAILED(rval, "sc_check_keyed_hash() return code"); binary_to_hex(hashbuf, hblen, &s); printf("# hash buffer (len=%" NETSNMP_PRIz "u, request=%d): %s\n", hblen, hashbuf_len[mlcount], s); SNMP_FREE(s); - SUCCESS("Keyed hash test using SHA1."); - /* * Run the basic hash tests but vary the size MAC requests. */ + skip: if (hashbuf_len[++mlcount] != 0) { goto test_dokeyedhash_again; } + } /* whilte(1) */ return failcount; @@ -416,44 +398,57 @@ test_dokeyedhash(void) int test_docrypt(void) { - int rval = SNMPERR_SUCCESS, - bigstring_len = strlen((const char *) BIGSTRING), - secret_len = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES), - iv_len = BYTESIZE(SNMP_TRANS_PRIVLEN_1DES_IV); - - size_t buf_len = LOCAL_MAXBUF; - size_t cryptbuf_len = LOCAL_MAXBUF; + int rval, index = 0, secret_len, iv_len, + bigstring_len = strlen((const char *) BIGSTRING); + const netsnmp_priv_alg_info *pi; + size_t buf_len, cryptbuf_len; u_char buf[LOCAL_MAXBUF], cryptbuf[LOCAL_MAXBUF], secret[LOCAL_MAXBUF], iv[LOCAL_MAXBUF]; - OUTPUT("Starting Test 1DES-CBC --"); + while(1) { + pi = sc_get_priv_alg_byindex(++index); + if (NULL == pi) + break; + + buf_len = sizeof(buf); + cryptbuf_len = sizeof(cryptbuf); + secret_len = pi->proper_length; + iv_len = pi->iv_length; + + output("Starting Test %s --", pi->name); + + memset(buf, 0, LOCAL_MAXBUF); - memset(buf, 0, LOCAL_MAXBUF); + memcpy(secret, BIGSECRET, secret_len); + memcpy(iv, BKWDSECRET, iv_len); - memcpy(secret, BIGSECRET, secret_len); - memcpy(iv, BKWDSECRET, iv_len); + rval = sc_encrypt(pi->alg_oid, pi->oid_len, + secret, secret_len, + iv, iv_len, + BIGSTRING, bigstring_len, cryptbuf, &cryptbuf_len); + TEST_FAILED(rval, "sc_encrypt() return code."); - rval = sc_encrypt(usmDESPrivProtocol, USM_LENGTH_OID_TRANSFORM, - secret, secret_len, - iv, iv_len, - BIGSTRING, bigstring_len, cryptbuf, &cryptbuf_len); - FAILED(rval, "sc_encrypt() return code."); + rval = sc_decrypt(pi->alg_oid, pi->oid_len, + secret, secret_len, + iv, iv_len, cryptbuf, cryptbuf_len, buf, &buf_len); + TEST_FAILED(rval, "sc_decrypt() return code."); + + if (pi->pad_size > 0) { + /* ignore the pad */ + buf_len -= buf[buf_len-1]; + } - rval = sc_decrypt(usmDESPrivProtocol, USM_LENGTH_OID_TRANSFORM, - secret, secret_len, - iv, iv_len, cryptbuf, cryptbuf_len, buf, &buf_len); - FAILED(rval, "sc_decrypt() return code."); + TEST_FAILED(buf_len != bigstring_len, + "Decrypted buffer is the right length."); + printf("# original length: %d\n", bigstring_len); + printf("# output length: %" NETSNMP_PRIz "u\n", buf_len); - /* ignore the pad */ - buf_len -= buf[buf_len-1]; + TEST_FAILED((memcmp(buf, BIGSTRING, bigstring_len) != 0), + "Decrypted buffer is the same as the original plaintext."); - FAILED((buf_len != bigstring_len), "Decrypted buffer is the right length."); - printf("# original length: %d\n", bigstring_len); - printf("# output length: %" NETSNMP_PRIz "u\n", buf_len); + } /* while(1) */ - FAILED((memcmp(buf, BIGSTRING, bigstring_len) != 0), - "Decrypted buffer is the same as the original plaintext."); return failcount; } /* end test_docrypt() */ diff --git a/testing/fulltests/snmpv3/T020hashtests_capp.c b/testing/fulltests/snmpv3/T020hashtests_capp.c index 9cb5b47..0e2092d 100644 --- a/testing/fulltests/snmpv3/T020hashtests_capp.c +++ b/testing/fulltests/snmpv3/T020hashtests_capp.c @@ -4,14 +4,30 @@ #include -void print_hash(const char *label, u_char *MAC, size_t MAC_LEN); +#ifdef NETSNMP_USE_OPENSSL +#include +#include +#include +#include +#ifdef HAVE_AES +#include +#endif +#endif /* HAVE_OPENSSL */ +#ifdef EVP_MAX_MD_SIZE +#define MAX_HASH_LEN EVP_MAX_MD_SIZE +#else +#define MAX_HASH_LEN BYTESIZE(SNMP_TRANS_AUTHLEN_HMAC384SHA512) +#endif + + +static void print_hash(const char *label, u_char *MAC, size_t MAC_LEN); int main(int argc, char **argv) { u_char buf[] = "wes hardaker"; - u_char MAC[20]; - size_t MAC_LEN = 20; + u_char MAC[MAX_HASH_LEN]; + size_t MAC_LEN = sizeof(MAC); u_char sha1key[20] = "55555555555555555555"; u_char md5key[16] = "5555555555555555"; @@ -85,7 +101,7 @@ main(int argc, char **argv) { printf("not ok: 2 - md5 keyed compare was not equal\n"); } - MAC_LEN = 20; + MAC_LEN = sizeof(MAC); memset(MAC, 0, MAC_LEN); generate_Ku(usmHMACSHA1AuthProtocol, OID_LENGTH(usmHMACSHA1AuthProtocol), @@ -93,7 +109,7 @@ main(int argc, char **argv) { MAC, &MAC_LEN); print_hash("sha1 Ku", MAC, MAC_LEN); - MAC_LEN = 16; + MAC_LEN = sizeof(MAC); memset(MAC, 0, MAC_LEN); generate_Ku(usmHMACMD5AuthProtocol, OID_LENGTH(usmHMACMD5AuthProtocol), @@ -114,4 +130,4 @@ print_hash(const char *label, u_char *MAC, size_t MAC_LEN) { printf("# %02x ", MAC[i]); } printf("\n"); -} +} diff --git a/testing/fulltests/snmpv3/T040keymanagetest_capp.c b/testing/fulltests/snmpv3/T040keymanagetest_capp.c index d68f663..5bf64e3 100644 --- a/testing/fulltests/snmpv3/T040keymanagetest_capp.c +++ b/testing/fulltests/snmpv3/T040keymanagetest_capp.c @@ -31,7 +31,9 @@ #include #endif +#ifdef HAVE_UNISTD_H #include +#endif #include #include @@ -41,12 +43,10 @@ #include #include #include +#include #include -extern char *optarg; -extern int optind, optopt, opterr; - int testcount = 0; /* @@ -68,21 +68,18 @@ int doalltests = 0, dogenKu = 0, dogenkul = 0, dokeychange = 0; #define OUTPUTALWAYS(o) fprintf(stdout, "# %s\n", o); #define OUTPUT(o) if (!bequiet) { OUTPUTALWAYS(o); } -#define SUCCESS(s) \ -{ \ - fprintf(stdout, "# Done with %s\n", s); \ -} +#define TEST_SUCCEEDED(s) do { printf("# Done with %s\n", (s)); } while (0) -#define FAILED(e, f) \ -{ \ +#define TEST_FAILED(e, f) \ +do { \ if ((e) != SNMPERR_SUCCESS) { \ - fprintf(stdout, "not ok: %d - %s\n", ++testcount, f); \ - failcount += 1; \ - } else { \ - fprintf(stdout, "ok: %d - %s\n", ++testcount, f); \ - } \ - fflush(stdout); \ -} + fprintf(stdout, "not ok: %d - %s\n", ++testcount, (f)); \ + failcount += 1; \ + } else { \ + fprintf(stdout, "ok: %d - %s\n", ++testcount, (f)); \ + } \ + fflush(stdout); \ +} while (0) #define DETAILINT(s, i) \ fprintf(stdout, "# %s: %d\n", s, i); @@ -96,24 +93,18 @@ int doalltests = 0, dogenKu = 0, dogenkul = 0, dokeychange = 0; #define OLDKEY_DEFAULT "This is a very old key." #define NEWKEY_DEFAULT "This key, on the other hand, is very new." +#define USM_LENGTH_OID_TRANSFORM OID_LENGTH(usmHMACSHA1AuthProtocol) + u_char *engineID = NULL; char *passphrase = NULL; const u_char *oldkey = NULL; const u_char *newkey = NULL; int bequiet = 0; - -/* - * Prototypes. - */ -void usage(FILE * ofp); - -int test_genkul(void); -int test_genKu(void); -int test_keychange(void); - - - +static void usage(FILE *); +static int test_genKu(void); +static int test_genkul(void); +static int test_keychange(void); int main(int argc, char **argv) @@ -158,6 +149,7 @@ main(int argc, char **argv) break; case 'h': rval = 0; + /* fall through */ default: usage(stdout); exit(rval); @@ -187,7 +179,7 @@ main(int argc, char **argv) * Test stuff. */ rval = sc_init(); - FAILED(rval, "sc_init()."); + TEST_FAILED(rval, "sc_init()."); if (dogenKu || doalltests) { failcount += test_genKu(); @@ -307,10 +299,10 @@ test_genKu(void) rval = generate_Ku(hashtype, USM_LENGTH_OID_TRANSFORM, (const u_char *) passphrase, strlen(passphrase), Ku, &kulen); - FAILED(rval, "generate_Ku()."); + TEST_FAILED(rval, "generate_Ku()."); - FAILED((kulen != properlength), - "Ku length is the right length for this hashtype."); + TEST_FAILED(kulen != properlength, + "Ku length is the right length for this hashtype."); binary_to_hex(Ku, kulen, &s); if (!bequiet) @@ -391,8 +383,8 @@ test_genkul(void) if (tolower(*(engineID + 1)) == 'x') { engineID_len = hex_to_binary2(engineID + 2, engineID_len - 2, &s); - FAILED((engineID_len < 0), - "Could not resolve hex engineID."); + TEST_FAILED(engineID_len < 0, + "Could not resolve hex engineID."); engineID = (u_char *) s; binary_to_hex(engineID, engineID_len, &s); } @@ -418,7 +410,7 @@ test_genkul(void) rval = generate_Ku(hashtype_Ku, USM_LENGTH_OID_TRANSFORM, (u_char *) passphrase, strlen(passphrase), Ku, &kulen); - FAILED(rval, "generate_Ku()."); + TEST_FAILED(rval, "generate_Ku()."); binary_to_hex(Ku, kulen, &s); if (!bequiet) @@ -436,14 +428,14 @@ test_genkul(void) if ((hashtype_Ku == usmHMACMD5AuthProtocol) && (hashtype_kul == usmHMACSHA1AuthProtocol)) { - FAILED((rval == SNMPERR_SUCCESS), - "generate_kul SHOULD fail when Ku length is " - "less than hash transform length."); + TEST_FAILED(rval == SNMPERR_SUCCESS, + "generate_kul SHOULD fail when Ku length is " + "less than hash transform length."); } else { - FAILED(rval, "generate_kul()."); + TEST_FAILED(rval, "generate_kul()."); - FAILED(kul_len != properlength, - "checking if kul length is right for the given hashtype."); + TEST_FAILED(kul_len != properlength, + "checking if kul length is right for the given hashtype."); binary_to_hex(kul, kul_len, &s); fprintf(stdout, "# kul (%s) (len=%" NETSNMP_PRIz "u): %s\n", @@ -463,7 +455,7 @@ test_genkul(void) goto test_genkul_again_local; } - SUCCESS(testname); + TEST_SUCCEEDED(testname); /* @@ -529,8 +521,7 @@ test_keychange(void) if (tolower(*(newkey + 1)) == 'x') { newkey_len = hex_to_binary2((const u_char *) newkey + 2, newkey_len - 2, &s); - FAILED(newkey_len < 0, - "Could not resolve hex newkey."); + TEST_FAILED(newkey_len < 0, "Could not resolve hex newkey."); newkey = (const u_char *) s; binary_to_hex((const u_char *) newkey, newkey_len, &s); } @@ -544,8 +535,7 @@ test_keychange(void) if (tolower(*(oldkey + 1)) == 'x') { oldkey_len = hex_to_binary2((const u_char *) oldkey + 2, oldkey_len - 2, &s); - FAILED(oldkey_len < 0, - "Could not resolve hex oldkey."); + TEST_FAILED(oldkey_len < 0, "Could not resolve hex oldkey."); oldkey = (const u_char *) s; binary_to_hex(oldkey, oldkey_len, &s); } @@ -578,11 +568,11 @@ test_keychange(void) oldkey_buf, properlength, newkey_buf, properlength, keychange_buf, &keychange_len); - FAILED(rval, "encode_keychange()."); + TEST_FAILED(rval, "encode_keychange()."); - FAILED(keychange_len != (properlength * 2), - "KeyChange string (encoded) is not proper length " - "for this hash transform."); + TEST_FAILED(keychange_len != properlength * 2, + "KeyChange string (encoded) is not proper length " + "for this hash transform."); binary_to_hex(keychange_buf, keychange_len, &s); fprintf(stdout, "# (%s) KeyChange string: %s\n", @@ -594,22 +584,21 @@ test_keychange(void) oldkey_buf, properlength, keychange_buf, properlength * 2, temp_buf, &temp_len); - FAILED(rval, "decode_keychange()."); + TEST_FAILED(rval, "decode_keychange()."); - FAILED(temp_len != properlength, - "decoded newkey is not proper length for " - "this hash transform."); + TEST_FAILED(temp_len != properlength, + "decoded newkey is not proper length for this hash transform."); binary_to_hex(temp_buf, temp_len, &s); fprintf(stdout, "# decoded newkey: %s\n", s); SNMP_FREE(s); - FAILED(memcmp(newkey_buf, temp_buf, temp_len), - "newkey did not decode properly."); + TEST_FAILED(memcmp(newkey_buf, temp_buf, temp_len), + "newkey did not decode properly."); - SUCCESS(hashname); + TEST_SUCCEEDED(hashname); /* diff --git a/testing/fulltests/snmpv3/T050etimetest_capp.c b/testing/fulltests/snmpv3/T050etimetest_capp.c index 53951aa..5258232 100644 --- a/testing/fulltests/snmpv3/T050etimetest_capp.c +++ b/testing/fulltests/snmpv3/T050etimetest_capp.c @@ -29,7 +29,9 @@ #include #endif +#ifdef HAVE_UNISTD_H #include +#endif #include #include @@ -38,15 +40,10 @@ #include #include #include +#include static u_int dummy_etime, dummy_eboot; /* For ISENGINEKNOWN(). */ - -#include - -extern char *optarg; -extern int optind, optopt, opterr; - int testcount=0; /* @@ -68,21 +65,18 @@ int doalltests = 0, dohashindex = 0, doetimetest = 0; #define OUTPUT(o) fprintf(stdout, "# %s\n", o); -#define SUCCESS(s) \ -{ \ - fprintf(stdout, "# Done with %s\n", s); \ -} +#define TEST_SUCCEEDED(s) do { printf("# Done with %s\n", (s)); } while (0) -#define FAILED(e, f) \ -{ \ +#define TEST_FAILED(e, f) \ +do { \ if (e != SNMPERR_SUCCESS) { \ - fprintf(stdout, "not ok: %d - %s\n", ++testcount, f); \ - failcount += 1; \ - } else { \ - fprintf(stdout, "ok: %d - %s\n", ++testcount, f); \ - } \ - fflush(stdout); \ -} + fprintf(stdout, "not ok: %d - %s\n", ++testcount, (f)); \ + failcount += 1; \ + } else { \ + fprintf(stdout, "ok: %d - %s\n", ++testcount, (f)); \ + } \ + fflush(stdout); \ +} while (0) #define DETAILINT(s, i) \ fprintf(stdout, "# %s: %d\n", s, i); @@ -94,24 +88,15 @@ int sleeptime = 2; #define BLAT "alk;djf;an riu;alicenmrul;aiknglksajhe1 adcfalcenrco2" - - - -/* - * Prototypes. - */ -void usage(FILE * ofp); - -int test_etime(void); -int test_hashindex(void); - - - +static void usage(FILE *); +static int test_hashindex(void); +static int test_etime(void); int main(int argc, char **argv) { - int rval = SNMPERR_SUCCESS, failcount = 0; + int rval = SNMPERR_SUCCESS; + int failcount NETSNMP_ATTRIBUTE_UNUSED = 0; char ch; local_progname = argv[0]; @@ -140,6 +125,7 @@ main(int argc, char **argv) break; case 'h': rval = 0; + /* fall through */ default: usage(stdout); exit(rval); @@ -169,7 +155,7 @@ main(int argc, char **argv) * test stuff. */ rval = sc_init(); - FAILED(rval, "sc_init()"); + TEST_FAILED(rval, "sc_init()"); if (dohashindex || doalltests) { @@ -304,19 +290,19 @@ test_etime(void) rval = ISENGINEKNOWN((const u_char *) "A", 1); if (rval == TRUE) { - FAILED(SNMPERR_GENERR, "Query of empty list returned TRUE.") + TEST_FAILED(SNMPERR_GENERR, "Query of empty list returned TRUE."); } rval = set_enginetime((const u_char *) "BB", 2, 2, 20, TRUE); - FAILED(rval, "set_enginetime()"); + TEST_FAILED(rval, "set_enginetime()"); rval = set_enginetime((const u_char *) "CCC", 3, 31, 90127, TRUE); - FAILED(rval, "set_enginetime()"); + TEST_FAILED(rval, "set_enginetime()"); - SUCCESS("Check of empty list, and two additions."); + TEST_SUCCEEDED("Check of empty list, and two additions."); @@ -327,23 +313,23 @@ test_etime(void) rval = ENSURE_ENGINE_RECORD((const u_char *) "DDDD", 4); - FAILED(rval, "ENSURE_ENGINE_RECORD()"); + TEST_FAILED(rval, "ENSURE_ENGINE_RECORD()"); rval = MAKENEW_ENGINE_RECORD((const u_char *) "EEEEE", 5); if (rval == SNMPERR_SUCCESS) { - FAILED(rval, - "MAKENEW_ENGINE_RECORD returned success for " - "missing record."); + TEST_FAILED(rval, + "MAKENEW_ENGINE_RECORD returned success for " + "missing record."); } rval = MAKENEW_ENGINE_RECORD((const u_char *) "BB", 2); - FAILED(rval, "MAKENEW_ENGINE_RECORD()."); + TEST_FAILED(rval, "MAKENEW_ENGINE_RECORD()."); - SUCCESS - ("Added entries with macros, tested for existence with macros."); + TEST_SUCCEEDED("Added entries with macros, tested for existence with" + " macros."); @@ -371,33 +357,33 @@ test_etime(void) rval = get_enginetime((const u_char *) "BB", 2, &eboot, &etime, TRUE); - FAILED(rval, "get_enginetime()."); + TEST_FAILED(rval, "get_enginetime()."); fprintf(stdout, "# BB = <%d,%d>\n", eboot, etime); if ((etime < 20) || (eboot < 2)) { - FAILED(SNMPERR_GENERR, - "get_enginetime() returned bad values. (1)"); + TEST_FAILED(SNMPERR_GENERR, + "get_enginetime() returned bad values. (1)"); } rval = get_enginetime((const u_char *) "DDDD", 4, &eboot, &etime, FALSE); - FAILED(rval, "get_enginetime()."); + TEST_FAILED(rval, "get_enginetime()."); fprintf(stdout, "# DDDD = <%d,%d>\n", eboot, etime); if ((etime < sleeptime) || (eboot != 0)) { - FAILED(SNMPERR_GENERR, - "get_enginetime() returned bad values. (2)"); + TEST_FAILED(SNMPERR_GENERR, + "get_enginetime() returned bad values. (2)"); } rval = set_enginetime((const u_char *) "CCC", 3, 234, 10000, TRUE); - FAILED(rval, "set_enginetime()."); + TEST_FAILED(rval, "set_enginetime()."); rval = set_enginetime((const u_char *) "EEEEE", 5, 9876, 55555, TRUE); - FAILED(rval, "set_enginetime()."); + TEST_FAILED(rval, "set_enginetime()."); - SUCCESS("Retrieval and updates."); + TEST_SUCCEEDED("Retrieval and updates."); diff --git a/testing/fulltests/support/cagentlib_build b/testing/fulltests/support/cagentlib_build index 55a35ae..ec77b0e 100644 --- a/testing/fulltests/support/cagentlib_build +++ b/testing/fulltests/support/cagentlib_build @@ -8,6 +8,7 @@ cat >>"$2.c" < #include #include +#include /* testing specific header */ #include @@ -42,5 +43,5 @@ cat >>"$2.c" <>"$2.c" < #include #include +#include "snmplib/transports/snmpIPBaseDomain.h" +#include /* testing specific header */ #include /* standard headers */ #include +#ifdef HAVE_INTTYPES_H +#include +#endif #include +#if HAVE_UNISTD_H +#include +#endif #include #ifdef HAVE_LIMITS_H #include @@ -70,5 +78,5 @@ cat >>"$2.c" <import(qw(AF_INET6 inet_ntop inet_pton pack_sockaddr_in6 + sockaddr_in6))") { + use Socket qw(AF_INET SOCK_DGRAM pack_sockaddr_in sockaddr_in); +} else { + use Socket qw(AF_INET AF_INET6 SOCK_DGRAM inet_ntop inet_pton + pack_sockaddr_in pack_sockaddr_in6 sockaddr_in sockaddr_in6); +} + + +my $v6 = defined($ARGV[0]) && $ARGV[0] eq "ipv6"; +my ($af, $dest, $noaddr); +if ($v6) { + $af = AF_INET6; + $dest = '2001:4860:4860::8888'; + $noaddr = '::'; + } else { + $af = AF_INET; + $dest = '8.8.8.8'; + $noaddr = '0.0.0.0'; +} +socket(my $sock, $af, SOCK_DGRAM, 0) or die "socket creation failed: $!"; +my $myip; +if ($v6) { + connect($sock, pack_sockaddr_in6(53, inet_pton($af, $dest))); + my ($port, $ip6_address) = sockaddr_in6(getsockname($sock)); + socket(my $sock2, $af, SOCK_DGRAM, 0); + my $i = 1; + while (1) { + bind($sock2, sockaddr_in6(0, $ip6_address, $i)) && last; + $i++; + } + $myip = inet_ntop($af, $ip6_address); + exit 1 if $myip eq $noaddr; + $myip = $myip . '%' . $i; +} else { + connect($sock, pack_sockaddr_in(53, inet_pton($af, $dest))); + my ($port, $myaddr) = sockaddr_in(getsockname($sock)); + $myip = inet_ntop($af, $myaddr); + exit 1 if $myip eq $noaddr; +} +print $myip, "\n"; +exit 0; diff --git a/testing/fulltests/support/simple_TESTCONF.sh b/testing/fulltests/support/simple_TESTCONF.sh index 2a0a8af..ecc67ef 100644 --- a/testing/fulltests/support/simple_TESTCONF.sh +++ b/testing/fulltests/support/simple_TESTCONF.sh @@ -40,12 +40,14 @@ if [ "x$TESTCONF_SH_EVALED" != "xyes" ]; then # # defaults: 1h CPU, 500MB VMEM # -[ "x$SNMP_LIMIT_VMEM" = "x" ] && SNMP_LIMIT_VMEM=512000 -[ "x$SNMP_LIMIT_CPU" = "x" ] && SNMP_LIMIT_CPU=3600 -# ulimit will fail if existing limit is lower -- ignore because it's ok -ulimit -S -t $SNMP_LIMIT_CPU 2>/dev/null -# not all sh-alikes support "ulimit -v" -- play safe -[ "x$BASH_VERSION" != "x" ] && ulimit -S -v $SNMP_LIMIT_VMEM 2>/dev/null +if [ "x$SNMP_NO_RUNTIME_LIMITS" = "x" ]; then + [ "x$SNMP_LIMIT_VMEM" = "x" ] && SNMP_LIMIT_VMEM=512000 + [ "x$SNMP_LIMIT_CPU" = "x" ] && SNMP_LIMIT_CPU=3600 + # ulimit will fail if existing limit is lower -- ignore because it's ok + ulimit -S -t $SNMP_LIMIT_CPU 2>/dev/null + # not all sh-alikes support "ulimit -v" -- play safe + [ "x$BASH_VERSION" != "x" ] && ulimit -S -v $SNMP_LIMIT_VMEM 2>/dev/null +fi # # Set up an NL suppressing echo command @@ -196,6 +198,12 @@ elif test -x /cygdrive/c/windows/system32/netstat ; then elif test -x /c/Windows/System32/netstat ; then # MinGW + MSYS NETSTAT=/c/Windows/System32/netstat +elif test -x /usr/sbin/ss ; then + # Fedora24, RHEL7 does not install netstat as standard + NETSTAT=/usr/sbin/ss +elif test -x /usr/bin/ss ; then + # Debian 10 (buster) put ss in /usr/bin/ss + NETSTAT=/usr/bin/ss else NETSTAT="" fi @@ -211,7 +219,7 @@ fi PROBE_FOR_PORT() { BASE_PORT=$1 - MAX_RETRIES=10 + MAX_RETRIES=30 if test -x "$NETSTAT" ; then if test -z "$RANDOM"; then RANDOM=2 diff --git a/testing/fulltests/support/simple_eval_tools.sh b/testing/fulltests/support/simple_eval_tools.sh index 718edc4..e54f7ab 100644 --- a/testing/fulltests/support/simple_eval_tools.sh +++ b/testing/fulltests/support/simple_eval_tools.sh @@ -1,3 +1,4 @@ +#!/bin/sh # # eval_tools.sh # @@ -214,7 +215,7 @@ KNORG fi echo "RUNNING: $*" > $junkoutputfile - ( $* 2>&1 ) >> $junkoutputfile 2>&1 + ( $DYNAMIC_ANALYZER $* 2>&1 ) >> $junkoutputfile 2>&1 RC=$? if [ $SNMP_VERBOSE -gt 1 ]; then @@ -524,6 +525,7 @@ STARTPROG() { if test -f $CFG_FILE; then COMMAND="$COMMAND -C -c $CFG_FILE" fi + COMMAND="$COMMAND -f" if [ "x$PORT_SPEC" != "x" ]; then COMMAND="$COMMAND $PORT_SPEC" fi @@ -535,13 +537,10 @@ STARTPROG() { OUTPUTENVVARS $LOG_FILE.command echo $COMMAND >> $LOG_FILE.command fi - if [ "x$OSTYPE" = "xmsys" ]; then - $COMMAND > $LOG_FILE.stdout 2>&1 & - ## COMMAND="cmd.exe //c start //min $COMMAND" - ## start $COMMAND > $LOG_FILE.stdout 2>&1 - else - $COMMAND > $LOG_FILE.stdout 2>&1 - fi + { + { $COMMAND; } >$LOG_FILE.stdout 2>&1 + echo $? >$LOG_FILE.exitcode + } & } #------------------------------------ -o- @@ -685,6 +684,23 @@ FINISHED() { rm -f core fi echo "$headerStr...FAIL" >> $SNMP_TMPDIR/invoked + if [ -n "$APPVEYOR" ] || [ -n "$CIRRUS_CI" ]; then + { + find "$SNMP_TMPDIR" -type f | + while read -r f; do + local lines + echo "==== $f" + lines=$(wc -l "$f" | { read -r a b; echo "$a"; }) + if [ "$lines" -gt 512 ]; then + head -n 256 "$f" + echo "..." + tail -n 256 "$f" + else + cat "$f" + fi + done; + } 1>&2 + fi exit 1 fi diff --git a/testing/fulltests/support/simple_run b/testing/fulltests/support/simple_run index 1978009..e02d16b 100644 --- a/testing/fulltests/support/simple_run +++ b/testing/fulltests/support/simple_run @@ -6,9 +6,9 @@ if [ $# = 0 ]; then fi if [ "x$builddir" = "x" ]; then - cd .. builddir=`pwd` - if cd testing 2>/dev/null; then + builddir=`dirname "$builddir"` + if [ -d "${builddir}/testing" ]; then : else echo "Error: $0 must be started from inside the testing directory in the source tree." @@ -18,11 +18,11 @@ if [ "x$builddir" = "x" ]; then fi if [ "x$srcdir" = "x" ]; then - srcdir=`dirname $0` - srcdir=`cd $srcdir; cd ../..; pwd` - srcdir=`dirname $srcdir` - cd $srcdir - if cd testing 2>/dev/null; then + srcdir=`dirname "$0"` + srcdir=`dirname "$srcdir"` + srcdir=`dirname "$srcdir"` + srcdir=`dirname "$srcdir"` + if [ -d "${srcdir}/testing" ]; then : else echo "Error: $0 must be started from inside the testing directory in the source tree." @@ -32,11 +32,14 @@ if [ "x$srcdir" = "x" ]; then fi testscript=$1 -if [ `echo $testscript | cut -c 1-1` != '/' ]; then +if [ `echo "$testscript" | cut -c 1-1` != '/' ]; then testscript="`pwd`/$1" fi -SNMP_BASEDIR=`dirname $0` +SNMP_BASEDIR=`dirname "$0"` +if [ `echo "$SNMP_BASEDIR" | cut -c 1-1` != '/' ]; then + SNMP_BASEDIR="`pwd`/$SNMP_BASEDIR" +fi ## prefer MIB files found in source hierarchy SNMP_PREFER_NEAR_MIBS=1 @@ -45,10 +48,6 @@ export SNMP_PREFER_NEAR_MIBS SNMP_TEST_PREFIX=${SNMP_TEST_PREFIX:=T} export SNMP_TEST_PREFIX -SNMP_ORIGDIR=`pwd` ## this script may be invoked with relative path -export SNMP_ORIGDIR - -SNMP_UPDIR=${builddir} ## build directory if [ "x$DYNAMIC_ANALYZER" = "x" ]; then SNMP_SLEEP_DEFAULT=1 else @@ -60,15 +59,14 @@ export SNMP_SLEEP # Find executables in source first, then build, then existing PATH. ## Add to PATH if a binary is found. -cd $SNMP_UPDIR -SNMP_UPDIR=`pwd` +SNMP_UPDIR=${builddir} ## build directory bf=snmpget -if [ -x "$bf" ] ; then +if [ -x "$SNMP_UPDIR/$bf" ] ; then PATH=$SNMP_UPDIR:$PATH else for dd in apps bin ; do bf=$dd/snmpget - if [ -x "$bf" ] ; then + if [ -x "$SNMP_UPDIR/$bf" ] ; then PATH=$SNMP_UPDIR/$dd:$PATH break fi @@ -76,21 +74,20 @@ else fi for dd in agent bin sbin ; do bf=$dd/snmpd - if [ -x "$bf" ] ; then + if [ -x "$SNMP_UPDIR/$bf" ] ; then PATH=$SNMP_UPDIR/$dd:$PATH break fi done bf=include/net-snmp/net-snmp-config.h -if [ ! -s "$bf" ] ; then +if [ ! -s "$SNMP_UPDIR/$bf" ] ; then echo "No \"$bf\" in $SNMP_UPDIR . Some tests will be skipped" fi unset bf # Run from the test scripts directory. -cd $SNMP_ORIGDIR ; cd ${SNMP_BASEDIR} -SNMP_BASEDIR=`pwd` +cd "${SNMP_BASEDIR}" || return $? export SNMP_BASEDIR PATH=${SNMP_BASEDIR}:$PATH @@ -110,10 +107,10 @@ testnum="`basename $testscript`" . simple_eval_tools.sh -cd `dirname $testscript` +cd `dirname "$testscript"` || return $? PATH=`pwd`:$PATH export PATH -. `basename $testscript` +. `basename "$testscript"` FINISHED diff --git a/testing/fulltests/tls/S300tlsperl.pl b/testing/fulltests/tls/S300tlsperl.pl index 3ea7c0b..c50ae4c 100644 --- a/testing/fulltests/tls/S300tlsperl.pl +++ b/testing/fulltests/tls/S300tlsperl.pl @@ -1,14 +1,5 @@ #!/usr/bin/perl -BEGIN { - if (exists($ENV{'srcdir'})) { - push @INC, "$ENV{'srcdir'}/testing/fulltests/support"; - } elsif (-d "fulltests/support") { - push @INC, "fulltests/support"; - } elsif (-d "../support") { - push @INC, "../support"; - } -} use NetSNMPTest; use Test; use SNMP; diff --git a/testing/fulltests/tls/SCipherTests b/testing/fulltests/tls/SCipherTests index 95af0b9..c5c1919 100644 --- a/testing/fulltests/tls/SCipherTests +++ b/testing/fulltests/tls/SCipherTests @@ -1,3 +1,5 @@ +#!/bin/sh + . STlsVars # create a CA @@ -10,7 +12,7 @@ CHECKVALUEISNT "$CAFP" "" "generated fingerprint for ca-net-snmp.org certificate CAPTURE $NSCERT gencert -t snmpd --with-ca ca-net-snmp.org $checknametype ${checknameprefix}foobar $NSCERTARGS SNMPDFP=`$NSCERT showcert --fingerprint --brief snmpd $NSCERTARGS` -CONFIGAGENT '[snmp]' serverCert $SNMPDFP +CONFIGAGENT '[snmp]' localCert $SNMPDFP # create a user certificate CAPTURE $NSCERT gencert -t snmpapp --cn 'testuser' $NSCERTARGS @@ -20,15 +22,16 @@ CHECKVALUEISNT "$TESTUSERFP" "" "generated fingerprint for testuser certificate" CONFIGAGENT certSecName 10 $TESTUSERFP --cn CONFIGAGENT rwuser -s tsm testuser authpriv -CONFIGAPP clientCert $TESTUSERFP -CONFIGAPP serverCert $SNMPDFP +CONFIGAPP localCert $TESTUSERFP +CONFIGAPP peerCert $SNMPDFP CONFIGAPP trustCert $CAFP # specify an exact list of ciphers to accept CONFIGAGENT '[snmp]' tlsAlgorithms DHE-RSA-AES256-SHA:AES256-SHA:DES-CBC3-SHA -FLAGS="-On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# app flags +FLAGS="-v3 -r1 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" # start up the agent STARTAGENT diff --git a/testing/fulltests/tls/SCrl b/testing/fulltests/tls/SCrl index 4167403..0d7a804 100644 --- a/testing/fulltests/tls/SCrl +++ b/testing/fulltests/tls/SCrl @@ -31,7 +31,7 @@ CHECKVALUEISNT "$TESTUSER2FP" "" "generated fingerprint for testuser2 certificat ######################################## # Configure the .conf files -CONFIGAPP serverCert $SERVERFP +CONFIGAPP peerCert $SERVERFP # common name mappings CONFIGAGENT certSecName 9 $TESTUSERFP --cn @@ -64,8 +64,10 @@ CAPTURE "$CRLCACMD -gencrl $CRLARGS -out $CRLFILE" # Run the actual list of tests # +# app flags +FLAGS="-Dtls -v3 -r1 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" + # start the agent up -FLAGS="-Dtls -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" AGENT_FLAGS="-Dtls" STARTAGENT diff --git a/testing/fulltests/tls/STlsAgentTrap b/testing/fulltests/tls/STlsAgentTrap index ab0c341..6a492e1 100644 --- a/testing/fulltests/tls/STlsAgentTrap +++ b/testing/fulltests/tls/STlsAgentTrap @@ -9,15 +9,14 @@ SKIPIFNOT USING_EXAMPLES_EXAMPLE_MODULE # # produce the certificates to use +HOSTNAME=`hostname` # snmptrapd -HOSTNAME=`hostname` CAPTURE $NSCERT gencert -t snmptrapd --cn $HOSTNAME $NSCERTARGS TRAPDFP=`$NSCERT showcerts --fingerprint --brief snmptrapd $NSCERTARGS` CHECKVALUEISNT "$TRAPDFP" "" "generated fingerprint for snmptrapd certificate" # snmpd -HOSTNAME=`hostname` CAPTURE $NSCERT gencert -t snmpd --cn $HOSTNAME $NSCERTARGS SERVERFP=`$NSCERT showcerts --fingerprint --brief snmpd $NSCERTARGS` CHECKVALUEISNT "$SERVERFP" "" "generated fingerprint for snmpd certificate" @@ -31,16 +30,16 @@ CHECKVALUEISNT "$TESTUSERFP" "" "generated fingerprint for testuser certificate" # Configuration # snmpd -CONFIGAGENT trapsess -Ci -T our_identity=$TESTUSERFP -T their_identity=$TRAPDFP ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} -CONFIGAGENT '[snmp]' serverCert $SERVERFP +CONFIGAGENT trapsess -T localCert=$TESTUSERFP -T peerCert=$TRAPDFP ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} +CONFIGAGENT trapsess -Ci -T localCert=$TESTUSERFP -T peerCert=$TRAPDFP ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} +CONFIGAGENT '[snmp]' localCert $SERVERFP CONFIGAGENT certSecName 9 $TESTUSERFP --cn CONFIGAGENT rwuser -s tsm testuser # snmptrapd -CONFIGTRAPD '[snmp]' serverCert $TRAPDFP +CONFIGTRAPD '[snmp]' localCert $TRAPDFP CONFIGTRAPD certSecName 9 $TESTUSERFP --cn CONFIGTRAPD authuser log -s tsm testuser authpriv -CONFIGTRAPD agentxsocket /dev/null # general @@ -50,17 +49,15 @@ CONFIGTRAPD agentxsocket /dev/null STARTTRAPD -# initialize only the example mib, and not the notification mib stuff AGENT_FLAGS="$AGENT_FLAGS -Dexample,header_generic" STARTAGENT -#DELAY -CAPTURE "snmpset -T their_identity=snmpd -T our_identity=snmpapp -On -t 3 -r 0 $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.4.1.2021.254.8.0 i 1" +CAPTURE "snmpset -v3 -T peerCert=snmpd -T localCert=snmpapp -On -t 3 -r 0 $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.4.1.2021.254.8.0 i 1" STOPAGENT STOPTRAPD -CHECKTRAPD "life the universe and everything" +CHECKTRAPDCOUNT 2 "life the universe and everything" FINISHED diff --git a/testing/fulltests/tls/STlsServer b/testing/fulltests/tls/STlsServer index 1e8002d..73d0096 100644 --- a/testing/fulltests/tls/STlsServer +++ b/testing/fulltests/tls/STlsServer @@ -12,7 +12,7 @@ CHECKVALUEISNT "$CAFP" "" "generated fingerprint for ca-net-snmp.org certificate CAPTURE $NSCERT gencert -t snmpd --with-ca ca-net-snmp.org $checknametype ${checknameprefix}a.b.example.com $NSCERTARGS SNMPDFP=`$NSCERT showcert --fingerprint --brief snmpd $NSCERTARGS` -CONFIGAGENT '[snmp]' serverCert $SNMPDFP +CONFIGAGENT '[snmp]' localCert $SNMPDFP # create a user certificate CAPTURE $NSCERT gencert -t snmpapp --cn 'testuser' $NSCERTARGS @@ -22,10 +22,10 @@ CHECKVALUEISNT "$TESTUSERFP" "" "generated fingerprint for testuser certificate" CONFIGAGENT certSecName 10 $TESTUSERFP --cn CONFIGAGENT rwuser -s tsm testuser authpriv -CONFIGAPP clientCert $TESTUSERFP +CONFIGAPP localCert $TESTUSERFP -# start the agent up -FLAGS="-On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# app flags +FLAGS="-v3 -r1 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" # start up the agent STARTAGENT @@ -52,7 +52,7 @@ DOSETTEST hostnameIdentity "-T trust_cert=$CAFP -T their_hostname=a.b.example.co DOFAILSETTEST noTrustCACert "-T their_hostname=a.b.example.com $FLAGS" # if we specify a different hostname we should fail hostname test -# ("localhos" without the "t" is intentional here) +# (".co" without the "m" is intentional here) DOFAILSETTEST incorrectNameA.B.Example.Co "-T their_hostname=a.b.example.co $FLAGS" DOFAILSETTEST incorrectNameA.B.Example.Comt "-T their_hostname=a.b.example.comt $FLAGS" diff --git a/testing/fulltests/tls/STlsServerSession b/testing/fulltests/tls/STlsServerSession index acf68e5..2bcd7a7 100644 --- a/testing/fulltests/tls/STlsServerSession +++ b/testing/fulltests/tls/STlsServerSession @@ -15,7 +15,7 @@ CHECKVALUEISNT "$CAFP" "" "generated fingerprint for ca-net-snmp.org certificate CAPTURE $NSCERT gencert -t snmpd --with-ca ca-net-snmp.org $checknametype ${checknameprefix}$OURHOST $NSCERTARGS SNMPDFP=`$NSCERT showcert --fingerprint --brief snmpd $NSCERTARGS` -CONFIGAGENT '[snmp]' serverCert $SNMPDFP +CONFIGAGENT '[snmp]' localCert $SNMPDFP # create a user certificate CAPTURE $NSCERT gencert -t snmpapp --cn 'testuser' $NSCERTARGS @@ -25,10 +25,10 @@ CHECKVALUEISNT "$TESTUSERFP" "" "generated fingerprint for testuser certificate" CONFIGAGENT certSecName 10 $TESTUSERFP --cn CONFIGAGENT rwuser -s tsm testuser authpriv -CONFIGAPP clientCert $TESTUSERFP +CONFIGAPP clientCert $TESTUSERFP -# start the agent up -FLAGS="-On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# app flags +FLAGS="-v3 -r1 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" # start up the agent STARTAGENT diff --git a/testing/fulltests/tls/STlsTrapdUser b/testing/fulltests/tls/STlsTrapdUser index e14c427..c795609 100644 --- a/testing/fulltests/tls/STlsTrapdUser +++ b/testing/fulltests/tls/STlsTrapdUser @@ -37,7 +37,7 @@ CHECKVALUEISNT "$CAUSERFP" "" "generated fingerprint for causer certificate" CONFIGTRAPD '[snmp]' debugTokens tsm # ,tls,ssl,cert,tsm CONFIGTRAPD '[snmp]' doDebugging 1 -CONFIGTRAPD '[snmp]' serverCert $SERVERFP +CONFIGTRAPD '[snmp]' localCert $SERVERFP CONFIGTRAPD '[snmp]' trustCert $CAFP @@ -46,16 +46,17 @@ CONFIGTRAPD certSecName 9 $TESTUSERFP --cn CONFIGTRAPD certSecName 100 $CAFP --rfc822 -CONFIGAPP serverCert $SERVERFP +CONFIGAPP peerCert $SERVERFP CONFIGAPP defSecurityModel tsm CONFIGTRAPD authuser log -s tsm testuser authpriv # this file contains tests common to both tls and dtls usages -# start the agent up -FLAGS="-Dtls -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPTRAPD_PORT" +# app flags +FLAGS="-Dtls -r1 -v3 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPTRAPD_PORT" +# start the trap daemon STARTTRAPD ######################################## diff --git a/testing/fulltests/tls/STlsUsers b/testing/fulltests/tls/STlsUsers index 2cb03a6..c5c09ee 100644 --- a/testing/fulltests/tls/STlsUsers +++ b/testing/fulltests/tls/STlsUsers @@ -100,7 +100,7 @@ CONFIGAGENT '[snmp]' debugTokens tsm # ,tls,ssl,cert,tsm CONFIGAGENT '[snmp]' doDebugging 1 CONFIGAGENT '[snmp]' logTimestamp 1 -CONFIGAGENT '[snmp]' serverCert $SERVERFP +CONFIGAGENT '[snmp]' localCert $SERVERFP CONFIGAGENT '[snmp]' trustCert $CAFP CONFIGAGENT '[snmp]' trustCert $CADIRECT9CFP @@ -126,7 +126,7 @@ CONFIGAGENT certSecName 102 $CADIRECT9CFP --sn causerdirect9cmap # *** INTENTIONALLY NOT MAPPING AT ALL: *** # CONFIGAGENT certSecName 1000 $UNMAPPEDFP .... -CONFIGAPP serverCert $SERVERFP +CONFIGAPP peerCert $SERVERFP CONFIGAPP defSecurityModel tsm CONFIGAPP logTimestamp 1 @@ -148,9 +148,10 @@ CONFIGAGENT rwuser -s tsm causerdirect9cmap authpriv # this file contains tests common to both tls and dtls usages -# start the agent up -FLAGS="-Dtls -v3 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# app flags +FLAGS="-Dtls -r1 -v3 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# start the agent up STARTAGENT # shouldn't have config errors @@ -187,7 +188,7 @@ CHECKVALUEISNT "$UNKNOWNCAUSERFP" "" "generated fingerprint for unknowncauser ce DOSETTEST user1SnmpApp "$FLAGS" # now rerun the test after specifying our default using the (same) fingerprint -CONFIGAPP clientCert $TESTUSER2FP +CONFIGAPP localCert $TESTUSER2FP DOSETTEST user1ClientPub "$FLAGS" # using user 2 - a common name mapped certificate with a direct -T FP request @@ -213,7 +214,7 @@ CHECK "failed rfc5343" # Check *their* certificate with a different one than expected; should fail DOFAILSETTEST "incorectServerCertificate" "-r 0 -T our_identity=$OTHERUSERFP -T their_identity=$OTHERUSERFP $FLAGS" -CHECK "failed to verify ssl certificate" +CHECKCOUNT atleastone "failed to verify ssl certificate" # using user 5 - a completely remapped certificate (direct specified secname) DOSETTEST user5RemappedSecname "-T our_identity=$MAPPEDUSERFP $FLAGS" @@ -245,10 +246,10 @@ DOFAILSETTEST user9dCASignedDirectMap "-T our_identity=$CADIRECT9DFP $FLAGS" # using user unknown - the server will not have seen this fingerprint at all CAPTURE "snmpget -T our_identity=$UNKNOWNUSER -T trust_cert=$CAFP $FLAGS .1.3.6.1.2.1.1.6.0" -# different types of failure messaages for tls/dtls... +# different types of failure messages for tls/dtls... if [ $SNMP_TRANSPORT_SPEC = dtlsudp ]; then CHECK "failed rfc5343 contextEngineID probing" - CHECKAGENTCOUNT 1 "TLS Error: no certificate returned" + CHECKAGENTCOUNT 1 "TLS Error: no certificate returned\|TLS Error: certificate verify failed" else CHECK "failed to ssl_connect" CHECKAGENTCOUNT 1 "Failed SSL_accept" diff --git a/testing/fulltests/tls/STlsVars b/testing/fulltests/tls/STlsVars index bba84f9..46a01b2 100644 --- a/testing/fulltests/tls/STlsVars +++ b/testing/fulltests/tls/STlsVars @@ -40,7 +40,7 @@ DOTRAPTEST() { # IF-MIB::linkUp CAPTURE "snmptrap $args 0 .1.3.6.1.6.3.1.1.5.4 system.sysContact.0 s $value" - + DELAY 1 CHECKTRAPD "STRING: $value" } @@ -50,7 +50,7 @@ DOFAILTRAPTEST() { # IF-MIB::linkUp CAPTURE "snmptrap $args 0 .1.3.6.1.6.3.1.1.5.4 system.sysContact.0 s $value" - + DELAY 1 CHECKTRAPDCOUNT 0 "$value" } diff --git a/testing/fulltests/tls/STsmPrefix b/testing/fulltests/tls/STsmPrefix index ec0f8d6..c4105d5 100644 --- a/testing/fulltests/tls/STsmPrefix +++ b/testing/fulltests/tls/STsmPrefix @@ -32,18 +32,20 @@ CAPTURE $NSCERT gencert --with-ca ca-net-snmp.org -t snmpapp2 --cn 'testuser2' TESTUSER2FP=`$NSCERT showcerts --fingerprint --brief snmpapp2 $NSCERTARGS` CHECKVALUEISNT "$TESTUSER2FP" "" "generated fingerprint for testuser2 certificate" -CONFIGAPP serverCert $SERVERFP +CONFIGAPP peerCert $SERVERFP CONFIGAGENT certSecName 9 $TESTUSERFP --cn CONFIGAGENT certSecName 10 $TESTUSER2FP --cn CONFIGAGENT rwuser -s tsm testuser authpriv CONFIGAGENT rwuser -s tsm $TSM_PREFIX:testuser2 authpriv CONFIGAGENT rocommunity public +# app flags +FLAGS="-v3 -r1 -On $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" + # # Start the agent # -AGENT_FLAGS="-Dtsm udp:9999" -FLAGS="-On $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +AGENT_FLAGS="-Dtsm" STARTAGENT CAPTURE "snmpget -Dssl $FLAGS .1.3.6.1.2.1.190.1.2.1.0" @@ -78,8 +80,6 @@ CAPTURE "snmpget -Dssl $FLAGS .1.3.6.1.2.1.1.3.0" CHECKCOUNT 0 ".1.3.6.1.2.1.1.3.0 = Timeticks:" CHECK "authorizationError" -CAPTURE "snmpget -v 1 -c public 127.0.0.1:9999 .1.3.6.1.2.1.190.1.2.1.0" - # cleanup STOPAGENT diff --git a/testing/fulltests/tls/T111DtlsServer_simple b/testing/fulltests/tls/T111DtlsServer_simple index 6b42494..83331dd 100644 --- a/testing/fulltests/tls/T111DtlsServer_simple +++ b/testing/fulltests/tls/T111DtlsServer_simple @@ -4,7 +4,7 @@ HEADER DTLS-UDP server certificate tests -SKIPIFNOT NETSNMP_TRANSPORT_TLSTCP_DOMAIN +SKIPIFNOT NETSNMP_TRANSPORT_DTLSUDP_DOMAIN # # Begin test diff --git a/testing/fulltests/tls/T113DtlsSan_simple b/testing/fulltests/tls/T113DtlsSan_simple index 1edb3c5..843e77d 100644 --- a/testing/fulltests/tls/T113DtlsSan_simple +++ b/testing/fulltests/tls/T113DtlsSan_simple @@ -4,7 +4,7 @@ HEADER DTLS-UDP server SAN tests -SKIPIFNOT NETSNMP_TRANSPORT_TLSTCP_DOMAIN +SKIPIFNOT NETSNMP_TRANSPORT_DTLSUDP_DOMAIN # # Begin test diff --git a/testing/fulltests/tls/T200TlsIpv6_simple b/testing/fulltests/tls/T200TlsIpv6_simple index 5e37f4c..b61f301 100644 --- a/testing/fulltests/tls/T200TlsIpv6_simple +++ b/testing/fulltests/tls/T200TlsIpv6_simple @@ -5,15 +5,13 @@ HEADER TLS-TCP over IPV6 SKIPIFNOT NETSNMP_TRANSPORT_TLSTCP_DOMAIN -SKIPIFNOT NETSNMP_TRANSPORT_TLSIPV6_DOMAIN -# ensure we have a localhost6 entry +openssl_version=$(openssl version | cut -d ' ' -f2) +major=$(echo $openssl_version | cut -c1) +minor=$(echo $openssl_version | cut -c3) -# XXX: this stems from broken issues in openssl that refuse [::1]: -# style accept strings (it works for client connections). -grep localhost6 /etc/hosts > /dev/null 2>&1 -if [ $? = 1 ] ; then - SKIP This test requires a localhost6 entry in /etc/hosts +if [ $major -lt 1 ] || { [ $major -eq 1 ] && [ $minor -eq 0 ]; }; then + SKIP "openssl version $openssl_version does not support IPv6" fi # @@ -21,7 +19,7 @@ fi # SNMP_TRANSPORT_SPEC=tlstcp -SNMP_TEST_DEST='localhost6:' +SNMP_TEST_DEST='[::1]:' export SNMP_TRANSPORT_SPEC export SNMP_SNMPD_PORT export SNMP_TEST_DEST diff --git a/testing/fulltests/transports/Stlstests b/testing/fulltests/transports/Stlstests index 21b2b82..2aa7c49 100644 --- a/testing/fulltests/transports/Stlstests +++ b/testing/fulltests/transports/Stlstests @@ -23,7 +23,7 @@ CHECKVALUEISNT "$TESTUSERFP" "" "generated fingerprint for testuser certificate" ######################################## # Configure the .conf files -CONFIGAPP serverCert $SERVERFP +CONFIGAPP peerCert $SERVERFP # common name mappings CONFIGAGENT certSecName 9 $TESTUSERFP --cn @@ -33,9 +33,10 @@ CONFIGAGENT rwuser -s tsm testuser authpriv # Run the actual list of tests # -# start the agent up -FLAGS="-On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# app flags +FLAGS="-v3 -On $SNMP_FLAGS $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT" +# start the agent up STARTAGENT # using user 1 - a common name mapped certificate diff --git a/testing/fulltests/transports/T361tlstcp_simple b/testing/fulltests/transports/T361tlstcp_simple index 7972a2e..7fa36ed 100644 --- a/testing/fulltests/transports/T361tlstcp_simple +++ b/testing/fulltests/transports/T361tlstcp_simple @@ -4,7 +4,7 @@ HEADER TLS-TCP Transport -SKIPIFNOT NETSNMP_TRANSPORT_DTLSUDP_DOMAIN +SKIPIFNOT NETSNMP_TRANSPORT_TLSTCP_DOMAIN # # Begin test diff --git a/testing/fulltests/unit-tests/T003copy_nword_clib.c b/testing/fulltests/unit-tests/T003copy_nword_clib.c index 7d67ed0..3e5dc63 100644 --- a/testing/fulltests/unit-tests/T003copy_nword_clib.c +++ b/testing/fulltests/unit-tests/T003copy_nword_clib.c @@ -39,12 +39,10 @@ char output[sizeof(input)] = ""; char* run = copy_nword(input, output, sizeof(output)); ASSERT2(strcmp(output, "\"The") == 0, ("output = >%s<\n", output)); - ASSERT2(run == input + 6, - ("run = input + %" NETSNMP_PRIz "d\n", run - input)); + ASSERT2(run == input + 6, ("run = input + %d\n", (int)(run - input))); run = copy_nword(run, output, sizeof(output)); ASSERT2(strcmp(output, "red") == 0, ("output = >%s<\n", output)); - ASSERT2(run == input + 10, - ("run = input + %" NETSNMP_PRIz "d\n", run - input)); + ASSERT2(run == input + 10, ("run = input + %d\n", (int)(run - input))); run = copy_nword(run, output, sizeof(output)); ASSERT2(strcmp(output, "rose\"") == 0, ("output = >%s<\n", output)); ASSERT1(run == NULL); @@ -90,8 +88,7 @@ char output[10] = ""; char* run = copy_nword(input, output, sizeof(output)); ASSERT2(strcmp(output, "Very long") == 0, ("output = >%s<\n", output)); - ASSERT2(run == input + 44, - ("run = input + %" NETSNMP_PRIz "d\n", run - input)); + ASSERT2(run == input + 44, ("run = input + %d\n", (int)(run - input))); } { @@ -127,8 +124,7 @@ char output[sizeof(input)] = ""; char* run = copy_nword(input, output, sizeof(output)); ASSERT2(strcmp(output, "The") == 0, ("output = >%s<\n", output)); - ASSERT2(run == input + 5, - ("run = input + %" NETSNMP_PRIz "d\n", run - input)); + ASSERT2(run == input + 5, ("run = input + %d\n", (int)(run - input))); } { @@ -137,6 +133,5 @@ char output[sizeof(input)] = ""; char* run = copy_nword(input, output, sizeof(output)); ASSERT2(strcmp(output, "The\"red\"") == 0, ("output = >%s<\n", output)); - ASSERT2(run == input + 9, - ("run = input + %" NETSNMP_PRIz "d\n", run - input)); + ASSERT2(run == input + 9, ("run = input + %d\n", (int)(run - input))); } diff --git a/testing/fulltests/unit-tests/T004snmp_enum_clib.c b/testing/fulltests/unit-tests/T004snmp_enum_clib.c index d28b19b..a769cee 100644 --- a/testing/fulltests/unit-tests/T004snmp_enum_clib.c +++ b/testing/fulltests/unit-tests/T004snmp_enum_clib.c @@ -1,5 +1,7 @@ /* HEADER Testing snmp_enum */ +#ifndef NETSNMP_FEATURE_REMOVE_SNMP_ENUM_STORE_LIST + #define CONFIG_TYPE "snmp-enum-unit-test" #define STRING1 "life, and everything" #define STRING2 "restaurant at the end of the universe" @@ -30,7 +32,7 @@ char tmp_persist_file[256]; char *se_find_result; -sprintf(tmp_persist_file, "/tmp/snmp-enum-unit-test-%d", getpid()); +sprintf(tmp_persist_file, "/tmp/snmp-enum-unit-test-%ld", (long)getpid()); netsnmp_setenv("SNMP_PERSISTENT_FILE", tmp_persist_file, 1); init_snmp_enum("snmp"); @@ -82,8 +84,7 @@ OK(strcmp(se_find_label_in_slist("testing", 2), STRING2) == 0, se_clear_slist("testing"); -se_read_conf("enum", - NETSNMP_REMOVE_CONST(char *, "2:3 1:apple 2:pear 3:kiwifruit")); +se_read_conf("enum", "2:3 1:apple 2:pear 3:kiwifruit"); OK(se_find_list(2, 3), "list (2, 3) should be present"); if (se_find_list(2, 3)) { OK(se_find_value(2, 3, "kiwifruit") == 3, @@ -93,8 +94,7 @@ if (se_find_list(2, 3)) { "lookup by label should return the proper string"); } -se_read_conf("enum", - NETSNMP_REMOVE_CONST(char *, "fruit 1:apple 2:pear 3:kiwifruit")); +se_read_conf("enum", "fruit 1:apple 2:pear 3:kiwifruit"); OK(se_find_value_in_slist("fruit", "kiwifruit") == 3, "lookup by string should return the proper value"); se_find_result = se_find_label_in_slist("fruit", 2); @@ -103,3 +103,5 @@ OK(se_find_result && strcmp(se_find_result, "pear") == 0, clear_snmp_enum(); unregister_all_config_handlers(); + +#endif diff --git a/testing/fulltests/unit-tests/T008asn1_clib.c b/testing/fulltests/unit-tests/T008asn1_clib.c index b94714a..dc2aff8 100644 --- a/testing/fulltests/unit-tests/T008asn1_clib.c +++ b/testing/fulltests/unit-tests/T008asn1_clib.c @@ -8,19 +8,23 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); #endif { - const long intval[] = { - -0x80000000L, - -0x7fffffffL, - -0xffffL, - -3, - -1, - 0, - 1, - 3, - 0xffff, - 0x7fffffff, + static struct { + unsigned char encoded[8]; + unsigned encoded_len; + unsigned long decoded; + } data[] = { + { { ASN_INTEGER, 4, 0x80, 0x00, 0x00, 0x00 }, 6, -0x80000000L }, + { { ASN_INTEGER, 4, 0x80, 0x00, 0x00, 0x01 }, 6, -0x7fffffffL }, + { { ASN_INTEGER, 3, 0xff, 0x00, 0x01 }, 5, -0xffffL }, + { { ASN_INTEGER, 1, 0xfd }, 3, -3 }, + { { ASN_INTEGER, 1, 0xff }, 3, -1 }, + { { ASN_INTEGER, 1, 0x00 }, 3, 0 }, + { { ASN_INTEGER, 1, 0x01 }, 3, 1 }, + { { ASN_INTEGER, 1, 0x03 }, 3, 3 }, + { { ASN_INTEGER, 3, 0x00, 0xff, 0xff, }, 5, 0xffff }, + { { ASN_INTEGER, 4, 0x7f, 0xff, 0xff, 0xff }, 6, 0x7fffffff }, }; - for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { + for (i = 0; i < sizeof(data)/sizeof(data[0]); ++i) { u_char encoded[256]; size_t encoded_length; u_char *build_result; @@ -31,31 +35,37 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); u_char *rbuild_result = NULL; size_t rbuild_len = 0; size_t offset = 0; + const long input = data[i].decoded; encoded_length = sizeof(encoded); build_result = asn_build_int(encoded, &encoded_length, ASN_INTEGER, - &intval[i], sizeof(intval[i])); + &input, sizeof(input)); OKF(build_result + encoded_length == encoded + sizeof(encoded), - ("asn_build_int(%ld)", intval[i])); + ("asn_build_int(%ld)", input)); + OKF(build_result - encoded == data[i].encoded_len, + ("input %ld: encoded len %" NETSNMP_PRIz "d <> %d\n", + input, build_result - encoded, data[i].encoded_len)); + OKF(memcmp(encoded, data[i].encoded, data[i].encoded_len) == 0, + ("encoded data for input %ld\n", input)); decoded_length = sizeof(encoded) - encoded_length; parse_result = asn_parse_int(encoded, &decoded_length, &decoded_type, &decoded_value, sizeof(decoded_value)); OKF(parse_result == build_result && decoded_type == ASN_INTEGER - && decoded_value == intval[i], + && decoded_value == input, ("asn_parse_int(asn_build_int(%ld)) %s; decoded type %d <> %d;" " decoded value %ld", - intval[i], parse_result == build_result ? "succeeded" : "failed", + input, parse_result == build_result ? "succeeded" : "failed", decoded_type, ASN_INTEGER, decoded_value)); OKF(asn_realloc_rbuild_int(&rbuild_result, &rbuild_len, &offset, 1, - ASN_INTEGER, &intval[i], sizeof(intval[i])), - ("asn_realloc_rbuild_int(%ld)", intval[i])); + ASN_INTEGER, &input, sizeof(input)), + ("asn_realloc_rbuild_int(%ld)", input)); OKF(sizeof(encoded) - encoded_length == offset && memcmp(encoded, rbuild_result + rbuild_len - offset, offset) == 0, ("asn_build_int(%ld) != asn_realloc_rbuild_int(%ld)", - intval[i], intval[i])); - free (rbuild_result); + input, input)); + free(rbuild_result); } } @@ -106,9 +116,43 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); } } +{ + static struct { + unsigned char encoded[8]; + unsigned encoded_len; + unsigned long decoded; + } data[] = { + { { ASN_UINTEGER, 1, 0x80 }, 3, 0x80 }, + { { ASN_UINTEGER, 2, 0x80, 0x00 }, 4, 0x8000 }, + { { ASN_UINTEGER, 3, 0x80, 0x00, 0x00 }, 5, 0x800000 }, + { { ASN_UINTEGER, 4, 0x80, 0x00, 0x00, 0x00 }, 6, 0x80000000 }, + }; + for (i = 0; i < sizeof(data)/sizeof(data[0]); i++) { + size_t decoded_length; + u_char decoded_type; + unsigned long decoded_value = 0; + u_char *parse_result; + + decoded_length = data[i].encoded_len; + parse_result = asn_parse_unsigned_int(data[i].encoded, + &decoded_length, + &decoded_type, &decoded_value, + sizeof(decoded_value)); + OKF(parse_result && decoded_type == ASN_UINTEGER + && decoded_value == data[i].decoded, + ("asn_parse_unsigned_int(%02x %02x %02x %02x %02x %02x %02x %02x, %d) %s;" + " decoded type %d <> %d; decoded length %d; decoded value %lu", + data[i].encoded[0], data[i].encoded[1], data[i].encoded[2], + data[i].encoded[3], data[i].encoded[4], data[i].encoded[5], + data[i].encoded[6], data[i].encoded[7], data[i].encoded_len, + parse_result ? "succeeded" : "failed", + decoded_type, ASN_UINTEGER, (int)decoded_length, decoded_value)); + } +} + #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES -#define TOINT64(c) ((long long)(long)(c).high << 32 | (c).low) +#define TOINT64(c) ((int64_t)(long)(c).high << 32 | (c).low) { const struct counter64 intval[] = { @@ -146,15 +190,15 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); ASN_OPAQUE_I64, &intval[i], sizeof(intval[i])); OKF(build_result + encoded_length == encoded + sizeof(encoded), - ("asn_build_signed_int64(%lld)", TOINT64(intval[i]))); + ("asn_build_signed_int64(%" PRIi64 ")", TOINT64(intval[i]))); decoded_length = sizeof(encoded) - encoded_length; parse_result = asn_parse_signed_int64(encoded, &decoded_length, &decoded_type, &decoded_value, sizeof(decoded_value)); OKF(parse_result == build_result && decoded_type == ASN_OPAQUE_I64 && memcmp(&decoded_value, &intval[i], sizeof(decoded_value)) == 0, - ("asn_parse_signed_int64(asn_build_signed_int64(%lld)) %s;" - " decoded type %d <> %d; decoded value %lld", + ("asn_parse_signed_int64(asn_build_signed_int64(%" PRIi64 ")) %s;" + " decoded type %d <> %d; decoded value %" PRIi64, TOINT64(intval[i]), parse_result == build_result ? "succeeded" : "failed", decoded_type, ASN_OPAQUE_I64, TOINT64(decoded_value))); @@ -162,12 +206,12 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); OKF(asn_realloc_rbuild_signed_int64(&rbuild_result, &rbuild_len, &offset, 1, ASN_OPAQUE_I64, &intval[i], sizeof(intval[i])), - ("asn_realloc_rbuild_signed_int64(%lld)", TOINT64(intval[i]))); + ("asn_realloc_rbuild_signed_int64(%" PRIi64 ")", TOINT64(intval[i]))); OKF(sizeof(encoded) - encoded_length == offset && memcmp(encoded, rbuild_result + rbuild_len - offset, offset) == 0, - ("asn_build_signed_int64(%lld) != " - "asn_realloc_rbuild_signed_int64(%lld)", + ("asn_build_signed_int64(%" PRIi64 ") != " + "asn_realloc_rbuild_signed_int64(%" PRIi64 ")", TOINT64(intval[i]), TOINT64(intval[i]))); free (rbuild_result); } @@ -175,7 +219,7 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); #endif -#define TOUINT64(c) ((unsigned long long)(c).high << 32 | (c).low) +#define TOUINT64(c) ((uint64_t)(c).high << 32 | (c).low) { const struct counter64 intval[] = { @@ -212,15 +256,15 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); ASN_COUNTER64, &intval[i], sizeof(intval[i])); OKF(build_result + encoded_length == encoded + sizeof(encoded), - ("asn_build_unsigned_int64(%llu)", TOUINT64(intval[i]))); + ("asn_build_unsigned_int64(%" PRIu64 ")", TOUINT64(intval[i]))); decoded_length = sizeof(encoded) - encoded_length; parse_result = asn_parse_unsigned_int64(encoded, &decoded_length, &decoded_type, &decoded_value, sizeof(decoded_value)); OKF(parse_result && decoded_type == ASN_COUNTER64 && memcmp(&decoded_value, &intval[i], sizeof(decoded_value)) == 0, - ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%llu)) %s;" - " decoded type %d <> %d; decoded value %llu", + ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%" PRIu64 ")) %s;" + " decoded type %d <> %d; decoded value %" PRIu64, TOUINT64(intval[i]), parse_result == build_result ? "succeeded" : "failed", decoded_type, ASN_COUNTER64, TOUINT64(decoded_value))); @@ -228,12 +272,12 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); OKF(asn_realloc_rbuild_unsigned_int64(&rbuild_result, &rbuild_len, &offset, 1, ASN_COUNTER64, &intval[i], sizeof(intval[i])), - ("asn_realloc_rbuild_unsigned_int64(%llud)", TOUINT64(intval[i]))); + ("asn_realloc_rbuild_unsigned_int64(%" PRIu64 ")", TOUINT64(intval[i]))); OKF(sizeof(encoded) - encoded_length == offset && memcmp(encoded, rbuild_result + rbuild_len - offset, offset) == 0, - ("asn_build_unsigned_int64(%lld) != " - "asn_realloc_rbuild_unsigned_int64(%lld)", + ("asn_build_unsigned_int64(%" PRIi64 ") != " + "asn_realloc_rbuild_unsigned_int64(%" PRIi64 ")", TOUINT64(intval[i]), TOUINT64(intval[i]))); free (rbuild_result); } @@ -257,15 +301,15 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); ASN_OPAQUE_COUNTER64, &intval[i], sizeof(intval[i])); OKF(build_result + encoded_length == encoded + sizeof(encoded), - ("asn_build_unsigned_int64(%llu)", TOUINT64(intval[i]))); + ("asn_build_unsigned_int64(%" PRIu64 ")", TOUINT64(intval[i]))); decoded_length = sizeof(encoded) - encoded_length; parse_result = asn_parse_unsigned_int64(encoded, &decoded_length, &decoded_type, &decoded_value, sizeof(decoded_value)); OKF(parse_result && decoded_type == ASN_OPAQUE_COUNTER64 && memcmp(&decoded_value, &intval[i], sizeof(decoded_value)) == 0, - ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%llu)) %s;" - " decoded type %d <> %d; decoded value %llu", + ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%" PRIu64 ")) %s;" + " decoded type %d <> %d; decoded value %" PRIu64, TOUINT64(intval[i]), parse_result == build_result ? "succeeded" : "failed", decoded_type, ASN_OPAQUE_COUNTER64, TOUINT64(decoded_value))); @@ -273,12 +317,12 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); OKF(asn_realloc_rbuild_unsigned_int64(&rbuild_result, &rbuild_len, &offset, 1, ASN_OPAQUE_COUNTER64, &intval[i], sizeof(intval[i])), - ("asn_realloc_rbuild_unsigned_int64(%llud)", TOUINT64(intval[i]))); + ("asn_realloc_rbuild_unsigned_int64(%" PRIu64 ")", TOUINT64(intval[i]))); OKF(sizeof(encoded) - encoded_length == offset && memcmp(encoded, rbuild_result + rbuild_len - offset, offset) == 0, - ("asn_build_unsigned_int64(%lld) != " - "asn_realloc_rbuild_unsigned_int64(%lld)", + ("asn_build_unsigned_int64(%" PRIi64 ") != " + "asn_realloc_rbuild_unsigned_int64(%" PRIi64 ")", TOUINT64(intval[i]), TOUINT64(intval[i]))); free (rbuild_result); } @@ -300,15 +344,15 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); ASN_OPAQUE_U64, &intval[i], sizeof(intval[i])); OKF(build_result + encoded_length == encoded + sizeof(encoded), - ("asn_build_unsigned_int64(%llu)", TOUINT64(intval[i]))); + ("asn_build_unsigned_int64(%" PRIu64 ")", TOUINT64(intval[i]))); decoded_length = sizeof(encoded) - encoded_length; parse_result = asn_parse_unsigned_int64(encoded, &decoded_length, &decoded_type, &decoded_value, sizeof(decoded_value)); OKF(parse_result && decoded_type == ASN_OPAQUE_U64 && memcmp(&decoded_value, &intval[i], sizeof(decoded_value)) == 0, - ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%llu)) %s;" - " decoded type %d <> %d; decoded value %llu", + ("asn_parse_unsigned_int64(asn_build_unsigned_int64(%" PRIu64 ")) %s;" + " decoded type %d <> %d; decoded value %" PRIu64, TOUINT64(intval[i]), parse_result == build_result ? "succeeded" : "failed", decoded_type, ASN_OPAQUE_U64, TOUINT64(decoded_value))); @@ -316,12 +360,12 @@ debug_register_tokens("dumpv_recv,dumpv_send,asn"); OKF(asn_realloc_rbuild_unsigned_int64(&rbuild_result, &rbuild_len, &offset, 1, ASN_OPAQUE_U64, &intval[i], sizeof(intval[i])), - ("asn_realloc_rbuild_unsigned_int64(%llud)", TOUINT64(intval[i]))); + ("asn_realloc_rbuild_unsigned_int64(%" PRIu64 ")", TOUINT64(intval[i]))); OKF(sizeof(encoded) - encoded_length == offset && memcmp(encoded, rbuild_result + rbuild_len - offset, offset) == 0, - ("asn_build_unsigned_int64(%lld) != " - "asn_realloc_rbuild_unsigned_int64(%lld)", + ("asn_build_unsigned_int64(%" PRIi64 ") != " + "asn_realloc_rbuild_unsigned_int64(%" PRIi64 ")", TOUINT64(intval[i]), TOUINT64(intval[i]))); free (rbuild_result); } diff --git a/testing/fulltests/unit-tests/T010netsnmp_string_time_to_secs_clib.c b/testing/fulltests/unit-tests/T010netsnmp_string_time_to_secs_clib.c index e31aeeb..69a3af6 100644 --- a/testing/fulltests/unit-tests/T010netsnmp_string_time_to_secs_clib.c +++ b/testing/fulltests/unit-tests/T010netsnmp_string_time_to_secs_clib.c @@ -1,4 +1,7 @@ /* HEADER Testing the netsnmp_string_time_to_secs API */ + +#ifndef NETSNMP_FEATURE_REMOVE_STRING_TIME_TO_SECS + int secs; #define TESTIT(x,y) \ @@ -42,4 +45,4 @@ TESTIT("1234D", 1234 * 60 * 60 * 24); TESTIT("1234w", 1234 * 60 * 60 * 24 * 7); TESTIT("1234W", 1234 * 60 * 60 * 24 * 7); - +#endif diff --git a/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c b/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c index 6f1d449..2c1d084 100644 --- a/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c +++ b/testing/fulltests/unit-tests/T011snmp_old_api_registration_cagentlib.c @@ -41,6 +41,6 @@ netsnmp_register_old_api("exp.327.b", 0, /* range_ubound */ sess, "context", 5/*timeout*/, 0/*flags - ignored*/); -OK(res == SNMPERR_SUCCESS, "Handler registration (2)."); +OK(res == MIB_DUPLICATE_REGISTRATION, "Handler registration (2)."); snmp_shutdown("snmp"); diff --git a/testing/fulltests/unit-tests/T012binary_array_oid_clib.c b/testing/fulltests/unit-tests/T012binary_array_oid_clib.c index aeeb502..d200613 100644 --- a/testing/fulltests/unit-tests/T012binary_array_oid_clib.c +++ b/testing/fulltests/unit-tests/T012binary_array_oid_clib.c @@ -29,8 +29,12 @@ ix.oids = &ox; iy.oids = &oy; i1.len = i2.len = i3.len = i4.len = i5.len = ix.len = iy.len = 1; -for (i = 0; i < sizeof(b)/sizeof(b[0]); ++i) - CONTAINER_INSERT(c, b[i]); +for (i = 0; i < sizeof(b)/sizeof(b[0]); ++i) { + OKF(CONTAINER_INSERT(c, b[i]) == 0, + ("Inserting %" NETSNMP_PRIo "d succeeded", b[i]->oids[0])); + OKF(CONTAINER_INSERT(c, b[i]) != 0, + ("Inserting %" NETSNMP_PRIo "d failed", b[i]->oids[0])); +} for (ip = CONTAINER_FIRST(c); ip; ip = CONTAINER_NEXT(c, ip)) { for (i = sizeof(b)/sizeof(b[0]) - 1; i >= 0; --i) @@ -65,8 +69,9 @@ for (i = 0; i < sizeof(a)/sizeof(a[0]); ++i) { a[i]->oids[0])); } -while ((ip = CONTAINER_FIRST(c))) - CONTAINER_REMOVE(c, ip); +while ((ip = CONTAINER_FIRST(c))) { + OK(CONTAINER_REMOVE(c, ip) == 0, "Removing succeeded"); +} CONTAINER_FREE(c); snmp_shutdown(test_name); diff --git a/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c b/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c index 41a578e..804e792 100644 --- a/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c +++ b/testing/fulltests/unit-tests/T014gethostbyaddr_clib.c @@ -39,7 +39,7 @@ SOCK_STARTUP; { struct hostent *h; -#ifdef cygwin +#if defined(cygwin) || defined(solaris2) static const struct in6_addr v6loop = { { IN6ADDR_LOOPBACK_INIT } }; #else static const struct in6_addr v6loop = IN6ADDR_LOOPBACK_INIT; @@ -56,6 +56,7 @@ SOCK_STARTUP; if (s >= 0) { if (bind(s, (struct sockaddr *) &sin6_addr, sizeof(sin6_addr)) >= 0) { + addr = NULL; strcpy(buf, "(failed)"); h = netsnmp_gethostbyaddr(&v6loop, sizeof(v6loop), AF_INET6); if (h) { @@ -74,18 +75,18 @@ SOCK_STARTUP; } if (!ap) strcpy(buf, "no AF_INET6 address found"); - if (addr) - freeaddrinfo(addr); } else { snprintf(buf, sizeof(buf), "getaddrinfo() failed: %s", strerror(errno)); } } OKF(h && (strcmp(h->h_name, "localhost") == 0 || - (res == 0 && memcmp(addr->ai_addr, &sin6_addr, - sizeof(sin6_addr)) == 0)), + (res == 0 && addr && memcmp(addr->ai_addr, &sin6_addr, + sizeof(sin6_addr)) == 0)), ("::1 lookup (%s -> %s)", h ? h->h_name : "(failed)", buf)); + if (addr) + freeaddrinfo(addr); ran_test = 1; } close(s); diff --git a/testing/fulltests/unit-tests/T015int64_clib.c b/testing/fulltests/unit-tests/T015int64_clib.c index 5f5f4b6..66f66b7 100644 --- a/testing/fulltests/unit-tests/T015int64_clib.c +++ b/testing/fulltests/unit-tests/T015int64_clib.c @@ -1,4 +1,4 @@ -/* HEADER Testing 64-bit integer operations (U64). */ +/* HEADER Testing 64-bit integer operations (struct counter64). */ int i, j; char buf[22]; @@ -15,7 +15,7 @@ static const int64_t intval[] = { }; for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { - U64 a, b; + struct counter64 a, b; a.low = (uint32_t)intval[i]; a.high = (uint32_t)(intval[i] >> 32); printI64(buf, &a); @@ -27,7 +27,7 @@ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) { - U64 a, b; + struct counter64 a, b; uint64_t d; a.low = (uint32_t)intval[i]; a.high = (uint32_t)(intval[i] >> 32); @@ -43,7 +43,7 @@ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) { - U64 a, b, c; + struct counter64 a, b, c; uint64_t d; a.low = (uint32_t)intval[i]; a.high = (uint32_t)(intval[i] >> 32); @@ -58,7 +58,7 @@ for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) { } { - U64 old_val, new_val; + struct counter64 old_val, new_val; old_val.low = 7; old_val.high = 0; new_val = old_val; diff --git a/testing/fulltests/unit-tests/T016read_config_clib.c b/testing/fulltests/unit-tests/T016read_config_clib.c index 06ceed5..9476a94 100644 --- a/testing/fulltests/unit-tests/T016read_config_clib.c +++ b/testing/fulltests/unit-tests/T016read_config_clib.c @@ -61,7 +61,7 @@ for (i = 0; i < sizeof(test_input) / sizeof(test_input[0]); i++) { ("test %d: expected length %" NETSNMP_PRIz "d, got length %" NETSNMP_PRIz "d", i, p->expected_len, len)); if (len == p->expected_len) { - ok = len < 0 || !p->expected_output + ok = !p->expected_output || memcmp(str, p->expected_output, len) == 0 || p->expected_output[len] != 0; OKF(ok, ("test %d: output buffer mismatch", i)); diff --git a/testing/fulltests/unit-tests/T017strtoull_clib.c b/testing/fulltests/unit-tests/T017strtoull_clib.c index 4ab9cad..409bc87 100644 --- a/testing/fulltests/unit-tests/T017strtoull_clib.c +++ b/testing/fulltests/unit-tests/T017strtoull_clib.c @@ -2,7 +2,7 @@ #ifdef HAVE_STRTOULL -OK(1, "Skipping strtoull() test because using strtoull() from C library.\n");; +OK(1, "Skipping strtoull() test because using strtoull() from C library.\n"); #else diff --git a/testing/fulltests/unit-tests/T018read_config_capp.c b/testing/fulltests/unit-tests/T018read_config_capp.c index d6a92c9..b26be1c 100644 --- a/testing/fulltests/unit-tests/T018read_config_capp.c +++ b/testing/fulltests/unit-tests/T018read_config_capp.c @@ -15,6 +15,8 @@ #include #include +#ifndef NETSNMP_FEATURE_REMOVE_UNREGISTER_APP_CONFIG_HANDLER + /* #undef TEST_INTERNAL_API */ #define TEST_INTERNAL_API 1 @@ -51,7 +53,7 @@ int main(int argc, char *argv[]) return ret; } -int test1() { +int test1(void) { int sum = 0; callback_called = 0; fprintf(stdout, "# snmpd_unregister_config_handler tests\n"); @@ -127,3 +129,13 @@ int test3(void) { return 0; #endif } + +#else +int main(int argc, char *argv[]) +{ + OK(1, "skipped test"); + if (__did_plan == 0) + PLAN(__test_counter); + return 0; +} +#endif diff --git a/testing/fulltests/unit-tests/T020asprintf_clib.c b/testing/fulltests/unit-tests/T020asprintf_clib.c new file mode 100644 index 0000000..12a6529 --- /dev/null +++ b/testing/fulltests/unit-tests/T020asprintf_clib.c @@ -0,0 +1,13 @@ +/* HEADER Testing asprintf() */ + +char *strp; + +OK(asprintf(&strp, "%s", "") == 0, "asprintf() (1) failed"); +OKF(strp && strcmp(strp, "") == 0, ("%s <> \"\"", strp)); +free(strp); +OK(asprintf(&strp, "%s", "abc") == 3, "asprintf() (1) failed"); +OKF(strp && strcmp(strp, "abc") == 0, ("%s <> \"abc\"", strp)); +free(strp); +OK(asprintf(&strp, "%s %s", "abc", "def") == 7, "asprintf() (2) failed"); +OKF(strp && strcmp(strp, "abc def") == 0, ("%s <> \"abc def\"", strp)); +free(strp); diff --git a/testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c b/testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c new file mode 100644 index 0000000..7cf232f --- /dev/null +++ b/testing/fulltests/unit-tests/T021netsnmp_sprint_integer_clib.c @@ -0,0 +1,53 @@ +/* HEADER Test sprint_integer() */ +/* See also https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59491. */ + +static const struct { + long val; + const char *hint; + const char *result; +} test[] = { + { 19, "b", "INTEGER: 00000000000000000000000000010011" }, + { 19, "d", "INTEGER: 19" }, + { 19, "o", "INTEGER: 23" }, + { 19, "x", "INTEGER: 13" }, + { 19, "f", NULL }, + { 19, "s", NULL }, + { 19, "p", NULL }, +}; +char *buf; +size_t buf_len; +char mibdir[PATH_MAX]; +netsnmp_variable_list variable; +long input_value; +int i, ret; + +snprintf(mibdir, sizeof(mibdir), "%s/%s", ABS_SRCDIR, "mibs"); +netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_MIBDIRS, mibdir); +netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT, TRUE); + +init_snmp("T021"); + +buf_len = 100; +buf = malloc(buf_len); +memset(&variable, 0, sizeof(variable)); +variable.type = ASN_INTEGER; +variable.val.integer = &input_value; +variable.val_len = sizeof(variable.val.integer); + +for (i = 0; i < sizeof(test) / sizeof(test[0]); i++) { + input_value = test[i].val; + + ret = snprint_integer(buf, buf_len, &variable, /*enums=*/NULL, + test[i].hint, /*units=*/NULL); + if (test[i].result) { + OKF(ret > 0, ("[%d] sprint_integer() returned %d; expected > 0", i, ret)); + if (ret > 0) + OKF(strcmp(buf, test[i].result) == 0, + ("%s <> %s", buf, test[i].result)); + } else { + OKF(ret < 0, ("[%d] sprint_integer() failed", i)); + } +} + +free(buf); +snmp_shutdown("T021"); diff --git a/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c b/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c new file mode 100644 index 0000000..a727bde --- /dev/null +++ b/testing/fulltests/unit-tests/T022netsnmp_parse_ep_str_clib.c @@ -0,0 +1,61 @@ +/* + * HEADER Testing netsnmp_parse_ep_str() + */ + +struct one_test_data { + const char *in; + int res; + struct { const char *addr; const char *iface; const char *port; } expected; +}; + +static struct one_test_data test_data[] = { + { "9999", 1, { "", "", "9999" } }, + { ":777", 1, { "", "", "777" } }, + { "hostname:777", 1, { "hostname", "", "777" } }, + { "hostname", 1, { "hostname", "", "" } }, + { "1.2.3.4", 1, { "1.2.3.4", "", "" } }, + { "hostname@if", 1, { "hostname", "if", "" } }, + { "hostname@if:833", 1, { "hostname", "if", "833" } }, + { "[hostname]@if:833", 1, { "hostname", "if", "833" } }, + { "[hostname]?", 0, { } }, + { "[hostname", 0, { } }, + { "@if:844", 1, { "", "if", "844" } }, + { "::1", 1, { "::1", "", "" } }, + { "::1@if", 1, { "::1", "if", "" } }, + { "1::2", 1, { "1::2", "", "" } }, + { "[::1]", 1, { "::1", "", "" } }, + { "[::1]:0", 1, { "::1", "", "0" } }, + { "[::1]:2", 1, { "::1", "", "2" } }, + { "[::1]@if:2", 1, { "::1", "if", "2" } }, + { "[::1]:2@if", 0, { } }, +}; + +SOCK_STARTUP; + +{ + int i; + + for (i = 0; i < sizeof(test_data) / sizeof(test_data[0]); i++) { + const struct one_test_data *p = &test_data[i]; + struct netsnmp_ep_str ep_str; + int res; + + memset(&ep_str, 0, sizeof(ep_str)); + res = netsnmp_parse_ep_str(&ep_str, p->in); + OKF(res == p->res, ("%s: return value %d <> %d", p->in, res, p->res)); + if (res && p->res) { + OKF((!ep_str.addr && !p->expected.addr[0]) || + strcmp(ep_str.addr, p->expected.addr) == 0, + ("%s: network address %s <> %s", p->in, ep_str.addr, + p->expected.addr)); + OKF(strcmp(ep_str.iface, p->expected.iface) == 0, + ("%s: network interface %s <> %s", p->in, ep_str.iface, + p->expected.iface)); + OKF(strcmp(ep_str.port, p->expected.port) == 0, + ("%s: port %s <> %s", p->in, ep_str.port, p->expected.port)); + } + free(ep_str.addr); + } +} + +SOCK_CLEANUP; diff --git a/testing/fulltests/unit-tests/T023varbind_set_var_value_int8_clib.c b/testing/fulltests/unit-tests/T023varbind_set_var_value_int8_clib.c new file mode 100644 index 0000000..e8c9f65 --- /dev/null +++ b/testing/fulltests/unit-tests/T023varbind_set_var_value_int8_clib.c @@ -0,0 +1,24 @@ +/* HEADER Testing snmp_set_var_value() */ + +{ + static const signed char values[] = { -128, -23, -1, 1, 42, 127, 0 }; + int i; + + for (i = 0; values[i]; i++) { + netsnmp_variable_list variable; + int ec; + + memset(&variable, 0, sizeof(variable)); + variable.next_variable = NULL; + variable.type = ASN_INTEGER; + variable.val.string = NULL; + variable.val.integer = NULL; + variable.val_len = 0; + + ec = snmp_set_var_value( &variable, &values[i], 1); + + OK(ec == 0, "snmp_set_var_value() should succeed"); + OKF(*variable.val.integer == values[i], + ("%ld =?= %d", *variable.val.integer, values[i])); + } +} diff --git a/testing/fulltests/unit-tests/T024run_exec_command_clib.c b/testing/fulltests/unit-tests/T024run_exec_command_clib.c new file mode 100644 index 0000000..7e9a020 --- /dev/null +++ b/testing/fulltests/unit-tests/T024run_exec_command_clib.c @@ -0,0 +1,48 @@ +/* + * HEADER Testing run_exec_command() + */ + +struct test_data { + const char *command; + const char *input; + const char *expected_output; + int res; +}; + +static struct test_data test_data[] = { + { "/bin/sh -c 'echo a'", NULL, "a\n", 0 }, + { "/bin/sh -c 'echo a b'", NULL, "a b\n", 0 }, + { "/bin/sh -c 'echo $*' . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99", + NULL, + "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99\n", + 0 }, + { "/bin/cat", "b c\n", "b c\n", 0 }, + { "/bin/sh -c 'false'", NULL, NULL, 1 }, + { "/bin/sh -c 'exit 77'", NULL, NULL, 77 }, +}; + +#if 0 +snmp_set_do_debugging(TRUE); +debug_register_tokens("run:exec"); +#endif + +{ + char output[512]; + int output_len; + int i; + + for (i = 0; i < sizeof(test_data) / sizeof(test_data[0]); i++) { + const struct test_data *p = &test_data[i]; + int res; + + output_len = sizeof(output); + res = run_exec_command(p->command, p->input, output, &output_len); + OKF(res == p->res, ("%s: return value %d <> %d", p->command, res, + p->res)); + if (res == p->res && p->expected_output) { + OKF(strcmp(output, p->expected_output) == 0, + ("%s: output %s <> %s", p->command, output, + p->expected_output)); + } + } +} diff --git a/testing/fulltests/unit-tests/T026read_config_clib.c b/testing/fulltests/unit-tests/T026read_config_clib.c new file mode 100644 index 0000000..d10ed04 --- /dev/null +++ b/testing/fulltests/unit-tests/T026read_config_clib.c @@ -0,0 +1,21 @@ +/* + * HEADER Testing read_config() + */ + +static const unsigned char data[] = { 0xff, 0x20, 0xff }; +char *path; +FILE *f; +int res; + +register_mib_handlers(); + +res = asprintf(&path, "/tmp/read-config-input-%d", getpid()); +OKF(res >= 0, ("asprintf() returned %d", res)); +f = fopen(path, "wb"); +OKF(f != NULL, ("fopen() %s", f ? "succeeded" : "failed")); +res = fwrite(data, sizeof(data), 1, f); +OKF(res == 1, ("fwrite() %s", res == 1 ? "succeeded" : "failed")); +fclose(f); +read_config(path, read_config_get_handlers("snmp"), 0); +unlink(path); +free(path); diff --git a/testing/fulltests/unit-tests/T027read_mib_clib.c b/testing/fulltests/unit-tests/T027read_mib_clib.c new file mode 100644 index 0000000..5c85af9 --- /dev/null +++ b/testing/fulltests/unit-tests/T027read_mib_clib.c @@ -0,0 +1,37 @@ +/* + * HEADER Testing read_mib() + * + * See also https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37187. + */ + +static const char mib[226] = + "qu::=Opaque(SIZE(SI4-\n" + "--\n" + "--\n" + "--\n" + "--\n" + "--\n" + "--\n" + "--\n" + "OCTETSTRING\n" + "----\n" + "--\n" + "--\n" + "---\n" + "--\n" + "--\n" + "-68--------------------1844674407370954460124----DD-IIIIIIIIIII0NZe9223300000446069494I32768g-I2768g-I3gg-I4g-55I420RPRISEOONOAO:\x001\0\0---::=\0||231\0\0\0\x001=O"; +char *path; +FILE *f; +int res; + +res = asprintf(&path, "/tmp/read-mib-input-%d", getpid()); +OKF(res >= 0, ("asprintf() returned %d", res)); +f = fopen(path, "wb"); +OKF(f != NULL, ("fopen() %s", f ? "succeeded" : "failed")); +res = fwrite(mib, sizeof(mib), 1, f); +OKF(res == 1, ("fwrite() %s", res == 1 ? "succeeded" : "failed")); +fclose(f); +read_mib(path); +unlink(path); +free(path); diff --git a/testing/fulltests/unit-tests/T102pdu_build_clib.c b/testing/fulltests/unit-tests/T102pdu_build_clib.c index 1fba69e..91ea3ef 100644 --- a/testing/fulltests/unit-tests/T102pdu_build_clib.c +++ b/testing/fulltests/unit-tests/T102pdu_build_clib.c @@ -8,14 +8,15 @@ size_t packet_len, offset = 0; netsnmp_session session, *ss; int rc; -/* prototype copied from snmp_api.c */ -int snmp_build(u_char ** pkt, size_t * pkt_len, - size_t * offset, netsnmp_session * pss, - netsnmp_pdu *pdu); - init_snmp("testing"); snmp_sess_init(&session); +#if !defined(NETSNMP_DISABLE_SNMPV2C) session.version = SNMP_VERSION_2c; +#elif !defined(NETSNMP_DISABLE_SNMPV1) +session.version = SNMP_VERSION_1; +#else +#error This test does not (yet?) support SNMPv3 +#endif session.peername = strdup("udp:127.0.0.1"); /* we won't actually connect */ session.community = (u_char *) strdup("bogus"); session.community_len = strlen((char *) session.community); diff --git a/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c b/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c new file mode 100644 index 0000000..d179033 --- /dev/null +++ b/testing/fulltests/unit-tests/T104agentx_parse_cagentlib.c @@ -0,0 +1,30 @@ +/* HEADER oss-fuzz bug 14502 */ +/* + * Verify whether agentx_parse() does not access any memory outside its + * bounds for a particular invalid AgentX input. See also + * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14502. + */ + +netsnmp_session session; +netsnmp_pdu pdu; +int rc; +static u_char data[] = { + 0x20, 0x08, 0x20, 0x20, 0x20, 0x20, 0xff, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x14, 0x00, 0x00, 0x00, 0x44, 0x00, 0x20, 0x20, + 0x00, 0x20, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0xff, 0x20, +}; +static const size_t data_length = sizeof(data); + +memset(&session, 0, sizeof(session)); +session.version = AGENTX_VERSION_1; + +memset(&pdu, 0, sizeof(pdu)); + +rc = agentx_parse(&session, &pdu, data, data_length); + +fprintf(stderr, "rc = %d\n", rc); +fflush(stderr); + +OKF(rc != 0, ("Parsing of AgentX data failed")); diff --git a/testing/fulltests/unit-tests/T105trap_parse_clib.c b/testing/fulltests/unit-tests/T105trap_parse_clib.c new file mode 100644 index 0000000..5c21ccd --- /dev/null +++ b/testing/fulltests/unit-tests/T105trap_parse_clib.c @@ -0,0 +1,41 @@ +/* HEADER Parsing of an SNMP trap with no varbinds */ +netsnmp_pdu pdu; +int rc; +static u_char trap_pdu[] = { + /* Sequence with length of 0x2d = 45 bytes. */ + [ 0] = 0x30, [ 1] = 0x82, [ 2] = 0x00, [ 3] = 0x2d, + /* version = INTEGER 0 */ + [ 4] = 0x02, [ 5] = 0x01, [ 6] = 0x00, + /* community = public (OCTET STRING 0x70 0x75 0x62 0x6c 0x69 0x63) */ + [ 7] = 0x04, [ 8] = 0x06, [ 9] = 0x70, [10] = 0x75, + [11] = 0x62, [12] = 0x6c, [13] = 0x69, [14] = 0x63, + /* SNMP_MSG_TRAP; 32 bytes. */ + [15] = 0xa4, [16] = 0x20, + /* enterprise = OBJECT IDENTIFIER .1.3.6.1.6.3.1.1.5 = snmpTraps */ + [17] = 0x06, [18] = 0x08, + [19] = 0x2b, [20] = 0x06, [21] = 0x01, [22] = 0x06, + [23] = 0x03, [24] = 0x01, [25] = 0x01, [26] = 0x05, + /* agent-addr = ASN_IPADDRESS 192.168.1.34 */ + [27] = 0x40, [28] = 0x04, [29] = 0xc0, [30] = 0xa8, + [31] = 0x01, [32] = 0x22, + /* generic-trap = INTEGER 0 */ + [33] = 0x02, [34] = 0x01, [35] = 0x00, + /* specific-trap = INTEGER 0 */ + [36] = 0x02, [37] = 0x01, [38] = 0x00, + /* ASN_TIMETICKS 0x117f243a */ + [39] = 0x43, [40] = 0x04, [41] = 0x11, [42] = 0x7f, + [43] = 0x24, [44] = 0x3a, + /* varbind list */ + [45] = 0x30, [46] = 0x82, [47] = 0x00, [48] = 0x00, +}; +static size_t trap_pdu_length = sizeof(trap_pdu); +netsnmp_session session; + +snmp_set_do_debugging(TRUE); +debug_register_tokens("dumpv_recv,dumpv_send,asn,recv"); +memset(&session, 0, sizeof(session)); +snmp_sess_init(&session); +memset(&pdu, 0, sizeof(pdu)); +rc = snmp_parse(NULL, &session, &pdu, trap_pdu, trap_pdu_length); + +OKF((rc == 0), ("Parsing of a trap PDU")); diff --git a/win32/Configure b/win32/Configure index a36db0b..37f597f 100644 --- a/win32/Configure +++ b/win32/Configure @@ -4,16 +4,21 @@ # Written by Alex Burger # March 5th, 2004 # -use Getopt::Long; use strict; +use warnings; +use ExtUtils::Embed; +use Getopt::Long; my $version = "unknown"; my $config; my $sdk = 0; my $linktype; +my $blumenthal_aes; my $prefix; my $prefixdos; my $openssl = 0; +my $opensslincdir; +my $openssllibdir; my $b_ipv6 = 0; my $b_winextdll = 0; my $help = 0; @@ -22,14 +27,17 @@ GetOptions ('config=s' => \$config, 'with-sdk' => \$sdk, 'linktype=s' => \$linktype, 'destdir=s' => \$prefix, + 'enable-blumenthal-aes' => \$blumenthal_aes, 'prefix=s' => \$prefix, 'with-ssl' => \$openssl, + 'with-sslincdir=s' => \$opensslincdir, + 'with-ssllibdir=s' => \$openssllibdir, 'with-ipv6' => \$b_ipv6, 'with-winextdll' => \$b_winextdll, 'help' => \$help); -if ($help == 1) -{ +if ($help == 1 || !defined($config) || !defined($linktype) || + !defined($b_ipv6) || !defined($b_winextdll)) { my $USAGE = qq/ Usage: perl Configure [] @@ -41,7 +49,10 @@ Options: --linktype=[static | dynamic] Build static or dynamic (DLL) --prefix=\"path\" Set INSTALL_BASE path (install path) --destdir=\"path\" Same as --prefix + --enable-blumenthal-aes Enable Blumenthal AES support --with-ssl Link against OpenSSL + --with-sslincdir=\"path\" OpenSSL include path + --with-ssllibdir=\"path\" OpenSSL library path --with-ipv6 Build in IPv6 transports (enables SDK) --with-winextdll Build winExtDLL agent (enables SDK, see README.win32) --help This help screen @@ -63,7 +74,7 @@ if (($linktype ne "static") && ($linktype ne "dynamic")) { $linktype = "static"; } -if ($prefix eq "") { +if (!$prefix) { $prefix = "c:/usr"; } @@ -97,8 +108,7 @@ open (UNIX_CONFIGURE_IN, "<$unix_configure_in") || die "Can't Open $unix_configu while () { chomp; - /PACKAGE_VERSION='(.*)'/; - if ($1 ne "") { + if (/PACKAGE_VERSION='(.*)'/) { $version = $1; last; } @@ -140,21 +150,10 @@ sub substitute # Perform substitutions # ############################################### -my %subs = ( - "cfg" => [ "^CFG=", "CFG=$config" ], - "int" => [ "^INTDIR=", "INTDIR=.\\$config" ], - "lnk" => [ "^LINKTYPE=", "LINKTYPE=$linktype" ], - "out" => [ "^OUTDIR=", "OUTDIR=.\\$config" ], - "pfx" => [ "^PREFIX=", "PREFIX=$prefix" ], - "dos" => [ "^PREFIX_DOS=", "PREFIX_DOS=$prefixdos" ], - "sdk" => [ "^SDK=", $sdk == 1 ? "SDK=true" : "SDK=false" ], - ); - -substitute("Makefile", "Makefile.in", \%subs); -substitute("local/Makefile", "local/Makefile.in", \%subs); my @programs = qw -/encode_keychange +/ +encode_keychange snmpbulkget snmpbulkwalk snmpdelta @@ -172,52 +171,124 @@ snmpvacm snmpwalk /; +my @apps=sort("snmpnetstat", @programs); +my @apps_clean; +foreach my $app (@apps) { + push @apps_clean, $app . "_clean"; +} + +my $perl_define = + "/D NETSNMP_REMOVE_U64 " . + "/D VC_EXTRALEAN " . + "/D WIN32 " . + "/D _CONSOLE " . + "/D _CRT_NONSTDC_NO_WARNINGS " . + "/D _CRT_SECURE_NO_WARNINGS " . + "/D _MBCS " . + "/D _WIN32_WINNT=0xffff " . + "/D _WINSOCK_DEPRECATED_NO_WARNINGS"; + +my $perl_inc = $opensslincdir ? "/I $opensslincdir" : ""; + +my $perl_cflags = ExtUtils::Embed::ccopts(); +# Do not use $perl_cflags if these come from a Perl executable built with gcc. +$perl_cflags = "" if $perl_cflags =~ / -pipe/; + +my %makefile_subs = ( + "app" => [ "^APPS=", "APPS=" . join(" ", @apps) ], + "apc" => [ "^APPS_CLEAN=", "APPS_CLEAN=" . join(" ", @apps_clean)], + "cfg" => [ "^CFG=", "CFG=$config" ], + "int" => [ "^INTDIR=", "INTDIR=.\\$config" ], + "lnk" => [ "^LINKTYPE=", "LINKTYPE=$linktype" ], + "out" => [ "^OUTDIR=", "OUTDIR=.\\$config" ], + "pfx" => [ "^PREFIX=", "PREFIX=$prefix" ], + "dos" => [ "^PREFIX_DOS=", "PREFIX_DOS=$prefixdos" ], + "ssl" => [ "^OPENSSL=", $openssl ? "OPENSSL=true" : "OPENSSL=false" ], + "sdk" => [ "^SDK=", $sdk == 1 ? "SDK=true" : "SDK=false" ], + "pin" => [ "^PERL_DEFINE=","PERL_DEFINE=$perl_define" ], + "pdf" => [ "^PERL_INC=", "PERL_INC=$perl_inc" ], + "pcf" => [ "^PERL_CFLAGS=","PERL_CFLAGS=$perl_cflags" ], + "cfl" => [ "^CFLAGS=", "CFLAGS=$perl_define " . + "/D WIN32_LEAN_AND_MEAN " . + "/EHsc " . + "/FD " . + "/FR\$(INTDIR)\\ " . + "/Fd\$(INTDIR)\\\$(PROGNAME).pdb " . + "/Fo\$(INTDIR)\\ " . + "$perl_inc " . + "$perl_cflags " . + "/c " . + "/W3 " . + "/Zi " . + "/nologo " . + ($config eq "release" ? + "/MD /D NDEBUG /O2 " : + "/MDd /D _DEBUG /Od /Gm ") + ], + "lfl" => [ "^LDFLAGS=", "LDFLAGS=" . + ($config eq "debug" ? "/debug " : "") . + ($openssllibdir ? "/libpath:$openssllibdir" : + "") . " " . + "/MANIFEST:EMBED" + ], + "rsc" => [ "^RSCFLAGS=", "RSCFLAGS=/l 0x409 " . + ($config eq "release" ? "/d NDEBUG" : + "/d _DEBUG") + ], + ); + +substitute("Makefile", "Makefile.in", \%makefile_subs); +substitute("local/Makefile", "local/Makefile.in", \%makefile_subs); + foreach my $progName (@programs) { - $subs{"prg"} = [ "^PROGNAME=", "PROGNAME=$progName" ]; - substitute("$progName/Makefile", "Makefile-apps.in", \%subs); + $makefile_subs{"prg"} = [ "^PROGNAME=", "PROGNAME=$progName" ]; + substitute("$progName/Makefile", "Makefile-apps.in", \%makefile_subs); } foreach my $progName ("libagent", "libnetsnmptrapd", "local", "netsnmpmibs", "snmpd", "snmptrapd", "snmpnetstat", $linktype eq "dynamic" ? "libsnmp_dll" : "libsnmp") { - $subs{"prg"} = [ "^PROGNAME=", "PROGNAME=$progName" ]; - substitute("$progName/Makefile", "$progName/Makefile.in", \%subs); + $makefile_subs{"prg"} = [ "^PROGNAME=", "PROGNAME=$progName" ]; + substitute("$progName/Makefile", "$progName/Makefile.in", \%makefile_subs); } -my %subs = ( +my %snmpconf_subs = ( "env" => [ "\@ENV_SEPARATOR\@", ";" ] ); -substitute("../local/snmpconf", "../local/snmpconf.in", \%subs); +substitute("../local/snmpconf", "../local/snmpconf.in", \%snmpconf_subs); -my %subs = ( +my %net_snmp_config_subs = ( "ver" => [ "^#define PACKAGE_VERSION.*", "#define PACKAGE_VERSION \"$version\"" ] ); if ($prefix ne "") { - $subs{"pfx"} = [ "^#define INSTALL_BASE.*", "#define INSTALL_BASE \"$prefix\"" ]; + $net_snmp_config_subs{"pfx"} = [ "^#define INSTALL_BASE.*", "#define INSTALL_BASE \"$prefix\"" ]; } if ($linktype eq "dynamic") { - $subs{"dll"} = [ "^.*#undef NETSNMP_USE_DLL.*", "#define NETSNMP_USE_DLL 1" ]; + $net_snmp_config_subs{"dll"} = [ "^.*#undef NETSNMP_USE_DLL.*", "#define NETSNMP_USE_DLL 1" ]; } if ($sdk == 1) { - $subs{"sdk"} = [ "^.*#undef HAVE_WIN32_PLATFORM_SDK.*", "#define HAVE_WIN32_PLATFORM_SDK 1" ]; + $net_snmp_config_subs{"sdk"} = [ "^.*#undef HAVE_WIN32_PLATFORM_SDK.*", "#define HAVE_WIN32_PLATFORM_SDK 1" ]; } if ($openssl == 1) { - $subs{"ssl"} = [ "^.*#undef NETSNMP_USE_OPENSSL.*", "#define NETSNMP_USE_OPENSSL 1" ]; + $net_snmp_config_subs{"ssl"} = [ "^.*#undef NETSNMP_USE_OPENSSL.*", "#define NETSNMP_USE_OPENSSL 1" ]; } else { - $subs{"ssl"} = [ "^.*#undef NETSNMP_USE_INTERNAL_MD5.*", "#define NETSNMP_USE_INTERNAL_MD5 1" ]; + $net_snmp_config_subs{"ssl"} = [ "^.*#undef NETSNMP_USE_INTERNAL_MD5.*", "#define NETSNMP_USE_INTERNAL_MD5 1" ]; +} +if ($blumenthal_aes) { + $net_snmp_config_subs{"baes"} = [ "^.*#undef NETSNMP_DRAFT_BLUMENTHAL_AES_04.*", "#define NETSNMP_DRAFT_BLUMENTHAL_AES_04 1" ]; } if ($b_ipv6 == 1) { - $subs{"ipv6"} = [ "^.*#undef NETSNMP_ENABLE_IPV6.*", "#define NETSNMP_ENABLE_IPV6 1" ]; + $net_snmp_config_subs{"ipv6"} = [ "^.*#undef NETSNMP_ENABLE_IPV6.*", "#define NETSNMP_ENABLE_IPV6 1" ]; } if ($b_winextdll == 1) { - $subs{"winextdll"} = [ "^.*#undef USING_WINEXTDLL_MODULE.*", "#define USING_WINEXTDLL_MODULE 1" ]; + $net_snmp_config_subs{"winextdll"} = [ "^.*#undef USING_WINEXTDLL_MODULE.*", "#define USING_WINEXTDLL_MODULE 1" ]; } substitute("net-snmp/net-snmp-config.h", "net-snmp/net-snmp-config.h.in", - \%subs); + \%net_snmp_config_subs); print qq/ --------------------------------------------------------- @@ -236,6 +307,7 @@ print " SDK: " . ($sdk == 1 ? "enabled" : "disabled") . print " Link type: $linktype\n"; print " Prefix / Destdir: " . ($prefix ne "" ? $prefix : "(default)") . "\n"; print " OpenSSL: " . ($openssl == 1 ? "enabled" : "disabled") . "\n"; +print " Blumenthal AES: " . ($blumenthal_aes ? "enabled" : "disabled") . "\n"; print " IPv6 transport: " . ($b_ipv6 == 1 ? "enabled" : "disabled") . "\n"; print " winExtDLL agent: " . ($b_winextdll == 1 ? "enabled" : "disabled") . "\n"; diff --git a/win32/Makefile-apps.in b/win32/Makefile-apps.in index bcfb26e..f8db40d 100644 --- a/win32/Makefile-apps.in +++ b/win32/Makefile-apps.in @@ -3,6 +3,8 @@ CFG= OUTDIR= INTDIR= LINKTYPE= +CFLAGS= +LDFLAGS= # Set to 1 to allow the building using the DLL version of SNMPLIB. ALLOW_DLL=1 @@ -13,96 +15,16 @@ NULL= NULL=nul !ENDIF -!IF "$(CFG)" == "release" - -ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)" - - -CLEAN : - -@erase "$(INTDIR)\$(PROGNAME).obj" - -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\$(PROGNAME).pch" - -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe" - -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" - -"..\bin\$(OUTDIR)" : - if not exist "..\bin\$(OUTDIR)/$(NULL)" mkdir "..\bin\$(OUTDIR)" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\$(PROGNAME).bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=netsnmp.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /debug /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /libpath:"../lib/release" -LINK32_OBJS= \ - "$(INTDIR)\$(PROGNAME).obj" - -"..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) -!IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 -!ELSE # Linktype check - -@echo . - -@echo Aborting build. Applications can not be built using --linktype=dynamic - -@echo . -!ENDIF +CPP_PROJ=/I.. /I..\..\include $(CFLAGS) -!ELSEIF "$(CFG)" == "debug" -ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)\$(PROGNAME).bsc" "$(INTDIR)" +ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)" CLEAN : -@erase "$(INTDIR)\$(PROGNAME).obj" - -@erase "$(INTDIR)\$(PROGNAME).sbr" -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\vc??.pdb" - -@erase "$(INTDIR)\$(PROGNAME).bsc" - -@erase "$(INTDIR)\$(PROGNAME).pdb" -@erase "$(INTDIR)\$(PROGNAME).pch" -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe" -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" @@ -113,75 +35,24 @@ CLEAN : "$(INTDIR)" : if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\apps}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\$(PROGNAME).bsc" -BSC32_SBRS= \ - "$(INTDIR)\$(PROGNAME).sbr" - -"$(INTDIR)\$(PROGNAME).bsc" : "..\bin\$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - LINK32=link.exe -LINK32_FLAGS=netsnmp.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /incremental:no /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /debug /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /pdbtype:sept /libpath:"../lib/debug" +LINK32_FLAGS=netsnmp.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /libpath:"../lib/$(INTDIR)" $(LDFLAGS) LINK32_OBJS= \ "$(INTDIR)\$(PROGNAME).obj" "..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) !IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 + $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS) !ELSE # Linktype check -@echo . -@echo Aborting build. Applications can not be built using --linktype=dynamic -@echo . !ENDIF -!ENDIF - - !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("$(PROGNAME).dep") !INCLUDE "$(PROGNAME).dep" @@ -190,27 +61,4 @@ LINK32_OBJS= \ !ENDIF !ENDIF - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\..\apps\$(PROGNAME).c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\$(PROGNAME).obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\$(PROGNAME).obj" "$(INTDIR)\$(PROGNAME).sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - - -!ENDIF - - +"$(INTDIR)\$(PROGNAME).obj": ..\..\apps\$(PROGNAME).c "$(INTDIR)" diff --git a/win32/Makefile.in b/win32/Makefile.in index bba5464..6c5138a 100644 --- a/win32/Makefile.in +++ b/win32/Makefile.in @@ -3,8 +3,16 @@ LINKTYPE= CFG= PREFIX= PREFIX_DOS= +PERL_DEFINE= +PERL_INC= +PERL_CFLAGS= PERL= NMAKE=nmake /nologo +APPS= +APPS_CLEAN= + +# To make it possible for the Perl tests to find netsnmp.dll. +PATH=$(MAKEDIR)\bin\$(CFG);$(PATH) all : libs apps snmptrapd snmpd local @@ -26,9 +34,9 @@ libsnmp_clean : libsnmp_dll_clean_ libs : libagent libsnmp libnetsnmptrapd netsnmpmibs libs_clean : libagent_clean libsnmp_clean libnetsnmptrapd_clean netsnmpmibs_clean -apps : snmpdf snmpset snmpusm snmptest snmptrap snmpvacm snmpwalk snmpdelta snmptable snmpstatus snmpbulkget snmpget snmpgetnext snmpbulkwalk snmptranslate encode_keychange snmpnetstat +apps : $(APPS) -apps_clean : snmpdf_clean snmpset_clean snmpusm_clean snmptest_clean snmptrap_clean snmpvacm_clean snmpwalk_clean snmpdelta_clean snmptable_clean snmpstatus_clean snmpbulkget_clean snmpget_clean snmpgetnext_clean snmpbulkwalk_clean snmptranslate_clean encode_keychange_clean snmpnetstat_clean +apps_clean : $(APPS_CLEAN) local : snmpconf mib2c traptoemail @@ -59,10 +67,12 @@ perl : -@echo . !ENDIF # dynamic/static check cd ..\perl + REM For MakefileSubs.pm + set PERL5LIB=$(MAKEDIR)\..\perl !IF "$(CFG)" == "release" - perl Makefile.PL CAPI=TRUE -NET-SNMP-IN-SOURCE=TRUE + perl Makefile.PL CAPI=TRUE -NET-SNMP-IN-SOURCE=TRUE -NET-SNMP-CONFIG=do-not-use-net-snmp-config -NET-SNMP-DEFINE="$(PERL_DEFINE)" -NET-SNMP-INC="$(PERL_INC)" -NET-SNMP-CFLAGS="$(PERL_CFLAGS)" -NET-SNMP-PATH="$(PREFIX)" !ELSE # release/debug check - perl Makefile.PL CAPI=TRUE -NET-SNMP-IN-SOURCE=TRUE -NET-SNMP-DEBUG=TRUE + perl Makefile.PL CAPI=TRUE -NET-SNMP-IN-SOURCE=TRUE -NET-SNMP-CONFIG=do-not-use-net-snmp-config -NET-SNMP-DEFINE="$(PERL_DEFINE)" -NET-SNMP-INC="$(PERL_INC)" -NET-SNMP-CFLAGS="$(PERL_CFLAGS)" -NET-SNMP-PATH="$(PREFIX)" -NET-SNMP-DEBUG=TRUE !ENDIF # release/debug check $(NMAKE) cd ..\win32 @@ -74,7 +84,9 @@ perl_test : -@echo Perl modules must be build against dynamic (DLL) libraries -@echo . !ELSE # dynamic/static check + cpan Win32::Process 1; my $target_arch = $ENV{TARGET_CPU} ? $ENV{TARGET_CPU} : $ENV{Platform} ? $ENV{Platform} : "x86"; +$target_arch = lc $target_arch; if ($target_arch ne "x86" && $target_arch ne "x64") { print "Error: unsupported target architecture $target_arch\n"; die; } my @perl_arch = split(/-/, $Config{archname}); -if ($perl_arch[1] ne $target_arch) { - print "perl_arch = $perl_arch[1] does not match target_arch = $target_arch\n"; - die; -} my $openssl = false; my $default_openssldir = $target_arch eq "x64" ? - "C:\\OpenSSL-Win64" : "C:\\OpenSSL-Win32"; + "C:\\Progra~1\\OpenSSL-Win64" : "C:\\Progra~1\\OpenSSL-Win32"; my $default_opensslincdir = $default_openssldir . "\\include"; my $opensslincdir = $default_opensslincdir; my $default_openssllibdir = $default_openssldir . "\\lib\\VC"; my $openssllibdir = $default_openssllibdir; my $b_ipv6 = false; my $b_winextdll = false; -my $sdk = false; +my $sdk = true; my $default_install_base = "c:/usr"; my $install_base = $default_install_base; my $install = true; @@ -40,16 +37,15 @@ my $perl_install = false; my $logging = true; my $debug = false; -my $configOpts = ""; +my $configOpts; my $link_dynamic = false; my $option; # Path of this script (source tree path + "win32"). my $current_pwd = dirname(abs_path($0)); -if ( -d $ENV{MSVCDir} || -d $ENV{VCINSTALLDIR} || defined($ENV{TARGET_CPU}) ) { -} -else { +if (!defined($ENV{MSVCDir}) && !defined($ENV{VCINSTALLDIR}) && + !defined($ENV{TARGET_CPU})) { print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . "environment.\n\n"; system("pause"); @@ -62,23 +58,22 @@ print "1. OpenSSL support: " . ($openssl ? "enabled" : "disabled"). "\n"; print "2. OpenSSL include directory: " . $opensslincdir. "\n"; print "3. OpenSSL library director: " . $openssllibdir. "\n"; - print "4. Platform SDK support: " . ($sdk ? "enabled" : "disabled") . "\n"; print "\n"; - print "5. Install path: " . $install_base . "\n"; - print "6. Install after build: " . ($install ? "enabled" : "disabled") . "\n"; + print "4. Install path: " . $install_base . "\n"; + print "5. Install after build: " . ($install ? "enabled" : "disabled") . "\n"; print "\n"; - print "7. Perl modules: " . ($perl ? "enabled" : "disabled") . "\n"; - print "8. Install perl modules: " . ($perl_install ? "enabled" : "disabled") . "\n"; + print "6. Perl modules: " . ($perl ? "enabled" : "disabled") . "\n"; + print "7. Install perl modules: " . ($perl_install ? "enabled" : "disabled") . "\n"; print "\n"; - print "9. Quiet build (logged): " . ($logging ? "enabled" : "disabled") . "\n"; - print "10. Debug mode: " . ($debug ? "enabled" : "disabled") . "\n"; + print "8. Quiet build (logged): " . ($logging ? "enabled" : "disabled") . "\n"; + print "9. Debug mode: " . ($debug ? "enabled" : "disabled") . "\n"; print "\n"; - print "11. IPv6 transports (requires SDK): " . ($b_ipv6 ? "enabled" : "disabled") . "\n"; - print "12. winExtDLL agent (requires SDK): " . ($b_winextdll ? "enabled" : "disabled") . "\n"; + print "10. IPv6 transports: " . ($b_ipv6 ? "enabled" : "disabled") . "\n"; + print "11. winExtDLL agent: " . ($b_winextdll ? "enabled" : "disabled") . "\n"; print "\n"; - print "13. Link type: " . ($link_dynamic ? "dynamic" : "static") . "\n"; + print "12. Link type: " . ($link_dynamic ? "dynamic" : "static") . "\n"; print "\n"; - print "14. Install development files " . ($install_devel ? "enabled" : "disabled") . "\n"; + print "13. Install development files " . ($install_devel ? "enabled" : "disabled") . "\n"; print "\nF. Finished - start build\n"; print "Q. Quit - abort build\n\n"; print "Select option to set / toggle: "; @@ -99,48 +94,45 @@ $openssllibdir =~ s/\\/\//g; $openssllibdir = $default_openssllibdir if ($openssllibdir eq ""); } - elsif ($option eq "4") { - $sdk = !$sdk; - } - elsif ($option eq "11") { + elsif ($option eq "10") { $b_ipv6 = !$b_ipv6; if ($b_ipv6 && !$sdk) { print "\n\n* SDK required for IPv6 and has been automatically enabled"; $sdk = true; } } - elsif ($option eq "12") { + elsif ($option eq "11") { $b_winextdll = !$b_winextdll; if ($b_winextdll && !$sdk) { print "\n\n* SDK required for IPv6 and has been automatically enabled"; $sdk = true; } } - elsif ($option eq "5") { + elsif ($option eq "4") { print "Please enter the new install path [$default_install_base]: "; chomp ($install_base = <>); $install_base =~ s/\\/\//g; $install_base = $default_install_base if ($install_base eq ""); } - elsif ($option eq "6") { + elsif ($option eq "5") { $install = !$install; } - elsif ($option eq "14") { + elsif ($option eq "13") { $install_devel = !$install_devel; } - elsif ($option eq "7") { + elsif ($option eq "6") { $perl = !$perl; } - elsif ($option eq "8") { + elsif ($option eq "7") { $perl_install = !$perl_install; } - elsif ($option eq "9") { + elsif ($option eq "8") { $logging = !$logging; } - elsif ($option eq "10") { + elsif ($option eq "9") { $debug = !$debug; } - elsif ($option eq "13") { + elsif ($option eq "12") { $link_dynamic = !$link_dynamic; } elsif (lc($option) eq "f") { @@ -151,16 +143,19 @@ } } +if ($perl && $perl_arch[1] ne $target_arch) { + print "perl_arch = $perl_arch[1] does not match target_arch = $target_arch\n"; + die; +} + my $linktype = $link_dynamic ? "dynamic" : "static"; -$configOpts .= $openssl ? "--with-ssl" : ""; -$configOpts .= " "; -$configOpts .= $sdk ? "--with-sdk" : ""; -$configOpts .= " "; -$configOpts .= $b_ipv6 ? "--with-ipv6" : ""; -$configOpts .= " "; -$configOpts .= $b_winextdll ? "--with-winextdll" : ""; -$configOpts .= " "; -$configOpts .= $debug ? "--config=debug" : "--config=release"; +$configOpts = (($openssl ? "--with-ssl --enable-blumenthal-aes" : "") . " " . + ($opensslincdir ? "--with-sslincdir=$opensslincdir" : "") . " " . + ($openssllibdir ? "--with-ssllibdir=$openssllibdir" : "") . " " . + ($sdk ? "--with-sdk" : "") . " " . + ($b_ipv6 ? "--with-ipv6" : "") . " " . + ($b_winextdll ? "--with-winextdll" : "") . " " . + ($debug ? "--config=debug" : "--config=release")); # Set environment variables @@ -168,13 +163,10 @@ $ENV{NO_EXTERNAL_DEPS}="1"; # Set PATH environment variable so Perl make tests can locate the DLL -$ENV{PATH} = "$current_pwd\\bin\\" . ($debug ? "debug" : "release" ) . ";$ENV{PATH}"; - -$ENV{INCLUDE} .= ";$opensslincdir"; -$ENV{LIB} .= ";$openssllibdir"; +$ENV{PATH} = File::Spec->catdir($current_pwd, "bin", $debug ? "debug" : "release") . ";$ENV{PATH}"; # Set MIBDIRS environment variable so Perl make tests can locate the mibs -$ENV{MIBDIRS} = dirname($current_pwd) . "/mibs"; +$ENV{MIBDIRS} = File::Spec->catdir(dirname($current_pwd), "mibs"); # Set SNMPCONFPATH environment variable so Perl conf.t test can locate # the configuration files. @@ -203,6 +195,9 @@ system("nmake /nologo" . ($logging ? " > make.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see make.out)" : "Build error (see above)"); if ($perl) { + if ($Config{'ccname'} =~ /^gcc/) { + die "The perl interpreter has been built with gcc instead of MSVC. Giving up.\n"; + } if (!$link_dynamic) { print "Running Configure for DLL...\n"; system("perl Configure $configOpts --linktype=dynamic --prefix=\"$install_base\"" . ($logging ? " > perlconfigure.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see perlconfigure.out)" : "Build error (see above)"); diff --git a/win32/config.h.borland b/win32/config.h.borland deleted file mode 100644 index 47e1b07..0000000 --- a/win32/config.h.borland +++ /dev/null @@ -1,786 +0,0 @@ -/* config.h: a general config file */ - -/* Define IN_UCD_SNMP_SOURCE if compiling inside the ucd-snmp source tree */ -#define IN_UCD_SNMP_SOURCE 1 - -/* UC-Davis' IANA-assigned enterprise number is 2021 */ -#define ENTERPRISE_NUMBER 2021 - -/* 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 "IP-MIB;IF-MIB;TCP-MIB;UDP-MIB;SNMPv2-MIB;RFC1213-MIB;UCD-SNMP-MIB;UCD-DEMO-MIB;SNMP-TARGET-MIB;SNMP-VIEW-BASED-ACM-MIB;SNMP-COMMUNITY-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 NETSNMP_DEFAULT_MIBDIRS "/USR/MIBS" - -/* default mib files to load, specified by path. */ - -#undef NETSNMP_DEFAULT_MIBFILES - -/* should we compile to use special opaque types: float, double, - counter64, i64, ui64, union? */ -#define NETSNMP_WITH_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 NETSNMP_ENABLE_SCAPI_AUTHPRIV 1 - -/* define if you are using the internal MD5 code */ -#define NETSNMP_USE_INTERNAL_MD5 1 - -/* add in recent CMU library extensions (not complete) */ -#define CMU_COMPATIBLE 1 - -/* should "--" comments in mibs be a comment till the end of the line - or also until another "--", the latter being the technically - correct. */ -#undef MIB_COMMENT_IS_EOL_TERMINATED - -/* debugging stuff */ -#undef NETSNMP_NO_DEBUGGING /* if defined, we optimize the code - to exclude all debugging calls. */ -#define NETSNMP_ALWAYS_DEBUG 0 /* Always print debugging information and - ignore the -D flag passed to the cmds */ - -/* Define if using alloca.c. */ -#undef C_ALLOCA - -/* 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 if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you have the getmntent function. */ -#undef HAVE_GETMNTENT - -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to `long' if doesn't define. */ -#undef off_t - -/* Define to `int' if doesn't define. */ -#undef pid_t - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define if you have raise() instead of alarm() */ - -#define HAVE_RAISE 1 - -/* 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 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if you have the gettimeofday function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -#define SNMPDLMODPATH "/USR/LIB/DLMOD" -#define SNMPLIBPATH "/USR/LIB" -#define SNMPSHAREPATH "/USR/SHARE/SNMP" -#define SNMPCONFPATH "/USR" - -/* SNMPPATH contains (more) important files */ - -#undef SNMPPATH - -/* 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) */ - -#undef NETSNMP_LOGFILE - -/* NETSNMP_PERSISTENT_DIRECTORY: If defined, the library is capabile of saving - persisant information to this directory in the form of configuration - lines: NETSNMP_PERSISTENT_DIRECTORY/NAME.persistent.conf */ -#define NETSNMP_PERSISTENT_DIRECTORY "/USR/SNMP/PERSIST" - -#define NETSNMP_MAX_PERSISTENT_BACKUPS 10 -/* default system contact */ -#define NETSNMP_SYS_CONTACT "unknown" - -/* system location */ -#define NETSNMP_SYS_LOC "unknown" - -/* location of UNIX kernel */ -#define KERNEL_LOC "unknown" - -/* location of mount table list */ -#define ETC_MNTTAB "unknown" - -/* location of swap device (ok if not found) */ -#undef DMEM_LOC - -/* define rtentry to ortentry on SYSV machines (alphas) */ -#define RTENTRY rtentry; - -/* Use BSD 4.4 routing table entries? */ -#undef RTENTRY_4_4 - -/* Does the rtentry structure have a rt_next node */ -#undef RTENTRY_RT_NEXT - -#define PSCMD "/bin/ps" - -/* Where is the uname command */ -#define UNAMEPROG "/bin/uname" - -/* testing code sections. */ -/* #undef NETSNMP_ENABLE_TESTING_CODE */ - -/* If you don't have root access don't exit upon kmem errors */ -#undef NETSNMP_NO_ROOT_ACCESS - -/* 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 getloadavg function. */ -#undef HAVE_GETLOADAVG - -/* Define if you have the setenv function. */ -#undef HAVE_SETENV - -/* Define if you have the strtoul function. */ -#define HAVE_STRTOUL 1 - -/* Define if you have the vsnprintf function. */ -#define HAVE_VSNPRINTF 1 - -/* Define if you have the kvm_openfiles function. */ -#undef HAVE_KVM_OPENFILES - -/* Define if you have the lrand48 function. */ -#undef HAVE_LRAND48 - -/* Define if you have the rand function. */ -#define HAVE_RAND 1 - -/* Define if you have the random function. */ -#undef HAVE_RANDOM - -/* Define if you have the select function. */ -#undef HAVE_SELECT - -/* Define if you have the setmntent function. */ -#undef HAVE_SETMNTENT - -/* Define if you have the sigblock function. */ -#undef HAVE_SIGBLOCK - -/* Define if you have the sighold function. */ -#undef HAVE_SIGHOLD - -/* Define if you have the signal function. */ -#undef HAVE_SIGNAL - -/* Define if you have the sigset function. */ -#undef HAVE_SIGSET - -/* Define if you have the socket function. */ -#define HAVE_SOCKET 1 - -/* Define if you have header file. */ -#define HAVE_WINSOCK_H 1 - -/* Define if you have the closesocket function. */ -#define HAVE_CLOSESOCKET 1 - -/* Define if you have the statfs function. */ -#undef HAVE_STATFS - -/* Define if you have the statvfs function. */ -#undef HAVE_STATVFS - -/* Define if you have the strcasecmp function */ -#define HAVE_STRCASECMP 1 - -/* Define if you have the snprintf function */ -#define HAVE_SNPRINTF 1 - -/* use win32 strdup */ -#define strdup _strdup - -/* Define if you have the strtol function. */ -#define HAVE_STRTOL 1 - -/* Define if you have the tcgetattr function. */ -/* #define HAVE_TCGETATTR 1 */ - -/* Define if you have the uname function. */ -#undef HAVE_UNAME - -/* Define if you have header file. */ -#define HAVE_IO_H 1 - -/* Define if you have header file. (Win32-getpid) */ -#define HAVE_PROCESS_H 1 - -/* Define if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define if you have the header file. */ -#undef HAVE_ERR_H - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#undef HAVE_FSTAB_H - -/* Define if you have the header file. */ -#undef HAVE_INET_MIB2_H - -/* Define if you have the header file. */ -#undef HAVE_KSTAT_H - -/* Define if you have the header file. */ -#undef HAVE_KVM_H - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#undef HAVE_MACHINE_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_MACHINE_PTE_H - -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the header file. */ -#undef HAVE_MNTENT_H - -/* Define if you have the header file. */ -#undef HAVE_MTAB_H - -/* Define if you have the header file. */ -#undef HAVE_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_NET_IF_DL_H - -/* Define if you have the header file. */ -#undef HAVE_NET_IF_TYPES_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_ICMP_VAR_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IF_ETHER_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_PCB_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_VAR_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IP_VAR_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_TCP_FSM_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_TCP_TIMER_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_TCP_VAR_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_TCPIP_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_UDP_VAR_H - -/* Define if you have the header file. */ -#undef HAVE_SGTTY_H - -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -#undef HAVE_SYS_CONF_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_DIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_DMAP_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_FILE_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_FILIO_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_FIXPOINT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_FS_H - -/* Define if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the header file. */ -#undef HAVE_SYS_HASHING_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_MBUF_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_MNTTAB_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_MOUNT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PROC_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PROTOSW_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SOCKIO_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_STATVFS_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SWAP_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TCPIPSTATS_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_USER_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_UTSNAME_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VFS_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VMMAC_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VMMETER_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VMPARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VMSYSTM_H - -/* Define if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define if you have the header file. */ -#undef HAVE_UFS_FFS_FS_H - -/* Define if you have the header file. */ -#undef HAVE_UFS_FS_H - -/* Define if you have the header file. */ -#undef HAVE_UFS_UFS_DINODE_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the header file. */ -#undef HAVE_UTSNAME_H - -/* Define if you have the header file. */ -#undef HAVE_VM_SWAP_PAGER_H - -/* Define if you have the header file. */ -#undef HAVE_VM_VM_H - -/* Define if you have the header file. */ -#undef HAVE_XTI_H - -/* Define if you have the crypto library (-lcrypto). */ -#undef HAVE_LIBCRYPTO - -/* Define if you have the elf library (-lelf). */ -#undef HAVE_LIBELF - -/* Define if you have the kstat library (-lkstat). */ -#undef HAVE_LIBKSTAT - -/* Define if you have the m library (-lm). */ -#undef HAVE_LIBM - -/* Define if you have the mld library (-lmld). */ -#undef HAVE_LIBMLD - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* ifnet structure tests */ -#undef STRUCT_IFNET_HAS_IF_BAUDRATE -#undef STRUCT_IFNET_HAS_IF_TYPE -#undef STRUCT_IFNET_HAS_IF_IMCASTS -#undef STRUCT_IFNET_HAS_IF_IQDROPS -#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 -#undef STRUCT_IFNET_HAS_IF_OBYTES -#undef STRUCT_IFNET_HAS_IF_IBYTES -#undef STRUCT_IFNET_HAS_IF_ADDRLIST - -/* tcpstat.tcps_rcvmemdrop */ -#undef STRUCT_TCPSTAT_HAS_TCPS_RCVMEMDROP - -/* udpstat.udps_discard */ -#undef STRUCT_UDPSTAT_HAS_UDPS_DISCARD - -/* arphd.at_next */ -#undef STRUCT_ARPHD_HAS_AT_NEXT - -/* ifaddr.ifa_next */ -#undef STRUCT_IFADDR_HAS_IFA_NEXT - -/* ifnet.if_mtu */ -#undef STRUCT_IFNET_HAS_IF_MTU - -/* ifnet needs to have _KERNEL defined */ -#undef IFNET_NEEDS_KERNEL - -/* sysctl works to get boottime, etc... */ -#undef NETSNMP_CAN_USE_SYSCTL - -/* type check for in_addr_t */ -#define in_addr_t u_long - -/* mib pointer to the top of the extensible tree. This has been - assigned to UCDavis by the iana group. Optionally, point this to the - location in the tree your company/organization has been allocated. */ - -/* location of the extensible mib tree */ -#define EXTENSIBLEMIB 1,3,6,1,4,1,2021 -/* location of the extensible mib tree */ -#define EXTENSIBLEDOTMIB 1.3.6.1.4.1.2021 -/* count the above numbers */ -#define EXTENSIBLENUM 7 - -/* the ErrorFlag is V1 accessable because HP Openview does not support - V2. You can make this list of pairs as long as you want, just make - sure to end it in -1.*/ - -#define SECURITYEXCEPTIONS {100,NETSNMP_SNMPV1,-1} /* the ErrorFlag is V1 */ - -/* 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 -#define USEPROCMIB - -/* exec/shell NAME COMMAND */ -#define NETSNMP_SHELLMIBNUM 8 -#define USESHELLMIB - -/* swap MIN */ -#define NETSNMP_MEMMIBNUM 4 -#if defined(hpux9) || defined(bsdi2) -#define USEMEMMIB -#endif - -/* disk DISK MINSIZE */ -#define NETSNMP_DISKMIBNUM 9 -#if (HAVE_FSTAB_H || HAVE_SYS_STATVFS_H) -#define USEDISKMIB -#endif - -/* load 1 5 15 */ -#define NETSNMP_LOADAVEMIBNUM 10 -#define USELOADAVEMIB - -/* pass MIBOID command */ -#define USEPASSMIB - -/* which version are you using? This mibloc will tell you */ -#define NETSNMP_VERSIONMIBNUM 100 -#define USEVERSIONMIB - -/* Reports errors the agent runs into */ -/* (typically its "can't fork, no mem" problems) */ -#define NETSNMP_ERRORMIBNUM 101 -#define USEERRORMIB - -/* The sub id of EXENSIBLEMIB returned to queries of - .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0 */ -#define NETSNMP_AGENTID 250 - -/* This ID is returned after the NETSNMP_AGENTID above. IE, the resulting - value returned by a query to sysObjectID is - EXTENSIBLEMIB.NETSNMP_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_UNKNOWNID 255 - -#ifdef hpux9 -#define OSTYPE NETSNMP_HPUX9ID -#endif -#ifdef hpux10 -#define OSTYPE NETSNMP_HPUX10ID -#endif -#ifdef sunos4 -#define OSTYPE NETSNMP_SUNOS4ID -#endif -#ifdef solaris2 -#define OSTYPE NETSNMP_SOLARISID -#endif -#if defined(osf3) || defined(osf4) || defined(osf5) -#define OSTYPE NETSNMP_OSFID -#endif -#ifdef ultrix4 -#define OSTYPE NETSNMP_ULTRIXID -#endif -#ifdef netbsd1 -#define OSTYPE NETSNMP_NETBSD1ID -#endif -#ifdef freebsd2 -#define OSTYPE NETSNMP_FREEBSDID -#endif -#if defined(irix6) || defined(irix5) -#define OSTYPE NETSNMP_IRIXID -#endif -#ifdef linux -#define OSTYPE NETSNMP_LINUXID -#endif -#if defined(bsdi2) || defined(bsdi3) -#define OSTYPE NETSNMP_BSDIID -#endif -#ifdef openbsd2 -#define OSTYPE NETSNMP_OPENBSDID -#endif -#define OSTYPE NETSNMP_WIN32ID -/* unknown */ -#ifndef OSTYPE -#define OSTYPE NETSNMP_UNKNOWNID -#endif - -/* 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/local/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/local/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 (200*80) /* roughly 200 lines max */ - -#define MAXDISKS 10 /* 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 NETSNMP_DEFDISKMINIMUMSPACE 100000 - -#define NETSNMP_DEFMAXLOADAVE 12.0 /* default maximum load average before error */ - -#define NETSNMP_MAXREADCOUNT 20 /* 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_SNMPBLOCK 1 /* Set to 1 if you want snmpgets to block and never - timeout. Original CMU code had this - hardcoded into the code as = 1 */ - -#define NETSNMP_RESTARTSLEEP 5 /* How long to wait after a snmpset to - EXTENSIBLEMIB.NETSNMP_VERSIONMIBNUM.VERRESTARTAGENT - before restarting the agent. This is - necessary to finish the snmpset reply - before restarting. */ - -/* Number of community strings to store */ -#define NETSNMP_NUM_COMMUNITIES 5 - -/* UNdefine to allow specifying zero-length community string */ -/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */ - -#define NETSNMP_LASTFIELD -1 /* internal define */ - -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP - -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* 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 - -/* Not-to-be-compiled macros for use by configure only */ -#define config_require(x) -#define config_arch_require(x,y) -#define config_parse_dot_conf(w,x,y,z) -#define config_add_mib(x) - -#ifndef DONT_INC_STRUCTS -/*#include "agent/mibgroup/struct.h" */ -#endif - -#ifndef linux -#ifndef solaris2 -#define bsdlike -#endif -#endif - -/* detect Borland C++ WIN32 definition, add Visual C++ define */ -#ifdef __WIN32__ -#ifndef WIN32 -#define WIN32 -#endif /* WIN32 */ -#endif /* __WIN32__ */ - -#ifdef WIN32 - -#define HAVE_GETPID 1 - -int strcasecmp(const char *s1, const char *s2); -#define vsnprintf _vsnprintf - -#define EADDRINUSE WSAEADDRINUSE - -#define ENV_SEPARATOR ";" -#define ENV_SEPARATOR_CHAR ';' - - -#else - -#define ENV_SEPARATOR ":" -#define ENV_SEPARATOR_CHAR ':' - -#endif - -/* typedef unsigned short mode_t; */ - -#define NETSNMP_AGENT_DIRECTORY_MODE 0700 - -/* 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 */ - diff --git a/win32/libagent/Makefile.in b/win32/libagent/Makefile.in index abcd82e..833b395 100644 --- a/win32/libagent/Makefile.in +++ b/win32/libagent/Makefile.in @@ -2,6 +2,8 @@ PROGNAME= CFG= OUTDIR= INTDIR= +CFLAGS= +LDFLAGS= !IF "$(OS)" == "Windows_NT" NULL= @@ -9,8 +11,10 @@ NULL= NULL=nul !ENDIF -ALL : "..\lib\$(OUTDIR)\netsnmpagent.lib" +CPP=cl.exe +CPP_PROJ=/I.. /I..\..\include /I..\..\agent\mibgroup $(CFLAGS) +ALL : "..\lib\$(OUTDIR)\netsnmpagent.lib" LIB32_OBJS= \ "$(INTDIR)\agent_handler.obj" \ @@ -25,6 +29,7 @@ LIB32_OBJS= \ "$(INTDIR)\cache_handler.obj" \ "$(INTDIR)\debug_handler.obj" \ "$(INTDIR)\instance.obj" \ + "$(INTDIR)\kernel.obj" \ "$(INTDIR)\mode_end_call.obj" \ "$(INTDIR)\multiplexer.obj" \ "$(INTDIR)\null.obj" \ @@ -59,37 +64,18 @@ CLEAN : "$(INTDIR)" : if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" -CPP=cl.exe -!IF "$(CFG)" == "release" -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ELSE -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< +{..\..\agent\helpers}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmpagent.lib" +LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmpagent.lib" $(LDFLAGS) "..\lib\$(OUTDIR)\netsnmpagent.lib" : "..\lib\$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< + $(LIB32) $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) !IF "$(NO_EXTERNAL_DEPS)" != "1" @@ -100,205 +86,70 @@ LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmpagent.lib" !ENDIF !ENDIF +"$(INTDIR)\agent_handler.obj": ..\..\agent\agent_handler.c "$(INTDIR)" -SOURCE=..\..\agent\agent_handler.c - -"$(INTDIR)\agent_handler.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\agent_index.c - -"$(INTDIR)\agent_index.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\agent_read_config.c - -"$(INTDIR)\agent_read_config.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\agent_registry.c - -"$(INTDIR)\agent_registry.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\agent_sysORTable.c - -"$(INTDIR)\agent_sysORTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\agent_trap.c - -"$(INTDIR)\agent_trap.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\snmp_agent.c - -"$(INTDIR)\snmp_agent.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\snmp_vars.c - -"$(INTDIR)\snmp_vars.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\all_helpers.c - -"$(INTDIR)\all_helpers.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\baby_steps.c - -"$(INTDIR)\baby_steps.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\bulk_to_next.c - -"$(INTDIR)\bulk_to_next.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\cache_handler.c - -"$(INTDIR)\cache_handler.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\debug_handler.c - -"$(INTDIR)\debug_handler.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\instance.c - -"$(INTDIR)\instance.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\mode_end_call.c - -"$(INTDIR)\mode_end_call.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\multiplexer.c - -"$(INTDIR)\multiplexer.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\null.c - -"$(INTDIR)\null.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\old_api.c - -"$(INTDIR)\old_api.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\read_only.c - -"$(INTDIR)\read_only.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\row_merge.c - -"$(INTDIR)\row_merge.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\scalar.c - -"$(INTDIR)\scalar.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\scalar_group.c - -"$(INTDIR)\scalar_group.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\serialize.c - -"$(INTDIR)\serialize.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\helpers\snmp_get_statistic.c +"$(INTDIR)\agent_index.obj": ..\..\agent\agent_index.c "$(INTDIR)" -"$(INTDIR)\snmp_get_statistic.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\agent_read_config.obj": ..\..\agent\agent_read_config.c "$(INTDIR)" +"$(INTDIR)\agent_registry.obj": ..\..\agent\agent_registry.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\stash_cache.c +"$(INTDIR)\agent_sysORTable.obj": ..\..\agent\agent_sysORTable.c "$(INTDIR)" -"$(INTDIR)\stash_cache.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\agent_trap.obj": ..\..\agent\agent_trap.c "$(INTDIR)" +"$(INTDIR)\all_helpers.obj": ..\..\agent\helpers\all_helpers.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\stash_to_next.c +"$(INTDIR)\baby_steps.obj": ..\..\agent\helpers\baby_steps.c "$(INTDIR)" -"$(INTDIR)\stash_to_next.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\bulk_to_next.obj": ..\..\agent\helpers\bulk_to_next.c "$(INTDIR)" +"$(INTDIR)\cache_handler.obj": ..\..\agent\helpers\cache_handler.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table.c +"$(INTDIR)\debug_handler.obj": ..\..\agent\helpers\debug_handler.c "$(INTDIR)" -"$(INTDIR)\table.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\instance.obj": ..\..\agent\helpers\instance.c "$(INTDIR)" +"$(INTDIR)\mode_end_call.obj": ..\..\agent\helpers\mode_end_call.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table_array.c +"$(INTDIR)\multiplexer.obj": ..\..\agent\helpers\multiplexer.c "$(INTDIR)" -"$(INTDIR)\table_array.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\null.obj": ..\..\agent\helpers\null.c "$(INTDIR)" +"$(INTDIR)\old_api.obj": ..\..\agent\helpers\old_api.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table_container.c +"$(INTDIR)\read_only.obj": ..\..\agent\helpers\read_only.c "$(INTDIR)" -"$(INTDIR)\table_container.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\row_merge.obj": ..\..\agent\helpers\row_merge.c "$(INTDIR)" +"$(INTDIR)\scalar.obj": ..\..\agent\helpers\scalar.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table_data.c +"$(INTDIR)\scalar_group.obj": ..\..\agent\helpers\scalar_group.c "$(INTDIR)" -"$(INTDIR)\table_data.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\serialize.obj": ..\..\agent\helpers\serialize.c "$(INTDIR)" +"$(INTDIR)\snmp_agent.obj": ..\..\agent\snmp_agent.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table_tdata.c +"$(INTDIR)\snmp_get_statistic.obj": ..\..\agent\helpers\snmp_get_statistic.c "$(INTDIR)" -"$(INTDIR)\table_tdata.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\snmp_vars.obj": ..\..\agent\snmp_vars.c "$(INTDIR)" +"$(INTDIR)\stash_cache.obj": ..\..\agent\helpers\stash_cache.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table_dataset.c +"$(INTDIR)\stash_to_next.obj": ..\..\agent\helpers\stash_to_next.c "$(INTDIR)" -"$(INTDIR)\table_dataset.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\table.obj": ..\..\agent\helpers\table.c "$(INTDIR)" +"$(INTDIR)\table_array.obj": ..\..\agent\helpers\table_array.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\table_iterator.c +"$(INTDIR)\table_container.obj": ..\..\agent\helpers\table_container.c "$(INTDIR)" -"$(INTDIR)\table_iterator.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\table_data.obj": ..\..\agent\helpers\table_data.c "$(INTDIR)" +"$(INTDIR)\table_dataset.obj": ..\..\agent\helpers\table_dataset.c "$(INTDIR)" -SOURCE=..\..\agent\helpers\watcher.c +"$(INTDIR)\table_iterator.obj": ..\..\agent\helpers\table_iterator.c "$(INTDIR)" -"$(INTDIR)\watcher.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\table_tdata.obj": ..\..\agent\helpers\table_tdata.c "$(INTDIR)" +"$(INTDIR)\watcher.obj": ..\..\agent\helpers\watcher.c "$(INTDIR)" diff --git a/win32/libnetsnmptrapd/Makefile.in b/win32/libnetsnmptrapd/Makefile.in index 3824919..61d8d94 100644 --- a/win32/libnetsnmptrapd/Makefile.in +++ b/win32/libnetsnmptrapd/Makefile.in @@ -2,6 +2,8 @@ PROGNAME= CFG= OUTDIR= INTDIR= +CFLAGS= +LDFLAGS= !IF "$(OS)" == "Windows_NT" NULL= @@ -9,80 +11,9 @@ NULL= NULL=nul !ENDIF -!IF "$(CFG)" == "release" - -ALL : "..\lib\$(OUTDIR)\netsnmptrapd.lib" - - -CLEAN : - -@erase "$(INTDIR)\snmptrapd.obj" - -@erase "$(INTDIR)\snmptrapd_handlers.obj" - -@erase "$(INTDIR)\snmptrapd_log.obj" - -@erase "$(INTDIR)\snmptrapd_auth.obj" - -@erase "$(INTDIR)\winservice.obj" - -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\$(PROGNAME).pch" - -@erase "..\lib\$(OUTDIR)\netsnmptrapd.lib" - -"..\lib\$(OUTDIR)" : - if not exist "..\lib\$(OUTDIR)/$(NULL)" mkdir "..\lib\$(OUTDIR)" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\libnetsnmptrapd.bsc" -BSC32_SBRS= \ - -LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmptrapd.lib" -LIB32_OBJS= \ - "$(INTDIR)\snmptrapd.obj" \ - "$(INTDIR)\snmptrapd_handlers.obj" \ - "$(INTDIR)\snmptrapd_log.obj" \ - "$(INTDIR)\snmptrapd_auth.obj" \ - "$(INTDIR)\winservice.obj" +CPP_PROJ=/I.. /I..\..\include /I..\..\agent\mibgroup $(CFLAGS) -"..\lib\$(OUTDIR)\netsnmptrapd.lib" : "..\lib\$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" ALL : "..\lib\$(OUTDIR)\netsnmptrapd.lib" @@ -94,7 +25,6 @@ CLEAN : -@erase "$(INTDIR)\snmptrapd_auth.obj" -@erase "$(INTDIR)\winservice.obj" -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\vc??.pdb" -@erase "$(INTDIR)\$(PROGNAME).pch" -@erase "..\lib\$(OUTDIR)\netsnmptrapd.lib" @@ -104,46 +34,15 @@ CLEAN : "$(INTDIR)" : if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\apps}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\libnetsnmptrapd.bsc" -BSC32_SBRS= \ - LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmptrapd.lib" +LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmptrapd.lib" $(LDFLAGS) LIB32_OBJS= \ "$(INTDIR)\snmptrapd.obj" \ "$(INTDIR)\snmptrapd_handlers.obj" \ @@ -152,11 +51,7 @@ LIB32_OBJS= \ "$(INTDIR)\winservice.obj" "..\lib\$(OUTDIR)\netsnmptrapd.lib" : "..\lib\$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - -!ENDIF + $(LIB32) $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) !IF "$(NO_EXTERNAL_DEPS)" != "1" @@ -167,36 +62,8 @@ LIB32_OBJS= \ !ENDIF !ENDIF - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\..\apps\snmptrapd.c - -"$(INTDIR)\snmptrapd.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\apps\snmptrapd_handlers.c - -"$(INTDIR)\snmptrapd_handlers.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\apps\snmptrapd_log.c - -"$(INTDIR)\snmptrapd_log.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\apps\snmptrapd_auth.c - -"$(INTDIR)\snmptrapd_auth.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\winservice.c - -"$(INTDIR)\winservice.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -!ENDIF - +"$(INTDIR)\snmptrapd.obj": ..\..\apps\snmptrapd.c "$(INTDIR)" +"$(INTDIR)\snmptrapd_auth.obj": ..\..\apps\snmptrapd_auth.c "$(INTDIR)" +"$(INTDIR)\snmptrapd_handlers.obj": ..\..\apps\snmptrapd_handlers.c "$(INTDIR)" +"$(INTDIR)\snmptrapd_log.obj": ..\..\apps\snmptrapd_log.c "$(INTDIR)" +"$(INTDIR)\winservice.obj": ..\..\snmplib\winservice.c "$(INTDIR)" diff --git a/win32/libsnmp/Makefile.in b/win32/libsnmp/Makefile.in index 98d83c8..88d2453 100644 --- a/win32/libsnmp/Makefile.in +++ b/win32/libsnmp/Makefile.in @@ -2,7 +2,10 @@ PROGNAME= CFG= OUTDIR= INTDIR= +OPENSSL= SDK= +CFLAGS= +LDFLAGS= !IF "$(OS)" == "Windows_NT" NULL= @@ -10,11 +13,16 @@ NULL= NULL=nul !ENDIF +CPP=cl.exe +CPP_PROJ=/I.. /I..\..\snmplib /I..\..\include $(CFLAGS) + ALL : "..\lib\$(OUTDIR)\netsnmp.lib" LIB32_OBJS= \ "$(INTDIR)\asn1.obj" \ + "$(INTDIR)\asprintf.obj" \ "$(INTDIR)\callback.obj" \ + "$(INTDIR)\cert_util.obj" \ "$(INTDIR)\check_varbind.obj" \ "$(INTDIR)\closedir.obj" \ "$(INTDIR)\container.obj" \ @@ -24,7 +32,9 @@ LIB32_OBJS= \ "$(INTDIR)\container_null.obj" \ "$(INTDIR)\data_list.obj" \ "$(INTDIR)\default_store.obj" \ + "$(INTDIR)\dir_utils.obj" \ "$(INTDIR)\fd_event_manager.obj" \ + "$(INTDIR)\file_utils.obj" \ "$(INTDIR)\getopt.obj" \ "$(INTDIR)\gettimeofday.obj" \ "$(INTDIR)\inet_ntop.obj" \ @@ -45,6 +55,7 @@ LIB32_OBJS= \ "$(INTDIR)\snmp-tc.obj" \ "$(INTDIR)\snmp.obj" \ "$(INTDIR)\snmpCallbackDomain.obj" \ + "$(INTDIR)\snmpIPBaseDomain.obj" \ "$(INTDIR)\snmpIPv4BaseDomain.obj" \ "$(INTDIR)\snmpSocketBaseDomain.obj" \ "$(INTDIR)\snmpTCPBaseDomain.obj" \ @@ -64,6 +75,7 @@ LIB32_OBJS= \ "$(INTDIR)\snmp_service.obj" \ "$(INTDIR)\snmp_transport.obj" \ "$(INTDIR)\snmp_version.obj" \ + "$(INTDIR)\snmptsm.obj" \ "$(INTDIR)\snmpusm.obj" \ "$(INTDIR)\snmpv3.obj" \ "$(INTDIR)\strlcat.obj" \ @@ -81,6 +93,13 @@ LIB32_OBJS=$(LIB32_OBJS)\ "$(INTDIR)\snmpTCPIPv6Domain.obj" \ "$(INTDIR)\snmpUDPIPv6Domain.obj" !ENDIF +!IF "$(OPENSSL)" == "true" +LIB32_OBJS=$(LIB32_OBJS)\ + "$(INTDIR)\snmpDTLSUDPDomain.obj" \ + "$(INTDIR)\snmpTLSBaseDomain.obj" \ + "$(INTDIR)\snmpTLSTCPDomain.obj" \ + "$(INTDIR)\snmp_openssl.obj" +!ENDIF CLEAN : -@for %f in $(LIB32_OBJS) do erase %%f @@ -89,39 +108,22 @@ CLEAN : "..\lib\$(OUTDIR)" : if not exist "..\lib\$(OUTDIR)/$(NULL)" mkdir "..\lib\$(OUTDIR)" -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -CPP=cl.exe -!IF "$(CFG)" == "release" -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ELSEIF "$(CFG)" == "debug" -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ENDIF +.SUFFIXES: .c .obj -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib}.c{$(INTDIR)}.obj:: + @if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + $(CPP) $(CPP_PROJ) $< -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib\transports}.c{$(INTDIR)}.obj:: + @if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + $(CPP) $(CPP_PROJ) $< RSC=rc.exe LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmp.lib" +LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmp.lib" $(LDFLAGS) "..\lib\$(OUTDIR)\netsnmp.lib" : "..\lib\$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< + $(LIB32) $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) !IF "$(NO_EXTERNAL_DEPS)" != "1" @@ -131,395 +133,3 @@ LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\netsnmp.lib" !MESSAGE Warning: cannot find "$(PROGNAME).dep" !ENDIF !ENDIF - - -SOURCE=..\..\snmplib\asn1.c - -"$(INTDIR)\asn1.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\callback.c - -"$(INTDIR)\callback.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\check_varbind.c - -"$(INTDIR)\check_varbind.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\closedir.c - -"$(INTDIR)\closedir.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container.c - -"$(INTDIR)\container.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_binary_array.c - -"$(INTDIR)\container_binary_array.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_iterator.c - -"$(INTDIR)\container_iterator.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_list_ssll.c - -"$(INTDIR)\container_list_ssll.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_null.c - -"$(INTDIR)\container_null.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\data_list.c - -"$(INTDIR)\data_list.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\default_store.c - -"$(INTDIR)\default_store.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\fd_event_manager.c - -"$(INTDIR)\fd_event_manager.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\getopt.c - -"$(INTDIR)\getopt.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\gettimeofday.c - -"$(INTDIR)\gettimeofday.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\inet_ntop.c - -"$(INTDIR)\inet_ntop.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\inet_pton.c - -"$(INTDIR)\inet_pton.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\int64.c - -"$(INTDIR)\int64.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\keytools.c - -"$(INTDIR)\keytools.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\large_fd_set.c - -"$(INTDIR)\large_fd_set.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\lcd_time.c - -"$(INTDIR)\lcd_time.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\md5.c - -"$(INTDIR)\md5.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\mib.c - -"$(INTDIR)\mib.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\mt_support.c - -"$(INTDIR)\mt_support.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\oid_stash.c - -"$(INTDIR)\oid_stash.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\opendir.c - -"$(INTDIR)\opendir.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\parse.c - -"$(INTDIR)\parse.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\read_config.c - -"$(INTDIR)\read_config.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\readdir.c - -"$(INTDIR)\readdir.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\scapi.c - -"$(INTDIR)\scapi.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="..\..\snmplib\snmp-tc.c" - -"$(INTDIR)\snmp-tc.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp.c - -"$(INTDIR)\snmp.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpCallbackDomain.c - -"$(INTDIR)\snmpCallbackDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpIPv4BaseDomain.c - -"$(INTDIR)\snmpIPv4BaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpIPv6BaseDomain.c - -"$(INTDIR)\snmpIPv6BaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpSocketBaseDomain.c - -"$(INTDIR)\snmpSocketBaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpTCPBaseDomain.c - -"$(INTDIR)\snmpTCPBaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpTCPDomain.c - -"$(INTDIR)\snmpTCPDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpTCPIPv6Domain.c - -"$(INTDIR)\snmpTCPIPv6Domain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPBaseDomain.c - -"$(INTDIR)\snmpUDPBaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPDomain.c - -"$(INTDIR)\snmpUDPDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPIPv4BaseDomain.c - -"$(INTDIR)\snmpUDPIPv4BaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPIPv6Domain.c - -"$(INTDIR)\snmpUDPIPv6Domain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_alarm.c - -"$(INTDIR)\snmp_alarm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_api.c - -"$(INTDIR)\snmp_api.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_auth.c - -"$(INTDIR)\snmp_auth.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_client.c - -"$(INTDIR)\snmp_client.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_debug.c - -"$(INTDIR)\snmp_debug.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_enum.c - -"$(INTDIR)\snmp_enum.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_logging.c - -"$(INTDIR)\snmp_logging.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_parse_args.c - -"$(INTDIR)\snmp_parse_args.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_secmod.c - -"$(INTDIR)\snmp_secmod.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_service.c - -"$(INTDIR)\snmp_service.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_transport.c - -"$(INTDIR)\snmp_transport.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_version.c - -"$(INTDIR)\snmp_version.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmpusm.c - -"$(INTDIR)\snmpusm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmpv3.c - -"$(INTDIR)\snmpv3.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strlcat.c - -"$(INTDIR)\strlcat.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strlcpy.c - -"$(INTDIR)\strlcpy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strtok_r.c - -"$(INTDIR)\strtok_r.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strtoull.c - -"$(INTDIR)\strtoull.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\system.c - -"$(INTDIR)\system.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\tools.c - -"$(INTDIR)\tools.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\ucd_compat.c - -"$(INTDIR)\ucd_compat.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\vacm.c - -"$(INTDIR)\vacm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\winpipe.c - -"$(INTDIR)\winpipe.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - diff --git a/win32/libsnmp/libsnmp.dsp b/win32/libsnmp/libsnmp.dsp index 2386331..d76f5be 100644 --- a/win32/libsnmp/libsnmp.dsp +++ b/win32/libsnmp/libsnmp.dsp @@ -201,6 +201,10 @@ SOURCE=..\..\snmplib\scapi.c # End Source File # Begin Source File +SOURCE="..\..\snmplib\sd-daemon.c" +# End Source File +# Begin Source File + SOURCE="..\..\snmplib\snmp-tc.c" # End Source File # Begin Source File diff --git a/win32/libsnmp_dll/Makefile.in b/win32/libsnmp_dll/Makefile.in index 0aaf41b..b069acd 100644 --- a/win32/libsnmp_dll/Makefile.in +++ b/win32/libsnmp_dll/Makefile.in @@ -2,7 +2,10 @@ PROGNAME= CFG= OUTDIR= INTDIR= +OPENSSL= SDK= +CFLAGS= +LDFLAGS= !IF "$(OS)" == "Windows_NT" NULL= @@ -10,11 +13,16 @@ NULL= NULL=nul !ENDIF +CPP=cl.exe +CPP_PROJ=/I.. /I..\..\snmplib /I..\..\include /D NETSNMP_DLL $(CFLAGS) + ALL : "..\bin\$(OUTDIR)\netsnmp.dll" LINK32_OBJS= \ "$(INTDIR)\asn1.obj" \ + "$(INTDIR)\asprintf.obj" \ "$(INTDIR)\callback.obj" \ + "$(INTDIR)\cert_util.obj" \ "$(INTDIR)\check_varbind.obj" \ "$(INTDIR)\closedir.obj" \ "$(INTDIR)\container.obj" \ @@ -24,7 +32,9 @@ LINK32_OBJS= \ "$(INTDIR)\container_null.obj" \ "$(INTDIR)\data_list.obj" \ "$(INTDIR)\default_store.obj" \ + "$(INTDIR)\dir_utils.obj" \ "$(INTDIR)\fd_event_manager.obj" \ + "$(INTDIR)\file_utils.obj" \ "$(INTDIR)\getopt.obj" \ "$(INTDIR)\gettimeofday.obj" \ "$(INTDIR)\inet_ntop.obj" \ @@ -45,6 +55,7 @@ LINK32_OBJS= \ "$(INTDIR)\snmp-tc.obj" \ "$(INTDIR)\snmp.obj" \ "$(INTDIR)\snmpCallbackDomain.obj" \ + "$(INTDIR)\snmpIPBaseDomain.obj" \ "$(INTDIR)\snmpIPv4BaseDomain.obj" \ "$(INTDIR)\snmpSocketBaseDomain.obj" \ "$(INTDIR)\snmpTCPBaseDomain.obj" \ @@ -64,6 +75,7 @@ LINK32_OBJS= \ "$(INTDIR)\snmp_service.obj" \ "$(INTDIR)\snmp_transport.obj" \ "$(INTDIR)\snmp_version.obj" \ + "$(INTDIR)\snmptsm.obj" \ "$(INTDIR)\snmpusm.obj" \ "$(INTDIR)\snmpv3.obj" \ "$(INTDIR)\strlcat.obj" \ @@ -81,6 +93,13 @@ LINK32_OBJS=$(LINK32_OBJS)\ "$(INTDIR)\snmpTCPIPv6Domain.obj" \ "$(INTDIR)\snmpUDPIPv6Domain.obj" !ENDIF +!IF "$(OPENSSL)" == "true" +LINK32_OBJS=$(LINK32_OBJS)\ + "$(INTDIR)\snmpDTLSUDPDomain.obj" \ + "$(INTDIR)\snmpTLSBaseDomain.obj" \ + "$(INTDIR)\snmpTLSTCPDomain.obj" \ + "$(INTDIR)\snmp_openssl.obj" +!ENDIF CLEAN : -@for %f in ($(LINK32_OBJS)) do erase %%f @@ -95,446 +114,27 @@ CLEAN : "..\bin\$(OUTDIR)" : if not exist "..\bin\$(OUTDIR)/$(NULL)" mkdir "..\bin\$(OUTDIR)" -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -CPP=cl.exe -!IF "$(CFG)" == "release" -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /D "NETSNMP_DLL" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ELSE -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /D "NETSNMP_DLL" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ENDIF +.SUFFIXES: .c .obj -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib}.c{$(INTDIR)}.obj:: + @if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + $(CPP) $(CPP_PROJ) $< -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib\transports}.c{$(INTDIR)}.obj:: + @if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + $(CPP) $(CPP_PROJ) $< -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 RSC=rc.exe LINK32=link.exe -!IF "$(CFG)" == "release" -LINK32_FLAGS=advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /dll /pdb:"../bin/$(OUTDIR)/netsnmp.pdb" /debug /def:".\libsnmp.def" /out:"../bin/$(OUTDIR)/netsnmp.dll" /implib:"../lib/$(OUTDIR)/netsnmp.lib" -!ELSE -LINK32_FLAGS=advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /dll /incremental:no /pdb:"../bin/$(OUTDIR)/netsnmp.pdb" /debug /def:".\libsnmp.def" /out:"../bin/$(OUTDIR)/netsnmp.dll" /implib:"../lib/$(OUTDIR)/netsnmp.lib" -!ENDIF +LINK32_FLAGS=advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /dll /pdb:"../bin/$(OUTDIR)/netsnmp.pdb" /def:".\libsnmp.def" /out:"../bin/$(OUTDIR)/netsnmp.dll" /implib:"../lib/$(OUTDIR)/netsnmp.lib" $(LDFLAGS) "..\bin\$(OUTDIR)\netsnmp.dll" : "..\bin\$(OUTDIR)" "..\lib\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "../bin/$(OUTDIR)/netsnmp.dll.manifest" \ - mt.exe -manifest "../bin/$(OUTDIR)/netsnmp.dll.manifest" -outputresource:"../bin/$(OUTDIR)/netsnmp.dll";2 -LINK32=link.exe - - + $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS) !IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("libsnmp_dll.dep") -!INCLUDE "libsnmp_dll.dep" +!IF EXISTS("$(PROGNAME).dep") +!INCLUDE "$(PROGNAME).dep" !ELSE -!MESSAGE Warning: cannot find "libsnmp_dll.dep" +!MESSAGE Warning: cannot find "$(PROGNAME).dep" !ENDIF !ENDIF - - -SOURCE=..\..\snmplib\asn1.c - -"$(INTDIR)\asn1.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\callback.c - -"$(INTDIR)\callback.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\check_varbind.c - -"$(INTDIR)\check_varbind.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\closedir.c - -"$(INTDIR)\closedir.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container.c - -"$(INTDIR)\container.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_binary_array.c - -"$(INTDIR)\container_binary_array.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_iterator.c - -"$(INTDIR)\container_iterator.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_list_ssll.c - -"$(INTDIR)\container_list_ssll.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\container_null.c - -"$(INTDIR)\container_null.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\data_list.c - -"$(INTDIR)\data_list.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\default_store.c - -"$(INTDIR)\default_store.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\fd_event_manager.c - -"$(INTDIR)\fd_event_manager.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\getopt.c - -"$(INTDIR)\getopt.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\gettimeofday.c - -"$(INTDIR)\gettimeofday.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\inet_ntop.c - -"$(INTDIR)\inet_ntop.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\inet_pton.c - -"$(INTDIR)\inet_pton.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\int64.c - -"$(INTDIR)\int64.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\keytools.c - -"$(INTDIR)\keytools.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\large_fd_set.c - -"$(INTDIR)\large_fd_set.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\lcd_time.c - -"$(INTDIR)\lcd_time.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\md5.c - -"$(INTDIR)\md5.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\mib.c - -"$(INTDIR)\mib.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\mt_support.c - -"$(INTDIR)\mt_support.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\oid_stash.c - -"$(INTDIR)\oid_stash.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\opendir.c - -"$(INTDIR)\opendir.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\parse.c - -"$(INTDIR)\parse.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\read_config.c - -"$(INTDIR)\read_config.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\readdir.c - -"$(INTDIR)\readdir.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\scapi.c - -"$(INTDIR)\scapi.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="..\..\snmplib\snmp-tc.c" - -"$(INTDIR)\snmp-tc.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp.c - -"$(INTDIR)\snmp.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpCallbackDomain.c - -"$(INTDIR)\snmpCallbackDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpIPv4BaseDomain.c - -"$(INTDIR)\snmpIPv4BaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpIPv6BaseDomain.c - -"$(INTDIR)\snmpIPv6BaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpSocketBaseDomain.c - -"$(INTDIR)\snmpSocketBaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpTCPBaseDomain.c - -"$(INTDIR)\snmpTCPBaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpTCPDomain.c - -"$(INTDIR)\snmpTCPDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpTCPIPv6Domain.c - -"$(INTDIR)\snmpTCPIPv6Domain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPBaseDomain.c - -"$(INTDIR)\snmpUDPBaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPDomain.c - -"$(INTDIR)\snmpUDPDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPIPv4BaseDomain.c - -"$(INTDIR)\snmpUDPIPv4BaseDomain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\transports\snmpUDPIPv6Domain.c - -"$(INTDIR)\snmpUDPIPv6Domain.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_alarm.c - -"$(INTDIR)\snmp_alarm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_api.c - -"$(INTDIR)\snmp_api.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_auth.c - -"$(INTDIR)\snmp_auth.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_client.c - -"$(INTDIR)\snmp_client.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_debug.c - -"$(INTDIR)\snmp_debug.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_enum.c - -"$(INTDIR)\snmp_enum.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_logging.c - -"$(INTDIR)\snmp_logging.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_parse_args.c - -"$(INTDIR)\snmp_parse_args.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_secmod.c - -"$(INTDIR)\snmp_secmod.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_service.c - -"$(INTDIR)\snmp_service.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_transport.c - -"$(INTDIR)\snmp_transport.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmp_version.c - -"$(INTDIR)\snmp_version.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmpusm.c - -"$(INTDIR)\snmpusm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\snmpv3.c - -"$(INTDIR)\snmpv3.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strlcat.c - -"$(INTDIR)\strlcat.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strlcpy.c - -"$(INTDIR)\strlcpy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strtok_r.c - -"$(INTDIR)\strtok_r.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\strtoull.c - -"$(INTDIR)\strtoull.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\system.c - -"$(INTDIR)\system.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\tools.c - -"$(INTDIR)\tools.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\ucd_compat.c - -"$(INTDIR)\ucd_compat.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\vacm.c - -"$(INTDIR)\vacm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\winpipe.c - -"$(INTDIR)\winpipe.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - diff --git a/win32/libsnmp_dll/libsnmp_dll.dsp b/win32/libsnmp_dll/libsnmp_dll.dsp index 12c0414..c673f8e 100644 --- a/win32/libsnmp_dll/libsnmp_dll.dsp +++ b/win32/libsnmp_dll/libsnmp_dll.dsp @@ -208,6 +208,10 @@ SOURCE=..\..\snmplib\scapi.c # End Source File # Begin Source File +SOURCE="..\..\snmplib\sd-daemon.c" +# End Source File +# Begin Source File + SOURCE="..\..\snmplib\snmp-tc.c" # End Source File # Begin Source File diff --git a/win32/local/mib2c.bat b/win32/local/mib2c.bat index 2b13f1b..d7809da 100644 --- a/win32/local/mib2c.bat +++ b/win32/local/mib2c.bat @@ -16,8 +16,8 @@ goto end :no_perl echo %MYPERLPROGRAM% requires Perl to run. echo . -echo A version of Perl for Windows is available from -echo http://www.activestate.com/Products/ActivePerl +echo Perl source code and instructions for how to build Perl for Windows are +echo available from https://www.cpan.org/src/. echo . echo Please install Perl and run this program again. echo . diff --git a/win32/local/snmpconf.bat b/win32/local/snmpconf.bat index f0c2496..e0bbb2b 100644 --- a/win32/local/snmpconf.bat +++ b/win32/local/snmpconf.bat @@ -16,8 +16,8 @@ goto end :no_perl echo %MYPERLPROGRAM% requires Perl to run. echo . -echo A version of Perl for Windows is available from -echo http://www.activestate.com/Products/ActivePerl +echo Perl source code and instructions for how to build Perl for Windows are +echo available from https://www.cpan.org/src/. echo . echo Please install Perl and run this program again. echo . diff --git a/win32/local/traptoemail.bat b/win32/local/traptoemail.bat index 954244f..0d38fde 100644 --- a/win32/local/traptoemail.bat +++ b/win32/local/traptoemail.bat @@ -16,8 +16,8 @@ goto end :no_perl echo %MYPERLPROGRAM% requires Perl to run. echo . -echo A version of Perl for Windows is available from -echo http://www.activestate.com/Products/ActivePerl +echo Perl source code and instructions for how to build Perl for Windows are +echo available from https://www.cpan.org/src/. echo . echo Please install Perl and run this program again. echo . diff --git a/win32/mib_module_includes.h b/win32/mib_module_includes.h index 9cb750c..f4d3c1d 100644 --- a/win32/mib_module_includes.h +++ b/win32/mib_module_includes.h @@ -61,16 +61,16 @@ #include "mibgroup/mibII/setSerialNo.h" #ifdef USING_UCD_SNMP_MODULE -#ifdef USING_UCD_SNMP_DLMOD_MODULE -#include "mibgroup/ucd-snmp/dlmod.h" -#endif +#ifdef USING_UCD_SNMP_DLMOD_MODULE +#include "mibgroup/ucd-snmp/dlmod.h" +#endif #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/disk_hw.h" #include "mibgroup/ucd-snmp/loadave.h" #include "mibgroup/ucd-snmp/extensible.h" #include "mibgroup/agent/extend.h" @@ -79,7 +79,7 @@ #include "mibgroup/ucd-snmp/proxy.h" #endif -#if HAVE_REGEX_H +#ifdef HAVE_REGEX_H #include "mibgroup/ucd-snmp/logmatch.h" #endif diff --git a/win32/mib_module_inits.h b/win32/mib_module_inits.h index f78d893..13620e3 100644 --- a/win32/mib_module_inits.h +++ b/win32/mib_module_inits.h @@ -8,7 +8,13 @@ #ifdef HAVE_WIN32_PLATFORM_SDK if (should_init("at")) init_at(); +#if 0 if (should_init("interfaces")) init_interfaces(); +#else + if (should_init("ifTable")) init_ifTable(); + if (should_init("ifXTable")) init_ifXTable(); + if (should_init("interface")) init_interface(); +#endif if (should_init("tcp")) init_tcp(); if (should_init("tcpTable")) init_tcpTable(); if (should_init("icmp")) init_icmp(); diff --git a/win32/net-snmp/agent/mib_module_config.h b/win32/net-snmp/agent/mib_module_config.h index 4978dc8..2f2e97a 100644 --- a/win32/net-snmp/agent/mib_module_config.h +++ b/win32/net-snmp/agent/mib_module_config.h @@ -53,8 +53,43 @@ /* Define if compiling with the mibII/at module files. */ #define USING_MIBII_AT_MODULE 1 +#if 0 /* Define if compiling with the mibII/interfaces module files. */ #define USING_MIBII_INTERFACES_MODULE 1 +#else +/* Define if compiling with the if-mib module files. */ +#define USING_IF_MIB_MODULE 1 + +/* Define if compiling with the if-mib/ifTable module files. */ +#define USING_IF_MIB_IFTABLE_MODULE 1 + +/* Define if compiling with the if-mib/ifXTable module files. */ +#define USING_IF_MIB_IFXTABLE_MODULE 1 + +/* Define if compiling with the if-mib/ifTable/ifTable module files. */ +#define USING_IF_MIB_IFTABLE_IFTABLE_MODULE 1 + +/* Define if compiling with the if-mib/ifXTable/ifXTable module files. */ +#define USING_IF_MIB_IFXTABLE_IFXTABLE_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 if-mib/ifTable/ifTable_interface module files. */ +#define USING_IF_MIB_IFTABLE_IFTABLE_INTERFACE_MODULE 1 + +/* Define if compiling with the if-mib/ifTable/ifTable_data_access module files. */ +#define USING_IF_MIB_IFTABLE_IFTABLE_DATA_ACCESS_MODULE 1 + +/* Define if compiling with the if-mib/ifXTable/ifXTable_interface module files. */ +#define USING_IF_MIB_IFXTABLE_IFXTABLE_INTERFACE_MODULE 1 + +/* Define if compiling with the if-mib/ifXTable/ifXTable_data_access module files. */ +#define USING_IF_MIB_IFXTABLE_IFXTABLE_DATA_ACCESS_MODULE 1 + +/* Define if compiling with the if-mib/data_access/interface_iphlpapi module files. */ +#define USING_IF_MIB_DATA_ACCESS_INTERFACE_IPHLPAPI_MODULE 1 +#endif /* Define if compiling with the mibII/snmp_mib module files. */ #define USING_MIBII_SNMP_MIB_MODULE 1 @@ -125,7 +160,7 @@ #endif /* USING_UCD_SNMP_MODULE */ -#if HAVE_REGEX_H +#ifdef HAVE_REGEX_H /* Define if compiling with the ucd-snmp/logmatch module files. */ #define USING_UCD_SNMP_LOGMATCH_MODULE 1 #endif diff --git a/win32/net-snmp/net-snmp-config.h b/win32/net-snmp/net-snmp-config.h index 70ec21e..1a0c5ad 100644 --- a/win32/net-snmp/net-snmp-config.h +++ b/win32/net-snmp/net-snmp-config.h @@ -1,1825 +1,1954 @@ -/* include/net-snmp/net-snmp-config.h.in. Generated from configure.in by autoheader. */ -/* modified by hand with care. */ - -#ifndef NET_SNMP_CONFIG_H -#define NET_SNMP_CONFIG_H - -/* _MSC_VER values - 1800 = MSVC++ 12.0 (Visual Studio 2013) - 1700 = MSVC++ 11.0 (Visual Studio 2012) - 1600 = MSVC++ 10.0 (Visual Studio 2010) - 1500 = MSVC++ 9.0 (Visual Studio 2008) - 1400 = MSVC++ 8.0 (Visual Studio 2005) - 1310 = MSVC++ 7.1 (Visual Studio 2003) - 1300 = MSVC++ 7.0 (Visual Studio 2002) - 1200 = MSVC++ 6.0 -*/ - -#ifdef _MSC_VER -/* Disable warning 4018: signed/unsigned mismatch. */ -#pragma warning (disable: 4018) -#endif - -/* Automatically set by Windows perl Configure script. - * When compiling with the MSVC workspace, this must be set manually. - * See the PACKAGE_VERSION variable in Unix /configure script -*/ -#ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "5.7.3" -#endif - -/* Define HAVE_WIN32_PLATFORM_SDK if you have: - * Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK) - * Microsoft Visual Studio.Net 2002 - * Microsoft Visual Studio.Net 2003 - */ -#define HAVE_WIN32_PLATFORM_SDK 1 - -/* Define NETSNMP_ENABLE_IPV6 to enable IPv6. IPv6 is only available on - * Windows XP and higher. */ -#define NETSNMP_ENABLE_IPV6 1 - -/* Only use Windows API functions available on Windows 2000 SP4 or later. - * We need at least SP1 for some IPv6 defines in ws2ipdef.h - */ -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x600 /*_WIN32_WINNT_WIN6*/ -#else -#if _WIN32_WINNT < 0x501 -#error _WIN32_WINNT is too low - it should be set to at least 0x501. -#endif -#endif - -#define INSTALL_BASE "c:/usr" - -/* config.h: a general config file */ - -/* 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 "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;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 NETSNMP_DEFAULT_MIBDIRS INSTALL_BASE ## "/share/snmp/mibs" - -/* default mib files to load, specified by path. */ -/* #undef NETSNMP_DEFAULT_MIBFILES */ - -/* should we compile to use special opaque types: float, double, - counter64, i64, ui64, union? */ -#define NETSNMP_WITH_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 NETSNMP_ENABLE_SCAPI_AUTHPRIV 1 - -/* define if you are using the MD5 code ...*/ -/* #undef NETSNMP_USE_INTERNAL_MD5 */ - -/* define if you are using the codeS11 library ...*/ -/* #undef NETSNMP_USE_PKCS11 */ - -/* add in recent CMU library extensions (not complete) */ -/* #undef CMU_COMPATIBLE */ - -/* add in recent resource lock functions (not complete) */ -/* #undef NETSNMP_REENTRANT */ - -/* 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 */ - -/* NETSNMP_PERSISTENT_DIRECTORY: If defined, the library is capabile of saving - persisant information to this directory in the form of configuration - lines: NETSNMP_PERSISTENT_DIRECTORY/NAME.persistent.conf */ -#define NETSNMP_PERSISTENT_DIRECTORY INSTALL_BASE ## "/snmp/persist" - -/* NETSNMP_PERSISTENT_MASK: the umask permissions to set up persistent files with */ -/* #undef NETSNMP_PERSISTENT_MASK -- no win32 umask */ - -/* NETSNMP_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 - -/* NETSNMP_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 if you are embedding perl in the main agent */ -/* #undef NETSNMP_EMBEDDED_PERL */ - -#if notused -/* define the system type include file here */ -#define NETSNMP_SYSTEM_INCLUDE_FILE - -/* define the machine (cpu) type include file here */ -#define NETSNMP_MACHINE_INCLUDE_FILE -#endif - -/* SNMPLIBDIR contains important files */ - -#define SNMPLIBPATH INSTALL_BASE ## "/lib" -#define SNMPSHAREPATH INSTALL_BASE ## "/share/snmp" -#define SNMPCONFPATH INSTALL_BASE ## "/etc/snmp" -#define SNMPDLMODPATH INSTALL_BASE ## "/lib/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) */ -/* #undef NETSNMP_LOGFILE */ - -/* default system contact */ -#define NETSNMP_SYS_CONTACT "unknown" - -/* system location */ -#define NETSNMP_SYS_LOC "unknown" - -/* Use libwrap to handle allow/deny hosts? */ -/* #undef NETSNMP_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 "unknown" - -/* 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" - -/* Where is the uname command */ -#define UNAMEPROG "/bin/uname" - -/* pattern for temporary file names */ -#define NETSNMP_TEMP_FILE_PATTERN INSTALL_BASE ## "/temp/snmpdXXXXXX" - -/* testing code sections. */ -/* #undef NETSNMP_ENABLE_TESTING_CODE */ - -/* If you don't have root access don't exit upon kmem errors */ -/* #undef NETSNMP_NO_ROOT_ACCESS */ - -/* If we don't want to use kmem. */ -/* #undef NETSNMP_NO_KMEM_USAGE */ - -/* If you don't want the agent to report on variables it doesn't have data for */ -#define NETSNMP_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 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 SNMPv1 code should not be included */ -/* #undef NETSNMP_DISABLE_SNMPV1 */ - -/* Define if SNMPv2c code should not be included */ -/* #undef NETSNMP_DISABLE_SNMPV2C */ - -/* 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. */ -/* #undef HAVE_ALLOCA */ - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ASM_PAGE_H */ - -/* Define to 1 if you have the `cgetnext' function. */ -/* #undef HAVE_CGETNEXT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDBG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DIRECT_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the `dlopen' function. */ -/* #undef HAVE_DLOPEN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ERR_H */ - -/* Define to 1 if you have the `eval_pv' function. */ -/* #undef HAVE_EVAL_PV */ - -/* Define to 1 if you have the `execv' function. */ -/* #undef HAVE_EXECV */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FSTAB_H */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getfsstat' function. */ -/* #undef HAVE_GETFSSTAT */ - -/* Define to 1 if you have the `getgrnam' function. */ -/* #undef HAVE_GETGRNAM */ - -/* 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. */ -/* #undef HAVE_GETLOADAVG */ - -/* Define to 1 if you have the `getmntent' function. */ -/* #undef HAVE_GETMNTENT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getpid' function. */ -#define HAVE_GETPID 1 - -/* Define to 1 if you have the `getpwnam' function. */ -/* #undef HAVE_GETPWNAM */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GRP_H */ - -/* Define to 1 if you have the `if_freenameindex' function. */ -/* #undef HAVE_IF_FREENAMEINDEX */ - -/* Define to 1 if you have the `if_nameindex' function. */ -/* #undef HAVE_IF_NAMEINDEX */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INET_MIB2_H */ - -#ifdef HAVE_WIN32_PLATFORM_SDK -/* Define to 1 if you have the header file. */ -#define HAVE_IPHLPAPI_H -#endif - -/* Define to 1 if the system has the 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 */ -#undef HAVE_U_INT32_T - -/* 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 */ -#undef HAVE_U_INT64_T - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IOCTLS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_IO_H 1 - -/* 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). */ -/* #undef HAVE_LIBCRYPTO */ - -/* 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 `m' library (-lm). */ -/* #undef HAVE_LIBM */ - -/* 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 `sensors' library (-lsensors). */ -/* #undef HAVE_LIBSENSORS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LINUX_HDREG_H */ - -/* 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. */ -/* #undef HAVE_LRAND48 */ - -/* 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 you have the `mkstemp' function. */ -/* #undef HAVE_MKSTEMP */ - -/* Define to 1 if you have the `mktime' function. */ -/* #undef HAVE_MKTIME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MNTENT_H */ - -/* 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. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_PCB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_ND6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_FSM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_TIMER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_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. */ -/* #undef HAVE_NETINET_IF_ETHER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_SYSTM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IP6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IP_ICMP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_ICMP6_H */ - -/* 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. */ -/* #undef HAVE_NETINET_TCP_H */ - -/* 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. */ -/* #undef HAVE_NETINET_UDP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_UDP_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETIPX_IPX_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_DL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_IF_H */ - -/* 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. */ -/* #undef HAVE_NET_ROUTE_H */ - -/* 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. */ -/* #undef HAVE_OPENSSL_AES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_DES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_DH_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_EVP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_HMAC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OSRELDATE_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 if you have header file. (Win32-getpid) */ -#define HAVE_PROCESS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTHREAD_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PWD_H */ - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `regcomp' function. */ -/* #undef HAVE_REGCOMP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_REGEX_H */ - -/* Define to 1 if you have the `rpmGetPath' function. */ -/* #undef HAVE_RPMGETPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPMIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RPM_RPMIO_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. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setgid' function. */ -/* #undef HAVE_SETGID */ - -/* Define to 1 if you have the `setgroups' function. */ -/* #undef HAVE_SETGROUPS */ - -/* Define to 1 if you have the `setitimer' function. */ -/* #undef HAVE_SETITIMER */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmntent' function. */ -/* #undef HAVE_SETMNTENT */ - -/* Define to 1 if you have the `setsid' function. */ -/* #undef HAVE_SETSID */ - -/* Define to 1 if you have the `setuid' function. */ -/* #undef HAVE_SETUID */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SGTTY_H */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigalrm' function. */ -/* #undef HAVE_SIGALRM */ - -/* Define to 1 if you have the `sigblock' function. */ -/* #undef HAVE_SIGBLOCK */ - -/* Define to 1 if you have the `sighold' function. */ -/* #undef HAVE_SIGHOLD */ - -/* Define to 1 if you have the `signal' function. */ -/* #undef HAVE_SIGNAL */ - -/* Define to 1 if you have the `sigset' function. */ -/* #undef HAVE_SIGSET */ - -/* 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. */ -/* #undef HAVE_STATFS */ - -/* Define to 1 if you have the `statvfs' function. */ -/* #undef HAVE_STATVFS */ - -/* Define to 1 if you have the header file. */ -#ifdef __MINGW32__ -#define HAVE_STDINT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stime' function. */ -/* #undef HAVE_STIME */ - -/* Define to 1 if you have the `strcasestr' function. */ -/* #undef HAVE_STRCASESTR */ - -/* 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. */ -/* #undef HAVE_STRINGS_H */ - -/* 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. */ -/* #undef HAVE_STRNCASECMP */ - -/* 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 header file. */ -/* #undef HAVE_SYSLOG_H */ - -/* Define to 1 if you have the `system' function. */ -#define HAVE_SYSTEM 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* 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. */ -/* #undef HAVE_SYS_FILE_H */ - -/* 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. */ -/* #undef HAVE_SYS_IOCTL_H */ - -/* 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. */ -/* #undef HAVE_SYS_MOUNT_H */ - -/* 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. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* 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. */ -/* #undef HAVE_SYS_QUEUE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKETVAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATVFS_H */ - -/* 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. */ -/* #undef HAVE_SYS_SWAP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSCTL_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_TCPIPSTATS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_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. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_USER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UTSNAME_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VFS_H */ - -/* 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. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define to 1 if you have the `tcgetattr' function. */ -/* #undef HAVE_TCGETATTR */ - -/* 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 you have the `uname' function. */ -/* #undef HAVE_UNAME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the `usleep' function. */ -/* #undef HAVE_USLEEP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTMPX_H */ - -/* 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_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. */ -#define HAVE_WINSOCK_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Set if IP_PKTINFO is usable */ -#define HAVE_IP_PKTINFO 1 - -/* 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. */ -/* #undef PACKAGE_BUGREPORT */ - -/* 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. */ -/* #undef PACKAGE_STRING */ - -/* Define to the one symbol short name of this package. */ -#ifndef PACKAGE_TARNAME -#define PACKAGE_TARNAME "net-snmp" -#endif - -/* Define to the version of this package. */ -/* #undef PACKAGE_VERSION */ - -/* 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 `intmax_t', as computed by sizeof. */ -#define SIZEOF_INTMAX_T 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 . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* 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 as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ -#ifndef PHP_WIN32 -#define inline __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 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 rtentry; - -/* Use BSD 4.4 routing table entries? */ -/* #undef RTENTRY_4_4 */ - -/* Does struct sigaction have a sa_sigaction field? */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Does struct sockaddr have a sa_len field? */ -/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ - -/* Does struct sockaddr have a sa_family2 field? */ -/* #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 */ - -/* Does struct in6_addr have a s6_un.sa6_ladd field? */ -/* #undef HAVE_STRUCT_IN6_ADDR_S6_UN_SA6_LADDR */ - -/* msghdr.msg_control */ -/* #undef HAVE_STRUCT_MSGHDR_MSG_CONTROL */ - -/* msghdr.msg_flags */ -/* #undef HAVE_STRUCT_MSGHDR_MSG_FLAGS */ - -/* rtentry structure tests */ -/* #undef RTENTRY_RT_NEXT */ -/* #undef HAVE_STRUCT_RTENTRY_RT_DST */ -/* #undef HAVE_STRUCT_RTENTRY_RT_UNIT */ -/* #undef HAVE_STRUCT_RTENTRY_RT_USE */ -/* #undef HAVE_STRUCT_RTENTRY_RT_REFCNT */ -/* #undef HAVE_STRUCT_RTENTRY_RT_HASH */ - -/* ifnet structure tests */ -/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE */ -/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE */ -/* #undef HAVE_STRUCT_IFNET_IF_SPEED */ -/* #undef HAVE_STRUCT_IFNET_IF_TYPE */ -/* #undef HAVE_STRUCT_IFNET_IF_IMCASTS */ -/* #undef HAVE_STRUCT_IFNET_IF_IQDROPS */ -/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC */ -/* #undef HAVE_STRUCT_IFNET_IF_NOPROTO */ -/* #undef HAVE_STRUCT_IFNET_IF_OMCASTS */ -/* #undef HAVE_STRUCT_IFNET_IF_XNAME */ -/* #undef HAVE_STRUCT_IFNET_IF_OBYTES */ -/* #undef HAVE_STRUCT_IFNET_IF_IBYTES */ -/* #undef HAVE_STRUCT_IFNET_IF_ADDRLIST */ - -/* tcpstat.tcps_rcvmemdrop */ -/* #undef HAVE_STRUCT_TCPSTAT_TCPS_RCVMEMDROP */ - -/* udpstat.udps_discard */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD */ - -/* udpstat.udps_discard */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT */ - -/* udpstat.udps_discard */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST */ - -/* udpstat.udps_discard */ -/* #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK */ - -/* arphd.at_next */ -/* #undef HAVE_STRUCT_ARPHD_AT_NEXT */ - -/* ifaddr.ifa_next */ -/* #undef HAVE_STRUCT_IFADDR_IFA_NEXT */ - -/* ifnet.if_mtu */ -/* #undef HAVE_STRUCT_IFNET_IF_MTU */ - -/* swdevt.sw_nblksenabled */ -/* #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED */ - -/* nlist.n_value */ -/* #undef HAVE_STRUCT_NLIST_N_VALUE */ - -/* ipstat structure tests */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS */ -/* #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED */ - -/* vfsstat.f_frsize */ -/* #undef HAVE_STRUCT_STATVFS_F_FRSIZE */ - -/* vfsstat.f_files */ -/* #undef HAVE_STRUCT_STATVFS_F_FILES */ - -/* statfs inode structure tests*/ -/* #undef HAVE_STRUCT_STATFS_F_FILES */ -/* #undef HAVE_STRUCT_STATFS_F_FFREE */ -/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */ - -/* des_ks_struct.weak_key */ -/* #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY */ - -/* ifnet needs to have _KERNEL defined */ -/* #undef IFNET_NEEDS_KERNEL */ - -/* sysctl works to get boottime, etc... */ -/* #undef NETSNMP_CAN_USE_SYSCTL */ - -/* type check for in_addr_t */ -/* #undef in_addr_t */ - -/* define if SIOCGIFADDR exists in sys/ioctl.h */ -/* #undef SYS_IOCTL_H_HAS_SIOCGIFADDR */ - -/* 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 NETSNMP_AGENTID above. IE, the resulting - value returned by a query to sysObjectID is - EXTENSIBLEMIB.NETSNMP_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_UNKNOWNID 255 - -#ifdef hpux9 -#define OSTYPE NETSNMP_HPUX9ID -#endif -#ifdef hpux10 -#define OSTYPE NETSNMP_HPUX10ID -#endif -#ifdef hpux11 -#define OSTYPE NETSNMP_HPUX11ID -#endif -#ifdef sunos4 -#define OSTYPE NETSNMP_SUNOS4ID -#endif -#ifdef solaris2 -#define OSTYPE NETSNMP_SOLARISID -#endif -#if defined(osf3) || defined(osf4) || defined(osf5) -#define OSTYPE NETSNMP_OSFID -#endif -#ifdef ultrix4 -#define OSTYPE NETSNMP_ULTRIXID -#endif -#ifdef netbsd1 -#define OSTYPE NETSNMP_NETBSD1ID -#endif -#if defined(__FreeBSD__) -#define OSTYPE NETSNMP_FREEBSDID -#endif -#if defined(irix6) || defined(irix5) -#define OSTYPE NETSNMP_IRIXID -#endif -#ifdef linux -#define OSTYPE NETSNMP_LINUXID -#endif -#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4) -#define OSTYPE NETSNMP_BSDIID -#endif -#ifdef openbsd2 -#define OSTYPE NETSNMP_OPENBSDID -#endif -#ifdef WIN32 -#define OSTYPE NETSNMP_WIN32ID -#endif -/* unknown */ -#ifndef OSTYPE -#define 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,OSTYPE -#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.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 - -/* 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 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 (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 NETSNMP_DEFDISKMINIMUMSPACE 100000 - -#define NETSNMP_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 NETSNMP_MAXREADCOUNT 100 /* max times to loop reading output from execs. */ - -/* The original CMU code had this hardcoded as = 1 */ -#define NETSNMP_SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */ - -/* How long to wait before restarting the agent after a snmpset to - EXTENSIBLEMIB.NETSNMP_VERSIONMIBNUM.VERRESTARTAGENT. This is - necessary to finish the snmpset reply before restarting. */ -#define NETSNMP_RESTARTSLEEP 5 - -/* Number of community strings to store */ -#define NETSNMP_NUM_COMMUNITIES 5 - -/* UNdefine to allow specifying zero-length community string */ -/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */ - -#define NETSNMP_LASTFIELD -1 /* internal define */ - -/* configure options specified */ -#define NETSNMP_CONFIGURE_OPTIONS "" - -/* got socklen_t? */ -#ifdef HAVE_WIN32_PLATFORM_SDK -#define HAVE_SOCKLEN_T 1 -#endif - -/* got in_addr_t? */ -/* #undef HAVE_IN_ADDR_T */ - -#ifdef __MINGW32__ -/* got ssize_t? */ -# define HAVE_SSIZE_T -#elif defined(_MSC_VER) -# ifdef _M_X64 -typedef __int64 ssize_t; -# else -typedef __int32 ssize_t; -# endif -#endif - -/* If you have openssl 0.9.7 or above, you likely have AES support. */ -#define NETSNMP_USE_OPENSSL 1 - -#ifdef NETSNMP_USE_OPENSSL - -/* 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_AES_H 1 - -/* Define to 1 if you have the `EVP_MD_CTX_create' function. */ -#define HAVE_EVP_MD_CTX_CREATE 1 - -/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ -#define HAVE_EVP_MD_CTX_DESTROY 1 - -/* Define to 1 if you have the `AES_cfb128_encrypt' function. */ -#define HAVE_AES_CFB128_ENCRYPT 1 - -#if defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT) -#define HAVE_AES 1 -#endif - -#else /* ! NETSNMP_USE_OPENSSL */ - -/* define if you are using the MD5 code ...*/ -#define NETSNMP_USE_INTERNAL_MD5 1 - -#endif /* ! NETSNMP_USE_OPENSSL */ - - -/* 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 gethostbyaddr */ -#define HAVE_GETHOSTBYADDR 1 - -/* printing system */ -/* #undef HAVE_LPSTAT */ -/* #undef LPSTAT_PATH */ -/* #undef HAVE_PRINTCAP */ - -/* 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. */ -/* #undef NETSNMP_TRANSPORT_UNIX_DOMAIN */ - -/* 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 */ - -/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ -/* This is defined if support for the UDP/IPv6 transport domain is - available. */ -/* #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ - -/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ -/* 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. */ -/* #undef NETSNMP_TRANSPORT_ALIAS_DOMAIN */ - -/* 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 we're using the new MIT crypto API */ -/* #undef NETSNMP_USE_KERBEROS_MIT */ - -/* define if you want to build with reentrant/threaded code (incomplete)*/ -/* #undef NETSNMP_REENTRANT */ - -/* 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_version_require(x) -#define config_warning(x) -#define config_error(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) -#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; } - * - */ -/* - * Win32 needs extern for inline function declarations in headers. - * See MS tech note Q123768: - * http://support.microsoft.com/default.aspx?scid=kb;EN-US;123768 - */ -#define NETSNMP_INLINE extern inline -#define NETSNMP_STATIC_INLINE static inline -#define NETSNMP_ENABLE_INLINE 1 - -#if notused -#include NETSNMP_SYSTEM_INCLUDE_FILE -#include NETSNMP_MACHINE_INCLUDE_FILE -#endif - -#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) -# define NETSNMP_USE_INLINE 1 -#else -# undef NETSNMP_INLINE -# define NETSNMP_INLINE -# undef NETSNMP_STATIC_INLINE -# define NETSNMP_STATIC_INLINE static -#endif - -#ifdef WIN32 - -#ifndef __MINGW32__ -typedef unsigned short mode_t; -#endif -#ifndef HAVE_STDINT_H -typedef unsigned char uint8_t; -typedef char int8_t; -typedef unsigned __int16 uint16_t; -typedef __int16 int16_t; -typedef unsigned __int32 uint32_t; -typedef __int32 int32_t; -typedef unsigned __int64 uint64_t; -typedef __int64 int64_t; -typedef unsigned __int64 uintmax_t; -typedef __int64 intmax_t; -#else /* HAVE_STDINT_H */ -#include -#endif /* HAVE_STDINT_H */ - - -/* (u)intptr_t should only be needed for MSVC 6 32-bit. */ -/* SDK has it for 64-bit and newer MSVC should also have it in stddef.h. */ -#ifndef _INTPTR_T_DEFINED -#ifdef _M_X64 -typedef __int64 intptr_t; -#else -typedef int intptr_t; -#endif -#define _INTPTR_T_DEFINED -#endif - -#ifndef _UINTPTR_T_DEFINED -#ifdef _M_X64 -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif - -#ifndef __cplusplus -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4804) // '-' : unsafe use of type 'bool' in operation -#endif -enum { - netsnmp_compile_time_uintptr_t_size_check - = sizeof(struct netsnmp_compile_time_uintptr_t_size_check_s { int:-!(sizeof(uintptr_t) == sizeof(void*)); }) -}; -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#endif - -/* Define if you have the closesocket function. */ -#define HAVE_CLOSESOCKET 1 - -/* Define if you have raise() instead of alarm() */ -#define HAVE_RAISE 1 - -/* define to 1 if you do not want to set global snmp_errno */ -#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1 - -/* Defining vsnprintf is not necessary for MSVC 2008 or later */ -#if defined(_MSC_VER) && _MSC_VER < 1500 -#define vsnprintf _vsnprintf -#endif -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1600 -#define EADDRINUSE WSAEADDRINUSE -#endif - -/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL */ -/* #undef NETSNMP_USE_DLL */ - -#if defined(NETSNMP_DLL) && !defined(NETSNMP_USE_DLL) -#error NETSNMP_USE_DLL must be defined when building libsnmp as a DLL. -#endif - -/* - * DLL decoration, if used at all, must be consistent. - * This is why NETSNMP_IMPORT is really an export decoration - * when it is encountered in a header file that is included - * during the compilation of a library source file. - * NETSNMP_DLL is set by the MSVC libsnmp_dll project - * in order to signal that the library sources are being compiled. - * Not defining NETSNMP_USE_DLL ignores the preceding, and renders - * the NETSNMP_IMPORT definitions harmless. - */ - -#ifdef NETSNMP_USE_DLL - #ifdef NETSNMP_DLL - #if defined(_MSC_VER) - #define NETSNMP_IMPORT __declspec(dllexport) - #endif - #else - #if defined(_MSC_VER) - #define NETSNMP_IMPORT __declspec(dllimport) - #endif - #endif /* NETSNMP_DLL */ -#endif /* NETSNMP_USE_DLL */ - -/* MSVC OpenSSL linker settings. */ -#if defined(_MSC_VER) -# if defined(NETSNMP_USE_OPENSSL) -# pragma comment(lib, "libssl.lib") -# pragma comment(lib, "libcrypto.lib") -# pragma comment(lib, "gdi32.lib") -# pragma comment(lib, "user32.lib") -# pragma comment(lib, "advapi32.lib") -# endif -#endif - -#endif /* WIN32 */ - -#ifndef NETSNMP_IMPORT -# define NETSNMP_IMPORT extern -#endif - -#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE) -#define NETSNMP_CAN_USE_NLIST -#endif - -#if HAVE_DMALLOC_H -#define DMALLOC_FUNC_CHECK -#endif - -/* #undef NETSNMP_ENABLE_LOCAL_SMUX */ - -/* define if agentx transport is to use domain sockets only */ -/* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */ - -#ifndef LOG_DAEMON -#define LOG_DAEMON (3<<3) /* system daemons */ -#endif - -#if UCD_COMPATIBLE -/* old and in the way */ -#define EXTENSIBLEMIB NETSNMP_UCDAVIS_MIB -#endif - -#ifdef _MSC_VER -/* Windows Vista and higher have inet_ntop but older Windows does not. - * We'll use the Net-SNMP version instead. */ -#undef HAVE_INET_NTOP -#undef HAVE_INET_PTON - -/* IPv6 transports */ -#ifdef NETSNMP_ENABLE_IPV6 - #define NETSNMP_TRANSPORT_TCPIPV6_DOMAIN 1 - #define NETSNMP_TRANSPORT_UDPIPV6_DOMAIN 1 - #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 -#else - #undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN - #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN -#endif -#endif - -/* - * Although if_nametoindex() is available on Windows Vista, Windows Server - * 2008 and later in iphlpapi.dll, do not link with if_nametoindex() such - * that the Net-SNMP executable can be started on earlier Windows versions. - */ -#undef HAVE_IF_NAMETOINDEX - -#ifndef NI_MAXHOST -#define NI_MAXHOST 1025 -#endif - -/* Define to 1 if you have the `strtoull' function. */ -#if _MSC_VER >= 1800 -#define HAVE_STRTOULL -#else -/* #undef HAVE_STRTOULL */ -#endif - -/* - * Module configuration and control starts here. - * - * Some of the defines herein are used to control - * groups of modules. The ones that have "CFG" - * are used especially to control the include files - * seen in {agent,mib}_module_includes.h, and the init entries - * which are invoked in {agent,mib}_module_inits.h. - * - * To disable a group, uncomment the associated define. - */ - -/* CFG Define if compiling with the ucd_snmp module files. */ -#define USING_UCD_SNMP_MODULE 1 - -/* CFG Define if compiling with the agentx module files. */ -#define USING_AGENTX_MODULE 1 - -/* CFG Define if compiling with the host module files. */ -/* #undef USING_HOST_MODULE */ - -/* CFG Define if compiling with the Rmon module files. */ -/* #undef USING_RMON_MODULE */ - -/* CFG Define if compiling with the disman/event-mib module files. */ -#define USING_DISMAN_EVENT_MIB_MODULE 1 - -/* CFG Define if compiling with the smux module files. */ -/* #undef USING_SMUX_MODULE */ - -/* Define if compiling with the winExtDLL module. */ -/* #undef USING_WINEXTDLL_MODULE */ - -/* - * Module configuration and control ends here. - */ -#define UDP_ADDRESSES_IN_HOST_ORDER 1 - -/* Timeout in milliseconds for Win32 function WaitForSingleObject. - Used by agent pass. */ -#define NETSNMP_TIMEOUT_WAITFORSINGLEOBJECT 5000 - -#ifdef HAVE_WIN32_PLATFORM_SDK -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -#endif - -/* Size prefix to use to printf a uint32_t */ -#define NETSNMP_PRI32 "" - -#ifdef _MSC_VER -#ifdef _WIN64 -#define NETSNMP_PRIz "I64" -#else -#define NETSNMP_PRIz "" -#endif -#endif - -#endif /* NET_SNMP_CONFIG_H */ - +/* include/net-snmp/net-snmp-config.h.in. Generated from configure.in by autoheader. */ +/* modified by hand with care. */ + +#ifndef NET_SNMP_CONFIG_H +#define NET_SNMP_CONFIG_H + +/* _MSC_VER values + 1900 = MSCV++ 14.0 (Visual Studio 2015) + 1800 = MSVC++ 12.0 (Visual Studio 2013) + 1700 = MSVC++ 11.0 (Visual Studio 2012) + 1600 = MSVC++ 10.0 (Visual Studio 2010) + 1500 = MSVC++ 9.0 (Visual Studio 2008) + 1400 = MSVC++ 8.0 (Visual Studio 2005) + 1310 = MSVC++ 7.1 (Visual Studio 2003) + 1300 = MSVC++ 7.0 (Visual Studio 2002) + 1200 = MSVC++ 6.0 +*/ + +#ifdef _MSC_VER +/* Disable warning 4018: signed/unsigned mismatch. */ +#pragma warning (disable: 4018) +#endif + +/* Automatically set by Windows perl Configure script. + * When compiling with the MSVC workspace, this must be set manually. + * See the PACKAGE_VERSION variable in Unix /configure script +*/ +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION "unknown" +#endif + +/* Define HAVE_WIN32_PLATFORM_SDK if you have: + * Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK) + * Microsoft Visual Studio.Net 2002 + * Microsoft Visual Studio.Net 2003 + */ +#define HAVE_WIN32_PLATFORM_SDK 1 + +/* Define NETSNMP_ENABLE_IPV6 to enable IPv6. IPv6 is only available on + * Windows XP and higher. */ +/* #undef NETSNMP_ENABLE_IPV6 */ + +/* Only use Windows API functions available on Windows 2000 SP4 or later. + * We need at least SP1 for some IPv6 defines in ws2ipdef.h + */ +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x600 /*_WIN32_WINNT_WIN6*/ +#else +#if _WIN32_WINNT < 0x501 +#error _WIN32_WINNT is too low - it should be set to at least 0x501. +#endif +#endif + +#define INSTALL_BASE "c:/usr" + +/* config.h: a general config file */ + +/* 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 "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;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 NETSNMP_DEFAULT_MIBDIRS INSTALL_BASE ## "/share/snmp/mibs" + +/* default mib files to load, specified by path. */ +/* #undef NETSNMP_DEFAULT_MIBFILES */ + +/* should we compile to use special opaque types: float, double, + counter64, i64, ui64, union? */ +#define NETSNMP_WITH_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 NETSNMP_ENABLE_SCAPI_AUTHPRIV 1 + +/* define if you are using the MD5 code ...*/ +/* #undef NETSNMP_USE_INTERNAL_MD5 */ + +/* define if you are using the codeS11 library ...*/ +/* #undef NETSNMP_USE_PKCS11 */ + +/* Used to make the compiler issue a warning about deprecated functions and + variables */ +#define NETSNMP_ATTRIBUTE_DEPRECATED + +/* Used to suppress compiler warnings about unused functions and variables */ +#define NETSNMP_ATTRIBUTE_UNUSED + +/* add in recent CMU library extensions (not complete) */ +/* #undef CMU_COMPATIBLE */ + +/* add in recent resource lock functions (not complete) */ +/* #undef NETSNMP_REENTRANT */ + +/* 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 */ + +/* NETSNMP_PERSISTENT_DIRECTORY: If defined, the library is capabile of saving + persisant information to this directory in the form of configuration + lines: NETSNMP_PERSISTENT_DIRECTORY/NAME.persistent.conf */ +#define NETSNMP_PERSISTENT_DIRECTORY INSTALL_BASE ## "/snmp/persist" + +/* NETSNMP_PERSISTENT_MASK: the umask permissions to set up persistent files with */ +/* #undef NETSNMP_PERSISTENT_MASK -- no win32 umask */ + +/* NETSNMP_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 + +/* NETSNMP_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 if you are embedding perl in the main agent */ +/* #undef NETSNMP_EMBEDDED_PERL */ + +#if notused +/* define the system type include file here */ +#define NETSNMP_SYSTEM_INCLUDE_FILE + +/* define the machine (cpu) type include file here */ +#define NETSNMP_MACHINE_INCLUDE_FILE +#endif + +/* SNMPLIBDIR contains important files */ + +#define SNMPLIBPATH INSTALL_BASE ## "/lib" +#define SNMPSHAREPATH INSTALL_BASE ## "/share/snmp" +#define SNMPCONFPATH INSTALL_BASE ## "/etc/snmp" +#define SNMPDLMODPATH INSTALL_BASE ## "/lib/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) */ +/* #undef NETSNMP_LOGFILE */ + +/* default system contact */ +#define NETSNMP_SYS_CONTACT "unknown" + +/* system location */ +#define NETSNMP_SYS_LOC "unknown" + +/* Use libwrap to handle allow/deny hosts? */ +/* #undef NETSNMP_USE_LIBWRAP */ + +/* Define if _beginthreadex() is defined in */ +#define HAVE__BEGINTHREADEX 1 + +/* Define if _cputs() is defined in */ +#define HAVE__CPUTS 1 + +/* Define if _getch() is defined in */ +#define HAVE__GETCH 1 + +/* Define if _get_osfhandle() is defined in */ +#define HAVE__GET_OSFHANDLE 1 + +/* Define if _open_osfhandle() is defined in */ +#define HAVE__OPEN_OSFHANDLE 1 + +/* location of UNIX kernel */ +#define KERNEL_LOC "unknown" + +/* location of mount table list */ +#define ETC_MNTTAB "unknown" + +/* 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" + +/* Where is the uname command */ +#define UNAMEPROG "/bin/uname" + +/* pattern for temporary file names */ +#define NETSNMP_TEMP_FILE_PATTERN INSTALL_BASE ## "/temp/snmpdXXXXXX" + +/* testing code sections. */ +/* #undef NETSNMP_ENABLE_TESTING_CODE */ + +/* If you don't have root access don't exit upon kmem errors */ +/* #undef NETSNMP_NO_ROOT_ACCESS */ + +/* If we don't want to use kmem. */ +/* #undef NETSNMP_NO_KMEM_USAGE */ + +/* Should evaluate to the name of the current function if defined */ +#define NETSNMP_FUNCTION __FUNCTION__ + +/* If you don't want the agent to report on variables it doesn't have data for */ +#define NETSNMP_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 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 SNMPv1 code should not be included */ +/* #undef NETSNMP_DISABLE_SNMPV1 */ + +/* Define if SNMPv2c code should not be included */ +/* #undef NETSNMP_DISABLE_SNMPV2C */ + +/* Define if AES-192/AES-256 encryption should be supported */ +/* #undef NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ + +/* 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. */ +/* #undef HAVE_ALLOCA */ + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARPA_INET_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_PAGE_H */ + +/* Define to 1 if you have the `cgetnext' function. */ +/* #undef HAVE_CGETNEXT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CRTDBG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRECT_H 1 + +/* Define to 1 if you have the `DH_get0_key' function. */ +#define HAVE_DH_GET0_KEY 1 + +/* Define to 1 if you have the `DH_get0_pqg' function. */ +#define HAVE_DH_GET0_PQG 1 + +/* Define to 1 if you have the `X509_get_signature_nid' function. */ +#define HAVE_X509_GET_SIGNATURE_NID 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_data' function. */ +#define HAVE_X509_NAME_ENTRY_GET_DATA 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_object' function. */ +#define HAVE_X509_NAME_ENTRY_GET_OBJECT 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_DIRENT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `dlopen' function. */ +/* #undef HAVE_DLOPEN */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ERR_H */ + +/* Define to 1 if you have the `eval_pv' function. */ +/* #undef HAVE_EVAL_PV */ + +/* Define to 1 if you have the `execv' function. */ +/* #undef HAVE_EXECV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +/* #undef HAVE_FORK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FSTAB_H */ + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getdtablesize' function. */ +/* #undef HAVE_GETDTABLESIZE */ + +/* Define to 1 if you have the `getfsstat' function. */ +/* #undef HAVE_GETFSSTAT */ + +/* Define to 1 if you have the `getgrnam' function. */ +/* #undef HAVE_GETGRNAM */ + +/* 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. */ +/* #undef HAVE_GETLOADAVG */ + +/* Define to 1 if you have the `getmntent' function. */ +/* #undef HAVE_GETMNTENT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GETOPT_H */ + +/* Define to 1 if you have the `getpagesize' function. */ +/* #undef HAVE_GETPAGESIZE */ + +/* Define to 1 if you have the `getpid' function. */ +#define HAVE_GETPID 1 + +/* Define to 1 if you have the `getpwnam' function. */ +/* #undef HAVE_GETPWNAM */ + +/* Define to 1 if you have the `gettimeofday' function. */ +/* #undef HAVE_GETTIMEOFDAY */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GRP_H */ + +/* Define to 1 if you have the `if_freenameindex' function. */ +/* #undef HAVE_IF_FREENAMEINDEX */ + +/* Define to 1 if you have the `if_nameindex' function. */ +/* #undef HAVE_IF_NAMEINDEX */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INET_MIB2_H */ + +#ifdef HAVE_WIN32_PLATFORM_SDK +/* Define to 1 if you have the header file. */ +#define HAVE_IPHLPAPI_H +#endif + +/* Define to 1 if the system has the 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 */ +#undef HAVE_U_INT32_T + +/* 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 */ +#undef HAVE_U_INT64_T + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IOCTLS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_IO_H 1 + +/* 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). */ +/* #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 `m' library (-lm). */ +/* #undef HAVE_LIBM */ + +/* 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 `sensors' library (-lsensors). */ +/* #undef HAVE_LIBSENSORS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_HDREG_H */ + +/* 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_LM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `lrand48' function. */ +/* #undef HAVE_LRAND48 */ + +/* 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 you have the `mkstemp' function. */ +/* #undef HAVE_MKSTEMP */ + +/* Define to 1 if you have the `mktime' function. */ +/* #undef HAVE_MKTIME */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MNTENT_H */ + +/* 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. */ +/* #undef HAVE_NETDB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_PCB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IN6_VAR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_IP6_VAR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_ND6_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_FSM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_TCP6_TIMER_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETNETSNMP_ENABLE_IPV6_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. */ +/* #undef HAVE_NETINET_IF_ETHER_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IN_SYSTM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IN_VAR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IP6_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IP_ICMP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_ICMP6_H */ + +/* 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. */ +/* #undef HAVE_NETINET_TCP_H */ + +/* 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. */ +/* #undef HAVE_NETINET_UDP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_UDP_VAR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIPX_IPX_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF_DL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF_H */ + +/* 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. */ +/* #undef HAVE_NET_ROUTE_H */ + +/* 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. */ +/* #undef HAVE_OSRELDATE_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 if you have header file. (Win32-getpid) */ +#define HAVE_PROCESS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTHREAD_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PWD_H */ + +/* Define to 1 if you have the `rand' function. */ +#define HAVE_RAND 1 + +/* Define to 1 if you have the `srand' function. */ +#define HAVE_SRAND 1 + +/* Define to 1 if you have the `random' function. */ +#undef HAVE_RANDOM + +/* Define to 1 if you have the `regcomp' function. */ +/* #undef HAVE_REGCOMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_REGEX_H */ + +/* Define to 1 if you have the `rpmGetPath' function. */ +/* #undef HAVE_RPMGETPATH */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_RPMIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_RPM_RPMIO_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. */ +/* #undef HAVE_SELECT */ + +/* Define to 1 if you have the `setenv' function. */ +/* #undef HAVE_SETENV */ + +/* Define to 1 if you have the `setgid' function. */ +/* #undef HAVE_SETGID */ + +/* Define to 1 if you have the `setgroups' function. */ +/* #undef HAVE_SETGROUPS */ + +/* Define to 1 if you have the `setitimer' function. */ +/* #undef HAVE_SETITIMER */ + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setmntent' function. */ +/* #undef HAVE_SETMNTENT */ + +/* Define to 1 if you have the `setsid' function. */ +/* #undef HAVE_SETSID */ + +/* Define to 1 if you have the `setuid' function. */ +/* #undef HAVE_SETUID */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SGTTY_H */ + +/* Define to 1 if you have the `sigaction' function. */ +/* #undef HAVE_SIGACTION */ + +/* Define to 1 if you have the `sigalrm' function. */ +/* #undef HAVE_SIGALRM */ + +/* Define to 1 if you have the `sigblock' function. */ +/* #undef HAVE_SIGBLOCK */ + +/* Define to 1 if you have the `sighold' function. */ +/* #undef HAVE_SIGHOLD */ + +/* Define to 1 if you have the `signal' function. */ +/* #undef HAVE_SIGNAL */ + +/* Define to 1 if you have the `sigset' function. */ +/* #undef HAVE_SIGSET */ + +/* 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. */ +/* #undef HAVE_STATFS */ + +/* Define to 1 if you have the `statvfs' function. */ +/* #undef HAVE_STATVFS */ + +/* Define to 1 if you have the header file. */ +#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) +#define HAVE_STDINT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stime' function. */ +/* #undef HAVE_STIME */ + +/* Define to 1 if you have the `strcasestr' function. */ +/* #undef HAVE_STRCASESTR */ + +/* 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. */ +/* #undef HAVE_STRINGS_H */ + +/* 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. */ +/* #undef HAVE_STRNCASECMP */ + +/* 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 header file. */ +/* #undef HAVE_SYSLOG_H */ + +/* Define to 1 if you have the `system' function. */ +#define HAVE_SYSTEM 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CDEFS_H */ + +/* 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. */ +/* #undef HAVE_SYS_FILE_H */ + +/* 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. */ +/* #undef HAVE_SYS_IOCTL_H */ + +/* 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. */ +/* #undef HAVE_SYS_MOUNT_H */ + +/* 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. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* 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. */ +/* #undef HAVE_SYS_QUEUE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SELECT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKETVAR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKET_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATVFS_H */ + +/* 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. */ +/* #undef HAVE_SYS_SWAP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSCTL_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_TCPIPSTATS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TIME_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. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_USER_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UTSNAME_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* 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. */ +/* #undef HAVE_SYS_WAIT_H */ + +/* Define to 1 if you have the `tcgetattr' function. */ +/* #undef HAVE_TCGETATTR */ + +/* 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 you have the `uname' function. */ +/* #undef HAVE_UNAME */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if you have the `usleep' function. */ +/* #undef HAVE_USLEEP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UTMPX_H */ + +/* 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_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. */ +#define HAVE_WINDOWS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK2_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WS2TCPIP_H 1 + +/* Set if IP_PKTINFO is usable */ +#define HAVE_IP_PKTINFO 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_XTI_H */ + +/* Type of the fifth argument of select() */ +#define NETSNMP_SELECT_TIMEVAL struct timeval + +/* Type of the third argument of ioctlsocket() */ +#define NETSNMP_IOCTLSOCKET_ARG u_long + +/* Define to the address where bug reports for this package should be sent. */ +/* #undef PACKAGE_BUGREPORT */ + +/* 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. */ +/* #undef PACKAGE_STRING */ + +/* Define to the one symbol short name of this package. */ +#ifndef PACKAGE_TARNAME +#define PACKAGE_TARNAME "net-snmp" +#endif + +/* Define to the version of this package. */ +/* #undef PACKAGE_VERSION */ + +/* 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 `intmax_t', as computed by sizeof. */ +#define SIZEOF_INTMAX_T 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 . */ +/* #undef TIME_WITH_SYS_TIME */ + +/* 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 as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#define inline __inline + +/* Define to `long' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* 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 rtentry; + +/* Use BSD 4.4 routing table entries? */ +/* #undef RTENTRY_4_4 */ + +/* Does struct sigaction have a sa_sigaction field? */ +/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ + +/* Does struct sockaddr have a sa_len field? */ +/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ + +/* Does struct sockaddr have a sa_family2 field? */ +/* #undef HAVE_STRUCT_SOCKADDR_SA_UNION_SA_GENERIC_SA_FAMILY2 */ + +/* Does struct in6_addr have a s6_un.sa6_ladd field? */ +/* #undef HAVE_STRUCT_IN6_ADDR_S6_UN_SA6_LADDR */ + +/* msghdr.msg_control */ +/* #undef HAVE_STRUCT_MSGHDR_MSG_CONTROL */ + +/* msghdr.msg_flags */ +/* #undef HAVE_STRUCT_MSGHDR_MSG_FLAGS */ + +/* rtentry structure tests */ +/* #undef RTENTRY_RT_NEXT */ +/* #undef HAVE_STRUCT_RTENTRY_RT_DST */ +/* #undef HAVE_STRUCT_RTENTRY_RT_UNIT */ +/* #undef HAVE_STRUCT_RTENTRY_RT_USE */ +/* #undef HAVE_STRUCT_RTENTRY_RT_REFCNT */ +/* #undef HAVE_STRUCT_RTENTRY_RT_HASH */ + +/* ifnet structure tests */ +/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE */ +/* #undef HAVE_STRUCT_IFNET_IF_BAUDRATE_IFS_VALUE */ +/* #undef HAVE_STRUCT_IFNET_IF_SPEED */ +/* #undef HAVE_STRUCT_IFNET_IF_TYPE */ +/* #undef HAVE_STRUCT_IFNET_IF_IMCASTS */ +/* #undef HAVE_STRUCT_IFNET_IF_IQDROPS */ +/* #undef HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_SEC */ +/* #undef HAVE_STRUCT_IFNET_IF_NOPROTO */ +/* #undef HAVE_STRUCT_IFNET_IF_OMCASTS */ +/* #undef HAVE_STRUCT_IFNET_IF_XNAME */ +/* #undef HAVE_STRUCT_IFNET_IF_OBYTES */ +/* #undef HAVE_STRUCT_IFNET_IF_IBYTES */ +/* #undef HAVE_STRUCT_IFNET_IF_ADDRLIST */ + +/* tcpstat.tcps_rcvmemdrop */ +/* #undef HAVE_STRUCT_TCPSTAT_TCPS_RCVMEMDROP */ + +/* udpstat.udps_discard */ +/* #undef HAVE_STRUCT_UDPSTAT_UDPS_DISCARD */ + +/* udpstat.udps_discard */ +/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORT */ + +/* udpstat.udps_discard */ +/* #undef HAVE_STRUCT_UDPSTAT_UDPS_NOPORTBCAST */ + +/* udpstat.udps_discard */ +/* #undef HAVE_STRUCT_UDPSTAT_UDPS_FULLSOCK */ + +/* arphd.at_next */ +/* #undef HAVE_STRUCT_ARPHD_AT_NEXT */ + +/* ifaddr.ifa_next */ +/* #undef HAVE_STRUCT_IFADDR_IFA_NEXT */ + +/* ifnet.if_mtu */ +/* #undef HAVE_STRUCT_IFNET_IF_MTU */ + +/* swdevt.sw_nblksenabled */ +/* #undef HAVE_STRUCT_SWDEVT_SW_NBLKSENABLED */ + +/* nlist.n_value */ +/* #undef HAVE_STRUCT_NLIST_N_VALUE */ + +/* ipstat structure tests */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFORWARD */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_CANTFRAG */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_DELIVERED */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGDROPPED */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_FRAGTIMEOUT */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_LOCALOUT */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_NOPROTO */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_NOROUTE */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_ODROPPED */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_OFRAGMENTS */ +/* #undef HAVE_STRUCT_IPSTAT_IPS_REASSEMBLED */ + +/* vfsstat.f_frsize */ +/* #undef HAVE_STRUCT_STATVFS_F_FRSIZE */ + +/* vfsstat.f_files */ +/* #undef HAVE_STRUCT_STATVFS_F_FILES */ + +/* statfs inode structure tests*/ +/* #undef HAVE_STRUCT_STATFS_F_FILES */ +/* #undef HAVE_STRUCT_STATFS_F_FFREE */ +/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */ + +/* des_ks_struct.weak_key */ +/* #undef HAVE_STRUCT_DES_KS_STRUCT_WEAK_KEY */ + +/* ifnet needs to have _KERNEL defined */ +/* #undef IFNET_NEEDS_KERNEL */ + +/* sysctl works to get boottime, etc... */ +/* #undef NETSNMP_CAN_USE_SYSCTL */ + +/* type check for in_addr_t */ +#define in_addr_t unsigned long + +/* define if SIOCGIFADDR exists in sys/ioctl.h */ +/* #undef SYS_IOCTL_H_HAS_SIOCGIFADDR */ + +#if defined(_M_PPC) || defined(_M_MPPC) +# define NETSNMP_BIGENDIAN 1 +#elif defined(_M_IX86) || defined(_M_X64) +# define NETSNMP_BIGENDIAN 0 +#else +# error Unknown byte order +#endif + +/* 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 NETSNMP_AGENTID above. IE, the resulting + value returned by a query to sysObjectID is + EXTENSIBLEMIB.NETSNMP_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_UNKNOWNID 255 + +#ifdef hpux9 +#define OSTYPE NETSNMP_HPUX9ID +#endif +#ifdef hpux10 +#define OSTYPE NETSNMP_HPUX10ID +#endif +#ifdef hpux11 +#define OSTYPE NETSNMP_HPUX11ID +#endif +#ifdef sunos4 +#define OSTYPE NETSNMP_SUNOS4ID +#endif +#ifdef solaris2 +#define OSTYPE NETSNMP_SOLARISID +#endif +#if defined(osf3) || defined(osf4) || defined(osf5) +#define OSTYPE NETSNMP_OSFID +#endif +#ifdef ultrix4 +#define OSTYPE NETSNMP_ULTRIXID +#endif +#ifdef netbsd1 +#define OSTYPE NETSNMP_NETBSD1ID +#endif +#if defined(__FreeBSD__) +#define OSTYPE NETSNMP_FREEBSDID +#endif +#if defined(irix6) || defined(irix5) +#define OSTYPE NETSNMP_IRIXID +#endif +#ifdef linux +#define OSTYPE NETSNMP_LINUXID +#endif +#if defined(bsdi2) || defined(bsdi3) || defined(bsdi4) +#define OSTYPE NETSNMP_BSDIID +#endif +#ifdef openbsd2 +#define OSTYPE NETSNMP_OPENBSDID +#endif +#ifdef WIN32 +#define OSTYPE NETSNMP_WIN32ID +#endif +/* unknown */ +#ifndef OSTYPE +#define 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,OSTYPE +#define NETSNMP_SYSTEM_DOT_MIB 1.3.6.1.4.1.8072.3.2.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 + +/* 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 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 (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 NETSNMP_DEFDISKMINIMUMSPACE 100000 + +#define NETSNMP_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 NETSNMP_MAXREADCOUNT 100 /* max times to loop reading output from execs. */ + +/* The original CMU code had this hardcoded as = 1 */ +#define NETSNMP_SNMPBLOCK 1 /* Set if snmpgets should block and never timeout */ + +/* How long to wait before restarting the agent after a snmpset to + EXTENSIBLEMIB.NETSNMP_VERSIONMIBNUM.VERRESTARTAGENT. This is + necessary to finish the snmpset reply before restarting. */ +#define NETSNMP_RESTARTSLEEP 5 + +/* Number of community strings to store */ +#define NETSNMP_NUM_COMMUNITIES 5 + +/* UNdefine to allow specifying zero-length community string */ +/* #define NETSNMP_NO_ZEROLENGTH_COMMUNITY 1 */ + +#define NETSNMP_LASTFIELD -1 /* internal define */ + +/* configure options specified */ +#define NETSNMP_CONFIGURE_OPTIONS "" + +/* got socklen_t? */ +#ifdef HAVE_WIN32_PLATFORM_SDK +#define HAVE_SOCKLEN_T 1 +#endif + +/* got in_addr_t? */ +/* #undef HAVE_IN_ADDR_T */ + +#ifdef __MINGW32__ +/* got ssize_t? */ +#define HAVE_SSIZE_T +#endif + +/* If you have openssl 0.9.7 or above, you likely have AES support. */ +/* #undef NETSNMP_USE_OPENSSL */ + +#ifdef NETSNMP_USE_OPENSSL + +#define HAVE_LIBSSL 1 + +#define HAVE_LIBSSL_DTLS 1 + +#define SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER const + +/* 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 `AES_cfb128_encrypt' function. */ +#define HAVE_AES_CFB128_ENCRYPT 1 + +/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */ +#define HAVE_ASN1_STRING_GET0_DATA 1 + +/* Define to 1 if you have the `DH_get0_key' function. */ +#define HAVE_DH_GET0_KEY 1 + +/* Define to 1 if you have the `DH_get0_pqg' function. */ +#define HAVE_DH_GET0_PQG 1 + +/* Define to 1 if you have the `DH_set0_pqg' function. */ +#define HAVE_DH_SET0_PQG 1 + +/* Define to 1 if you have the `DTLSv1_method' function. */ +#define HAVE_DTLSV1_METHOD 1 + +/* Define to 1 if you have the `DTLS_method' function. */ +#define HAVE_DTLS_METHOD 1 + +/* Define to 1 if you have the `EVP_MD_CTX_free' function. */ +#define HAVE_EVP_MD_CTX_FREE 1 + +/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ +#define HAVE_EVP_MD_CTX_NEW 1 + +/* Define to 1 if you have the `EVP_MD_CTX_create' function. */ +#define HAVE_EVP_MD_CTX_CREATE 1 + +/* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ +#define HAVE_EVP_MD_CTX_DESTROY 1 + +/* Define if you have EVP_sha224/256 in openssl */ +#define HAVE_EVP_SHA224 /**/ + +/* Define if you have EVP_sha384/512 in openssl */ +#define HAVE_EVP_SHA384 /**/ + +/* Define to 1 if you have the `TLSv1_method' function. */ +#define HAVE_TLSV1_METHOD 1 + +/* Define to 1 if you have the `TLS_method' function. */ +#define HAVE_TLS_METHOD 1 + +/* Define to 1 if you have the `X509_get_signature_nid' function. */ +#define HAVE_X509_GET_SIGNATURE_NID 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_data' function. */ +#define HAVE_X509_NAME_ENTRY_GET_DATA 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_object' function. */ +#define HAVE_X509_NAME_ENTRY_GET_OBJECT 1 + +#if defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT) +#define HAVE_AES 1 +#endif + +#else /* ! NETSNMP_USE_OPENSSL */ + +/* define if you are using the MD5 code ...*/ +#define NETSNMP_USE_INTERNAL_MD5 1 + +#endif /* ! NETSNMP_USE_OPENSSL */ + + +/* 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 gethostbyaddr */ +#define HAVE_GETHOSTBYADDR 1 + +/* printing system */ +/* #undef HAVE_LPSTAT */ +/* #undef LPSTAT_PATH */ +/* #undef HAVE_PRINTCAP */ + +/* 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. */ +/* #undef NETSNMP_TRANSPORT_UNIX_DOMAIN */ + +/* 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 */ + +/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ +/* This is defined if support for the UDP/IPv6 transport domain is + available. */ +/* #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN */ + +/* XXX do not modify. change the NETSNMP_ENABLE_IPV6 define instead */ +/* 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 Alias transport domain is + available. */ +/* #undef NETSNMP_TRANSPORT_ALIAS_DOMAIN */ + +/* This is defined if support for the SSH transport domain is + available. */ +/* #undef NETSNMP_TRANSPORT_SSH_DOMAIN */ + +#ifdef NETSNMP_USE_OPENSSL + +/* This is defined if support for the TLS transport domain is + available. */ +#define NETSNMP_TRANSPORT_TLSBASE_DOMAIN 1 + +/* This is defined if support for the DTLS/UDP transport domain is + available. */ +#define NETSNMP_TRANSPORT_DTLSUDP_DOMAIN 1 + +/* This is defined if support for the TLS/TCP transport domain is + available. */ +#define NETSNMP_TRANSPORT_TLSTCP_DOMAIN 1 + +#endif + +/* 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 we're using the new MIT crypto API */ +/* #undef NETSNMP_USE_KERBEROS_MIT */ + +/* define if you want to build with reentrant/threaded code (incomplete)*/ +/* #undef NETSNMP_REENTRANT */ + +/* 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_version_require(x) +#define config_warning(x) +#define config_error(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) +#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; } + * + */ +/* + * Win32 needs extern for inline function declarations in headers. + * See MS tech note Q123768: + * http://support.microsoft.com/default.aspx?scid=kb;EN-US;123768 + */ +#define NETSNMP_INLINE extern inline +#define NETSNMP_STATIC_INLINE static inline +#define NETSNMP_ENABLE_INLINE 1 + +#if notused +#include NETSNMP_SYSTEM_INCLUDE_FILE +#include NETSNMP_MACHINE_INCLUDE_FILE +#endif + +#include +#include + +#if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) +# define NETSNMP_USE_INLINE 1 +#else +# undef NETSNMP_INLINE +# define NETSNMP_INLINE +# undef NETSNMP_STATIC_INLINE +# define NETSNMP_STATIC_INLINE static +#endif + +#ifdef WIN32 + +#ifndef __MINGW32__ +typedef unsigned short mode_t; +#endif +#ifndef HAVE_STDINT_H +typedef unsigned char uint8_t; +typedef char int8_t; +typedef unsigned __int16 uint16_t; +typedef __int16 int16_t; +typedef unsigned __int32 uint32_t; +typedef __int32 int32_t; +typedef unsigned __int64 uint64_t; +typedef __int64 int64_t; +typedef unsigned __int64 uintmax_t; +typedef __int64 intmax_t; +#else /* HAVE_STDINT_H */ +#include +#endif /* HAVE_STDINT_H */ + + +/* (u)intptr_t should only be needed for MSVC 6 32-bit. */ +/* SDK has it for 64-bit and newer MSVC should also have it in stddef.h. */ +#ifndef _INTPTR_T_DEFINED +#ifdef _M_X64 +typedef __int64 intptr_t; +#else +typedef int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _M_X64 +typedef unsigned __int64 uintptr_t; +#else +typedef unsigned int uintptr_t; +#endif +#define _UINTPTR_T_DEFINED +#endif + +#ifndef __cplusplus +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable: 4804) // '-' : unsafe use of type 'bool' in operation +#endif +enum { + netsnmp_compile_time_uintptr_t_size_check + = sizeof(struct netsnmp_compile_time_uintptr_t_size_check_s { int:-!(sizeof(uintptr_t) == sizeof(void*)); }) +}; +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif + +/* Define if you have the closesocket function. */ +#define HAVE_CLOSESOCKET 1 + +/* define to 1 if you do not want to set global snmp_errno */ +#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1 + +/* Defining vsnprintf is not necessary for MSVC 2008 or later */ +#if defined(_MSC_VER) && _MSC_VER < 1500 +#define vsnprintf _vsnprintf +#endif +#if defined(_MSC_VER) && _MSC_VER < 1900 +#define snprintf _snprintf +#endif + +#if defined(_MSC_VER) && _MSC_VER < 1600 +#define EADDRINUSE WSAEADDRINUSE +#endif + +/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL */ +/* #undef NETSNMP_USE_DLL */ + +#if defined(NETSNMP_DLL) && !defined(NETSNMP_USE_DLL) +#error NETSNMP_USE_DLL must be defined when building libsnmp as a DLL. +#endif + +/* + * DLL decoration, if used at all, must be consistent. + * This is why NETSNMP_IMPORT is really an export decoration + * when it is encountered in a header file that is included + * during the compilation of a library source file. + * NETSNMP_DLL is set by the MSVC libsnmp_dll project + * in order to signal that the library sources are being compiled. + * Not defining NETSNMP_USE_DLL ignores the preceding, and renders + * the NETSNMP_IMPORT definitions harmless. + */ + +#ifdef NETSNMP_USE_DLL + #ifdef NETSNMP_DLL + #if defined(_MSC_VER) + #define NETSNMP_IMPORT extern __declspec(dllexport) + #endif + #else + #if defined(_MSC_VER) + #define NETSNMP_IMPORT extern __declspec(dllimport) + #endif + #endif /* NETSNMP_DLL */ +#endif /* NETSNMP_USE_DLL */ + +/* MSVC OpenSSL linker settings. */ +#if defined(_MSC_VER) +# if defined(NETSNMP_USE_OPENSSL) +# ifdef _DLL +# ifdef _DEBUG +# ifdef OPENSSL_BEFORE_1_1_0 +# pragma comment(lib, "libeay32MDd.lib") +# else +# ifdef _M_X64 +# pragma comment(lib, "libcrypto64MDd.lib") +# pragma comment(lib, "libssl64MDd.lib") +# else +# pragma comment(lib, "libcrypto32MDd.lib") +# pragma comment(lib, "libssl32MDd.lib") +# endif +# endif +# else +# ifdef OPENSSL_BEFORE_1_1_0 +# pragma comment(lib, "libeay32MD.lib") +# else +# ifdef _M_X64 +# pragma comment(lib, "libcrypto64MD.lib") +# pragma comment(lib, "libssl64MD.lib") +# else +# pragma comment(lib, "libcrypto32MD.lib") +# pragma comment(lib, "libssl32MD.lib") +# endif +# endif +# endif +# else +# ifdef _DEBUG +# ifdef OPENSSL_BEFORE_1_1_0 +# pragma comment(lib, "libeay32MTd.lib") +# else +# ifdef _M_X64 +# pragma comment(lib, "libcrypto64MTd.lib") +# pragma comment(lib, "libssl64MTd.lib") +# else +# pragma comment(lib, "libcrypto32MTd.lib") +# pragma comment(lib, "libssl32MTd.lib") +# endif +# endif +# else +# ifdef OPENSSL_BEFORE_1_1_0 +# pragma comment(lib, "libeay32MT.lib") +# else +# ifdef _M_X64 +# pragma comment(lib, "libcrypto64MT.lib") +# pragma comment(lib, "libssl64MT.lib") +# else +# pragma comment(lib, "libcrypto32MT.lib") +# pragma comment(lib, "libssl32MT.lib") +# endif +# endif +# endif +# endif +# pragma comment(lib, "gdi32.lib") +# pragma comment(lib, "user32.lib") +# endif +#endif + +#endif /* WIN32 */ + +#ifndef NETSNMP_IMPORT +# define NETSNMP_IMPORT extern +#endif + +#if defined(HAVE_NLIST) && defined(HAVE_STRUCT_NLIST_N_VALUE) && !defined(DONT_USE_NLIST) && !defined(NETSNMP_NO_KMEM_USAGE) +#define NETSNMP_CAN_USE_NLIST +#endif + +#ifdef HAVE_DMALLOC_H +#define DMALLOC_FUNC_CHECK +#endif + +#define NETSNMP_NO_SYSTEMD + +/* #undef NETSNMP_ENABLE_LOCAL_SMUX */ + +/* define if agentx transport is to use domain sockets only */ +/* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */ + +#ifdef UCD_COMPATIBLE +/* old and in the way */ +#define EXTENSIBLEMIB NETSNMP_UCDAVIS_MIB +#endif + +#ifdef _MSC_VER +/* Windows Vista and higher have inet_ntop but older Windows does not. + * We'll use the Net-SNMP version instead. */ +#undef HAVE_INET_NTOP +#undef HAVE_INET_PTON + +/* IPv6 transports */ +#ifdef NETSNMP_ENABLE_IPV6 + #define NETSNMP_TRANSPORT_TCPIPV6_DOMAIN 1 + #define NETSNMP_TRANSPORT_UDPIPV6_DOMAIN 1 + #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 +#else + #undef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN + #undef NETSNMP_TRANSPORT_UDPIPV6_DOMAIN +#endif +#endif + +/* + * Although if_nametoindex() is available on Windows Vista, Windows Server + * 2008 and later in iphlpapi.dll, do not link with if_nametoindex() such + * that the Net-SNMP executable can be started on earlier Windows versions. + */ +#undef HAVE_IF_NAMETOINDEX + +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif + +/* Define to 1 if you have the `strtoull' function. */ +#if _MSC_VER >= 1800 +#define HAVE_STRTOULL 1 +#else +/* #undef HAVE_STRTOULL */ +#endif + +/* + * Module configuration and control starts here. + * + * Some of the defines herein are used to control + * groups of modules. The ones that have "CFG" + * are used especially to control the include files + * seen in {agent,mib}_module_includes.h, and the init entries + * which are invoked in {agent,mib}_module_inits.h. + * + * To disable a group, uncomment the associated define. + */ + +/* CFG Define if compiling with the ucd_snmp module files. */ +#define USING_UCD_SNMP_MODULE 1 + +/* CFG Define if compiling with the agentx module files. */ +#define USING_AGENTX_MODULE 1 + +/* CFG Define if compiling with the host module files. */ +/* #undef USING_HOST_MODULE */ + +/* CFG Define if compiling with the Rmon module files. */ +/* #undef USING_RMON_MODULE */ + +/* CFG Define if compiling with the disman/event-mib module files. */ +#define USING_DISMAN_EVENT_MIB_MODULE 1 + +/* CFG Define if compiling with the smux module files. */ +/* #undef USING_SMUX_MODULE */ + +/* Define if compiling with the winExtDLL module. */ +/* #undef USING_WINEXTDLL_MODULE */ + +/* + * Module configuration and control ends here. + */ +#define UDP_ADDRESSES_IN_HOST_ORDER 1 + +/* Timeout in milliseconds for Win32 function WaitForSingleObject. + Used by agent pass. */ +#define NETSNMP_TIMEOUT_WAITFORSINGLEOBJECT 5000 + +#ifdef HAVE_WIN32_PLATFORM_SDK +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +#endif + +#ifdef _MSC_VER +#ifdef _WIN64 +#define NETSNMP_PRIz "I64" +#else +#define NETSNMP_PRIz "" +#endif +#endif + +#endif /* NET_SNMP_CONFIG_H */ + diff --git a/win32/net-snmp/net-snmp-config.h.in b/win32/net-snmp/net-snmp-config.h.in index c468a48..dafbc90 100644 --- a/win32/net-snmp/net-snmp-config.h.in +++ b/win32/net-snmp/net-snmp-config.h.in @@ -5,6 +5,7 @@ #define NET_SNMP_CONFIG_H /* _MSC_VER values + 1900 = MSCV++ 14.0 (Visual Studio 2015) 1800 = MSVC++ 12.0 (Visual Studio 2013) 1700 = MSVC++ 11.0 (Visual Studio 2012) 1600 = MSVC++ 10.0 (Visual Studio 2010) @@ -91,6 +92,13 @@ /* define if you are using the codeS11 library ...*/ /* #undef NETSNMP_USE_PKCS11 */ +/* Used to make the compiler issue a warning about deprecated functions and + variables */ +#define NETSNMP_ATTRIBUTE_DEPRECATED + +/* Used to suppress compiler warnings about unused functions and variables */ +#define NETSNMP_ATTRIBUTE_UNUSED + /* add in recent CMU library extensions (not complete) */ /* #undef CMU_COMPATIBLE */ @@ -159,8 +167,20 @@ /* Use libwrap to handle allow/deny hosts? */ /* #undef NETSNMP_USE_LIBWRAP */ -/* Use dmalloc to do malloc debugging? */ -/* #undef HAVE_DMALLOC_H */ +/* Define if _beginthreadex() is defined in */ +#define HAVE__BEGINTHREADEX 1 + +/* Define if _cputs() is defined in */ +#define HAVE__CPUTS 1 + +/* Define if _getch() is defined in */ +#define HAVE__GETCH 1 + +/* Define if _get_osfhandle() is defined in */ +#define HAVE__GET_OSFHANDLE 1 + +/* Define if _open_osfhandle() is defined in */ +#define HAVE__OPEN_OSFHANDLE 1 /* location of UNIX kernel */ #define KERNEL_LOC "unknown" @@ -190,6 +210,9 @@ /* If we don't want to use kmem. */ /* #undef NETSNMP_NO_KMEM_USAGE */ +/* Should evaluate to the name of the current function if defined */ +#define NETSNMP_FUNCTION __FUNCTION__ + /* If you don't want the agent to report on variables it doesn't have data for */ #define NETSNMP_NO_DUMMY_VALUES 1 @@ -225,6 +248,9 @@ /* Define if SNMPv2c code should not be included */ /* #undef NETSNMP_DISABLE_SNMPV2C */ +/* Define if AES-192/AES-256 encryption should be supported */ +/* #undef NETSNMP_DRAFT_BLUMENTHAL_AES_04 */ + /* Define to 1 if you have the `AES_cfb128_encrypt' function. */ /* #undef HAVE_AES_CFB128_ENCRYPT */ @@ -250,6 +276,21 @@ /* Define to 1 if you have the header file. */ #define HAVE_DIRECT_H 1 +/* Define to 1 if you have the `DH_get0_key' function. */ +#define HAVE_DH_GET0_KEY 1 + +/* Define to 1 if you have the `DH_get0_pqg' function. */ +#define HAVE_DH_GET0_PQG 1 + +/* Define to 1 if you have the `X509_get_signature_nid' function. */ +#define HAVE_X509_GET_SIGNATURE_NID 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_data' function. */ +#define HAVE_X509_NAME_ENTRY_GET_DATA 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_object' function. */ +#define HAVE_X509_NAME_ENTRY_GET_OBJECT 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_DIRENT_H */ @@ -279,7 +320,7 @@ /* #undef HAVE_FSTAB_H */ /* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ +#define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getdtablesize' function. */ /* #undef HAVE_GETDTABLESIZE */ @@ -379,9 +420,6 @@ /* Define to 1 if you have the `crypto' library (-lcrypto). */ /* #undef HAVE_LIBCRYPTO */ -/* 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 */ @@ -421,6 +459,9 @@ /* 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_LM_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 @@ -562,21 +603,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_NLIST_H */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_AES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_DES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_DH_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_EVP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_HMAC_H */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_OSRELDATE_H */ @@ -598,8 +624,11 @@ /* Define to 1 if you have the `rand' function. */ #define HAVE_RAND 1 +/* Define to 1 if you have the `srand' function. */ +#define HAVE_SRAND 1 + /* Define to 1 if you have the `random' function. */ -#define HAVE_RAND 1 +#undef HAVE_RANDOM /* Define to 1 if you have the `regcomp' function. */ /* #undef HAVE_REGCOMP */ @@ -683,7 +712,7 @@ /* #undef HAVE_STATVFS */ /* Define to 1 if you have the header file. */ -#ifdef __MINGW32__ +#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) #define HAVE_STDINT_H 1 #endif @@ -932,6 +961,9 @@ /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WINDOWS_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_WINSOCK_H 1 @@ -947,6 +979,12 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_XTI_H */ +/* Type of the fifth argument of select() */ +#define NETSNMP_SELECT_TIMEVAL struct timeval + +/* Type of the third argument of ioctlsocket() */ +#define NETSNMP_IOCTLSOCKET_ARG u_long + /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ @@ -1003,10 +1041,6 @@ /* Define to 1 if you can safely include both and . */ /* #undef TIME_WITH_SYS_TIME */ -/* 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. */ @@ -1020,7 +1054,7 @@ /* Define as `__inline' if that's what the C compiler calls it, or to nothing if it is not supported. */ #ifndef PHP_WIN32 -#define inline __inline +# define inline __inline #endif /* Define to `long' if does not define. */ @@ -1156,11 +1190,19 @@ /* #undef NETSNMP_CAN_USE_SYSCTL */ /* type check for in_addr_t */ -/* #undef in_addr_t */ +#define in_addr_t unsigned long /* define if SIOCGIFADDR exists in sys/ioctl.h */ /* #undef SYS_IOCTL_H_HAS_SIOCGIFADDR */ +#if defined(_M_PPC) || defined(_M_MPPC) +# define NETSNMP_BIGENDIAN 1 +#elif defined(_M_IX86) || defined(_M_X64) +# define NETSNMP_BIGENDIAN 0 +#else +# error Unknown byte order +#endif + /* Mib-2 tree Info */ /* These are the system information variables. */ @@ -1363,12 +1405,6 @@ #ifdef __MINGW32__ /* got ssize_t? */ # define HAVE_SSIZE_T -#elif defined(_MSC_VER) -# ifdef _M_X64 -typedef __int64 ssize_t; -# else -typedef __int32 ssize_t; -# endif #endif /* If you have openssl 0.9.7 or above, you likely have AES support. */ @@ -1376,20 +1412,80 @@ typedef __int32 ssize_t; #ifdef NETSNMP_USE_OPENSSL -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_DH_H 1 +#define HAVE_LIBSSL 1 + +#define HAVE_LIBSSL_DTLS 1 + +#define SECOND_APPVERIFY_COOKIE_CB_ARG_QUALIFIER const /* 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 `AES_cfb128_encrypt' function. */ +#define HAVE_AES_CFB128_ENCRYPT 1 + +/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */ +#define HAVE_ASN1_STRING_GET0_DATA 1 + +/* Define to 1 if you have the `DH_get0_key' function. */ +#define HAVE_DH_GET0_KEY 1 + +/* Define to 1 if you have the `DH_get0_pqg' function. */ +#define HAVE_DH_GET0_PQG 1 + +/* Define to 1 if you have the `DH_set0_pqg' function. */ +#define HAVE_DH_SET0_PQG 1 + +/* Define to 1 if you have the `DTLSv1_method' function. */ +#define HAVE_DTLSV1_METHOD 1 + +/* Define to 1 if you have the `DTLS_method' function. */ +#define HAVE_DTLS_METHOD 1 + +/* Define to 1 if you have the `EVP_MD_CTX_free' function. */ +#define HAVE_EVP_MD_CTX_FREE 1 + +/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ +#define HAVE_EVP_MD_CTX_NEW 1 + /* Define to 1 if you have the `EVP_MD_CTX_create' function. */ #define HAVE_EVP_MD_CTX_CREATE 1 /* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ #define HAVE_EVP_MD_CTX_DESTROY 1 -/* Define to 1 if you have the `AES_cfb128_encrypt' function. */ -#define HAVE_AES_CFB128_ENCRYPT 1 +/* Define if you have EVP_sha224/256 in openssl */ +#define HAVE_EVP_SHA224 /**/ + +/* Define if you have EVP_sha384/512 in openssl */ +#define HAVE_EVP_SHA384 /**/ + +/* Define to 1 if you have the `TLSv1_method' function. */ +#define HAVE_TLSV1_METHOD 1 + +/* Define to 1 if you have the `TLS_method' function. */ +#define HAVE_TLS_METHOD 1 + +/* Define to 1 if you have the `X509_get_signature_nid' function. */ +#define HAVE_X509_GET_SIGNATURE_NID 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_data' function. */ +#define HAVE_X509_NAME_ENTRY_GET_DATA 1 + +/* Define to 1 if you have the `X509_NAME_ENTRY_get_object' function. */ +#define HAVE_X509_NAME_ENTRY_GET_OBJECT 1 #if defined(HAVE_OPENSSL_AES_H) && defined(HAVE_AES_CFB128_ENCRYPT) #define HAVE_AES 1 @@ -1403,20 +1499,6 @@ typedef __int32 ssize_t; #endif /* ! NETSNMP_USE_OPENSSL */ -/* 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 @@ -1479,10 +1561,6 @@ typedef __int32 ssize_t; 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. */ /* #undef NETSNMP_TRANSPORT_ALIAS_DOMAIN */ @@ -1491,13 +1569,21 @@ typedef __int32 ssize_t; available. */ /* #undef NETSNMP_TRANSPORT_SSH_DOMAIN */ +#ifdef NETSNMP_USE_OPENSSL + +/* This is defined if support for the TLS transport domain is + available. */ +#define NETSNMP_TRANSPORT_TLSBASE_DOMAIN 1 + /* This is defined if support for the DTLS/UDP transport domain is available. */ -/* #undef NETSNMP_TRANSPORT_DTLSUDP_DOMAIN */ +#define NETSNMP_TRANSPORT_DTLSUDP_DOMAIN 1 /* This is defined if support for the TLS/TCP transport domain is available. */ -/* #undef NETSNMP_TRANSPORT_TLSTCP_DOMAIN */ +#define NETSNMP_TRANSPORT_TLSTCP_DOMAIN 1 + +#endif /* This is defined if support for stdin/out transport domain is available. */ /* #undef NETSNMP_TRANSPORT_STD_DOMAIN */ @@ -1583,6 +1669,9 @@ typedef __int32 ssize_t; #include NETSNMP_MACHINE_INCLUDE_FILE #endif +#include +#include + #if NETSNMP_ENABLE_INLINE && !defined(NETSNMP_NO_INLINE) # define NETSNMP_USE_INLINE 1 #else @@ -1650,9 +1739,6 @@ enum { /* Define if you have the closesocket function. */ #define HAVE_CLOSESOCKET 1 -/* Define if you have raise() instead of alarm() */ -#define HAVE_RAISE 1 - /* define to 1 if you do not want to set global snmp_errno */ #define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1 @@ -1689,11 +1775,11 @@ enum { #ifdef NETSNMP_USE_DLL #ifdef NETSNMP_DLL #if defined(_MSC_VER) - #define NETSNMP_IMPORT __declspec(dllexport) + #define NETSNMP_IMPORT extern __declspec(dllexport) #endif #else #if defined(_MSC_VER) - #define NETSNMP_IMPORT __declspec(dllimport) + #define NETSNMP_IMPORT extern __declspec(dllimport) #endif #endif /* NETSNMP_DLL */ #endif /* NETSNMP_USE_DLL */ @@ -1719,20 +1805,18 @@ enum { #define NETSNMP_CAN_USE_NLIST #endif -#if HAVE_DMALLOC_H +#ifdef HAVE_DMALLOC_H #define DMALLOC_FUNC_CHECK #endif +#define NETSNMP_NO_SYSTEMD + /* #undef NETSNMP_ENABLE_LOCAL_SMUX */ /* define if agentx transport is to use domain sockets only */ /* #undef NETSNMP_AGENTX_DOM_SOCK_ONLY */ -#ifndef LOG_DAEMON -#define LOG_DAEMON (3<<3) /* system daemons */ -#endif - -#if UCD_COMPATIBLE +#ifdef UCD_COMPATIBLE /* old and in the way */ #define EXTENSIBLEMIB NETSNMP_UCDAVIS_MIB #endif @@ -1766,7 +1850,7 @@ enum { /* Define to 1 if you have the `strtoull' function. */ #if _MSC_VER >= 1800 -#define HAVE_STRTOULL +#define HAVE_STRTOULL 1 #else /* #undef HAVE_STRTOULL */ #endif @@ -1817,9 +1901,6 @@ enum { #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 #endif -/* Size prefix to use to printf a uint32_t */ -#define NETSNMP_PRI32 "" - #ifdef _MSC_VER #ifdef _WIN64 #define NETSNMP_PRIz "I64" diff --git a/win32/netsnmpmibs/Makefile.in b/win32/netsnmpmibs/Makefile.in index b6bacbc..bc6b5cf 100644 --- a/win32/netsnmpmibs/Makefile.in +++ b/win32/netsnmpmibs/Makefile.in @@ -3,6 +3,8 @@ CFG= OUTDIR= INTDIR= SDK= +CFLAGS= +LDFLAGS= !IF "$(OS)" == "Windows_NT" NULL= @@ -10,6 +12,9 @@ NULL= NULL=nul !ENDIF +CPP=cl.exe +CPP_PROJ=/I.. /I..\..\include /I..\..\agent /I..\..\agent\mibgroup $(CFLAGS) + ALL : "..\lib\$(OUTDIR)\$(PROGNAME).lib" "..\lib\$(OUTDIR)" : @@ -18,46 +23,78 @@ ALL : "..\lib\$(OUTDIR)\$(PROGNAME).lib" "$(INTDIR)" : if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" -CPP=cl.exe -!IF "$(CFG)" == "release" -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ELSEIF "$(CFG)" == "debug" -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -!ENDIF +{..\..\agent}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\agentx}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\agent}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\disman}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\disman\event}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\examples}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\if-mib}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent\mibgroup\if-mib\ifTable}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent\mibgroup\if-mib\ifXTable}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent\mibgroup\if-mib\data_access}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent\mibgroup\mibII}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent\mibgroup\mibII\data_access}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent\mibgroup\notification-log-mib}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\notification}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\smux}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\snmp-notification-mib}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\snmpv3}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\target}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\ucd-snmp}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\util_funcs}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< + +{..\..\agent\mibgroup\utilities}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\$(PROGNAME).lib" +LIB32_FLAGS=/nologo /out:"..\lib\$(OUTDIR)\$(PROGNAME).lib" $(LDFLAGS) LIB32_OBJS1= \ "$(INTDIR)\setSerialNo.obj" \ "$(INTDIR)\snmp_mib.obj" \ @@ -103,12 +140,17 @@ LIB32_OBJS2= \ "$(INTDIR)\usmStats.obj" \ "$(INTDIR)\usmUser.obj" \ "$(INTDIR)\snmpNotifyFilterProfileTable.obj" \ + "$(INTDIR)\snmpNotifyFilterProfileTable_data.obj" \ "$(INTDIR)\snmpNotifyFilterTable.obj" \ "$(INTDIR)\snmpNotifyFilterTable_data_access.obj" \ + "$(INTDIR)\snmpNotifyFilterTable_data_storage.obj" \ "$(INTDIR)\snmpNotifyFilterTable_interface.obj" \ "$(INTDIR)\snmpNotifyTable.obj" \ + "$(INTDIR)\snmpNotifyTable_data.obj" \ "$(INTDIR)\snmpTargetAddrEntry.obj" \ + "$(INTDIR)\snmpTargetAddrEntry_data.obj" \ "$(INTDIR)\snmpTargetParamsEntry.obj" \ + "$(INTDIR)\snmpTargetParamsEntry_data.obj" \ "$(INTDIR)\target.obj" \ "$(INTDIR)\target_counters.obj" \ "$(INTDIR)\agentx_config.obj" \ @@ -137,8 +179,16 @@ LIB32_OBJS2= \ !IF "$(SDK)" == "true" LIB32_OBJS3= \ "$(INTDIR)\at.obj" \ + "$(INTDIR)\at_iphlpapi.obj" \ "$(INTDIR)\icmp.obj" \ - "$(INTDIR)\interfaces.obj" \ + "$(INTDIR)\ifTable.obj" \ + "$(INTDIR)\ifTable_data_access.obj" \ + "$(INTDIR)\ifTable_interface.obj" \ + "$(INTDIR)\ifXTable.obj" \ + "$(INTDIR)\ifXTable_data_access.obj" \ + "$(INTDIR)\ifXTable_interface.obj" \ + "$(INTDIR)\interface.obj" \ + "$(INTDIR)\interface_iphlpapi.obj" \ "$(INTDIR)\ip.obj" \ "$(INTDIR)\ipAddr.obj" \ "$(INTDIR)\notification_log.obj" \ @@ -159,9 +209,7 @@ CLEAN : -@erase "..\lib\$(OUTDIR)\$(PROGNAME).lib" "..\lib\$(OUTDIR)\$(PROGNAME).lib" : "..\lib\$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< + $(LIB32) $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) !IF "$(NO_EXTERNAL_DEPS)" != "1" @@ -173,500 +221,188 @@ CLEAN : !ENDIF -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\..\agent\mibgroup\mibII\setSerialNo.c - -"$(INTDIR)\setSerialNo.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\snmp_mib.c - -"$(INTDIR)\snmp_mib.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\sysORTable.c - -"$(INTDIR)\sysORTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\system_mib.c - -"$(INTDIR)\system_mib.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\updates.c - -"$(INTDIR)\updates.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\vacm_context.c - -"$(INTDIR)\vacm_context.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\vacm_conf.c - -"$(INTDIR)\vacm_conf.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\vacm_vars.c - -"$(INTDIR)\vacm_vars.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\disman\event\mteEvent.c - -"$(INTDIR)\mteEvent.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteEventConf.c - -"$(INTDIR)\mteEventConf.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteEventNotificationTable.c - -"$(INTDIR)\mteEventNotificationTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteEventSetTable.c - -"$(INTDIR)\mteEventSetTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteEventTable.c - -"$(INTDIR)\mteEventTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteObjects.c - -"$(INTDIR)\mteObjects.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteObjectsConf.c - -"$(INTDIR)\mteObjectsConf.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteObjectsTable.c - -"$(INTDIR)\mteObjectsTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteScalars.c - -"$(INTDIR)\mteScalars.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTriggerBooleanTable.c - -"$(INTDIR)\mteTriggerBooleanTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTrigger.c - -"$(INTDIR)\mteTrigger.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTriggerConf.c - -"$(INTDIR)\mteTriggerConf.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTriggerDeltaTable.c - -"$(INTDIR)\mteTriggerDeltaTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTriggerExistenceTable.c - -"$(INTDIR)\mteTriggerExistenceTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTriggerTable.c - -"$(INTDIR)\mteTriggerTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\agent\mibgroup\disman\event\mteTriggerThresholdTable.c - -"$(INTDIR)\mteTriggerThresholdTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\examples\example.c - -"$(INTDIR)\example.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\examples\ucdDemoPublic.c - -"$(INTDIR)\ucdDemoPublic.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - +"$(INTDIR)\setSerialNo.obj": ..\..\agent\mibgroup\mibII\setSerialNo.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\dlmod.c" +"$(INTDIR)\snmp_mib.obj": ..\..\agent\mibgroup\mibII\snmp_mib.c "$(INTDIR)" -"$(INTDIR)\dlmod.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\sysORTable.obj": ..\..\agent\mibgroup\mibII\sysORTable.c "$(INTDIR)" +"$(INTDIR)\system_mib.obj": ..\..\agent\mibgroup\mibII\system_mib.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\errormib.c" +"$(INTDIR)\updates.obj": ..\..\agent\mibgroup\mibII\updates.c "$(INTDIR)" -"$(INTDIR)\errormib.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\vacm_context.obj": ..\..\agent\mibgroup\mibII\vacm_context.c "$(INTDIR)" +"$(INTDIR)\vacm_conf.obj": ..\..\agent\mibgroup\mibII\vacm_conf.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\extensible.c" +"$(INTDIR)\vacm_vars.obj": ..\..\agent\mibgroup\mibII\vacm_vars.c "$(INTDIR)" -"$(INTDIR)\extensible.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\event\mteEvent.obj": ..\..\agent\mibgroup\disman\event\mteEvent.c "$(INTDIR)" +"$(INTDIR)\event\mteEventConf.obj": ..\..\agent\mibgroup\disman\event\mteEventConf.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\file.c" +"$(INTDIR)\event\mteEventNotificationTable.obj": ..\..\agent\mibgroup\disman\event\mteEventNotificationTable.c "$(INTDIR)" -"$(INTDIR)\file.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\event\mteEventSetTable.obj": ..\..\agent\mibgroup\disman\event\mteEventSetTable.c "$(INTDIR)" +"$(INTDIR)\event\mteEventTable.obj": ..\..\agent\mibgroup\disman\event\mteEventTable.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\loadave.c" +"$(INTDIR)\event\mteObjects.obj": ..\..\agent\mibgroup\disman\event\mteObjects.c "$(INTDIR)" -"$(INTDIR)\loadave.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\event\mteObjectsConf.obj": ..\..\agent\mibgroup\disman\event\mteObjectsConf.c "$(INTDIR)" +"$(INTDIR)\event\mteObjectsTable.obj": ..\..\agent\mibgroup\disman\event\mteObjectsTable.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\pass.c" +"$(INTDIR)\event\mteScalars.obj": ..\..\agent\mibgroup\disman\event\mteScalars.c "$(INTDIR)" -"$(INTDIR)\pass.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\event\mteTriggerBooleanTable.obj": ..\..\agent\mibgroup\disman\event\mteTriggerBooleanTable.c "$(INTDIR)" +"$(INTDIR)\event\mteTrigger.obj": ..\..\agent\mibgroup\disman\event\mteTrigger.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\pass_common.c" +"$(INTDIR)\event\mteTriggerConf.obj": ..\..\agent\mibgroup\disman\event\mteTriggerConf.c "$(INTDIR)" -"$(INTDIR)\pass_common.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\event\mteTriggerDeltaTable.obj": ..\..\agent\mibgroup\disman\event\mteTriggerDeltaTable.c "$(INTDIR)" +"$(INTDIR)\event\mteTriggerExistenceTable.obj": ..\..\agent\mibgroup\disman\event\mteTriggerExistenceTable.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\pass_persist.c" +"$(INTDIR)\event\mteTriggerTable.obj": ..\..\agent\mibgroup\disman\event\mteTriggerTable.c "$(INTDIR)" -"$(INTDIR)\pass_persist.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\event\mteTriggerThresholdTable.obj": ..\..\agent\mibgroup\disman\event\mteTriggerThresholdTable.c "$(INTDIR)" +"$(INTDIR)\example.obj": ..\..\agent\mibgroup\examples\example.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\proc.c" +"$(INTDIR)\ucdDemoPublic.obj": ..\..\agent\mibgroup\examples\ucdDemoPublic.c "$(INTDIR)" -"$(INTDIR)\proc.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\dlmod.obj": ..\..\agent\mibgroup\ucd-snmp\dlmod.c "$(INTDIR)" +"$(INTDIR)\errormib.obj": ..\..\agent\mibgroup\ucd-snmp\errormib.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\proxy.c" +"$(INTDIR)\extensible.obj": ..\..\agent\mibgroup\ucd-snmp\extensible.c "$(INTDIR)" -"$(INTDIR)\proxy.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\file.obj": ..\..\agent\mibgroup\ucd-snmp\file.c "$(INTDIR)" +"$(INTDIR)\loadave.obj": ..\..\agent\mibgroup\ucd-snmp\loadave.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\ucd-snmp\versioninfo.c" +"$(INTDIR)\pass.obj": ..\..\agent\mibgroup\ucd-snmp\pass.c "$(INTDIR)" -"$(INTDIR)\versioninfo.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\pass_common.obj": ..\..\agent\mibgroup\ucd-snmp\pass_common.c "$(INTDIR)" +"$(INTDIR)\pass_persist.obj": ..\..\agent\mibgroup\ucd-snmp\pass_persist.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmpv3\snmpEngine.c +"$(INTDIR)\proc.obj": ..\..\agent\mibgroup\ucd-snmp\proc.c "$(INTDIR)" -"$(INTDIR)\snmpEngine.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\proxy.obj": ..\..\agent\mibgroup\ucd-snmp\proxy.c "$(INTDIR)" +"$(INTDIR)\versioninfo.obj": ..\..\agent\mibgroup\ucd-snmp\versioninfo.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmpv3\snmpMPDStats.c +"$(INTDIR)\snmpv3.obj": ..\..\agent\mibgroup\snmpv3\snmpEngine.c "$(INTDIR)" -"$(INTDIR)\snmpMPDStats.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\snmpv3.obj": ..\..\agent\mibgroup\snmpv3\snmpMPDStats.c "$(INTDIR)" +"$(INTDIR)\snmpv3.obj": ..\..\agent\mibgroup\snmpv3\usmConf.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmpv3\usmConf.c +"$(INTDIR)\snmpv3.obj": ..\..\agent\mibgroup\snmpv3\usmStats.c "$(INTDIR)" -"$(INTDIR)\usmConf.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\snmpv3.obj": ..\..\agent\mibgroup\snmpv3\usmUser.c "$(INTDIR)" +"$(INTDIR)\notification.obj": ..\..\agent\mibgroup\notification\snmpNotifyFilterProfileTable.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmpv3\usmStats.c +"$(INTDIR)\notification.obj": ..\..\agent\mibgroup\notification\snmpNotifyFilterProfileTable_data.c "$(INTDIR)" -"$(INTDIR)\usmStats.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\notification-log-mib.obj": ..\..\agent\mibgroup\notification-log-mib\notification_log.c "$(INTDIR)" +"$(INTDIR)\snmp-notification-mib.obj": ..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmpv3\usmUser.c +"$(INTDIR)\snmp-notification-mib.obj": ..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable_data_access.c "$(INTDIR)" -"$(INTDIR)\usmUser.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\snmp-notification-mib.obj": ..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable_data_storage.c "$(INTDIR)" +"$(INTDIR)\snmp-notification-mib.obj": ..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable_interface.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\notification\snmpNotifyFilterProfileTable.c +"$(INTDIR)\notification.obj": ..\..\agent\mibgroup\notification\snmpNotifyTable.c "$(INTDIR)" -"$(INTDIR)\snmpNotifyFilterProfileTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\notification.obj": ..\..\agent\mibgroup\notification\snmpNotifyTable_data.c "$(INTDIR)" +"$(INTDIR)\target.obj": ..\..\agent\mibgroup\target\snmpTargetAddrEntry.c "$(INTDIR)" -SOURCE="..\..\agent\mibgroup\notification-log-mib\notification_log.c" +"$(INTDIR)\target.obj": ..\..\agent\mibgroup\target\snmpTargetAddrEntry_data.c "$(INTDIR)" -"$(INTDIR)\notification_log.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\target.obj": ..\..\agent\mibgroup\target\snmpTargetParamsEntry.c "$(INTDIR)" +"$(INTDIR)\target.obj": ..\..\agent\mibgroup\target\snmpTargetParamsEntry_data.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable.c +"$(INTDIR)\target.obj": ..\..\agent\mibgroup\target\target.c "$(INTDIR)" -"$(INTDIR)\snmpNotifyFilterTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\target.obj": ..\..\agent\mibgroup\target\target_counters.c "$(INTDIR)" +"$(INTDIR)\agentx.obj": ..\..\agent\mibgroup\agentx\agentx_config.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable_data_access.c +"$(INTDIR)\agentx.obj": ..\..\agent\mibgroup\agentx\client.c "$(INTDIR)" -"$(INTDIR)\snmpNotifyFilterTable_data_access.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\agentx.obj": ..\..\agent\mibgroup\agentx\master.c "$(INTDIR)" +"$(INTDIR)\agentx.obj": ..\..\agent\mibgroup\agentx\master_admin.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\snmp-notification-mib\snmpNotifyFilterTable\snmpNotifyFilterTable_interface.c +"$(INTDIR)\agentx.obj": ..\..\agent\mibgroup\agentx\protocol.c "$(INTDIR)" -"$(INTDIR)\snmpNotifyFilterTable_interface.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\agentx.obj": ..\..\agent\mibgroup\agentx\subagent.c "$(INTDIR)" +"$(INTDIR)\agent.obj": ..\..\agent\mibgroup\agent\extend.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\notification\snmpNotifyTable.c +"$(INTDIR)\agent.obj": ..\..\agent\mibgroup\agent\nsCache.c "$(INTDIR)" -"$(INTDIR)\snmpNotifyTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\agent.obj": ..\..\agent\mibgroup\agent\nsDebug.c "$(INTDIR)" +"$(INTDIR)\agent.obj": ..\..\agent\mibgroup\agent\nsLogging.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\target\snmpTargetAddrEntry.c +"$(INTDIR)\agent.obj": ..\..\agent\mibgroup\agent\nsModuleTable.c "$(INTDIR)" -"$(INTDIR)\snmpTargetAddrEntry.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\agent.obj": ..\..\agent\mibgroup\agent\nsTransactionTable.c "$(INTDIR)" +"$(INTDIR)\utilities.obj": ..\..\agent\mibgroup\utilities\execute.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\target\snmpTargetParamsEntry.c +"$(INTDIR)\utilities.obj": ..\..\agent\mibgroup\utilities\iquery.c "$(INTDIR)" -"$(INTDIR)\snmpTargetParamsEntry.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\utilities.obj": ..\..\agent\mibgroup\utilities\override.c "$(INTDIR)" +"$(INTDIR)\util_funcs.obj": ..\..\agent\mibgroup\util_funcs\header_generic.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\target\target.c +"$(INTDIR)\util_funcs.obj": ..\..\agent\mibgroup\util_funcs\header_simple_table.c "$(INTDIR)" -"$(INTDIR)\target.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\header_complex.obj": ..\..\agent\mibgroup\header_complex.c "$(INTDIR)" +"$(INTDIR)\mib_modules.obj": ..\..\agent\mib_modules.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\target\target_counters.c +"$(INTDIR)\util_funcs.obj": ..\..\agent\mibgroup\util_funcs.c "$(INTDIR)" -"$(INTDIR)\target_counters.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\Exit.obj": ..\..\agent\mibgroup\util_funcs\Exit.c "$(INTDIR)" +"$(INTDIR)\restart.obj": ..\..\agent\mibgroup\util_funcs\restart.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\agentx\agentx_config.c +"$(INTDIR)\smux.obj": ..\..\agent\mibgroup\smux\smux.c "$(INTDIR)" -"$(INTDIR)\agentx_config.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\winExtDLL.obj": ..\..\agent\mibgroup\winExtDLL.c "$(INTDIR)" +"$(INTDIR)\at.obj": ..\..\agent\mibgroup\mibII\at.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\agentx\client.c +"$(INTDIR)\at_iphlpapi.obj": ..\..\agent\mibgroup\mibII\data_access\at_iphlpapi.c "$(INTDIR)" -"$(INTDIR)\client.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\icmp.obj": ..\..\agent\mibgroup\mibII\icmp.c "$(INTDIR)" +"$(INTDIR)\interfaces.obj": ..\..\agent\mibgroup\mibII\interfaces.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\agentx\master.c +"$(INTDIR)\ip.obj": ..\..\agent\mibgroup\mibII\ip.c "$(INTDIR)" -"$(INTDIR)\master.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\ipAddr.obj": ..\..\agent\mibgroup\mibII\ipAddr.c "$(INTDIR)" +"$(INTDIR)\route_write.obj": ..\..\agent\mibgroup\mibII\route_write.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\agentx\master_admin.c +"$(INTDIR)\tcp.obj": ..\..\agent\mibgroup\mibII\tcp.c "$(INTDIR)" -"$(INTDIR)\master_admin.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\tcpTable.obj": ..\..\agent\mibgroup\mibII\tcpTable.c "$(INTDIR)" +"$(INTDIR)\udp.obj": ..\..\agent\mibgroup\mibII\udp.c "$(INTDIR)" -SOURCE=..\..\agent\mibgroup\agentx\protocol.c +"$(INTDIR)\udpTable.obj": ..\..\agent\mibgroup\mibII\udpTable.c "$(INTDIR)" -"$(INTDIR)\protocol.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agentx\subagent.c - -"$(INTDIR)\subagent.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agent\extend.c - -"$(INTDIR)\extend.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agent\nsCache.c - -"$(INTDIR)\nsCache.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agent\nsDebug.c - -"$(INTDIR)\nsDebug.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agent\nsLogging.c - -"$(INTDIR)\nsLogging.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agent\nsModuleTable.c - -"$(INTDIR)\nsModuleTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\agent\nsTransactionTable.c - -"$(INTDIR)\nsTransactionTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\utilities\execute.c - -"$(INTDIR)\execute.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\utilities\iquery.c - -"$(INTDIR)\iquery.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\utilities\override.c - -"$(INTDIR)\override.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\util_funcs\header_generic.c - -"$(INTDIR)\header_generic.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\util_funcs\header_simple_table.c - -"$(INTDIR)\header_simple_table.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\header_complex.c - -"$(INTDIR)\header_complex.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mib_modules.c - -"$(INTDIR)\mib_modules.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\util_funcs.c - -"$(INTDIR)\util_funcs.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\util_funcs\Exit.c - -"$(INTDIR)\Exit.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\util_funcs\restart.c - -"$(INTDIR)\restart.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\smux\smux.c - -"$(INTDIR)\smux.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\winExtDLL.c -"$(INTDIR)\winExtDLL.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\at.c -"$(INTDIR)\at.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\icmp.c -"$(INTDIR)\icmp.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\interfaces.c -"$(INTDIR)\interfaces.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\ip.c -"$(INTDIR)\ip.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\ipAddr.c -"$(INTDIR)\ipAddr.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\route_write.c -"$(INTDIR)\route_write.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\tcp.c -"$(INTDIR)\tcp.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\tcpTable.c -"$(INTDIR)\tcpTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\udp.c -"$(INTDIR)\udp.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\udpTable.c -"$(INTDIR)\udpTable.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\mibgroup\mibII\var_route.c -"$(INTDIR)\var_route.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF +"$(INTDIR)\var_route.obj": ..\..\agent\mibgroup\mibII\var_route.c "$(INTDIR)" diff --git a/win32/nmakeperl.bat b/win32/nmakeperl.bat index d380453..d70e382 100644 --- a/win32/nmakeperl.bat +++ b/win32/nmakeperl.bat @@ -39,6 +39,7 @@ echo Remember to run this script from the base of the source directory. cd perl REM choose the installed location... +set PERL5LIB=$(MAKEDIR)\..\perl perl Makefile.PL CAPI=TRUE -NET-SNMP-PATH=%INSTALL_BASE% REM Or, if the libraries have been built, look back in the build directory. diff --git a/win32/snmpd/Makefile.in b/win32/snmpd/Makefile.in index 1b1b3ac..f5248f2 100644 --- a/win32/snmpd/Makefile.in +++ b/win32/snmpd/Makefile.in @@ -4,6 +4,9 @@ OUTDIR= INTDIR= SDK= LINKTYPE= +CFLAGS= +LDFLAGS= +RSCFLAGS= # Set to 1 to allow the building using the DLL version of SNMPLIB. ALLOW_DLL=1 @@ -24,41 +27,18 @@ ALL : "..\bin\$(OUTDIR)\snmpd.exe" "$(INTDIR)" if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" CPP=cl.exe -!IF "$(CFG)" == "release" -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -RSC_PROJ=/l 0x409 /fo"$(INTDIR)\winservice.res" /d "NDEBUG" -!ELSE -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c -RSC_PROJ=/l 0x409 /fo"$(INTDIR)\winservice.res" /d "_DEBUG" -!ENDIF - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF +CPP_PROJ=/I.. /I..\..\include $(CFLAGS) -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\agent}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe LINK32=link.exe LINK32_FLAGS=netsnmp.lib netsnmpagent.lib netsnmpmibs.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /out:"..\bin\$(OUTDIR)/snmpd.exe" /libpath:"../lib/$(OUTDIR)" -!IF "$(CFG)" == "release" -LINK32_FLAGS=$(LINK32_FLAGS) /debug /pdb:"../bin/$(OUTDIR)/snmpd.pdb" -!ELSE -LINK32_FLAGS=$(LINK32_FLAGS) /debug /incremental:no /pdb:"../bin/$(OUTDIR)/snmpd.pdb" /pdbtype:sept -!ENDIF +LINK32_FLAGS=$(LINK32_FLAGS) /pdb:"../bin/$(OUTDIR)/snmpd.pdb" $(LDFLAGS) LINK32_OBJS= \ "$(INTDIR)\auto_nlist.obj" \ "$(INTDIR)\kernel.obj" \ @@ -73,11 +53,7 @@ CLEAN : "..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) !IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 + $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS) !ELSE # Linktype check -@echo . -@echo Aborting build. Applications can not be built using --linktype=dynamic @@ -92,32 +68,10 @@ CLEAN : !ENDIF !ENDIF +"$(INTDIR)\auto_nlist.obj": ..\..\agent\auto_nlist.c "$(INTDIR)" +"$(INTDIR)\kernel.obj": ..\..\agent\kernel.c "$(INTDIR)" +"$(INTDIR)\snmpd.obj": ..\..\agent\snmpd.c "$(INTDIR)" +"$(INTDIR)\winservice.obj": ..\..\snmplib\winservice.c "$(INTDIR)" -SOURCE=..\..\agent\auto_nlist.c - -"$(INTDIR)\auto_nlist.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\kernel.c - -"$(INTDIR)\kernel.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\agent\snmpd.c - -"$(INTDIR)\snmpd.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\winservice.c - -"$(INTDIR)\winservice.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=..\..\snmplib\winservice.rc - -"$(INTDIR)\winservice.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) /i "..\..\snmplib" $(SOURCE) +"$(INTDIR)\winservice.res": ..\..\snmplib\winservice.rc "$(INTDIR)" + $(RSC) $(RSCFLAGS) /fo$@ /i "..\..\snmplib" ..\..\snmplib\winservice.rc diff --git a/win32/snmpnetstat/Makefile.in b/win32/snmpnetstat/Makefile.in index 05a01e8..836d50b 100644 --- a/win32/snmpnetstat/Makefile.in +++ b/win32/snmpnetstat/Makefile.in @@ -3,6 +3,8 @@ CFG= OUTDIR= INTDIR= LINKTYPE= +CFLAGS= +LDFLAGS= # Set to 1 to allow the building using the DLL version of SNMPLIB. ALLOW_DLL=1 @@ -13,129 +15,25 @@ NULL= NULL=nul !ENDIF -!IF "$(CFG)" == "release" - -ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)" - - -CLEAN : - -@erase "$(INTDIR)\if.obj" - -@erase "$(INTDIR)\inet.obj" - -@erase "$(INTDIR)\inet6.obj" - -@erase "$(INTDIR)\inetx.obj" - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\route.obj" - -@erase "$(INTDIR)\routex.obj" - -@erase "$(INTDIR)\ffs.obj" - -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\winstub.obj" - -@erase "$(INTDIR)\$(PROGNAME).pch" - -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe" - -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" - -"..\bin\$(OUTDIR)" : - if not exist "..\bin\$(OUTDIR)/$(NULL)" mkdir "..\bin\$(OUTDIR)" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +CPP_PROJ=/I.. -I..\..\include $(CFLAGS) -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\$(PROGNAME).bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=netsnmp.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /debug /out:"../bin/$(OUTDIR)/$(PROGNAME).exe" /libpath:"../lib/release" -LINK32_OBJS= \ - "$(INTDIR)\if.obj" \ - "$(INTDIR)\inet.obj" \ - "$(INTDIR)\inet6.obj" \ - "$(INTDIR)\inetx.obj" \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\route.obj" \ - "$(INTDIR)\routex.obj" \ - "$(INTDIR)\ffs.obj" \ - "$(INTDIR)\winstub.obj" - -"..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) -!IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 -!ELSE # Linktype check - -@echo . - -@echo Aborting build. Applications can not be built using --linktype=dynamic - -@echo . -!ENDIF - -!ELSEIF "$(CFG)" == "debug" - -ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)\$(PROGNAME).bsc" "$(INTDIR)" +ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)" CLEAN : -@erase "$(INTDIR)\if.obj" - -@erase "$(INTDIR)\if.sbr" -@erase "$(INTDIR)\inet.obj" - -@erase "$(INTDIR)\inet.sbr" -@erase "$(INTDIR)\inet6.obj" - -@erase "$(INTDIR)\inet6.sbr" -@erase "$(INTDIR)\inetx.obj" - -@erase "$(INTDIR)\inetx.sbr" -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\main.sbr" -@erase "$(INTDIR)\route.obj" - -@erase "$(INTDIR)\route.sbr" -@erase "$(INTDIR)\routex.obj" - -@erase "$(INTDIR)\routex.sbr" -@erase "$(INTDIR)\ffs.obj" - -@erase "$(INTDIR)\ffs.sbr" -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\vc??.pdb" -@erase "$(INTDIR)\winstub.obj" - -@erase "$(INTDIR)\winstub.sbr" -@erase "$(INTDIR)\$(PROGNAME).pch" - -@erase "$(INTDIR)\$(PROGNAME).bsc" - -@erase "$(INTDIR)\$(PROGNAME).pdb" -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe" -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" @@ -145,64 +43,12 @@ CLEAN : "$(INTDIR)" : if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\apps\$(PROGNAME)}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\$(PROGNAME).bsc" -BSC32_SBRS= \ - "$(INTDIR)\if.sbr" \ - "$(INTDIR)\inet.sbr" \ - "$(INTDIR)\inet6.sbr" \ - "$(INTDIR)\inetx.sbr" \ - "$(INTDIR)\main.sbr" \ - "$(INTDIR)\route.sbr" \ - "$(INTDIR)\routex.sbr" \ - "$(INTDIR)\ffs.sbr" \ - "$(INTDIR)\winstub.sbr" - -"$(INTDIR)\$(PROGNAME).bsc" : "..\bin\$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - LINK32=link.exe -LINK32_FLAGS=netsnmp.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /incremental:no /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /debug /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /pdbtype:sept /libpath:"../lib/debug" +LINK32_FLAGS=netsnmp.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /out:"../bin/$(OUTDIR)/$(PROGNAME).exe" /libpath:"../lib/$(INTDIR)" $(LDFLAGS) LINK32_OBJS= \ "$(INTDIR)\if.obj" \ "$(INTDIR)\inet.obj" \ @@ -216,19 +62,13 @@ LINK32_OBJS= \ "..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) !IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 + $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS) !ELSE # Linktype check -@echo . -@echo Aborting build. Applications can not be built using --linktype=dynamic -@echo . !ENDIF -!ENDIF - !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("$(PROGNAME).dep") @@ -239,143 +79,12 @@ LINK32_OBJS= \ !ENDIF -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\..\apps\$(PROGNAME)\if.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\if.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\if.obj" "$(INTDIR)\if.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)\inet.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\inet.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\inet.obj" "$(INTDIR)\inet.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)\inet6.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\inet6.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\inet6.obj" "$(INTDIR)\inet6.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)\inetx.c - -"$(INTDIR)\inetx.obj" "$(INTDIR)\inetx.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\apps\$(PROGNAME)\main.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\main.obj" "$(INTDIR)\main.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)\route.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\route.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\route.obj" "$(INTDIR)\route.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)\routex.c - -"$(INTDIR)\routex.obj" "$(INTDIR)\routex.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=..\..\apps\$(PROGNAME)\ffs.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\ffs.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\ffs.obj" "$(INTDIR)\ffs.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)\winstub.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\winstub.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\winstub.obj" "$(INTDIR)\winstub.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - - -!ENDIF - +"$(INTDIR)\ffs.obj": ..\..\apps\$(PROGNAME)\ffs.c "$(INTDIR)" +"$(INTDIR)\if.obj": ..\..\apps\$(PROGNAME)\if.c "$(INTDIR)" +"$(INTDIR)\inet.obj": ..\..\apps\$(PROGNAME)\inet.c "$(INTDIR)" +"$(INTDIR)\inet6.obj": ..\..\apps\$(PROGNAME)\inet6.c "$(INTDIR)" +"$(INTDIR)\inetx.obj": ..\..\apps\$(PROGNAME)\inetx.c "$(INTDIR)" +"$(INTDIR)\main.obj": ..\..\apps\$(PROGNAME)\main.c "$(INTDIR)" +"$(INTDIR)\route.obj": ..\..\apps\$(PROGNAME)\route.c "$(INTDIR)" +"$(INTDIR)\routex.obj": ..\..\apps\$(PROGNAME)\routex.c "$(INTDIR)" +"$(INTDIR)\winstub.obj": ..\..\apps\$(PROGNAME)\winstub.c "$(INTDIR)" diff --git a/win32/snmptrapd/Makefile.in b/win32/snmptrapd/Makefile.in index 2fa5ccb..40217c6 100644 --- a/win32/snmptrapd/Makefile.in +++ b/win32/snmptrapd/Makefile.in @@ -3,18 +3,22 @@ CFG= OUTDIR= INTDIR= LINKTYPE= +CFLAGS= +LDFLAGS= +RSCFLAGS= # Set to 1 to allow the building using the DLL version of SNMPLIB. ALLOW_DLL=1 +CPP=cl.exe +CPP_PROJ=/I.. /I..\..\include /I..\..\agent/mibgroup $(CFLAGS) + !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF -!IF "$(CFG)" == "release" - ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)" @@ -33,146 +37,15 @@ CLEAN : "$(INTDIR)" : if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /EHsc /Zi /O2 /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\apps}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< +{..\..\snmplib}.c{$(INTDIR)}.obj:: + $(CPP) $(CPP_PROJ) $< RSC=rc.exe -RSC_PROJ=/l 0x409 /fo"$(INTDIR)\winservice.res" /d "NDEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\$(PROGNAME).bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=netsnmp.lib netsnmpagent.lib netsnmpmibs.lib netsnmptrapd.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /debug /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /libpath:"../lib/release" -LINK32_OBJS= \ - "$(INTDIR)\$(PROGNAME).obj" \ - "$(INTDIR)\winservice.obj" \ - "$(INTDIR)\winservice.res" - -"..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) -!IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 -!ELSE # Linktype check - -@echo . - -@echo Aborting build. Applications can not be built using --linktype=dynamic - -@echo . -!ENDIF - -!ELSEIF "$(CFG)" == "debug" - -ALL : "..\bin\$(OUTDIR)\$(PROGNAME).exe" "$(INTDIR)\$(PROGNAME).bsc" "$(INTDIR)" - - -CLEAN : - -@erase "$(INTDIR)\winservice.obj" - -@erase "$(INTDIR)\winservice.res" - -@erase "$(INTDIR)\winservice.sbr" - -@erase "$(INTDIR)\$(PROGNAME).obj" - -@erase "$(INTDIR)\$(PROGNAME).sbr" - -@erase "$(INTDIR)\vc??.idb" - -@erase "$(INTDIR)\vc??.pdb" - -@erase "$(INTDIR)\$(PROGNAME).pch" - -@erase "$(INTDIR)\$(PROGNAME).bsc" - -@erase "$(INTDIR)\$(PROGNAME).pdb" - -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe" - -@erase "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" - -"..\bin\$(OUTDIR)" : - if not exist "..\bin\$(OUTDIR)/$(NULL)" mkdir "..\bin\$(OUTDIR)" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /EHsc /Zi /Od /I "." /I ".." /I "..\..\snmplib" /I "..\.." /I "..\..\include" /I "..\..\agent\mibgroup" /D "WIN32" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\$(PROGNAME).pdb" /FD /c - -!IF "$(LINKTYPE)" == "dynamic" -CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL" -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -RSC_PROJ=/l 0x409 /fo"$(INTDIR)\winservice.res" /d "_DEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\$(PROGNAME).bsc" -BSC32_SBRS= \ - "$(INTDIR)\$(PROGNAME).sbr" \ - "$(INTDIR)\winservice.sbr" - -"$(INTDIR)\$(PROGNAME).bsc" : "..\bin\$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - LINK32=link.exe -LINK32_FLAGS=netsnmp.lib netsnmpagent.lib netsnmpmibs.lib netsnmptrapd.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /incremental:no /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /debug /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /pdbtype:sept /libpath:"../lib/debug" +LINK32_FLAGS=netsnmp.lib netsnmpagent.lib netsnmpmibs.lib netsnmptrapd.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib /nologo /subsystem:console /pdb:"../bin/$(OUTDIR)/$(PROGNAME).pdb" /out:"..\bin\$(OUTDIR)/$(PROGNAME).exe" /libpath:"../lib/$(INTDIR)" $(LDFLAGS) LINK32_OBJS= \ "$(INTDIR)\$(PROGNAME).obj" \ "$(INTDIR)\winservice.obj" \ @@ -180,20 +53,13 @@ LINK32_OBJS= \ "..\bin\$(OUTDIR)\$(PROGNAME).exe" : "..\bin\$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) !IF "$(LINKTYPE)" == "static" || "$(ALLOW_DLL)" == "1" - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - if exist "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" \ - mt.exe -manifest "..\bin\$(OUTDIR)\$(PROGNAME).exe.manifest" -outputresource:"..\bin\$(OUTDIR)\$(PROGNAME).exe";1 + $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS) !ELSE # Linktype check -@echo . -@echo Aborting build. Applications can not be built using --linktype=dynamic -@echo . !ENDIF -!ENDIF - - !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("$(PROGNAME).dep") !INCLUDE "$(PROGNAME).dep" @@ -202,93 +68,10 @@ LINK32_OBJS= \ !ENDIF !ENDIF +"$(INTDIR)\$(PROGNAME).obj": ..\..\apps\$(PROGNAME).c "$(INTDIR)" +"$(INTDIR)\$(PROGNAME)_handlers.obj": ..\..\apps\$(PROGNAME)_handlers.c "$(INTDIR)" +"$(INTDIR)\$(PROGNAME)_log.obj": ..\..\apps\$(PROGNAME)_log.c "$(INTDIR)" +"$(INTDIR)\winservice.obj": ..\..\snmplib\winservice.c "$(INTDIR)" -SOURCE=..\..\apps\$(PROGNAME).c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\$(PROGNAME).obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\$(PROGNAME).obj" "$(INTDIR)\$(PROGNAME).sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)_handlers.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\$(PROGNAME)_handlers.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\$(PROGNAME)_handlers.obj" "$(INTDIR)\$(PROGNAME)_handlers.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\apps\$(PROGNAME)_log.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\$(PROGNAME)_log.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\$(PROGNAME)_log.obj" "$(INTDIR)\$(PROGNAME)_log.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\snmplib\winservice.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\winservice.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\winservice.obj" "$(INTDIR)\winservice.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -SOURCE=..\..\snmplib\winservice.rc - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\winservice.res" : $(SOURCE) "$(INTDIR)" - $(RSC) /l 0x409 /fo"$(INTDIR)\winservice.res" /i "..\..\snmplib" /d "NDEBUG" $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\winservice.res" : $(SOURCE) "$(INTDIR)" - $(RSC) /l 0x409 /fo"$(INTDIR)\winservice.res" /i "..\..\snmplib" /d "_DEBUG" $(SOURCE) - - -!ENDIF +"$(INTDIR)\winservice.res": ..\..\snmplib\winservice.rc "$(INTDIR)" + $(RSC) $(RSCFLAGS) /fo$@ /i "..\..\snmplib" ..\..\snmplib\winservice.rc diff --git a/win32/transports/snmp_transport_inits.h b/win32/transports/snmp_transport_inits.h index 1bf1409..5720d56 100644 --- a/win32/transports/snmp_transport_inits.h +++ b/win32/transports/snmp_transport_inits.h @@ -14,3 +14,15 @@ netsnmp_udpipv6_ctor(); #ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN netsnmp_tcpipv6_ctor(); #endif +#ifdef NETSNMP_TRANSPORT_TLSBASE_DOMAIN +netsnmp_tlsbase_ctor(); +#endif +#ifdef NETSNMP_TRANSPORT_DTLSUDP_DOMAIN +netsnmp_dtlsudp_ctor(); +#endif +#ifdef NETSNMP_TRANSPORT_TLSTCP_DOMAIN +netsnmp_tlstcp_ctor(); +#endif +#ifdef NETSNMP_TRANSPORT_STD_DOMAIN +netsnmp_std_ctor(); +#endif